@wavemaker/app-rn-runtime 11.14.1-3.6306 → 11.14.1-30.647738
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/components/advanced/carousel/carousel.component.js +1 -1
- package/components/advanced/carousel/carousel.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.component.js +240 -33
- package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.styles.js +0 -3
- package/components/basic/bottomsheet/bottomsheet.styles.js.map +1 -1
- package/components/basic/label/label.component.js +11 -22
- package/components/basic/label/label.component.js.map +1 -1
- package/components/basic/label/label.props.js +1 -0
- package/components/basic/label/label.props.js.map +1 -1
- package/components/basic/progress-circle/progress-circle.component.js +3 -3
- package/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- package/components/chart/area-chart/area-chart.component.js +27 -10
- package/components/chart/area-chart/area-chart.component.js.map +1 -1
- package/components/chart/bar-chart/bar-chart.component.js +39 -7
- package/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- package/components/chart/bar-chart/bar-chart.props.js +1 -0
- package/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- package/components/chart/basechart.component.js +8 -15
- package/components/chart/basechart.component.js.map +1 -1
- package/components/chart/basechart.props.js +1 -0
- package/components/chart/basechart.props.js.map +1 -1
- package/components/chart/bubble-chart/bubble-chart.component.js +23 -6
- package/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- package/components/chart/line-chart/line-chart.component.js +22 -5
- package/components/chart/line-chart/line-chart.component.js.map +1 -1
- package/components/chart/pie-chart/pie-chart.component.js +15 -4
- package/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- package/components/chart/stack-chart/stack-chart.component.js +1 -1
- package/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- package/components/container/accordion/accordionpane/accordionpane.component.js +6 -4
- package/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- package/components/container/container.component.js +207 -14
- package/components/container/container.component.js.map +1 -1
- package/components/container/container.props.js +6 -0
- package/components/container/container.props.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +32 -4
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +1 -0
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
- package/components/container/panel/panel.component.js +1 -1
- package/components/container/panel/panel.component.js.map +1 -1
- package/components/container/tabs/tabpane/tabpane.component.js +1 -1
- package/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- package/components/container/tabs/tabs.component.js +62 -29
- package/components/container/tabs/tabs.component.js.map +1 -1
- package/components/container/tabs/tabs.props.js +1 -0
- package/components/container/tabs/tabs.props.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.component.js +1 -1
- package/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- package/components/data/form/form-field/form-field.component.js +21 -1
- package/components/data/form/form-field/form-field.component.js.map +1 -1
- package/components/data/form/form-field/form-field.props.js +3 -0
- package/components/data/form/form-field/form-field.props.js.map +1 -1
- package/components/data/form/form.component.js +11 -3
- package/components/data/form/form.component.js.map +1 -1
- package/components/data/form/form.props.js +1 -0
- package/components/data/form/form.props.js.map +1 -1
- package/components/data/list/list.component.js +1 -1
- package/components/data/list/list.component.js.map +1 -1
- package/components/input/baseinput/baseinput.component.js +30 -3
- package/components/input/baseinput/baseinput.component.js.map +1 -1
- package/components/input/baseinput/baseinput.props.js +1 -0
- package/components/input/baseinput/baseinput.props.js.map +1 -1
- package/components/input/basenumber/basenumber.component.js +18 -3
- package/components/input/basenumber/basenumber.component.js.map +1 -1
- package/components/input/basenumber/basenumber.props.js +2 -0
- package/components/input/basenumber/basenumber.props.js.map +1 -1
- package/components/input/calendar/calendar.component.js +5 -1
- package/components/input/calendar/calendar.component.js.map +1 -1
- package/components/input/calendar/views/month-view.js +8 -1
- package/components/input/calendar/views/month-view.js.map +1 -1
- package/components/input/checkboxset/checkboxset.component.js +1 -1
- package/components/input/checkboxset/checkboxset.component.js.map +1 -1
- package/components/input/currency/currency.component.js +2 -0
- package/components/input/currency/currency.component.js.map +1 -1
- package/components/input/currency/currency.styles.js +10 -1
- package/components/input/currency/currency.styles.js.map +1 -1
- package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +6 -1
- package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +6 -1
- package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
- package/components/input/number/number.component.js +2 -0
- package/components/input/number/number.component.js.map +1 -1
- package/components/input/number/number.styles.js +4 -0
- package/components/input/number/number.styles.js.map +1 -1
- package/components/input/radioset/radioset.component.js +6 -3
- package/components/input/radioset/radioset.component.js.map +1 -1
- package/components/input/text/text.component.js +11 -0
- package/components/input/text/text.component.js.map +1 -1
- package/components/input/text/text.props.js +1 -1
- package/components/input/text/text.props.js.map +1 -1
- package/components/input/text/text.styles.js +17 -0
- package/components/input/text/text.styles.js.map +1 -1
- package/components/input/textarea/textarea.component.js +1 -0
- package/components/input/textarea/textarea.component.js.map +1 -1
- package/components/input/textarea/textarea.styles.js +4 -0
- package/components/input/textarea/textarea.styles.js.map +1 -1
- package/components/navigation/popover/popover.component.js +3 -3
- package/components/navigation/popover/popover.component.js.map +1 -1
- package/components/page/left-panel/left-panel.component.js +1 -1
- package/components/page/left-panel/left-panel.component.js.map +1 -1
- package/core/AppConfig.js.map +1 -1
- package/core/base.component.js +23 -0
- package/core/base.component.js.map +1 -1
- package/core/components/textinput.component.js +27 -5
- package/core/components/textinput.component.js.map +1 -1
- package/core/environment.js +25 -0
- package/core/environment.js.map +1 -0
- package/core/fixed-view.component.js +19 -2
- package/core/fixed-view.component.js.map +1 -1
- package/core/tappable.component.js +109 -15
- package/core/tappable.component.js.map +1 -1
- package/core/viewport.js +13 -8
- package/core/viewport.js.map +1 -1
- package/gestures/carousel-swipe.animation.js +0 -1
- package/gestures/carousel-swipe.animation.js.map +1 -1
- package/npm-shrinkwrap.json +4072 -2655
- package/package-lock.json +4072 -2655
- package/package.json +5 -2
- package/runtime/App.js +1 -0
- package/runtime/App.js.map +1 -1
- package/runtime/base-fragment.component.js +28 -5
- package/runtime/base-fragment.component.js.map +1 -1
- package/runtime/base-page.component.js +2 -1
- package/runtime/base-page.component.js.map +1 -1
- package/runtime/navigator/drawer.navigator.js +2 -0
- package/runtime/navigator/drawer.navigator.js.map +1 -1
- package/runtime/navigator/stack.navigator.js +16 -1
- package/runtime/navigator/stack.navigator.js.map +1 -1
- package/runtime/services/device/scan-service.js +12 -34
- package/runtime/services/device/scan-service.js.map +1 -1
- package/styles/theme.js +27 -2
- package/styles/theme.js.map +1 -1
- package/styles/theme.variables.js +2 -0
- package/styles/theme.variables.js.map +1 -1
|
@@ -16,6 +16,59 @@ import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
|
|
|
16
16
|
import { StickyContainer } from '@wavemaker/app-rn-runtime/core/components/sticky-container.component';
|
|
17
17
|
import { getParentStyles } from '@wavemaker/app-rn-runtime/core/components/sticky-container.styles';
|
|
18
18
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
19
|
+
// Alignment matrix for flex properties
|
|
20
|
+
const alignmentMatrixFixed = {
|
|
21
|
+
'top-left': {
|
|
22
|
+
justifyContent: 'flex-start',
|
|
23
|
+
alignItems: 'flex-start'
|
|
24
|
+
},
|
|
25
|
+
'top-center': {
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
alignItems: 'flex-start'
|
|
28
|
+
},
|
|
29
|
+
'top-right': {
|
|
30
|
+
justifyContent: 'flex-end',
|
|
31
|
+
alignItems: 'flex-start'
|
|
32
|
+
},
|
|
33
|
+
'middle-left': {
|
|
34
|
+
justifyContent: 'flex-start',
|
|
35
|
+
alignItems: 'center'
|
|
36
|
+
},
|
|
37
|
+
'middle-center': {
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
alignItems: 'center'
|
|
40
|
+
},
|
|
41
|
+
'middle-right': {
|
|
42
|
+
justifyContent: 'flex-end',
|
|
43
|
+
alignItems: 'center'
|
|
44
|
+
},
|
|
45
|
+
'bottom-left': {
|
|
46
|
+
justifyContent: 'flex-start',
|
|
47
|
+
alignItems: 'flex-end'
|
|
48
|
+
},
|
|
49
|
+
'bottom-center': {
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
alignItems: 'flex-end'
|
|
52
|
+
},
|
|
53
|
+
'bottom-right': {
|
|
54
|
+
justifyContent: 'flex-end',
|
|
55
|
+
alignItems: 'flex-end'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const alignmentMatrixAuto = {
|
|
59
|
+
start: {
|
|
60
|
+
justifyContent: 'space-between',
|
|
61
|
+
alignItems: 'flex-start'
|
|
62
|
+
},
|
|
63
|
+
center: {
|
|
64
|
+
justifyContent: 'space-between',
|
|
65
|
+
alignItems: 'center'
|
|
66
|
+
},
|
|
67
|
+
end: {
|
|
68
|
+
justifyContent: 'space-between',
|
|
69
|
+
alignItems: 'flex-end'
|
|
70
|
+
}
|
|
71
|
+
};
|
|
19
72
|
export class WmContainerState extends PartialHostState {
|
|
20
73
|
constructor(...args) {
|
|
21
74
|
super(...args);
|
|
@@ -27,6 +80,7 @@ export default class WmContainer extends PartialHost {
|
|
|
27
80
|
constructor(props) {
|
|
28
81
|
super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());
|
|
29
82
|
_defineProperty(this, "containerRef", void 0);
|
|
83
|
+
_defineProperty(this, "scrollViewRef", /*#__PURE__*/React.createRef());
|
|
30
84
|
_defineProperty(this, "stickyContainerOpacity", void 0);
|
|
31
85
|
_defineProperty(this, "appConfig", injector.get('APP_CONFIG'));
|
|
32
86
|
_defineProperty(this, "insets", {
|
|
@@ -35,6 +89,20 @@ export default class WmContainer extends PartialHost {
|
|
|
35
89
|
left: 0,
|
|
36
90
|
right: 0
|
|
37
91
|
});
|
|
92
|
+
_defineProperty(this, "handleOnScrollEndDrag", event => {
|
|
93
|
+
var _event$nativeEvent;
|
|
94
|
+
const currentY = event === null || event === void 0 || (_event$nativeEvent = event.nativeEvent) === null || _event$nativeEvent === void 0 || (_event$nativeEvent = _event$nativeEvent.contentOffset) === null || _event$nativeEvent === void 0 ? void 0 : _event$nativeEvent.y;
|
|
95
|
+
if (currentY > 0) {
|
|
96
|
+
this.invokeEventCallback('onScroll', [null, this.proxy]);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
_defineProperty(this, "handleOnMomentumScrollEnd", event => {
|
|
100
|
+
var _event$nativeEvent2;
|
|
101
|
+
const currentY = event === null || event === void 0 || (_event$nativeEvent2 = event.nativeEvent) === null || _event$nativeEvent2 === void 0 || (_event$nativeEvent2 = _event$nativeEvent2.contentOffset) === null || _event$nativeEvent2 === void 0 ? void 0 : _event$nativeEvent2.y;
|
|
102
|
+
if (currentY < 1) {
|
|
103
|
+
this.invokeEventCallback('onScrolltotop', [null, this.proxy]);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
38
106
|
this.containerRef = /*#__PURE__*/React.createRef();
|
|
39
107
|
this.stickyContainerOpacity = new Animated.Value(1);
|
|
40
108
|
this.subscribe('updateStickyHeaders', _event => {
|
|
@@ -48,14 +116,129 @@ export default class WmContainer extends PartialHost {
|
|
|
48
116
|
getBackground() {
|
|
49
117
|
return this._showSkeleton ? null : this._background;
|
|
50
118
|
}
|
|
119
|
+
// Compute root style respecting 'fill'|'hug'|<size> for width/height.
|
|
120
|
+
getRootContainerStyle() {
|
|
121
|
+
var _this$props, _this$styles$skeleton;
|
|
122
|
+
// const { width, height } = this.props;
|
|
123
|
+
const baseStyle = this.styles.root || {};
|
|
124
|
+
const {
|
|
125
|
+
width,
|
|
126
|
+
height
|
|
127
|
+
} = baseStyle;
|
|
128
|
+
const dimensionStyle = {};
|
|
129
|
+
const isRow = ((_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.direction) === "row";
|
|
130
|
+
if (height === 'fill') {
|
|
131
|
+
if (isRow) {
|
|
132
|
+
dimensionStyle.alignSelf = 'stretch';
|
|
133
|
+
} else {
|
|
134
|
+
dimensionStyle.flexGrow = 1;
|
|
135
|
+
}
|
|
136
|
+
dimensionStyle.height = undefined;
|
|
137
|
+
} else if (height === 'hug') {
|
|
138
|
+
if (isRow) {
|
|
139
|
+
dimensionStyle.alignSelf = 'flex-start';
|
|
140
|
+
} else {
|
|
141
|
+
dimensionStyle.flexGrow = 0;
|
|
142
|
+
}
|
|
143
|
+
dimensionStyle.height = undefined;
|
|
144
|
+
} else if (height) {
|
|
145
|
+
const num = typeof height === 'string' && height.endsWith('%') ? height : parseFloat(height);
|
|
146
|
+
dimensionStyle.height = isNaN(num) ? height : num;
|
|
147
|
+
}
|
|
148
|
+
if (width === 'fill') {
|
|
149
|
+
if (isRow) {
|
|
150
|
+
dimensionStyle.width = '100%';
|
|
151
|
+
} else {
|
|
152
|
+
dimensionStyle.alignSelf = 'stretch';
|
|
153
|
+
dimensionStyle.width = undefined;
|
|
154
|
+
}
|
|
155
|
+
} else if (width === 'hug') {
|
|
156
|
+
if (isRow) {
|
|
157
|
+
dimensionStyle.flexGrow = 0;
|
|
158
|
+
} else {
|
|
159
|
+
dimensionStyle.alignSelf = 'flex-start';
|
|
160
|
+
}
|
|
161
|
+
dimensionStyle.width = undefined;
|
|
162
|
+
} else if (width) {
|
|
163
|
+
const num = typeof width === 'string' && width.endsWith('%') ? width : parseFloat(width);
|
|
164
|
+
dimensionStyle.width = isNaN(num) ? width : num;
|
|
165
|
+
}
|
|
166
|
+
const styleWithResize = {
|
|
167
|
+
...baseStyle,
|
|
168
|
+
...dimensionStyle
|
|
169
|
+
};
|
|
170
|
+
return this._showSkeleton ? {
|
|
171
|
+
...styleWithResize,
|
|
172
|
+
...((_this$styles$skeleton = this.styles.skeleton) === null || _this$styles$skeleton === void 0 ? void 0 : _this$styles$skeleton.root)
|
|
173
|
+
} : styleWithResize;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Compute content layout (flexDirection, wrap, gap, justifyContent, alignItems).
|
|
177
|
+
getContentContainerStyle() {
|
|
178
|
+
const {
|
|
179
|
+
direction,
|
|
180
|
+
wrap,
|
|
181
|
+
gap,
|
|
182
|
+
alignment,
|
|
183
|
+
columngap
|
|
184
|
+
} = this.props;
|
|
185
|
+
|
|
186
|
+
/* Check if any of the new layout props are provided. If not, return an empty
|
|
187
|
+
style object to maintain backward compatibility. */
|
|
188
|
+
const useNewLayoutSystem = direction !== undefined || wrap !== undefined || gap !== undefined || alignment !== undefined || columngap !== undefined;
|
|
189
|
+
if (!useNewLayoutSystem) {
|
|
190
|
+
return {};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Apply defaults only if the new layout system is active
|
|
194
|
+
const finalDirection = direction !== null && direction !== void 0 ? direction : 'row';
|
|
195
|
+
const finalWrap = wrap !== null && wrap !== void 0 ? wrap : false;
|
|
196
|
+
const finalGap = gap !== null && gap !== void 0 ? gap : 4;
|
|
197
|
+
const finalAlignment = alignment !== null && alignment !== void 0 ? alignment : 'top-left';
|
|
198
|
+
const isRow = finalDirection === 'row';
|
|
199
|
+
const isAutoGap = finalGap === 'auto';
|
|
200
|
+
const isWrap = finalWrap === 'true' || finalWrap === true;
|
|
201
|
+
const layoutStyle = {
|
|
202
|
+
flexDirection: finalDirection,
|
|
203
|
+
flexWrap: isWrap && isRow ? 'wrap' : 'nowrap'
|
|
204
|
+
};
|
|
205
|
+
if (isAutoGap) {
|
|
206
|
+
const alignConfig = alignmentMatrixAuto[finalAlignment] || alignmentMatrixAuto['start'];
|
|
207
|
+
layoutStyle.justifyContent = alignConfig.justifyContent;
|
|
208
|
+
layoutStyle.alignItems = alignConfig.alignItems;
|
|
209
|
+
} else {
|
|
210
|
+
if (isRow) {
|
|
211
|
+
// For a row, the main-axis gap (between items) is columnGap.
|
|
212
|
+
layoutStyle.columnGap = Number(finalGap);
|
|
213
|
+
} else {
|
|
214
|
+
// For a column, the main-axis gap (between items) is rowGap.
|
|
215
|
+
layoutStyle.rowGap = Number(finalGap);
|
|
216
|
+
}
|
|
217
|
+
const alignConfig = alignmentMatrixFixed[finalAlignment] || alignmentMatrixFixed['top-left'];
|
|
218
|
+
layoutStyle.justifyContent = isRow ? alignConfig.justifyContent : alignConfig.alignItems;
|
|
219
|
+
layoutStyle.alignItems = isRow ? alignConfig.alignItems : alignConfig.justifyContent;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Add columnGap logic for wrapped rows
|
|
223
|
+
if (isWrap && isRow) {
|
|
224
|
+
if (columngap === 'auto') {
|
|
225
|
+
layoutStyle.alignContent = 'space-between';
|
|
226
|
+
} else if (columngap !== undefined) {
|
|
227
|
+
layoutStyle.rowGap = Number(columngap);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
...layoutStyle
|
|
232
|
+
};
|
|
233
|
+
}
|
|
51
234
|
renderSkeleton(props) {
|
|
52
235
|
if (!props.showskeletonchildren) {
|
|
53
|
-
var _this$
|
|
236
|
+
var _this$props2;
|
|
54
237
|
const dimensions = {
|
|
55
238
|
width: this.styles.root.width ? '100%' : undefined,
|
|
56
239
|
height: this.styles.root.height ? '100%' : undefined
|
|
57
240
|
};
|
|
58
|
-
const skeletonStyles = ((_this$
|
|
241
|
+
const skeletonStyles = ((_this$props2 = this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.styles) === null || _this$props2 === void 0 ? void 0 : _this$props2.skeleton) || {
|
|
59
242
|
root: {},
|
|
60
243
|
text: {}
|
|
61
244
|
};
|
|
@@ -97,8 +280,13 @@ export default class WmContainer extends PartialHost {
|
|
|
97
280
|
useNativeDriver: true
|
|
98
281
|
}).start();
|
|
99
282
|
}
|
|
283
|
+
|
|
284
|
+
//emiting container wdiget scrollview ref value to bottom sheet widget(bottom sheet sticky header/footer feature)
|
|
285
|
+
if (this.scrollViewRef.current) {
|
|
286
|
+
this.notify('containerScrollViewReady', [this.scrollViewRef], true);
|
|
287
|
+
}
|
|
100
288
|
}
|
|
101
|
-
renderStickyContent(props, dimensions, styles) {
|
|
289
|
+
renderStickyContent(props, dimensions, styles, autoLayoutStyle) {
|
|
102
290
|
const {
|
|
103
291
|
stickyContainerVisibility
|
|
104
292
|
} = this.state;
|
|
@@ -116,18 +304,20 @@ export default class WmContainer extends PartialHost {
|
|
|
116
304
|
}, /*#__PURE__*/React.createElement(View, {
|
|
117
305
|
style: [dimensions, {
|
|
118
306
|
backgroundColor: styles.backgroundColor
|
|
119
|
-
}, this.styles.content]
|
|
307
|
+
}, this.styles.content, autoLayoutStyle]
|
|
120
308
|
}, this.renderContent(props))) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Animated.View, {
|
|
121
309
|
style: [dimensions, {
|
|
122
310
|
opacity: this.stickyContainerOpacity
|
|
123
|
-
}, this.styles.content],
|
|
311
|
+
}, this.styles.content, autoLayoutStyle],
|
|
124
312
|
ref: this.containerRef
|
|
125
313
|
}, this.renderContent(props)));
|
|
126
314
|
}
|
|
127
315
|
renderWidget(props) {
|
|
316
|
+
const rootStyle = this.getRootContainerStyle();
|
|
317
|
+
const autoLayoutStyle = this.getContentContainerStyle();
|
|
128
318
|
const dimensions = {
|
|
129
|
-
width:
|
|
130
|
-
height:
|
|
319
|
+
width: rootStyle.width ? '100%' : undefined,
|
|
320
|
+
height: rootStyle.height ? '100%' : undefined
|
|
131
321
|
};
|
|
132
322
|
const styles = this._showSkeleton ? {
|
|
133
323
|
...this.styles.root,
|
|
@@ -146,20 +336,23 @@ export default class WmContainer extends PartialHost {
|
|
|
146
336
|
return /*#__PURE__*/React.createElement(Animatedview, {
|
|
147
337
|
entryanimation: props.animation,
|
|
148
338
|
delay: props.animationdelay,
|
|
149
|
-
style:
|
|
339
|
+
style: rootStyle,
|
|
150
340
|
onLayout: (event, ref) => {
|
|
151
341
|
this.handleLayout(event, ref);
|
|
152
342
|
}
|
|
153
|
-
}, this.getBackground(), /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
|
343
|
+
}, this.showSpinner(), this.getBackground(), /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
|
154
344
|
target: this,
|
|
155
345
|
styles: dimensions,
|
|
156
346
|
disableTouchEffect: this.state.props.disabletoucheffect
|
|
157
|
-
}), props.sticky ? this.renderStickyContent(props, dimensions, styles) : !props.scrollable ? /*#__PURE__*/React.createElement(View, {
|
|
158
|
-
style: [dimensions, this.styles.content]
|
|
347
|
+
}), props.sticky ? this.renderStickyContent(props, dimensions, styles, autoLayoutStyle) : !props.scrollable ? /*#__PURE__*/React.createElement(View, {
|
|
348
|
+
style: [dimensions, this.styles.content, autoLayoutStyle]
|
|
159
349
|
}, this.renderContent(props)) : /*#__PURE__*/React.createElement(ScrollView, {
|
|
160
|
-
style: [dimensions, this.styles.content],
|
|
161
|
-
onScroll: event => this.notify('scroll', [event]),
|
|
162
|
-
scrollEventThrottle: 48
|
|
350
|
+
style: [dimensions, this.styles.content, autoLayoutStyle],
|
|
351
|
+
onScroll: event => this.notify('scroll', [event], props.emittoparent),
|
|
352
|
+
scrollEventThrottle: 48,
|
|
353
|
+
ref: this.scrollViewRef,
|
|
354
|
+
onScrollEndDrag: this.handleOnScrollEndDrag,
|
|
355
|
+
onMomentumScrollEnd: this.handleOnMomentumScrollEnd
|
|
163
356
|
}, this.renderContent(props))));
|
|
164
357
|
});
|
|
165
358
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Platform","Animated","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","createSkeleton","ScrollView","StickyWrapperContext","SafeAreaInsetsContext","StickyContainer","getParentStyles","injector","WmContainerState","constructor","args","_defineProperty","WmContainer","props","get","top","bottom","left","right","containerRef","createRef","stickyContainerOpacity","Value","subscribe","_event","sticky","setTimeout","getStickyHeaderTranslateY","getBackground","_showSkeleton","_background","renderSkeleton","showskeletonchildren","_this$props","dimensions","width","styles","root","undefined","height","skeletonStyles","skeleton","text","theme","createElement","style","opacity","_extends","getTestPropsForAction","target","disableTouchEffect","state","disabletoucheffect","content","renderContent","_this$appConfig","_this$containerRef","isEdgeToEdgeApp","appConfig","edgeToEdgeConfig","current","measure","_x","_y","_width","_height","px","py","_this$insets","topInsetsInYposition","OS","insets","context","stickyContainerTranslateY","value","updateState","stickyContainerVisibility","componentDidUpdate","_prevProps","prevState","timing","toValue","delay","useNativeDriver","start","renderStickyContent","positioningStyles","Fragment","component","backgroundColor","positionStyles","show","ref","renderWidget","isSticky","Consumer","entryanimation","animation","animationdelay","onLayout","event","handleLayout","scrollable","onScroll","notify","scrollEventThrottle"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, ViewStyle, Platform, Animated } from 'react-native';\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\nimport { createSkeleton } from '../basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { StickyWrapperContextType, StickyWrapperContext } from '@wavemaker/app-rn-runtime/core/sticky-wrapper';\nimport { EdgeInsets, SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport { StickyContainer } from '@wavemaker/app-rn-runtime/core/components/sticky-container.component';\nimport { getParentStyles } from '@wavemaker/app-rn-runtime/core/components/sticky-container.styles';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n stickyContainerVisibility = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n static contextType = StickyWrapperContext;\n private containerRef: React.RefObject<View | null>;\n private stickyContainerOpacity: Animated.Value;\n private appConfig = injector.get<AppConfig>('APP_CONFIG');\n insets: EdgeInsets | null = {\n top: 0, bottom: 0, left: 0, right: 0\n };\n\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\n this.containerRef = React.createRef();\n this.stickyContainerOpacity = new Animated.Value(1);\n\n this.subscribe('updateStickyHeaders', (_event: any) => {\n if(this.props.sticky){\n setTimeout(()=>{\n this.getStickyHeaderTranslateY();\n }, 500);\n }\n })\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n public renderSkeleton(props: WmContainerProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n }; \n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions} disableTouchEffect={this.state.props.disabletoucheffect}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n\n </View>))\n }\n return null;\n }\n\n public getStickyHeaderTranslateY(){\n const isEdgeToEdgeApp = !!this.appConfig?.edgeToEdgeConfig?.isEdgeToEdgeApp;\n this.containerRef?.current?.measure((_x = 0, _y = 0, _width = 0, _height = 0, px = 0, py = 0)=>{\n const topInsetsInYposition = (Platform.OS == 'ios' && !isEdgeToEdgeApp) ? (this.insets?.top || 0): 0\n if((this.context) && (this.context as StickyWrapperContextType).stickyContainerTranslateY) {\n (this.context as StickyWrapperContextType).stickyContainerTranslateY.value = py - topInsetsInYposition ;\n this.updateState({ stickyContainerVisibility: true} as WmContainerState); \n }\n })\n }\n\n componentDidUpdate(_prevProps: any, prevState: any) {\n if (prevState.stickyContainerVisibility !== this.state.stickyContainerVisibility) {\n Animated.timing(this.stickyContainerOpacity, {\n toValue: this.state.stickyContainerVisibility ? 0 : 1,\n delay: 500,\n useNativeDriver: true\n }).start();\n }\n }\n\n private renderStickyContent(props: WmContainerProps, dimensions: ViewStyle, styles: ViewStyle) {\n const { stickyContainerVisibility } = this.state;\n const { positioningStyles } = getParentStyles(this);\n\n return (\n <>\n {stickyContainerVisibility ? (\n <StickyContainer\n component={this}\n theme={this.theme}\n style={[\n this.styles.sticky,\n { backgroundColor: styles.backgroundColor }\n ]}\n positionStyles={positioningStyles}\n show={props.show as boolean}\n >\n <View style={[dimensions as ViewStyle, { backgroundColor: styles.backgroundColor }, this.styles.content]}>\n {this.renderContent(props)}\n </View>\n </StickyContainer>\n ) : <></>}\n <Animated.View \n style={[\n dimensions as ViewStyle, \n { opacity: this.stickyContainerOpacity }, \n this.styles.content\n ]} \n ref={this.containerRef}\n >\n {this.renderContent(props)}\n </Animated.View>\n </>\n );\n }\n\n renderWidget(props: WmContainerProps) {\n const dimensions: ViewStyle = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root;\n\n if (props.sticky) {\n this.isSticky = true;\n }\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n this.insets = insets;\n return (\n <Animatedview \n entryanimation={props.animation} \n delay={props.animationdelay} \n style={styles}\n onLayout={(event: LayoutChangeEvent, ref: React.RefObject<View>) => {\n this.handleLayout(event, ref);\n }}\n >\n {this.getBackground()}\n <Tappable \n {...this.getTestPropsForAction()} \n target={this} \n styles={dimensions} \n disableTouchEffect={this.state.props.disabletoucheffect}\n >\n {props.sticky ? (\n this.renderStickyContent(props, dimensions, styles)\n ) : !props.scrollable ? (\n <View style={[dimensions as ViewStyle, this.styles.content]}>\n {this.renderContent(props)}\n </View>\n ) : (\n <ScrollView \n style={[dimensions as ViewStyle, this.styles.content]}\n onScroll={(event) => this.notify('scroll', [event])}\n scrollEventThrottle={48}\n >\n {this.renderContent(props)}\n </ScrollView>\n )}\n </Tappable>\n </Animatedview>\n );\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAaC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AACrF,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,0BAA0B;AACxE,SAASC,cAAc,QAAQ,sCAAsC;AAErE,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAAmCC,oBAAoB,QAAQ,+CAA+C;AAC9G,SAAqBC,qBAAqB,QAAQ,gCAAgC;AAClF,SAASC,eAAe,QAAQ,sEAAsE;AACtG,SAASC,eAAe,QAAQ,mEAAmE;AACnG,OAAOC,QAAQ,MAAM,yCAAyC;AAG9D,OAAO,MAAMC,gBAAgB,SAASR,gBAAgB,CAAmB;EAAAS,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BACrD,KAAK;IAAAA,eAAA,oCACK,KAAK;EAAA;AACnC;AAEA,eAAe,MAAMC,WAAW,SAASb,WAAW,CAAwD;EAS1GU,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEjB,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,EAAE,IAAIa,gBAAgB,CAAC,CAAC,CAAC;IAACG,eAAA;IAAAA,eAAA;IAAAA,eAAA,oBAN1D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I,MAAM,CAAC,QAAQ,EAAE,CAACJ,KAAK,CAAC,CAAE;QACpDK,mBAAmB,EAAE;MAAG,GAEvB,IAAI,CAACnD,aAAa,CAACzC,KAAK,CACf,CAEN,CACE,CAAC;IAEnB,CAC8B,CAAC;EAErC;AACF;AAACF,eAAA,CA/JoBC,WAAW,iBACTT,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","View","Platform","Animated","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","createSkeleton","ScrollView","StickyWrapperContext","SafeAreaInsetsContext","StickyContainer","getParentStyles","injector","alignmentMatrixFixed","justifyContent","alignItems","alignmentMatrixAuto","start","center","end","WmContainerState","constructor","args","_defineProperty","WmContainer","props","createRef","get","top","bottom","left","right","event","_event$nativeEvent","currentY","nativeEvent","contentOffset","y","invokeEventCallback","proxy","_event$nativeEvent2","containerRef","stickyContainerOpacity","Value","subscribe","_event","sticky","setTimeout","getStickyHeaderTranslateY","getBackground","_showSkeleton","_background","getRootContainerStyle","_this$props","_this$styles$skeleton","baseStyle","styles","root","width","height","dimensionStyle","isRow","direction","alignSelf","flexGrow","undefined","num","endsWith","parseFloat","isNaN","styleWithResize","skeleton","getContentContainerStyle","wrap","gap","alignment","columngap","useNewLayoutSystem","finalDirection","finalWrap","finalGap","finalAlignment","isAutoGap","isWrap","layoutStyle","flexDirection","flexWrap","alignConfig","columnGap","Number","rowGap","alignContent","renderSkeleton","showskeletonchildren","_this$props2","dimensions","skeletonStyles","text","theme","createElement","style","opacity","_extends","getTestPropsForAction","target","disableTouchEffect","state","disabletoucheffect","content","renderContent","_this$appConfig","_this$containerRef","isEdgeToEdgeApp","appConfig","edgeToEdgeConfig","current","measure","_x","_y","_width","_height","px","py","_this$insets","topInsetsInYposition","OS","insets","context","stickyContainerTranslateY","value","updateState","stickyContainerVisibility","componentDidUpdate","_prevProps","prevState","timing","toValue","delay","useNativeDriver","scrollViewRef","notify","renderStickyContent","autoLayoutStyle","positioningStyles","Fragment","component","backgroundColor","positionStyles","show","ref","renderWidget","rootStyle","isSticky","Consumer","entryanimation","animation","animationdelay","onLayout","handleLayout","showSpinner","scrollable","onScroll","emittoparent","scrollEventThrottle","onScrollEndDrag","handleOnScrollEndDrag","onMomentumScrollEnd","handleOnMomentumScrollEnd"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, LayoutChangeEvent, StyleProp, View, ViewStyle, Platform, Animated } from 'react-native';\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\nimport { createSkeleton } from '../basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { StickyWrapperContextType, StickyWrapperContext } from '@wavemaker/app-rn-runtime/core/sticky-wrapper';\nimport { EdgeInsets, SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport { StickyContainer } from '@wavemaker/app-rn-runtime/core/components/sticky-container.component';\nimport { getParentStyles } from '@wavemaker/app-rn-runtime/core/components/sticky-container.styles';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\n\n// Alignment matrix for flex properties\nconst alignmentMatrixFixed: Record<\n string,\n { justifyContent: string; alignItems: string }\n> = {\n 'top-left': { justifyContent: 'flex-start', alignItems: 'flex-start' },\n 'top-center': { justifyContent: 'center', alignItems: 'flex-start' },\n 'top-right': { justifyContent: 'flex-end', alignItems: 'flex-start' },\n 'middle-left': { justifyContent: 'flex-start', alignItems: 'center' },\n 'middle-center': { justifyContent: 'center', alignItems: 'center' },\n 'middle-right': { justifyContent: 'flex-end', alignItems: 'center' },\n 'bottom-left': { justifyContent: 'flex-start', alignItems: 'flex-end' },\n 'bottom-center': { justifyContent: 'center', alignItems: 'flex-end' },\n 'bottom-right': { justifyContent: 'flex-end', alignItems: 'flex-end' },\n};\n\nconst alignmentMatrixAuto: Record<\n string,\n { justifyContent: string; alignItems: string }\n> = {\n start: { justifyContent: 'space-between', alignItems: 'flex-start' },\n center: { justifyContent: 'space-between', alignItems: 'center' },\n end: { justifyContent: 'space-between', alignItems: 'flex-end' },\n};\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n stickyContainerVisibility = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n static contextType = StickyWrapperContext;\n private containerRef: React.RefObject<View | null>;\n private scrollViewRef = React.createRef<ScrollView>();\n private stickyContainerOpacity: Animated.Value;\n private appConfig = injector.get<AppConfig>('APP_CONFIG');\n insets: EdgeInsets | null = {\n top: 0, bottom: 0, left: 0, right: 0\n };\n\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\n this.containerRef = React.createRef();\n this.stickyContainerOpacity = new Animated.Value(1);\n\n this.subscribe('updateStickyHeaders', (_event: any) => {\n if(this.props.sticky){\n setTimeout(()=>{\n this.getStickyHeaderTranslateY();\n }, 500);\n }\n })\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n }\n\n private handleOnScrollEndDrag = (event: any) => {\n const currentY = event?.nativeEvent?.contentOffset?.y;\n if (currentY > 0) {\n this.invokeEventCallback('onScroll', [null, this.proxy]);\n }\n }\n\n private handleOnMomentumScrollEnd = (event: any) => {\n const currentY = event?.nativeEvent?.contentOffset?.y;\n if (currentY < 1) {\n this.invokeEventCallback('onScrolltotop', [null, this.proxy]);\n }\n }\n\n // Compute root style respecting 'fill'|'hug'|<size> for width/height.\n private getRootContainerStyle(): ViewStyle {\n // const { width, height } = this.props;\n const baseStyle = this.styles.root || {};\n const { width, height }: any = baseStyle;\n const dimensionStyle: ViewStyle = {};\n const isRow = this.props?.direction === \"row\";\n\n if (height === 'fill') {\n if (isRow) {\n dimensionStyle.alignSelf = 'stretch';\n } else {\n dimensionStyle.flexGrow = 1;\n }\n dimensionStyle.height = undefined;\n }\n else if (height === 'hug') {\n if (isRow) {\n dimensionStyle.alignSelf = 'flex-start';\n } else {\n dimensionStyle.flexGrow = 0;\n }\n dimensionStyle.height = undefined;\n }\n else if (height) {\n const num = (typeof height === 'string' && height.endsWith('%')) ? height : parseFloat(height);\n dimensionStyle.height = (isNaN(num as number) ? height : num) as DimensionValue;\n }\n\n if (width === 'fill') {\n if (isRow) {\n dimensionStyle.width = '100%';\n } else {\n dimensionStyle.alignSelf = 'stretch';\n dimensionStyle.width = undefined;\n }\n }\n else if (width === 'hug') {\n if (isRow) {\n dimensionStyle.flexGrow = 0;\n } else {\n dimensionStyle.alignSelf = 'flex-start';\n }\n dimensionStyle.width = undefined;\n }\n else if (width) {\n const num = (typeof width === 'string' && width.endsWith('%')) ? width : parseFloat(width);\n dimensionStyle.width = (isNaN(num as number) ? width : num) as DimensionValue;\n }\n\n const styleWithResize = {\n ...baseStyle,\n ...dimensionStyle,\n };\n\n return this._showSkeleton\n ? { ...styleWithResize, ...this.styles.skeleton?.root }\n : styleWithResize;\n }\n\n // Compute content layout (flexDirection, wrap, gap, justifyContent, alignItems).\n private getContentContainerStyle(): ViewStyle {\n const { direction, wrap, gap, alignment, columngap } = this.props;\n\n /* Check if any of the new layout props are provided. If not, return an empty\n style object to maintain backward compatibility. */\n const useNewLayoutSystem =\n direction !== undefined ||\n wrap !== undefined ||\n gap !== undefined ||\n alignment !== undefined ||\n columngap !== undefined;\n\n if (!useNewLayoutSystem) {\n return {};\n }\n\n // Apply defaults only if the new layout system is active\n const finalDirection = direction ?? 'row';\n const finalWrap = wrap ?? false;\n const finalGap = gap ?? 4;\n const finalAlignment = alignment ?? 'top-left';\n\n const isRow = finalDirection === 'row';\n const isAutoGap = finalGap === 'auto';\n const isWrap = finalWrap === 'true' || finalWrap === true;\n\n const layoutStyle: ViewStyle = {\n flexDirection: finalDirection,\n flexWrap: isWrap && isRow ? 'wrap' : 'nowrap',\n };\n\n if (isAutoGap) {\n const alignConfig =\n alignmentMatrixAuto[finalAlignment] || alignmentMatrixAuto['start'];\n layoutStyle.justifyContent =\n alignConfig.justifyContent as ViewStyle['justifyContent'];\n layoutStyle.alignItems =\n alignConfig.alignItems as ViewStyle['alignItems'];\n } else {\n if (isRow) {\n // For a row, the main-axis gap (between items) is columnGap.\n layoutStyle.columnGap = Number(finalGap);\n } else {\n // For a column, the main-axis gap (between items) is rowGap.\n layoutStyle.rowGap = Number(finalGap);\n }\n const alignConfig =\n alignmentMatrixFixed[finalAlignment] || alignmentMatrixFixed['top-left'];\n\n layoutStyle.justifyContent = (\n isRow ? alignConfig.justifyContent : alignConfig.alignItems\n ) as ViewStyle['justifyContent'];\n layoutStyle.alignItems = (\n isRow ? alignConfig.alignItems : alignConfig.justifyContent\n ) as ViewStyle['alignItems'];\n }\n\n // Add columnGap logic for wrapped rows\n if (isWrap && isRow) {\n if (columngap === 'auto') {\n layoutStyle.alignContent = 'space-between';\n } else if (columngap !== undefined) {\n layoutStyle.rowGap = Number(columngap);\n }\n }\n\n return {\n ...layoutStyle,\n };\n }\n\n public renderSkeleton(props: WmContainerProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions} disableTouchEffect={this.state.props.disabletoucheffect}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n\n </View>))\n }\n return null;\n }\n\n public getStickyHeaderTranslateY(){\n const isEdgeToEdgeApp = !!this.appConfig?.edgeToEdgeConfig?.isEdgeToEdgeApp;\n this.containerRef?.current?.measure((_x = 0, _y = 0, _width = 0, _height = 0, px = 0, py = 0)=>{\n const topInsetsInYposition = (Platform.OS == 'ios' && !isEdgeToEdgeApp) ? (this.insets?.top || 0): 0\n if((this.context) && (this.context as StickyWrapperContextType).stickyContainerTranslateY) {\n (this.context as StickyWrapperContextType).stickyContainerTranslateY.value = py - topInsetsInYposition ;\n this.updateState({ stickyContainerVisibility: true} as WmContainerState); \n }\n })\n }\n\n componentDidUpdate(_prevProps: any, prevState: any) {\n if (prevState.stickyContainerVisibility !== this.state.stickyContainerVisibility) {\n Animated.timing(this.stickyContainerOpacity, {\n toValue: this.state.stickyContainerVisibility ? 0 : 1,\n delay: 500,\n useNativeDriver: true\n }).start();\n }\n\n //emiting container wdiget scrollview ref value to bottom sheet widget(bottom sheet sticky header/footer feature)\n if (this.scrollViewRef.current) {\n this.notify('containerScrollViewReady', [this.scrollViewRef], true);\n }\n }\n\n private renderStickyContent(props: WmContainerProps, dimensions: ViewStyle, styles: ViewStyle, autoLayoutStyle: ViewStyle) {\n const { stickyContainerVisibility } = this.state;\n const { positioningStyles } = getParentStyles(this);\n\n return (\n <>\n {stickyContainerVisibility ? (\n <StickyContainer\n component={this}\n theme={this.theme}\n style={[\n this.styles.sticky,\n { backgroundColor: styles.backgroundColor }\n ]}\n positionStyles={positioningStyles}\n show={props.show as boolean}\n >\n <View style={[dimensions as ViewStyle, { backgroundColor: styles.backgroundColor }, this.styles.content, autoLayoutStyle]}>\n {this.renderContent(props)}\n </View>\n </StickyContainer>\n ) : <></>}\n <Animated.View\n style={[\n dimensions as ViewStyle,\n { opacity: this.stickyContainerOpacity },\n this.styles.content,\n autoLayoutStyle\n ]}\n ref={this.containerRef}\n >\n {this.renderContent(props)}\n </Animated.View>\n </>\n );\n }\n\n renderWidget(props: WmContainerProps) {\n const rootStyle = this.getRootContainerStyle();\n const autoLayoutStyle = this.getContentContainerStyle();\n\n const dimensions: ViewStyle = {\n width: rootStyle.width ? '100%' : undefined,\n height: rootStyle.height ? '100%' : undefined\n };\n\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root;\n\n if (props.sticky) {\n this.isSticky = true;\n }\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n this.insets = insets;\n return (\n <Animatedview\n entryanimation={props.animation}\n delay={props.animationdelay}\n style={rootStyle}\n onLayout={(event: LayoutChangeEvent, ref: React.RefObject<View>) => {\n this.handleLayout(event, ref);\n }}\n >\n {this.showSpinner()}\n {this.getBackground()}\n <Tappable\n {...this.getTestPropsForAction()}\n target={this}\n styles={dimensions}\n disableTouchEffect={this.state.props.disabletoucheffect}\n >\n {props.sticky ? (\n this.renderStickyContent(props, dimensions, styles, autoLayoutStyle)\n ) : !props.scrollable ? (\n <View style={[\n dimensions as ViewStyle,\n this.styles.content,\n autoLayoutStyle]}>\n {this.renderContent(props)}\n </View>\n ) : (\n <ScrollView\n style={[dimensions as ViewStyle, this.styles.content, autoLayoutStyle]}\n onScroll={(event) => this.notify('scroll', [event], props.emittoparent)}\n scrollEventThrottle={48}\n ref={this.scrollViewRef}\n onScrollEndDrag={this.handleOnScrollEndDrag}\n onMomentumScrollEnd={this.handleOnMomentumScrollEnd}\n >\n {this.renderContent(props)}\n </ScrollView>\n )}\n </Tappable>\n </Animatedview>\n );\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAuDC,IAAI,EAAaC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAChH,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,WAAW,EAAEC,gBAAgB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,KACH,IAAI,CAACC,qBAAqB,CAAC,CAAC;QAChCC,MAAM,EAAE,IAAK;QACbhD,MAAM,EAAEuC,UAAW;QACnBU,kBAAkB,EAAE,IAAI,CAACC,KAAK,CAACjF,KAAK,CAACkF;MAAmB,IAEvDlF,KAAK,CAACqB,MAAM,GACX,IAAI,CAAC+F,mBAAmB,CAACpH,KAAK,EAAEsE,UAAU,EAAEvC,MAAM,EAAEsF,eAAe,CAAC,GAClE,CAACrH,KAAK,CAACuI,UAAU,gBACnBpK,KAAA,CAAAuG,aAAA,CAACtG,IAAI;QAACuG,KAAK,EAAE,CACXL,UAAU,EACV,IAAI,CAACvC,MAAM,CAACoD,OAAO,EACnBkC,eAAe;MAAE,GAChB,IAAI,CAACjC,aAAa,CAACpF,KAAK,CACrB,CAAC,gBAEP7B,KAAA,CAAAuG,aAAA,CAAC5F,UAAU;QACT6F,KAAK,EAAE,CAACL,UAAU,EAAe,IAAI,CAACvC,MAAM,CAACoD,OAAO,EAAEkC,eAAe,CAAE;QACvEmB,QAAQ,EAAGjI,KAAK,IAAK,IAAI,CAAC4G,MAAM,CAAC,QAAQ,EAAE,CAAC5G,KAAK,CAAC,EAAEP,KAAK,CAACyI,YAAY,CAAE;QACxEC,mBAAmB,EAAE,EAAG;QACxBd,GAAG,EAAE,IAAI,CAACV,aAAc;QACxByB,eAAe,EAAE,IAAI,CAACC,qBAAsB;QAC5CC,mBAAmB,EAAE,IAAI,CAACC;MAA0B,GAEnD,IAAI,CAAC1D,aAAa,CAACpF,KAAK,CACf,CAEN,CACE,CAAC;IAEnB,CAC8B,CAAC;EAErC;AACF;AAACF,eAAA,CAlUoBC,WAAW,iBACThB,oBAAoB","ignoreList":[]}
|
|
@@ -12,6 +12,12 @@ export default class WmContainerProps extends PartialHostProps {
|
|
|
12
12
|
_defineProperty(this, "sticky", false);
|
|
13
13
|
_defineProperty(this, "stickyContainerVisibility", false);
|
|
14
14
|
_defineProperty(this, "stickyContainerOpacity", void 0);
|
|
15
|
+
_defineProperty(this, "direction", void 0);
|
|
16
|
+
_defineProperty(this, "wrap", void 0);
|
|
17
|
+
_defineProperty(this, "alignment", void 0);
|
|
18
|
+
_defineProperty(this, "gap", void 0);
|
|
19
|
+
_defineProperty(this, "columngap", void 0);
|
|
20
|
+
_defineProperty(this, "emittoparent", false);
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
//# sourceMappingURL=container.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PartialHostProps","WmContainerProps","constructor","args","_defineProperty"],"sources":["container.props.ts"],"sourcesContent":["import { PartialHostProps } from './partial-host.component';\nimport { Animated } from 'react-native';\n\nexport default class WmContainerProps extends PartialHostProps {\n animation?: string = null as any;\n animationdelay?: number = null as any;\n onLoad?: Function;\n scrollable?: Boolean = false as any;\n sticky?: Boolean = false as boolean;\n stickyContainerVisibility?: Boolean = false;\n stickyContainerOpacity?: Animated.Value;\n}\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAG3D,eAAe,MAAMC,gBAAgB,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACxC,IAAI;IAAAA,eAAA,yBACC,IAAI;IAAAA,eAAA;IAAAA,eAAA,qBAEP,KAAK;IAAAA,eAAA,iBACT,KAAK;IAAAA,eAAA,oCACc,KAAK;IAAAA,eAAA;EAAA;
|
|
1
|
+
{"version":3,"names":["PartialHostProps","WmContainerProps","constructor","args","_defineProperty"],"sources":["container.props.ts"],"sourcesContent":["import { PartialHostProps } from './partial-host.component';\nimport { Animated } from 'react-native';\n\nexport default class WmContainerProps extends PartialHostProps {\n animation?: string = null as any;\n animationdelay?: number = null as any;\n onLoad?: Function;\n scrollable?: Boolean = false as any;\n sticky?: Boolean = false as boolean;\n stickyContainerVisibility?: Boolean = false;\n stickyContainerOpacity?: Animated.Value;\n direction?: 'row' | 'column';\n wrap?: boolean | string;\n alignment?: string;\n gap?: number | string | 'auto';\n columngap?: number | string | 'auto';\n emittoparent?: boolean = false;\n}\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAG3D,eAAe,MAAMC,gBAAgB,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACxC,IAAI;IAAAA,eAAA,yBACC,IAAI;IAAAA,eAAA;IAAAA,eAAA,qBAEP,KAAK;IAAAA,eAAA,iBACT,KAAK;IAAAA,eAAA,oCACc,KAAK;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,uBAOlB,KAAK;EAAA;AAChC","ignoreList":[]}
|
|
@@ -1,25 +1,53 @@
|
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import { View, Platform } from 'react-native';
|
|
3
6
|
import { isNil } from 'lodash-es';
|
|
4
7
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
8
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
5
9
|
import WmLinearlayoutitemProps from './linearlayoutitem.props';
|
|
6
10
|
import { DEFAULT_CLASS } from './linearlayoutitem.styles';
|
|
7
11
|
export class WmLinearlayoutitemState extends BaseComponentState {}
|
|
8
12
|
export default class WmLinearlayoutitem extends BaseComponent {
|
|
9
13
|
constructor(props) {
|
|
10
14
|
super(props, DEFAULT_CLASS, new WmLinearlayoutitemProps());
|
|
15
|
+
//linear layout item swipe up/down gesture logic
|
|
16
|
+
_defineProperty(this, "swipeGesture", void 0);
|
|
17
|
+
this.swipeGesture = Gesture.Pan().runOnJS(true).activeOffsetY([-8, 8]) // Only activates on vertical movement
|
|
18
|
+
.failOffsetX([-30, 30]) // Blocks horizontal swipes
|
|
19
|
+
.onEnd(event => {
|
|
20
|
+
// If we're here, it's definitely a vertical swipe
|
|
21
|
+
if (event.translationY < 0) {
|
|
22
|
+
this.invokeEventCallback('onSwipeup', [null, this]);
|
|
23
|
+
} else {
|
|
24
|
+
this.invokeEventCallback('onSwipedown', [null, this]);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
11
27
|
}
|
|
12
28
|
renderWidget(props) {
|
|
29
|
+
var _props$flexgrow, _this$styles$root;
|
|
13
30
|
const direction = this.parent.state.props.direction;
|
|
14
|
-
|
|
31
|
+
const flexGrow = (_props$flexgrow = props.flexgrow) !== null && _props$flexgrow !== void 0 ? _props$flexgrow : (_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.flexGrow;
|
|
32
|
+
const content = /*#__PURE__*/React.createElement(View, {
|
|
15
33
|
style: {
|
|
16
34
|
...this.styles.root,
|
|
17
|
-
flexGrow
|
|
18
|
-
|
|
19
|
-
|
|
35
|
+
...(flexGrow ? {
|
|
36
|
+
flexGrow: props.flexgrow,
|
|
37
|
+
flexShrink: isNil(props.flexshrink) ? Platform.OS == "web" ? props.flexgrow : 0 : props.flexshrink,
|
|
38
|
+
flexBasis: props.flexgrow && (direction === 'row' || direction === 'row-reverse') ? 0 : 'auto'
|
|
39
|
+
} : {})
|
|
20
40
|
},
|
|
21
41
|
onLayout: event => this.handleLayout(event)
|
|
22
42
|
}, this._background, props.children);
|
|
43
|
+
|
|
44
|
+
//Conditionally wrap with GestureDetector
|
|
45
|
+
if (props.enableswipe) {
|
|
46
|
+
return /*#__PURE__*/React.createElement(GestureDetector, {
|
|
47
|
+
gesture: this.swipeGesture
|
|
48
|
+
}, content);
|
|
49
|
+
}
|
|
50
|
+
return content;
|
|
23
51
|
}
|
|
24
52
|
}
|
|
25
53
|
//# sourceMappingURL=linearlayoutitem.component.js.map
|
package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Platform","isNil","BaseComponent","BaseComponentState","WmLinearlayoutitemProps","DEFAULT_CLASS","WmLinearlayoutitemState","WmLinearlayoutitem","constructor","props","renderWidget","direction","parent","state","
|
|
1
|
+
{"version":3,"names":["React","View","Platform","isNil","BaseComponent","BaseComponentState","Gesture","GestureDetector","WmLinearlayoutitemProps","DEFAULT_CLASS","WmLinearlayoutitemState","WmLinearlayoutitem","constructor","props","_defineProperty","swipeGesture","Pan","runOnJS","activeOffsetY","failOffsetX","onEnd","event","translationY","invokeEventCallback","renderWidget","_props$flexgrow","_this$styles$root","direction","parent","state","flexGrow","flexgrow","styles","root","content","createElement","style","flexShrink","flexshrink","OS","flexBasis","onLayout","handleLayout","_background","children","enableswipe","gesture"],"sources":["linearlayoutitem.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Platform } from 'react-native';\nimport { isNil } from 'lodash-es';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Gesture, GestureDetector, GestureType } from 'react-native-gesture-handler';\n\nimport WmLinearlayout from '../linearlayout.component';\nimport WmLinearlayoutitemProps from './linearlayoutitem.props';\nimport { DEFAULT_CLASS, WmLinearlayoutitemStyles } from './linearlayoutitem.styles';\n\nexport class WmLinearlayoutitemState extends BaseComponentState<WmLinearlayoutitemProps> {}\n\nexport default class WmLinearlayoutitem extends BaseComponent<WmLinearlayoutitemProps, WmLinearlayoutitemState, WmLinearlayoutitemStyles> {\n\n private swipeGesture: GestureType;\n constructor(props: WmLinearlayoutitemProps) {\n super(props, DEFAULT_CLASS, new WmLinearlayoutitemProps());\n //linear layout item swipe up/down gesture logic\n this.swipeGesture = Gesture.Pan()\n .runOnJS(true)\n .activeOffsetY([-8, 8]) // Only activates on vertical movement\n .failOffsetX([-30, 30]) // Blocks horizontal swipes\n .onEnd((event) => {\n // If we're here, it's definitely a vertical swipe\n if (event.translationY < 0) {\n this.invokeEventCallback('onSwipeup', [null, this]);\n } else {\n this.invokeEventCallback('onSwipedown', [null, this]);\n }\n });\n }\n\n \n\n renderWidget(props: WmLinearlayoutitemProps) {\n const direction = (this.parent as WmLinearlayout).state.props.direction;\n const flexGrow = props.flexgrow ?? this.styles.root?.flexGrow;\n\n const content = (\n <View \n style={{\n ...this.styles.root,\n ...flexGrow ? {\n flexGrow: props.flexgrow,\n flexShrink: isNil(props.flexshrink) ? Platform.OS == \"web\" ? props.flexgrow : 0 : props.flexshrink,\n flexBasis: (props.flexgrow && (direction === 'row' || direction === 'row-reverse') ? 0 : 'auto')}: {} \n } as any}\n onLayout={(event) => this.handleLayout(event)}\n >{this._background}{props.children}</View>); \n \n\n //Conditionally wrap with GestureDetector\n if (props.enableswipe) {\n return (\n <GestureDetector gesture={this.swipeGesture}>\n {content}\n </GestureDetector>\n );\n }\n \n return content;\n }\n}"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAC7C,SAASC,KAAK,QAAQ,WAAW;AACjC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,OAAO,EAAEC,eAAe,QAAqB,8BAA8B;AAGpF,OAAOC,uBAAuB,MAAM,0BAA0B;AAC9D,SAASC,aAAa,QAAkC,2BAA2B;AAEnF,OAAO,MAAMC,uBAAuB,SAASL,kBAAkB,CAA0B;AAEzF,eAAe,MAAMM,kBAAkB,SAASP,aAAa,CAA6E;EAGxIQ,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,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AAI,KAAK,GAAG1B,KAAK,CAACkB,QAAQ,GAAG,CAAC,GAAGlB,KAAK,CAACyB,UAAU;UAClGE,SAAS,EAAI3B,KAAK,CAACkB,QAAQ,KAAKJ,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,aAAa,CAAC,GAAG,CAAC,GAAG;QAAO,CAAC,GAAE,CAAC,CAAC;MACxG,CAAS;MACTc,QAAQ,EAAGpB,KAAK,IAAK,IAAI,CAACqB,YAAY,CAACrB,KAAK;IAAE,GAC9C,IAAI,CAACsB,WAAW,EAAE9B,KAAK,CAAC+B,QAAe,CAAE;;IAG3C;IACA,IAAI/B,KAAK,CAACgC,WAAW,EAAE;MACrB,oBACE7C,KAAA,CAAAmC,aAAA,CAAC5B,eAAe;QAACuC,OAAO,EAAE,IAAI,CAAC/B;MAAa,GACzCmB,OACc,CAAC;IAEtB;IAEA,OAAOA,OAAO;EAChB;AACF","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ export default class WmLinearlayoutitemProps extends BaseProps {
|
|
|
6
6
|
constructor(...args) {
|
|
7
7
|
super(...args);
|
|
8
8
|
_defineProperty(this, "children", []);
|
|
9
|
+
_defineProperty(this, "enableswipe", false);
|
|
9
10
|
_defineProperty(this, "flexgrow", null);
|
|
10
11
|
_defineProperty(this, "flexshrink", null);
|
|
11
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmLinearlayoutitemProps","constructor","args","_defineProperty"],"sources":["linearlayoutitem.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLinearlayoutitemProps extends BaseProps {\n children?: any[] = [];\n flexgrow: number = null as any;\n flexshrink: number = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,uBAAuB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBACxC,EAAE;IAAAA,eAAA,
|
|
1
|
+
{"version":3,"names":["BaseProps","WmLinearlayoutitemProps","constructor","args","_defineProperty"],"sources":["linearlayoutitem.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLinearlayoutitemProps extends BaseProps {\n children?: any[] = [];\n enableswipe?: boolean = false;\n flexgrow: number = null as any;\n flexshrink: number = null as any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,uBAAuB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBACxC,EAAE;IAAAA,eAAA,sBACG,KAAK;IAAAA,eAAA,mBACV,IAAI;IAAAA,eAAA,qBACF,IAAI;EAAA;AAC7B","ignoreList":[]}
|
|
@@ -150,7 +150,7 @@ export default class WmPanel extends BaseComponent {
|
|
|
150
150
|
style: styles,
|
|
151
151
|
testID: this.getTestId(),
|
|
152
152
|
onLayout: event => this.handleLayout(event)
|
|
153
|
-
}, this.getBackground(), this.renderHeader(), this.renderPane(/*#__PURE__*/React.createElement(React.Fragment, null, this.renderContent(props), /*#__PURE__*/React.createElement(View, null, props.children))));
|
|
153
|
+
}, this.showSpinner(), this.getBackground(), this.renderHeader(), this.renderPane(/*#__PURE__*/React.createElement(React.Fragment, null, this.renderContent(props), /*#__PURE__*/React.createElement(View, null, props.children))));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
//# sourceMappingURL=panel.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","createSkeleton","WmLabel","WmPanelState","constructor","args","_defineProperty","WmPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","onPanelPress","collapsible","eventName","expanded","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","_extends","style","styles","badgetype","getTestProps","iconclass","id","getTestId","name","toggleIcon","flexDirection","alignItems","renderHeader","getTestPropsForAction","header","onPress","accessibilityRole","iconurl","icon","iconheight","iconwidth","iconmargin","flex","justifyContent","title","_showSkeleton","showskeleton","root","text","heading","caption","subheading","renderPane","content","display","maxHeight","overflow","close","getBackground","_background","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","skeleton","theme","opacity","Fragment","children","renderWidget","testID","onLayout","event","handleLayout"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\nimport { isUndefined } from 'lodash';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { CollapsiblePane } from './collapsible-pane.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress() {\n if (!this.state.props.collapsible) {\n return;\n }\n const eventName = this.state.props.expanded ? 'onCollapse' : 'onExpand';\n this.updateState({\n props: {\n expanded: !this.state.props.expanded\n }\n } as WmPanelState);\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]} {...this.getTestProps('badge')}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon id={this.getTestId('collapseicon')} name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row', alignItems: 'center'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderHeader() {\n const props = this.state.props;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction(`header`)}\n style={[this.styles.header]}\n onPress={this.onPanelPress.bind(this)}\n accessibilityRole='header'>\n {props.iconclass || props.iconurl ? \n <WmIcon styles={this.styles.icon}\n id={this.getTestId('icon')} \n name={props.name + '_icon'}\n iconclass={props.iconclass}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n /> : null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n {props.title? \n (this._showSkeleton ? \n <WmLabel \n showskeleton={true}\n styles={{root: [\n this.styles.text,\n this.styles.heading]}} caption={isUndefined(props.title) ? 'Title' : props.title}/> : \n <Text style={[\n this.styles.text,\n this.styles.heading]}\n {...this.getTestPropsForAction(`header_title`)}>\n {isUndefined(props.title) ? 'Title' : props.title}\n </Text> ) : null }\n {props.subheading ? \n (this._showSkeleton ? \n <WmLabel \n showskeleton={true} \n styles={{root: this.styles.subheading}} \n caption={props.subheading} /> :\n <Text \n style={this.styles.subheading}\n {...this.getTestPropsForAction(`subheader`)}>\n {props.subheading}\n </Text> ) : null }\n </View>\n {this.expandCollapseIcon(props.expanded)}\n </TouchableOpacity>\n );\n }\n\n renderPane(content: React.ReactNode) {\n const expanded = this.state.props.expanded;\n return isWebPreviewMode() || this.styles.header.display == \"none\" ? \n (<View style={expanded ? {} : {maxHeight: 0, overflow: 'hidden'}}>\n {content}\n </View>) :\n (<CollapsiblePane close={!expanded}>\n {content}\n </CollapsiblePane>);\n }\n\n protected getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n public renderSkeleton(props: WmPanelProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>))\n }\n return null;\n }\n\n renderWidget(props: WmPanelProps) {\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <View \n style={styles} \n testID={this.getTestId()} \n onLayout={(event) => this.handleLayout(event)}\n >\n {this.getBackground()}\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAC3D,SAASC,WAAW,QAAQ,QAAQ;AACpC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,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C,QAAQ,CAACjB;IAC1B,CAAC,GAAG,IAAI,CAACzB,MAAM,CAACyB,IAAI;IACpB,oBACArE,KAAA,CAAAyC,aAAA,CAACvC,IAAI;MACHyC,KAAK,EAAEC,MAAO;MACdgD,MAAM,EAAE,IAAI,CAAC3C,SAAS,CAAC,CAAE;MACzB4C,QAAQ,EAAGC,KAAK,IAAK,IAAI,CAACC,YAAY,CAACD,KAAK;IAAE,GAE7C,IAAI,CAACd,aAAa,CAAC,CAAC,EACpB,IAAI,CAAC1B,YAAY,CAAC,CAAC,EACnB,IAAI,CAACoB,UAAU,cACd1E,KAAA,CAAAyC,aAAA,CAAAzC,KAAA,CAAAyF,QAAA,QACC,IAAI,CAAClE,aAAa,CAACH,KAAK,CAAC,eAC1BpB,KAAA,CAAAyC,aAAA,CAACvC,IAAI,QAAEkB,KAAK,CAACsE,QAAe,CAC1B,CACH,CACG,CAAC;EACT;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Text","View","TouchableOpacity","isUndefined","Badge","BaseComponent","BaseComponentState","WmIcon","WmPanelProps","DEFAULT_CLASS","isWebPreviewMode","CollapsiblePane","createSkeleton","WmLabel","WmPanelState","constructor","args","_defineProperty","WmPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","onPanelPress","collapsible","eventName","expanded","proxy","expandCollapseIcon","isExpanded","widgetProps","badge","badgevalue","undefined","createElement","_extends","style","styles","badgetype","getTestProps","iconclass","id","getTestId","name","toggleIcon","flexDirection","alignItems","renderHeader","getTestPropsForAction","header","onPress","accessibilityRole","iconurl","icon","iconheight","iconwidth","iconmargin","flex","justifyContent","title","_showSkeleton","showskeleton","root","text","heading","caption","subheading","renderPane","content","display","maxHeight","overflow","close","getBackground","_background","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","skeleton","theme","opacity","Fragment","children","renderWidget","testID","onLayout","event","handleLayout","showSpinner"],"sources":["panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity } from 'react-native';\nimport { isUndefined } from 'lodash';\nimport { Badge } from 'react-native-paper';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\n\nimport WmPanelProps from './panel.props';\nimport { DEFAULT_CLASS, WmPanelStyles } from './panel.styles';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { CollapsiblePane } from './collapsible-pane.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nexport class WmPanelState extends BaseComponentState<WmPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmPanel extends BaseComponent<WmPanelProps, WmPanelState, WmPanelStyles> {\n constructor(props: WmPanelProps) {\n super(props, DEFAULT_CLASS, new WmPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: WmPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n }\n\n onPanelPress() {\n if (!this.state.props.collapsible) {\n return;\n }\n const eventName = this.state.props.expanded ? 'onCollapse' : 'onExpand';\n this.updateState({\n props: {\n expanded: !this.state.props.expanded\n }\n } as WmPanelState);\n\n this.invokeEventCallback(eventName, [null, this.proxy]);\n }\n\n expandCollapseIcon(isExpanded: boolean) {\n const widgetProps = this.state.props;\n //@ts-ignore\n const badge = widgetProps.badgevalue != undefined ? (<Badge style={[this.styles.badge, this.styles[widgetProps.badgetype || 'default']]} {...this.getTestProps('badge')}>{widgetProps.badgevalue}</Badge>): null;\n const iconclass = isExpanded ? 'wi wi-chevron-up' : 'wi wi-chevron-down';\n const expandCollapseIcon = widgetProps.collapsible ? (<WmIcon id={this.getTestId('collapseicon')} name={'expand_collapse_icon'} styles={this.styles.toggleIcon} iconclass={iconclass}></WmIcon>) : null;\n return (<View style={{flexDirection: 'row', alignItems: 'center'}}>{badge}{expandCollapseIcon}</View>);\n }\n\n renderHeader() {\n const props = this.state.props;\n return (\n <TouchableOpacity\n {...this.getTestPropsForAction(`header`)}\n style={[this.styles.header]}\n onPress={this.onPanelPress.bind(this)}\n accessibilityRole='header'>\n {props.iconclass || props.iconurl ? \n <WmIcon styles={this.styles.icon}\n id={this.getTestId('icon')} \n name={props.name + '_icon'}\n iconclass={props.iconclass}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n /> : null}\n <View style={{flexDirection: 'column', flex: 1, justifyContent: 'center'}}>\n {props.title? \n (this._showSkeleton ? \n <WmLabel \n showskeleton={true}\n styles={{root: [\n this.styles.text,\n this.styles.heading]}} caption={isUndefined(props.title) ? 'Title' : props.title}/> : \n <Text style={[\n this.styles.text,\n this.styles.heading]}\n {...this.getTestPropsForAction(`header_title`)}>\n {isUndefined(props.title) ? 'Title' : props.title}\n </Text> ) : null }\n {props.subheading ? \n (this._showSkeleton ? \n <WmLabel \n showskeleton={true} \n styles={{root: this.styles.subheading}} \n caption={props.subheading} /> :\n <Text \n style={this.styles.subheading}\n {...this.getTestPropsForAction(`subheader`)}>\n {props.subheading}\n </Text> ) : null }\n </View>\n {this.expandCollapseIcon(props.expanded)}\n </TouchableOpacity>\n );\n }\n\n renderPane(content: React.ReactNode) {\n const expanded = this.state.props.expanded;\n return isWebPreviewMode() || this.styles.header.display == \"none\" ? \n (<View style={expanded ? {} : {maxHeight: 0, overflow: 'hidden'}}>\n {content}\n </View>) :\n (<CollapsiblePane close={!expanded}>\n {content}\n </CollapsiblePane>);\n }\n\n protected getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n public renderSkeleton(props: WmPanelProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>))\n }\n return null;\n }\n\n renderWidget(props: WmPanelProps) {\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <View \n style={styles} \n testID={this.getTestId()} \n onLayout={(event) => this.handleLayout(event)}\n >\n {this.showSpinner()}\n {this.getBackground()}\n {this.renderHeader()}\n {this.renderPane((\n <>\n {this.renderContent(props)}\n <View>{props.children}</View>\n </>\n ))}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAC3D,SAASC,WAAW,QAAQ,QAAQ;AACpC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAC7D,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,SAASC,cAAc,QAAQ,wEAAwE;AACvG,OAAOC,OAAO,MAAM,kEAAkE;AAEtF,OAAO,MAAMC,YAAY,SAASR,kBAAkB,CAAe;EAAAS,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BAC/C,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,OAAO,SAASb,aAAa,CAA4C;EAC5FU,WAA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nB,IAAI,CAACoB,UAAU,cACd1E,KAAA,CAAAyC,aAAA,CAAAzC,KAAA,CAAAyF,QAAA,QACC,IAAI,CAAClE,aAAa,CAACH,KAAK,CAAC,eAC1BpB,KAAA,CAAAyC,aAAA,CAACvC,IAAI,QAAEkB,KAAK,CAACsE,QAAe,CAC1B,CACH,CACG,CAAC;EACT;AACF","ignoreList":[]}
|
|
@@ -76,7 +76,7 @@ export default class WmTabpane extends BaseComponent {
|
|
|
76
76
|
this.notify('scroll', [event]);
|
|
77
77
|
},
|
|
78
78
|
onLayout: event => this.handleLayout(event)
|
|
79
|
-
}, this._background, this.renderContent(props));
|
|
79
|
+
}, this.showSpinner(), this._background, this.renderContent(props));
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
//# sourceMappingURL=tabpane.component.js.map
|