@gooddata/sdk-ui-dashboard 10.33.0-alpha.28 → 10.33.0-alpha.3
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 -7
- 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/model/commandHandlers/layout/containerWidthSanitization.d.ts +3 -16
- package/esm/model/commandHandlers/layout/containerWidthSanitization.d.ts.map +1 -1
- package/esm/model/commandHandlers/layout/containerWidthSanitization.js +6 -39
- 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 +7 -10
- 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 +6 -9
- package/esm/model/commandHandlers/layout/moveSectionItemToNewSectionHandler.js.map +1 -1
- package/esm/model/commandHandlers/layout/toggleLayoutDirectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/layout/toggleLayoutDirectionHandler.js +1 -32
- 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 +7 -8
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js.map +1 -1
- package/esm/model/store/config/configSelectors.d.ts +6 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +8 -0
- 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 +11 -6
- 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 +3 -2
- 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 +1 -14
- package/esm/presentation/flexibleLayout/dragAndDrop/draggableWidget/Hotspot.js.map +1 -1
- package/esm/presentation/localization/bundles/en-US.json +5 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +5 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +5 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js.map +1 -1
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemHeadline.d.ts.map +1 -1
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemHeadline.js +2 -13
- 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 +7 -0
- package/package.json +16 -17
- package/styles/css/attributeFilterConfig.css +1 -1
- package/styles/css/dashboard.css +3 -3
- package/styles/css/dragAndDrop.css +7 -8
- 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 +56 -57
- 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/esm/assets/flexible-layouts-tooltip.gif +0 -0
- package/esm/model/commandHandlers/layout/rowContainerSanitization.d.ts +0 -15
- package/esm/model/commandHandlers/layout/rowContainerSanitization.d.ts.map +0 -1
- package/esm/model/commandHandlers/layout/rowContainerSanitization.js +0 -82
- package/esm/model/commandHandlers/layout/rowContainerSanitization.js.map +0 -1
@@ -179,15 +179,15 @@
|
|
179
179
|
|
180
180
|
.add-kpi-placeholder::before,
|
181
181
|
.move-kpi-placeholder::before {
|
182
|
-
background-image: url("
|
183
|
-
}
|
184
|
-
|
185
|
-
.add-attribute-filter-placeholder.disabled::before {
|
186
|
-
background-image: url("@gooddata/sdk-ui-dashboard/esm/assets/add-attribute-filter-placeholder-disabled.svg");
|
182
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/add-kpi-placeholder.svg");
|
187
183
|
}
|
188
184
|
|
189
185
|
.add-attribute-filter-placeholder::before {
|
190
|
-
background-image: url("
|
186
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/add-attribute-filter-placeholder.svg");
|
187
|
+
|
188
|
+
&:disabled {
|
189
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/add-attribute-filter-placeholder-disabled.svg");
|
190
|
+
}
|
191
191
|
}
|
192
192
|
|
193
193
|
.dropzone {
|
@@ -441,7 +441,7 @@
|
|
441
441
|
|
442
442
|
.gd-icon-insight {
|
443
443
|
&::before {
|
444
|
-
content: url("
|
444
|
+
content: url("~@gooddata/sdk-ui-dashboard/esm/assets/add-insight-placeholder.svg");
|
445
445
|
display: inline-block;
|
446
446
|
margin-right: 10px;
|
447
447
|
}
|
@@ -561,7 +561,7 @@
|
|
561
561
|
cursor: pointer;
|
562
562
|
|
563
563
|
&.select-measure {
|
564
|
-
background: url("
|
564
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/dummy-kpi-simple.svg") no-repeat center center;
|
565
565
|
background-size: 130px;
|
566
566
|
}
|
567
567
|
}
|
@@ -116,7 +116,7 @@
|
|
116
116
|
display: block;
|
117
117
|
width: 18px;
|
118
118
|
height: 24px;
|
119
|
-
background-image: url("
|
119
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/measure.svg");
|
120
120
|
background-repeat: no-repeat;
|
121
121
|
background-position: left top;
|
122
122
|
background-size: contain;
|
@@ -128,20 +128,20 @@
|
|
128
128
|
}
|
129
129
|
|
130
130
|
.gd-drill-measure-selector-list-item::before {
|
131
|
-
background-image: url("
|
131
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/measure.svg");
|
132
132
|
}
|
133
133
|
.gd-drill-metric-selector-list-item::before {
|
134
|
-
background-image: url("
|
134
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/metric.svg");
|
135
135
|
top: 8px;
|
136
136
|
height: 18px;
|
137
137
|
}
|
138
138
|
.gd-drill-attribute-selector-list-item::before {
|
139
|
-
background-image: url("
|
139
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/attribute.svg");
|
140
140
|
}
|
141
141
|
.gd-drill-attribute-date-selector-list-item::before {
|
142
142
|
top: 9px;
|
143
143
|
height: 16px;
|
144
|
-
background-image: url("
|
144
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/date-dropdown.svg");
|
145
145
|
}
|
146
146
|
}
|
147
147
|
|
@@ -227,7 +227,7 @@
|
|
227
227
|
display: block;
|
228
228
|
width: 18px;
|
229
229
|
height: 24px;
|
230
|
-
background-image: url("
|
230
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/attribute-hierarchy.svg");
|
231
231
|
background-repeat: no-repeat;
|
232
232
|
background-position: left top;
|
233
233
|
background-size: contain;
|
@@ -262,16 +262,16 @@
|
|
262
262
|
}
|
263
263
|
|
264
264
|
.dm-button-icon-metric {
|
265
|
-
background-image: url("
|
265
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/metric.svg");
|
266
266
|
}
|
267
267
|
.dm-button-icon-measure {
|
268
|
-
background-image: url("
|
268
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/measure.svg");
|
269
269
|
}
|
270
270
|
.dm-button-icon-attribute {
|
271
|
-
background-image: url("
|
271
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/attribute.svg");
|
272
272
|
}
|
273
273
|
.dm-button-icon-date {
|
274
|
-
background-image: url("
|
274
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/date-dropdown.svg");
|
275
275
|
}
|
276
276
|
|
277
277
|
.dm-button-title {
|
@@ -434,21 +434,21 @@
|
|
434
434
|
}
|
435
435
|
|
436
436
|
.gd-icon-drill-to-dashboard::before {
|
437
|
-
background-image: url("
|
437
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/drill-to-dashboard.svg");
|
438
438
|
}
|
439
439
|
|
440
440
|
.gd-icon-drill-to-insight::before {
|
441
|
-
background-image: url("
|
441
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/drill-to-insight.svg");
|
442
442
|
}
|
443
443
|
|
444
444
|
.gd-icon-drill-down::before {
|
445
|
-
background-image: url("
|
445
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/drill-down.svg");
|
446
446
|
background-repeat: no-repeat;
|
447
447
|
top: 1px;
|
448
448
|
}
|
449
449
|
|
450
450
|
.gd-icon-attribute-hierarchy::before {
|
451
|
-
background-image: url("
|
451
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/attribute-hierarchy.svg");
|
452
452
|
background-repeat: no-repeat;
|
453
453
|
top: 1px;
|
454
454
|
}
|
package/styles/scss/icons.scss
CHANGED
@@ -35,7 +35,7 @@
|
|
35
35
|
}
|
36
36
|
|
37
37
|
&::before {
|
38
|
-
background: url("
|
38
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/trend-positive.svg") no-repeat center;
|
39
39
|
}
|
40
40
|
|
41
41
|
&.is-selected {
|
@@ -53,7 +53,7 @@
|
|
53
53
|
}
|
54
54
|
|
55
55
|
&::before {
|
56
|
-
background: url("
|
56
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/trend-negative.svg") no-repeat center;
|
57
57
|
}
|
58
58
|
|
59
59
|
&.is-selected {
|
@@ -66,20 +66,20 @@
|
|
66
66
|
}
|
67
67
|
|
68
68
|
&.type-measure::before {
|
69
|
-
background: url("
|
69
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/measure.svg") no-repeat center;
|
70
70
|
}
|
71
71
|
|
72
72
|
&.type-metric::before {
|
73
73
|
margin-top: 0;
|
74
|
-
background: url("
|
74
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/metric.svg") no-repeat center;
|
75
75
|
}
|
76
76
|
|
77
77
|
&.type-attribute::before {
|
78
|
-
background: url("
|
78
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/attribute.svg") no-repeat center;
|
79
79
|
}
|
80
80
|
|
81
81
|
&.type-date::before {
|
82
|
-
background: url("
|
82
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/date-dropdown.svg") no-repeat center;
|
83
83
|
}
|
84
84
|
|
85
85
|
&.type-comparison::before {
|
@@ -102,7 +102,7 @@
|
|
102
102
|
.gd-icon-list {
|
103
103
|
&::before {
|
104
104
|
content: "";
|
105
|
-
background: url("
|
105
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/list.svg") no-repeat center;
|
106
106
|
width: 16px;
|
107
107
|
height: 16px;
|
108
108
|
display: inline-block;
|
@@ -111,7 +111,7 @@
|
|
111
111
|
.gd-icon-save-as-new {
|
112
112
|
&::before {
|
113
113
|
content: "";
|
114
|
-
background: url("
|
114
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/save-as-new.svg") no-repeat center;
|
115
115
|
width: 16px;
|
116
116
|
height: 16px;
|
117
117
|
display: inline-block;
|
@@ -120,7 +120,7 @@
|
|
120
120
|
.gd-icon-filter {
|
121
121
|
&::before {
|
122
122
|
content: "";
|
123
|
-
background: url("
|
123
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/filter.svg") no-repeat center;
|
124
124
|
width: 16px;
|
125
125
|
height: 16px;
|
126
126
|
display: inline-block;
|
@@ -129,7 +129,7 @@
|
|
129
129
|
.gd-icon-type-pdf {
|
130
130
|
&::before {
|
131
131
|
content: "";
|
132
|
-
background: url("
|
132
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/type-pdf.svg") no-repeat center;
|
133
133
|
width: 16px;
|
134
134
|
height: 16px;
|
135
135
|
display: inline-block;
|
@@ -138,7 +138,7 @@
|
|
138
138
|
.gd-icon-type-sheet {
|
139
139
|
&::before {
|
140
140
|
content: "";
|
141
|
-
background: url("
|
141
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/type-sheet.svg") no-repeat center;
|
142
142
|
width: 16px;
|
143
143
|
height: 16px;
|
144
144
|
display: inline-block;
|
@@ -147,7 +147,7 @@
|
|
147
147
|
.gd-icon-type-slides {
|
148
148
|
&::before {
|
149
149
|
content: "";
|
150
|
-
background: url("
|
150
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/type-slides.svg") no-repeat center;
|
151
151
|
width: 16px;
|
152
152
|
height: 16px;
|
153
153
|
display: inline-block;
|
@@ -156,7 +156,7 @@
|
|
156
156
|
.gd-icon-type-image {
|
157
157
|
&::before {
|
158
158
|
content: "";
|
159
|
-
background: url("
|
159
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/type-image.svg") no-repeat center;
|
160
160
|
width: 16px;
|
161
161
|
height: 16px;
|
162
162
|
display: inline-block;
|
@@ -165,7 +165,7 @@
|
|
165
165
|
.gd-icon-type-csv-raw {
|
166
166
|
&::before {
|
167
167
|
content: "";
|
168
|
-
background: url("
|
168
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/type-csv-raw.svg") no-repeat center;
|
169
169
|
width: 16px;
|
170
170
|
height: 16px;
|
171
171
|
display: inline-block;
|
@@ -174,7 +174,7 @@
|
|
174
174
|
.gd-icon-type-csv-formatted {
|
175
175
|
&::before {
|
176
176
|
content: "";
|
177
|
-
background: url("
|
177
|
+
background: url("~@gooddata/sdk-ui-dashboard/esm/assets/type-csv-formatted.svg") no-repeat center;
|
178
178
|
width: 16px;
|
179
179
|
height: 16px;
|
180
180
|
display: inline-block;
|
@@ -447,7 +447,7 @@ $min-content-height: 110px;
|
|
447
447
|
border: none;
|
448
448
|
cursor: pointer;
|
449
449
|
|
450
|
-
background-image: url("
|
450
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/ellipsis.svg");
|
451
451
|
background-color: transparent;
|
452
452
|
background-position: center center;
|
453
453
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// (C) 2019-
|
1
|
+
// (C) 2019-2020 GoodData Corporation
|
2
2
|
.gd-powered-by-logo-wrapper {
|
3
3
|
right: 0;
|
4
4
|
bottom: 0;
|
@@ -23,14 +23,14 @@
|
|
23
23
|
&-large {
|
24
24
|
width: 165px;
|
25
25
|
height: 30px;
|
26
|
-
background-image: url("
|
26
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/powered-by-gd-large.svg?v=2022");
|
27
27
|
background-size: 165px 30px;
|
28
28
|
}
|
29
29
|
|
30
30
|
&-small {
|
31
31
|
width: 146px;
|
32
32
|
height: 16px;
|
33
|
-
background-image: url("
|
33
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/powered-by-gd-small.svg?v=2022");
|
34
34
|
background-size: 146px 16px;
|
35
35
|
}
|
36
36
|
}
|
package/styles/scss/sidebar.scss
CHANGED
@@ -113,7 +113,7 @@
|
|
113
113
|
max-width: 260px;
|
114
114
|
|
115
115
|
&__image {
|
116
|
-
background-image: url("
|
116
|
+
background-image: url("~@gooddata/sdk-ui-dashboard/esm/assets/flexible-layouts-tooltip.gif");
|
117
117
|
background-repeat: no-repeat;
|
118
118
|
background-position: left top;
|
119
119
|
background-size: contain;
|
Binary file
|
@@ -1,15 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,82 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"rowContainerSanitization.js","sourceRoot":"","sources":["../../../../src/model/commandHandlers/layout/rowContainerSanitization.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAE,iBAAiB,EAAsD,MAAM,qBAAqB,CAAC;AAI5G,OAAO,EACH,sBAAsB,EACtB,2BAA2B,GAC9B,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEjG,SAAS,uBAAuB,CAC5B,SAAkC,EAClC,m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