flexlayout-react 0.8.11 → 0.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -5
- package/declarations/Attribute.d.ts +25 -1
- package/declarations/AttributeDefinitions.d.ts +18 -1
- package/declarations/DockLocation.d.ts +22 -0
- package/declarations/I18nLabel.d.ts +2 -1
- package/declarations/Orientation.d.ts +4 -0
- package/declarations/Rect.d.ts +3 -0
- package/declarations/index.d.ts +1 -0
- package/declarations/model/BorderNode.d.ts +53 -0
- package/declarations/model/BorderSet.d.ts +28 -0
- package/declarations/model/IDraggable.d.ts +4 -0
- package/declarations/model/IDropTarget.d.ts +10 -0
- package/declarations/model/LayoutWindow.d.ts +16 -0
- package/declarations/model/Model.d.ts +55 -0
- package/declarations/model/Node.d.ts +61 -0
- package/declarations/model/RowNode.d.ts +67 -0
- package/declarations/model/TabNode.d.ts +79 -0
- package/declarations/model/TabSetNode.d.ts +60 -0
- package/declarations/model/Utils.d.ts +8 -0
- package/declarations/view/BorderButton.d.ts +13 -1
- package/declarations/view/BorderTab.d.ts +8 -0
- package/declarations/view/BorderTabSet.d.ts +10 -1
- package/declarations/view/DragContainer.d.ts +9 -1
- package/declarations/view/ErrorBoundary.d.ts +22 -1
- package/declarations/view/Icons.d.ts +1 -0
- package/declarations/view/Layout.d.ts +143 -1
- package/declarations/view/Overlay.d.ts +8 -1
- package/declarations/view/PopoutWindow.d.ts +14 -1
- package/declarations/view/PopupMenu.d.ts +12 -1
- package/declarations/view/Row.d.ts +9 -1
- package/declarations/view/Splitter.d.ts +14 -1
- package/declarations/view/Tab.d.ts +11 -1
- package/declarations/view/TabButton.d.ts +11 -1
- package/declarations/view/TabButtonStamp.d.ts +9 -1
- package/declarations/view/TabOverflowHook.d.ts +16 -1
- package/declarations/view/TabSet.d.ts +9 -1
- package/declarations/view/Utils.d.ts +13 -0
- package/lib/index.js +6410 -22
- package/package.json +34 -26
- package/ChangeLog.txt +0 -370
- package/declarations/DragDrop.d.ts +0 -15
- package/declarations/PopupMenu.d.ts +0 -1
- package/declarations/model/SplitterNode.d.ts +0 -5
- package/declarations/model/WindowLayout.d.ts +0 -24
- package/declarations/src/Attribute.d.ts +0 -1
- package/declarations/src/AttributeDefinitions.d.ts +0 -1
- package/declarations/src/DockLocation.d.ts +0 -12
- package/declarations/src/DropInfo.d.ts +0 -12
- package/declarations/src/I18nLabel.d.ts +0 -10
- package/declarations/src/Orientation.d.ts +0 -7
- package/declarations/src/PopupMenu.d.ts +0 -1
- package/declarations/src/Rect.d.ts +0 -31
- package/declarations/src/Types.d.ts +0 -92
- package/declarations/src/index.d.ts +0 -20
- package/declarations/src/model/Action.d.ts +0 -5
- package/declarations/src/model/Actions.d.ts +0 -110
- package/declarations/src/model/BorderNode.d.ts +0 -28
- package/declarations/src/model/BorderSet.d.ts +0 -3
- package/declarations/src/model/ICloseType.d.ts +0 -5
- package/declarations/src/model/IDraggable.d.ts +0 -2
- package/declarations/src/model/IDropTarget.d.ts +0 -2
- package/declarations/src/model/IJsonModel.d.ts +0 -153
- package/declarations/src/model/Model.d.ts +0 -98
- package/declarations/src/model/Node.d.ts +0 -16
- package/declarations/src/model/RowNode.d.ts +0 -11
- package/declarations/src/model/TabNode.d.ts +0 -36
- package/declarations/src/model/TabSetNode.d.ts +0 -37
- package/declarations/src/model/Utils.d.ts +0 -1
- package/declarations/src/view/BorderButton.d.ts +0 -1
- package/declarations/src/view/BorderTab.d.ts +0 -2
- package/declarations/src/view/BorderTabSet.d.ts +0 -1
- package/declarations/src/view/DragContainer.d.ts +0 -1
- package/declarations/src/view/ErrorBoundary.d.ts +0 -1
- package/declarations/src/view/FloatingWindow.d.ts +0 -1
- package/declarations/src/view/Icons.d.ts +0 -7
- package/declarations/src/view/Layout.d.ts +0 -113
- package/declarations/src/view/Overlay.d.ts +0 -1
- package/declarations/src/view/PopupMenu.d.ts +0 -1
- package/declarations/src/view/Row.d.ts +0 -1
- package/declarations/src/view/Splitter.d.ts +0 -1
- package/declarations/src/view/Tab.d.ts +0 -1
- package/declarations/src/view/TabButton.d.ts +0 -1
- package/declarations/src/view/TabButtonStamp.d.ts +0 -1
- package/declarations/src/view/TabOverflowHook.d.ts +0 -1
- package/declarations/src/view/TabSet.d.ts +0 -1
- package/declarations/src/view/Utils.d.ts +0 -4
- package/declarations/view/ExtendedResizeObserver.d.ts +0 -23
- package/declarations/view/FloatingWindow.d.ts +0 -1
- package/declarations/view/FloatingWindowTab.d.ts +0 -1
- package/declarations/view/TabFloating.d.ts +0 -1
- package/dist/flexlayout.js +0 -610
- package/dist/flexlayout_min.js +0 -2
- package/dist/flexlayout_min.js.LICENSE.txt +0 -29
- package/dist/src/Attribute.js +0 -43
- package/dist/src/Attribute.js.map +0 -1
- package/dist/src/AttributeDefinitions.js +0 -132
- package/dist/src/AttributeDefinitions.js.map +0 -1
- package/dist/src/DockLocation.js +0 -121
- package/dist/src/DockLocation.js.map +0 -1
- package/dist/src/DropInfo.js +0 -10
- package/dist/src/DropInfo.js.map +0 -1
- package/dist/src/I18nLabel.js +0 -14
- package/dist/src/I18nLabel.js.map +0 -1
- package/dist/src/Orientation.js +0 -23
- package/dist/src/Orientation.js.map +0 -1
- package/dist/src/Rect.js +0 -111
- package/dist/src/Rect.js.map +0 -1
- package/dist/src/Types.js +0 -95
- package/dist/src/Types.js.map +0 -1
- package/dist/src/index.js +0 -22
- package/dist/src/index.js.map +0 -1
- package/dist/src/model/Action.js +0 -7
- package/dist/src/model/Action.js.map +0 -1
- package/dist/src/model/Actions.js +0 -170
- package/dist/src/model/Actions.js.map +0 -1
- package/dist/src/model/BorderNode.js +0 -390
- package/dist/src/model/BorderNode.js.map +0 -1
- package/dist/src/model/BorderSet.js +0 -67
- package/dist/src/model/BorderSet.js.map +0 -1
- package/dist/src/model/ICloseType.js +0 -7
- package/dist/src/model/ICloseType.js.map +0 -1
- package/dist/src/model/IDraggable.js +0 -2
- package/dist/src/model/IDraggable.js.map +0 -1
- package/dist/src/model/IDropTarget.js +0 -2
- package/dist/src/model/IDropTarget.js.map +0 -1
- package/dist/src/model/IJsonModel.js +0 -2
- package/dist/src/model/IJsonModel.js.map +0 -1
- package/dist/src/model/LayoutWindow.js +0 -81
- package/dist/src/model/LayoutWindow.js.map +0 -1
- package/dist/src/model/Model.js +0 -608
- package/dist/src/model/Model.js.map +0 -1
- package/dist/src/model/Node.js +0 -218
- package/dist/src/model/Node.js.map +0 -1
- package/dist/src/model/RowNode.js +0 -492
- package/dist/src/model/RowNode.js.map +0 -1
- package/dist/src/model/TabNode.js +0 -293
- package/dist/src/model/TabNode.js.map +0 -1
- package/dist/src/model/TabSetNode.js +0 -469
- package/dist/src/model/TabSetNode.js.map +0 -1
- package/dist/src/model/Utils.js +0 -48
- package/dist/src/model/Utils.js.map +0 -1
- package/dist/src/view/BorderButton.js +0 -126
- package/dist/src/view/BorderButton.js.map +0 -1
- package/dist/src/view/BorderTab.js +0 -44
- package/dist/src/view/BorderTab.js.map +0 -1
- package/dist/src/view/BorderTabSet.js +0 -138
- package/dist/src/view/BorderTabSet.js.map +0 -1
- package/dist/src/view/DragContainer.js +0 -16
- package/dist/src/view/DragContainer.js.map +0 -1
- package/dist/src/view/ErrorBoundary.js +0 -24
- package/dist/src/view/ErrorBoundary.js.map +0 -1
- package/dist/src/view/Icons.js +0 -29
- package/dist/src/view/Icons.js.map +0 -1
- package/dist/src/view/Layout.js +0 -881
- package/dist/src/view/Layout.js.map +0 -1
- package/dist/src/view/Overlay.js +0 -9
- package/dist/src/view/Overlay.js.map +0 -1
- package/dist/src/view/PopoutWindow.js +0 -129
- package/dist/src/view/PopoutWindow.js.map +0 -1
- package/dist/src/view/PopupMenu.js +0 -89
- package/dist/src/view/PopupMenu.js.map +0 -1
- package/dist/src/view/Row.js +0 -46
- package/dist/src/view/Row.js.map +0 -1
- package/dist/src/view/SizeTracker.js +0 -12
- package/dist/src/view/SizeTracker.js.map +0 -1
- package/dist/src/view/Splitter.js +0 -192
- package/dist/src/view/Splitter.js.map +0 -1
- package/dist/src/view/Tab.js +0 -91
- package/dist/src/view/Tab.js.map +0 -1
- package/dist/src/view/TabButton.js +0 -124
- package/dist/src/view/TabButton.js.map +0 -1
- package/dist/src/view/TabButtonStamp.js +0 -15
- package/dist/src/view/TabButtonStamp.js.map +0 -1
- package/dist/src/view/TabOverflowHook.js +0 -266
- package/dist/src/view/TabOverflowHook.js.map +0 -1
- package/dist/src/view/TabSet.js +0 -256
- package/dist/src/view/TabSet.js.map +0 -1
- package/dist/src/view/Utils.js +0 -110
- package/dist/src/view/Utils.js.map +0 -1
- package/lib/Attribute.js +0 -43
- package/lib/Attribute.js.map +0 -1
- package/lib/AttributeDefinitions.js +0 -132
- package/lib/AttributeDefinitions.js.map +0 -1
- package/lib/DockLocation.js +0 -121
- package/lib/DockLocation.js.map +0 -1
- package/lib/DropInfo.js +0 -10
- package/lib/DropInfo.js.map +0 -1
- package/lib/I18nLabel.js +0 -14
- package/lib/I18nLabel.js.map +0 -1
- package/lib/Orientation.js +0 -23
- package/lib/Orientation.js.map +0 -1
- package/lib/Rect.js +0 -111
- package/lib/Rect.js.map +0 -1
- package/lib/Types.js +0 -95
- package/lib/Types.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/model/Action.js +0 -7
- package/lib/model/Action.js.map +0 -1
- package/lib/model/Actions.js +0 -170
- package/lib/model/Actions.js.map +0 -1
- package/lib/model/BorderNode.js +0 -390
- package/lib/model/BorderNode.js.map +0 -1
- package/lib/model/BorderSet.js +0 -67
- package/lib/model/BorderSet.js.map +0 -1
- package/lib/model/ICloseType.js +0 -7
- package/lib/model/ICloseType.js.map +0 -1
- package/lib/model/IDraggable.js +0 -2
- package/lib/model/IDraggable.js.map +0 -1
- package/lib/model/IDropTarget.js +0 -2
- package/lib/model/IDropTarget.js.map +0 -1
- package/lib/model/IJsonModel.js +0 -2
- package/lib/model/IJsonModel.js.map +0 -1
- package/lib/model/LayoutWindow.js +0 -81
- package/lib/model/LayoutWindow.js.map +0 -1
- package/lib/model/Model.js +0 -608
- package/lib/model/Model.js.map +0 -1
- package/lib/model/Node.js +0 -218
- package/lib/model/Node.js.map +0 -1
- package/lib/model/RowNode.js +0 -492
- package/lib/model/RowNode.js.map +0 -1
- package/lib/model/TabNode.js +0 -293
- package/lib/model/TabNode.js.map +0 -1
- package/lib/model/TabSetNode.js +0 -469
- package/lib/model/TabSetNode.js.map +0 -1
- package/lib/model/Utils.js +0 -48
- package/lib/model/Utils.js.map +0 -1
- package/lib/view/BorderButton.js +0 -126
- package/lib/view/BorderButton.js.map +0 -1
- package/lib/view/BorderTab.js +0 -56
- package/lib/view/BorderTab.js.map +0 -1
- package/lib/view/BorderTabSet.js +0 -138
- package/lib/view/BorderTabSet.js.map +0 -1
- package/lib/view/DragContainer.js +0 -16
- package/lib/view/DragContainer.js.map +0 -1
- package/lib/view/ErrorBoundary.js +0 -24
- package/lib/view/ErrorBoundary.js.map +0 -1
- package/lib/view/Icons.js +0 -29
- package/lib/view/Icons.js.map +0 -1
- package/lib/view/Layout.js +0 -881
- package/lib/view/Layout.js.map +0 -1
- package/lib/view/Overlay.js +0 -9
- package/lib/view/Overlay.js.map +0 -1
- package/lib/view/PopoutWindow.js +0 -129
- package/lib/view/PopoutWindow.js.map +0 -1
- package/lib/view/PopupMenu.js +0 -89
- package/lib/view/PopupMenu.js.map +0 -1
- package/lib/view/Row.js +0 -46
- package/lib/view/Row.js.map +0 -1
- package/lib/view/SizeTracker.js +0 -12
- package/lib/view/SizeTracker.js.map +0 -1
- package/lib/view/Splitter.js +0 -197
- package/lib/view/Splitter.js.map +0 -1
- package/lib/view/Tab.js +0 -91
- package/lib/view/Tab.js.map +0 -1
- package/lib/view/TabButton.js +0 -124
- package/lib/view/TabButton.js.map +0 -1
- package/lib/view/TabButtonStamp.js +0 -15
- package/lib/view/TabButtonStamp.js.map +0 -1
- package/lib/view/TabOverflowHook.js +0 -266
- package/lib/view/TabOverflowHook.js.map +0 -1
- package/lib/view/TabSet.js +0 -269
- package/lib/view/TabSet.js.map +0 -1
- package/lib/view/Utils.js +0 -110
- package/lib/view/Utils.js.map +0 -1
- 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 +0 -71
- package/playwright-report/trace/assets/codeMirrorModule-DpJ-EmBQ.js +0 -24
- package/playwright-report/trace/assets/defaultSettingsView-DTenqiGw.js +0 -259
- package/playwright-report/trace/codeMirrorModule.C3UTv-Ge.css +0 -1
- package/playwright-report/trace/codicon.DCmgc-ay.ttf +0 -0
- package/playwright-report/trace/defaultSettingsView.5fN5lw10.css +0 -1
- package/playwright-report/trace/index.CFOW-Ezb.css +0 -1
- package/playwright-report/trace/index.CUq7VgrV.js +0 -2
- package/playwright-report/trace/index.html +0 -43
- package/playwright-report/trace/playwright-logo.svg +0 -9
- package/playwright-report/trace/snapshot.html +0 -21
- package/playwright-report/trace/sw.bundle.js +0 -3
- package/playwright-report/trace/uiMode.BatfzHMG.css +0 -1
- package/playwright-report/trace/uiMode.CHJSAD7F.js +0 -5
- package/playwright-report/trace/uiMode.html +0 -17
- package/playwright-report/trace/xtermModule.Beg8tuEN.css +0 -32
- package/playwright.config.ts +0 -79
- package/screenshots/PlaywrightUI.png +0 -0
- package/src/Attribute.ts +0 -64
- package/src/AttributeDefinitions.ts +0 -144
- package/src/DockLocation.ts +0 -133
- package/src/DropInfo.ts +0 -20
- package/src/I18nLabel.ts +0 -12
- package/src/Orientation.ts +0 -28
- package/src/Rect.ts +0 -147
- package/src/Types.ts +0 -112
- package/src/index.ts +0 -23
- package/src/model/Action.ts +0 -9
- package/src/model/Actions.ts +0 -188
- package/src/model/BorderNode.ts +0 -458
- package/src/model/BorderSet.ts +0 -87
- package/src/model/ICloseType.ts +0 -5
- package/src/model/IDraggable.ts +0 -7
- package/src/model/IDropTarget.ts +0 -14
- package/src/model/IJsonModel.ts +0 -967
- package/src/model/LayoutWindow.ts +0 -119
- package/src/model/Model.ts +0 -704
- package/src/model/Node.ts +0 -280
- package/src/model/RowNode.ts +0 -559
- package/src/model/TabNode.ts +0 -424
- package/src/model/TabSetNode.ts +0 -592
- package/src/model/Utils.ts +0 -52
- package/src/view/BorderButton.tsx +0 -201
- package/src/view/BorderTab.tsx +0 -81
- package/src/view/BorderTabSet.tsx +0 -259
- package/src/view/DragContainer.tsx +0 -32
- package/src/view/ErrorBoundary.tsx +0 -42
- package/src/view/Icons.tsx +0 -57
- package/src/view/Layout.tsx +0 -1334
- package/src/view/Overlay.tsx +0 -21
- package/src/view/PopoutWindow.tsx +0 -152
- package/src/view/PopupMenu.tsx +0 -156
- package/src/view/Row.tsx +0 -68
- package/src/view/SizeTracker.tsx +0 -20
- package/src/view/Splitter.tsx +0 -262
- package/src/view/Tab.tsx +0 -128
- package/src/view/TabButton.tsx +0 -200
- package/src/view/TabButtonStamp.tsx +0 -42
- package/src/view/TabOverflowHook.tsx +0 -305
- package/src/view/TabSet.tsx +0 -475
- package/src/view/Utils.tsx +0 -135
- 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 +0 -124
- package/tests-playwright/view.spec.ts +0 -911
package/playwright.config.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
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/Attribute.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/** @internal */
|
|
2
|
-
export class Attribute {
|
|
3
|
-
static NUMBER = "number";
|
|
4
|
-
static STRING = "string";
|
|
5
|
-
static BOOLEAN = "boolean";
|
|
6
|
-
|
|
7
|
-
name: string;
|
|
8
|
-
alias: string | undefined;
|
|
9
|
-
modelName?: string;
|
|
10
|
-
pairedAttr?: Attribute;
|
|
11
|
-
pairedType?: string;
|
|
12
|
-
defaultValue: any;
|
|
13
|
-
alwaysWriteJson?: boolean;
|
|
14
|
-
type?: string;
|
|
15
|
-
required: boolean;
|
|
16
|
-
fixed: boolean;
|
|
17
|
-
description?: string;
|
|
18
|
-
|
|
19
|
-
constructor(name: string, modelName: string | undefined, defaultValue: any, alwaysWriteJson?: boolean) {
|
|
20
|
-
this.name = name;
|
|
21
|
-
this.alias = undefined;
|
|
22
|
-
this.modelName = modelName;
|
|
23
|
-
this.defaultValue = defaultValue;
|
|
24
|
-
this.alwaysWriteJson = alwaysWriteJson;
|
|
25
|
-
this.required = false;
|
|
26
|
-
this.fixed = false;
|
|
27
|
-
|
|
28
|
-
this.type = "any";
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
setType(value: string) {
|
|
32
|
-
this.type = value;
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
setAlias(value: string) {
|
|
37
|
-
this.alias = value;
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
setDescription(value: string) {
|
|
42
|
-
this.description = value;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
setRequired() {
|
|
46
|
-
this.required = true;
|
|
47
|
-
return this;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
setFixed() {
|
|
51
|
-
this.fixed = true;
|
|
52
|
-
return this;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// sets modelAttr for nodes, and nodeAttr for model
|
|
56
|
-
setpairedAttr(value: Attribute) {
|
|
57
|
-
this.pairedAttr = value;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
setPairedType(value: string) {
|
|
61
|
-
this.pairedType = value;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { Attribute } from "./Attribute";
|
|
2
|
-
|
|
3
|
-
/** @internal */
|
|
4
|
-
export class AttributeDefinitions {
|
|
5
|
-
attributes: Attribute[];
|
|
6
|
-
nameToAttribute: Map<string, Attribute>;
|
|
7
|
-
|
|
8
|
-
constructor() {
|
|
9
|
-
this.attributes = [];
|
|
10
|
-
this.nameToAttribute = new Map();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
addWithAll(name: string, modelName: string | undefined, defaultValue: any, alwaysWriteJson?: boolean) {
|
|
14
|
-
const attr = new Attribute(name, modelName, defaultValue, alwaysWriteJson);
|
|
15
|
-
this.attributes.push(attr);
|
|
16
|
-
this.nameToAttribute.set(name, attr);
|
|
17
|
-
return attr;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
addInherited(name: string, modelName: string) {
|
|
21
|
-
return this.addWithAll(name, modelName, undefined, false);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
add(name: string, defaultValue: any, alwaysWriteJson?: boolean) {
|
|
25
|
-
return this.addWithAll(name, undefined, defaultValue, alwaysWriteJson);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
getAttributes() {
|
|
29
|
-
return this.attributes;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
getModelName(name: string) {
|
|
33
|
-
const conversion = this.nameToAttribute.get(name);
|
|
34
|
-
if (conversion !== undefined) {
|
|
35
|
-
return conversion.modelName;
|
|
36
|
-
}
|
|
37
|
-
return undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
toJson(jsonObj: any, obj: any) {
|
|
41
|
-
for (const attr of this.attributes) {
|
|
42
|
-
const fromValue = obj[attr.name];
|
|
43
|
-
if (attr.alwaysWriteJson || fromValue !== attr.defaultValue) {
|
|
44
|
-
jsonObj[attr.name] = fromValue;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
fromJson(jsonObj: any, obj: any) {
|
|
50
|
-
for (const attr of this.attributes) {
|
|
51
|
-
let fromValue = jsonObj[attr.name];
|
|
52
|
-
if (fromValue === undefined && attr.alias) {
|
|
53
|
-
fromValue = jsonObj[attr.alias];
|
|
54
|
-
}
|
|
55
|
-
if (fromValue === undefined) {
|
|
56
|
-
obj[attr.name] = attr.defaultValue;
|
|
57
|
-
} else {
|
|
58
|
-
obj[attr.name] = fromValue;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
update(jsonObj: any, obj: any) {
|
|
64
|
-
for (const attr of this.attributes) {
|
|
65
|
-
if (Object.prototype.hasOwnProperty.call(jsonObj, attr.name)) {
|
|
66
|
-
const fromValue = jsonObj[attr.name];
|
|
67
|
-
if (fromValue === undefined) {
|
|
68
|
-
delete obj[attr.name];
|
|
69
|
-
} else {
|
|
70
|
-
obj[attr.name] = fromValue;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
setDefaults(obj: any) {
|
|
77
|
-
for (const attr of this.attributes) {
|
|
78
|
-
obj[attr.name] = attr.defaultValue;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
pairAttributes(type: string, childAttributes: AttributeDefinitions) {
|
|
83
|
-
for (const attr of childAttributes.attributes) {
|
|
84
|
-
if (attr.modelName && this.nameToAttribute.has(attr.modelName)) {
|
|
85
|
-
const pairedAttr = this.nameToAttribute.get(attr.modelName)!;
|
|
86
|
-
pairedAttr.setpairedAttr(attr);
|
|
87
|
-
attr.setpairedAttr(pairedAttr);
|
|
88
|
-
pairedAttr.setPairedType(type);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
toTypescriptInterface(name: string, parentAttributes: AttributeDefinitions | undefined) {
|
|
94
|
-
const lines = [];
|
|
95
|
-
const sorted = this.attributes.sort((a, b) => a.name.localeCompare(b.name));
|
|
96
|
-
// const sorted = this.attributes;
|
|
97
|
-
lines.push("export interface I" + name + "Attributes {");
|
|
98
|
-
for (let i = 0; i < sorted.length; i++) {
|
|
99
|
-
const c = sorted[i];
|
|
100
|
-
let type = c.type;
|
|
101
|
-
let defaultValue = undefined;
|
|
102
|
-
|
|
103
|
-
let attr = c;
|
|
104
|
-
let inherited = undefined;
|
|
105
|
-
if (attr.defaultValue !== undefined) {
|
|
106
|
-
defaultValue = attr.defaultValue;
|
|
107
|
-
} else if (attr.modelName !== undefined
|
|
108
|
-
&& parentAttributes !== undefined
|
|
109
|
-
&& parentAttributes.nameToAttribute.get(attr.modelName) !== undefined) {
|
|
110
|
-
inherited = attr.modelName;
|
|
111
|
-
attr = parentAttributes.nameToAttribute.get(inherited)!;
|
|
112
|
-
defaultValue = attr.defaultValue;
|
|
113
|
-
type = attr.type;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const defValue = JSON.stringify(defaultValue);
|
|
117
|
-
|
|
118
|
-
const required = attr.required ? "" : "?";
|
|
119
|
-
|
|
120
|
-
let sb = "\t/**\n\t ";
|
|
121
|
-
if (c.description) {
|
|
122
|
-
sb += c.description;
|
|
123
|
-
} else if (c.pairedType && c.pairedAttr?.description) {
|
|
124
|
-
sb += `Value for ${c.pairedType} attribute ${c.pairedAttr.name} if not overridden`
|
|
125
|
-
sb += "\n\n\t ";
|
|
126
|
-
sb += c.pairedAttr?.description;
|
|
127
|
-
}
|
|
128
|
-
sb += "\n\n\t ";
|
|
129
|
-
if (c.fixed) {
|
|
130
|
-
sb += `Fixed value: ${defValue}`;
|
|
131
|
-
} else if (inherited) {
|
|
132
|
-
sb += `Default: inherited from Global attribute ${c.modelName} (default ${defValue})`;
|
|
133
|
-
} else {
|
|
134
|
-
sb += `Default: ${defValue}`;
|
|
135
|
-
}
|
|
136
|
-
sb += "\n\t */";
|
|
137
|
-
lines.push(sb);
|
|
138
|
-
lines.push("\t" + c.name + required + ": " + type + ";\n");
|
|
139
|
-
}
|
|
140
|
-
lines.push("}");
|
|
141
|
-
|
|
142
|
-
return lines.join("\n");
|
|
143
|
-
}
|
|
144
|
-
}
|
package/src/DockLocation.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { Orientation } from "./Orientation";
|
|
2
|
-
import { Rect } from "./Rect";
|
|
3
|
-
|
|
4
|
-
export class DockLocation {
|
|
5
|
-
static values = new Map<string, DockLocation>();
|
|
6
|
-
static TOP = new DockLocation("top", Orientation.VERT, 0);
|
|
7
|
-
static BOTTOM = new DockLocation("bottom", Orientation.VERT, 1);
|
|
8
|
-
static LEFT = new DockLocation("left", Orientation.HORZ, 0);
|
|
9
|
-
static RIGHT = new DockLocation("right", Orientation.HORZ, 1);
|
|
10
|
-
static CENTER = new DockLocation("center", Orientation.VERT, 0);
|
|
11
|
-
|
|
12
|
-
/** @internal */
|
|
13
|
-
static getByName(name: string): DockLocation {
|
|
14
|
-
return DockLocation.values.get(name)!;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/** @internal */
|
|
18
|
-
static getLocation(rect: Rect, x: number, y: number) {
|
|
19
|
-
x = (x - rect.x) / rect.width;
|
|
20
|
-
y = (y - rect.y) / rect.height;
|
|
21
|
-
|
|
22
|
-
if (x >= 0.25 && x < 0.75 && y >= 0.25 && y < 0.75) {
|
|
23
|
-
return DockLocation.CENTER;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Whether or not the point is in the bottom-left half of the rect
|
|
27
|
-
// +-----+
|
|
28
|
-
// |\ |
|
|
29
|
-
// |x\ |
|
|
30
|
-
// |xx\ |
|
|
31
|
-
// |xxx\ |
|
|
32
|
-
// |xxxx\|
|
|
33
|
-
// +-----+
|
|
34
|
-
const bl = y >= x;
|
|
35
|
-
|
|
36
|
-
// Whether or not the point is in the bottom-right half of the rect
|
|
37
|
-
// +-----+
|
|
38
|
-
// | /|
|
|
39
|
-
// | /x|
|
|
40
|
-
// | /xx|
|
|
41
|
-
// | /xxx|
|
|
42
|
-
// |/xxxx|
|
|
43
|
-
// +-----+
|
|
44
|
-
const br = y >= 1 - x;
|
|
45
|
-
|
|
46
|
-
if (bl) {
|
|
47
|
-
return br ? DockLocation.BOTTOM : DockLocation.LEFT;
|
|
48
|
-
} else {
|
|
49
|
-
return br ? DockLocation.RIGHT : DockLocation.TOP;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
name: string;
|
|
55
|
-
/** @internal */
|
|
56
|
-
orientation: Orientation;
|
|
57
|
-
/** @internal */
|
|
58
|
-
indexPlus: number;
|
|
59
|
-
|
|
60
|
-
/** @internal */
|
|
61
|
-
constructor(_name: string, _orientation: Orientation, _indexPlus: number) {
|
|
62
|
-
this.name = _name;
|
|
63
|
-
this.orientation = _orientation;
|
|
64
|
-
this.indexPlus = _indexPlus;
|
|
65
|
-
DockLocation.values.set(this.name, this);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
getName() {
|
|
69
|
-
return this.name;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
getOrientation() {
|
|
73
|
-
return this.orientation;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** @internal */
|
|
77
|
-
getDockRect(r: Rect) {
|
|
78
|
-
if (this === DockLocation.TOP) {
|
|
79
|
-
return new Rect(r.x, r.y, r.width, r.height / 2);
|
|
80
|
-
} else if (this === DockLocation.BOTTOM) {
|
|
81
|
-
return new Rect(r.x, r.getBottom() - r.height / 2, r.width, r.height / 2);
|
|
82
|
-
}
|
|
83
|
-
if (this === DockLocation.LEFT) {
|
|
84
|
-
return new Rect(r.x, r.y, r.width / 2, r.height);
|
|
85
|
-
} else if (this === DockLocation.RIGHT) {
|
|
86
|
-
return new Rect(r.getRight() - r.width / 2, r.y, r.width / 2, r.height);
|
|
87
|
-
} else {
|
|
88
|
-
return r.clone();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/** @internal */
|
|
93
|
-
split(rect: Rect, size: number) {
|
|
94
|
-
if (this === DockLocation.TOP) {
|
|
95
|
-
const r1 = new Rect(rect.x, rect.y, rect.width, size);
|
|
96
|
-
const r2 = new Rect(rect.x, rect.y + size, rect.width, rect.height - size);
|
|
97
|
-
return { start: r1, end: r2 };
|
|
98
|
-
} else if (this === DockLocation.LEFT) {
|
|
99
|
-
const r1 = new Rect(rect.x, rect.y, size, rect.height);
|
|
100
|
-
const r2 = new Rect(rect.x + size, rect.y, rect.width - size, rect.height);
|
|
101
|
-
return { start: r1, end: r2 };
|
|
102
|
-
}
|
|
103
|
-
if (this === DockLocation.RIGHT) {
|
|
104
|
-
const r1 = new Rect(rect.getRight() - size, rect.y, size, rect.height);
|
|
105
|
-
const r2 = new Rect(rect.x, rect.y, rect.width - size, rect.height);
|
|
106
|
-
return { start: r1, end: r2 };
|
|
107
|
-
} else {
|
|
108
|
-
// if (this === DockLocation.BOTTOM) {
|
|
109
|
-
const r1 = new Rect(rect.x, rect.getBottom() - size, rect.width, size);
|
|
110
|
-
const r2 = new Rect(rect.x, rect.y, rect.width, rect.height - size);
|
|
111
|
-
return { start: r1, end: r2 };
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/** @internal */
|
|
116
|
-
reflect() {
|
|
117
|
-
if (this === DockLocation.TOP) {
|
|
118
|
-
return DockLocation.BOTTOM;
|
|
119
|
-
} else if (this === DockLocation.LEFT) {
|
|
120
|
-
return DockLocation.RIGHT;
|
|
121
|
-
}
|
|
122
|
-
if (this === DockLocation.RIGHT) {
|
|
123
|
-
return DockLocation.LEFT;
|
|
124
|
-
} else {
|
|
125
|
-
// if (this === DockLocation.BOTTOM) {
|
|
126
|
-
return DockLocation.TOP;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
toString() {
|
|
131
|
-
return "(DockLocation: name=" + this.name + ", orientation=" + this.orientation + ")";
|
|
132
|
-
}
|
|
133
|
-
}
|
package/src/DropInfo.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { DockLocation } from "./DockLocation";
|
|
2
|
-
import { IDropTarget } from "./model/IDropTarget";
|
|
3
|
-
import { Node } from "./model/Node";
|
|
4
|
-
import { Rect } from "./Rect";
|
|
5
|
-
|
|
6
|
-
export class DropInfo {
|
|
7
|
-
node: Node & IDropTarget;
|
|
8
|
-
rect: Rect;
|
|
9
|
-
location: DockLocation;
|
|
10
|
-
index: number;
|
|
11
|
-
className: string;
|
|
12
|
-
|
|
13
|
-
constructor(node: Node & IDropTarget, rect: Rect, location: DockLocation, index: number, className: string) {
|
|
14
|
-
this.node = node;
|
|
15
|
-
this.rect = rect;
|
|
16
|
-
this.location = location;
|
|
17
|
-
this.index = index;
|
|
18
|
-
this.className = className;
|
|
19
|
-
}
|
|
20
|
-
}
|
package/src/I18nLabel.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export enum I18nLabel {
|
|
2
|
-
Close_Tab = "Close",
|
|
3
|
-
Close_Tabset = "Close tab set",
|
|
4
|
-
Active_Tabset = "Active tab set",
|
|
5
|
-
Move_Tabset = "Move tab set",
|
|
6
|
-
Move_Tabs = "Move tabs(?)",
|
|
7
|
-
Maximize = "Maximize tab set",
|
|
8
|
-
Restore = "Restore tab set",
|
|
9
|
-
Popout_Tab = "Popout selected tab",
|
|
10
|
-
Overflow_Menu_Tooltip = "Hidden tabs",
|
|
11
|
-
Error_rendering_component = "Error rendering component",
|
|
12
|
-
}
|
package/src/Orientation.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export class Orientation {
|
|
2
|
-
static HORZ = new Orientation("horz");
|
|
3
|
-
static VERT = new Orientation("vert");
|
|
4
|
-
|
|
5
|
-
static flip(from: Orientation) {
|
|
6
|
-
if (from === Orientation.HORZ) {
|
|
7
|
-
return Orientation.VERT;
|
|
8
|
-
} else {
|
|
9
|
-
return Orientation.HORZ;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/** @internal */
|
|
14
|
-
private _name: string;
|
|
15
|
-
|
|
16
|
-
/** @internal */
|
|
17
|
-
private constructor(name: string) {
|
|
18
|
-
this._name = name;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
getName() {
|
|
22
|
-
return this._name;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
toString() {
|
|
26
|
-
return this._name;
|
|
27
|
-
}
|
|
28
|
-
}
|
package/src/Rect.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { IJsonRect } from "./model/IJsonModel";
|
|
2
|
-
import { Orientation } from "./Orientation";
|
|
3
|
-
|
|
4
|
-
export class Rect {
|
|
5
|
-
static empty() {
|
|
6
|
-
return new Rect(0, 0, 0, 0);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
static fromJson(json: IJsonRect): Rect {
|
|
10
|
-
return new Rect(json.x, json.y, json.width, json.height);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
width: number;
|
|
16
|
-
height: number;
|
|
17
|
-
|
|
18
|
-
constructor(x: number, y: number, width: number, height: number) {
|
|
19
|
-
this.x = x;
|
|
20
|
-
this.y = y;
|
|
21
|
-
this.width = width;
|
|
22
|
-
this.height = height;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
toJson() {
|
|
26
|
-
return {x: this.x, y: this.y, width: this.width, height: this.height};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
snap(round: number) {
|
|
30
|
-
this.x = Math.round(this.x / round) * round;
|
|
31
|
-
this.y = Math.round(this.y / round) * round;
|
|
32
|
-
this.width = Math.round(this.width / round) * round;
|
|
33
|
-
this.height= Math.round(this.height / round) * round;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
static getBoundingClientRect(element: Element) {
|
|
37
|
-
const { x, y, width, height } = element.getBoundingClientRect();
|
|
38
|
-
return new Rect(x, y, width, height);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static getContentRect(element: HTMLElement) {
|
|
42
|
-
const rect = element.getBoundingClientRect();
|
|
43
|
-
const style = window.getComputedStyle(element);
|
|
44
|
-
|
|
45
|
-
const paddingLeft = parseFloat(style.paddingLeft);
|
|
46
|
-
const paddingRight = parseFloat(style.paddingRight);
|
|
47
|
-
const paddingTop = parseFloat(style.paddingTop);
|
|
48
|
-
const paddingBottom = parseFloat(style.paddingBottom);
|
|
49
|
-
const borderLeftWidth = parseFloat(style.borderLeftWidth);
|
|
50
|
-
const borderRightWidth = parseFloat(style.borderRightWidth);
|
|
51
|
-
const borderTopWidth = parseFloat(style.borderTopWidth);
|
|
52
|
-
const borderBottomWidth = parseFloat(style.borderBottomWidth);
|
|
53
|
-
|
|
54
|
-
const contentWidth = rect.width - borderLeftWidth - paddingLeft - paddingRight - borderRightWidth;
|
|
55
|
-
const contentHeight = rect.height - borderTopWidth - paddingTop - paddingBottom - borderBottomWidth;
|
|
56
|
-
|
|
57
|
-
return new Rect(
|
|
58
|
-
rect.left + borderLeftWidth + paddingLeft,
|
|
59
|
-
rect.top + borderTopWidth + paddingTop,
|
|
60
|
-
contentWidth,
|
|
61
|
-
contentHeight,
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
static fromDomRect(domRect: DOMRect) {
|
|
66
|
-
return new Rect(domRect.x, domRect.y, domRect.width, domRect.height);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
relativeTo(r: Rect | DOMRect) {
|
|
70
|
-
return new Rect(this.x - r.x, this.y - r.y, this.width, this.height);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
clone() {
|
|
74
|
-
return new Rect(this.x, this.y, this.width, this.height);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
equals(rect: Rect | null | undefined) {
|
|
78
|
-
return this.x === rect?.x && this.y === rect?.y && this.width === rect?.width && this.height === rect?.height
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
equalSize(rect: Rect | null | undefined) {
|
|
82
|
-
return this.width === rect?.width && this.height === rect?.height
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
getBottom() {
|
|
86
|
-
return this.y + this.height;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
getRight() {
|
|
90
|
-
return this.x + this.width;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
get bottom() {
|
|
94
|
-
return this.y + this.height;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
get right() {
|
|
98
|
-
return this.x + this.width;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
getCenter() {
|
|
102
|
-
return { x: this.x + this.width / 2, y: this.y + this.height / 2 };
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
positionElement(element: HTMLElement, position?: string) {
|
|
106
|
-
this.styleWithPosition(element.style, position);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
styleWithPosition(style: Record<string, any>, position: string = "absolute") {
|
|
110
|
-
style.left = this.x + "px";
|
|
111
|
-
style.top = this.y + "px";
|
|
112
|
-
style.width = Math.max(0, this.width) + "px"; // need Math.max to prevent -ve, cause error in IE
|
|
113
|
-
style.height = Math.max(0, this.height) + "px";
|
|
114
|
-
style.position = position;
|
|
115
|
-
return style;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
contains(x: number, y: number) {
|
|
119
|
-
if (this.x <= x && x <= this.getRight() && this.y <= y && y <= this.getBottom()) {
|
|
120
|
-
return true;
|
|
121
|
-
} else {
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
removeInsets(insets: { top: number; left: number; bottom: number; right: number }) {
|
|
127
|
-
return new Rect(this.x + insets.left, this.y + insets.top, Math.max(0, this.width - insets.left - insets.right), Math.max(0, this.height - insets.top - insets.bottom));
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
centerInRect(outerRect: Rect) {
|
|
131
|
-
this.x = (outerRect.width - this.width) / 2;
|
|
132
|
-
this.y = (outerRect.height - this.height) / 2;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/** @internal */
|
|
136
|
-
_getSize(orientation: Orientation) {
|
|
137
|
-
let prefSize = this.width;
|
|
138
|
-
if (orientation === Orientation.VERT) {
|
|
139
|
-
prefSize = this.height;
|
|
140
|
-
}
|
|
141
|
-
return prefSize;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
toString() {
|
|
145
|
-
return "(Rect: x=" + this.x + ", y=" + this.y + ", width=" + this.width + ", height=" + this.height + ")";
|
|
146
|
-
}
|
|
147
|
-
}
|