@wavemaker/app-rn-runtime 11.14.1-22.647589 → 11.14.1-23.647643
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/basic/bottomsheet/bottomsheet.component.js +32 -218
- package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.styles.js +3 -0
- package/components/basic/bottomsheet/bottomsheet.styles.js.map +1 -1
- package/components/container/container.component.js +13 -206
- package/components/container/container.component.js.map +1 -1
- package/components/container/container.props.js +0 -6
- package/components/container/container.props.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -25
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +0 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
- package/components/container/wizard/wizard.component.js +4 -2
- package/components/container/wizard/wizard.component.js.map +1 -1
- package/components/container/wizard/wizard.styles.js +1 -3
- package/components/container/wizard/wizard.styles.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.component.js +22 -3
- package/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.props.js +2 -0
- package/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- package/components/data/form/form-field/form-field.component.js +0 -2
- package/components/data/form/form-field/form-field.component.js.map +1 -1
- package/components/data/form/form-field/form-field.props.js +0 -2
- package/components/data/form/form-field/form-field.props.js.map +1 -1
- package/components/input/baseinput/baseinput.component.js +0 -7
- package/components/input/baseinput/baseinput.component.js.map +1 -1
- package/components/input/calendar/calendar.component.js +0 -4
- package/components/input/calendar/calendar.component.js.map +1 -1
- package/components/input/calendar/views/month-view.js +1 -8
- package/components/input/calendar/views/month-view.js.map +1 -1
- package/components/input/radioset/radioset.component.js +3 -1
- package/components/input/radioset/radioset.component.js.map +1 -1
- package/components/input/text/text.component.js +2 -10
- package/components/input/text/text.component.js.map +1 -1
- package/components/input/text/text.props.js +0 -1
- package/components/input/text/text.props.js.map +1 -1
- package/components/input/textarea/textarea.component.js +2 -2
- package/components/input/textarea/textarea.component.js.map +1 -1
- package/components/navigation/popover/popover.component.js +3 -3
- package/components/navigation/popover/popover.component.js.map +1 -1
- package/core/AppConfig.js.map +1 -1
- package/core/components/textinput.component.js +3 -0
- package/core/components/textinput.component.js.map +1 -1
- package/core/tappable.component.js +15 -109
- package/core/tappable.component.js.map +1 -1
- package/npm-shrinkwrap.json +238 -318
- package/package-lock.json +238 -318
- package/package.json +2 -2
- package/runtime/navigator/drawer.navigator.js +0 -2
- package/runtime/navigator/drawer.navigator.js.map +1 -1
- package/runtime/navigator/stack.navigator.js +1 -13
- package/runtime/navigator/stack.navigator.js.map +1 -1
- package/runtime/services/device/scan-service.js +34 -12
- package/runtime/services/device/scan-service.js.map +1 -1
- package/styles/theme.variables.js +0 -2
- package/styles/theme.variables.js.map +1 -1
|
@@ -16,59 +16,6 @@ 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
|
-
};
|
|
72
19
|
export class WmContainerState extends PartialHostState {
|
|
73
20
|
constructor(...args) {
|
|
74
21
|
super(...args);
|
|
@@ -80,7 +27,6 @@ export default class WmContainer extends PartialHost {
|
|
|
80
27
|
constructor(props) {
|
|
81
28
|
super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());
|
|
82
29
|
_defineProperty(this, "containerRef", void 0);
|
|
83
|
-
_defineProperty(this, "scrollViewRef", /*#__PURE__*/React.createRef());
|
|
84
30
|
_defineProperty(this, "stickyContainerOpacity", void 0);
|
|
85
31
|
_defineProperty(this, "appConfig", injector.get('APP_CONFIG'));
|
|
86
32
|
_defineProperty(this, "insets", {
|
|
@@ -89,20 +35,6 @@ export default class WmContainer extends PartialHost {
|
|
|
89
35
|
left: 0,
|
|
90
36
|
right: 0
|
|
91
37
|
});
|
|
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
|
-
});
|
|
106
38
|
this.containerRef = /*#__PURE__*/React.createRef();
|
|
107
39
|
this.stickyContainerOpacity = new Animated.Value(1);
|
|
108
40
|
this.subscribe('updateStickyHeaders', _event => {
|
|
@@ -116,129 +48,14 @@ export default class WmContainer extends PartialHost {
|
|
|
116
48
|
getBackground() {
|
|
117
49
|
return this._showSkeleton ? null : this._background;
|
|
118
50
|
}
|
|
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
|
-
}
|
|
234
51
|
renderSkeleton(props) {
|
|
235
52
|
if (!props.showskeletonchildren) {
|
|
236
|
-
var _this$
|
|
53
|
+
var _this$props;
|
|
237
54
|
const dimensions = {
|
|
238
55
|
width: this.styles.root.width ? '100%' : undefined,
|
|
239
56
|
height: this.styles.root.height ? '100%' : undefined
|
|
240
57
|
};
|
|
241
|
-
const skeletonStyles = ((_this$
|
|
58
|
+
const skeletonStyles = ((_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.styles) === null || _this$props === void 0 ? void 0 : _this$props.skeleton) || {
|
|
242
59
|
root: {},
|
|
243
60
|
text: {}
|
|
244
61
|
};
|
|
@@ -280,13 +97,8 @@ export default class WmContainer extends PartialHost {
|
|
|
280
97
|
useNativeDriver: true
|
|
281
98
|
}).start();
|
|
282
99
|
}
|
|
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
|
-
}
|
|
288
100
|
}
|
|
289
|
-
renderStickyContent(props, dimensions, styles
|
|
101
|
+
renderStickyContent(props, dimensions, styles) {
|
|
290
102
|
const {
|
|
291
103
|
stickyContainerVisibility
|
|
292
104
|
} = this.state;
|
|
@@ -304,20 +116,18 @@ export default class WmContainer extends PartialHost {
|
|
|
304
116
|
}, /*#__PURE__*/React.createElement(View, {
|
|
305
117
|
style: [dimensions, {
|
|
306
118
|
backgroundColor: styles.backgroundColor
|
|
307
|
-
}, this.styles.content
|
|
119
|
+
}, this.styles.content]
|
|
308
120
|
}, this.renderContent(props))) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Animated.View, {
|
|
309
121
|
style: [dimensions, {
|
|
310
122
|
opacity: this.stickyContainerOpacity
|
|
311
|
-
}, this.styles.content
|
|
123
|
+
}, this.styles.content],
|
|
312
124
|
ref: this.containerRef
|
|
313
125
|
}, this.renderContent(props)));
|
|
314
126
|
}
|
|
315
127
|
renderWidget(props) {
|
|
316
|
-
const rootStyle = this.getRootContainerStyle();
|
|
317
|
-
const autoLayoutStyle = this.getContentContainerStyle();
|
|
318
128
|
const dimensions = {
|
|
319
|
-
width:
|
|
320
|
-
height:
|
|
129
|
+
width: this.styles.root.width ? '100%' : undefined,
|
|
130
|
+
height: this.styles.root.height ? '100%' : undefined
|
|
321
131
|
};
|
|
322
132
|
const styles = this._showSkeleton ? {
|
|
323
133
|
...this.styles.root,
|
|
@@ -336,7 +146,7 @@ export default class WmContainer extends PartialHost {
|
|
|
336
146
|
return /*#__PURE__*/React.createElement(Animatedview, {
|
|
337
147
|
entryanimation: props.animation,
|
|
338
148
|
delay: props.animationdelay,
|
|
339
|
-
style:
|
|
149
|
+
style: styles,
|
|
340
150
|
onLayout: (event, ref) => {
|
|
341
151
|
this.handleLayout(event, ref);
|
|
342
152
|
}
|
|
@@ -344,15 +154,12 @@ export default class WmContainer extends PartialHost {
|
|
|
344
154
|
target: this,
|
|
345
155
|
styles: dimensions,
|
|
346
156
|
disableTouchEffect: this.state.props.disabletoucheffect
|
|
347
|
-
}), props.sticky ? this.renderStickyContent(props, dimensions, styles
|
|
348
|
-
style: [dimensions, this.styles.content
|
|
157
|
+
}), props.sticky ? this.renderStickyContent(props, dimensions, styles) : !props.scrollable ? /*#__PURE__*/React.createElement(View, {
|
|
158
|
+
style: [dimensions, this.styles.content]
|
|
349
159
|
}, this.renderContent(props)) : /*#__PURE__*/React.createElement(ScrollView, {
|
|
350
|
-
style: [dimensions, this.styles.content
|
|
351
|
-
onScroll: event => this.notify('scroll', [event]
|
|
352
|
-
scrollEventThrottle: 48
|
|
353
|
-
ref: this.scrollViewRef,
|
|
354
|
-
onScrollEndDrag: this.handleOnScrollEndDrag,
|
|
355
|
-
onMomentumScrollEnd: this.handleOnMomentumScrollEnd
|
|
160
|
+
style: [dimensions, this.styles.content],
|
|
161
|
+
onScroll: event => this.notify('scroll', [event]),
|
|
162
|
+
scrollEventThrottle: 48
|
|
356
163
|
}, this.renderContent(props))));
|
|
357
164
|
});
|
|
358
165
|
}
|
|
@@ -1 +1 @@
|
|
|
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","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.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,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;AACA,MAAMC,oBAGL,GAAG;EACF,UAAU,EAAE;IAAEC,cAAc,EAAE,YAAY;IAAEC,UAAU,EAAE;EAAa,CAAC;EACtE,YAAY,EAAE;IAAED,cAAc,EAAE,QAAQ;IAAEC,UAAU,EAAE;EAAa,CAAC;EACpE,WAAW,EAAE;IAAED,cAAc,EAAE,UAAU;IAAEC,UAAU,EAAE;EAAa,CAAC;EACrE,aAAa,EAAE;IAAED,cAAc,EAAE,YAAY;IAAEC,UAAU,EAAE;EAAS,CAAC;EACrE,eAAe,EAAE;IAAED,cAAc,EAAE,QAAQ;IAAEC,UAAU,EAAE;EAAS,CAAC;EACnE,cAAc,EAAE;IAAED,cAAc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AAK,CAACwI,YAAY,CAAE;QACxEC,mBAAmB,EAAE,EAAG;QACxBb,GAAG,EAAE,IAAI,CAACV,aAAc;QACxBwB,eAAe,EAAE,IAAI,CAACC,qBAAsB;QAC5CC,mBAAmB,EAAE,IAAI,CAACC;MAA0B,GAEnD,IAAI,CAACzD,aAAa,CAACpF,KAAK,CACf,CAEN,CACE,CAAC;IAEnB,CAC8B,CAAC;EAErC;AACF;AAACF,eAAA,CAjUoBC,WAAW,iBACThB,oBAAoB","ignoreList":[]}
|
|
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,SAA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,IAAK;QACbb,MAAM,EAAEF,UAAW;QACnBgB,kBAAkB,EAAE,IAAI,CAACC,KAAK,CAACtC,KAAK,CAACuC;MAAmB,IAEvDvC,KAAK,CAACY,MAAM,GACX,IAAI,CAAC4D,mBAAmB,CAACxE,KAAK,EAAEqB,UAAU,EAAEE,MAAM,CAAC,GACjD,CAACvB,KAAK,CAACyF,UAAU,gBACnB/G,KAAA,CAAAqD,aAAA,CAACpD,IAAI;QAACqD,KAAK,EAAE,CAACX,UAAU,EAAe,IAAI,CAACE,MAAM,CAACiB,OAAO;MAAE,GACzD,IAAI,CAACC,aAAa,CAACzC,KAAK,CACrB,CAAC,gBAEPtB,KAAA,CAAAqD,aAAA,CAAC1C,UAAU;QACT2C,KAAK,EAAE,CAACX,UAAU,EAAe,IAAI,CAACE,MAAM,CAACiB,OAAO,CAAE;QACtDkD,QAAQ,EAAGH,KAAK,IAAK,IAAI,CAACI,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":[]}
|
|
@@ -12,12 +12,6 @@ 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);
|
|
21
15
|
}
|
|
22
16
|
}
|
|
23
17
|
//# 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
|
|
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;AAE7C","ignoreList":[]}
|
|
@@ -1,33 +1,17 @@
|
|
|
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); }
|
|
4
1
|
import React from 'react';
|
|
5
2
|
import { View, Platform } from 'react-native';
|
|
6
3
|
import { isNil } from 'lodash-es';
|
|
7
4
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
8
|
-
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
9
5
|
import WmLinearlayoutitemProps from './linearlayoutitem.props';
|
|
10
6
|
import { DEFAULT_CLASS } from './linearlayoutitem.styles';
|
|
11
7
|
export class WmLinearlayoutitemState extends BaseComponentState {}
|
|
12
8
|
export default class WmLinearlayoutitem extends BaseComponent {
|
|
13
9
|
constructor(props) {
|
|
14
10
|
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
|
-
});
|
|
27
11
|
}
|
|
28
12
|
renderWidget(props) {
|
|
29
13
|
const direction = this.parent.state.props.direction;
|
|
30
|
-
|
|
14
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
31
15
|
style: {
|
|
32
16
|
...this.styles.root,
|
|
33
17
|
flexGrow: props.flexgrow,
|
|
@@ -36,14 +20,6 @@ export default class WmLinearlayoutitem extends BaseComponent {
|
|
|
36
20
|
},
|
|
37
21
|
onLayout: event => this.handleLayout(event)
|
|
38
22
|
}, this._background, props.children);
|
|
39
|
-
|
|
40
|
-
//Conditionally wrap with GestureDetector
|
|
41
|
-
if (props.enableswipe) {
|
|
42
|
-
return /*#__PURE__*/React.createElement(GestureDetector, {
|
|
43
|
-
gesture: this.swipeGesture
|
|
44
|
-
}, content);
|
|
45
|
-
}
|
|
46
|
-
return content;
|
|
47
23
|
}
|
|
48
24
|
}
|
|
49
25
|
//# 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","
|
|
1
|
+
{"version":3,"names":["React","View","Platform","isNil","BaseComponent","BaseComponentState","WmLinearlayoutitemProps","DEFAULT_CLASS","WmLinearlayoutitemState","WmLinearlayoutitem","constructor","props","renderWidget","direction","parent","state","createElement","style","styles","root","flexGrow","flexgrow","flexShrink","flexshrink","OS","flexBasis","onLayout","event","handleLayout","_background","children"],"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';\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 constructor(props: WmLinearlayoutitemProps) {\n super(props, DEFAULT_CLASS, new WmLinearlayoutitemProps());\n }\n\n renderWidget(props: WmLinearlayoutitemProps) {\n const direction = (this.parent as WmLinearlayout).state.props.direction;\n return (\n <View \n style={{\n ...this.styles.root,\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}"],"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;AAGjG,OAAOC,uBAAuB,MAAM,0BAA0B;AAC9D,SAASC,aAAa,QAAkC,2BAA2B;AAEnF,OAAO,MAAMC,uBAAuB,SAASH,kBAAkB,CAA0B;AAEzF,eAAe,MAAMI,kBAAkB,SAASL,aAAa,CAA6E;EAExIM,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,uBAAuB,CAAC,CAAC,CAAC;EAC5D;EAEAM,YAAYA,CAACD,KAA8B,EAAE;IAC3C,MAAME,SAAS,GAAI,IAAI,CAACC,MAAM,CAAoBC,KAAK,CAACJ,KAAK,CAACE,SAAS;IACvE,oBACAb,KAAA,CAAAgB,aAAA,CAACf,IAAI;MACHgB,KAAK,EAAE;QACL,GAAG,IAAI,CAACC,MAAM,CAACC,IAAI;QACnBC,QAAQ,EAAET,KAAK,CAACU,QAAQ;QACxBC,UAAU,EAAEnB,KAAK,CAACQ,KAAK,CAACY,UAAU,CAAC,GAAGrB,QAAQ,CAACsB,EAAE,IAAI,KAAK,GAAGb,KAAK,CAACU,QAAQ,GAAG,CAAC,GAAGV,KAAK,CAACY,UAAU;QAClGE,SAAS,EAAId,KAAK,CAACU,QAAQ,KAAKR,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,aAAa,CAAC,GAAG,CAAC,GAAG;MAC5F,CAAS;MACTa,QAAQ,EAAGC,KAAK,IAAK,IAAI,CAACC,YAAY,CAACD,KAAK;IAAE,GAC9C,IAAI,CAACE,WAAW,EAAElB,KAAK,CAACmB,QAAe,CAAC;EAE5C;AACF","ignoreList":[]}
|
|
@@ -6,7 +6,6 @@ export default class WmLinearlayoutitemProps extends BaseProps {
|
|
|
6
6
|
constructor(...args) {
|
|
7
7
|
super(...args);
|
|
8
8
|
_defineProperty(this, "children", []);
|
|
9
|
-
_defineProperty(this, "enableswipe", false);
|
|
10
9
|
_defineProperty(this, "flexgrow", null);
|
|
11
10
|
_defineProperty(this, "flexshrink", null);
|
|
12
11
|
}
|
|
@@ -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
|
|
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,mBACF,IAAI;IAAAA,eAAA,qBACF,IAAI;EAAA;AAC7B","ignoreList":[]}
|
|
@@ -336,7 +336,7 @@ export default class WmWizard extends BaseComponent {
|
|
|
336
336
|
}
|
|
337
337
|
this.updateCurrentStep(index - 1);
|
|
338
338
|
}
|
|
339
|
-
next(eventName) {
|
|
339
|
+
async next(eventName) {
|
|
340
340
|
if (eventName !== 'skip' && this.state.props.skipdefaultnext) {
|
|
341
341
|
this.invokeEventCallback('onNext', ['next', this.proxy]);
|
|
342
342
|
return;
|
|
@@ -351,7 +351,9 @@ export default class WmWizard extends BaseComponent {
|
|
|
351
351
|
currentStep.invokeSkipCB(index);
|
|
352
352
|
} else {
|
|
353
353
|
this.invokeEventCallback('onNext', ['next', this.proxy]);
|
|
354
|
-
|
|
354
|
+
const result = currentStep.invokeNextCB(index);
|
|
355
|
+
const resolvedResult = result instanceof Promise ? await result : result;
|
|
356
|
+
if (resolvedResult == false) {
|
|
355
357
|
return;
|
|
356
358
|
}
|
|
357
359
|
}
|