@wavemaker/app-rn-runtime 12.0.0-next.140526 → 12.0.0-next.140529
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +27 -2
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
- app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
- app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +15 -2
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js +10 -2
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +13 -3
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +12 -0
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +2 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +6 -0
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +4 -3
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
- app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
- app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +23 -0
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -2
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
- app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
- app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
- app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
- app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
- app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +44 -4
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
- app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +4 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +36 -2
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.styles.js +7 -0
- app-rn-runtime/components/container/container.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +27 -2
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +42 -4
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.styles.js +3 -0
- app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
- app-rn-runtime/components/container/partial-host.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +4 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +31 -3
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +23 -1
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.styles.js +6 -1
- app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +27 -2
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
- app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
- app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +18 -0
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js +3 -0
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -1
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.props.js +1 -0
- app-rn-runtime/components/data/form/form.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
- app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +54 -33
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +9 -0
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +20 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
- app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +20 -0
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +21 -0
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +2 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
- app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/page.props.js.map +1 -1
- app-rn-runtime/components/page/page.styles.js +7 -1
- app-rn-runtime/components/page/page.styles.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +21 -0
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.styles.js +6 -1
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +22 -0
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
- app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +4 -3
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/props.provider.js +4 -3
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/utils.js +21 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/package.json +6 -4
- app-rn-runtime/runtime/base-fragment.component.js +28 -13
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +25 -1
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +1 -0
- app-rn-runtime/styles/theme.variables.js.map +1 -1
@@ -9,6 +9,7 @@ import { DEFAULT_CLASS } from './container.styles';
|
|
9
9
|
import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
10
10
|
import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
|
11
11
|
import { PartialHost, PartialHostState } from './partial-host.component';
|
12
|
+
import { createSkeleton } from '../basic/skeleton/skeleton.component';
|
12
13
|
export class WmContainerState extends PartialHostState {
|
13
14
|
constructor(...args) {
|
14
15
|
super(...args);
|
@@ -19,16 +20,49 @@ export default class WmContainer extends PartialHost {
|
|
19
20
|
constructor(props) {
|
20
21
|
super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());
|
21
22
|
}
|
23
|
+
getBackground() {
|
24
|
+
return this._showSkeleton ? null : this._background;
|
25
|
+
}
|
26
|
+
renderSkeleton(props) {
|
27
|
+
if (!props.showskeletonchildren) {
|
28
|
+
var _this$props;
|
29
|
+
const dimensions = {
|
30
|
+
width: this.styles.root.width ? '100%' : undefined,
|
31
|
+
height: this.styles.root.height ? '100%' : undefined
|
32
|
+
};
|
33
|
+
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) || {
|
34
|
+
root: {},
|
35
|
+
text: {}
|
36
|
+
};
|
37
|
+
return createSkeleton(this.theme, skeletonStyles, {
|
38
|
+
...this.styles.root
|
39
|
+
}, /*#__PURE__*/React.createElement(View, {
|
40
|
+
style: [this.styles.root, {
|
41
|
+
opacity: 0
|
42
|
+
}]
|
43
|
+
}, /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
44
|
+
target: this,
|
45
|
+
styles: dimensions
|
46
|
+
}), /*#__PURE__*/React.createElement(View, {
|
47
|
+
style: [dimensions, this.styles.content]
|
48
|
+
}, this.renderContent(props)))));
|
49
|
+
}
|
50
|
+
return null;
|
51
|
+
}
|
22
52
|
renderWidget(props) {
|
23
53
|
const dimensions = {
|
24
54
|
width: this.styles.root.width ? '100%' : undefined,
|
25
55
|
height: this.styles.root.height ? '100%' : undefined
|
26
56
|
};
|
57
|
+
const styles = this._showSkeleton ? {
|
58
|
+
...this.styles.root,
|
59
|
+
...this.styles.skeleton.root
|
60
|
+
} : this.styles.root;
|
27
61
|
return /*#__PURE__*/React.createElement(Animatedview, {
|
28
62
|
entryanimation: props.animation,
|
29
63
|
delay: props.animationdelay,
|
30
|
-
style:
|
31
|
-
}, this.
|
64
|
+
style: styles
|
65
|
+
}, this.getBackground(), /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
|
32
66
|
target: this,
|
33
67
|
styles: dimensions
|
34
68
|
}), /*#__PURE__*/React.createElement(View, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","WmContainerState","constructor","args","_defineProperty","WmContainer","props","
|
1
|
+
{"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","createSkeleton","WmContainerState","constructor","args","_defineProperty","WmContainer","props","getBackground","_showSkeleton","_background","renderSkeleton","showskeletonchildren","_this$props","dimensions","width","styles","root","undefined","height","skeletonStyles","skeleton","text","theme","createElement","style","opacity","_extends","getTestPropsForAction","target","content","renderContent","renderWidget","entryanimation","animation","delay","animationdelay"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ColorValue, View, ViewStyle } from 'react-native';\n\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';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\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}>\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\n renderWidget(props: WmContainerProps) {\n const dimensions = {\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 return (\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={styles}>\n {this.getBackground()}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";;;;AAA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O,GACvF,IAAI,CAACR,aAAa,CAAC,CAAC,eACrBf,KAAA,CAAA+B,aAAA,CAAC3B,QAAQ,EAAA8B,QAAA,KAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,MAAM,EAAE,IAAK;MAACb,MAAM,EAAEF;IAAW,iBACzErB,KAAA,CAAA+B,aAAA,CAAC9B,IAAI;MAAC+B,KAAK,EAAE,CAACX,UAAU,EAAgB,IAAI,CAACE,MAAM,CAACc,OAAO;IAAE,GAAE,IAAI,CAACC,aAAa,CAACxB,KAAK,CAAQ,CACzF,CACE,CAAC;EAEnB;AACF","ignoreList":[]}
|
@@ -7,6 +7,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
7
7
|
text: {},
|
8
8
|
content: {
|
9
9
|
flexDirection: 'column'
|
10
|
+
},
|
11
|
+
skeleton: {
|
12
|
+
root: {
|
13
|
+
borderColor: 'transparent',
|
14
|
+
shadowColor: 'transparent',
|
15
|
+
backgroundColor: 'transparent'
|
16
|
+
}
|
10
17
|
}
|
11
18
|
});
|
12
19
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","content","flexDirection","flex","paddingLeft","paddingRight","justifyContent","
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","content","flexDirection","skeleton","borderColor","shadowColor","backgroundColor","flex","paddingLeft","paddingRight","justifyContent","shadowOffset","width","height","shadowRadius","borderRadius","borderWidth","containerOutlineColor","borderStyle"],"sources":["container.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\n\nexport type WmContainerStyles = BaseStyles & {\n content: AllStyle,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-container';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmContainerStyles = defineStyles({\n root: {},\n text: {},\n content: {\n flexDirection: 'column'\n },\n skeleton: {\n root: {\n borderColor: 'transparent',\n shadowColor: 'transparent',\n backgroundColor: 'transparent',\n },\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('media-body', '', {\n root: {\n flex: 1,\n paddingLeft: 8,\n paddingRight: 8,\n justifyContent: 'center'\n }\n } as WmContainerStyles);\n addStyle('media-right', '', {\n root: {\n justifyContent: 'center'\n }\n } as WmContainerStyles);\n addStyle('app-elevated-container', '', {\n root: {\n shadowColor: 'rgba(0, 0, 0, 0.2)',\n shadowOffset: {\n width: 2,\n height: 2\n },\n shadowRadius: 2,\n borderRadius: 8\n }\n } as WmContainerStyles);\n addStyle('app-outlined-container', '', {\n root: {\n borderWidth: 1,\n borderColor: themeVariables.containerOutlineColor,\n borderStyle: 'solid'\n }\n } as WmContainerStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAqB,wCAAwC;AAC9E,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAgC,GAAGL,YAAY,CAAC;IAClDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,OAAO,EAAE;MACLC,aAAa,EAAE;IACnB,CAAC;IACDC,QAAQ,EAAE;MACNJ,IAAI,EAAE;QACFK,WAAW,EAAE,aAAa;QAC1BC,WAAW,EAAE,aAAa;QAC1BC,eAAe,EAAE;MACrB;IACJ;EACJ,CAAC,CAAC;EAEFT,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE;IACvBE,IAAI,EAAE;MACFQ,IAAI,EAAE,CAAC;MACPC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,cAAc,EAAE;IACpB;EACJ,CAAsB,CAAC;EACvBb,QAAQ,CAAC,aAAa,EAAE,EAAE,EAAE;IACxBE,IAAI,EAAE;MACFW,cAAc,EAAE;IACpB;EACJ,CAAsB,CAAC;EACvBb,QAAQ,CAAC,wBAAwB,EAAE,EAAE,EAAE;IACnCE,IAAI,EAAE;MACFM,WAAW,EAAE,oBAAoB;MACjCM,YAAY,EAAE;QACVC,KAAK,EAAE,CAAC;QACRC,MAAM,EAAE;MACZ,CAAC;MACDC,YAAY,EAAE,CAAC;MACfC,YAAY,EAAE;IAClB;EACJ,CAAsB,CAAC;EACvBlB,QAAQ,CAAC,wBAAwB,EAAE,EAAE,EAAE;IACnCE,IAAI,EAAE;MACFiB,WAAW,EAAE,CAAC;MACdZ,WAAW,EAAER,cAAc,CAACqB,qBAAqB;MACjDC,WAAW,EAAE;IACjB;EACJ,CAAsB,CAAC;AAC3B,CAAC,CAAC","ignoreList":[]}
|
@@ -9,8 +9,12 @@ export default class WmGridrow extends BaseComponent {
|
|
9
9
|
super(props, DEFAULT_CLASS, new WmGridrowProps());
|
10
10
|
}
|
11
11
|
renderWidget(props) {
|
12
|
+
const styles = this._showSkeleton ? {
|
13
|
+
...this.styles.root,
|
14
|
+
...this.styles.skeleton.root
|
15
|
+
} : this.styles.root;
|
12
16
|
return /*#__PURE__*/React.createElement(View, {
|
13
|
-
style:
|
17
|
+
style: styles
|
14
18
|
}, this._background, props.children);
|
15
19
|
}
|
16
20
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmGridrowProps","DEFAULT_CLASS","WmGridrowState","WmGridrow","constructor","props","renderWidget","
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmGridrowProps","DEFAULT_CLASS","WmGridrowState","WmGridrow","constructor","props","renderWidget","styles","_showSkeleton","root","skeleton","createElement","style","_background","children"],"sources":["gridrow.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmGridrowProps from './gridrow.props';\nimport { DEFAULT_CLASS, WmGridRowStyles } from './gridrow.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport class WmGridrowState extends BaseComponentState<WmGridrowProps> {\n\n}\n\nexport default class WmGridrow extends BaseComponent<WmGridrowProps, WmGridrowState, WmGridRowStyles> {\n\n constructor(props: WmGridrowProps) {\n super(props, DEFAULT_CLASS, new WmGridrowProps());\n }\n\n renderWidget(props: WmGridrowProps) {\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n\n return (\n <View style={styles}>{this._background}{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AAGjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;AAIvE,eAAe,MAAMI,SAAS,SAASL,aAAa,CAAkD;EAEpGM,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,CAAC;EACnD;EAEAM,YAAYA,CAACD,KAAqB,EAAE;IAClC,MAAME,MAAM,GAAG,IAAI,CAACC,aAAa,GAAI;MACnC,GAAG,IAAI,CAACD,MAAM,CAACE,IAAI;MACnB,GAAG,IAAI,CAACF,MAAM,CAACG,QAAQ,CAACD;IAC1B,CAAC,GAAG,IAAI,CAACF,MAAM,CAACE,IAAI;IAEpB,oBACEb,KAAA,CAAAe,aAAA,CAACd,IAAI;MAACe,KAAK,EAAEL;IAAO,GAAE,IAAI,CAACM,WAAW,EAAER,KAAK,CAACS,QAAe,CAAC;EAElE;AACF","ignoreList":[]}
|
@@ -8,7 +8,12 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
8
8
|
width: '100%',
|
9
9
|
flexWrap: 'wrap'
|
10
10
|
},
|
11
|
-
text: {}
|
11
|
+
text: {},
|
12
|
+
skeleton: {
|
13
|
+
root: {
|
14
|
+
borderColor: 'transparent'
|
15
|
+
}
|
16
|
+
}
|
12
17
|
});
|
13
18
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
14
19
|
addStyle('table-row', '', {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","width","flexWrap","text","
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","width","flexWrap","text","skeleton","borderColor","borderBottomWidth","borderStyle","gridColumnBorderColor","backgroundColor","layoutGridHeaderBgColor","layoutGridStripColor1","layoutGridStripColor2"],"sources":["gridrow.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmGridRowStyles = BaseStyles & {\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-gridrow';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmGridRowStyles = defineStyles({\n root: {\n flexDirection: 'row',\n width: '100%',\n flexWrap: 'wrap'\n },\n text: {},\n skeleton: {\n root: {\n borderColor: 'transparent'\n } \n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('table-row', '', {\n root: {\n borderBottomWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.gridColumnBorderColor\n }\n });\n addStyle('table-header-row', '', {\n root: {\n backgroundColor: themeVariables.layoutGridHeaderBgColor\n }\n });\n addStyle('table-striped-row0', '', {\n root: {\n backgroundColor: themeVariables.layoutGridStripColor1\n }\n });\n addStyle('table-striped-row1', '', {\n root: {\n backgroundColor: themeVariables.layoutGridStripColor2\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,aAAa;AAC1CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA8B,GAAGL,YAAY,CAAC;IAChDM,IAAI,EAAE;MACFC,aAAa,EAAE,KAAK;MACpBC,KAAK,EAAE,MAAM;MACbC,QAAQ,EAAE;IACd,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACRL,IAAI,EAAE;QACJM,WAAW,EAAE;MACf;IACF;EACJ,CAAC,CAAC;EAEFR,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE;IACtBE,IAAI,EAAE;MACFO,iBAAiB,EAAE,CAAC;MACpBC,WAAW,EAAE,OAAO;MACpBF,WAAW,EAAET,cAAc,CAACY;IAChC;EACJ,CAAC,CAAC;EACFX,QAAQ,CAAC,kBAAkB,EAAE,EAAE,EAAE;IAC7BE,IAAI,EAAE;MACFU,eAAe,EAAEb,cAAc,CAACc;IACpC;EACJ,CAAC,CAAC;EACFb,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE;IACjCE,IAAI,EAAE;MACJU,eAAe,EAAEb,cAAc,CAACe;IAClC;EACF,CAAC,CAAC;EACFd,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE;IACjCE,IAAI,EAAE;MACJU,eAAe,EAAEb,cAAc,CAACgB;IAClC;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -3,15 +3,40 @@ import { View } from 'react-native';
|
|
3
3
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
4
4
|
import WmLayoutgridProps from './layoutgrid.props';
|
5
5
|
import { DEFAULT_CLASS } from './layoutgrid.styles';
|
6
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
6
7
|
export class WmLayoutgridState extends BaseComponentState {}
|
7
8
|
export default class WmLayoutgrid extends BaseComponent {
|
8
9
|
constructor(props) {
|
9
10
|
super(props, DEFAULT_CLASS, new WmLayoutgridProps());
|
10
11
|
}
|
12
|
+
getBackground() {
|
13
|
+
return this._showSkeleton ? null : this._background;
|
14
|
+
}
|
15
|
+
renderSkeleton(props) {
|
16
|
+
if (!props.showskeletonchildren) {
|
17
|
+
var _this$props;
|
18
|
+
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) || {
|
19
|
+
root: {},
|
20
|
+
text: {}
|
21
|
+
};
|
22
|
+
return createSkeleton(this.theme, skeletonStyles, {
|
23
|
+
...this.styles.root
|
24
|
+
}, /*#__PURE__*/React.createElement(View, {
|
25
|
+
style: [this.styles.root, {
|
26
|
+
opacity: 0
|
27
|
+
}]
|
28
|
+
}, props.children));
|
29
|
+
}
|
30
|
+
return null;
|
31
|
+
}
|
11
32
|
renderWidget(props) {
|
33
|
+
const styles = this._showSkeleton ? {
|
34
|
+
...this.styles.root,
|
35
|
+
...this.styles.skeleton.root
|
36
|
+
} : this.styles.root;
|
12
37
|
return /*#__PURE__*/React.createElement(View, {
|
13
|
-
style:
|
14
|
-
}, this.
|
38
|
+
style: styles
|
39
|
+
}, this.getBackground(), props.children);
|
15
40
|
}
|
16
41
|
}
|
17
42
|
//# sourceMappingURL=layoutgrid.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLayoutgridProps","DEFAULT_CLASS","WmLayoutgridState","WmLayoutgrid","constructor","props","
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLayoutgridProps","DEFAULT_CLASS","createSkeleton","WmLayoutgridState","WmLayoutgrid","constructor","props","getBackground","_showSkeleton","_background","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","styles","skeleton","root","text","theme","createElement","style","opacity","children","renderWidget"],"sources":["layoutgrid.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLayoutgridProps from './layoutgrid.props';\nimport { DEFAULT_CLASS, WmLayoutGridStyles } from './layoutgrid.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmLayoutgridState extends BaseComponentState<WmLayoutgridProps> {\n\n}\n\nexport default class WmLayoutgrid extends BaseComponent<WmLayoutgridProps, WmLayoutgridState, WmLayoutGridStyles> {\n\n constructor(props: WmLayoutgridProps) {\n super(props, DEFAULT_CLASS, new WmLayoutgridProps());\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n\n public renderSkeleton(props: WmLayoutgridProps): 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 {props.children}\n </View>))\n }\n return null;\n }\n\n\n renderWidget(props: WmLayoutgridProps) {\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <View style={styles}>{this.getBackground()}{props.children}</View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,iBAAiB,MAAM,oBAAoB;AAClD,SAASC,aAAa,QAA4B,qBAAqB;AAEvE,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,iBAAiB,SAASJ,kBAAkB,CAAoB;AAI7E,eAAe,MAAMK,YAAY,SAASN,aAAa,CAA2D;EAEhHO,WAAWA,CAACC,KAAwB,EAAE;IACpC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,iBAAiB,CAAC,CAAC,CAAC;EACtD;EAEAO,aAAaA,CAAA,EAA6B;IACxC,OAAO,IAAI,CAACC,aAAa,GAAG,IAAI,GAAG,IAAI,CAACC,WAAW;EACrD;EAEOC,cAAcA,CAACJ,KAAwB,EAAmB;IAC/D,IAAG,CAACA,KAAK,CAACK,oBAAoB,EAAE;MAAA,IAAAC,WAAA;MAC9B,MAAMC,cAAgC,GAAG,EAAAD,WAAA,OAAI,CAACN,KAAK,cAAAM,WAAA,gBAAAA,WAAA,GAAVA,WAAA,CAAYE,MAAM,cAAAF,WAAA,uBAAlBA,WAAA,CAAoBG,QAAQ,KAAI;QAAEC,IAAI,EAAE,CAAC,CAAC;QAAEC,IAAI,EAAE,CAAC;MAAG,CAAqB;MACpH,OAAOf,cAAc,CAAC,IAAI,CAACgB,KAAK,EAAEL,cAAc,EAAE;QAChD,GAAG,IAAI,CAACC,MAAM,CAACE;MACjB,CAAC,eAAGpB,KAAA,CAAAuB,aAAA,CAACtB,IAAI;QAACuB,KAAK,EAAE,CAAC,IAAI,CAACN,MAAM,CAACE,IAAI,EAAE;UAAEK,OAAO,EAAE;QAAE,CAAC;MAAE,GACjDf,KAAK,CAACgB,QACH,CAAE,CAAC;IACX;IACA,OAAO,IAAI;EACb;EAGAC,YAAYA,CAACjB,KAAwB,EAAE;IACrC,MAAMQ,MAAM,GAAG,IAAI,CAACN,aAAa,GAAG;MAClC,GAAG,IAAI,CAACM,MAAM,CAACE,IAAI;MACnB,GAAG,IAAI,CAACF,MAAM,CAACC,QAAQ,CAACC;IAC1B,CAAC,GAAG,IAAI,CAACF,MAAM,CAACE,IAAI;IACpB,oBACEpB,KAAA,CAAAuB,aAAA,CAACtB,IAAI;MAACuB,KAAK,EAAEN;IAAO,GAAE,IAAI,CAACP,aAAa,CAAC,CAAC,EAAED,KAAK,CAACgB,QAAe,CAAC;EAEtE;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmLayoutgridProps","constructor","args","_defineProperty"],"sources":["layoutgrid.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLayoutgridProps extends BaseProps {\n children: any;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;EAAA;AAEzD","ignoreList":[]}
|
1
|
+
{"version":3,"names":["BaseProps","WmLayoutgridProps","constructor","args","_defineProperty"],"sources":["layoutgrid.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLayoutgridProps extends BaseProps {\n children: any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;EAAA;AAEzD","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","width","text","backgroundColor","layoutGridBgColor","borderWidth","borderLeftWidth","borderTopWidth","borderStyle","borderColor","layoutGridBorderColor","borderRadius","color","layoutGridHeaderTextColor","fontWeight"],"sources":["layoutgrid.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmLabelStyles } from '@wavemaker/app-rn-runtime/components/basic/label/label.styles';\n\nexport type WmLayoutGridStyles = BaseStyles & {}
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","width","text","skeleton","backgroundColor","layoutGridBgColor","borderWidth","borderLeftWidth","borderTopWidth","borderStyle","borderColor","layoutGridBorderColor","borderRadius","color","layoutGridHeaderTextColor","fontWeight"],"sources":["layoutgrid.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmLabelStyles } from '@wavemaker/app-rn-runtime/components/basic/label/label.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmLayoutGridStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n}\n\nexport const DEFAULT_CLASS = 'app-layoutgrid';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLayoutGridStyles = defineStyles({\n root: {\n flexDirection: 'column',\n width: '100%'\n },\n text: {},\n skeleton: {\n root: {\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n\n addStyle('table', '', {\n root: {\n backgroundColor: themeVariables.layoutGridBgColor,\n borderWidth: 1,\n borderLeftWidth: 1,\n borderTopWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.layoutGridBorderColor,\n borderRadius: 2\n }\n });\n\n addStyle('table-header-label', '', {\n text: {\n color: themeVariables.layoutGridHeaderTextColor,\n fontWeight: 'bold'\n }\n } as WmLabelStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,gBAAgB;AAC7CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAiC,GAAGL,YAAY,CAAC;IACnDM,IAAI,EAAE;MACJC,aAAa,EAAE,QAAQ;MACvBC,KAAK,EAAE;IACT,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACRJ,IAAI,EAAE,CACN;IACF;EACJ,CAAC,CAAC;EAEFF,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAE1CD,QAAQ,CAAC,OAAO,EAAE,EAAE,EAAE;IACpBE,IAAI,EAAE;MACJK,eAAe,EAAER,cAAc,CAACS,iBAAiB;MACjDC,WAAW,EAAE,CAAC;MACdC,eAAe,EAAE,CAAC;MAClBC,cAAc,EAAE,CAAC;MACjBC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEd,cAAc,CAACe,qBAAqB;MACjDC,YAAY,EAAE;IAChB;EACF,CAAC,CAAC;EAEFf,QAAQ,CAAC,oBAAoB,EAAE,EAAE,EAAE;IAC/BK,IAAI,EAAE;MACJW,KAAK,EAAEjB,cAAc,CAACkB,yBAAyB;MAC/CC,UAAU,EAAE;IACd;EACJ,CAAkB,CAAC;AACrB,CAAC,CAAC","ignoreList":[]}
|
@@ -3,6 +3,7 @@ import { View } from 'react-native';
|
|
3
3
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
4
4
|
import WmLinearlayoutProps from './linearlayout.props';
|
5
5
|
import { DEFAULT_CLASS } from './linearlayout.styles';
|
6
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
6
7
|
const ALIGNMENT_MAP = {
|
7
8
|
'top': 'flex-start',
|
8
9
|
'left': 'flex-start',
|
@@ -31,13 +32,38 @@ export default class WmLinearlayout extends BaseComponent {
|
|
31
32
|
}
|
32
33
|
return s;
|
33
34
|
}
|
35
|
+
getBackground() {
|
36
|
+
return this._showSkeleton ? null : this._background;
|
37
|
+
}
|
38
|
+
renderSkeleton(props) {
|
39
|
+
if (!props.showskeletonchildren) {
|
40
|
+
var _this$props;
|
41
|
+
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) || {
|
42
|
+
root: {},
|
43
|
+
text: {}
|
44
|
+
};
|
45
|
+
return createSkeleton(this.theme, skeletonStyles, {
|
46
|
+
...this.styles.root
|
47
|
+
}, /*#__PURE__*/React.createElement(View, {
|
48
|
+
style: [this.styles.root, {
|
49
|
+
opacity: 0
|
50
|
+
}]
|
51
|
+
}, props.children));
|
52
|
+
}
|
53
|
+
return null;
|
54
|
+
}
|
34
55
|
renderWidget(props) {
|
56
|
+
const rootStyles = {
|
57
|
+
...this.getStyles(props),
|
58
|
+
...this.styles.root
|
59
|
+
};
|
60
|
+
const styles = this._showSkeleton ? {
|
61
|
+
...rootStyles,
|
62
|
+
...this.styles.skeleton.root
|
63
|
+
} : rootStyles;
|
35
64
|
return /*#__PURE__*/React.createElement(View, {
|
36
|
-
style:
|
37
|
-
|
38
|
-
...this.styles.root
|
39
|
-
}
|
40
|
-
}, this._background, props.children);
|
65
|
+
style: styles
|
66
|
+
}, this.getBackground(), props.children);
|
41
67
|
}
|
42
68
|
}
|
43
69
|
//# sourceMappingURL=linearlayout.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLinearlayoutProps","DEFAULT_CLASS","ALIGNMENT_MAP","WmLinearlayoutState","WmLinearlayout","constructor","props","getStyles","s","direction","display","width","flexDirection","isHorizontal","startsWith","justifyContent","horizontalalign","alignItems","verticalalign","
|
1
|
+
{"version":3,"names":["React","View","BaseComponent","BaseComponentState","WmLinearlayoutProps","DEFAULT_CLASS","createSkeleton","ALIGNMENT_MAP","WmLinearlayoutState","WmLinearlayout","constructor","props","getStyles","s","direction","display","width","flexDirection","isHorizontal","startsWith","justifyContent","horizontalalign","alignItems","verticalalign","getBackground","_showSkeleton","_background","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","styles","skeleton","root","text","theme","createElement","style","opacity","children","renderWidget","rootStyles"],"sources":["linearlayout.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewStyle } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLinearlayoutProps from './linearlayout.props';\nimport { DEFAULT_CLASS, WmLinearlayoutStyles } from './linearlayout.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nconst ALIGNMENT_MAP = {\n 'top': 'flex-start',\n 'left': 'flex-start',\n 'center': 'center',\n 'right': 'flex-end',\n 'bottom': 'flex-end'\n} as any;\n\nexport class WmLinearlayoutState extends BaseComponentState<WmLinearlayoutProps> {}\n\nexport default class WmLinearlayout extends BaseComponent<WmLinearlayoutProps, WmLinearlayoutState, WmLinearlayoutStyles> {\n\n constructor(props: WmLinearlayoutProps) {\n super(props, DEFAULT_CLASS, new WmLinearlayoutProps());\n }\n\n getStyles(props: WmLinearlayoutProps) {\n const s = {} as ViewStyle;\n const direction = props.direction;\n s.display = 'flex';\n s.width = \"100%\";\n s.flexDirection = direction;\n const isHorizontal = direction.startsWith('row');\n if (isHorizontal) {\n s.justifyContent = ALIGNMENT_MAP[props.horizontalalign];\n s.alignItems = ALIGNMENT_MAP[props.verticalalign];\n } else {\n s.justifyContent = ALIGNMENT_MAP[props.verticalalign];\n s.alignItems = ALIGNMENT_MAP[props.horizontalalign];\n }\n return s;\n }\n\n protected getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n public renderSkeleton(props: WmLinearlayoutProps): 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 {props.children}\n </View>))\n }\n return null;\n }\n\n\n renderWidget(props: WmLinearlayoutProps) {\n\n const rootStyles = {...this.getStyles(props), ...this.styles.root}\n const styles = this._showSkeleton ? {\n ...rootStyles,\n ...this.styles.skeleton.root\n } : rootStyles\n\n return (<View style={styles}>\n {this.getBackground()}{props.children}\n </View>); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAmB,cAAc;AAC9C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,mBAAmB,MAAM,sBAAsB;AACtD,SAASC,aAAa,QAA8B,uBAAuB;AAE3E,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,MAAMC,aAAa,GAAG;EACpB,KAAK,EAAG,YAAY;EACpB,MAAM,EAAE,YAAY;EACpB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,UAAU;EACnB,QAAQ,EAAE;AACZ,CAAQ;AAER,OAAO,MAAMC,mBAAmB,SAASL,kBAAkB,CAAsB;AAEjF,eAAe,MAAMM,cAAc,SAASP,aAAa,CAAiE;EAExHQ,WAAWA,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,mBAAmB,CAAC,CAAC,CAAC;EACxD;EAEAQ,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AK,EAAE,CAAC,IAAI,CAACN,MAAM,CAACE,IAAI,EAAE;UAAEK,OAAO,EAAE;QAAE,CAAC;MAAE,GACjD3B,KAAK,CAAC4B,QACH,CAAE,CAAC;IACX;IACA,OAAO,IAAI;EACb;EAGFC,YAAYA,CAAC7B,KAA0B,EAAE;IAEvC,MAAM8B,UAAU,GAAG;MAAC,GAAG,IAAI,CAAC7B,SAAS,CAACD,KAAK,CAAC;MAAE,GAAG,IAAI,CAACoB,MAAM,CAACE;IAAI,CAAC;IAClE,MAAMF,MAAM,GAAG,IAAI,CAACN,aAAa,GAAG;MAClC,GAAGgB,UAAU;MACb,GAAG,IAAI,CAACV,MAAM,CAACC,QAAQ,CAACC;IAC1B,CAAC,GAAGQ,UAAU;IAEd,oBAAQzC,KAAA,CAAAoC,aAAA,CAACnC,IAAI;MAACoC,KAAK,EAAEN;IAAO,GACzB,IAAI,CAACP,aAAa,CAAC,CAAC,EAAEb,KAAK,CAAC4B,QACvB,CAAC;EACX;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmLinearlayoutProps","constructor","args","_defineProperty"],"sources":["linearlayout.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLinearlayoutProps extends BaseProps {\n children? = [] as any[];\n direction: 'row'|'row-reverse' | 'column' | 'column-reverse' = 'row';\n horizontalalign: 'left' | 'center' | 'right' = 'left';\n verticalalign: 'top' | 'center' | 'bottom' = 'top';\n spacing = 0;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,mBAAmB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAC3C,EAAE;IAAAA,eAAA,oBACiD,KAAK;IAAAA,eAAA,0BACrB,MAAM;IAAAA,eAAA,wBACR,KAAK;IAAAA,eAAA,kBACxC,CAAC;EAAA;AACf","ignoreList":[]}
|
1
|
+
{"version":3,"names":["BaseProps","WmLinearlayoutProps","constructor","args","_defineProperty"],"sources":["linearlayout.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmLinearlayoutProps extends BaseProps {\n children? = [] as any[];\n direction: 'row'|'row-reverse' | 'column' | 'column-reverse' = 'row';\n horizontalalign: 'left' | 'center' | 'right' = 'left';\n verticalalign: 'top' | 'center' | 'bottom' = 'top';\n spacing = 0;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,mBAAmB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAC3C,EAAE;IAAAA,eAAA,oBACiD,KAAK;IAAAA,eAAA,0BACrB,MAAM;IAAAA,eAAA,wBACR,KAAK;IAAAA,eAAA,kBACxC,CAAC;EAAA;AACf","ignoreList":[]}
|
@@ -4,7 +4,10 @@ export const DEFAULT_CLASS = 'app-linearlayout';
|
|
4
4
|
BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
5
5
|
const defaultStyles = defineStyles({
|
6
6
|
root: {},
|
7
|
-
text: {}
|
7
|
+
text: {},
|
8
|
+
skeleton: {
|
9
|
+
root: {}
|
10
|
+
}
|
8
11
|
});
|
9
12
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
10
13
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text"],"sources":["linearlayout.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmLinearlayoutStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-linearlayout';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLinearlayoutStyles = defineStyles({\n root: {},\n text: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","skeleton"],"sources":["linearlayout.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmLinearlayoutStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-linearlayout';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmLinearlayoutStyles = defineStyles({\n root: {},\n text: {},\n skeleton: {\n root: {\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,kBAAkB;AAC/CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAmC,GAAGL,YAAY,CAAC;IACrDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNF,IAAI,EAAE,CACN;IACJ;EACJ,CAAC,CAAC;EAEFF,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
|
@@ -12,6 +12,8 @@ import WmPanelProps from './panel.props';
|
|
12
12
|
import { DEFAULT_CLASS } from './panel.styles';
|
13
13
|
import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
|
14
14
|
import { CollapsiblePane } from './collapsible-pane.component';
|
15
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
16
|
+
import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
|
15
17
|
export class WmPanelState extends BaseComponentState {
|
16
18
|
constructor(...args) {
|
17
19
|
super(...args);
|
@@ -90,9 +92,21 @@ export default class WmPanel extends BaseComponent {
|
|
90
92
|
flex: 1,
|
91
93
|
justifyContent: 'center'
|
92
94
|
}
|
93
|
-
}, /*#__PURE__*/React.createElement(
|
95
|
+
}, this._showSkeleton ? /*#__PURE__*/React.createElement(WmLabel, {
|
96
|
+
showskeleton: true,
|
97
|
+
styles: {
|
98
|
+
root: [this.styles.text, this.styles.heading]
|
99
|
+
},
|
100
|
+
caption: isUndefined(props.title) ? 'Title' : props.title
|
101
|
+
}) : /*#__PURE__*/React.createElement(Text, _extends({
|
94
102
|
style: [this.styles.text, this.styles.heading]
|
95
|
-
}, this.getTestPropsForAction(`header_title`)), isUndefined(props.title) ? 'Title' : props.title), props.subheading ? /*#__PURE__*/React.createElement(
|
103
|
+
}, this.getTestPropsForAction(`header_title`)), isUndefined(props.title) ? 'Title' : props.title), props.subheading ? this._showSkeleton ? /*#__PURE__*/React.createElement(WmLabel, {
|
104
|
+
showskeleton: true,
|
105
|
+
styles: {
|
106
|
+
root: this.styles.subheading
|
107
|
+
},
|
108
|
+
caption: props.subheading
|
109
|
+
}) : /*#__PURE__*/React.createElement(Text, _extends({
|
96
110
|
style: this.styles.subheading
|
97
111
|
}, this.getTestPropsForAction(`subheader`)), props.subheading) : null), this.expandCollapseIcon(props.expanded));
|
98
112
|
}
|
@@ -107,10 +121,34 @@ export default class WmPanel extends BaseComponent {
|
|
107
121
|
close: !expanded
|
108
122
|
}, content);
|
109
123
|
}
|
124
|
+
getBackground() {
|
125
|
+
return this._showSkeleton ? null : this._background;
|
126
|
+
}
|
127
|
+
renderSkeleton(props) {
|
128
|
+
if (!props.showskeletonchildren) {
|
129
|
+
var _this$props;
|
130
|
+
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) || {
|
131
|
+
root: {},
|
132
|
+
text: {}
|
133
|
+
};
|
134
|
+
return createSkeleton(this.theme, skeletonStyles, {
|
135
|
+
...this.styles.root
|
136
|
+
}, /*#__PURE__*/React.createElement(View, {
|
137
|
+
style: [this.styles.root, {
|
138
|
+
opacity: 0
|
139
|
+
}]
|
140
|
+
}, this.renderHeader(), this.renderPane( /*#__PURE__*/React.createElement(React.Fragment, null, this.renderContent(props), /*#__PURE__*/React.createElement(View, null, props.children)))));
|
141
|
+
}
|
142
|
+
return null;
|
143
|
+
}
|
110
144
|
renderWidget(props) {
|
145
|
+
const styles = this._showSkeleton ? {
|
146
|
+
...this.styles.root,
|
147
|
+
...this.styles.skeleton.root
|
148
|
+
} : this.styles.root;
|
111
149
|
return /*#__PURE__*/React.createElement(View, {
|
112
|
-
style:
|
113
|
-
}, this.
|
150
|
+
style: styles
|
151
|
+
}, this.getBackground(), this.renderHeader(), this.renderPane( /*#__PURE__*/React.createElement(React.Fragment, null, this.renderContent(props), /*#__PURE__*/React.createElement(View, null, props.children))));
|
114
152
|
}
|
115
153
|
}
|
116
154
|
//# 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","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","text","heading","title","subheading","renderPane","content","display","maxHeight","overflow","close","renderWidget","root","_background","Fragment","children"],"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';\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 <Text style={[\n this.styles.text,\n this.styles.heading]}\n {...this.getTestPropsForAction(`header_title`)}>\n {isUndefined(props.title) ? 'Title' : props.title}\n </Text>\n {props.subheading ? \n (<Text style={this.styles.subheading}\n {...this.getTestPropsForAction(`subheader`)}>{props.subheading}</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 renderWidget(props: WmPanelProps) {\n return (<View style={this.styles.root}>\n {this._background}\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,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AC1B,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","_showSkeleton","showskeleton","root","text","heading","caption","title","subheading","renderPane","content","display","maxHeight","overflow","close","getBackground","_background","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","skeleton","theme","opacity","Fragment","children","renderWidget"],"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 {\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>\n }\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 (<View style={styles}>\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,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,YAAYA,CAACvE,KAAmB,EAAE;IAChC,MAAMwB,MAAM,GAAG,IAAI,CAACsB,aAAa,GAAG;MAClC,GAAG,IAAI,CAACtB,MAAM,CAACwB,IAAI;MACnB,GAAG,IAAI,CAACxB,MAAM,CAAC0C,QAAQ,CAAClB;IAC1B,CAAC,GAAG,IAAI,CAACxB,MAAM,CAACwB,IAAI;IACpB,oBAAQpE,KAAA,CAAAyC,aAAA,CAACvC,IAAI;MAACyC,KAAK,EAAEC;IAAO,GACzB,IAAI,CAACoC,aAAa,CAAC,CAAC,EACpB,IAAI,CAAC1B,YAAY,CAAC,CAAC,EACnB,IAAI,CAACoB,UAAU,eACd1E,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 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmPanelProps","constructor","args","_defineProperty"],"sources":["panel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPanelProps extends BaseProps {\n animation: string = null as any;\n children: any;\n collapsible: boolean = null as any;\n iconclass: string = null as any;\n title: string = 'Title';\n renderPartial?: Function;\n subheading: string = null as any;\n badgevalue: string = null as any;\n badgetype: string = 'default';\n expanded: boolean = true;\n iconurl?: string = null as any;\n iconheight?: number = null as any;\n iconwidth?: number = null as any;\n iconmargin?: number = null as any;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC9B,IAAI;IAAAA,eAAA;IAAAA,eAAA,sBAED,IAAI;IAAAA,eAAA,oBACP,IAAI;IAAAA,eAAA,gBACR,OAAO;IAAAA,eAAA;IAAAA,eAAA,qBAEF,IAAI;IAAAA,eAAA,qBACJ,IAAI;IAAAA,eAAA,oBACL,SAAS;IAAAA,eAAA,mBACT,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,qBACD,IAAI;IAAAA,eAAA,oBACL,IAAI;IAAAA,eAAA,qBACH,IAAI;EAAA;AAC5B","ignoreList":[]}
|
1
|
+
{"version":3,"names":["BaseProps","WmPanelProps","constructor","args","_defineProperty"],"sources":["panel.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmPanelProps extends BaseProps {\n animation: string = null as any;\n children: any;\n collapsible: boolean = null as any;\n iconclass: string = null as any;\n title: string = 'Title';\n renderPartial?: Function;\n subheading: string = null as any;\n badgevalue: string = null as any;\n badgetype: string = 'default';\n expanded: boolean = true;\n iconurl?: string = null as any;\n iconheight?: number = null as any;\n iconwidth?: number = null as any;\n iconmargin?: number = null as any;\n}\n\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,YAAY,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBAC9B,IAAI;IAAAA,eAAA;IAAAA,eAAA,sBAED,IAAI;IAAAA,eAAA,oBACP,IAAI;IAAAA,eAAA,gBACR,OAAO;IAAAA,eAAA;IAAAA,eAAA,qBAEF,IAAI;IAAAA,eAAA,qBACJ,IAAI;IAAAA,eAAA,oBACL,SAAS;IAAAA,eAAA,mBACT,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,qBACD,IAAI;IAAAA,eAAA,oBACL,IAAI;IAAAA,eAAA,qBACH,IAAI;EAAA;AAC5B","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","backgroundColor","panelBgColor","borderStyle","borderWidth","padding","borderRadius","text","color","panelHeaderTextColor","fontSize","fontWeight","header","flexDirection","panelHeaderBgColor","paddingHorizontal","paddingVertical","borderColor","borderTopLeftRadius","borderTopRightRadius","heading","subheading","icon","alignSelf","toggleIcon","badge","badgeTextColor","marginRight","default","labelDefaultColor","success","labelSuccessColor","danger","labelDangerColor","warning","labelWarningColor","info","labelInfoColor","primary","labelPrimaryColor","OS","textAlign","getPanelBgStyles","panelTextColor","panelDangerColor","panelDefaultColor","panelInfoColor","panelPrimaryColor","panelSuccessColor","panelWarningColor"],"sources":["panel.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { Platform } from 'react-native';\n\nexport type WmPanelStyles = BaseStyles & {\n icon: WmIconStyles,\n badge: AllStyle,\n header: AllStyle,\n subheading: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-panel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPanelStyles = defineStyles({\n root: {\n backgroundColor: themeVariables.panelBgColor,\n borderStyle: 'solid',\n borderWidth: 0,\n padding: 12,\n borderRadius: 6\n },\n text: {\n color: themeVariables.panelHeaderTextColor,\n fontSize: 16,\n fontWeight: 'bold'\n },\n header: {\n flexDirection: 'row',\n backgroundColor: themeVariables.panelHeaderBgColor,\n paddingHorizontal: 8,\n paddingVertical: 4,\n borderStyle: 'solid',\n borderWidth: 0,\n borderColor: themeVariables.panelHeaderBgColor,\n borderTopLeftRadius: 6,\n borderTopRightRadius: 6\n },\n heading: {\n paddingHorizontal: 16\n },\n subheading: {\n paddingHorizontal: 16\n },\n icon: {\n root: {\n alignSelf: 'auto',\n fontSize: 32,\n },\n } as WmIconStyles,\n toggleIcon: {\n root: {\n fontSize: 16,\n },\n } as WmIconStyles,\n badge: {\n color: themeVariables.badgeTextColor,\n marginRight: 8,\n alignSelf: 'center'\n },\n default: {\n backgroundColor: themeVariables.labelDefaultColor\n },\n success: {\n backgroundColor: themeVariables.labelSuccessColor\n },\n danger: {\n backgroundColor: themeVariables.labelDangerColor\n },\n warning: {\n backgroundColor: themeVariables.labelWarningColor\n },\n info: {\n backgroundColor: themeVariables.labelInfoColor\n },\n primary: {\n backgroundColor: themeVariables.labelPrimaryColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n text:{\n textAlign:'right',\n } ,\n subheading:{\n textAlign:'right',\n }\n }:{});\n const getPanelBgStyles = (color: string) => {\n return {\n header: {\n backgroundColor: color\n },\n text: {\n color: themeVariables.panelTextColor\n },\n subheading: {\n color: themeVariables.panelTextColor\n },\n icon: {\n text: {\n color: themeVariables.panelTextColor\n }\n } as WmIconStyles\n } as WmPanelStyles;\n };\n\n addStyle('panel-danger', '', getPanelBgStyles(themeVariables.panelDangerColor));\n addStyle('panel-default', '', getPanelBgStyles(themeVariables.panelDefaultColor));\n addStyle('panel-info', '', getPanelBgStyles(themeVariables.panelInfoColor));\n addStyle('panel-primary', '', getPanelBgStyles(themeVariables.panelPrimaryColor));\n addStyle('panel-success', '', getPanelBgStyles(themeVariables.panelSuccessColor));\n addStyle('panel-warning', '', getPanelBgStyles(themeVariables.panelWarningColor));\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,QAAQ,QAAQ,cAAc;
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","Platform","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","backgroundColor","panelBgColor","borderStyle","borderWidth","padding","borderRadius","text","color","panelHeaderTextColor","fontSize","fontWeight","header","flexDirection","panelHeaderBgColor","paddingHorizontal","paddingVertical","borderColor","borderTopLeftRadius","borderTopRightRadius","heading","subheading","icon","alignSelf","toggleIcon","badge","badgeTextColor","marginRight","default","labelDefaultColor","success","labelSuccessColor","danger","labelDangerColor","warning","labelWarningColor","info","labelInfoColor","primary","labelPrimaryColor","skeleton","OS","textAlign","getPanelBgStyles","panelTextColor","panelDangerColor","panelDefaultColor","panelInfoColor","panelPrimaryColor","panelSuccessColor","panelWarningColor"],"sources":["panel.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { Platform } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmPanelStyles = BaseStyles & {\n icon: WmIconStyles,\n badge: AllStyle,\n header: AllStyle,\n subheading: AllStyle,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-panel';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPanelStyles = defineStyles({\n root: {\n backgroundColor: themeVariables.panelBgColor,\n borderStyle: 'solid',\n borderWidth: 0,\n padding: 12,\n borderRadius: 6\n },\n text: {\n color: themeVariables.panelHeaderTextColor,\n fontSize: 16,\n fontWeight: 'bold'\n },\n header: {\n flexDirection: 'row',\n backgroundColor: themeVariables.panelHeaderBgColor,\n paddingHorizontal: 8,\n paddingVertical: 4,\n borderStyle: 'solid',\n borderWidth: 0,\n borderColor: themeVariables.panelHeaderBgColor,\n borderTopLeftRadius: 6,\n borderTopRightRadius: 6\n },\n heading: {\n paddingHorizontal: 16\n },\n subheading: {\n paddingHorizontal: 16\n },\n icon: {\n root: {\n alignSelf: 'auto',\n fontSize: 32,\n },\n } as WmIconStyles,\n toggleIcon: {\n root: {\n fontSize: 16,\n },\n } as WmIconStyles,\n badge: {\n color: themeVariables.badgeTextColor,\n marginRight: 8,\n alignSelf: 'center'\n },\n default: {\n backgroundColor: themeVariables.labelDefaultColor\n },\n success: {\n backgroundColor: themeVariables.labelSuccessColor\n },\n danger: {\n backgroundColor: themeVariables.labelDangerColor\n },\n warning: {\n backgroundColor: themeVariables.labelWarningColor\n },\n info: {\n backgroundColor: themeVariables.labelInfoColor\n },\n primary: {\n backgroundColor: themeVariables.labelPrimaryColor\n },\n skeleton: {\n root: {\n }\n } as WmSkeletonStyles, \n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', Platform.OS==\"web\"?{\n text:{\n textAlign:'right',\n } ,\n subheading:{\n textAlign:'right',\n }\n }:{});\n const getPanelBgStyles = (color: string) => {\n return {\n header: {\n backgroundColor: color\n },\n text: {\n color: themeVariables.panelTextColor\n },\n subheading: {\n color: themeVariables.panelTextColor\n },\n icon: {\n text: {\n color: themeVariables.panelTextColor\n }\n } as WmIconStyles\n } as WmPanelStyles;\n };\n\n addStyle('panel-danger', '', getPanelBgStyles(themeVariables.panelDangerColor));\n addStyle('panel-default', '', getPanelBgStyles(themeVariables.panelDefaultColor));\n addStyle('panel-info', '', getPanelBgStyles(themeVariables.panelInfoColor));\n addStyle('panel-primary', '', getPanelBgStyles(themeVariables.panelPrimaryColor));\n addStyle('panel-success', '', getPanelBgStyles(themeVariables.panelSuccessColor));\n addStyle('panel-warning', '', getPanelBgStyles(themeVariables.panelWarningColor));\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,SAASC,QAAQ,QAAQ,cAAc;AAWvC,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA4B,GAAGN,YAAY,CAAC;IAC9CO,IAAI,EAAE;MACJC,eAAe,EAAEJ,cAAc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AACoD,iBAAiB,CAAC,CAAC;EACjFnD,QAAQ,CAAC,eAAe,EAAE,EAAE,EAAE6C,gBAAgB,CAAC9C,cAAc,CAACqD,iBAAiB,CAAC,CAAC;AACnF,CAAC,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseComponent","BaseComponentState","BaseProps","PartialHostState","constructor","args","_defineProperty","PartialHostProps","PartialHost","markupProps","defaultClass","defaultProps","defaultState","onPartialLoad","invokeEventCallback","renderContent","props","renderPartial","state","isPartialLoaded","isVisible","setTimeout","updateState","bind","children"],"sources":["partial-host.component.tsx"],"sourcesContent":["import { BaseComponent, BaseComponentState, BaseProps, BaseStyles } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport abstract class PartialHostState<T extends BaseProps> extends BaseComponentState<T> {\n isPartialLoaded = false;\n}\n\nexport abstract class PartialHostProps extends BaseProps {\n
|
1
|
+
{"version":3,"names":["BaseComponent","BaseComponentState","BaseProps","PartialHostState","constructor","args","_defineProperty","PartialHostProps","PartialHost","markupProps","defaultClass","defaultProps","defaultState","onPartialLoad","invokeEventCallback","renderContent","props","renderPartial","state","isPartialLoaded","isVisible","setTimeout","updateState","bind","children"],"sources":["partial-host.component.tsx"],"sourcesContent":["import { BaseComponent, BaseComponentState, BaseProps, BaseStyles } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { WmSkeletonStyles } from \"../basic/skeleton/skeleton.styles\";\n\n\nexport type PartialHostStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n}\nexport abstract class PartialHostState<T extends BaseProps> extends BaseComponentState<T> {\n isPartialLoaded = false;\n}\n\nexport abstract class PartialHostProps extends BaseProps {\n renderPartial?: Function;\n children?: any;\n }\n \n \nexport abstract class PartialHost<T extends PartialHostProps, S extends PartialHostState<T>, L extends PartialHostStyles>\n extends BaseComponent<T, S, L> {\n\n constructor(markupProps: T, defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps, defaultClass, defaultProps, defaultState);\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [this]);\n }\n\n renderContent(props: PartialHostProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded && !this.isVisible()) {\n return null;\n }\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as any);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n}"],"mappings":";;;AAAA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,SAAS,QAAoB,+CAA+C;AAOxH,OAAO,MAAeC,gBAAgB,SAA8BF,kBAAkB,CAAI;EAAAG,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BACpE,KAAK;EAAA;AAC3B;AAEA,OAAO,MAAeC,gBAAgB,SAASL,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA;EAAA;AAGvD;AAGF,OAAO,MAAeE,WAAW,SACrBR,aAAa,CAAU;EAE/BI,WAAWA,CAACK,WAAc,EAAEC,YAAoB,EAAEC,YAAgB,EAAEC,YAAgB,EAAE;IAClF,KAAK,CAACH,WAAW,EAAEC,YAAY,EAAEC,YAAY,EAAEC,YAAY,CAAC;EAChE;EAEAC,aAAaA,CAAA,EAAG;IACZ,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;EAC9C;EAEAC,aAAaA,CAACC,KAAuB,EAAE;IACnC,IAAIA,KAAK,CAACC,aAAa,EAAE;MACrB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,IAAI,CAAC,IAAI,CAACC,SAAS,CAAC,CAAC,EAAE;QAClD,OAAO,IAAI;MACf;MACA,IAAI,CAAC,IAAI,CAACF,KAAK,CAACC,eAAe,EAAE;QAC7BE,UAAU,CAAC,MAAM;UACb,IAAI,CAACC,WAAW,CAAC;YACbH,eAAe,EAAE;UACrB,CAAQ,CAAC;QACb,CAAC,CAAC;MACN;MACA,OAAOH,KAAK,CAACC,aAAa,CAACD,KAAK,EAAE,IAAI,CAACH,aAAa,CAACU,IAAI,CAAC,IAAI,CAAC,CAAC;IACpE;IACA,OAAOP,KAAK,CAACQ,QAAQ;EACzB;AAEJ","ignoreList":[]}
|