@gooddata/sdk-ui-dashboard 10.33.0-alpha.3 → 10.33.0-alpha.30
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/NOTICE +7 -141
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/__version.js.map +1 -1
- package/esm/assets/flexible-layouts-tooltip.gif +0 -0
- package/esm/model/commandHandlers/layout/containerWidthSanitization.d.ts +16 -3
- package/esm/model/commandHandlers/layout/containerWidthSanitization.d.ts.map +1 -1
- package/esm/model/commandHandlers/layout/containerWidthSanitization.js +39 -6
- package/esm/model/commandHandlers/layout/containerWidthSanitization.js.map +1 -1
- package/esm/model/commandHandlers/layout/moveSectionItemHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/layout/moveSectionItemHandler.js +10 -7
- package/esm/model/commandHandlers/layout/moveSectionItemHandler.js.map +1 -1
- package/esm/model/commandHandlers/layout/moveSectionItemToNewSectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/layout/moveSectionItemToNewSectionHandler.js +9 -6
- package/esm/model/commandHandlers/layout/moveSectionItemToNewSectionHandler.js.map +1 -1
- package/esm/model/commandHandlers/layout/rowContainerSanitization.d.ts +15 -0
- package/esm/model/commandHandlers/layout/rowContainerSanitization.d.ts.map +1 -0
- package/esm/model/commandHandlers/layout/rowContainerSanitization.js +82 -0
- package/esm/model/commandHandlers/layout/rowContainerSanitization.js.map +1 -0
- package/esm/model/commandHandlers/layout/toggleLayoutDirectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/layout/toggleLayoutDirectionHandler.js +32 -1
- package/esm/model/commandHandlers/layout/toggleLayoutDirectionHandler.js.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +8 -7
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js.map +1 -1
- package/esm/model/store/config/configSelectors.d.ts +0 -6
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +0 -8
- package/esm/model/store/config/configSelectors.js.map +1 -1
- package/esm/model/store/index.d.ts +1 -1
- package/esm/model/store/index.d.ts.map +1 -1
- package/esm/model/store/index.js +1 -1
- package/esm/model/store/index.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.js +6 -11
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.js.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +2 -3
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js.map +1 -1
- package/esm/presentation/flexibleLayout/dragAndDrop/draggableWidget/Hotspot.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/dragAndDrop/draggableWidget/Hotspot.js +14 -1
- package/esm/presentation/flexibleLayout/dragAndDrop/draggableWidget/Hotspot.js.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.json +8 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.json +8 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.json +8 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/en-US.json +0 -5
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +0 -5
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +0 -5
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/es-419.json +8 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.json +8 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.json +8 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.json +8 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.json +8 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.json +8 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.json +8 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.json +8 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.json +8 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.json +8 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.json +8 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.json +8 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.json +8 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.json +8 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.json +8 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.json +8 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.json +8 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +7 -0
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +8 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js.map +1 -1
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemHeadline.d.ts.map +1 -1
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemHeadline.js +13 -2
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemHeadline.js.map +1 -1
- package/esm/presentation/widget/widget/DashboardNestedLayoutWidget/Toolbar.d.ts.map +1 -1
- package/esm/presentation/widget/widget/DashboardNestedLayoutWidget/Toolbar.js +3 -3
- package/esm/presentation/widget/widget/DashboardNestedLayoutWidget/Toolbar.js.map +1 -1
- package/esm/sdk-ui-dashboard.d.ts +0 -7
- package/package.json +17 -16
- package/styles/css/attributeFilterConfig.css +1 -1
- package/styles/css/dashboard.css +3 -3
- package/styles/css/dragAndDrop.css +8 -7
- package/styles/css/dragAndDrop.css.map +1 -1
- package/styles/css/drillConfigPanel.css +14 -14
- package/styles/css/icons.css +15 -15
- package/styles/css/main.css +57 -56
- package/styles/css/main.css.map +1 -1
- package/styles/css/notifications_channels_dialog.css +1 -1
- package/styles/css/poweredByGDLogo.css +2 -2
- package/styles/css/sidebar.css +1 -1
- package/styles/scss/attributeFilterConfig.scss +1 -1
- package/styles/scss/dashboard.scss +2 -2
- package/styles/scss/dragAndDrop.scss +8 -8
- package/styles/scss/drillConfigPanel.scss +14 -14
- package/styles/scss/icons.scss +15 -15
- package/styles/scss/notifications_channels_dialog.scss +1 -1
- package/styles/scss/poweredByGDLogo.scss +3 -3
- package/styles/scss/sidebar.scss +1 -1
package/NOTICE
CHANGED
@@ -7,9 +7,9 @@
|
|
7
7
|
|
8
8
|
The following 3rd-party software packages may be used by or distributed with gooddata-ui-sdk. Any information relevant to third-party vendors listed below are collected using common, reasonable means.
|
9
9
|
|
10
|
-
Date generated: 2025-
|
10
|
+
Date generated: 2025-7-3
|
11
11
|
|
12
|
-
Revision ID:
|
12
|
+
Revision ID: 5705d116e12d6e639f6b158c45dec874ae87a28c
|
13
13
|
|
14
14
|
================================================================================
|
15
15
|
================================================================================
|
@@ -824,7 +824,6 @@ Revision ID: 2ed1e7653fddc3e0296fd015f45590ea238d6c2d
|
|
824
824
|
- react-dom (18.3.1) [MIT]
|
825
825
|
- react-fast-compare (3.2.2) [MIT]
|
826
826
|
- react-grid-system (8.1.9) [MIT]
|
827
|
-
- react-helmet (6.1.0) [MIT]
|
828
827
|
- react-intl (6.8.9) [BSD-3-Clause]
|
829
828
|
- react-is (16.13.1) [MIT]
|
830
829
|
- react-is (18.1.0) [MIT]
|
@@ -834,12 +833,11 @@ Revision ID: 2ed1e7653fddc3e0296fd015f45590ea238d6c2d
|
|
834
833
|
- react-markdown (9.0.1) [MIT]
|
835
834
|
- react-measure (2.5.2) [MIT]
|
836
835
|
- react-native-listener (1.1.0) [MIT, Apache-2.0]
|
837
|
-
- react-portal (4.
|
836
|
+
- react-portal (4.3.0) [MIT]
|
838
837
|
- react-redux (8.1.3) [MIT]
|
839
838
|
- react-responsive (10.0.1) [MIT, BSD-3-Clause]
|
840
839
|
- react-select (5.7.3) [MIT]
|
841
840
|
- react-select-async-paginate (0.7.3) [MIT]
|
842
|
-
- react-side-effect (2.1.2) [MIT]
|
843
841
|
- react-textarea-autosize (8.4.0) [MIT]
|
844
842
|
- react-transition-group (4.4.5) [BSD-3-Clause]
|
845
843
|
- react-window (1.8.10) [MIT]
|
@@ -38219,46 +38217,6 @@ Authors: gerben.meyer@gmail.com, mbmbrk@gmail.com
|
|
38219
38217
|
|
38220
38218
|
Package Download URL: https://registry.npmjs.org/react-grid-system/-/react-grid-system-8.1.9.tgz
|
38221
38219
|
|
38222
|
-
--------------------------------------------------------------------------------
|
38223
|
-
Package Title: react-helmet (6.1.0)
|
38224
|
-
|
38225
|
-
Package Locator: npm+react-helmet$6.1.0
|
38226
|
-
|
38227
|
-
Package Depth: Direct
|
38228
|
-
--------------------------------------------------------------------------------
|
38229
|
-
|
38230
|
-
* Declared Licenses *
|
38231
|
-
MIT
|
38232
|
-
|
38233
|
-
|
38234
|
-
Copyright (c) 2015 NFL
|
38235
|
-
|
38236
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
38237
|
-
of this software and associated documentation files (the "Software"), to deal
|
38238
|
-
in the Software without restriction, including without limitation the rights
|
38239
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
38240
|
-
copies of the Software, and to permit persons to whom the Software is
|
38241
|
-
furnished to do so, subject to the following conditions:
|
38242
|
-
|
38243
|
-
The above copyright notice and this permission notice shall be included in all
|
38244
|
-
copies or substantial portions of the Software.
|
38245
|
-
|
38246
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
38247
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
38248
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
38249
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
38250
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
38251
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
38252
|
-
SOFTWARE.
|
38253
|
-
|
38254
|
-
|
38255
|
-
|
38256
|
-
* Package Info *
|
38257
|
-
|
38258
|
-
Authors: cara.kuei@nfl.com, chris.welch@nfl.com, darren.wiebe@nfl.com, michael.blanchard@nfl.com, michael.lujan@nfl.com
|
38259
|
-
|
38260
|
-
Package Download URL: https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz
|
38261
|
-
|
38262
38220
|
--------------------------------------------------------------------------------
|
38263
38221
|
Package Title: react-intl (6.8.9)
|
38264
38222
|
|
@@ -38645,9 +38603,9 @@ Authors: rasmussenerik@gmail.com
|
|
38645
38603
|
Package Download URL: https://registry.npmjs.org/react-native-listener/-/react-native-listener-1.1.0.tgz
|
38646
38604
|
|
38647
38605
|
--------------------------------------------------------------------------------
|
38648
|
-
Package Title: react-portal (4.
|
38606
|
+
Package Title: react-portal (4.3.0)
|
38649
38607
|
|
38650
|
-
Package Locator: npm+react-portal$4.
|
38608
|
+
Package Locator: npm+react-portal$4.3.0
|
38651
38609
|
|
38652
38610
|
Package Depth: Direct
|
38653
38611
|
--------------------------------------------------------------------------------
|
@@ -38684,7 +38642,7 @@ SOFTWARE.
|
|
38684
38642
|
|
38685
38643
|
Authors: vojtech@miksu.cz
|
38686
38644
|
|
38687
|
-
Package Download URL: https://registry.npmjs.org/react-portal/-/react-portal-4.
|
38645
|
+
Package Download URL: https://registry.npmjs.org/react-portal/-/react-portal-4.3.0.tgz
|
38688
38646
|
|
38689
38647
|
--------------------------------------------------------------------------------
|
38690
38648
|
Package Title: react-redux (8.1.3)
|
@@ -38876,49 +38834,6 @@ Authors: taizvadim@gmail.com
|
|
38876
38834
|
|
38877
38835
|
Package Download URL: https://registry.npmjs.org/react-select-async-paginate/-/react-select-async-paginate-0.7.3.tgz
|
38878
38836
|
|
38879
|
-
--------------------------------------------------------------------------------
|
38880
|
-
Package Title: react-side-effect (2.1.2)
|
38881
|
-
|
38882
|
-
Package Locator: npm+react-side-effect$2.1.2
|
38883
|
-
|
38884
|
-
Package Depth: Transitive
|
38885
|
-
--------------------------------------------------------------------------------
|
38886
|
-
|
38887
|
-
* Declared Licenses *
|
38888
|
-
MIT
|
38889
|
-
|
38890
|
-
|
38891
|
-
The MIT License (MIT)
|
38892
|
-
|
38893
|
-
Copyright (c) 2015 Dan Abramov
|
38894
|
-
|
38895
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
38896
|
-
of this software and associated documentation files (the "Software"), to deal
|
38897
|
-
in the Software without restriction, including without limitation the rights
|
38898
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
38899
|
-
copies of the Software, and to permit persons to whom the Software is
|
38900
|
-
furnished to do so, subject to the following conditions:
|
38901
|
-
|
38902
|
-
The above copyright notice and this permission notice shall be included in all
|
38903
|
-
copies or substantial portions of the Software.
|
38904
|
-
|
38905
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
38906
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
38907
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
38908
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
38909
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
38910
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
38911
|
-
SOFTWARE.
|
38912
|
-
|
38913
|
-
|
38914
|
-
|
38915
|
-
|
38916
|
-
* Package Info *
|
38917
|
-
|
38918
|
-
Authors: dan.abramov@gmail.com, louis.descioli@gmail.com
|
38919
|
-
|
38920
|
-
Package Download URL: https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz
|
38921
|
-
|
38922
38837
|
--------------------------------------------------------------------------------
|
38923
38838
|
Package Title: react-textarea-autosize (8.4.0)
|
38924
38839
|
|
@@ -72894,29 +72809,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
72894
72809
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
72895
72810
|
|
72896
72811
|
|
72897
|
-
* MIT *
|
72898
|
-
|
72899
|
-
Copyright (c) 2015 NFL
|
72900
|
-
|
72901
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
72902
|
-
of this software and associated documentation files (the "Software"), to deal
|
72903
|
-
in the Software without restriction, including without limitation the rights
|
72904
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
72905
|
-
copies of the Software, and to permit persons to whom the Software is
|
72906
|
-
furnished to do so, subject to the following conditions:
|
72907
|
-
|
72908
|
-
The above copyright notice and this permission notice shall be included in all
|
72909
|
-
copies or substantial portions of the Software.
|
72910
|
-
|
72911
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
72912
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
72913
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
72914
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
72915
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
72916
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
72917
|
-
SOFTWARE.
|
72918
|
-
|
72919
|
-
|
72920
72812
|
* MIT *
|
72921
72813
|
|
72922
72814
|
Copyright (c) 2015 Tim Caswell (https://github.com/creationix) and other
|
@@ -81068,32 +80960,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
81068
80960
|
THE SOFTWARE.
|
81069
80961
|
|
81070
80962
|
|
81071
|
-
* MIT *
|
81072
|
-
|
81073
|
-
The MIT License (MIT)
|
81074
|
-
|
81075
|
-
Copyright (c) 2015 Dan Abramov
|
81076
|
-
|
81077
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
81078
|
-
of this software and associated documentation files (the "Software"), to deal
|
81079
|
-
in the Software without restriction, including without limitation the rights
|
81080
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
81081
|
-
copies of the Software, and to permit persons to whom the Software is
|
81082
|
-
furnished to do so, subject to the following conditions:
|
81083
|
-
|
81084
|
-
The above copyright notice and this permission notice shall be included in all
|
81085
|
-
copies or substantial portions of the Software.
|
81086
|
-
|
81087
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
81088
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
81089
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
81090
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
81091
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
81092
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
81093
|
-
SOFTWARE.
|
81094
|
-
|
81095
|
-
|
81096
|
-
|
81097
80963
|
* MIT *
|
81098
80964
|
|
81099
80965
|
The MIT License (MIT)
|
@@ -83824,4 +83690,4 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
83824
83690
|
--------------------------------------------------------------------------------
|
83825
83691
|
--------------------------------------------------------------------------------
|
83826
83692
|
|
83827
|
-
Report Generated by FOSSA on 2025-
|
83693
|
+
Report Generated by FOSSA on 2025-7-3
|
package/esm/__version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const LIB_VERSION = "10.33.0-alpha.
|
1
|
+
export declare const LIB_VERSION = "10.33.0-alpha.30";
|
2
2
|
//# sourceMappingURL=__version.d.ts.map
|
package/esm/__version.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"__version.d.ts","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,
|
1
|
+
{"version":3,"file":"__version.d.ts","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,qBAAqB,CAAC"}
|
package/esm/__version.js
CHANGED
package/esm/__version.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"__version.js","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,
|
1
|
+
{"version":3,"file":"__version.js","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC"}
|
Binary file
|
@@ -1,11 +1,24 @@
|
|
1
|
-
import { IDashboardLayout, ScreenSize } from "@gooddata/sdk-model";
|
1
|
+
import { IDashboardLayout, ScreenSize, IInsight, ISettings } from "@gooddata/sdk-model";
|
2
2
|
import { ExtendedDashboardWidget, IItemWithWidth } from "../../types/layoutTypes.js";
|
3
3
|
import { ILayoutItemPath } from "../../../types.js";
|
4
|
+
import { ObjRefMap } from "../../../_staging/metadata/objRefMap.js";
|
4
5
|
export declare const getUpdatedSizesOnly: (layout: IDashboardLayout<ExtendedDashboardWidget>, itemsWithSizes: IItemWithWidth[], screen: ScreenSize) => IItemWithWidth[];
|
5
6
|
/**
|
6
7
|
* Collects layout paths of all child widgets that need width updates when a nested layout is resized.
|
7
8
|
* For nested layouts with a "column" direction, it processes children recursively.
|
8
|
-
* For other widgets (including nested layouts with "row" direction), it returns their paths directly
|
9
|
+
* For other widgets (including nested layouts with "row" direction), it returns their paths directly unless
|
10
|
+
* the processAllContainers is true.
|
11
|
+
*
|
12
|
+
* @param layoutItem - The layout item to process
|
13
|
+
* @param layoutItemPath - The path to the provided layout item (this could be a nested layout, and we need to know his preceding path)
|
14
|
+
* @param processAllContainers - If true, process all containers, including those with a "row" direction, otherwise only process containers with a "column" direction
|
9
15
|
*/
|
10
|
-
export declare function getChildWidgetLayoutPaths(
|
16
|
+
export declare function getChildWidgetLayoutPaths(layoutItem: IDashboardLayout<ExtendedDashboardWidget>, layoutItemPath: ILayoutItemPath, processAllContainers?: boolean): ILayoutItemPath[];
|
17
|
+
/**
|
18
|
+
* Collects layout paths and default minimum widths of all child widgets that need width updates when
|
19
|
+
* a nested layout is resized. For nested layouts with a "column" direction, it processes children recursively.
|
20
|
+
* For other widgets (including nested layouts with "row" direction), it returns their paths and
|
21
|
+
* minimum widths directly.
|
22
|
+
*/
|
23
|
+
export declare function getChildWidgetLayoutPathsWithMinWidths(layout: IDashboardLayout<ExtendedDashboardWidget>, parentPath: ILayoutItemPath, settings: ISettings, insightMap: ObjRefMap<IInsight>, screen: ScreenSize): IItemWithWidth[];
|
11
24
|
//# sourceMappingURL=containerWidthSanitization.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"containerWidthSanitization.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/containerWidthSanitization.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAqB,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"containerWidthSanitization.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/containerWidthSanitization.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;AAE3G,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGrF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,eAAO,MAAM,mBAAmB,WACpB,iBAAiB,uBAAuB,CAAC,kBACjC,cAAc,EAAE,UACxB,UAAU,qBAOrB,CAAC;AAKF;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACrC,UAAU,EAAE,gBAAgB,CAAC,uBAAuB,CAAC,EACrD,cAAc,EAAE,eAAe,EAC/B,oBAAoB,UAAQ,GAC7B,eAAe,EAAE,CAUnB;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CAClD,MAAM,EAAE,gBAAgB,CAAC,uBAAuB,CAAC,EACjD,UAAU,EAAE,eAAe,EAC3B,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC/B,MAAM,EAAE,UAAU,GACnB,cAAc,EAAE,CA2BlB"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// (C) 2025 GoodData Corporation
|
2
2
|
import { isDashboardLayout } from "@gooddata/sdk-model";
|
3
3
|
import { findItem } from "../../../_staging/layout/coordinates.js";
|
4
|
-
import { implicitLayoutItemSizeFromXlSize } from "../../../_staging/layout/sizing.js";
|
4
|
+
import { implicitLayoutItemSizeFromXlSize, getMinWidth } from "../../../_staging/layout/sizing.js";
|
5
5
|
import { getLayoutConfiguration } from "../../../_staging/dashboard/flexibleLayout/layoutConfiguration.js";
|
6
6
|
export const getUpdatedSizesOnly = (layout, itemsWithSizes, screen) => {
|
7
7
|
return itemsWithSizes.filter(({ itemPath, width }) => {
|
@@ -14,14 +14,47 @@ const getLayoutDirection = (layout) => getLayoutConfiguration(layout).direction;
|
|
14
14
|
/**
|
15
15
|
* Collects layout paths of all child widgets that need width updates when a nested layout is resized.
|
16
16
|
* For nested layouts with a "column" direction, it processes children recursively.
|
17
|
-
* For other widgets (including nested layouts with "row" direction), it returns their paths directly
|
17
|
+
* For other widgets (including nested layouts with "row" direction), it returns their paths directly unless
|
18
|
+
* the processAllContainers is true.
|
19
|
+
*
|
20
|
+
* @param layoutItem - The layout item to process
|
21
|
+
* @param layoutItemPath - The path to the provided layout item (this could be a nested layout, and we need to know his preceding path)
|
22
|
+
* @param processAllContainers - If true, process all containers, including those with a "row" direction, otherwise only process containers with a "column" direction
|
18
23
|
*/
|
19
|
-
export function getChildWidgetLayoutPaths(
|
24
|
+
export function getChildWidgetLayoutPaths(layoutItem, layoutItemPath, processAllContainers = false) {
|
25
|
+
return layoutItem.sections.flatMap((section, sectionIndex) => section.items.flatMap((item, itemIndex) => {
|
26
|
+
const currentPath = [...layoutItemPath, { sectionIndex, itemIndex }];
|
27
|
+
return isDashboardLayout(item.widget) &&
|
28
|
+
(processAllContainers || getLayoutDirection(item.widget) === "column")
|
29
|
+
? [currentPath, ...getChildWidgetLayoutPaths(item.widget, currentPath, processAllContainers)]
|
30
|
+
: [currentPath];
|
31
|
+
}));
|
32
|
+
}
|
33
|
+
/**
|
34
|
+
* Collects layout paths and default minimum widths of all child widgets that need width updates when
|
35
|
+
* a nested layout is resized. For nested layouts with a "column" direction, it processes children recursively.
|
36
|
+
* For other widgets (including nested layouts with "row" direction), it returns their paths and
|
37
|
+
* minimum widths directly.
|
38
|
+
*/
|
39
|
+
export function getChildWidgetLayoutPathsWithMinWidths(layout, parentPath, settings, insightMap, screen) {
|
20
40
|
return layout.sections.flatMap((section, sectionIndex) => section.items.flatMap((item, itemIndex) => {
|
21
41
|
const currentPath = [...parentPath, { sectionIndex, itemIndex }];
|
22
|
-
|
23
|
-
|
24
|
-
|
42
|
+
if (item.widget === undefined) {
|
43
|
+
return [];
|
44
|
+
}
|
45
|
+
if (isDashboardLayout(item.widget) && getLayoutDirection(item.widget) === "column") {
|
46
|
+
// For nested layouts with a column direction, process children recursively and include
|
47
|
+
// the container itself
|
48
|
+
const childItems = getChildWidgetLayoutPathsWithMinWidths(item.widget, currentPath, settings, insightMap, screen);
|
49
|
+
const containerMinWidth = getMinWidth(item.widget, insightMap, screen, settings, "column");
|
50
|
+
return [...childItems, { itemPath: currentPath, width: containerMinWidth }];
|
51
|
+
}
|
52
|
+
else {
|
53
|
+
// For other widgets (including nested layouts with a row direction, layout will never be
|
54
|
+
// a column at this point), return their path and minimum default width.
|
55
|
+
const minWidth = getMinWidth(item.widget, insightMap, screen, settings, "row");
|
56
|
+
return [{ itemPath: currentPath, width: minWidth }];
|
57
|
+
}
|
25
58
|
}));
|
26
59
|
}
|
27
60
|
//# sourceMappingURL=containerWidthSanitization.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"containerWidthSanitization.js","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/containerWidthSanitization.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,
|
1
|
+
{"version":3,"file":"containerWidthSanitization.js","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/containerWidthSanitization.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAqD,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG3G,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,gCAAgC,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEnG,OAAO,EAAE,sBAAsB,EAAE,MAAM,mEAAmE,CAAC;AAG3G,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAC/B,MAAiD,EACjD,cAAgC,EAChC,MAAkB,EACpB,EAAE;IACA,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;QACjD,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC7C,MAAM,iBAAiB,G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EAAE;QACtC,MAAM,WAAW,GAAoB,CAAC,GAAG,UAAU,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC;QAClF,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,EAAE,CAAC;QACd,CAAC;QACD,IAAI,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC;YACjF,uFAAuF;YACvF,uBAAuB;YACvB,MAAM,UAAU,GAAG,sCAAsC,CACrD,IAAI,CAAC,MAAM,EACX,WAAW,EACX,QAAQ,EACR,UAAU,EACV,MAAM,CACT,CAAC;YACF,MAAM,iBAAiB,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAC3F,OAAO,CAAC,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAChF,CAAC;aAAM,CAAC;YACJ,yFAAyF;YACzF,wEAAwE;YACxE,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC/E,OAAO,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACxD,CAAC;IACL,CAAC,CAAC,CACL,CAAC;AACN,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"moveSectionItemHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/moveSectionItemHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,OAAO,EAAE,+BAA+B,EAA0B,MAAM,wBAAwB,CAAC;AA2BjG,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"moveSectionItemHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/moveSectionItemHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,OAAO,EAAE,+BAA+B,EAA0B,MAAM,wBAAwB,CAAC;AA2BjG,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AA4LxE,wBAAgB,8BAA8B,CAC1C,YAAY,EAAE,eAAe,EAC7B,UAAU,GAAE,eAAoB,GACjC,kBAAkB,CAmBpB;AAED,wBAAiB,sBAAsB,CACnC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,eAAe,GACrB,YAAY,CAAC,+BAA+B,CAAC,CAgG/C"}
|
@@ -11,6 +11,7 @@ import { selectSettings } from "../../store/config/configSelectors.js";
|
|
11
11
|
import { selectInsightsMap } from "../../store/insights/insightsSelectors.js";
|
12
12
|
import { normalizeItemSizeToParent } from "../../../_staging/layout/sizing.js";
|
13
13
|
import { resizeParentContainers } from "./containerHeightSanitization.js";
|
14
|
+
import { buildRowContainerSanitizationActions } from "./rowContainerSanitization.js";
|
14
15
|
function validateAndResolve(commandCtx) {
|
15
16
|
const { ctx, layout, cmd: { payload: { sectionIndex, toSectionIndex, toItemIndex, itemIndex, fromPath, toPath, removeOriginalSectionIfEmpty, }, }, } = commandCtx;
|
16
17
|
if (fromPath === undefined && toPath === undefined) {
|
@@ -129,12 +130,16 @@ export function* moveSectionItemHandler(ctx, cmd) {
|
|
129
130
|
const insightsMap = yield select(selectInsightsMap);
|
130
131
|
const screen = yield select(selectScreen);
|
131
132
|
const { item: itemWithNormalizedSize, sizeChanged: shouldChangeSize } = normalizeItemSizeToParent(itemToMove, targetIndex, commandCtx.layout, settings, insightsMap, screen);
|
133
|
+
const currentItemIndex = fromPath === undefined ? [{ sectionIndex, itemIndex }] : fromPath;
|
134
|
+
const toItemIndex = targetIndex === undefined
|
135
|
+
? [{ sectionIndex: targetSectionIndex, itemIndex: targetItemIndex }]
|
136
|
+
: targetIndex;
|
137
|
+
const rowContainerSanitizationActions = buildRowContainerSanitizationActions(cmd, commandCtx.layout, itemWithNormalizedSize, currentItemIndex, toItemIndex, screen);
|
132
138
|
yield put(batchActions([
|
139
|
+
...rowContainerSanitizationActions, // process first to avoid remapping of the paths
|
133
140
|
layoutActions.moveSectionItem({
|
134
|
-
itemIndex:
|
135
|
-
toItemIndex
|
136
|
-
? [{ sectionIndex: targetSectionIndex, itemIndex: targetItemIndex }]
|
137
|
-
: targetIndex,
|
141
|
+
itemIndex: currentItemIndex,
|
142
|
+
toItemIndex,
|
138
143
|
undo: {
|
139
144
|
cmd,
|
140
145
|
},
|
@@ -154,9 +159,7 @@ export function* moveSectionItemHandler(ctx, cmd) {
|
|
154
159
|
...(shouldChangeSize
|
155
160
|
? [
|
156
161
|
layoutActions.changeItemWidth({
|
157
|
-
layoutPath:
|
158
|
-
? [{ sectionIndex: targetSectionIndex, itemIndex: targetItemIndex }]
|
159
|
-
: targetIndex,
|
162
|
+
layoutPath: toItemIndex,
|
160
163
|
width: itemWithNormalizedSize.size.xl.gridWidth,
|
161
164
|
}),
|
162
165
|
]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"moveSectionItemHandler.js","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/moveSectionItemHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAkB,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAIvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAmC,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EACH,QAAQ,EACR,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,aAAa,GAChB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACH,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
1
|
+
{"version":3,"file":"moveSectionItemHandler.js","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/moveSectionItemHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAkB,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAIvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OA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AAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,EACjE,yBAAyB,EACzB,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,EAC3D,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,EACvE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EACjE,WAAW,KAAK,SAAS;QACrB,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,yBAA0B,EAAE,SAAS,EAAE,WAAY,EAAE,CAAC;QACzE,CAAC,CAAC,WAAW,EACjB,mBAAmB,EACnB,GAAG,CAAC,aAAa,CACpB,CAAC;AACN,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"moveSectionItemToNewSectionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/moveSectionItemToNewSectionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,EACH,2CAA2C,EAE9C,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
1
|
+
{"version":3,"file":"moveSectionItemToNewSectionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/moveSectionItemToNewSectionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,EACH,2CAA2C,EAE9C,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiK9D,wBAAiB,kCAAkC,CAC/C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,2BAA2B,GACjC,YAAY,CAAC,2CAA2C,CAAC,CAqH3D"}
|
@@ -11,6 +11,7 @@ import { selectSettings } from "../../store/config/configSelectors.js";
|
|
11
11
|
import { selectInsightsMap } from "../../store/insights/insightsSelectors.js";
|
12
12
|
import { normalizeItemSizeToParent } from "../../../_staging/layout/sizing.js";
|
13
13
|
import { resizeParentContainers } from "./containerHeightSanitization.js";
|
14
|
+
import { buildRowContainerSanitizationActions } from "./rowContainerSanitization.js";
|
14
15
|
function validateAndResolve(commandCtx) {
|
15
16
|
const { ctx, layout, cmd: { payload: { itemPath, sectionIndex, itemIndex, toSectionIndex, toSection, removeOriginalSectionIfEmpty, }, }, } = commandCtx;
|
16
17
|
if (itemPath === undefined && toSection === undefined) {
|
@@ -99,7 +100,13 @@ export function* moveSectionItemToNewSectionHandler(ctx, cmd) {
|
|
99
100
|
const insightsMap = yield select(selectInsightsMap);
|
100
101
|
const screen = yield select(selectScreen);
|
101
102
|
const { item: itemWithNormalizedSize, sizeChanged: shouldChangeSize } = normalizeItemSizeToParent(itemToMove, toItemIndex, commandCtx.layout, settings, insightsMap, screen);
|
103
|
+
const sourceItemIndex = itemPath === undefined ? [{ sectionIndex, itemIndex }] : itemPath;
|
104
|
+
const destinationItemIndex = toItemIndex === undefined
|
105
|
+
? [{ sectionIndex: targetSectionIndex, itemIndex: targetItemIndex }]
|
106
|
+
: toItemIndex;
|
107
|
+
const rowContainerSanitizationActions = buildRowContainerSanitizationActions(cmd, commandCtx.layout, itemWithNormalizedSize, sourceItemIndex, destinationItemIndex, screen);
|
102
108
|
yield put(batchActions([
|
109
|
+
...rowContainerSanitizationActions, // process first to avoid remapping of the paths
|
103
110
|
layoutActions.addSection({
|
104
111
|
index: toItemIndex === undefined
|
105
112
|
? { parent: undefined, sectionIndex: targetSectionIndex }
|
@@ -114,9 +121,7 @@ export function* moveSectionItemToNewSectionHandler(ctx, cmd) {
|
|
114
121
|
itemIndex: itemPathWithSectionsShifted === undefined
|
115
122
|
? [{ sectionIndex: itemSectionIndex, itemIndex }]
|
116
123
|
: itemPathWithSectionsShifted,
|
117
|
-
toItemIndex:
|
118
|
-
? [{ sectionIndex: targetSectionIndex, itemIndex: targetItemIndex }]
|
119
|
-
: toItemIndex,
|
124
|
+
toItemIndex: destinationItemIndex,
|
120
125
|
undo: {
|
121
126
|
cmd,
|
122
127
|
},
|
@@ -124,9 +129,7 @@ export function* moveSectionItemToNewSectionHandler(ctx, cmd) {
|
|
124
129
|
...(shouldChangeSize
|
125
130
|
? [
|
126
131
|
layoutActions.changeItemWidth({
|
127
|
-
layoutPath:
|
128
|
-
? [{ sectionIndex: targetSectionIndex, itemIndex: targetItemIndex }]
|
129
|
-
: toItemIndex,
|
132
|
+
layoutPath: destinationItemIndex,
|
130
133
|
width: itemWithNormalizedSize.size.xl.gridWidth,
|
131
134
|
}),
|
132
135
|
]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"moveSectionItemToNewSectionHandler.js","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/moveSectionItemToNewSectionHandler.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAkB,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAEH,kCAAkC,GACrC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAGnF,OAAO,EACH,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,GAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,uBAAuB,EACvB,0BAA0B,EAC1B,WAAW,EACX,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,mBAAmB,GACtB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
1
|
+
{"version":3,"file":"moveSectionItemToNewSectionHandler.js","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/moveSectionItemToNewSectionHandler.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAkB,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAEH,kCAAkC,GACrC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAGnF,OAAO,EACH,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,GAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,uBAAuB,EACvB,0BAA0B,EAC1B,WAAW,EACX,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,mBAAmB,GACtB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,yBAAyB,E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C;oBACpD,IAAI,EAAE;wBACF,GAAG;qBACN;iBACJ,CAAC;aACL;YACH,CAAC,CAAC,EAAE,CAAC;KACZ,CAAC,CACL,CAAC;IAEF,MAAM,IAAI,CAAC,sBAAsB,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,MAAM,IAAI,CAAC,sBAAsB,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;IAE/D,OAAO,kCAAkC,CACrC,GAAG,EACH,sBAAsB,EACtB,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,EACjE,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,kBAAkB,EACpF,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,EAC3D,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,eAAe,EAC3E,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EACjE,WAAW,KAAK,SAAS;QACrB,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;QACpE,CAAC,CAAC,WAAW,EACjB,mBAAmB,EACnB,GAAG,CAAC,aAAa,CACpB,CAAC;AACN,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { AnyAction } from "@reduxjs/toolkit";
|
2
|
+
import { IDashboardLayout, ScreenSize, IDashboardLayoutItem } from "@gooddata/sdk-model";
|
3
|
+
import { ExtendedDashboardWidget } from "../../types/layoutTypes.js";
|
4
|
+
import { ILayoutItemPath } from "../../../types.js";
|
5
|
+
import { IDashboardCommand } from "../../commands/index.js";
|
6
|
+
/**
|
7
|
+
* Builds actions for row container sanitization when moving items between layouts.
|
8
|
+
*
|
9
|
+
* If a container is being moved, we need to check if it has a row direction, and it is being moved to
|
10
|
+
* a column layout. If yes, we need to change its direction to column. In any case, we need to check all
|
11
|
+
* its children and find all the row containers and change their direction to column. We will also need to
|
12
|
+
* update the width of all the children to match the moved container width.
|
13
|
+
*/
|
14
|
+
export declare function buildRowContainerSanitizationActions(cmd: IDashboardCommand, rootLayout: IDashboardLayout<ExtendedDashboardWidget>, possibleContainer: IDashboardLayoutItem<ExtendedDashboardWidget>, fromItemIndex: ILayoutItemPath, toItemIndex: ILayoutItemPath, screen: ScreenSize): AnyAction[];
|
15
|
+
//# sourceMappingURL=rowContainerSanitization.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rowContainerSanitization.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/rowContainerSanitization.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAqB,gBAAgB,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE5G,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAyF5D;;;;;;;GAOG;AACH,wBAAgB,oCAAoC,CAChD,GAAG,EAAE,iBAAiB,EACtB,UAAU,EAAE,gBAAgB,CAAC,uBAAuB,CAAC,EACrD,iBAAiB,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,EAChE,aAAa,EAAE,eAAe,EAC9B,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,UAAU,GACnB,SAAS,EAAE,CA0Bb"}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
// (C) 2025 GoodData Corporation
|
2
|
+
import { isDashboardLayout } from "@gooddata/sdk-model";
|
3
|
+
import { getLayoutConfiguration, getContainerDirectionAtPath, } from "../../../_staging/dashboard/flexibleLayout/layoutConfiguration.js";
|
4
|
+
import { getParentPath } from "../../../_staging/layout/coordinates.js";
|
5
|
+
import { layoutActions } from "../../store/layout/index.js";
|
6
|
+
import { getChildWidgetLayoutPaths, getUpdatedSizesOnly } from "./containerWidthSanitization.js";
|
7
|
+
function findNestedRowContainers(container, containerLayoutPath) {
|
8
|
+
if (!isDashboardLayout(container)) {
|
9
|
+
return [];
|
10
|
+
}
|
11
|
+
return [
|
12
|
+
// include itself if the container has a row direction
|
13
|
+
...(getLayoutConfiguration(container).direction === "row" ? [containerLayoutPath] : []),
|
14
|
+
// process nested items and look for row containers
|
15
|
+
...container.sections.flatMap((section, sectionIndex) => section.items.flatMap((item, itemIndex) => {
|
16
|
+
const currentPath = [...containerLayoutPath, { sectionIndex, itemIndex }];
|
17
|
+
return item.widget && isDashboardLayout(item.widget)
|
18
|
+
? findNestedRowContainers(item.widget, currentPath)
|
19
|
+
: [];
|
20
|
+
})),
|
21
|
+
];
|
22
|
+
}
|
23
|
+
function mapChildrenWithNewWidth(rootLayout, container, containerLayoutPath, newWidth, screen) {
|
24
|
+
if (!isDashboardLayout(container)) {
|
25
|
+
return [];
|
26
|
+
}
|
27
|
+
const children = getChildWidgetLayoutPaths(container, containerLayoutPath, true);
|
28
|
+
const childrenWithNewSize = children.map((itemPath) => ({
|
29
|
+
itemPath,
|
30
|
+
width: newWidth,
|
31
|
+
}));
|
32
|
+
return getUpdatedSizesOnly(rootLayout, childrenWithNewSize, screen);
|
33
|
+
}
|
34
|
+
function shouldChangeNestedContainersDirectionToColumn(rootLayout, item, targetItemIndex) {
|
35
|
+
const targetParentPath = getParentPath(targetItemIndex);
|
36
|
+
const targetLayoutDirection = getContainerDirectionAtPath(rootLayout, targetParentPath);
|
37
|
+
return isDashboardLayout(item.widget) && targetLayoutDirection === "column";
|
38
|
+
}
|
39
|
+
function calculateRowContainerSanitization(rootLayout, possibleContainer, fromItemIndex, toItemIndex, screen) {
|
40
|
+
const changeNestedContainersDirectionToColumn = shouldChangeNestedContainersDirectionToColumn(rootLayout, possibleContainer, toItemIndex);
|
41
|
+
if (!changeNestedContainersDirectionToColumn) {
|
42
|
+
return {
|
43
|
+
containersForDirectionChange: [],
|
44
|
+
childrenWithNewWidth: [],
|
45
|
+
};
|
46
|
+
}
|
47
|
+
const containersForDirectionChange = findNestedRowContainers(possibleContainer.widget, fromItemIndex);
|
48
|
+
const newWidth = possibleContainer.size.xl.gridWidth;
|
49
|
+
const childrenWithNewWidth = mapChildrenWithNewWidth(rootLayout, possibleContainer.widget, fromItemIndex, newWidth, screen);
|
50
|
+
return {
|
51
|
+
containersForDirectionChange,
|
52
|
+
childrenWithNewWidth,
|
53
|
+
};
|
54
|
+
}
|
55
|
+
/**
|
56
|
+
* Builds actions for row container sanitization when moving items between layouts.
|
57
|
+
*
|
58
|
+
* If a container is being moved, we need to check if it has a row direction, and it is being moved to
|
59
|
+
* a column layout. If yes, we need to change its direction to column. In any case, we need to check all
|
60
|
+
* its children and find all the row containers and change their direction to column. We will also need to
|
61
|
+
* update the width of all the children to match the moved container width.
|
62
|
+
*/
|
63
|
+
export function buildRowContainerSanitizationActions(cmd, rootLayout, possibleContainer, fromItemIndex, toItemIndex, screen) {
|
64
|
+
const { containersForDirectionChange, childrenWithNewWidth } = calculateRowContainerSanitization(rootLayout, possibleContainer, fromItemIndex, toItemIndex, screen);
|
65
|
+
return [
|
66
|
+
...containersForDirectionChange.map((itemPath) => layoutActions.toggleLayoutDirection({
|
67
|
+
layoutPath: itemPath,
|
68
|
+
direction: "column",
|
69
|
+
undo: {
|
70
|
+
cmd,
|
71
|
+
},
|
72
|
+
})),
|
73
|
+
...(childrenWithNewWidth.length > 0
|
74
|
+
? [
|
75
|
+
layoutActions.updateWidthOfMultipleItems({
|
76
|
+
itemsWithSizes: childrenWithNewWidth,
|
77
|
+
}),
|
78
|
+
]
|
79
|
+
: []),
|
80
|
+
];
|
81
|
+
}
|
82
|
+
//# sourceMappingURL=rowContainerSanitization.js.map
|