ui-soxo-bootstrap-core 2.4.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +9 -0
- package/.github/workflows/npm-publish.yml +33 -0
- package/.husky/pre-commit +12 -0
- package/.prettierrc.json +11 -0
- package/babel.config.js +3 -0
- package/core/assets/images/vector.png +0 -0
- package/core/components/component-loader/component-loader.js +125 -0
- package/core/components/component-wrapper/component-wrapper.js +122 -0
- package/core/components/extra-info/extra-info-details.js +172 -0
- package/core/components/extra-info/extra-info-details.scss +27 -0
- package/core/components/extra-info/extra-info.js +134 -0
- package/core/components/index.js +18 -0
- package/core/components/landing-api/landing-api.js +492 -0
- package/core/components/landing-api/landing-api.scss +19 -0
- package/core/components/menu-template-api/menu-template-api.js +321 -0
- package/core/components/root-application-api/root-application-api.js +174 -0
- package/core/components/root-application-api/root-application.api.scss +0 -0
- package/core/index.js +14 -0
- package/core/lib/Store.js +363 -0
- package/core/lib/assets/Tick-icon.png +0 -0
- package/core/lib/assets/blue-slate-theme.png +0 -0
- package/core/lib/assets/dark-theme.png +0 -0
- package/core/lib/assets/deep-purple-theme.png +0 -0
- package/core/lib/assets/light-theme.png +0 -0
- package/core/lib/assets/nura-theme.png +0 -0
- package/core/lib/assets/plant.png +0 -0
- package/core/lib/assets/welcome-image.png +0 -0
- package/core/lib/assets/white-haze-theme.png +0 -0
- package/core/lib/components/application-bootstrap/application-bootstrap.js +115 -0
- package/core/lib/components/application-bootstrap/application-bootstrap.scss +0 -0
- package/core/lib/components/approval-form/approval-form.js +280 -0
- package/core/lib/components/approval-form/approval-form.scss +184 -0
- package/core/lib/components/approval-list/approval-list.js +143 -0
- package/core/lib/components/approval-list/approval-list.scss +3 -0
- package/core/lib/components/approval-list/components/request-card/request-card.js +43 -0
- package/core/lib/components/approval-list/components/request-card/request-card.scss +31 -0
- package/core/lib/components/camera/camera.js +231 -0
- package/core/lib/components/camera/camera.scss +86 -0
- package/core/lib/components/comment-block/comment-block.js +139 -0
- package/core/lib/components/comment-block/comment-block.scss +3 -0
- package/core/lib/components/confirm-modal/confirm-modal.js +82 -0
- package/core/lib/components/confirm-modal/confirm-modal.scss +3 -0
- package/core/lib/components/consent/consent.js +67 -0
- package/core/lib/components/consent/consent.scss +0 -0
- package/core/lib/components/consent/pdf-signature.js +299 -0
- package/core/lib/components/consent/signature-pad.js +90 -0
- package/core/lib/components/consent/signature-pad.scss +14 -0
- package/core/lib/components/file-upload/file-upload.js +133 -0
- package/core/lib/components/finger-print-reader/finger-print-reader.js +296 -0
- package/core/lib/components/finger-print-reader/finger-print-reader.scss +47 -0
- package/core/lib/components/finger-print-search/finger-print-search.js +200 -0
- package/core/lib/components/finger-print-search/finger-print-search.scss +47 -0
- package/core/lib/components/global-header/animations.js +18 -0
- package/core/lib/components/global-header/global-header.js +413 -0
- package/core/lib/components/global-header/global-header.scss +369 -0
- package/core/lib/components/header/generic-header.js +76 -0
- package/core/lib/components/header/generic-header.scss +99 -0
- package/core/lib/components/image-preview/image-preview.js +33 -0
- package/core/lib/components/image-wrapper/image-wrapper.js +108 -0
- package/core/lib/components/image-wrapper/image-wrapper.scss +13 -0
- package/core/lib/components/index.js +203 -0
- package/core/lib/components/landing/landing.js +404 -0
- package/core/lib/components/landing/landing.scss +0 -0
- package/core/lib/components/language-switcher/language-switcher.js +50 -0
- package/core/lib/components/menu-context/menu-context.js +70 -0
- package/core/lib/components/menu-template/menu-template.js +250 -0
- package/core/lib/components/menu-template/menu-template.scss +9 -0
- package/core/lib/components/modal-search/modal-search.js +153 -0
- package/core/lib/components/modal-search/modal-search.scss +79 -0
- package/core/lib/components/modal-wrapper/modal-manager.js +16 -0
- package/core/lib/components/modal-wrapper/modal-wrapper.js +108 -0
- package/core/lib/components/modal-wrapper/modal-wrapper.scss +14 -0
- package/core/lib/components/notice-board/notice-board.js +132 -0
- package/core/lib/components/notice-board/notice-board.scss +65 -0
- package/core/lib/components/page-container/page-container.js +55 -0
- package/core/lib/components/page-container/page-container.scss +8 -0
- package/core/lib/components/page-header/page-header.js +23 -0
- package/core/lib/components/page-header/page-header.scss +18 -0
- package/core/lib/components/pdf-viewer/pdf-viewer.js +56 -0
- package/core/lib/components/portlet-table/components/table-actions/table-actions.js +58 -0
- package/core/lib/components/portlet-table/components/table-actions/table-actions.scss +1 -0
- package/core/lib/components/portlet-table/components/table-data/table-data.js +107 -0
- package/core/lib/components/portlet-table/components/table-data/table-data.scss +0 -0
- package/core/lib/components/portlet-table/portlet-table.js +63 -0
- package/core/lib/components/portlet-table/portlet-table.scss +90 -0
- package/core/lib/components/progress-bar/progress-bar.js +58 -0
- package/core/lib/components/progress-bar/progress-bar.scss +15 -0
- package/core/lib/components/request-form/request-form.js +110 -0
- package/core/lib/components/request-form/request-form.scss +0 -0
- package/core/lib/components/root-application/root-application.js +70 -0
- package/core/lib/components/rupee/rupee.js +14 -0
- package/core/lib/components/script-input/script-input.js +169 -0
- package/core/lib/components/script-input/script-input.scss +8 -0
- package/core/lib/components/sidemenu/animations.js +52 -0
- package/core/lib/components/sidemenu/sidemenu.js +617 -0
- package/core/lib/components/sidemenu/sidemenu.scss +264 -0
- package/core/lib/components/spotlight-search/spotlight-search.component.js +636 -0
- package/core/lib/components/spotlight-search/spotlight-search.component.scss +78 -0
- package/core/lib/components/table-wrapper/table-wrapper.js +136 -0
- package/core/lib/components/table-wrapper/table-wrapper.scss +72 -0
- package/core/lib/components/ui_elements/Loader.js +13 -0
- package/core/lib/components/ui_elements/Notify.js +13 -0
- package/core/lib/components/ui_elements/PlaceHolder.js +34 -0
- package/core/lib/components/web-camera/web-camera.js +162 -0
- package/core/lib/components/web-camera/web-camera.scss +28 -0
- package/core/lib/core.md +9 -0
- package/core/lib/elements/Elements.md +3 -0
- package/core/lib/elements/basic/LoggedUserRedirect.js +21 -0
- package/core/lib/elements/basic/PrivateRoute.js +16 -0
- package/core/lib/elements/basic/button/Button.md +43 -0
- package/core/lib/elements/basic/button/button.js +170 -0
- package/core/lib/elements/basic/button/button.scss +0 -0
- package/core/lib/elements/basic/card/Card.md +15 -0
- package/core/lib/elements/basic/card/card.js +40 -0
- package/core/lib/elements/basic/card/card.scss +14 -0
- package/core/lib/elements/basic/checkbox/checkbox.js +23 -0
- package/core/lib/elements/basic/col/col.js +16 -0
- package/core/lib/elements/basic/copy-to-clipboard/Readme.md +40 -0
- package/core/lib/elements/basic/copy-to-clipboard/copy-to-clipboard.js +62 -0
- package/core/lib/elements/basic/country-phone-input/Readme.md +98 -0
- package/core/lib/elements/basic/country-phone-input/country-phone-input.js +107 -0
- package/core/lib/elements/basic/country-phone-input/phone-input.scss +62 -0
- package/core/lib/elements/basic/datepicker/datepicker.js +33 -0
- package/core/lib/elements/basic/dragabble-wrapper/draggable-wrapper.js +61 -0
- package/core/lib/elements/basic/empty/empty.js +15 -0
- package/core/lib/elements/basic/fingerprint-protrected/fingerprint-protected.js +118 -0
- package/core/lib/elements/basic/fingerprint-protrected/fingerprint-protected.scss +10 -0
- package/core/lib/elements/basic/form/Readme.md +0 -0
- package/core/lib/elements/basic/form/form.js +70 -0
- package/core/lib/elements/basic/form/form.scss +4 -0
- package/core/lib/elements/basic/image/image.js +45 -0
- package/core/lib/elements/basic/image/image.scss +17 -0
- package/core/lib/elements/basic/image/readme.md +26 -0
- package/core/lib/elements/basic/image-viewer/image-viewer.js +109 -0
- package/core/lib/elements/basic/image-viewer/image-viewer.scss +8 -0
- package/core/lib/elements/basic/input/input.js +81 -0
- package/core/lib/elements/basic/input/readme.md +77 -0
- package/core/lib/elements/basic/json-input/json-input.js +51 -0
- package/core/lib/elements/basic/menu-dashboard/menu-dashboard.js +216 -0
- package/core/lib/elements/basic/menu-dashboard/menu-dashboard.scss +28 -0
- package/core/lib/elements/basic/modal/modal.js +64 -0
- package/core/lib/elements/basic/modal/readme.md +62 -0
- package/core/lib/elements/basic/popconfirm/popconfirm.js +18 -0
- package/core/lib/elements/basic/popover/popover.js +13 -0
- package/core/lib/elements/basic/radio/radio.js +18 -0
- package/core/lib/elements/basic/rangepicker/rangepicker.js +51 -0
- package/core/lib/elements/basic/rangepicker/rangepicker.scss +18 -0
- package/core/lib/elements/basic/rangepicker/readme.md +82 -0
- package/core/lib/elements/basic/reference-select/readme.md +19 -0
- package/core/lib/elements/basic/reference-select/reference-select.js +337 -0
- package/core/lib/elements/basic/row/row.js +16 -0
- package/core/lib/elements/basic/select/select.js +47 -0
- package/core/lib/elements/basic/select-box/readme.md +53 -0
- package/core/lib/elements/basic/select-box/select-box.js +63 -0
- package/core/lib/elements/basic/skeleton/readme.md +35 -0
- package/core/lib/elements/basic/skeleton/skeleton.js +36 -0
- package/core/lib/elements/basic/skeleton/skeleton.scss +53 -0
- package/core/lib/elements/basic/space/space.js +13 -0
- package/core/lib/elements/basic/switch/readme.md +29 -0
- package/core/lib/elements/basic/switch/switch.js +58 -0
- package/core/lib/elements/basic/tab/tab.js +15 -0
- package/core/lib/elements/basic/table/readme.md +9 -0
- package/core/lib/elements/basic/table/table.js +100 -0
- package/core/lib/elements/basic/table/table.scss +0 -0
- package/core/lib/elements/basic/tag/tag.js +63 -0
- package/core/lib/elements/basic/tag/tag.scss +3 -0
- package/core/lib/elements/basic/timeline/timeline.js +14 -0
- package/core/lib/elements/basic/title/readme.md +20 -0
- package/core/lib/elements/basic/title/title.js +38 -0
- package/core/lib/elements/basic/title/title.scss +0 -0
- package/core/lib/elements/basic/user-search/user-search.js +192 -0
- package/core/lib/elements/complex/barcode/barcode.js +27 -0
- package/core/lib/elements/complex/bargraph/bar-graph.js +262 -0
- package/core/lib/elements/complex/basic-table/basic-table.js +111 -0
- package/core/lib/elements/complex/basic-table/basic-table.scss +4 -0
- package/core/lib/elements/complex/date-display/date-display.js +37 -0
- package/core/lib/elements/complex/error-boundary/error-boundary.js +29 -0
- package/core/lib/elements/complex/google-location-input/map-container-library-load.js +93 -0
- package/core/lib/elements/complex/google-map/google-map.js +230 -0
- package/core/lib/elements/complex/google-map/google-map.scss +13 -0
- package/core/lib/elements/complex/line-graph/line-graph.js +108 -0
- package/core/lib/elements/complex/location-search-input/location-search-input.js +100 -0
- package/core/lib/elements/complex/maps/maps.js +0 -0
- package/core/lib/elements/complex/pie-chart/pie-chart.js +203 -0
- package/core/lib/elements/complex/qr-code/qr-code.js +27 -0
- package/core/lib/elements/complex/qrscanner/qrscanner.js +57 -0
- package/core/lib/elements/complex/search-debounce/search-debounce.js +37 -0
- package/core/lib/elements/complex/statistic-card/dashboard-statistic-card.js +76 -0
- package/core/lib/elements/complex/statistic-card/statistic-card.js +28 -0
- package/core/lib/elements/index.js +226 -0
- package/core/lib/hooks/device-detect.js +26 -0
- package/core/lib/hooks/index.js +19 -0
- package/core/lib/hooks/use-location.js +33 -0
- package/core/lib/hooks/use-window-size.js +34 -0
- package/core/lib/i18n.js +70 -0
- package/core/lib/index.js +106 -0
- package/core/lib/introduction.md +74 -0
- package/core/lib/js-styleguide.md +4112 -0
- package/core/lib/models/actions/actions.js +128 -0
- package/core/lib/models/actions/components/action-detail/action-detail.js +190 -0
- package/core/lib/models/actions/components/action-detail/action-detail.scss +0 -0
- package/core/lib/models/actions/components/custom-actions/custom-actions.js +186 -0
- package/core/lib/models/actions/components/custom-actions/custom-actions.scss +0 -0
- package/core/lib/models/attachments/attachments.js +231 -0
- package/core/lib/models/base-loader.js +99 -0
- package/core/lib/models/base.js +716 -0
- package/core/lib/models/branches/branches.js +125 -0
- package/core/lib/models/checklists/checklists.js +115 -0
- package/core/lib/models/columns/columns.js +169 -0
- package/core/lib/models/columns/components/columns-add/columns-add.js +172 -0
- package/core/lib/models/columns/components/columns-add/columns-add.scss +0 -0
- package/core/lib/models/comments/comments.js +213 -0
- package/core/lib/models/departments/departments.js +107 -0
- package/core/lib/models/financial-years/financial_years.js +127 -0
- package/core/lib/models/forms/components/form-creator/form-creator.js +624 -0
- package/core/lib/models/forms/components/form-creator/form-creator.scss +30 -0
- package/core/lib/models/forms/components/form-detail/form-detail.js +224 -0
- package/core/lib/models/forms/components/form-detail/form-detail.scss +0 -0
- package/core/lib/models/forms/forms.js +122 -0
- package/core/lib/models/index.js +203 -0
- package/core/lib/models/invoice-numbers/invoice_numbers.js +204 -0
- package/core/lib/models/lookup-types/components/lookup-detail/lookup-detail.js +145 -0
- package/core/lib/models/lookup-types/components/lookup-detail/lookup-detail.scss +0 -0
- package/core/lib/models/lookup-types/lookup-types.js +113 -0
- package/core/lib/models/lookup-values/components/lookup-values-add/lookup-values-add.js +126 -0
- package/core/lib/models/lookup-values/components/lookup-values-add/lookup-values-add.scss +0 -0
- package/core/lib/models/lookup-values/lookup-values.js +107 -0
- package/core/lib/models/menu-roles/menu-roles.js +127 -0
- package/core/lib/models/menus/components/menu-add/menu-add.js +228 -0
- package/core/lib/models/menus/components/menu-add/menu-add.scss +0 -0
- package/core/lib/models/menus/components/menu-detail/menu-detail.js +170 -0
- package/core/lib/models/menus/components/menu-detail/menu-detail.scss +0 -0
- package/core/lib/models/menus/components/menu-list/menu-list.js +593 -0
- package/core/lib/models/menus/components/menu-list/menu-list.scss +6 -0
- package/core/lib/models/menus/components/menu-roles-add/menu-roles-add.js +183 -0
- package/core/lib/models/menus/components/menu-roles-add/menu-roles-add.scss +0 -0
- package/core/lib/models/menus/menus.js +499 -0
- package/core/lib/models/models/components/model-detail/model-detail.js +137 -0
- package/core/lib/models/models/components/model-detail/model-detail.scss +0 -0
- package/core/lib/models/models/components/models.js +128 -0
- package/core/lib/models/modules/modules.js +204 -0
- package/core/lib/models/outbox/outbox.js +73 -0
- package/core/lib/models/pages/pages.js +107 -0
- package/core/lib/models/permissions/permissions.js +71 -0
- package/core/lib/models/process/components/process-add/process-add.js +181 -0
- package/core/lib/models/process/components/process-add/process-add.scss +0 -0
- package/core/lib/models/process/components/process-dashboard/process-dashboard.js +602 -0
- package/core/lib/models/process/components/process-dashboard/process-dashboard.scss +62 -0
- package/core/lib/models/process/components/process-detail/process-detail.js +140 -0
- package/core/lib/models/process/components/process-detail/process-detail.scss +0 -0
- package/core/lib/models/process/components/process-timeline/process-timeline.js +140 -0
- package/core/lib/models/process/components/task-detail/task-detail.js +240 -0
- package/core/lib/models/process/components/task-detail/task-detail.scss +27 -0
- package/core/lib/models/process/components/task-form/task-form.js +529 -0
- package/core/lib/models/process/components/task-form/task-form.scss +7 -0
- package/core/lib/models/process/components/task-list/task-list.js +221 -0
- package/core/lib/models/process/components/task-list/task-list.scss +14 -0
- package/core/lib/models/process/components/task-overview/task-overview.js +300 -0
- package/core/lib/models/process/components/task-overview/task-overview.scss +0 -0
- package/core/lib/models/process/components/task-overview-legacy/task-overview-legacy.js +192 -0
- package/core/lib/models/process/components/task-overview-legacy/task-overview.scss +0 -0
- package/core/lib/models/process/components/task-routes/task-routes.js +45 -0
- package/core/lib/models/process/components/task-status/task-status.js +176 -0
- package/core/lib/models/process/components/task-status/task-status.scss +11 -0
- package/core/lib/models/process/process.js +781 -0
- package/core/lib/models/process-transactions/process-transactions.js +124 -0
- package/core/lib/models/roles/roles.js +106 -0
- package/core/lib/models/scripts/scripts.js +111 -0
- package/core/lib/models/step-transactions/step-transcations.js +148 -0
- package/core/lib/models/steps/components/step-add/step-add.js +261 -0
- package/core/lib/models/steps/components/step-add/step-add.scss +0 -0
- package/core/lib/models/steps/components/step-detail/step-detail.js +157 -0
- package/core/lib/models/steps/components/step-detail/step-detail.scss +0 -0
- package/core/lib/models/steps/steps.js +357 -0
- package/core/lib/models/user-preferences/user-preferences.js +83 -0
- package/core/lib/models/users/components/user-add/user-add.js +226 -0
- package/core/lib/models/users/components/user-add/user-add.scss +0 -0
- package/core/lib/models/users/users.js +120 -0
- package/core/lib/modules/business/launch-page/launch-page.js +29 -0
- package/core/lib/modules/business/launch-page/launch-page.scss +6 -0
- package/core/lib/modules/business/slots/slots.js +231 -0
- package/core/lib/modules/business/slots/slots.scss +108 -0
- package/core/lib/modules/forms/components/field-customizer/field-customizer.js +139 -0
- package/core/lib/modules/forms/components/field-customizer/field-customizer.scss +0 -0
- package/core/lib/modules/forms/components/field-selector/field-selector.js +157 -0
- package/core/lib/modules/forms/components/field-selector/field-selector.scss +25 -0
- package/core/lib/modules/forms/components/form-display/form-display.js +203 -0
- package/core/lib/modules/forms/components/form-display/form-display.scss +9 -0
- package/core/lib/modules/forms/components/tab-customizer/tab-customizer.js +125 -0
- package/core/lib/modules/forms/components/tab-customizer/tab-customizer.scss +0 -0
- package/core/lib/modules/generic/generic-add/generic-add.js +213 -0
- package/core/lib/modules/generic/generic-add/generic-add.scss +0 -0
- package/core/lib/modules/generic/generic-detail/generic-detail.js +199 -0
- package/core/lib/modules/generic/generic-detail/generic-detail.scss +0 -0
- package/core/lib/modules/generic/generic-edit/generic-edit.js +120 -0
- package/core/lib/modules/generic/generic-edit/generic-edit.scss +0 -0
- package/core/lib/modules/generic/generic-list/ExportReactCSV.js +62 -0
- package/core/lib/modules/generic/generic-list/generic-list.js +705 -0
- package/core/lib/modules/generic/generic-list/generic-list.scss +34 -0
- package/core/lib/modules/generic/generic-upload/generic-upload.js +484 -0
- package/core/lib/modules/generic/generic-upload/generic-upload.scss +0 -0
- package/core/lib/modules/generic/table-settings/table-settings.js +226 -0
- package/core/lib/modules/generic/table-settings/table-settings.scss +37 -0
- package/core/lib/modules/index.js +52 -0
- package/core/lib/modules/modules-routes/module-routes.js +35 -0
- package/core/lib/modules/modules-routes/module-routes.scss +0 -0
- package/core/lib/pages/change-password/change-password.js +211 -0
- package/core/lib/pages/change-password/change-password.scss +76 -0
- package/core/lib/pages/homepage/homepage.js +53 -0
- package/core/lib/pages/index.js +20 -0
- package/core/lib/pages/login/login.js +617 -0
- package/core/lib/pages/login/login.scss +346 -0
- package/core/lib/pages/manage-users/manage-users.js +429 -0
- package/core/lib/pages/manage-users/manage-users.scss +26 -0
- package/core/lib/pages/profile/profile.js +247 -0
- package/core/lib/pages/profile/profile.scss +107 -0
- package/core/lib/pages/profile/theme-config.js +18 -0
- package/core/lib/pages/profile/themes-backup.json +311 -0
- package/core/lib/pages/profile/themes.json +254 -0
- package/core/lib/pages/register/register.js +177 -0
- package/core/lib/pages/register/register.scss +128 -0
- package/core/lib/react-styleguide.md +757 -0
- package/core/lib/utils/api/api.utils.js +188 -0
- package/core/lib/utils/api/readme.md +426 -0
- package/core/lib/utils/async.js +36 -0
- package/core/lib/utils/common/common.utils.js +123 -0
- package/core/lib/utils/common/readme.md +30 -0
- package/core/lib/utils/date/date.utils.js +295 -0
- package/core/lib/utils/date/readme.md +2 -0
- package/core/lib/utils/firebase.support.utils.js +99 -0
- package/core/lib/utils/firebase.utils.js +808 -0
- package/core/lib/utils/form/Form.md +0 -0
- package/core/lib/utils/form/form.utils.js +256 -0
- package/core/lib/utils/generic/generic.utils.js +69 -0
- package/core/lib/utils/http/auth.helper.js +95 -0
- package/core/lib/utils/http/http.utils.js +157 -0
- package/core/lib/utils/http/readme.md +14 -0
- package/core/lib/utils/index.js +46 -0
- package/core/lib/utils/location/location.utils.js +137 -0
- package/core/lib/utils/location/readme.md +18 -0
- package/core/lib/utils/modal.utils.js +16 -0
- package/core/lib/utils/notification.utils.js +35 -0
- package/core/lib/utils/pwa/pwa.utils.js +88 -0
- package/core/lib/utils/script.utils.js +235 -0
- package/core/lib/utils/setting.utils.js +69 -0
- package/core/lib/utils/upload.utils.js +30 -0
- package/core/models/Preference/Preferences.js +46 -0
- package/core/models/base/base.js +399 -0
- package/core/models/base-clone-loader.js +107 -0
- package/core/models/base-clone.js +187 -0
- package/core/models/base-loader.js +97 -0
- package/core/models/core-scripts/core-scripts.js +150 -0
- package/core/models/dashboard/dashboard.js +187 -0
- package/core/models/detail-loader.js +88 -0
- package/core/models/groups.js +82 -0
- package/core/models/index.js +94 -0
- package/core/models/lookup-types/components/lookup-detail/lookup-detail.js +129 -0
- package/core/models/lookup-types/lookup-types.js +96 -0
- package/core/models/lookup-values/components/lookup-values-modal/lookup-values-modal.js +95 -0
- package/core/models/lookup-values/components/lookup-values-modal/lookup-values-modal.scss +0 -0
- package/core/models/lookup-values/lookup-values.js +92 -0
- package/core/models/menu-roles/components/menu-roles-add/menu-roles-add.js +153 -0
- package/core/models/menu-roles/components/menu-roles-add/menu-roles-add.scss +0 -0
- package/core/models/menu-roles/menu-roles.js +158 -0
- package/core/models/menus/components/menu-add/menu-add.js +325 -0
- package/core/models/menus/components/menu-add/menu-add.scss +31 -0
- package/core/models/menus/components/menu-detail/menu-detail.js +263 -0
- package/core/models/menus/components/menu-list/menu-list.js +392 -0
- package/core/models/menus/components/menu-lists/menu-lists.js +429 -0
- package/core/models/menus/components/menu-lists/menu-lists.scss +41 -0
- package/core/models/menus/menus.js +291 -0
- package/core/models/model-columns.js +121 -0
- package/core/models/models/components/model-detail/model-add.js +120 -0
- package/core/models/models/components/model-detail/model-detail.js +133 -0
- package/core/models/models/components/model-detail/model-detail.scss +0 -0
- package/core/models/models/models.js +154 -0
- package/core/models/pages/components/page-add/page-add.js +163 -0
- package/core/models/pages/components/page-add/page-add.scss +31 -0
- package/core/models/pages/components/page-details/page-details.js +210 -0
- package/core/models/pages/components/page-list/page-list.js +248 -0
- package/core/models/pages/pages.js +142 -0
- package/core/models/pages/pages.scss +0 -0
- package/core/models/pages.js +142 -0
- package/core/models/roles/components/role-add/role-add.js +248 -0
- package/core/models/roles/components/role-list/role-list.js +408 -0
- package/core/models/roles/roles.js +188 -0
- package/core/models/user-roles/components/user-roles-add/user-roles-add.js +149 -0
- package/core/models/user-roles/components/user-roles-add/user-roles-add.scss +0 -0
- package/core/models/user-roles/user-roles.js +99 -0
- package/core/models/users/components/user-add/user-add.js +458 -0
- package/core/models/users/components/user-detail/user-detail.js +236 -0
- package/core/models/users/components/user-detail/user-detail.scss +0 -0
- package/core/models/users/components/user-list/user-list.js +397 -0
- package/core/models/users/users.js +185 -0
- package/core/modules/Informations/change-info/change-info.js +618 -0
- package/core/modules/Informations/change-info/change-info.scss +135 -0
- package/core/modules/dashboard/components/dashboard-card/animations.js +65 -0
- package/core/modules/dashboard/components/dashboard-card/dashboard-card.js +197 -0
- package/core/modules/dashboard/components/dashboard-card/menu-dashboard-card.js +430 -0
- package/core/modules/dashboard/components/dashboard-card/menu-dashboard-card.scss +60 -0
- package/core/modules/dashboard/components/pop-query-dashboard/pop-query-dashboard.js +66 -0
- package/core/modules/generic/components/generic-add/generic-add.js +121 -0
- package/core/modules/generic/components/generic-add/generic-add.scss +13 -0
- package/core/modules/generic/components/generic-add-modal/generic-add-modal.js +125 -0
- package/core/modules/generic/components/generic-add-modal/generic-add-modal.scss +13 -0
- package/core/modules/generic/components/generic-detail/generic-detail.js +184 -0
- package/core/modules/generic/components/generic-detail/generic-detail.scss +25 -0
- package/core/modules/generic/components/generic-edit/generic-edit.js +123 -0
- package/core/modules/generic/components/generic-edit/generic-edit.scss +0 -0
- package/core/modules/generic/components/generic-list/generic-list.js +335 -0
- package/core/modules/generic/components/generic-list/generic-list.scss +35 -0
- package/core/modules/index.js +54 -0
- package/core/modules/module-routes/module-routes.js +37 -0
- package/core/modules/module-routes/module-routes.scss +0 -0
- package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +1101 -0
- package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.scss +171 -0
- package/core/pages/homepage-api/homepage-api.js +106 -0
- package/core/pages/homepage-api/homepage-api.scss +234 -0
- package/core/pages/homepage-api/menu-dashboard.js +169 -0
- package/core/pages/homepage-api/menu-dashboard.scss +12 -0
- package/core/translation.json +54 -0
- package/core/translations.json +20 -0
- package/core/utils/script.utils.js +130 -0
- package/core/utils/settings.utils.js +26 -0
- package/eslint.config.mjs +79 -0
- package/index.js +36 -0
- package/package.json +118 -0
- package/tsconfig.json +27 -0
- package/webpack.config.js +174 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**************************************************
|
|
2
|
+
* Implements Location service same as angular have
|
|
3
|
+
*************************************************/
|
|
4
|
+
|
|
5
|
+
import { IsObjectHaveKeys } from '../common/common.utils';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* takes search string and converts to corresponding object
|
|
9
|
+
* @param {string} searchString=''
|
|
10
|
+
* e.x. ?query=menu_id=5 returns { menu_id: "5" }
|
|
11
|
+
*/
|
|
12
|
+
export function GenerateObjectFromUrlParams(searchString) {
|
|
13
|
+
if (searchString) {
|
|
14
|
+
return (searchString).replace(/(^\?)/, '').split("&").map(function (n) { return n = n.split(/=(.+)/), this[n[0]] = n[1], this }.bind({}))[0];
|
|
15
|
+
} else {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function SerializeObj(obj) {
|
|
21
|
+
const queryString = Object.entries(obj).map(i => [i[0], encodeURIComponent(i[1])].join('=')).join('&');
|
|
22
|
+
if (queryString) {
|
|
23
|
+
return `?${queryString}`
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function GetUrlParams(props) {
|
|
28
|
+
return {
|
|
29
|
+
queryString: Location.search(),
|
|
30
|
+
params: props.match.params
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class Location {
|
|
35
|
+
// historyFetchMethod;
|
|
36
|
+
|
|
37
|
+
static getHistoryMethod(method) {
|
|
38
|
+
this.historyFetchMethod = method;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* used to get and set query strings
|
|
43
|
+
* if obj is empty, works as getter, else as setter
|
|
44
|
+
* @param {object} obj - object params to be set as query param
|
|
45
|
+
* @param {boolean} reset=false}={} - if true, overrides existing query else extend previous query
|
|
46
|
+
*/
|
|
47
|
+
static search(obj, { reset = false, method = 'replace' } = {}) {
|
|
48
|
+
const location = window.location;
|
|
49
|
+
let hash = window.location.hash.replace('#', '');
|
|
50
|
+
let urlParams = GenerateObjectFromUrlParams(decodeURIComponent(location.search))
|
|
51
|
+
|
|
52
|
+
if (hash) {
|
|
53
|
+
urlParams = urlParams[hash] ? JSON.parse(urlParams[hash]) : {};
|
|
54
|
+
}
|
|
55
|
+
if (!obj) {
|
|
56
|
+
hash = window.location.hash.replace('#', '');
|
|
57
|
+
return urlParams;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const { history: History } = this.historyFetchMethod();
|
|
61
|
+
const finalObj = {};
|
|
62
|
+
|
|
63
|
+
Object.keys(obj).forEach((key) => {
|
|
64
|
+
if (obj[key] == null && urlParams[key]) { // if any attribute is null, will remove from existing query
|
|
65
|
+
delete urlParams[key];
|
|
66
|
+
} else {
|
|
67
|
+
finalObj[key] = obj[key];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
urlParams = reset ? { ...{}, ...finalObj } : { ...urlParams, ...finalObj };
|
|
72
|
+
|
|
73
|
+
if (!Object.keys(urlParams).length || (!Object.keys(finalObj).length)) {
|
|
74
|
+
History[method](location.pathname);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (History) {
|
|
78
|
+
let obj = {};
|
|
79
|
+
if (hash) {
|
|
80
|
+
obj[hash] = JSON.stringify(urlParams);
|
|
81
|
+
} else {
|
|
82
|
+
obj = urlParams;
|
|
83
|
+
}
|
|
84
|
+
let queryUrl = SerializeObj(obj);
|
|
85
|
+
if (hash) {
|
|
86
|
+
queryUrl = queryUrl + '#' + hash;
|
|
87
|
+
}
|
|
88
|
+
History[method](queryUrl);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* used for navigating to different routes
|
|
94
|
+
* @param {string} {url}
|
|
95
|
+
* @param {string} {method} - used to select method for navigation, can be push, goBack (for pop operation), replace
|
|
96
|
+
*/
|
|
97
|
+
static navigate({ url, method = 'push', queryParam }, e = {}) {
|
|
98
|
+
if (IsObjectHaveKeys(queryParam)) {
|
|
99
|
+
url += SerializeObj(queryParam);
|
|
100
|
+
}
|
|
101
|
+
const { history: History } = this.historyFetchMethod();
|
|
102
|
+
|
|
103
|
+
if (method === 'push' && e && (e.metaKey || e.ctrlKey)) {
|
|
104
|
+
var win = window.open(url, '_blank');
|
|
105
|
+
win.focus();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
History[method](url);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
static back() {
|
|
112
|
+
if (window.history.length > 2) {
|
|
113
|
+
// if history is not empty, go back:
|
|
114
|
+
this.navigate({ method: 'goBack' });
|
|
115
|
+
} else {
|
|
116
|
+
// go home:
|
|
117
|
+
this.navigate({ method: 'push', url: '/' });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* used for navigating to specified location
|
|
123
|
+
* @param {string} {url}
|
|
124
|
+
* @param {string} {method} - used to select method for navigation, can be push, goBack to specified scene
|
|
125
|
+
*/
|
|
126
|
+
static backByLength(n) {
|
|
127
|
+
n = -(n || 1);
|
|
128
|
+
if (window.history.length > 2) {
|
|
129
|
+
// if history is not empty, go back:
|
|
130
|
+
this.navigate({ url: n, method: 'go' });
|
|
131
|
+
} else {
|
|
132
|
+
// go home:
|
|
133
|
+
this.navigate({ method: 'push', url: '/' });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## Usage
|
|
2
|
+
|
|
3
|
+
Location Utils is a JavaScript library for working with geolocation. It provides a set of functions for getting and manipulating geolocation data, as well as for calculating distances between locations.
|
|
4
|
+
|
|
5
|
+
To use Location Utils in your JavaScript code, you need to require it:
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Geolocation
|
|
9
|
+
|
|
10
|
+
The following functions are available for working with geolocation:
|
|
11
|
+
|
|
12
|
+
● getLocation(): Returns a Promise that resolves with the user's current location.<br>
|
|
13
|
+
● getDistance(from, to): Calculates the distance between two locations in kilometers. The from and to parameters should be objects with latitude and longitude properties.<br><br>
|
|
14
|
+
Here is an example of how to use these functions:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
|
|
18
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
module.exports = {
|
|
3
|
+
_currentGlobalLoader: null,
|
|
4
|
+
registerModal: function (ref) {
|
|
5
|
+
this._currentGlobalLoader = ref;
|
|
6
|
+
},
|
|
7
|
+
openModal: function ({ ...args }) {
|
|
8
|
+
if (this._currentGlobalLoader) {
|
|
9
|
+
this._currentGlobalLoader.openModal({ ...args });
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
closeModal: function ({ ...args }) {
|
|
13
|
+
this._currentGlobalLoader.closeModal({ ...args });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import { message } from 'antd';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export default class Notification {
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Trigger a success message
|
|
15
|
+
*
|
|
16
|
+
* @param {*} message
|
|
17
|
+
*/
|
|
18
|
+
static success = (text) => {
|
|
19
|
+
|
|
20
|
+
message.success(text)
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Trigger a notification of type with message
|
|
26
|
+
*
|
|
27
|
+
* @param {*} param0
|
|
28
|
+
*/
|
|
29
|
+
static trigger = ({ type, text }) => {
|
|
30
|
+
|
|
31
|
+
message[type](text);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
|
|
2
|
+
// import { StoreEvent } from 'state-manager-utility';
|
|
3
|
+
// import { GetCookie } from './cookie.utils';
|
|
4
|
+
// import GAService from './googleAnalytic.service';
|
|
5
|
+
|
|
6
|
+
import { message } from 'antd';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var deferredPrompt;
|
|
10
|
+
let promptAllowed = false;
|
|
11
|
+
|
|
12
|
+
function ListenA2HSPrompt() {
|
|
13
|
+
window.addEventListener('beforeinstallprompt', function (e) {
|
|
14
|
+
// Prevent Chrome 67 and earlier from automatically showing the prompt
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
// Stash the event so it can be triggered later.
|
|
17
|
+
deferredPrompt = e;
|
|
18
|
+
// track how many users were shown the a2hs popup
|
|
19
|
+
// GAService.trackNumberOfTimesA2HSPopupWasShown(true)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if (!promptAllowed) {
|
|
23
|
+
promptAllowed = true;
|
|
24
|
+
// StoreEvent({ eventName: 'canShowA2HSBanner', data: promptAllowed });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ListenA2HSPrompt();
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Returns boolean value to convey if A2HS can be prompted
|
|
34
|
+
*/
|
|
35
|
+
export function CanShowPrompt() {
|
|
36
|
+
return true;
|
|
37
|
+
// const dontShowAddAppNotification = GetCookie('dontShowAddAppNotification');
|
|
38
|
+
// if (dontShowAddAppNotification) {
|
|
39
|
+
// return false;
|
|
40
|
+
// }
|
|
41
|
+
// else {
|
|
42
|
+
// return promptAllowed;
|
|
43
|
+
// }
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/* displays native A2HS prompt & stores results */
|
|
49
|
+
export function TriggerNativePrompt() {
|
|
50
|
+
|
|
51
|
+
if (!deferredPrompt.prompt) {
|
|
52
|
+
|
|
53
|
+
message.info('Not installed well');
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
} else {
|
|
57
|
+
|
|
58
|
+
return deferredPrompt.prompt()
|
|
59
|
+
.then(function (evt) {
|
|
60
|
+
// Wait for the user to respond to the prompt
|
|
61
|
+
return deferredPrompt.userChoice;
|
|
62
|
+
|
|
63
|
+
})
|
|
64
|
+
.then(function (choiceResult) {
|
|
65
|
+
if (choiceResult.outcome === "accepted") {
|
|
66
|
+
promptAllowed = false;
|
|
67
|
+
// StoreEvent({ eventName: 'canShowA2HSBanner', data: promptAllowed });
|
|
68
|
+
// alert("User accepted the A2HS prompt, Please pass this info to GA");
|
|
69
|
+
// @todo can take some action based on user choice
|
|
70
|
+
// track how many users added PWA to home screen
|
|
71
|
+
// GAService.trackNumberOfTimesUsersAddedPWAToHomeScreen(true)
|
|
72
|
+
} else {
|
|
73
|
+
// alert("User dismissed the A2HS prompt, Please pass this info to GA");
|
|
74
|
+
// @todo can take some action based on user choice
|
|
75
|
+
}
|
|
76
|
+
if (typeof window.ga == 'function') {
|
|
77
|
+
window.ga('send', 'event', 'A2H', choiceResult.outcome);
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
.catch(function (err) {
|
|
81
|
+
|
|
82
|
+
alert(err.message);
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
|
|
2
|
+
// import './injectScript.utils.css';
|
|
3
|
+
// import $ from 'jquery';
|
|
4
|
+
|
|
5
|
+
import { message } from "antd";
|
|
6
|
+
// import { Content } from "antd/lib/layout/layout";
|
|
7
|
+
|
|
8
|
+
// import SCRIPT_TYPE from './../../Constants/scriptType.constants';
|
|
9
|
+
|
|
10
|
+
// import { IsUndefined } from 'common-js-util';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Executes script in the context of data
|
|
14
|
+
* @param {object} {data
|
|
15
|
+
* @param {array} script}
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import * as Utils from './../utils'
|
|
19
|
+
|
|
20
|
+
// let baseModels = require('./../models/')
|
|
21
|
+
|
|
22
|
+
let models = {
|
|
23
|
+
// ...baseModels,
|
|
24
|
+
// ...CustomModels
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* In case we have multiple scripts to be executed
|
|
30
|
+
* we prepare and create the function to execute it
|
|
31
|
+
*
|
|
32
|
+
* @param {*} values
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
export async function prepareAndExecuteScript({
|
|
36
|
+
field,
|
|
37
|
+
values,
|
|
38
|
+
response,
|
|
39
|
+
script,
|
|
40
|
+
formUtils
|
|
41
|
+
}) {
|
|
42
|
+
|
|
43
|
+
var scripts = [];
|
|
44
|
+
|
|
45
|
+
if (script) {
|
|
46
|
+
scripts.push(script);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (script) {
|
|
50
|
+
|
|
51
|
+
return await ExecuteScript({
|
|
52
|
+
formContent: values,
|
|
53
|
+
scripts,
|
|
54
|
+
context: {
|
|
55
|
+
...models,
|
|
56
|
+
...Utils,
|
|
57
|
+
|
|
58
|
+
// Form Utils is to be used to control the active form
|
|
59
|
+
formUtils,
|
|
60
|
+
},
|
|
61
|
+
contextName: 'models',
|
|
62
|
+
executionType: '',
|
|
63
|
+
response
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
} else {
|
|
67
|
+
|
|
68
|
+
return new Promise(function (resolve, reject) {
|
|
69
|
+
resolve('start of new Promise');
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
export function ExecuteScript({
|
|
76
|
+
formContent,
|
|
77
|
+
scripts,
|
|
78
|
+
context,
|
|
79
|
+
contextName = 'form',
|
|
80
|
+
executionType = '',
|
|
81
|
+
response,
|
|
82
|
+
|
|
83
|
+
}) {
|
|
84
|
+
|
|
85
|
+
if (!Array.isArray(scripts) || !scripts.length) {
|
|
86
|
+
return formContent;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let script = '';
|
|
90
|
+
|
|
91
|
+
for (let i in scripts) {
|
|
92
|
+
script = `${script}
|
|
93
|
+
${PrefixScript(scripts[i], executionType)}`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// methods({ formContent, context, contextName, script, scripts });
|
|
97
|
+
// methods.bind({ a: 'test' })({ formContent, context, contextName, script, scripts, executionType });
|
|
98
|
+
// return methods.bind({ a: 'test' })({ formContent, context, contextName, script, scripts, executionType });
|
|
99
|
+
|
|
100
|
+
// # Note
|
|
101
|
+
/**
|
|
102
|
+
* Using any number of variables as argument , Should use Function to have promises
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
let fn = script
|
|
106
|
+
|
|
107
|
+
let self = { formContent, context, contextName, script, scripts, executionType }
|
|
108
|
+
|
|
109
|
+
let func = new Function('formContent', 'models', 'response', `${fn}`);
|
|
110
|
+
|
|
111
|
+
return func(formContent, context, response);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// @TODO change formContent name later as it was built for form execution but later being used in many place
|
|
115
|
+
function methods({ formContent, context, contextName, script, scripts, executionType }) {
|
|
116
|
+
|
|
117
|
+
// function methods({ formContent, FormUtils: form }) {
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
|
|
121
|
+
window[contextName] = context; // as value of 'this' is getting undefined, using window
|
|
122
|
+
|
|
123
|
+
// if (SCRIPT_TYPE.ON_SUBMIT != executionType) {
|
|
124
|
+
// window[contextName].setForm(formContent);
|
|
125
|
+
//
|
|
126
|
+
// }
|
|
127
|
+
|
|
128
|
+
return eval(script);
|
|
129
|
+
|
|
130
|
+
// formContent = window[contextName].getForm(true);
|
|
131
|
+
// window[contextName].updateForm();
|
|
132
|
+
// delete window[contextName];
|
|
133
|
+
|
|
134
|
+
RemoveError(scripts);
|
|
135
|
+
|
|
136
|
+
} catch (err) {
|
|
137
|
+
|
|
138
|
+
message.error(err.message);
|
|
139
|
+
|
|
140
|
+
// InjectError(scripts, err);
|
|
141
|
+
console.log("%c🍺 Not valid Script", "color: #49ba8e; font-size:20px;");
|
|
142
|
+
console.log("%cError =======> ", "color: '#49ba8e'; font-size:14px;");
|
|
143
|
+
console.error(err);
|
|
144
|
+
console.log("%cScript ======> ", "color: blue; font-size:14px;");
|
|
145
|
+
console.log(scripts);
|
|
146
|
+
// console.log(scripts[i].name + ' - ' + err);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* appends error message if found any error while executing scripts
|
|
152
|
+
* @param {object} script
|
|
153
|
+
* @param {string} message - text message to be displayed
|
|
154
|
+
*/
|
|
155
|
+
export function InjectError(script, message) {
|
|
156
|
+
var pageContent = document.getElementsByClassName('right-section'); // main page element
|
|
157
|
+
var errorElemenet = document.createElement("div"); // new error element to be injected at top
|
|
158
|
+
errorElemenet.classList.add("alert");
|
|
159
|
+
errorElemenet.classList.add("alert-danger");
|
|
160
|
+
errorElemenet.setAttribute("id", "script-" + script.id);
|
|
161
|
+
errorElemenet.innerHTML = "<strong> " + script.name + " - " + message + " </strong>";
|
|
162
|
+
|
|
163
|
+
var crossSymbol = document.createElement("a");
|
|
164
|
+
crossSymbol.classList.add("close");
|
|
165
|
+
crossSymbol.innerHTML = "×";
|
|
166
|
+
errorElemenet.appendChild(crossSymbol);
|
|
167
|
+
|
|
168
|
+
pageContent.insertBefore(errorElemenet, pageContent.firstChild);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* appends error message if found any error while executing scripts
|
|
173
|
+
* @param {object} script
|
|
174
|
+
* @param {string} message - text message to be displayed
|
|
175
|
+
*/
|
|
176
|
+
export function InjectMessage(message, type, time = 4000) {
|
|
177
|
+
var pageContent = document.getElementById('parent-admin-element'); // main page element
|
|
178
|
+
var errorElemenet = document.createElement("div"); // new error element to be injected at top
|
|
179
|
+
errorElemenet.classList.add("alert");
|
|
180
|
+
if (type === "success") {
|
|
181
|
+
errorElemenet.classList.add("alert-success");
|
|
182
|
+
}
|
|
183
|
+
if (type === "error") {
|
|
184
|
+
errorElemenet.classList.add("alert-danger");
|
|
185
|
+
}
|
|
186
|
+
if (type === "info") {
|
|
187
|
+
errorElemenet.classList.add("alert-info");
|
|
188
|
+
}
|
|
189
|
+
if (type === "warning") {
|
|
190
|
+
errorElemenet.classList.add("alert-warning");
|
|
191
|
+
}
|
|
192
|
+
errorElemenet.innerHTML = "<strong>" + message + " </strong>";
|
|
193
|
+
|
|
194
|
+
window.setTimeout(function () {
|
|
195
|
+
// $(".alert").fadeTo(500, 0).slideUp(500, function () {
|
|
196
|
+
// $(this).remove();
|
|
197
|
+
// });
|
|
198
|
+
}, time);
|
|
199
|
+
|
|
200
|
+
pageContent.insertBefore(errorElemenet, pageContent.firstChild);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* removes error message element
|
|
205
|
+
* @param {} script
|
|
206
|
+
*/
|
|
207
|
+
export function RemoveError(script) {
|
|
208
|
+
|
|
209
|
+
var pageContent = document.getElementById('parent-admin-element');
|
|
210
|
+
|
|
211
|
+
var errorElemenet = document.getElementById("script-" + script.id);
|
|
212
|
+
|
|
213
|
+
if (errorElemenet) {
|
|
214
|
+
pageContent.removeChild(errorElemenet);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
// Prepare script for execution according to script type
|
|
220
|
+
export function PrefixScript(definition, executionType) {
|
|
221
|
+
// if (definition.activity_type_id == SCRIPT_TYPE.ON_CHANGE) {
|
|
222
|
+
// return `form.onChange({ column: '${definition.column}', callback: (value, column, event)=> { ${definition.script}} })`;
|
|
223
|
+
// }
|
|
224
|
+
// if (IsUndefined(executionType) || executionType == definition.activity_type_id) {
|
|
225
|
+
// return definition.script;
|
|
226
|
+
// }
|
|
227
|
+
|
|
228
|
+
return definition;
|
|
229
|
+
|
|
230
|
+
// return '';
|
|
231
|
+
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
|
|
2
|
+
import React, { Component } from 'react';
|
|
3
|
+
|
|
4
|
+
// import { ModalManager } from 'drivezy-web-utils/build/Utils';
|
|
5
|
+
|
|
6
|
+
// import ConfigureSettings from './../Components/Configure-Settings/configureSettings.component';
|
|
7
|
+
|
|
8
|
+
export default class SettingsUtil {
|
|
9
|
+
|
|
10
|
+
_currentGlobalLoader = null;
|
|
11
|
+
|
|
12
|
+
menus = [];
|
|
13
|
+
|
|
14
|
+
searchConfig = [];
|
|
15
|
+
|
|
16
|
+
static registerModal(ref) {
|
|
17
|
+
|
|
18
|
+
this._currentGlobalLoader = ref;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static openSpotlightModal() {
|
|
22
|
+
if (this._currentGlobalLoader && this._currentGlobalLoader.openSpotlightModal) {
|
|
23
|
+
this._currentGlobalLoader.openSpotlightModal();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static configureModal() {
|
|
28
|
+
// ModalManager.openModal({
|
|
29
|
+
// headerText: "Settings",
|
|
30
|
+
// modalBody: () => (<ConfigureSettings />),
|
|
31
|
+
// })
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @param {*} menus
|
|
37
|
+
*/
|
|
38
|
+
static registerMenus(menus) {
|
|
39
|
+
|
|
40
|
+
this.menus = menus;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param {*} config
|
|
46
|
+
*/
|
|
47
|
+
static setConfig(config) {
|
|
48
|
+
|
|
49
|
+
this.searchConfig = config;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @param {*} config
|
|
55
|
+
*/
|
|
56
|
+
static getConfig() {
|
|
57
|
+
|
|
58
|
+
return config;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
static getMenus() {
|
|
67
|
+
return this.menus;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// /**
|
|
2
|
+
// * Upload file implementation
|
|
3
|
+
// * All upload calls are made through this method
|
|
4
|
+
// * @param {object} obj - contains url, params(optional){proccessed and attached to url},
|
|
5
|
+
// * headers(optional)
|
|
6
|
+
// */
|
|
7
|
+
export async function UploadUtils(url, data) {
|
|
8
|
+
|
|
9
|
+
return fetch(process.env.REACT_APP_endpoint + url, { // Your POST endpoint
|
|
10
|
+
method: 'POST',
|
|
11
|
+
headers: {
|
|
12
|
+
// 'App-Type': 313,
|
|
13
|
+
// 'App-Version': '1.0.1',
|
|
14
|
+
Authorization: 'Bearer ' + localStorage.access_token,
|
|
15
|
+
// type:'multipart/formData'
|
|
16
|
+
},
|
|
17
|
+
// credentials: 'include',
|
|
18
|
+
body: data
|
|
19
|
+
}).then((result) => {
|
|
20
|
+
|
|
21
|
+
return result.json();
|
|
22
|
+
|
|
23
|
+
}, (error) => {
|
|
24
|
+
console.log(error);
|
|
25
|
+
return error;
|
|
26
|
+
}, (progress) => {
|
|
27
|
+
console.log(progress);
|
|
28
|
+
return progress;
|
|
29
|
+
})
|
|
30
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preference Model
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
import Base from '../base/base';
|
|
11
|
+
|
|
12
|
+
import { ApiUtils } from './../../lib/'
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Preference extends Base {
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
|
|
20
|
+
this.fields = [
|
|
21
|
+
{
|
|
22
|
+
field: 'name',
|
|
23
|
+
caption: 'Name'
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
// this.columns = ;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
get id() {
|
|
31
|
+
return 'preferences';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get getEndpoint() {
|
|
35
|
+
return 'core-user-preferences';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
get modelName() {
|
|
40
|
+
return `core-user-preferences`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default Preference;
|