├── packages └── aesirx-bi-app │ ├── src │ ├── containers │ │ ├── RevenuePage │ │ │ └── index.scss │ │ ├── Dashboard │ │ │ ├── DashboardUtils │ │ │ │ └── DashboardUtils.js │ │ │ ├── DashboardViewModels │ │ │ │ ├── DashboardViewModel.js │ │ │ │ └── DashboardViewModelContextProvider.js │ │ │ ├── index.module.scss │ │ │ └── Component │ │ │ │ ├── DatePicker.jsx │ │ │ │ ├── Card.jsx │ │ │ │ └── Overview.jsx │ │ ├── PageDetail │ │ │ ├── PageDetailUtils │ │ │ │ └── PageDetailUtils.js │ │ │ ├── PageDetailViewModels │ │ │ │ ├── PageDetailModel.js │ │ │ │ └── PageDetailViewModelContextProvider.js │ │ │ ├── index.module.scss │ │ │ ├── Component │ │ │ │ ├── DatePicker.jsx │ │ │ │ ├── Card.jsx │ │ │ │ └── Overview.jsx │ │ │ └── index.jsx │ │ ├── EventsPage │ │ │ ├── EventsViewModels │ │ │ │ ├── EventsViewModel.js │ │ │ │ └── EventsViewModelContextProvider.js │ │ │ └── EventsUtils │ │ │ │ └── EventsUtils.js │ │ ├── ConsentsPage │ │ │ ├── ConsentsViewModels │ │ │ │ ├── ConsentsViewModel.js │ │ │ │ └── ConsentsViewModelContextProvider.js │ │ │ ├── ConsentsUtils │ │ │ │ └── ConsentsUtils.js │ │ │ └── Component │ │ │ │ └── TopTable.jsx │ │ ├── EventsDetailPage │ │ │ ├── EventsDetailViewModels │ │ │ │ ├── EventsViewModel.js │ │ │ │ └── EventsDetailViewModelContextProvider.js │ │ │ ├── EventsDetailUtils │ │ │ │ └── EventsDetailUtils.js │ │ │ └── index.jsx │ │ ├── OutlinkPage │ │ │ ├── OutlinkViewModels │ │ │ │ ├── OutlinkViewModels.js │ │ │ │ └── OutlinkViewModelContextProvider.js │ │ │ ├── OutlinkStore │ │ │ │ └── OutlinkStore.js │ │ │ └── Component │ │ │ │ └── OutlinkTable.jsx │ │ ├── FlowListPage │ │ │ ├── FlowListViewModels │ │ │ │ ├── FlowViewModel.js │ │ │ │ └── FlowListViewModelContextProvider.js │ │ │ └── Component │ │ │ │ └── Overview.jsx │ │ ├── RegionCountryPage │ │ │ └── CountryViewModels │ │ │ │ ├── CountryViewModel.js │ │ │ │ └── CountryViewModelContextProvider.js │ │ ├── RealTimePage │ │ │ ├── RealTimeViewModels │ │ │ │ ├── RealTimeViewModel.js │ │ │ │ └── RealTimeViewModelContextProvider.js │ │ │ └── Component │ │ │ │ └── Overview.jsx │ │ ├── UserFlowPage │ │ │ ├── UserFlowViewModels │ │ │ │ ├── UserFlowViewModels.js │ │ │ │ └── UserFlowViewModelContextProvider.js │ │ │ ├── Component │ │ │ │ ├── Node.jsx │ │ │ │ └── Link.jsx │ │ │ └── UserFlowStore │ │ │ │ └── UserFlowStore.js │ │ ├── VisitorsPage │ │ │ └── VisitorsViewModels │ │ │ │ ├── VisitorsViewModels.js │ │ │ │ └── VisitorsViewModelContextProvider.js │ │ ├── PlatformsPage │ │ │ ├── PlatformsViewModel │ │ │ │ ├── PlatformsViewModel.js │ │ │ │ └── PlatformsViewModelContextProvider.js │ │ │ └── index.jsx │ │ ├── WoocommercePage │ │ │ ├── WoocommerceViewModels │ │ │ │ ├── WoocommerceViewModel.js │ │ │ │ └── WoocommerceViewModelContextProvider.js │ │ │ ├── WoocommerceUtils │ │ │ │ └── WoocommerceUtils.js │ │ │ └── Component │ │ │ │ └── TopTable.jsx │ │ ├── UTMTrackingPage │ │ │ ├── UTMTrackingViewModels │ │ │ │ ├── UTMTrackingViewModel.js │ │ │ │ └── UTMTrackingViewModelContextProvider.js │ │ │ └── UTMTrackingUtils │ │ │ │ └── UTMTrackingUtils.js │ │ ├── ConsentsAdvancePage │ │ │ ├── ConsentsAdvanceViewModels │ │ │ │ ├── ConsentsAdvanceViewModel.js │ │ │ │ └── ConsentsAdvanceViewModelContextProvider.js │ │ │ ├── ConsentsAdvanceUtils │ │ │ │ └── ConsentsAdvanceUtils.js │ │ │ └── Component │ │ │ │ └── TopTable.jsx │ │ ├── AcquisitionPage │ │ │ ├── AcquisitionViewModels │ │ │ │ ├── AcquisitionViewModels.js │ │ │ │ └── AcquisitionViewModelContextProvider.js │ │ │ └── Component │ │ │ │ └── TopTabsChannel.jsx │ │ ├── ConsentsTemplatePage │ │ │ └── ConsentsTemplateViewModels │ │ │ │ ├── ConsentsTemplateViewModel.js │ │ │ │ └── ConsentsTemplateViewModelContextProvider.js │ │ ├── DataStreamPage │ │ │ └── index.jsx │ │ ├── FlowDetailPage │ │ │ ├── FlowViewModels │ │ │ │ ├── FlowViewModel.js │ │ │ │ └── FlowViewModelContextProvider.js │ │ │ └── index.jsx │ │ ├── AcquisitionDetail │ │ │ ├── index.module.scss │ │ │ ├── AcquisitionDetailViewModels │ │ │ │ ├── AcquisitionDetailModel.js │ │ │ │ └── AcquisitionDetailViewModelContextProvider.js │ │ │ ├── Component │ │ │ │ ├── DatePicker.jsx │ │ │ │ ├── Overview.jsx │ │ │ │ └── PageTable.jsx │ │ │ └── index.jsx │ │ ├── SearchEnginePage │ │ │ ├── SearchEngineViewModels │ │ │ │ ├── SearchEngineViewModels.js │ │ │ │ └── SearchEngineViewModelContextProvider.js │ │ │ └── Component │ │ │ │ └── OutlinkTable.jsx │ │ ├── UserPage │ │ │ ├── UserViewModel │ │ │ │ ├── UserViewModel.js │ │ │ │ └── UserViewModelContextProvider.jsx │ │ │ ├── edit.jsx │ │ │ └── index.jsx │ │ ├── AcquisitionCampaignPage │ │ │ ├── AcquisitionCampaignViewModels │ │ │ │ ├── AcquisitionCampaignViewModel.js │ │ │ │ └── AcquisitionCampaignViewModelContextProvider.js │ │ │ └── UTMTrackingUtils │ │ │ │ └── AcquisitionCampaignUtils.js │ │ ├── UTMLinkPage │ │ │ ├── UTMLinkViewModel │ │ │ │ ├── UTMLinkViewModel.js │ │ │ │ └── UTMLinkViewModelContextProvider.jsx │ │ │ ├── index.jsx │ │ │ └── edit.jsx │ │ └── TagEventPage │ │ │ ├── TagEventViewModel │ │ │ ├── TagEventViewModel.js │ │ │ └── TagEventViewModelContextProvider.jsx │ │ │ ├── index.jsx │ │ │ └── edit.jsx │ ├── components │ │ ├── PieChartComponent │ │ │ └── index.scss │ │ ├── StackedBarChartComponent │ │ │ └── index.scss │ │ ├── Table │ │ │ ├── index.scss │ │ │ ├── index.module.scss │ │ │ └── GlobalFilter.jsx │ │ ├── ComponentFilter │ │ │ ├── index.module.scss │ │ │ └── SearchComponent.jsx │ │ ├── ComponentNoData │ │ │ ├── index.scss │ │ │ └── index.jsx │ │ ├── ComponentCard │ │ │ └── index.scss │ │ ├── ComponentSVG │ │ │ └── index.jsx │ │ ├── EditHeader │ │ │ └── index.jsx │ │ ├── DateRangePicker │ │ │ └── index.jsx │ │ └── Menu │ │ │ └── index.jsx │ ├── constants │ │ ├── ChartType.js │ │ ├── PageStatus.js │ │ ├── FieldType.js │ │ ├── Settings.js │ │ ├── WebSocketClient.js │ │ └── ProfileModule.js │ ├── setupTests.js │ ├── integration │ │ └── index.js │ ├── store │ │ └── BiStore │ │ │ ├── BiViewModel.js │ │ │ └── BiViewModelContextProvider.js │ ├── translations │ │ └── index.js │ ├── reportWebVitals.js │ ├── index.jsx │ ├── App.jsx │ └── utils │ │ └── index.js │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── assets │ │ └── images │ │ │ ├── click.png │ │ │ ├── direct.png │ │ │ ├── duration.png │ │ │ ├── facebook.png │ │ │ ├── github.png │ │ │ ├── google.png │ │ │ ├── linkedin.png │ │ │ ├── reddit.png │ │ │ ├── twitter.png │ │ │ ├── yandex.png │ │ │ ├── flow_icon.png │ │ │ ├── device_mobile.png │ │ │ ├── device_tablet.png │ │ │ ├── consent_default.png │ │ │ ├── default_preview.jpg │ │ │ ├── device_desktop.png │ │ │ ├── logo │ │ │ └── welcome-logo.png │ │ │ ├── consent_advance_mode.png │ │ │ ├── consent_simple_mode.png │ │ │ ├── default_channel_image.png │ │ │ ├── plus.svg │ │ │ ├── sort_down.svg │ │ │ ├── arrow-right.svg │ │ │ ├── sort.svg │ │ │ ├── cancel.svg │ │ │ ├── info.svg │ │ │ ├── mobile_app.svg │ │ │ ├── save.svg │ │ │ ├── eye.svg │ │ │ ├── visitor.svg │ │ │ ├── check_circle.svg │ │ │ ├── icon-quote.svg │ │ │ ├── chevron_left.svg │ │ │ ├── chevron_right.svg │ │ │ ├── view.svg │ │ │ ├── audience.svg │ │ │ ├── external_link.svg │ │ │ ├── clock.svg │ │ │ ├── dashboard.svg │ │ │ ├── back.svg │ │ │ ├── location.svg │ │ │ ├── grown-down.svg │ │ │ ├── grown-up.svg │ │ │ ├── aim.svg │ │ │ ├── woocommerce.svg │ │ │ ├── revenue-icon.svg │ │ │ ├── acquisition.svg │ │ │ ├── calendar.svg │ │ │ ├── revenue.svg │ │ │ ├── duckduckgo.svg │ │ │ ├── page.svg │ │ │ ├── ic_project.svg │ │ │ ├── bot_user.svg │ │ │ ├── domain.svg │ │ │ ├── google_bot.svg │ │ │ ├── yandex_browser.svg │ │ │ ├── opera.svg │ │ │ ├── data-stream.svg │ │ │ ├── rate.svg │ │ │ ├── setting.svg │ │ │ └── delete.svg │ ├── manifest.json │ └── index.html │ ├── jsconfig.json │ ├── babel.config.json │ ├── craco.config.js │ ├── .env.dist │ ├── .gitignore │ ├── tsup.config.ts │ └── .eslintrc ├── .dockerignore ├── .prettierrc ├── nx.json ├── .gitmodules ├── .github ├── workflows │ ├── test.yml │ ├── codeql-analysis.yml │ └── dashboard.yml └── dependabot.yml ├── .gitignore ├── docker-compose.yml ├── package.json └── Dockerfile /packages/aesirx-bi-app/src/containers/RevenuePage/index.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/npm-debug.log 3 | **/build 4 | **/dist -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/PieChartComponent/index.scss: -------------------------------------------------------------------------------- 1 | .recharts-pie-sector:focus { 2 | outline: none; 3 | } 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/favicon.ico -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/logo192.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/logo512.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./src/" 4 | }, 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/click.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/direct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/direct.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/duration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/duration.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/facebook.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/github.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/google.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/linkedin.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/reddit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/reddit.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/twitter.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/yandex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/yandex.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/StackedBarChartComponent/index.scss: -------------------------------------------------------------------------------- 1 | .recharts-legend-wrapper { 2 | ul { 3 | list-style-type: none; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/flow_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/flow_icon.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/device_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/device_mobile.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/device_tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/device_tablet.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/consent_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/consent_default.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/default_preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/default_preview.jpg -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/device_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/device_desktop.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/logo/welcome-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/logo/welcome-logo.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/consent_advance_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/consent_advance_mode.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/consent_simple_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/consent_simple_mode.png -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/default_channel_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aesirxio/bi-app/HEAD/packages/aesirx-bi-app/public/assets/images/default_channel_image.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "bracketSpacing": true, 4 | "trailingComma": "es5", 5 | "tabWidth": 2, 6 | "semi": true, 7 | "singleQuote": true, 8 | "printWidth": 100 9 | } 10 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/Table/index.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | .sort-icon { 7 | height: 20px; 8 | } 9 | -------------------------------------------------------------------------------- /nx.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasksRunnerOptions": { 3 | "default": { 4 | "runner": "nx/tasks-runners/default", 5 | "options": { 6 | "cacheableOperations": [] 7 | } 8 | } 9 | }, 10 | "affected": { 11 | "defaultBase": "develop" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/ComponentFilter/index.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | .dropdown::after { 7 | display: none !important; 8 | } 9 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/sort_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/constants/ChartType.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | const CHART_TYPE = { 7 | MONTH: 1, 8 | DAY: 2, 9 | WEEK: 3, 10 | }; 11 | 12 | export default CHART_TYPE; 13 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/constants/PageStatus.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | const PAGE_STATUS = { 7 | LOADING: 1, 8 | READY: 2, 9 | ERROR: 3, 10 | }; 11 | 12 | export default PAGE_STATUS; 13 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/ComponentNoData/index.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | .icon-post { 7 | background: #cbf8ef; 8 | } 9 | .icon-project { 10 | background: #ffeadc; 11 | } 12 | 13 | .icon-campain { 14 | background: #fadae3; 15 | } 16 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/constants/FieldType.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | const FIELD_TYPE = { 7 | READONLY: 0, 8 | TEXT: 1, 9 | IMAGE: 2, 10 | DATE: 3, 11 | RICHTEXT: 4, 12 | SINGLE_SELECTION: 5, 13 | }; 14 | 15 | export default FIELD_TYPE; 16 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/constants/Settings.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | const SETTINGS = { 7 | THOUSAND_SEPERATOR: ',', 8 | DECIMAL_SEPERATOR: '.', 9 | CURRENCY_SYMBOL: '$', 10 | CURRENCY_SYMBOL_POSITION: 'front', 11 | }; 12 | 13 | export default SETTINGS; 14 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-react", "@babel/preset-env", "@babel/preset-typescript"], 3 | "plugins": [ 4 | ["@babel/plugin-proposal-class-properties", { "loose": true }], 5 | "@babel/plugin-syntax-dynamic-import", 6 | [ 7 | "module-resolver", 8 | { 9 | "root": ["./src"] 10 | } 11 | ], 12 | ["inline-react-svg"] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/sort.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "packages/aesirx-uikit"] 2 | path = packages/aesirx-uikit 3 | url = https://github.com/aesirxio/aesirx-uikit.git 4 | branch = develop 5 | [submodule "packages/aesirx-lib"] 6 | path = packages/aesirx-lib 7 | url = https://github.com/aesirxio/aesirx-lib.git 8 | branch = develop 9 | [submodule "packages/aesirx-sso"] 10 | path = packages/aesirx-sso 11 | url = https://github.com/aesirxio/sso.git 12 | branch = develop 13 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/setupTests.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 7 | // allows you to do things like: 8 | // expect(element).toHaveTextContent(/react/i) 9 | // learn more: https://github.com/testing-library/jest-dom 10 | import '@testing-library/jest-dom'; 11 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/ComponentCard/index.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | .icon-card { 7 | width: 56px; 8 | height: 56px; 9 | .icon { 10 | width: 100%; 11 | height: 100%; 12 | background-color: var(--sidebar-menu-item-color); 13 | } 14 | } 15 | .icon-grown { 16 | width: 18px; 17 | height: 18px; 18 | } 19 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/integration/index.js: -------------------------------------------------------------------------------- 1 | export { default as BiIntegration } from './lib/MainLayoutIntegration'; 2 | export { integrationRoutes } from '../routes/routes'; 3 | export { integrationMenu } from '../routes/menu'; 4 | export { appLanguages } from '../translations'; 5 | export { BiStoreProvider } from '../store/BiStore/BiViewModelContextProvider'; 6 | export { BiViewModel } from '../store/BiStore/BiViewModel'; 7 | export { DataStream } from '../components/DataStream'; 8 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/craco.config.js: -------------------------------------------------------------------------------- 1 | const { DefinePlugin } = require('webpack'); 2 | const { GitRevisionPlugin } = require('git-revision-webpack-plugin'); 3 | const gitRevisionPlugin = new GitRevisionPlugin(); 4 | 5 | module.exports = { 6 | eslint: { 7 | enable: false, 8 | }, 9 | 10 | webpack: { 11 | plugins: { 12 | add: [ 13 | new DefinePlugin({ 14 | VERSION: JSON.stringify(gitRevisionPlugin.version()), 15 | }), 16 | ], 17 | }, 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/Dashboard/DashboardUtils/DashboardUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | class DashBoardUtils { 7 | transformPersonaResponseIntoModel = (response) => { 8 | return response[0] ?? {}; 9 | }; 10 | 11 | transformResponseIntoSearchItems = (response) => { 12 | return response; 13 | }; 14 | } 15 | 16 | export default DashBoardUtils; 17 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/store/BiStore/BiViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import BiListViewModel from './BiListViewModel'; 7 | 8 | class BiViewModel { 9 | biListViewModel = null; 10 | constructor() { 11 | this.biListViewModel = new BiListViewModel(); 12 | } 13 | 14 | getBiListViewModel = () => this.biListViewModel; 15 | } 16 | 17 | export { BiViewModel }; 18 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PageDetail/PageDetailUtils/PageDetailUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | class DashBoardUtils { 7 | transformPersonaResponseIntoModel = (response) => { 8 | return response[0] ?? {}; 9 | }; 10 | 11 | transformResponseIntoSearchItems = (response) => { 12 | return response; 13 | }; 14 | } 15 | 16 | export default DashBoardUtils; 17 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/constants/WebSocketClient.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | export const WEBSOCKET_EVENT_SIGNATURES = { 7 | CPN_JOINING_ROOM: 'JOINING_ROOM', 8 | 9 | CPN_ON_WEBSOCKET_ERROR: 'connect_error', 10 | 11 | PUSH_CALLBACK_CHANNEL: 'PUSH_CALLBACK_CHANNEL', 12 | FORWARD_CALLBACK_CHANNEL: 'FORWARD_CALLBACK_CHANNEL', 13 | ON_FORCE_TO_CLOSE_CONNECTION: 'FORCE_TO_CLOSE_CONNECTION', 14 | }; 15 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/info.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/.env.dist: -------------------------------------------------------------------------------- 1 | 2 | REACT_APP_BI_ENDPOINT_URL=[1st party server for AesirX Analytics] 3 | REACT_APP_ENDPOINT_ANALYTICS_URL=[1st party server for AesirX Analytics] 4 | REACT_APP_DATA_STREAM=[{"name": "Domain name", "domain": "example.com"},{"name": "Domain name 2", "domain": "example2.com"}] 5 | REACT_APP_SSO_CLIENT_ID=[Replace this with the provided SSO CLIENT ID from https://dapp.shield.aesirx.io/licenses] 6 | REACT_APP_SSO_CLIENT_SECRET=[Replace this the provided SSO CLIENT SECRECT from https://dapp.shield.aesirx.io/licenses] 7 | REACT_APP_HEADER_JWT=true 8 | PORT=3000 9 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | test: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v4 12 | - uses: actions/setup-node@v4 13 | with: 14 | node-version: 18.x 15 | 16 | - run: git submodule update --init --recursive 17 | 18 | - name: Install dependencies 19 | run: yarn install --frozen-lockfile 20 | 21 | - name: Run build 22 | run: CI=false yarn build 23 | 24 | - name: Run Prettier 25 | run: yarn run format:check 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/translations/index.js: -------------------------------------------------------------------------------- 1 | import common_dk from './dk/common.json'; 2 | import common_en from './en/common.json'; 3 | import common_es from './es/common.json'; 4 | import common_hr from './hr/common.json'; 5 | import common_th from './th/common.json'; 6 | import common_ua from './ua/common.json'; 7 | import common_vn from './vi/common.json'; 8 | 9 | const appLanguages = { 10 | en: common_en, 11 | da: common_dk, 12 | vi: common_vn, 13 | th: common_th, 14 | hr: common_hr, 15 | uk: common_ua, 16 | es: common_es, 17 | }; 18 | 19 | export { appLanguages }; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | const reportWebVitals = (onPerfEntry) => { 7 | if (onPerfEntry && onPerfEntry instanceof Function) { 8 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 9 | getCLS(onPerfEntry); 10 | getFID(onPerfEntry); 11 | getFCP(onPerfEntry); 12 | getLCP(onPerfEntry); 13 | getTTFB(onPerfEntry); 14 | }); 15 | } 16 | }; 17 | 18 | export default reportWebVitals; 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | **/node_modules 6 | /.pnp 7 | .pnp.js 8 | 9 | # testing 10 | /coverage 11 | 12 | # production 13 | /build 14 | /dist 15 | 16 | #vscode 17 | .vscode 18 | 19 | /.idea 20 | 21 | # misc 22 | .DS_Store 23 | .env 24 | .env.local 25 | .env.development.local 26 | .env.test.local 27 | .env.production.local 28 | data-stream.json 29 | 30 | npm-debug.log* 31 | yarn-debug.log* 32 | yarn-error.log* 33 | .yarn 34 | 35 | #dist 36 | dist 37 | .yalc 38 | yalc.lock 39 | .nx/installation 40 | .nx/cache -------------------------------------------------------------------------------- /packages/aesirx-bi-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | /dist 14 | 15 | #vscode 16 | .vscode 17 | 18 | /.idea 19 | 20 | # misc 21 | .DS_Store 22 | .env 23 | .env.local 24 | .env.development.local 25 | .env.test.local 26 | .env.production.local 27 | data-stream.json 28 | 29 | npm-debug.log* 30 | yarn-debug.log* 31 | yarn-error.log* 32 | .yarn 33 | 34 | #dist 35 | dist 36 | .yalc 37 | yalc.lock 38 | .nx/installation 39 | .nx/cache -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "AesirX BI App", 3 | "name": "AesirX BI App", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/EventsPage/EventsViewModels/EventsViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import EventsListViewModel from './EventsListViewModel'; 7 | 8 | class EventsViewModel { 9 | eventsList = null; 10 | constructor(eventsStore, globalStore) { 11 | if (eventsStore) { 12 | this.eventsList = new EventsListViewModel(eventsStore, globalStore); 13 | } 14 | } 15 | 16 | getEventsListViewModel = () => this.eventsList; 17 | } 18 | 19 | export default EventsViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/ComponentSVG/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function ComponentSVG({ url, width, height, color, className }) { 4 | return ( 5 | 16 | ); 17 | } 18 | 19 | export default ComponentSVG; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsPage/ConsentsViewModels/ConsentsViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import ConsentsListViewModel from './ConsentsListViewModel'; 7 | 8 | class ConsentsViewModel { 9 | consentsList = null; 10 | constructor(consentsStore, globalStore) { 11 | if (consentsStore) { 12 | this.consentsList = new ConsentsListViewModel(consentsStore, globalStore); 13 | } 14 | } 15 | 16 | getConsentsListViewModel = () => this.consentsList; 17 | } 18 | 19 | export default ConsentsViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/mobile_app.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/EventsDetailPage/EventsDetailViewModels/EventsViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import EventsDetailViewModel from './EventsDetailViewModel'; 7 | 8 | class EventsViewModel { 9 | eventsDetail = null; 10 | constructor(EventsDetailStore, globalStore) { 11 | if (EventsDetailStore) { 12 | this.eventsDetail = new EventsDetailViewModel(EventsDetailStore, globalStore); 13 | } 14 | } 15 | 16 | getEventsDetailViewModel = () => this.eventsDetail; 17 | } 18 | 19 | export default EventsViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/OutlinkPage/OutlinkViewModels/OutlinkViewModels.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import OutlinkListViewModel from './OutlinkListViewModel'; 7 | 8 | class OutlinkViewModel { 9 | outlinkListViewModel = null; 10 | 11 | constructor(outlinkStore, globalStore) { 12 | if (outlinkStore) { 13 | this.outlinkListViewModel = new OutlinkListViewModel(outlinkStore, globalStore); 14 | } 15 | } 16 | getOutlinkListViewModel = () => this.outlinkListViewModel; 17 | } 18 | 19 | export default OutlinkViewModel; 20 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: 'npm' # See documentation for possible values 9 | directory: '/' # Location of package manifests 10 | schedule: 11 | interval: 'monthly' 12 | 13 | - package-ecosystem: 'github-actions' 14 | directory: '/' 15 | schedule: 16 | interval: 'monthly' 17 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/FlowListPage/FlowListViewModels/FlowViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import FlowListListViewModel from './FlowListViewModel'; 7 | 8 | class FlowListViewModel { 9 | flowListListViewModel = null; 10 | 11 | constructor(flowListStore, globalStore) { 12 | if (flowListStore) { 13 | this.flowListListViewModel = new FlowListListViewModel(flowListStore, globalStore); 14 | } 15 | } 16 | getFlowListListViewModel = () => this.flowListListViewModel; 17 | } 18 | 19 | export default FlowListViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/RegionCountryPage/CountryViewModels/CountryViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import CountryListViewModel from './CountryListViewModel'; 7 | 8 | class CountryViewModel { 9 | countryListViewModel = null; 10 | 11 | constructor(countryStore, globalStore) { 12 | if (countryStore) { 13 | this.countryListViewModel = new CountryListViewModel(countryStore, globalStore); 14 | } 15 | } 16 | getCountryListViewModel = () => this.countryListViewModel; 17 | } 18 | 19 | export default CountryViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/RealTimePage/RealTimeViewModels/RealTimeViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import RealTimeListViewModel from './RealTimeListViewModel'; 7 | 8 | class RealTimeViewModel { 9 | realTimeListViewModel = null; 10 | 11 | constructor(realTimeStore, globalStore) { 12 | if (realTimeStore) { 13 | this.realTimeListViewModel = new RealTimeListViewModel(realTimeStore, globalStore); 14 | } 15 | } 16 | getRealTimeListViewModel = () => this.realTimeListViewModel; 17 | } 18 | 19 | export default RealTimeViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserFlowPage/UserFlowViewModels/UserFlowViewModels.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import UserFlowListViewModel from './UserFlowListViewModel'; 7 | 8 | class UserFlowViewModel { 9 | userFlowListViewModel = null; 10 | 11 | constructor(userFlowStore, globalStore) { 12 | if (userFlowStore) { 13 | this.userFlowListViewModel = new UserFlowListViewModel(userFlowStore, globalStore); 14 | } 15 | } 16 | getUserFlowListViewModel = () => this.userFlowListViewModel; 17 | } 18 | 19 | export default UserFlowViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/VisitorsPage/VisitorsViewModels/VisitorsViewModels.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import VisitorsListViewModel from './VisitorsListViewModel'; 7 | 8 | class VisitorsViewModel { 9 | visitorsListViewModel = null; 10 | 11 | constructor(visitorsStore, globalStore) { 12 | if (visitorsStore) { 13 | this.visitorsListViewModel = new VisitorsListViewModel(visitorsStore, globalStore); 14 | } 15 | } 16 | getVisitorsListViewModel = () => this.visitorsListViewModel; 17 | } 18 | 19 | export default VisitorsViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/save.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/Dashboard/DashboardViewModels/DashboardViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import DashboardListViewModel from './DashboardListViewModel'; 7 | 8 | class DashboardViewModel { 9 | dashboardListViewModel = null; 10 | 11 | constructor(dashboardStore, globalStore) { 12 | if (dashboardStore) { 13 | this.dashboardListViewModel = new DashboardListViewModel(dashboardStore, globalStore); 14 | } 15 | } 16 | getDashboardListViewModel = () => this.dashboardListViewModel; 17 | } 18 | 19 | export default DashboardViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PageDetail/PageDetailViewModels/PageDetailModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import PageDetailListViewModel from './PageDetailViewModel'; 7 | 8 | class PageDetailModel { 9 | pageDetailListViewModel = null; 10 | 11 | constructor(pageDetailStore, globalStore) { 12 | if (pageDetailStore) { 13 | this.pageDetailListViewModel = new PageDetailListViewModel(pageDetailStore, globalStore); 14 | } 15 | } 16 | getPageDetailListViewModel = () => this.pageDetailListViewModel; 17 | } 18 | 19 | export default PageDetailModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PlatformsPage/PlatformsViewModel/PlatformsViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import PlatformsListViewModel from './PlatformsListViewModel'; 7 | 8 | class PlatformsViewModel { 9 | platformsListViewModel = null; 10 | 11 | constructor(platformsStore, globalStore) { 12 | if (platformsStore) { 13 | this.platformsListViewModel = new PlatformsListViewModel(platformsStore, globalStore); 14 | } 15 | } 16 | getPlatformsListViewModel = () => this.platformsListViewModel; 17 | } 18 | 19 | export default PlatformsViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/WoocommercePage/WoocommerceViewModels/WoocommerceViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import WoocommerceListViewModel from './WoocommerceListViewModel'; 7 | 8 | class WoocommerceViewModel { 9 | woocommerceList = null; 10 | constructor(woocommerceStore, globalStore) { 11 | if (woocommerceStore) { 12 | this.woocommerceList = new WoocommerceListViewModel(woocommerceStore, globalStore); 13 | } 14 | } 15 | 16 | getWoocommerceListViewModel = () => this.woocommerceList; 17 | } 18 | 19 | export default WoocommerceViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UTMTrackingPage/UTMTrackingViewModels/UTMTrackingViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import UTMTrackingEventsViewModel from './UTMTrackingEventsViewModel'; 7 | 8 | class UTMTrackingViewModel { 9 | utmTrackingEvents = null; 10 | constructor(utmTrackingStore, globalStore) { 11 | if (utmTrackingStore) { 12 | this.utmTrackingEvents = new UTMTrackingEventsViewModel(utmTrackingStore, globalStore); 13 | } 14 | } 15 | 16 | getUTMTrackingEventsViewModel = () => this.utmTrackingEvents; 17 | } 18 | 19 | export default UTMTrackingViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsAdvancePage/ConsentsAdvanceViewModels/ConsentsAdvanceViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import ConsentsListViewModel from './ConsentsAdvanceListViewModel'; 7 | 8 | class ConsentsAdvanceViewModel { 9 | consentsList = null; 10 | constructor(consentsAdvanceStore, globalStore) { 11 | if (consentsAdvanceStore) { 12 | this.consentsList = new ConsentsListViewModel(consentsAdvanceStore, globalStore); 13 | } 14 | } 15 | 16 | getConsentsListViewModel = () => this.consentsList; 17 | } 18 | 19 | export default ConsentsAdvanceViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionPage/AcquisitionViewModels/AcquisitionViewModels.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import AcquisitionListViewModel from './AcquisitionListViewModel'; 7 | 8 | class AcquisitionViewModel { 9 | acquisitionListViewModel = null; 10 | 11 | constructor(acquisitionStore, globalStore) { 12 | if (acquisitionStore) { 13 | this.acquisitionListViewModel = new AcquisitionListViewModel(acquisitionStore, globalStore); 14 | } 15 | } 16 | getAcquisitionListViewModel = () => this.acquisitionListViewModel; 17 | } 18 | 19 | export default AcquisitionViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsTemplatePage/ConsentsTemplateViewModels/ConsentsTemplateViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import ConsentsTemplateListViewModel from './ConsentsTemplateListViewModel'; 7 | 8 | class ConsentsTemplateViewModel { 9 | consentsList = null; 10 | constructor(consentsStore, globalStore) { 11 | if (consentsStore) { 12 | this.consentsList = new ConsentsTemplateListViewModel(consentsStore, globalStore); 13 | } 14 | } 15 | 16 | getConsentsTemplateListViewModel = () => this.consentsList; 17 | } 18 | 19 | export default ConsentsTemplateViewModel; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/eye.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/DataStreamPage/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | 4 | class DataStreamPage extends Component { 5 | render() { 6 | const { t } = this.props; 7 | 8 | return ( 9 | <> 10 |
11 |
12 |
13 |

{t('txt_menu_data_stream')}

14 |
15 |
16 |
17 | 18 | ); 19 | } 20 | } 21 | export default withTranslation()(DataStreamPage); 22 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/FlowDetailPage/FlowViewModels/FlowViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import FlowDetailViewModel from './FlowDetailViewModel'; 7 | 8 | class FlowViewModel { 9 | flowDetailViewModel = null; 10 | constructor(flowDetailStore, behaviorStore, globalStore) { 11 | if ((flowDetailStore, behaviorStore)) { 12 | this.flowDetailViewModel = new FlowDetailViewModel( 13 | flowDetailStore, 14 | behaviorStore, 15 | globalStore 16 | ); 17 | } 18 | } 19 | 20 | getFlowViewModel = () => this.flowDetailViewModel; 21 | } 22 | 23 | export default FlowViewModel; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { Options } from 'tsup'; 2 | import { sassPlugin } from 'esbuild-sass-plugin'; 3 | import inlineImage from 'esbuild-plugin-inline-image'; 4 | 5 | const env = process.env.NODE_ENV; 6 | 7 | export const tsup: Options = { 8 | clean: true, 9 | format: ['esm'], 10 | watch: env === 'development', 11 | outDir: 'dist', 12 | entry: ['src/integration/index.js'], 13 | target: 'es2020', 14 | platform: 'browser', 15 | esbuildPlugins: [inlineImage({ limit: -1 }), sassPlugin({ type: 'style' })], 16 | esbuildOptions(options) { 17 | options.drop = ['console']; 18 | }, 19 | outExtension() { 20 | return { 21 | js: `.js`, 22 | }; 23 | }, 24 | loader: { 25 | '.js': 'jsx', 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/visitor.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | import * as ReactDOMClient from 'react-dom/client'; 8 | import App from './App'; 9 | import reportWebVitals from './reportWebVitals'; 10 | 11 | const container = document.getElementById('biapp'); 12 | 13 | // Create a root. 14 | const root = ReactDOMClient.createRoot(container); 15 | 16 | // Initial render: Render an element to the root. 17 | root.render(); 18 | 19 | reportWebVitals(); 20 | 21 | if (process.env.NODE_ENV === 'production') { 22 | console.log = () => {}; 23 | console.error = () => {}; 24 | console.debug = () => {}; 25 | } 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/Dashboard/index.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | .item_collap_fixed { 7 | left: 250px; 8 | } 9 | 10 | .wrapper_new_schedule { 11 | top: 10px; 12 | right: 1.5rem; 13 | } 14 | 15 | .full_calender { 16 | .pe-400 { 17 | padding-right: 1rem !important; 18 | } 19 | 20 | .sdbar_right { 21 | display: none; 22 | } 23 | } 24 | .folder { 25 | margin-bottom: 32px; 26 | } 27 | 28 | .image { 29 | height: 212px; 30 | overflow: hidden; 31 | width: 100%; 32 | } 33 | .image_isList { 34 | width: 56px; 35 | height: 56px; 36 | } 37 | .popupImageHeight { 38 | height: calc(100% - 50px); 39 | } 40 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PageDetail/index.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | .item_collap_fixed { 7 | left: 250px; 8 | } 9 | 10 | .wrapper_new_schedule { 11 | top: 10px; 12 | right: 1.5rem; 13 | } 14 | 15 | .full_calender { 16 | .pe-400 { 17 | padding-right: 1rem !important; 18 | } 19 | 20 | .sdbar_right { 21 | display: none; 22 | } 23 | } 24 | .folder { 25 | margin-bottom: 32px; 26 | } 27 | 28 | .image { 29 | height: 212px; 30 | overflow: hidden; 31 | width: 100%; 32 | } 33 | .image_isList { 34 | width: 56px; 35 | height: 56px; 36 | } 37 | .popupImageHeight { 38 | height: calc(100% - 50px); 39 | } 40 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionDetail/index.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | .item_collap_fixed { 7 | left: 250px; 8 | } 9 | 10 | .wrapper_new_schedule { 11 | top: 10px; 12 | right: 1.5rem; 13 | } 14 | 15 | .full_calender { 16 | .pe-400 { 17 | padding-right: 1rem !important; 18 | } 19 | 20 | .sdbar_right { 21 | display: none; 22 | } 23 | } 24 | .folder { 25 | margin-bottom: 32px; 26 | } 27 | 28 | .image { 29 | height: 212px; 30 | overflow: hidden; 31 | width: 100%; 32 | } 33 | .image_isList { 34 | width: 56px; 35 | height: 56px; 36 | } 37 | .popupImageHeight { 38 | height: calc(100% - 50px); 39 | } 40 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/SearchEnginePage/SearchEngineViewModels/SearchEngineViewModels.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import SearchEngineListViewModel from './SearchEngineListViewModel'; 7 | 8 | class SearchEngineViewModel { 9 | searchEngineListViewModel = null; 10 | 11 | constructor(searchEngineStore, globalStore) { 12 | if (searchEngineStore) { 13 | this.searchEngineListViewModel = new SearchEngineListViewModel( 14 | searchEngineStore, 15 | globalStore 16 | ); 17 | } 18 | } 19 | getSearchEngineListViewModel = () => this.searchEngineListViewModel; 20 | } 21 | 22 | export default SearchEngineViewModel; 23 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserPage/UserViewModel/UserViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import UserDetailViewModel from './UserDetailViewModel'; 7 | import UserListViewModel from './UserListViewModel'; 8 | 9 | class UserViewModel { 10 | userDetailViewModel = {}; 11 | userListViewModel = {}; 12 | 13 | constructor(userStore) { 14 | if (userStore) { 15 | this.userDetailViewModel = new UserDetailViewModel(userStore); 16 | this.userListViewModel = new UserListViewModel(userStore); 17 | } 18 | } 19 | 20 | getUserDetailViewModel = () => this.userDetailViewModel; 21 | getUserListViewModel = () => this.userListViewModel; 22 | } 23 | 24 | export default UserViewModel; 25 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionDetail/AcquisitionDetailViewModels/AcquisitionDetailModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import AcquisitionDetailListViewModel from './AcquisitionDetailViewModel'; 7 | 8 | class AcquisitionDetailModel { 9 | acquisitionDetailListViewModel = null; 10 | 11 | constructor(acquisitionDetailStore, globalStore) { 12 | if (acquisitionDetailStore) { 13 | this.acquisitionDetailListViewModel = new AcquisitionDetailListViewModel( 14 | acquisitionDetailStore, 15 | globalStore 16 | ); 17 | } 18 | } 19 | getAcquisitionDetailListViewModel = () => this.acquisitionDetailListViewModel; 20 | } 21 | 22 | export default AcquisitionDetailModel; 23 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/store/BiStore/BiViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const BiViewModelContext = React.createContext(); 8 | 9 | export const BiStoreProvider = ({ children, viewModel }) => { 10 | return {children}; 11 | }; 12 | 13 | /* Hook to use store in any functional component */ 14 | export const useBiViewModel = () => React.useContext(BiViewModelContext); 15 | 16 | /* HOC to inject store to any functional or class component */ 17 | export const withBiViewModel = (Component) => (props) => { 18 | return ; 19 | }; 20 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionCampaignPage/AcquisitionCampaignViewModels/AcquisitionCampaignViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import AcquisitionCampaignListModel from './AcquisitionCampaignListModel'; 7 | 8 | class AcquisitionCampaignViewModel { 9 | acquisitionCampaignEvents = null; 10 | constructor(acquisitionCampaignStore, globalStore) { 11 | if (acquisitionCampaignStore) { 12 | this.acquisitionCampaignEvents = new AcquisitionCampaignListModel( 13 | acquisitionCampaignStore, 14 | globalStore 15 | ); 16 | } 17 | } 18 | 19 | getAcquisitionCampaignListModel = () => this.acquisitionCampaignEvents; 20 | } 21 | 22 | export default AcquisitionCampaignViewModel; 23 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/check_circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/constants/ProfileModule.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | const UPDATE_GENERAL_FIELD_KEY = { 7 | ID: 'id', 8 | USERNAME: 'username', 9 | FULLNAME: 'fullname', 10 | AVATAR_DAM: 'avatar_dam', 11 | EMAIL: 'email', 12 | BIRTHDAY: 'birthday', 13 | PHONE: 'phone', 14 | ADDRESS: 'address', 15 | ADDRESS_2: 'address_2', 16 | ZIPCODE: 'zipcode', 17 | CITY: 'city', 18 | STATE: 'state', 19 | COUNTRY: 'country', 20 | TIMEZONE: 'timezone', 21 | }; 22 | 23 | const UPDATE_PASSWORD_FIELD_KEY = { 24 | ID: 'id', 25 | NEW_PASSWORD: 'new_password', 26 | NEW_CHECKED_PASSWORD: 'new_checked_password', 27 | CURR_PASSWORD: 'curr_password', 28 | }; 29 | 30 | export { UPDATE_GENERAL_FIELD_KEY, UPDATE_PASSWORD_FIELD_KEY }; 31 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/EventsPage/EventsUtils/EventsUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import { BI_VISITOR_FIELD_KEY } from 'aesirx-lib'; 7 | import EventsListModel from '../EventsModel/EventsListEventModel'; 8 | 9 | class EventsUtils { 10 | transformResponseIntoAreaChart = (response) => { 11 | let data = {}; 12 | response.forEach((item) => { 13 | const dataFilterEventName = response.filter( 14 | (_item) => _item[BI_VISITOR_FIELD_KEY.EVENT_NAME] === item[BI_VISITOR_FIELD_KEY.EVENT_NAME] 15 | ); 16 | data = { 17 | ...data, 18 | [item[BI_VISITOR_FIELD_KEY.EVENT_NAME]]: dataFilterEventName, 19 | }; 20 | }); 21 | return new EventsListModel(data); 22 | }; 23 | } 24 | 25 | export default EventsUtils; 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UTMLinkPage/UTMLinkViewModel/UTMLinkViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import UTMLinkDetailViewModel from './UTMLinkDetailViewModel'; 7 | import UTMLinkListViewModel from './UTMLinkListViewModel'; 8 | 9 | class UTMLinkViewModel { 10 | utmLinkDetailViewModel = {}; 11 | utmLinkListViewModel = {}; 12 | 13 | constructor(utmLinkStore) { 14 | if (utmLinkStore) { 15 | this.utmLinkDetailViewModel = new UTMLinkDetailViewModel(utmLinkStore); 16 | this.utmLinkListViewModel = new UTMLinkListViewModel(utmLinkStore); 17 | } 18 | } 19 | 20 | getUTMLinkDetailViewModel = () => this.utmLinkDetailViewModel; 21 | getUTMLinkListViewModel = () => this.utmLinkListViewModel; 22 | } 23 | 24 | export default UTMLinkViewModel; 25 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/icon-quote.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/FlowDetailPage/FlowViewModels/FlowViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const FlowViewModelContext = React.createContext(); 8 | 9 | export const FlowViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | {children} 12 | ); 13 | }; 14 | 15 | /* Hook to use store in any functional component */ 16 | export const useFlowViewModel = () => React.useContext(FlowViewModelContext); 17 | 18 | /* HOC to inject store to any functional or class component */ 19 | export const withFlowViewModel = (Component) => (props) => { 20 | return ; 21 | }; 22 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsPage/ConsentsUtils/ConsentsUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import { BI_VISITOR_FIELD_KEY } from 'aesirx-lib'; 7 | import ConsentsListModel from '../ConsentsModel/ConsentsListEventModel'; 8 | 9 | class ConsentsUtils { 10 | transformResponseIntoAreaChart = (response) => { 11 | let data = {}; 12 | response.forEach((item) => { 13 | const dataFilterEventName = response.filter( 14 | (_item) => _item[BI_VISITOR_FIELD_KEY.EVENT_NAME] === item[BI_VISITOR_FIELD_KEY.EVENT_NAME] 15 | ); 16 | data = { 17 | ...data, 18 | [item[BI_VISITOR_FIELD_KEY.EVENT_NAME]]: dataFilterEventName, 19 | }; 20 | }); 21 | return new ConsentsListModel(data); 22 | }; 23 | } 24 | 25 | export default ConsentsUtils; 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/TagEventPage/TagEventViewModel/TagEventViewModel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import TagEventDetailViewModel from './TagEventDetailViewModel'; 7 | import TagEventListViewModel from './TagEventListViewModel'; 8 | 9 | class TagEventViewModel { 10 | tagEventDetailViewModel = {}; 11 | tagEventListViewModel = {}; 12 | 13 | constructor(tagEventStore) { 14 | if (tagEventStore) { 15 | this.tagEventDetailViewModel = new TagEventDetailViewModel(tagEventStore); 16 | this.tagEventListViewModel = new TagEventListViewModel(tagEventStore); 17 | } 18 | } 19 | 20 | getTagEventDetailViewModel = () => this.tagEventDetailViewModel; 21 | getTagEventListViewModel = () => this.tagEventListViewModel; 22 | } 23 | 24 | export default TagEventViewModel; 25 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/EventsDetailPage/EventsDetailUtils/EventsDetailUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import { BI_VISITOR_FIELD_KEY } from 'aesirx-lib'; 7 | import EventsDetailModel from '../EventsDetailModel/EventsDetailModel'; 8 | 9 | class EventsUtils { 10 | transformResponseIntoAreaChart = (response) => { 11 | let data = {}; 12 | response.forEach((item) => { 13 | const dataFilterEventName = response.filter( 14 | (_item) => _item[BI_VISITOR_FIELD_KEY.EVENT_NAME] === item[BI_VISITOR_FIELD_KEY.EVENT_NAME] 15 | ); 16 | data = { 17 | ...data, 18 | [item[BI_VISITOR_FIELD_KEY.EVENT_NAME]]: dataFilterEventName, 19 | }; 20 | }); 21 | return new EventsDetailModel(data); 22 | }; 23 | } 24 | 25 | export default EventsUtils; 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/EventsPage/EventsViewModels/EventsViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const EventsViewModelContext = React.createContext(); 8 | 9 | export const EventsViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | {children} 12 | ); 13 | }; 14 | 15 | /* Hook to use store in any functional component */ 16 | export const useEventsViewModel = () => React.useContext(EventsViewModelContext); 17 | 18 | /* HOC to inject store to any functional or class component */ 19 | export const withEventsViewModel = (Component) => (props) => { 20 | return ; 21 | }; 22 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/chevron_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/chevron_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UTMTrackingPage/UTMTrackingUtils/UTMTrackingUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import { BI_VISITOR_FIELD_KEY } from 'aesirx-lib'; 7 | import UTMTrackingEventModel from '../UTMTrackingModel/UTMTrackingListEventModel'; 8 | 9 | class UTMTrackingUtils { 10 | transformResponseIntoAreaChart = (response) => { 11 | let data = {}; 12 | response.forEach((item) => { 13 | const dataFilterEventName = response.filter( 14 | (_item) => _item[BI_VISITOR_FIELD_KEY.EVENT_NAME] === item[BI_VISITOR_FIELD_KEY.EVENT_NAME] 15 | ); 16 | data = { 17 | ...data, 18 | [item[BI_VISITOR_FIELD_KEY.EVENT_NAME]]: dataFilterEventName, 19 | }; 20 | }); 21 | return new UTMTrackingEventModel(data); 22 | }; 23 | } 24 | 25 | export default UTMTrackingUtils; 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/WoocommercePage/WoocommerceUtils/WoocommerceUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import { BI_VISITOR_FIELD_KEY } from 'aesirx-lib'; 7 | import WoocommerceListModel from '../WoocommerceModel/WoocommerceListEventModel'; 8 | 9 | class WoocommerceUtils { 10 | transformResponseIntoAreaChart = (response) => { 11 | let data = {}; 12 | response.forEach((item) => { 13 | const dataFilterEventName = response.filter( 14 | (_item) => _item[BI_VISITOR_FIELD_KEY.EVENT_NAME] === item[BI_VISITOR_FIELD_KEY.EVENT_NAME] 15 | ); 16 | data = { 17 | ...data, 18 | [item[BI_VISITOR_FIELD_KEY.EVENT_NAME]]: dataFilterEventName, 19 | }; 20 | }); 21 | return new WoocommerceListModel(data); 22 | }; 23 | } 24 | 25 | export default WoocommerceUtils; 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsAdvancePage/ConsentsAdvanceUtils/ConsentsAdvanceUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import { BI_VISITOR_FIELD_KEY } from 'aesirx-lib'; 7 | import ConsentsListModel from '../ConsentsAdvanceModel/ConsentsAdvanceListEventModel'; 8 | 9 | class ConsentsUtils { 10 | transformResponseIntoAreaChart = (response) => { 11 | let data = {}; 12 | response.forEach((item) => { 13 | const dataFilterEventName = response.filter( 14 | (_item) => _item[BI_VISITOR_FIELD_KEY.EVENT_NAME] === item[BI_VISITOR_FIELD_KEY.EVENT_NAME] 15 | ); 16 | data = { 17 | ...data, 18 | [item[BI_VISITOR_FIELD_KEY.EVENT_NAME]]: dataFilterEventName, 19 | }; 20 | }); 21 | return new ConsentsListModel(data); 22 | }; 23 | } 24 | 25 | export default ConsentsUtils; 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/Dashboard/Component/DatePicker.jsx: -------------------------------------------------------------------------------- 1 | import ComponentDatePicker from 'components/ComponentDatePicker'; 2 | import ComponentSVG from '../../../components/ComponentSVG'; 3 | import { env } from 'aesirx-lib'; 4 | import React, { useRef, useState } from 'react'; 5 | 6 | function DatePicker() { 7 | const [openDatePicker, setOpenDatePicker] = useState(false); 8 | const datePickerRef = useRef(null); 9 | 10 | return ( 11 |
16 | 21 | 22 |
23 | ); 24 | } 25 | 26 | export default DatePicker; 27 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PageDetail/Component/DatePicker.jsx: -------------------------------------------------------------------------------- 1 | import ComponentDatePicker from 'components/ComponentDatePicker'; 2 | import ComponentSVG from '../../../components/ComponentSVG'; 3 | import { env } from 'aesirx-lib'; 4 | import React, { useRef, useState } from 'react'; 5 | 6 | function DatePicker() { 7 | const [openDatePicker, setOpenDatePicker] = useState(false); 8 | const datePickerRef = useRef(null); 9 | 10 | return ( 11 |
16 | 21 | 22 |
23 | ); 24 | } 25 | 26 | export default DatePicker; 27 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionDetail/Component/DatePicker.jsx: -------------------------------------------------------------------------------- 1 | import ComponentDatePicker from 'components/ComponentDatePicker'; 2 | import ComponentSVG from '../../../components/ComponentSVG'; 3 | import { env } from 'aesirx-lib'; 4 | import React, { useRef, useState } from 'react'; 5 | 6 | function DatePicker() { 7 | const [openDatePicker, setOpenDatePicker] = useState(false); 8 | const datePickerRef = useRef(null); 9 | 10 | return ( 11 |
16 | 21 | 22 |
23 | ); 24 | } 25 | 26 | export default DatePicker; 27 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/OutlinkPage/OutlinkViewModels/OutlinkViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const OutlinkViewModelContext = React.createContext(); 8 | 9 | export const OutlinkViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useOutlinkViewModel = () => React.useContext(OutlinkViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withOutlinkViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/view.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/RegionCountryPage/CountryViewModels/CountryViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const CountryViewModelContext = React.createContext(); 8 | 9 | export const CountryViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useCountryViewModel = () => React.useContext(CountryViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withCountryViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/ComponentFilter/SearchComponent.jsx: -------------------------------------------------------------------------------- 1 | import { faSearch } from '@fortawesome/free-solid-svg-icons'; 2 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; 3 | import React, { useState } from 'react'; 4 | import { withTranslation } from 'react-i18next'; 5 | 6 | function SearchComponent({ ...props }) { 7 | const [, setValue] = useState(''); 8 | const { t } = props; 9 | 10 | return ( 11 | 12 | 17 | 18 | 19 | 20 | 21 | ); 22 | } 23 | 24 | export default withTranslation()(SearchComponent); 25 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsPage/ConsentsViewModels/ConsentsViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const ConsentsViewModelContext = React.createContext(); 8 | 9 | export const ConsentsViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useConsentsViewModel = () => React.useContext(ConsentsViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withConsentsViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/FlowListPage/FlowListViewModels/FlowListViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const FlowListViewModelContext = React.createContext(); 8 | 9 | export const FlowListViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useFlowListViewModel = () => React.useContext(FlowListViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withFlowListViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/RealTimePage/RealTimeViewModels/RealTimeViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const RealTimeViewModelContext = React.createContext(); 8 | 9 | export const RealTimeViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useRealTimeViewModel = () => React.useContext(RealTimeViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withRealTimeViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserFlowPage/UserFlowViewModels/UserFlowViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const UserFlowViewModelContext = React.createContext(); 8 | 9 | export const UserFlowViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useUserFlowViewModel = () => React.useContext(UserFlowViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withUserFlowViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/VisitorsPage/VisitorsViewModels/VisitorsViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const VisitorsViewModelContext = React.createContext(); 8 | 9 | export const VisitorsViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useVisitorsViewModel = () => React.useContext(VisitorsViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withVisitorsViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionCampaignPage/UTMTrackingUtils/AcquisitionCampaignUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import { BI_VISITOR_FIELD_KEY } from 'aesirx-lib'; 7 | import UTMTrackingEventModel from '../AcquisitionCampaignListModel/AcquisitionCampaignListModel'; 8 | 9 | class UTMTrackingUtils { 10 | transformResponseIntoAreaChart = (response) => { 11 | let data = {}; 12 | response.forEach((item) => { 13 | const dataFilterEventName = response.filter( 14 | (_item) => _item[BI_VISITOR_FIELD_KEY.EVENT_NAME] === item[BI_VISITOR_FIELD_KEY.EVENT_NAME] 15 | ); 16 | data = { 17 | ...data, 18 | [item[BI_VISITOR_FIELD_KEY.EVENT_NAME]]: dataFilterEventName, 19 | }; 20 | }); 21 | return new UTMTrackingEventModel(data); 22 | }; 23 | } 24 | 25 | export default UTMTrackingUtils; 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/Dashboard/DashboardViewModels/DashboardViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const DashboardViewModelContext = React.createContext(); 8 | 9 | export const DashboardViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useDashboardViewModel = () => React.useContext(DashboardViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withDashboardViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PlatformsPage/PlatformsViewModel/PlatformsViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const PlatformsViewModelContext = React.createContext(); 8 | 9 | export const PlatformsViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const usePlatformsViewModel = () => React.useContext(PlatformsViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withPlatformsViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/EditHeader/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import { SVGComponent } from 'aesirx-uikit'; 7 | import React from 'react'; 8 | import { historyPush } from 'routes/routes'; 9 | 10 | const EditHeader = ({ props, title, isEdit, redirectUrl }) => { 11 | const { t } = props; 12 | return ( 13 |
14 |

15 |
{ 18 | historyPush(redirectUrl); 19 | }} 20 | > 21 | 22 |
23 | {isEdit ? t('txt_edit') : t('txt_add_new')} {title} 24 |

25 |
26 | ); 27 | }; 28 | export default EditHeader; 29 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PageDetail/PageDetailViewModels/PageDetailViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const PageDetailViewModelContext = React.createContext(); 8 | 9 | export const PageDetailViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const usePageDetailViewModel = () => React.useContext(PageDetailViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withPageDetailViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionPage/AcquisitionViewModels/AcquisitionViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const AcquisitionViewModelContext = React.createContext(); 8 | 9 | export const AcquisitionViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useAcquisitionViewModel = () => React.useContext(AcquisitionViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withAcquisitionViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UTMTrackingPage/UTMTrackingViewModels/UTMTrackingViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const UTMTrackingViewModelContext = React.createContext(); 8 | 9 | export const UTMTrackingViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useUTMTrackingViewModel = () => React.useContext(UTMTrackingViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withUTMTrackingViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/WoocommercePage/WoocommerceViewModels/WoocommerceViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const WoocommerceViewModelContext = React.createContext(); 8 | 9 | export const WoocommerceViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useWoocommerceViewModel = () => React.useContext(WoocommerceViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withWoocommerceViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/audience.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/EventsDetailPage/EventsDetailViewModels/EventsDetailViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const EventsDetailViewModelContext = React.createContext(); 8 | 9 | export const EventsDetailViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useEventsDetailViewModel = () => React.useContext(EventsDetailViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withEventsDetailViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/SearchEnginePage/SearchEngineViewModels/SearchEngineViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const SearchEngineViewModelContext = React.createContext(); 8 | 9 | export const SearchEngineViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useSearchEngineViewModel = () => React.useContext(SearchEngineViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withSearchEngineViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserFlowPage/Component/Node.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Rectangle, Layer } from 'recharts'; 3 | 4 | export default function Node({ x, y, width, height, index, payload, containerWidth }) { 5 | const isOut = x + width + 6 > containerWidth; 6 | return ( 7 | 8 | 9 | 16 | {payload.name} 17 | 18 | 26 | {payload.value} 27 | 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/external_link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsAdvancePage/ConsentsAdvanceViewModels/ConsentsAdvanceViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const ConsentsAdvanceViewModelContext = React.createContext(); 8 | 9 | export const ConsentsAdvanceViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useConsentsAdvanceViewModel = () => React.useContext(ConsentsAdvanceViewModelContext); 19 | 20 | /* HOC to inject store to any functional or class component */ 21 | export const withConsentsAdvanceViewModel = (Component) => (props) => { 22 | return ; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/Table/index.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | .btn { 7 | width: 35px; 8 | height: 35px; 9 | margin-right: 5px; 10 | margin-bottom: 5px; 11 | 12 | &:last-child { 13 | margin-right: 0; 14 | } 15 | } 16 | 17 | .btn_toggle { 18 | &:after { 19 | display: none !important; 20 | } 21 | } 22 | 23 | .ct_cell { 24 | &:first-child { 25 | display: block; 26 | font-weight: 600; 27 | margin-bottom: 0.5rem; 28 | 29 | img { 30 | display: block; 31 | } 32 | } 33 | 34 | &:nth-child(2) { 35 | font-size: 14px; 36 | } 37 | 38 | &:nth-child(3) { 39 | margin-top: 40px; 40 | } 41 | 42 | &:last-child { 43 | opacity: 0.75; 44 | margin-top: 10px; 45 | } 46 | } 47 | .col_thumb { 48 | height: 248px; 49 | } 50 | .w_112 { 51 | min-width: 112px; 52 | } 53 | .w_272 { 54 | min-width: 272px; 55 | } 56 | .w_136 { 57 | min-width: 136px; 58 | } 59 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsTemplatePage/ConsentsTemplateViewModels/ConsentsTemplateViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const ConsentsTemplateViewModelContext = React.createContext(); 8 | 9 | export const ConsentsTemplateViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useConsentsTemplateViewModel = () => 19 | React.useContext(ConsentsTemplateViewModelContext); 20 | 21 | /* HOC to inject store to any functional or class component */ 22 | export const withConsentsTemplateViewModel = (Component) => (props) => { 23 | return ; 24 | }; 25 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionDetail/AcquisitionDetailViewModels/AcquisitionDetailViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const AcquisitionDetailViewModelContext = React.createContext(); 8 | 9 | export const AcquisitionDetailViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useAcquisitionDetailViewModel = () => 19 | React.useContext(AcquisitionDetailViewModelContext); 20 | 21 | /* HOC to inject store to any functional or class component */ 22 | export const withAcquisitionDetailViewModel = (Component) => (props) => { 23 | return ; 24 | }; 25 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | app: 5 | image: aesirxio/bi-app:latest 6 | pull_policy: always 7 | environment: 8 | REACT_APP_BI_ENDPOINT_URL: ${REACT_APP_BI_ENDPOINT_URL} 9 | REACT_APP_SSO_CLIENT_ID: ${REACT_APP_SSO_CLIENT_ID} 10 | REACT_APP_SSO_CLIENT_SECRET: ${REACT_APP_SSO_CLIENT_SECRET} 11 | REACT_APP_HEADER_JWT: ${REACT_APP_HEADER_JWT} 12 | REACT_APP_DATA_STREAM: ${REACT_APP_DATA_STREAM} 13 | 14 | # ---- Optional ---- 15 | # REACT_APP_WEB3_API_ENDPOINT: ${REACT_APP_WEB3_API_ENDPOINT} 16 | # REACT_APP_ENDPOINT_ANALYTICS_URL: ${REACT_APP_ENDPOINT_ANALYTICS_URL} 17 | # REACT_APP_SSO_CONCORDIUM_NETWORK: ${REACT_APP_SSO_CONCORDIUM_NETWORK} 18 | # REACT_APP_ENDPOINT_URL: ${REACT_APP_ENDPOINT_URL} 19 | # REACT_APP_WOOCOMMERCE_MENU: ${REACT_APP_WOOCOMMERCE_MENU} 20 | # REACT_APP_DEMO_USER: ${REACT_APP_DEMO_USER} 21 | # REACT_APP_DEMO_PASSWORD: ${REACT_APP_DEMO_PASSWORD} 22 | # REACT_APP_LOGIN_EMAIL: ${REACT_APP_LOGIN_EMAIL} 23 | ports: 24 | - "${PORT-3000}:3000" 25 | 26 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionCampaignPage/AcquisitionCampaignViewModels/AcquisitionCampaignViewModelContextProvider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | export const AcquisitionCampaignViewModelContext = React.createContext(); 8 | 9 | export const AcquisitionCampaignViewModelContextProvider = ({ children, viewModel }) => { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | /* Hook to use store in any functional component */ 18 | export const useAcquisitionCampaignViewModel = () => 19 | React.useContext(AcquisitionCampaignViewModelContext); 20 | 21 | /* HOC to inject store to any functional or class component */ 22 | export const withAcquisitionCampaignViewModel = (Component) => (props) => { 23 | return ; 24 | }; 25 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/dashboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserPage/UserViewModel/UserViewModelContextProvider.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | import { UserStore } from '../store'; 8 | import UserViewModel from './UserViewModel'; 9 | 10 | const userStore = new UserStore(); 11 | const userViewModel = new UserViewModel(userStore); 12 | 13 | export const UserViewModelContext = React.createContext({ 14 | model: userViewModel, 15 | }); 16 | 17 | export const UserViewModelContextProvider = ({ children }) => { 18 | return ( 19 | 20 | {children} 21 | 22 | ); 23 | }; 24 | 25 | /* Hook to use store in any functional component */ 26 | export const useUserViewModel = () => React.useContext(UserViewModelContext); 27 | 28 | /* HOC to inject store to any functional or class component */ 29 | export const withUserViewModel = (Component) => (props) => { 30 | return ; 31 | }; 32 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "workspaces": [ 4 | "packages/aesirx-bi-app", 5 | "packages/aesirx-lib", 6 | "packages/aesirx-uikit", 7 | "packages/aesirx-sso" 8 | ], 9 | "devDependencies": { 10 | "nx": "18.3.4" 11 | }, 12 | "resolutions": { 13 | "@yarnpkg/parsers": "3.0.0-rc.48.1", 14 | "tough-cookie": "^4", 15 | "semver": "^7", 16 | "jsdom": "^16", 17 | "nth-check": "^2", 18 | "postcss": "^8", 19 | "json5": "^2", 20 | "@types/react": "^18", 21 | "path-to-regexp": "^3.3.0", 22 | "elliptic": "^6.5.7", 23 | "ws": "^8.18.0", 24 | "d3-color": "^3" 25 | }, 26 | "scripts": { 27 | "prepare": "nx run aesirx-lib:build && nx run aesirx-sso:build && nx run aesirx-uikit:build && nx run-many -t build:lib --exclude aesirx-uikit aesirx-lib aesirx-bi-app", 28 | "dev": "nx run-many -t dev -p aesirx-uikit aesirx-lib aesirx-bi-app", 29 | "build": "nx run aesirx-bi-app:build", 30 | "build:lib": "nx run aesirx-bi-app:build:lib", 31 | "lint:check": "nx run aesirx-bi-app:lint:check", 32 | "format:check": "nx run aesirx-bi-app:format:check", 33 | "prepublishOnly": "nx run aesirx-bi-app:prepublishOnly" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/location.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UTMLinkPage/UTMLinkViewModel/UTMLinkViewModelContextProvider.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | import { UTMLinkStore } from '../store'; 8 | import UTMLinkViewModel from './UTMLinkViewModel'; 9 | 10 | const utmLinkStore = new UTMLinkStore(); 11 | const utmLinkViewModel = new UTMLinkViewModel(utmLinkStore); 12 | 13 | export const UTMLinkViewModelContext = React.createContext({ 14 | model: utmLinkViewModel, 15 | }); 16 | 17 | export const UTMLinkViewModelContextProvider = ({ children, globalViewModel }) => { 18 | return ( 19 | 22 | {children} 23 | 24 | ); 25 | }; 26 | 27 | /* Hook to use store in any functional component */ 28 | export const useUTMLinkViewModel = () => React.useContext(UTMLinkViewModelContext); 29 | 30 | /* HOC to inject store to any functional or class component */ 31 | export const withUTMLinkViewModel = (Component) => (props) => { 32 | return ; 33 | }; 34 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | ## builder 3 | FROM node:18-alpine AS builder 4 | 5 | ARG REACT_APP_ENDPOINT_URL 6 | ARG REACT_APP_BI_ENDPOINT_URL 7 | ARG REACT_APP_WEB3_API_ENDPOINT 8 | ARG REACT_APP_ENDPOINT_ANALYTICS_URL 9 | ARG REACT_APP_SSO_CLIENT_ID 10 | ARG REACT_APP_SSO_CLIENT_SECRET 11 | ARG REACT_APP_SSO_CONCORDIUM_NETWORK 12 | ARG REACT_APP_WOOCOMMERCE_MENU 13 | ARG REACT_APP_DATA_STREAM 14 | ARG REACT_APP_DEMO_USER 15 | ARG REACT_APP_DEMO_PASSWORD 16 | ARG REACT_APP_LOGIN_EMAIL 17 | 18 | WORKDIR /app 19 | 20 | COPY .git . 21 | COPY nx.json . 22 | COPY package.json . 23 | COPY yarn.lock . 24 | 25 | COPY packages packages 26 | 27 | RUN apk add --update --no-cache \ 28 | make \ 29 | g++ \ 30 | jpeg-dev \ 31 | cairo-dev \ 32 | giflib-dev \ 33 | pango-dev \ 34 | libtool \ 35 | autoconf \ 36 | automake \ 37 | git 38 | 39 | RUN yarn install --frozen-lockfile --network-timeout 600000 40 | 41 | # Build the app 42 | RUN yarn build 43 | 44 | # Bundle static assets 45 | FROM node:18-alpine AS production 46 | WORKDIR /app 47 | 48 | # Copy built assets from builder 49 | COPY --from=builder app/packages/aesirx-bi-app/build build 50 | 51 | RUN yarn add serve react-inject-env 52 | 53 | # Expose port 54 | EXPOSE 3000 55 | 56 | ENTRYPOINT npx react-inject-env set && npx serve -s build -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/App.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | 8 | import 'aesirx-uikit/dist/index.css'; 9 | import 'scss/app.scss'; 10 | import { AppProvider, isLogin } from 'aesirx-uikit'; 11 | import { authRoutes, mainRoutes } from './routes/routes'; 12 | 13 | import { BiStoreProvider } from './store/BiStore/BiViewModelContextProvider'; 14 | import { BiViewModel } from './store/BiStore/BiViewModel'; 15 | import { appLanguages } from './translations'; 16 | import { DataStream } from './components/DataStream'; 17 | 18 | import Menu from './components/Menu'; 19 | 20 | const biViewModel = new BiViewModel(); 21 | 22 | const App = () => { 23 | return ( 24 | 25 | } 31 | rootId="#biapp" 32 | leftMenu={} 33 | logo={'/assets/images/logo_company.svg'} 34 | isColorMode={false} 35 | /> 36 | 37 | ); 38 | }; 39 | 40 | export default App; 41 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/TagEventPage/TagEventViewModel/TagEventViewModelContextProvider.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | import { TagEventStore } from '../store'; 8 | import TagEventViewModel from './TagEventViewModel'; 9 | 10 | const tagEventStore = new TagEventStore(); 11 | const tagEventViewModel = new TagEventViewModel(tagEventStore); 12 | 13 | export const TagEventViewModelContext = React.createContext({ 14 | model: tagEventViewModel, 15 | }); 16 | 17 | export const TagEventViewModelContextProvider = ({ children, globalViewModel }) => { 18 | return ( 19 | 22 | {children} 23 | 24 | ); 25 | }; 26 | 27 | /* Hook to use store in any functional component */ 28 | export const useTagEventViewModel = () => React.useContext(TagEventViewModelContext); 29 | 30 | /* HOC to inject store to any functional or class component */ 31 | export const withTagEventViewModel = (Component) => (props) => { 32 | return ; 33 | }; 34 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/OutlinkPage/OutlinkStore/OutlinkStore.js: -------------------------------------------------------------------------------- 1 | import { runInAction } from 'mobx'; 2 | import { AesirxBiApiService } from 'aesirx-lib'; 3 | export class OutlinkStore { 4 | getOutlink = async (dataFilter, dateFilter, callbackOnSuccess, callbackOnError) => { 5 | try { 6 | const biService = new AesirxBiApiService(); 7 | const responseDataFromLibrary = await biService.getOutlink(dataFilter, dateFilter); 8 | if (responseDataFromLibrary) { 9 | runInAction(() => { 10 | callbackOnSuccess(responseDataFromLibrary); 11 | }); 12 | } else { 13 | callbackOnError({ 14 | message: 'Something went wrong from Server response', 15 | }); 16 | } 17 | } catch (error) { 18 | console.log('errorrrr', error); 19 | runInAction(() => { 20 | if (error.response?.data.message) { 21 | callbackOnError({ 22 | message: error.response?.data?.message, 23 | }); 24 | } else { 25 | callbackOnError({ 26 | message: error?.response?.data?._messages 27 | ? error.response?.data?._messages[0]?.message 28 | : 'Something went wrong from Server response', 29 | }); 30 | } 31 | }); 32 | } 33 | }; 34 | } 35 | 36 | export default OutlinkStore; 37 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserFlowPage/UserFlowStore/UserFlowStore.js: -------------------------------------------------------------------------------- 1 | import { runInAction } from 'mobx'; 2 | import { AesirxBiApiService } from 'aesirx-lib'; 3 | export class UserFlowStore { 4 | getUserFlow = async (dataFilter, dateFilter, callbackOnSuccess, callbackOnError) => { 5 | try { 6 | const biService = new AesirxBiApiService(); 7 | const responseDataFromLibrary = await biService.getUserFlow(dataFilter, dateFilter); 8 | if (responseDataFromLibrary) { 9 | runInAction(() => { 10 | callbackOnSuccess(responseDataFromLibrary); 11 | }); 12 | } else { 13 | callbackOnError({ 14 | message: 'Something went wrong from Server response', 15 | }); 16 | } 17 | } catch (error) { 18 | console.log('errorrrr', error); 19 | runInAction(() => { 20 | if (error.response?.data.message) { 21 | callbackOnError({ 22 | message: error.response?.data?.message, 23 | }); 24 | } else { 25 | callbackOnError({ 26 | message: error?.response?.data?._messages 27 | ? error.response?.data?._messages[0]?.message 28 | : 'Something went wrong from Server response', 29 | }); 30 | } 31 | }); 32 | } 33 | }; 34 | } 35 | 36 | export default UserFlowStore; 37 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/grown-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/grown-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/aim.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "node": true 6 | }, 7 | "extends": [ 8 | "eslint:recommended", 9 | "plugin:react/recommended" 10 | ], 11 | "globals": { 12 | "Atomics": "readonly", 13 | "SharedArrayBuffer": "readonly" 14 | }, 15 | "parserOptions": { 16 | "ecmaFeatures": { 17 | "jsx": true 18 | }, 19 | "ecmaVersion": 2022, 20 | "sourceType": "module" 21 | }, 22 | "plugins": [ 23 | "react" 24 | ], 25 | "rules": { 26 | "no-unused-vars": "error", 27 | "react/display-name": "off", 28 | "react/prop-types": "off", 29 | "react/jsx-key": "warn", 30 | "no-unsafe-optional-chaining": "off", 31 | "react/no-deprecated": "warn", 32 | "react/no-children-prop": "warn", 33 | "no-case-declarations": "warn" 34 | }, 35 | "settings": { 36 | "react": { 37 | "version": "17.0.2" 38 | } 39 | }, 40 | "parser": "@babel/eslint-parser", 41 | "ignorePatterns": [ 42 | "*.json", 43 | "*.scss", 44 | "*.svg", 45 | "*.woff", 46 | "*.woff2", 47 | "*.ttf", 48 | "*.otf", 49 | "*.eot", 50 | "*.png", 51 | "*.dist" 52 | ] 53 | } -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [ master, develop, develop-* ] 6 | pull_request: 7 | # The branches below must be a subset of the branches above 8 | branches: [ master, develop, develop-* ] 9 | schedule: 10 | - cron: '15 2 * * 5' 11 | 12 | jobs: 13 | analyze: 14 | name: Analyze 15 | runs-on: ubuntu-latest 16 | permissions: 17 | actions: read 18 | contents: read 19 | security-events: write 20 | 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | language: [ 'javascript' ] 25 | 26 | steps: 27 | - name: Checkout repository 28 | uses: actions/checkout@v4 29 | 30 | # Initializes the CodeQL tools for scanning. 31 | - name: Initialize CodeQL 32 | uses: github/codeql-action/init@v3 33 | with: 34 | languages: ${{ matrix.language }} 35 | 36 | - run: git submodule update --init --recursive 37 | 38 | - name: Install modules 39 | run: yarn install 40 | 41 | - name: Lint 42 | run: yarn lint:check 43 | 44 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 45 | # If this step fails, then you should remove it and run the build manually (see below) 46 | - name: Autobuild 47 | uses: github/codeql-action/autobuild@v3 48 | 49 | - name: Perform CodeQL Analysis 50 | uses: github/codeql-action/analyze@v3 51 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/Table/GlobalFilter.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React from 'react'; 7 | import { useAsyncDebounce } from 'react-table'; 8 | 9 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; 10 | import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch'; 11 | 12 | const GlobalFilter = ({ setGlobalFilter, searchText, filter, setFilter }) => { 13 | const [, setValue] = React.useState(''); 14 | const onChange = useAsyncDebounce((value) => { 15 | setGlobalFilter({ keyword: value }); 16 | }, 200); 17 | 18 | return ( 19 | 20 | { 22 | if (setFilter) { 23 | setFilter(e.target.value, 1); 24 | } 25 | setValue(e.target.value); 26 | onChange(e.target.value); 27 | }} 28 | value={filter.searchText} 29 | placeholder={searchText} 30 | className="form-control border-end-0 pe-2 border-0 pe-4" 31 | /> 32 | 33 | 34 | 35 | 36 | ); 37 | }; 38 | 39 | export default GlobalFilter; 40 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserFlowPage/Component/Link.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Layer } from 'recharts'; 3 | 4 | export default class Link extends Component { 5 | static displayName = 'SankeyLinkDemo'; 6 | 7 | state = { 8 | fill: 'url(#linkGradient)', 9 | }; 10 | 11 | render() { 12 | const { sourceX, targetX, sourceY, targetY, sourceControlX, targetControlX, linkWidth, index } = 13 | this.props; 14 | const { fill } = this.state; 15 | 16 | return ( 17 | 18 | { 33 | this.setState({ fill: 'rgba(0, 136, 254, 0.5)' }); 34 | }} 35 | onMouseLeave={() => { 36 | this.setState({ fill: 'url(#linkGradient)' }); 37 | }} 38 | /> 39 | 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/woocommerce.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/revenue-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/DateRangePicker/index.jsx: -------------------------------------------------------------------------------- 1 | import ComponentSVG from '../ComponentSVG'; 2 | import { env } from 'aesirx-lib'; 3 | import React, { useRef, useState } from 'react'; 4 | import { BiViewModelContext, useBiViewModel } from '../../store/BiStore/BiViewModelContextProvider'; 5 | import { AesirXDatePicker } from 'aesirx-uikit'; 6 | 7 | const DateRangePicker = (props) => { 8 | const [openDatePicker, setOpenDatePicker] = useState(false); 9 | const datePickerRef = useRef(null); 10 | const { onChange } = props; 11 | 12 | const { 13 | biListViewModel: { 14 | dateFilter: { date_start, date_end }, 15 | setDateFilter, 16 | }, 17 | } = useBiViewModel(BiViewModelContext); 18 | 19 | return ( 20 |
25 | 34 |
35 | 36 |
37 |
38 | ); 39 | }; 40 | 41 | export default DateRangePicker; 42 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/utils/index.js: -------------------------------------------------------------------------------- 1 | import * as ExcelJS from 'exceljs'; 2 | 3 | const downloadExcel = async (data, nameFile) => { 4 | const workbook = new ExcelJS.Workbook(); 5 | const worksheet = workbook.addWorksheet('Sheet1'); 6 | const headers = Object.keys(data[0]); 7 | worksheet.addRow(headers); 8 | 9 | data.forEach((row) => { 10 | const rowData = Object.values(row); 11 | worksheet.addRow(rowData); 12 | }); 13 | 14 | const buffer = await workbook.xlsx.writeBuffer(); 15 | const blob = new Blob([buffer], { 16 | type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 17 | }); 18 | const url = URL.createObjectURL(blob); 19 | 20 | const link = document.createElement('a'); 21 | link.href = url; 22 | link.download = `${nameFile}.xlsx`; 23 | link.click(); 24 | }; 25 | const timeAgo = (isoString) => { 26 | const now = Date.now(); 27 | const past = new Date(isoString).getTime(); 28 | const diff = Math.floor((now - past) / 1000); // seconds 29 | 30 | if (diff < 60) { 31 | return `${diff}s ago`; 32 | } 33 | 34 | const minutes = Math.floor(diff / 60); 35 | if (minutes < 60) { 36 | return `${minutes} minute${minutes > 1 ? 's' : ''} ago`; 37 | } 38 | 39 | const hours = Math.floor(minutes / 60); 40 | if (hours < 24) { 41 | return `${hours} hour${hours > 1 ? 's' : ''} ago`; 42 | } 43 | 44 | const days = Math.floor(hours / 24); 45 | return `${days} day${days > 1 ? 's' : ''} ago`; 46 | }; 47 | export { downloadExcel, timeAgo }; 48 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/Menu/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React, { useEffect, useState } from 'react'; 7 | import { withRouter } from 'react-router-dom'; 8 | import { Menu as AesirXMenu } from 'aesirx-uikit'; 9 | import { useBiViewModel } from 'store/BiStore/BiViewModelContextProvider'; 10 | import { getMainMenu } from '../../routes/menu'; 11 | import { observer } from 'mobx-react'; 12 | 13 | const Menu = observer((props) => { 14 | const biStore = useBiViewModel(); 15 | const [mainMenu, setMainMenu] = useState([]); 16 | useEffect(() => { 17 | let fetchData = async () => { 18 | await biStore.biListViewModel.setDataStream(biStore.biListViewModel.activeDomain); 19 | biStore.biListViewModel.setActiveDomain(biStore.biListViewModel.activeDomain); 20 | biStore.biListViewModel.setDateFilter( 21 | biStore.biListViewModel.dateFilter['date_start'], 22 | biStore.biListViewModel.dateFilter['date_end'] 23 | ); 24 | }; 25 | fetchData(); 26 | }, [props.location.pathname]); 27 | useEffect(() => { 28 | if (biStore?.biListViewModel?.dataStream?.is_user_admin) { 29 | setMainMenu(getMainMenu(true)); 30 | } else { 31 | setMainMenu(getMainMenu(false)); 32 | } 33 | }, [biStore?.biListViewModel?.dataStream?.is_user_admin]); 34 | return ; 35 | }); 36 | 37 | export default withRouter(Menu); 38 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/acquisition.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PageDetail/Component/Card.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import ComponentCard from '../../../components/ComponentCard'; 4 | import { observer } from 'mobx-react'; 5 | import { withRouter } from 'react-router-dom'; 6 | import { withPageDetailViewModel } from '../PageDetailViewModels/PageDetailViewModelContextProvider'; 7 | const CardComponent = observer( 8 | class extends Component { 9 | constructor(props) { 10 | super(props); 11 | } 12 | 13 | render() { 14 | return ( 15 |
16 | {this.props.data.length > 0 17 | ? this.props.data.map((item, index) => ( 18 |
19 | 31 |
32 | )) 33 | : null} 34 |
35 | ); 36 | } 37 | } 38 | ); 39 | export default withTranslation()(withRouter(withPageDetailViewModel(CardComponent))); 40 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/Dashboard/Component/Card.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import ComponentCard from '../../../components/ComponentCard'; 4 | import { observer } from 'mobx-react'; 5 | import { withRouter } from 'react-router-dom'; 6 | import { withDashboardViewModel } from '../DashboardViewModels/DashboardViewModelContextProvider'; 7 | const CardComponent = observer( 8 | class extends Component { 9 | constructor(props) { 10 | super(props); 11 | } 12 | 13 | render() { 14 | return ( 15 |
16 | {this.props.data.length > 0 17 | ? this.props.data.map((item, index) => ( 18 |
19 | 32 |
33 | )) 34 | : null} 35 |
36 | ); 37 | } 38 | } 39 | ); 40 | export default withTranslation()(withRouter(withDashboardViewModel(CardComponent))); 41 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/EventsDetailPage/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component, lazy } from 'react'; 2 | import { withRouter } from 'react-router-dom'; 3 | import EventsDetailStore from './EventsDetailStore/EventsDetailStore'; 4 | import { EventsDetailViewModelContextProvider } from './EventsDetailViewModels/EventsDetailViewModelContextProvider'; 5 | import EventsViewModel from './EventsDetailViewModels/EventsViewModel'; 6 | 7 | import { observer } from 'mobx-react'; 8 | import { withBiViewModel } from '../../store/BiStore/BiViewModelContextProvider'; 9 | import { withTranslation } from 'react-i18next'; 10 | 11 | const Events = lazy(() => import('./EventsDetail')); 12 | 13 | const EventsDetailPage = observer( 14 | class EventsDetailPage extends Component { 15 | EventsDetailStore = null; 16 | behaviorViewModel = null; 17 | constructor(props) { 18 | super(props); 19 | const { viewModel } = props; 20 | this.viewModel = viewModel ? viewModel : null; 21 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 22 | 23 | this.EventsDetailStore = new EventsDetailStore({}); 24 | 25 | this.behaviorViewModel = new EventsViewModel(this.EventsDetailStore, this.biListViewModel); 26 | } 27 | render() { 28 | return ( 29 | 30 | 31 | 32 | ); 33 | } 34 | } 35 | ); 36 | 37 | export default withTranslation()(withBiViewModel(withRouter(EventsDetailPage))); 38 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/FlowDetailPage/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | import { observer } from 'mobx-react'; 4 | import { withBiViewModel } from '../../store/BiStore/BiViewModelContextProvider'; 5 | import { FlowViewModelContextProvider } from './FlowViewModels/FlowViewModelContextProvider'; 6 | import FlowStore from './FlowStore/FlowStore'; 7 | import FlowViewModel from './FlowViewModels/FlowViewModel'; 8 | import FlowDetailContainer from './FlowDetailContainer'; 9 | import EventsStore from '../EventsPage/EventsStore/EventsStore'; 10 | import { withRouter } from 'react-router-dom'; 11 | 12 | const FlowPage = observer( 13 | class FlowPage extends Component { 14 | flowStore = null; 15 | flowViewModel = null; 16 | eventsStore = null; 17 | 18 | constructor(props) { 19 | super(props); 20 | const { viewModel } = props; 21 | this.viewModel = viewModel ? viewModel : null; 22 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 23 | 24 | this.flowStore = new FlowStore({}); 25 | this.eventsStore = new EventsStore({}); 26 | 27 | this.flowViewModel = new FlowViewModel( 28 | this.flowStore, 29 | this.eventsStore, 30 | this.biListViewModel 31 | ); 32 | } 33 | render() { 34 | return ( 35 | 36 | 37 | 38 | ); 39 | } 40 | } 41 | ); 42 | 43 | export default withBiViewModel(withRouter(FlowPage)); 44 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/revenue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/duckduckgo.svg: -------------------------------------------------------------------------------- 1 | duckduckgo -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserPage/edit.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React, { Component } from 'react'; 7 | 8 | import { observer } from 'mobx-react'; 9 | import EditUser from './UserEdit'; 10 | import { UserViewModelContextProvider } from './UserViewModel/UserViewModelContextProvider'; 11 | import { withBiViewModel } from 'store/BiStore/BiViewModelContextProvider'; 12 | import { withRouter } from 'react-router-dom'; 13 | import { withTranslation } from 'react-i18next'; 14 | import { PAGE_STATUS } from 'aesirx-uikit'; 15 | 16 | const EditUserProvider = observer( 17 | class EditUserProvider extends Component { 18 | constructor(props) { 19 | super(props); 20 | const { viewModel } = props; 21 | this.viewModel = viewModel ? viewModel : null; 22 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 23 | } 24 | render() { 25 | const { dataStream, dataStreamStatus } = this.biListViewModel; 26 | return ( 27 | 28 | {dataStreamStatus === PAGE_STATUS.READY ? ( 29 | <> 30 | {dataStream?.is_user_admin ? ( 31 | 32 | ) : ( 33 |

Current user does not have access!

34 | )} 35 | 36 | ) : ( 37 | <> 38 | )} 39 |
40 | ); 41 | } 42 | } 43 | ); 44 | export default withTranslation()(withRouter(withBiViewModel(EditUserProvider))); 45 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UserPage/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { observer } from 'mobx-react'; 3 | import { UserViewModelContextProvider } from './UserViewModel/UserViewModelContextProvider'; 4 | import ListUser from './ListUser'; 5 | import { Route, withRouter } from 'react-router-dom'; 6 | import { withTranslation } from 'react-i18next'; 7 | import { withBiViewModel } from 'store/BiStore/BiViewModelContextProvider'; 8 | import { PAGE_STATUS } from 'aesirx-uikit'; 9 | 10 | const UserPage = observer( 11 | class UserPage extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | const { viewModel } = props; 15 | this.viewModel = viewModel ? viewModel : null; 16 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 17 | } 18 | render() { 19 | const { dataStream, dataStreamStatus } = this.biListViewModel; 20 | return ( 21 |
22 | 23 | 24 | {dataStreamStatus === PAGE_STATUS.READY ? ( 25 | <> 26 | {dataStream?.is_user_admin ? ( 27 | 28 | ) : ( 29 |

Current user does not have access!

30 | )} 31 | 32 | ) : ( 33 | <> 34 | )} 35 |
36 |
37 |
38 | ); 39 | } 40 | } 41 | ); 42 | 43 | export default withTranslation()(withRouter(withBiViewModel(UserPage))); 44 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/page.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/ic_project.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UTMLinkPage/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { observer } from 'mobx-react'; 3 | import { UTMLinkViewModelContextProvider } from './UTMLinkViewModel/UTMLinkViewModelContextProvider'; 4 | import ListUTMLink from './ListUTMLink'; 5 | import { Route, withRouter } from 'react-router-dom'; 6 | import { withTranslation } from 'react-i18next'; 7 | import { withBiViewModel } from 'store/BiStore/BiViewModelContextProvider'; 8 | import { PAGE_STATUS } from 'aesirx-uikit'; 9 | 10 | const UTMLinkPage = observer( 11 | class UTMLinkPage extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | const { viewModel } = props; 15 | this.viewModel = viewModel ? viewModel : null; 16 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 17 | } 18 | render() { 19 | const { dataStream, dataStreamStatus } = this.biListViewModel; 20 | return ( 21 |
22 | 23 | 24 | {dataStreamStatus === PAGE_STATUS.READY ? ( 25 | <> 26 | {dataStream?.is_user_admin ? ( 27 | 28 | ) : ( 29 |

Current user does not have access!

30 | )} 31 | 32 | ) : ( 33 | <> 34 | )} 35 |
36 |
37 |
38 | ); 39 | } 40 | } 41 | ); 42 | 43 | export default withTranslation()(withRouter(withBiViewModel(UTMLinkPage))); 44 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/TagEventPage/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { observer } from 'mobx-react'; 3 | import { TagEventViewModelContextProvider } from './TagEventViewModel/TagEventViewModelContextProvider'; 4 | import ListTagEvent from './ListTagEvent'; 5 | import { Route, withRouter } from 'react-router-dom'; 6 | import { withTranslation } from 'react-i18next'; 7 | import { withBiViewModel } from 'store/BiStore/BiViewModelContextProvider'; 8 | import { PAGE_STATUS } from 'aesirx-uikit'; 9 | 10 | const TagEventPage = observer( 11 | class TagEventPage extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | const { viewModel } = props; 15 | this.viewModel = viewModel ? viewModel : null; 16 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 17 | } 18 | render() { 19 | const { dataStream, dataStreamStatus } = this.biListViewModel; 20 | return ( 21 |
22 | 23 | 24 | {dataStreamStatus === PAGE_STATUS.READY ? ( 25 | <> 26 | {dataStream?.is_user_admin ? ( 27 | 28 | ) : ( 29 |

Current user does not have access!

30 | )} 31 | 32 | ) : ( 33 | <> 34 | )} 35 |
36 |
37 |
38 | ); 39 | } 40 | } 41 | ); 42 | 43 | export default withTranslation()(withRouter(withBiViewModel(TagEventPage))); 44 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PageDetail/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React, { Component } from 'react'; 7 | 8 | import { withTranslation } from 'react-i18next'; 9 | import { observer } from 'mobx-react'; 10 | 11 | import { withRouter } from 'react-router-dom'; 12 | import PageDetailStore from './PageDetailStore/PageDetailStore'; 13 | import PageDetailViewModel from './PageDetailViewModels/PageDetailModel'; 14 | import { PageDetailViewModelContextProvider } from './PageDetailViewModels/PageDetailViewModelContextProvider'; 15 | import { withBiViewModel } from '../../store/BiStore/BiViewModelContextProvider'; 16 | import PageDetail from './PageDetail'; 17 | 18 | import 'flag-icons/sass/flag-icons.scss'; 19 | 20 | const PageDetailContainer = observer( 21 | class PageDetailContainer extends Component { 22 | pageDetailStore = null; 23 | pageDetailViewModel = null; 24 | constructor(props) { 25 | super(props); 26 | const { viewModel } = props; 27 | this.viewModel = viewModel ? viewModel : null; 28 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 29 | 30 | this.pageDetailStore = new PageDetailStore(); 31 | this.pageDetailViewModel = new PageDetailViewModel( 32 | this.pageDetailStore, 33 | this.biListViewModel 34 | ); 35 | } 36 | 37 | render() { 38 | return ( 39 | 40 | 41 | 42 | ); 43 | } 44 | } 45 | ); 46 | 47 | export default withTranslation()(withRouter(withBiViewModel(PageDetailContainer))); 48 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PageDetail/Component/Overview.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import BarChartComponent from 'components/BarChartComponent'; 6 | 7 | const OverviewComponent = observer( 8 | class OverviewComponent extends Component { 9 | constructor(props) { 10 | super(props); 11 | const { listViewModel } = props; 12 | this.listViewModel = listViewModel ? listViewModel : null; 13 | this.state = { loading: false }; 14 | } 15 | 16 | render() { 17 | const { t, status, bars, barColors, data, filterData } = this.props; 18 | return ( 19 |
20 | 42 |
43 | ); 44 | } 45 | } 46 | ); 47 | export default withTranslation()(withRouter(OverviewComponent)); 48 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionDetail/Component/Overview.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import BarChartComponent from 'components/BarChartComponent'; 6 | 7 | const OverviewComponent = observer( 8 | class OverviewComponent extends Component { 9 | constructor(props) { 10 | super(props); 11 | const { listViewModel } = props; 12 | this.listViewModel = listViewModel ? listViewModel : null; 13 | this.state = { loading: false }; 14 | } 15 | 16 | render() { 17 | const { t, status, bars, barColors, data, filterData } = this.props; 18 | return ( 19 |
20 | 42 |
43 | ); 44 | } 45 | } 46 | ); 47 | export default withTranslation()(withRouter(OverviewComponent)); 48 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 24 | AesirX BI 25 | 26 | 27 | 28 | 29 |
30 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/FlowListPage/Component/Overview.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import BarChartComponent from 'components/BarChartComponent'; 6 | 7 | const OverviewComponent = observer( 8 | class OverviewComponent extends Component { 9 | constructor(props) { 10 | super(props); 11 | const { listViewModel } = props; 12 | this.listViewModel = listViewModel ? listViewModel : null; 13 | this.state = { loading: false }; 14 | } 15 | 16 | render() { 17 | const { t, status, bars, barColors, data, filterData } = this.props; 18 | return ( 19 |
20 | 43 |
44 | ); 45 | } 46 | } 47 | ); 48 | export default withTranslation()(withRouter(OverviewComponent)); 49 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/RealTimePage/Component/Overview.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import BarChartComponent from 'components/BarChartComponent'; 6 | 7 | const OverviewComponent = observer( 8 | class OverviewComponent extends Component { 9 | constructor(props) { 10 | super(props); 11 | const { listViewModel } = props; 12 | this.listViewModel = listViewModel ? listViewModel : null; 13 | this.state = { loading: false }; 14 | } 15 | 16 | render() { 17 | const { t, status, bars, barColors, data, filterData } = this.props; 18 | return ( 19 |
20 | 43 |
44 | ); 45 | } 46 | } 47 | ); 48 | export default withTranslation()(withRouter(OverviewComponent)); 49 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/Dashboard/Component/Overview.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import BarChartComponent from 'components/BarChartComponent'; 6 | 7 | const OverviewComponent = observer( 8 | class OverviewComponent extends Component { 9 | constructor(props) { 10 | super(props); 11 | const { listViewModel } = props; 12 | this.listViewModel = listViewModel ? listViewModel : null; 13 | this.state = { loading: false }; 14 | } 15 | 16 | render() { 17 | const { t, status, bars, barColors, data, filterData, chartTitle } = this.props; 18 | return ( 19 |
20 | 43 |
44 | ); 45 | } 46 | } 47 | ); 48 | export default withTranslation()(withRouter(OverviewComponent)); 49 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/PlatformsPage/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { withRouter } from 'react-router-dom'; 4 | import { PlatformsStore } from './PlatformsStore/PlatformsStore'; 5 | import PlatformsViewModel from './PlatformsViewModel/PlatformsViewModel'; 6 | import { PlatformsViewModelContextProvider } from './PlatformsViewModel/PlatformsViewModelContextProvider'; 7 | import Platform from './Platforms'; 8 | import { withBiViewModel } from 'store/BiStore/BiViewModelContextProvider'; 9 | import { observer } from 'mobx-react'; 10 | 11 | const PlatformsContainers = observer( 12 | class PlatformsContainers extends Component { 13 | PlatformsStore = null; 14 | PlatformsViewModel = null; 15 | constructor(props) { 16 | super(props); 17 | const { viewModel } = props; 18 | this.viewModel = viewModel ? viewModel : null; 19 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 20 | 21 | this.PlatformsStore = new PlatformsStore(); 22 | this.PlatformsViewModel = new PlatformsViewModel(this.PlatformsStore, this.biListViewModel); 23 | } 24 | 25 | render() { 26 | return ( 27 | 28 | (this.componentRef = el)} /> 29 | 30 | ); 31 | } 32 | } 33 | ); 34 | 35 | const ComponentToPrint = observer( 36 | class extends Component { 37 | constructor(props) { 38 | super(props); 39 | } 40 | 41 | render() { 42 | return ( 43 |
44 | 45 |
46 | ); 47 | } 48 | } 49 | ); 50 | 51 | export default withTranslation()(withRouter(withBiViewModel(PlatformsContainers))); 52 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/bot_user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/domain.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionDetail/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React, { Component } from 'react'; 7 | 8 | import { withTranslation } from 'react-i18next'; 9 | import { observer } from 'mobx-react'; 10 | 11 | import { withRouter } from 'react-router-dom'; 12 | import AcquisitionDetailStore from './AcquisitionDetailStore/AcquisitionDetailStore'; 13 | import AcquisitionDetailViewModel from './AcquisitionDetailViewModels/AcquisitionDetailModel'; 14 | import { AcquisitionDetailViewModelContextProvider } from './AcquisitionDetailViewModels/AcquisitionDetailViewModelContextProvider'; 15 | import { withBiViewModel } from '../../store/BiStore/BiViewModelContextProvider'; 16 | import AcquisitionDetail from './AcquisitionDetail'; 17 | 18 | import 'flag-icons/sass/flag-icons.scss'; 19 | 20 | const AcquisitionDetailContainer = observer( 21 | class AcquisitionDetailContainer extends Component { 22 | acquisitionDetailStore = null; 23 | acquisitionDetailViewModel = null; 24 | constructor(props) { 25 | super(props); 26 | const { viewModel } = props; 27 | this.viewModel = viewModel ? viewModel : null; 28 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 29 | 30 | this.acquisitionDetailStore = new AcquisitionDetailStore(); 31 | this.acquisitionDetailViewModel = new AcquisitionDetailViewModel( 32 | this.acquisitionDetailStore, 33 | this.biListViewModel 34 | ); 35 | } 36 | 37 | render() { 38 | return ( 39 | 40 | 41 | 42 | ); 43 | } 44 | } 45 | ); 46 | 47 | export default withTranslation()(withRouter(withBiViewModel(AcquisitionDetailContainer))); 48 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/google_bot.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/UTMLinkPage/edit.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React, { Component } from 'react'; 7 | 8 | import { observer } from 'mobx-react'; 9 | import EditUTMLink from './UTMLinkEdit'; 10 | import { UTMLinkViewModelContextProvider } from './UTMLinkViewModel/UTMLinkViewModelContextProvider'; 11 | import { withBiViewModel } from 'store/BiStore/BiViewModelContextProvider'; 12 | import { withRouter } from 'react-router-dom'; 13 | import { withTranslation } from 'react-i18next'; 14 | import { PAGE_STATUS } from 'aesirx-uikit'; 15 | import { UTMLinkStore } from './store'; 16 | import UTMLinkViewModel from './UTMLinkViewModel/UTMLinkViewModel'; 17 | 18 | const EditUTMLinkProvider = observer( 19 | class EditUTMLinkProvider extends Component { 20 | constructor(props) { 21 | super(props); 22 | const { viewModel } = props; 23 | this.viewModel = viewModel ? viewModel : null; 24 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 25 | this.utmLinkStore = new UTMLinkStore(); 26 | this.utmLinkViewModel = new UTMLinkViewModel(this.utmLinkStore, this.biListViewModel); 27 | } 28 | render() { 29 | const { dataStream, dataStreamStatus, activeDomain } = this.biListViewModel; 30 | return ( 31 | 32 | {dataStreamStatus === PAGE_STATUS.READY ? ( 33 | <> 34 | {dataStream?.is_user_admin ? ( 35 | 36 | ) : ( 37 |

Current user does not have access!

38 | )} 39 | 40 | ) : ( 41 | <> 42 | )} 43 |
44 | ); 45 | } 46 | } 47 | ); 48 | export default withTranslation()(withRouter(withBiViewModel(EditUTMLinkProvider))); 49 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/components/ComponentNoData/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | import React from 'react'; 6 | import { Component } from 'react'; 7 | import './index.scss'; 8 | import { withTranslation } from 'react-i18next'; 9 | import { Image } from 'aesirx-uikit'; 10 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; 11 | import { Link } from 'react-router-dom'; 12 | import { faPlus } from '@fortawesome/free-solid-svg-icons'; 13 | 14 | class ComponentNoData extends Component { 15 | constructor(props) { 16 | super(props); 17 | } 18 | render() { 19 | const { icons, text, title, link, linlText, isBtn, width, className, iconColor, iconBg } = 20 | this.props; 21 | return ( 22 |
29 |

33 | {icons} 38 |

39 | {title &&
{title}
} 40 | {text &&

{text}

} 41 | {isBtn && ( 42 | 46 | 47 | 48 | 49 | {linlText} 50 | 51 | )} 52 |
53 | ); 54 | } 55 | } 56 | 57 | export default withTranslation()(ComponentNoData); 58 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/yandex_browser.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/TagEventPage/edit.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * @copyright Copyright (C) 2022 AesirX. All rights reserved. 3 | * @license GNU General Public License version 3, see LICENSE. 4 | */ 5 | 6 | import React, { Component } from 'react'; 7 | 8 | import { observer } from 'mobx-react'; 9 | import EditTagEvent from './TagEventEdit'; 10 | import { TagEventViewModelContextProvider } from './TagEventViewModel/TagEventViewModelContextProvider'; 11 | import { withBiViewModel } from 'store/BiStore/BiViewModelContextProvider'; 12 | import { withRouter } from 'react-router-dom'; 13 | import { withTranslation } from 'react-i18next'; 14 | import { PAGE_STATUS } from 'aesirx-uikit'; 15 | import { TagEventStore } from './store'; 16 | import TagEventViewModel from './TagEventViewModel/TagEventViewModel'; 17 | 18 | const EditTagEventProvider = observer( 19 | class EditTagEventProvider extends Component { 20 | constructor(props) { 21 | super(props); 22 | const { viewModel } = props; 23 | this.viewModel = viewModel ? viewModel : null; 24 | this.biListViewModel = this.viewModel ? this.viewModel.getBiListViewModel() : null; 25 | this.tagEventStore = new TagEventStore(); 26 | this.tagEventViewModel = new TagEventViewModel(this.tagEventStore, this.biListViewModel); 27 | } 28 | render() { 29 | const { dataStream, dataStreamStatus, activeDomain } = this.biListViewModel; 30 | return ( 31 | 32 | {dataStreamStatus === PAGE_STATUS.READY ? ( 33 | <> 34 | {dataStream?.is_user_admin ? ( 35 | 36 | ) : ( 37 |

Current user does not have access!

38 | )} 39 | 40 | ) : ( 41 | <> 42 | )} 43 |
44 | ); 45 | } 46 | } 47 | ); 48 | export default withTranslation()(withRouter(withBiViewModel(EditTagEventProvider))); 49 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/opera.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/workflows/dashboard.yml: -------------------------------------------------------------------------------- 1 | name: dashboard 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build-and-deploy: 10 | runs-on: ubuntu-latest 11 | environment: dashboard 12 | env: 13 | CI: false 14 | REACT_APP_SSO_CLIENT_ID: ${{ secrets.REACT_APP_SSO_CLIENT_ID }} 15 | REACT_APP_SSO_CLIENT_SECRET: ${{ secrets.REACT_APP_SSO_CLIENT_SECRET }} 16 | REACT_APP_ENCRYPT: ${{ secrets.REACT_APP_ENCRYPT }} 17 | REACT_APP_BI_ENDPOINT_URL: ${{ secrets.REACT_APP_BI_ENDPOINT_URL }} 18 | REACT_APP_DATA_STREAM: ${{ secrets.REACT_APP_DATA_STREAM }} 19 | REACT_APP_DEFAULT_USER: ${{ secrets.REACT_APP_DEFAULT_USER }} 20 | REACT_APP_DEFAULT_PASSWORD: ${{ secrets.REACT_APP_DEFAULT_PASSWORD }} 21 | REACT_APP_ENDPOINT_ANALYTICS_URL: ${{ secrets.REACT_APP_ENDPOINT_ANALYTICS_URL }} 22 | REACT_APP_ENDPOINT_URL: ${{ secrets.REACT_APP_ENDPOINT_URL }} 23 | REACT_APP_HEADER_JWT: ${{ secrets.REACT_APP_HEADER_JWT }} 24 | REACT_APP_SSO_CONCORDIUM_NETWORK: ${{ secrets.REACT_APP_SSO_CONCORDIUM_NETWORK }} 25 | REACT_APP_WEB3_API_ENDPOINT: ${{ secrets.REACT_APP_WEB3_API_ENDPOINT }} 26 | REACT_APP_WOOCOMMERCE_MENU: ${{ secrets.REACT_APP_WOOCOMMERCE_MENU }} 27 | steps: 28 | - uses: actions/checkout@v4 29 | with: 30 | fetch-depth: 0 31 | ref: master 32 | 33 | - uses: actions/setup-node@v4 34 | with: 35 | node-version: 18 36 | 37 | - run: git submodule update --init --recursive 38 | - run: yarn install --frozen-lockfile 39 | - run: yarn build 40 | 41 | - name: Install SSH Key 42 | uses: shimataro/ssh-key-action@v2 43 | with: 44 | key: ${{ secrets.SSH_PRIVATE_KEY }} 45 | known_hosts: unnecessary 46 | 47 | - name: Adding Known Hosts 48 | run: ssh-keyscan -p ${{ secrets.SSH_PORT}} -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts 49 | 50 | - name: Deploy with rsync 51 | run: rsync -avz -e "ssh -p ${{ secrets.SSH_PORT }}" ./packages/aesirx-bi-app/build/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_PATH }} 52 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/data-stream.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/rate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/setting.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsPage/Component/TopTable.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { withRouter } from 'react-router-dom'; 4 | import Table from '../../../components/Table'; 5 | import { RingLoaderComponent } from 'aesirx-uikit'; 6 | import ComponentNoData from '../../../components/ComponentNoData'; 7 | import { env } from 'aesirx-lib'; 8 | import PAGE_STATUS from '../../../constants/PageStatus'; 9 | 10 | const TopTableComponent = (props) => { 11 | const { data, isPagination = true, status, t } = props; 12 | const columnsTable = React.useMemo( 13 | () => 14 | data?.header?.map((item, index) => { 15 | return { 16 | ...item, 17 | className: `py-16 fs-sm fw-semibold border-bottom border-gray-800 align-middle ${ 18 | index !== 0 ? 'px-15 rounded-top-end-3 text-end' : 'pe-15' 19 | } ${index === 0 ? 'rounded-top-start-3' : ''}`, 20 | width: item.width ? item.width : index === 0 ? 'auto' : 170, 21 | Header: {t(item.Header)}, 22 | }; 23 | }), 24 | [data?.header] 25 | ); 26 | const dataTable = React.useMemo(() => data?.data, [data?.data]); 27 | return ( 28 | <> 29 | {status === PAGE_STATUS.LOADING ? ( 30 | 31 | ) : data ? ( 32 | 40 | ) : ( 41 |
42 |
43 | 48 |
49 |
50 | )} 51 | 52 | ); 53 | }; 54 | export default withTranslation()(withRouter(TopTableComponent)); 55 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/WoocommercePage/Component/TopTable.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { withRouter } from 'react-router-dom'; 4 | import Table from '../../../components/Table'; 5 | import { RingLoaderComponent } from 'aesirx-uikit'; 6 | import ComponentNoData from '../../../components/ComponentNoData'; 7 | import { env } from 'aesirx-lib'; 8 | import PAGE_STATUS from '../../../constants/PageStatus'; 9 | 10 | const TopTableComponent = (props) => { 11 | const { data, isPagination = true, status, t } = props; 12 | const columnsTable = React.useMemo( 13 | () => 14 | data?.header?.map((item, index) => { 15 | return { 16 | ...item, 17 | className: `py-16 fs-sm fw-semibold border-bottom border-gray-800 align-middle ${ 18 | index !== 0 ? 'px-15 rounded-top-end-3 text-end' : 'pe-15' 19 | } ${index === 0 ? 'rounded-top-start-3' : ''}`, 20 | width: item.width ? item.width : index === 0 ? 'auto' : 170, 21 | Header: {t(item.Header)}, 22 | }; 23 | }), 24 | [data?.header] 25 | ); 26 | const dataTable = React.useMemo(() => data?.data, [data?.data]); 27 | return ( 28 | <> 29 | {status === PAGE_STATUS.LOADING ? ( 30 | 31 | ) : data ? ( 32 |
40 | ) : ( 41 |
42 |
43 | 48 |
49 |
50 | )} 51 | 52 | ); 53 | }; 54 | export default withTranslation()(withRouter(TopTableComponent)); 55 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/ConsentsAdvancePage/Component/TopTable.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { withRouter } from 'react-router-dom'; 4 | import Table from '../../../components/Table'; 5 | import { RingLoaderComponent } from 'aesirx-uikit'; 6 | import ComponentNoData from '../../../components/ComponentNoData'; 7 | import { env } from 'aesirx-lib'; 8 | import PAGE_STATUS from '../../../constants/PageStatus'; 9 | 10 | const TopTableComponent = (props) => { 11 | const { data, isPagination = true, status, t } = props; 12 | const columnsTable = React.useMemo( 13 | () => 14 | data?.header?.map((item, index) => { 15 | return { 16 | ...item, 17 | className: `py-16 fs-sm fw-semibold border-bottom border-gray-800 align-middle ${ 18 | index !== 0 ? 'px-15 rounded-top-end-3 text-end' : 'pe-15' 19 | } ${index === 0 ? 'rounded-top-start-3' : ''}`, 20 | width: item.width ? item.width : index === 0 ? 'auto' : 170, 21 | Header: {t(item.Header)}, 22 | }; 23 | }), 24 | [data?.header] 25 | ); 26 | const dataTable = React.useMemo(() => data?.data, [data?.data]); 27 | return ( 28 | <> 29 | {status === PAGE_STATUS.LOADING ? ( 30 | 31 | ) : data ? ( 32 |
40 | ) : ( 41 |
42 |
43 | 48 |
49 |
50 | )} 51 | 52 | ); 53 | }; 54 | export default withTranslation()(withRouter(TopTableComponent)); 55 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/public/assets/images/delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionPage/Component/TopTabsChannel.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import TopTable from './TopTable'; 6 | const TopTabs = observer( 7 | class TopTabs extends Component { 8 | constructor(props) { 9 | super(props); 10 | const { listViewModel } = props; 11 | this.listViewModel = listViewModel ? listViewModel : null; 12 | this.state = { loading: false }; 13 | } 14 | // search = _.debounce((e) => { 15 | // this.props.handleSearch(e?.target?.value); 16 | // }, 500); 17 | render() { 18 | const { statusTopTable } = this.listViewModel; 19 | 20 | return ( 21 |
22 | {/* 23 |
24 | 30 | 31 | */} 32 |
33 | { 39 | await this.listViewModel.handleFilterPages({ page: value }); 40 | }} 41 | selectPageSize={async (value) => { 42 | await this.listViewModel.handleFilterPages({ 43 | page: 1, 44 | page_size: value, 45 | }); 46 | }} 47 | status={statusTopTable} 48 | sortAPI={true} 49 | handleSort={this.props.handleSort} 50 | sortBy={this.listViewModel?.sortBy} 51 | {...this.props} 52 | /> 53 |
54 | 55 | ); 56 | } 57 | } 58 | ); 59 | export default withTranslation()(withRouter(TopTabs)); 60 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/AcquisitionDetail/Component/PageTable.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import TopTable from './TopTable'; 6 | const PageTable = observer( 7 | class PageTable extends Component { 8 | constructor(props) { 9 | super(props); 10 | const { listViewModel } = props; 11 | this.listViewModel = listViewModel ? listViewModel : null; 12 | this.state = { loading: false }; 13 | } 14 | // search = _.debounce((e) => { 15 | // this.props.handleSearch(e?.target?.value); 16 | // }, 500); 17 | render() { 18 | const { statusTopTable } = this.listViewModel; 19 | 20 | return ( 21 |
22 | {/* 23 |
24 | 30 | 31 | */} 32 |
33 | { 39 | await this.listViewModel.handleFilterPages({ page: value }); 40 | }} 41 | selectPageSize={async (value) => { 42 | await this.listViewModel.handleFilterPages({ 43 | page: 1, 44 | page_size: value, 45 | }); 46 | }} 47 | status={statusTopTable} 48 | sortAPI={true} 49 | handleSort={this.props.handleSort} 50 | sortBy={this.listViewModel?.sortBy} 51 | {...this.props} 52 | /> 53 |
54 | 55 | ); 56 | } 57 | } 58 | ); 59 | export default withTranslation()(withRouter(PageTable)); 60 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/OutlinkPage/Component/OutlinkTable.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import TopTable from './TopTable'; 6 | const OutlinkTable = observer( 7 | class OutlinkTable extends Component { 8 | constructor(props) { 9 | super(props); 10 | const { listViewModel } = props; 11 | this.listViewModel = listViewModel ? listViewModel : null; 12 | this.state = { loading: false }; 13 | } 14 | // search = _.debounce((e) => { 15 | // this.props.handleSearch(e?.target?.value); 16 | // }, 500); 17 | render() { 18 | const { statusTopTable } = this.listViewModel; 19 | 20 | return ( 21 |
22 | {/* 23 |
24 | 30 | 31 | */} 32 |
33 | { 39 | await this.listViewModel.handleFilterOutlink({ page: value }); 40 | }} 41 | selectPageSize={async (value) => { 42 | await this.listViewModel.handleFilterOutlink({ 43 | page: 1, 44 | page_size: value, 45 | }); 46 | }} 47 | status={statusTopTable} 48 | sortAPI={true} 49 | handleSort={this.props.handleSort} 50 | sortBy={this.listViewModel?.sortBy} 51 | {...this.props} 52 | /> 53 |
54 | 55 | ); 56 | } 57 | } 58 | ); 59 | export default withTranslation()(withRouter(OutlinkTable)); 60 | -------------------------------------------------------------------------------- /packages/aesirx-bi-app/src/containers/SearchEnginePage/Component/OutlinkTable.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { withTranslation } from 'react-i18next'; 3 | import { observer } from 'mobx-react'; 4 | import { withRouter } from 'react-router-dom'; 5 | import TopTable from './TopTable'; 6 | const OutlinkTable = observer( 7 | class OutlinkTable extends Component { 8 | constructor(props) { 9 | super(props); 10 | const { listViewModel } = props; 11 | this.listViewModel = listViewModel ? listViewModel : null; 12 | this.state = { loading: false }; 13 | } 14 | // search = _.debounce((e) => { 15 | // this.props.handleSearch(e?.target?.value); 16 | // }, 500); 17 | render() { 18 | const { statusTopTable } = this.listViewModel; 19 | 20 | return ( 21 |
22 | {/* 23 |
24 | 30 | 31 | */} 32 |
33 | { 39 | await this.listViewModel.handleFilterOutlink({ page: value }); 40 | }} 41 | selectPageSize={async (value) => { 42 | await this.listViewModel.handleFilterOutlink({ 43 | page: 1, 44 | page_size: value, 45 | }); 46 | }} 47 | status={statusTopTable} 48 | sortAPI={true} 49 | handleSort={this.props.handleSort} 50 | sortBy={this.listViewModel?.sortBy} 51 | {...this.props} 52 | /> 53 |
54 | 55 | ); 56 | } 57 | } 58 | ); 59 | export default withTranslation()(withRouter(OutlinkTable)); 60 | --------------------------------------------------------------------------------