@wavemaker/app-rn-runtime 11.4.0-next.26251 → 11.4.0-next.28151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-content/carousel-content.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel-template/carousel-template.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/login/login.component.js +1 -1
- app-rn-runtime/components/advanced/login/login.component.js.map +1 -1
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js +5 -5
- app-rn-runtime/components/advanced/network-info-toaster/network-info-toaster.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +1 -1
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.component.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +25 -0
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.props.js +16 -0
- app-rn-runtime/components/basic/custom/custom.props.js.map +1 -0
- app-rn-runtime/components/basic/custom/custom.styles.js +18 -0
- app-rn-runtime/components/basic/custom/custom.styles.js.map +1 -0
- app-rn-runtime/components/basic/icon/icon.component.js +1 -1
- app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +1 -1
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +137 -0
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js +14 -0
- app-rn-runtime/components/basic/lottie/lottie.props.js.map +1 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js +11 -0
- app-rn-runtime/components/basic/lottie/lottie.styles.js.map +1 -0
- app-rn-runtime/components/basic/message/message.component.js +1 -1
- app-rn-runtime/components/basic/message/message.component.js.map +1 -1
- app-rn-runtime/components/basic/picture/picture.component.js +37 -26
- app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +3 -2
- app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +1 -1
- app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +4 -1
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/spinner/spinner.component.js +10 -10
- app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +56 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -0
- app-rn-runtime/components/basic/video/video.props.js +22 -0
- app-rn-runtime/components/basic/video/video.props.js.map +1 -0
- app-rn-runtime/components/basic/video/video.styles.js +11 -0
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -0
- app-rn-runtime/components/container/accordion/accordion.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +1 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -1
- app-rn-runtime/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-content/panel-content.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js +1 -1
- app-rn-runtime/components/container/panel/panel-footer/panel-footer.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +1 -1
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +12 -4
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js +2 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +68 -67
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js +1 -1
- app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +1 -1
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +1 -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 +1 -1
- app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js +1 -1
- app-rn-runtime/components/data/card/card-footer/card-footer.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.component.js +1 -1
- app-rn-runtime/components/data/card/card.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +0 -6
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js +1 -1
- app-rn-runtime/components/data/form/form-body/form-body.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js +1 -1
- app-rn-runtime/components/data/form/form-footer/form-footer.component.js.map +1 -1
- app-rn-runtime/components/data/form/form.component.js +1 -30
- app-rn-runtime/components/data/form/form.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +1 -4
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js +1 -1
- app-rn-runtime/components/device/barcodescanner/barcodescanner.component.js.map +1 -1
- app-rn-runtime/components/device/camera/camera.component.js +3 -0
- app-rn-runtime/components/device/camera/camera.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js +1 -1
- app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogactions/dialogactions.component.js.map +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js +1 -1
- app-rn-runtime/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +1 -16
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +0 -38
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js +1 -1
- app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +0 -9
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +0 -40
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/rating/rating.component.js +1 -1
- app-rn-runtime/components/input/rating/rating.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +1 -1
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +19 -22
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +7 -7
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +1 -10
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +0 -10
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/basenav/basenav.props.js +1 -0
- app-rn-runtime/components/navigation/basenav/basenav.props.js.map +1 -1
- app-rn-runtime/components/navigation/menu/menu.component.js +2 -1
- app-rn-runtime/components/navigation/menu/menu.component.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.component.js +2 -0
- app-rn-runtime/components/navigation/navbar/navbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js +4 -3
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js +1 -0
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +2 -2
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/page.component.js +1 -1
- app-rn-runtime/components/page/page.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +1 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js +1 -1
- app-rn-runtime/components/page/partial-container/partial-container.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js +2 -1
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/core/asset.provider.js +5 -0
- app-rn-runtime/core/asset.provider.js.map +1 -0
- app-rn-runtime/core/base.component.js +113 -41
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/imageSizeEstimator.js +1 -0
- app-rn-runtime/core/imageSizeEstimator.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +105 -0
- app-rn-runtime/gestures/swipe.animation.js.map +1 -0
- app-rn-runtime/package.json +4 -3
- app-rn-runtime/runtime/App.js +11 -2
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +6 -4
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +4 -0
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js +5 -1
- app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-spinner.service.js +5 -1
- app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js +1 -1
- app-rn-runtime/runtime/services/app-toast.service.js.map +1 -1
- app-rn-runtime/styles/background.component.js +259 -0
- app-rn-runtime/styles/background.component.js.map +1 -0
- app-rn-runtime/styles/style-prop.validator.js +38 -8
- app-rn-runtime/styles/style-prop.validator.js.map +1 -1
- app-rn-runtime/styles/style-props.js +93 -0
- app-rn-runtime/styles/style-props.js.map +1 -0
- app-rn-runtime/styles/theme.js +6 -37
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/variables/http.service.js +3 -12
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/service-variable.js +13 -7
- app-rn-runtime/variables/service-variable.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["axios","WS_CONSTANTS","
|
|
1
|
+
{"version":3,"names":["axios","WS_CONSTANTS","isWebPreviewMode","injector","HttpService","send","options","variable","serviceInfo","headers","requestBody","data","url","cancelTokenSource","CancelToken","source","consumes","formData","FormData","parameters","forEach","p","v","params","name","append","methodType","isNonDataMethod","NON_DATA_AXIOS_METHODS","indexOf","toUpperCase","axiosConfig","cancelToken","token","withCredentials","Promise","resolve","reject","apply","then","result","err","sendCall","requestParams","response","getLocale","appConfig","get","appLocale","messages","cancel","uploadFile","event","error","httpService"],"sources":["http.service.ts"],"sourcesContent":["import axios from 'axios';\nimport { HttpClientService } from '@wavemaker/variables/src/types/http-client.service';\nimport { WS_CONSTANTS } from '@wavemaker/app-rn-runtime/variables/utils/variable.constants';\nimport { get, isEmpty } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport class HttpService implements HttpClientService {\n\n send(options: any, variable: any) {\n const serviceInfo = variable.serviceInfo;\n let headers: any = options.headers,\n requestBody: any = options.data,\n url: string = options.url;\n variable.cancelTokenSource = axios.CancelToken.source();\n if (!isWebPreviewMode() && (variable?.serviceInfo?.consumes||[])[0] === 'multipart/form-data') {\n headers['Content-Type'] = 'multipart/form-data';\n let formData = new FormData();\n (variable.serviceInfo.parameters||[]).forEach((p: any) => {\n const v = variable.params[p.name];\n if (v) {\n formData.append(p.name, variable.params[p.name]);\n }\n });\n requestBody = formData;\n }\n const methodType: string = serviceInfo.methodType;\n const isNonDataMethod: boolean = WS_CONSTANTS.NON_DATA_AXIOS_METHODS.indexOf(methodType.toUpperCase()) > -1;\n const axiosConfig = {\n headers: headers,\n cancelToken: variable.cancelTokenSource.token,\n withCredentials: true\n };\n return new Promise((resolve, reject) => {\n // @ts-ignore\n axios[methodType].apply(variable, ( isNonDataMethod ? [url, axiosConfig] : [url, requestBody || {}, axiosConfig]))\n .then((result: any) => {\n resolve(result);\n }, (err: any) => {\n reject(err);\n })\n })\n }\n\n sendCall(requestParams: any, variable: any) {\n return new Promise((resolve, reject) => {\n this.send(requestParams, variable).then((response: any) => {\n resolve(response);\n }, (err: any) => {\n reject(err);\n });\n });\n }\n\n getLocale() {\n const appConfig = injector.get<AppConfig>('APP_CONFIG');\n return appConfig.appLocale.messages;\n }\n\n cancel(variable: any) {\n variable.cancelTokenSource.cancel();\n }\n\n uploadFile(url: any, data: any, variable: any, options?: any) {\n const requestParams = {\n url: url,\n data: data\n }\n return new Promise((resolve, reject) => {\n return this.send(requestParams, variable).then((event: any) => {\n resolve(event.data);\n }, (error: any) => {\n reject(error);\n });\n });\n }\n}\n\nconst httpService = new HttpService();\n\nexport default httpService;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,8DAA8D;AAG3F,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,OAAOC,QAAQ,MAAM,yCAAyC;AAE9D,OAAO,MAAMC,WAAW,CAA8B;EAEpDC,IAAI,CAACC,OAAY,EAAEC,QAAa,EAAE;IAAA;IAChC,MAAMC,WAAW,GAAGD,QAAQ,CAACC,WAAW;IACxC,IAAIC,OAAY,GAAGH,OAAO,CAACG,OAAO;MAChCC,WAAgB,GAAGJ,OAAO,CAACK,IAAI;MAC/BC,GAAW,GAAGN,OAAO,CAACM,GAAG;IACzBL,QAAQ,CAACM,iBAAiB,GAAGb,KAAK,CAACc,WAAW,CAACC,MAAM,EAAE;IACzD,IAAI,CAACb,gBAAgB,EAAE,IAAI,CAAC,CAAAK,QAAQ,aAARA,QAAQ,gDAARA,QAAQ,CAAEC,WAAW,0DAArB,sBAAuBQ,QAAQ,KAAE,EAAE,EAAE,CAAC,CAAC,KAAK,qBAAqB,EAAE;MAC7FP,OAAO,CAAC,cAAc,CAAC,GAAG,qBAAqB;MAC/C,IAAIQ,QAAQ,GAAG,IAAIC,QAAQ,EAAE;MAC7B,CA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ACsC,aAAa,EAAEpC,QAAQ,CAAC,CAACgC,IAAI,CAAEK,QAAa,IAAK;QACvDR,OAAO,CAACQ,QAAQ,CAAC;MACrB,CAAC,EAAGH,GAAQ,IAAK;QACfJ,MAAM,CAACI,GAAG,CAAC;MACb,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEAI,SAAS,GAAG;IACV,MAAMC,SAAS,GAAG3C,QAAQ,CAAC4C,GAAG,CAAY,YAAY,CAAC;IACvD,OAAOD,SAAS,CAACE,SAAS,CAACC,QAAQ;EACrC;EAEAC,MAAM,CAAC3C,QAAa,EAAE;IACpBA,QAAQ,CAACM,iBAAiB,CAACqC,MAAM,EAAE;EACrC;EAEAC,UAAU,CAACvC,GAAQ,EAAED,IAAS,EAAEJ,QAAa,EAAED,OAAa,EAAE;IAC5D,MAAMqC,aAAa,GAAG;MACpB/B,GAAG,EAAEA,GAAG;MACRD,IAAI,EAAEA;IACR,CAAC;IACD,OAAO,IAAIwB,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;MACtC,OAAO,IAAI,CAAChC,IAAI,CAACsC,aAAa,EAAEpC,QAAQ,CAAC,CAACgC,IAAI,CAAEa,KAAU,IAAK;QAC7DhB,OAAO,CAACgB,KAAK,CAACzC,IAAI,CAAC;MACrB,CAAC,EAAG0C,KAAU,IAAK;QACjBhB,MAAM,CAACgB,KAAK,CAAC;MACf,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;AACF;AAEA,MAAMC,WAAW,GAAG,IAAIlD,WAAW,EAAE;AAErC,eAAekD,WAAW"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
-
import {
|
|
4
|
+
import { VariableEvents } from './base-variable';
|
|
5
|
+
import { isEqual } from 'lodash';
|
|
6
|
+
import { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';
|
|
5
7
|
import { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';
|
|
6
8
|
import httpService from '@wavemaker/app-rn-runtime/variables/http.service';
|
|
7
9
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
@@ -14,7 +16,7 @@ export class ServiceVariable extends _ServiceVariable {
|
|
|
14
16
|
const variableConfig = {
|
|
15
17
|
name: config.name,
|
|
16
18
|
dataSet: config.paramProvider(),
|
|
17
|
-
dataBinding:
|
|
19
|
+
dataBinding: {},
|
|
18
20
|
isList: config.isList,
|
|
19
21
|
service: config.service,
|
|
20
22
|
serviceType: config.serviceType,
|
|
@@ -34,7 +36,7 @@ export class ServiceVariable extends _ServiceVariable {
|
|
|
34
36
|
return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);
|
|
35
37
|
},
|
|
36
38
|
onBeforeUpdate: (context, args) => {
|
|
37
|
-
return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.
|
|
39
|
+
return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);
|
|
38
40
|
},
|
|
39
41
|
onResult: (context, args) => {
|
|
40
42
|
return config.onResult && config.onResult(args.variable, args.data, args.options);
|
|
@@ -48,6 +50,9 @@ export class ServiceVariable extends _ServiceVariable {
|
|
|
48
50
|
_defineProperty(this, "cancelTokenSource", void 0);
|
|
49
51
|
_defineProperty(this, "params", {});
|
|
50
52
|
_defineProperty(this, "appConfig", injector.get('APP_CONFIG'));
|
|
53
|
+
this.subscribe(VariableEvents.AFTER_INVOKE, () => {
|
|
54
|
+
this.dataBinding = {};
|
|
55
|
+
});
|
|
51
56
|
}
|
|
52
57
|
invokeOnParamChange() {
|
|
53
58
|
const last = this.params;
|
|
@@ -68,11 +73,12 @@ export class ServiceVariable extends _ServiceVariable {
|
|
|
68
73
|
}
|
|
69
74
|
invoke(options, onSuccess, onError) {
|
|
70
75
|
this.params = this.config.paramProvider();
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
params =
|
|
76
|
+
this.params = deepCopy({}, this.params, this.dataBinding);
|
|
77
|
+
if (options) {
|
|
78
|
+
this.params = deepCopy({}, this.params, options.inputFields ? options.inputFields : options);
|
|
74
79
|
}
|
|
75
|
-
|
|
80
|
+
options = options || {};
|
|
81
|
+
options.inputFields = this.params;
|
|
76
82
|
// service definitions data depends on whether user logged in or not
|
|
77
83
|
// Try to get the latest definition
|
|
78
84
|
this.serviceInfo = this.config.getServiceInfo();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isEqual","
|
|
1
|
+
{"version":3,"names":["VariableEvents","isEqual","deepCopy","ServiceVariable","_ServiceVariable","httpService","injector","_ServiceVariableEvents","constructor","config","variableConfig","name","dataSet","paramProvider","dataBinding","isList","service","serviceType","maxResults","_context","operation","operationId","serviceInfo","getServiceInfo","httpClientService","onSuccess","context","args","variable","data","options","onError","onCanUpdate","onBeforeUpdate","inputData","onResult","onBeforeDatasetReady","get","subscribe","AFTER_INVOKE","invokeOnParamChange","last","params","latest","invoke","Promise","resolve","doNext","currentPage","reject","onDataUpdated","appConfig","refresh","inputFields","console","error"],"sources":["service-variable.ts"],"sourcesContent":["import { VariableConfig, VariableEvents } from './base-variable';\nimport { isEqual, assignIn } from 'lodash';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';\nimport { ServiceVariable as _ServiceVariable } from '@wavemaker/variables/src/model/variable/service-variable';\nimport httpService from '@wavemaker/app-rn-runtime/variables/http.service';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface ServiceVariableConfig extends VariableConfig {\n baseUrl: string;\n maxResults: number;\n _context: any;\n serviceType: string;\n onCanUpdate: any;\n onBeforeUpdate: any;\n onResult: any;\n onBeforeDatasetReady: any;\n inFlightBehavior: string;\n getServiceInfo: Function;\n}\n\nenum _ServiceVariableEvents {\n BEFORE_INVOKE = 'beforeInvoke'\n}\nexport type ServiceVariableEvents = _ServiceVariableEvents | VariableEvents;\n\nexport class ServiceVariable extends _ServiceVariable {\n private cancelTokenSource: any;\n params: any = {};\n public appConfig = injector.get<AppConfig>('APP_CONFIG');\n\n constructor(public config: ServiceVariableConfig) {\n const variableConfig = {\n name: config.name,\n dataSet: config.paramProvider(),\n dataBinding: {},\n isList: config.isList,\n service: config.service,\n serviceType: config.serviceType,\n maxResults: config.maxResults,\n _context: config._context,\n operation: config.operation,\n operationId: config.operationId,\n serviceInfo: config.getServiceInfo(),\n httpClientService: httpService,\n onSuccess: (context: any, args: any) => {\n return config.onSuccess && config.onSuccess(args.variable, args.data, args.options);\n },\n onError: (context: any, args: any) => {\n return config.onError && config.onError(args.variable, args.data, args.options);\n },\n onCanUpdate: (context: any, args: any) => {\n return config.onCanUpdate && config.onCanUpdate(args.variable, args.data, args.options);\n },\n onBeforeUpdate: (context: any, args: any) => {\n return config.onBeforeUpdate && config.onBeforeUpdate(args.variable, args.inputData, args.options);\n },\n onResult: (context: any, args: any) => {\n return config.onResult && config.onResult(args.variable, args.data, args.options);\n },\n onBeforeDatasetReady: (context: any, args: any) => {\n return config.onBeforeDatasetReady && config.onBeforeDatasetReady(args.variable, args.data, args.options);\n }\n }\n super(variableConfig);\n this.subscribe(VariableEvents.AFTER_INVOKE, () => {\n this.dataBinding = {};\n });\n }\n\n invokeOnParamChange() {\n const last = this.params;\n const latest = this.config.paramProvider();\n if (!isEqual(last, latest)) {\n this.invoke(latest);\n }\n return Promise.resolve(this);\n }\n\n public doNext(currentPage: number) {\n // this.invoke({\n // page: currentPage\n // });\n return Promise.reject(this);\n }\n\n onDataUpdated() {\n this.appConfig.refresh(false);\n }\n\n invoke(options? : any, onSuccess?: Function, onError?: Function) {\n this.params = this.config.paramProvider();\n this.params = deepCopy({} as any, this.params, this.dataBinding);\n if (options) {\n this.params = deepCopy({} as any, this.params, options.inputFields ? options.inputFields : options);\n }\n options = options || {};\n options.inputFields = this.params;\n // service definitions data depends on whether user logged in or not\n // Try to get the latest definition\n this.serviceInfo = this.config.getServiceInfo();\n if (!this.serviceInfo) {\n console.error(`Service Info is missing for (${this.name}) variable.`)\n }\n return super.invoke(options, onSuccess, onError);\n }\n\n // cancel($file?: any) {\n // // CHecks if there is any pending requests in the queue\n // if ($queue.requestsQueue.has(this)) {\n // // If the request is a File upload request then modify the elements associated with file upload\n // // else unsubscribe from the observable on the variable.\n // if (false) {\n // // $file._uploadProgress.unsubscribe();\n // // $file.status = 'abort';\n // // this.totalFilesCount--;\n // // initiateCallback(VARIABLE_CONSTANTS.EVENT.ABORT, variable, $file);\n // // if (!this.isFileUploadInProgress(variable.dataBinding) && this.totalFilesCount === 0) {\n // // $queue.process(variable);\n // // // notify inflight variable\n // // this.notifyInflight(variable, false);\n // // }\n // } else {\n // if (true) {\n // this.cancelTokenSource.cancel();\n // $queue.process(this);\n // // notify inflight variable\n // //this.notifyInflight(variable, false);\n // }\n // }\n // }\n // }\n\n // setInput(key: any, val?: any, options?: any) {\n // this.params = merge({}, this.config.paramProvider(), _setInput(this.params, key, val, options));\n // return this.params;\n // }\n}\n"],"mappings":";;;AAAA,SAAyBA,cAAc,QAAQ,iBAAiB;AAChE,SAASC,OAAO,QAAkB,QAAQ;AAE1C,SAASC,QAAQ,QAAQ,sCAAsC;AAC/D,SAASC,eAAe,IAAIC,gBAAgB,QAAQ,0DAA0D;AAC9G,OAAOC,WAAW,MAAM,kDAAkD;AAC1E,OAAOC,QAAQ,MAAM,yCAAyC;AAAC,IAe1DC,sBAAsB;AAAA,WAAtBA,sBAA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