flexlayout-react 0.8.10 → 0.8.11
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.txt +7 -0
- package/README.md +28 -20
- package/declarations/view/BorderTab.d.ts +1 -2
- package/declarations/view/Icons.d.ts +7 -8
- package/declarations/view/Layout.d.ts +1 -1
- package/declarations/view/SizeTracker.d.ts +1 -1
- package/dist/flexlayout.js +49 -29
- package/dist/flexlayout_min.js +1 -1
- package/dist/flexlayout_min.js.LICENSE.txt +10 -0
- package/dist/src/Attribute.js +43 -0
- package/dist/src/Attribute.js.map +1 -0
- package/dist/src/AttributeDefinitions.js +132 -0
- package/dist/src/AttributeDefinitions.js.map +1 -0
- package/dist/src/DockLocation.js +121 -0
- package/dist/src/DockLocation.js.map +1 -0
- package/dist/src/DropInfo.js +10 -0
- package/dist/src/DropInfo.js.map +1 -0
- package/dist/src/I18nLabel.js +14 -0
- package/dist/src/I18nLabel.js.map +1 -0
- package/dist/src/Orientation.js +23 -0
- package/dist/src/Orientation.js.map +1 -0
- package/dist/src/Rect.js +111 -0
- package/dist/src/Rect.js.map +1 -0
- package/dist/src/Types.js +95 -0
- package/dist/src/Types.js.map +1 -0
- package/dist/src/index.js +22 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/model/Action.js +7 -0
- package/dist/src/model/Action.js.map +1 -0
- package/dist/src/model/Actions.js +170 -0
- package/dist/src/model/Actions.js.map +1 -0
- package/dist/src/model/BorderNode.js +390 -0
- package/dist/src/model/BorderNode.js.map +1 -0
- package/dist/src/model/BorderSet.js +67 -0
- package/dist/src/model/BorderSet.js.map +1 -0
- package/dist/src/model/ICloseType.js +7 -0
- package/dist/src/model/ICloseType.js.map +1 -0
- package/dist/src/model/IDraggable.js +2 -0
- package/dist/src/model/IDraggable.js.map +1 -0
- package/dist/src/model/IDropTarget.js +2 -0
- package/dist/src/model/IDropTarget.js.map +1 -0
- package/dist/src/model/IJsonModel.js +2 -0
- package/dist/src/model/IJsonModel.js.map +1 -0
- package/dist/src/model/LayoutWindow.js +81 -0
- package/dist/src/model/LayoutWindow.js.map +1 -0
- package/dist/src/model/Model.js +608 -0
- package/dist/src/model/Model.js.map +1 -0
- package/dist/src/model/Node.js +218 -0
- package/dist/src/model/Node.js.map +1 -0
- package/dist/src/model/RowNode.js +492 -0
- package/dist/src/model/RowNode.js.map +1 -0
- package/dist/src/model/TabNode.js +293 -0
- package/dist/src/model/TabNode.js.map +1 -0
- package/dist/src/model/TabSetNode.js +469 -0
- package/dist/src/model/TabSetNode.js.map +1 -0
- package/dist/src/model/Utils.js +48 -0
- package/dist/src/model/Utils.js.map +1 -0
- package/dist/src/view/BorderButton.js +126 -0
- package/dist/src/view/BorderButton.js.map +1 -0
- package/dist/src/view/BorderTab.js +44 -0
- package/dist/src/view/BorderTab.js.map +1 -0
- package/dist/src/view/BorderTabSet.js +138 -0
- package/dist/src/view/BorderTabSet.js.map +1 -0
- package/dist/src/view/DragContainer.js +16 -0
- package/dist/src/view/DragContainer.js.map +1 -0
- package/dist/src/view/ErrorBoundary.js +24 -0
- package/dist/src/view/ErrorBoundary.js.map +1 -0
- package/dist/src/view/Icons.js +29 -0
- package/dist/src/view/Icons.js.map +1 -0
- package/dist/src/view/Layout.js +881 -0
- package/dist/src/view/Layout.js.map +1 -0
- package/dist/src/view/Overlay.js +9 -0
- package/dist/src/view/Overlay.js.map +1 -0
- package/dist/src/view/PopoutWindow.js +129 -0
- package/dist/src/view/PopoutWindow.js.map +1 -0
- package/dist/src/view/PopupMenu.js +89 -0
- package/dist/src/view/PopupMenu.js.map +1 -0
- package/dist/src/view/Row.js +46 -0
- package/dist/src/view/Row.js.map +1 -0
- package/dist/src/view/SizeTracker.js +12 -0
- package/dist/src/view/SizeTracker.js.map +1 -0
- package/dist/src/view/Splitter.js +192 -0
- package/dist/src/view/Splitter.js.map +1 -0
- package/dist/src/view/Tab.js +91 -0
- package/dist/src/view/Tab.js.map +1 -0
- package/dist/src/view/TabButton.js +124 -0
- package/dist/src/view/TabButton.js.map +1 -0
- package/dist/src/view/TabButtonStamp.js +15 -0
- package/dist/src/view/TabButtonStamp.js.map +1 -0
- package/dist/src/view/TabOverflowHook.js +266 -0
- package/dist/src/view/TabOverflowHook.js.map +1 -0
- package/dist/src/view/TabSet.js +256 -0
- package/dist/src/view/TabSet.js.map +1 -0
- package/dist/src/view/Utils.js +110 -0
- package/dist/src/view/Utils.js.map +1 -0
- package/lib/view/BorderButton.js +6 -8
- package/lib/view/BorderButton.js.map +1 -1
- package/lib/view/BorderTab.js +18 -9
- package/lib/view/BorderTab.js.map +1 -1
- package/lib/view/BorderTabSet.js +11 -17
- package/lib/view/BorderTabSet.js.map +1 -1
- package/lib/view/DragContainer.js +2 -2
- package/lib/view/DragContainer.js.map +1 -1
- package/lib/view/ErrorBoundary.js +2 -2
- package/lib/view/ErrorBoundary.js.map +1 -1
- package/lib/view/Icons.js +8 -20
- package/lib/view/Icons.js.map +1 -1
- package/lib/view/Layout.js +36 -79
- package/lib/view/Layout.js.map +1 -1
- package/lib/view/Overlay.js +2 -2
- package/lib/view/Overlay.js.map +1 -1
- package/lib/view/PopupMenu.js +4 -5
- package/lib/view/PopupMenu.js.map +1 -1
- package/lib/view/Row.js +5 -4
- package/lib/view/Row.js.map +1 -1
- package/lib/view/SizeTracker.js +2 -1
- package/lib/view/SizeTracker.js.map +1 -1
- package/lib/view/Splitter.js +9 -4
- package/lib/view/Splitter.js.map +1 -1
- package/lib/view/Tab.js +3 -4
- package/lib/view/Tab.js.map +1 -1
- package/lib/view/TabButton.js +6 -8
- package/lib/view/TabButton.js.map +1 -1
- package/lib/view/TabButtonStamp.js +4 -6
- package/lib/view/TabButtonStamp.js.map +1 -1
- package/lib/view/TabSet.js +38 -42
- package/lib/view/TabSet.js.map +1 -1
- package/lib/view/Utils.js +3 -3
- package/lib/view/Utils.js.map +1 -1
- package/package.json +87 -82
- package/playwright-report/data/01f8ff379b7b7c06b0f8dbd65cbd55e95f8ca470.zip +0 -0
- package/playwright-report/data/02a706b995d751dee8ac0429e29eafb796a23f96.zip +0 -0
- package/playwright-report/data/04468c5a7304bad1acbe32d3376bfc5038e172d9.zip +0 -0
- package/playwright-report/data/04ffe14721deea0c6402bb96c78055475f6cd687.zip +0 -0
- package/playwright-report/data/07e1bb8bd6407ceafa7a1051839d398f34b41a52.zip +0 -0
- package/playwright-report/data/0d17b99e2ddd975da4868f295b370a9fc9b55993.zip +0 -0
- package/playwright-report/data/108805618d29c7800d55d7dd8da36829fec366bd.zip +0 -0
- package/playwright-report/data/1271fd2bc76809c25b62351f4321b396e745a199.zip +0 -0
- package/playwright-report/data/16bd316f5e3e9ad6c9dc2a6a0388f3425c1a61d9.zip +0 -0
- package/playwright-report/data/1a1b06cebe59d981e21198164093230b0a1704fd.zip +0 -0
- package/playwright-report/data/1b3b6bba4aca415bc586b2a0abb18410af26fbf1.zip +0 -0
- package/playwright-report/data/1ce927369a55edf14ec99e0029d1a342cb0fcfa4.zip +0 -0
- package/playwright-report/data/20a694648a90f0a805a4397b73699142e5dd50c1.zip +0 -0
- package/playwright-report/data/211f1c8fc3f5d052d935906201f29a1e42a2fbd8.zip +0 -0
- package/playwright-report/data/2176124681e769fbba593a272e67331fd69e56ef.zip +0 -0
- package/playwright-report/data/2487db6273b09acd9a62a9ecfa8f1e411cc769df.zip +0 -0
- package/playwright-report/data/25abefed6606e15cac6dc83e3ea4e85896233020.zip +0 -0
- package/playwright-report/data/2752051b8593d432be1a623813f2dbee043dc959.zip +0 -0
- package/playwright-report/data/2d72001a7f57a11282fe741ca22501b34f7576a2.zip +0 -0
- package/playwright-report/data/308de4d252afe1db5aeda783ea3eaf09368aa812.zip +0 -0
- package/playwright-report/data/30f265807a34ee9bb2ddd931970be6f572a42ffe.zip +0 -0
- package/playwright-report/data/326599ace543d3340403f5eaa0f28ef73f7d3cfc.zip +0 -0
- package/playwright-report/data/3662fcf1839c6bb164e1aceea5e25b410bae6286.zip +0 -0
- package/playwright-report/data/38cdebbb090386af04f96f13bf45b2a23feb6cf5.zip +0 -0
- package/playwright-report/data/3b45c7876ca7a4208061f69fa0cce9f9e619557c.zip +0 -0
- package/playwright-report/data/3c6115f8ff03527f3b888e8c6626d086146bb961.zip +0 -0
- package/playwright-report/data/3e976a69f9bc188048c96969507a28fc5411da40.zip +0 -0
- package/playwright-report/data/420bd6c0ed97c53e6ee5108c11c337690ed9dd71.zip +0 -0
- package/playwright-report/data/424c925f1d020f7918c5b1d4e93a3aff4ffd0d35.zip +0 -0
- package/playwright-report/data/4459657c233583f0bb5f541ba2a56d14fc04324f.zip +0 -0
- package/playwright-report/data/45dbca16424f69b6af3f201fd918186e66e6a921.zip +0 -0
- package/playwright-report/data/4c7242437d15e34066b69d5f3a71e21f436d81bb.zip +0 -0
- package/playwright-report/data/56f84e2288e6485b68f0f78f79af97016d066eea.zip +0 -0
- package/playwright-report/data/679d4cfcb398dd2d19703be59bbf1de72f73fa3e.zip +0 -0
- package/playwright-report/data/686279f3ccdca1213fe91a9901f1ca469a41db4b.zip +0 -0
- package/playwright-report/data/69403980b98daeb052c732f3d984b7ccc51022aa.zip +0 -0
- package/playwright-report/data/6d91e10cd5dc95944881ea0f875bf0e531c63164.zip +0 -0
- package/playwright-report/data/6f362695f59905c3acdcafb6eeacfa4b068bc030.zip +0 -0
- package/playwright-report/data/71dd5897288168b0f7fb2e187f2b543e880733b1.zip +0 -0
- package/playwright-report/data/7540a41a9c123cffc1750447ccb69d9fb8cc8ba5.zip +0 -0
- package/playwright-report/data/78f8483a26c47ca761f43b1f142a9fb9d001b27e.zip +0 -0
- package/playwright-report/data/7e8bd5ba547094dcf303d450853b2f74f41749b2.zip +0 -0
- package/playwright-report/data/7fbec8e63ea2ee1702a94fe4d837067192e661f0.zip +0 -0
- package/playwright-report/data/87f2ea42a46cbd21813358d7d6e31d9999fca953.zip +0 -0
- package/playwright-report/data/8db527a1f9b753036cf63bb4afc96a765007fe82.zip +0 -0
- package/playwright-report/data/8e5ccd4bd56f3843f4e788c5e9842165221c2748.zip +0 -0
- package/playwright-report/data/8fc12e2795e02ee2ad773ec7be25f94b6ca697ed.zip +0 -0
- package/playwright-report/data/9d10ab1649ded4751d19014847e110b0b03ad126.zip +0 -0
- package/playwright-report/data/ab82c3994c6614fa6873fc92fd44ca78cb45f9d6.zip +0 -0
- package/playwright-report/data/ac554655d509fe64199a053e715def4ce4bbd618.zip +0 -0
- package/playwright-report/data/ad8e5a0cec5ec3369478099a58b7652c0dd636f1.zip +0 -0
- package/playwright-report/data/ae30baf5dea2dc0dd2ca87ffa08afb936b27fef1.zip +0 -0
- package/playwright-report/data/bc7631ffd4df693573a3233ec403a1f9cbcb00a9.zip +0 -0
- package/playwright-report/data/bcfe71e7532702969ecdde584a294907ed21525e.zip +0 -0
- package/playwright-report/data/bf020e09e20d0cd6e1b8aa82153e84f9d40c7f74.zip +0 -0
- package/playwright-report/data/c3452f499f82ef644c3d314626d3d9c762ff5c20.zip +0 -0
- package/playwright-report/data/c5dfbb00ea0965a4214f02cde22245958bb31c86.zip +0 -0
- package/playwright-report/data/c716ede7c5174d8a83653a6862605eca04783bad.zip +0 -0
- package/playwright-report/data/c95ca5869740edf6d1d627d120aa9ba26b1d3415.zip +0 -0
- package/playwright-report/data/cc17390169d327b4dfc2a9b3a8279e74ff975b1d.zip +0 -0
- package/playwright-report/data/d0ff6b9f342d792119f1513cc53c9f315a56251b.zip +0 -0
- package/playwright-report/data/d26377153bff611b5ba5a1148fc8858f7bb2cb7b.zip +0 -0
- package/playwright-report/data/dc0608de1b624a691f2f393bf450fc01591076ef.zip +0 -0
- package/playwright-report/data/dee4c585c248f4827601afbde02d3732761bdd8b.zip +0 -0
- package/playwright-report/data/e4cdfceef70735028de78f94f7e07a1e65fa317d.zip +0 -0
- package/playwright-report/data/e64d89424643af3f746a091f7567db49b0b45f3c.zip +0 -0
- package/playwright-report/data/e70483c7d13bb871f5c5b4aa54149172d58bf0c0.zip +0 -0
- package/playwright-report/data/e8333b653df262d800ee7b5329503b975d420e87.zip +0 -0
- package/playwright-report/data/ed1bd19a957a6165ba73a644af4959590b23eed9.zip +0 -0
- package/playwright-report/data/f35cf046cdf897abd96f318f79443407e58b8f0b.zip +0 -0
- package/playwright-report/data/f8793a7c69b939ac07422cf41aac45ebe4a86908.zip +0 -0
- package/playwright-report/data/fb2a383b96839380e90e0137363a574e665aed38.zip +0 -0
- package/playwright-report/data/fede8e774c66e329bdac055d6d67e73aa75b14fc.zip +0 -0
- package/playwright-report/index.html +71 -0
- package/playwright-report/trace/assets/codeMirrorModule-DpJ-EmBQ.js +24 -0
- package/playwright-report/trace/assets/defaultSettingsView-DTenqiGw.js +259 -0
- package/playwright-report/trace/codeMirrorModule.C3UTv-Ge.css +1 -0
- package/playwright-report/trace/codicon.DCmgc-ay.ttf +0 -0
- package/playwright-report/trace/defaultSettingsView.5fN5lw10.css +1 -0
- package/playwright-report/trace/index.CFOW-Ezb.css +1 -0
- package/playwright-report/trace/index.CUq7VgrV.js +2 -0
- package/playwright-report/trace/index.html +43 -0
- package/playwright-report/trace/playwright-logo.svg +9 -0
- package/playwright-report/trace/snapshot.html +21 -0
- package/playwright-report/trace/sw.bundle.js +3 -0
- package/playwright-report/trace/uiMode.BatfzHMG.css +1 -0
- package/playwright-report/trace/uiMode.CHJSAD7F.js +5 -0
- package/playwright-report/trace/uiMode.html +17 -0
- package/playwright-report/trace/xtermModule.Beg8tuEN.css +32 -0
- package/playwright.config.ts +79 -0
- package/screenshots/PlaywrightUI.png +0 -0
- package/src/view/BorderTab.tsx +18 -7
- package/src/view/Icons.tsx +0 -2
- package/src/view/Layout.tsx +2 -2
- package/src/view/Overlay.tsx +0 -1
- package/src/view/Splitter.tsx +6 -0
- package/src/view/TabButtonStamp.tsx +0 -1
- package/src/view/TabSet.tsx +16 -7
- package/test-results/view-Add-methods-add-to-active-tabset-chromium/trace.zip +0 -0
- package/test-results/view-Add-methods-drag-to-border-chromium/trace.zip +0 -0
- package/test-results/view-Add-methods-drag-to-tabset-chromium/trace.zip +0 -0
- package/test-results/view-Delete-methods-delete-all-tabs-chromium/trace.zip +0 -0
- package/test-results/view-Delete-methods-delete-tab-chromium/trace.zip +0 -0
- package/test-results/view-Extended-App-onRenderTab-chromium/trace.zip +0 -0
- package/test-results/view-Extended-App-onRenderTab-in-border-chromium/trace.zip +0 -0
- package/test-results/view-Extended-App-onRenderTabSet-chromium/trace.zip +0 -0
- package/test-results/view-Extended-App-onRenderTabSet-for-border-chromium/trace.zip +0 -0
- package/test-results/view-Extended-App-onRenderTabSet-sticky-buttons-chromium/trace.zip +0 -0
- package/test-results/view-Extended-layout2-borders-autohide-left-chromium/trace.zip +0 -0
- package/test-results/view-Extended-layout2-borders-autohide-top-chromium/trace.zip +0 -0
- package/test-results/view-Extended-layout2-check-border-bottom-min-size-chromium/trace.zip +0 -0
- package/test-results/view-Extended-layout2-check-border-left-min-size-chromium/trace.zip +0 -0
- package/test-results/view-Extended-layout2-check-border-right-min-size-chromium/trace.zip +0 -0
- package/test-results/view-Extended-layout2-check-border-top-min-size-chromium/trace.zip +0 -0
- package/test-results/view-Extended-layout2-check-tabset-min-size-chromium/trace.zip +0 -0
- package/test-results/view-Extended-layout2-tabset-close-chromium/trace.zip +0 -0
- package/test-results/view-Maximize-methods-maximize-tabset-using-double-click-chromium/trace.zip +0 -0
- package/test-results/view-Maximize-methods-maximize-tabset-using-max-button-chromium/trace.zip +0 -0
- package/test-results/view-Others-click-on-tab-button-causes-tabset-activate-chromium/trace.zip +0 -0
- package/test-results/view-Others-click-on-tab-contents-causes-tabset-activate-chromium/trace.zip +0 -0
- package/test-results/view-Others-click-on-tabstrip-causes-tabset-activate-chromium/trace.zip +0 -0
- package/test-results/view-Others-rename-tab-cancelled-with-esc-chromium/trace.zip +0 -0
- package/test-results/view-Others-rename-tab-chromium/trace.zip +0 -0
- package/test-results/view-Overflow-menu-show-menu-chromium/trace.zip +0 -0
- package/test-results/view-Splitters-horizontal--5a358-ter-to-bottom-edge-and-back-chromium/trace.zip +0 -0
- package/test-results/view-Splitters-horizontal--f02d2-litter-to-top-edge-and-back-chromium/trace.zip +0 -0
- package/test-results/view-Splitters-horizontal-resizes-with-hsplitter-chromium/trace.zip +0 -0
- package/test-results/view-Splitters-vsplitter-chromium/trace.zip +0 -0
- package/test-results/view-Splitters-vsplitter-to-edge-chromium/trace.zip +0 -0
- package/test-results/view-Splitters-vsplitter-to-edge-left-chromium/trace.zip +0 -0
- package/test-results/view-borders-border-bottom-to-tab-chromium/trace.zip +0 -0
- package/test-results/view-borders-border-left-to-tab-chromium/trace.zip +0 -0
- package/test-results/view-borders-border-right-to-tab-chromium/trace.zip +0 -0
- package/test-results/view-borders-border-top-to-tab-chromium/trace.zip +0 -0
- package/test-results/view-borders-move-tab-in-border-bottom-chromium/trace.zip +0 -0
- package/test-results/view-borders-move-tab-in-border-left-chromium/trace.zip +0 -0
- package/test-results/view-borders-move-tab-in-border-right-chromium/trace.zip +0 -0
- package/test-results/view-borders-move-tab-in-border-top-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-border-bottom-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-border-left-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-border-right-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-border-top-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-open-border-bottom-center-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-open-border-bottom-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-open-border-left-center-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-open-border-left-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-open-border-right-center-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-open-border-right-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-open-border-top-center-chromium/trace.zip +0 -0
- package/test-results/view-borders-tab-to-open-border-top-chromium/trace.zip +0 -0
- package/test-results/view-drag-tests-two-tabs-tab-to-edge-chromium/trace.zip +0 -0
- package/test-results/view-drag-tests-two-tabs-tab-to-tab-bottom-chromium/trace.zip +0 -0
- package/test-results/view-drag-tests-two-tabs-tab-to-tab-center-chromium/trace.zip +0 -0
- package/test-results/view-drag-tests-two-tabs-tab-to-tab-left-chromium/trace.zip +0 -0
- package/test-results/view-drag-tests-two-tabs-tab-to-tab-right-chromium/trace.zip +0 -0
- package/test-results/view-drag-tests-two-tabs-tab-to-tab-top-chromium/trace.zip +0 -0
- package/test-results/view-tab-can-have-icon-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-move-tab-in-tabstrip-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-move-tabstrip-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-row-to-column-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-row-to-single-tabset-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-edge-bottom-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-edge-left-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-edge-right-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-edge-top-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-tab-bottom-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-tab-center-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-tab-left-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-tab-right-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-tab-top-chromium/trace.zip +0 -0
- package/test-results/view-three-tabs-tab-to-tabset-chromium/trace.zip +0 -0
- package/tests-playwright/helpers.ts +124 -0
- package/tests-playwright/view.spec.ts +911 -0
- package/eslint.config.mjs +0 -19
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Read environment variables from file.
|
|
5
|
+
* https://github.com/motdotla/dotenv
|
|
6
|
+
*/
|
|
7
|
+
// import dotenv from 'dotenv';
|
|
8
|
+
// import path from 'path';
|
|
9
|
+
// dotenv.config({ path: path.resolve(__dirname, '.env') });
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
13
|
+
*/
|
|
14
|
+
export default defineConfig({
|
|
15
|
+
testDir: './tests-playwright',
|
|
16
|
+
/* Run tests in files in parallel */
|
|
17
|
+
fullyParallel: true,
|
|
18
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
19
|
+
forbidOnly: !!process.env.CI,
|
|
20
|
+
/* Retry on CI only */
|
|
21
|
+
retries: process.env.CI ? 2 : 0,
|
|
22
|
+
/* Opt out of parallel tests on CI. */
|
|
23
|
+
workers: process.env.CI ? 1 : undefined,
|
|
24
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
25
|
+
reporter: 'html',
|
|
26
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
27
|
+
use: {
|
|
28
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
29
|
+
// baseURL: 'http://127.0.0.1:3000',
|
|
30
|
+
|
|
31
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
32
|
+
trace: 'on-first-retry',
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
/* Configure projects for major browsers */
|
|
36
|
+
projects: [
|
|
37
|
+
{
|
|
38
|
+
name: 'chromium',
|
|
39
|
+
use: { ...devices['Desktop Chrome'] },
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
// {
|
|
43
|
+
// name: 'firefox',
|
|
44
|
+
// use: { ...devices['Desktop Firefox'] },
|
|
45
|
+
// },
|
|
46
|
+
|
|
47
|
+
{
|
|
48
|
+
name: 'webkit',
|
|
49
|
+
use: { ...devices['Desktop Safari'] },
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
/* Test against mobile viewports. */
|
|
53
|
+
// {
|
|
54
|
+
// name: 'Mobile Chrome',
|
|
55
|
+
// use: { ...devices['Pixel 5'] },
|
|
56
|
+
// },
|
|
57
|
+
// {
|
|
58
|
+
// name: 'Mobile Safari',
|
|
59
|
+
// use: { ...devices['iPhone 12'] },
|
|
60
|
+
// },
|
|
61
|
+
|
|
62
|
+
/* Test against branded browsers. */
|
|
63
|
+
// {
|
|
64
|
+
// name: 'Microsoft Edge',
|
|
65
|
+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
66
|
+
// },
|
|
67
|
+
// {
|
|
68
|
+
// name: 'Google Chrome',
|
|
69
|
+
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
70
|
+
// },
|
|
71
|
+
],
|
|
72
|
+
|
|
73
|
+
/* Run your local dev server before starting the tests */
|
|
74
|
+
// webServer: {
|
|
75
|
+
// command: 'npm run start',
|
|
76
|
+
// url: 'http://127.0.0.1:3000',
|
|
77
|
+
// reuseExistingServer: !process.env.CI,
|
|
78
|
+
// },
|
|
79
|
+
});
|
|
Binary file
|
package/src/view/BorderTab.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { Orientation } from "../Orientation";
|
|
|
3
3
|
import { LayoutInternal } from "./Layout";
|
|
4
4
|
import { BorderNode } from "../model/BorderNode";
|
|
5
5
|
import { Rect } from "../Rect";
|
|
6
|
-
import { Splitter } from "./Splitter";
|
|
6
|
+
import { Splitter, splitterDragging } from "./Splitter";
|
|
7
7
|
import { DockLocation } from "../DockLocation";
|
|
8
8
|
import { CLASSES } from "../Types";
|
|
9
9
|
|
|
@@ -17,15 +17,26 @@ export interface IBorderTabProps {
|
|
|
17
17
|
export function BorderTab(props: IBorderTabProps) {
|
|
18
18
|
const { layout, border, show } = props;
|
|
19
19
|
const selfRef = React.useRef<HTMLDivElement | null>(null);
|
|
20
|
+
const timer = React.useRef<NodeJS.Timeout | undefined>(undefined);
|
|
20
21
|
|
|
21
22
|
React.useLayoutEffect(() => {
|
|
22
23
|
const outerRect = layout.getBoundingClientRect(selfRef.current!);
|
|
23
24
|
const contentRect = Rect.getContentRect(selfRef.current!).relativeTo(layout.getDomRect()!);
|
|
24
25
|
if (outerRect.width > 0) {
|
|
25
26
|
border.setOuterRect(outerRect);
|
|
26
|
-
if (!border.getContentRect().equals(contentRect)) {
|
|
27
|
+
if (!border.getContentRect().equals(contentRect) && !isNaN(contentRect.x)) {
|
|
27
28
|
border.setContentRect(contentRect);
|
|
28
|
-
|
|
29
|
+
if (splitterDragging) { // next movement will draw tabs again, only redraw after pause/end
|
|
30
|
+
if (timer.current) {
|
|
31
|
+
clearTimeout(timer.current);
|
|
32
|
+
}
|
|
33
|
+
timer.current = setTimeout(() => {
|
|
34
|
+
layout.redrawInternal("border content rect " + contentRect);
|
|
35
|
+
timer.current = undefined;
|
|
36
|
+
}, 50);
|
|
37
|
+
} else {
|
|
38
|
+
layout.redrawInternal("border content rect " + contentRect);
|
|
39
|
+
}
|
|
29
40
|
}
|
|
30
41
|
}
|
|
31
42
|
|
|
@@ -45,7 +56,7 @@ export function BorderTab(props: IBorderTabProps) {
|
|
|
45
56
|
horizontal = false;
|
|
46
57
|
}
|
|
47
58
|
|
|
48
|
-
style.display = show ? "flex":"none";
|
|
59
|
+
style.display = show ? "flex" : "none";
|
|
49
60
|
|
|
50
61
|
const className = layout.getClassName(CLASSES.FLEXLAYOUT__BORDER_TAB_CONTENTS);
|
|
51
62
|
|
|
@@ -54,14 +65,14 @@ export function BorderTab(props: IBorderTabProps) {
|
|
|
54
65
|
<>
|
|
55
66
|
<div ref={selfRef} style={style} className={className}>
|
|
56
67
|
</div>
|
|
57
|
-
{show && <Splitter layout={layout} node={border} index={0}
|
|
68
|
+
{show && <Splitter layout={layout} node={border} index={0} horizontal={horizontal} />}
|
|
58
69
|
</>
|
|
59
70
|
);
|
|
60
71
|
} else {
|
|
61
72
|
return (
|
|
62
73
|
<>
|
|
63
|
-
{show && <Splitter layout={layout} node={border} index={0}
|
|
64
|
-
<div ref={selfRef} style={style}
|
|
74
|
+
{show && <Splitter layout={layout} node={border} index={0} horizontal={horizontal} />}
|
|
75
|
+
<div ref={selfRef} style={style} className={className}>
|
|
65
76
|
</div>
|
|
66
77
|
</>
|
|
67
78
|
);
|
package/src/view/Icons.tsx
CHANGED
package/src/view/Layout.tsx
CHANGED
|
@@ -1232,7 +1232,7 @@ export class LayoutInternal extends React.Component<ILayoutInternalProps, ILayou
|
|
|
1232
1232
|
// *************************** End Drag Drop *************************************
|
|
1233
1233
|
}
|
|
1234
1234
|
|
|
1235
|
-
export const FlexLayoutVersion = "0.8.
|
|
1235
|
+
export const FlexLayoutVersion = "0.8.11";
|
|
1236
1236
|
|
|
1237
1237
|
export type DragRectRenderCallback = (
|
|
1238
1238
|
content: React.ReactNode | undefined,
|
|
@@ -1331,4 +1331,4 @@ class DragState {
|
|
|
1331
1331
|
this.dragJson = dragJson;
|
|
1332
1332
|
this.fnNewNodeDropped = fnNewNodeDropped;
|
|
1333
1333
|
}
|
|
1334
|
-
}
|
|
1334
|
+
}
|
package/src/view/Overlay.tsx
CHANGED
package/src/view/Splitter.tsx
CHANGED
|
@@ -16,6 +16,9 @@ export interface ISplitterProps {
|
|
|
16
16
|
horizontal: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/** @internal */
|
|
20
|
+
export let splitterDragging:boolean = false; // used in tabset & borderTab
|
|
21
|
+
|
|
19
22
|
/** @internal */
|
|
20
23
|
export const Splitter = (props: ISplitterProps) => {
|
|
21
24
|
const { layout, node, index, horizontal } = props;
|
|
@@ -94,6 +97,7 @@ export const Splitter = (props: ISplitterProps) => {
|
|
|
94
97
|
}
|
|
95
98
|
|
|
96
99
|
setDragging(true);
|
|
100
|
+
splitterDragging = true;
|
|
97
101
|
};
|
|
98
102
|
|
|
99
103
|
const onDragCancel = () => {
|
|
@@ -103,6 +107,7 @@ export const Splitter = (props: ISplitterProps) => {
|
|
|
103
107
|
}
|
|
104
108
|
outlineDiv.current = undefined;
|
|
105
109
|
setDragging(false);
|
|
110
|
+
splitterDragging = false;
|
|
106
111
|
};
|
|
107
112
|
|
|
108
113
|
const onDragMove = (x: number, y: number) => {
|
|
@@ -136,6 +141,7 @@ export const Splitter = (props: ISplitterProps) => {
|
|
|
136
141
|
}
|
|
137
142
|
enablePointerOnIFrames(true, layout.getCurrentDocument()!);
|
|
138
143
|
setDragging(false);
|
|
144
|
+
splitterDragging = false;
|
|
139
145
|
};
|
|
140
146
|
|
|
141
147
|
const updateLayout = (realtime: boolean) => {
|
package/src/view/TabSet.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import { CLASSES } from "../Types";
|
|
|
12
12
|
import { isAuxMouseEvent } from "./Utils";
|
|
13
13
|
import { createPortal } from "react-dom";
|
|
14
14
|
import { Rect } from "../Rect";
|
|
15
|
+
import { splitterDragging } from "./Splitter";
|
|
15
16
|
|
|
16
17
|
/** @internal */
|
|
17
18
|
export interface ITabSetProps {
|
|
@@ -30,11 +31,11 @@ export const TabSet = (props: ITabSetProps) => {
|
|
|
30
31
|
const buttonBarRef = React.useRef<HTMLDivElement | null>(null);
|
|
31
32
|
const overflowbuttonRef = React.useRef<HTMLButtonElement | null>(null);
|
|
32
33
|
const stickyButtonsRef = React.useRef<HTMLDivElement | null>(null);
|
|
34
|
+
const timer = React.useRef<NodeJS.Timeout | undefined>(undefined);
|
|
33
35
|
|
|
34
36
|
const icons = layout.getIcons();
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
React.useEffect(() => {
|
|
38
|
+
React.useLayoutEffect(() => {
|
|
38
39
|
node.setRect(layout.getBoundingClientRect(selfRef.current!));
|
|
39
40
|
|
|
40
41
|
if (tabStripRef.current) {
|
|
@@ -42,11 +43,19 @@ export const TabSet = (props: ITabSetProps) => {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
const newContentRect = Rect.getContentRect(contentRef.current!).relativeTo(layout.getDomRect()!);
|
|
45
|
-
if (!node.getContentRect().equals(newContentRect)) {
|
|
46
|
+
if (!node.getContentRect().equals(newContentRect) && !isNaN(newContentRect.x)) {
|
|
46
47
|
node.setContentRect(newContentRect);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
if (splitterDragging) { // next movement will draw tabs again, only redraw after pause/end
|
|
49
|
+
if (timer.current) {
|
|
50
|
+
clearTimeout(timer.current);
|
|
51
|
+
}
|
|
52
|
+
timer.current = setTimeout(() => {
|
|
53
|
+
layout.redrawInternal("border content rect " + newContentRect);
|
|
54
|
+
timer.current = undefined;
|
|
55
|
+
}, 50);
|
|
56
|
+
} else {
|
|
57
|
+
layout.redrawInternal("border content rect " + newContentRect);
|
|
58
|
+
}
|
|
50
59
|
}
|
|
51
60
|
});
|
|
52
61
|
|
|
@@ -211,7 +220,7 @@ export const TabSet = (props: ITabSetProps) => {
|
|
|
211
220
|
} else {
|
|
212
221
|
overflowContent = (<>
|
|
213
222
|
{icons.more}
|
|
214
|
-
<div className={cm(CLASSES.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)}>{hiddenTabs.length>0?hiddenTabs.length: ""}</div>
|
|
223
|
+
<div className={cm(CLASSES.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)}>{hiddenTabs.length > 0 ? hiddenTabs.length : ""}</div>
|
|
215
224
|
</>);
|
|
216
225
|
}
|
|
217
226
|
buttons.splice(Math.min(renderState.overflowPosition, buttons.length), 0,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/test-results/view-Maximize-methods-maximize-tabset-using-double-click-chromium/trace.zip
ADDED
|
Binary file
|
package/test-results/view-Maximize-methods-maximize-tabset-using-max-button-chromium/trace.zip
ADDED
|
Binary file
|
package/test-results/view-Others-click-on-tab-button-causes-tabset-activate-chromium/trace.zip
ADDED
|
Binary file
|
package/test-results/view-Others-click-on-tab-contents-causes-tabset-activate-chromium/trace.zip
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/test-results/view-Splitters-horizontal--5a358-ter-to-bottom-edge-and-back-chromium/trace.zip
ADDED
|
Binary file
|
package/test-results/view-Splitters-horizontal--f02d2-litter-to-top-edge-and-back-chromium/trace.zip
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { test, expect, Page, Locator } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
export const findAllTabSets = (page: Page) => {
|
|
4
|
+
return page.locator('.flexlayout__tabset');
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const findPath = (page: Page, path: string) => {
|
|
8
|
+
return page.locator(`[data-layout-path="${path}"]`);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const findTabButton = (page: Page, path: string, index: number) => {
|
|
12
|
+
return findPath(page, `${path}/tb${index}`);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const checkTab = async (page: Page, path: string, index: number, selected: boolean, text: string) => {
|
|
16
|
+
const tabButton = findTabButton(page, path, index);
|
|
17
|
+
const tabContent = findPath(page, `${path}/t${index}`);
|
|
18
|
+
|
|
19
|
+
await expect(tabButton).toBeVisible();
|
|
20
|
+
await expect(tabButton).toHaveClass(new RegExp(selected ? 'flexlayout__tab_button--selected' : 'flexlayout__tab_button--unselected'));
|
|
21
|
+
await expect(tabButton.locator('.flexlayout__tab_button_content')).toContainText(text);
|
|
22
|
+
|
|
23
|
+
await expect(tabContent).toBeVisible({ visible: selected });
|
|
24
|
+
await expect(tabContent).toContainText(text);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const checkBorderTab = async (page: Page, path: string, index: number, selected: boolean, text: string) => {
|
|
28
|
+
const tabButton = findTabButton(page, path, index);
|
|
29
|
+
const tabContent = findPath(page, `${path}/t${index}`);
|
|
30
|
+
|
|
31
|
+
await expect(tabButton).toBeVisible();
|
|
32
|
+
await expect(tabButton).toHaveClass(new RegExp(selected ? 'flexlayout__border_button--selected' : 'flexlayout__border_button--unselected'));
|
|
33
|
+
await expect(tabButton.locator('.flexlayout__border_button_content')).toContainText(text);
|
|
34
|
+
|
|
35
|
+
if (selected) {
|
|
36
|
+
await expect(tabContent).toBeVisible();
|
|
37
|
+
await expect(tabContent).toContainText(text);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export enum Location {
|
|
42
|
+
CENTER,
|
|
43
|
+
TOP,
|
|
44
|
+
BOTTOM,
|
|
45
|
+
LEFT,
|
|
46
|
+
RIGHT,
|
|
47
|
+
LEFTEDGE
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function getLocation(rect: { x: number; y: number; width: number; height: number }, loc: Location) {
|
|
51
|
+
switch (loc) {
|
|
52
|
+
case Location.CENTER:
|
|
53
|
+
return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 };
|
|
54
|
+
case Location.TOP:
|
|
55
|
+
return { x: rect.x + rect.width / 2, y: rect.y + 5 };
|
|
56
|
+
case Location.BOTTOM:
|
|
57
|
+
return { x: rect.x + rect.width / 2, y: rect.y + rect.height - 5 };
|
|
58
|
+
case Location.LEFT:
|
|
59
|
+
return { x: rect.x + 5, y: rect.y + rect.height / 2 };
|
|
60
|
+
case Location.RIGHT:
|
|
61
|
+
return { x: rect.x + rect.width - 5, y: rect.y + rect.height / 2 };
|
|
62
|
+
case Location.LEFTEDGE:
|
|
63
|
+
return { x: rect.x , y: rect.y + rect.height / 2 };
|
|
64
|
+
default:
|
|
65
|
+
throw new Error(`Unknown location: ${loc}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export async function drag(page: Page, from: Locator, to: Locator, loc: Location) {
|
|
70
|
+
const fr = await from.boundingBox();
|
|
71
|
+
const tr = await to.boundingBox();
|
|
72
|
+
|
|
73
|
+
if (!fr || !tr) throw new Error('Could not get bounding boxes');
|
|
74
|
+
|
|
75
|
+
const cf = getLocation(fr, Location.CENTER);
|
|
76
|
+
const ct = getLocation(tr, loc);
|
|
77
|
+
|
|
78
|
+
await page.mouse.move(cf.x, cf.y);
|
|
79
|
+
await page.mouse.down();
|
|
80
|
+
await page.mouse.move(ct.x, ct.y, { steps: 10 });
|
|
81
|
+
await page.mouse.up();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function dragToEdge(page: Page, from: Locator, edgeIndex: number) {
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
const fr = await from.boundingBox();
|
|
88
|
+
if (!fr) throw new Error('Could not get bounding box for source');
|
|
89
|
+
|
|
90
|
+
const cf = { x: fr.x + fr.width / 2, y: fr.y + fr.height / 2 };
|
|
91
|
+
|
|
92
|
+
await page.mouse.move(cf.x, cf.y);
|
|
93
|
+
await page.mouse.down();
|
|
94
|
+
await page.mouse.move(cf.x + 10, cf.y + 10); // start move to make edges show
|
|
95
|
+
const edgeRects = page.locator('.flexlayout__edge_rect');
|
|
96
|
+
const edge = edgeRects.nth(edgeIndex);
|
|
97
|
+
const tr = await edge.boundingBox();
|
|
98
|
+
if (!tr) throw new Error('Could not get bounding box for edge');
|
|
99
|
+
|
|
100
|
+
const ct = { x: tr.x + tr.width / 2, y: tr.y + tr.height / 2 };
|
|
101
|
+
|
|
102
|
+
// await page.mouse.move((cf.x + ct.x) / 2, (cf.y + ct.y) / 2);
|
|
103
|
+
await page.mouse.move(ct.x, ct.y, { steps: 10 });
|
|
104
|
+
await page.mouse.up();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export async function dragSplitter(page: Page, from: Locator, upDown: boolean, distance: number) {
|
|
108
|
+
const fr = await from.boundingBox();
|
|
109
|
+
if (!fr) throw new Error('Could not get bounding box for splitter');
|
|
110
|
+
|
|
111
|
+
const cf = { x: fr.x + fr.width / 2, y: fr.y + fr.height / 2 };
|
|
112
|
+
const ct = { x: cf.x + (upDown ? 0 : distance), y: cf.y + (upDown ? distance : 0) };
|
|
113
|
+
|
|
114
|
+
await page.mouse.move(cf.x, cf.y);
|
|
115
|
+
await page.mouse.down();
|
|
116
|
+
// await page.mouse.move(cf.x + 10, cf.y + 10);
|
|
117
|
+
// await page.mouse.move((cf.x + ct.x) / 2, (cf.y + ct.y) / 2);
|
|
118
|
+
await page.mouse.move(ct.x, ct.y, { steps: 10 });
|
|
119
|
+
await page.mouse.up();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|