@wavemaker/app-rn-runtime 12.0.0-next.45752 → 12.0.0-rc.5849
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 +13 -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 +9 -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 +5 -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.component.js +2 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.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.component.js +2 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.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/container/accordion/accordion.component.js +58 -11
- 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 +11 -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 +28 -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 +43 -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 +2 -2
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +38 -5
- app-rn-runtime/components/container/tabs/tabs.component.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 +28 -2
- 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 +39 -6
- 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 +32 -24
- 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 +21 -1
- 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 +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +21 -1
- 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 +1 -0
- 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/content/content.component.js +19 -4
- app-rn-runtime/components/page/content/content.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 +27 -1
- 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/prefab/prefab-container.component.js +27 -1
- 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 +3 -2
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/props.provider.js +0 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +10 -4
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/utils.js +5 -0
- app-rn-runtime/core/utils.js.map +1 -1
- app-rn-runtime/package.json +3 -3
- app-rn-runtime/runtime/App.js +2 -7
- app-rn-runtime/runtime/App.js.map +1 -1
- 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 +17 -1
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +5 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +1 -0
- app-rn-runtime/styles/theme.variables.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","get","filter","isNil","TestIdPrefixProvider","TextIdPrefixConsumer","injector","toBoolean","toNumber","isFullPathUrl","BaseComponent","BaseProps","BASE_THEME","ThemeProvider","VariableEvents","default","_viewPort","EVENTS","viewportEvents","WmFormField","WmForm","ToastConsumer","spinnerService","AppI18nService","WmFormAction","FragmentProps","BaseFragment","constructor","props","defaultProps","_defineProperty","createElement","text","title","okButtonText","cancelButtonText","onOk","onCancel","onClose","App","appConfig","app","formatters","Actions","Object","assign","Variables","cleanup","push","subscribe","ORIENTATION_CHANGE","$new","$old","isDetached","targetWidget","invokeEventCallback","proxy","screenWidth","width","screenHeight","height","SIZE_CHANGE","_this$theme","theme","destroy","baseUrl","url","resourceBaseUrl","onDestroy","onContentReady","onReady","refresh","onComponentChange","w","onComponentInit","id","name","formWidgets","formFields","formActions","Widgets","buttonArray","parentFormRef","pid","forEach","ff","formKey","registerFormFields","registerFormActions","formfield","formRef","fragments","onComponentDestroy","formfields","handleUrl","startsWith","getDateFormat","fmt","dateFormat","replace","getTimeFormat","timeFormat","getDateTimeFormat","dateTimeFormat","getCurrencySymbol","currencyCode","getStyle","classes","inlineStyles","trim","length","mergeStyle","getFormFieldStyles","formField","type","_formField$classname","suffix","classname","split","map","s","join","resetAppLocale","appLocale","messages","values","f","eval","fn","failOnError","call","e","val","componentWillUnmount","componentDidMount","memoize","key","o","_memoize","initVariableSpinner","variables","v","actions","concat","BEFORE_INVOKE","show","message","spinner","AFTER_INVOKE","hide","onFragmentReady","cleanUpVariablesandActions","fragmentVariables","fragmentActions","startUpActions","a","invoke","Promise","all","startUpVariables","catch","error","console","then","startUpVariablesLoaded","showContent","onAttach","_this$targetWidget","watcher","isActive","unmute","refreshdataonattach","componentWillAttach","onDetach","_this$targetWidget2","mute","componentWillDetach","forceUpdate","generateTestIdPrefix","testId","getTestId","reduce","i","charCodeAt","render","autoUpdateVariables","value","_this$Variables$value","invokeOnParamChange","isVisible","testIdPrefix","toastService","toaster","renderWidget"],"sources":["base-fragment.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { get, filter, isNil } from 'lodash';\n\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { Formatter } from '@wavemaker/app-rn-runtime/core/formatters';\nimport { TestIdPrefixProvider, TextIdPrefixConsumer } from '@wavemaker/app-rn-runtime/core/testid.provider';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { toBoolean, toNumber, isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseComponent, BaseComponentState, BaseStyles, BaseProps, LifecycleListener } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BASE_THEME, { Theme, ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseVariable, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport { default as _viewPort, EVENTS as viewportEvents } from '@wavemaker/app-rn-runtime/core/viewport';\nimport App from './App';\nimport WmFormField from '@wavemaker/app-rn-runtime/components/data/form/form-field/form-field.component';\nimport WmForm from '@wavemaker/app-rn-runtime/components/data/form/form.component';\nimport { ToastConsumer, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport spinnerService from '@wavemaker/app-rn-runtime/runtime/services/app-spinner.service';\n\nimport AppI18nService from './services/app-i18n.service';\nimport { Watcher } from './watcher';\nimport WmFormAction from '@wavemaker/app-rn-runtime/components/data/form/form-action/form-action.component';\n\nexport class FragmentProps extends BaseProps {\n\n}\n\nexport interface FragmentState<T extends FragmentProps> extends BaseComponentState<T> {}\n\nexport type FragmentStyles = BaseStyles & {};\nexport default abstract class BaseFragment<P extends FragmentProps, S extends FragmentState<P>> extends BaseComponent<P, S, FragmentStyles> implements LifecycleListener {\n public App: App;\n public onReady: Function = () => {};\n public baseUrl = '';\n public resourceBaseUrl = '';\n public targetWidget = null as unknown as BaseComponent<any, any, any>;\n public Widgets: any = {};\n public Variables: any = {};\n public theme: Theme = BASE_THEME;\n public appLocale: any = {};\n private startUpVariables: string[] = [];\n private startUpVariablesLoaded = false;\n private startUpActions: string[] = [];\n private autoUpdateVariables: string[] = [];\n private cleanUpVariablesandActions: BaseVariable<any>[] = [];\n public fragmentVariables: any = {};\n public fragmentActions: any = {};\n public Actions: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n public cache = false;\n public refreshdataonattach= true;\n public isReactNativeApp = true;\n public fragments: any = {};\n public isDetached = false;\n public _memoize = {} as any;\n public toaster: any;\n public formatters: Map<string, Formatter>;\n public serviceDefinitions = {} as any;\n public Viewport = _viewPort;\n public loadingMessage = React.createElement(Text, [] as any, ['loading...']);\n public showContent = false;\n public notification = {\n text: '',\n title: '',\n okButtonText: '',\n cancelButtonText: '',\n onOk: () => {},\n onCancel: () => {},\n onClose: () => {}\n };\n public watcher: Watcher = null as any;\n constructor(props: P, defaultProps?: P) {\n super(props, null as any, defaultProps);\n this.App = this.appConfig.app;\n this.formatters = this.App.formatters;\n this.Actions = Object.assign({}, this.App.Actions);\n this.Variables = Object.assign({}, this.App.Variables);\n this.cleanup.push(_viewPort.subscribe(viewportEvents.ORIENTATION_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onOrientationchange', [null, this.proxy,\n {screenWidth: _viewPort.width,\n screenHeight: _viewPort.height}]);\n }));\n this.cleanup.push(_viewPort.subscribe(viewportEvents.SIZE_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onResize', [null, this.proxy,\n {screenWidth: $new.width,\n screenHeight: $new.height}]);\n }));\n this.cleanup.push(() => this.theme?.destroy());\n this.baseUrl = this.appConfig.url;\n this.resourceBaseUrl = this.appConfig.url;\n this.cleanup.push(() => this.onDestroy());\n }\n\n onContentReady() {\n this.onReady();\n this.appConfig.refresh();\n this.targetWidget && this.targetWidget.invokeEventCallback('onLoad', [null, this.proxy]);\n this.onContentReady = () => {};\n }\n\n onComponentChange(w: BaseComponent<any, any, any>) {\n this.refresh();\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n let formWidgets: any, formFields: any, formActions: any;\n\n if (w instanceof WmForm) {\n if (!this.Widgets[id]) {\n this.Widgets[id] = w;\n }\n if (w.props.id) {\n const name: any = w.props.name;\n formWidgets = this.Widgets[name].formWidgets;\n formFields = this.Widgets[name].formFields;\n formActions = this.Widgets[name].buttonArray;\n this.Widgets[name].formFields = [];\n this.Widgets[name].buttonArray = [];\n this.Widgets[name].formWidgets = {};\n } else {\n formWidgets = this.Widgets[id].formWidgets;\n formFields = this.Widgets[id].formFields;\n formActions = this.Widgets[id].buttonArray;\n }\n this.Widgets[id] = w;\n if (w.parentFormRef) {\n let pid = w.parentFormRef.props.id || w.parentFormRef.props.name;\n formFields.forEach((ff: any) => {\n const formKey = ff.props.formKey || ff.props.name;\n this.Widgets[pid].formFields.push(ff);\n this.Widgets[pid].formWidgets[formKey] = formWidgets[ff.props.name];\n });\n }\n w.registerFormFields(formFields, formWidgets);\n w.registerFormActions(formActions);\n return;\n }\n if (w.props.formfield) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {formFields: [], formWidgets: {}};\n } else if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n if (!this.Widgets[w.props.formRef].formWidgets) {\n this.Widgets[w.props.formRef].formWidgets = {}\n }\n this.Widgets[w.props.formRef].formWidgets[w.props.name] = w;\n return;\n }\n if (w instanceof WmFormAction) {\n if (!this.Widgets[w.props.formKey]) {\n this.Widgets[w.props.formKey] = {};\n }\n if (!this.Widgets[w.props.formKey].buttonArray) {\n this.Widgets[w.props.formKey].buttonArray = [];\n }\n this.Widgets[w.props.formKey].buttonArray.push(w);\n return;\n }\n\n if (w instanceof WmFormField) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {};\n }\n if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets = this.Widgets[w.props.formRef].formWidgets || {};\n this.Widgets[w.props.formRef].formFields.push(w);\n return;\n }\n this.Widgets[id] = w;\n if (w instanceof BaseFragment && w !== this) {\n this.fragments[id] = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n delete this.Widgets[id];\n if (w instanceof BaseFragment) {\n delete this.fragments[id];\n }\n if (w instanceof WmForm) {\n w.formWidgets = {};\n w.formFields = [];\n w.formfields = {};\n }\n }\n\n handleUrl(url: string) {\n if (isFullPathUrl(url)) {\n return url;\n }\n return this.appConfig.url + (url.startsWith('/') ? '' : '/') + url;\n }\n\n getDateFormat(fmt?: string) {\n // getting formats from appLocale when app locale is loaded locally.\n return (fmt || AppI18nService.dateFormat || get(this.appConfig, 'appLocale.formats.date')).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getTimeFormat(fmt?: string) {\n return fmt || AppI18nService.timeFormat || get(this.appConfig, 'appLocale.formats.time');\n }\n\n getDateTimeFormat(fmt?: string) {\n return (fmt || AppI18nService.dateTimeFormat || (get(this.appConfig, 'appLocale.formats.date') + ' ' + get(this.appConfig, 'appLocale.formats.time'))).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getCurrencySymbol(fmt?: string) {\n return (fmt || AppI18nService.currencyCode || 'USD');\n }\n\n getStyle(classes: string, inlineStyles:any = {}) {\n if (classes && classes.trim().length > 0) {\n return this.theme.mergeStyle({}, this.theme.getStyle(classes), inlineStyles);\n }\n return inlineStyles;\n }\n\n getFormFieldStyles(formField: any, type: string){\n let suffix = ''\n switch(type){\n case 'label' :\n suffix = '_formLabel'\n break\n case 'commonField' :\n suffix = '-input'\n break\n default :\n ''\n }\n return formField?.classname?.trim()?.split(' ')?.map((s:string) => s.trim() + suffix).join(' ');\n }\n\n resetAppLocale() {\n this.appLocale = this.appConfig.appLocale.messages;\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n eval(fn: Function, failOnError = false) {\n try {\n return fn.call(this);\n } catch (e) {\n if (failOnError) {\n throw e;\n } else {\n return null;\n }\n }\n }\n\n toBoolean(val: any) {\n if (isNil(val)) {\n return false;\n }\n return toBoolean(val);\n }\n\n toNumber(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toNumber(val);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.targetWidget && this.targetWidget.invokeEventCallback('onDestroy', [null, this.proxy]);\n }\n\n componentDidMount(): void {\n this.resetAppLocale();\n super.componentDidMount();\n }\n\n memoize(key: string, o: any) {\n if (!this._memoize[key]) {\n this._memoize[key] = o;\n }\n return this._memoize[key];\n }\n\n initVariableSpinner() {\n let variables = filter(this.Variables, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n const actions = filter(this.Actions, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n variables = variables.concat(actions);\n if (!variables.length) {\n return;\n }\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.BEFORE_INVOKE, () => {\n spinnerService.show({\n message: get(v, 'config.spinnerMessage'),\n spinner: this.App.appConfig.spinner\n });\n }))\n }));\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => {\n spinnerService.hide();\n }));\n }));\n }\n\n onFragmentReady() {\n this.cleanup.push(...Object.values({...this.Variables, ...this.Actions}).map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => this.App.refresh()));\n }));\n this.initVariableSpinner();\n this.cleanUpVariablesandActions.push(...Object.values({...this.fragmentVariables, ...this.fragmentActions} as BaseVariable<any>));\n this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());\n return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()))\n .catch((error) => {\n // catch errors and show content\n console.error(error);\n })\n .then(() => {\n this.startUpVariablesLoaded = true;\n this.showContent = true;\n this.appConfig.refresh();\n });\n }\n\n onAttach() {\n this.isDetached = false;\n this.watcher.isActive = true;\n this.resetAppLocale();\n Object.values(this.fragments).forEach((f: any) => f.onAttach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.unmute && v.unmute());\n this.targetWidget?.invokeEventCallback('onAttach', [null, this.proxy]);\n if (this.refreshdataonattach) {\n Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()));\n }\n Object.values(this.Widgets).forEach((w: any) => {\n w.componentWillAttach && w.componentWillAttach();\n });\n }\n\n onDetach() {\n this.isDetached = true;\n this.watcher.isActive = false;\n Object.values(this.fragments).forEach((f: any) => f.onDetach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.mute && v.mute());\n this.targetWidget?.invokeEventCallback('onDetach', [null, this.proxy]);\n Object.values(this.Widgets).forEach((w: any) => {\n w.componentWillDetach && w.componentWillDetach();\n });\n }\n\n onDestroy() {\n this.cleanUpVariablesandActions.forEach((v: any) => v.destroy());\n this.watcher.destroy();\n }\n\n refresh() {\n (injector.get('AppConfig') as AppConfig).refresh();\n }\n\n forceUpdate() {\n super.forceUpdate();\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).forceUpdate());\n }\n\n generateTestIdPrefix() {\n const testId = this.getTestId();\n return testId && (testId.split('')\n .reduce((a, v, i) => a + (v.charCodeAt(0) * (i + 1)), 0) + '');\n }\n\n render() {\n if (this.startUpVariablesLoaded) {\n this.autoUpdateVariables\n .forEach(value => this.Variables[value]?.invokeOnParamChange());\n }\n return this.isVisible() ? (\n <ThemeProvider value={this.theme}>\n <TextIdPrefixConsumer>\n {(testIdPrefix) => {\n this.testIdPrefix = testIdPrefix || '';\n return (\n <TestIdPrefixProvider value={this.generateTestIdPrefix() || ''}>\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return this.renderWidget(this.props);\n }}\n </ToastConsumer>\n </TestIdPrefixProvider>);\n }}\n </TextIdPrefixConsumer>\n\n </ThemeProvider>) : null;\n }\n}\n\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,GAAG,EAAEC,MAAM,EAAEC,KAAK,QAAQ,QAAQ;AAI3C,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,gDAAgD;AAC3G,OAAOC,QAAQ,MAAM,yCAAyC;AAC9D,SAASC,SAAS,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,sCAAsC;AACzF,SAASC,aAAa,EAAkCC,SAAS,QAA2B,+CAA+C;AAC3I,OAAOC,UAAU,IAAWC,aAAa,QAAQ,wCAAwC;AACzF,SAAuBC,cAAc,QAAQ,mDAAmD;AAChG,SAASC,OAAO,IAAIC,SAAS,EAAEC,MAAM,IAAIC,cAAc,QAAQ,yCAAyC;AAExG,OAAOC,WAAW,MAAM,gFAAgF;AACxG,OAAOC,MAAM,MAAM,+DAA+D;AAClF,SAASC,aAAa,QAAsB,8CAA8C;AAC1F,OAAOC,cAAc,MAAM,gEAAgE;AAE3F,OAAOC,cAAc,MAAM,6BAA6B;AAExD,OAAOC,YAAY,MAAM,kFAAkF;AAE3G,OAAO,MAAMC,aAAa,SAASd,SAAS,CAAC;AAO7C,eAAe,MAAee,YAAY,SAA8DhB,aAAa,CAAoD;EAyCrKiB,WAAWA,CAACC,KAAQ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,CAAC0C,UAAU,CAAC,CAAC,CAAC,IAAKD,CAAC,GAAG,CAAC,CAAE,EAAE,CAAC,CAAC,GAAG,EAAG;EACnE;EAEAE,MAAMA,CAAA,EAAG;IACP,IAAI,IAAI,CAACpB,sBAAsB,EAAE;MAC/B,IAAI,CAACqB,mBAAmB,CACrBrG,OAAO,CAACsG,KAAK;QAAA,IAAAC,qBAAA;QAAA,QAAAA,qBAAA,GAAI,IAAI,CAAC7I,SAAS,CAAC4I,KAAK,CAAC,cAAAC,qBAAA,uBAArBA,qBAAA,CAAuBC,mBAAmB,CAAC,CAAC;MAAA,EAAC;IACnE;IACA,OAAO,IAAI,CAACC,SAAS,CAAC,CAAC,gBACvB9L,KAAA,CAAAgC,aAAA,CAAClB,aAAa;MAAC6K,KAAK,EAAE,IAAI,CAAC3H;IAAM,gBAC/BhE,KAAA,CAAAgC,aAAA,CAAC1B,oBAAoB,QACfyL,YAAY,IAAK;MACjB,IAAI,CAACA,YAAY,GAAGA,YAAY,IAAI,EAAE;MACtC,oBACA/L,KAAA,CAAAgC,aAAA,CAAC3B,oBAAoB;QAACsL,KAAK,EAAE,IAAI,CAACR,oBAAoB,CAAC,CAAC,IAAI;MAAG,gBAC7DnL,KAAA,CAAAgC,aAAA,CAACV,aAAa,QACZ0K,YAA0B,IAAK;QAC/B,IAAI,CAACC,OAAO,GAAGD,YAAY;QAC3B,OAAO,IAAI,CAACE,YAAY,CAAC,IAAI,CAACrK,KAAK,CAAC;MACtC,CACa,CACO,CAAC;IACzB,CACkB,CAET,CAAC,GAAI,IAAI;EAC1B;AACJ","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Text","get","filter","isNil","TestIdPrefixProvider","TextIdPrefixConsumer","injector","toBoolean","toNumber","isFullPathUrl","BaseComponent","BaseProps","ParentContext","BASE_THEME","ThemeProvider","VariableEvents","default","_viewPort","EVENTS","viewportEvents","WmFormField","WmForm","ToastConsumer","spinnerService","AppI18nService","WmFormAction","SkeletonAnimationProps","constructor","args","_defineProperty","FragmentProps","BaseFragment","props","defaultProps","createElement","text","title","okButtonText","cancelButtonText","onOk","onCancel","onClose","App","appConfig","app","formatters","Actions","Object","assign","Variables","cleanup","push","subscribe","ORIENTATION_CHANGE","$new","$old","isDetached","targetWidget","invokeEventCallback","proxy","screenWidth","width","screenHeight","height","SIZE_CHANGE","_this$theme","theme","destroy","baseUrl","url","resourceBaseUrl","onDestroy","onContentReady","onReady","refresh","onComponentChange","w","onComponentInit","id","name","formWidgets","formFields","formActions","Widgets","buttonArray","parentFormRef","pid","forEach","ff","formKey","registerFormFields","registerFormActions","formfield","formRef","fragments","onComponentDestroy","formfields","handleUrl","startsWith","getDateFormat","fmt","dateFormat","replace","getTimeFormat","timeFormat","getDateTimeFormat","dateTimeFormat","getCurrencySymbol","currencyCode","getStyle","classes","inlineStyles","trim","length","mergeStyle","getFormFieldStyles","formField","type","_formField$classname","suffix","classname","split","map","s","join","resetAppLocale","appLocale","messages","values","f","eval","fn","failOnError","call","e","val","componentWillUnmount","componentDidMount","memoize","key","o","_memoize","initVariableSpinner","variables","v","actions","concat","BEFORE_INVOKE","show","message","spinner","AFTER_INVOKE","hide","onFragmentReady","cleanUpVariablesandActions","fragmentVariables","fragmentActions","startUpActions","a","invoke","Promise","all","startUpVariables","catch","error","console","then","startUpVariablesLoaded","showContent","onAttach","_this$targetWidget","watcher","isActive","unmute","refreshdataonattach","componentWillAttach","onDetach","_this$targetWidget2","mute","componentWillDetach","forceUpdate","generateTestIdPrefix","testId","getTestId","reduce","i","charCodeAt","render","autoUpdateVariables","value","_this$Variables$value","invokeOnParamChange","isVisible","Consumer","parent","_this$parent","setParent","_showSkeleton","state","showskeleton","Provider","testIdPrefix","toastService","toaster","renderWidget"],"sources":["base-fragment.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { get, filter, isNil } from 'lodash';\n\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { Formatter } from '@wavemaker/app-rn-runtime/core/formatters';\nimport { TestIdPrefixProvider, TextIdPrefixConsumer } from '@wavemaker/app-rn-runtime/core/testid.provider';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { toBoolean, toNumber, isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { BaseComponent, BaseComponentState, BaseStyles, BaseProps, LifecycleListener, ParentContext } from '@wavemaker/app-rn-runtime/core/base.component';\nimport BASE_THEME, { Theme, ThemeProvider } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseVariable, VariableEvents } from '@wavemaker/app-rn-runtime/variables/base-variable';\nimport { default as _viewPort, EVENTS as viewportEvents } from '@wavemaker/app-rn-runtime/core/viewport';\nimport App from './App';\nimport WmFormField from '@wavemaker/app-rn-runtime/components/data/form/form-field/form-field.component';\nimport WmForm from '@wavemaker/app-rn-runtime/components/data/form/form.component';\nimport { ToastConsumer, ToastService } from '@wavemaker/app-rn-runtime/core/toast.service';\nimport spinnerService from '@wavemaker/app-rn-runtime/runtime/services/app-spinner.service';\n\nimport AppI18nService from './services/app-i18n.service';\nimport { Watcher } from './watcher';\nimport WmFormAction from '@wavemaker/app-rn-runtime/components/data/form/form-action/form-action.component';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\nimport { WmSkeletonStyles } from '../components/basic/skeleton/skeleton.styles';\n\nexport class SkeletonAnimationProps extends BaseProps {\n skeletonanimationresource = \"\";\n skeletonanimationspeed = 1;\n}\n\nexport class FragmentProps extends SkeletonAnimationProps {}\n\nexport interface FragmentState<T extends FragmentProps> extends BaseComponentState<T> {}\n\nexport type FragmentStyles = BaseStyles & {\n skeleton?: WmSkeletonStyles\n};\nexport default abstract class BaseFragment<P extends FragmentProps, S extends FragmentState<P>> extends BaseComponent<P, S, FragmentStyles> implements LifecycleListener {\n public App: App;\n public onReady: Function = () => {};\n public baseUrl = '';\n public resourceBaseUrl = '';\n public targetWidget = null as unknown as BaseComponent<any, any, any>;\n public Widgets: any = {};\n public Variables: any = {};\n public theme: Theme = BASE_THEME;\n public appLocale: any = {};\n private startUpVariables: string[] = [];\n protected startUpVariablesLoaded = false;\n private startUpActions: string[] = [];\n private autoUpdateVariables: string[] = [];\n private cleanUpVariablesandActions: BaseVariable<any>[] = [];\n public fragmentVariables: any = {};\n public fragmentActions: any = {};\n public Actions: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n public cache = false;\n public refreshdataonattach= true;\n public isReactNativeApp = true;\n public fragments: any = {};\n public isDetached = false;\n public _memoize = {} as any;\n public toaster: any;\n public formatters: Map<string, Formatter>;\n public serviceDefinitions = {} as any;\n public Viewport = _viewPort;\n public loadingMessage = React.createElement(Text, [] as any, ['loading...']);\n public showContent = false;\n public notification = {\n text: '',\n title: '',\n okButtonText: '',\n cancelButtonText: '',\n onOk: () => {},\n onCancel: () => {},\n onClose: () => {}\n };\n public watcher: Watcher = null as any;\n constructor(props: P, defaultProps?: P) {\n super(props, null as any, defaultProps);\n this.App = this.appConfig.app;\n this.formatters = this.App.formatters;\n this.Actions = Object.assign({}, this.App.Actions);\n this.Variables = Object.assign({}, this.App.Variables);\n this.cleanup.push(_viewPort.subscribe(viewportEvents.ORIENTATION_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onOrientationchange', [null, this.proxy,\n {screenWidth: _viewPort.width,\n screenHeight: _viewPort.height}]);\n }));\n this.cleanup.push(_viewPort.subscribe(viewportEvents.SIZE_CHANGE, ($new: any, $old: any) => {\n !this.isDetached && this.targetWidget && this.targetWidget.invokeEventCallback('onResize', [null, this.proxy,\n {screenWidth: $new.width,\n screenHeight: $new.height}]);\n }));\n this.cleanup.push(() => this.theme?.destroy());\n this.baseUrl = this.appConfig.url;\n this.resourceBaseUrl = this.appConfig.url;\n this.cleanup.push(() => this.onDestroy());\n }\n\n onContentReady() {\n this.onReady();\n this.appConfig.refresh();\n this.targetWidget && this.targetWidget.invokeEventCallback('onLoad', [null, this.proxy]);\n this.onContentReady = () => {};\n }\n\n onComponentChange(w: BaseComponent<any, any, any>) {\n this.refresh();\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n let formWidgets: any, formFields: any, formActions: any;\n\n if (w instanceof WmForm) {\n if (!this.Widgets[id]) {\n this.Widgets[id] = w;\n }\n if (w.props.id) {\n const name: any = w.props.name;\n formWidgets = this.Widgets[name].formWidgets;\n formFields = this.Widgets[name].formFields;\n formActions = this.Widgets[name].buttonArray;\n this.Widgets[name].formFields = [];\n this.Widgets[name].buttonArray = [];\n this.Widgets[name].formWidgets = {};\n } else {\n formWidgets = this.Widgets[id].formWidgets;\n formFields = this.Widgets[id].formFields;\n formActions = this.Widgets[id].buttonArray;\n }\n this.Widgets[id] = w;\n if (w.parentFormRef) {\n let pid = w.parentFormRef.props.id || w.parentFormRef.props.name;\n formFields.forEach((ff: any) => {\n const formKey = ff.props.formKey || ff.props.name;\n this.Widgets[pid].formFields.push(ff);\n this.Widgets[pid].formWidgets[formKey] = formWidgets[ff.props.name];\n });\n }\n w.registerFormFields(formFields, formWidgets);\n w.registerFormActions(formActions);\n return;\n }\n if (w.props.formfield) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {formFields: [], formWidgets: {}};\n } else if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n if (!this.Widgets[w.props.formRef].formWidgets) {\n this.Widgets[w.props.formRef].formWidgets = {}\n }\n this.Widgets[w.props.formRef].formWidgets[w.props.name] = w;\n return;\n }\n if (w instanceof WmFormAction) {\n if (!this.Widgets[w.props.formKey]) {\n this.Widgets[w.props.formKey] = {};\n }\n if (!this.Widgets[w.props.formKey].buttonArray) {\n this.Widgets[w.props.formKey].buttonArray = [];\n }\n this.Widgets[w.props.formKey].buttonArray.push(w);\n return;\n }\n\n if (w instanceof WmFormField) {\n if (!this.Widgets[w.props.formRef]) {\n this.Widgets[w.props.formRef] = {};\n }\n if (!this.Widgets[w.props.formRef].formFields) {\n this.Widgets[w.props.formRef].formFields = [];\n }\n this.Widgets[w.props.formRef].formWidgets = this.Widgets[w.props.formRef].formWidgets || {};\n this.Widgets[w.props.formRef].formFields.push(w);\n return;\n }\n this.Widgets[id] = w;\n if (w instanceof BaseFragment && w !== this) {\n this.fragments[id] = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>) {\n const id = w.props.id || w.props.name;\n delete this.Widgets[id];\n if (w instanceof BaseFragment) {\n delete this.fragments[id];\n }\n if (w instanceof WmForm) {\n w.formWidgets = {};\n w.formFields = [];\n w.formfields = {};\n }\n }\n\n handleUrl(url: string) {\n if (isFullPathUrl(url)) {\n return url;\n }\n return this.appConfig.url + (url.startsWith('/') ? '' : '/') + url;\n }\n\n getDateFormat(fmt?: string) {\n // getting formats from appLocale when app locale is loaded locally.\n return (fmt || AppI18nService.dateFormat || get(this.appConfig, 'appLocale.formats.date')).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getTimeFormat(fmt?: string) {\n return fmt || AppI18nService.timeFormat || get(this.appConfig, 'appLocale.formats.time');\n }\n\n getDateTimeFormat(fmt?: string) {\n return (fmt || AppI18nService.dateTimeFormat || (get(this.appConfig, 'appLocale.formats.date') + ' ' + get(this.appConfig, 'appLocale.formats.time'))).replace(/d/g, 'D').replace(/E/g, 'd').replace(/y/g, 'Y');\n }\n\n getCurrencySymbol(fmt?: string) {\n return (fmt || AppI18nService.currencyCode || 'USD');\n }\n\n getStyle(classes: string, inlineStyles:any = {}) {\n if (classes && classes.trim().length > 0) {\n return this.theme.mergeStyle({}, this.theme.getStyle(classes), inlineStyles);\n }\n return inlineStyles;\n }\n\n getFormFieldStyles(formField: any, type: string){\n let suffix = ''\n switch(type){\n case 'label' :\n suffix = '_formLabel'\n break\n case 'commonField' :\n suffix = '-input'\n break\n default :\n ''\n }\n return formField?.classname?.trim()?.split(' ')?.map((s:string) => s.trim() + suffix).join(' ');\n }\n\n resetAppLocale() {\n this.appLocale = this.appConfig.appLocale.messages;\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n eval(fn: Function, failOnError = false) {\n try {\n return fn.call(this);\n } catch (e) {\n if (failOnError) {\n throw e;\n } else {\n return null;\n }\n }\n }\n\n toBoolean(val: any) {\n if (isNil(val)) {\n return false;\n }\n return toBoolean(val);\n }\n\n toNumber(val: any) {\n if (isNil(val)) {\n return val;\n }\n return toNumber(val);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.targetWidget && this.targetWidget.invokeEventCallback('onDestroy', [null, this.proxy]);\n }\n\n componentDidMount(): void {\n this.resetAppLocale();\n super.componentDidMount();\n }\n\n memoize(key: string, o: any) {\n if (!this._memoize[key]) {\n this._memoize[key] = o;\n }\n return this._memoize[key];\n }\n\n initVariableSpinner() {\n let variables = filter(this.Variables, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n const actions = filter(this.Actions, (v: BaseVariable<any>) => !!get(v, 'config.spinnerContext'));\n variables = variables.concat(actions);\n if (!variables.length) {\n return;\n }\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.BEFORE_INVOKE, () => {\n spinnerService.show({\n message: get(v, 'config.spinnerMessage'),\n spinner: this.App.appConfig.spinner\n });\n }))\n }));\n this.cleanup.push(...variables.map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => {\n spinnerService.hide();\n }));\n }));\n }\n\n onFragmentReady() {\n this.cleanup.push(...Object.values({...this.Variables, ...this.Actions}).map(v => {\n return ((v as BaseVariable<any>)\n .subscribe(VariableEvents.AFTER_INVOKE, () => this.App.refresh()));\n }));\n this.initVariableSpinner();\n this.cleanUpVariablesandActions.push(...Object.values({...this.fragmentVariables, ...this.fragmentActions} as BaseVariable<any>));\n this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());\n return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()))\n .catch((error) => {\n // catch errors and show content\n console.error(error);\n })\n .then(() => {\n this.startUpVariablesLoaded = true;\n this.showContent = true;\n this.appConfig.refresh();\n });\n }\n\n onAttach() {\n this.isDetached = false;\n this.watcher.isActive = true;\n this.resetAppLocale();\n Object.values(this.fragments).forEach((f: any) => f.onAttach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.unmute && v.unmute());\n this.targetWidget?.invokeEventCallback('onAttach', [null, this.proxy]);\n if (this.refreshdataonattach) {\n Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke()));\n }\n Object.values(this.Widgets).forEach((w: any) => {\n w.componentWillAttach && w.componentWillAttach();\n });\n }\n\n onDetach() {\n this.isDetached = true;\n this.watcher.isActive = false;\n Object.values(this.fragments).forEach((f: any) => f.onDetach());\n this.cleanUpVariablesandActions.forEach((v: any) => v.mute && v.mute());\n this.targetWidget?.invokeEventCallback('onDetach', [null, this.proxy]);\n Object.values(this.Widgets).forEach((w: any) => {\n w.componentWillDetach && w.componentWillDetach();\n });\n }\n\n onDestroy() {\n this.cleanUpVariablesandActions.forEach((v: any) => v.destroy());\n this.watcher.destroy();\n }\n\n refresh() {\n (injector.get('AppConfig') as AppConfig).refresh();\n }\n\n forceUpdate() {\n super.forceUpdate();\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).forceUpdate());\n }\n\n generateTestIdPrefix() {\n const testId = this.getTestId();\n return testId && (testId.split('')\n .reduce((a, v, i) => a + (v.charCodeAt(0) * (i + 1)), 0) + '');\n }\n\n render() {\n if (this.startUpVariablesLoaded) {\n this.autoUpdateVariables\n .forEach(value => this.Variables[value]?.invokeOnParamChange());\n }\n return this.isVisible() ? (\n <ParentContext.Consumer>\n {(parent) => {\n this.setParent(parent);\n this._showSkeleton = this.state.props.showskeleton !== false \n && (this.parent?._showSkeleton || this.state.props.showskeleton === true);\n let theme = this.theme;\n return (\n <ParentContext.Provider value={this}>\n <ThemeProvider value={theme}>\n <TextIdPrefixConsumer>\n {(testIdPrefix) => {\n this.testIdPrefix = testIdPrefix || '';\n return (\n <TestIdPrefixProvider value={this.generateTestIdPrefix() || ''}>\n <ToastConsumer>\n {(toastService: ToastService) => {\n this.toaster = toastService;\n return this.renderWidget(this.props);\n }}\n </ToastConsumer>\n </TestIdPrefixProvider>);\n }}\n </TextIdPrefixConsumer>\n </ThemeProvider>\n </ParentContext.Provider>);\n }}\n </ParentContext.Consumer>) : null;\n }\n\n\n}\n\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAc,cAAc;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,KAAK,QAAQ,QAAQ;AAI3C,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,gDAAgD;AAC3G,OAAOC,QAAQ,MAAM,yCAAyC;AAC9D,SAASC,SAAS,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,sCAAsC;AACzF,SAASC,aAAa,EAAkCC,SAAS,EAAqBC,aAAa,QAAQ,+CAA+C;AAC1J,OAAOC,UAAU,IAAWC,aAAa,QAAQ,wCAAwC;AACzF,SAAuBC,cAAc,QAAQ,mDAAmD;AAChG,SAASC,OAAO,IAAIC,SAAS,EAAEC,MAAM,IAAIC,cAAc,QAAQ,yCAAyC;AAExG,OAAOC,WAAW,MAAM,gFAAgF;AACxG,OAAOC,MAAM,MAAM,+DAA+D;AAClF,SAASC,aAAa,QAAsB,8CAA8C;AAC1F,OAAOC,cAAc,MAAM,gEAAgE;AAE3F,OAAOC,cAAc,MAAM,6BAA6B;AAExD,OAAOC,YAAY,MAAM,kFAAkF;AAI3G,OAAO,MAAMC,sBAAsB,SAASf,SAAS,CAAC;EAAAgB,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oCACxB,EAAE;IAAAA,eAAA,iCACL,CAAC;EAAA;AAC5B;AAEA,OAAO,MAAMC,aAAa,SAASJ,sBAAsB,CAA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CAAAmC,aAAA,CAAC9B,oBAAoB;UAACyL,KAAK,EAAE,IAAI,CAACR,oBAAoB,CAAC,CAAC,IAAI;QAAG,gBAC7DtL,KAAA,CAAAmC,aAAA,CAACZ,aAAa,QACZoL,YAA0B,IAAK;UAC/B,IAAI,CAACC,OAAO,GAAGD,YAAY;UAC3B,OAAO,IAAI,CAACE,YAAY,CAAC,IAAI,CAAC5K,KAAK,CAAC;QACtC,CACa,CACO,CAAC;MACzB,CACkB,CACT,CACO,CAAC;IACzB,CACwB,CAAC,GAAI,IAAI;EACnC;AAGJ","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["WmPartial","BaseFragment","BasePartial","constructor","props","_defineProperty","isPartOfPrefab","prefab","App","appConfig","app","Actions","Object","assign","Variables","serviceDefinitions","Prefab","baseUrl","watcher","parentWatcher","create","onFragmentReady","then","onContentReady","invokeEventCallback","prefabname","_this$Prefab","onComponentInit","w","targetWidget","onComponentDestroy","parent","Widgets","componentDidUpdate","prevProps","prevState","snapshot","pageParams","partialParams","fragmentVariables","renderWidget","renderPartial"],"sources":["base-partial.component.tsx"],"sourcesContent":["import { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmPartial from '@wavemaker/app-rn-runtime/components/page/partial/partial.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { ReactNode } from 'react';\nimport BasePrefab from './base-prefab.component';\nimport { Watcher } from './watcher';\nexport interface PartialProps extends FragmentProps {\n serviceDefinitions: any;\n prefab: any;\n parent: any;\n onLoad?: Function;\n parentWatcher: Watcher;\n}\n\nexport interface PartialState extends FragmentState<PartialProps> {}\n\nexport default abstract class BasePartial extends BaseFragment<PartialProps, PartialState> {\n private partialParams: any = {};\n Prefab: BasePrefab = null as any;\n\n constructor(props: PartialProps) {\n super(props);\n const isPartOfPrefab = !!this.props.prefab;\n this.App = this.appConfig.app;\n this.Actions = Object.assign({}, isPartOfPrefab ? {} : this.App.Actions);\n this.Variables = Object.assign({}, isPartOfPrefab ? {} : this.App.Variables);\n this.serviceDefinitions = this.props.serviceDefinitions;\n if (isPartOfPrefab) {\n this.Prefab = this.props.prefab;\n this.baseUrl =this.Prefab.baseUrl;\n }\n this.watcher = props.parentWatcher.create();\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n this.invokeEventCallback('onLoad', [this]);\n });\n }\n\n get prefabname() {\n return this.Prefab?.props.prefabname;\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPartial) {\n this.targetWidget = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>): void {\n super.onComponentDestroy(w);\n const parent: any = this.props.parent;\n if (parent) {\n delete (parent as any).Widgets;\n delete (parent as any).Variables;\n }\n }\n\n componentDidUpdate(prevProps: Readonly<PartialProps>, prevState: Readonly<PartialState>, snapshot?: any): void {\n super.componentDidUpdate(prevProps, prevState, snapshot);\n const parent: any = this.props.parent;\n if (parent) {\n parent.pageParams = (this as any).pageParams;\n parent.partialParams = (this as any).pageParams;\n parent.Widgets = this.Widgets;\n parent.Variables = this.fragmentVariables;\n }\n }\n\n abstract renderPartial(): ReactNode;\n\n renderWidget(props: PartialProps) {\n return this.renderPartial();\n }\n}\n"],"mappings":";;;
|
1
|
+
{"version":3,"names":["WmPartial","BaseFragment","BasePartial","constructor","props","_defineProperty","isPartOfPrefab","prefab","App","appConfig","app","Actions","Object","assign","Variables","serviceDefinitions","Prefab","baseUrl","watcher","parentWatcher","create","onFragmentReady","then","onContentReady","invokeEventCallback","prefabname","_this$Prefab","onComponentInit","w","targetWidget","onComponentDestroy","parent","Widgets","componentDidUpdate","prevProps","prevState","snapshot","pageParams","partialParams","fragmentVariables","renderWidget","renderPartial"],"sources":["base-partial.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmPartial from '@wavemaker/app-rn-runtime/components/page/partial/partial.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport { ReactNode } from 'react';\nimport BasePrefab from './base-prefab.component';\nimport { Watcher } from './watcher';\nimport { View } from 'react-native';\nimport WmLottie from '../components/basic/lottie/lottie.component';\n\nexport interface PartialProps extends FragmentProps {\n serviceDefinitions: any;\n prefab: any;\n parent: any;\n onLoad?: Function;\n parentWatcher: Watcher;\n}\n\nexport interface PartialState extends FragmentState<PartialProps> {}\n\nexport default abstract class BasePartial extends BaseFragment<PartialProps, PartialState> {\n private partialParams: any = {};\n Prefab: BasePrefab = null as any;\n\n constructor(props: PartialProps) {\n super(props);\n const isPartOfPrefab = !!this.props.prefab;\n this.App = this.appConfig.app;\n this.Actions = Object.assign({}, isPartOfPrefab ? {} : this.App.Actions);\n this.Variables = Object.assign({}, isPartOfPrefab ? {} : this.App.Variables);\n this.serviceDefinitions = this.props.serviceDefinitions;\n if (isPartOfPrefab) {\n this.Prefab = this.props.prefab;\n this.baseUrl =this.Prefab.baseUrl;\n }\n this.watcher = props.parentWatcher.create();\n }\n\n onFragmentReady() {\n return super.onFragmentReady().then(() => {\n this.onContentReady();\n this.invokeEventCallback('onLoad', [this]);\n });\n }\n\n get prefabname() {\n return this.Prefab?.props.prefabname;\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPartial) {\n this.targetWidget = w;\n }\n }\n\n onComponentDestroy(w: BaseComponent<any, any, any>): void {\n super.onComponentDestroy(w);\n const parent: any = this.props.parent;\n if (parent) {\n delete (parent as any).Widgets;\n delete (parent as any).Variables;\n }\n }\n\n componentDidUpdate(prevProps: Readonly<PartialProps>, prevState: Readonly<PartialState>, snapshot?: any): void {\n super.componentDidUpdate(prevProps, prevState, snapshot);\n const parent: any = this.props.parent;\n if (parent) {\n parent.pageParams = (this as any).pageParams;\n parent.partialParams = (this as any).pageParams;\n parent.Widgets = this.Widgets;\n parent.Variables = this.fragmentVariables;\n }\n }\n \n abstract render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C,CAAC;EACJ;EAEA,IAAIC,UAAUA,CAAA,EAAG;IAAA,IAAAC,YAAA;IACf,QAAAA,YAAA,GAAO,IAAI,CAACV,MAAM,cAAAU,YAAA,uBAAXA,YAAA,CAAatB,KAAK,CAACqB,UAAU;EACtC;EAEAE,eAAeA,CAACC,CAA+B,EAAE;IAC/C,KAAK,CAACD,eAAe,CAACC,CAAC,CAAC;IACxB,IAAIA,CAAC,YAAY5B,SAAS,EAAE;MAC1B,IAAI,CAAC6B,YAAY,GAAGD,CAAC;IACvB;EACF;EAEAE,kBAAkBA,CAACF,CAA+B,EAAQ;IACxD,KAAK,CAACE,kBAAkB,CAACF,CAAC,CAAC;IAC3B,MAAMG,MAAW,GAAG,IAAI,CAAC3B,KAAK,CAAC2B,MAAM;IACrC,IAAIA,MAAM,EAAE;MACV,OAAQA,MAAM,CAASC,OAAO;MAC9B,OAAQD,MAAM,CAASjB,SAAS;IAClC;EACF;EAEAmB,kBAAkBA,CAACC,SAAiC,EAAEC,SAAiC,EAAEC,QAAc,EAAQ;IAC7G,KAAK,CAACH,kBAAkB,CAACC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;IACxD,MAAML,MAAW,GAAG,IAAI,CAAC3B,KAAK,CAAC2B,MAAM;IACrC,IAAIA,MAAM,EAAE;MACVA,MAAM,CAACM,UAAU,GAAI,IAAI,CAASA,UAAU;MAC5CN,MAAM,CAACO,aAAa,GAAK,IAAI,CAASD,UAAU;MAChDN,MAAM,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO;MAC7BD,MAAM,CAACjB,SAAS,GAAG,IAAI,CAACyB,iBAAiB;IAC3C;EACF;EAIAC,YAAYA,CAACpC,KAAmB,EAAE;IAChC,OAAO,IAAI,CAACqC,aAAa,CAAC,CAAC;EAC7B;AACJ","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","merge","PartialProvider","WmPrefabContainer","BaseFragment","axios","BasePrefab","constructor","props","defualtProps","partialService","_defineProperty","App","appConfig","app","Actions","Variables","appUrl","url","resourceBaseUrl","baseUrl","prefabname","watcher","parentWatcher","create","getServiceDefinitions","onComponentInit","w","targetWidget","onFragmentReady","_renderPrefab","component","renderPrefab","then","onContentReady","invokeEventCallback","refresh","Promise","resolve","resetAppLocale","appLocale","messages","prefabMessages","Object","values","fragments","forEach","f","componentWillUnmount","renderWidget","_props$styles","createElement","value","style","width","styles","root","_BasePrefab","prefabName","defs","SERVICE_DEFINITION_CACHE","get","catch","response","_response$data","serviceDefinitions","data","serviceDefs"],"sources":["base-prefab.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { merge } from 'lodash-es';\n\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport PartialService, { PartialProvider } from '@wavemaker/app-rn-runtime/core/partial.service';\nimport WmPrefabContainer from '@wavemaker/app-rn-runtime/components/prefab/prefab-container.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport axios from 'axios';\nimport { Watcher } from './watcher';\n\n\nexport interface PrefabProps extends FragmentProps {\n prefabname: string;\n parentWatcher: Watcher;\n}\n\nexport interface PrefabState extends FragmentState<PrefabProps> {}\n\nexport default abstract class BasePrefab extends BaseFragment<PrefabProps, PrefabState> {\n\n private static SERVICE_DEFINITION_CACHE = {} as any;\n\n public static getServiceDefinitions = (prefabName: string, url: string) => {\n const defs = BasePrefab.SERVICE_DEFINITION_CACHE[prefabName];\n if (defs) {\n return Promise.resolve(defs);\n } else {\n return axios.get(url + '/servicedefs')\n .catch(() => ({}))\n .then((response: any) => {\n const serviceDefinitions = response?.data?.serviceDefs || {};\n BasePrefab.SERVICE_DEFINITION_CACHE[prefabName] = serviceDefinitions;\n return Promise.resolve(serviceDefinitions);\n });\n }\n };\n\n private appUrl = '';\n private prefabParams: any = {};\n private _renderPrefab:() => React.ReactNode = null as any;\n\n constructor(props: PrefabProps, defualtProps: PrefabProps, private partialService: PartialService) {\n super(props, defualtProps);\n this.App = this.appConfig.app;\n this.Actions = {};\n this.Variables = {};\n this.appUrl = this.appConfig.url;\n this.resourceBaseUrl = `${this.baseUrl}/app/prefabs/${props.prefabname}`;\n this.baseUrl = `${this.baseUrl}/prefabs/${props.prefabname}`;\n this.watcher = props.parentWatcher.create();\n }\n\n getServiceDefinitions() {\n return BasePrefab.getServiceDefinitions(this.props.prefabname, `${this.appUrl}/services/prefabs/${this.props.prefabname}`);\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPrefabContainer) {\n this.targetWidget = w;\n }\n }\n\n onFragmentReady(): Promise<void> {\n this._renderPrefab = () => {\n const component = this.renderPrefab();\n super.onFragmentReady()\n .then(() => {\n this.onContentReady();\n this.invokeEventCallback('onLoad', [null, this]);\n });\n this._renderPrefab = () => this.renderPrefab();\n return component;\n };\n this.refresh();\n return Promise.resolve();\n }\n\n resetAppLocale() {\n this.appLocale = merge({ }, this.appConfig.appLocale.messages, this.appConfig.appLocale.prefabMessages[this.props.prefabname]);\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.invokeEventCallback('onDestroy', [null, this]);\n }\n\n abstract renderPrefab(): React.ReactNode;\n\n renderWidget(props: PrefabProps) {\n return (\n <PartialProvider value={this.partialService}>\n <View style={[{width: '100%'}, props.styles?.root]}>\n {this._renderPrefab ? this._renderPrefab(): null}\n </View>\n </PartialProvider>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,WAAW;AAGjC,SAAyBC,eAAe,QAAQ,gDAAgD;AAChG,OAAOC,iBAAiB,MAAM,wEAAwE;AACtG,OAAOC,YAAY,MAAwC,2BAA2B;AACtF,OAAOC,KAAK,MAAM,OAAO;
|
1
|
+
{"version":3,"names":["React","View","merge","PartialProvider","WmPrefabContainer","BaseFragment","axios","BasePrefab","constructor","props","defualtProps","partialService","_defineProperty","App","appConfig","app","Actions","Variables","appUrl","url","resourceBaseUrl","baseUrl","prefabname","watcher","parentWatcher","create","getServiceDefinitions","onComponentInit","w","targetWidget","onFragmentReady","_renderPrefab","component","renderPrefab","then","onContentReady","invokeEventCallback","refresh","Promise","resolve","resetAppLocale","appLocale","messages","prefabMessages","Object","values","fragments","forEach","f","componentWillUnmount","renderWidget","_props$styles","createElement","value","style","width","styles","root","_BasePrefab","prefabName","defs","SERVICE_DEFINITION_CACHE","get","catch","response","_response$data","serviceDefinitions","data","serviceDefs"],"sources":["base-prefab.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { merge } from 'lodash-es';\n\nimport { BaseComponent } from '@wavemaker/app-rn-runtime/core/base.component';\nimport PartialService, { PartialProvider } from '@wavemaker/app-rn-runtime/core/partial.service';\nimport WmPrefabContainer from '@wavemaker/app-rn-runtime/components/prefab/prefab-container.component';\nimport BaseFragment, { FragmentProps, FragmentState } from './base-fragment.component';\nimport axios from 'axios';\nimport { Watcher } from './watcher';\nimport WmLottie from '../components/basic/lottie/lottie.component';\n\n\nexport interface PrefabProps extends FragmentProps {\n prefabname: string;\n parentWatcher: Watcher;\n}\n\nexport interface PrefabState extends FragmentState<PrefabProps> {}\n\nexport default abstract class BasePrefab extends BaseFragment<PrefabProps, PrefabState> {\n\n private static SERVICE_DEFINITION_CACHE = {} as any;\n\n public static getServiceDefinitions = (prefabName: string, url: string) => {\n const defs = BasePrefab.SERVICE_DEFINITION_CACHE[prefabName];\n if (defs) {\n return Promise.resolve(defs);\n } else {\n return axios.get(url + '/servicedefs')\n .catch(() => ({}))\n .then((response: any) => {\n const serviceDefinitions = response?.data?.serviceDefs || {};\n BasePrefab.SERVICE_DEFINITION_CACHE[prefabName] = serviceDefinitions;\n return Promise.resolve(serviceDefinitions);\n });\n }\n };\n\n private appUrl = '';\n private prefabParams: any = {};\n private _renderPrefab:() => React.ReactNode = null as any;\n\n constructor(props: PrefabProps, defualtProps: PrefabProps, private partialService: PartialService) {\n super(props, defualtProps);\n this.App = this.appConfig.app;\n this.Actions = {};\n this.Variables = {};\n this.appUrl = this.appConfig.url;\n this.resourceBaseUrl = `${this.baseUrl}/app/prefabs/${props.prefabname}`;\n this.baseUrl = `${this.baseUrl}/prefabs/${props.prefabname}`;\n this.watcher = props.parentWatcher.create();\n }\n\n getServiceDefinitions() {\n return BasePrefab.getServiceDefinitions(this.props.prefabname, `${this.appUrl}/services/prefabs/${this.props.prefabname}`);\n }\n\n onComponentInit(w: BaseComponent<any, any, any>) {\n super.onComponentInit(w);\n if (w instanceof WmPrefabContainer) {\n this.targetWidget = w;\n }\n }\n\n onFragmentReady(): Promise<void> {\n this._renderPrefab = () => {\n const component = this.renderPrefab();\n super.onFragmentReady()\n .then(() => {\n this.onContentReady();\n this.invokeEventCallback('onLoad', [null, this]);\n });\n this._renderPrefab = () => this.renderPrefab();\n return component;\n };\n this.refresh();\n return Promise.resolve();\n }\n\n resetAppLocale() {\n this.appLocale = merge({ }, this.appConfig.appLocale.messages, this.appConfig.appLocale.prefabMessages[this.props.prefabname]);\n Object.values(this.fragments).forEach((f: any) => (f as BaseFragment<any, any>).resetAppLocale());\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n this.invokeEventCallback('onDestroy', [null, this]);\n }\n\n abstract renderPrefab(): React.ReactNode;\n \n renderWidget(props: PrefabProps) {\n return (\n <PartialProvider value={this.partialService}>\n <View style={[{width: '100%'}, props.styles?.root]}>\n {this._renderPrefab ? this._renderPrefab(): null}\n </View>\n </PartialProvider>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,WAAW;AAGjC,SAAyBC,eAAe,QAAQ,gDAAgD;AAChG,OAAOC,iBAAiB,MAAM,wEAAwE;AACtG,OAAOC,YAAY,MAAwC,2BAA2B;AACt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A,CAAcM,IAAI;IAAE,GAChD,IAAI,CAAC1B,aAAa,GAAG,IAAI,CAACA,aAAa,CAAC,CAAC,GAAE,IACxC,CACS,CAAC;EAEtB;AACJ;AAAC2B,WAAA,GAjF6BnD,UAAU;AAAAK,eAAA,CAAVL,UAAU,8BAEM,CAAC,CAAC;AAAAK,eAAA,CAFlBL,UAAU,2BAIE,CAACoD,UAAkB,EAAExC,GAAW,KAAK;EACzE,MAAMyC,IAAI,GAAGrD,WAAU,CAACsD,wBAAwB,CAACF,UAAU,CAAC;EAC5D,IAAIC,IAAI,EAAE;IACR,OAAOtB,OAAO,CAACC,OAAO,CAACqB,IAAI,CAAC;EAC9B,CAAC,MAAM;IACL,OAAOtD,KAAK,CAACwD,GAAG,CAAC3C,GAAG,GAAG,cAAc,CAAC,CACnC4C,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACjB7B,IAAI,CAAE8B,QAAa,IAAK;MAAA,IAAAC,cAAA;MACrB,MAAMC,kBAAkB,GAAG,CAAAF,QAAQ,aAARA,QAAQ,gBAAAC,cAAA,GAARD,QAAQ,CAAEG,IAAI,cAAAF,cAAA,uBAAdA,cAAA,CAAgBG,WAAW,KAAI,CAAC,CAAC;MAC5D7D,WAAU,CAACsD,wBAAwB,CAACF,UAAU,CAAC,GAAGO,kBAAkB;MACpE,OAAO5B,OAAO,CAACC,OAAO,CAAC2B,kBAAkB,CAAC;IAC9C,CAAC,CAAC;EACN;AACF,CAAC","ignoreList":[]}
|
@@ -195,7 +195,23 @@ class AppSecurityService {
|
|
195
195
|
appLogout(options) {
|
196
196
|
return axios.post(options.baseURL + '/j_spring_security_logout', null, {
|
197
197
|
withCredentials: true
|
198
|
-
}).catch(() => {}).then(
|
198
|
+
}).catch(() => {}).then(response => {
|
199
|
+
var _response$data;
|
200
|
+
if (response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && _response$data.result) {
|
201
|
+
if (isWebPreviewMode()) {
|
202
|
+
location.href = response.data.result;
|
203
|
+
return new Promise(r => setTimeout(r, 5000));
|
204
|
+
} else {
|
205
|
+
var _response$data2;
|
206
|
+
return axios.get(`${response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.result}`, {
|
207
|
+
withCredentials: true
|
208
|
+
});
|
209
|
+
}
|
210
|
+
}
|
211
|
+
return Promise.reject();
|
212
|
+
}).catch(e => {
|
213
|
+
console.error(e);
|
214
|
+
}).then(() => {
|
199
215
|
this.isLoggedIn = false;
|
200
216
|
this.redirectToLogin();
|
201
217
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Platform","axios","each","includes","networkService","injector","StorageService","WebProcessService","isWebPreviewMode","USER_ROLE","authCookieStr","XSRF_COOKIE_NAME","xsrf_header_name","AppSecurityService","constructor","_defineProperty","str","wm_xsrf_token_index","indexOf","index","regExp","substring","RegExp","data","regex","getRegex","JSON","parse","replace","interceptors","request","use","config","onBeforeServiceCall","appConfig","getAppConfig","baseUrl","url","getXsrfToken","then","token","_config$url","startsWith","headers","Promise","resolve","getItem","xsrf_token","get","navigateToLandingPage","_this$appConfig$curre","_this$appConfig$logge","currentPage","goToPage","loggedInUser","landingPage","setTimeout","_this$appConfig$curre2","openUrl","appLogin","options","payload","formData","value","name","encodeURIComponent","defaults","withCredentials","post","baseURL","response","xsrfCookieValue","setItem","isLoggedIn","load","userData","getLoggedInUserDetails","useDefaultSuccessHandler","app","triggerStartUpVariables","_document","document","cookie","split","filter","item","length","wm_xsrf_token","isConnected","getServiceDefinitions","defaultSecurityConfig","details","securityConfig","isSecurityEnabled","securityEnabled","authenticated","_appConfig$appPropert","isAuthenticated","roles","userInfo","userRoles","userName","id","userId","tenantId","userAttributes","dataSet","appProperties","homePage","redirectToLogin","redirectTo","_this$securityConfig","loginConfig","type","authUrl","OS","window","parent","location","href","execute","output","formateData","reject","refresh","_this$securityConfig$","_this$appConfig$curre3","loginPage","pageName","appLogout","catch","canUserAccessPage","_this$securityConfig2","res","status","matchRoles","widgetRoles","some","hasAccessToWidget","_this$loggedInUser$da","_this$loggedInUser$da2","_this$loggedInUser$da3","_this$loggedInUser$da4","widgetRolesArr","EVERYONE","ANONYMOUS","AUTHENTICATED","appSecurityService"],"sources":["app-security.service.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios';\nimport { each, includes } from 'lodash';\n\nimport networkService from '@wavemaker/app-rn-runtime/core/network.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport { SecurityService } from '@wavemaker/app-rn-runtime/core/security.service';\n\nimport WebProcessService from './webprocess.service';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\ndeclare const window: any;\n\ninterface LoggedInUserConfig {\n isAuthenticated: Boolean;\n isSecurityEnabled: Boolean;\n roles: Array<string>;\n name: String;\n id: String;\n tenantId: String;\n userAttributes: any;\n landingPage: string;\n}\n\nenum USER_ROLE {\n EVERYONE = 'Everyone',\n ANONYMOUS = 'Anonymous',\n AUTHENTICATED = 'Authenticated'\n}\n\nconst authCookieStr = 'AUTH_COOKIE';\nconst XSRF_COOKIE_NAME = 'wm_xsrf_token';\nconst xsrf_header_name = 'X-WM-XSRF-TOKEN';\n\nclass AppSecurityService implements SecurityService {\n\n securityConfig: any;\n isLoggedIn = false;\n loggedInUser: any = {};\n token: any;\n appConfig: any;\n baseUrl: string = '';\n defaultSecurityConfig: any;\n landingPage = '';\n\n constructor() {\n axios.interceptors.request.use((config: InternalAxiosRequestConfig) => this.onBeforeServiceCall(config));\n }\n\n getRegex = (str: string) =>{\n const wm_xsrf_token_index = str.indexOf('wm_xsrf_token') + 13; // 13 is the length of 'wm_xsrf_token' string\n let index = wm_xsrf_token_index;\n\n while(str[index] !== ':'){\n index++;\n }\n \n const regExp = str.substring(wm_xsrf_token_index, index);\n return new RegExp(regExp, \"g\");\n }\n \n formateData = (data: string) => {\n const regex = this.getRegex(data)\n return JSON.parse(data.replace(regex, \"\\\"\"));\n }\n\n onBeforeServiceCall(config: InternalAxiosRequestConfig) {\n if (!this.appConfig) {\n this.appConfig = this.getAppConfig();\n this.baseUrl = this.appConfig.url;\n }\n return this.getXsrfToken().then((token: string) => {\n if (config.url?.startsWith(this.baseUrl) && token) {\n if(config.headers) config.headers[xsrf_header_name] = token;\n }\n return config\n });\n }\n\n private getXsrfToken(): Promise<string> {\n if (this.token) {\n return Promise.resolve(this.token);\n }\n return StorageService.getItem(XSRF_COOKIE_NAME).then(xsrf_token => {\n this.token = xsrf_token;\n return this.token;\n });\n }\n\n private getAppConfig() {\n return injector.get<AppConfig>('APP_CONFIG');\n }\n\n public navigateToLandingPage() {\n this.appConfig.currentPage?.goToPage(\n this.appConfig.loggedInUser?.landingPage \n || this.appConfig.landingPage \n || 'Main', null, true);\n if (this.landingPage) {\n const landingPage = this.landingPage;\n this.landingPage = '';\n setTimeout(() => {\n this.appConfig.currentPage?.openUrl(landingPage);\n }, 100);\n }\n }\n\n public appLogin(options: any) {\n // encode all parameters\n let payload = '';\n each(options.formData, function (value, name) {\n payload += (payload ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value);\n });\n axios.defaults.withCredentials = true;\n return axios.post(options.baseURL + '/j_spring_security_check', payload, {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }}).then((response: AxiosResponse) => {\n const xsrfCookieValue = response.data ? response.data[XSRF_COOKIE_NAME] : '';\n this.token = xsrfCookieValue;\n StorageService.setItem(XSRF_COOKIE_NAME, xsrfCookieValue);\n this.isLoggedIn = true;\n }).then(() => this.load(options.baseURL))\n .then(async () => {\n const userData = await this.getLoggedInUserDetails(options.baseURL, options.useDefaultSuccessHandler);\n await this.appConfig.app.triggerStartUpVariables();\n return userData;\n });\n }\n\n public load(baseURL: string) {\n if (isWebPreviewMode()) {\n const token = document?.cookie?.split(';').filter(item => item.includes('wm_xsrf_token'))\n if (token && token.length > 0) {\n const wm_xsrf_token = token[0].split('=')[1];\n wm_xsrf_token && StorageService.setItem(XSRF_COOKIE_NAME, wm_xsrf_token);\n }\n }\n\n return Promise.resolve().then(() => {\n if (networkService.isConnected()) {\n return axios.get(baseURL + '/services/security/info')\n .then((response: AxiosResponse) => response.data);\n }\n return this.appConfig.getServiceDefinitions(this.appConfig.url)\n .then(() => Promise.resolve(this.defaultSecurityConfig));\n }).then((details: any) => {\n const loggedInUser = {} as LoggedInUserConfig;\n this.securityConfig = details || {};\n this.securityConfig.isSecurityEnabled = !!details?.securityEnabled;\n const appConfig = this.appConfig;\n if (typeof details !== 'string' && (!details.securityEnabled || details.authenticated)) {\n if (details.authenticated) {\n loggedInUser.isAuthenticated = details.authenticated;\n loggedInUser.isSecurityEnabled = details.authenticated;\n loggedInUser.roles = details.userInfo.userRoles;\n loggedInUser.name = details.userInfo.userName;\n loggedInUser.id = details.userInfo.userId;\n loggedInUser.tenantId = details.userInfo.tenantId;\n loggedInUser.userAttributes = details.userInfo.userAttributes;\n loggedInUser.landingPage = details.userInfo.landingPage;\n appConfig.loggedInUser = loggedInUser;\n this.loggedInUser.dataSet = loggedInUser;\n appConfig.landingPage = appConfig.appProperties?.homePage;\n }\n return appConfig.getServiceDefinitions(appConfig.url)\n .then(() => {\n return details;\n });\n } else {\n return appConfig.getServiceDefinitions(appConfig.url)\n .then(() => {\n this.redirectToLogin();\n });\n }\n });\n }\n\n private getLoggedInUserDetails(baseURL: string, useDefaultSuccessHandler: boolean = true) {\n if (!baseURL) {\n this.loggedInUser = {};\n return Promise.resolve({});\n }\n return this.load(baseURL);\n }\n\n \n public redirectToLogin(redirectTo?: string) {\n if (this.securityConfig?.loginConfig?.type === 'SSO') {\n const authUrl = this.appConfig.url + '/services/security/ssologin';\n if (Platform.OS === 'web') {\n (window.parent || window).location.href = authUrl;\n } else {\n setTimeout(() => {\n WebProcessService.execute('LOGIN', '/services/security/ssologin', false, true)\n .then((output: any) => {\n if (output) {\n if(output.data){\n return this.formateData(`${output.data}`);\n }\n }\n return Promise.reject();\n }).then((output: any) => {\n if (output[XSRF_COOKIE_NAME]) {\n this.token = output[XSRF_COOKIE_NAME];\n StorageService.setItem(XSRF_COOKIE_NAME, output[XSRF_COOKIE_NAME]);\n }\n }).then(() => {\n this.appConfig.refresh(true);\n }).then(() => this.load(this.baseUrl)).then(() => {\n return this.getLoggedInUserDetails(this.baseUrl);\n });\n }, 1000);\n }\n } else {\n const loginPage = this.securityConfig.loginConfig?.pageName || 'Login';\n if (redirectTo && !redirectTo.startsWith('#/'+ loginPage)) {\n this.landingPage = redirectTo;\n }\n injector.get<AppConfig>('APP_CONFIG').landingPage = loginPage;\n this.appConfig.currentPage?.goToPage(loginPage, null, true);\n }\n this.appConfig.refresh();\n }\n\n public appLogout(options: any) {\n return axios.post(options.baseURL + '/j_spring_security_logout', null, {\n withCredentials: true\n }).catch(() => {}).then(() => {\n this.isLoggedIn = false;\n this.redirectToLogin();\n });\n }\n\n public canUserAccessPage(pageName: string) {\n if (this.baseUrl && this.securityConfig?.isSecurityEnabled) {\n return axios.get(this.baseUrl + `/pages/${pageName}/${pageName}.html`)\n .catch((res) => res)\n .then((res) => res.status === 200 || res.status === 304); \n } else {\n return Promise.resolve(true);\n }\n }\n\n private matchRoles(widgetRoles: Array<String>, userRoles: Array<String>) {\n return widgetRoles.some(function (item) {\n return includes(userRoles, item);\n });\n }\n\n public hasAccessToWidget(widgetRoles: String) {\n const widgetRolesArr = widgetRoles.split(',');\n // access the widget when 'Everyone' is chosen\n if (includes(widgetRolesArr, USER_ROLE.EVERYONE)) {\n return true;\n }\n\n // access the widget when 'Anonymous' is chosen and user is not authenticated\n if (includes(widgetRolesArr, USER_ROLE.ANONYMOUS) && !this.loggedInUser.dataSet?.isAuthenticated) {\n return true;\n }\n\n // access the widget when 'Only Authenticated Users' is chosen and user is authenticated\n if (includes(widgetRolesArr, USER_ROLE.AUTHENTICATED) && this.loggedInUser.dataSet?.isAuthenticated) {\n return true;\n }\n\n // access the widget when widget role and logged in user role matches\n return this.loggedInUser.dataSet?.isAuthenticated && this.matchRoles(widgetRolesArr, this.loggedInUser.dataSet?.roles);\n }\n}\n\nconst appSecurityService = new AppSecurityService();\n\nexport default appSecurityService;\n"],"mappings":";;;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,KAAK,MAAqD,OAAO;AACxE,SAASC,IAAI,EAAEC,QAAQ,QAAQ,QAAQ;AAEvC,OAAOC,cAAc,MAAM,gDAAgD;AAC3E,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAOC,cAAc,MAAM,gDAAgD;AAG3E,OAAOC,iBAAiB,MAAM,sBAAsB;AACpD,SAASC,gBAAgB,QAAQ,sCAAsC;AAAC,IAenEC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA,EAATA,SAAS;AAMd,MAAMC,aAAa,GAAG,aAAa;AACnC,MAAMC,gBAAgB,GAAG,eAAe;AACxC,MAAMC,gBAAgB,GAAG,iBAAiB;AAE1C,MAAMC,kBAAkB,CAA4B;EAWhDC,WAAWA,CAAA,EAAG;IAAAC,eAAA;IAAAA,eAAA,qBARD,KAAK;IAAAA,eAAA,uBACE,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,kBAGJ,EAAE;IAAAA,eAAA;IAAAA,eAAA,sBAEN,EAAE;IAAAA,eAAA,mBAMJC,GAAW,IAAI;MACzB,MAAMC,mBAAmB,GAAGD,GAAG,CAACE,OAAO,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,CAAE;MAChE,IAAIC,KAAK,GAAGF,mBAAmB;MAE/B,OAAMD,GAAG,CAACG,KAAK,CAAC,KAAK,GAAG,EAAC;QACvBA,KAAK,EAAE;MACT;MAEA,MAAMC,MAAM,GAAGJ,GAAG,CAACK,SAAS,CAACJ,mBAAmB,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AA,uBAAzBA,sBAAA,CAA2B5C,eAAe,KAAI,IAAI,CAACsC,UAAU,CAACQ,cAAc,GAAAD,sBAAA,GAAE,IAAI,CAACxF,YAAY,CAACoD,OAAO,cAAAoC,sBAAA,uBAAzBA,sBAAA,CAA2B5C,KAAK,CAAC;EAC1H;AACJ;AAEA,MAAMiD,kBAAkB,GAAG,IAAItI,kBAAkB,CAAC,CAAC;AAEnD,eAAesI,kBAAkB","ignoreList":[]}
|
1
|
+
{"version":3,"names":["Platform","axios","each","includes","networkService","injector","StorageService","WebProcessService","isWebPreviewMode","USER_ROLE","authCookieStr","XSRF_COOKIE_NAME","xsrf_header_name","AppSecurityService","constructor","_defineProperty","str","wm_xsrf_token_index","indexOf","index","regExp","substring","RegExp","data","regex","getRegex","JSON","parse","replace","interceptors","request","use","config","onBeforeServiceCall","appConfig","getAppConfig","baseUrl","url","getXsrfToken","then","token","_config$url","startsWith","headers","Promise","resolve","getItem","xsrf_token","get","navigateToLandingPage","_this$appConfig$curre","_this$appConfig$logge","currentPage","goToPage","loggedInUser","landingPage","setTimeout","_this$appConfig$curre2","openUrl","appLogin","options","payload","formData","value","name","encodeURIComponent","defaults","withCredentials","post","baseURL","response","xsrfCookieValue","setItem","isLoggedIn","load","userData","getLoggedInUserDetails","useDefaultSuccessHandler","app","triggerStartUpVariables","_document","document","cookie","split","filter","item","length","wm_xsrf_token","isConnected","getServiceDefinitions","defaultSecurityConfig","details","securityConfig","isSecurityEnabled","securityEnabled","authenticated","_appConfig$appPropert","isAuthenticated","roles","userInfo","userRoles","userName","id","userId","tenantId","userAttributes","dataSet","appProperties","homePage","redirectToLogin","redirectTo","_this$securityConfig","loginConfig","type","authUrl","OS","window","parent","location","href","execute","output","formateData","reject","refresh","_this$securityConfig$","_this$appConfig$curre3","loginPage","pageName","appLogout","catch","_response$data","result","r","_response$data2","e","console","error","canUserAccessPage","_this$securityConfig2","res","status","matchRoles","widgetRoles","some","hasAccessToWidget","_this$loggedInUser$da","_this$loggedInUser$da2","_this$loggedInUser$da3","_this$loggedInUser$da4","widgetRolesArr","EVERYONE","ANONYMOUS","AUTHENTICATED","appSecurityService"],"sources":["app-security.service.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios';\nimport { each, includes } from 'lodash';\n\nimport networkService from '@wavemaker/app-rn-runtime/core/network.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport StorageService from '@wavemaker/app-rn-runtime/core/storage.service';\nimport { SecurityService } from '@wavemaker/app-rn-runtime/core/security.service';\n\nimport WebProcessService from './webprocess.service';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\ndeclare const window: any;\n\ninterface LoggedInUserConfig {\n isAuthenticated: Boolean;\n isSecurityEnabled: Boolean;\n roles: Array<string>;\n name: String;\n id: String;\n tenantId: String;\n userAttributes: any;\n landingPage: string;\n}\n\nenum USER_ROLE {\n EVERYONE = 'Everyone',\n ANONYMOUS = 'Anonymous',\n AUTHENTICATED = 'Authenticated'\n}\n\nconst authCookieStr = 'AUTH_COOKIE';\nconst XSRF_COOKIE_NAME = 'wm_xsrf_token';\nconst xsrf_header_name = 'X-WM-XSRF-TOKEN';\n\nclass AppSecurityService implements SecurityService {\n\n securityConfig: any;\n isLoggedIn = false;\n loggedInUser: any = {};\n token: any;\n appConfig: any;\n baseUrl: string = '';\n defaultSecurityConfig: any;\n landingPage = '';\n\n constructor() {\n axios.interceptors.request.use((config: InternalAxiosRequestConfig) => this.onBeforeServiceCall(config));\n }\n\n getRegex = (str: string) =>{\n const wm_xsrf_token_index = str.indexOf('wm_xsrf_token') + 13; // 13 is the length of 'wm_xsrf_token' string\n let index = wm_xsrf_token_index;\n\n while(str[index] !== ':'){\n index++;\n }\n \n const regExp = str.substring(wm_xsrf_token_index, index);\n return new RegExp(regExp, \"g\");\n }\n \n formateData = (data: string) => {\n const regex = this.getRegex(data)\n return JSON.parse(data.replace(regex, \"\\\"\"));\n }\n\n onBeforeServiceCall(config: InternalAxiosRequestConfig) {\n if (!this.appConfig) {\n this.appConfig = this.getAppConfig();\n this.baseUrl = this.appConfig.url;\n }\n return this.getXsrfToken().then((token: string) => {\n if (config.url?.startsWith(this.baseUrl) && token) {\n if(config.headers) config.headers[xsrf_header_name] = token;\n }\n return config\n });\n }\n\n private getXsrfToken(): Promise<string> {\n if (this.token) {\n return Promise.resolve(this.token);\n }\n return StorageService.getItem(XSRF_COOKIE_NAME).then(xsrf_token => {\n this.token = xsrf_token;\n return this.token;\n });\n }\n\n private getAppConfig() {\n return injector.get<AppConfig>('APP_CONFIG');\n }\n\n public navigateToLandingPage() {\n this.appConfig.currentPage?.goToPage(\n this.appConfig.loggedInUser?.landingPage \n || this.appConfig.landingPage \n || 'Main', null, true);\n if (this.landingPage) {\n const landingPage = this.landingPage;\n this.landingPage = '';\n setTimeout(() => {\n this.appConfig.currentPage?.openUrl(landingPage);\n }, 100);\n }\n }\n\n public appLogin(options: any) {\n // encode all parameters\n let payload = '';\n each(options.formData, function (value, name) {\n payload += (payload ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value);\n });\n axios.defaults.withCredentials = true;\n return axios.post(options.baseURL + '/j_spring_security_check', payload, {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }}).then((response: AxiosResponse) => {\n const xsrfCookieValue = response.data ? response.data[XSRF_COOKIE_NAME] : '';\n this.token = xsrfCookieValue;\n StorageService.setItem(XSRF_COOKIE_NAME, xsrfCookieValue);\n this.isLoggedIn = true;\n }).then(() => this.load(options.baseURL))\n .then(async () => {\n const userData = await this.getLoggedInUserDetails(options.baseURL, options.useDefaultSuccessHandler);\n await this.appConfig.app.triggerStartUpVariables();\n return userData;\n });\n }\n\n public load(baseURL: string) {\n if (isWebPreviewMode()) {\n const token = document?.cookie?.split(';').filter(item => item.includes('wm_xsrf_token'))\n if (token && token.length > 0) {\n const wm_xsrf_token = token[0].split('=')[1];\n wm_xsrf_token && StorageService.setItem(XSRF_COOKIE_NAME, wm_xsrf_token);\n }\n }\n\n return Promise.resolve().then(() => {\n if (networkService.isConnected()) {\n return axios.get(baseURL + '/services/security/info')\n .then((response: AxiosResponse) => response.data);\n }\n return this.appConfig.getServiceDefinitions(this.appConfig.url)\n .then(() => Promise.resolve(this.defaultSecurityConfig));\n }).then((details: any) => {\n const loggedInUser = {} as LoggedInUserConfig;\n this.securityConfig = details || {};\n this.securityConfig.isSecurityEnabled = !!details?.securityEnabled;\n const appConfig = this.appConfig;\n if (typeof details !== 'string' && (!details.securityEnabled || details.authenticated)) {\n if (details.authenticated) {\n loggedInUser.isAuthenticated = details.authenticated;\n loggedInUser.isSecurityEnabled = details.authenticated;\n loggedInUser.roles = details.userInfo.userRoles;\n loggedInUser.name = details.userInfo.userName;\n loggedInUser.id = details.userInfo.userId;\n loggedInUser.tenantId = details.userInfo.tenantId;\n loggedInUser.userAttributes = details.userInfo.userAttributes;\n loggedInUser.landingPage = details.userInfo.landingPage;\n appConfig.loggedInUser = loggedInUser;\n this.loggedInUser.dataSet = loggedInUser;\n appConfig.landingPage = appConfig.appProperties?.homePage;\n }\n return appConfig.getServiceDefinitions(appConfig.url)\n .then(() => {\n return details;\n });\n } else {\n return appConfig.getServiceDefinitions(appConfig.url)\n .then(() => {\n this.redirectToLogin();\n });\n }\n });\n }\n\n private getLoggedInUserDetails(baseURL: string, useDefaultSuccessHandler: boolean = true) {\n if (!baseURL) {\n this.loggedInUser = {};\n return Promise.resolve({});\n }\n return this.load(baseURL);\n }\n\n \n public redirectToLogin(redirectTo?: string) {\n if (this.securityConfig?.loginConfig?.type === 'SSO') {\n const authUrl = this.appConfig.url + '/services/security/ssologin';\n if (Platform.OS === 'web') {\n (window.parent || window).location.href = authUrl;\n } else {\n setTimeout(() => {\n WebProcessService.execute('LOGIN', '/services/security/ssologin', false, true)\n .then((output: any) => {\n if (output) {\n if(output.data){\n return this.formateData(`${output.data}`);\n }\n }\n return Promise.reject();\n }).then((output: any) => {\n if (output[XSRF_COOKIE_NAME]) {\n this.token = output[XSRF_COOKIE_NAME];\n StorageService.setItem(XSRF_COOKIE_NAME, output[XSRF_COOKIE_NAME]);\n }\n }).then(() => {\n this.appConfig.refresh(true);\n }).then(() => this.load(this.baseUrl)).then(() => {\n return this.getLoggedInUserDetails(this.baseUrl);\n });\n }, 1000);\n }\n } else {\n const loginPage = this.securityConfig.loginConfig?.pageName || 'Login';\n if (redirectTo && !redirectTo.startsWith('#/'+ loginPage)) {\n this.landingPage = redirectTo;\n }\n injector.get<AppConfig>('APP_CONFIG').landingPage = loginPage;\n this.appConfig.currentPage?.goToPage(loginPage, null, true);\n }\n this.appConfig.refresh();\n }\n\n public appLogout(options: any) {\n return axios.post(options.baseURL + '/j_spring_security_logout', null, {\n withCredentials: true\n })\n .catch(() => {})\n .then((response) => {\n if(response?.data?.result){\n if (isWebPreviewMode()) {\n location.href = response.data.result;\n return new Promise(r => setTimeout(r, 5000));\n } else {\n return axios.get(`${response?.data?.result}`, {\n withCredentials: true,\n });\n }\n }\n return Promise.reject();\n })\n .catch((e) => {\n console.error(e);\n })\n .then(()=>{\n this.isLoggedIn = false;\n this.redirectToLogin();\n });\n }\n\n public canUserAccessPage(pageName: string) {\n if (this.baseUrl && this.securityConfig?.isSecurityEnabled) {\n return axios.get(this.baseUrl + `/pages/${pageName}/${pageName}.html`)\n .catch((res) => res)\n .then((res) => res.status === 200 || res.status === 304); \n } else {\n return Promise.resolve(true);\n }\n }\n\n private matchRoles(widgetRoles: Array<String>, userRoles: Array<String>) {\n return widgetRoles.some(function (item) {\n return includes(userRoles, item);\n });\n }\n\n public hasAccessToWidget(widgetRoles: String) {\n const widgetRolesArr = widgetRoles.split(',');\n // access the widget when 'Everyone' is chosen\n if (includes(widgetRolesArr, USER_ROLE.EVERYONE)) {\n return true;\n }\n\n // access the widget when 'Anonymous' is chosen and user is not authenticated\n if (includes(widgetRolesArr, USER_ROLE.ANONYMOUS) && !this.loggedInUser.dataSet?.isAuthenticated) {\n return true;\n }\n\n // access the widget when 'Only Authenticated Users' is chosen and user is authenticated\n if (includes(widgetRolesArr, USER_ROLE.AUTHENTICATED) && this.loggedInUser.dataSet?.isAuthenticated) {\n return true;\n }\n\n // access the widget when widget role and logged in user role matches\n return this.loggedInUser.dataSet?.isAuthenticated && this.matchRoles(widgetRolesArr, this.loggedInUser.dataSet?.roles);\n }\n}\n\nconst appSecurityService = new AppSecurityService();\n\nexport default appSecurityService;\n"],"mappings":";;;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,KAAK,MAAqD,OAAO;AACxE,SAASC,IAAI,EAAEC,QAAQ,QAAQ,QAAQ;AAEvC,OAAOC,cAAc,MAAM,gDAAgD;AAC3E,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAOC,cAAc,MAAM,gDAAgD;AAG3E,OAAOC,iBAAiB,MAAM,sBAAsB;AACpD,SAASC,gBAAgB,QAAQ,sCAAsC;AAAC,IAenEC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA,EAATA,SAAS;AAMd,MAAMC,aAAa,GAAG,aAAa;AACnC,MAAMC,gBAAgB,GAAG,eAAe;AACxC,MAAMC,gBAAgB,GAAG,iBAAiB;AAE1C,MAAMC,kBAAkB,CAA4B;EAWhDC,WAAWA,CAAA,EAAG;IAAAC,eAAA;IAAAA,eAAA,qBARD,KAAK;IAAAA,eAAA,uBACE,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,kBAGJ,EAAE;IAAAA,eAAA;IAAAA,eAAA,sBAEN,EAAE;IAAAA,eAAA,mBAMJC,GAAW,IAAI;MACzB,MAAMC,mBAAmB,GAAGD,GAAG,CAACE,OAAO,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,CAAE;MAChE,IAAIC,KAAK,GAAGF,mBAAmB;MAE/B,OAAMD,G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-runtime/styles/theme.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["cloneDeep","isNil","forEach","flatten","isArray","isEmpty","isObject","isString","get","reverse","React","camelCase","Dimensions","deepCopy","isWebPreviewMode","EventNotifier","ViewPort","EVENTS","ViewPortEvents","MediaQueryList","ThemeVariables","getErrorMessage","getStyleReference","isValidStyleProp","DEFAULT_CLASS","window","matchMedia","query","DEVICE_BREAK_POINTS","ThemeEvent","Theme","constructor","parent","name","_defineProperty","traceEnabled","subscribe","event","fn","eventNotifer","notify","children","t","replaceVariables","val","match","s","variableName","substring","length","replace","INSTANCE","clearCache","cache","registerStyle","styleGenerators","push","addStyle","bind","checkStyleProperties","value","Object","keys","map","k","console","log","extend","style","styles","getStyle","addTrace","styleName","mergedChildstyle","childStyle","parentStyle","v","__trace","prefix","result","collect","mergeStyle","flattenStyles","cs","filter","cleanseStyleProperties","screenWidth","width","screenHeight","height","i","stylePropertyValue","endsWith","Number","indexOf","split","c","mediaQuery","clonedStyle","matches","BASE","$new","newTheme","reset","destroy","splice","getTextStyle","color","fontFamily","fontSize","fontStyle","fontWeight","includeFontPadding","fontVariant","letterSpacing","lineHeight","textAlign","textAlignVertical","textDecorationColor","textDecorationStyle","textShadowColor","textShadowOffset","textShadowRadius","textTransform","verticalAlign","writingDirection","userSelect","themeVariables","CHANGE","_Theme","SIZE_CHANGE","ThemeContext","createContext","ThemeProvider","Provider","ThemeConsumer","Consumer","addColStyles","device","minWidth","root","MIN_EXTRA_SMALL_DEVICE","MIN_SMALL_DEVICE","MIN_MEDIUM_DEVICE","MIN_LARGE_DEVICE","display","addDisplayStyles","maxWidth","MAX_LARGE_DEVICE","MAX_EXTRA_SMALL_DEVICE","MAX_SMALL_DEVICE","MAX_MEDIUM_DEVICE","addElevationClasses","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","zIndex","transform","scale","backgroundColor","dangerColor","infoColor","primaryColor","successColor","warningColor","borderColor","text"],"sources":["theme.tsx"],"sourcesContent":["import { cloneDeep, isNil, forEach, flatten, isArray, isEmpty, isObject, isString, isFunction, get, reverse } from 'lodash';\nimport React from 'react';\nimport { camelCase } from 'lodash-es';\nimport { TextStyle, ViewStyle, ImageStyle, ImageBackground, Dimensions } from 'react-native';\nimport { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';\nimport ViewPort, {EVENTS as ViewPortEvents} from '@wavemaker/app-rn-runtime/core/viewport';\nimport MediaQueryList from './MediaQueryList';\nimport ThemeVariables from './theme.variables';\nimport { getErrorMessage, getStyleReference, isValidStyleProp } from './style-prop.validator';\nexport const DEFAULT_CLASS = 'DEFAULT_CLASS';\n\ndeclare const matchMedia: any, window: any;\n\nif (typeof window !== \"undefined\") {\n // @ts-ignore: does not properly extend MediaQueryList\n window.matchMedia = (query: string) => new MediaQueryList(query);\n}\n\nexport const DEVICE_BREAK_POINTS = {\n 'MIN_EXTRA_SMALL_DEVICE' : '0px',\n 'MAX_EXTRA_SMALL_DEVICE' : '767px',\n 'MIN_SMALL_DEVICE' : '768px',\n 'MAX_SMALL_DEVICE' : '991px',\n 'MIN_MEDIUM_DEVICE' : '992px',\n 'MAX_MEDIUM_DEVICE' : '1199px',\n 'MIN_LARGE_DEVICE' : '1200px',\n 'MAX_LARGE_DEVICE' : '1000000px',\n};\n\nexport type styleGeneratorFn<T extends NamedStyles<any>> = (\n themeVariables: ThemeVariables,\n addStyle: (name: string, extend: string, style: T) => void) => void\n\nexport enum ThemeEvent {\n CHANGE ='change'\n};\n\nexport class Theme {\n public static BASE = new Theme(null as any, 'default');\n\n static {\n ViewPort.subscribe(ViewPortEvents.SIZE_CHANGE, () => {\n Theme.BASE.reset();\n });\n }\n\n\n private eventNotifer = new EventNotifier();\n\n private children: Theme[] = [];\n\n private styles: any = {};\n\n private cache: any = {};\n\n private traceEnabled = false;\n\n private styleGenerators: styleGeneratorFn<any>[] = [];\n\n private constructor(private parent:Theme, public readonly name: string) {\n if (parent) {\n this.traceEnabled = parent.traceEnabled;\n } else {\n this.traceEnabled = isWebPreviewMode();\n }\n }\n\n public subscribe(event: ThemeEvent, fn: Function) {\n return this.eventNotifer.subscribe(event, fn);\n }\n\n public notify(event: ThemeEvent): void {\n this.eventNotifer.notify(event, []);\n this.children.forEach(t => t.notify(event));\n }\n\n private replaceVariables(val: string) {\n if(isString(val)) { \n (val.match(/_*var\\([^\\)]*\\)/g) || []).forEach((s) => {\n const variableName = s.substring(4, s.length - 1);\n val = val.replace(s, (ThemeVariables.INSTANCE as any)[variableName]\n || (ThemeVariables.INSTANCE as any)[variableName.substring(2)]\n || (ThemeVariables.INSTANCE as any)[camelCase(variableName.substring(2))]);\n val = this.replaceVariables(val);\n });\n }\n return val; \n }\n\n clearCache() {\n this.cache = {};\n this.children.forEach((t) => t.clearCache());\n }\n\n registerStyle<T extends NamedStyles<any>>(fn: styleGeneratorFn<T>) {\n this.styleGenerators.push(fn);\n fn(ThemeVariables.INSTANCE, this.addStyle.bind(this));\n }\n\n checkStyleProperties(name: string, value : any) {\n if (isObject(value)) {\n Object.keys(value).map((k) => this.checkStyleProperties(k, (value as any)[k]));\n } else if(name && !isValidStyleProp(name, value)) {\n console.log(\n `%cInvalid Style property in ${this.name}: ${getErrorMessage(name, value)}`,\n 'background-color: #FF0000;font-weight: bold; color: #fff'\n );\n console.log(`Refer: ${getStyleReference(name)}`);\n }\n }\n\n private addStyle<T extends NamedStyles<any>>(name: string, extend: string, style: T) {\n this.styles[name] = deepCopy(this.getStyle(extend), this.styles[name], style);\n }\n\n private addTrace(styleName: string, mergedChildstyle: any, childStyle: any, parentStyle?: any) {\n if (!this.traceEnabled) {\n return;\n }\n let addTrace = !isEmpty(childStyle);\n forEach(mergedChildstyle, (v: any, k: string) => {\n if (v && !isString(v) && !isArray(v) && isObject(v)) {\n addTrace = false;\n this.addTrace(styleName + '.' + k, v, childStyle && childStyle[k], parentStyle && parentStyle[k])\n }\n });\n if (addTrace) {\n mergedChildstyle['__trace'] = [\n {\n name: styleName,\n value: childStyle\n },\n ...(parentStyle?.__trace|| [])\n ];\n } else {\n mergedChildstyle['__trace'] = [...(parentStyle?.__trace|| [])];\n }\n }\n\n private flatten(style: any, prefix = \"\", result = {} as any) {\n let collect = !isEmpty(style);\n forEach(style, (v: any, k: string) => {\n if (v && !isString(v) && !isArray(v) && isObject(v)) {\n collect = false;\n this.flatten(v, (prefix ? prefix + '.' : '') + k, result)\n }\n });\n if (collect) {\n result[prefix] = style;\n }\n return result;\n }\n\n mergeStyle(...styles: any) {\n const style = deepCopy(...styles);\n if (this.traceEnabled) {\n const flattenStyles = this.flatten(style);\n Object.keys(flattenStyles).forEach(k => {\n const s = flattenStyles[k];\n s['__trace'] = flatten(reverse(styles.map((v: any) => {\n const cs = get(v, k);\n if (cs && cs.__trace) {\n return [...cs.__trace];\n }\n return [];\n }).filter((t: any) => t.length > 0)));\n });\n }\n return style;\n }\n\n cleanseStyleProperties(style: any) {\n if (!(style && isObject(style)) || isString(style) || isArray(style)) {\n return style;\n }\n style = style as any;\n if (isObject(style) && !isArray(style)) {\n Object.keys(style).forEach(k => {\n (style as any)[k] = this.replaceVariables((style as any)[k]);\n });\n }\n if (!isNil(style['shadowRadius'])) {\n if (style['shadowRadius'] <= 0) {\n style['shadowColor'] = 'transparent';\n } else if (isNil(style['elevation'])) {\n style['elevation'] = 2;\n }\n }\n if (!isNil(style['margin'])) {\n style['marginLeft'] = style['marginLeft'] || style['margin'];\n style['marginRight'] = style['marginRight'] || style['margin'];\n style['marginTop'] = style['marginTop'] || style['margin'];\n style['marginBottom'] = style['marginBottom'] || style['margin'];\n delete style['margin'];\n }\n if (!isNil(style['padding'])) {\n style['paddingLeft'] = style['paddingLeft'] || style['padding'];\n style['paddingRight'] = style['paddingRight'] || style['padding'];\n style['paddingTop'] = style['paddingTop'] || style['padding'];\n style['paddingBottom'] = style['paddingBottom'] || style['padding'];\n delete style['padding'];\n }\n let screenWidth = Dimensions.get('window').width;\n let screenHeight = Dimensions.get('window').height;\n Object.keys(style).forEach((k, i) => {\n let stylePropertyValue = style[k]\n if(typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vw')) {\n stylePropertyValue = stylePropertyValue.replace('vw','')\n style[k] = Number(stylePropertyValue)/100 * screenWidth\n }\n if((typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vh'))) {\n stylePropertyValue = stylePropertyValue.replace('vh','')\n style[k] = Number(stylePropertyValue)/100 * screenHeight\n }\n })\n Object.keys(style).forEach((k, i) => this.cleanseStyleProperties(style[k]));\n return style;\n }\n\n getStyle(name: string) {\n let style = this.cache[name];\n if (style) {\n return style;\n }\n if (!name) {\n return {};\n }\n if (name.indexOf(' ') > 0) {\n style = this.mergeStyle(...(name.split(' ').map(c => this.getStyle(c))));\n } else {\n const parentStyle = this.parent && this.parent.getStyle(name);\n const mediaQuery = (this.styles[name] || {})['@media'];\n let clonedStyle = {};\n if (!mediaQuery || matchMedia(mediaQuery).matches) {\n clonedStyle = cloneDeep(this.styles[name]);\n this.cleanseStyleProperties(clonedStyle);\n }\n if (this !== Theme.BASE && isWebPreviewMode()) {\n this.checkStyleProperties('', clonedStyle);\n }\n style = deepCopy(parentStyle, clonedStyle);\n this.addTrace(`@${this.name}:${name}`, style, clonedStyle, parentStyle);\n }\n this.cache[name] = style;\n return style;\n }\n\n $new(name = \"\", styles = {} as NamedStyles<any>) {\n const newTheme = new Theme(this, name);\n newTheme.reset(styles);\n this.children.push(newTheme);\n return newTheme;\n }\n\n destroy() {\n const i = this.parent.children.indexOf(this);\n if (i >= 0) {\n this.parent.children.splice(i, 1);\n }\n }\n \n getTextStyle(s: any) {\n if (!s) {\n return {};\n }\n return {\n color: s.color,\n fontFamily: s.fontFamily,\n fontSize: s.fontSize,\n fontStyle: s.fontStyle,\n fontWeight: s.fontWeight,\n includeFontPadding: s.includeFontPadding,\n fontVariant: s.fontVariant,\n letterSpacing: s.letterSpacing,\n lineHeight: s.lineHeight,\n textAlign: s.textAlign,\n textAlignVertical: s.textAlignVertical,\n textDecorationColor: s.textDecorationColor,\n textDecorationStyle: s.textDecorationStyle,\n textShadowColor: s.textShadowColor,\n textShadowOffset: s.textShadowOffset,\n textShadowRadius: s.textShadowRadius,\n textTransform: s.textTransform,\n verticalAlign: s.verticalAlign,\n writingDirection: s.writingDirection,\n userSelect: s.userSelect,\n } as TextStyle;\n }\n\n reset(styles?: NamedStyles<any>) {\n this.styles = {};\n this.clearCache();\n if (styles) {\n this.registerStyle((themeVariables, addStyle) => {\n Object.keys(styles).forEach(k => {\n addStyle(k, '', styles[k] as any);\n });\n });\n } else {\n this.styleGenerators.forEach(fn => \n fn(ThemeVariables.INSTANCE, this.addStyle.bind(this)));\n }\n this.notify(ThemeEvent.CHANGE);\n }\n}\nexport default Theme.BASE;\nexport type NamedStyles<T> = { [P in keyof T]: AllStyle | NamedStyles<T>};\nexport type BackgroundImageStyle = {\n backgroundImage: string,\n backgroundPosition: string,\n backgroundRepeat: string,\n backgroundSize: string | number\n};\n\nexport type AllStyle = (ViewStyle & TextStyle & ImageStyle & {userSelect?: 'none'| 'text'} & {rippleColor?: string});\n\nconst ThemeContext = React.createContext<Theme>(null as any);\n\nexport const ThemeProvider = ThemeContext.Provider;\nexport const ThemeConsumer = ThemeContext.Consumer;\n/**\n * Common styles\n */\n Theme.BASE.registerStyle((themeVariables, addStyle) => {\n const addColStyles = (device: string, minWidth: string) => {\n for(let i = 1; i <= 12; i++) {\n addStyle(`col-${device}-${i}`, '', {\n \"@media\": `(min-width: ${minWidth})`,\n root: {\n width: (100 * i / 12) + '%'\n }\n } as any)\n }\n };\n addColStyles('xs', DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE);\n addColStyles('sm', DEVICE_BREAK_POINTS.MIN_SMALL_DEVICE);\n addColStyles('md', DEVICE_BREAK_POINTS.MIN_MEDIUM_DEVICE);\n addColStyles('lg', DEVICE_BREAK_POINTS.MIN_LARGE_DEVICE);\n\n addStyle('d-none', '', {\n root: {\n display: 'none'\n }\n } as any);\n addStyle('d-flex', '', {\n root: {\n display: 'flex'\n }\n } as any);\n\n const addDisplayStyles = (device: string, minWidth: string, maxWidth: string) => {\n addStyle(`d-${device}-none`, '', {\n \"@media\": `(min-width: ${minWidth}) and (max-width: ${maxWidth})`,\n root: {\n display: 'none'\n }\n } as any);\n addStyle(`d-${device}-flex`, '', {\n \"@media\": `(min-width: ${minWidth}) and (max-width: ${maxWidth})`,\n root: {\n display: 'flex'\n }\n } as any);\n };\n addDisplayStyles('all', \n DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_LARGE_DEVICE);\n addDisplayStyles('xs', \n DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_EXTRA_SMALL_DEVICE);\n addDisplayStyles('sm', \n DEVICE_BREAK_POINTS.MIN_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_SMALL_DEVICE);\n addDisplayStyles('md', \n DEVICE_BREAK_POINTS.MIN_MEDIUM_DEVICE,\n DEVICE_BREAK_POINTS.MAX_MEDIUM_DEVICE);\n addDisplayStyles('lg', \n DEVICE_BREAK_POINTS.MIN_LARGE_DEVICE,\n DEVICE_BREAK_POINTS.MAX_LARGE_DEVICE);\n\n const addElevationClasses = () => {\n for(let i = 1; i <= 10; i++) {\n addStyle(`elevate${i}`, '', {\n root : {\n shadowColor: \"#000000\",\n shadowOffset: {\n width: i,\n height: i,\n },\n shadowOpacity: 0.27,\n shadowRadius: i,\n elevation: i,\n zIndex: 1\n }\n });\n }\n };\n addElevationClasses();\n addStyle('hidden', '', {\n root: {\n width: 0,\n height: 0,\n transform: [{ scale: 0 }]\n }\n });\n addStyle('bg-danger', '', { root: { backgroundColor: themeVariables.dangerColor }});\n addStyle('bg-info', '', { root: { backgroundColor: themeVariables.infoColor }});\n addStyle('bg-primary', '', { root: { backgroundColor: themeVariables.primaryColor }});\n addStyle('bg-success', '', { root: { backgroundColor: themeVariables.successColor }});\n addStyle('bg-warning', '', { root: { backgroundColor: themeVariables.warningColor }});\n\n addStyle('border-danger', '', { root: { borderColor: themeVariables.dangerColor }});\n addStyle('border-info', '', { root: { borderColor: themeVariables.infoColor }});\n addStyle('border-primary', '', { root: { borderColor: themeVariables.primaryColor }});\n addStyle('border-success', '', { root: { borderColor: themeVariables.successColor }});\n addStyle('border-warning', '', { root: { borderColor: themeVariables.warningColor }});\n\n addStyle('hide-context-menu', '', { text: { userSelect: 'none' }});\n});\n\n"],"mappings":";;;;AAAA,SAASA,SAAS,EAAEC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAcC,GAAG,EAAEC,OAAO,QAAQ,QAAQ;AAC3H,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,WAAW;AACrC,SAA4DC,UAAU,QAAQ,cAAc;AAC5F,SAASC,QAAQ,EAAEC,gBAAgB,QAAQ,sCAAsC;AACjF,OAAOC,aAAa,MAAM,+CAA+C;AACzE,OAAOC,QAAQ,IAAGC,MAAM,IAAIC,cAAc,QAAO,yCAAyC;AAC1F,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,SAASC,eAAe,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,wBAAwB;AAC7F,OAAO,MAAMC,aAAa,GAAG,eAAe;AAI5C,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;EAC/B;EACAA,MAAM,CAACC,UAAU,GAAIC,KAAa,IAAK,IAAIR,cAAc,CAACQ,KAAK,CAAC;AACpE;AAEA,OAAO,MAAMC,mBAAmB,GAAG;EAC/B,wBAAwB,EAAG,KAAK;EAChC,wBAAwB,EAAG,OAAO;EAClC,kBAAkB,EAAG,OAAO;EAC5B,kBAAkB,EAAG,OAAO;EAC5B,mBAAmB,EAAG,OAA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E,EAAE;IAAE+G,IAAI,EAAE;MAAE1C,UAAU,EAAE;IAAO;EAAC,CAAC,CAAC;AACtE,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["cloneDeep","isNil","forEach","flatten","isArray","isEmpty","isObject","isString","get","reverse","React","camelCase","Dimensions","deepCopy","isWebPreviewMode","EventNotifier","ViewPort","EVENTS","ViewPortEvents","MediaQueryList","ThemeVariables","getErrorMessage","getStyleReference","isValidStyleProp","DEFAULT_CLASS","window","matchMedia","query","DEVICE_BREAK_POINTS","ThemeEvent","Theme","constructor","parent","name","_defineProperty","traceEnabled","subscribe","event","fn","eventNotifer","notify","children","t","replaceVariables","val","match","s","variableName","substring","length","replace","INSTANCE","clearCache","cache","registerStyle","styleGenerators","push","addStyle","bind","checkStyleProperties","value","Object","keys","map","k","console","log","extend","style","styles","getStyle","addTrace","styleName","mergedChildstyle","childStyle","parentStyle","v","__trace","prefix","result","collect","mergeStyle","flattenStyles","cs","filter","cleanseStyleProperties","screenWidth","width","screenHeight","height","i","stylePropertyValue","endsWith","Number","indexOf","split","c","mediaQuery","clonedStyle","matches","BASE","$new","newTheme","reset","destroy","splice","getTextStyle","color","fontFamily","fontSize","fontStyle","fontWeight","includeFontPadding","fontVariant","letterSpacing","lineHeight","textAlign","textAlignVertical","textDecorationColor","textDecorationStyle","textShadowColor","textShadowOffset","textShadowRadius","textTransform","verticalAlign","writingDirection","userSelect","themeVariables","CHANGE","_Theme","SIZE_CHANGE","ThemeContext","createContext","ThemeProvider","Provider","ThemeConsumer","Consumer","addColStyles","device","minWidth","root","MIN_EXTRA_SMALL_DEVICE","MIN_SMALL_DEVICE","MIN_MEDIUM_DEVICE","MIN_LARGE_DEVICE","display","addDisplayStyles","maxWidth","MAX_LARGE_DEVICE","MAX_EXTRA_SMALL_DEVICE","MAX_SMALL_DEVICE","MAX_MEDIUM_DEVICE","addElevationClasses","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","zIndex","transform","scale","backgroundColor","dangerColor","infoColor","primaryColor","successColor","warningColor","borderColor","text"],"sources":["theme.tsx"],"sourcesContent":["import { cloneDeep, isNil, forEach, flatten, isArray, isEmpty, isObject, isString, isFunction, get, reverse } from 'lodash';\nimport React from 'react';\nimport { camelCase } from 'lodash-es';\nimport { TextStyle, ViewStyle, ImageStyle, ImageBackground, Dimensions } from 'react-native';\nimport { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';\nimport ViewPort, {EVENTS as ViewPortEvents} from '@wavemaker/app-rn-runtime/core/viewport';\nimport MediaQueryList from './MediaQueryList';\nimport ThemeVariables from './theme.variables';\nimport { getErrorMessage, getStyleReference, isValidStyleProp } from './style-prop.validator';\nexport const DEFAULT_CLASS = 'DEFAULT_CLASS';\n\ndeclare const matchMedia: any, window: any;\n\nif (typeof window !== \"undefined\") {\n // @ts-ignore: does not properly extend MediaQueryList\n window.matchMedia = (query: string) => new MediaQueryList(query);\n}\n\nexport const DEVICE_BREAK_POINTS = {\n 'MIN_EXTRA_SMALL_DEVICE' : '0px',\n 'MAX_EXTRA_SMALL_DEVICE' : '767px',\n 'MIN_SMALL_DEVICE' : '768px',\n 'MAX_SMALL_DEVICE' : '991px',\n 'MIN_MEDIUM_DEVICE' : '992px',\n 'MAX_MEDIUM_DEVICE' : '1199px',\n 'MIN_LARGE_DEVICE' : '1200px',\n 'MAX_LARGE_DEVICE' : '1000000px',\n};\n\nexport type styleGeneratorFn<T extends NamedStyles<any>> = (\n themeVariables: ThemeVariables,\n addStyle: (name: string, extend: string, style: T) => void) => void\n\nexport enum ThemeEvent {\n CHANGE ='change'\n};\n\nexport class Theme {\n public static BASE = new Theme(null as any, 'default');\n\n static {\n ViewPort.subscribe(ViewPortEvents.SIZE_CHANGE, () => {\n Theme.BASE.reset();\n });\n }\n\n\n private eventNotifer = new EventNotifier();\n\n private children: Theme[] = [];\n\n private styles: any = {};\n\n private cache: any = {};\n\n private traceEnabled = false;\n\n private styleGenerators: styleGeneratorFn<any>[] = [];\n\n private constructor(private parent:Theme, public readonly name: string) {\n if (parent) {\n this.traceEnabled = parent.traceEnabled;\n } else {\n this.traceEnabled = isWebPreviewMode();\n }\n }\n\n public subscribe(event: ThemeEvent, fn: Function) {\n return this.eventNotifer.subscribe(event, fn);\n }\n\n public notify(event: ThemeEvent): void {\n this.eventNotifer.notify(event, []);\n this.children.forEach(t => t.notify(event));\n }\n\n private replaceVariables(val: string) {\n if(isString(val)) { \n (val.match(/_*var\\([^\\)]*\\)/g) || []).forEach((s) => {\n const variableName = s.substring(4, s.length - 1);\n val = val.replace(s, (ThemeVariables.INSTANCE as any)[variableName]\n || (ThemeVariables.INSTANCE as any)[variableName.substring(2)]\n || (ThemeVariables.INSTANCE as any)[camelCase(variableName.substring(2))]);\n val = this.replaceVariables(val);\n });\n }\n return val; \n }\n\n clearCache() {\n this.cache = {};\n this.children.forEach((t) => t.clearCache());\n }\n\n registerStyle<T extends NamedStyles<any>>(fn: styleGeneratorFn<T>) {\n this.styleGenerators.push(fn);\n fn(ThemeVariables.INSTANCE, this.addStyle.bind(this));\n }\n\n checkStyleProperties(name: string, value : any) {\n if (isObject(value)) {\n Object.keys(value).map((k) => this.checkStyleProperties(k, (value as any)[k]));\n } else if(name && !isValidStyleProp(name, value)) {\n console.log(\n `%cInvalid Style property in ${this.name}: ${getErrorMessage(name, value)}`,\n 'background-color: #FF0000;font-weight: bold; color: #fff'\n );\n console.log(`Refer: ${getStyleReference(name)}`);\n }\n }\n\n private addStyle<T extends NamedStyles<any>>(name: string, extend: string, style: T) {\n this.styles[name] = deepCopy(this.getStyle(extend), this.styles[name], style);\n }\n\n private addTrace(styleName: string, mergedChildstyle: any, childStyle: any, parentStyle?: any) {\n if (!this.traceEnabled) {\n return;\n }\n let addTrace = !isEmpty(childStyle);\n forEach(mergedChildstyle, (v: any, k: string) => {\n if (v && !isString(v) && !isArray(v) && isObject(v)) {\n addTrace = false;\n this.addTrace(styleName + '.' + k, v, childStyle && childStyle[k], parentStyle && parentStyle[k])\n }\n });\n if (addTrace) {\n mergedChildstyle['__trace'] = [\n {\n name: styleName,\n value: childStyle\n },\n ...(parentStyle?.__trace|| [])\n ];\n } else {\n mergedChildstyle['__trace'] = [...(parentStyle?.__trace|| [])];\n }\n }\n\n private flatten(style: any, prefix = \"\", result = {} as any) {\n let collect = !isEmpty(style);\n forEach(style, (v: any, k: string) => {\n if (v && !isString(v) && !isArray(v) && isObject(v)) {\n collect = false;\n this.flatten(v, (prefix ? prefix + '.' : '') + k, result)\n }\n });\n if (collect) {\n result[prefix] = style;\n }\n return result;\n }\n\n mergeStyle(...styles: any) {\n const style = deepCopy(...styles);\n if (this.traceEnabled) {\n const flattenStyles = this.flatten(style);\n Object.keys(flattenStyles).forEach(k => {\n const s = flattenStyles[k];\n s['__trace'] = flatten(reverse(styles.map((v: any) => {\n const cs = get(v, k);\n if (cs && cs.__trace) {\n return [...cs.__trace];\n }\n return [];\n }).filter((t: any) => t.length > 0)));\n });\n }\n return style;\n }\n\n cleanseStyleProperties(style: any) {\n if (!(style && isObject(style)) || isString(style) || isArray(style)) {\n return style;\n }\n style = style as any;\n if (isObject(style) && !isArray(style)) {\n Object.keys(style).forEach(k => {\n (style as any)[k] = this.replaceVariables((style as any)[k]);\n });\n }\n if (!isNil(style['shadowRadius'])) {\n if (style['shadowRadius'] <= 0) {\n style['shadowColor'] = 'transparent';\n } else if (isNil(style['elevation'])) {\n style['elevation'] = 2;\n }\n }\n if (!isNil(style['margin'])) {\n style['marginLeft'] = style['marginLeft'] || style['margin'];\n style['marginRight'] = style['marginRight'] || style['margin'];\n style['marginTop'] = style['marginTop'] || style['margin'];\n style['marginBottom'] = style['marginBottom'] || style['margin'];\n delete style['margin'];\n }\n if (!isNil(style['padding'])) {\n style['paddingLeft'] = style['paddingLeft'] || style['padding'];\n style['paddingRight'] = style['paddingRight'] || style['padding'];\n style['paddingTop'] = style['paddingTop'] || style['padding'];\n style['paddingBottom'] = style['paddingBottom'] || style['padding'];\n delete style['padding'];\n }\n let screenWidth = Dimensions.get('window').width;\n let screenHeight = Dimensions.get('window').height;\n Object.keys(style).forEach((k, i) => {\n let stylePropertyValue = style[k]\n if(typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vw')) {\n stylePropertyValue = stylePropertyValue.replace('vw','')\n style[k] = Number(stylePropertyValue)/100 * screenWidth\n }\n if((typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vh'))) {\n stylePropertyValue = stylePropertyValue.replace('vh','')\n style[k] = Number(stylePropertyValue)/100 * screenHeight\n }\n })\n Object.keys(style).forEach((k, i) => this.cleanseStyleProperties(style[k]));\n return style;\n }\n\n getStyle(name: string) {\n let style = this.cache[name];\n if (style) {\n return style;\n }\n if (!name) {\n return {};\n }\n if (name.indexOf(' ') > 0) {\n style = this.mergeStyle(...(name.split(' ').map(c => this.getStyle(c))));\n } else {\n const parentStyle = this.parent && this.parent.getStyle(name);\n const mediaQuery = (this.styles[name] || {})['@media'];\n let clonedStyle = {};\n if (!mediaQuery || matchMedia(mediaQuery).matches) {\n clonedStyle = cloneDeep(this.styles[name]);\n this.cleanseStyleProperties(clonedStyle);\n }\n if (this !== Theme.BASE && isWebPreviewMode()) {\n this.checkStyleProperties('', clonedStyle);\n }\n style = deepCopy(parentStyle, clonedStyle);\n this.addTrace(`@${this.name}:${name}`, style, clonedStyle, parentStyle);\n }\n this.cache[name] = style;\n return style;\n }\n\n $new(name = \"\", styles = {} as NamedStyles<any>) {\n const newTheme = new Theme(this, name);\n newTheme.reset(styles);\n this.children.push(newTheme);\n return newTheme;\n }\n\n destroy() {\n const i = this.parent.children.indexOf(this);\n if (i >= 0) {\n this.parent.children.splice(i, 1);\n }\n }\n \n getTextStyle(s: any) {\n if (!s) {\n return {};\n }\n return {\n color: s.color,\n fontFamily: s.fontFamily,\n fontSize: s.fontSize,\n fontStyle: s.fontStyle,\n fontWeight: s.fontWeight,\n includeFontPadding: s.includeFontPadding,\n fontVariant: s.fontVariant,\n letterSpacing: s.letterSpacing,\n lineHeight: s.lineHeight,\n textAlign: s.textAlign,\n textAlignVertical: s.textAlignVertical,\n textDecorationColor: s.textDecorationColor,\n textDecorationStyle: s.textDecorationStyle,\n textShadowColor: s.textShadowColor,\n textShadowOffset: s.textShadowOffset,\n textShadowRadius: s.textShadowRadius,\n textTransform: s.textTransform,\n verticalAlign: s.verticalAlign,\n writingDirection: s.writingDirection,\n userSelect: s.userSelect,\n } as TextStyle;\n }\n\n reset(styles?: NamedStyles<any>) {\n this.styles = {};\n this.clearCache();\n if (styles) {\n this.registerStyle((themeVariables, addStyle) => {\n Object.keys(styles).forEach(k => {\n addStyle(k, '', styles[k] as any);\n });\n });\n } else {\n this.styleGenerators.forEach(fn => \n fn(ThemeVariables.INSTANCE, this.addStyle.bind(this)));\n }\n this.notify(ThemeEvent.CHANGE);\n }\n}\nexport default Theme.BASE;\nexport type NamedStyles<T> = { [P in keyof T]: AllStyle | NamedStyles<T>};\nexport type BackgroundImageStyle = {\n backgroundImage: string,\n backgroundPosition: string,\n backgroundRepeat: string,\n backgroundSize: string | number\n};\n\nexport type AllStyle = (ViewStyle & TextStyle & ImageStyle & {userSelect?: 'none'| 'text'} & {rippleColor?: string});\n\nconst ThemeContext = React.createContext<Theme>(null as any);\n\nexport const ThemeProvider = ThemeContext.Provider;\nexport const ThemeConsumer = ThemeContext.Consumer;\n/**\n * Common styles\n */\n Theme.BASE.registerStyle((themeVariables, addStyle) => {\n const addColStyles = (device: string, minWidth: string) => {\n for(let i = 1; i <= 12; i++) {\n addStyle(`col-${device}-${i}`, '', {\n \"@media\": `(min-width: ${minWidth})`,\n root: {\n width: (100 * i / 12) + '%'\n }\n } as any)\n }\n };\n addColStyles('xs', DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE);\n addColStyles('sm', DEVICE_BREAK_POINTS.MIN_SMALL_DEVICE);\n addColStyles('md', DEVICE_BREAK_POINTS.MIN_MEDIUM_DEVICE);\n addColStyles('lg', DEVICE_BREAK_POINTS.MIN_LARGE_DEVICE);\n\n addStyle('d-none', '', {\n root: {\n display: 'none'\n }\n } as any);\n addStyle('d-flex', '', {\n root: {\n display: 'flex'\n }\n } as any);\n\n const addDisplayStyles = (device: string, minWidth: string, maxWidth: string) => {\n addStyle(`d-${device}-none`, '', {\n \"@media\": `(min-width: ${minWidth}) and (max-width: ${maxWidth})`,\n root: {\n display: 'none'\n }\n } as any);\n addStyle(`d-${device}-flex`, '', {\n \"@media\": `(min-width: ${minWidth}) and (max-width: ${maxWidth})`,\n root: {\n display: 'flex'\n }\n } as any);\n };\n addDisplayStyles('all', \n DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_LARGE_DEVICE);\n addDisplayStyles('xs', \n DEVICE_BREAK_POINTS.MIN_EXTRA_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_EXTRA_SMALL_DEVICE);\n addDisplayStyles('sm', \n DEVICE_BREAK_POINTS.MIN_SMALL_DEVICE,\n DEVICE_BREAK_POINTS.MAX_SMALL_DEVICE);\n addDisplayStyles('md', \n DEVICE_BREAK_POINTS.MIN_MEDIUM_DEVICE,\n DEVICE_BREAK_POINTS.MAX_MEDIUM_DEVICE);\n addDisplayStyles('lg', \n DEVICE_BREAK_POINTS.MIN_LARGE_DEVICE,\n DEVICE_BREAK_POINTS.MAX_LARGE_DEVICE);\n\n const addElevationClasses = () => {\n for(let i = 1; i <= 10; i++) {\n addStyle(`elevate${i}`, '', {\n root : {\n shadowColor: \"#000000\",\n shadowOffset: {\n width: i,\n height: i,\n },\n shadowOpacity: 0.27,\n shadowRadius: i,\n elevation: i,\n zIndex: 1\n }\n });\n }\n };\n addElevationClasses();\n addStyle('hidden', '', {\n root: {\n width: 0,\n height: 0,\n transform: [{ scale: 0 }]\n }\n });\n addStyle('bg-danger', '', { root: { backgroundColor: themeVariables.dangerColor }});\n addStyle('bg-info', '', { root: { backgroundColor: themeVariables.infoColor }});\n addStyle('bg-primary', '', { root: { backgroundColor: themeVariables.primaryColor }});\n addStyle('bg-success', '', { root: { backgroundColor: themeVariables.successColor }});\n addStyle('bg-warning', '', { root: { backgroundColor: themeVariables.warningColor }});\n\n addStyle('border-danger', '', { root: { borderColor: themeVariables.dangerColor }});\n addStyle('border-info', '', { root: { borderColor: themeVariables.infoColor }});\n addStyle('border-primary', '', { root: { borderColor: themeVariables.primaryColor }});\n addStyle('border-success', '', { root: { borderColor: themeVariables.successColor }});\n addStyle('border-warning', '', { root: { borderColor: themeVariables.warningColor }});\n\n addStyle('hide-context-menu', '', { text: { userSelect: 'none' }});\n addStyle('hide-context-menu-input', '', { text: { userSelect: 'none' }});\n});\n\n"],"mappings":";;;;AAAA,SAASA,SAAS,EAAEC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAcC,GAAG,EAAEC,OAAO,QAAQ,QAAQ;AAC3H,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,WAAW;AACrC,SAA4DC,UAAU,QAAQ,cAAc;AAC5F,SAASC,QAAQ,EAAEC,gBAAgB,QAAQ,sCAAsC;AACjF,OAAOC,aAAa,MAAM,+CAA+C;AACzE,OAAOC,QAAQ,IAAGC,MAAM,IAAIC,cAAc,QAAO,yCAAyC;AAC1F,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,SAASC,eAAe,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,wBAAwB;AAC7F,OAAO,MAAMC,aAAa,GAAG,eAAe;AAI5C,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;EAC/B;EACAA,MAAM,CAACC,UAAU,GAAIC,KAAa,IAAK,IAAIR,cAAc,CAACQ,KAAK,CAAC;AACpE;AAEA,OAAO,MAAMC,mBAAmB,GAAG;EAC/B,wBAAwB,EAAG,KAAK;E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EAAE;MAAE2B,WAAW,EAAExC,cAAc,CAACuC;IAAa;EAAC,CAAC,CAAC;EAErF7G,QAAQ,CAAC,mBAAmB,EAAE,EAAE,EAAE;IAAE+G,IAAI,EAAE;MAAE1C,UAAU,EAAE;IAAO;EAAC,CAAC,CAAC;EAClErE,QAAQ,CAAC,yBAAyB,EAAE,EAAE,EAAE;IAAE+G,IAAI,EAAE;MAAE1C,UAAU,EAAE;IAAO;EAAC,CAAC,CAAC;AAC5E,CAAC,CAAC","ignoreList":[]}
|
@@ -55,6 +55,7 @@ export default class ThemeVariables {
|
|
55
55
|
_defineProperty(this, "tabbarInactiveColor", '#d8d8d8');
|
56
56
|
_defineProperty(this, "maxModalHeight", Dimensions.get('window').height - 64 - (StatusBar.currentHeight || 0));
|
57
57
|
_defineProperty(this, "maxWidth", Dimensions.get("window").width);
|
58
|
+
_defineProperty(this, "skeletonBackgroundColor", "#F4F5F8");
|
58
59
|
//rippleColor
|
59
60
|
_defineProperty(this, "rippleColor", this.transparent);
|
60
61
|
// page
|