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,51 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* JSON Input Component
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
import JSONInput from 'react-json-editor-ajrm';
|
|
11
|
+
|
|
12
|
+
import locale from 'react-json-editor-ajrm/locale/en';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// import './card.scss';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Use `Card` for Card you need to keep.
|
|
19
|
+
*/
|
|
20
|
+
export default function JSONInputComponent({
|
|
21
|
+
className,
|
|
22
|
+
onChange,
|
|
23
|
+
value = {}
|
|
24
|
+
}) {
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
const onCallback = (value, arg) => {
|
|
28
|
+
|
|
29
|
+
console.log(value, arg);
|
|
30
|
+
|
|
31
|
+
onChange(value.jsObject);
|
|
32
|
+
// onChange()
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
return <div className={`card card-shadow ${className}`}>
|
|
38
|
+
|
|
39
|
+
<JSONInput
|
|
40
|
+
waitAfterKeyPress={800}
|
|
41
|
+
onChange={onCallback}
|
|
42
|
+
id='a_unique_id'
|
|
43
|
+
placeholder={value}
|
|
44
|
+
// colors={darktheme}
|
|
45
|
+
locale={locale}
|
|
46
|
+
height='505px'
|
|
47
|
+
width='100%'
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
</div>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MenuDashBoard Component
|
|
3
|
+
*
|
|
4
|
+
* This component is responsible for rendering the menu dashboard.
|
|
5
|
+
* It fetches dashboard data based on user roles and displays them using `MenuDashboardCard` components.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { useState, useEffect, useContext } from 'react';
|
|
9
|
+
import { Skeleton, Row, Card } from 'antd';
|
|
10
|
+
import { GlobalContext } from '../../../Store';
|
|
11
|
+
import MenuDashboardCard from '../../../../modules/dashboard/components/dashboard-card/menu-dashboard-card';
|
|
12
|
+
import { Dashboard } from '../../../../models';
|
|
13
|
+
|
|
14
|
+
import './menu-dashboard.scss';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* MenuDashBoard Component
|
|
18
|
+
*
|
|
19
|
+
* Renders the dashboard menu based on the provided `dashBoardIds`.
|
|
20
|
+
* Fetches dashboard data and updates the UI accordingly.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} props - The component props
|
|
23
|
+
* @param {Array} props.dashBoardIds - List of dashboard IDs to fetch data for
|
|
24
|
+
* @param {Function} props.callback - Callback function for handling dashboard interactions
|
|
25
|
+
* @returns {JSX.Element} The rendered MenuDashBoard component
|
|
26
|
+
*/
|
|
27
|
+
export default function MenuDashBoardComponent({ dashBoardIds, scope, dbPtr, callback, record, homePage, activeId }) {
|
|
28
|
+
const { user = {} } = useContext(GlobalContext);
|
|
29
|
+
|
|
30
|
+
const [loading, setLoading] = useState(false);
|
|
31
|
+
const [visible, setVisible] = useState(true);
|
|
32
|
+
const [list, setList] = useState([]);
|
|
33
|
+
|
|
34
|
+
const [selectedCardId, setSelectedCardId] = useState(false);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* useEffect Hook
|
|
38
|
+
*
|
|
39
|
+
* Triggers the `getDashboard` function whenever the `user` object changes.
|
|
40
|
+
* Ensures dashboard data is fetched whenever a user logs in or changes.
|
|
41
|
+
*/
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (dashBoardIds) {
|
|
44
|
+
getDashboard(); //Patiant list get function
|
|
45
|
+
}
|
|
46
|
+
}, [user]);
|
|
47
|
+
|
|
48
|
+
// if active Id exist highlight that card
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (activeId) {
|
|
51
|
+
setSelectedCardId(activeId);
|
|
52
|
+
} else {
|
|
53
|
+
setSelectedCardId(false);
|
|
54
|
+
}
|
|
55
|
+
}, [activeId]);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* getDashboard Function
|
|
59
|
+
*
|
|
60
|
+
* Fetches the dashboard menu items based on `dashBoardIds`.
|
|
61
|
+
* Updates the `list` state with the fetched data.
|
|
62
|
+
*/
|
|
63
|
+
async function getDashboard() {
|
|
64
|
+
setLoading(true);
|
|
65
|
+
|
|
66
|
+
// Check if there are dashboard IDs to fetch data for
|
|
67
|
+
if (dashBoardIds.length > 0) {
|
|
68
|
+
if (!dbPtr) dbPtr = localStorage.db_ptr;
|
|
69
|
+
await Dashboard.loadMenuDashboards(dashBoardIds, dbPtr).then((response) => {
|
|
70
|
+
let apiResponse = {};
|
|
71
|
+
// @todo When the reporting tool is build , we have to consider all of these
|
|
72
|
+
if (response.result && response.result.length) {
|
|
73
|
+
apiResponse = response.result;
|
|
74
|
+
} else if (response && response.length) {
|
|
75
|
+
apiResponse = response;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Group by groupPtr inside other_details
|
|
79
|
+
const groupedData = {};
|
|
80
|
+
|
|
81
|
+
apiResponse.forEach((item) => {
|
|
82
|
+
try {
|
|
83
|
+
const otherDetails = item.other_details ? JSON.parse(item.other_details) : {};
|
|
84
|
+
|
|
85
|
+
const groupPtr = otherDetails.groupPtr;
|
|
86
|
+
const dashboardItem = {
|
|
87
|
+
...item, // Spread other properties of the item
|
|
88
|
+
};
|
|
89
|
+
const groupCaption = otherDetails.groupcaption || ''; // default empty string if not available
|
|
90
|
+
if (groupPtr) {
|
|
91
|
+
if (!groupedData[groupPtr]) {
|
|
92
|
+
groupedData[groupPtr] = {
|
|
93
|
+
groupPtr,
|
|
94
|
+
groupCaption,
|
|
95
|
+
otherDetails,
|
|
96
|
+
// colorCode,
|
|
97
|
+
dashboards: [],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Optional: update groupCaption if it exists newly (in case not present earlier)
|
|
102
|
+
if (groupCaption) {
|
|
103
|
+
groupedData[groupPtr].groupCaption = groupCaption;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Create a new dashboard item that includes style and colorCode
|
|
107
|
+
|
|
108
|
+
// Push the new dashboard item into the dashboards array
|
|
109
|
+
groupedData[groupPtr].dashboards.push(dashboardItem);
|
|
110
|
+
} else {
|
|
111
|
+
//Define a default key for dashboards that don't belong to any group
|
|
112
|
+
const defaultKey = 'noGroup';
|
|
113
|
+
//// Check if the "noGroup" entry does not exist in groupedData
|
|
114
|
+
if (!groupedData[defaultKey]) {
|
|
115
|
+
// If it doesn’t exist, initialize it with default structure
|
|
116
|
+
groupedData[defaultKey] = {
|
|
117
|
+
groupPtr: null, // or ''
|
|
118
|
+
groupCaption: '',
|
|
119
|
+
otherDetails: {},
|
|
120
|
+
dashboards: [],
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
groupedData[defaultKey].dashboards.push(dashboardItem);
|
|
125
|
+
}
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error('Error parsing other_details:', error);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// Convert groupedData to array format
|
|
132
|
+
const groupedArray = Object.values(groupedData);
|
|
133
|
+
|
|
134
|
+
setList(groupedArray);
|
|
135
|
+
|
|
136
|
+
setLoading(false);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
setLoading(false);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function onValueChange() {
|
|
144
|
+
setVisible(false);
|
|
145
|
+
}
|
|
146
|
+
// access the style configuration for ".menu-dashboard"
|
|
147
|
+
const dashboardStyle = list[0]?.otherDetails?.style?.['.menu-dashboard'];
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<>
|
|
151
|
+
{loading ? (
|
|
152
|
+
<Skeleton />
|
|
153
|
+
) : visible ? (
|
|
154
|
+
homePage ? (
|
|
155
|
+
<div
|
|
156
|
+
className="dashboard-section"
|
|
157
|
+
style={{
|
|
158
|
+
...dashboardStyle?.['.dashboard-section'],
|
|
159
|
+
marginTop: window.innerWidth < 600 ? 10 : -15,
|
|
160
|
+
}}
|
|
161
|
+
>
|
|
162
|
+
{list.map((group) => (
|
|
163
|
+
<Card key={group.groupPtr} bordered={group.groupCaption}>
|
|
164
|
+
<h3 style={dashboardStyle?.['.group-catption']}>{group.groupCaption}</h3>
|
|
165
|
+
|
|
166
|
+
<Row gutter={20}>
|
|
167
|
+
{group.dashboards
|
|
168
|
+
.sort((a, b) => a.slno - b.slno)
|
|
169
|
+
.map((entry, key) => (
|
|
170
|
+
<MenuDashboardCard
|
|
171
|
+
scope={scope}
|
|
172
|
+
dbPtr={dbPtr}
|
|
173
|
+
key={key}
|
|
174
|
+
record={entry}
|
|
175
|
+
callback={callback}
|
|
176
|
+
selectedCardId={selectedCardId}
|
|
177
|
+
onSelect={() => setSelectedCardId(entry.id)}
|
|
178
|
+
homePage={true}
|
|
179
|
+
/>
|
|
180
|
+
))}
|
|
181
|
+
</Row>
|
|
182
|
+
</Card>
|
|
183
|
+
))}
|
|
184
|
+
</div>
|
|
185
|
+
) : (
|
|
186
|
+
<div className="dashboard-section" style={dashboardStyle?.['.dashboard-section']}>
|
|
187
|
+
{list.map((group) => (
|
|
188
|
+
<Card key={group.groupPtr} bordered={false}>
|
|
189
|
+
<h4>{group.groupCaption}</h4>
|
|
190
|
+
|
|
191
|
+
<Row gutter={10} style={{gap:"6px"}}>
|
|
192
|
+
{group.dashboards
|
|
193
|
+
.sort((a, b) => a.slno - b.slno)
|
|
194
|
+
.map((entry, key) => (
|
|
195
|
+
<MenuDashboardCard
|
|
196
|
+
key={key}
|
|
197
|
+
scope={scope}
|
|
198
|
+
dbPtr={dbPtr}
|
|
199
|
+
record={entry}
|
|
200
|
+
callback={callback}
|
|
201
|
+
selectedCardId={selectedCardId}
|
|
202
|
+
onSelect={() => setSelectedCardId(entry.id)}
|
|
203
|
+
homePage={false}
|
|
204
|
+
/>
|
|
205
|
+
))}
|
|
206
|
+
</Row>
|
|
207
|
+
</Card>
|
|
208
|
+
))}
|
|
209
|
+
</div>
|
|
210
|
+
)
|
|
211
|
+
) : (
|
|
212
|
+
<>No result</>
|
|
213
|
+
)}
|
|
214
|
+
</>
|
|
215
|
+
);
|
|
216
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.dashboard-section {
|
|
2
|
+
margin-bottom: 10px;
|
|
3
|
+
gap: 10px;
|
|
4
|
+
padding: 5px;
|
|
5
|
+
@media only screen and (max-width: 768px) {
|
|
6
|
+
.ant-row {
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
overflow: scroll;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ant-card {
|
|
13
|
+
background: transparent !important;
|
|
14
|
+
box-shadow: none !important;
|
|
15
|
+
border: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ant-card-body {
|
|
19
|
+
background: transparent !important;
|
|
20
|
+
margin-top: 0px !important;
|
|
21
|
+
padding-top: 0px !important;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// .ant-card-body{
|
|
26
|
+
// margin-left: 10px;
|
|
27
|
+
// margin-right: 10px;
|
|
28
|
+
// }
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Sameena Ammed
|
|
3
|
+
* This component is used as the custom modal
|
|
4
|
+
* antd Modal is imported here
|
|
5
|
+
*/
|
|
6
|
+
import React, { useState } from "react";
|
|
7
|
+
import { Modal as AntdModal, Button } from "antd";
|
|
8
|
+
import PropTypes from "prop-types";
|
|
9
|
+
// import 'antd/dist/antd.css';
|
|
10
|
+
|
|
11
|
+
export default function Modal({
|
|
12
|
+
children,
|
|
13
|
+
onOk = () => {},
|
|
14
|
+
onCancel = () => {},
|
|
15
|
+
destroyOnClose = false,
|
|
16
|
+
width = "50%",
|
|
17
|
+
}) {
|
|
18
|
+
const [visible, setVisible] = useState(false);
|
|
19
|
+
|
|
20
|
+
const showModal = () => {
|
|
21
|
+
setVisible(true);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const handleOk = () => {
|
|
25
|
+
setVisible(false);
|
|
26
|
+
onOk();
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const handleCancel = () => {
|
|
30
|
+
setVisible(false);
|
|
31
|
+
onCancel();
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<Button onClick={showModal}>Open Modal</Button>
|
|
37
|
+
<AntdModal
|
|
38
|
+
visible={visible}
|
|
39
|
+
onOk={handleOk}
|
|
40
|
+
onCancel={handleCancel}
|
|
41
|
+
destroyOnClose={destroyOnClose}
|
|
42
|
+
width={width}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</AntdModal>
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
Modal.propTypes = {
|
|
52
|
+
/** A boolean value indicating whether the modal is visible or hidden. */
|
|
53
|
+
visible: PropTypes.bool.isRequired,
|
|
54
|
+
/** The content of the modal, typically a set of components. */
|
|
55
|
+
children: PropTypes.node.isRequired,
|
|
56
|
+
/** A function to be called when the user clicks the "Ok" button. If not provided, a default empty function is used. */
|
|
57
|
+
onOk: PropTypes.func,
|
|
58
|
+
/** A function to be called when the user clicks the "Cancel" button. If not provided, a default empty function is used. */
|
|
59
|
+
onCancel: PropTypes.func,
|
|
60
|
+
/** A boolean value indicating whether the modal should be destroyed when closed. If set to true, the modal will be removed from the DOM when closed. Default value is false. */
|
|
61
|
+
destroyOnClose: PropTypes.bool,
|
|
62
|
+
/** A string value representing the width of the modal. Default value is "50%". */
|
|
63
|
+
width: PropTypes.string,
|
|
64
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
## Usage
|
|
2
|
+
|
|
3
|
+
Modals can be used for displaying forms, images, videos, or any other type of content that requires user interaction. As like every component, you can use Modal by importing the Modal component into your React application.
|
|
4
|
+
|
|
5
|
+
```jsx
|
|
6
|
+
import Modal from "./modal";
|
|
7
|
+
|
|
8
|
+
<Modal
|
|
9
|
+
visible={true}
|
|
10
|
+
onOk={() => console.log('OK clicked')}
|
|
11
|
+
onCancel={() => console.log('Cancel clicked')}
|
|
12
|
+
destroyOnClose={true}
|
|
13
|
+
width="40%"
|
|
14
|
+
>
|
|
15
|
+
<p>Modal content goes here</p>
|
|
16
|
+
</Modal>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
import React from "react";
|
|
21
|
+
import { Modal as AntdModal } from "antd";
|
|
22
|
+
|
|
23
|
+
export default function Modal({
|
|
24
|
+
children,
|
|
25
|
+
onOk = () => {},
|
|
26
|
+
onCancel = () => {},
|
|
27
|
+
destroyOnClose = false,
|
|
28
|
+
width = "50%",
|
|
29
|
+
}) {
|
|
30
|
+
const [visible, setVisible] = useState(false);
|
|
31
|
+
|
|
32
|
+
const showModal = () => {
|
|
33
|
+
setVisible(true);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const handleOk = () => {
|
|
37
|
+
setVisible(false);
|
|
38
|
+
onOk();
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const handleCancel = () => {
|
|
42
|
+
setVisible(false);
|
|
43
|
+
onCancel();
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<>
|
|
48
|
+
<Button onClick={showModal}>Open Modal</Button>
|
|
49
|
+
<AntdModal
|
|
50
|
+
visible={visible}
|
|
51
|
+
onOk={handleOk}
|
|
52
|
+
onCancel={handleCancel}
|
|
53
|
+
destroyOnClose={destroyOnClose}
|
|
54
|
+
width={width}
|
|
55
|
+
>
|
|
56
|
+
{children}
|
|
57
|
+
</AntdModal>
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Component for antd pop confirm
|
|
4
|
+
*/
|
|
5
|
+
import { Popconfirm as AntdPopconfirm } from "antd";
|
|
6
|
+
export default function Popconfirm({ title, onConfirm, onCancel, okText, cancelText, children }) {
|
|
7
|
+
return (
|
|
8
|
+
<AntdPopconfirm
|
|
9
|
+
title={title}
|
|
10
|
+
onConfirm={onConfirm}
|
|
11
|
+
onCancel={onCancel}
|
|
12
|
+
okText={okText}
|
|
13
|
+
cancelText={cancelText}>
|
|
14
|
+
{children}
|
|
15
|
+
|
|
16
|
+
</AntdPopconfirm>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Component for antd pop over
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Popover as AntdPopover } from "antd";
|
|
7
|
+
export default function Popover({content,title,children}){
|
|
8
|
+
return (
|
|
9
|
+
<AntdPopover content={content} title={title}>
|
|
10
|
+
{children}
|
|
11
|
+
</AntdPopover>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Sameena
|
|
3
|
+
* Component for antd Radio
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React from "react";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import { Radio } from 'antd';
|
|
10
|
+
import Group from 'antd/lib/radio/group';
|
|
11
|
+
import Button from 'antd/lib/radio/radioButton';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const AntdRadio=Object.assign(Radio,{
|
|
15
|
+
Group,
|
|
16
|
+
Button
|
|
17
|
+
})
|
|
18
|
+
export default AntdRadio;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { DatePicker } from 'antd';
|
|
2
|
+
import moment from 'moment-timezone';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './rangepicker.scss';
|
|
5
|
+
|
|
6
|
+
const { RangePicker } = DatePicker;
|
|
7
|
+
|
|
8
|
+
export default function RangePickerComponent({ onChange, value, ranges }) {
|
|
9
|
+
// value is still: [moment, moment]
|
|
10
|
+
const startDate = value[0];
|
|
11
|
+
const endDate = value[1];
|
|
12
|
+
|
|
13
|
+
function handleChange(dates) {
|
|
14
|
+
if (!dates) {
|
|
15
|
+
onChange(null);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Convert dayjs → moment so your external code does NOT break
|
|
20
|
+
const converted = [moment(dates[0].toDate()), moment(dates[1].toDate())];
|
|
21
|
+
|
|
22
|
+
onChange(converted);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Convert your old "ranges" object into AntD presets array
|
|
26
|
+
const presets = Object.entries(ranges).map(([label, range]) => ({
|
|
27
|
+
label,
|
|
28
|
+
value: range,
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className="rangepicker">
|
|
33
|
+
<RangePicker
|
|
34
|
+
allowClear={false}
|
|
35
|
+
inputReadOnly
|
|
36
|
+
format="DD/MM/YYYY"
|
|
37
|
+
// moment → allowed
|
|
38
|
+
value={[startDate, endDate]}
|
|
39
|
+
onChange={handleChange}
|
|
40
|
+
presets={presets}
|
|
41
|
+
ranges={ranges}
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
RangePickerComponent.propTypes = {
|
|
48
|
+
onChange: PropTypes.func.isRequired,
|
|
49
|
+
value: PropTypes.arrayOf(PropTypes.instanceOf(moment)).isRequired,
|
|
50
|
+
ranges: PropTypes.object,
|
|
51
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.rangepicker {
|
|
2
|
+
.ant-picker {
|
|
3
|
+
max-height: 30px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.rangepicker .ant-picker {
|
|
7
|
+
border: none !important;
|
|
8
|
+
box-shadow: none !important;
|
|
9
|
+
width: 100% !important;
|
|
10
|
+
// min-width: auto !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rangepicker .ant-picker:hover,
|
|
14
|
+
.rangepicker .ant-picker-focused {
|
|
15
|
+
border: none !important;
|
|
16
|
+
box-shadow: none !important;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
## Usage
|
|
2
|
+
|
|
3
|
+
To use the Ant Design Date Picker component in your React application, you'll need to import the DatePicker or RangePicker component from the antd package.
|
|
4
|
+
|
|
5
|
+
Here's an example of how to use the RangePicker component:
|
|
6
|
+
|
|
7
|
+
```jsx
|
|
8
|
+
import RangePicker from "./rangepicker";
|
|
9
|
+
import moment from "moment-timezone";
|
|
10
|
+
|
|
11
|
+
<RangePicker
|
|
12
|
+
onChange={(value) => console.log(value)} // handle onChange event
|
|
13
|
+
value={[moment().subtract(1, "week"), moment()]} // set initial value
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
import React, { useState, useContext } from "react";
|
|
20
|
+
import DateRangePicker from "react-bootstrap-daterangepicker";
|
|
21
|
+
import moment from "moment-timezone";
|
|
22
|
+
import "./rangepicker.scss";
|
|
23
|
+
|
|
24
|
+
export default function RangePicker({ onChange, value }) {
|
|
25
|
+
// const [value, setValue] = useState(initialValue);
|
|
26
|
+
|
|
27
|
+
// console.log(value);
|
|
28
|
+
|
|
29
|
+
// console.log();
|
|
30
|
+
|
|
31
|
+
let startDate = value[0].format("DD/MM/YYYY");
|
|
32
|
+
|
|
33
|
+
let endDate = value[1].format("DD/MM/YYYY");
|
|
34
|
+
|
|
35
|
+
// console.log(startDate, endDate);
|
|
36
|
+
|
|
37
|
+
function onCallback(event, picker) {
|
|
38
|
+
onChange([picker.startDate, picker.endDate]);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<>
|
|
43
|
+
<div className="rangepicker">
|
|
44
|
+
<DateRangePicker
|
|
45
|
+
initialSettings={{
|
|
46
|
+
startDate,
|
|
47
|
+
endDate,
|
|
48
|
+
locale: {
|
|
49
|
+
format: "DD/MM/YYYY",
|
|
50
|
+
},
|
|
51
|
+
}}
|
|
52
|
+
onApply={onCallback}
|
|
53
|
+
range={{
|
|
54
|
+
Today: [moment(), moment()],
|
|
55
|
+
|
|
56
|
+
Yesterday: [
|
|
57
|
+
moment().subtract(1, "days").startOf("day"),
|
|
58
|
+
moment().subtract(1, "days").endOf("day"),
|
|
59
|
+
],
|
|
60
|
+
|
|
61
|
+
"This Week": [moment().startOf("week"), moment().endOf("week")],
|
|
62
|
+
|
|
63
|
+
"Last Week": [
|
|
64
|
+
moment().subtract(1, "week").startOf("week"),
|
|
65
|
+
moment().subtract(1, "week").endOf("week"),
|
|
66
|
+
],
|
|
67
|
+
|
|
68
|
+
"This Month": [moment().startOf("month"), moment().endOf("month")],
|
|
69
|
+
|
|
70
|
+
"Last Month": [
|
|
71
|
+
moment().subtract(1, "month").startOf("month"),
|
|
72
|
+
moment().subtract(1, "month").endOf("month"),
|
|
73
|
+
],
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
<input />
|
|
77
|
+
</DateRangePicker>
|
|
78
|
+
</div>
|
|
79
|
+
</>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## Usage
|
|
2
|
+
|
|
3
|
+
To use the Select component, you will need to import it from the react-select library:
|
|
4
|
+
|
|
5
|
+
```jsx
|
|
6
|
+
import React, { useState } from 'react';
|
|
7
|
+
import ReferenceSelect from './reference-select';
|
|
8
|
+
|
|
9
|
+
<ReferenceSelect
|
|
10
|
+
options={[
|
|
11
|
+
{ value: 'ref1', label: 'Reference 1' },
|
|
12
|
+
{ value: 'ref2', label: 'Reference 2' },
|
|
13
|
+
{ value: 'ref3', label: 'Reference 3' },
|
|
14
|
+
]}
|
|
15
|
+
value="ref1"
|
|
16
|
+
onSelect={selectedOption => console.log(selectedOption)}
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
```
|