acomm-core-lib 2.6.2
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/README.md +75 -0
- package/dist/package.json +125 -0
- package/dist/src/app.controller.d.ts +8 -0
- package/dist/src/app.controller.js +69 -0
- package/dist/src/app.controller.js.map +1 -0
- package/dist/src/app.module.d.ts +2 -0
- package/dist/src/app.module.js +151 -0
- package/dist/src/app.module.js.map +1 -0
- package/dist/src/app.service.d.ts +5 -0
- package/dist/src/app.service.js +30 -0
- package/dist/src/app.service.js.map +1 -0
- package/dist/src/app_cluster.service.d.ts +3 -0
- package/dist/src/app_cluster.service.js +64 -0
- package/dist/src/app_cluster.service.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.enum.d.ts +31 -0
- package/dist/src/core/activity_log/activity_log.enum.js +38 -0
- package/dist/src/core/activity_log/activity_log.enum.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.layout.d.ts +2 -0
- package/dist/src/core/activity_log/activity_log.layout.js +331 -0
- package/dist/src/core/activity_log/activity_log.layout.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.module.d.ts +2 -0
- package/dist/src/core/activity_log/activity_log.module.js +39 -0
- package/dist/src/core/activity_log/activity_log.module.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.schema.d.ts +24 -0
- package/dist/src/core/activity_log/activity_log.schema.js +117 -0
- package/dist/src/core/activity_log/activity_log.schema.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.service.d.ts +14 -0
- package/dist/src/core/activity_log/activity_log.service.js +58 -0
- package/dist/src/core/activity_log/activity_log.service.js.map +1 -0
- package/dist/src/core/address/address.enum.d.ts +8 -0
- package/dist/src/core/address/address.enum.js +13 -0
- package/dist/src/core/address/address.enum.js.map +1 -0
- package/dist/src/core/address/address.layout.d.ts +7 -0
- package/dist/src/core/address/address.layout.js +1297 -0
- package/dist/src/core/address/address.layout.js.map +1 -0
- package/dist/src/core/address/address.module.d.ts +2 -0
- package/dist/src/core/address/address.module.js +87 -0
- package/dist/src/core/address/address.module.js.map +1 -0
- package/dist/src/core/address/address.schema.d.ts +69 -0
- package/dist/src/core/address/address.schema.js +267 -0
- package/dist/src/core/address/address.schema.js.map +1 -0
- package/dist/src/core/address/address.service.d.ts +49 -0
- package/dist/src/core/address/address.service.js +171 -0
- package/dist/src/core/address/address.service.js.map +1 -0
- package/dist/src/core/address/data/country.json +1484 -0
- package/dist/src/core/address/data/time_zone.json +1702 -0
- package/dist/src/core/api_key/api_key.constant.d.ts +29 -0
- package/dist/src/core/api_key/api_key.constant.js +34 -0
- package/dist/src/core/api_key/api_key.constant.js.map +1 -0
- package/dist/src/core/api_key/api_key.controller.d.ts +8 -0
- package/dist/src/core/api_key/api_key.controller.js +60 -0
- package/dist/src/core/api_key/api_key.controller.js.map +1 -0
- package/dist/src/core/api_key/api_key.enum.d.ts +5 -0
- package/dist/src/core/api_key/api_key.enum.js +10 -0
- package/dist/src/core/api_key/api_key.enum.js.map +1 -0
- package/dist/src/core/api_key/api_key.layout.d.ts +2 -0
- package/dist/src/core/api_key/api_key.layout.js +1133 -0
- package/dist/src/core/api_key/api_key.layout.js.map +1 -0
- package/dist/src/core/api_key/api_key.module.d.ts +2 -0
- package/dist/src/core/api_key/api_key.module.js +40 -0
- package/dist/src/core/api_key/api_key.module.js.map +1 -0
- package/dist/src/core/api_key/api_key.schema.d.ts +42 -0
- package/dist/src/core/api_key/api_key.schema.js +189 -0
- package/dist/src/core/api_key/api_key.schema.js.map +1 -0
- package/dist/src/core/api_key/api_key.service.d.ts +23 -0
- package/dist/src/core/api_key/api_key.service.js +278 -0
- package/dist/src/core/api_key/api_key.service.js.map +1 -0
- package/dist/src/core/attachment/attachment.config.d.ts +4 -0
- package/dist/src/core/attachment/attachment.config.js +8 -0
- package/dist/src/core/attachment/attachment.config.js.map +1 -0
- package/dist/src/core/attachment/attachment.controller.d.ts +15 -0
- package/dist/src/core/attachment/attachment.controller.js +141 -0
- package/dist/src/core/attachment/attachment.controller.js.map +1 -0
- package/dist/src/core/attachment/attachment.enum.d.ts +22 -0
- package/dist/src/core/attachment/attachment.enum.js +28 -0
- package/dist/src/core/attachment/attachment.enum.js.map +1 -0
- package/dist/src/core/attachment/attachment.layout.d.ts +2 -0
- package/dist/src/core/attachment/attachment.layout.js +100 -0
- package/dist/src/core/attachment/attachment.layout.js.map +1 -0
- package/dist/src/core/attachment/attachment.module.d.ts +2 -0
- package/dist/src/core/attachment/attachment.module.js +42 -0
- package/dist/src/core/attachment/attachment.module.js.map +1 -0
- package/dist/src/core/attachment/attachment.schema.d.ts +26 -0
- package/dist/src/core/attachment/attachment.schema.js +131 -0
- package/dist/src/core/attachment/attachment.schema.js.map +1 -0
- package/dist/src/core/attachment/attachment.service.d.ts +38 -0
- package/dist/src/core/attachment/attachment.service.js +417 -0
- package/dist/src/core/attachment/attachment.service.js.map +1 -0
- package/dist/src/core/attachment/providers/local.provider.d.ts +14 -0
- package/dist/src/core/attachment/providers/local.provider.js +71 -0
- package/dist/src/core/attachment/providers/local.provider.js.map +1 -0
- package/dist/src/core/attachment/providers/provider.base.d.ts +6 -0
- package/dist/src/core/attachment/providers/provider.base.js +16 -0
- package/dist/src/core/attachment/providers/provider.base.js.map +1 -0
- package/dist/src/core/attachment/providers/provider.interface.d.ts +5 -0
- package/dist/src/core/attachment/providers/provider.interface.js +3 -0
- package/dist/src/core/attachment/providers/provider.interface.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.enum.d.ts +48 -0
- package/dist/src/core/audit_log/audit_log.enum.js +54 -0
- package/dist/src/core/audit_log/audit_log.enum.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.layout.d.ts +2 -0
- package/dist/src/core/audit_log/audit_log.layout.js +372 -0
- package/dist/src/core/audit_log/audit_log.layout.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.module.d.ts +2 -0
- package/dist/src/core/audit_log/audit_log.module.js +39 -0
- package/dist/src/core/audit_log/audit_log.module.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.schema.d.ts +14 -0
- package/dist/src/core/audit_log/audit_log.schema.js +67 -0
- package/dist/src/core/audit_log/audit_log.schema.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.service.d.ts +14 -0
- package/dist/src/core/audit_log/audit_log.service.js +68 -0
- package/dist/src/core/audit_log/audit_log.service.js.map +1 -0
- package/dist/src/core/auth/auth.controller.d.ts +22 -0
- package/dist/src/core/auth/auth.controller.js +266 -0
- package/dist/src/core/auth/auth.controller.js.map +1 -0
- package/dist/src/core/auth/auth.module.d.ts +2 -0
- package/dist/src/core/auth/auth.module.js +37 -0
- package/dist/src/core/auth/auth.module.js.map +1 -0
- package/dist/src/core/auth/auth.service.d.ts +87 -0
- package/dist/src/core/auth/auth.service.js +930 -0
- package/dist/src/core/auth/auth.service.js.map +1 -0
- package/dist/src/core/auth/constants.d.ts +7 -0
- package/dist/src/core/auth/constants.js +9 -0
- package/dist/src/core/auth/constants.js.map +1 -0
- package/dist/src/core/auth/guards/basic.guard.d.ts +1 -0
- package/dist/src/core/auth/guards/basic.guard.js +7 -0
- package/dist/src/core/auth/guards/basic.guard.js.map +1 -0
- package/dist/src/core/auth/guards/jwt_auth.guard.d.ts +19 -0
- package/dist/src/core/auth/guards/jwt_auth.guard.js +526 -0
- package/dist/src/core/auth/guards/jwt_auth.guard.js.map +1 -0
- package/dist/src/core/auth/guards/public.guard.d.ts +1 -0
- package/dist/src/core/auth/guards/public.guard.js +7 -0
- package/dist/src/core/auth/guards/public.guard.js.map +1 -0
- package/dist/src/core/auth/providers/auth_local.provider.d.ts +13 -0
- package/dist/src/core/auth/providers/auth_local.provider.js +75 -0
- package/dist/src/core/auth/providers/auth_local.provider.js.map +1 -0
- package/dist/src/core/auth/providers/auth_otp.provider.d.ts +13 -0
- package/dist/src/core/auth/providers/auth_otp.provider.js +77 -0
- package/dist/src/core/auth/providers/auth_otp.provider.js.map +1 -0
- package/dist/src/core/auth/providers/auth_provider.interface.d.ts +12 -0
- package/dist/src/core/auth/providers/auth_provider.interface.js +3 -0
- package/dist/src/core/auth/providers/auth_provider.interface.js.map +1 -0
- package/dist/src/core/auth/providers/base_auth.provider.d.ts +7 -0
- package/dist/src/core/auth/providers/base_auth.provider.js +25 -0
- package/dist/src/core/auth/providers/base_auth.provider.js.map +1 -0
- package/dist/src/core/auth/strategies/jwt.strategy.d.ts +6 -0
- package/dist/src/core/auth/strategies/jwt.strategy.js +37 -0
- package/dist/src/core/auth/strategies/jwt.strategy.js.map +1 -0
- package/dist/src/core/cache/cache.controller.d.ts +13 -0
- package/dist/src/core/cache/cache.controller.js +67 -0
- package/dist/src/core/cache/cache.controller.js.map +1 -0
- package/dist/src/core/cache/cache.decorator.d.ts +1 -0
- package/dist/src/core/cache/cache.decorator.js +7 -0
- package/dist/src/core/cache/cache.decorator.js.map +1 -0
- package/dist/src/core/cache/cache.interceptor.d.ts +8 -0
- package/dist/src/core/cache/cache.interceptor.js +57 -0
- package/dist/src/core/cache/cache.interceptor.js.map +1 -0
- package/dist/src/core/cache/cache.module.d.ts +2 -0
- package/dist/src/core/cache/cache.module.js +29 -0
- package/dist/src/core/cache/cache.module.js.map +1 -0
- package/dist/src/core/cache/cache.service.d.ts +15 -0
- package/dist/src/core/cache/cache.service.js +60 -0
- package/dist/src/core/cache/cache.service.js.map +1 -0
- package/dist/src/core/cache/cache.utils.d.ts +12 -0
- package/dist/src/core/cache/cache.utils.js +116 -0
- package/dist/src/core/cache/cache.utils.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.controller.d.ts +8 -0
- package/dist/src/core/comment_data/comment_data.controller.js +56 -0
- package/dist/src/core/comment_data/comment_data.controller.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.layout.d.ts +2 -0
- package/dist/src/core/comment_data/comment_data.layout.js +274 -0
- package/dist/src/core/comment_data/comment_data.layout.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.module.d.ts +2 -0
- package/dist/src/core/comment_data/comment_data.module.js +40 -0
- package/dist/src/core/comment_data/comment_data.module.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.schema.d.ts +13 -0
- package/dist/src/core/comment_data/comment_data.schema.js +53 -0
- package/dist/src/core/comment_data/comment_data.schema.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.service.d.ts +15 -0
- package/dist/src/core/comment_data/comment_data.service.js +63 -0
- package/dist/src/core/comment_data/comment_data.service.js.map +1 -0
- package/dist/src/core/common/base/base.controller.d.ts +42 -0
- package/dist/src/core/common/base/base.controller.js +440 -0
- package/dist/src/core/common/base/base.controller.js.map +1 -0
- package/dist/src/core/common/base/base.schema.d.ts +12 -0
- package/dist/src/core/common/base/base.schema.js +61 -0
- package/dist/src/core/common/base/base.schema.js.map +1 -0
- package/dist/src/core/common/base/base.service.d.ts +87 -0
- package/dist/src/core/common/base/base.service.js +1218 -0
- package/dist/src/core/common/base/base.service.js.map +1 -0
- package/dist/src/core/common/base/base_external_data_source.provider.d.ts +18 -0
- package/dist/src/core/common/base/base_external_data_source.provider.js +50 -0
- package/dist/src/core/common/base/base_external_data_source.provider.js.map +1 -0
- package/dist/src/core/common/base/base_log.controller.d.ts +7 -0
- package/dist/src/core/common/base/base_log.controller.js +35 -0
- package/dist/src/core/common/base/base_log.controller.js.map +1 -0
- package/dist/src/core/common/base/base_log.service.d.ts +13 -0
- package/dist/src/core/common/base/base_log.service.js +142 -0
- package/dist/src/core/common/base/base_log.service.js.map +1 -0
- package/dist/src/core/common/base/base_module.controller.d.ts +9 -0
- package/dist/src/core/common/base/base_module.controller.js +63 -0
- package/dist/src/core/common/base/base_module.controller.js.map +1 -0
- package/dist/src/core/common/base/base_module.service.d.ts +20 -0
- package/dist/src/core/common/base/base_module.service.js +56 -0
- package/dist/src/core/common/base/base_module.service.js.map +1 -0
- package/dist/src/core/common/constants.d.ts +57 -0
- package/dist/src/core/common/constants.js +98 -0
- package/dist/src/core/common/constants.js.map +1 -0
- package/dist/src/core/common/decorator/safe_params.decorator.d.ts +1 -0
- package/dist/src/core/common/decorator/safe_params.decorator.js +11 -0
- package/dist/src/core/common/decorator/safe_params.decorator.js.map +1 -0
- package/dist/src/core/common/dto/search_query.dto.d.ts +6 -0
- package/dist/src/core/common/dto/search_query.dto.js +7 -0
- package/dist/src/core/common/dto/search_query.dto.js.map +1 -0
- package/dist/src/core/common/dto/search_result.dto.d.ts +7 -0
- package/dist/src/core/common/dto/search_result.dto.js +7 -0
- package/dist/src/core/common/dto/search_result.dto.js.map +1 -0
- package/dist/src/core/common/filter/all_exception.filter.d.ts +4 -0
- package/dist/src/core/common/filter/all_exception.filter.js +31 -0
- package/dist/src/core/common/filter/all_exception.filter.js.map +1 -0
- package/dist/src/core/common/function/andConditions.d.ts +12 -0
- package/dist/src/core/common/function/andConditions.js +17 -0
- package/dist/src/core/common/function/andConditions.js.map +1 -0
- package/dist/src/core/common/function/autoGenerateO2M.d.ts +14 -0
- package/dist/src/core/common/function/autoGenerateO2M.js +57 -0
- package/dist/src/core/common/function/autoGenerateO2M.js.map +1 -0
- package/dist/src/core/common/function/cleanData.d.ts +9 -0
- package/dist/src/core/common/function/cleanData.js +23 -0
- package/dist/src/core/common/function/cleanData.js.map +1 -0
- package/dist/src/core/common/function/convertArrayObjToField.d.ts +17 -0
- package/dist/src/core/common/function/convertArrayObjToField.js +23 -0
- package/dist/src/core/common/function/convertArrayObjToField.js.map +1 -0
- package/dist/src/core/common/function/convertArrayToO2M.d.ts +13 -0
- package/dist/src/core/common/function/convertArrayToO2M.js +23 -0
- package/dist/src/core/common/function/convertArrayToO2M.js.map +1 -0
- package/dist/src/core/common/function/convertArrayToOption.d.ts +12 -0
- package/dist/src/core/common/function/convertArrayToOption.js +34 -0
- package/dist/src/core/common/function/convertArrayToOption.js.map +1 -0
- package/dist/src/core/common/function/convertAttributeArray.d.ts +12 -0
- package/dist/src/core/common/function/convertAttributeArray.js +29 -0
- package/dist/src/core/common/function/convertAttributeArray.js.map +1 -0
- package/dist/src/core/common/function/convertDate.d.ts +17 -0
- package/dist/src/core/common/function/convertDate.js +39 -0
- package/dist/src/core/common/function/convertDate.js.map +1 -0
- package/dist/src/core/common/function/convertImage.d.ts +17 -0
- package/dist/src/core/common/function/convertImage.js +18 -0
- package/dist/src/core/common/function/convertImage.js.map +1 -0
- package/dist/src/core/common/function/convertJSONAttrToO2M.d.ts +14 -0
- package/dist/src/core/common/function/convertJSONAttrToO2M.js +79 -0
- package/dist/src/core/common/function/convertJSONAttrToO2M.js.map +1 -0
- package/dist/src/core/common/function/convertStringDate.d.ts +12 -0
- package/dist/src/core/common/function/convertStringDate.js +23 -0
- package/dist/src/core/common/function/convertStringDate.js.map +1 -0
- package/dist/src/core/common/function/convertTime.d.ts +12 -0
- package/dist/src/core/common/function/convertTime.js +41 -0
- package/dist/src/core/common/function/convertTime.js.map +1 -0
- package/dist/src/core/common/function/convertTimestampToDate.d.ts +13 -0
- package/dist/src/core/common/function/convertTimestampToDate.js +14 -0
- package/dist/src/core/common/function/convertTimestampToDate.js.map +1 -0
- package/dist/src/core/common/function/convertToJSONStructure.d.ts +12 -0
- package/dist/src/core/common/function/convertToJSONStructure.js +23 -0
- package/dist/src/core/common/function/convertToJSONStructure.js.map +1 -0
- package/dist/src/core/common/function/convertXMLArray.d.ts +12 -0
- package/dist/src/core/common/function/convertXMLArray.js +81 -0
- package/dist/src/core/common/function/convertXMLArray.js.map +1 -0
- package/dist/src/core/common/function/convertXMLObject.d.ts +12 -0
- package/dist/src/core/common/function/convertXMLObject.js +62 -0
- package/dist/src/core/common/function/convertXMLObject.js.map +1 -0
- package/dist/src/core/common/function/currency.d.ts +12 -0
- package/dist/src/core/common/function/currency.js +49 -0
- package/dist/src/core/common/function/currency.js.map +1 -0
- package/dist/src/core/common/function/currentDate.d.ts +12 -0
- package/dist/src/core/common/function/currentDate.js +34 -0
- package/dist/src/core/common/function/currentDate.js.map +1 -0
- package/dist/src/core/common/function/customSplit.d.ts +12 -0
- package/dist/src/core/common/function/customSplit.js +21 -0
- package/dist/src/core/common/function/customSplit.js.map +1 -0
- package/dist/src/core/common/function/dateIso.d.ts +13 -0
- package/dist/src/core/common/function/dateIso.js +19 -0
- package/dist/src/core/common/function/dateIso.js.map +1 -0
- package/dist/src/core/common/function/defaultType.json +23 -0
- package/dist/src/core/common/function/findData.d.ts +12 -0
- package/dist/src/core/common/function/findData.js +33 -0
- package/dist/src/core/common/function/findData.js.map +1 -0
- package/dist/src/core/common/function/findKeyValueArray.d.ts +12 -0
- package/dist/src/core/common/function/findKeyValueArray.js +29 -0
- package/dist/src/core/common/function/findKeyValueArray.js.map +1 -0
- package/dist/src/core/common/function/formatDate.d.ts +12 -0
- package/dist/src/core/common/function/formatDate.js +34 -0
- package/dist/src/core/common/function/formatDate.js.map +1 -0
- package/dist/src/core/common/function/freeStyle.d.ts +9 -0
- package/dist/src/core/common/function/freeStyle.js +13 -0
- package/dist/src/core/common/function/freeStyle.js.map +1 -0
- package/dist/src/core/common/function/generateBarcode.d.ts +17 -0
- package/dist/src/core/common/function/generateBarcode.js +34 -0
- package/dist/src/core/common/function/generateBarcode.js.map +1 -0
- package/dist/src/core/common/function/generateFilters.d.ts +12 -0
- package/dist/src/core/common/function/generateFilters.js +18 -0
- package/dist/src/core/common/function/generateFilters.js.map +1 -0
- package/dist/src/core/common/function/generateUUID.d.ts +9 -0
- package/dist/src/core/common/function/generateUUID.js +14 -0
- package/dist/src/core/common/function/generateUUID.js.map +1 -0
- package/dist/src/core/common/function/get.d.ts +17 -0
- package/dist/src/core/common/function/get.js +28 -0
- package/dist/src/core/common/function/get.js.map +1 -0
- package/dist/src/core/common/function/getCompany.d.ts +14 -0
- package/dist/src/core/common/function/getCompany.js +26 -0
- package/dist/src/core/common/function/getCompany.js.map +1 -0
- package/dist/src/core/common/function/getCurrentCollapseData.d.ts +13 -0
- package/dist/src/core/common/function/getCurrentCollapseData.js +22 -0
- package/dist/src/core/common/function/getCurrentCollapseData.js.map +1 -0
- package/dist/src/core/common/function/getCurrentDate.d.ts +12 -0
- package/dist/src/core/common/function/getCurrentDate.js +16 -0
- package/dist/src/core/common/function/getCurrentDate.js.map +1 -0
- package/dist/src/core/common/function/getCurrentFilters.d.ts +9 -0
- package/dist/src/core/common/function/getCurrentFilters.js +14 -0
- package/dist/src/core/common/function/getCurrentFilters.js.map +1 -0
- package/dist/src/core/common/function/getCurrentForm.d.ts +12 -0
- package/dist/src/core/common/function/getCurrentForm.js +18 -0
- package/dist/src/core/common/function/getCurrentForm.js.map +1 -0
- package/dist/src/core/common/function/getCurrentId.d.ts +9 -0
- package/dist/src/core/common/function/getCurrentId.js +14 -0
- package/dist/src/core/common/function/getCurrentId.js.map +1 -0
- package/dist/src/core/common/function/getCurrentIndexData.d.ts +12 -0
- package/dist/src/core/common/function/getCurrentIndexData.js +18 -0
- package/dist/src/core/common/function/getCurrentIndexData.js.map +1 -0
- package/dist/src/core/common/function/getDocument.d.ts +13 -0
- package/dist/src/core/common/function/getDocument.js +16 -0
- package/dist/src/core/common/function/getDocument.js.map +1 -0
- package/dist/src/core/common/function/getEndExportdate.d.ts +17 -0
- package/dist/src/core/common/function/getEndExportdate.js +32 -0
- package/dist/src/core/common/function/getEndExportdate.js.map +1 -0
- package/dist/src/core/common/function/getEntityId.d.ts +12 -0
- package/dist/src/core/common/function/getEntityId.js +15 -0
- package/dist/src/core/common/function/getEntityId.js.map +1 -0
- package/dist/src/core/common/function/getEntityRecord.d.ts +12 -0
- package/dist/src/core/common/function/getEntityRecord.js +42 -0
- package/dist/src/core/common/function/getEntityRecord.js.map +1 -0
- package/dist/src/core/common/function/getErrors.d.ts +12 -0
- package/dist/src/core/common/function/getErrors.js +17 -0
- package/dist/src/core/common/function/getErrors.js.map +1 -0
- package/dist/src/core/common/function/getGlobalSetting.d.ts +12 -0
- package/dist/src/core/common/function/getGlobalSetting.js +21 -0
- package/dist/src/core/common/function/getGlobalSetting.js.map +1 -0
- package/dist/src/core/common/function/getHeaders.d.ts +13 -0
- package/dist/src/core/common/function/getHeaders.js +28 -0
- package/dist/src/core/common/function/getHeaders.js.map +1 -0
- package/dist/src/core/common/function/getJSONData.d.ts +13 -0
- package/dist/src/core/common/function/getJSONData.js +17 -0
- package/dist/src/core/common/function/getJSONData.js.map +1 -0
- package/dist/src/core/common/function/getJSONKeys.d.ts +17 -0
- package/dist/src/core/common/function/getJSONKeys.js +24 -0
- package/dist/src/core/common/function/getJSONKeys.js.map +1 -0
- package/dist/src/core/common/function/getMimeType.d.ts +12 -0
- package/dist/src/core/common/function/getMimeType.js +20 -0
- package/dist/src/core/common/function/getMimeType.js.map +1 -0
- package/dist/src/core/common/function/getNameFromUrl.d.ts +12 -0
- package/dist/src/core/common/function/getNameFromUrl.js +19 -0
- package/dist/src/core/common/function/getNameFromUrl.js.map +1 -0
- package/dist/src/core/common/function/getObjectData.d.ts +12 -0
- package/dist/src/core/common/function/getObjectData.js +27 -0
- package/dist/src/core/common/function/getObjectData.js.map +1 -0
- package/dist/src/core/common/function/getOptionFromApi.d.ts +17 -0
- package/dist/src/core/common/function/getOptionFromApi.js +24 -0
- package/dist/src/core/common/function/getOptionFromApi.js.map +1 -0
- package/dist/src/core/common/function/getOptions.d.ts +12 -0
- package/dist/src/core/common/function/getOptions.js +18 -0
- package/dist/src/core/common/function/getOptions.js.map +1 -0
- package/dist/src/core/common/function/getOriginalData.d.ts +17 -0
- package/dist/src/core/common/function/getOriginalData.js +18 -0
- package/dist/src/core/common/function/getOriginalData.js.map +1 -0
- package/dist/src/core/common/function/getParentData.d.ts +13 -0
- package/dist/src/core/common/function/getParentData.js +14 -0
- package/dist/src/core/common/function/getParentData.js.map +1 -0
- package/dist/src/core/common/function/getProfile.d.ts +13 -0
- package/dist/src/core/common/function/getProfile.js +30 -0
- package/dist/src/core/common/function/getProfile.js.map +1 -0
- package/dist/src/core/common/function/getProfileImage.d.ts +9 -0
- package/dist/src/core/common/function/getProfileImage.js +20 -0
- package/dist/src/core/common/function/getProfileImage.js.map +1 -0
- package/dist/src/core/common/function/getRawData.d.ts +12 -0
- package/dist/src/core/common/function/getRawData.js +17 -0
- package/dist/src/core/common/function/getRawData.js.map +1 -0
- package/dist/src/core/common/function/getRequestData.d.ts +11 -0
- package/dist/src/core/common/function/getRequestData.js +16 -0
- package/dist/src/core/common/function/getRequestData.js.map +1 -0
- package/dist/src/core/common/function/getRequestStatus.d.ts +9 -0
- package/dist/src/core/common/function/getRequestStatus.js +14 -0
- package/dist/src/core/common/function/getRequestStatus.js.map +1 -0
- package/dist/src/core/common/function/getResponse.d.ts +12 -0
- package/dist/src/core/common/function/getResponse.js +17 -0
- package/dist/src/core/common/function/getResponse.js.map +1 -0
- package/dist/src/core/common/function/getResult.d.ts +12 -0
- package/dist/src/core/common/function/getResult.js +17 -0
- package/dist/src/core/common/function/getResult.js.map +1 -0
- package/dist/src/core/common/function/getRunningNumber.d.ts +12 -0
- package/dist/src/core/common/function/getRunningNumber.js +19 -0
- package/dist/src/core/common/function/getRunningNumber.js.map +1 -0
- package/dist/src/core/common/function/getSetting.d.ts +12 -0
- package/dist/src/core/common/function/getSetting.js +17 -0
- package/dist/src/core/common/function/getSetting.js.map +1 -0
- package/dist/src/core/common/function/getStartExportdate.d.ts +17 -0
- package/dist/src/core/common/function/getStartExportdate.js +34 -0
- package/dist/src/core/common/function/getStartExportdate.js.map +1 -0
- package/dist/src/core/common/function/getTableColumn.d.ts +13 -0
- package/dist/src/core/common/function/getTableColumn.js +57 -0
- package/dist/src/core/common/function/getTableColumn.js.map +1 -0
- package/dist/src/core/common/function/getTimeLogs.d.ts +12 -0
- package/dist/src/core/common/function/getTimeLogs.js +17 -0
- package/dist/src/core/common/function/getTimeLogs.js.map +1 -0
- package/dist/src/core/common/function/hideString.d.ts +12 -0
- package/dist/src/core/common/function/hideString.js +27 -0
- package/dist/src/core/common/function/hideString.js.map +1 -0
- package/dist/src/core/common/function/ifConditions.d.ts +12 -0
- package/dist/src/core/common/function/ifConditions.js +27 -0
- package/dist/src/core/common/function/ifConditions.js.map +1 -0
- package/dist/src/core/common/function/isEmpty.d.ts +12 -0
- package/dist/src/core/common/function/isEmpty.js +18 -0
- package/dist/src/core/common/function/isEmpty.js.map +1 -0
- package/dist/src/core/common/function/jsonArray.d.ts +12 -0
- package/dist/src/core/common/function/jsonArray.js +22 -0
- package/dist/src/core/common/function/jsonArray.js.map +1 -0
- package/dist/src/core/common/function/last.d.ts +17 -0
- package/dist/src/core/common/function/last.js +25 -0
- package/dist/src/core/common/function/last.js.map +1 -0
- package/dist/src/core/common/function/leftString.d.ts +12 -0
- package/dist/src/core/common/function/leftString.js +20 -0
- package/dist/src/core/common/function/leftString.js.map +1 -0
- package/dist/src/core/common/function/length.d.ts +13 -0
- package/dist/src/core/common/function/length.js +21 -0
- package/dist/src/core/common/function/length.js.map +1 -0
- package/dist/src/core/common/function/mapping.d.ts +1185 -0
- package/dist/src/core/common/function/mapping.js +206 -0
- package/dist/src/core/common/function/mapping.js.map +1 -0
- package/dist/src/core/common/function/multiply.d.ts +13 -0
- package/dist/src/core/common/function/multiply.js +17 -0
- package/dist/src/core/common/function/multiply.js.map +1 -0
- package/dist/src/core/common/function/negativeValue.d.ts +13 -0
- package/dist/src/core/common/function/negativeValue.js +23 -0
- package/dist/src/core/common/function/negativeValue.js.map +1 -0
- package/dist/src/core/common/function/notConditions.d.ts +12 -0
- package/dist/src/core/common/function/notConditions.js +17 -0
- package/dist/src/core/common/function/notConditions.js.map +1 -0
- package/dist/src/core/common/function/numberInWord.d.ts +17 -0
- package/dist/src/core/common/function/numberInWord.js +34 -0
- package/dist/src/core/common/function/numberInWord.js.map +1 -0
- package/dist/src/core/common/function/objectId.d.ts +13 -0
- package/dist/src/core/common/function/objectId.js +16 -0
- package/dist/src/core/common/function/objectId.js.map +1 -0
- package/dist/src/core/common/function/orConditions.d.ts +12 -0
- package/dist/src/core/common/function/orConditions.js +17 -0
- package/dist/src/core/common/function/orConditions.js.map +1 -0
- package/dist/src/core/common/function/padStart.d.ts +17 -0
- package/dist/src/core/common/function/padStart.js +18 -0
- package/dist/src/core/common/function/padStart.js.map +1 -0
- package/dist/src/core/common/function/random.d.ts +12 -0
- package/dist/src/core/common/function/random.js +29 -0
- package/dist/src/core/common/function/random.js.map +1 -0
- package/dist/src/core/common/function/randomBytes.d.ts +12 -0
- package/dist/src/core/common/function/randomBytes.js +17 -0
- package/dist/src/core/common/function/randomBytes.js.map +1 -0
- package/dist/src/core/common/function/replaceString.d.ts +12 -0
- package/dist/src/core/common/function/replaceString.js +22 -0
- package/dist/src/core/common/function/replaceString.js.map +1 -0
- package/dist/src/core/common/function/rightString.d.ts +12 -0
- package/dist/src/core/common/function/rightString.js +20 -0
- package/dist/src/core/common/function/rightString.js.map +1 -0
- package/dist/src/core/common/function/round.d.ts +12 -0
- package/dist/src/core/common/function/round.js +23 -0
- package/dist/src/core/common/function/round.js.map +1 -0
- package/dist/src/core/common/function/runningNumber.d.ts +12 -0
- package/dist/src/core/common/function/runningNumber.js +26 -0
- package/dist/src/core/common/function/runningNumber.js.map +1 -0
- package/dist/src/core/common/function/subString.d.ts +12 -0
- package/dist/src/core/common/function/subString.js +19 -0
- package/dist/src/core/common/function/subString.js.map +1 -0
- package/dist/src/core/common/function/sumBy.d.ts +13 -0
- package/dist/src/core/common/function/sumBy.js +24 -0
- package/dist/src/core/common/function/sumBy.js.map +1 -0
- package/dist/src/core/common/function/sumData.d.ts +13 -0
- package/dist/src/core/common/function/sumData.js +28 -0
- package/dist/src/core/common/function/sumData.js.map +1 -0
- package/dist/src/core/common/function/sumIf.d.ts +13 -0
- package/dist/src/core/common/function/sumIf.js +26 -0
- package/dist/src/core/common/function/sumIf.js.map +1 -0
- package/dist/src/core/common/function/sumValue.d.ts +12 -0
- package/dist/src/core/common/function/sumValue.js +26 -0
- package/dist/src/core/common/function/sumValue.js.map +1 -0
- package/dist/src/core/common/function/toBoolean.d.ts +12 -0
- package/dist/src/core/common/function/toBoolean.js +23 -0
- package/dist/src/core/common/function/toBoolean.js.map +1 -0
- package/dist/src/core/common/function/toCamelCase.d.ts +13 -0
- package/dist/src/core/common/function/toCamelCase.js +16 -0
- package/dist/src/core/common/function/toCamelCase.js.map +1 -0
- package/dist/src/core/common/function/toFloat.d.ts +17 -0
- package/dist/src/core/common/function/toFloat.js +25 -0
- package/dist/src/core/common/function/toFloat.js.map +1 -0
- package/dist/src/core/common/function/toInt.d.ts +12 -0
- package/dist/src/core/common/function/toInt.js +20 -0
- package/dist/src/core/common/function/toInt.js.map +1 -0
- package/dist/src/core/common/function/toJson.d.ts +13 -0
- package/dist/src/core/common/function/toJson.js +16 -0
- package/dist/src/core/common/function/toJson.js.map +1 -0
- package/dist/src/core/common/function/toLowerCase.d.ts +13 -0
- package/dist/src/core/common/function/toLowerCase.js +16 -0
- package/dist/src/core/common/function/toLowerCase.js.map +1 -0
- package/dist/src/core/common/function/toPascalCase.d.ts +13 -0
- package/dist/src/core/common/function/toPascalCase.js +16 -0
- package/dist/src/core/common/function/toPascalCase.js.map +1 -0
- package/dist/src/core/common/function/toSnakeCase.d.ts +13 -0
- package/dist/src/core/common/function/toSnakeCase.js +16 -0
- package/dist/src/core/common/function/toSnakeCase.js.map +1 -0
- package/dist/src/core/common/function/toString.d.ts +12 -0
- package/dist/src/core/common/function/toString.js +25 -0
- package/dist/src/core/common/function/toString.js.map +1 -0
- package/dist/src/core/common/function/toUpperCase.d.ts +13 -0
- package/dist/src/core/common/function/toUpperCase.js +16 -0
- package/dist/src/core/common/function/toUpperCase.js.map +1 -0
- package/dist/src/core/common/function/translateOption.d.ts +17 -0
- package/dist/src/core/common/function/translateOption.js +55 -0
- package/dist/src/core/common/function/translateOption.js.map +1 -0
- package/dist/src/core/common/function/uploadImageFromUrl.d.ts +13 -0
- package/dist/src/core/common/function/uploadImageFromUrl.js +18 -0
- package/dist/src/core/common/function/uploadImageFromUrl.js.map +1 -0
- package/dist/src/core/common/interceptors/external.interceptor.d.ts +9 -0
- package/dist/src/core/common/interceptors/external.interceptor.js +113 -0
- package/dist/src/core/common/interceptors/external.interceptor.js.map +1 -0
- package/dist/src/core/common/interceptors/filter.interceptor.d.ts +8 -0
- package/dist/src/core/common/interceptors/filter.interceptor.js +192 -0
- package/dist/src/core/common/interceptors/filter.interceptor.js.map +1 -0
- package/dist/src/core/common/interface/external_data_source.interface.d.ts +16 -0
- package/dist/src/core/common/interface/external_data_source.interface.js +3 -0
- package/dist/src/core/common/interface/external_data_source.interface.js.map +1 -0
- package/dist/src/core/common/interface/module_setting.interface.d.ts +6 -0
- package/dist/src/core/common/interface/module_setting.interface.js +3 -0
- package/dist/src/core/common/interface/module_setting.interface.js.map +1 -0
- package/dist/src/core/common/utils/attachment.d.ts +5 -0
- package/dist/src/core/common/utils/attachment.js +50 -0
- package/dist/src/core/common/utils/attachment.js.map +1 -0
- package/dist/src/core/common/utils/authenticator.d.ts +5 -0
- package/dist/src/core/common/utils/authenticator.js +30 -0
- package/dist/src/core/common/utils/authenticator.js.map +1 -0
- package/dist/src/core/common/utils/build_search.d.ts +11 -0
- package/dist/src/core/common/utils/build_search.js +459 -0
- package/dist/src/core/common/utils/build_search.js.map +1 -0
- package/dist/src/core/common/utils/bull_queue.d.ts +24 -0
- package/dist/src/core/common/utils/bull_queue.js +156 -0
- package/dist/src/core/common/utils/bull_queue.js.map +1 -0
- package/dist/src/core/common/utils/chart.d.ts +12 -0
- package/dist/src/core/common/utils/chart.js +201 -0
- package/dist/src/core/common/utils/chart.js.map +1 -0
- package/dist/src/core/common/utils/common.d.ts +4 -0
- package/dist/src/core/common/utils/common.js +56 -0
- package/dist/src/core/common/utils/common.js.map +1 -0
- package/dist/src/core/common/utils/date.d.ts +7 -0
- package/dist/src/core/common/utils/date.js +97 -0
- package/dist/src/core/common/utils/date.js.map +1 -0
- package/dist/src/core/common/utils/decimal2Json.d.ts +4 -0
- package/dist/src/core/common/utils/decimal2Json.js +131 -0
- package/dist/src/core/common/utils/decimal2Json.js.map +1 -0
- package/dist/src/core/common/utils/diff.d.ts +3 -0
- package/dist/src/core/common/utils/diff.js +81 -0
- package/dist/src/core/common/utils/diff.js.map +1 -0
- package/dist/src/core/common/utils/entity.d.ts +13 -0
- package/dist/src/core/common/utils/entity.js +119 -0
- package/dist/src/core/common/utils/entity.js.map +1 -0
- package/dist/src/core/common/utils/eval.d.ts +3 -0
- package/dist/src/core/common/utils/eval.js +30 -0
- package/dist/src/core/common/utils/eval.js.map +1 -0
- package/dist/src/core/common/utils/example.d.ts +3 -0
- package/dist/src/core/common/utils/example.js +152 -0
- package/dist/src/core/common/utils/example.js.map +1 -0
- package/dist/src/core/common/utils/executions.d.ts +3 -0
- package/dist/src/core/common/utils/executions.js +73 -0
- package/dist/src/core/common/utils/executions.js.map +1 -0
- package/dist/src/core/common/utils/external_data.d.ts +2 -0
- package/dist/src/core/common/utils/external_data.js +20 -0
- package/dist/src/core/common/utils/external_data.js.map +1 -0
- package/dist/src/core/common/utils/external_module.d.ts +12 -0
- package/dist/src/core/common/utils/external_module.js +203 -0
- package/dist/src/core/common/utils/external_module.js.map +1 -0
- package/dist/src/core/common/utils/file.d.ts +6 -0
- package/dist/src/core/common/utils/file.js +80 -0
- package/dist/src/core/common/utils/file.js.map +1 -0
- package/dist/src/core/common/utils/form.d.ts +4 -0
- package/dist/src/core/common/utils/form.js +21 -0
- package/dist/src/core/common/utils/form.js.map +1 -0
- package/dist/src/core/common/utils/func.d.ts +17 -0
- package/dist/src/core/common/utils/func.js +314 -0
- package/dist/src/core/common/utils/func.js.map +1 -0
- package/dist/src/core/common/utils/global.d.ts +6 -0
- package/dist/src/core/common/utils/global.js +72 -0
- package/dist/src/core/common/utils/global.js.map +1 -0
- package/dist/src/core/common/utils/hook.d.ts +5 -0
- package/dist/src/core/common/utils/hook.js +188 -0
- package/dist/src/core/common/utils/hook.js.map +1 -0
- package/dist/src/core/common/utils/initial.d.ts +4 -0
- package/dist/src/core/common/utils/initial.js +318 -0
- package/dist/src/core/common/utils/initial.js.map +1 -0
- package/dist/src/core/common/utils/layout.d.ts +7 -0
- package/dist/src/core/common/utils/layout.js +160 -0
- package/dist/src/core/common/utils/layout.js.map +1 -0
- package/dist/src/core/common/utils/masking.d.ts +3 -0
- package/dist/src/core/common/utils/masking.js +55 -0
- package/dist/src/core/common/utils/masking.js.map +1 -0
- package/dist/src/core/common/utils/math.d.ts +2 -0
- package/dist/src/core/common/utils/math.js +8 -0
- package/dist/src/core/common/utils/math.js.map +1 -0
- package/dist/src/core/common/utils/media.d.ts +70 -0
- package/dist/src/core/common/utils/media.js +90 -0
- package/dist/src/core/common/utils/media.js.map +1 -0
- package/dist/src/core/common/utils/mongo.d.ts +4 -0
- package/dist/src/core/common/utils/mongo.js +891 -0
- package/dist/src/core/common/utils/mongo.js.map +1 -0
- package/dist/src/core/common/utils/mongoose.d.ts +2 -0
- package/dist/src/core/common/utils/mongoose.js +152 -0
- package/dist/src/core/common/utils/mongoose.js.map +1 -0
- package/dist/src/core/common/utils/ocr.d.ts +1 -0
- package/dist/src/core/common/utils/ocr.js +35 -0
- package/dist/src/core/common/utils/ocr.js.map +1 -0
- package/dist/src/core/common/utils/otp.d.ts +16 -0
- package/dist/src/core/common/utils/otp.js +103 -0
- package/dist/src/core/common/utils/otp.js.map +1 -0
- package/dist/src/core/common/utils/permission.d.ts +5 -0
- package/dist/src/core/common/utils/permission.js +122 -0
- package/dist/src/core/common/utils/permission.js.map +1 -0
- package/dist/src/core/common/utils/random.d.ts +2 -0
- package/dist/src/core/common/utils/random.js +14 -0
- package/dist/src/core/common/utils/random.js.map +1 -0
- package/dist/src/core/common/utils/recaptcha.d.ts +1 -0
- package/dist/src/core/common/utils/recaptcha.js +21 -0
- package/dist/src/core/common/utils/recaptcha.js.map +1 -0
- package/dist/src/core/common/utils/redis.d.ts +31 -0
- package/dist/src/core/common/utils/redis.js +261 -0
- package/dist/src/core/common/utils/redis.js.map +1 -0
- package/dist/src/core/common/utils/regex.d.ts +1 -0
- package/dist/src/core/common/utils/regex.js +8 -0
- package/dist/src/core/common/utils/regex.js.map +1 -0
- package/dist/src/core/common/utils/replace.d.ts +5 -0
- package/dist/src/core/common/utils/replace.js +84 -0
- package/dist/src/core/common/utils/replace.js.map +1 -0
- package/dist/src/core/common/utils/request.d.ts +5 -0
- package/dist/src/core/common/utils/request.js +82 -0
- package/dist/src/core/common/utils/request.js.map +1 -0
- package/dist/src/core/common/utils/retry.d.ts +1 -0
- package/dist/src/core/common/utils/retry.js +30 -0
- package/dist/src/core/common/utils/retry.js.map +1 -0
- package/dist/src/core/common/utils/rewrite_url.d.ts +4 -0
- package/dist/src/core/common/utils/rewrite_url.js +18 -0
- package/dist/src/core/common/utils/rewrite_url.js.map +1 -0
- package/dist/src/core/common/utils/running.d.ts +1 -0
- package/dist/src/core/common/utils/running.js +46 -0
- package/dist/src/core/common/utils/running.js.map +1 -0
- package/dist/src/core/common/utils/schedule.d.ts +1 -0
- package/dist/src/core/common/utils/schedule.js +15 -0
- package/dist/src/core/common/utils/schedule.js.map +1 -0
- package/dist/src/core/common/utils/schema.d.ts +65 -0
- package/dist/src/core/common/utils/schema.js +2629 -0
- package/dist/src/core/common/utils/schema.js.map +1 -0
- package/dist/src/core/common/utils/sleep.d.ts +2 -0
- package/dist/src/core/common/utils/sleep.js +8 -0
- package/dist/src/core/common/utils/sleep.js.map +1 -0
- package/dist/src/core/common/utils/template.d.ts +2 -0
- package/dist/src/core/common/utils/template.js +169 -0
- package/dist/src/core/common/utils/template.js.map +1 -0
- package/dist/src/core/common/utils/text_search.d.ts +27 -0
- package/dist/src/core/common/utils/text_search.js +237 -0
- package/dist/src/core/common/utils/text_search.js.map +1 -0
- package/dist/src/core/common/utils/time.d.ts +1 -0
- package/dist/src/core/common/utils/time.js +17 -0
- package/dist/src/core/common/utils/time.js.map +1 -0
- package/dist/src/core/common/utils/token.d.ts +5 -0
- package/dist/src/core/common/utils/token.js +13 -0
- package/dist/src/core/common/utils/token.js.map +1 -0
- package/dist/src/core/common/utils/transform.d.ts +8 -0
- package/dist/src/core/common/utils/transform.js +409 -0
- package/dist/src/core/common/utils/transform.js.map +1 -0
- package/dist/src/core/common/utils/translate.d.ts +5 -0
- package/dist/src/core/common/utils/translate.js +73 -0
- package/dist/src/core/common/utils/translate.js.map +1 -0
- package/dist/src/core/common/utils/validate.d.ts +6 -0
- package/dist/src/core/common/utils/validate.js +323 -0
- package/dist/src/core/common/utils/validate.js.map +1 -0
- package/dist/src/core/company/company.constant.d.ts +9 -0
- package/dist/src/core/company/company.constant.js +13 -0
- package/dist/src/core/company/company.constant.js.map +1 -0
- package/dist/src/core/company/company.layout.d.ts +2 -0
- package/dist/src/core/company/company.layout.js +507 -0
- package/dist/src/core/company/company.layout.js.map +1 -0
- package/dist/src/core/company/company.module.d.ts +2 -0
- package/dist/src/core/company/company.module.js +40 -0
- package/dist/src/core/company/company.module.js.map +1 -0
- package/dist/src/core/company/company.schema.d.ts +25 -0
- package/dist/src/core/company/company.schema.js +137 -0
- package/dist/src/core/company/company.schema.js.map +1 -0
- package/dist/src/core/company/company.service.d.ts +22 -0
- package/dist/src/core/company/company.service.js +140 -0
- package/dist/src/core/company/company.service.js.map +1 -0
- package/dist/src/core/config/attachment.d.ts +15 -0
- package/dist/src/core/config/attachment.js +35 -0
- package/dist/src/core/config/attachment.js.map +1 -0
- package/dist/src/core/config/auth.d.ts +4 -0
- package/dist/src/core/config/auth.js +6 -0
- package/dist/src/core/config/auth.js.map +1 -0
- package/dist/src/core/config/cache.d.ts +5 -0
- package/dist/src/core/config/cache.js +7 -0
- package/dist/src/core/config/cache.js.map +1 -0
- package/dist/src/core/config/mongodb.d.ts +4 -0
- package/dist/src/core/config/mongodb.js +6 -0
- package/dist/src/core/config/mongodb.js.map +1 -0
- package/dist/src/core/config/queue.d.ts +4 -0
- package/dist/src/core/config/queue.js +6 -0
- package/dist/src/core/config/queue.js.map +1 -0
- package/dist/src/core/config/schedule_action.d.ts +5 -0
- package/dist/src/core/config/schedule_action.js +7 -0
- package/dist/src/core/config/schedule_action.js.map +1 -0
- package/dist/src/core/core.controller.d.ts +51 -0
- package/dist/src/core/core.controller.js +555 -0
- package/dist/src/core/core.controller.js.map +1 -0
- package/dist/src/core/core.module.d.ts +2 -0
- package/dist/src/core/core.module.js +101 -0
- package/dist/src/core/core.module.js.map +1 -0
- package/dist/src/core/core.service.d.ts +121 -0
- package/dist/src/core/core.service.js +716 -0
- package/dist/src/core/core.service.js.map +1 -0
- package/dist/src/core/currency/currency.layout.d.ts +2 -0
- package/dist/src/core/currency/currency.layout.js +194 -0
- package/dist/src/core/currency/currency.layout.js.map +1 -0
- package/dist/src/core/currency/currency.module.d.ts +2 -0
- package/dist/src/core/currency/currency.module.js +38 -0
- package/dist/src/core/currency/currency.module.js.map +1 -0
- package/dist/src/core/currency/currency.schema.d.ts +9 -0
- package/dist/src/core/currency/currency.schema.js +30 -0
- package/dist/src/core/currency/currency.schema.js.map +1 -0
- package/dist/src/core/currency/currency.service.d.ts +13 -0
- package/dist/src/core/currency/currency.service.js +55 -0
- package/dist/src/core/currency/currency.service.js.map +1 -0
- package/dist/src/core/currency/data/currency.json +646 -0
- package/dist/src/core/custom_function/custom_function.controller.d.ts +7 -0
- package/dist/src/core/custom_function/custom_function.controller.js +50 -0
- package/dist/src/core/custom_function/custom_function.controller.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.enum.d.ts +22 -0
- package/dist/src/core/custom_function/custom_function.enum.js +28 -0
- package/dist/src/core/custom_function/custom_function.enum.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.layout.d.ts +2 -0
- package/dist/src/core/custom_function/custom_function.layout.js +521 -0
- package/dist/src/core/custom_function/custom_function.layout.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.module.d.ts +2 -0
- package/dist/src/core/custom_function/custom_function.module.js +41 -0
- package/dist/src/core/custom_function/custom_function.module.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.schema.d.ts +15 -0
- package/dist/src/core/custom_function/custom_function.schema.js +68 -0
- package/dist/src/core/custom_function/custom_function.schema.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.service.d.ts +18 -0
- package/dist/src/core/custom_function/custom_function.service.js +116 -0
- package/dist/src/core/custom_function/custom_function.service.js.map +1 -0
- package/dist/src/core/database/database.constant.d.ts +35 -0
- package/dist/src/core/database/database.constant.js +218 -0
- package/dist/src/core/database/database.constant.js.map +1 -0
- package/dist/src/core/database/database.controller.d.ts +8 -0
- package/dist/src/core/database/database.controller.js +56 -0
- package/dist/src/core/database/database.controller.js.map +1 -0
- package/dist/src/core/database/database.module.d.ts +2 -0
- package/dist/src/core/database/database.module.js +24 -0
- package/dist/src/core/database/database.module.js.map +1 -0
- package/dist/src/core/database/database.service.d.ts +13 -0
- package/dist/src/core/database/database.service.js +184 -0
- package/dist/src/core/database/database.service.js.map +1 -0
- package/dist/src/core/deploy/deploy.action.d.ts +3 -0
- package/dist/src/core/deploy/deploy.action.js +82 -0
- package/dist/src/core/deploy/deploy.action.js.map +1 -0
- package/dist/src/core/deploy/deploy.controller.d.ts +7 -0
- package/dist/src/core/deploy/deploy.controller.js +53 -0
- package/dist/src/core/deploy/deploy.controller.js.map +1 -0
- package/dist/src/core/deploy/deploy.enum.d.ts +5 -0
- package/dist/src/core/deploy/deploy.enum.js +10 -0
- package/dist/src/core/deploy/deploy.enum.js.map +1 -0
- package/dist/src/core/deploy/deploy.layout.d.ts +4 -0
- package/dist/src/core/deploy/deploy.layout.js +1110 -0
- package/dist/src/core/deploy/deploy.layout.js.map +1 -0
- package/dist/src/core/deploy/deploy.module.d.ts +2 -0
- package/dist/src/core/deploy/deploy.module.js +57 -0
- package/dist/src/core/deploy/deploy.module.js.map +1 -0
- package/dist/src/core/deploy/deploy.schema.d.ts +28 -0
- package/dist/src/core/deploy/deploy.schema.js +111 -0
- package/dist/src/core/deploy/deploy.schema.js.map +1 -0
- package/dist/src/core/deploy/deploy.service.d.ts +38 -0
- package/dist/src/core/deploy/deploy.service.js +557 -0
- package/dist/src/core/deploy/deploy.service.js.map +1 -0
- package/dist/src/core/deploy/log/deploy_log.schema.d.ts +20 -0
- package/dist/src/core/deploy/log/deploy_log.schema.js +90 -0
- package/dist/src/core/deploy/log/deploy_log.schema.js.map +1 -0
- package/dist/src/core/deploy/log/deploy_log.service.d.ts +12 -0
- package/dist/src/core/deploy/log/deploy_log.service.js +44 -0
- package/dist/src/core/deploy/log/deploy_log.service.js.map +1 -0
- package/dist/src/core/entities/entities.controller.d.ts +69 -0
- package/dist/src/core/entities/entities.controller.js +801 -0
- package/dist/src/core/entities/entities.controller.js.map +1 -0
- package/dist/src/core/entities/entities.module.d.ts +2 -0
- package/dist/src/core/entities/entities.module.js +38 -0
- package/dist/src/core/entities/entities.module.js.map +1 -0
- package/dist/src/core/entities/entities.service.d.ts +71 -0
- package/dist/src/core/entities/entities.service.js +2271 -0
- package/dist/src/core/entities/entities.service.js.map +1 -0
- package/dist/src/core/entities/entity.enum.d.ts +33 -0
- package/dist/src/core/entities/entity.enum.js +44 -0
- package/dist/src/core/entities/entity.enum.js.map +1 -0
- package/dist/src/core/entities/entity.schema.d.ts +357 -0
- package/dist/src/core/entities/entity.schema.js +1460 -0
- package/dist/src/core/entities/entity.schema.js.map +1 -0
- package/dist/src/core/entities/provider/data_permission.base.d.ts +4 -0
- package/dist/src/core/entities/provider/data_permission.base.js +10 -0
- package/dist/src/core/entities/provider/data_permission.base.js.map +1 -0
- package/dist/src/core/entities/provider/data_permission.interface.d.ts +3 -0
- package/dist/src/core/entities/provider/data_permission.interface.js +3 -0
- package/dist/src/core/entities/provider/data_permission.interface.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.enum.d.ts +4 -0
- package/dist/src/core/execution_log/execution_log.enum.js +9 -0
- package/dist/src/core/execution_log/execution_log.enum.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.layout.d.ts +2 -0
- package/dist/src/core/execution_log/execution_log.layout.js +226 -0
- package/dist/src/core/execution_log/execution_log.layout.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.module.d.ts +2 -0
- package/dist/src/core/execution_log/execution_log.module.js +39 -0
- package/dist/src/core/execution_log/execution_log.module.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.schema.d.ts +13 -0
- package/dist/src/core/execution_log/execution_log.schema.js +58 -0
- package/dist/src/core/execution_log/execution_log.schema.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.service.d.ts +12 -0
- package/dist/src/core/execution_log/execution_log.service.js +47 -0
- package/dist/src/core/execution_log/execution_log.service.js.map +1 -0
- package/dist/src/core/external_provider/external_provider.controller.d.ts +6 -0
- package/dist/src/core/external_provider/external_provider.controller.js +41 -0
- package/dist/src/core/external_provider/external_provider.controller.js.map +1 -0
- package/dist/src/core/external_provider/external_provider.module.d.ts +2 -0
- package/dist/src/core/external_provider/external_provider.module.js +29 -0
- package/dist/src/core/external_provider/external_provider.module.js.map +1 -0
- package/dist/src/core/external_provider/external_provider.service.d.ts +18 -0
- package/dist/src/core/external_provider/external_provider.service.js +32 -0
- package/dist/src/core/external_provider/external_provider.service.js.map +1 -0
- package/dist/src/core/guards/csrf.guard.d.ts +9 -0
- package/dist/src/core/guards/csrf.guard.js +57 -0
- package/dist/src/core/guards/csrf.guard.js.map +1 -0
- package/dist/src/core/import_export/import_export.controller.d.ts +28 -0
- package/dist/src/core/import_export/import_export.controller.js +201 -0
- package/dist/src/core/import_export/import_export.controller.js.map +1 -0
- package/dist/src/core/import_export/import_export.enum.d.ts +24 -0
- package/dist/src/core/import_export/import_export.enum.js +32 -0
- package/dist/src/core/import_export/import_export.enum.js.map +1 -0
- package/dist/src/core/import_export/import_export.hook.d.ts +16 -0
- package/dist/src/core/import_export/import_export.hook.js +24 -0
- package/dist/src/core/import_export/import_export.hook.js.map +1 -0
- package/dist/src/core/import_export/import_export.layout.d.ts +2 -0
- package/dist/src/core/import_export/import_export.layout.js +2059 -0
- package/dist/src/core/import_export/import_export.layout.js.map +1 -0
- package/dist/src/core/import_export/import_export.module.d.ts +2 -0
- package/dist/src/core/import_export/import_export.module.js +51 -0
- package/dist/src/core/import_export/import_export.module.js.map +1 -0
- package/dist/src/core/import_export/import_export.schema.d.ts +40 -0
- package/dist/src/core/import_export/import_export.schema.js +175 -0
- package/dist/src/core/import_export/import_export.schema.js.map +1 -0
- package/dist/src/core/import_export/import_export.service.d.ts +94 -0
- package/dist/src/core/import_export/import_export.service.js +2723 -0
- package/dist/src/core/import_export/import_export.service.js.map +1 -0
- package/dist/src/core/import_export/import_export.utils.d.ts +3 -0
- package/dist/src/core/import_export/import_export.utils.js +21 -0
- package/dist/src/core/import_export/import_export.utils.js.map +1 -0
- package/dist/src/core/import_export/log/import_export_log.layout.d.ts +2 -0
- package/dist/src/core/import_export/log/import_export_log.layout.js +423 -0
- package/dist/src/core/import_export/log/import_export_log.layout.js.map +1 -0
- package/dist/src/core/import_export/log/import_export_log.schema.d.ts +23 -0
- package/dist/src/core/import_export/log/import_export_log.schema.js +131 -0
- package/dist/src/core/import_export/log/import_export_log.schema.js.map +1 -0
- package/dist/src/core/import_export/log/import_export_log.service.d.ts +12 -0
- package/dist/src/core/import_export/log/import_export_log.service.js +49 -0
- package/dist/src/core/import_export/log/import_export_log.service.js.map +1 -0
- package/dist/src/core/import_export/provider/export.provider.d.ts +8 -0
- package/dist/src/core/import_export/provider/export.provider.js +244 -0
- package/dist/src/core/import_export/provider/export.provider.js.map +1 -0
- package/dist/src/core/import_export/provider/import.provider.d.ts +8 -0
- package/dist/src/core/import_export/provider/import.provider.js +238 -0
- package/dist/src/core/import_export/provider/import.provider.js.map +1 -0
- package/dist/src/core/import_export/provider/provider.base.d.ts +8 -0
- package/dist/src/core/import_export/provider/provider.base.js +19 -0
- package/dist/src/core/import_export/provider/provider.base.js.map +1 -0
- package/dist/src/core/import_export/provider/provider.interface.d.ts +6 -0
- package/dist/src/core/import_export/provider/provider.interface.js +3 -0
- package/dist/src/core/import_export/provider/provider.interface.js.map +1 -0
- package/dist/src/core/index.d.ts +271 -0
- package/dist/src/core/index.js +668 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/language/langauge.constant.d.ts +9 -0
- package/dist/src/core/language/langauge.constant.js +13 -0
- package/dist/src/core/language/langauge.constant.js.map +1 -0
- package/dist/src/core/language/langauge.enum.d.ts +4 -0
- package/dist/src/core/language/langauge.enum.js +9 -0
- package/dist/src/core/language/langauge.enum.js.map +1 -0
- package/dist/src/core/language/language.controller.d.ts +6 -0
- package/dist/src/core/language/language.controller.js +36 -0
- package/dist/src/core/language/language.controller.js.map +1 -0
- package/dist/src/core/language/language.hook.d.ts +13 -0
- package/dist/src/core/language/language.hook.js +36 -0
- package/dist/src/core/language/language.hook.js.map +1 -0
- package/dist/src/core/language/language.layout.d.ts +2 -0
- package/dist/src/core/language/language.layout.js +299 -0
- package/dist/src/core/language/language.layout.js.map +1 -0
- package/dist/src/core/language/language.module.d.ts +2 -0
- package/dist/src/core/language/language.module.js +42 -0
- package/dist/src/core/language/language.module.js.map +1 -0
- package/dist/src/core/language/language.schema.d.ts +13 -0
- package/dist/src/core/language/language.schema.js +57 -0
- package/dist/src/core/language/language.schema.js.map +1 -0
- package/dist/src/core/language/language.service.d.ts +14 -0
- package/dist/src/core/language/language.service.js +76 -0
- package/dist/src/core/language/language.service.js.map +1 -0
- package/dist/src/core/layout/chart_widget/chart_widget.controller.d.ts +7 -0
- package/dist/src/core/layout/chart_widget/chart_widget.controller.js +54 -0
- package/dist/src/core/layout/chart_widget/chart_widget.controller.js.map +1 -0
- package/dist/src/core/layout/chart_widget/chart_widget.service.d.ts +36 -0
- package/dist/src/core/layout/chart_widget/chart_widget.service.js +1355 -0
- package/dist/src/core/layout/chart_widget/chart_widget.service.js.map +1 -0
- package/dist/src/core/layout/layout.constant.d.ts +17 -0
- package/dist/src/core/layout/layout.constant.js +23 -0
- package/dist/src/core/layout/layout.constant.js.map +1 -0
- package/dist/src/core/layout/layout.module.d.ts +2 -0
- package/dist/src/core/layout/layout.module.js +43 -0
- package/dist/src/core/layout/layout.module.js.map +1 -0
- package/dist/src/core/layout/share_widget/share_widget.layout.d.ts +2 -0
- package/dist/src/core/layout/share_widget/share_widget.layout.js +5 -0
- package/dist/src/core/layout/share_widget/share_widget.layout.js.map +1 -0
- package/dist/src/core/layout/share_widget/share_widget.schema.d.ts +14 -0
- package/dist/src/core/layout/share_widget/share_widget.schema.js +80 -0
- package/dist/src/core/layout/share_widget/share_widget.schema.js.map +1 -0
- package/dist/src/core/layout/share_widget/share_widget.service.d.ts +19 -0
- package/dist/src/core/layout/share_widget/share_widget.service.js +110 -0
- package/dist/src/core/layout/share_widget/share_widget.service.js.map +1 -0
- package/dist/src/core/mail/log/mail_log.layout.d.ts +2 -0
- package/dist/src/core/mail/log/mail_log.layout.js +697 -0
- package/dist/src/core/mail/log/mail_log.layout.js.map +1 -0
- package/dist/src/core/mail/log/mail_log.schema.d.ts +21 -0
- package/dist/src/core/mail/log/mail_log.schema.js +94 -0
- package/dist/src/core/mail/log/mail_log.schema.js.map +1 -0
- package/dist/src/core/mail/log/mail_log.service.d.ts +12 -0
- package/dist/src/core/mail/log/mail_log.service.js +49 -0
- package/dist/src/core/mail/log/mail_log.service.js.map +1 -0
- package/dist/src/core/mail/mail.controller.d.ts +7 -0
- package/dist/src/core/mail/mail.controller.js +50 -0
- package/dist/src/core/mail/mail.controller.js.map +1 -0
- package/dist/src/core/mail/mail.custom_actions.d.ts +27 -0
- package/dist/src/core/mail/mail.custom_actions.js +35 -0
- package/dist/src/core/mail/mail.custom_actions.js.map +1 -0
- package/dist/src/core/mail/mail.enum.d.ts +3 -0
- package/dist/src/core/mail/mail.enum.js +8 -0
- package/dist/src/core/mail/mail.enum.js.map +1 -0
- package/dist/src/core/mail/mail.hook.d.ts +15 -0
- package/dist/src/core/mail/mail.hook.js +23 -0
- package/dist/src/core/mail/mail.hook.js.map +1 -0
- package/dist/src/core/mail/mail.layout.d.ts +2 -0
- package/dist/src/core/mail/mail.layout.js +653 -0
- package/dist/src/core/mail/mail.layout.js.map +1 -0
- package/dist/src/core/mail/mail.module.d.ts +2 -0
- package/dist/src/core/mail/mail.module.js +50 -0
- package/dist/src/core/mail/mail.module.js.map +1 -0
- package/dist/src/core/mail/mail.schema.d.ts +24 -0
- package/dist/src/core/mail/mail.schema.js +106 -0
- package/dist/src/core/mail/mail.schema.js.map +1 -0
- package/dist/src/core/mail/mail.service.d.ts +19 -0
- package/dist/src/core/mail/mail.service.js +193 -0
- package/dist/src/core/mail/mail.service.js.map +1 -0
- package/dist/src/core/map_location/map_location.layout.d.ts +2 -0
- package/dist/src/core/map_location/map_location.layout.js +102 -0
- package/dist/src/core/map_location/map_location.layout.js.map +1 -0
- package/dist/src/core/map_location/map_location.schema.d.ts +10 -0
- package/dist/src/core/map_location/map_location.schema.js +46 -0
- package/dist/src/core/map_location/map_location.schema.js.map +1 -0
- package/dist/src/core/map_location/map_location.service.d.ts +12 -0
- package/dist/src/core/map_location/map_location.service.js +44 -0
- package/dist/src/core/map_location/map_location.service.js.map +1 -0
- package/dist/src/core/map_location/map_locatioon.module.d.ts +2 -0
- package/dist/src/core/map_location/map_locatioon.module.js +38 -0
- package/dist/src/core/map_location/map_locatioon.module.js.map +1 -0
- package/dist/src/core/middlewares/request.middleware.d.ts +2 -0
- package/dist/src/core/middlewares/request.middleware.js +11 -0
- package/dist/src/core/middlewares/request.middleware.js.map +1 -0
- package/dist/src/core/notification/log/log.layout.d.ts +2 -0
- package/dist/src/core/notification/log/log.layout.js +19 -0
- package/dist/src/core/notification/log/log.layout.js.map +1 -0
- package/dist/src/core/notification/log/log.schema.d.ts +23 -0
- package/dist/src/core/notification/log/log.schema.js +94 -0
- package/dist/src/core/notification/log/log.schema.js.map +1 -0
- package/dist/src/core/notification/log/log.service.d.ts +12 -0
- package/dist/src/core/notification/log/log.service.js +45 -0
- package/dist/src/core/notification/log/log.service.js.map +1 -0
- package/dist/src/core/notification/message/message.controller.d.ts +6 -0
- package/dist/src/core/notification/message/message.controller.js +36 -0
- package/dist/src/core/notification/message/message.controller.js.map +1 -0
- package/dist/src/core/notification/message/message.custom_action.d.ts +15 -0
- package/dist/src/core/notification/message/message.custom_action.js +21 -0
- package/dist/src/core/notification/message/message.custom_action.js.map +1 -0
- package/dist/src/core/notification/message/message.layout.d.ts +2 -0
- package/dist/src/core/notification/message/message.layout.js +732 -0
- package/dist/src/core/notification/message/message.layout.js.map +1 -0
- package/dist/src/core/notification/message/message.schema.d.ts +22 -0
- package/dist/src/core/notification/message/message.schema.js +97 -0
- package/dist/src/core/notification/message/message.schema.js.map +1 -0
- package/dist/src/core/notification/message/message.service.d.ts +23 -0
- package/dist/src/core/notification/message/message.service.js +203 -0
- package/dist/src/core/notification/message/message.service.js.map +1 -0
- package/dist/src/core/notification/message/message.workflow.d.ts +2 -0
- package/dist/src/core/notification/message/message.workflow.js +455 -0
- package/dist/src/core/notification/message/message.workflow.js.map +1 -0
- package/dist/src/core/notification/message_queue/message_queue.controller.d.ts +6 -0
- package/dist/src/core/notification/message_queue/message_queue.controller.js +36 -0
- package/dist/src/core/notification/message_queue/message_queue.controller.js.map +1 -0
- package/dist/src/core/notification/message_queue/message_queue.layout.d.ts +2 -0
- package/dist/src/core/notification/message_queue/message_queue.layout.js +5 -0
- package/dist/src/core/notification/message_queue/message_queue.layout.js.map +1 -0
- package/dist/src/core/notification/message_queue/message_queue.schema.d.ts +17 -0
- package/dist/src/core/notification/message_queue/message_queue.schema.js +63 -0
- package/dist/src/core/notification/message_queue/message_queue.schema.js.map +1 -0
- package/dist/src/core/notification/message_queue/message_queue.service.d.ts +16 -0
- package/dist/src/core/notification/message_queue/message_queue.service.js +151 -0
- package/dist/src/core/notification/message_queue/message_queue.service.js.map +1 -0
- package/dist/src/core/notification/notification.constant.d.ts +8 -0
- package/dist/src/core/notification/notification.constant.js +13 -0
- package/dist/src/core/notification/notification.constant.js.map +1 -0
- package/dist/src/core/notification/notification.module.d.ts +2 -0
- package/dist/src/core/notification/notification.module.js +85 -0
- package/dist/src/core/notification/notification.module.js.map +1 -0
- package/dist/src/core/notification/subscription /subscription.controller.d.ts +7 -0
- package/dist/src/core/notification/subscription /subscription.controller.js +51 -0
- package/dist/src/core/notification/subscription /subscription.controller.js.map +1 -0
- package/dist/src/core/notification/subscription /subscription.layout.d.ts +2 -0
- package/dist/src/core/notification/subscription /subscription.layout.js +5 -0
- package/dist/src/core/notification/subscription /subscription.layout.js.map +1 -0
- package/dist/src/core/notification/subscription /subscription.schema.d.ts +11 -0
- package/dist/src/core/notification/subscription /subscription.schema.js +48 -0
- package/dist/src/core/notification/subscription /subscription.schema.js.map +1 -0
- package/dist/src/core/notification/subscription /subscription.service.d.ts +14 -0
- package/dist/src/core/notification/subscription /subscription.service.js +82 -0
- package/dist/src/core/notification/subscription /subscription.service.js.map +1 -0
- package/dist/src/core/pipeline/job/job.controller.d.ts +8 -0
- package/dist/src/core/pipeline/job/job.controller.js +59 -0
- package/dist/src/core/pipeline/job/job.controller.js.map +1 -0
- package/dist/src/core/pipeline/job/job.layout.d.ts +2 -0
- package/dist/src/core/pipeline/job/job.layout.js +5 -0
- package/dist/src/core/pipeline/job/job.layout.js.map +1 -0
- package/dist/src/core/pipeline/job/job.schema.d.ts +16 -0
- package/dist/src/core/pipeline/job/job.schema.js +80 -0
- package/dist/src/core/pipeline/job/job.schema.js.map +1 -0
- package/dist/src/core/pipeline/job/job.service.d.ts +21 -0
- package/dist/src/core/pipeline/job/job.service.js +259 -0
- package/dist/src/core/pipeline/job/job.service.js.map +1 -0
- package/dist/src/core/pipeline/log/log.layout.d.ts +2 -0
- package/dist/src/core/pipeline/log/log.layout.js +276 -0
- package/dist/src/core/pipeline/log/log.layout.js.map +1 -0
- package/dist/src/core/pipeline/log/log.schema.d.ts +20 -0
- package/dist/src/core/pipeline/log/log.schema.js +93 -0
- package/dist/src/core/pipeline/log/log.schema.js.map +1 -0
- package/dist/src/core/pipeline/log/log.service.d.ts +12 -0
- package/dist/src/core/pipeline/log/log.service.js +48 -0
- package/dist/src/core/pipeline/log/log.service.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.controller.d.ts +6 -0
- package/dist/src/core/pipeline/pipeline.controller.js +41 -0
- package/dist/src/core/pipeline/pipeline.controller.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.dto.d.ts +5 -0
- package/dist/src/core/pipeline/pipeline.dto.js +7 -0
- package/dist/src/core/pipeline/pipeline.dto.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.enum.d.ts +16 -0
- package/dist/src/core/pipeline/pipeline.enum.js +23 -0
- package/dist/src/core/pipeline/pipeline.enum.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.layout.d.ts +2 -0
- package/dist/src/core/pipeline/pipeline.layout.js +625 -0
- package/dist/src/core/pipeline/pipeline.layout.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.module.d.ts +2 -0
- package/dist/src/core/pipeline/pipeline.module.js +59 -0
- package/dist/src/core/pipeline/pipeline.module.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.schema.d.ts +11 -0
- package/dist/src/core/pipeline/pipeline.schema.js +39 -0
- package/dist/src/core/pipeline/pipeline.schema.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.service.d.ts +21 -0
- package/dist/src/core/pipeline/pipeline.service.js +282 -0
- package/dist/src/core/pipeline/pipeline.service.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.utils.d.ts +1 -0
- package/dist/src/core/pipeline/pipeline.utils.js +30 -0
- package/dist/src/core/pipeline/pipeline.utils.js.map +1 -0
- package/dist/src/core/pipeline/provider/base_pipeline.provider.d.ts +8 -0
- package/dist/src/core/pipeline/provider/base_pipeline.provider.js +16 -0
- package/dist/src/core/pipeline/provider/base_pipeline.provider.js.map +1 -0
- package/dist/src/core/pipeline/provider/pipeline.interface.d.ts +6 -0
- package/dist/src/core/pipeline/provider/pipeline.interface.js +3 -0
- package/dist/src/core/pipeline/provider/pipeline.interface.js.map +1 -0
- package/dist/src/core/queue/queue.controller.d.ts +21 -0
- package/dist/src/core/queue/queue.controller.js +99 -0
- package/dist/src/core/queue/queue.controller.js.map +1 -0
- package/dist/src/core/queue/queue.module.d.ts +4 -0
- package/dist/src/core/queue/queue.module.js +200 -0
- package/dist/src/core/queue/queue.module.js.map +1 -0
- package/dist/src/core/queue/queue.processor.d.ts +46 -0
- package/dist/src/core/queue/queue.processor.js +461 -0
- package/dist/src/core/queue/queue.processor.js.map +1 -0
- package/dist/src/core/queue/queue.service.d.ts +19 -0
- package/dist/src/core/queue/queue.service.js +73 -0
- package/dist/src/core/queue/queue.service.js.map +1 -0
- package/dist/src/core/reason/reason.layout.d.ts +4 -0
- package/dist/src/core/reason/reason.layout.js +579 -0
- package/dist/src/core/reason/reason.layout.js.map +1 -0
- package/dist/src/core/reason/reason.module.d.ts +2 -0
- package/dist/src/core/reason/reason.module.js +52 -0
- package/dist/src/core/reason/reason.module.js.map +1 -0
- package/dist/src/core/reason/reason.schema.d.ts +31 -0
- package/dist/src/core/reason/reason.schema.js +119 -0
- package/dist/src/core/reason/reason.schema.js.map +1 -0
- package/dist/src/core/reason/reason.service.d.ts +26 -0
- package/dist/src/core/reason/reason.service.js +82 -0
- package/dist/src/core/reason/reason.service.js.map +1 -0
- package/dist/src/core/redis/redis.constant.d.ts +2 -0
- package/dist/src/core/redis/redis.constant.js +6 -0
- package/dist/src/core/redis/redis.constant.js.map +1 -0
- package/dist/src/core/redis/redis.controller.d.ts +9 -0
- package/dist/src/core/redis/redis.controller.js +72 -0
- package/dist/src/core/redis/redis.controller.js.map +1 -0
- package/dist/src/core/redis/redis.module.d.ts +2 -0
- package/dist/src/core/redis/redis.module.js +24 -0
- package/dist/src/core/redis/redis.module.js.map +1 -0
- package/dist/src/core/redis/redis.service.d.ts +12 -0
- package/dist/src/core/redis/redis.service.js +145 -0
- package/dist/src/core/redis/redis.service.js.map +1 -0
- package/dist/src/core/rewrite_url/provider/provider.base.d.ts +7 -0
- package/dist/src/core/rewrite_url/provider/provider.base.js +12 -0
- package/dist/src/core/rewrite_url/provider/provider.base.js.map +1 -0
- package/dist/src/core/rewrite_url/provider/provider.interface.d.ts +9 -0
- package/dist/src/core/rewrite_url/provider/provider.interface.js +3 -0
- package/dist/src/core/rewrite_url/provider/provider.interface.js.map +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.constant.d.ts +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.constant.js +5 -0
- package/dist/src/core/rewrite_url/rewrite_url.constant.js.map +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.controller.d.ts +7 -0
- package/dist/src/core/rewrite_url/rewrite_url.controller.js +52 -0
- package/dist/src/core/rewrite_url/rewrite_url.controller.js.map +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.module.d.ts +2 -0
- package/dist/src/core/rewrite_url/rewrite_url.module.js +26 -0
- package/dist/src/core/rewrite_url/rewrite_url.module.js.map +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.service.d.ts +10 -0
- package/dist/src/core/rewrite_url/rewrite_url.service.js +103 -0
- package/dist/src/core/rewrite_url/rewrite_url.service.js.map +1 -0
- package/dist/src/core/schedule_action/log/schedule_log.layout.d.ts +2 -0
- package/dist/src/core/schedule_action/log/schedule_log.layout.js +458 -0
- package/dist/src/core/schedule_action/log/schedule_log.layout.js.map +1 -0
- package/dist/src/core/schedule_action/log/schedule_log.schema.d.ts +15 -0
- package/dist/src/core/schedule_action/log/schedule_log.schema.js +70 -0
- package/dist/src/core/schedule_action/log/schedule_log.schema.js.map +1 -0
- package/dist/src/core/schedule_action/log/schedule_log.service.d.ts +12 -0
- package/dist/src/core/schedule_action/log/schedule_log.service.js +49 -0
- package/dist/src/core/schedule_action/log/schedule_log.service.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.controller.d.ts +14 -0
- package/dist/src/core/schedule_action/schedule_action.controller.js +103 -0
- package/dist/src/core/schedule_action/schedule_action.controller.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.enum.d.ts +12 -0
- package/dist/src/core/schedule_action/schedule_action.enum.js +19 -0
- package/dist/src/core/schedule_action/schedule_action.enum.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.hook.d.ts +11 -0
- package/dist/src/core/schedule_action/schedule_action.hook.js +19 -0
- package/dist/src/core/schedule_action/schedule_action.hook.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.layout.d.ts +2 -0
- package/dist/src/core/schedule_action/schedule_action.layout.js +615 -0
- package/dist/src/core/schedule_action/schedule_action.layout.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.module.d.ts +2 -0
- package/dist/src/core/schedule_action/schedule_action.module.js +65 -0
- package/dist/src/core/schedule_action/schedule_action.module.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.schema.d.ts +30 -0
- package/dist/src/core/schedule_action/schedule_action.schema.js +139 -0
- package/dist/src/core/schedule_action/schedule_action.schema.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.service.d.ts +30 -0
- package/dist/src/core/schedule_action/schedule_action.service.js +319 -0
- package/dist/src/core/schedule_action/schedule_action.service.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action_cron.service.d.ts +17 -0
- package/dist/src/core/schedule_action/schedule_action_cron.service.js +222 -0
- package/dist/src/core/schedule_action/schedule_action_cron.service.js.map +1 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.schema.d.ts +11 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.schema.js +40 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.schema.js.map +1 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.service.d.ts +14 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.service.js +74 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.service.js.map +1 -0
- package/dist/src/core/search_text/search_text.controller.d.ts +8 -0
- package/dist/src/core/search_text/search_text.controller.js +57 -0
- package/dist/src/core/search_text/search_text.controller.js.map +1 -0
- package/dist/src/core/search_text/search_text.module.d.ts +2 -0
- package/dist/src/core/search_text/search_text.module.js +51 -0
- package/dist/src/core/search_text/search_text.module.js.map +1 -0
- package/dist/src/core/search_text/search_text.schema.d.ts +10 -0
- package/dist/src/core/search_text/search_text.schema.js +38 -0
- package/dist/src/core/search_text/search_text.schema.js.map +1 -0
- package/dist/src/core/search_text/search_text.service.d.ts +30 -0
- package/dist/src/core/search_text/search_text.service.js +295 -0
- package/dist/src/core/search_text/search_text.service.js.map +1 -0
- package/dist/src/core/setting/dto/auth_setting.dto.d.ts +43 -0
- package/dist/src/core/setting/dto/auth_setting.dto.js +151 -0
- package/dist/src/core/setting/dto/auth_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/es_setting.dto.d.ts +3 -0
- package/dist/src/core/setting/dto/es_setting.dto.js +21 -0
- package/dist/src/core/setting/dto/es_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/general_setting.dto.d.ts +10 -0
- package/dist/src/core/setting/dto/general_setting.dto.js +49 -0
- package/dist/src/core/setting/dto/general_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/layout_setting.dto.d.ts +5 -0
- package/dist/src/core/setting/dto/layout_setting.dto.js +29 -0
- package/dist/src/core/setting/dto/layout_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/log_setting.dto.d.ts +17 -0
- package/dist/src/core/setting/dto/log_setting.dto.js +57 -0
- package/dist/src/core/setting/dto/log_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/login_method.dto.d.ts +4 -0
- package/dist/src/core/setting/dto/login_method.dto.js +25 -0
- package/dist/src/core/setting/dto/login_method.dto.js.map +1 -0
- package/dist/src/core/setting/dto/media_setting.dto.d.ts +29 -0
- package/dist/src/core/setting/dto/media_setting.dto.js +43 -0
- package/dist/src/core/setting/dto/media_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/menu_setting.dto.d.ts +17 -0
- package/dist/src/core/setting/dto/menu_setting.dto.js +76 -0
- package/dist/src/core/setting/dto/menu_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/queue_setting.dto.d.ts +3 -0
- package/dist/src/core/setting/dto/queue_setting.dto.js +21 -0
- package/dist/src/core/setting/dto/queue_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/schedule_setting.dto.d.ts +5 -0
- package/dist/src/core/setting/dto/schedule_setting.dto.js +29 -0
- package/dist/src/core/setting/dto/schedule_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/swagger_setting.dto.d.ts +5 -0
- package/dist/src/core/setting/dto/swagger_setting.dto.js +29 -0
- package/dist/src/core/setting/dto/swagger_setting.dto.js.map +1 -0
- package/dist/src/core/setting/setting.constant.d.ts +309 -0
- package/dist/src/core/setting/setting.constant.js +650 -0
- package/dist/src/core/setting/setting.constant.js.map +1 -0
- package/dist/src/core/setting/setting.controller.d.ts +54 -0
- package/dist/src/core/setting/setting.controller.js +487 -0
- package/dist/src/core/setting/setting.controller.js.map +1 -0
- package/dist/src/core/setting/setting.module.d.ts +2 -0
- package/dist/src/core/setting/setting.module.js +40 -0
- package/dist/src/core/setting/setting.module.js.map +1 -0
- package/dist/src/core/setting/setting.schema.d.ts +10 -0
- package/dist/src/core/setting/setting.schema.js +35 -0
- package/dist/src/core/setting/setting.schema.js.map +1 -0
- package/dist/src/core/setting/setting.service.d.ts +76 -0
- package/dist/src/core/setting/setting.service.js +1378 -0
- package/dist/src/core/setting/setting.service.js.map +1 -0
- package/dist/src/core/shortly/shortly.constant.d.ts +5 -0
- package/dist/src/core/shortly/shortly.constant.js +10 -0
- package/dist/src/core/shortly/shortly.constant.js.map +1 -0
- package/dist/src/core/shortly/shortly.module.d.ts +2 -0
- package/dist/src/core/shortly/shortly.module.js +42 -0
- package/dist/src/core/shortly/shortly.module.js.map +1 -0
- package/dist/src/core/shortly/url/url.controller.d.ts +6 -0
- package/dist/src/core/shortly/url/url.controller.js +41 -0
- package/dist/src/core/shortly/url/url.controller.js.map +1 -0
- package/dist/src/core/shortly/url/url.layout.d.ts +2 -0
- package/dist/src/core/shortly/url/url.layout.js +486 -0
- package/dist/src/core/shortly/url/url.layout.js.map +1 -0
- package/dist/src/core/shortly/url/url.schema.d.ts +15 -0
- package/dist/src/core/shortly/url/url.schema.js +69 -0
- package/dist/src/core/shortly/url/url.schema.js.map +1 -0
- package/dist/src/core/shortly/url/url.service.d.ts +16 -0
- package/dist/src/core/shortly/url/url.service.js +108 -0
- package/dist/src/core/shortly/url/url.service.js.map +1 -0
- package/dist/src/core/sms/log/sms_log.layout.d.ts +2 -0
- package/dist/src/core/sms/log/sms_log.layout.js +668 -0
- package/dist/src/core/sms/log/sms_log.layout.js.map +1 -0
- package/dist/src/core/sms/log/sms_log.schema.d.ts +27 -0
- package/dist/src/core/sms/log/sms_log.schema.js +115 -0
- package/dist/src/core/sms/log/sms_log.schema.js.map +1 -0
- package/dist/src/core/sms/log/sms_log.service.d.ts +14 -0
- package/dist/src/core/sms/log/sms_log.service.js +70 -0
- package/dist/src/core/sms/log/sms_log.service.js.map +1 -0
- package/dist/src/core/sms/sms.controller.d.ts +6 -0
- package/dist/src/core/sms/sms.controller.js +41 -0
- package/dist/src/core/sms/sms.controller.js.map +1 -0
- package/dist/src/core/sms/sms.enum.d.ts +12 -0
- package/dist/src/core/sms/sms.enum.js +19 -0
- package/dist/src/core/sms/sms.enum.js.map +1 -0
- package/dist/src/core/sms/sms.layout.d.ts +2 -0
- package/dist/src/core/sms/sms.layout.js +766 -0
- package/dist/src/core/sms/sms.layout.js.map +1 -0
- package/dist/src/core/sms/sms.module.d.ts +2 -0
- package/dist/src/core/sms/sms.module.js +49 -0
- package/dist/src/core/sms/sms.module.js.map +1 -0
- package/dist/src/core/sms/sms.schema.d.ts +24 -0
- package/dist/src/core/sms/sms.schema.js +107 -0
- package/dist/src/core/sms/sms.schema.js.map +1 -0
- package/dist/src/core/sms/sms.service.d.ts +16 -0
- package/dist/src/core/sms/sms.service.js +272 -0
- package/dist/src/core/sms/sms.service.js.map +1 -0
- package/dist/src/core/template/data/templates.json +192 -0
- package/dist/src/core/template/log/print_log.enum.d.ts +5 -0
- package/dist/src/core/template/log/print_log.enum.js +10 -0
- package/dist/src/core/template/log/print_log.enum.js.map +1 -0
- package/dist/src/core/template/log/print_log.layout.d.ts +2 -0
- package/dist/src/core/template/log/print_log.layout.js +483 -0
- package/dist/src/core/template/log/print_log.layout.js.map +1 -0
- package/dist/src/core/template/log/print_log.schema.d.ts +18 -0
- package/dist/src/core/template/log/print_log.schema.js +104 -0
- package/dist/src/core/template/log/print_log.schema.js.map +1 -0
- package/dist/src/core/template/log/print_log.service.d.ts +12 -0
- package/dist/src/core/template/log/print_log.service.js +49 -0
- package/dist/src/core/template/log/print_log.service.js.map +1 -0
- package/dist/src/core/template/provider/base_template.provider.d.ts +9 -0
- package/dist/src/core/template/provider/base_template.provider.js +22 -0
- package/dist/src/core/template/provider/base_template.provider.js.map +1 -0
- package/dist/src/core/template/provider/email.provider.d.ts +8 -0
- package/dist/src/core/template/provider/email.provider.js +155 -0
- package/dist/src/core/template/provider/email.provider.js.map +1 -0
- package/dist/src/core/template/provider/sms.provider.d.ts +8 -0
- package/dist/src/core/template/provider/sms.provider.js +93 -0
- package/dist/src/core/template/provider/sms.provider.js.map +1 -0
- package/dist/src/core/template/provider/template.interface.d.ts +7 -0
- package/dist/src/core/template/provider/template.interface.js +3 -0
- package/dist/src/core/template/provider/template.interface.js.map +1 -0
- package/dist/src/core/template/provider/template_email.provider.d.ts +8 -0
- package/dist/src/core/template/provider/template_email.provider.js +472 -0
- package/dist/src/core/template/provider/template_email.provider.js.map +1 -0
- package/dist/src/core/template/provider/template_print.provider.d.ts +9 -0
- package/dist/src/core/template/provider/template_print.provider.js +1114 -0
- package/dist/src/core/template/provider/template_print.provider.js.map +1 -0
- package/dist/src/core/template/provider/template_sms.provider.d.ts +8 -0
- package/dist/src/core/template/provider/template_sms.provider.js +453 -0
- package/dist/src/core/template/provider/template_sms.provider.js.map +1 -0
- package/dist/src/core/template/template.controller.d.ts +15 -0
- package/dist/src/core/template/template.controller.js +140 -0
- package/dist/src/core/template/template.controller.js.map +1 -0
- package/dist/src/core/template/template.enum.d.ts +34 -0
- package/dist/src/core/template/template.enum.js +43 -0
- package/dist/src/core/template/template.enum.js.map +1 -0
- package/dist/src/core/template/template.hook.d.ts +18 -0
- package/dist/src/core/template/template.hook.js +26 -0
- package/dist/src/core/template/template.hook.js.map +1 -0
- package/dist/src/core/template/template.layout.d.ts +2 -0
- package/dist/src/core/template/template.layout.js +399 -0
- package/dist/src/core/template/template.layout.js.map +1 -0
- package/dist/src/core/template/template.module.d.ts +2 -0
- package/dist/src/core/template/template.module.js +49 -0
- package/dist/src/core/template/template.module.js.map +1 -0
- package/dist/src/core/template/template.schema.d.ts +57 -0
- package/dist/src/core/template/template.schema.js +265 -0
- package/dist/src/core/template/template.schema.js.map +1 -0
- package/dist/src/core/template/template.service.d.ts +49 -0
- package/dist/src/core/template/template.service.js +900 -0
- package/dist/src/core/template/template.service.js.map +1 -0
- package/dist/src/core/template/template.utils.d.ts +25 -0
- package/dist/src/core/template/template.utils.js +292 -0
- package/dist/src/core/template/template.utils.js.map +1 -0
- package/dist/src/core/translate/translate.controller.d.ts +8 -0
- package/dist/src/core/translate/translate.controller.js +74 -0
- package/dist/src/core/translate/translate.controller.js.map +1 -0
- package/dist/src/core/translate/translate.enum.d.ts +5 -0
- package/dist/src/core/translate/translate.enum.js +10 -0
- package/dist/src/core/translate/translate.enum.js.map +1 -0
- package/dist/src/core/translate/translate.hook.d.ts +13 -0
- package/dist/src/core/translate/translate.hook.js +21 -0
- package/dist/src/core/translate/translate.hook.js.map +1 -0
- package/dist/src/core/translate/translate.json +2011 -0
- package/dist/src/core/translate/translate.layout.d.ts +2 -0
- package/dist/src/core/translate/translate.layout.js +95 -0
- package/dist/src/core/translate/translate.layout.js.map +1 -0
- package/dist/src/core/translate/translate.module.d.ts +2 -0
- package/dist/src/core/translate/translate.module.js +42 -0
- package/dist/src/core/translate/translate.module.js.map +1 -0
- package/dist/src/core/translate/translate.schema.d.ts +16 -0
- package/dist/src/core/translate/translate.schema.js +76 -0
- package/dist/src/core/translate/translate.schema.js.map +1 -0
- package/dist/src/core/translate/translate.service.d.ts +17 -0
- package/dist/src/core/translate/translate.service.js +139 -0
- package/dist/src/core/translate/translate.service.js.map +1 -0
- package/dist/src/core/users/user.config.d.ts +4 -0
- package/dist/src/core/users/user.config.js +8 -0
- package/dist/src/core/users/user.config.js.map +1 -0
- package/dist/src/core/users/user.constant.d.ts +4 -0
- package/dist/src/core/users/user.constant.js +36 -0
- package/dist/src/core/users/user.constant.js.map +1 -0
- package/dist/src/core/users/user.controller.d.ts +33 -0
- package/dist/src/core/users/user.controller.js +292 -0
- package/dist/src/core/users/user.controller.js.map +1 -0
- package/dist/src/core/users/user.enum.d.ts +40 -0
- package/dist/src/core/users/user.enum.js +48 -0
- package/dist/src/core/users/user.enum.js.map +1 -0
- package/dist/src/core/users/user.hook.d.ts +25 -0
- package/dist/src/core/users/user.hook.js +36 -0
- package/dist/src/core/users/user.hook.js.map +1 -0
- package/dist/src/core/users/user.layout.d.ts +4 -0
- package/dist/src/core/users/user.layout.js +2333 -0
- package/dist/src/core/users/user.layout.js.map +1 -0
- package/dist/src/core/users/user.module.d.ts +2 -0
- package/dist/src/core/users/user.module.js +77 -0
- package/dist/src/core/users/user.module.js.map +1 -0
- package/dist/src/core/users/user.permission.d.ts +2 -0
- package/dist/src/core/users/user.permission.js +10 -0
- package/dist/src/core/users/user.permission.js.map +1 -0
- package/dist/src/core/users/user.schema.d.ts +73 -0
- package/dist/src/core/users/user.schema.js +316 -0
- package/dist/src/core/users/user.schema.js.map +1 -0
- package/dist/src/core/users/user.service.d.ts +100 -0
- package/dist/src/core/users/user.service.js +1551 -0
- package/dist/src/core/users/user.service.js.map +1 -0
- package/dist/src/core/version_data/version_data.module.d.ts +2 -0
- package/dist/src/core/version_data/version_data.module.js +38 -0
- package/dist/src/core/version_data/version_data.module.js.map +1 -0
- package/dist/src/core/version_data/version_data.schema.d.ts +13 -0
- package/dist/src/core/version_data/version_data.schema.js +55 -0
- package/dist/src/core/version_data/version_data.schema.js.map +1 -0
- package/dist/src/core/version_data/version_data.service.d.ts +12 -0
- package/dist/src/core/version_data/version_data.service.js +43 -0
- package/dist/src/core/version_data/version_data.service.js.map +1 -0
- package/dist/src/core/widget/widget.controller.d.ts +6 -0
- package/dist/src/core/widget/widget.controller.js +42 -0
- package/dist/src/core/widget/widget.controller.js.map +1 -0
- package/dist/src/core/widget/widget.enum.d.ts +19 -0
- package/dist/src/core/widget/widget.enum.js +25 -0
- package/dist/src/core/widget/widget.enum.js.map +1 -0
- package/dist/src/core/widget/widget.module.d.ts +2 -0
- package/dist/src/core/widget/widget.module.js +40 -0
- package/dist/src/core/widget/widget.module.js.map +1 -0
- package/dist/src/core/widget/widget.schema.d.ts +21 -0
- package/dist/src/core/widget/widget.schema.js +94 -0
- package/dist/src/core/widget/widget.schema.js.map +1 -0
- package/dist/src/core/widget/widget.service.d.ts +15 -0
- package/dist/src/core/widget/widget.service.js +370 -0
- package/dist/src/core/widget/widget.service.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/main.js +235 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/modules/index.d.ts +1 -0
- package/dist/src/modules/index.js +6 -0
- package/dist/src/modules/index.js.map +1 -0
- package/dist/src/modules/modules.d.ts +3 -0
- package/dist/src/modules/modules.js +8 -0
- package/dist/src/modules/modules.js.map +1 -0
- package/dist/src/private.controller.d.ts +6 -0
- package/dist/src/private.controller.js +44 -0
- package/dist/src/private.controller.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/typings/node/index.d.ts +4 -0
- package/dist/typings/node/index.js +1 -0
- package/dist/typings/node/index.js.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,1355 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LayoutChartWidgetService = void 0;
|
|
13
|
+
const _ = require("lodash");
|
|
14
|
+
const numeral = require("numeral");
|
|
15
|
+
const common_1 = require("@nestjs/common");
|
|
16
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
17
|
+
const layout_constant_1 = require("../layout.constant");
|
|
18
|
+
const schema_1 = require("../../common/utils/schema");
|
|
19
|
+
const transform_1 = require("../../common/utils/transform");
|
|
20
|
+
const mongo_1 = require("../../common/utils/mongo");
|
|
21
|
+
const func_1 = require("../../common/utils/func");
|
|
22
|
+
const math_1 = require("../../common/utils/math");
|
|
23
|
+
const constants_1 = require("../../common/constants");
|
|
24
|
+
const moment = require("moment");
|
|
25
|
+
const widget_enum_1 = require("../../widget/widget.enum");
|
|
26
|
+
const chart_1 = require("../../common/utils/chart");
|
|
27
|
+
const common_2 = require("../../common/utils/common");
|
|
28
|
+
const eval_1 = require("../../common/utils/eval");
|
|
29
|
+
const chroma = require("chroma-js");
|
|
30
|
+
let LayoutChartWidgetService = class LayoutChartWidgetService {
|
|
31
|
+
constructor(cls) {
|
|
32
|
+
this.cls = cls;
|
|
33
|
+
this._findColors = (colors, data, keys) => {
|
|
34
|
+
const result = [];
|
|
35
|
+
for (const item of data) {
|
|
36
|
+
const index = keys.findIndex(i => i.key === item.key);
|
|
37
|
+
result.push(colors[index]);
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
this._checkDataSetTypeDate = async (datasets) => {
|
|
42
|
+
for (const ds of datasets) {
|
|
43
|
+
if (!(await this._checkDateField(ds)))
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
};
|
|
48
|
+
constants_1.CONST.IGNORE_ENTITY.push(`${layout_constant_1.MODULE_CODE}_chart_widget`);
|
|
49
|
+
}
|
|
50
|
+
async init() {
|
|
51
|
+
return `[${_.toUpper(layout_constant_1.MODULE_CODE)} MODULE] chart_widget`;
|
|
52
|
+
}
|
|
53
|
+
_getRandomColor() {
|
|
54
|
+
const letters = "0123456789ABCDEF";
|
|
55
|
+
let color = "#";
|
|
56
|
+
for (var i = 0; i < 6; i++) {
|
|
57
|
+
color += letters[Math.floor(Math.random() * 16)];
|
|
58
|
+
}
|
|
59
|
+
return color;
|
|
60
|
+
}
|
|
61
|
+
async _checkDateField(data) {
|
|
62
|
+
var _a;
|
|
63
|
+
const entity = await (0, schema_1.loadEntity)(data === null || data === void 0 ? void 0 : data.entity);
|
|
64
|
+
const isDateField = (_a = entity === null || entity === void 0 ? void 0 : entity.fields) === null || _a === void 0 ? void 0 : _a.find(field => field.name === (data === null || data === void 0 ? void 0 : data.x_value_key) && field.type === "date");
|
|
65
|
+
return !_.isEmpty(isDateField);
|
|
66
|
+
}
|
|
67
|
+
_cutLabel(labels, labelLength, lineLength) {
|
|
68
|
+
const result = [];
|
|
69
|
+
labels.forEach(label => {
|
|
70
|
+
var _a;
|
|
71
|
+
result.push((_a = (0, chart_1.formatLabel)(label, labelLength)) === null || _a === void 0 ? void 0 : _a.slice(0, lineLength));
|
|
72
|
+
});
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
_isTypeDate(fields, valueName) {
|
|
76
|
+
const field = fields.find(field => field.name === valueName && field.type === "date");
|
|
77
|
+
return !!field;
|
|
78
|
+
}
|
|
79
|
+
async _getExampleXValuesDate(widget) {
|
|
80
|
+
var _a;
|
|
81
|
+
const listDetail = _.get(constants_1.CONST, "SETTING_GENERAL.list_detail");
|
|
82
|
+
const dateArray = [];
|
|
83
|
+
const AMOUNT = {
|
|
84
|
+
day: 15,
|
|
85
|
+
week: 6,
|
|
86
|
+
month: 12,
|
|
87
|
+
year: 5,
|
|
88
|
+
quarter: 6
|
|
89
|
+
};
|
|
90
|
+
const groupBy = _.isEmpty(widget.x_group_by) ? "day" : widget.x_group_by;
|
|
91
|
+
for (let i = 0; i < AMOUNT[groupBy]; i++) {
|
|
92
|
+
const currentDate = moment().subtract(i, groupBy);
|
|
93
|
+
const getCurrentFormat = (_a = constants_1.CHART_DATE_OPTION.find(i => i.name === widget.x_group_by)) === null || _a === void 0 ? void 0 : _a.value;
|
|
94
|
+
dateArray.push(currentDate.format(getCurrentFormat));
|
|
95
|
+
}
|
|
96
|
+
return dateArray.reverse();
|
|
97
|
+
}
|
|
98
|
+
async _summaryWidgetExample(widget) {
|
|
99
|
+
const result = [];
|
|
100
|
+
const datasets = !_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.datasets) && _.isArray(widget === null || widget === void 0 ? void 0 : widget.datasets)
|
|
101
|
+
? widget.datasets
|
|
102
|
+
: [widget];
|
|
103
|
+
for (const widget of datasets) {
|
|
104
|
+
const res = { value: "NA", value_compare: "" };
|
|
105
|
+
const targetValue = _.random(1, 1e7);
|
|
106
|
+
let data = {
|
|
107
|
+
current_value: _.random(1, targetValue),
|
|
108
|
+
target_value: targetValue
|
|
109
|
+
};
|
|
110
|
+
if (widget.operation === "avg_by_ratio") {
|
|
111
|
+
data.current_value = (0, math_1.roundDecimal)(data.current_value / data.target_value, 2);
|
|
112
|
+
}
|
|
113
|
+
if (widget.use_compare_date_range) {
|
|
114
|
+
const targetValueCompare = _.random(1, 1e7);
|
|
115
|
+
let dateCompareData = {
|
|
116
|
+
current_value: _.random(1, targetValueCompare),
|
|
117
|
+
target_value: targetValueCompare
|
|
118
|
+
};
|
|
119
|
+
const currentValue = data === null || data === void 0 ? void 0 : data.current_value;
|
|
120
|
+
const valueDateCompare = widget.operation === "avg_by_ratio"
|
|
121
|
+
? (0, math_1.roundDecimal)(_.get(dateCompareData, "current_value", 0) /
|
|
122
|
+
_.get(dateCompareData, "target_value", 0), 2)
|
|
123
|
+
: _.get(dateCompareData, "current_value", 0);
|
|
124
|
+
data.growth_amount = (0, chart_1.convertToDecimal2)(currentValue - valueDateCompare, widget.use_small_num &&
|
|
125
|
+
Math.abs(currentValue - valueDateCompare) > widget.min_small_num);
|
|
126
|
+
data.current_value = (0, chart_1.convertToDecimal2)(currentValue, widget.use_small_num && Math.abs(currentValue) > widget.min_small_num);
|
|
127
|
+
data.previous_value = (0, chart_1.convertToDecimal2)(valueDateCompare, widget.use_small_num &&
|
|
128
|
+
Math.abs(valueDateCompare) > widget.min_small_num);
|
|
129
|
+
data.growth_percent =
|
|
130
|
+
valueDateCompare === 0
|
|
131
|
+
? currentValue === 0
|
|
132
|
+
? 0
|
|
133
|
+
: 100
|
|
134
|
+
: (0, math_1.roundDecimal)(((currentValue - valueDateCompare) / valueDateCompare) * 100, 0);
|
|
135
|
+
}
|
|
136
|
+
if (widget.operation === "percentage") {
|
|
137
|
+
data.current_value = (0, math_1.roundDecimal)((data.current_value / data.target_value) * 100, 2);
|
|
138
|
+
}
|
|
139
|
+
if (!widget.use_compare_date_range && widget.operation !== "percentage") {
|
|
140
|
+
if (widget.use_small_num && data.current_value > widget.min_small_num) {
|
|
141
|
+
data.current_value = numeral(data.current_value).format("0.00a");
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
data.current_value = (0, chart_1.convertToDecimal2)(data.current_value);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if ((widget === null || widget === void 0 ? void 0 : widget.value_format_compare) && (widget === null || widget === void 0 ? void 0 : widget.use_compare_date_range)) {
|
|
148
|
+
res.value_compare = (0, transform_1.transformString)(widget.value_format_compare, data);
|
|
149
|
+
}
|
|
150
|
+
res.value = (0, transform_1.transformString)(widget.value_format, data);
|
|
151
|
+
result.push(res);
|
|
152
|
+
}
|
|
153
|
+
return result;
|
|
154
|
+
}
|
|
155
|
+
async _summaryWidget(widget) {
|
|
156
|
+
const results = [];
|
|
157
|
+
const datasets = !_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.datasets) && _.isArray(widget === null || widget === void 0 ? void 0 : widget.datasets)
|
|
158
|
+
? widget.datasets
|
|
159
|
+
: [widget];
|
|
160
|
+
for (const widget of datasets) {
|
|
161
|
+
const result = { value: "NA", value_compare: "" };
|
|
162
|
+
if (_.isEmpty(widget.entity) || _.isEmpty(widget.value_format)) {
|
|
163
|
+
results.push(result);
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if (_.isEmpty(widget.field) &&
|
|
167
|
+
widget.operation !== "count" &&
|
|
168
|
+
widget.operation !== "avg_by_ratio") {
|
|
169
|
+
results.push(result);
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (_.isEmpty(widget.target_filter) &&
|
|
173
|
+
widget.operation === "percentage") {
|
|
174
|
+
results.push(result);
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
const entity = await (0, schema_1.loadEntity)(widget.entity);
|
|
178
|
+
const query = [];
|
|
179
|
+
if (!_.isEmpty(widget.filter)) {
|
|
180
|
+
const matchFilter = (0, mongo_1.convertFilterToMongoQuery)(widget.filter, entity, true);
|
|
181
|
+
query.push({ $match: { $and: matchFilter } });
|
|
182
|
+
}
|
|
183
|
+
if (!_.isEmpty(widget.sort)) {
|
|
184
|
+
const sort = (0, mongo_1.convertSortToMongoQuery)(widget.sort);
|
|
185
|
+
query.push({ $sort: sort });
|
|
186
|
+
}
|
|
187
|
+
switch (widget.operation) {
|
|
188
|
+
case "sum":
|
|
189
|
+
query.push({
|
|
190
|
+
$group: { _id: null, current_value: { $sum: `$${widget.field}` } }
|
|
191
|
+
});
|
|
192
|
+
break;
|
|
193
|
+
case "count":
|
|
194
|
+
query.push({
|
|
195
|
+
$group: { _id: null, current_value: { $sum: 1 } }
|
|
196
|
+
});
|
|
197
|
+
break;
|
|
198
|
+
case "average":
|
|
199
|
+
query.push({
|
|
200
|
+
$group: { _id: null, current_value: { $avg: `$${widget.field}` } }
|
|
201
|
+
});
|
|
202
|
+
break;
|
|
203
|
+
case "min":
|
|
204
|
+
query.push({
|
|
205
|
+
$group: { _id: null, current_value: { $min: `$${widget.field}` } }
|
|
206
|
+
});
|
|
207
|
+
break;
|
|
208
|
+
case "max":
|
|
209
|
+
query.push({
|
|
210
|
+
$group: { _id: null, current_value: { $max: `$${widget.field}` } }
|
|
211
|
+
});
|
|
212
|
+
break;
|
|
213
|
+
case "first":
|
|
214
|
+
query.push({
|
|
215
|
+
$group: { _id: null, current_value: { $first: `$${widget.field}` } }
|
|
216
|
+
});
|
|
217
|
+
break;
|
|
218
|
+
case "last":
|
|
219
|
+
query.push({
|
|
220
|
+
$group: { _id: null, current_value: { $last: `$${widget.field}` } }
|
|
221
|
+
});
|
|
222
|
+
break;
|
|
223
|
+
case "avg_by_ratio":
|
|
224
|
+
query.push({
|
|
225
|
+
$group: {
|
|
226
|
+
_id: null,
|
|
227
|
+
current_value: { $sum: `$${widget.avg_field_name_1}` },
|
|
228
|
+
target_value: { $sum: `$${widget === null || widget === void 0 ? void 0 : widget.avg_field_name_2}` }
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
break;
|
|
232
|
+
case "percentage":
|
|
233
|
+
if (!_.isEmpty(widget.target_filter)) {
|
|
234
|
+
const matchFilter = (0, mongo_1.convertFilterToMongoQuery)(widget.target_filter, entity, true);
|
|
235
|
+
query.push({ $match: { $and: matchFilter } });
|
|
236
|
+
}
|
|
237
|
+
query.push({
|
|
238
|
+
$group: {
|
|
239
|
+
_id: null,
|
|
240
|
+
current_value: { $sum: `$${widget.field}` },
|
|
241
|
+
target_value: { $sum: `$${widget.target_field}` }
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
break;
|
|
245
|
+
default:
|
|
246
|
+
return result;
|
|
247
|
+
}
|
|
248
|
+
const data = await (0, schema_1.callInternalService)(widget.entity, "patch", "aggregate", query);
|
|
249
|
+
if (widget.operation === "avg_by_ratio") {
|
|
250
|
+
data[0].current_value = (0, math_1.roundDecimal)(data[0].current_value / data[0].target_value, 2);
|
|
251
|
+
}
|
|
252
|
+
if (widget.use_compare_date_range && widget.compare_number > 0) {
|
|
253
|
+
const cloneQuery = _.cloneDeep(query);
|
|
254
|
+
const dateMatch = cloneQuery[0];
|
|
255
|
+
for (const i of _.get(dateMatch, "$match.$and")) {
|
|
256
|
+
for (const field in i) {
|
|
257
|
+
if (this._isTypeDate(entity.fields, field)) {
|
|
258
|
+
if (i[field]["$gte"]) {
|
|
259
|
+
i[field]["$gte"] = moment(i[field]["$gte"])
|
|
260
|
+
.subtract(widget.compare_number, widget.compare_date_options)
|
|
261
|
+
.toDate();
|
|
262
|
+
}
|
|
263
|
+
if (i[field]["$lte"]) {
|
|
264
|
+
i[field]["$lte"] = moment(i[field]["$lte"])
|
|
265
|
+
.subtract(widget.compare_number, widget.compare_date_options)
|
|
266
|
+
.toDate();
|
|
267
|
+
}
|
|
268
|
+
if (i[field]["$eq"]) {
|
|
269
|
+
i[field]["$eq"] = moment(i[field]["$eq"])
|
|
270
|
+
.subtract(widget.compare_number, widget.compare_date_options)
|
|
271
|
+
.toDate();
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
cloneQuery[0] = dateMatch;
|
|
277
|
+
const dateCompareData = await (0, schema_1.callInternalService)(widget.entity, "patch", "aggregate", cloneQuery);
|
|
278
|
+
const currentValue = data[0].current_value;
|
|
279
|
+
const valueDateCompare = widget.operation === "avg_by_ratio"
|
|
280
|
+
? (0, math_1.roundDecimal)(_.get(dateCompareData, "[0].current_value", 0) /
|
|
281
|
+
_.get(dateCompareData, "[0].target_value", 0), 2)
|
|
282
|
+
: _.get(dateCompareData, "[0].current_value", 0);
|
|
283
|
+
data[0].growth_amount = (0, chart_1.convertToDecimal2)(currentValue - valueDateCompare, widget.use_small_num &&
|
|
284
|
+
Math.abs(currentValue - valueDateCompare) > widget.min_small_num);
|
|
285
|
+
data[0].current_value = (0, chart_1.convertToDecimal2)(currentValue, widget.use_small_num && Math.abs(currentValue) > widget.min_small_num);
|
|
286
|
+
data[0].previous_value = (0, chart_1.convertToDecimal2)(valueDateCompare, widget.use_small_num &&
|
|
287
|
+
Math.abs(valueDateCompare) > widget.min_small_num);
|
|
288
|
+
data[0].growth_percent =
|
|
289
|
+
valueDateCompare === 0
|
|
290
|
+
? currentValue === 0
|
|
291
|
+
? 0
|
|
292
|
+
: 100
|
|
293
|
+
: (0, math_1.roundDecimal)(((currentValue - valueDateCompare) / valueDateCompare) * 100, 0);
|
|
294
|
+
}
|
|
295
|
+
if (_.isEmpty(data)) {
|
|
296
|
+
results.push(result);
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
if (widget.operation === "percentage") {
|
|
300
|
+
data[0].current_value = (0, math_1.roundDecimal)((data[0].current_value / data[0].target_value) * 100, 2);
|
|
301
|
+
}
|
|
302
|
+
if (!widget.use_compare_date_range && widget.operation !== "percentage") {
|
|
303
|
+
if (widget.use_small_num &&
|
|
304
|
+
data[0].current_value > widget.min_small_num) {
|
|
305
|
+
data[0].current_value = numeral(data[0].current_value).format("0.00a");
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
data[0].current_value = (0, chart_1.convertToDecimal2)(data[0].current_value);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if ((widget === null || widget === void 0 ? void 0 : widget.value_format_compare) && (widget === null || widget === void 0 ? void 0 : widget.use_compare_date_range)) {
|
|
312
|
+
result.value_compare = (0, transform_1.transformString)(widget.value_format_compare, data[0]);
|
|
313
|
+
}
|
|
314
|
+
result.value = (0, transform_1.transformString)(widget.value_format, data[0]);
|
|
315
|
+
results.push(result);
|
|
316
|
+
}
|
|
317
|
+
return results;
|
|
318
|
+
}
|
|
319
|
+
async _defaultWidgetColor(color, multiple, count = 0, multipleDs = false, indexDs, indexMixedWidget) {
|
|
320
|
+
let colorWidget = color;
|
|
321
|
+
if (_.isEmpty(colorWidget) || !colorWidget) {
|
|
322
|
+
const widgetDefaultColor = _.get(constants_1.CONST, "SETTING_GENERAL.list_detail.widget_default_color");
|
|
323
|
+
if (_.isEmpty(widgetDefaultColor) || !widgetDefaultColor) {
|
|
324
|
+
const general = await (0, schema_1.getSetting)("general");
|
|
325
|
+
const generalColor = _.get(general, "list_detail.widget_default_color");
|
|
326
|
+
const color = _.get(generalColor, "value_color", []);
|
|
327
|
+
colorWidget = color;
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
const color = _.get(widgetDefaultColor, "value_color", []);
|
|
331
|
+
colorWidget = color;
|
|
332
|
+
}
|
|
333
|
+
if (_.isNumber(indexMixedWidget)) {
|
|
334
|
+
return _.get(colorWidget, indexMixedWidget, this._getRandomColor());
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (!colorWidget || _.isEmpty(colorWidget)) {
|
|
338
|
+
return undefined;
|
|
339
|
+
}
|
|
340
|
+
if (multipleDs && _.isEmpty(color)) {
|
|
341
|
+
colorWidget = _.get(colorWidget, indexDs, this._getRandomColor());
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
if (multiple) {
|
|
345
|
+
if (_.isString(colorWidget)) {
|
|
346
|
+
colorWidget = [colorWidget];
|
|
347
|
+
}
|
|
348
|
+
if (colorWidget.length < count) {
|
|
349
|
+
colorWidget = chroma.scale(colorWidget).colors(count);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
colorWidget = _.isString(colorWidget) ? colorWidget : colorWidget[0];
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return colorWidget;
|
|
357
|
+
}
|
|
358
|
+
async _defaultWidget(widget, type) {
|
|
359
|
+
var _a;
|
|
360
|
+
const useMultipleDS = widget.use_multiple_data_source || ((_a = widget === null || widget === void 0 ? void 0 : widget.datasets) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
361
|
+
const result = {
|
|
362
|
+
type,
|
|
363
|
+
data: {},
|
|
364
|
+
options: {
|
|
365
|
+
elements: {},
|
|
366
|
+
parsing: ["pie", "radar", "polar"].includes(type)
|
|
367
|
+
? { key: "value" }
|
|
368
|
+
: {
|
|
369
|
+
xAxisKey: "key",
|
|
370
|
+
yAxisKey: "value"
|
|
371
|
+
},
|
|
372
|
+
responsive: true,
|
|
373
|
+
plugins: {
|
|
374
|
+
legend: {
|
|
375
|
+
display: false
|
|
376
|
+
},
|
|
377
|
+
title: {
|
|
378
|
+
display: !widget.hide_title,
|
|
379
|
+
text: widget.title,
|
|
380
|
+
position: "top",
|
|
381
|
+
align: widget.title_position || "center"
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
if (widget.aspect_ratio > 0) {
|
|
387
|
+
_.set(result, "options.aspectRatio", widget.aspect_ratio);
|
|
388
|
+
}
|
|
389
|
+
if (useMultipleDS ||
|
|
390
|
+
[widget_enum_1.WidgetType.pie, widget_enum_1.WidgetType.doughnut].includes(type)) {
|
|
391
|
+
_.set(result, "options.plugins.legend", {
|
|
392
|
+
display: true,
|
|
393
|
+
align: widget.legend_align || "center",
|
|
394
|
+
position: widget.legend_position || "top"
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
return result;
|
|
398
|
+
}
|
|
399
|
+
_defaultDatalabels(widget) {
|
|
400
|
+
if (!(widget === null || widget === void 0 ? void 0 : widget.dataset_show_label))
|
|
401
|
+
return undefined;
|
|
402
|
+
return {
|
|
403
|
+
align: (widget === null || widget === void 0 ? void 0 : widget.label_position) || "start"
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
_getDateFormat(date, xValue) {
|
|
407
|
+
if (date === "day") {
|
|
408
|
+
return { $dateToString: { format: "%Y/%m/%d", date: `$${xValue}` } };
|
|
409
|
+
}
|
|
410
|
+
if (date === "week") {
|
|
411
|
+
return { $dateToString: { format: "%Y/%V", date: `$${xValue}` } };
|
|
412
|
+
}
|
|
413
|
+
if (date === "month") {
|
|
414
|
+
return { $dateToString: { format: "%Y/%m", date: `$${xValue}` } };
|
|
415
|
+
}
|
|
416
|
+
if (date === "quarter") {
|
|
417
|
+
return {
|
|
418
|
+
$dateToString: {
|
|
419
|
+
format: "%Y/%m",
|
|
420
|
+
date: { $dateTrunc: { date: `$${xValue}`, unit: "quarter" } }
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
if (date === "year") {
|
|
425
|
+
return { $dateToString: { format: "%Y", date: `$${xValue}` } };
|
|
426
|
+
}
|
|
427
|
+
return null;
|
|
428
|
+
}
|
|
429
|
+
async _getExampleDataSets(widget, options = {}, ignoreMultipleColor = false, indexMixedWidget) {
|
|
430
|
+
var _a, _b;
|
|
431
|
+
const result = [];
|
|
432
|
+
const useMultipleDS = widget.use_multiple_data_source || ((_a = widget === null || widget === void 0 ? void 0 : widget.datasets) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
433
|
+
const datasets = !_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.datasets) && _.isArray(widget === null || widget === void 0 ? void 0 : widget.datasets)
|
|
434
|
+
? widget.datasets
|
|
435
|
+
: [widget];
|
|
436
|
+
const randomDataAmount = _.random(5, 10);
|
|
437
|
+
const xValues = _.get(widget, "x_values");
|
|
438
|
+
const dataKey = widget.x_type_date
|
|
439
|
+
? await this._getExampleXValuesDate(widget)
|
|
440
|
+
: _.isEmpty(xValues)
|
|
441
|
+
? Array(randomDataAmount)
|
|
442
|
+
.fill(0)
|
|
443
|
+
.map((i, index) => `Value ${String.fromCharCode(65 + index)}`)
|
|
444
|
+
: xValues;
|
|
445
|
+
for (const ds of datasets) {
|
|
446
|
+
const data = dataKey === null || dataKey === void 0 ? void 0 : dataKey.map(i => ({
|
|
447
|
+
key: i,
|
|
448
|
+
value: _.random(0, 100)
|
|
449
|
+
}));
|
|
450
|
+
let dateCompareData = [];
|
|
451
|
+
if (ds.use_compare_date_range) {
|
|
452
|
+
dateCompareData = dataKey === null || dataKey === void 0 ? void 0 : dataKey.map(i => ({
|
|
453
|
+
key: i,
|
|
454
|
+
value: _.random(0, 100)
|
|
455
|
+
}));
|
|
456
|
+
}
|
|
457
|
+
const multipleColor = ignoreMultipleColor ? false : !useMultipleDS;
|
|
458
|
+
const indexDs = datasets.indexOf(ds);
|
|
459
|
+
const backgroundColor = await this._defaultWidgetColor(ds === null || ds === void 0 ? void 0 : ds.background_color, multipleColor, data === null || data === void 0 ? void 0 : data.length, useMultipleDS, indexDs, indexMixedWidget);
|
|
460
|
+
const datalabels = this._defaultDatalabels(ds);
|
|
461
|
+
const stackName = ds.use_compare_date_range && datasets.length > 1 ? ds.label : undefined;
|
|
462
|
+
widget.type === "horizontal"
|
|
463
|
+
? (options["xAxisID"] = ds.y_axis_id === "y2" ? "x2" : "x")
|
|
464
|
+
: (options["yAxisID"] = ds.y_axis_id === "y2" ? "y2" : "y");
|
|
465
|
+
result.push(Object.assign({ data, stack: stackName, label: ds.label || "", backgroundColor, borderColor: backgroundColor, datalabels }, options));
|
|
466
|
+
if (ds.use_compare_date_range) {
|
|
467
|
+
result.push(Object.assign({ data: dateCompareData, stack: stackName, label: `${ds === null || ds === void 0 ? void 0 : ds.label} previous`, backgroundColor: _.isArray(backgroundColor)
|
|
468
|
+
? backgroundColor.map(i => (0, common_2.hexToRgba)(i, 0.5))
|
|
469
|
+
: (0, common_2.hexToRgba)(backgroundColor, 0.5), borderColor: _.isArray(backgroundColor)
|
|
470
|
+
? backgroundColor.map(i => (0, common_2.hexToRgba)(i, 0.5))
|
|
471
|
+
: (0, common_2.hexToRgba)(backgroundColor, 0.5), datalabels, yValueType: ds.y_value_type, use_compare_date_range: true, borderDash: [5, 5] }, options));
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
const showGroupDate = (widget === null || widget === void 0 ? void 0 : widget.use_group) ? widget.x_type_date : false;
|
|
475
|
+
let dateFormat;
|
|
476
|
+
const listDetail = _.get(constants_1.CONST, "SETTING_GENERAL.list_detail");
|
|
477
|
+
if (_.isEmpty(listDetail) || !listDetail) {
|
|
478
|
+
const general = await (0, schema_1.getSetting)("general");
|
|
479
|
+
const generalList = _.get(general, "list_detail");
|
|
480
|
+
dateFormat = _.get(generalList, `widget_chart_format_${widget.x_group_by}`);
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
dateFormat = _.get(listDetail, `widget_chart_format_${widget.x_group_by}`);
|
|
484
|
+
}
|
|
485
|
+
const labels = [];
|
|
486
|
+
for (const ds of result) {
|
|
487
|
+
if (!_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.x_group_by) && showGroupDate) {
|
|
488
|
+
const getCurrentFormat = (_b = constants_1.CHART_DATE_OPTION.find(i => i.name === widget.x_group_by)) === null || _b === void 0 ? void 0 : _b.value;
|
|
489
|
+
const formattedDates = ds.data.map(i => {
|
|
490
|
+
const dateValue = moment(i.key, getCurrentFormat).format(dateFormat);
|
|
491
|
+
i.key = dateValue;
|
|
492
|
+
return i.key;
|
|
493
|
+
});
|
|
494
|
+
labels.push(...formattedDates);
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
labels.push(...ds.data.map(d => d.key));
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return { result, labels: _.uniq(labels), showGroupDate };
|
|
501
|
+
}
|
|
502
|
+
_formatDate(dateString, dateFormat, compareData) {
|
|
503
|
+
if (!dateFormat)
|
|
504
|
+
return dateString;
|
|
505
|
+
const convertDateFormat = dateFormat
|
|
506
|
+
? dateFormat
|
|
507
|
+
.replace("%d", "DD")
|
|
508
|
+
.replace("%m", "MM")
|
|
509
|
+
.replace("%Y", "YYYY")
|
|
510
|
+
.replace("%V", "WW")
|
|
511
|
+
: "";
|
|
512
|
+
const date = convertDateFormat
|
|
513
|
+
? moment(dateString, convertDateFormat)
|
|
514
|
+
: moment(dateString);
|
|
515
|
+
const compare_number = compareData.compare_number;
|
|
516
|
+
const compare_date_options = compareData.compare_date_options;
|
|
517
|
+
return dateFormat
|
|
518
|
+
? date.add(compare_number, compare_date_options).format(convertDateFormat)
|
|
519
|
+
: date.add(compare_number, compare_date_options).toISOString();
|
|
520
|
+
}
|
|
521
|
+
async _getDataSets(widget, options = {}, ignoreMultipleColor = false) {
|
|
522
|
+
var _a, _b;
|
|
523
|
+
const request = this.cls.get("request");
|
|
524
|
+
const headers = _.get(request, "headers", []);
|
|
525
|
+
const result = [];
|
|
526
|
+
const useMultipleDS = widget.use_multiple_data_source || ((_a = widget === null || widget === void 0 ? void 0 : widget.datasets) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
527
|
+
let datasets = [];
|
|
528
|
+
datasets =
|
|
529
|
+
!_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.datasets) && _.isArray(widget === null || widget === void 0 ? void 0 : widget.datasets)
|
|
530
|
+
? widget.datasets
|
|
531
|
+
: [widget];
|
|
532
|
+
const listDetail = _.get(constants_1.CONST, "SETTING_GENERAL.list_detail");
|
|
533
|
+
let dateFormat;
|
|
534
|
+
dateFormat = datasets[0].x_value_date_format;
|
|
535
|
+
const widgetDataSet = !_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.datasets) && _.isArray(widget === null || widget === void 0 ? void 0 : widget.datasets)
|
|
536
|
+
? widget.datasets
|
|
537
|
+
: [widget];
|
|
538
|
+
const showGroupDate = (widget === null || widget === void 0 ? void 0 : widget.use_group)
|
|
539
|
+
? await this._checkDataSetTypeDate(widgetDataSet)
|
|
540
|
+
: false;
|
|
541
|
+
for (const ds of datasets) {
|
|
542
|
+
const entityName = ds.entity;
|
|
543
|
+
const filter = ds.filter;
|
|
544
|
+
const xValueKey = ds.x_value_key;
|
|
545
|
+
const xValueDateFormat = dateFormat;
|
|
546
|
+
const xGroupBy = _.isEmpty(widget.x_group_by) ? "day" : widget.x_group_by;
|
|
547
|
+
const groupBy = this._getDateFormat(xGroupBy, ds.x_value_key);
|
|
548
|
+
const xValueRelateFormat = ds.x_value_related_format;
|
|
549
|
+
const yValueKey = ds.y_value_key;
|
|
550
|
+
if (_.isEmpty(entityName) || _.isEmpty(filter) || _.isEmpty(xValueKey)) {
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
553
|
+
const entity = await (0, schema_1.loadEntity)(entityName);
|
|
554
|
+
const query = [];
|
|
555
|
+
const relateEntity = xValueRelateFormat
|
|
556
|
+
? entity.fields.find(i => i.name === xValueKey)
|
|
557
|
+
: {};
|
|
558
|
+
const matchFilter = (0, mongo_1.convertFilterToMongoQuery)(filter, entity, true);
|
|
559
|
+
query.push({ $match: { $and: matchFilter } });
|
|
560
|
+
const group = {
|
|
561
|
+
_id: undefined,
|
|
562
|
+
value: { $sum: undefined }
|
|
563
|
+
};
|
|
564
|
+
if (!!groupBy && showGroupDate) {
|
|
565
|
+
group._id = groupBy;
|
|
566
|
+
}
|
|
567
|
+
else if (_.isEmpty(xValueDateFormat)) {
|
|
568
|
+
group._id = `$${xValueKey}`;
|
|
569
|
+
}
|
|
570
|
+
else {
|
|
571
|
+
group._id = {
|
|
572
|
+
$dateToString: {
|
|
573
|
+
format: xValueDateFormat,
|
|
574
|
+
date: `$${xValueKey}`
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
if (_.isEmpty(yValueKey)) {
|
|
579
|
+
group.value.$sum = 1;
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
group.value.$sum = widget.use_negative_value
|
|
583
|
+
? { $multiply: [`$${yValueKey}`, -1] }
|
|
584
|
+
: `$${yValueKey}`;
|
|
585
|
+
}
|
|
586
|
+
query.push({
|
|
587
|
+
$group: group
|
|
588
|
+
});
|
|
589
|
+
query.push({
|
|
590
|
+
$project: {
|
|
591
|
+
_id: 0,
|
|
592
|
+
key: "$_id",
|
|
593
|
+
value: "$value"
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
if (!_.isEmpty(yValueKey)) {
|
|
597
|
+
query.push({
|
|
598
|
+
$sort: { [yValueKey]: 1 }
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
query.push({ $sort: { key: 1 } });
|
|
602
|
+
if (widget.use_sort) {
|
|
603
|
+
query.push({
|
|
604
|
+
$sort: {
|
|
605
|
+
value: widget.sort_order === "asc" ? 1 : -1
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
+widget.limit > 0 &&
|
|
609
|
+
query.push({
|
|
610
|
+
$limit: +widget.limit
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
let data = await (0, schema_1.callInternalService)(entityName, "patch", "aggregate", query, headers);
|
|
614
|
+
let dateCompareData = [];
|
|
615
|
+
if (ds.use_compare_date_range && ds.compare_number > 0) {
|
|
616
|
+
const cloneQuery = _.cloneDeep(query);
|
|
617
|
+
const dateMatch = cloneQuery[0];
|
|
618
|
+
for (const i of _.get(dateMatch, "$match.$and")) {
|
|
619
|
+
for (const field in i) {
|
|
620
|
+
if (!this._isTypeDate(entity.fields, field))
|
|
621
|
+
continue;
|
|
622
|
+
if (i[field]["$gte"]) {
|
|
623
|
+
i[field]["$gte"] = moment(i[field]["$gte"])
|
|
624
|
+
.subtract(ds.compare_number, ds.compare_date_options)
|
|
625
|
+
.toDate();
|
|
626
|
+
}
|
|
627
|
+
if (i[field]["$lte"]) {
|
|
628
|
+
i[field]["$lte"] = moment(i[field]["$lte"])
|
|
629
|
+
.subtract(ds.compare_number, ds.compare_date_options)
|
|
630
|
+
.toDate();
|
|
631
|
+
}
|
|
632
|
+
if (i[field]["$eq"]) {
|
|
633
|
+
i[field]["$eq"] = moment(i[field]["$eq"])
|
|
634
|
+
.subtract(ds.compare_number, ds.compare_date_options)
|
|
635
|
+
.toDate();
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
dateCompareData = await (0, schema_1.callInternalService)(entityName, "patch", "aggregate", cloneQuery);
|
|
640
|
+
}
|
|
641
|
+
const list = (relateEntity === null || relateEntity === void 0 ? void 0 : relateEntity["related_ref"])
|
|
642
|
+
? await (0, schema_1.callListInternalService)(relateEntity === null || relateEntity === void 0 ? void 0 : relateEntity["related_ref"], undefined, { _id: { $in: data.map(i => i.key).filter(i => !!i) } })
|
|
643
|
+
: { rows: [] };
|
|
644
|
+
for (const d of data) {
|
|
645
|
+
if (_.isArray(d.key)) {
|
|
646
|
+
d.key = d.key.join(",");
|
|
647
|
+
}
|
|
648
|
+
if ((ds === null || ds === void 0 ? void 0 : ds.y_value_type) === "percentage") {
|
|
649
|
+
d.value = d.value * 100;
|
|
650
|
+
}
|
|
651
|
+
if (!xValueRelateFormat)
|
|
652
|
+
continue;
|
|
653
|
+
const exist = list.rows.find(i => i.id === d.key);
|
|
654
|
+
if (!exist)
|
|
655
|
+
continue;
|
|
656
|
+
d.key = await (0, func_1.executeFunc)((0, transform_1.transformString)(xValueRelateFormat, exist), entity, exist);
|
|
657
|
+
try {
|
|
658
|
+
d.key = (0, eval_1.safeEval)((0, eval_1.sanitizeExpression)(`return (${d.key})`));
|
|
659
|
+
}
|
|
660
|
+
catch (e) { }
|
|
661
|
+
}
|
|
662
|
+
for (const d of dateCompareData) {
|
|
663
|
+
if (_.isArray(d.key)) {
|
|
664
|
+
d.key = d.key.join(",");
|
|
665
|
+
}
|
|
666
|
+
if ((ds === null || ds === void 0 ? void 0 : ds.y_value_type) === "percentage") {
|
|
667
|
+
d.value = d.value * 100;
|
|
668
|
+
}
|
|
669
|
+
d.oldkey = d.key;
|
|
670
|
+
if (this._isTypeDate(entity.fields, xValueKey)) {
|
|
671
|
+
const dateFormat = !!groupBy
|
|
672
|
+
? _.get(groupBy, "$dateToString.format")
|
|
673
|
+
: ds.x_value_date_format;
|
|
674
|
+
d.key = this._formatDate(d.key, dateFormat, ds);
|
|
675
|
+
}
|
|
676
|
+
if (!xValueRelateFormat)
|
|
677
|
+
continue;
|
|
678
|
+
const exist = list.rows.find(i => i.id === d.key);
|
|
679
|
+
if (!exist)
|
|
680
|
+
continue;
|
|
681
|
+
d.key = await (0, func_1.executeFunc)((0, transform_1.transformString)(xValueRelateFormat, exist), entity, exist);
|
|
682
|
+
try {
|
|
683
|
+
d.key = (0, eval_1.safeEval)((0, eval_1.sanitizeExpression)(`return (${d.key})`));
|
|
684
|
+
}
|
|
685
|
+
catch (e) { }
|
|
686
|
+
}
|
|
687
|
+
const multipleColor = ignoreMultipleColor ? false : !useMultipleDS;
|
|
688
|
+
const indexDs = datasets.indexOf(ds);
|
|
689
|
+
const dataKey = ds.use_compare_date_range
|
|
690
|
+
? _.sortBy(_.uniqBy([...data, ...dateCompareData]), "key")
|
|
691
|
+
: data;
|
|
692
|
+
const backgroundColor = await this._defaultWidgetColor(ds === null || ds === void 0 ? void 0 : ds.background_color, multipleColor, dataKey === null || dataKey === void 0 ? void 0 : dataKey.length, useMultipleDS, indexDs);
|
|
693
|
+
const datalabels = this._defaultDatalabels(ds);
|
|
694
|
+
widget.type === "horizontal"
|
|
695
|
+
? (options["xAxisID"] = ds.y_axis_id === "y2" ? "x2" : "x")
|
|
696
|
+
: (options["yAxisID"] = ds.y_axis_id === "y2" ? "y2" : "y");
|
|
697
|
+
const stackName = ds.use_compare_date_range && datasets.length > 1 ? ds.label : undefined;
|
|
698
|
+
result.push(Object.assign({ data, stack: stackName, label: `${ds === null || ds === void 0 ? void 0 : ds.label}`, backgroundColor: _.isArray(backgroundColor)
|
|
699
|
+
? this._findColors(backgroundColor, data, dataKey)
|
|
700
|
+
: backgroundColor, borderColor: _.isArray(backgroundColor)
|
|
701
|
+
? this._findColors(backgroundColor, data, dataKey)
|
|
702
|
+
: backgroundColor, yValueType: ds.y_value_type, datalabels }, options));
|
|
703
|
+
if (ds.use_compare_date_range) {
|
|
704
|
+
result.push(Object.assign({ data: dateCompareData, stack: stackName, label: `${ds === null || ds === void 0 ? void 0 : ds.label} previous`, backgroundColor: _.isArray(backgroundColor)
|
|
705
|
+
? this._findColors(backgroundColor, dateCompareData, dataKey).map(i => (0, common_2.hexToRgba)(i, 0.5))
|
|
706
|
+
: (0, common_2.hexToRgba)(backgroundColor, 0.5), borderColor: _.isArray(backgroundColor)
|
|
707
|
+
? this._findColors(backgroundColor, dateCompareData, dataKey).map(i => (0, common_2.hexToRgba)(i, 0.5))
|
|
708
|
+
: (0, common_2.hexToRgba)(backgroundColor, 0.5), datalabels, yValueType: ds.y_value_type, use_compare_date_range: true, borderDash: [5, 5] }, options));
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
const labels = [];
|
|
712
|
+
if (!_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.x_group_by) && showGroupDate) {
|
|
713
|
+
if (_.isEmpty(listDetail) || !listDetail) {
|
|
714
|
+
const general = await (0, schema_1.getSetting)("general");
|
|
715
|
+
const generalList = _.get(general, "list_detail");
|
|
716
|
+
dateFormat = _.get(generalList, `widget_chart_format_${widget === null || widget === void 0 ? void 0 : widget.x_group_by}`);
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
dateFormat = _.get(listDetail, `widget_chart_format_${widget === null || widget === void 0 ? void 0 : widget.x_group_by}`);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
for (const ds of result) {
|
|
723
|
+
if (!_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.x_group_by) && showGroupDate) {
|
|
724
|
+
const getCurrentFormat = (_b = constants_1.CHART_DATE_OPTION.find(i => i.name === widget.x_group_by)) === null || _b === void 0 ? void 0 : _b.value;
|
|
725
|
+
const formattedDates = ds.data.map(i => {
|
|
726
|
+
const dateValue = moment(i.key, getCurrentFormat).format(dateFormat);
|
|
727
|
+
const originalKey = i.key;
|
|
728
|
+
i.key = dateValue;
|
|
729
|
+
if (i.oldkey) {
|
|
730
|
+
i.oldkey = moment(i.oldkey, getCurrentFormat).format(dateFormat);
|
|
731
|
+
}
|
|
732
|
+
return {
|
|
733
|
+
key: i.key,
|
|
734
|
+
original_key: originalKey
|
|
735
|
+
};
|
|
736
|
+
});
|
|
737
|
+
labels.push(...formattedDates);
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
ds.data = ds.data.map(d => {
|
|
741
|
+
const nKey = widget.use_pascal ? _.startCase(d.key) : d.key;
|
|
742
|
+
return Object.assign(Object.assign({}, d), { key: nKey });
|
|
743
|
+
});
|
|
744
|
+
labels.push(...ds.data.map(d => ({ key: d.key, orignial_key: d.key })));
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
return {
|
|
748
|
+
result,
|
|
749
|
+
labels: _.uniq(_.sortBy(labels, "original_key").map(i => i.key)),
|
|
750
|
+
showGroupDate
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
async _getExampleDataSetsXYR(widget, options = {}) {
|
|
754
|
+
const result = [];
|
|
755
|
+
let datasets = [];
|
|
756
|
+
datasets =
|
|
757
|
+
!_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.datasets) && _.isArray(widget === null || widget === void 0 ? void 0 : widget.datasets)
|
|
758
|
+
? widget.datasets
|
|
759
|
+
: [widget];
|
|
760
|
+
const randomDataAmount = _.random(5, 10);
|
|
761
|
+
for (const ds of datasets) {
|
|
762
|
+
const rValueKey = ds.r_value_key;
|
|
763
|
+
const data = Array(randomDataAmount)
|
|
764
|
+
.fill(0)
|
|
765
|
+
.map((i, index) => {
|
|
766
|
+
const res = {
|
|
767
|
+
x: _.random(0, 10),
|
|
768
|
+
y: _.random(0, 10)
|
|
769
|
+
};
|
|
770
|
+
if (rValueKey) {
|
|
771
|
+
res["r"] = _.random(5, 25);
|
|
772
|
+
}
|
|
773
|
+
return res;
|
|
774
|
+
});
|
|
775
|
+
result.push(Object.assign({ data, label: ds.label || "", backgroundColor: ds.background_color }, options));
|
|
776
|
+
}
|
|
777
|
+
return { result };
|
|
778
|
+
}
|
|
779
|
+
async _getDataSetsXYR(widget, options = {}) {
|
|
780
|
+
const result = [];
|
|
781
|
+
let datasets = [];
|
|
782
|
+
datasets =
|
|
783
|
+
!_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.datasets) && _.isArray(widget === null || widget === void 0 ? void 0 : widget.datasets)
|
|
784
|
+
? widget.datasets
|
|
785
|
+
: [widget];
|
|
786
|
+
for (const ds of datasets) {
|
|
787
|
+
const entityName = ds.entity;
|
|
788
|
+
const filter = ds.filter;
|
|
789
|
+
const xValueKey = ds.x_value_key;
|
|
790
|
+
const yValueKey = ds.y_value_key;
|
|
791
|
+
const rValueKey = ds.r_value_key;
|
|
792
|
+
if (_.isEmpty(entityName) || _.isEmpty(filter) || _.isEmpty(xValueKey)) {
|
|
793
|
+
continue;
|
|
794
|
+
}
|
|
795
|
+
const entity = await (0, schema_1.loadEntity)(entityName);
|
|
796
|
+
const query = [];
|
|
797
|
+
const matchFilter = (0, mongo_1.convertFilterToMongoQuery)(filter, entity, true);
|
|
798
|
+
query.push({ $match: { $and: matchFilter } });
|
|
799
|
+
const project = {
|
|
800
|
+
_id: 0,
|
|
801
|
+
x: `$${xValueKey}`,
|
|
802
|
+
y: `$${yValueKey}`
|
|
803
|
+
};
|
|
804
|
+
if (!_.isEmpty(rValueKey)) {
|
|
805
|
+
project["r"] = `$${rValueKey}`;
|
|
806
|
+
}
|
|
807
|
+
query.push({
|
|
808
|
+
$project: project
|
|
809
|
+
});
|
|
810
|
+
const data = await (0, schema_1.callInternalService)(entityName, "patch", "aggregate", query);
|
|
811
|
+
result.push(Object.assign({ data, label: ds.label || "", backgroundColor: ds.background_color }, options));
|
|
812
|
+
}
|
|
813
|
+
return { result };
|
|
814
|
+
}
|
|
815
|
+
async _barWidget(widget, applyOptionsInDs = false, useExample = false, indexMixedWidget) {
|
|
816
|
+
const result = await this._defaultWidget(widget, "bar");
|
|
817
|
+
const haveY2 = (widget.datasets || []).some(i => (i === null || i === void 0 ? void 0 : i.y_axis_id) === "y2");
|
|
818
|
+
const type = widget.type;
|
|
819
|
+
const options = {};
|
|
820
|
+
if (applyOptionsInDs) {
|
|
821
|
+
if (type === "horizontal") {
|
|
822
|
+
_.set(options, "indexAxis", "y");
|
|
823
|
+
_.set(options, "parsing.xAxisKey", "value");
|
|
824
|
+
_.set(options, "parsing.yAxisKey", "key");
|
|
825
|
+
}
|
|
826
|
+
if (!_.isUndefined(widget.border_width)) {
|
|
827
|
+
_.set(options, "borderWidth", _.isNumber(widget.border_width) ? widget.border_width : 1);
|
|
828
|
+
}
|
|
829
|
+
if (haveY2) {
|
|
830
|
+
type === "horizontal"
|
|
831
|
+
? _.set(options, "scales.x2", {
|
|
832
|
+
position: "top",
|
|
833
|
+
grid: {
|
|
834
|
+
display: !["none", "y_only"].includes(widget.display_grid)
|
|
835
|
+
}
|
|
836
|
+
})
|
|
837
|
+
: _.set(options, "scales.y2", {
|
|
838
|
+
position: "right",
|
|
839
|
+
grid: {
|
|
840
|
+
display: !["none", "x_only"].includes(widget.display_grid)
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
switch (widget.display_grid) {
|
|
845
|
+
case "none":
|
|
846
|
+
_.set(options, "scales.x.grid.display", false);
|
|
847
|
+
_.set(options, "scales.y.grid.display", false);
|
|
848
|
+
case "x_only":
|
|
849
|
+
_.set(options, "scales.y.grid.display", false);
|
|
850
|
+
break;
|
|
851
|
+
case "y_only":
|
|
852
|
+
_.set(options, "scales.x.grid.display", false);
|
|
853
|
+
break;
|
|
854
|
+
}
|
|
855
|
+
if (widget.stacked) {
|
|
856
|
+
_.set(options, "scales.x.stacked", true);
|
|
857
|
+
_.set(options, "scales.y.stacked", true);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
else {
|
|
861
|
+
if (type === "horizontal") {
|
|
862
|
+
_.set(result, "options.indexAxis", "y");
|
|
863
|
+
_.set(result, "options.parsing.xAxisKey", "value");
|
|
864
|
+
_.set(result, "options.parsing.yAxisKey", "key");
|
|
865
|
+
}
|
|
866
|
+
if (!_.isUndefined(widget.border_width)) {
|
|
867
|
+
_.set(result, "options.elements.bar.borderWidth", _.isNumber(widget.border_width) ? widget.border_width : 1);
|
|
868
|
+
}
|
|
869
|
+
if (haveY2) {
|
|
870
|
+
type === "horizontal"
|
|
871
|
+
? _.set(result, "options.scales.x2", {
|
|
872
|
+
position: "top",
|
|
873
|
+
grid: {
|
|
874
|
+
display: !["none", "y_only"].includes(widget.display_grid)
|
|
875
|
+
}
|
|
876
|
+
})
|
|
877
|
+
: _.set(result, "options.scales.y2", {
|
|
878
|
+
position: "right",
|
|
879
|
+
grid: {
|
|
880
|
+
display: !["none", "x_only"].includes(widget.display_grid)
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
switch (widget.display_grid) {
|
|
885
|
+
case "none":
|
|
886
|
+
_.set(result, "options.scales.x.grid.display", false);
|
|
887
|
+
_.set(result, "options.scales.y.grid.display", false);
|
|
888
|
+
case "x_only":
|
|
889
|
+
_.set(result, "options.scales.y.grid.display", false);
|
|
890
|
+
break;
|
|
891
|
+
case "y_only":
|
|
892
|
+
_.set(result, "options.scales.x.grid.display", false);
|
|
893
|
+
break;
|
|
894
|
+
}
|
|
895
|
+
if (widget.stacked) {
|
|
896
|
+
_.set(result, "options.scales.x.stacked", true);
|
|
897
|
+
_.set(result, "options.scales.y.stacked", true);
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
const ignoreMultipleColor = applyOptionsInDs;
|
|
901
|
+
const { result: datasets, labels, showGroupDate } = useExample
|
|
902
|
+
? await this._getExampleDataSets(widget, options, ignoreMultipleColor, indexMixedWidget)
|
|
903
|
+
: await this._getDataSets(widget, options, ignoreMultipleColor);
|
|
904
|
+
let nLabels = _.cloneDeep(labels);
|
|
905
|
+
if ((widget === null || widget === void 0 ? void 0 : widget.line_length) > 0 && (widget === null || widget === void 0 ? void 0 : widget.label_length) > 0) {
|
|
906
|
+
nLabels = this._cutLabel(nLabels, widget === null || widget === void 0 ? void 0 : widget.label_length, widget === null || widget === void 0 ? void 0 : widget.line_length);
|
|
907
|
+
}
|
|
908
|
+
result.show_group_date = showGroupDate;
|
|
909
|
+
result.data = {
|
|
910
|
+
labels: labels,
|
|
911
|
+
datasets
|
|
912
|
+
};
|
|
913
|
+
result.cut_labels = nLabels;
|
|
914
|
+
return result;
|
|
915
|
+
}
|
|
916
|
+
async _lineWidget(widget, applyOptionsInDs = false, useExample, indexMixedWidget) {
|
|
917
|
+
const result = await this._defaultWidget(widget, "line");
|
|
918
|
+
const fill = widget.fill || "none";
|
|
919
|
+
const haveY2 = (widget.datasets || []).some(i => (i === null || i === void 0 ? void 0 : i.y_axis_id) === "y2");
|
|
920
|
+
const options = {};
|
|
921
|
+
if (applyOptionsInDs) {
|
|
922
|
+
if (!_.isUndefined(widget.border_width)) {
|
|
923
|
+
_.set(options, "borderWidth", _.isNumber(widget.border_width) ? widget.border_width : 1);
|
|
924
|
+
}
|
|
925
|
+
switch (widget.style) {
|
|
926
|
+
case "smooth":
|
|
927
|
+
_.set(options, "tension", 0.4);
|
|
928
|
+
break;
|
|
929
|
+
case "stepped":
|
|
930
|
+
_.set(options, "stepped", true);
|
|
931
|
+
break;
|
|
932
|
+
}
|
|
933
|
+
if (fill !== "none") {
|
|
934
|
+
_.set(options, "fill", fill);
|
|
935
|
+
}
|
|
936
|
+
if (haveY2) {
|
|
937
|
+
_.set(options, "scales.y2", {
|
|
938
|
+
position: "right",
|
|
939
|
+
grid: {
|
|
940
|
+
display: !["none", "x_only"].includes(widget.display_grid)
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
switch (widget.display_grid) {
|
|
945
|
+
case "none":
|
|
946
|
+
_.set(options, "scales.x.grid.display", false);
|
|
947
|
+
_.set(options, "scales.y.grid.display", false);
|
|
948
|
+
case "x_only":
|
|
949
|
+
_.set(options, "scales.y.grid.display", false);
|
|
950
|
+
break;
|
|
951
|
+
case "y_only":
|
|
952
|
+
_.set(options, "scales.x.grid.display", false);
|
|
953
|
+
break;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
if (!_.isUndefined(widget.border_width)) {
|
|
958
|
+
_.set(result, "options.elements.line.borderWidth", _.isNumber(widget.border_width) ? widget.border_width : 1);
|
|
959
|
+
}
|
|
960
|
+
switch (widget.style) {
|
|
961
|
+
case "smooth":
|
|
962
|
+
_.set(result, "options.elements.line.tension", 0.4);
|
|
963
|
+
break;
|
|
964
|
+
case "stepped":
|
|
965
|
+
_.set(result, "options.elements.line.stepped", true);
|
|
966
|
+
break;
|
|
967
|
+
}
|
|
968
|
+
if (fill !== "none") {
|
|
969
|
+
_.set(result, "options.elements.line.fill", fill);
|
|
970
|
+
}
|
|
971
|
+
if (haveY2) {
|
|
972
|
+
_.set(result, "options.scales.y2", {
|
|
973
|
+
position: "right",
|
|
974
|
+
grid: {
|
|
975
|
+
display: !["none", "x_only"].includes(widget.display_grid)
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
switch (widget.display_grid) {
|
|
980
|
+
case "none":
|
|
981
|
+
_.set(result, "options.scales.x.grid.display", false);
|
|
982
|
+
_.set(result, "options.scales.y.grid.display", false);
|
|
983
|
+
case "x_only":
|
|
984
|
+
_.set(result, "options.scales.y.grid.display", false);
|
|
985
|
+
break;
|
|
986
|
+
case "y_only":
|
|
987
|
+
_.set(result, "options.scales.x.grid.display", false);
|
|
988
|
+
break;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
const { result: datasets, labels, showGroupDate } = useExample
|
|
992
|
+
? await this._getExampleDataSets(widget, options, true, indexMixedWidget)
|
|
993
|
+
: await this._getDataSets(widget, options, true);
|
|
994
|
+
let nLabels = _.cloneDeep(labels);
|
|
995
|
+
if ((widget === null || widget === void 0 ? void 0 : widget.line_length) > 0 && (widget === null || widget === void 0 ? void 0 : widget.label_length) > 0) {
|
|
996
|
+
nLabels = this._cutLabel(nLabels, widget === null || widget === void 0 ? void 0 : widget.label_length, widget.line_length);
|
|
997
|
+
}
|
|
998
|
+
result.show_group_date = showGroupDate;
|
|
999
|
+
result.data = {
|
|
1000
|
+
labels: labels,
|
|
1001
|
+
datasets
|
|
1002
|
+
};
|
|
1003
|
+
result.cut_labels = nLabels;
|
|
1004
|
+
return result;
|
|
1005
|
+
}
|
|
1006
|
+
async _pieWidget(widget, useExample) {
|
|
1007
|
+
var _a;
|
|
1008
|
+
const widgetType = widget.use_doughnut ? "doughnut" : "pie";
|
|
1009
|
+
const result = await this._defaultWidget(widget, widgetType);
|
|
1010
|
+
const haveShowLabel = (_a = widget.datasets) === null || _a === void 0 ? void 0 : _a.some(i => i.dataset_show_label);
|
|
1011
|
+
_.set(result, "options.elements.arc.hoverOffset", 4);
|
|
1012
|
+
_.set(result, "options.radius", haveShowLabel ? "75%" : "85%");
|
|
1013
|
+
if (widget.cutout) {
|
|
1014
|
+
_.set(result, "options.cutout", widget.cutout);
|
|
1015
|
+
}
|
|
1016
|
+
const { result: datasets, labels } = useExample
|
|
1017
|
+
? await this._getExampleDataSets(widget)
|
|
1018
|
+
: await this._getDataSets(widget);
|
|
1019
|
+
result.data = { labels, datasets };
|
|
1020
|
+
return result;
|
|
1021
|
+
}
|
|
1022
|
+
async _radarWidget(widget, useExample) {
|
|
1023
|
+
const result = await this._defaultWidget(widget, "radar");
|
|
1024
|
+
_.set(result, "options.elements.line.borderWidth", widget.border_width || 1);
|
|
1025
|
+
const { result: datasets, labels } = useExample
|
|
1026
|
+
? await this._getExampleDataSets(widget, {}, true)
|
|
1027
|
+
: await this._getDataSets(widget, {}, true);
|
|
1028
|
+
result.data = { datasets };
|
|
1029
|
+
if (_.isEmpty(datasets)) {
|
|
1030
|
+
return result;
|
|
1031
|
+
}
|
|
1032
|
+
result.data = { labels, datasets };
|
|
1033
|
+
return result;
|
|
1034
|
+
}
|
|
1035
|
+
async _polarAreaWidget(widget, useExample) {
|
|
1036
|
+
const result = await this._defaultWidget(widget, "polarArea");
|
|
1037
|
+
delete result.options.elements;
|
|
1038
|
+
delete result.options.parsing;
|
|
1039
|
+
const { result: datasets } = useExample
|
|
1040
|
+
? await this._getExampleDataSets(widget)
|
|
1041
|
+
: await this._getDataSets(widget);
|
|
1042
|
+
if (_.isEmpty(datasets)) {
|
|
1043
|
+
return result;
|
|
1044
|
+
}
|
|
1045
|
+
const labels = datasets[0].data.map(d => d.key);
|
|
1046
|
+
const values = datasets[0].data.map(d => d.value);
|
|
1047
|
+
delete datasets[0].data.label;
|
|
1048
|
+
datasets[0].data = values;
|
|
1049
|
+
result.data = { labels, datasets };
|
|
1050
|
+
return result;
|
|
1051
|
+
}
|
|
1052
|
+
async _bubbleWidget(widget, useExample) {
|
|
1053
|
+
const result = await this._defaultWidget(widget, "bubble");
|
|
1054
|
+
delete result.options.elements;
|
|
1055
|
+
delete result.options.parsing;
|
|
1056
|
+
const { result: datasets } = useExample
|
|
1057
|
+
? await this._getExampleDataSetsXYR(widget)
|
|
1058
|
+
: await this._getDataSetsXYR(widget);
|
|
1059
|
+
result.data = { datasets };
|
|
1060
|
+
return result;
|
|
1061
|
+
}
|
|
1062
|
+
async _scatterWidget(widget, useExample) {
|
|
1063
|
+
const result = await this._defaultWidget(widget, "scatter");
|
|
1064
|
+
delete result.options.elements;
|
|
1065
|
+
delete result.options.parsing;
|
|
1066
|
+
const { result: datasets } = useExample
|
|
1067
|
+
? await this._getExampleDataSetsXYR(widget)
|
|
1068
|
+
: await this._getDataSetsXYR(widget);
|
|
1069
|
+
result.data = { datasets };
|
|
1070
|
+
return result;
|
|
1071
|
+
}
|
|
1072
|
+
async _mixedWidget(widget, useExample) {
|
|
1073
|
+
const result = await this._defaultWidget(widget, "bar");
|
|
1074
|
+
if (widget.use_bar_stack) {
|
|
1075
|
+
_.set(result, "options.scales.x.stacked", true);
|
|
1076
|
+
_.set(result, "options.scales.y.stacked", true);
|
|
1077
|
+
}
|
|
1078
|
+
const datasets = [];
|
|
1079
|
+
const labels = [];
|
|
1080
|
+
const widgetDataSet = !_.isEmpty(widget === null || widget === void 0 ? void 0 : widget.datasets) && _.isArray(widget === null || widget === void 0 ? void 0 : widget.datasets)
|
|
1081
|
+
? widget.datasets
|
|
1082
|
+
: [widget];
|
|
1083
|
+
const haveY2 = widgetDataSet.some(i => (i === null || i === void 0 ? void 0 : i.y_axis_id) === "y2");
|
|
1084
|
+
if (haveY2) {
|
|
1085
|
+
_.set(result, "options.scales.y2", {
|
|
1086
|
+
position: "right"
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
const showGroupDate = widget.use_example
|
|
1090
|
+
? widget.x_type_date
|
|
1091
|
+
: await this._checkDataSetTypeDate(widgetDataSet);
|
|
1092
|
+
for (let i = 0; i < widget.datasets.length; i++) {
|
|
1093
|
+
const ds = widget.datasets[i];
|
|
1094
|
+
let wds = {};
|
|
1095
|
+
ds.use_group = (widget === null || widget === void 0 ? void 0 : widget.use_group) || false;
|
|
1096
|
+
switch (ds.type) {
|
|
1097
|
+
case layout_constant_1.LayoutChartWidgetType.bar:
|
|
1098
|
+
if (widget.use_bar_stack) {
|
|
1099
|
+
ds["stack"] = "BarChart";
|
|
1100
|
+
}
|
|
1101
|
+
wds = await this._barWidget(ds, true, useExample, i);
|
|
1102
|
+
break;
|
|
1103
|
+
case layout_constant_1.LayoutChartWidgetType.line:
|
|
1104
|
+
wds = await this._lineWidget(ds, true, useExample, i);
|
|
1105
|
+
break;
|
|
1106
|
+
}
|
|
1107
|
+
if (!_.isEmpty(wds)) {
|
|
1108
|
+
labels.push(...wds.data.labels);
|
|
1109
|
+
datasets.push(...wds.data.datasets.map(dataset => (Object.assign({ type: ds.type, order: widget.datasets.length - i }, dataset))));
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
let nLabels = _.cloneDeep(_.uniq(labels));
|
|
1113
|
+
if ((widget === null || widget === void 0 ? void 0 : widget.line_length) > 0 && (widget === null || widget === void 0 ? void 0 : widget.label_length) > 0) {
|
|
1114
|
+
nLabels = this._cutLabel(nLabels, widget === null || widget === void 0 ? void 0 : widget.label_length, widget.line_length);
|
|
1115
|
+
}
|
|
1116
|
+
result.show_group_date = showGroupDate;
|
|
1117
|
+
result.data = {
|
|
1118
|
+
labels: showGroupDate ? _.uniq(labels) : _.uniq(labels).sort(),
|
|
1119
|
+
datasets
|
|
1120
|
+
};
|
|
1121
|
+
result.data = { datasets };
|
|
1122
|
+
result.cut_labels = nLabels;
|
|
1123
|
+
return result;
|
|
1124
|
+
}
|
|
1125
|
+
async _getExampleData(type, widget) {
|
|
1126
|
+
switch (type) {
|
|
1127
|
+
case layout_constant_1.LayoutChartWidgetType.summary:
|
|
1128
|
+
return this._summaryWidgetExample(widget);
|
|
1129
|
+
case layout_constant_1.LayoutChartWidgetType.bar:
|
|
1130
|
+
return this._barWidget(widget, undefined, true);
|
|
1131
|
+
case layout_constant_1.LayoutChartWidgetType.line:
|
|
1132
|
+
return this._lineWidget(widget, undefined, true);
|
|
1133
|
+
case layout_constant_1.LayoutChartWidgetType.pie:
|
|
1134
|
+
return this._pieWidget(widget, true);
|
|
1135
|
+
case layout_constant_1.LayoutChartWidgetType.radar:
|
|
1136
|
+
return this._radarWidget(widget, true);
|
|
1137
|
+
case layout_constant_1.LayoutChartWidgetType.polar_area:
|
|
1138
|
+
return this._polarAreaWidget(widget, true);
|
|
1139
|
+
case layout_constant_1.LayoutChartWidgetType.bubble:
|
|
1140
|
+
return this._bubbleWidget(widget, true);
|
|
1141
|
+
case layout_constant_1.LayoutChartWidgetType.scatter:
|
|
1142
|
+
return this._scatterWidget(widget, true);
|
|
1143
|
+
case layout_constant_1.LayoutChartWidgetType.mixed:
|
|
1144
|
+
return this._mixedWidget(widget, true);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
async getChartWidgetData(type, widget) {
|
|
1148
|
+
if (widget === null || widget === void 0 ? void 0 : widget.use_example) {
|
|
1149
|
+
return this._getExampleData(type, widget);
|
|
1150
|
+
}
|
|
1151
|
+
switch (type) {
|
|
1152
|
+
case layout_constant_1.LayoutChartWidgetType.summary:
|
|
1153
|
+
return this._summaryWidget(widget);
|
|
1154
|
+
case layout_constant_1.LayoutChartWidgetType.bar:
|
|
1155
|
+
return this._barWidget(widget);
|
|
1156
|
+
case layout_constant_1.LayoutChartWidgetType.line:
|
|
1157
|
+
return this._lineWidget(widget);
|
|
1158
|
+
case layout_constant_1.LayoutChartWidgetType.pie:
|
|
1159
|
+
return this._pieWidget(widget);
|
|
1160
|
+
case layout_constant_1.LayoutChartWidgetType.radar:
|
|
1161
|
+
return this._radarWidget(widget);
|
|
1162
|
+
case layout_constant_1.LayoutChartWidgetType.polar_area:
|
|
1163
|
+
return this._polarAreaWidget(widget);
|
|
1164
|
+
case layout_constant_1.LayoutChartWidgetType.bubble:
|
|
1165
|
+
return this._bubbleWidget(widget);
|
|
1166
|
+
case layout_constant_1.LayoutChartWidgetType.scatter:
|
|
1167
|
+
return this._scatterWidget(widget);
|
|
1168
|
+
case layout_constant_1.LayoutChartWidgetType.mixed:
|
|
1169
|
+
return this._mixedWidget(widget);
|
|
1170
|
+
default:
|
|
1171
|
+
return {};
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
_mergeCompareData(currentArray, compareArray, uniqueFields, compareFields, columnsList, fields, setting) {
|
|
1175
|
+
const newArray = [];
|
|
1176
|
+
const { compare_number, compare_date_options } = setting;
|
|
1177
|
+
const onlyDateFields = uniqueFields.filter(i => this._isTypeDate(fields, i));
|
|
1178
|
+
for (const currObj of currentArray) {
|
|
1179
|
+
const matchPrev = compareArray.find(prevObj => _.isEqual(_.pick(currObj, uniqueFields), _.pick(prevObj, uniqueFields)));
|
|
1180
|
+
for (const prop in currObj) {
|
|
1181
|
+
if (compareFields.includes(prop)) {
|
|
1182
|
+
const column = columnsList.find(i => i.key === prop);
|
|
1183
|
+
const isPercent = _.get(column, "format_type") === "percent";
|
|
1184
|
+
const currentValue = currObj[prop];
|
|
1185
|
+
const previousValue = _.get(matchPrev, prop, 0);
|
|
1186
|
+
const compareValue = (0, chart_1.calCompareValue)(currentValue, previousValue, isPercent);
|
|
1187
|
+
_.set(currObj, prop, compareValue);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
newArray.push(currObj);
|
|
1191
|
+
}
|
|
1192
|
+
for (const prevObj of compareArray) {
|
|
1193
|
+
const matchPrev = newArray.find(obj => _.isEqual(_.pick(obj, uniqueFields), _.pick(prevObj, uniqueFields)));
|
|
1194
|
+
if (matchPrev) {
|
|
1195
|
+
continue;
|
|
1196
|
+
}
|
|
1197
|
+
for (const prop in prevObj) {
|
|
1198
|
+
if (compareFields.includes(prop)) {
|
|
1199
|
+
const column = columnsList.find(i => i.key === prop);
|
|
1200
|
+
const isPercent = _.get(column, "format_type") === "percent";
|
|
1201
|
+
const currentValue = 0;
|
|
1202
|
+
const previousValue = prevObj[prop];
|
|
1203
|
+
const compareValue = (0, chart_1.calCompareValue)(currentValue, previousValue, isPercent);
|
|
1204
|
+
_.set(prevObj, prop, compareValue);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
newArray.push(prevObj);
|
|
1208
|
+
}
|
|
1209
|
+
return newArray;
|
|
1210
|
+
}
|
|
1211
|
+
async compareMatrixTable(setting) {
|
|
1212
|
+
console.log("----- compareMatrixTable ------");
|
|
1213
|
+
const { entity_name: entityName, limit, sort, data_filter, list, unique_fields, compare_fields } = setting;
|
|
1214
|
+
const entity = await (0, schema_1.loadEntity)(entityName);
|
|
1215
|
+
const fields = entity.fields;
|
|
1216
|
+
const mergedList = (0, chart_1.mergeColumns)(list, []);
|
|
1217
|
+
const onlyListColumn = list;
|
|
1218
|
+
const _convertDates = (obj) => {
|
|
1219
|
+
for (let key in obj) {
|
|
1220
|
+
if (typeof obj[key] === "object" && obj[key] !== null) {
|
|
1221
|
+
_convertDates(obj[key]);
|
|
1222
|
+
}
|
|
1223
|
+
else if (typeof obj[key] === "string" &&
|
|
1224
|
+
(/^\d{4}-\d{2}-\d{2}$/.test(obj[key]) ||
|
|
1225
|
+
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(obj[key]))) {
|
|
1226
|
+
obj[key] = new Date(obj[key]);
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
return obj;
|
|
1230
|
+
};
|
|
1231
|
+
const dataFilter = _convertDates(data_filter);
|
|
1232
|
+
const accum = _.reduce(list, (r, v) => {
|
|
1233
|
+
if ((unique_fields || []).includes(v.key)) {
|
|
1234
|
+
return r;
|
|
1235
|
+
}
|
|
1236
|
+
if (["number", "currency", "percent"].includes(v.format_type)) {
|
|
1237
|
+
r[v.key] = { $sum: `$${v.key}` };
|
|
1238
|
+
}
|
|
1239
|
+
else {
|
|
1240
|
+
r[v.key] = { $sum: 1 };
|
|
1241
|
+
}
|
|
1242
|
+
return r;
|
|
1243
|
+
}, {});
|
|
1244
|
+
const query = [];
|
|
1245
|
+
query.push({
|
|
1246
|
+
$match: {
|
|
1247
|
+
$and: dataFilter
|
|
1248
|
+
}
|
|
1249
|
+
});
|
|
1250
|
+
query.push({
|
|
1251
|
+
$group: Object.assign({ _id: _.reduce(unique_fields || [], (r, v) => {
|
|
1252
|
+
r[v] = `$${v}`;
|
|
1253
|
+
return r;
|
|
1254
|
+
}, {}) }, accum)
|
|
1255
|
+
});
|
|
1256
|
+
query.push({
|
|
1257
|
+
$project: Object.assign(Object.assign({}, _.reduce(list, (r, v) => {
|
|
1258
|
+
if ((unique_fields || []).includes(v.key)) {
|
|
1259
|
+
r[v.key] = `$_id.${v.key}`;
|
|
1260
|
+
}
|
|
1261
|
+
else {
|
|
1262
|
+
r[v.key] = `$${v.key}`;
|
|
1263
|
+
}
|
|
1264
|
+
return r;
|
|
1265
|
+
}, {})), { _id: 0 })
|
|
1266
|
+
});
|
|
1267
|
+
if (!_.isEmpty(sort)) {
|
|
1268
|
+
query.push({
|
|
1269
|
+
$sort: _.reduce(sort, (r, v) => {
|
|
1270
|
+
if (v.startsWith("-")) {
|
|
1271
|
+
r[v.slice(1)] = -1;
|
|
1272
|
+
}
|
|
1273
|
+
else {
|
|
1274
|
+
r[v] = 1;
|
|
1275
|
+
}
|
|
1276
|
+
return r;
|
|
1277
|
+
}, {})
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
if (!_.isUndefined(limit)) {
|
|
1281
|
+
query.push({
|
|
1282
|
+
$limit: parseInt(limit, 10)
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
const currentList = await (0, schema_1.callInternalService)(entityName, "patch", "aggregate", query);
|
|
1286
|
+
if (!setting.enable_compare) {
|
|
1287
|
+
return {
|
|
1288
|
+
data: currentList,
|
|
1289
|
+
list_columns: mergedList
|
|
1290
|
+
};
|
|
1291
|
+
}
|
|
1292
|
+
const compareFilters = data_filter === null || data_filter === void 0 ? void 0 : data_filter.map(filter => {
|
|
1293
|
+
const keyNameField = Object.keys(filter)[0];
|
|
1294
|
+
if (!this._isTypeDate(fields, keyNameField))
|
|
1295
|
+
return filter;
|
|
1296
|
+
const compareNumber = _.get(setting, "compare_number");
|
|
1297
|
+
const compareUnit = _.get(setting, "compare_date_options");
|
|
1298
|
+
const nFilter = _.cloneDeep(filter);
|
|
1299
|
+
if (_.get(nFilter[keyNameField], "$gte")) {
|
|
1300
|
+
nFilter[keyNameField]["$gte"] = moment(nFilter[keyNameField]["$gte"])
|
|
1301
|
+
.subtract(compareNumber, compareUnit)
|
|
1302
|
+
.toDate();
|
|
1303
|
+
}
|
|
1304
|
+
if (_.get(nFilter[keyNameField], "$lte")) {
|
|
1305
|
+
nFilter[keyNameField]["$lte"] = moment(nFilter[keyNameField]["$lte"])
|
|
1306
|
+
.subtract(compareNumber, compareUnit)
|
|
1307
|
+
.toDate();
|
|
1308
|
+
}
|
|
1309
|
+
if (_.get(nFilter[keyNameField], "$eq")) {
|
|
1310
|
+
nFilter[keyNameField]["$eq"] = moment(nFilter[keyNameField]["$eq"])
|
|
1311
|
+
.subtract(compareNumber, compareUnit)
|
|
1312
|
+
.toDate();
|
|
1313
|
+
}
|
|
1314
|
+
return nFilter;
|
|
1315
|
+
});
|
|
1316
|
+
query[0] = {
|
|
1317
|
+
$match: {
|
|
1318
|
+
$and: compareFilters
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
const compareList = await (0, schema_1.callInternalService)(entityName, "patch", "aggregate", query);
|
|
1322
|
+
console.log(compareList);
|
|
1323
|
+
const newListData = this._mergeCompareData(currentList, compareList, unique_fields || [], compare_fields, onlyListColumn, fields, setting);
|
|
1324
|
+
const comparisonColumns = [
|
|
1325
|
+
{
|
|
1326
|
+
key: "compare_current",
|
|
1327
|
+
header: _.get(setting, "current_header"),
|
|
1328
|
+
align: "center"
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
key: "compare_previous",
|
|
1332
|
+
header: _.get(setting, "previous_header"),
|
|
1333
|
+
align: "center",
|
|
1334
|
+
previous_background: _.get(setting, "previous_background")
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
key: "compare_percent",
|
|
1338
|
+
header: _.get(setting, "percent_header"),
|
|
1339
|
+
align: "center"
|
|
1340
|
+
}
|
|
1341
|
+
];
|
|
1342
|
+
(0, chart_1.updateCompareColumns)(mergedList, compare_fields, comparisonColumns);
|
|
1343
|
+
return {
|
|
1344
|
+
data: newListData,
|
|
1345
|
+
list_columns: mergedList,
|
|
1346
|
+
compare_fields: compare_fields
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1350
|
+
exports.LayoutChartWidgetService = LayoutChartWidgetService;
|
|
1351
|
+
exports.LayoutChartWidgetService = LayoutChartWidgetService = __decorate([
|
|
1352
|
+
(0, common_1.Injectable)(),
|
|
1353
|
+
__metadata("design:paramtypes", [nestjs_cls_1.ClsService])
|
|
1354
|
+
], LayoutChartWidgetService);
|
|
1355
|
+
//# sourceMappingURL=chart_widget.service.js.map
|