From 1ea8b5b5b96517e0eab2ae427bb820a544dde191 Mon Sep 17 00:00:00 2001 From: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:02:48 +0530 Subject: [PATCH] v0.2 admin console merge to master (#849) * Updated the user Password generation logic #761 * Update Listener.ts (#730) * Update Listener.ts * added try catch logic in producer * Feat : added parallel batch execution (#767) * Feat : added parallel batch execution * Refactor * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fixed the stepper (#765) * changes config (#769) * Project type config and added loggers for process of campaign (#772) * Feat : added themes in generate template (#773) * fixed the ajv package version for build issue * Feat : removed xlsx (#776) * HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT (#778) Co-authored-by: nabeelmd-eGov * css update (#780) Co-authored-by: nabeelmd-eGov * HLM-6179 and HLM-6180 (#777) * HLM-6179 and HLM-6180 * campaign name changes --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Feat : fixed target generation (#781) * fixed tenantId issue (#784) * fix: resolved AJV-related Jenkins build issue reference #783 #786 (#787) * module ui fix * updated all the package version for build fixes * fixed kafka-error at target generation (#789) * updated core version (#791) * updated core version * updated css also * Update campaignValidators.ts (#794) * Updated the excel generation logic and files * added changes for configurable column in target sheet (#779) * change in filter recursive * lowest level * made target headers genearte through mdms schema * changed config index.ts * changed config index.ts * changes for now * added configurable column logic from schema HLM-6169 * updated validate of target columns through schema * added masterForColumnSchema in index.ts * formatted dataManageService * refactored lock TargetFields func * removed console.log * User creation performance improved (#800) * Feat : Improved user creation performance * Change status color * Update utilities/project-factory/src/server/utils/campaignUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update genericUtils.ts (#801) * Hlm 6170 (#802) * change in filter recursive * lowest level * HLM -6170 added logic for only village level data in target sheet and some refactoring * updated css (#804) * fixed button issue (#805) * HLM 6177: Error card implementation in summary screen (#806) * HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT * Added Error Cards in summary screen and redirection --------- Co-authored-by: nabeelmd-eGov * added error button styles (#807) Co-authored-by: nabeelmd-eGov * updated popUp css (#808) * HLM 6178: Implementing New Pop up screen in boundaries (#809) * added error button styles * Implementing New Pop up screen in boundaries --------- Co-authored-by: nabeelmd-eGov * Facility changes (#812) * Feat : changed facility Template * Feat : locked target templates * fixed colour issue (#813) * Updated the project type conversion logic for the "deliveryType" dont1 and n config * Unique field added (#814) * Feat : changed facility Template * Feat : locked target templates * Feat : added unique check logic * Target schema update (#815) * change in filter recursive * lowest level * updated shcema of target columns to be configurable * removed empty spaces from config index.ts * Active mapping (#817) * Feat : changed facility Template * Feat : locked target templates * Feat : added unique check logic * Feat : added mapping via active field * changes in the schema validation (#816) * Updated the workbench and css module version * Feat : added active inactive boundary check (#818) * Update campaignValidators.ts (#819) * added active inactive validation (#820) * changed api call time (#826) * Feat : added target sum mapping (#825) * added campaign type as filter (#827) * Update genericApis.ts (#828) * Update excelUtils.ts (#829) * UI issue fixes, icon fix in summary error (#831) Co-authored-by: nabeelmd-eGov * Target columns (#830) * change in filter recursive * lowest level * commit * Feat : target flow fixed for LLIN-mz * uat to dev --------- Co-authored-by: admin1 * Feat : freezed target columns (#833) * Target mr dn (#834) * change in filter recursive * lowest level * Feat : skipped validation temporarily * changes in the target validation (#835) * fixed error info (#837) * Added roboto font (#840) * Feat : added roboto font * Fixed config * target validation based on diff campaign types (#843) * change in filter recursive * lowest level * updated validation of target based on campaign type * fixed validation issue (#844) * Updated the workbench package version * fixed validation logic (#846) * fixed validation logic * Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Error messages improved (#848) * Feat : imporved error messages and initilised utils for tracking process * Fix ; unused variables fixed * Feat : improved error messages * Fix : download error fix (#850) * Update campaignUtils.ts (#851) * Update campaignUtils.ts * Update utilities/project-factory/src/server/utils/campaignUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignValidators.ts (#853) * HLM 6210: Toast, error focus fix and project type reset delivery data fix (#854) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix --------- Co-authored-by: nabeelmd-eGov * HLM-6225_added time out according to data (#855) * Update campaignValidators.ts (#859) * HLM 6210 (#858) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix * parallel search fixes --------- Co-authored-by: nabeelmd-eGov * Remove validation (#852) * change in filter recursive * lowest level * removed unnecessary validation for target * spacing refactor * Update campaignValidators.ts (#863) * Header validation (#861) * change in filter recursive * lowest level * removed unnecessary validation for target * changed the logic of header validation * space refactor * Update campaignUtils.ts (#864) * fixed ui error (#865) * Read me (#867) * change in filter recursive * lowest level * removed unnecessary validation for target * changed the logic of header validation * fixed portugese language error * space refactoring * Update Dockerfile * Update Dockerfile * Update migrate.sh * Update Dockerfile * Update campaignValidators.ts (#868) * HLM 6210:campaign type change reset fix (#869) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix * parallel search fixes * campaign type change reset fix --------- Co-authored-by: nabeelmd-eGov * Update excelUtils.ts for sheetHeaders wraping (#870) * Update package.json * updated error messages (#871) * feat : added jaeger-client tracing (#872) * updated the table config * Update campaignApis.ts (#875) * removed the schema and updated the db name * fixing generate API call, file auto delete, date error (#877) Co-authored-by: nabeelmd-eGov * Trim resource (#878) * Feat : trimmed resource persist message * Refactor * Removed reject error in produce message * fixed min time, draft logic (#879) * Update index.ts (#880) * added min ui error and facility usage (#883) * added min ui error and facility usage * changes * Update campaignUtils.ts (#884) * HLM 6007 (#885) * fixing generate API call, file auto delete, date error * generate api fix --------- Co-authored-by: nabeelmd-eGov * Update Dockerfile * Feat : docker config update (#886) * Update Dockerfile (#887) * Create buildWorkbenchUI.yml * Update README.md (#917) * Update buildWorkbenchUI.yml * Update README.md * Updated the DB Schema issue of Project-factory * fixed hierarchy order (#919) * User flag hcm (#920) * Feat : docker config update * Feat : added user create flag * Refactored * Update campaignUtils.ts * Update campaignMappingUtils.ts (#922) * Ashish egov patch 2 (#921) * Update index.ts * Update campaignApis.ts * Fixed the project type conversion and product duplicate issue * Update campaignApis.ts (#924) * Update campaignMappingUtils.ts (#925) * Update campaignMappingUtils.ts * Refactored * Update publishProjectFactory.yml * Update buildWorkbenchUI.yml * Update campaignMappingUtils.ts (#926) * Update request.ts (#928) * Update request.ts * Feat : updated httprequest * Feat : warning response added * Refactor * added start and enddate in cycles * Update campaignApis.ts (#930) * Update request.ts (#932) * fixed generate issue (#933) * Fixed project-type resources duplication * updated target error messages (#936) * fixed stepper from draft (#937) * Update Listener.ts * delivery type disable fix, product sku name change (#939) Co-authored-by: nabeelmd-eGov * fixed error message issue (#941) * Redis integration (#940) * Feat : added redis * Feat : added redis retry * updated migration * Feat : changed download logic (#942) * Update README.md (#943) * fixed target validate for different tabs not present (#945) * Enriching already exsisting user (#946) * Feat : adding dropdowns (#952) * HLM-6270: Date logic changes, added localisation code (#953) Co-authored-by: nabeelmd-eGov * changed maximum target message (#954) * changed maximum target message * Update UploadData.js * Call generate (#951) * updated target error messages * generate call while campaign update changes boundaries * some update on call-generate * call-generate * updated call-gnerate logic * added column campaign id in generated resource table * updated config index.ts * removed console.logs * Update utilities/project-factory/src/server/utils/generateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/generateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * added some additional conditions --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * changed facility info message (#955) * HLM 6270 (#957) * refactor * added title text --------- Co-authored-by: nabeelmd-eGov * Update genericUtils.ts (#958) * fixed boundary draft logic (#959) * Boundary code generated has now configurable hierarchy type and boundary name at last based on config (#963) * fixed target validate for different tabs not present * made hierarchytype and bondary name configurable in auto generation of boundary code * added toString() on elment for safety * HLM-6270: Elimated Generate API & enhance download API, Date logic fixes (#966) * refactor * added title text * HLM-6270: Elimated Generate API & enhance download API, Date logic fixes --------- Co-authored-by: nabeelmd-eGov * Ashish table create (#972) * saving * Feat : adding table * Feat : table creating * updated configs * Feat : added table * Feat : table added * Feat : integrated processtracks * Fix : name format (#973) * Update campaignUtils.ts (#974) * configure app static screen and skeleton (#980) * configure app static screen and skeleton * comments resolved * Migration repair (#981) * migration repair * migration repair * migration repair * Updated CampaignCard to add NATIONAL_SUPERVISOR dashboard link * made isActive change (#986) * boundaries on which we split to be fetched from mdms (#982) * fixed target validate for different tabs not present * split boundaries fetch from mdms * updated logic to fetch split on from mdms based on campaign type * fromatting * Update campaignUtils.ts (#988) * Update processTrackUtils.ts (#989) * fixs (#990) * fixs * Update SelectingBoundaries.js * Update processTrackUtils.ts (#991) * Summary screen api loop fix (#992) Co-authored-by: nabeelmd-eGov * Resource activity (#993) * fixed target validate for different tabs not present * resource activity persisting in db * Update processTrackUtils.ts (#994) * added timeout of 2 sec for boundary entity to persist (#996) * fixed target validate for different tabs not present * resource activity persisting in db * added timeout of 2 sec for boundary entity to persist * css version fix (#997) Co-authored-by: nabeelmd-eGov * Process tracking update (#998) * Feat : changed logic of process track * Feat : improved process tracks * improved process tracking * Update campaignUtils.ts (#999) * Update campaignUtils.ts (#1000) * Update campaignUtils.ts * Update Listener.ts * Feat : imporved process track (#1001) * Update campaignManageService.ts (#1003) * Update campaignManageService.ts * Update campaignUtils.ts * Update processTrackUtils.ts * Feat : added user mapping for multiple boundaries with common parent (#1005) * new template will be generated if source is microplan accordingly from mdms (#1004) * fixed target validate for different tabs not present * resource activity persisting in db * added timeout of 2 sec for boundary entity to persist * new template generate if source is microplan * updated logic for generating templates if source of campaign is from microplan * made separate function for checking source is microplan * added separate func for checking source is microplan * refactor * chnaged the checkIFSourceMicoplan func * refactored checkifsourceismicroplan * Fix : fix array fetch from cell (#1006) * Feat : fixed array issue in target (#1007) * Feat : fixed array issue in target * Update index.ts * Some fixes and refactor (#1008) * Feat : fixed array issue in target * Update index.ts * Refactor * Fixed status row * commented harcoded check && added new dashboard icon (#1011) Co-authored-by: nabeelmd-eGov * Fixed sheetrows issues (#1012) * Sheet row fixed (#1013) * Fixed sheetrows issues * Shut down if kafka error * Feat : formated sheet (#1015) * integrated admin schema with mdms_v2 (#1018) * Fix process timeline (#1029) * Feat : formated sheet * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Feat : imporved processTracking and fixed migration script * Feat : fixed error persistence * Fix * Un wrap other rows (#1034) * Feat : formated sheet * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Feat : imporved processTracking and fixed migration script * Feat : fixed error persistence * Unwraped lower rows * Update publishProjectFactory.yml * updated package versions (#1042) * HLM-6325/HLM-6277: Update date with & without boundary screen integration and actionable column added (#1045) * HLM-6007 * css version fix * update date screen added * change add * css fixes and API Integration for search project * Implemented Action component in My Campaign screen * Implemented Date Update with and without boundary with API integration * Boundary change --------- Co-authored-by: nabeelmd-eGov * Facility dynamic generate for source microplan (#1046) * fixed target validate for different tabs not present * resource activity persisting in db * added timeout of 2 sec for boundary entity to persist * added code for generating facility template if source is microplan * updated name * updated version (#1047) * updated core version to fix login forget password issues(#1051) * Fixed update topic (#1056) * updated version (#1061) * Hidden sheet impel (#1077) * Feat : formated sheet * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Feat : imporved processTracking and fixed migration script * Feat : fixed error persistence * Unwraped lower rows * Update campaignUtils.ts * Update publishProjectFactory.yml * Update genericUtils.ts (#1078) * target template download based on delivery conditions if present (#1080) * fixed target validate for different tabs not present * resource activity persisting in db * added timeout of 2 sec for boundary entity to persist * logic for dynamic target generate template based on delivery conditions * fixed stepper color issue from draft (#1083) * fixed reordering of tab issue (#1092) * Hlm 6350 (#1094) * timeline wip * added timeline from summary * removed log * integarte with mdms (#1095) Co-authored-by: nabeelmd-eGov * Update genericUtils.ts (#1097) * Update targetUtils.ts (#1098) * Hlm 6350 (#1100) * timeline wip * added timeline from summary * removed log * integrated timeline with popup * updated version * updated css version * HCMPRE-32: Resolve date update demo points (#1104) * integarte with mdms * HCMPRE-32: Resolve date update demo points * comment resolve --------- Co-authored-by: nabeelmd-eGov * Dynamic target upload and download both with target columns as per delivery conditions when campaign is updated with cahnegs in delivery conditions (#1109) * fixed target validate for different tabs not present * resource activity persisting in db * added timeout of 2 sec for boundary entity to persist * target upload based on dynamic column in reference to deliveryRules * logic for calling generate target tempalte when campaign delivery conditions change * removed console * updated css version (#1102) * added chip for dropdown (#1111) * version fix to resolve issue (#1112) Co-authored-by: nabeelmd-eGov * Ashish patch1 (#1118) * Feat : formated sheet * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Feat : imporved processTracking and fixed migration script * Feat : fixed error persistence * Unwraped lower rows * Update campaignUtils.ts * Update genericValidator.ts * Update publishProjectFactory.yml * Update targetUtils.ts * edit product with prefilled value and count (#1115) * Boundary upload to have not generate boundary code if code is already filled to support migration (#1121) * fixed target validate for different tabs not present * resource activity persisting in db * added timeout of 2 sec for boundary entity to persist * Boundary upload to have not generate boundary code if code is already filled to support migration * Update index.ts * Update constants.ts (#1122) * Update constants.ts * Update utilities/project-factory/src/server/config/constants.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignUtils.ts * Update campaignUtils.ts * Update campaignMappingUtils.ts --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * template downlod for source microplan (#1123) * Different tabs onlevel to fetch from mdms rather than from config in target upload flow (#1124) * template downlod for source microplan * updated logic for getting different tabs based on level from config to fetch it from mdms in target upload flow * Sequence order change in action button (#1125) Co-authored-by: nabeelmd-eGov * reverted the function validateAllDistrictTabsPresentOrNot (#1126) * template downlod for source microplan * updated logic for getting different tabs based on level from config to fetch it from mdms in target upload flow * restored the func validateAllDistrictTabsPresentOrNot to default * Update index.ts (#1129) * Update index.ts * Update Listener.ts * Update Producer.ts * Update generateUtils.ts (#1130) * some changes related to generate boundary template (#1133) * updated logic for target columns acc to delivery conditions only for smc (#1137) * some changes related to generate boundary template * updated logic for making configurable target acc to delivery only for smc * refactored code for including dynamic target columns for specific types according to configs array * updated version and boundary fix (#1141) * updated readmeconfig for sheet (#1142) * HCMPRE-140: Action column fixes, date editable logic change (#1143) * Action column fixes, date editable logic change * added roles for dss --------- Co-authored-by: nabeelmd-eGov * Update constants.ts (#1145) * Update constants.ts * Update processTrackUtils.ts * Update Listener.ts (#1147) * HCMPRE 140 (#1149) * Action column fixes, date editable logic change * added roles for dss * update dates fixes --------- Co-authored-by: nabeelmd-eGov * updated core version (#1150) * Ashish patch2 (#1152) * Update Listener.ts * added new branch * Update Listener.ts * fixed mapping kafka error * mapping kafka fixed * fix kafka * fix kafka * Update publishProjectFactory.yml * Redis cache for generating target when delivery conditions change (#1156) * updated readmeconfig for sheet * added cache for generating target template when only delivery conditions change * added cache time in config * refactored caching code in generate flow for boundary sheet * refactored callGenerate function * Ashish egov patch 2 (#1166) * Update Listener.ts * added new branch * Update Listener.ts * fixed mapping kafka error * mapping kafka fixed * fix kafka * fix kafka * Removing foreign key constraint * Update publishProjectFactory.yml * HCMPRE-154: Update Dates bug fixes, Toast added for error. (#1158) * Action column fixes, date editable logic change * added roles for dss * update dates fixes * HCMPRE-154 update dates bug fixes, Added toast for error * code clean * Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BoundaryWithDate.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Adding date bug * date fix * Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DateWithBoundary.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DateWithBoundary.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: nabeelmd-eGov Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * version update (#1168) Co-authored-by: nabeelmd-eGov * HCMPRE-6407 download template changes (#1128) * HLM-6407 adding changes for facility template * HLM-6407 adding changes for facility template * HLM-6407 adding changes for facility template * HLM-6407 codde review comment * HCMPRE-91 code review comments * HLM-6407 using same mdms schema for microplan * HLM-6407 adding changes for facility template * HLM-6407 adding changes for facility template * HLM-6407 adding changes for facility template * HLM-6407 codde review comment * HCMPRE-91 code review comments * HLM-6407 using same mdms schema for microplan * HLM-6407 code review comments * HLM-6407 code review comments * Core ui version fix (#1176) Co-authored-by: nabeelmd-eGov * Ashish egov patch 2 (#1178) * Update Listener.ts * added new branch * Update Listener.ts * fixed mapping kafka error * mapping kafka fixed * fix kafka * fix kafka * Removing foreign key constraint * Producer update * Update publishProjectFactory.yml * Update Producer.ts (#1182) * fixed timeline issues (#1185) * HCMPRE 154 (#1186) * date validation fix * Update date logic * FIX --------- Co-authored-by: nabeelmd-eGov * changes in timeline (#1187) * CSS version add (#1188) * date validation fix * Update date logic * FIX * css add --------- Co-authored-by: nabeelmd-eGov * HCMPRE 154 (#1189) * date validation fix * Update date logic * FIX * css add * non editable fix --------- Co-authored-by: nabeelmd-eGov * limited the number of columns of target for upto only 18 in number (#1190) * updated readmeconfig for sheet * added cache for generating target template when only delivery conditions change * added logic for having only 18 target columns if exceed i will create one column with header OTHER_TARGETS * HCMPRE 154 (#1191) * date validation fix * Update date logic * FIX * css add * non editable fix * date start from tomorrow * css fix for language screen --------- Co-authored-by: nabeelmd-eGov * Produceasync (#1192) * Update Listener.ts * added new branch * Update Listener.ts * fixed mapping kafka error * mapping kafka fixed * fix kafka * fix kafka * Producer update * Feat : updated producemodified message * Update publishProjectFactory.yml * Update publishProjectFactory.yml * HCMPRE 154 (#1193) * date validation fix * Update date logic * FIX * css add * non editable fix * date start from tomorrow * css fix for language screen * disable today date --------- Co-authored-by: nabeelmd-eGov * config updates according to devops (#1197) * updated readmeconfig for sheet * added cache for generating target template when only delivery conditions change * added logic for having only 18 target columns if exceed i will create one column with header OTHER_TARGETS * updated config to fetch from devops accordingly * Update index.ts * All changes (#1201) * Update Listener.ts * added new branch * Update Listener.ts * fixed mapping kafka error * mapping kafka fixed * fix kafka * fix kafka * Removing foreign key constraint * Producer update * Update Producer.ts * Update Producer.ts * Feat : updated producemodified message * Feat : removed waiting * adding constraint * Update V20240731162600__add_uniqiue_constraint_process_track.sql * Update constants.ts * Update publishProjectFactory.yml * HCMPRE 154 (#1202) * date validation fix * Update date logic * FIX * css add * non editable fix * date start from tomorrow * css fix for language screen * disable today date * date and cycle fix --------- Co-authored-by: nabeelmd-eGov * Revert "HCMPRE 154 (#1191)" (#1203) This reverts commit 59ec9531ebfc7535bacf324723edae975166867c. Co-authored-by: nabeelmd-eGov * updated versions (#1205) * Update date change screen date logic fix, info added, hard reload issue fix (#1206) Co-authored-by: nabeelmd-eGov * Config update for project-factory (#1207) * updated readmeconfig for sheet * added cache for generating target template when only delivery conditions change * added logic for having only 18 target columns if exceed i will create one column with header OTHER_TARGETS * updated config to fetch from devops accordingly * updated config for project -factory * Timeline (#1210) * updated versions * fixed user credential button * Kafka fix (#1212) * Update Listener.ts * added new branch * Update Listener.ts * fixed mapping kafka error * mapping kafka fixed * fix kafka * fix kafka * Removing foreign key constraint * Producer update * Revert "Ashish egov patch 2 (#1178)" This reverts commit e86a4dcb10dda9210ce4be75977502af7df366f6. * Update Producer.ts * Update Producer.ts * Feat : updated producemodified message * Feat : removed waiting * adding constraint * Update V20240731162600__add_uniqiue_constraint_process_track.sql * Update constants.ts * Feat : improved kafka * Fix kafka restart issue * fixed the pop up button issue (#1215) * Kafka restart (#1217) * Update Listener.ts * added new branch * Update Listener.ts * fixed mapping kafka error * mapping kafka fixed * fix kafka * fix kafka * Removing foreign key constraint * Producer update * Revert "Ashish egov patch 2 (#1178)" This reverts commit e86a4dcb10dda9210ce4be75977502af7df366f6. * Update Producer.ts * Update Producer.ts * Feat : updated producemodified message * Feat : removed waiting * adding constraint * Update V20240731162600__add_uniqiue_constraint_process_track.sql * Update constants.ts * Feat : improved kafka * Update Producer.ts * Update Producer.ts * Update publishProjectFactory.yml * updated core versions for privacy component (#1223) * Ashish egov patch 1 (#1228) * Update Listener.ts * added new branch * Update Listener.ts * fixed mapping kafka error * mapping kafka fixed * fix kafka * fix kafka * Removing foreign key constraint * Producer update * Revert "Ashish egov patch 2 (#1178)" This reverts commit e86a4dcb10dda9210ce4be75977502af7df366f6. * Update Producer.ts * Update Producer.ts * Feat : updated producemodified message * Feat : removed waiting * adding constraint * Update V20240731162600__add_uniqiue_constraint_process_track.sql * Update constants.ts * Feat : improved kafka * Update Producer.ts * Update Producer.ts * Update campaignUtils.ts * feat : solved localization passing through kafka * Update publishProjectFactory.yml * removed frontend * Update package.json * Squashed commit of the following: commit 3cd21c29c69ab52c960b6d770fe97e85f24c23e4 Merge: 12061ca60e 80f6307123 Author: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Thu Aug 8 15:13:48 2024 +0530 Merge branch 'campaign' into campaign-merged commit 80f6307123c86998364e311757a46f256bd69005 Author: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Date: Wed Aug 7 18:08:15 2024 +0530 Updated changelog (#1242) * default enableDynamicTemplateForWillBe empty string in config * updated changelog and postman collection commit f897dba734e05e55fa1231a81a2e5f86612825a3 Author: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Wed Aug 7 17:25:39 2024 +0530 Update package.json commit dd691e6a26aff0a5131736086b447995ae3f0757 Author: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com> Date: Tue Aug 6 13:34:40 2024 +0530 updated workbench version (#1236) commit 3a3073649791815766745c60f48db3fea4fbe7f1 Author: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com> Date: Tue Aug 6 11:00:14 2024 +0530 updated micro ui core version (#1233) commit a1f7329c88254f4cd6ab3db2fa06c3259699f2e2 Author: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Date: Mon Aug 5 18:29:40 2024 +0530 default enableDynamicTemplateForWillBe empty string in config (#1231) commit d3c3e95408f7bf25205b6b57a3e109d8eea0af2c Author: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Date: Mon Aug 5 18:11:23 2024 +0530 build issue fix for optional chanining issue (#1230) Co-authored-by: nabeelmd-eGov commit 236b8439d9e24a5ecd0494f76ad2504ca693fe31 Author: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Date: Mon Aug 5 17:17:20 2024 +0530 fix (#1229) Co-authored-by: nabeelmd-eGov * sending only activity object to kafka in place of request body (#851) --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> --- .vscode/launch.json | 18 + .vscode/settings.json | 3 + frontend/micro-ui/.gitignore | 32 - frontend/micro-ui/Jenkinsfile | 3 - frontend/micro-ui/README.md | 139 - frontend/micro-ui/package.json | 4 - frontend/micro-ui/web/.babelrc | 5 - frontend/micro-ui/web/.env.sample | 3 - frontend/micro-ui/web/CHANGELOG.md | 7 - frontend/micro-ui/web/docker/Dockerfile | 25 - frontend/micro-ui/web/docker/devDockerfile | 26 - frontend/micro-ui/web/docker/masDockerfile | 25 - frontend/micro-ui/web/docker/nginx.conf | 12 - frontend/micro-ui/web/envs.js | 0 frontend/micro-ui/web/install-deps.sh | 14 - .../web/micro-ui-internals/.gitignore | 143 - .../web/micro-ui-internals/.prettierignore | 23 - .../web/micro-ui-internals/.prettierrc.json | 3 - .../micro-ui/web/micro-ui-internals/README.md | 100 - .../micro-ui/web/micro-ui-internals/clean.sh | 28 - .../micro-ui-internals/example/.env-health-qa | 7 - .../micro-ui-internals/example/.env-mz-prod | 7 - .../micro-ui-internals/example/.env-mz-uat | 7 - .../example/.env-unifieddev | 9 - .../micro-ui-internals/example/package.json | 40 - .../example/public/index.html | 34 - .../example/src/UICustomizations.js | 789 ----- .../micro-ui-internals/example/src/index.js | 84 - .../example/src/setupProxy.js | 101 - .../web/micro-ui-internals/package.json | 59 - .../micro-ui-internals/packages/css/README.md | 62 - .../packages/css/gulpfile.js | 71 - .../packages/css/package.json | 65 - .../packages/css/postcss.config.js | 55 - .../css/src/components/microplanning.scss | 363 -- .../packages/css/src/index.scss | 13 - .../css/src/pages/employee/campaign.scss | 109 - .../css/src/pages/employee/campaignCycle.scss | 331 -- .../css/src/pages/employee/coreOverride.scss | 173 - .../css/src/pages/employee/index.scss | 481 --- .../packages/css/src/typography.scss | 512 --- .../packages/css/tailwind.config.js | 233 -- .../modules/campaign-manager/README.md | 159 - .../modules/campaign-manager/package.json | 51 - .../modules/campaign-manager/src/Module.js | 141 - .../src/components/AddProductField.js | 144 - .../src/components/BulkUpload.js | 202 -- .../src/components/CampaignCard.js | 71 - .../src/components/CampaignDates.js | 122 - .../components/CampaignDocumentsPreview.js | 92 - .../src/components/CampaignHeader.js | 32 - .../src/components/CampaignName.js | 66 - .../components/CampaignResourceDocuments.js | 50 - .../src/components/CampaignSummary.js | 484 --- .../src/components/CampaignType.js | 143 - .../src/components/CycleDataPreview.js | 186 - .../src/components/CycleDetaisPreview.js | 143 - .../src/components/DetailsTable.js | 76 - .../src/components/DocumentIcon.js | 29 - .../src/components/PlusMinusInput.js | 47 - .../src/components/RemovableTagNew.js | 16 - .../src/components/SelectingBoundaries.js | 542 --- .../src/components/TimelineCampaign.js | 46 - .../src/components/UploadData.js | 1163 ------- .../src/components/XlsPreview.js | 69 - .../src/components/icons/DustbinIcon.js | 10 - .../src/components/icons/XlsxFile.js | 32 - .../src/configs/CampaignConfig.js | 267 -- .../src/configs/UICustomizations.js | 472 --- .../src/configs/addProductConfig.js | 19 - .../src/configs/attributeConfig.js | 23 - .../src/configs/baseTimeOut.js | 6 - .../src/configs/deliveryConfig.js | 206 -- .../src/configs/headerConfig.js | 20 - .../src/configs/mailConfig.js | 5 - .../src/configs/myCampaignConfig.js | 667 ---- .../src/configs/operatorConfig.js | 27 - .../src/configs/previewConfig.js | 124 - .../src/configs/productType.js | 15 - .../src/configs/schemaConfig.js | 80 - .../campaign-manager/src/hooks/index.js | 47 - .../hooks/services/createCampaignService.js | 19 - .../hooks/services/updateCampaignService.js | 20 - .../src/hooks/services/useSearchCampaign.js | 21 - .../src/hooks/useCreateCampaign.js | 10 - .../src/hooks/useCreateProduct.js | 24 - .../src/hooks/useCreateProductVariant.js | 24 - .../src/hooks/useGenerateIdCampaign.js | 26 - .../src/hooks/useParallelSearch.js | 88 - .../src/hooks/useProductList.js | 53 - .../src/hooks/useResourceData.js | 107 - .../src/hooks/useUpdateCampaign.js | 10 - .../src/pages/employee/AddProduct.js | 161 - .../src/pages/employee/CycleConfiguration.js | 248 -- .../src/pages/employee/MyCampaign.js | 80 - .../src/pages/employee/Response.js | 65 - .../src/pages/employee/SetupCampaign.js | 1491 -------- .../deliveryRule/AddDeliverycontext.js | 813 ----- .../deliveryRule/AddProductscontext.js | 290 -- .../employee/deliveryRule/MultiTabcontext.js | 265 -- .../src/pages/employee/deliveryRule/index.js | 531 --- .../src/pages/employee/index.js | 102 - .../campaign-manager/src/utils/TourSteps.js | 144 - .../src/utils/downloadExcel.js | 46 - .../campaign-manager/src/utils/index.js | 6 - .../modules/hcm-microplanning/package.json | 62 - .../modules/hcm-microplanning/src/Module.js | 99 - .../src/components/CommonComponents.js | 61 - .../src/components/CustomScaleControl.js | 41 - .../src/components/Hypothesis.js | 607 ---- .../src/components/JsonPreviewInExcelForm.js | 113 - .../src/components/Mapping.js | 445 --- .../src/components/MappingHelperComponents.js | 513 --- .../src/components/MicroplanCreatedScreen.js | 111 - .../src/components/MicroplanDetails.js | 294 -- .../src/components/MicroplanPreview.js | 478 --- .../MicroplanPreviewHelperCompoenents.js | 434 --- .../src/components/MicroplanningCard.js | 34 - .../src/components/MicroplanningHeader.js | 29 - .../hcm-microplanning/src/components/Modal.js | 158 - .../src/components/Nagivator.js | 272 -- .../src/components/RuleEngine.js | 876 ----- .../src/components/Upload.js | 1137 ------- .../src/components/UploadHelperComponents.js | 299 -- .../src/components/ZoomControl.js | 29 - .../src/components/resourceMapping.js | 187 - .../src/configs/UICustomizations.js | 324 -- .../src/configs/constants.js | 36 - .../src/configs/timeLineOptions.json | 40 - .../src/configs/tourSteps.js | 193 -- .../hcm-microplanning/src/hooks/index.js | 42 - .../src/hooks/useCreatePlanConfig.js | 8 - .../src/hooks/useGenerateIdCampaign.js | 26 - .../src/hooks/useNumberFormatter.js | 21 - .../src/hooks/useSavedMicroplans.js | 23 - .../src/hooks/useSearchCampaign.js | 8 - .../src/hooks/useSearchPlanConfig.js | 8 - .../src/hooks/useUpdatePlanConfig.js | 8 - .../hcm-microplanning/src/icons/Svg.js | 217 -- .../src/pages/employee/CreateMicroplan.js | 288 -- .../src/pages/employee/Guidelines.js | 54 - .../src/pages/employee/SavedMicroplans.js | 200 -- .../src/pages/employee/SelectCampaign.js | 226 -- .../src/pages/employee/index.js | 128 - .../src/services/CreatePlanConfig.js | 19 - .../hcm-microplanning/src/services/Search.js | 181 - .../src/services/SearchCampaignConfig.js | 22 - .../src/services/SearchPlanConfig.js | 19 - .../src/services/UpdatePlanConfig.js | 18 - .../src/services/searchSavedPlans.js | 67 - .../hcm-microplanning/src/utils/context.js | 31 - .../src/utils/createTemplate.js | 485 --- .../hcm-microplanning/src/utils/excelUtils.js | 150 - .../src/utils/excelValidations.js | 199 -- .../src/utils/exceltojson.js | 99 - .../src/utils/geojsonValidations.js | 234 -- .../hcm-microplanning/src/utils/index.js | 478 --- .../src/utils/jsonToExcelBlob.js | 72 - .../src/utils/mappingUtils.js | 760 ----- .../src/utils/microplanPreviewUtils.js | 413 --- .../src/utils/processHierarchyAndData.js | 351 -- .../src/utils/updateSessionUtils.js | 486 --- .../src/utils/uploadUtils.js | 880 ----- .../Modal/AttendanceActionModal.js | 133 - .../Modal/BPAActionModal.js | 283 -- .../Modal/BPAREGActionModal.js | 153 - .../Modal/ExpenditureActionModal.js | 190 -- .../Modal/FSMActionModal.js | 298 -- .../Modal/NOCActionModal.js | 169 - .../ApplicationDetails/Modal/PTActionModal.js | 190 -- .../ApplicationDetails/Modal/TLActionModal.js | 166 - .../Modal/WNSActionModal.js | 261 -- .../Modal/WorksActionModal.js | 262 -- .../ApplicationDetails/Modal/index.js | 49 - .../components/ApplicationDetailsActionBar.js | 80 - .../components/ApplicationDetailsContent.js | 484 --- .../components/ApplicationDetailsToast.js | 74 - .../ApplicationDetailsWarningPopup.js | 54 - .../components/BPADocuments.js | 234 -- .../components/DocumentsPreview.js | 49 - .../components/InfoDetails.js | 34 - .../components/InspectionReport.js | 49 - .../components/NOCDocuments.js | 202 -- .../components/PermissionCheck.js | 87 - .../components/PropertyDocuments.js | 83 - .../components/PropertyEstimates.js | 39 - .../components/PropertyFloors.js | 49 - .../components/PropertyOwners.js | 94 - .../ApplicationDetails/components/Reason.js | 10 - .../components/ScruntinyDetails.js | 46 - .../components/SubOccupancyTable.js | 126 - .../components/SubWorkTableDetails.js | 77 - .../components/TLCaption.js | 34 - .../components/TLTradeAccessories.js | 52 - .../components/TLTradeUnits.js | 51 - .../components/ViewBreakup.js | 73 - .../components/WSAdditonalDetails.js | 399 --- .../components/WSFeeEstimation.js | 346 -- .../components/WeekDateRange.js | 30 - .../ApplicationDetails/config/AcceptDso.js | 45 - .../ApplicationDetails/config/AssignDso.js | 115 - .../config/BPAApproverApplication.js | 77 - .../config/BPAREGApproverApplication.js | 71 - .../config/CompleteApplication.js | 46 - .../config/NOCApproverApplication.js | 79 - .../config/PTApproverApplication.js | 66 - .../config/PTAssessProperty.js | 26 - .../ApplicationDetails/config/ReassignDso.js | 101 - .../config/RejectApplication.js | 31 - .../config/TLApproverApplication.js | 83 - .../config/WSApproverApplication.js | 73 - .../config/WSDisconnectApplication.js | 89 - .../config/configApproveModal.js | 53 - .../config/configAttendanceApproveModal.js | 27 - .../config/configAttendanceCheckModal.js | 93 - .../config/configAttendanceRejectModal.js | 61 - .../config/configCheckModal.js | 105 - .../config/configRejectModal.js | 127 - .../config/configViewBillApproveModal.js | 57 - .../config/configViewBillCheckModal.js | 107 - .../config/configViewBillRejectModal.js | 59 - .../ApplicationDetails/config/index.js | 47 - .../templates/ApplicationDetails/index.js | 368 -- .../web/micro-ui-internals/publish-develop.sh | 20 - .../web/micro-ui-internals/publish.sh | 20 - .../web/micro-ui-internals/scripts/create.sh | 3 - .../web/micro-ui-internals/scripts/deploy.sh | 8 - .../web/micro-ui-internals/scripts/jenkins.sh | 3 - .../web/micro-ui-internals/scripts/run.sh | 32 - .../micro-ui/web/micro-ui-internals/test.js | 31 - frontend/micro-ui/web/microplan/App.js | 61 - frontend/micro-ui/web/microplan/Dockerfile | 30 - .../micro-ui/web/microplan/install-deps.sh | 18 - .../micro-ui/web/microplan/inter-package.json | 61 - frontend/micro-ui/web/microplan/nginx.conf | 12 - frontend/micro-ui/web/microplan/package.json | 80 - .../micro-ui/web/microplan/webpack.config.js | 52 - frontend/micro-ui/web/package.json | 85 - frontend/micro-ui/web/public/index.html | 38 - frontend/micro-ui/web/public/robots.txt | 3 - frontend/micro-ui/web/src/App.js | 74 - .../micro-ui/web/src/ComponentRegistry.js | 11 - .../src/Customisations/UICustomizations.js | 428 --- .../micro-ui/web/src/Customisations/index.js | 19 - .../web/src/Customisations/pt/index.js | 13 - .../pt/pageComponents/PTAllotmentDetails.js | 64 - .../pt/pageComponents/PTBusinessDetails.js | 68 - .../pt/pageComponents/PTVasikaDetails.js | 79 - .../pt/pageComponents/PropertyUsageType.js | 134 - .../src/Customisations/tl/TLCustomisation.js | 5 - .../web/src/Customisations/tl/index.js | 7 - .../tl/pageComponents/PropertyUsageType.js | 136 - frontend/micro-ui/web/src/index.css | 0 frontend/micro-ui/web/src/index.js | 62 - frontend/micro-ui/web/src/setupProxy.js | 30 - frontend/micro-ui/web/webpack.config.js | 43 - frontend/micro-ui/web/workbench/App.js | 72 - frontend/micro-ui/web/workbench/Dockerfile | 29 - .../micro-ui/web/workbench/install-deps.sh | 18 - .../micro-ui/web/workbench/inter-package.json | 58 - frontend/micro-ui/web/workbench/nginx.conf | 12 - frontend/micro-ui/web/workbench/package.json | 89 - .../micro-ui/web/workbench/webpack.config.js | 44 - health-services/project-factory/CHANGELOG.md | 6 + health-services/project-factory/README.md | 125 +- ...enerated_resource_details_alter_column.sql | 13 + .../V20240625141100__process_details_ddl.sql | 11 + ...generated_resource_detail_alter_column.sql | 24 + ...100__remove_constraint_process_details.sql | 3 + ...__add_uniqiue_constraint_process_track.sql | 10 + .../project-factory/migration/migrate.sh | 1 + .../project-factory/package-lock.json | 2993 ++++++++--------- health-services/project-factory/package.json | 3 +- .../project-factory/postman_collection.json | 413 ++- .../src/server/api/campaignApis.ts | 132 +- .../src/server/api/genericApis.ts | 281 +- .../src/server/config/constants.ts | 41 +- .../src/server/config/createAndSearch.ts | 132 + .../src/server/config/index.ts | 11 +- .../config/models/createRequestSchema.ts | 2 +- .../config/models/downloadRequestSchema.ts | 20 +- .../config/models/generateRequestSchema.ts | 2 - .../campaignManage.controller.ts | 21 +- .../src/server/kafka/Listener.ts | 112 +- .../src/server/kafka/Producer.ts | 124 +- .../server/service/campaignManageService.ts | 23 +- .../src/server/service/dataManageService.ts | 39 +- .../src/server/utils/campaignMappingUtils.ts | 343 +- .../src/server/utils/campaignUtils.ts | 197 +- .../src/server/utils/excelUtils.ts | 90 +- .../src/server/utils/generateUtils.ts | 85 + .../src/server/utils/genericUtils.ts | 311 +- .../src/server/utils/localisationUtils.ts | 34 +- .../src/server/utils/processTrackUtils.ts | 234 +- .../src/server/utils/targetUtils.ts | 137 + .../server/validators/campaignValidators.ts | 180 +- .../src/server/validators/genericValidator.ts | 54 +- health-services/project-factory/yarn.lock | 835 +++-- 298 files changed, 4307 insertions(+), 39852 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json delete mode 100644 frontend/micro-ui/.gitignore delete mode 100644 frontend/micro-ui/Jenkinsfile delete mode 100644 frontend/micro-ui/README.md delete mode 100644 frontend/micro-ui/package.json delete mode 100644 frontend/micro-ui/web/.babelrc delete mode 100644 frontend/micro-ui/web/.env.sample delete mode 100644 frontend/micro-ui/web/CHANGELOG.md delete mode 100644 frontend/micro-ui/web/docker/Dockerfile delete mode 100644 frontend/micro-ui/web/docker/devDockerfile delete mode 100644 frontend/micro-ui/web/docker/masDockerfile delete mode 100644 frontend/micro-ui/web/docker/nginx.conf delete mode 100644 frontend/micro-ui/web/envs.js delete mode 100755 frontend/micro-ui/web/install-deps.sh delete mode 100644 frontend/micro-ui/web/micro-ui-internals/.gitignore delete mode 100644 frontend/micro-ui/web/micro-ui-internals/.prettierignore delete mode 100644 frontend/micro-ui/web/micro-ui-internals/.prettierrc.json delete mode 100644 frontend/micro-ui/web/micro-ui-internals/README.md delete mode 100644 frontend/micro-ui/web/micro-ui-internals/clean.sh delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/.env-health-qa delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/.env-mz-prod delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/.env-mz-uat delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/package.json delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/public/index.html delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/src/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/package.json delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/README.md delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/package.json delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/postcss.config.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaignCycle.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/coreOverride.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/typography.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/README.md delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BulkUpload.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignCard.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDocumentsPreview.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignHeader.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignResourceDocuments.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDataPreview.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDetaisPreview.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DetailsTable.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DocumentIcon.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/PlusMinusInput.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/RemovableTagNew.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/TimelineCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/XlsPreview.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/icons/DustbinIcon.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/icons/XlsxFile.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/CampaignConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/UICustomizations.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/addProductConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/attributeConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/baseTimeOut.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/headerConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/mailConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/myCampaignConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/operatorConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/previewConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/productType.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/schemaConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/services/createCampaignService.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/services/updateCampaignService.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/services/useSearchCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useCreateCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useCreateProduct.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useCreateProductVariant.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useGenerateIdCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useParallelSearch.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useProductList.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useResourceData.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useUpdateCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AddProduct.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/Response.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddProductscontext.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/MultiTabcontext.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/TourSteps.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/downloadExcel.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/package.json delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/Module.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CommonComponents.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Hypothesis.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Mapping.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MappingHelperComponents.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanCreatedScreen.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanDetails.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreviewHelperCompoenents.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanningCard.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanningHeader.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Modal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Nagivator.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/RuleEngine.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/UploadHelperComponents.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/ZoomControl.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/resourceMapping.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/UICustomizations.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/constants.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/timeLineOptions.json delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/tourSteps.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useCreatePlanConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useGenerateIdCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useNumberFormatter.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSavedMicroplans.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSearchCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSearchPlanConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useUpdatePlanConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/icons/Svg.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Guidelines.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/SavedMicroplans.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/SelectCampaign.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/CreatePlanConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/Search.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/SearchCampaignConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/SearchPlanConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/UpdatePlanConfig.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/searchSavedPlans.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/context.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/createTemplate.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelUtils.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelValidations.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/exceltojson.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/geojsonValidations.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/jsonToExcelBlob.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/mappingUtils.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/microplanPreviewUtils.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/processHierarchyAndData.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/uploadUtils.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/AttendanceActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAREGActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/ExpenditureActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/FSMActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/NOCActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/PTActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/TLActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WNSActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WorksActionModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsActionBar.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsContent.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsToast.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsWarningPopup.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/BPADocuments.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/DocumentsPreview.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InfoDetails.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InspectionReport.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/NOCDocuments.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PermissionCheck.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyDocuments.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyEstimates.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyFloors.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyOwners.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/Reason.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ScruntinyDetails.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubOccupancyTable.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubWorkTableDetails.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLCaption.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeAccessories.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeUnits.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ViewBreakup.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSAdditonalDetails.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSFeeEstimation.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WeekDateRange.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AcceptDso.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AssignDso.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAApproverApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAREGApproverApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/CompleteApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/NOCApproverApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTApproverApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTAssessProperty.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/ReassignDso.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/RejectApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/TLApproverApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSApproverApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSDisconnectApplication.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configApproveModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceApproveModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceCheckModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceRejectModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configCheckModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configRejectModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillApproveModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillCheckModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillRejectModal.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/index.js delete mode 100644 frontend/micro-ui/web/micro-ui-internals/publish-develop.sh delete mode 100644 frontend/micro-ui/web/micro-ui-internals/publish.sh delete mode 100755 frontend/micro-ui/web/micro-ui-internals/scripts/create.sh delete mode 100755 frontend/micro-ui/web/micro-ui-internals/scripts/deploy.sh delete mode 100755 frontend/micro-ui/web/micro-ui-internals/scripts/jenkins.sh delete mode 100755 frontend/micro-ui/web/micro-ui-internals/scripts/run.sh delete mode 100644 frontend/micro-ui/web/micro-ui-internals/test.js delete mode 100644 frontend/micro-ui/web/microplan/App.js delete mode 100644 frontend/micro-ui/web/microplan/Dockerfile delete mode 100644 frontend/micro-ui/web/microplan/install-deps.sh delete mode 100644 frontend/micro-ui/web/microplan/inter-package.json delete mode 100644 frontend/micro-ui/web/microplan/nginx.conf delete mode 100644 frontend/micro-ui/web/microplan/package.json delete mode 100644 frontend/micro-ui/web/microplan/webpack.config.js delete mode 100644 frontend/micro-ui/web/package.json delete mode 100644 frontend/micro-ui/web/public/index.html delete mode 100644 frontend/micro-ui/web/public/robots.txt delete mode 100644 frontend/micro-ui/web/src/App.js delete mode 100644 frontend/micro-ui/web/src/ComponentRegistry.js delete mode 100644 frontend/micro-ui/web/src/Customisations/UICustomizations.js delete mode 100644 frontend/micro-ui/web/src/Customisations/index.js delete mode 100644 frontend/micro-ui/web/src/Customisations/pt/index.js delete mode 100644 frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTAllotmentDetails.js delete mode 100644 frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTBusinessDetails.js delete mode 100644 frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTVasikaDetails.js delete mode 100644 frontend/micro-ui/web/src/Customisations/pt/pageComponents/PropertyUsageType.js delete mode 100644 frontend/micro-ui/web/src/Customisations/tl/TLCustomisation.js delete mode 100644 frontend/micro-ui/web/src/Customisations/tl/index.js delete mode 100644 frontend/micro-ui/web/src/Customisations/tl/pageComponents/PropertyUsageType.js delete mode 100644 frontend/micro-ui/web/src/index.css delete mode 100644 frontend/micro-ui/web/src/index.js delete mode 100644 frontend/micro-ui/web/src/setupProxy.js delete mode 100644 frontend/micro-ui/web/webpack.config.js delete mode 100644 frontend/micro-ui/web/workbench/App.js delete mode 100644 frontend/micro-ui/web/workbench/Dockerfile delete mode 100755 frontend/micro-ui/web/workbench/install-deps.sh delete mode 100644 frontend/micro-ui/web/workbench/inter-package.json delete mode 100644 frontend/micro-ui/web/workbench/nginx.conf delete mode 100644 frontend/micro-ui/web/workbench/package.json delete mode 100644 frontend/micro-ui/web/workbench/webpack.config.js create mode 100644 health-services/project-factory/migration/main/V20240624210000__generated_resource_details_alter_column.sql create mode 100644 health-services/project-factory/migration/main/V20240625141100__process_details_ddl.sql create mode 100644 health-services/project-factory/migration/main/V20240708153000__generated_resource_detail_alter_column.sql create mode 100644 health-services/project-factory/migration/main/V20240725155100__remove_constraint_process_details.sql create mode 100644 health-services/project-factory/migration/main/V20240731162600__add_uniqiue_constraint_process_track.sql create mode 100644 health-services/project-factory/src/server/utils/generateUtils.ts create mode 100644 health-services/project-factory/src/server/utils/targetUtils.ts diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..d61e0ddfd7d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "node", + "request": "attach", + "name": "Attach to Remote", + "address": "localhost", + "port": 9229, + "localRoot": "${workspaceFolder}", + "remoteRoot": "/app" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..14f60307eb1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.inlineSuggest.showToolbar": "onHover" +} \ No newline at end of file diff --git a/frontend/micro-ui/.gitignore b/frontend/micro-ui/.gitignore deleted file mode 100644 index feb4cac5c94..00000000000 --- a/frontend/micro-ui/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -.env -.eslintcache - -# yarn $ -.yarn -yarn.lock -.yarnrc.yml - -# dependencies -node_modules -.yarn -/.pnp -.pnp.js - -# testing -/coverage - -# production -/web/build -dist -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/frontend/micro-ui/Jenkinsfile b/frontend/micro-ui/Jenkinsfile deleted file mode 100644 index 1206b9c141d..00000000000 --- a/frontend/micro-ui/Jenkinsfile +++ /dev/null @@ -1,3 +0,0 @@ -library 'ci-libs' - -buildPipeline(configFile: './build/build-config.yml') diff --git a/frontend/micro-ui/README.md b/frontend/micro-ui/README.md deleted file mode 100644 index 9f559d81783..00000000000 --- a/frontend/micro-ui/README.md +++ /dev/null @@ -1,139 +0,0 @@ - -# DIGIT ui - -A React App built on top of DIGIT UI Core. - -# DIGIT - -DIGIT eGovernance Platform Services - -DIGIT (Digital Infrastructure for Governance, Impact & Transformation) is India's largest platform for governance services. Visit https://core.digit.org/ for more details. - -DIGIT platform is microservices based API platform enabling quick rebundling of services as per specific needs. This is a repo that lays down the core platform on top of which other mission services depend. - - -# DIGIT UI - - -This repository contains source code for web implementation of the new Digit UI modules with dependencies and libraries. - -Workbench module is used to Manage the master data (MDMS V2 Service) used across the DIGIT Services / Applications - -It is also used to manage the Localisation data present in the system (Localisation service) - - -## Run Locally - -Clone the project - -```bash - git clone https://github.com/egovernments/DIGIT-Frontend.git -``` - -Go to the Sub directory to run UI -```bash - cd into micro-ui/web/micro-ui-internals -``` - -Install dependencies - -```bash - yarn install -``` - -Add .env file -```bash - micro-ui/web/micro-ui-internals/example/.env -``` - -Start the server - -```bash - yarn start -``` - - -## Environment Variables - -To run this project, you will need to add the following environment variables to your .env file - -`REACT_APP_PROXY_API` :: `{{server url}}` - -`REACT_APP_GLOBAL` :: `{{server url}}` - -`REACT_APP_PROXY_ASSETS` :: `{{server url}}` - -`REACT_APP_USER_TYPE` :: `{{EMPLOYEE||CITIZEN}}` - -`SKIP_PREFLIGHT_CHECK` :: `true` - -[sample .env file](https://github.com/egovernments/Digit-Core/blob/workbench/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev) - -## Tech Stack - -**Libraries:** - -[React](https://react.dev/) - -[React Hook Form](https://www.react-hook-form.com/) - -[React Query](https://tanstack.com/query/v3/) - -[Tailwind CSS](https://tailwindcss.com/) - -[Webpack](https://webpack.js.org/) - -## License - -[MIT](https://choosealicense.com/licenses/mit/) - - -## Author - -- [@jagankumar-egov](https://www.github.com/jagankumar-egov) - - -## Documentation - -[Documentation](https://https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) - - -## Support - -For support, add the issues in https://github.com/egovernments/DIGIT-core/issues. - - -## Modules - - 1. Core - 2. Workbench - 3. HRMS - 4. Dashboard - 5. Engagement - 6. Payment - -## Starting with Digit-UI App (Impelmentation Teams) - MICRO-UI - - -Go to the Sub directory to run UI - -```bash - cd into micro-ui/web -``` - -```bash - yarn install -``` - -Add .env file -```bash - micro-ui/web/.env -``` - -Start the server - -```bash - yarn start -``` - -![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) diff --git a/frontend/micro-ui/package.json b/frontend/micro-ui/package.json deleted file mode 100644 index 78ab4e7aa40..00000000000 --- a/frontend/micro-ui/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "workbench-ui", - "version": "0.1.0" -} \ No newline at end of file diff --git a/frontend/micro-ui/web/.babelrc b/frontend/micro-ui/web/.babelrc deleted file mode 100644 index 5f90443d15e..00000000000 --- a/frontend/micro-ui/web/.babelrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": [ - "@babel/preset-env","@babel/preset-react" - ] - } \ No newline at end of file diff --git a/frontend/micro-ui/web/.env.sample b/frontend/micro-ui/web/.env.sample deleted file mode 100644 index e87c7f586c4..00000000000 --- a/frontend/micro-ui/web/.env.sample +++ /dev/null @@ -1,3 +0,0 @@ -SKIP_PREFLIGHT_CHECK=true -REACT_APP_STATE_LEVEL_TENANT_ID=pb -REACT_APP_PROXY_URL=https://works-dev.digit.org diff --git a/frontend/micro-ui/web/CHANGELOG.md b/frontend/micro-ui/web/CHANGELOG.md deleted file mode 100644 index 826105084e8..00000000000 --- a/frontend/micro-ui/web/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog -All notable changes to this module will be documented in this file. - -## 0.1.0 - 2024-05-28 -#### Base Admin console web - 1. Helps in creating the Campaign and configure delivery rules - 2. Create Data: Validates and creates resource details of type facility,user and boundary. diff --git a/frontend/micro-ui/web/docker/Dockerfile b/frontend/micro-ui/web/docker/Dockerfile deleted file mode 100644 index 8e9b173bb85..00000000000 --- a/frontend/micro-ui/web/docker/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# FROM egovio/alpine-node-builder-14:yarn AS build -FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build -RUN apk update && apk upgrade -RUN apk add --no-cache git>2.30.0 -ARG WORK_DIR -WORKDIR /app -ENV NODE_OPTIONS "--max-old-space-size=8168" - -COPY ${WORK_DIR} . -RUN ls -lah - -#RUN node web/envs.js -RUN cd web/ \ - && ./install-deps.sh \ - && yarn install \ - && yarn build:webpack - -FROM nginx:mainline-alpine -#FROM ghcr.io/egovernments/nginx:mainline-alpine -ENV WORK_DIR=/var/web/digit-ui - -RUN mkdir -p ${WORK_DIR} - -COPY --from=build /app/web/build ${WORK_DIR}/ -COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/frontend/micro-ui/web/docker/devDockerfile b/frontend/micro-ui/web/docker/devDockerfile deleted file mode 100644 index d7b1ba1870a..00000000000 --- a/frontend/micro-ui/web/docker/devDockerfile +++ /dev/null @@ -1,26 +0,0 @@ -#FROM egovio/alpine-node-builder-14:yarn AS build -FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build -RUN apk update && apk upgrade -RUN apk add --no-cache git>2.30.0 -ARG WORK_DIR -WORKDIR /app -ENV NODE_OPTIONS "--max-old-space-size=1792" - -COPY ${WORK_DIR} . -RUN ls -lah - -#RUN node web/envs.js -RUN cd web/ \ - && node envs.js \ - && ./install-deps.sh \ - && yarn install \ - && yarn build - -#FROM nginx:mainline-alpine -FROM ghcr.io/egovernments/nginx:mainline-alpine -ENV WORK_DIR=/var/web/digit-ui - -RUN mkdir -p ${WORK_DIR} - -COPY --from=build /app/web/build ${WORK_DIR}/ -COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/frontend/micro-ui/web/docker/masDockerfile b/frontend/micro-ui/web/docker/masDockerfile deleted file mode 100644 index 5d7cf45dd87..00000000000 --- a/frontend/micro-ui/web/docker/masDockerfile +++ /dev/null @@ -1,25 +0,0 @@ -#FROM egovio/alpine-node-builder-14:yarn AS build -FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build -RUN apk update && apk upgrade -RUN apk add --no-cache git>2.30.0 -ARG WORK_DIR -WORKDIR /app -ENV NODE_OPTIONS "--max-old-space-size=3792" - -COPY ${WORK_DIR} . -RUN ls -lah - -#RUN node web/envs.js -RUN cd web/ \ - && node envs.js \ - && yarn install \ - && yarn build - -#FROM nginx:mainline-alpine -FROM ghcr.io/egovernments/nginx:mainline-alpine -ENV WORK_DIR=/var/web/digit-ui - -RUN mkdir -p ${WORK_DIR} - -COPY --from=build /app/web/build ${WORK_DIR}/ -COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/frontend/micro-ui/web/docker/nginx.conf b/frontend/micro-ui/web/docker/nginx.conf deleted file mode 100644 index 4f532e4a6ed..00000000000 --- a/frontend/micro-ui/web/docker/nginx.conf +++ /dev/null @@ -1,12 +0,0 @@ -server -{ - listen 80; - underscores_in_headers on; - - location /digit-ui - { - root /var/web; - index index.html index.htm; - try_files $uri $uri/ /digit-ui/index.html; - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/envs.js b/frontend/micro-ui/web/envs.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frontend/micro-ui/web/install-deps.sh b/frontend/micro-ui/web/install-deps.sh deleted file mode 100755 index efaceaee20d..00000000000 --- a/frontend/micro-ui/web/install-deps.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -BRANCH="$(git branch --show-current)" - -echo "Main Branch: $BRANCH" - -INTERNALS="micro-ui-internals" - -cp $INTERNALS/example/src/UICustomizations.js src/Customisations - -cd $INTERNALS && echo "Branch: $(git branch --show-current)" && echo "$(git log -1 --pretty=%B)" && echo "installing packages" - - -# yarn install diff --git a/frontend/micro-ui/web/micro-ui-internals/.gitignore b/frontend/micro-ui/web/micro-ui-internals/.gitignore deleted file mode 100644 index 1747c795d6f..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/.gitignore +++ /dev/null @@ -1,143 +0,0 @@ -# Created by https://www.toptal.com/developers/gitignore/api/node,react -# Edit at https://www.toptal.com/developers/gitignore?templates=node,react - -### eGov ### -packages/css/example/index.css -package-lock.json -locales/ -build/ -packages/**/dist/ - -# yarn # -.yarn -.yarnrc.yml - -### Node ### -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test -.env*.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist -dist-storybook - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -### react ### -.DS_* -**/*.backup.* -**/*.back.* - -node_modules - -*.sublime* - -psd -thumb -sketch - -# vs code -.vscode/ - -# End of https://www.toptal.com/developers/gitignore/api/node,react \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/.prettierignore b/frontend/micro-ui/web/micro-ui-internals/.prettierignore deleted file mode 100644 index d54de016ef0..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/.prettierignore +++ /dev/null @@ -1,23 +0,0 @@ - -# See https://help.github.com/ignore-files/ for more about ignoring files. -# dependencies -node_modules -# builds -build -dist -.rpt2_cache -# dev -dev.css -index.css -index.compat.css -index.min.css -# misc -.DS_Store -.env -.env.local -.env.development.local -.env.test.local -.env.production.local -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/frontend/micro-ui/web/micro-ui-internals/.prettierrc.json b/frontend/micro-ui/web/micro-ui-internals/.prettierrc.json deleted file mode 100644 index b975008d6f8..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "printWidth": 150 -} diff --git a/frontend/micro-ui/web/micro-ui-internals/README.md b/frontend/micro-ui/web/micro-ui-internals/README.md deleted file mode 100644 index f23a1fcfe9c..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/README.md +++ /dev/null @@ -1,100 +0,0 @@ - -# workbench ui - -A React App built on top of DIGIT UI Core. - - -# DIGIT UI - -DIGIT (Digital Infrastructure for Governance, Impact & Transformation) is India's largest platform for governance services. Visit https://www.digit.org for more details. - -This repository contains source code for web implementation of the new Digit UI modules with dependencies and libraries. - -Workbench module is used to Manage the master data (MDMS V2 Service) used across the DIGIT Services / Applications - -It is also used to manage the Localisation data present in the system (Localisation service) - - -## Run Locally - -Clone the project - -```bash - git clone https://github.com/egovernments/Digit-Core.git -``` - -Go to the Sub directory to run UI -```bash - cd into frontend/micro-ui/web/micro-ui-internals -``` - -Install dependencies - -```bash - yarn install -``` - -Add .env file -```bash - frontend/micro-ui/web/micro-ui-internals/example/.env -``` - -Start the server - -```bash - yarn start -``` - - -## Environment Variables - -To run this project, you will need to add the following environment variables to your .env file - -`REACT_APP_PROXY_API` :: `{{server url}}` - -`REACT_APP_GLOBAL` :: `{{server url}}` - -`REACT_APP_PROXY_ASSETS` :: `{{server url}}` - -`REACT_APP_USER_TYPE` :: `{{EMPLOYEE||CITIZEN}}` - -`SKIP_PREFLIGHT_CHECK` :: `true` - -[sample .env file](https://github.com/egovernments/Digit-Core/blob/workbench/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev) - -## Tech Stack - -**Libraries:** - -[React](https://react.dev/) - -[React Hook Form](https://www.react-hook-form.com/) - -[React Query](https://tanstack.com/query/v3/) - -[Tailwind CSS](https://tailwindcss.com/) - -[Webpack](https://webpack.js.org/) - -## License - -[MIT](https://choosealicense.com/licenses/mit/) - - -## Author - -- [@jagankumar-egov](https://www.github.com/jagankumar-egov) - - -## Documentation - -[Documentation](https://https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) - - -## Support - -For support, add the issues in https://github.com/egovernments/DIGIT-core/issues. - - -![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) - diff --git a/frontend/micro-ui/web/micro-ui-internals/clean.sh b/frontend/micro-ui/web/micro-ui-internals/clean.sh deleted file mode 100644 index 2235ef1c1d0..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/clean.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -BASEDIR="$( cd "$( dirname "$0" )" && pwd )" - -msg() { - echo -e "\n\n\033[32;32m$1\033[0m" -} - -msg "Cleaning root" -rm -rf node_modules - -msg "Cleaning css" -cd "$BASEDIR/packages/css" && rm -rf node_modules - -msg "Cleaning libraries" -cd "$BASEDIR/packages/libraries" && rm -rf node_modules - -msg "Cleaning react-components" -cd "$BASEDIR/packages/react-components" && rm -rf node_modules - -msg "Cleaning PGR module" -cd "$BASEDIR/packages/modules/pgr" && rm -rf node_modules - -msg "Cleaning FSM module" -cd "$BASEDIR/packages/modules/fsm" && rm -rf node_modules - -msg "Cleaning Core module" -cd "$BASEDIR/packages/modules/core" && rm -rf node_modules diff --git a/frontend/micro-ui/web/micro-ui-internals/example/.env-health-qa b/frontend/micro-ui/web/micro-ui-internals/example/.env-health-qa deleted file mode 100644 index 73b42b7dfad..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/.env-health-qa +++ /dev/null @@ -1,7 +0,0 @@ -SKIP_PREFLIGHT_CHECK=true -REACT_APP_USER_TYPE=EMPLOYEE -REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a -REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c -REACT_APP_PROXY_API=https://health-qa.digit.org -REACT_APP_PROXY_ASSETS=https://health-qa.digit.org -REACT_APP_GLOBAL=https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsWorkbenchHCM.js diff --git a/frontend/micro-ui/web/micro-ui-internals/example/.env-mz-prod b/frontend/micro-ui/web/micro-ui-internals/example/.env-mz-prod deleted file mode 100644 index 2d02707d7eb..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/.env-mz-prod +++ /dev/null @@ -1,7 +0,0 @@ -SKIP_PREFLIGHT_CHECK=true -REACT_APP_USER_TYPE=EMPLOYEE -REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a -REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c -REACT_APP_PROXY_API=https://salama.digit.org -REACT_APP_PROXY_ASSETS=https://salama.digit.org -REACT_APP_GLOBAL=https://moz-health-prd.s3.af-south-1.amazonaws.com/globalConfig.js diff --git a/frontend/micro-ui/web/micro-ui-internals/example/.env-mz-uat b/frontend/micro-ui/web/micro-ui-internals/example/.env-mz-uat deleted file mode 100644 index bedf28a95b1..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/.env-mz-uat +++ /dev/null @@ -1,7 +0,0 @@ -SKIP_PREFLIGHT_CHECK=true -REACT_APP_USER_TYPE=EMPLOYEE -REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a -REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c -REACT_APP_PROXY_API=https://moz-health-uat.digit.org -REACT_APP_PROXY_ASSETS=https://moz-health-uat.digit.org -REACT_APP_GLOBAL=https://moz-health-uat.s3.ap-south-1.amazonaws.com/globalConfig.js diff --git a/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev b/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev deleted file mode 100644 index 81fd56e040a..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev +++ /dev/null @@ -1,9 +0,0 @@ -SKIP_PREFLIGHT_CHECK=true -REACT_APP_USER_TYPE=EMPLOYEE -REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a -REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c -REACT_APP_PROXY_API=https://unified-dev.digit.org -REACT_APP_PROXY_ASSETS=https://unified-dev.digit.org -REACT_APP_GLOBAL=https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsMicroplan.js -REACT_APP_CONTEXT=works -WORKBENCH=https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsWorkbenchHCMMZ.js \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json deleted file mode 100644 index 2d8c8857b45..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "@egovernments/digit-ui-example", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "private": true, - "homepage": "digit-ui", - "scripts": { - "start": "react-scripts start" - }, - "devDependencies": { - "@egovernments/digit-ui-libraries": "1.8.2-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.2-beta.3", - "@egovernments/digit-ui-components": "0.0.2-beta.1", - "@egovernments/digit-ui-module-core": "1.8.2-beta.2", - "@egovernments/digit-ui-module-utilities": "1.0.1-beta.30", - "@egovernments/digit-ui-react-components": "1.8.2-beta.6", - "@egovernments/digit-ui-module-hcmworkbench":"0.0.38", - "@egovernments/digit-ui-module-campaign-manager": "0.0.1", - "@egovernments/digit-ui-module-hcmmicroplanning": "0.0.1", - "http-proxy-middleware": "^1.0.5", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-i18next": "11.16.2", - "react-router-dom": "5.3.0", - "react-scripts": "^4.0.1" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html deleted file mode 100644 index 55ad3b5ca00..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - DIGIT - - - - - - - - - - - - - - - -
- - diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js deleted file mode 100644 index dff584d9ab2..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ /dev/null @@ -1,789 +0,0 @@ -import { Link } from "react-router-dom"; -import _ from "lodash"; -import { useLocation, useHistory } from "react-router-dom"; -import { useParams } from "react-router-dom"; - -//create functions here based on module name set in mdms(eg->SearchProjectConfig) -//how to call these -> Digit?.Customizations?.[masterName]?.[moduleName] -// these functions will act as middlewares -var Digit = window.Digit || {}; - -const businessServiceMap = { - "muster roll": "MR", -}; - -const inboxModuleNameMap = { - "muster-roll-approval": "muster-roll-service", -}; - -function filterUniqueByKey(arr, key) { - const uniqueValues = new Set(); - const result = []; - - arr.forEach((obj) => { - const value = obj[key]; - if (!uniqueValues.has(value)) { - uniqueValues.add(value); - result.push(obj); - } - }); - - return result; -} - -const epochTimeForTomorrow12 = () => { - const now = new Date(); - - // Create a new Date object for tomorrow at 12:00 PM - const tomorrowNoon = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1, 12, 0, 0, 0); - - // Format the date as "YYYY-MM-DD" - const year = tomorrowNoon.getFullYear(); - const month = String(tomorrowNoon.getMonth() + 1).padStart(2, "0"); // Months are 0-indexed - const day = String(tomorrowNoon.getDate()).padStart(2, "0"); - - return Digit.Utils.date.convertDateToEpoch(`${year}-${month}-${day}`); -}; - -function cleanObject(obj) { - for (const key in obj) { - if (Object.hasOwn(obj, key)) { - if (Array.isArray(obj[key])) { - if (obj[key].length === 0) { - delete obj[key]; - } - } else if ( - obj[key] === undefined || - obj[key] === null || - obj[key] === false || - obj[key] === "" || // Check for empty string - (typeof obj[key] === "object" && Object.keys(obj[key]).length === 0) - ) { - delete obj[key]; - } - } - } - return obj; -} - -export const UICustomizations = { - businessServiceMap, - updatePayload: (applicationDetails, data, action, businessService) => { - if (businessService === businessServiceMap.estimate) { - const workflow = { - comment: data.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - estimate: applicationDetails, - workflow, - }; - } - if (businessService === businessServiceMap.contract) { - const workflow = { - comment: data?.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - contract: applicationDetails, - workflow, - }; - } - if (businessService === businessServiceMap?.["muster roll"]) { - const workflow = { - comment: data?.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - musterRoll: applicationDetails, - workflow, - }; - } - if (businessService === businessServiceMap?.["works.purchase"]) { - const workflow = { - comment: data.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - const additionalFieldsToSet = { - projectId: applicationDetails.additionalDetails.projectId, - invoiceDate: applicationDetails.billDate, - invoiceNumber: applicationDetails.referenceId.split("_")?.[1], - contractNumber: applicationDetails.referenceId.split("_")?.[0], - documents: applicationDetails.additionalDetails.documents, - }; - return { - bill: { ...applicationDetails, ...additionalFieldsToSet }, - workflow, - }; - } - }, - enableModalSubmit: (businessService, action, setModalSubmit, data) => { - if (businessService === businessServiceMap?.["muster roll"] && action.action === "APPROVE") { - setModalSubmit(data?.acceptTerms); - } - }, - enableHrmsSearch: (businessService, action) => { - if (businessService === businessServiceMap.estimate) { - return action.action.includes("TECHNICALSANCTION") || action.action.includes("VERIFYANDFORWARD"); - } - if (businessService === businessServiceMap.contract) { - return action.action.includes("VERIFY_AND_FORWARD"); - } - if (businessService === businessServiceMap?.["muster roll"]) { - return action.action.includes("VERIFY"); - } - if (businessService === businessServiceMap?.["works.purchase"]) { - return action.action.includes("VERIFY_AND_FORWARD"); - } - return false; - }, - getBusinessService: (moduleCode) => { - if (moduleCode?.includes("estimate")) { - return businessServiceMap?.estimate; - } else if (moduleCode?.includes("contract")) { - return businessServiceMap?.contract; - } else if (moduleCode?.includes("muster roll")) { - return businessServiceMap?.["muster roll"]; - } else if (moduleCode?.includes("works.purchase")) { - return businessServiceMap?.["works.purchase"]; - } else if (moduleCode?.includes("works.wages")) { - return businessServiceMap?.["works.wages"]; - } else if (moduleCode?.includes("works.supervision")) { - return businessServiceMap?.["works.supervision"]; - } else { - return businessServiceMap; - } - }, - getInboxModuleName: (moduleCode) => { - if (moduleCode?.includes("estimate")) { - return inboxModuleNameMap?.estimate; - } else if (moduleCode?.includes("contract")) { - return inboxModuleNameMap?.contracts; - } else if (moduleCode?.includes("attendence")) { - return inboxModuleNameMap?.attendencemgmt; - } else { - return inboxModuleNameMap; - } - }, - - AttendanceInboxConfig: { - preProcess: (data) => { - //set tenantId - data.body.inbox.tenantId = Digit.ULBService.getCurrentTenantId(); - data.body.inbox.processSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId(); - - const musterRollNumber = data?.body?.inbox?.moduleSearchCriteria?.musterRollNumber?.trim(); - if (musterRollNumber) data.body.inbox.moduleSearchCriteria.musterRollNumber = musterRollNumber; - - const attendanceRegisterName = data?.body?.inbox?.moduleSearchCriteria?.attendanceRegisterName?.trim(); - if (attendanceRegisterName) data.body.inbox.moduleSearchCriteria.attendanceRegisterName = attendanceRegisterName; - - // deleting them for now(assignee-> need clarity from pintu,ward-> static for now,not implemented BE side) - const assignee = _.clone(data.body.inbox.moduleSearchCriteria.assignee); - delete data.body.inbox.moduleSearchCriteria.assignee; - if (assignee?.code === "ASSIGNED_TO_ME") { - data.body.inbox.moduleSearchCriteria.assignee = Digit.UserService.getUser().info.uuid; - } - - //cloning locality and workflow states to format them - // let locality = _.clone(data.body.inbox.moduleSearchCriteria.locality ? data.body.inbox.moduleSearchCriteria.locality : []); - - let selectedOrg = _.clone(data.body.inbox.moduleSearchCriteria.orgId ? data.body.inbox.moduleSearchCriteria.orgId : null); - delete data.body.inbox.moduleSearchCriteria.orgId; - if (selectedOrg) { - data.body.inbox.moduleSearchCriteria.orgId = selectedOrg?.[0]?.applicationNumber; - } - - // let selectedWard = _.clone(data.body.inbox.moduleSearchCriteria.ward ? data.body.inbox.moduleSearchCriteria.ward : null); - // delete data.body.inbox.moduleSearchCriteria.ward; - // if(selectedWard) { - // data.body.inbox.moduleSearchCriteria.ward = selectedWard?.[0]?.code; - // } - - let states = _.clone(data.body.inbox.moduleSearchCriteria.state ? data.body.inbox.moduleSearchCriteria.state : []); - let ward = _.clone(data.body.inbox.moduleSearchCriteria.ward ? data.body.inbox.moduleSearchCriteria.ward : []); - // delete data.body.inbox.moduleSearchCriteria.locality; - delete data.body.inbox.moduleSearchCriteria.state; - delete data.body.inbox.moduleSearchCriteria.ward; - - // locality = locality?.map((row) => row?.code); - states = Object.keys(states)?.filter((key) => states[key]); - ward = ward?.map((row) => row?.code); - - // //adding formatted data to these keys - // if (locality.length > 0) data.body.inbox.moduleSearchCriteria.locality = locality; - if (states.length > 0) data.body.inbox.moduleSearchCriteria.status = states; - if (ward.length > 0) data.body.inbox.moduleSearchCriteria.ward = ward; - const projectType = _.clone(data.body.inbox.moduleSearchCriteria.projectType ? data.body.inbox.moduleSearchCriteria.projectType : {}); - if (projectType?.code) data.body.inbox.moduleSearchCriteria.projectType = projectType.code; - - //adding tenantId to moduleSearchCriteria - data.body.inbox.moduleSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId(); - - //setting limit and offset becoz somehow they are not getting set in muster inbox - data.body.inbox.limit = data.state.tableForm.limit; - data.body.inbox.offset = data.state.tableForm.offset; - delete data.state; - return data; - }, - postProcess: (responseArray, uiConfig) => { - const statusOptions = responseArray?.statusMap - ?.filter((item) => item.applicationstatus) - ?.map((item) => ({ code: item.applicationstatus, i18nKey: `COMMON_MASTERS_${item.applicationstatus}` })); - if (uiConfig?.type === "filter") { - let fieldConfig = uiConfig?.fields?.filter((item) => item.type === "dropdown" && item.populators.name === "musterRollStatus"); - if (fieldConfig.length) { - fieldConfig[0].populators.options = statusOptions; - } - } - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - if (key === "ATM_MUSTER_ROLL_ID") { - return ( - - - {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} - - - ); - } - if (key === "ATM_ATTENDANCE_WEEK") { - const week = `${Digit.DateUtils.ConvertTimestampToDate(value?.startDate, "dd/MM/yyyy")}-${Digit.DateUtils.ConvertTimestampToDate( - value?.endDate, - "dd/MM/yyyy" - )}`; - return
{week}
; - } - if (key === "ATM_NO_OF_INDIVIDUALS") { - return
{value?.length}
; - } - if (key === "ATM_AMOUNT_IN_RS") { - return {value ? Digit.Utils.dss.formatterWithoutRound(value, "number") : t("ES_COMMON_NA")}; - } - if (key === "ATM_SLA") { - return parseInt(value) > 0 ? ( - {t(value) || ""} - ) : ( - {t(value) || ""} - ); - } - if (key === "COMMON_WORKFLOW_STATES") { - return {t(`WF_MUSTOR_${value}`)}; - } - //added this in case we change the key and not updated here , it'll throw that nothing was returned from cell error if that case is not handled here. To prevent that error putting this default - return {t(`CASE_NOT_HANDLED`)}; - }, - MobileDetailsOnClick: (row, tenantId) => { - let link; - Object.keys(row).map((key) => { - if (key === "ATM_MUSTER_ROLL_ID") - link = `/${window.contextPath}/employee/attendencemgmt/view-attendance?tenantId=${tenantId}&musterRollNumber=${row[key]}`; - }); - return link; - }, - populateReqCriteria: () => { - const tenantId = Digit.ULBService.getCurrentTenantId(); - return { - url: "/org-services/organisation/v1/_search", - params: { limit: 50, offset: 0 }, - body: { - SearchCriteria: { - tenantId: tenantId, - functions: { - type: "CBO", - }, - }, - }, - config: { - enabled: true, - select: (data) => { - return data?.organisations; - }, - }, - }; - }, - }, - SearchWageSeekerConfig: { - customValidationCheck: (data) => { - //checking both to and from date are present - const { createdFrom, createdTo } = data; - if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) - return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; - - return false; - }, - preProcess: (data) => { - data.params = { ...data.params, tenantId: Digit.ULBService.getCurrentTenantId() }; - - let requestBody = { ...data.body.Individual }; - const pathConfig = { - name: "name.givenName", - }; - const dateConfig = { - createdFrom: "daystart", - createdTo: "dayend", - }; - const selectConfig = { - wardCode: "wardCode[0].code", - socialCategory: "socialCategory.code", - }; - const textConfig = ["name", "individualId"]; - let Individual = Object.keys(requestBody) - .map((key) => { - if (selectConfig[key]) { - requestBody[key] = _.get(requestBody, selectConfig[key], null); - } else if (typeof requestBody[key] == "object") { - requestBody[key] = requestBody[key]?.code; - } else if (textConfig?.includes(key)) { - requestBody[key] = requestBody[key]?.trim(); - } - return key; - }) - .filter((key) => requestBody[key]) - .reduce((acc, curr) => { - if (pathConfig[curr]) { - _.set(acc, pathConfig[curr], requestBody[curr]); - } else if (dateConfig[curr] && dateConfig[curr]?.includes("day")) { - _.set(acc, curr, Digit.Utils.date.convertDateToEpoch(requestBody[curr], dateConfig[curr])); - } else { - _.set(acc, curr, requestBody[curr]); - } - return acc; - }, {}); - - data.body.Individual = { ...Individual }; - return data; - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - //here we can add multiple conditions - //like if a cell is link then we return link - //first we can identify which column it belongs to then we can return relevant result - switch (key) { - case "MASTERS_WAGESEEKER_ID": - return ( - - - {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} - - - ); - - case "MASTERS_SOCIAL_CATEGORY": - return value ? {String(t(`MASTERS_${value}`))} : t("ES_COMMON_NA"); - - case "CORE_COMMON_PROFILE_CITY": - return value ? {String(t(Digit.Utils.locale.getCityLocale(value)))} : t("ES_COMMON_NA"); - - case "MASTERS_WARD": - return value ? ( - {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} - ) : ( - t("ES_COMMON_NA") - ); - - case "MASTERS_LOCALITY": - return value ? ( - {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} - ) : ( - t("ES_COMMON_NA") - ); - default: - return t("ES_COMMON_NA"); - } - }, - MobileDetailsOnClick: (row, tenantId) => { - let link; - Object.keys(row).map((key) => { - if (key === "MASTERS_WAGESEEKER_ID") - link = `/${window.contextPath}/employee/masters/view-wageseeker?tenantId=${tenantId}&wageseekerId=${row[key]}`; - }); - return link; - }, - additionalValidations: (type, data, keys) => { - if (type === "date") { - return data[keys.start] && data[keys.end] ? () => new Date(data[keys.start]).getTime() <= new Date(data[keys.end]).getTime() : true; - } - }, - }, - SearchDefaultConfig: { - customValidationCheck: (data) => { - //checking both to and from date are present - const { createdFrom, createdTo } = data; - if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) - return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; - - return false; - }, - preProcess: (data) => { - const location = useLocation(); - data.params = { ...data.params }; - const { masterName } = useParams(); - - const searchParams = new URLSearchParams(location.search); - const paths = { - SearchProjectConfig: { - basePath: "Projects", - pathConfig: { - // id: "id[0]", - tenantId: "tenantId", - }, - dateConfig: { - endDate: "dayend", - startDate: "daystart", - }, - selectConfig: {}, - textConfig: ["id", "tenantId", "name", "projectNumber", "projectSubType", "projectType"], - }, - SearchProductConfig: { - basePath: "Product", - pathConfig: { - id: "id[0]", - }, - dateConfig: {}, - selectConfig: {}, - textConfig: ["id", "manufacturer", "name", "type"], - }, - SearchHouseholdConfig: { - basePath: "Household", - pathConfig: { - id: "id[0]", - clientReferenceId: "clientReferenceId[0]", - }, - dateConfig: {}, - selectConfig: {}, - textConfig: ["boundaryCode", "clientReferenceId", "id"], - }, - SearchProductVariantConfig: { - basePath: "ProductVariant", - pathConfig: { - id: "id[0]", - }, - dateConfig: {}, - selectConfig: {}, - textConfig: ["productId", "sku", "variation"], - }, - SearchProjectBeneficiaryConfig: { - basePath: "ProjectBeneficiary", - pathConfig: { - id: "id[0]", - clientReferenceId: "clientReferenceId[0]", - }, - dateConfig: { - dateOfRegistration: "daystart", - }, - selectConfig: {}, - textConfig: ["beneficiaryId", "projectId"], - }, - SearchProjectStaffConfig: { - basePath: "ProjectStaff", - pathConfig: { - id: "id[0]", - }, - dateConfig: { - startDate: "daystart", - endDate: "dayend", - }, - selectConfig: {}, - textConfig: ["projectId", "userId"], - }, - SearchProjectResourceConfig: { - basePath: "ProjectResource", - pathConfig: { - id: "id[0]", - }, - dateConfig: {}, - selectConfig: {}, - textConfig: [], - }, - SearchProjectTaskConfig: { - basePath: "Task", - pathConfig: { - id: "id[0]", - clientReferenceId: "clientReferenceId[0]", - }, - dateConfig: { - plannedEndDate: "dayend", - plannedStartDate: "daystart", - actualEndDate: "dayend", - actualStartDate: "daystart", - }, - selectConfig: {}, - textConfig: ["projectId", "localityCode", "projectBeneficiaryId", "status"], - }, - SearchFacilityConfig: { - basePath: "Facility", - pathConfig: { - id: "id[0]", - }, - dateConfig: {}, - selectConfig: {}, - textConfig: ["faciltyUsage", "localityCode", "storageCapacity", "id"], - }, - SearchProjectFacilityConfig: { - basePath: "ProjectFacility", - pathConfig: { - id: "id[0]", - projectId: "projectId[0]", - facilityId: "facilityId[0]", - }, - dateConfig: {}, - selectConfig: {}, - textConfig: [], - }, - }; - - const id = searchParams.get("config") || masterName; - - if (!paths || !paths?.[id]) { - return data; - } - let requestBody = { ...data.body[paths[id]?.basePath] }; - const pathConfig = paths[id]?.pathConfig; - const dateConfig = paths[id]?.dateConfig; - const selectConfig = paths[id]?.selectConfig; - const textConfig = paths[id]?.textConfig; - - if (paths[id].basePath == "Projects") { - data.state.searchForm = { ...data.state.searchForm, tenantId: "mz" }; - } - let Product = Object.keys(requestBody) - .map((key) => { - if (selectConfig[key]) { - requestBody[key] = _.get(requestBody, selectConfig[key], null); - } else if (typeof requestBody[key] == "object") { - requestBody[key] = requestBody[key]?.code; - } else if (textConfig?.includes(key)) { - requestBody[key] = requestBody[key]?.trim(); - } - return key; - }) - .filter((key) => requestBody[key]) - .reduce((acc, curr) => { - if (pathConfig[curr]) { - _.set(acc, pathConfig[curr], requestBody[curr]); - } else if (dateConfig[curr] && dateConfig[curr]?.includes("day")) { - _.set(acc, curr, Digit.Utils.date.convertDateToEpoch(requestBody[curr], dateConfig[curr])); - } else { - _.set(acc, curr, requestBody[curr]); - } - return acc; - }, {}); - - if (paths[id].basePath == "Projects") { - data.body[paths[id].basePath] = [{ ...Product }]; - } else data.body[paths[id].basePath] = { ...Product }; - return data; - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - //here we can add multiple conditions - //like if a cell is link then we return link - //first we can identify which column it belongs to then we can return relevant result - switch (key) { - case "ID": - return ( - - - - ); - - case "MASTERS_SOCIAL_CATEGORY": - return value ? {String(t(`MASTERS_${value}`))} : t("ES_COMMON_NA"); - - case "CORE_COMMON_PROFILE_CITY": - return value ? {String(t(Digit.Utils.locale.getCityLocale(value)))} : t("ES_COMMON_NA"); - - case "MASTERS_WARD": - return value ? ( - {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} - ) : ( - t("ES_COMMON_NA") - ); - - case "MASTERS_LOCALITY": - return value ? ( - {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} - ) : ( - t("ES_COMMON_NA") - ); - default: - return t("ES_COMMON_NA"); - } - }, - MobileDetailsOnClick: (row, tenantId) => { - let link; - Object.keys(row).map((key) => { - if (key === "MASTERS_WAGESEEKER_ID") - link = `/${window.contextPath}/employee/masters/view-wageseeker?tenantId=${tenantId}&wageseekerId=${row[key]}`; - }); - return link; - }, - additionalValidations: (type, data, keys) => { - if (type === "date") { - return data[keys.start] && data[keys.end] ? () => new Date(data[keys.start]).getTime() <= new Date(data[keys.end]).getTime() : true; - } - }, - }, - SearchCampaign: { - preProcess: (data, additionalDetails) => { - const { campaignName = "", endDate = "", projectType = "", startDate = "" } = data?.state?.searchForm || {}; - data.body.CampaignDetails = {}; - data.body.CampaignDetails.pagination = data?.state?.tableForm; - data.body.CampaignDetails.tenantId = Digit.ULBService.getCurrentTenantId(); - // data.body.CampaignDetails.boundaryCode = boundaryCode; - data.body.CampaignDetails.createdBy = Digit.UserService.getUser().info.uuid; - data.body.CampaignDetails.campaignName = campaignName; - data.body.CampaignDetails.status = ["drafted"]; - if (startDate) { - data.body.CampaignDetails.startDate = Digit.Utils.date.convertDateToEpoch(startDate); - } else { - data.body.CampaignDetails.startDate = epochTimeForTomorrow12(); - } - if (endDate) { - data.body.CampaignDetails.endDate = Digit.Utils.date.convertDateToEpoch(endDate); - } - data.body.CampaignDetails.projectType = projectType?.[0]?.code; - - cleanObject(data.body.CampaignDetails); - - return data; - }, - populateProjectType: () => { - const tenantId = Digit.ULBService.getCurrentTenantId(); - - return { - url: "/egov-mdms-service/v1/_search", - params: { tenantId }, - body: { - MdmsCriteria: { - tenantId, - moduleDetails: [ - { - moduleName: "HCM-PROJECT-TYPES", - masterDetails: [ - { - name: "projectTypes", - }, - ], - }, - ], - }, - }, - changeQueryName: "projectType", - config: { - enabled: true, - select: (data) => { - const dropdownData = filterUniqueByKey(data?.MdmsRes?.["HCM-PROJECT-TYPES"]?.projectTypes, "code").map((row) => { - return { - ...row, - i18nKey: Digit.Utils.locale.getTransformedLocale(`CAMPAIGN_TYPE_${row.code}`), - }; - }); - return dropdownData; - }, - }, - }; - }, - customValidationCheck: (data) => { - //checking if both to and from date are present then they should be startDate<=endDate - const { startDate, endDate } = data; - const startDateEpoch = Digit.Utils.date.convertDateToEpoch(startDate); - const endDateEpoch = Digit.Utils.date.convertDateToEpoch(endDate); - - if (startDate && endDate && startDateEpoch > endDateEpoch) { - return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; - } - return false; - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - if (key === "CAMPAIGN_DATE") { - return `${Digit.DateUtils.ConvertEpochToDate(value)} - ${Digit.DateUtils.ConvertEpochToDate(row?.endDate)}`; - } - }, - }, - SearchMicroplan: { - preProcess: (data, additionalDetails) => { - const { name, status } = data?.state?.searchForm || {}; - - data.body.PlanConfigurationSearchCriteria = {}; - data.body.PlanConfigurationSearchCriteria.limit = data?.state?.tableForm?.limit; - // data.body.PlanConfigurationSearchCriteria.limit = 10 - data.body.PlanConfigurationSearchCriteria.offset = data?.state?.tableForm?.offset; - data.body.PlanConfigurationSearchCriteria.name = name; - data.body.PlanConfigurationSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId(); - data.body.PlanConfigurationSearchCriteria.userUuid = Digit.UserService.getUser().info.uuid; - // delete data.body.PlanConfigurationSearchCriteria.pagination - data.body.PlanConfigurationSearchCriteria.status = status?.status; - cleanObject(data.body.PlanConfigurationSearchCriteria); - return data; - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - if (key === "CAMPAIGN_DATE") { - return `${Digit.DateUtils.ConvertEpochToDate(value)} - ${Digit.DateUtils.ConvertEpochToDate(row?.CampaignDetails?.endDate)}`; - } - }, - }, -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/index.js b/frontend/micro-ui/web/micro-ui-internals/example/src/index.js deleted file mode 100644 index c186da539bd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/index.js +++ /dev/null @@ -1,84 +0,0 @@ -import React from "react"; -import ReactDOM from "react-dom"; - -import { initLibraries } from "@egovernments/digit-ui-libraries"; -// import { paymentConfigs, PaymentLinks, PaymentModule } from "@egovernments/digit-ui-module-common"; -import { DigitUI } from "@egovernments/digit-ui-module-core"; -import "@egovernments/digit-ui-css/example/index.css"; - -import { UICustomizations } from "./UICustomizations"; -import { initCampaignComponents } from "@egovernments/digit-ui-module-campaign-manager" -import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench"; -import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; -import { initWorkbenchHCMComponents } from "@egovernments/digit-ui-module-hcmworkbench"; -import { initMicroplanningComponents } from "@egovernments/digit-ui-module-hcmmicroplanning"; - -var Digit = window.Digit || {}; - -const enabledModules = [ - "DSS", - "HRMS", - "Workbench", - "HCMWORKBENCH", - "Campaign", - // "Engagement", "NDSS","QuickPayLinks", "Payment", - "Utilities", - "Microplanning" - //added to check fsm - // "FSM" -]; - -const initTokens = (stateCode) => { - const userType = window.sessionStorage.getItem("userType") || process.env.REACT_APP_USER_TYPE || "CITIZEN"; - const token = window.localStorage.getItem("token") || process.env[`REACT_APP_${userType}_TOKEN`]; - - const citizenInfo = window.localStorage.getItem("Citizen.user-info"); - - const citizenTenantId = window.localStorage.getItem("Citizen.tenant-id") || stateCode; - - const employeeInfo = window.localStorage.getItem("Employee.user-info"); - const employeeTenantId = window.localStorage.getItem("Employee.tenant-id"); - - const userTypeInfo = userType === "CITIZEN" || userType === "QACT" ? "citizen" : "employee"; - window.Digit.SessionStorage.set("user_type", userTypeInfo); - window.Digit.SessionStorage.set("userType", userTypeInfo); - - if (userType !== "CITIZEN") { - window.Digit.SessionStorage.set("User", { access_token: token, info: userType !== "CITIZEN" ? JSON.parse(employeeInfo) : citizenInfo }); - } else { - // if (!window.Digit.SessionStorage.get("User")?.extraRoleInfo) window.Digit.SessionStorage.set("User", { access_token: token, info: citizenInfo }); - } - - window.Digit.SessionStorage.set("Citizen.tenantId", citizenTenantId); - - if (employeeTenantId && employeeTenantId.length) window.Digit.SessionStorage.set("Employee.tenantId", employeeTenantId); -}; - -const initDigitUI = () => { - window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH") || "digit-ui"; - window.Digit.Customizations = { - commonUiConfig: UICustomizations - }; - window?.Digit.ComponentRegistryService.setupRegistry({ - // PaymentModule, - // ...paymentConfigs, - // PaymentLinks, - }); - initUtilitiesComponents(); - initWorkbenchComponents(); - initWorkbenchHCMComponents(); - initCampaignComponents(); - initMicroplanningComponents(); - - const moduleReducers = (initData) => initData; - - - const stateCode = window?.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || "pb"; - initTokens(stateCode); - - ReactDOM.render(, document.getElementById("root")); -}; - -initLibraries().then(() => { - initDigitUI(); -}); diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js b/frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js deleted file mode 100644 index 9fbb1258ba9..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js +++ /dev/null @@ -1,101 +0,0 @@ -const { createProxyMiddleware } = require("http-proxy-middleware"); - -const createProxy = createProxyMiddleware({ - //target: process.env.REACT_APP_PROXY_API || "https://uat.digit.org", - // target: process.env.REACT_APP_PROXY_API || "https://qa.digit.org", - target: process.env.REACT_APP_PROXY_API || "https://works-dev.digit.org", - changeOrigin: true, - secure: false, -}); -const assetsProxy = createProxyMiddleware({ - target: process.env.REACT_APP_PROXY_ASSETS || "https://works-dev.digit.org", - changeOrigin: true, - secure: false, -}); -const mdmsProxy = createProxyMiddleware({ - target: process.env.REACT_APP_PROXY_ASSETS || "http://localhost:8080", - changeOrigin: true, - secure: false, -}); -module.exports = function (app) { - ["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy)); - [ - "/access/v1/actions/mdms", - "/egov-mdms-service", - "/mdms-v2", - "/egov-idgen", - "/egov-location", - "/localization", - "/egov-workflow-v2", - "/pgr-services", - "/filestore", - "/egov-hrms", - "/user-otp", - "/user", - "/fsm", - "/billing-service", - "/collection-services", - "/pdf-service", - "/pg-service", - "/vehicle", - "/vendor", - "/property-services", - "/fsm-calculator/v1/billingSlab/_search", - "/pt-calculator-v2", - "/dashboard-analytics", - "/echallan-services", - "/egov-searcher/bill-genie/mcollectbills/_get", - "/egov-searcher/bill-genie/billswithaddranduser/_get", - "/egov-searcher/bill-genie/waterbills/_get", - "/egov-searcher/bill-genie/seweragebills/_get", - "/egov-pdf/download/UC/mcollect-challan", - "/egov-hrms/employees/_count", - "/tl-services/v1/_create", - "/tl-services/v1/_search", - "/egov-url-shortening/shortener", - "/inbox/v1/_search", - "/inbox/v2/_search", - "/tl-services", - "/tl-calculator", - "/org-services", - "/edcr", - "/bpa-services", - "/noc-services", - "/egov-user-event", - "/egov-document-uploader", - "/egov-pdf", - "/egov-survey-services", - "/ws-services", - "/sw-services", - "/ws-calculator", - "/sw-calculator/", - "/egov-searcher", - "/report", - "/inbox/v1/dss/_search", - "/loi-service", - "/project/v1/", - "/estimate-service", - "/loi-service", - "/works-inbox-service/v2/_search", - "/egov-pdf/download/WORKSESTIMATE/estimatepdf", - "/muster-roll", - "/individual", - "/mdms-v2", - "/hcm-moz-impl", - "/project", - "/project/staff/v1/_search", - "/project/v1/_search", - "/facility/v1/_search", - "/product/v1/_search", - "/product/variant/v1/_search", - "/hcm-bff/bulk/_transform", - "/hcm-bff/hcm/_processmicroplan", - "/health-hrms", - "/project-factory", - "/boundary-service", - "/product", - "/plan-service", - ].forEach((location) => app.use(location, createProxy)); - ["/pb-egov-assets"].forEach((location) => app.use(location, assetsProxy)); - ["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy)); -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/package.json b/frontend/micro-ui/web/micro-ui-internals/package.json deleted file mode 100644 index d15c627d3ab..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "egovernments", - "version": "1.0.0", - "main": "index.js", - "workspaces": [ - "example", - "packages/css", - "packages/modules/*" - ], - "author": "JaganKumar ", - "license": "MIT", - "private": true, - "engines": { - "node": ">=14" - }, - "scripts": { - "start": "SKIP_PREFLIGHT_CHECK=true run-s build start:dev", - "sprint": "SKIP_PREFLIGHT_CHECK=true run-s start:script", - "start:dev": "run-p dev:**", - "start:script": "./scripts/create.sh", - "dev:css": "cd packages/css && yarn start", - "publish:css": "cd packages/css && yarn && npm publish --tag workbench-1.0", - "dev:example": "cd example && yarn start", - "dev:campaign": "cd packages/modules/campaign-manager && yarn start", - "dev:hcmmicroplan": "cd packages/modules/hcm-microplanning && yarn start", - "build": "run-p build:**", - "build:campaign": "cd packages/modules/campaign-manager && yarn build", - "build:hcmmicroplan": "cd packages/modules/hcm-microplanning && yarn build", - "deploy:jenkins": "./scripts/jenkins.sh", - "clean": "rm -rf node_modules" - }, - "resolutions": { - "**/@babel/runtime": "7.20.1", - "**/babel-preset-react-app": "10.0.0" - }, - "devDependencies": { - "husky": "7.0.4", - "lint-staged": "12.3.7", - "npm-run-all": "4.1.5", - "prettier": "2.1.2" - }, - "husky": {}, - "lint-staged": { - "*.{js,css,md}": "prettier --write" - }, - "dependencies": { - "ajv": "8.12.0", - "lodash": "4.17.21", - "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.2-beta.6", - "@egovernments/digit-ui-components": "0.0.2-beta.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "react-router-dom": "5.3.0" - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md b/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md deleted file mode 100644 index 6efe08ae5c5..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md +++ /dev/null @@ -1,62 +0,0 @@ - - -# digit-ui-css - -## Install - -```bash -npm install --save @egovernments/digit-ui-css -``` - -## Limitation - -```bash -This Package is more specific to DIGIT-UI's can be used across mission's -It is the base css for all Digit UI's -``` - -## Usage - -After adding the dependency make sure you have this dependency in - -```bash -frontend/micro-ui/web/package.json -``` - -```json -"@egovernments/digit-ui-css":"^1.5.0", -``` - -then navigate to App.js - -```bash -frontend/micro-ui/web/public/index.html -``` - -```jsx -/** add this import **/ - - - -``` -### Changelog - -```bash -1.0.7-campaign some css fixes in attribute -1.0.5-campaign some css fixes in previous button -1.0.4-campaign updated styling for create campaign screens -1.0.2-campaign update Styling added for delivery rule screen -1.0.1-campaign Styling added for delivery rule screen -1.0.0-campaign Base version - -``` -## Contributors - -[jagankumar-egov] [nipunarora-eGov] - -### Published from DIGIT Frontend -DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) - -## License - -MIT © [jagankumar-egov](https://github.com/jagankumar-egov) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js b/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js deleted file mode 100644 index 5d1a705494a..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js +++ /dev/null @@ -1,71 +0,0 @@ -const fs = require("fs"); -const { name, version, author, cssConfig } = JSON.parse(fs.readFileSync("package.json")); - -const headerString = ` -@charset "UTF-8"; -/*! - * ${name} - ${version} - * - * Copyright (c) ${new Date().getFullYear()} ${author} - * - */ - `; -const { series, src, dest, watch, task } = require("gulp"); -const header = require("postcss-header"); - -const clean = require("gulp-clean"); -const postcss = require("gulp-postcss"); -const sass = require('gulp-sass'); - -const postcssPresetEnv = require("postcss-preset-env"); -const cleanCSS = require("gulp-clean-css"); -const rename = require("gulp-rename"); -const livereload = require("gulp-livereload"); - -let output = "./example"; -if (process.env.NODE_ENV === "production") { - output = "./dist"; -} - -function cleanStyles() { - return src(`${output}/*.css`, { read: false }).pipe(clean()); -} - -function styles() { - const plugins = [ - require("postcss-import"), - require("tailwindcss"), - postcssPresetEnv({ stage: 2, autoprefixer: { cascade: false }, features: { "custom-properties": true } }), - require("autoprefixer"), - require("cssnano"), - header({ header: headerString }), - ]; - return src("src/index.scss").pipe(postcss(plugins)).pipe(sass()).pipe(dest(output)); -} - -function minify() { - return src(`${output}/index.css`).pipe(cleanCSS()).pipe(rename(`index.min.css`)).pipe(dest(output)); -} - -function stylesLive() { - styles().pipe(livereload({ start: true })); -} - -function livereloadStyles() { - livereload.listen(); - watch("src/**/*.scss", series(stylesLive)); -} - -exports.styles = styles; -exports.default = series(styles); -exports.watch = livereloadStyles; -if (process.env.NODE_ENV === "production") { - exports.build = series(cleanStyles, styles, minify); -} else { - exports.build = series(styles, livereloadStyles); -} - -// gulp.task("watch:styles", function () { -// livereload.listen(); -// gulp.watch("**/*.scss", ["styles"]); -// }); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json deleted file mode 100644 index 5f503a9ebf5..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@egovernments/digit-ui-css", - "version": "1.0.56-campaign", - "license": "MIT", - "main": "dist/index.css", - "author": "Jagankumar ", - "engines": { - "node": ">=14" - }, - "cssConfig": { - "prefix": "" - }, - "scripts": { - "start": "gulp build", - "build:prod": "NODE_ENV=production gulp build", - "prepublish": "yarn build:prod", - "deploy": "gulp && cp -R svg example && cp -R img example && gh-pages -d example" - }, - "browserslist": [ - "> 3%", - "last 2 versions" - ], - "style": "./dist/index.css", - "dependencies": { - "node-sass": "4.14.1", - "normalize.css": "8.0.1", - "postcss-scss": "3.0.5", - "tailwindcss": "1.9.6" - }, - "devDependencies": { - "autoprefixer": "10.4.14", - "cssnano": "4.1.11", - "gh-pages": "3.2.3", - "gulp": "4.0.2", - "gulp-clean": "0.4.0", - "gulp-clean-css": "4.3.0", - "gulp-livereload": "4.0.2", - "gulp-postcss": "9.0.1", - "gulp-rename": "2.0.0", - "gulp-sass": "4.1.1", - "postcss": "8.4.26", - "postcss-cli": "8.3.1", - "postcss-header": "2.0.0", - "postcss-import": "12.0.1", - "postcss-prefixer": "2.1.3", - "postcss-preset-env": "6.7.1", - "postcss-scss": "3.0.5", - "sass": "^1.26.11" - }, - "files": [ - "dist/index.min.css", - "dist/index.css", - "svg/**/*.svg", - "img/**/*.png", - "src/**/*.scss", - "src/**/*.css" - ], - "keywords": [ - "digit", - "egov", - "dpg", - "digit-ui", - "css" - ] -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/postcss.config.js b/frontend/micro-ui/web/micro-ui-internals/packages/css/postcss.config.js deleted file mode 100644 index 18485de221e..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/postcss.config.js +++ /dev/null @@ -1,55 +0,0 @@ -const postcssPresetEnv = require("postcss-preset-env"); - -module.exports = { - parser: require("postcss-scss"), - plugins: [ - require("postcss-import"), - require("postcss-nested").default, - require("tailwindcss"), - require("postcss-preset-env"), - require("autoprefixer"), - // require("cssnano"), - ], -}; - -// const fs = require('fs'); -// const { name, version, author, cssConfig } = JSON.parse(fs.readFileSync('package.json')); - -// const header = ` -// @charset "UTF-8"; -// /*! -// * ${name} - ${version} -// * -// * Copyright (c) ${new Date().getFullYear()} ${author.name} -// */ -// `; - -// module.exports = (ctx) => { -// const prefix = ctx.env === 'compat' ? '' : cssConfig.prefix; -// const devMessage = `🎉🎉🎉🎉 \n${name} ${ctx.env} build was compiled sucessfully! \n`; - - -// return { -// map: ctx.options.map, -// parser: ctx.options.parser, -// plugins: { -// 'postcss-import': { root: ctx.file.dirname }, -// 'postcss-prefixer': { -// prefix, -// ignore: [/\[class\*=.*\]/], -// }, -// 'postcss-preset-env': { -// autoprefixer: { -// cascade: false, -// }, -// features: { -// 'custom-properties': true, -// }, -// }, -// cssnano: ctx.env === 'production' || ctx.env === 'compat' ? {} : false, -// 'postcss-header': { -// header, -// }, -// }, -// }; -// }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss deleted file mode 100644 index f01756f1e7d..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss +++ /dev/null @@ -1,363 +0,0 @@ -.microplanning { - .upload { - display: flex; - width: 100%; - justify-content: space-between; - margin-top: 1.25rem; - } - - .upload-section-option { - width: 12.5rem; - min-height: 32rem; - background-color: #ffffff; - border-top-left-radius: 0.5rem; - border-bottom-left-radius: 0.5rem; - padding: 0.625rem; - box-shadow: 0px 1px 2px 0px #00000029; - } - - .upload-section-options-active { - min-height: 3.7rem; - display: flex; - align-items: center; - border-bottom: 1px rgba(214, 213, 212, 1) solid; - cursor: pointer; - border-right: 0.3rem solid rgba(244, 119, 56, 1); - background-color: rgba(244, 119, 56, 0.12); - - p { - color: rgba(80, 90, 95, 1); - font-weight: 400; - font-size: 16px; - } - } - - .upload-section-options-inactive { - min-height: 3.7rem; - display: flex; - align-items: center; - border-bottom: 1px rgba(214, 213, 212, 1) solid; - cursor: pointer; - border-right: none; - background-color: rgba(255, 255, 255, 1); - - p { - color: rgba(80, 90, 95, 1); - font-weight: 400; - font-size: 16px; - } - } - - .upload-component { - width: 80%; - height: min-content; - border-radius: 0.25rem; - padding: 1.5rem; - background-color: rgba(255, 255, 255, 1); - margin: 0; - margin-right: 0.3rem; - padding-bottom: 0.625rem; - } - - .upload-component-active { - display: flex; - flex-direction: column; - margin-bottom: 0; - - .greyedout-name { - color: rgba(177, 180, 182, 1); - margin: 0 0.625rem; - font-size: 1.25rem; - padding-top: 0px; - font-weight: 500; - } - - h2 { - margin-top: 0.625rem; - font-size: 2.5rem; - margin: 0.625rem 0; - font-weight: 700; - } - - p { - margin: 0.625rem 0; - padding-top: 0.625; - font-size: 1rem; - margin-top: 0.625rem; - font-weight: 400; - } - } - - .upload-component-inactive { - display: none; - } - - .upload-option-container { - display: flex; - align-items: center; - justify-content: center; - padding: 1.25rem 0; - flex-wrap: wrap; - - .upload-option-container-selected { - border: 2px rgba(244, 119, 56, 1) solid; - color: rgba(244, 119, 56, 1); - } - } - - .upload-option { - border-radius: 0.25rem; - border: 0.0625rem rgba(214, 213, 212, 1) solid; - min-width: 12.5rem; - min-height: 8.75rem; - box-shadow: 0 0.0625rem rgba(0, 0, 0, 0.16); - padding: 0.625rem 0; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - justify-items: center; - margin: 0 1.25rem; - cursor: pointer; - - &:hover { - border: 2px rgba(244, 119, 56, 1) solid; - } - - p { - margin-top: 0.625rem; - } - - .upload-option-selected { - border: 0.125rem rgba(244, 119, 56, 1) solid; - color: rgba(244, 119, 56, 1); - } - - .select-button { - justify-self: end; - border: 1px solid rgba(244, 119, 56, 1); - background-color: rgba(255, 255, 255, 1); - width: 11rem; - height: 2.5rem; - padding: 0.6rem 0.5rem; - color: rgba(244, 119, 56, 1); - font-size: 1rem; - font-weight: 600; - } - - .selected-button { - justify-self: end; - border: 1px solid rgba(244, 119, 56, 1); - background-color: rgba(244, 119, 56, 1); - width: 11rem; - height: 2.5rem; - padding: 0.6rem 0.5rem; - color: rgb(255, 255, 255); - font-size: 1rem; - font-weight: 600; - } - } - - .modal-header { - width: 30rem; - font-weight: 700; - font-size: 1.5rem; - padding-left: 1rem; - margin-bottom: 0; - display: flex; - flex-wrap: wrap; - overflow: hidden; - } - - .modal-body { - overflow: hidden; - padding-left: 1rem; - padding-right: 1rem; - margin-bottom: 1rem; - margin-right: 1rem; - - p { - font-weight: 400; - font-size: 1rem; - } - } - - .upload-file { - min-width: 90%; - min-height: 10rem; - padding-top: 0.625; - border: 1px rgba(214, 213, 212, 1) dotted; - margin: 1rem 0; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - background-color: rgba(250, 250, 250, 255); - } - - .uploaded-file { - border: 1px solid rgba(214, 213, 212, 1); - min-height: 4.75rem; - background-color: rgb(256, 252, 252); - display: flex !important; - flex-direction: row; - justify-content: space-between; - align-items: center; - margin-top: 0.625rem; - padding: 0 0.625rem; - flex-wrap: wrap; - - .uploaded-file-details { - display: flex; - flex-direction: row; - align-items: center; - flex-wrap: wrap; - padding: 1rem 0; - - p { - padding: 0; - margin: 0; - height: min-content; - font-weight: 700; - font-size: 1.5rem; - color: rgba(80, 90, 95, 1); - text-align: start; - } - } - - .uploaded-file-operations { - display: flex !important; - flex-direction: row; - align-items: center; - justify-items: end; - flex-wrap: wrap; - .button { - display: flex !important; - flex-direction: row; - align-items: center !important; - justify-content: center; - margin-left: 1rem; - min-width: 9rem; - height: 2.5rem; - border: 1px rgba(244, 119, 56, 1) solid; - background-color: white; - cursor: pointer; - } - - p { - padding: 0; - margin: 0; - color: rgba(244, 119, 56, 1); - font-weight: 600; - font-size: 1rem; - } - - .deletebutton { - background-color: rgb(255, 255, 255, 0); - border: none; - } - } - } - - .loader-container { - display: flex; - justify-content: center; - align-items: center; - height: 100%; - width: 100%; - display: flex; - flex-direction: column; - background-color: rgba(0, 0, 0, 0.7); - position: fixed; - top: 0; - left: 0; - z-index: 99999; - - .loader { - border: 0.5rem solid rgb(255, 255, 255); - border-top: 0.5rem solid rgba(80, 76, 76, 0); - border-radius: 50%; - width: 3.125rem; - height: 3.125rem; - animation: spin 2s linear infinite; - } - - .loader-inner { - border: 1px solid rgb(255, 255, 255); - border-radius: 50%; - width: 100%; - height: 100%; - } - - .loader-text { - color: whitesmoke; - padding-top: 1.25rem; - } - } - - @keyframes spin { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } - } - - .toast-container { - position: fixed; - width: 50%; - bottom: 1.25rem; - left: 50%; - transform: translateX(-50%); - color: #fff; - padding: 1rem; - z-index: 9999; - } - - .success { - background-color: rgba(0, 112, 60, 1); - } - - .toast-content { - display: flex; - align-items: center; - justify-content: space-between; - } - - .message { - margin-right: 0.6px; - } - - .close-button { - background: transparent; - border: none; - color: inherit; - cursor: pointer; - } - - .altrady-have-template-button { - display: flex !important; - justify-content: center; - font-weight: 600; - font-size: 1rem; - } - - .download-template-button { - display: flex !important; - justify-content: center; - - .icon { - display: flex; - align-items: center; - margin: 0; - padding: 0; - } - - p { - font-weight: 500; - font-size: 1rem; - } - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss deleted file mode 100644 index ff5ace2af3e..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss +++ /dev/null @@ -1,13 +0,0 @@ -/*@import 'normalize.css';*/ - -/*@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap");*/ - -@import "tailwindcss/base"; - -@import "tailwindcss/components"; - -@import "tailwindcss/utilities"; - -@import "./components/microplanning.scss"; -@import "./pages/employee/index.scss"; -@import "./pages/employee/campaign.scss"; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss deleted file mode 100644 index 5c6b56289d3..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss +++ /dev/null @@ -1,109 +0,0 @@ -@import url("../../index.scss"); -@import "../../typography.scss"; - -.summary-header { - @extend .typography.text-heading-l; - font-size: 2.25rem; -} -.date-field-container { - display: grid; - grid-template-columns: 20rem 20rem; - grid-gap: 1.5rem; - width: 70%; - padding-top: 0.3rem; - margin-top: 0rem; -} -.date-field { - display: grid; - grid-template-columns: 1fr 2fr; - align-items: start; -} -.campaign-type { - margin-right: 5rem; - padding-bottom: 1.2rem; - font-weight: bold; -} -.name-container { - margin-right: 4rem; - font-weight: bold; - text-wrap: nowrap; -} -.beneficiary-type { - margin-right: 5.4rem; - font-weight: bold; -} -.campaign-dates { - display: flex; - font-weight: bold; -} -.mandatory-date { - margin-top: 0.8rem; - margin-left: 0.5rem; - color: red !important; - font-size: 1rem; - font-weight: 700; -} -.description-type { - margin-top: 2rem; - margin-bottom: 2rem; -} -.name-description { - margin-top: 2rem; - margin-bottom: 2rem; -} -.dates-description { - margin-top: 1rem; - margin-bottom: 1rem; - padding-bottom: 1.2rem; -} -.selecting-boundary-div { - padding-top: 0.5rem; - .label-field-pair { - margin-bottom: 1.5rem; - } -} -.campaign-table { - border-collapse: collapse; - border-color: transparent; - border-width: 0rem 1.5rem; - tbody { - tr:hover { - background: rgba(#f47738, 0.12); - } - } -} -.info-points { - display: flex; - gap: 0.5rem; - margin-bottom: 0.5rem; -} -.infoClass{ - margin-bottom: 1.5rem -} -.headerWrapperClassName{ - display: none -} -.popup-close-svg{ - display: none; -} -.whoLogo{ - margin-top: -1rem; - margin-bottom: -1rem; -} - -.digit-popup-wrapper{ - &.popUpClass{ - width:45rem; - - .popUpFooter{ - .digit-popup-footer-buttons{ - margin-left: 0px; - width: 100%; - - button{ - flex:1; - } - } - } - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaignCycle.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaignCycle.scss deleted file mode 100644 index 74296abb568..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaignCycle.scss +++ /dev/null @@ -1,331 +0,0 @@ -@import "../../typography.scss"; - -.campaign-cycle-container { - .campaign-tabs-container { - } - .sub-tab-container { - margin-top: 5px; - padding: 1.5rem; - .card-text { - margin-bottom: 0; - } - } - .add-resource-container { - background-color: #fafafa; - border: 1px solid #d6d5d4; - border-radius: 0.4rem; - padding: 1rem; - margin-right: 1.5rem; - margin-bottom: 1.5rem; - .card-text { - margin: 0; - font-weight: 700; - } - .header-container { - display: flex; - align-items: flex-end; - justify-content: space-between; - } - } - .delete-resource-icon { - cursor: pointer; - font-weight: 600; - font-size: 1rem; - color: theme(digitv2.lightTheme.primary); - display: flex; - gap: 0.5rem; - align-items: center; - } - .add-resource-label-field-container { - display: grid; - grid-template-columns: 2fr 1fr; - grid-gap: 2rem; - .options-card { - max-height: 10rem !important; - } - } - .popup-wrap { - .popup-module-main { - max-height: 707px; - overflow-y: auto; - width: 99%; - &::-webkit-scrollbar { - width: 0.5rem; - background: transparent; - } - &::-webkit-scrollbar-thumb { - background: #d6d5d4; /* Color of the scrollbar thumb */ - border-radius: 5px; /* Adjust the border-radius for rounded corners */ - height: 0.5rem; - } - } - .popup-module-action-bar { - .selector-button-primary { - padding: 0.6rem 2.5rem; - height: unset; - margin: 1.5rem; - background-color: theme(digitv2.lightTheme.primary); - } - } - } -} -.selector-button-primary { - background-color: theme(digitv2.lightTheme.primary); -} -.campaign-breadcrumb { - margin: 0; - margin-bottom: 1.5rem; - color: theme(digitv2.lightTheme.primary) !important; -} -.sc-jlZhew.dVtbRz { - overflow: hidden; -} -.campaign-popup-module { - margin: auto; - width: calc(100% - 5rem); -} -.campaign-bulk-upload { - display: flex; - justify-content: space-between; - margin-bottom: 1.5rem; - .campaign-download-template-btn { - font-weight: 700; - } -} -.bulk-info-text { - margin-bottom: 1.5rem; -} -.delete-and-download-button { - display: flex; - gap: 1.5rem; -} -.bulk-upload-file { - .uploaded-file-container { - margin: 0; - margin-bottom: 1.5rem; - } -} -.uploaded-file-container { - margin-left: 0rem; -} -.upload-drag-drop-container { - background-color: #fafafa; - border: 1.5px dashed #d6d5d4; - border-radius: 5px; - padding: 1rem 1rem 1rem 1rem; - display: flex; - align-items: center; - flex-direction: column; - - .drag-drop-text { - text-decoration: none; - - .browse-text { - text-decoration: none; - color: theme(digitv2.lightTheme.primary); - transition: color 0.3s; - } - - .browse-text:hover { - color: theme(digitv2.lightTheme.primary); - text-decoration: underline; - cursor: pointer; - } - } -} - -.upload-drag-drop-container { - margin-left: 0rem; - .drag-drop { - color: #b1b4b6; - } - .browse-text { - text-decoration: underline; - color: theme(digitv2.lightTheme.primary); - transition: color 0.3s; - } -} - -.campaign-counter-container { - padding: 1.5rem; - padding-bottom: 0.5rem; - .card-text { - margin-top: 0; - } - .label-field-pair { - margin-bottom: 1rem; - .card-label { - font-weight: 700; - } - } - .date-field-container { - display: grid; - grid-template-columns: 18.75rem 18.75rem; - grid-gap: 1.5rem; - width: 100%; - } - .PlusMinus { - width: 30%; - input { - width: 100%; - } - } -} - -.campaign-tab-head { - padding: 1rem; - width: 12.5rem; - height: 3rem; - border-radius: 10px 10px 0px 0px; - background-color: #ffffff; - outline: none; - box-sizing: border-box; - font-weight: 700; - font-size: 1rem; - font-family: "Roboto"; - color: #505a5f; - margin-bottom: -6px; - border: 1px solid #d6d5d4; - background-color: #fafafa; - &.active { - height: 3.375rem; - background-color: #ffffff; - outline: none; - font-weight: bold; - color: theme(digitv2.lightTheme.primary); - border: 1px solid theme(digitv2.lightTheme.primary); - border-bottom: 4px solid theme(digitv2.lightTheme.primary); - box-sizing: border-box; - font-size: 1.5rem; - } - :focus { - outline: none; - } -} -.campaign-sub-tab-head { - outline: none; - background-color: #ffffff; - color: theme(digitv2.lightTheme.primary); - border: 1px solid theme(digitv2.lightTheme.primary); - height: 2rem; - width: 9.188rem; - font-size: 1rem; - font-weight: 400; - &.active { - background-color: theme(digitv2.lightTheme.primary); - color: #ffffff; - font-weight: bold; - outline: none; - height: 2rem; - width: 9.188rem; - font-family: "Roboto"; - font-weight: 700; - font-size: 1rem; - } -} -.tab-content-header { - margin-top: 1.5rem; - margin-bottom: 1.5rem !important; -} - -.delivery-rule-container { - padding-top: 0; - .card-header { - .title { - margin: 0 !important; - } - font-size: 1.5rem !important; - margin: 0; - display: flex; - align-content: center; - justify-content: space-between; - } - .attribute-container { - border: 1px solid #d6d5d4; - background-color: #fafafa; - padding: 1rem; - padding-top: 0; - .add-attribute { - width: 74.5%; - justify-content: center; - h2 { - font-size: 1rem; - font-family: Roboto; - width: unset !important; - font-weight: 600; - } - } - } -} -.attribute-field-wrapper { - display: grid; - grid-template-columns: 1fr 1fr 1fr 1fr; - align-items: center; - gap: 2.5rem; - .label-field-pair { - flex-direction: column; - align-items: flex-start !important; - .card-label.card-label-smaller { - font-weight: 700; - } - .employee-select-wrap.form-field { - width: 100%; - } - .digit-employee-card-input { - margin-bottom: 0; - } - } - .options-card { - max-height: 10rem !important; - } - .card-label { - margin-bottom: 0.5rem; - } -} -.add-rule-btn { - margin: auto; - h2 { - font-family: Roboto; - font-size: 1rem; - font-weight: 600; - } -} -.add-product-btn { - h2 { - font-family: Roboto; - font-size: 1rem; - font-weight: 600; - } -} -.popup-wrap.campaign-product-wrapper { - .popup-module { - width: 70%; - padding-left: 1.5rem; - padding-bottom: 1.5rem; - .header-wrap { - font-size: 1.5rem; - font-weight: 700; - .header-content.popup-header-fix { - margin-top: 1.5rem; - } - } - } - .popup-module-action-bar { - margin-top: 1.5rem; - margin-right: 1.5rem; - } -} -.search-button-wrapper { - grid-column-end: -1 !important; - flex-direction: row !important; -} -.add-resource-modal { -} -.add-resource-wrapper { - .link { - color: theme(digitv2.lightTheme.primary); - } -} -.digit-toast-success { - margin-bottom: -0.5rem; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/coreOverride.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/coreOverride.scss deleted file mode 100644 index 295d90c1264..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/coreOverride.scss +++ /dev/null @@ -1,173 +0,0 @@ -@import "../../typography.scss"; - -/* language selection issue*/ -.customBtn-selected { - background-color: theme(digitv2.lightTheme.primary); -} - -/* login screen issue*/ - -.primary-label-btn { - color: theme(digitv2.lightTheme.primary); -} - -/* landing screen issue*/ - -.employeeCard { - .complaint-links-container .header .logo { - background-color: theme(digitv2.lightTheme.primary); - } - - .complaint-links-container .body { - &.link { - color: theme(digitv2.lightTheme.primary); - } - .inbox-total { - background-color: theme(digitv2.lightTheme.primary); - } - } -} - -.employee .topbar .right .user-img-txt { - background-color: theme(digitv2.lightTheme.primary); -} -/* button component issue*/ - -.action-bar-wrap { - .submit-bar { - background-color: theme(digitv2.lightTheme.primary); - } -} - -.jk-digit-secondary-btn { - color: theme(digitv2.lightTheme.primary); - border-color: theme(digitv2.lightTheme.primary); - - svg { - fill: theme(digitv2.lightTheme.primary); - - path { - fill: theme(digitv2.lightTheme.primary); - } - } -} -.error-boundary .error-container button { - background-color: theme(digitv2.lightTheme.primary); -} - -/* inbox screen issue*/ - -.inbox-search-wrapper { - .search-tabs-container .search-tab-head-selected { - color: theme(digitv2.lightTheme.primary); - border-color: theme(digitv2.lightTheme.primary); - } - .submit-bar { - background-color: theme(digitv2.lightTheme.primary); - } - .search-component-table .link { - color: theme(digitv2.lightTheme.primary); - } - .link-label { - color: theme(digitv2.lightTheme.primary) !important; - } -} -.drag-drop-container .drag-drop-text .browse-text { - color: theme(digitv2.lightTheme.primary); -} -/* toast new componnet css added */ - -.toast-success { - gap: 0.5rem; - height: 3rem; - padding: 0.75rem 0.5rem 0.75rem 0.75rem !important; - background-color: theme(digitv2.alert.success); - transition: bottom 0.5s ease; - grid-gap: 0.5rem; - &.error { - background-color: theme(digitv2.alert.error) !important; - } - - &.warning { - background-color: #f19100; - - &.warning-buttons { - @apply block; - } - } - - h2 { - @apply text-left overflow-hidden whitespace-no-wrap flex-grow flex items-center h-6; - letter-spacing: 0rem; - color: theme(digitv2.lightTheme.paper); - margin: 0rem; - text-overflow: ellipsis; - font-family: Roboto; - font-weight: 500; - font-size: 1.25rem; - font-style: normal; - } - svg { - @apply flex-shrink-0; - } -} - -@keyframes slideInFromBottom { - from { - bottom: -3rem; - } - to { - bottom: 4rem; - } -} - -.toast-success.animate { - animation: slideInFromBottom 0.5s ease forwards; -} - -@media screen and (max-width: 768px) { - .topbar { - background: #0b4b66 !important; - color: #fff; - } -} -header { - @extend .typography.text-heading-xl; -} -.digit-button-primary{ - background-color: theme(digitv2.lightTheme.primary) !important; -} -.digit-button-secondary{ - .icon-label-container{ - h2{ - color: theme(digitv2.lightTheme.primary) !important; - } - } -} - -/*.digit-popup-wrap { - background: rgba(0, 0, 0, 0.7); - @apply flex fixed w-full h-full overflow-auto top-0 left-0 min-h-screen; - z-index: 10000; - max-width: 100% !important; - max-height: 100% !important; -} - -@screen dt { - .digit-popup-wrap { - background: rgba(0, 0, 0, 0.7); - @apply min-h-screen; - } -} - -.digit-popup-close-icon { - @apply flex justify-end; -}*/ - -.employee{ - .digit-employeeSidebar{ - .sidebar{ - z-index:999 - } - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss deleted file mode 100644 index 2b989e87305..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss +++ /dev/null @@ -1,481 +0,0 @@ -@import "./campaignCycle.scss"; -@import "./coreOverride.scss"; -@import "../../typography.scss"; - -.wbh-header-container { - margin-top: 1.5rem; -} -.main.digit-home-main { - margin-left: 92px; - .employee-app-wrapper.digit-home-app-wrapper { - margin-left: 0; - margin-right: 2rem; - .ground-container.digit-home-ground { - padding: 0; - .employee-app-container.digit-home-employee-app { - .ground-container.moduleCardWrapper.gridModuleWrapper.digit-home-moduleCardWrapper { - gap: 2.5rem; - margin-top: 2rem; - padding: 0; - display: grid !important; - grid-template-columns: repeat(auto-fill, minmax(263px, 1fr)); - .employeeCard.customEmployeeCard.card-home.home-action-cards { - margin: 0 !important; - min-width: 263px !important; - width: auto !important; - } - } - } - } - } -} -.campaign-cycle-container { - .popup-header-fix { - margin-top: 1.5rem !important; - } -} - -.tag.inbox-tag { - max-width: fit-content; - background-color: #d6d5d4; - border-radius: 2rem; - padding: 0.5rem; - display: flex; - align-items: center; - height: 2rem; - margin-bottom: 0.7rem; - grid-gap: 0.2rem; - gap: 0.2rem; -} -.mandatory-span { - margin-left: 0.5rem; - color: red !important; - font-size: 1rem; - font-weight: 700; -} - -.digit-employee-card-input.numeric { - margin-bottom: unset; -} - -.actionBarClass { - display: flex; - justify-content: space-between; - flex-direction: row-reverse; - z-index: 0; -} -.previous-button { - margin-left: 4rem; - min-width: 12.5rem; -} -.info-text { - padding-bottom: 1.5rem; -} - -.view-composer-header-section { - display: flex; - justify-content: space-between; - align-items: baseline; -} -.card-with-background { - margin-top: 1rem; - .card-head { - margin-bottom: 1rem; - color: #505a5f; - } -} -.no-data-found { - display: flex; - flex-direction: column; - align-items: center; - .error-msg { - margin-top: 1rem; - } -} -.search-tab-head { - color: #505a5f; -} -.search-tabs-container { - border-bottom: none; - margin-bottom: 0; -} -.delivery-preview-card { - margin-bottom: 1.5rem !important; - background-color: #fafafa; - border: 1px solid #d6d5d4; - width: 70%; - .custom-table-label { - font-size: 1.5rem; - font-weight: 700; - color: #505a5f; - margin-bottom: 1rem; - } - .campaign-attribute-table { - margin-bottom: 1rem; - border: 1px solid #d6d5d4; - overflow: hidden; - border-radius: 4px; - table { - border-width: 0px !important; - background-color: #fafafa; - border: 1px solid #d6d5d4; - border-collapse: collapse; - border-radius: 1rem; - tbody { - tr:nth-child(odd) { - background-color: white; - } - } - th { - border-right: 1px solid #d6d5d4; - } - th:last-child { - border-right: none; - } - td { - padding: 1rem; - border-right: 1px solid #d6d5d4; - } - td:last-child { - padding: 1rem; - border-right: none; - } - } - } - .campaign-product-table { - margin-bottom: 1rem; - border: 1px solid #d6d5d4; - overflow: hidden; - border-radius: 4px; - table { - background-color: #fafafa; - border: 1px solid #d6d5d4; - border-collapse: collapse; - border-radius: 1rem; - border-width: 0px !important; - tbody { - background-color: #fff; - tr:nth-child(odd) { - background-color: white; - } - } - th { - border-right: 1px solid #d6d5d4; - } - th:last-child { - border-right: none; - } - td { - padding: 1rem; - border-right: 1px solid #d6d5d4; - } - td:last-child { - border-right: none; - } - } - } -} -.cycle-paragraph { - font-weight: 700; - font-size: 24px; - color: #505a5f; - margin-top: 0.5rem; -} -.header-end { - margin-right: 1rem; -} -.digit-stepper-container { - margin-bottom: 1.5rem; -} -.employee-app-wrapper { - margin: 0rem 1rem; -} -input[type="date"]::-webkit-calendar-picker-indicator { - position: absolute; - right: 5px; - top: 20%; - transform: translateY(-10%); -} -.campaign-preview-edit-container { - display: flex; - gap: 1rem; - span { - color: theme(digitv2.lightTheme.primary); - } -} -.campaign-attribute-table { - border: 1px solid #d6d5d4; - overflow: hidden; - border-radius: 4px; - tbody { - tr:nth-child(odd) { - background-color: white; - } - } -} -tbody { - tr:nth-child(odd) { - background-color: white; - } -} -.popup-wrap.campaign-data-preview { - flex-direction: column; -} - -.digit-employee-card-input.numeric { - pointer-events: none; -} -.product-tag-container { - display: flex; - flex-wrap: wrap; - gap: 1.5rem; - margin-bottom: 1rem; -} - -.workbench-download-template-btn { - font-weight: 700; -} -.digit-employee-card-input.numeric { - text-align: center; -} -.in-between { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 2rem; - @media screen and (min-width: 1024px) { - grid-gap: 10rem; - } -} -.setup-campaign { - .setup-campaign-card { - padding-bottom: 1.5rem; - } - .digit-dropdown-options-card { - max-height: 10rem !important; - } - .digit-field { - margin-bottom: 0 !important; - } -} -.campaign-summary-container { - .setup-campaign-card { - .employeeCard.employeeCard-override { - padding: 1.5rem; - margin-bottom: 1.5rem !important; - } - } - .row { - justify-content: flex-start; - gap: 5rem; - h2 { - margin: 0; - width: 272px; - } - .value { - width: unset; - p { - margin: 0; - } - } - } - .digit-infobanner-wrap.error { - margin-left: 0; - margin-bottom: 1.5rem; - min-width: 100%; - .digit-button-primary { - height: 1.5rem; - background-color: #d4351c !important; - .icon-label-container.primary.large { - font-size: 14px; - .digit-button-label { - font-size: 14px; - color: #ffffff; - } - } - } - } -} -.view-composer-header-section { - .employee-card-sub-header { - @extend .typography.text-heading-m; - margin-bottom: 1.5rem; - } - .employee-card-sub-header.error { - color: #d4351c; - display: flex; - align-items: center; - gap: 0.5rem; - } -} -.add-new-product-container { - border: 1px solid #d6d5d4; - background-color: #fafafa; - width: 70%; - padding-top: 0; - .heading-bar { - font-weight: 700; - display: flex; - align-items: baseline; - justify-content: space-between; - .card-text { - margin-top: 1rem; - margin-bottom: 1rem; - } - } - .label-field-pair { - gap: 5rem; - align-items: baseline; - .product-label-field { - width: 12rem; - text-wrap: nowrap; - font-weight: 700; - } - } -} -.page-padding-fix { - margin-top: 1.5rem; -} -.addProductActionClass { - display: flex; - flex-direction: row-reverse; - justify-content: space-between; - .submit-bar { - width: max-content; - padding-left: 1.5rem; - padding-right: 1.5rem; - } -} -.loginFormStyleEmployee { - .loginCardClassName { - .digit-header-content { - &:not(label) { - display: flex; - justify-content: center; - } - } - } -} -.selecting-boundaries-dropdown { - .digit-multiselectdropdown-server { - max-height: 15rem; - } -} -.hover { - cursor: pointer; -} -.digit-dropdown-employee-select-wrap { - .digit-dropdown-employee-select-wrap--elipses { - font-size: 1rem !important; - } -} -.digit-dropdown-employee-select-wrap.language-dropdown { - .digit-dropdown-options-card { - min-width: fit-content; - } -} -.digit-popup-wrapper.boundaries-pop-module.default { - width: 36rem; - .digit-popup-footer { - .digit-popup-footer-buttons { - width: 100% !important; - display: grid; - grid-template-columns: 1fr 1fr; - .digit-button-secondary { - width: 100%; - } - .digit-button-primary { - width: 100%; - } - } - } -} -.campaign-type-alert-button { - .digit-button-label { - width: 100% !important; - } -} -.campaign-pop-module { - padding: 1.5rem; - border-radius: 4px; - width: 36rem; -} -.campaign-modal-heading { - font-size: 2rem; - font-weight: 700; - margin: 0 !important; -} -.campaign-pop-main { - font-size: 1.25rem; - padding: 0 !important; - font-size: 400; - .card-text { - margin-bottom: 1.5rem !important; - } - .popup-module-action-bar.campaign-pop-action { - .selector-button-border { - background-color: #ffffff; - border: 1px solid #c84c0e; - h2 { - color: #c84c0e !important; - } - } - } -} - -.digit-toast-success { - max-width: 90%; - margin-left: auto; - margin-right: auto; - height: auto; - .toast-label { - line-height: 1.5; - word-break: break-word; - height: auto; - white-space: unset; - } -} - -.digit-dropdown-select.error { - border: 1px solid #d4351c; -} -.campaign-type-wrapper { - .digit-error-icon-message-wrap { - margin-top: 4px; - font-size: 14px; - } -} -.individualElement { - h2 { - color: theme(digitv2.lightTheme.text-primary); - } -} -.link { - color: #c84c0e !important; -} -.employeeCard.employeeCard-override.card-error { - border: 1px solid #d4351c; -} -.label-field-pair.delivery-type-radio { - gap: 5rem; - .digit-radio-options-wrap { - gap: 2rem; - margin-bottom: 0 !important; - .radio-option-container { - margin-bottom: 0; - align-items: center; - } - } -} -.bold { - font-weight: 700; -} -.summary-doc-error { - p { - margin-top: 0; - margin-bottom: 0; - } - .digit-infobanner-wrap.error { - margin-bottom: 0.5rem; - margin-top: 1.5rem; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/typography.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/typography.scss deleted file mode 100644 index 4a50014cf88..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/typography.scss +++ /dev/null @@ -1,512 +0,0 @@ -.typography { - &.text-heading-xl { - font-family: theme(digitv2.fontFamily.rc); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.heading-xl.desktop); - } - - @media (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.heading-xl.tablet); - } - - @media (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-xl.mobile); - } - } - - &.text-heading-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.heading-l.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.heading-l.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-l.mobile); - } - } - - &.text-heading-m { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.heading-m.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.heading-m.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-m.desktop); - } - } - - &.text-heading-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.heading-s.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.heading-s.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-s.mobile); - } - } - - &.text-heading-xs { - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-xs.mobile); - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - } - } - - &.text-caption-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.caption-l.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.caption-l.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.caption-l.mobile); - } - } - - &.text-caption-m { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.caption-m.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.caption-m.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.caption-m.mobile); - } - } - - &.text-caption-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.caption-s.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.caption-s.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.caption-s.desktop); - } - } - - &.text-body-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-primary); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.body-l.desktop); - line-height: theme(digitv2.lineHeight.line-height-body-l.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.body-l.tablet); - line-height: theme(digitv2.lineHeight.line-height-body-l.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.body-l.mobile); - line-height: theme(digitv2.lineHeight.line-height-body-l.mobile); - } - } - - &.text-body-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-primary); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.body-s.desktop); - line-height: theme(digitv2.lineHeight.line-height-body-s.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.body-s.tablet); - line-height: theme(digitv2.lineHeight.line-height-body-s.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.body-s.mobile); - line-height: theme(digitv2.lineHeight.line-height-body-s.mobile); - } - } - - &.text-body-xs { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-primary); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.body-xs.desktop); - line-height: theme(digitv2.lineHeight.line-height-body-xs.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.body-xs.tablet); - line-height: theme(digitv2.lineHeight.line-height-body-xs.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.body-xs.mobile); - line-height: theme(digitv2.lineHeight.line-height-body-xs.mobile); - } - } - - &.text-label { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.label.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.label.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.label.mobile); - } - } - - &.text-link { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-primary); - line-height: theme(digitv2.lineHeight.normal); - text-decoration: theme(digitv2.textDecorationLine.underline); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.link.desktop); - } - - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.link.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.link.mobile); - } - } - - &.heading-xl { - font-family: theme(digitv2.fontFamily.rc); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.heading-xl.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.heading-xl.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.heading-xl.desktop); - } - } - - &.heading-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.heading-l.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.heading-l.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.heading-l.desktop); - } - } - - &.heading-m { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.heading-m.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.heading-m.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.heading-m.desktop); - } - } - - &.heading-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.heading-s.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.heading-s.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.heading-s.desktop); - } - } - - &.heading-xs { - font-size: theme(digitv2.fontSize.heading-xs.mobile); - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - } - - &.caption-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.caption-l.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.caption-l.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.caption-l.desktop); - } - } - - &.caption-m { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.caption-m.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.caption-m.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.caption-m.desktop); - } - } - - &.caption-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.caption-s.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.caption-s.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.caption-s.desktop); - } - } - - &.body-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.regular); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.body-l.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.body-l.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.body-l.desktop); - } - } - - &.body-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.regular); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.body-s.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.body-s.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.body-s.desktop); - } - } - - &.body-xs { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.regular); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.body-xs.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.body-xs.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.body-xs.desktop); - } - } - - &.label { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.regular); - - @media (max-width: 30rem) { - /* Media query for mobile */ - font-size: theme(digitv2.fontSize.label.mobile); - } - - @media (min-width: 30.063rem) and (max-width: 47.938rem) { - /* Media query for tablets */ - font-size: theme(digitv2.fontSize.label.tablet); - } - - @media (min-width: 48rem) { - /* Media query for desktop */ - font-size: theme(digitv2.fontSize.label.desktop); - } - } - - &.link { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.regular); - text-decoration: theme(digitv2.textDecorationLine.underline); - font-size: theme(digitv2.fontSize.link.desktop); - } - - &.button { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.medium); - font-size: theme(digitv2.fontSize.button.desktop); - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js b/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js deleted file mode 100644 index c9b2a06dedf..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js +++ /dev/null @@ -1,233 +0,0 @@ -module.exports = { - future: { - removeDeprecatedGapUtilities: true, - purgeLayersByDefault: true, - }, - purge: { enabled: true, content: ["./example/index.html"] }, - theme: { - screens: { - dt: "780px", - sm: { max: "425px" }, - }, - colors: { - primary: { - light: "#F18F5E", - main: "#F47738", - dark: "#C8602B", - }, - secondary: "#22394D", - text: { - primary: "#0B0C0C", - secondary: "#505A5F", - }, - link: { - normal: "#1D70B8", - hover: "#003078", - }, - border: "#D6D5D4", - inputBorder: "#464646", - "input-border": "#464646", - focus: "#F47738", - error: "#D4351C", - success: "#00703C", - black: "#000000", - grey: { - dark: "#9E9E9E", - mid: "#EEEEEE", - light: "#FAFAFA", - bg: "#E3E3E3", - }, - white: "#FFFFFF", - }, - fontFamily: { - sans: ["Roboto", "sans-serif"], - rc: ['"Roboto Condensed"', "sans-serif"], - }, - fontSize: { - "heading-xl-dt": ["48px", "56px"], - "heading-xl": ["32px", "40px"], - "heading-l-dt": ["36px", "40px"], - "heading-l": ["24px", "32px"], - "heading-m-dt": ["24px", "32px"], - "heading-m": ["18px", "28px"], - "heading-s": ["16px", "24px"], - "caption-xl-dt": ["27px", "32px"], - "caption-xl": ["18px", "26px"], - "caption-l-dt": ["24px", "28px"], - "caption-l": ["18px", "21px"], - "caption-m-dt": ["19px", "23px"], - "caption-m": ["16px", "19px"], - "form-field": ["16px", "20px"], - "body-l-dt": ["19px", "28px"], - "body-l": ["16px", "24px"], - "body-s-dt": ["16px", "24px"], - "body-s": ["14px", "16px"], - legend: ["19px", "23px"], - link: ["16px", "24px"], - "text-btn": ["16px", "24px"], - }, - fontWeight: { - regular: 400, - medium: 500, - bold: 700, - }, - padding: { - sm: "8px", - md: "16px", - lg: "24px", - xl: "36px", - }, - margin: { - xs: "4px", - sm: "8px", - md: "16px", - lg: "24px", - xl: "64px", - }, - borderWidth: { - default: "1px", - 0: "0", - 2: "1px", - 4: "4px", - 10: "10px", - }, - boxShadow: { - card: "0 1px 2px 0 rgba(0, 0, 0, 0.16)", - radiobtn: "0 0 0 5px #F47738", - }, - inset: { - 0: 0, - 6: "6px", - 10: "10px", - }, - extend: {}, - digitv2: { - lightTheme: { - primary: "#C84C0E", - "text-color-primary": "#0B0C0C", - "text-color-secondary": "#505A5F", - "text-color-disabled": "#B1B4B6", - background: "#EEEEEE", - paper: "#FFFFFF", - "paper-secondary": "#FAFAFA", - divider: "#D6D5D4", - "header-sidenav": "#0B4B66", - "input-border": "#505A5F", - "primary-bg": "#FEEFE7", - "text-primary": "#363636", - "error-v2": "#D4351C", - }, - alert: { - error: "#b91900", - "error-bg": "#EFC7C1", - success: "#00703C", - "success-bg": "#BAD6C9", - info: "#3498DB", - "info-bg": "#C7E0F1", - }, - chart: { - "chart-1": "#048BD0", - "chart-1-gradient": "#048BD0", - "chart-2": "#FBC02D", - "chart-2-gradient": "#FBC02D", - "chart-3": "#8E29BF", - "chart-4": "#EA8A3B", - "chart-5": "#0BABDE", - }, - fontSize: { - "heading-xl": { - mobile: "2rem", - tablet: "2.25rem", - desktop: "2.5rem", - }, - "heading-l": { - mobile: "1.5rem", - tablet: "1.75rem", - desktop: "2rem", - }, - "heading-m": { - mobile: "1.25rem", - tablet: "1.375rem", - desktop: "1.5rem", - }, - "heading-s": { - mobile: "1rem", - tablet: "1rem", - desktop: "1rem", - }, - "heading-xs": { - mobile: "0.75rem", - }, - "caption-l": { - mobile: "1.5rem", - tablet: "1.75rem", - desktop: "1.75rem", - }, - "caption-m": { - mobile: "1.25rem", - tablet: "1.5rem", - desktop: "1.5rem", - }, - "caption-s": { - mobile: "1rem", - tablet: "1.25rem", - desktop: "1.25rem", - }, - "body-l": { - mobile: "1rem", - tablet: "1.25rem", - desktop: "1.25rem", - }, - "body-s": { - mobile: "0.875rem", - tablet: "1rem", - desktop: "1rem", - }, - "body-xs": { - mobile: "0.75rem", - tablet: "0.875rem", - desktop: "0.875rem", - }, - label: { - mobile: "1rem", - tablet: "1rem", - desktop: "1rem", - }, - link: { - mobile: "1rem", - tablet: "1rem", - desktop: "1rem", - }, - }, - fontFamily: { - sans: ["Roboto"], - rc: ['"Roboto Condensed"'], - }, - fontStyle: { - normal: "normal", - italic: "italic", - }, - textDecorationLine: { - underline: "underline", - }, - fontWeight: { - regular: 400, - medium: 500, - bold: 700, - }, - lineHeight: { - "line-height-body-l": { mobile: "1.5rem", tablet: "1.75rem", desktop: "1.75rem" }, - "line-height-body-s": { mobile: "1.0938rem", tablet: "1.5rem", desktop: "1.5rem" }, - "line-height-body-xs": { mobile: "1.125rem", tablet: "1.5rem", desktop: "1.5rem" }, - normal: "normal", - }, - screens: { - mobile: "400px", - tablet: "768px", - desktop: "1024px", - }, - }, - }, - variants: {}, - plugins: [], -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/README.md b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/README.md deleted file mode 100644 index 0d206b3021e..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/README.md +++ /dev/null @@ -1,159 +0,0 @@ -# digit-ui-module-workbench - -## Install - -```bash -npm install --save digit-ui-module-workbench -``` - -## Limitation - -```bash -This Package is more specific to DIGIT-UI's can be used across mission's -``` - -## Usage - -After adding the dependency make sure you have this dependency in - -```bash -frontend/micro-ui/web/package.json -``` - -```json -"@egovernments/digit-ui-module-workbench":"1.0.0", -``` - -then navigate to App.js - -```bash - frontend/micro-ui/web/src/App.js -``` - -```jsx -/** add this import **/ - -import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench"; - -/** inside enabledModules add this new module key **/ - -const enabledModules = ["workbench"]; - -/** inside init Function call this function **/ - -const initDigitUI = () => { - initWorkbenchComponents(); -}; - -``` - -In MDMS - -_Add this configuration to enable this module [MDMS Enabling Workbench Module](https://github.com/egovernments/works-mdms-data/blob/588d241ba3a9ab30f4d4c2c387a513da811620ca/data/pg/tenant/citymodule.json#L227)_ - -## List of Screens available in this versions were as follows - -1 . Search Master Data - > -Provides a screen based on Schema and renders the search result if data is present - > -It also provides a dynamic filter based on which data can be filtered - - -2 . Add Master Data based on selected schema - > -Provides a screen to add new master data according to the schema - > -Provides a Dropdown if it has any referenced master - -3 . Update Master data for selected data. - > -View the master data from search screen - > -Disable/Enable the master data if required - > -Update the master data value except the unique-identifier field mentioned in the schema - - - -4 . Localisation screens - > -Provides a screen to search the localisation present in the environment - > -Add new localisation - > -Update existing localisation - > -Bulk Upload of Localisation data - -5 . MDMS UI Schema - -6 . Data push for any API based on schema - -### Mandatory changes to use Workbench module - -1 . Assuming core module is already updated with 1.5.38+ and related changes were taken - -2 . add the following hook method in micro-ui-internals/packages/libraries/src/hooks/useCustomAPIMutationHook.js - -reference:: -https://github.com/egovernments/DIGIT-Dev/blob/6e711bdc005c226c7debd533209681fc77078a3e/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIMutationHook.js - -3 . add the following utility method in micro-ui-internals/packages/libraries/src/utils/index.js -```jsx -didEmployeeHasAtleastOneRole - -const didEmployeeHasAtleastOneRole = (roles = []) => { - return roles.some((role) => didEmployeeHasRole(role)); -}; - -``` - -4 . stylesheet link has to be added -```jsx - -``` -Reference commit for the enabling workbench -https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd533209681fc77078a3e - - - -### Changelog - -```bash -1.0.1-beta.1 Republished after merging with Master due to version issues. -1.0.0-beta.14 Added info message in localisation search -1.0.0-beta.13 Added new role to support hcm localisation create -1.0.0-beta.13 Added customisable label for custom dropdown through workbench ui schema -1.0.0-beta.11 Added customisable label for custom dropdown through workbench ui schema -1.0.0-beta.10 fixed the dropdown undefined issue -1.0.0-beta.9 Added new role to support hcm manage masters -1.0.0-beta.8 minor fixes -1.0.0-beta.7 Added Bulk Upload Ui for MDMS Add -1.0.0-beta.6 Added Bulk Upload Ui for MDMS Add -1.0.0-beta.5 Fixed some loading issue -1.0.0-beta.2 custom api support added -1.0.0-beta.1 republished due to some version issues -1.0.1 Fixes related to the limits -1.0.0 Workbench v1.0 release -1.0.0-beta workbench base version beta release -0.0.3 readme updated -0.0.2 readme updated -0.0.1 base version -``` - -### Contributors - -- [jagankumar-egov](https://github.com/jagankumar-egov) -- [nipun-egov](https://github.com/nipun-egov) - - -## License - -[MIT](https://choosealicense.com/licenses/mit/) - -## Documentation - -Documentation Site (https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) -Workbench Documentation(https://workbench.digit.org/platform/functional-specifications/workbench-ui) - -## Maintainer - -- [jagankumar-egov](https://www.github.com/jagankumar-egov) - - -### Published from DIGIT Frontend -DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/master) - - -![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) - diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json deleted file mode 100644 index 41e43fdb6fd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "@egovernments/digit-ui-module-campaign-manager", - "version": "0.0.1", - "description": "Campaign", - "main": "dist/index.js", - "module": "dist/index.modern.js", - "source": "src/Module.js", - "files": [ - "dist" - ], - "scripts": { - "start": "microbundle-crl watch --no-compress --format modern,cjs", - "build": "microbundle-crl --compress --no-sourcemap --format cjs", - "prepublish": "yarn build" - }, - "peerDependencies": { - "react": "17.0.2", - "react-router-dom": "5.3.0" - }, - "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.2-beta.6", - "@egovernments/digit-ui-components": "0.0.2-beta.1", - "@rjsf/core": "5.10.0", - "@rjsf/utils": "5.10.0", - "@rjsf/validator-ajv8": "5.10.0", - "ajv": "8.12.0", - "react": "17.0.2", - "react-date-range": "1.4.0", - "react-dom": "17.0.2", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "react-router-dom": "5.3.0", - "react-select": "5.7.4", - "react-table": "7.7.0", - "xlsx": "0.17.5", - "react-drag-drop-files": "^2.3.10", - "@cyntler/react-doc-viewer": "1.10.3" - }, - "author": "JaganKumar ", - "license": "MIT", - "keywords": [ - "digit", - "egov", - "dpg", - "digit-ui", - "workbench", - "campaign", - "Campaign" - ] -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js deleted file mode 100644 index cc2f33443d4..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js +++ /dev/null @@ -1,141 +0,0 @@ -import { Loader, TourProvider } from "@egovernments/digit-ui-react-components"; -import React from "react"; -import { useRouteMatch } from "react-router-dom"; -import EmployeeApp from "./pages/employee"; -import { CustomisedHooks } from "./hooks"; -import { UICustomizations } from "./configs/UICustomizations"; -import CampaignCard from "./components/CampaignCard"; -import CycleConfiguration from "./pages/employee/CycleConfiguration"; -import DeliverySetup from "./pages/employee/deliveryRule"; -import TimelineCampaign from "./components/TimelineCampaign"; -import CampaignDates from "./components/CampaignDates"; -import CampaignType from "./components/CampaignType"; -import CampaignName from "./components/CampaignName"; -import MyCampaign from "./pages/employee/MyCampaign"; -import CampaignSummary from "./components/CampaignSummary"; -import CycleDetaisPreview from "./components/CycleDetaisPreview"; -import Response from "./pages/employee/Response"; -import SelectingBoundaries from "./components/SelectingBoundaries"; -import UploadData from "./components/UploadData"; -import CampaignSelection from "./components/CampaignType"; -import CampaignDocumentsPreview from "./components/CampaignDocumentsPreview"; -import AddProduct from "./pages/employee/AddProduct"; -import AddProductField from "./components/AddProductField"; -import CycleDataPreview from "./components/CycleDataPreview"; -import { ErrorBoundary } from "@egovernments/digit-ui-components"; -import CampaignResourceDocuments from "./components/CampaignResourceDocuments"; - -/** - * The CampaignModule function fetches store data based on state code, module code, and language, and - * renders the EmployeeApp component within a TourProvider component if the data is not loading. - * @returns The CampaignModule component returns either a Loader component if data is still loading, or - * a TourProvider component wrapping an EmployeeApp component with specific props passed to it. - */ -const CampaignModule = ({ stateCode, userType, tenants }) => { - const tenantId = Digit.ULBService.getCurrentTenantId(); - const { data: BOUNDARY_HIERARCHY_TYPE } = Digit.Hooks.useCustomMDMS(tenantId, "HCM-ADMIN-CONSOLE", [{ name: "hierarchyConfig" }], { - select: (data) => { - return data?.["HCM-ADMIN-CONSOLE"]?.hierarchyConfig?.[0]?.hierarchy; - }, - }); - - const moduleCode = ["campaignmanager", "workbench", "mdms", "schema", "hcm-admin-schemas", `boundary-${BOUNDARY_HIERARCHY_TYPE}`]; - const { path, url } = useRouteMatch(); - const language = Digit.StoreData.getCurrentLanguage(); - const { isLoading, data: store } = Digit.Services.useStore({ - stateCode, - moduleCode, - language, - }); - - if (isLoading) { - return ; - } - - return ( - - - - - - ); -}; - -const componentsToRegister = { - CampaignModule: CampaignModule, - CampaignCard: CampaignCard, - UploadData, - DeliveryRule: DeliverySetup, - CycleConfiguration: CycleConfiguration, - TimelineCampaign, - CampaignDates, - CampaignType, - CampaignName, - MyCampaign, - CampaignSummary, - CycleDetaisPreview, - Response, - SelectingBoundaries, - CampaignSelection, - CampaignDocumentsPreview: CampaignDocumentsPreview, - AddProduct, - AddProductField, - CycleDataPreview, - CampaignResourceDocuments, -}; - -const overrideHooks = () => { - Object.keys(CustomisedHooks).map((ele) => { - if (ele === "Hooks") { - Object.keys(CustomisedHooks[ele]).map((hook) => { - Object.keys(CustomisedHooks[ele][hook]).map((method) => { - setupHooks(hook, method, CustomisedHooks[ele][hook][method]); - }); - }); - } else if (ele === "Utils") { - Object.keys(CustomisedHooks[ele]).map((hook) => { - Object.keys(CustomisedHooks[ele][hook]).map((method) => { - setupHooks(hook, method, CustomisedHooks[ele][hook][method], false); - }); - }); - } else { - Object.keys(CustomisedHooks[ele]).map((method) => { - setupLibraries(ele, method, CustomisedHooks[ele][method]); - }); - } - }); -}; - -/* To Overide any existing hook we need to use similar method */ -const setupHooks = (HookName, HookFunction, method, isHook = true) => { - window.Digit = window.Digit || {}; - window.Digit[isHook ? "Hooks" : "Utils"] = window.Digit[isHook ? "Hooks" : "Utils"] || {}; - window.Digit[isHook ? "Hooks" : "Utils"][HookName] = window.Digit[isHook ? "Hooks" : "Utils"][HookName] || {}; - window.Digit[isHook ? "Hooks" : "Utils"][HookName][HookFunction] = method; -}; -/* To Overide any existing libraries we need to use similar method */ -const setupLibraries = (Library, service, method) => { - window.Digit = window.Digit || {}; - window.Digit[Library] = window.Digit[Library] || {}; - window.Digit[Library][service] = method; -}; - -/* To Overide any existing config/middlewares we need to use similar method */ -const updateCustomConfigs = () => { - setupLibraries("Customizations", "commonUiConfig", { ...window?.Digit?.Customizations?.commonUiConfig, ...UICustomizations }); - // setupLibraries("Utils", "parsingUtils", { ...window?.Digit?.Utils?.parsingUtils, ...parsingUtils }); -}; - -/** - * The `initCampaignComponents` function initializes campaign components by overriding hooks, updating - * custom configurations, and registering components. - */ -const initCampaignComponents = () => { - overrideHooks(); - updateCustomConfigs(); - Object.entries(componentsToRegister).forEach(([key, value]) => { - Digit.ComponentRegistryService.setComponent(key, value); - }); -}; - -export { initCampaignComponents }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js deleted file mode 100644 index 94a73fd6b24..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js +++ /dev/null @@ -1,144 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { AddIcon, Button, Card, CardText, Header, TextInput, Dropdown } from "@egovernments/digit-ui-react-components"; -import { useTranslation } from "react-i18next"; -import { LabelFieldPair } from "@egovernments/digit-ui-react-components"; -import { DustbinIcon } from "./icons/DustbinIcon"; -// import { productType } from "../configs/productType"; -import { PRIMARY_COLOR } from "../utils"; - -const AddProductField = ({ onSelect }) => { - const { t } = useTranslation(); - const tenantId = Digit.ULBService.getCurrentTenantId(); - const { isLoading: productTypeLoading, data: productType } = Digit.Hooks.useCustomMDMS(tenantId, "HCM-ADMIN-CONSOLE", [{ name: "productType" }], { - select: (data) => { - return data?.["HCM-ADMIN-CONSOLE"]?.productType; - }, - }); - const [productFieldData, setProductFieldData] = useState([{ key: 1, name: null, type: null, variant: null }]); - - useEffect(() => { - onSelect("addProduct", productFieldData); - }, [productFieldData]); - - const addMoreField = () => { - setProductFieldData((prev) => [ - ...prev, - { - key: prev.length + 1, - name: null, - type: null, - variant: null, - }, - ]); - }; - - const deleteProductField = (index) => { - setProductFieldData((prev) => { - const temp = prev.filter((i) => i.key !== index); - return temp.map((i, n) => ({ ...i, key: n + 1 })); - }); - }; - - const handleUpdateField = (data, target, index) => { - setProductFieldData((prev) => { - return prev.map((i) => { - if (i.key === index) { - return { - ...i, - [target]: data, - }; - } - return { - ...i, - }; - }); - }); - }; - - return ( - -
{t(`HCM_CAMPAIGN_ADD_NEW_PRODUCT_HEADER`)}
-

- {t(`HCM_CAMPAIGN_ADD_NEW_PRODUCT_DESCRIPTION_PRE_TEXT`)} {t(`HCM_CAMPAIGN_ADD_NEW_PRODUCT_DESCRIPTION_BOLD_TEXT`)} - {t(`HCM_CAMPAIGN_ADD_NEW_PRODUCT_DESCRIPTION_POST_TEXT`)} -

- {productFieldData?.map((field, index) => { - return ( - -
- Product {field?.key} - {productFieldData?.length > 1 && ( -
deleteProductField(field.key)} - style={{ - cursor: "pointer", - fontWeight: "600", - marginLeft: "1rem", - fontSize: "1rem", - color: PRIMARY_COLOR, - display: "flex", - gap: "0.5rem", - alignItems: "center", - marginTop: "1rem", - }} - > - - {t(`CAMPAIGN_DELETE_ROW_TEXT`)} -
- )} -
- -
- {`${t("HCM_PRODUCT_NAME")}`} - * -
- handleUpdateField(event.target.value, "name", field.key)} - /> -
- -
- {`${t("HCM_PRODUCT_TYPE")}`} - * -
- { - handleUpdateField(value, "type", field.key); - }} - /> -
- -
- {`${t("HCM_PRODUCT_VARIANT")}`} - * -
- handleUpdateField(event.target.value, "variant", field?.key)} - /> -
-
- ); - })} - - ))} - - ); -}; - -const CycleDataPreview = ({ data, items, index, errors, onErrorClick, cardErrors }) => { - const { t } = useTranslation(); - const [deliveryData, setDeliveryData] = useState(data?.deliveries); - const [activeTab, setActiveTab] = useState(1); - - useEffect(() => { - setDeliveryData(data?.deliveries); - }, [data?.deliveries]); - - const handleTabChange = (tabIndex, index) => { - setDeliveryData((prev) => { - return prev.map((i) => { - if (i.deliveryIndex == tabIndex) { - return { - ...i, - active: true, - }; - } else { - return { - ...i, - active: false, - }; - } - }); - }); - }; - // return null; - return ( - <> - {cardErrors?.map((i) => ( - ]} - /> - ))} - {/* {i.error ? i.error : i.message)} */} -
- {data?.startDate && ( - - )} - {data?.endDate && ( - - )} -
- -
- - - - {deliveryData - .find((i) => i.active === true) - ?.deliveryRules?.map((rules, ruleIndex) => { - return ( - - {rules?.attributes?.length > 0 && ( - - )} - {rules?.products?.length > 0 && ( - - )} - - ); - })} - - {/* - {item?.conditions?.length > 0 && ( - - )} - {item?.products?.length > 0 && ( - - )} - */} - - ); -}; - -export default CycleDataPreview; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDetaisPreview.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDetaisPreview.js deleted file mode 100644 index 515b25191d9..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDetaisPreview.js +++ /dev/null @@ -1,143 +0,0 @@ -import { Card, LabelFieldPair, Row } from "@egovernments/digit-ui-react-components"; -import React, { Fragment } from "react"; -import { useTranslation } from "react-i18next"; -import DetailsTable from "./DetailsTable"; - -function mergeObjects(item) { - const arr = item?.conditions; - const mergedArr = []; - const mergedAttributes = new Set(); - - arr.forEach((obj) => { - if (!mergedAttributes.has(obj.attribute)) { - const sameAttrObjs = arr.filter((o) => o.attribute === obj.attribute); - - if (sameAttrObjs.length > 1) { - const fromValue = Math.min(...sameAttrObjs.map((o) => o.value)); - const toValue = Math.max(...sameAttrObjs.map((o) => o.value)); - - mergedArr.push({ - fromValue, - toValue, - value: fromValue > 0 && toValue > 0 ? `${fromValue} to ${toValue}` : null, - operator: "IN_BETWEEN", - attribute: obj.attribute, - }); - - mergedAttributes.add(obj.attribute); - } else { - mergedArr.push(obj); - } - } - }); - - return { ...item, conditions: mergedArr }; -} - -const CycleDetaisPreview = ({ data, items, index }) => { - const { t } = useTranslation(); - const item = mergeObjects(items); - - return ( - <> - - - {/* - {`${t("CYCLE_NUMBER")}`} - {item?.cycleNumber} - - - {`${t("DELIVERY_NUMBER")}`} - {item?.deliveryNumber} - */} - {item?.startDate || item?.endDate ? ( - -
-

- {t(`CYCLE`)} {item?.cycleNumber} -

-
- {item?.startDate && ( - - )} - {item?.endDate && ( - - )} -
- ) : null} - - - {item?.conditions?.length > 0 && ( - - )} - {item?.products?.length > 0 && ( - - )} - - - ); -}; - -export default CycleDetaisPreview; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DetailsTable.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DetailsTable.js deleted file mode 100644 index 5c6e01fcc22..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DetailsTable.js +++ /dev/null @@ -1,76 +0,0 @@ -import React, { Fragment } from "react"; -import { useTable } from "react-table"; -import { useTranslation } from "react-i18next"; -import { CardLabel, CardSubHeader } from "@egovernments/digit-ui-react-components"; - -const DetailsTable = ({ className = "", columnsData, rowsData, summaryRows, cardHeader }) => { - const { t } = useTranslation(); - - const columns = React.useMemo(() => columnsData, [t]); - - const data = React.useMemo(() => { - const temp = rowsData.map((i) => ({ - ...i, - operator: t(i?.operator), - attribute: i?.attribute ? t(`CAMPAIGN_ATTRIBUTE_${i?.attribute?.toUpperCase()}`) : "", - })); - return temp; - }, [rowsData]); - - const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } = useTable({ - columns, - data, - }); - - return ( - <> - {cardHeader && ( - - {cardHeader?.value} - - )} -
- - - {headerGroups.map((headerGroup) => ( - - {headerGroup.headers.map((column) => ( - - ))} - - ))} - - - - {rows.map((row) => { - prepareRow(row); - return ( - - {row.cells.map((cell) => ( - - ))} - - ); - })} - - {summaryRows && ( - - {summaryRows.map((cell, index) => ( - - ))} - - )} - -
- {column.render("Header")} -
- {cell.render("Cell")} -
- {index === 4 ? {cell} : cell} -
-
- - ); -}; - -export default DetailsTable; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DocumentIcon.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DocumentIcon.js deleted file mode 100644 index 9b61bf67136..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DocumentIcon.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react"; -export const DocumentIcon = ({ styles = {}, className, fill = "#D4351C" }) => ( - - - - - - - - - - - - - - - - - - - - -); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/PlusMinusInput.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/PlusMinusInput.js deleted file mode 100644 index 89d7b574032..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/PlusMinusInput.js +++ /dev/null @@ -1,47 +0,0 @@ -import React, { useState } from "react"; - -const PlusMinusInput = (props, customProps) => { - let count = props?.defaultValues || 1; - - function incrementCount() { - if (count >= 1) { - count = count + 1; - props.onSelect(count); - } else { - count = 1; - props.onSelect(count); - } - } - function decrementCount() { - if (count > 1) { - count = count - 1; - props.onSelect(count); - } else { - count = 1; - props.onSelect(count); - } - } - - return ( - -
- - - -
-
- ); -}; - -export default PlusMinusInput; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/RemovableTagNew.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/RemovableTagNew.js deleted file mode 100644 index b04159181a6..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/RemovableTagNew.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react"; -import { Close } from "@egovernments/digit-ui-react-components"; - -const RemoveableTagNew = ({ text = {}, onClick, extraStyles, disabled = false }) => ( -
- {text?.label && {`${text?.label} :`}} - - {text?.value} - - - - -
-); - -export default RemoveableTagNew; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js deleted file mode 100644 index 239cf948ee0..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js +++ /dev/null @@ -1,542 +0,0 @@ -import React, { useEffect, useState, Fragment, useMemo } from "react"; -import { CardText, LabelFieldPair, Card, Header, CardLabel, LoaderWithGap } from "@egovernments/digit-ui-react-components"; -import { useTranslation } from "react-i18next"; -import { InfoCard, MultiSelectDropdown, PopUp, Button, Toast } from "@egovernments/digit-ui-components"; -import { mailConfig } from "../configs/mailConfig"; -/** - * The function `SelectingBoundaries` in JavaScript handles the selection of boundaries based on - * hierarchy data and allows users to choose specific boundaries within the hierarchy. - * @returns The `SelectingBoundaries` component is being returned. It consists of JSX elements - * including Cards, Headers, Dropdowns, MultiSelectDropdowns, and InfoCard. The component allows users - * to select hierarchy types and boundaries based on the data fetched from API calls. It also handles - * the selection of boundaries and updates the state accordingly. The component is designed to be - * interactive and user-friendly for selecting boundaries within - */ -function SelectingBoundaries({ onSelect, formData, ...props }) { - const { t } = useTranslation(); - const tenantId = Digit.ULBService.getCurrentTenantId(); - const [params, setParams] = useState(props?.props?.dataParams); - const [hierarchy, setHierarchy] = useState(params?.hierarchyType); - const [boundaryType, setBoundaryType] = useState( - props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.boundaryData ? undefined : null - ); - const [targetedData, setTargetedData] = useState(); - const [boundaryData, setBoundaryData] = useState(props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.boundaryData || {}); - // const [parentArray, setParentArray] = useState(props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.selectedData.filter(item => item.includeAllChildren).map(item => item.code) || null); - const [parentArray, setParentArray] = useState(null); - const [boundaryTypeDataresult, setBoundaryTypeDataresult] = useState(null); - const [selectedData, setSelectedData] = useState(props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.selectedData || []); - const [parentBoundaryTypeRoot, setParentBoundaryTypeRoot] = useState( - (props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.selectedData?.find((item) => item?.isRoot === true) || {}) - ?.boundaryType || null - ); - const [showToast, setShowToast] = useState(null); - const [updatedHierarchy, setUpdatedHierarchy] = useState({}); - const [hierarchyTypeDataresult, setHierarchyTypeDataresult] = useState(params?.hierarchy); - const [executionCount, setExecutionCount] = useState(0); - // State variable to store the lowest hierarchy level - // const [lowestHierarchy, setLowestHierarchy] = useState(null); - const [showPopUp, setShowPopUp] = useState(null); - const [restrictSelection, setRestrictSelection] = useState(null); - const [updateBoundary, setUpdateBoundary] = useState(null); - const [loaderEnabled, setLoaderEnabled] = useState(false); - const { isLoading, data: hierarchyConfig } = Digit.Hooks.useCustomMDMS(tenantId, "HCM-ADMIN-CONSOLE", [{ name: "hierarchyConfig" }]); - - // const lowestHierarchy = hierarchyConfig?.["HCM-ADMIN-CONSOLE"]?.hierarchyConfig?.[0]?.lowestHierarchy; - const lowestHierarchy = useMemo(() => hierarchyConfig?.["HCM-ADMIN-CONSOLE"]?.hierarchyConfig?.[0]?.lowestHierarchy, [hierarchyConfig]); - const lowestChild = hierarchyTypeDataresult?.boundaryHierarchy.filter((item) => item.parentBoundaryType === lowestHierarchy)?.[0]?.boundaryType; - const searchParams = new URLSearchParams(location.search); - const isDraft = searchParams.get("draft"); - - useEffect(() => { - if (!updateBoundary) { - if ( - props?.props?.sessionData?.HCM_CAMPAIGN_UPLOAD_BOUNDARY_DATA?.uploadBoundary?.uploadedFile?.length > 0 || - props?.props?.sessionData?.HCM_CAMPAIGN_UPLOAD_FACILITY_DATA?.uploadFacility?.uploadedFile?.length > 0 || - props?.props?.sessionData?.HCM_CAMPAIGN_UPLOAD_USER_DATA?.uploadUser?.uploadedFile?.length > 0 - ) { - setRestrictSelection(true); - } - } - }, [props?.props?.sessionData, updateBoundary]); - - useEffect(() => { - if (props?.props?.dataParams) { - setParams(props?.props?.dataParams); - } - }, [props?.props?.dataParams]); - - useEffect(() => { - onSelect("boundaryType", { boundaryData: boundaryData, selectedData: selectedData, updateBoundary: updateBoundary }); - }, [boundaryData, selectedData]); - - useEffect(() => { - setHierarchy(params?.hierarchyType); - }, [params?.hierarchyType]); - - useEffect(() => { - if (params?.hierarchy) { - const sortHierarchy = (hierarchy) => { - const boundaryMap = new Map(); - hierarchy.forEach(item => { - boundaryMap.set(item.boundaryType, item); - }); - - const sortedHierarchy = []; - let currentType = null; - - while (sortedHierarchy.length < hierarchy.length) { - for (let i = 0; i < hierarchy.length; i++) { - if (hierarchy[i].parentBoundaryType === currentType) { - sortedHierarchy.push(hierarchy[i]); - currentType = hierarchy[i].boundaryType; - break; - } - } - } - - return sortedHierarchy; - }; - - const sortedHierarchy = sortHierarchy(params.hierarchy.boundaryHierarchy); - setHierarchyTypeDataresult({ - ...params.hierarchy, - boundaryHierarchy: sortedHierarchy - }); - } - }, [params?.hierarchy]); - - useEffect(() => { - if (executionCount < 5) { - onSelect("boundaryType", { boundaryData: boundaryData, selectedData: selectedData, updateBoundary: updateBoundary }); - setExecutionCount((prevCount) => prevCount + 1); - } - }); - - useEffect(() => { - setBoundaryData( - props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.boundaryData - ? props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.boundaryData - : {} - ); - setSelectedData( - props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.selectedData - ? props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.selectedData - : [] - ); - }, [props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType]); - - const closeToast = () => { - setShowToast(null); - }; - - useEffect(() => { - if (hierarchyTypeDataresult) { - const boundaryDataObj = {}; - hierarchyTypeDataresult?.boundaryHierarchy?.forEach((boundary) => { - boundaryDataObj[boundary?.boundaryType] = []; - }); - if (!props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.boundaryData || Object.keys(boundaryData).length === 0) { - setBoundaryData(boundaryDataObj); - } - const boundaryWithTypeNullParent = hierarchyTypeDataresult?.boundaryHierarchy?.find((boundary) => boundary?.parentBoundaryType === null); - // Set the boundary type with null parentBoundaryType - if (boundaryWithTypeNullParent) { - if (!props?.props?.sessionData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.boundaryData || Object.keys(boundaryData).length === 0) { - setBoundaryType(boundaryWithTypeNullParent?.boundaryType); - } - setParentBoundaryTypeRoot(boundaryWithTypeNullParent?.boundaryType); - } - createHierarchyStructure(hierarchyTypeDataresult); - } - }, [hierarchyTypeDataresult]); - - function createHierarchyStructure(hierarchyTypeDataresult) { - const hierarchyStructure = {}; - - // Recursive function to gather all descendants for a given boundary type - function gatherDescendants(boundaryType) { - const descendants = []; - hierarchyTypeDataresult; - - // Find all children for the current boundary type - const children = hierarchyTypeDataresult?.boundaryHierarchy?.filter((item) => item?.parentBoundaryType === boundaryType); - - // Recursively gather descendants for each child - children.forEach((child) => { - const childBoundaryType = child?.boundaryType; - const childDescendants = gatherDescendants(childBoundaryType); - descendants.push(childBoundaryType, ...childDescendants); - }); - - return descendants; - } - - // Iterate through the boundaryHierarchy array to populate hierarchyStructure - hierarchyTypeDataresult?.boundaryHierarchy?.forEach((item) => { - const boundaryType = item?.boundaryType; - const descendants = gatherDescendants(boundaryType); - - hierarchyStructure[boundaryType] = descendants; - }); - - setUpdatedHierarchy(hierarchyStructure); - } - - const newData = []; - const fetchBoundaryTypeData = async () => { - if (boundaryType === undefined || boundaryType === lowestChild) { - // Do nothing if boundaryType is undefined - return; - } - if (parentArray === null) { - const reqCriteriaBoundaryTypeSearch = Digit.CustomService.getResponse({ - url: "/boundary-service/boundary-relationships/_search", - params: { - tenantId: tenantId, - hierarchyType: hierarchy, - boundaryType: boundaryType, - parent: null, - }, - body: {}, - }); - // setShowToast({ key: "info", label: t("HCM_PLEASE_WAIT_LOADING_BOUNDARY") }); - const boundaryTypeData = await reqCriteriaBoundaryTypeSearch; - setBoundaryTypeDataresult([{ parentCode: null, boundaryTypeData: boundaryTypeData }]); - // closeToast(); - } else { - // for (const parentCode of parentArray) { - // const reqCriteriaBoundaryTypeSearch = Digit.CustomService.getResponse({ - // url: "/boundary-service/boundary-relationships/_search", - // params: { - // tenantId: tenantId, - // hierarchyType: hierarchy, - // boundaryType: boundaryType, - // parent: parentCode, - // }, - // body: {}, - // }); - // // setShowToast({ key: "info", label: t("HCM_PLEASE_WAIT_LOADING_BOUNDARY") }); - // setLoaderEnabled(true); - // const boundaryTypeData = await reqCriteriaBoundaryTypeSearch; - // newData.push({ parentCode, boundaryTypeData }); - // } - setLoaderEnabled(true); - const temp = await Digit.Hooks.campaign.useParallelSearch({ - parentArray: parentArray, - tenantId: tenantId, - boundaryType: boundaryType, - hierarchy: hierarchy, - targetedData: targetedData, - }); - const newDataArray = [...newData, ...temp]; - setBoundaryTypeDataresult(newDataArray); - setTimeout(() => { - setLoaderEnabled(false); - }, 100); - // closeToast(); - } - }; - - useEffect(() => { - fetchBoundaryTypeData(); - }, [boundaryType, parentArray, selectedData]); - - useEffect(() => { - if (boundaryTypeDataresult) { - if (boundaryType !== undefined) { - const updatedBoundaryData = { - ...boundaryData, - [boundaryType]: boundaryTypeDataresult, - }; - setBoundaryData(updatedBoundaryData); - } else { - const updatedBoundaryData = { - ...boundaryData, - [boundaryTypeDataresult?.[0]?.boundaryTypeData?.TenantBoundary?.[0]?.boundary?.[0]?.boundaryType]: boundaryTypeDataresult, - }; - setBoundaryData(updatedBoundaryData); - } - } - }, [boundaryTypeDataresult]); - - const checkDataPresent = ({ action }) => { - if (action === false) { - setShowPopUp(false); - setUpdateBoundary(true); - setRestrictSelection(false); - return; - } - if (action === true) { - setShowPopUp(false); - setUpdateBoundary(false); - return; - } - }; - - const handleBoundaryChange = (data, boundary) => { - setTargetedData(boundary?.boundaryType); - if ( - !updateBoundary && - restrictSelection && - (props?.props?.sessionData?.HCM_CAMPAIGN_UPLOAD_BOUNDARY_DATA?.uploadBoundary?.uploadedFile?.length > 0 || - props?.props?.sessionData?.HCM_CAMPAIGN_UPLOAD_FACILITY_DATA?.uploadFacility?.uploadedFile?.length > 0 || - props?.props?.sessionData?.HCM_CAMPAIGN_UPLOAD_USER_DATA?.uploadUser?.uploadedFile?.length > 0) - ) { - setShowPopUp(true); - return; - } - if (!data || data.length === 0) { - const check = updatedHierarchy[boundary?.boundaryType]; - - if (check) { - const typesToRemove = [boundary?.boundaryType, ...check]; - const updatedSelectedData = selectedData?.filter((item) => !typesToRemove?.includes(item?.type)); - const updatedBoundaryData = { ...boundaryData }; - - typesToRemove.forEach((type) => { - if (type !== boundary?.boundaryType && updatedBoundaryData?.hasOwnProperty(type)) { - updatedBoundaryData[type] = []; - } - }); - if (!_.isEqual(selectedData, updatedSelectedData)) { - setSelectedData(updatedSelectedData); - } - setBoundaryData(updatedBoundaryData); - } - return; - } - - let res = []; - data && - data?.map((ob) => { - res.push(ob?.[1]); - }); - - // const transformedRes = res?.map((item) => ({ - // code: item.code, - // type: item.type || item.boundaryType, - // isRoot: item.boundaryType === parentBoundaryTypeRoot, - // includeAllChildren: item.type === lowestHierarchy || item.boundaryType === lowestHierarchy, - // parent: item?.parent, - // })); - - let transformedRes = []; - if (!isDraft) { - transformedRes = res?.map((item) => ({ - code: item.code, - type: item.type || item.boundaryType, - isRoot: item.boundaryType === parentBoundaryTypeRoot, - includeAllChildren: item.type === lowestHierarchy || item.boundaryType === lowestHierarchy, - parent: item?.parent, - })); - } else { - // transformedRes = selectedData.filter((item) => item?.type === boundary?.boundaryType) - const filteredData = selectedData.filter((item) => item?.type === boundary?.boundaryType); - if (filteredData.length === 0) { - // If no selected data for the particular boundary type, run the transformation logic - transformedRes = res?.map((item) => ({ - code: item.code, - type: item.type || item.boundaryType, - isRoot: item.boundaryType === parentBoundaryTypeRoot, - includeAllChildren: item.type === lowestHierarchy || item.boundaryType === lowestHierarchy, - parent: item?.parent, - })); - } else { - transformedRes = filteredData; - } - } - - const newBoundaryType = transformedRes?.[0]?.type; - const existingBoundaryType = selectedData?.length > 0 ? selectedData?.[0]?.type : null; - if (existingBoundaryType === newBoundaryType) { - // Update only the data for the specific boundaryType - const flattenedRes = transformedRes.flat(); - const updatedSelectedData = selectedData - ?.map((item) => { - if (item.type === newBoundaryType) { - return transformedRes?.flat(); - } else { - return item; - } - }) - .flat(); - if (!_.isEqual(selectedData, updatedSelectedData)) { - setSelectedData(updatedSelectedData); - } - } else { - // Update only the data for the new boundaryType - const mergedData = [...selectedData?.filter((item) => item?.type !== newBoundaryType), ...transformedRes]; - - // Filter out items with undefined type - const filteredData = mergedData?.filter( - (item, index, self) => item?.type !== undefined && index === self?.findIndex((t) => t?.code === item?.code) - ); - - // Filter out items whose parent is not present in the array - - const updatedSelectedData = []; - const addChildren = (item) => { - updatedSelectedData.push(item); - const children = filteredData.filter((child) => child.parent === item.code); - children.forEach((child) => addChildren(child)); - }; - filteredData.filter((item) => item.isRoot).forEach((rootItem) => addChildren(rootItem)); - if (!_.isEqual(selectedData, updatedSelectedData)) { - setSelectedData(updatedSelectedData); - } - } - const parentBoundaryEntry = hierarchyTypeDataresult - ? hierarchyTypeDataresult?.boundaryHierarchy?.find( - (e) => e?.parentBoundaryType === res?.[0]?.boundaryType || e?.parentBoundaryType === res?.[0]?.type - ) - : null; - setBoundaryType(parentBoundaryEntry?.boundaryType); - const codes = res?.map((item) => item?.code); - if (JSON.stringify(codes) !== JSON.stringify(parentArray)) { - setParentArray(codes); - } - }; - - return ( - <> - {loaderEnabled && } - -
-
{t(`CAMPAIGN_SELECT_BOUNDARY`)}
- {t(`CAMPAIGN_SELECT_BOUNDARIES_DESCRIPTION`)} - {hierarchyTypeDataresult?.boundaryHierarchy - .filter((boundary, index, array) => { - // Find the index of the lowest hierarchy - const lowestIndex = array.findIndex((b) => b.boundaryType === lowestHierarchy); - // Include only those boundaries that are above or equal to the lowest hierarchy - return index <= lowestIndex; - }) - .map((boundary, index) => - boundary?.parentBoundaryType == null ? ( - - - {/* {t(`${hierarchy}_${boundary?.boundaryType}`?.toUpperCase())} */} - {t((hierarchy + "_" + boundary?.boundaryType).toUpperCase())} - - * - -
- item?.boundaryTypeData?.TenantBoundary?.[0]?.boundary)?.flat() || [] - } - optionsKey={"code"} - selected={selectedData?.filter((item) => item?.type === boundary?.boundaryType) || []} - onSelect={(value) => { - handleBoundaryChange(value, boundary); - }} - /> -
-
- ) : ( - - - {t((hierarchy + "_" + boundary?.boundaryType).toUpperCase())} - * - -
- ({ - code: item?.parentCode, - options: - item?.boundaryTypeData?.TenantBoundary?.[0]?.boundary?.map((child) => ({ - code: child?.code, - type: child?.boundaryType, - parent: item?.parentCode, - })) || [], - })) || [] - } - optionsKey={"code"} - onSelect={(value) => { - handleBoundaryChange(value, boundary); - }} - selected={selectedData?.filter((item) => item?.type === boundary?.boundaryType) || []} - addCategorySelectAllCheck={true} - addSelectAllCheck={true} - variant="nestedmultiselect" - /> -
-
- ) - )} -
-
- - {t("HCM_BOUNDARY_INFO ")} - - {mailConfig?.mailId} - - , - ]} - label={"Info"} - /> - {showPopUp && ( - - {t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_TEXT") + " "} - , - ]} - onOverlayClick={() => { - setShowPopUp(false); - }} - footerChildren={[ - - ))} - - ); -}; - -const TabContent = ({ activeSubTab, subTabCount = 3, onSubTabChange, project }) => { - const { campaignData, dispatchCampaignData } = useContext(CycleContext); - const { t } = useTranslation(); - - return ( - - -
- {t(`CAMPAIGN_TAB_TEXT`)} - {t(`CAMPAIGN_TAB_SUB_TEXT_${project?.code ? project?.code?.toUpperCase() : project?.toUpperCase()}`)} -
- {/* Add content specific to each tab as needed */} - , - - {t(`CAMPAIGN_TAB_INFO_TEXT_${project?.code ? project?.code?.toUpperCase() : project?.toUpperCase()}`)} - - ]} - label={"Info"} - /> -
- ); -}; - -const SubTabs = ({ onSubTabChange }) => { - const { campaignData, dispatchCampaignData } = useContext(CycleContext); - const { t } = useTranslation(); - - return ( -
- {campaignData - ?.find((i) => i?.active === true) - ?.deliveries.map((_, index) => ( - - ))} -
- ); -}; - -const MultiTab = ({ tabCount = 3, subTabCount = 2 }) => { - const [activeTab, setActiveTab] = useState(0); - const [activeSubTab, setActiveSubTab] = useState(0); - const { campaignData, dispatchCampaignData } = useContext(CycleContext); - const { t } = useTranslation(); - const tempSession = Digit.SessionStorage.get("HCM_CAMPAIGN_MANAGER_FORM_DATA"); - const handleTabChange = (tabIndex, index) => { - dispatchCampaignData({ - type: "TAB_CHANGE_UPDATE", - payload: { tabIndex: tabIndex, index: index }, // Your updated campaign data - }); - setActiveTab(index); - setActiveSubTab(0); // Reset sub-tab when changing the main tab - }; - - const handleSubTabChange = (subTabIndex, itemIndex) => { - dispatchCampaignData({ - type: "SUBTAB_CHANGE_UPDATE", - payload: { subTabIndex: subTabIndex }, // Your updated campaign data - }); - }; - - return ( - <> -
- {t( - `CAMPAIGN_PROJECT_${ - tempSession?.HCM_CAMPAIGN_TYPE?.projectType?.code - ? tempSession?.HCM_CAMPAIGN_TYPE?.projectType?.code?.toUpperCase() - : tempSession?.HCM_CAMPAIGN_TYPE?.projectType?.toUpperCase() - }` - )} -
- -
-
- -
- - -
- - ); -}; - -export default MultiTab; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js deleted file mode 100644 index ebdf2c5088f..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js +++ /dev/null @@ -1,531 +0,0 @@ -import React, { createContext, useContext, useEffect, useReducer, useState } from "react"; -import MultiTab from "./MultiTabcontext"; -import { Loader } from "@egovernments/digit-ui-react-components"; -// import { deliveryConfig } from "../../../configs/deliveryConfig"; - -const CycleContext = createContext(); - -function makeSequential(jsonArray, keyName) { - return jsonArray.map((item, index) => ({ - ...item, - [keyName]: index + 1, - })); -} - -function DeliverySetup({ onSelect, config, formData, control, tabCount = 2, subTabCount = 3, ...props }) { - // Campaign Tab Skeleton function - const [cycleData, setCycleData] = useState(config?.customProps?.sessionData?.["HCM_CAMPAIGN_CYCLE_CONFIGURE"]?.cycleConfigure); - const saved = window.Digit.SessionStorage.get("HCM_CAMPAIGN_MANAGER_FORM_DATA")?.HCM_CAMPAIGN_DELIVERY_DATA?.deliveryRule; - const selectedProjectType = window.Digit.SessionStorage.get("HCM_CAMPAIGN_MANAGER_FORM_DATA")?.HCM_CAMPAIGN_TYPE?.projectType?.code; - const tenantId = Digit.ULBService.getCurrentTenantId(); - const searchParams = new URLSearchParams(location.search); - const activeCycle = searchParams.get("activeCycle"); - const { isLoading: deliveryConfigLoading, data: filteredDeliveryConfig } = Digit.Hooks.useCustomMDMS( - tenantId, - "HCM-ADMIN-CONSOLE", - [{ name: "deliveryConfig" }], - { - select: (data) => { - const temp = data?.["HCM-ADMIN-CONSOLE"]?.deliveryConfig; - return temp?.find((i) => i?.projectType === selectedProjectType); - // return deliveryConfig?.find((i) => i?.projectType === selectedProjectType); - }, - } - ); - // const [filteredDeliveryConfig, setFilteredDeliveryConfig] = useState(deliveryConfig?.find((i) => i?.projectType === selectedProjectType)); - // useEffect(() => { - // if (!deliveryConfigLoading) { - // const temp = deliveryConfig?.find((i) => i?.projectType === selectedProjectType); - // setFilteredDeliveryConfig(temp); - // } - // }, [deliveryConfigLoading, filteredDeliveryConfig]); - // const filteredDeliveryConfig = deliveryConfig.find((i) => i.projectType === selectedProjectType); - useEffect(() => { - setCycleData(config?.customProps?.sessionData?.["HCM_CAMPAIGN_CYCLE_CONFIGURE"]?.cycleConfigure); - }, [config?.customProps?.sessionData?.["HCM_CAMPAIGN_CYCLE_CONFIGURE"]?.cycleConfigure]); - - const generateTabsData = (tabs, subTabs) => { - if (!saved || saved?.length === 0) { - return [...Array(tabs)].map((_, tabIndex) => ({ - cycleIndex: `${tabIndex + 1}`, - active: activeCycle == tabIndex + 1 ? true : tabIndex === 0 ? true : false, - deliveries: [...Array(subTabs || 1)].map((_, subTabIndex) => ({ - deliveryIndex: `${subTabIndex + 1}`, - active: subTabIndex === 0 ? true : false, - deliveryRules: - filteredDeliveryConfig?.projectType === "LLIN-mz" - ? filteredDeliveryConfig?.deliveryConfig?.map((item, index) => { - return { - ruleKey: index + 1, - delivery: {}, - attributes: item?.attributeConfig - ? item?.attributeConfig?.map((i, c) => { - if (i?.operatorValue === "IN_BETWEEN") { - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - toValue: i?.fromValue, - fromValue: i?.toValue, - }; - } - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - value: i?.value, - }; - }) - : [{ key: 1, attribute: null, operator: null, value: "" }], - // products: [], - products: item?.productConfig - ? item?.productConfig?.map((i, c) => ({ - ...i, - })) - : [], - }; - }) - : filteredDeliveryConfig && filteredDeliveryConfig?.deliveryConfig?.[subTabIndex] - ? filteredDeliveryConfig?.deliveryConfig?.[subTabIndex]?.conditionConfig?.map((item, index) => { - if (item) { - return { - ruleKey: index + 1, - delivery: {}, - deliveryType: item?.deliveryType, - attributes: item?.attributeConfig - ? item?.attributeConfig?.map((i, c) => { - if (i?.operatorValue === "IN_BETWEEN") { - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - toValue: i?.fromValue, - fromValue: i?.toValue, - }; - } - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - value: i?.value, - }; - }) - : [{ key: 1, attribute: null, operator: null, value: "" }], - // products: [], - products: item?.productConfig - ? item?.productConfig?.map((i, c) => ({ - ...i, - })) - : [], - }; - } else { - return { - ruleKey: index + 1, - delivery: {}, - deliveryType: null, - attributes: [{ key: 1, attribute: null, operator: null, value: "" }], - products: [], - }; - } - }) - : [ - { - ruleKey: 1, - delivery: {}, - attributes: - filteredDeliveryConfig && filteredDeliveryConfig?.attributeConfig - ? filteredDeliveryConfig?.attributeConfig?.map((i, c) => ({ - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - value: i?.value, - })) - : // : filteredDeliveryConfig?.projectType === "LLIN-mz" - // ? filteredDeliveryConfig?.attributeConfig?.map((i, c) => ({ key: c + 1, attribute: i.attrValue, operator: null, value: "" })) - [{ key: 1, attribute: null, operator: null, value: "" }], - products: [], - }, - ], - })), - })); - } - // if no change - if (saved && saved?.length == tabs && saved?.[0]?.deliveries?.length === subTabs) { - return saved.map((i, n) => { - return { - ...i, - active: activeCycle ? (activeCycle == n + 1 ? true : false) : n === 0 ? true : false, - }; - }); - } - // if cycle number decrease - if (saved?.length > tabs) { - // const temp = saved; - saved.splice(tabs); - // return temp; - } - // if cycle number increase - if (tabs > saved?.length) { - // const temp = saved; - for (let i = saved.length + 1; i <= tabs; i++) { - const newIndex = i.toString(); - saved.push({ - cycleIndex: newIndex, - active: false, - deliveries: [...Array(subTabs || 1)].map((_, subTabIndex) => ({ - deliveryIndex: `${subTabIndex + 1}`, - active: subTabIndex === 0, - deliveryRules: - filteredDeliveryConfig?.projectType === "LLIN-mz" - ? filteredDeliveryConfig?.deliveryConfig?.map((item, index) => { - return { - ruleKey: index + 1, - delivery: {}, - attributes: item?.attributeConfig - ? item?.attributeConfig?.map((i, c) => { - if (i?.operatorValue === "IN_BETWEEN") { - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - toValue: i?.fromValue, - fromValue: i?.toValue, - }; - } - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - value: i?.value, - }; - }) - : [{ key: 1, attribute: null, operator: null, value: "" }], - // products: [], - products: item?.productConfig - ? item?.productConfig?.map((i, c) => ({ - ...i, - })) - : [], - }; - }) - : filteredDeliveryConfig && filteredDeliveryConfig?.deliveryConfig?.[subTabIndex]?.conditionConfig - ? filteredDeliveryConfig?.deliveryConfig?.[subTabIndex]?.conditionConfig?.map((item, index) => { - if (item) { - return { - ruleKey: index + 1, - delivery: {}, - deliveryType: item?.deliveryType, - attributes: item?.attributeConfig - ? item?.attributeConfig?.map((i, c) => { - if (i?.operatorValue === "IN_BETWEEN") { - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - toValue: i?.fromValue, - fromValue: i?.toValue, - }; - } - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - value: i?.value, - }; - }) - : [{ key: 1, attribute: null, operator: null, value: "" }], - // products: [], - products: item?.productConfig - ? item?.productConfig?.map((i, c) => ({ - ...i, - })) - : [], - }; - } else { - return { - ruleKey: index + 1, - delivery: {}, - deliveryType: null, - attributes: [{ key: 1, attribute: null, operator: null, value: "" }], - products: [], - }; - } - }) - : [ - { - ruleKey: 1, - delivery: {}, - deliveryType: null, - attributes: - // filteredDeliveryConfig?.projectType === "MR-DN" - // ? filteredDeliveryConfig?.attributeConfig?.map((i, c) => ({ - // key: c + 1, - // attribute: { code: i?.attrValue }, - // operator: { code: i?.operatorValue }, - // value: i?.value, - // })) - // : filteredDeliveryConfig?.projectType === "LLIN-mz" - // ? filteredDeliveryConfig?.attributeConfig?.map((i, c) => ({ - // key: c + 1, - // attribute: i.attrValue, - // operator: null, - // value: "", - // })) - // : - [{ key: 1, attribute: null, operator: null, value: "" }], - // products: [], - products: [], - }, - ], - })), - }); - } - // return temp; - } - // if delivery number decrease - - saved.forEach((cycle) => { - // Remove deliveries if there are more deliveries than the specified number - if (cycle.deliveries.length > subTabs) { - cycle.deliveries.splice(subTabs); - } - - // Add deliveries if there are fewer deliveries than the specified number - if (subTabs > cycle.deliveries.length) { - for (let i = cycle.deliveries.length + 1; i <= subTabs; i++) { - const newIndex = i.toString(); - cycle.deliveries.push({ - deliveryIndex: newIndex, - active: false, - deliveryRules: - filteredDeliveryConfig?.projectType === "LLIN-mz" - ? filteredDeliveryConfig?.deliveryConfig?.map((item, index) => { - return { - ruleKey: index + 1, - delivery: {}, - attributes: item?.attributeConfig - ? item?.attributeConfig?.map((i, c) => { - if (i?.operatorValue === "IN_BETWEEN") { - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - toValue: i?.fromValue, - fromValue: i?.toValue, - }; - } - return { - key: c + 1, - attribute: { code: i?.attrValue }, - operator: { code: i?.operatorValue }, - value: i?.value, - }; - }) - : [{ key: 1, attribute: null, operator: null, value: "" }], - // products: [], - products: item?.productConfig - ? item?.productConfig?.map((i, c) => ({ - ...i, - })) - : [], - }; - }) - : [ - { - ruleKey: 1, - delivery: {}, - attributes: [{ key: 1, attribute: null, operator: null, value: "" }], - products: [], - }, - ], - }); - } - } - }); - - return saved; - // if delivery number increase - - //if no above case - }; - - // Reducer function - const campaignDataReducer = (state, action) => { - switch (action.type) { - case "GENERATE_CAMPAIGN_DATA": - return generateTabsData(action.cycle, action.deliveries); - case "UPDATE_CAMPAIGN_DATA": - const changeUpdate = state.map((i) => { - if (i.active) { - const activeDelivery = i.deliveries.find((j) => j.active === true); - if (activeDelivery) { - return { - ...i, - deliveries: i.deliveries.map((j) => ({ - ...j, - deliveryRules: j.active ? action.payload.currentDeliveryRules : j.deliveryRules, - })), - }; - } - } - return i; - }); - return changeUpdate; - case "TAB_CHANGE_UPDATE": - const temp = state.map((i) => ({ - ...i, - active: i.cycleIndex == action.payload.tabIndex ? true : false, - })); - return temp; - // return action.payload; - case "SUBTAB_CHANGE_UPDATE": - const tempSub = state.map((camp, index) => { - if (camp.active === true) { - return { - ...camp, - deliveries: camp.deliveries.map((deliver) => ({ - ...deliver, - active: deliver.deliveryIndex == action.payload.subTabIndex ? true : false, - })), - }; - } - return camp; - }); - return tempSub; - case "ADD_DELIVERY_RULE": - const updatedDeliveryRules = [ - ...action.payload.currentDeliveryRules, - { - ruleKey: action.payload.currentDeliveryRules.length + 1, - delivery: {}, - attributes: [{ key: 1, attribute: null, operator: null, value: "" }], - products: [], - }, - ]; - const updatedData = state.map((i) => { - if (i.active) { - const activeDelivery = i.deliveries.find((j) => j.active); - if (activeDelivery) { - return { - ...i, - deliveries: i.deliveries.map((j) => ({ - ...j, - deliveryRules: j.active ? updatedDeliveryRules : j.deliveryRules, - })), - }; - } - } - return i; - }); - return updatedData; - case "REMOVE_DELIVERY_RULE": - const updatedDeleted = state.map((i) => { - if (i.active) { - const activeDelivery = i.deliveries.find((j) => j.active); - const w = makeSequential( - activeDelivery.deliveryRules.filter((j) => j.ruleKey != action.payload.item.ruleKey), - "ruleKey" - ); - if (activeDelivery) { - return { - ...i, - deliveries: i.deliveries.map((j) => ({ - ...j, - deliveryRules: j.active ? w : j.deliveryRules, - })), - }; - } - } - return i; - }); - return updatedDeleted; - case "UPDATE_DELIVERY_RULE": - return action.payload; - case "ADD_ATTRIBUTE": - return action.payload; - case "REMOVE_ATTRIBUTE": - return action.payload; - case "UPDATE_ATTRIBUTE": - return action.payload; - case "ADD_PRODUCT": - const prodTemp = action.payload.productData.map((i) => ({ ...i, value: i?.value?.id, name: i?.value?.displayName })); - const updatedState = state.map((cycle) => { - if (cycle.active) { - const updatedDeliveries = cycle.deliveries.map((dd) => { - if (dd.active) { - const updatedRules = dd.deliveryRules.map((rule) => { - if (rule.ruleKey === action.payload.delivery.ruleKey) { - return { - ...rule, - products: [...rule.products, ...prodTemp], - }; - } - return rule; - }); - return { - ...dd, - deliveryRules: updatedRules, - }; - } - return dd; - }); - return { - ...cycle, - deliveries: updatedDeliveries, - }; - } - return cycle; - }); - return updatedState; - case "REMOVE_PRODUCT": - return action.payload; - case "UPDATE_PRODUCT": - return action.payload; - default: - return state; - } - }; - - const [campaignData, dispatchCampaignData] = useReducer( - campaignDataReducer, - generateTabsData(cycleData?.cycleConfgureDate?.cycle, cycleData?.cycleConfgureDate?.deliveries) - ); - const [executionCount, setExecutionCount] = useState(0); - - useEffect(() => { - dispatchCampaignData({ - type: "GENERATE_CAMPAIGN_DATA", - cycle: cycleData?.cycleConfgureDate?.cycle, - deliveries: cycleData?.cycleConfgureDate?.deliveries, - }); - }, [cycleData]); - - useEffect(() => { - onSelect("deliveryRule", campaignData); - }, [campaignData]); - - useEffect(() => { - if (executionCount < 5) { - onSelect("deliveryRule", campaignData); - setExecutionCount((prevCount) => prevCount + 1); - } - }); - - if (deliveryConfigLoading) { - return ; - } - return ( - - - - ); -} - -export default DeliverySetup; -export { CycleContext }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js deleted file mode 100644 index 2353f85fc50..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js +++ /dev/null @@ -1,102 +0,0 @@ -import React, { useEffect } from "react"; -import { Switch, useLocation } from "react-router-dom"; -import { useTranslation } from "react-i18next"; -import { PrivateRoute, AppContainer, BreadCrumb } from "@egovernments/digit-ui-react-components"; -// import CampaignHeader from "../../components/CampaignHeader"; -import SetupCampaign from "./SetupCampaign"; -import SelectingBoundaries from "../../components/SelectingBoundaries"; - -/** - * The CampaignBreadCrumb function generates breadcrumb navigation for a campaign setup page in a React - * application. - * @returns The CampaignBreadCrumb component is returning a BreadCrumb component with the specified - * crumbs array and spanStyle prop. The crumbs array contains two objects with path, content, and show - * properties for each breadcrumb item. The spanStyle prop is set to { maxWidth: "min-content" }. - */ -const CampaignBreadCrumb = ({ location, defaultPath }) => { - const { t } = useTranslation(); - const search = useLocation().search; - const pathVar = location.pathname.replace(defaultPath + "/", "").split("?")?.[0]; - - const crumbs = [ - { - path: `/${window?.contextPath}/employee`, - content: t("CAMPAIGN_HOME"), - show: true, - }, - { - path: pathVar === "my-campaign" ? "" : `/${window?.contextPath}/employee/campaign/my-campaign`, - content: t("MY_CAMPAIGN"), - show: pathVar === "my-campaign" ? true : false, - }, - { - path: pathVar === "setup-campaign" ? "" : `/${window?.contextPath}/employee/campaign/setup-campaign`, - content: t("CREATE_NEW_CAMPAIGN"), - show: pathVar === "setup-campaign" ? true : false, - }, - ]; - - return ; -}; - -/** - * The `App` function in JavaScript defines a component that handles different routes and renders - * corresponding components based on the path provided. - * @returns The `App` component is returning a JSX structure that includes a `div` with a className of - * "wbh-header-container" containing a `CampaignBreadCrumb` component and a `Switch` component. Inside - * the `Switch` component, there are several `PrivateRoute` components with different paths and - * corresponding components such as `UploadBoundaryData`, `CycleConfiguration`, `DeliveryRule`, ` - */ -const App = ({ path, BOUNDARY_HIERARCHY_TYPE }) => { - const location = useLocation(); - const UploadBoundaryData = Digit?.ComponentRegistryService?.getComponent("UploadBoundaryData"); - const CycleConfiguration = Digit?.ComponentRegistryService?.getComponent("CycleConfiguration"); - const DeliveryRule = Digit?.ComponentRegistryService?.getComponent("DeliveryRule"); - const MyCampaign = Digit?.ComponentRegistryService?.getComponent("MyCampaign"); - const CampaignSummary = Digit?.ComponentRegistryService?.getComponent("CampaignSummary"); - const Response = Digit?.ComponentRegistryService?.getComponent("Response"); - const AddProduct = Digit?.ComponentRegistryService?.getComponent("AddProduct"); - - useEffect(() => { - if (window.location.pathname !== "/workbench-ui/employee/campaign/setup-campaign") { - window.Digit.SessionStorage.del("HCM_CAMPAIGN_MANAGER_FORM_DATA"); - window.Digit.SessionStorage.del("HCM_CAMPAIGN_MANAGER_UPLOAD_ID"); - } - if (window.location.pathname === "/workbench-ui/employee/campaign/response") { - window.Digit.SessionStorage.del("HCM_CAMPAIGN_MANAGER_FORM_DATA"); - window.Digit.SessionStorage.del("HCM_CAMPAIGN_MANAGER_UPLOAD_ID"); - } - return () => { - if (window.location.pathname !== "/workbench-ui/employee/campaign/setup-campaign") { - window.Digit.SessionStorage.del("HCM_CAMPAIGN_MANAGER_FORM_DATA"); - window.Digit.SessionStorage.del("HCM_CAMPAIGN_MANAGER_UPLOAD_ID"); - } - }; - }, []); - return ( - -
- {window?.location?.pathname === "/workbench-ui/employee/campaign/add-product" || - window?.location?.pathname === "/workbench-ui/employee/campaign/response" ? null : ( - - )} - {/* */} -
- - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - -
- ); -}; - -export default App; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/TourSteps.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/TourSteps.js deleted file mode 100644 index 5ab880c52cf..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/TourSteps.js +++ /dev/null @@ -1,144 +0,0 @@ -export const TourSteps = { - '/workbench-ui/employee/workbench/manage-master-data':[ - { - content: - 'Welcome to Manage Master Data screen. Here you can search and update any master data that is configured for the logged in user tenant', - target: '.manage-master-wrapper', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'Select any module name where the master is present', - target: '.wbh-mdms-module-name', - disableBeacon: true, - placement: 'center', - title:"Manage Master Data" - }, - - { - content: - 'Select any master name where the master is present', - target: '.wbh-mdms-master-name', - disableBeacon: true, - placement: 'center', - title:"Manage Master Data" - }, - ], - '/workbench-ui/employee/workbench/mdms-search-v2':[ - { - content: - 'Welcome to the master data search screen. Here you can search the master data added under this master', - target: '.search-wrapper', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'Select any field value and enter the text by which data can be filtered', - target: '.label-field-pair', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'Filter the master data by clicking on this search by selecting any field and exact value', - target: '.search-button-wrapper', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'To add new master data under this master click on the Add Master Data button', - target: '.mdms-add-btn', - disableBeacon: true, - placement: 'auto', - title:"Manage Master Data" - }, - - ], - '/workbench-ui/employee/workbench/mdms-add-v2':[ - { - content: - 'Welcome to the master data search screen. Here you can search the master data added under this master', - target: '.field-string', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'select the Reference master data', - target: '.form-select ', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'Fill all the details by clicking on the Add Master Data', - target: '.submit-bar', - disableBeacon: true, - placement: 'auto', - title:"Manage Master Data" - }, - - ], - '/workbench-ui/employee/workbench/mdms-view':[ - { - content: - 'Welcome to the master data search screen. Here you can search the master data added under this master', - target: '.action-bar-wrap', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'select the Reference master data', - target: '.menu-wrap', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - } - ], - '/workbench-ui/employee/workbench/localisation-search':[ - { - content: - 'Welcome to the master data search screen. Here you can search the master data added under this master', - target: '.search-wrapper', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'Select any field value and enter the text by which data can be filtered', - target: '.label-field-pair', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'Filter the master data by clicking on this search by selecting any field and exact value', - target: '.search-button-wrapper', - disableBeacon: true, - placement: 'bottom', - title:"Manage Master Data" - }, - { - content: - 'To add new master data under this master click on the Add Master Data button', - target: '.mdms-add-btn', - disableBeacon: true, - placement: 'auto', - title:"Manage Master Data" - }, - - ], -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/downloadExcel.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/downloadExcel.js deleted file mode 100644 index 978ea2bfd74..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/downloadExcel.js +++ /dev/null @@ -1,46 +0,0 @@ -import axios from "axios"; - -/* Fetching sheet as json object from the API , converting them into blob and downloading it. - * Way to use the function. Just import the funtion downloadExcelWithCustomName and pass the filestoreid and customName you want to download the file. - * Rest this function will take care for you and download it in your system. - * - * Eg. -> - * const handleDownload = (id, name) => { - * downloadExcelWithCustomName({fileStoreId: id, customName: name}); - * } - * - */ - -export const downloadExcelWithCustomName = ({ fileStoreId = null, customName = null }) => { - const downloadExcel = (blob, fileName) => { - const link = document.createElement("a"); - link.href = URL.createObjectURL(blob); - link.download = fileName + ".xlsx"; - document.body.append(link); - link.click(); - link.remove(); - setTimeout(() => URL.revokeObjectURL(link.href), 7000); - }; - - if (fileStoreId) { - axios - .get("/filestore/v1/files/id", { - responseType: "arraybuffer", - headers: { - "Content-Type": "application/json", - Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", - "auth-token": Digit.UserService.getUser()?.["access_token"], - }, - params: { - tenantId: Digit.ULBService.getCurrentTenantId(), - fileStoreId: fileStoreId, - }, - }) - .then(async (res) => { - downloadExcel( - new Blob([res.data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), - customName ? customName : "download" - ); - }); - } -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/index.js deleted file mode 100644 index 5e308bf82f7..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import _ from "lodash"; -import { downloadExcelWithCustomName } from "./downloadExcel"; - -export default {}; -export { downloadExcelWithCustomName }; -export const PRIMARY_COLOR = "#C84C0E"; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/package.json deleted file mode 100644 index 6fcb736c4e5..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "@egovernments/digit-ui-module-hcmmicroplanning", - "version": "0.0.1", - "description": "HCM-Microplanning", - "main": "dist/index.js", - "module": "dist/index.modern.js", - "source": "src/Module.js", - "files": [ - "dist" - ], - "scripts": { - "start": "microbundle-crl watch --no-compress --format modern,cjs", - "build": "microbundle-crl --compress --no-sourcemap --format cjs", - "prepublish": "yarn build" - }, - "peerDependencies": { - "react": "17.0.2", - "react-router-dom": "5.3.0" - }, - "dependencies": { - "@cyntler/react-doc-viewer": "1.10.3", - "@egovernments/digit-ui-components": "0.0.2-beta.2", - "@egovernments/digit-ui-react-components": "1.8.2-beta.4", - "@egovernments/digit-ui-svg-components": "1.0.8", - "@rjsf/core": "5.10.0", - "@rjsf/utils": "5.10.0", - "@rjsf/validator-ajv8": "5.10.0", - "@turf/turf": "^6.5.0", - "ajv": "^8.12.0", - "axios": "^1.6.8", - "chroma-js": "^2.4.2", - "exceljs": "^4.4.0", - "focus-trap-react": "^10.2.3", - "geojson-validation": "^1.0.2", - "jszip": "^3.10.1", - "leaflet": "^1.9.4", - "react": "17.0.2", - "react-date-range": "^1.4.0", - "react-dom": "17.0.2", - "react-drag-drop-files": "^2.3.10", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-joyride": "2.5.5", - "react-query": "3.6.1", - "react-router-dom": "5.3.0", - "react-select": "5.7.4", - "safe-buffer": "^5.2.1", - "shpjs": "^4.0.4", - "uuid": "^9.0.1", - "xlsx": "0.17.5" - }, - "license": "MIT", - "keywords": [ - "digit", - "egov", - "dpg", - "digit-ui", - "workbench", - "workbench-hcm", - "hcm-microplanning" - ] -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/Module.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/Module.js deleted file mode 100644 index b27e7b19922..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/Module.js +++ /dev/null @@ -1,99 +0,0 @@ -import { Loader, TourProvider } from "@egovernments/digit-ui-react-components"; -import React from "react"; -import { useRouteMatch } from "react-router-dom"; -import EmployeeApp from "./pages/employee"; -import { CustomisedHooks } from "./hooks"; -import { UICustomizations } from "./configs/UICustomizations"; -// import WorkbenchCard from "./components/WorkbenchCard"; -import MicroplanningCard from "./components/MicroplanningCard"; -import MicroplanDetails from "./components/MicroplanDetails"; -import { ProviderContext } from "./utils/context"; - -const MicroplanningModule = ({ stateCode, userType, tenants }) => { - const tenantId = Digit.ULBService.getCurrentTenantId(); - const { data: BOUNDARY_HIERARCHY_TYPE } = Digit.Hooks.useCustomMDMS(tenantId, "HCM-ADMIN-CONSOLE", [{ name: "hierarchyConfig" }], { - select: (data) => { - return data?.["HCM-ADMIN-CONSOLE"]?.hierarchyConfig?.[0]?.hierarchy; - }, - }); - const moduleCode = ["Microplanning", `boundary-${BOUNDARY_HIERARCHY_TYPE}`, "hcm-admin-schemas"]; - const { path, url } = useRouteMatch(); - const language = Digit.StoreData.getCurrentLanguage(); - const { isLoading, data: store } = Digit.Services.useStore({ - stateCode, - moduleCode, - language, - }); - - if (isLoading) { - return ; - } - - return ( - - - - - - ); -}; - -const componentsToRegister = { - MicroplanningModule, - MicroplanningCard, - MicroplanDetails, - // DigitJSONForm, - // DSSCard: null, // TO HIDE THE DSS CARD IN HOME SCREEN as per workbench - // HRMSCard // Overridden the HRMS card as per workbench -}; - -const overrideHooks = () => { - Object.keys(CustomisedHooks).map((ele) => { - if (ele === "Hooks") { - Object.keys(CustomisedHooks[ele]).map((hook) => { - Object.keys(CustomisedHooks[ele][hook]).map((method) => { - setupHooks(hook, method, CustomisedHooks[ele][hook][method]); - }); - }); - } else if (ele === "Utils") { - Object.keys(CustomisedHooks[ele]).map((hook) => { - Object.keys(CustomisedHooks[ele][hook]).map((method) => { - setupHooks(hook, method, CustomisedHooks[ele][hook][method], false); - }); - }); - } else { - Object.keys(CustomisedHooks[ele]).map((method) => { - setupLibraries(ele, method, CustomisedHooks[ele][method]); - }); - } - }); -}; - -/* To Overide any existing hook we need to use similar method */ -const setupHooks = (HookName, HookFunction, method, isHook = true) => { - window.Digit = window.Digit || {}; - window.Digit[isHook ? "Hooks" : "Utils"] = window.Digit[isHook ? "Hooks" : "Utils"] || {}; - window.Digit[isHook ? "Hooks" : "Utils"][HookName] = window.Digit[isHook ? "Hooks" : "Utils"][HookName] || {}; - window.Digit[isHook ? "Hooks" : "Utils"][HookName][HookFunction] = method; -}; -/* To Overide any existing libraries we need to use similar method */ -const setupLibraries = (Library, service, method) => { - window.Digit = window.Digit || {}; - window.Digit[Library] = window.Digit[Library] || {}; - window.Digit[Library][service] = method; -}; - -/* To Overide any existing config/middlewares we need to use similar method */ -const updateCustomConfigs = () => { - setupLibraries("Customizations", "commonUiConfig", { ...window?.Digit?.Customizations?.commonUiConfig, ...UICustomizations }); -}; - -const initMicroplanningComponents = () => { - overrideHooks(); - updateCustomConfigs(); - Object.entries(componentsToRegister).forEach(([key, value]) => { - Digit.ComponentRegistryService.setComponent(key, value); - }); -}; - -export { initMicroplanningComponents }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CommonComponents.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CommonComponents.js deleted file mode 100644 index a358dbbedb1..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CommonComponents.js +++ /dev/null @@ -1,61 +0,0 @@ -import { AutoRenew, Close, FileDownload } from "@egovernments/digit-ui-svg-components"; -import React, { useCallback } from "react"; -import PropTypes from "prop-types"; - -export const ButtonType1 = (props) => { - return ( -
-

{props.text}

-
- ); -}; - -ButtonType1.propTypes = { - text: PropTypes.string.isRequired, -}; - -export const ButtonType2 = (props) => { - return ( -
- {props.showDownloadIcon && ( -
- -
- )} -

{props.text}

-
- ); -}; - -ButtonType2.propTypes = { - text: PropTypes.string.isRequired, - showDownloadIcon: PropTypes.bool, -}; - -export const ModalHeading = (props) => { - return ( -

- {props.label} -

- ); -}; - -ModalHeading.propTypes = { - label: PropTypes.string.isRequired, - className: PropTypes.string, - style: PropTypes.object, -}; - -export const CloseButton = ({ clickHandler, style = {} }) => { - return ( - - ); -}; - -CloseButton.propTypes = { - clickHandler: PropTypes.func.isRequired, - style: PropTypes.object, -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js deleted file mode 100644 index f2deacbd46d..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js +++ /dev/null @@ -1,41 +0,0 @@ -import React, { useEffect, useState } from "react"; - -const CustomScaleControl = ({ map }) => { - if (!map) return null; - const [scaleText, setScaleText] = useState(""); - // Function to calculate and update the scale text - const updateScale = () => { - // Calculate the scale based on the map's current zoom level - const maxWidthMeters = map.containerPointToLatLng([0, map.getSize().y]).distanceTo(map.containerPointToLatLng([100, map.getSize().y])); - const scale = maxWidthMeters / 1000; // Convert to kilometers - - // Format the scale text - const scaleTextData = scale < 1 ? `${Math.round(scale * 1000)} m` : `${Math.round(Math.round(scale.toFixed(0) / 10) * 10)} km`; - - // Update the scale text in the container element - setScaleText(scaleTextData); - }; - - // Effect to update the scale text when the map component mounts and on map zoom change - useEffect(() => { - // Update the scale text initially - updateScale(); - - // Register the map's zoom events to update the scale text - map.on("zoomend", updateScale); - - // Clean up event listener when the component unmounts - return () => { - map.off("zoomend", updateScale); - }; - }, [map]); - - return ( -
- {scaleText} - - ); -}; - -export default CustomScaleControl; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Hypothesis.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Hypothesis.js deleted file mode 100644 index c2cf8bac4fb..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Hypothesis.js +++ /dev/null @@ -1,607 +0,0 @@ -import React, { useState, useEffect, useCallback, Fragment, useRef } from "react"; -import { useTranslation } from "react-i18next"; -import { Trash } from "@egovernments/digit-ui-svg-components"; -import { CloseButton, ModalHeading } from "./CommonComponents"; -import { Dropdown, TextInput, Toast } from "@egovernments/digit-ui-components"; -import { useMyContext } from "../utils/context"; -import { tourSteps } from "../configs/tourSteps"; -import { v4 as uuidv4 } from "uuid"; -import { PlusWithSurroundingCircle } from "../icons/Svg"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; -import { Button, Modal } from "@egovernments/digit-ui-react-components"; -const page = "hypothesis"; - -const Hypothesis = ({ - campaignType = Digit.SessionStorage.get("microplanHelperData")?.campaignData?.projectType, - microplanData, - setMicroplanData, - checkDataCompletion, - setCheckDataCompletion, - currentPage, - pages, - setToast, -}) => { - const { t } = useTranslation(); - - // States - const [editable, setEditable] = useState(true); - const [modal, setModalState] = useState("none"); - const [assumptions, setAssumptions] = useState([]); - const [hypothesisAssumptionsList, setHypothesisAssumptionsList] = useState([]); - const [itemForDeletion, setItemForDeletion] = useState(); - const [exampleOption, setExampleOption] = useState(""); - // const [toast, setToast] = useState(); - const [autofillHypothesis, setAutofillHypothesis] = useState([]); - const { state, dispatch } = useMyContext(); - const [orignalHypothesisCount, setOrignalHypothesisCount] = useState(0); - - // Set TourSteps - useEffect(() => { - const tourData = tourSteps(t)?.[page] || {}; - if (state?.tourStateData?.name === page) return; - dispatch({ - type: "SETINITDATA", - state: { tourStateData: tourData }, - }); - }, []); - - const setModal = (modalString) => { - const elements = document.querySelectorAll(".popup-wrap-rest-unfocus"); - elements.forEach((element) => { - element.classList.toggle("popup-wrap-rest-unfocus-active"); - }); - setModalState(modalString); - }; - - // UseEffect to extract data on first render - useEffect(() => { - if (pages) { - const previouspage = pages[currentPage?.id - 1]; - if (previouspage?.checkForCompleteness && !microplanData?.status?.[previouspage?.name]) setEditable(false); - else setEditable(true); - } - if (microplanData?.hypothesis) { - const temp = microplanData?.hypothesis; - setAssumptions(temp); - } - - fetchDataAndUpdateState(); - }, []); - - const fetchDataAndUpdateState = useCallback(() => { - const hypothesisAssumptions = state?.HypothesisAssumptions || []; - const temp = hypothesisAssumptions.find((item) => item.campaignType === campaignType); - if (!temp?.assumptions) return; - - const hypothesisAssumptionsList = Array.isArray(temp.assumptions) ? temp.assumptions : []; - setOrignalHypothesisCount(hypothesisAssumptionsList.length); - setExampleOption(hypothesisAssumptionsList.length !== 0 ? hypothesisAssumptionsList[0] : ""); - - const currentHypothesis = microplanData?.hypothesis || assumptions; - const newAssumptions = setAutofillHypothesisData(hypothesisAssumptionsList, currentHypothesis, setAssumptions); - - const newHypothesislist = filterHypothesisList( - newAssumptions.length !== 0 ? newAssumptions : microplanData.hypothesis, - hypothesisAssumptionsList - ); - setHypothesisAssumptionsList(newHypothesislist); - }, [campaignType, microplanData, state, assumptions, setAssumptions]); - - // UseEffect for checking completeness of data before moveing to next section - useEffect(() => { - if (!assumptions || checkDataCompletion !== "true" || !setCheckDataCompletion) return; - // uncomment to activate data change save check - // if (!microplanData?.hypothesis || !_.isEqual(assumptions, microplanData.hypothesis)) setModal("data-change-check"); - // else - updateData(true); - }, [checkDataCompletion]); - - // UseEffect to store current data - useEffect(() => { - if (!assumptions || !setMicroplanData) return; - setMicroplanData((previous) => ({ ...previous, hypothesis: assumptions })); - }, [assumptions]); - - // UseEffect to add a event listener for keyboard - useEffect(() => { - window.addEventListener("keydown", handleKeyPress); - - return () => window.removeEventListener("keydown", handleKeyPress); - }, [modal]); - - const handleKeyPress = (event) => { - // if (modal !== "upload-guidelines") return; - if (["x", "Escape"].includes(event.key)) { - // Perform the desired action when "x" or "esc" is pressed - // if (modal === "upload-guidelines") - setCheckDataCompletion("false"); - setModal("none"); - } - }; - - // check if data has changed or not - const updateData = useCallback( - (check) => { - if (!assumptions || !setMicroplanData) return; - if (check) { - if (assumptions.some((item) => item.active && parseFloat(item.value) === 0)) { - setToast({ state: "error", message: t("ERROR_HYPOTHESIS_VALUE_SHOULD_NOT_BE_ZERO") }); - setCheckDataCompletion("false"); - return; - } - let newAssumptions = assumptions.map((item) => { - if (parseFloat(item.value) === 0) { - return { ...item, value: 0.01 }; - } - return item; - }); - setMicroplanData((previous) => ({ ...previous, hypothesis: newAssumptions })); - setAssumptions(newAssumptions); - let checkValid = validateAssumptions(assumptions); - checkValid = checkValid && assumptions.filter((subItem) => subItem?.active).length !== 0; - if (checkValid) setCheckDataCompletion("valid"); - else setCheckDataCompletion("invalid"); - } else { - let checkValid = microplanData?.hypothesis?.every((item) => Object.values(item).every((data) => data !== "")); - checkValid = checkValid && assumptions.length !== 0; - if (checkValid) setCheckDataCompletion("valid"); - else setCheckDataCompletion("invalid"); - } - }, - [assumptions, setMicroplanData, microplanData, setCheckDataCompletion] - ); - - const validateAssumptions = useCallback((assumptions) => { - return assumptions.filter((item) => item?.active).every((item) => Object.values(item).every((data) => data !== "")) && assumptions.length !== 0; - }, []); - - const cancelUpdateData = useCallback(() => { - setCheckDataCompletion("false"); - setModal("none"); - }, [setCheckDataCompletion, setModal]); - - const closeModal = useCallback(() => { - setModal("none"); - }, []); - - // Function to Delete an assumption - const deleteAssumptionHandlerCallback = useCallback(() => { - deleteAssumptionHandler(itemForDeletion, setItemForDeletion, setAssumptions, setHypothesisAssumptionsList, setToast, t); - closeModal(); - }, [itemForDeletion, deleteAssumptionHandler, setItemForDeletion, setAssumptions, setHypothesisAssumptionsList, closeModal, setToast, t]); - - const sectionClass = `jk-header-btn-wrapper hypothesis-section ${editable ? "" : "non-editable-component"} popup-wrap-rest-unfocus `; - - return ( - <> -
-
- {/* NonInterractable Section */} - - {/* Interractable Section that includes the example as well as the assumptions */} - -
-
-
- {modal === "delete-conformation" && ( - } - actionCancelLabel={t("YES")} - actionCancelOnSubmit={deleteAssumptionHandlerCallback} - actionSaveLabel={t("NO")} - actionSaveOnSubmit={closeModal} - > -
-

{t("HYPOTHESIS_INSTRUCTIONS_DELETE_ENTRY_CONFIRMATION")}

-
-
- )} -
- - ); -}; - -// Function to add a new assumption -const addAssumptionsHandler = (setAssumptions) => { - const uuid = uuidv4(); - setAssumptions((previous) => [ - ...previous, - { - id: uuid, - // previous.length ? previous[previous.length - 1].id + 1 : 0, - key: "", - value: "", - active: true, - }, - ]); -}; - -// Defination for NonInterractable Section -const NonInterractableSection = React.memo(({ t }) => { - return ( -
-

{t("HEADING_HYPOTHESIS")}

-

{t("INSTRUCTION_HYPOTHESIS")}

-
- ); -}); - -// Defination for NonInterractable Section -const InterractableSection = React.memo( - ({ assumptions, setAssumptions, hypothesisAssumptionsList, setHypothesisAssumptionsList, setModal, setItemForDeletion, exampleOption, t }) => { - const itemRefs = useRef([]); - const [expandedIndex, setExpandedIndex] = useState(null); - const scrollContainerRef = useRef(null); - const [renderCycle, setRenderCycle] = useState(0); - - useEffect(() => { - if (expandedIndex !== null) { - setRenderCycle(0); // Reset render cycle count when expandedIndex changes - } - }, [expandedIndex]); - - useEffect(() => { - // Scroll to the expanded item after the state has updated and the DOM has re-rendered - if (renderCycle < 2) { - setRenderCycle((prev) => prev + 1); // Increment render cycle count - } else if (expandedIndex !== null && itemRefs.current[expandedIndex]) { - try { - const parentElement = itemRefs.current[expandedIndex]; - const childElement = itemRefs.current[expandedIndex].children[1]; - - if (parentElement) { - const scrollContainer = scrollContainerRef.current; - const parentRect = parentElement.getBoundingClientRect(); - const containerRect = scrollContainer.getBoundingClientRect(); - - // Calculate the offset from the top of the container - const offset = parentRect.top - containerRect.top; - - // Scroll the container - scrollContainer.scrollTo({ - top: scrollContainer.scrollTop + offset - 10, - behavior: "smooth", - }); - } - - if (childElement) { - childElement.focus(); - } - } catch (error) { - console.error("Error scrolling to element:", error); - } - } - }, [renderCycle, expandedIndex]); - - useEffect(() => { - if (expandedIndex !== null) { - const observer = new MutationObserver(() => { - setRenderCycle((prev) => prev + 1); // Trigger render cycle when the DOM changes - }); - - if (itemRefs.current[expandedIndex]) { - observer.observe(itemRefs.current[expandedIndex], { childList: true, subtree: true }); - } - - return () => observer.disconnect(); - } - }, [expandedIndex]); - - const toggleExpand = (index) => { - setExpandedIndex(index === expandedIndex ? null : index); - }; - - // Handler for deleting an assumption on conformation - const deleteHandler = useCallback( - (item) => { - setModal("delete-conformation"); - setItemForDeletion(item); - }, - [setModal, setItemForDeletion] - ); - - return ( -
- -
-
-
-

{t("KEY")}

-
-
-

{t("VALUE")}

-
-
- -
-
- {assumptions - ?.filter((item) => item.active) - ?.map((item, index) => ( -
item.active)?.length - 1 ? "last-container" : "" - } `} - > -
{ - itemRefs.current[index] = el; - }} - onClick={() => { - toggleExpand(index); - }} - > - -
-
- -
-
- ))} -
-
- ); - } -); - -const Example = ({ exampleOption, t }) => { - return ( -
-

{t("EXAMPLE")}

-
-
-

{t("KEY")}

- -

{t("HYPOTHESIS_KEY_HELP_TEXT")}

-
-
-

{t("VALUE")}

- -

{t("HYPOTHESIS_VALUE_HELP_TEXT")}

-
-
-
- ); -}; - -const deleteAssumptionHandler = (item, setItemForDeletion, setAssumptions, setHypothesisAssumptionsList, setToast, t) => { - let add = true; - setAssumptions((previous) => { - if (!previous.length) return []; - if (previous.filter((item) => item.active)?.length <= 1) { - setToast({ state: "error", message: t("ERROR_CANNOT_DELETE_LAST_HYPOTHESIS") }); - add = false; - return previous; - } - // const filteredData = previous.filter((data) => data.id !== item.id); - const deletionElementIndex = previous.findIndex((data) => data.id === item.id); - const filteredData = previous.map((data, index) => (index === deletionElementIndex ? { ...data, active: false } : data)); - return filteredData || []; - }); - if (add && item && item.key) - setHypothesisAssumptionsList((previous) => { - if (!previous.includes(item.key)) return [...previous, item.key]; - return previous; // Return previous array if key already exists - }); - setItemForDeletion(); -}; - -const Select = React.memo(({ item, assumptions, setAssumptions, disabled = false, options, setOptions, t }) => { - const [selected, setSelected] = useState(); - const [filteredOptions, setFilteredOptions] = useState([]); - - useEffect(() => { - if (item?.key) setSelected({ code: item.key }); - }, [item]); - - useEffect(() => { - if (!options) return; - const filteredOptions = options.length ? options : []; - if (item?.key && !filteredOptions.includes(item.key)) { - setFilteredOptions([item.key, ...filteredOptions]); - } else setFilteredOptions(filteredOptions); - }, [options]); - - const selectChangeHandler = useCallback( - (e) => { - const existingEntry = assumptions.find((item) => item?.active && item?.key === e?.code); - if (existingEntry) return; - const newDataSegment = { - ...item, - id: item.id, - key: e?.code, - value: item.value, - }; - setAssumptions((previous) => { - const filteredAssumptionsList = previous.map((data) => { - if (data.id === item.id) return newDataSegment; - return data; - }); - return filteredAssumptionsList; - }); - - setOptions((previous) => { - let newOptions = previous.filter((item) => item !== e?.code); - if (selected && !newOptions.includes(selected?.code)) newOptions.unshift(selected?.code); - return newOptions; - }); - }, - [assumptions, item, selected, setAssumptions, setOptions] - ); - - return ( - ({ code: item }))} - selected={selected} - optionKey="code" - select={selectChangeHandler} - // style={{ width: "100%", backgroundColor: "rgb(0,0,0,0)", position:"sticky" }} - optionCardStyles={{ position: "absolute" }} - placeholder={t("SELECT_OPTION")} - showToolTip={true} - /> - ); -}); - -const Input = React.memo(({ item, setAssumptions, t, disabled = false }) => { - const [inputValue, setInputValue] = useState(""); - - useEffect(() => { - if (item) setInputValue(item.value); - }, [item]); - - const inputChangeHandler = useCallback( - (e) => { - if (e.target.value.includes("+") || e.target.value.includes("e")) return; - if ((e.target.value < 0 || e.target.value > 10000000000) && e.target.value !== "") return; - let value; - const decimalIndex = e.target.value.indexOf("."); - if (decimalIndex !== -1) { - const numDecimals = e.target.value.length - decimalIndex - 1; - value = e.target.value; - if (numDecimals <= 2) { - value = e.target.value; - } else if (numDecimals > 2) { - value = value.substring(0, decimalIndex + 3); - } - } else value = Number.parseFloat(e.target.value); - - setInputValue(!Number.isNaN(value) ? value : ""); - const newDataSegment = { - ...item, - id: item.id, - key: item.key, - value: !Number.isNaN(value) ? value : "", - }; - setAssumptions((previous) => { - const filteredAssumptionsList = previous.map((data) => { - if (data.id === item.id) { - return newDataSegment; - } - return data; - }); - return filteredAssumptionsList; - }); - }, - [item, setAssumptions] - ); - - return ( - - ); -}); - -const setAutofillHypothesisData = (autofillHypothesis, assumptions, setAssumptions) => { - if (assumptions?.length !== 0) return []; - let newAssumptions = []; - for (let i in autofillHypothesis) { - const uuid = uuidv4(); - newAssumptions.push({ - id: uuid, - key: autofillHypothesis[Number(i)], - value: "", - active: true, - }); - } - setAssumptions(newAssumptions); - return newAssumptions; -}; - -const filterHypothesisList = (assumptions, hypothesisList) => { - let alreadySelectedHypothesis = assumptions.filter((item) => item?.active).map((item) => item?.key) || []; - return hypothesisList.filter((item) => !alreadySelectedHypothesis.includes(item)); -}; - -export default Hypothesis; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js deleted file mode 100644 index 23bbef8ae29..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js +++ /dev/null @@ -1,113 +0,0 @@ -import { Button, DownloadIcon, SVG } from "@egovernments/digit-ui-react-components"; -import React, { useState } from "react"; -import { useTranslation } from "react-i18next"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; - -export const JsonPreviewInExcelForm = (props) => { - const { t } = useTranslation(); - const sheetsData = props?.sheetsData; - const [currentSheetName, setCurrentSheetName] = useState(Object.keys(sheetsData).length > 0 ? Object.keys(sheetsData)[0] : undefined); - return ( -
-
-
-
- {props?.errorLocationObject?.[currentSheetName] &&

{t("USER_DIRECTIONS_FOR_ERROR_MESSAGE")}

} - {/* {Object.entries(sheetsData).map(([sheetName, sheetData], index) => ( */} -
- - - - {sheetsData?.[currentSheetName]?.[0] - ?.filter((header) => header) - .map((header) => ( - - ))} - - - - {sheetsData?.[currentSheetName]?.slice(1).map((rowData, rowIndex) => ( - - {Object.values(sheetsData?.[currentSheetName]?.[0])?.map((_, cellIndex) => { - const headerName = sheetsData?.[currentSheetName]?.[0]?.[cellIndex]; - const error = headerName ? props?.errorLocationObject?.[currentSheetName]?.[rowIndex]?.[headerName] : undefined; - let convertedError; - if (typeof error?.[0] === "object") { - let { error: actualError, ...otherProperties } = error[0]; - convertedError = t(actualError, otherProperties?.values); - } else { - convertedError = t(error); - } - const rowHasError = - typeof props?.errorLocationObject?.[currentSheetName]?.[rowIndex] === "object" - ? Object.keys(props?.errorLocationObject?.[currentSheetName]?.[rowIndex]).length !== 0 - : undefined; - return ( - - ); - })} - - ))} - -
{t(header)}
- {cellIndex === 0 && rowHasError &&
} - - {rowData[cellIndex] || rowData[cellIndex] === 0 ? rowData[cellIndex] : ""} -
-
-
- {Object.entries(sheetsData).map(([sheetName, sheetData], index) => ( - - ))} -
- {/* ))} */} -
-
- ); -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Mapping.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Mapping.js deleted file mode 100644 index 75f953c8804..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Mapping.js +++ /dev/null @@ -1,445 +0,0 @@ -// Importing necessary modules -import { Card, Header } from "@egovernments/digit-ui-components"; -import L from "leaflet"; -import "leaflet/dist/leaflet.css"; -import React, { useCallback, useEffect, useRef, useState, Fragment } from "react"; -import { useTranslation } from "react-i18next"; -import ZoomControl from "./ZoomControl"; -import CustomScaleControl from "./CustomScaleControl"; -import * as DigitSvgs from "@egovernments/digit-ui-svg-components"; -import { LoaderWithGap } from "@egovernments/digit-ui-react-components"; -import { tourSteps } from "../configs/tourSteps"; -import { useMyContext } from "../utils/context"; -import { - MapFilterIndex, - MapChoroplethIndex, - ChoroplethSelection, - FilterSection, - BoundarySelection, - BaseMapSwitcher, -} from "./MappingHelperComponents"; -import { - enableMapInteractions, - disableMapInteractions, - removeAllLayers, - filterBoundarySelection, - findBounds, - addGeojsonToMap, - addFilterProperties, - addChoroplethProperties, - prepareGeojson, - extractGeoData, -} from "../utils/mappingUtils"; - -const page = "mapping"; - -// Mapping component definition -const Mapping = ({ - campaignType = Digit.SessionStorage.get("microplanHelperData")?.campaignData?.projectType, - microplanData, - setMicroplanData, - checkDataCompletion, - setCheckDataCompletion, - currentPage, - pages, - setToast, - ...props -}) => { - //fetch campaign data - const { id = "" } = Digit.Hooks.useQueryParams(); - const { isLoading: isCampaignLoading, data: campaignData } = Digit.Hooks.microplan.useSearchCampaign( - { - CampaignDetails: { - tenantId: Digit.ULBService.getCurrentTenantId(), - ids: [id], - }, - }, - { - enabled: !!id, - } - ); - - // request body for boundary hierarchy api - var reqCriteria = { - url: `/boundary-service/boundary-hierarchy-definition/_search`, - params: {}, - body: { - BoundaryTypeHierarchySearchCriteria: { - tenantId: Digit.ULBService.getStateId(), - // hierarchyType: "Microplan", - hierarchyType: campaignData?.hierarchyType, - }, - }, - config: { - enabled: !!campaignData?.hierarchyType, - select: (data) => { - return ( - data?.BoundaryHierarchy?.[0]?.boundaryHierarchy?.map((item) => ({ - ...item, - parentBoundaryType: item?.parentBoundaryType - ? `${campaignData?.hierarchyType}_${Digit.Utils.microplan.transformIntoLocalisationCode(item?.parentBoundaryType)}` - : null, - boundaryType: `${campaignData?.hierarchyType}_${Digit.Utils.microplan.transformIntoLocalisationCode(item?.boundaryType)}`, - })) || {} - ); - }, - }, - }; - const { isLoading: ishierarchyLoading, data: hierarchy } = Digit.Hooks.useCustomAPIHook(reqCriteria); - // request body for boundary hierarchy api - var reqCriteria = { - url: `/boundary-service/boundary/_search`, - params: { codes: Digit.ULBService.getCurrentTenantId(), tenantId: Digit.ULBService.getCurrentTenantId() }, - body: {}, - config: { - select: (data) => { - return data?.Boundary || {}; - }, - }, - }; - const { isLoading: isBoundaryLoading, data: Boundary } = Digit.Hooks.useCustomAPIHook(reqCriteria); - - // Setting up state variables - const [editable, setEditable] = useState(true); - const { t } = useTranslation(); - var [map, setMap] = useState(null); - var [_mapNode, set__mapNode] = useState("map"); - const [layers, setLayer] = useState([]); - const [validationSchemas, setValidationSchemas] = useState([]); - const [filterDataOrigin, setFilterDataOrigin] = useState({}); - const [dataAvailability, setDataAvailability] = useState("true"); - // const [toast, setToast] = useState(); - const [baseMaps, setBaseMaps] = useState({}); - const [selectedBaseMap, setSelectedBaseMap] = useState({}); - const [selectedBaseMapName, setSelectedBaseMapName] = useState(""); - const [showBaseMapSelector, setShowBaseMapSelector] = useState(false); - const [boundaryData, setBoundaryData] = useState({}); // State for boundary data - const [filterData, setFilterData] = useState({}); // State for facility data - const [boundarySelections, setBoundarySelections] = useState({}); - const [isboundarySelectionSelected, setIsboundarySelectionSelected] = useState(false); - const { state, dispatch } = useMyContext(); - const [filterPropertyNames, setFilterPropertyNames] = useState(); - const [filterProperties, setFilterProperties] = useState(); - const [showFilterOptions, setShowFilterOptions] = useState(false); - const [filterSelections, setFilterSelections] = useState([]); - const [choroplethProperties, setChoroplethProperties] = useState([]); - const [showChoroplethOptions, setShowChoroplethOptions] = useState(false); - const [choroplethProperty, setChoroplethProperty] = useState(); - const [dataCompleteness, setDataCompleteness] = useState(); - const basemapRef = useRef(); - const filterBoundaryRef = useRef(); - const showChoroplethOptionRef = useRef(); - const showFilterOptionRef = useRef(); - const [loader, setLoader] = useState(false); - - // Set TourSteps - useEffect(() => { - const tourData = tourSteps(t)?.[page] || {}; - if (state?.tourStateData?.name === page) return; - dispatch({ - type: "SETINITDATA", - state: { tourStateData: tourData }, - }); - }, []); - - // Effect to initialize map when data is fetched - useEffect(() => { - if (!state || !Boundary) return; - const UIConfiguration = state?.UIConfiguration; - if (UIConfiguration) { - const filterDataOriginList = UIConfiguration.find((item) => item.name === "mapping"); - setFilterDataOrigin(filterDataOriginList); - } - const BaseMapLayers = state?.BaseMapLayers; - const schemas = state?.Schemas; - if (schemas) setValidationSchemas(schemas); - if (!BaseMapLayers || (BaseMapLayers && BaseMapLayers.length === 0)) return; - let baseMaps = {}; - let defaultBaseMap = undefined; - BaseMapLayers.forEach((item) => { - if (item.url) { - const layer = L.tileLayer(item.url, { - minZoom: item?.minZoom, - maxZoom: item?.maxZoom, - attribution: item?.attribution, - }); - baseMaps[item?.name] = { - metadata: item, - layer, - }; - if (!defaultBaseMap) - defaultBaseMap = { - name: item?.name, - layer, - }; - } - }); - setSelectedBaseMapName(defaultBaseMap?.name); - setBaseMaps(baseMaps); - if (!map) { - init(_mapNode, defaultBaseMap, Boundary); - } - }, [Boundary]); - - useEffect(() => { - if (map && filterDataOrigin && Object.keys(filterDataOrigin).length !== 0) { - setLoader("LOADING"); - // Check if all the data is present or not, if it is then extract it in a format that can be used for mapping and other mapping related operations - extractGeoData( - campaignType, - microplanData, - filterDataOrigin, - validationSchemas, - setToast, - setDataAvailability, - hierarchy, - setBoundaryData, - setFilterData, - setFilterProperties, - setFilterSelections, - setFilterPropertyNames, - state, - setChoroplethProperties, - setDataCompleteness, - t - ); - setLoader(false); - } - }, [filterDataOrigin, hierarchy]); - - // Function to initialize map - const init = (id, defaultBaseMap, Boundary) => { - if (map !== null) return; - - // let bounds = findBounds(Boundary); - - let mapConfig = { - center: [0, 0], - zoomControl: false, - zoom: 3, - scrollwheel: true, - minZoom: 3, - }; - - let map_i = L.map(id, mapConfig); - var verticalBounds = L.latLngBounds(L.latLng(-90, -170), L.latLng(85, 190)); - map_i.on("drag", () => { - map_i.panInsideBounds(verticalBounds, { animate: true }); - }); - map_i.on("zoom", () => { - map_i.panInsideBounds(verticalBounds, { animate: true }); - }); - const defaultBaseLayer = defaultBaseMap?.layer.addTo(map_i); - // if (bounds) map_i.fitBounds(bounds); - setSelectedBaseMap(defaultBaseLayer); - setMap(map_i); - }; - - const handleBaseMapToggle = (newBaseMap) => { - if (map) { - const currentBaseLayer = selectedBaseMap; - if (currentBaseLayer) { - currentBaseLayer.remove(); - } - const newBaseLayer = baseMaps[newBaseMap].layer.addTo(map); - // Add the new base layer to the bottom of the layer stack - newBaseLayer.addTo(map); - - // Update the baseLayer state - setSelectedBaseMap(newBaseLayer); - setSelectedBaseMapName(newBaseMap); - } - }; - - // showing selected boundary data - useEffect(() => { - if (!boundarySelections && !choroplethProperty && !filterSelections) return; - setLoader("LOADING"); - try { - removeAllLayers(map, layers); - const { filteredSelection, childrenList } = filterBoundarySelection(boundaryData, boundarySelections); - let newLayer = []; - let addOn = { - fillColor: "rgba(255, 107, 43, 0)", - weight: 3.5, - opacity: 1, - color: "rgba(176, 176, 176, 1)", - fillOpacity: 0, - fill: "rgb(4,136,219,1)", - child: !childrenList || childrenList.length === 0, // so that this layer also has mounse in and mouse out events - }; - let geojsonsBase = prepareGeojson(boundaryData, "ALL", addOn); - if (geojsonsBase) { - let baseLayer = addGeojsonToMap(map, geojsonsBase, t); - if (baseLayer) newLayer.push(baseLayer); - let bounds = findBounds(geojsonsBase); - if (bounds) map.fitBounds(bounds); - } - - addOn = { - fillColor: "rgba(255, 107, 43, 1)", - weight: 2.5, - opacity: 1, - color: "rgba(255, 255, 255, 1)", - fillOpacity: 0.22, - fill: "rgb(4,136,219)", - }; - - let geojsonLayer; - if (choroplethProperty) { - if (dataCompleteness === "partial" || dataCompleteness === "false" || dataCompleteness === undefined) { - setToast({ - state: "warning", - message: t("DISPLAYING_DATA_ONLY_FOR_UPLOADED_BOUNDARIES"), - }); - } - - let choroplethGeojson = prepareGeojson(boundaryData, "ALL", { ...addOn, child: true, fillColor: "rgb(0,0,0,0)" }) || []; - if (choroplethGeojson && choroplethGeojson.length !== 0) - choroplethGeojson = addChoroplethProperties(choroplethGeojson, choroplethProperty, filteredSelection); - geojsonLayer = addGeojsonToMap(map, choroplethGeojson, t); - if (geojsonLayer) { - newLayer.push(geojsonLayer); - } - } - geojsonLayer = null; - const geojsons = prepareGeojson(boundaryData, filteredSelection, addOn); - if (geojsons && geojsons.length > 0) { - geojsonLayer = addGeojsonToMap(map, geojsons, t); - newLayer.push(geojsonLayer); - let bounds = findBounds(geojsons); - if (bounds) map.fitBounds(bounds); - } - - const childrenGeojson = prepareGeojson(boundaryData, childrenList, { ...addOn, opacity: 0, fillOpacity: 0, child: true }); - let childrenGeojsonLayer = addGeojsonToMap(map, childrenGeojson, t); - if (childrenGeojsonLayer) newLayer.push(childrenGeojsonLayer); - - //filters - const filterGeojsons = prepareGeojson(filterData, filteredSelection && filteredSelection.length !== 0 ? filteredSelection : "ALL", addOn); - const filterGeojsonWithProperties = addFilterProperties(filterGeojsons, filterSelections, filterPropertyNames, state?.MapFilters); - let filterGeojsonLayer = addGeojsonToMap(map, filterGeojsonWithProperties, t); - if (filterGeojsonLayer) newLayer.push(filterGeojsonLayer); - - setLayer(newLayer); - } catch (error) { - console.error("Error while adding geojson to map: ", error.message); - } - setLoader(false); - }, [boundarySelections, choroplethProperty, filterSelections]); - - const handleOutsideClickAndSubmitSimultaneously = useCallback(() => { - if (isboundarySelectionSelected) setIsboundarySelectionSelected(false); - if (showBaseMapSelector) setShowBaseMapSelector(false); - if (showFilterOptions) setShowFilterOptions(false); - if (showChoroplethOptions) setShowChoroplethOptions(false); - }, [ - isboundarySelectionSelected, - showBaseMapSelector, - showFilterOptions, - showChoroplethOptions, - setIsboundarySelectionSelected, - setShowBaseMapSelector, - setShowFilterOptions, - setShowChoroplethOptions, - ]); - Digit?.Hooks.useClickOutside(filterBoundaryRef, handleOutsideClickAndSubmitSimultaneously, isboundarySelectionSelected, { capture: true }); - Digit?.Hooks.useClickOutside(basemapRef, handleOutsideClickAndSubmitSimultaneously, showBaseMapSelector, { capture: true }); - Digit?.Hooks.useClickOutside(showFilterOptionRef, handleOutsideClickAndSubmitSimultaneously, showFilterOptions, { capture: true }); - Digit?.Hooks.useClickOutside(showChoroplethOptionRef, handleOutsideClickAndSubmitSimultaneously, showChoroplethOptions, { capture: true }); - - // function to stop mouse event propogation from custom comopents to leaflet map - const handleMouseDownAndScroll = (event) => { - event?.stopPropagation(); - disableMapInteractions(map); - }; - - const handleMouseUpAndScroll = (event) => { - enableMapInteractions(map); - }; - useEffect(() => { - if (isboundarySelectionSelected || showBaseMapSelector || showFilterOptions || showChoroplethOptions) handleMouseDownAndScroll(); - else handleMouseUpAndScroll(); - }, [isboundarySelectionSelected, showBaseMapSelector, showFilterOptions, showChoroplethOptions, choroplethProperty, filterPropertyNames]); - - // Rendering component - return ( -
-
{t("MAPPING")}
- - - {/* Container for map */} - -
-
-
- -
- {filterProperties && Object.keys(filterProperties).length !== 0 && ( - - )} - -
- -
- -
- {DigitSvgs.NorthArrow && } -
- -
- -
- {filterSelections && filterSelections.length > 0 && ( - - )} - {choroplethProperty && } -
-
-
-
- {loader && } -
- ); -}; - -// Exporting Mapping component -export default Mapping; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MappingHelperComponents.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MappingHelperComponents.js deleted file mode 100644 index 9cea19a943f..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MappingHelperComponents.js +++ /dev/null @@ -1,513 +0,0 @@ -// Importing necessary modules -import { Card, CardLabel, MultiSelectDropdown, Button, CheckBox, RadioButtons } from "@egovernments/digit-ui-components"; -import "leaflet/dist/leaflet.css"; -import React, { memo, useCallback, useEffect, useMemo, useRef, useState, Fragment } from "react"; -import * as DigitSvgs from "@egovernments/digit-ui-svg-components"; -import { CardSectionHeader, InfoIconOutline, LoaderWithGap, Modal } from "@egovernments/digit-ui-react-components"; -import { fetchDropdownValues } from "../utils/processHierarchyAndData"; -import { MapChoroplethGradientColors, PRIMARY_THEME_COLOR } from "../configs/constants"; -import { ModalHeading } from "./CommonComponents"; -import * as MicroplanIconCollection from "../icons/Svg"; -import { generatePreviewUrl } from "../utils/mappingUtils"; - -const IconCollection = { ...MicroplanIconCollection, ...DigitSvgs }; - -export function checkTruthyKeys(obj) { - for (let key in obj) { - if (Object.hasOwn(obj, key)) { - if (obj[key] && !(Array.isArray(obj[key]) && obj[key].length === 0)) { - return true; - } - } - } - return false; -} - -export const MapFilterIndex = ({ filterSelections, MapFilters, t }) => { - return ( -
- {filterSelections && filterSelections.length > 0 ? ( - <> - {filterSelections.map((item, index) => ( - //
- - //

{t(item)}

- //
- ))} - - ) : ( - "" - )} -
- ); -}; - -// Function to create the gradient from the colors array for choropleth index -export const MapChoroplethIndex = ({ t, choroplethProperty }) => { - const createGradientString = (colors) => { - return colors.map((color) => `${color.color} ${color.percent}%`).join(", "); - }; - - const gradientString = createGradientString(MapChoroplethGradientColors); - const gradientStyle = { - background: `linear-gradient(to right, ${gradientString})`, - }; - - return ( -
-
-

0%

-
-

100%

-
-

{t(choroplethProperty)}

-
- ); -}; - -export const FilterItemBuilder = ({ item, MapFilters, t }) => { - let temp = MapFilters?.find((e) => e?.name === item)?.icon?.index; - let DynamicIcon = IconCollection?.[temp]; - // let icon; - // if (typeof DynamicIcon === "function") icon = DynamicIcon({}); - return DynamicIcon && typeof DynamicIcon === "function" ? ( -
- -

{t(item)}

-
- ) : ( - //
- "" - ); -}; - -export const ChoroplethSelection = memo( - ({ - choroplethProperties, - showChoroplethOptions, - showChoroplethOptionRef, - setShowChoroplethOptions, - choroplethProperty, - setChoroplethProperty, - t, - }) => { - const handleChange = useCallback( - (value) => { - setChoroplethProperty(value?.code); - }, - [choroplethProperties] - ); - - return ( -
-
setShowChoroplethOptions((previous) => !previous)} - onKeyUp={() => setShowChoroplethOptions((previous) => !previous)} - tabIndex={0} - > -

{t("VISUALIZATIONS")}

-
- {DigitSvgs.FilterAlt && } -
-
- {showChoroplethOptions && ( -
-
- ({ name: item, id: item, code: item }))} - optionsKey="name" - onSelect={handleChange} - selectedOption={choroplethProperty} - /> -
-
- )} -
- ); - } -); - -export const FilterSection = memo( - ({ filterProperties, showFilterOptionRef, showFilterOptions, setShowFilterOptions, filterSelections, setFilterSelections, t }) => { - const handleChange = useCallback( - (e, item) => { - let tempFilterSelections = [...filterSelections]; // Clone the array to avoid mutating state directly - if (filterSelections.includes(item)) { - tempFilterSelections = tempFilterSelections.filter((element) => element !== item); - } else { - tempFilterSelections.push(item); - } - setFilterSelections(tempFilterSelections); - }, - [filterSelections] - ); - - return ( -
-
setShowFilterOptions((previous) => !previous)} - onKeyUp={() => setShowFilterOptions((previous) => !previous)} - tabIndex={0} - > -

{t("FILTERS")}

-
- {DigitSvgs.FilterAlt && } -
-
- {showFilterOptions && ( -
-
- {filterProperties.map((item) => ( -
- handleChange(e, item)} - label={t(item)} - checked={!!filterSelections.includes(item)} - mainClassName="mainClassName" - labelClassName="labelClassName" - inputWrapperClassName="inputWrapperClassName" - inputClassName="inputClassName" - inputIconClassname="inputIconClassname" - iconFill={PRIMARY_THEME_COLOR} - onLabelClick={(e) => handleChange(e, item)} - /> -
- ))} -
-
- )} -
- ); - } -); - -export const BoundarySelection = memo( - ({ - boundarySelections, - setBoundarySelections, - boundaryData, - hierarchy, - filterBoundaryRef, - isboundarySelectionSelected, - setIsboundarySelectionSelected, - t, - }) => { - const [processedHierarchy, setProcessedHierarchy] = useState([]); - const [isLoading, setIsLoading] = useState(false); - const [showConfirmationModal, setShowConformationModal] = useState(false); - const itemRefs = useRef([]); - const [expandedIndex, setExpandedIndex] = useState(null); - const scrollContainerRef = useRef(null); - const [changedBoundaryType, setChangedBoundaryType] = useState(""); - const [isScrollable, setIsScrollable] = useState(false); - - useEffect(() => { - // Scroll to the expanded item's child element after the state has updated and the DOM has re-rendered - if (expandedIndex !== null && itemRefs.current[expandedIndex]) { - // Use a timeout to ensure the DOM has updated - setTimeout(() => { - const childElement = itemRefs.current[expandedIndex].children[0]; // Assuming child content is the second child - // if (childElement) { - // childElement.scrollIntoView({ behavior: 'smooth' }); - // } - if (childElement) { - const scrollContainer = scrollContainerRef.current; - const childElementBound = childElement.getBoundingClientRect(); - const containerRect = scrollContainer.getBoundingClientRect(); - - // Calculate the offset from the top of the container - const offset = childElementBound.top - containerRect.top; - - // Scroll the container - scrollContainer.scrollTo({ - top: scrollContainer.scrollTop + offset - 10, - behavior: "smooth", - }); - } - }, 0); - } - }, [expandedIndex]); - - const toggleExpand = (index) => { - setExpandedIndex(index === expandedIndex ? null : index); - }; - - // Filtering out dropdown values - useEffect(() => { - if (!boundaryData || !hierarchy) return; - const processedHierarchyTemp = fetchDropdownValues( - boundaryData, - processedHierarchy.length !== 0 ? processedHierarchy : hierarchy, - boundarySelections, - changedBoundaryType - ); - setProcessedHierarchy(processedHierarchyTemp); - setIsLoading(false); - }, [boundaryData, hierarchy, boundarySelections]); - - const handleClearAll = () => { - setShowConformationModal(true); - }; - - const handleSubmitConfModal = () => { - setBoundarySelections({}); - setShowConformationModal(false); - }; - - const handleCancelConfModal = () => { - setShowConformationModal(false); - }; - - const checkScrollbar = () => { - if (scrollContainerRef.current) { - setIsScrollable(scrollContainerRef.current.scrollHeight > scrollContainerRef.current.clientHeight); - } - }; - - useEffect(() => { - // Initial check - checkScrollbar(); - - // Check on resize - window.addEventListener("resize", checkScrollbar); - - // Cleanup event listeners on component unmount - return () => { - window.removeEventListener("resize", checkScrollbar); - }; - }, [isboundarySelectionSelected]); - - useEffect(() => { - const content = scrollContainerRef.current; - content.addEventListener("scroll", checkScrollbar); - - return () => { - content.removeEventListener("scroll", checkScrollbar); - }; - }, [scrollContainerRef]); - - return ( -
- {isLoading && } -
- ); - } -); - -export const BaseMapSwitcher = ({ - baseMaps, - showBaseMapSelector, - setShowBaseMapSelector, - handleBaseMapToggle, - selectedBaseMapName, - basemapRef, - t, -}) => { - if (!baseMaps) return null; - return ( -
-
setShowBaseMapSelector((previous) => !previous)} - onKeyUp={() => setShowBaseMapSelector((previous) => !previous)} - tabIndex={0} - > -

{t("LAYERS")}

-
{DigitSvgs.Layers && }
-
-
- {showBaseMapSelector && ( -
- {Object.entries(baseMaps).map(([name, baseMap], index) => { - return ( -
- {t("ERROR_LOADING_BASE_MAP")} handleBaseMapToggle(name)} - /> -

{t(name)}

-
- ); - })} -
- )} -
-
- ); -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanCreatedScreen.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanCreatedScreen.js deleted file mode 100644 index b6a2fb9a205..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanCreatedScreen.js +++ /dev/null @@ -1,111 +0,0 @@ -import React, { memo } from "react"; -import { ActionBar, ArrowForward, Banner } from "@egovernments/digit-ui-components"; -import { useTranslation } from "react-i18next"; -import { ArrowBack, FileDownload } from "@egovernments/digit-ui-svg-components"; -import { convertJsonToXlsx, writeWorkbookToBuffer } from "../utils/jsonToExcelBlob"; -import { Button } from "@egovernments/digit-ui-react-components"; -import { useHistory } from "react-router-dom"; -import { Link } from "react-router-dom/cjs/react-router-dom.min"; -import { PRIMARY_THEME_COLOR, commonColumn } from "../configs/constants"; -import { colorHeaders } from "../utils/uploadUtils"; - -const MicroplanCreatedScreen = memo(({ microplanData, ...props }) => { - const { t } = useTranslation(); - const history = useHistory(); - - const downloadMicroplan = async () => { - try { - if (!microplanData?.microplanPreview) return; - const data = _.cloneDeep(microplanData?.microplanPreview?.previewData); - const commonColumnIndex = data[0]?.findIndex((item) => item === commonColumn); - data[0] = data[0].map((item) => t(item)); - - for (const i in data) { - data[i] = data[i].map((item, index) => - item ? (typeof item === "number" ? item : index === commonColumnIndex ? item : t(item)) : t("NO_DATA") - ); - } - - const headers = data?.[0] || []; - const workbook = await convertJsonToXlsx({ [microplanData?.microplanDetails?.name]: data }, {}, true); - colorHeaders(workbook, headers, [], []); - const blob = await writeWorkbookToBuffer(workbook); - - if (!blob) { - return; - } - - const url = URL.createObjectURL(blob); - const link = document.createElement("a"); - link.href = url; - - const fileNameParts = microplanData?.microplanDetails?.name; - if (!fileNameParts) { - return; - } - - link.download = fileNameParts; - link.click(); - URL.revokeObjectURL(url); - } catch (error) { - console.error(`Failed to download microplan: ${error.message}`, error); - } - }; - - const clickGoHome = () => { - history.push("/microplan-ui/employee"); - }; - - return ( -
-
-
- -
-

{t("MICROPLAN_GENERATED_SUCCESSFULLY_DESCRIPTIION")}

-
-
-
- - - {/* Back button */} -
- ); -}); - -export default MicroplanCreatedScreen; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanDetails.js deleted file mode 100644 index fbc73bd6569..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanDetails.js +++ /dev/null @@ -1,294 +0,0 @@ -import React, { Fragment, useState, useEffect, useCallback } from "react"; -import { - Card, - CardSubHeader, - CardSectionHeader, - StatusTable, - Row, - Loader, - LabelFieldPair, - CardLabel, - TextInput, - LoaderWithGap, -} from "@egovernments/digit-ui-react-components"; -import { useTranslation } from "react-i18next"; -import { tourSteps } from "../configs/tourSteps"; -import { useMyContext } from "../utils/context"; -import { InfoCard, Modal, Toast } from "@egovernments/digit-ui-components"; -import { CloseButton, ModalHeading } from "./CommonComponents"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; -import SearchPlanConfig from "../services/SearchPlanConfig"; - -const page = "microplanDetails"; - -const MicroplanDetails = ({ - MicroplanName = "default", - campaignType = Digit.SessionStorage.get("microplanHelperData")?.campaignData?.projectType, - microplanData, - setMicroplanData, - checkDataCompletion, - setCheckDataCompletion, - currentPage, - pages, - setToast, - ...props -}) => { - const { t } = useTranslation(); - const [microplan, setMicroplan] = useState(Digit.SessionStorage.get("microplanData")?.microplanDetails?.name); - const { state, dispatch } = useMyContext(); - const [modal, setModal] = useState("none"); - // const [toast, setToast] = useState(); - const [showNamingConventions, setShowNamingConventions] = useState(false); - const [loader, setLoader] = useState(false); - - //fetch campaign data - const { id = "" } = Digit.Hooks.useQueryParams(); - const { isLoading: isCampaignLoading, data: campaignData } = Digit.Hooks.microplan.useSearchCampaign( - { - CampaignDetails: { - tenantId: Digit.ULBService.getCurrentTenantId(), - ids: [id], - }, - }, - { - enabled: !!id, - select: (data) => { - const campaignCard = [ - { - label: t("CAMPAIGN_NAME"), - value: data?.campaignName ? data?.campaignName : t("ES_COMMON_NA"), - }, - { - label: t(`CAMPAIGN_TYPE`), - value: data?.projectType ? t(`CAMPAIGN_TYPE_${data?.projectType}`) : t("ES_COMMON_NA"), - }, - { - label: t(`CAMPAIGN_BENEFICIARY_TYPE`), - value: data?.additionalDetails?.beneficiaryType - ? t(`CAMPAIGN_BENEFICIARY_TYPE${data?.additionalDetails?.beneficiaryType}`) - : t("ES_COMMON_NA"), - }, - { - label: t("CAMPAIGN_DATE"), - value: data.startDate - ? data.endDate - ? `${Digit.DateUtils.ConvertEpochToDate(data.startDate)} - ${Digit.DateUtils.ConvertEpochToDate(data.endDate)}` - : Digit.DateUtils.ConvertEpochToDate(data.startDate) - : t("ES_COMMON_NA"), - }, - ]; - return campaignCard; - }, - } - ); - - // Set TourSteps - useEffect(() => { - const tourData = tourSteps(t)?.[page] || {}; - if (state?.tourStateData?.name === page) return; - dispatch({ - type: "SETINITDATA", - state: { tourStateData: tourData }, - }); - }, []); - - // Save data to ssn of data change - useEffect(() => { - setMicroplanData((previous) => ({ - ...previous, - microplanDetails: { - name: microplan, - }, - })); - }, [microplan]); - - useEffect(() => { - if (checkDataCompletion !== "true" || !setCheckDataCompletion) return; - - updateData(true); - }, [checkDataCompletion]); - - // UseEffect to add a event listener for keyboard - useEffect(() => { - window.addEventListener("keydown", handleKeyPress); - - return () => window.removeEventListener("keydown", handleKeyPress); - }, [modal]); - - const handleKeyPress = (event) => { - // if (modal !== "upload-guidelines") return; - if (["x", "Escape"].includes(event.key)) { - // Perform the desired action when "x" or "esc" is pressed - // if (modal === "upload-guidelines") - setCheckDataCompletion("false"); - setModal("none"); - } - }; - const validateMicroplanName = async () => { - try { - setLoader("LOADING"); - const body = { - PlanConfigurationSearchCriteria: { - name: microplan, - tenantId: Digit.ULBService.getCurrentTenantId(), - }, - }; - const response = await SearchPlanConfig(body); - if (response?.PlanConfiguration?.length === 0) { - return true; - } - if (response?.PlanConfiguration?.length === 1) { - if (response?.PlanConfiguration[0].id === microplanData?.planConfigurationId) { - setLoader(); - return true; - } - } - setLoader(); - return false; - } catch (error) { - console.error("Error while checking microplan name duplication: ", error.message); - setLoader(); - return false; - } - }; - // check if data has changed or not - const updateData = useCallback( - async (check) => { - if (checkDataCompletion !== "true" || !setCheckDataCompletion) return; - if (!microplan || !validateName(microplan)) { - setCheckDataCompletion("false"); - setShowNamingConventions(true); - return setToast({ state: "error", message: t("ERROR_MICROPLAN_NAME_CRITERIA") }); - } - const valid = await validateMicroplanName(); - if (!valid) { - setToast({ state: "error", message: t("ERROR_DUPLICATE_MICROPLAN_NAME") }); - setCheckDataCompletion("false"); - return; - } - if (check) { - setMicroplanData((previous) => ({ - ...previous, - microplanDetails: { - name: microplan, - }, - })); - if (!["", null, undefined].includes(microplan)) { - setCheckDataCompletion("valid"); - } else { - setCheckDataCompletion("invalid"); - } - } else { - if (!["", null, undefined].includes(microplanData?.microplanDetails?.name)) { - setCheckDataCompletion("valid"); - } else { - setCheckDataCompletion("invalid"); - } - } - }, - [checkDataCompletion, microplan, microplanData, setCheckDataCompletion, setMicroplanData, validateMicroplanName] - ); - - // const cancelUpdateData = useCallback(() => { - // setCheckDataCompletion(false); - // setModal('none'); - // }, [setCheckDataCompletion, setModal]); - function validateName(name) { - const microplanNamingRegxString = state?.UIConfiguration?.find((item) => item.name === "microplanNamingRegx")?.microplanNamingRegx; - const namePattern = new RegExp(microplanNamingRegxString); - return namePattern.test(name); - } - const onChangeMicroplanName = (e) => { - setMicroplan(e.target.value); - }; - - if (isCampaignLoading) { - return ; - } - - return ( - <> - {loader && } - - - {t("CAMPAIGN_DETAILS")} - - - - {campaignData?.length > 0 && - campaignData?.map((row, idx) => { - return ( - - ); - })} - - - - {t("NAME_YOUR_MP")} -

{t("MP_FOOTER")}

- - - {`${t("NAME_OF_MP")} `}

*

-
-
- -
-
-
- - {state?.UIConfiguration?.find((item) => item.name === "microplanNamingConvention")?.microplanNamingConvention?.map((item, index) => ( -
-

- {t(index + 1)}. -

-

- {t(item)} -

-
- ))} -
, - ]} - /> - - ); -}; - -export default MicroplanDetails; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js deleted file mode 100644 index 1be6619e7a7..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js +++ /dev/null @@ -1,478 +0,0 @@ -import { Header, Loader } from "@egovernments/digit-ui-components"; -import React, { useCallback, useEffect, useMemo, useState, Fragment } from "react"; -import { useTranslation } from "react-i18next"; -import { processHierarchyAndData } from "../utils/processHierarchyAndData"; -import { ModalHeading } from "./CommonComponents"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; -import { LoaderWithGap, Modal } from "@egovernments/digit-ui-react-components"; -import { tourSteps } from "../configs/tourSteps"; -import { useMyContext } from "../utils/context"; -import { - fetchMicroplanPreviewData, - filterObjects, - updateHyothesisAPICall, - filterMicroplanDataToShowWithHierarchySelection, -} from "../utils/microplanPreviewUtils"; -import { - HypothesisValues, - BoundarySelection, - DataPreview, - AppplyChangedHypothesisConfirmation, - Aggregates, -} from "./MicroplanPreviewHelperCompoenents"; - -const page = "microplanPreview"; - -const MicroplanPreview = ({ - campaignType = Digit.SessionStorage.get("microplanHelperData")?.campaignData?.projectType, - microplanData, - setMicroplanData, - checkDataCompletion, - setCheckDataCompletion, - currentPage, - pages, - navigationEvent, - setToast, - ...props -}) => { - const { mutate: UpdateMutate } = Digit.Hooks.microplan.useUpdatePlanConfig(); - const userInfo = Digit.SessionStorage.get("User")?.info; - const { id: campaignId = "" } = Digit.Hooks.useQueryParams(); - const { t } = useTranslation(); - const [hypothesisAssumptionsList, setHypothesisAssumptionsList] = useState([]); - const [data, setData] = useState([]); - const [dataToShow, setDataToShow] = useState([]); - const [joinByColumns, setJoinByColumns] = useState([]); - const [validationSchemas, setValidationSchemas] = useState([]); - const [resources, setResources] = useState([]); - const [formulaConfiguration, setFormulaConfiguration] = useState([]); - const [boundarySelections, setBoundarySelections] = useState({}); // state for hierarchy from the data available from uploaded data - const [boundaryData, setBoundaryData] = useState({}); // State for boundary data - // const [toast, setToast] = useState(); - const [modal, setModal] = useState("none"); - const [operatorsObject, setOperatorsObject] = useState([]); - - const [loaderActivation, setLoaderActivation] = useState(false); - - const [userEditedResources, setUserEditedResources] = useState({}); // state to maintain a record of the resources that the user has edited ( boundaryCode : {resource : value}) - const [microplanPreviewAggregates, setMicroplaPreviewAggregates] = useState(); - const { state, dispatch } = useMyContext(); - const [updateHypothesis, setUpdateHypothesis] = useState(false); - //fetch campaign data - const { id = "" } = Digit.Hooks.useQueryParams(); - const { isLoading: isCampaignLoading, data: campaignData } = Digit.Hooks.microplan.useSearchCampaign( - { - CampaignDetails: { - tenantId: Digit.ULBService.getCurrentTenantId(), - ids: [id], - }, - }, - { - enabled: !!id, - } - ); - - // request body for boundary hierarchy api - const reqCriteria = { - url: `/boundary-service/boundary-hierarchy-definition/_search`, - params: {}, - body: { - BoundaryTypeHierarchySearchCriteria: { - tenantId: Digit.ULBService.getStateId(), - hierarchyType: campaignData?.hierarchyType, - }, - }, - config: { - enabled: !!campaignData?.hierarchyType, - select: (data) => { - return ( - data?.BoundaryHierarchy?.[0]?.boundaryHierarchy?.map((item) => ({ - ...item, - parentBoundaryType: item?.parentBoundaryType - ? `${campaignData?.hierarchyType}_${Digit.Utils.microplan.transformIntoLocalisationCode(item?.parentBoundaryType)}` - : null, - boundaryType: `${campaignData?.hierarchyType}_${Digit.Utils.microplan.transformIntoLocalisationCode(item?.boundaryType)}`, - })) || {} - ); - }, - }, - }; - const { isLoading: ishierarchyLoading, data: hierarchyRawData } = Digit.Hooks.useCustomAPIHook(reqCriteria); - const hierarchy = useMemo(() => { - return hierarchyRawData?.map((item) => item?.boundaryType); - }, [hierarchyRawData]); - // Set TourSteps - useEffect(() => { - const tourData = tourSteps(t)?.[page] || {}; - if (state?.tourStateData?.name === page) return; - dispatch({ - type: "SETINITDATA", - state: { tourStateData: tourData }, - }); - }, []); - - // UseEffect to extract data on first render - useEffect(() => { - if (microplanData && (microplanData?.ruleEngine || microplanData?.hypothesis)) { - const hypothesisAssumptions = microplanData?.hypothesis || []; - const formulaConfiguration = microplanData?.ruleEngine?.filter((item) => Object.values(item).every((key) => key !== "")) || []; - if (hypothesisAssumptions.length !== 0 && hypothesisAssumptionsList.length === 0) { - setHypothesisAssumptionsList(hypothesisAssumptions); - } - if (formulaConfiguration.length !== 0) { - setFormulaConfiguration(formulaConfiguration); - } - } - if (microplanData?.microplanPreview?.userEditedResources) { - setUserEditedResources(microplanData?.microplanPreview?.userEditedResources); - } - }, []); - - // Fetch and assign MDMS data - useEffect(() => { - if (!state) return; - const UIConfiguration = state?.UIConfiguration; - const schemas = state?.Schemas; - let resourcelist = state?.Resources; - let microplanPreviewAggregatesList = state?.MicroplanPreviewAggregates; - microplanPreviewAggregatesList = microplanPreviewAggregatesList.find((item) => item.campaignType === campaignType)?.data; - if (schemas) setValidationSchemas(schemas); - resourcelist = resourcelist.find((item) => item.campaignType === campaignType)?.data; - if (resourcelist) setResources(resourcelist); - if (UIConfiguration) { - const joinWithColumns = UIConfiguration.find((item) => item.name === "microplanPreview")?.joinWithColumns; - setJoinByColumns(joinWithColumns); - } - let temp; - if (UIConfiguration) temp = UIConfiguration.find((item) => item.name === "ruleConfigure"); - if (temp?.ruleConfigureOperators) { - setOperatorsObject(temp.ruleConfigureOperators); - } - if (microplanPreviewAggregatesList) setMicroplaPreviewAggregates(microplanPreviewAggregatesList); - }, []); - - // UseEffect for checking completeness of data before moveing to next section - useEffect(() => { - if (!dataToShow || checkDataCompletion !== "true" || !setCheckDataCompletion) return; - const check = filterObjects(hypothesisAssumptionsList, microplanData?.hypothesis); - if (check.length === 0) { - if (navigationEvent?.name === "next") return setModal("confirm-microplan-generation"); - return createMicroplan(false, false); - } - setModal("confirm-apply-changed-hypothesis"); - }, [checkDataCompletion]); - - // check if data has changed or not - const updateData = useCallback( - (doPerform) => { - // Update the microplan data with selected hierarchy and resources - // This function also handles setting the completion check based on the action to be performed - if (!setMicroplanData) return; - try { - let tempData = filterMicroplanDataToShowWithHierarchySelection(data, {}, hierarchy); - // Adding resources to the data we need to show - tempData = Digit.Utils.microplan.addResourcesToFilteredDataToShow( - tempData, - resources, - hypothesisAssumptionsList, - formulaConfiguration, - userEditedResources, - t - ); - setMicroplanData((previous) => ({ - ...previous, - microplanPreview: { - previewData: tempData, - userEditedResources, - }, - })); - if (doPerform) { - return setCheckDataCompletion("perform-action"); - } - setCheckDataCompletion("false"); - } catch (error) { - console.error("Failed to update data:", error); - } - }, - [ - resources, - boundarySelections, - hierarchy, - hypothesisAssumptionsList, - formulaConfiguration, - userEditedResources, - setMicroplanData, - setCheckDataCompletion, - ] - ); - - const cancelUpdateData = useCallback(() => { - setUpdateHypothesis(false); - if (navigationEvent?.name === "next") setModal("confirm-microplan-generation"); - else createMicroplan(false, false); - }, [setCheckDataCompletion, setModal]); - - useEffect(() => { - if (boundarySelections && Object.values(boundarySelections).every((item) => item.length === 0) && hierarchy) { - const tempBoundarySelection = {}; - for (const item of hierarchy) { - tempBoundarySelection[item] = []; - } - setBoundarySelections(tempBoundarySelection); - } - }, [hierarchy]); - - // UseEffect to add a event listener for keyboard - useEffect(() => { - window.addEventListener("keydown", handleKeyPress); - - return () => window.removeEventListener("keydown", handleKeyPress); - }, [modal]); - - const handleKeyPress = (event) => { - // if (modal !== "upload-guidelines") return; - if (["x", "Escape"].includes(event.key)) { - // Perform the desired action when "x" or "esc" is pressed - setCheckDataCompletion("false"); - setModal("none"); - } - }; - - const cancleNavigation = () => { - if (navigationEvent?.name !== "next") setCheckDataCompletion("false"); - setModal("none"); - }; - - const createMicroplan = useCallback( - (doCreation, updateHypothesis) => { - if (!hypothesisAssumptionsList || !setMicroplanData) return; - const updateDataWrapper = () => { - if (doCreation || navigationEvent?.name !== "next") { - return updateData(true); - } - updateData(false); - }; - const setCheckDataCompletionWrapper = (value) => { - if (!doCreation) { - return setCheckDataCompletion("false"); - } - setCheckDataCompletion(value); - }; - const microData = updateHypothesis ? updateMicroplanData(hypothesisAssumptionsList) : microplanData; - setLoaderActivation(true); - updateHyothesisAPICall( - microData, - setMicroplanData, - operatorsObject, - microData?.microplanDetails?.name, - campaignId, - UpdateMutate, - setToast, - updateDataWrapper, - setLoaderActivation, - doCreation && navigationEvent?.name === "next" ? "GENERATED" : "DRAFT", - cancleNavigation, - state, - campaignType, - navigationEvent, - setCheckDataCompletionWrapper, - t - ); - - setUpdateHypothesis(false); - setModal("none"); - }, - [ - hypothesisAssumptionsList, - setMicroplanData, - operatorsObject, - campaignId, - UpdateMutate, - setToast, - updateData, - setLoaderActivation, - navigationEvent, - t, - ] - ); - - const updateMicroplanData = useCallback( - (hypothesisAssumptionsList) => { - let microData = {}; - setMicroplanData((previous) => { - microData = { ...previous, hypothesis: hypothesisAssumptionsList }; - return microData; - }); - return microData; - }, - [setMicroplanData] - ); - - // Set microplan preview data - useEffect(() => { - if (data?.length !== 0 || !hierarchyRawData || !hierarchy || validationSchemas?.length === 0) return; - - const combinedData = fetchMicroplanPreviewData(campaignType, microplanData, validationSchemas, hierarchy); - // process and form hierarchy - if (combinedData && hierarchy) { - const { hierarchyLists, hierarchicalData } = processHierarchyAndData(hierarchyRawData, [combinedData]); - setBoundaryData({ Microplan: { hierarchyLists, hierarchicalData } }); - } - if (combinedData) { - setData(combinedData); - setDataToShow(combinedData); - } - }, [hierarchy, hierarchyRawData, microplanData]); - - useEffect(() => { - if (!boundarySelections && !resources) return; - let tempData = filterMicroplanDataToShowWithHierarchySelection(data, boundarySelections, hierarchy); - // Adding resources to the data we need to show - tempData = Digit.Utils.microplan.addResourcesToFilteredDataToShow( - tempData, - resources, - hypothesisAssumptionsList, - formulaConfiguration, - userEditedResources, - t - ); - setDataToShow(tempData); - setMicroplanData((previous) => ({ ...previous, microplanPreview: { ...previous.microplanPreview, previewData: tempData, userEditedResources } })); - }, [boundarySelections, resources, hypothesisAssumptionsList, userEditedResources]); - - if (isCampaignLoading || ishierarchyLoading) { - return ( -
- -
- ); - } - - return ( - <> -
-
-

{t(campaignData?.campaignName)}

-
{t(microplanData?.microplanDetails?.name)}
-

{t("MICROPLAN_PREVIEW_CREATE_BY", { username: userInfo?.name })}

-
-
-
- -
-
- -
-
-

{t("MICROPLAN_PREVIEW_HYPOTHESIS_HEADING")}

-

{t("MICROPLAN_PREVIEW_HYPOTHESIS_INSTRUCTIONS")}

- -
-
- {dataToShow?.length != 0 ? ( - - ) : ( -
{t("NO_DATA_AVAILABLE")}
- )} -
-
- {modal === "confirm-apply-changed-hypothesis" && ( - } - actionCancelLabel={t("YES")} - actionCancelOnSubmit={() => { - setUpdateHypothesis(true); - if (navigationEvent?.name === "next") setModal("confirm-microplan-generation"); - else createMicroplan(false, true); - }} - actionSaveLabel={t("NO")} - actionSaveOnSubmit={cancelUpdateData} - formId="modal-action" - > - - - )} - {modal === "confirm-microplan-generation" && ( - } - actionCancelLabel={t("YES")} - actionCancelOnSubmit={() => createMicroplan(true, updateHypothesis)} - actionSaveLabel={t("NO")} - actionSaveOnSubmit={() => createMicroplan(false, updateHypothesis)} - formId="modal-action" - > -
-

{t("INSTRUCTIONS_MICROPLAN_GENERATION_CONFIRMATION")}

-
-
- )} -
- {loaderActivation && } - - ); -}; - -export default MicroplanPreview; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreviewHelperCompoenents.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreviewHelperCompoenents.js deleted file mode 100644 index e92335d6581..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreviewHelperCompoenents.js +++ /dev/null @@ -1,434 +0,0 @@ -import { CardLabel, Loader, MultiSelectDropdown, TextInput } from "@egovernments/digit-ui-components"; -import React, { memo, useCallback, useEffect, useMemo, useState, Fragment, useRef } from "react"; -import { fetchDropdownValues } from "../utils/processHierarchyAndData"; -import { CloseButton, ModalHeading } from "./CommonComponents"; -import { PRIMARY_THEME_COLOR, commonColumn } from "../configs/constants"; -import { Button, LoaderWithGap, Modal } from "@egovernments/digit-ui-react-components"; -import { useNumberFormatter } from "../hooks/useNumberFormatter"; -import { calculateAggregateValue, filterObjects, useHypothesis } from "../utils/microplanPreviewUtils"; - -export const HypothesisValues = memo(({ boundarySelections, hypothesisAssumptionsList, setHypothesisAssumptionsList, setToast, setModal, t }) => { - const [tempHypothesisList, setTempHypothesisList] = useState(hypothesisAssumptionsList || []); - const { valueChangeHandler } = useHypothesis(tempHypothesisList, hypothesisAssumptionsList); - const contentRef = useRef(null); - const [isScrollable, setIsScrollable] = useState(false); - - const applyNewHypothesis = () => { - if (tempHypothesisList.some((item) => item.active && (Number.isNaN(parseFloat(item.value)) || parseFloat(item.value) === 0))) { - setToast({ state: "error", message: t("ERROR_HYPOTHESIS_VALUE_SHOULD_NOT_BE_ZERO") }); - return; - } - if (Object.keys(boundarySelections).length !== 0 && Object.values(boundarySelections)?.every((item) => item?.length !== 0)) - return setToast({ state: "error", message: t("HYPOTHESIS_CAN_BE_ONLY_APPLIED_ON_ADMIN_LEVEL_ZORO") }); - setHypothesisAssumptionsList(tempHypothesisList); - }; - const checkScrollbar = () => { - if (contentRef.current) { - setIsScrollable(contentRef.current.scrollHeight > contentRef.current.clientHeight); - } - }; - - useEffect(() => { - // Initial check - checkScrollbar(); - - // Check on resize - window.addEventListener("resize", checkScrollbar); - - // Cleanup event listeners on component unmount - return () => { - window.removeEventListener("resize", checkScrollbar); - }; - }, []); - - useEffect(() => { - const content = contentRef.current; - content.addEventListener("scroll", checkScrollbar); - - return () => { - content.removeEventListener("scroll", checkScrollbar); - }; - }, [contentRef]); - - return ( -
-
- {tempHypothesisList - .filter((item) => item?.active) - ?.filter((item) => item.key !== "") - .map((item, index) => ( -
-

{t(item?.key)}

-
- {/* Dropdown for boundaries */} - - valueChangeHandler({ item, newValue: value?.target?.value }, setTempHypothesisList, boundarySelections, setToast, t) - } - disable={false} - /> -
-
- ))} -
-
-
-
- ); -}); - -export const BoundarySelection = memo(({ boundarySelections, setBoundarySelections, boundaryData, hierarchy, t }) => { - const [processedHierarchy, setProcessedHierarchy] = useState([]); - const [isLoading, setIsLoading] = useState(false); - const [changedBoundaryType, setChangedBoundaryType] = useState(""); - - // Filtering out dropdown values - useEffect(() => { - if (!boundaryData || !hierarchy) return; - - const processedHierarchyTemp = fetchDropdownValues( - boundaryData, - processedHierarchy.length !== 0 ? processedHierarchy : hierarchy, - boundarySelections, - changedBoundaryType - ); - setProcessedHierarchy(processedHierarchyTemp); - setIsLoading(false); - }, [boundaryData, hierarchy, boundarySelections]); - - return ( -
- {isLoading && } - {processedHierarchy?.map((item, index) => ( -
- {t(item?.boundaryType)} - {item?.parentBoundaryType === null ? ( - 5 ? { height: "13.75rem" } : {}} - type={"multiselectdropdown"} - t={t} - options={item?.dropDownOptions || []} - optionsKey="name" - addSelectAllCheck={true} - onSelect={(e) => { - setChangedBoundaryType(item?.boundaryType); - Digit.Utils.microplan.handleSelection( - e, - item?.boundaryType, - boundarySelections, - hierarchy, - setBoundarySelections, - boundaryData, - setIsLoading - ); - }} - /> - ) : ( - 5 ? { height: "13.75rem" } : {}} - type={"multiselectdropdown"} - t={t} - options={Digit.Utils.microplan.processDropdownForNestedMultiSelect(item?.dropDownOptions) || []} - optionsKey="name" - addSelectAllCheck={true} - onSelect={(e) => { - setChangedBoundaryType(item?.boundaryType); - Digit.Utils.microplan.handleSelection( - e, - item?.boundaryType, - boundarySelections, - hierarchy, - setBoundarySelections, - boundaryData, - setIsLoading - ); - }} - variant="nestedmultiselect" - /> - )} -
- ))} -
- ); -}); - -export const DataPreview = memo( - ({ previewData, isCampaignLoading, ishierarchyLoading, resources, userEditedResources, setUserEditedResources, modal, setModal, data, t }) => { - if (!previewData) return; - const [tempResourceChanges, setTempResourceChanges] = useState(userEditedResources); - const [selectedRow, setSelectedRow] = useState(); - const conmmonColumnIndex = useMemo(() => { - return previewData?.[0]?.indexOf(commonColumn); - }, [previewData]); - if (isCampaignLoading || ishierarchyLoading) { - return ( -
- -
- ); - } - - const rowClick = useCallback((rowIndex) => { - setSelectedRow(rowIndex); - setModal("change-preview-data"); - }, []); - - const finaliseRowDataChange = () => { - setUserEditedResources(tempResourceChanges); - setModal("none"); - setSelectedRow(undefined); - }; - - const modalCloseHandler = () => { - setModal("none"); - setSelectedRow(undefined); - }; - - return ( -
-
- - - - {previewData[0].map((header, columnIndex) => ( - - ))} - - - - {previewData.slice(1).map((rowData, rowIndex) => { - const rowDataList = Object.values(previewData[0]).map((header, cellIndex) => ( - - )); - return ( - { - rowClick(rowIndex + 1); - }} - // style={{...(userEditedResources?.[rowData?.[conmmonColumnIndex]] && Object.keys(userEditedResources?.[rowData?.[conmmonColumnIndex]]).length !==0 - // ? { borderL: "1px solid rgba(244, 119, 56, 0.12)" } - // : {}),}} - > - {rowDataList} - - ); - })} - -
- {t(header)} -
- {cellIndex === 0 && - userEditedResources?.[rowData?.[conmmonColumnIndex]] && - Object.keys(userEditedResources?.[rowData?.[conmmonColumnIndex]]).length !== 0 &&
} - - {rowData[cellIndex] || rowData[cellIndex] === 0 ? rowData[cellIndex] : t("NO_DATA")} -
-
- {modal === "change-preview-data" && ( -
- } - headerBarEnd={} - actionCancelLabel={t("CANCLE")} - actionCancelOnSubmit={modalCloseHandler} - actionSaveLabel={t("SAVE_CHANGES")} - actionSaveOnSubmit={finaliseRowDataChange} - formId="modal-action" - > - - -
- )} -
- ); - } -); - -export const AppplyChangedHypothesisConfirmation = ({ newhypothesisList, hypothesisList, t }) => { - const data = filterObjects(newhypothesisList, hypothesisList); - return ( -
-
-

{t("INSTRUCTION_PROCEED_WITH_NEW_HYPOTHESIS")}

-
- - {t("MICROPLAN_PREVIEW_HYPOTHESIS")} - -
- - - - - - - - - - {data?.map((row, index) => ( - - - - - - ))} - -
{t("KEYS")}{t("OLD_VALUE")}{t("NEW_VALUE")}
{t(row?.key)}{t(row?.oldValue)}{t(row?.value)}
-
-
- ); -}; - -export const EditResourceData = ({ previewData, selectedRow, resources, tempResourceChanges, setTempResourceChanges, data, t }) => { - const conmmonColumnData = useMemo(() => { - const index = previewData?.[0]?.indexOf(commonColumn); - if (index === -1) return; - return previewData?.[selectedRow]?.[index]; - }, [previewData]); - - const valueChangeHandler = (item, value) => { - if (!conmmonColumnData) return; - if (isNaN(value) || (!isFinite(value) && value !== "")) return; - let changedDataAgainstBoundaryCode = tempResourceChanges?.[conmmonColumnData] || {}; - changedDataAgainstBoundaryCode[item] = value === "" ? undefined : parseFloat(value); - setTempResourceChanges((previous) => ({ ...previous, [conmmonColumnData]: changedDataAgainstBoundaryCode })); - }; - - return ( -
- - - - - - - - - - {data[0].map((item) => { - let index = data?.[0]?.indexOf(item); - if (index === -1) return; - const currentData = data?.[selectedRow]?.[index]; - return ( - - - - - - ); - })} - {resources.map((item) => { - let index = previewData?.[0]?.indexOf(item); - if (index === -1) return; - const currentData = previewData?.[selectedRow]?.[index]; - - return ( - - - - - - ); - })} - -
{t("COLUMNS")}{t("OLD_VALUE")}{t("NEW_VALUE")}
-

{t(item)}

-
-

{currentData || t("NO_DATA")}

-
- -
-

{t(item)}

-
-

{currentData || t("NO_DATA")}

-
- valueChangeHandler(item, value.target.value)} - /> -
-
- ); -}; - -export const Aggregates = memo(({ microplanPreviewAggregates, dataToShow, NumberFormatMappingForTranslation, t }) => { - const { formatNumber } = useNumberFormatter(NumberFormatMappingForTranslation?.reduce((acc, obj) => Object.assign(acc, obj), {})); - - if (!microplanPreviewAggregates) return null; - return ( -
- {microplanPreviewAggregates.map((item, index) => { - const aggregate = calculateAggregateValue(item, dataToShow); - return ( -
-

{isNaN(parseInt(aggregate)) ? 0 : formatNumber(parseInt(aggregate))}

-

{typeof item === "object" && item.name ? t(item.name) : t(item)}

-
- ); - })} -
- ); -}); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanningCard.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanningCard.js deleted file mode 100644 index 9a1dd8f5500..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanningCard.js +++ /dev/null @@ -1,34 +0,0 @@ -import { EmployeeModuleCard, WorksMgmtIcon } from "@egovernments/digit-ui-react-components"; -import React from "react"; -import { useTranslation } from "react-i18next"; - -const ROLES = { - MICROPLAN: ["MICROPLAN_ADMIN"], -}; - -const MicroplanningCard = () => { - const { t } = useTranslation(); - const tenantId = Digit.ULBService.getCurrentTenantId(); - - const generateLink = (labelKey, pathSuffix) => { - return { - label: t(labelKey), - link: `/${window?.contextPath}/employee/microplanning/${pathSuffix}`, - roles: ROLES.MICROPLAN, - }; - }; - - let links = [generateLink("CREATE_NEW_MICROPLAN", "select-campaign"), generateLink("OPEN_SAVED_MICROPLANS", "saved-microplans")]; - - links = links.filter((link) => (link?.roles && link?.roles?.length > 0 ? Digit.Utils.didEmployeeHasAtleastOneRole(link?.roles) : true)); - - const propsForModuleCard = { - Icon: , - moduleName: t("Microplanning"), - kpis: [], - links: links, - }; - return ; -}; - -export default MicroplanningCard; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanningHeader.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanningHeader.js deleted file mode 100644 index 2a35e9c0995..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanningHeader.js +++ /dev/null @@ -1,29 +0,0 @@ -import { Help, Tutorial, useTourState } from "@egovernments/digit-ui-react-components"; -import React, { Fragment } from "react"; -import { useTranslation } from "react-i18next"; -import { useLocation } from "react-router-dom"; -import { useMyContext } from "../utils/context"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; - -const MicroplanningHeader = () => { - const { tourState, setTourState } = useTourState(); - const { state } = useMyContext(); - const { t } = useTranslation(); - //using location.pathname we can update the stepIndex accordingly when help is clicked from any other screen(other than home screen) - const { pathname } = useLocation(); - - const startTour = () => { - if (state?.tourStateData) setTourState(state.tourStateData); - }; - - return ( - <> - -
- -
- - ); -}; - -export default MicroplanningHeader; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Modal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Modal.js deleted file mode 100644 index 0792ee2e52d..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Modal.js +++ /dev/null @@ -1,158 +0,0 @@ -import React, { useEffect } from "react"; -import { PopUp, HeaderBar, Toast, CloseButton, ButtonSelector } from "@egovernments/digit-ui-react-components"; -import { Close } from "@egovernments/digit-ui-svg-components"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; - -const Modal = ({ - headerBarMain, - headerBarEnd, - popupStyles, - children = {}, - actionCancelLabel, - actionCancelOnSubmit, - actionSaveLabel, - actionSaveOnSubmit, - error, - setError, - formId, - isDisabled, - hideSubmit, - style = {}, - footerLeftButtonstyle = {}, - footerRightButtonstyle = {}, - footerLeftButtonBody, - footerRightButtonBody, - popupModuleMianStyles, - headerBarMainStyle, - isOBPSFlow = false, - popupModuleActionBarStyles = {}, -}) => { - /** - * TODO: It needs to be done from the desgin changes - */ - const mobileView = Digit.Utils.browser.isMobile(); - useEffect(() => { - document.body.style.overflowY = "hidden"; - return () => { - document.body.style.overflowY = "auto"; - }; - }, []); - - return ( - -
- -
- {children} -
- {actionCancelLabel || footerLeftButtonBody ? ( - 0 ? style : footerLeftButtonstyle} - /> - ) : null} - {!hideSubmit ? ( - 0 ? style : footerRightButtonstyle} - /> - ) : null} -
-
-
- {error && setError(null)} type="error" />} -
- ); -}; - -const moduleActionBarStyle = (isOBPSFlow, popupModuleActionBarStyles) => { - return isOBPSFlow - ? !mobileView - ? { marginRight: "18px" } - : { position: "absolute", bottom: "5%", right: "10%", left: window.location.href.includes("employee") ? "0%" : "7%" } - : popupModuleActionBarStyles; -}; - -// Wrapper for modal -export const ModalWrapper = ({ - closeModal, - LeftButtonHandler, - RightButtonHandler, - footerLeftButtonBody, - footerRightButtonBody, - header, - bodyText, - body, - popupStyles, - headerBarMainStyle, - popupModuleActionBarStyles, - hideSubmit, - closeButton = false, - actionCancelLabel, -}) => { - return ( - - {" "} - - - ) : ( - "" - ) - } - actionCancelOnSubmit={LeftButtonHandler} - actionSaveOnSubmit={RightButtonHandler} - formId="microplanning" - popupStyles={{ width: "33.375rem", borderRadius: "0.25rem", ...(popupStyles ? popupStyles : {}) }} - headerBarMainStyle={{ margin: 0, width: "33.375rem", overflow: "hidden", ...(headerBarMainStyle ? headerBarMainStyle : {}) }} - popupModuleMianStyles={{ margin: 0, padding: 0 }} - popupModuleActionBarStyles={popupModuleActionBarStyles ? popupModuleActionBarStyles : { justifyContent: "space-between", padding: "1rem" }} - style={{}} - hideSubmit={hideSubmit ? hideSubmit : false} - footerLeftButtonstyle={{ - padding: 0, - alignSelf: "flex-start", - height: "fit-content", - textStyles: { fontWeight: "600" }, - backgroundColor: "rgba(255, 255, 255, 1)", - color: PRIMARY_THEME_COLOR, - minWidth: "15.063rem", - border: `0.063rem solid ${PRIMARY_THEME_COLOR}`, - }} - footerRightButtonstyle={{ - padding: 0, - alignSelf: "flex-end", - height: "fit-content", - textStyles: { fontWeight: "500" }, - backgroundColor: PRIMARY_THEME_COLOR, - color: "rgba(255, 255, 255, 1)", - minWidth: "15.063rem", - boxShadow: "0px -2px 0px 0px rgba(11, 12, 12, 1) inset", - }} - footerLeftButtonBody={footerLeftButtonBody} - footerRightButtonBody={footerRightButtonBody} - actionCancelLabel={actionCancelLabel} - > - {bodyText && ( -
-

{bodyText}

-
- )} - {body ? body : ""} -
- ); -}; - -export default Modal; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Nagivator.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Nagivator.js deleted file mode 100644 index 06d04ef2296..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Nagivator.js +++ /dev/null @@ -1,272 +0,0 @@ -import { ActionBar, Stepper, Toast } from "@egovernments/digit-ui-components"; -import PropTypes from "prop-types"; -import React, { useState, useEffect, useCallback } from "react"; -import { useTranslation } from "react-i18next"; -import { Button } from "@egovernments/digit-ui-react-components"; -import { ArrowBack, ArrowForward } from "@egovernments/digit-ui-svg-components"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; -import { memo } from "react"; - -/** - * - * @param { config: Object, checkDataCompleteness: boolean, components: Object, childProps: Object, stepNavigationActive: boolean, nextEventAddon: function, setCurrentPageExternally: function, completeNavigation } props - * @returns - * - */ -// Main component for creating a microplan -const Navigator = memo((props) => { - // States - const [currentPage, setCurrentPage] = useState(); - // const [toast, setToast] = useState(); - const [navigationEvent, setNavigationEvent] = useState(); - const [activeSteps, setActiveSteps] = useState(Digit.SessionStorage.get("microplanHelperData")?.activeSteps || -1); - /** - * checkDataCompletion - * "true": check for data completeness - * "false": do nothing - * "valid": data is present - * "invalid": whole or a part of the data is missing - * "perform-action": move to the respective step ( had to add this as mutate addons need some buffer time) - */ - const [checkDataCompletion, setCheckDataCompletion] = useState("false"); - - const { t } = useTranslation(); - - // Effect to set initial current page when timeline options change - useEffect(() => { - if (!props.config || props.config.length === 0) return; - let response; - if (props.setCurrentPageExternally) { - response = props.setCurrentPageExternally({ setCurrentPage, method: "set" }); - } - if (!response) setCurrentPage(props.config[0]); - }, [props.config]); - - // Might need it later - // Effect to handle data completion validation and show toast - useEffect(() => { - if (checkDataCompletion === "invalid") { - if (navigationEvent && navigationEvent.name === "next") { - props?.setToast({ state: "error", message: t("MICROPLAN_PLEASE_FILL_ALL_THE_FIELDS_AND_RESOLVE_ALL_THE_ERRORS") }); - } else if (navigationEvent && navigationEvent.name === "step" && navigationEvent.step !== undefined) { - if (navigationEvent.step > currentPage.id) - props?.setToast({ state: "error", message: t("MICROPLAN_PLEASE_FILL_ALL_THE_FIELDS_AND_RESOLVE_ALL_THE_ERRORS") }); - else onStepClick(navigationEvent.step); - } else if (navigationEvent && navigationEvent.name === "previousStep") previousStep(); - setCheckDataCompletion("false"); - } - }, [checkDataCompletion]); - - // Effect to handle navigation events and transition between steps - useEffect(() => { - // if (checkDataCompletion !== "valid" || navigationEvent === undefined) return; - if ( - checkDataCompletion === "valid" && - ((navigationEvent.step && currentPage.id + 1 === navigationEvent.step) || currentPage.id > navigationEvent.step || !navigationEvent.step) - ) { - if (typeof props.nextEventAddon === "function") { - if (LoadCustomComponent({ component: props.components[currentPage?.component] }) !== null) - props.nextEventAddon(currentPage, checkDataCompletion, setCheckDataCompletion); - else props.nextEventAddon(currentPage, true, setCheckDataCompletion); - } else { - setCheckDataCompletion("perform-action"); - } - } - }, [navigationEvent, checkDataCompletion, props.nextEventAddon]); - - useEffect(() => { - handleNavigationEvent( - checkDataCompletion, - navigationEvent, - currentPage, - setCheckDataCompletion, - setNavigationEvent, - onStepClick, - nextStep, - previousStep, - props - ); - }, [checkDataCompletion, navigationEvent]); - - // Function to navigate to the next step - const nextStep = useCallback(() => { - if (!currentPage) return; - changeCurrentPage(props.config[currentPage?.id + 1]); - if (currentPage?.id + 1 > props.config.length - 1) return; - setCurrentPage((previous) => props.config[previous?.id + 1]); - }, [currentPage]); - - // Function to navigate to the previous step - const previousStep = useCallback(() => { - changeCurrentPage(props.config[currentPage?.id - 1]); - setCurrentPage((previous) => props.config[previous?.id - 1]); - }, [currentPage]); - - // Function to handle step click and navigate to the selected step - const onStepClick = useCallback((index) => { - const newCurrentPage = props.config.find((item) => item.id === index); - changeCurrentPage(newCurrentPage); - setCurrentPage(newCurrentPage); - }); - - // Function to handle next button click - const previousbuttonClickHandler = useCallback(() => { - if ( - (props.checkDataCompleteness && - props?.config[currentPage?.id]?.checkForCompleteness && - LoadCustomComponent({ component: props.components[currentPage?.component] }) !== null) || - currentPage?.id === props.config[props.config.length - 1].id - ) { - setNavigationEvent({ name: "previousStep" }); - setCheckDataCompletion("true"); - } else previousStep(); - }, [props.checkDataCompleteness, previousStep, setNavigationEvent]); - - // Function to handle next button click - const nextbuttonClickHandler = useCallback(() => { - if ( - props.checkDataCompleteness && - props?.config[currentPage?.id]?.checkForCompleteness && - LoadCustomComponent({ component: props.components[currentPage?.component] }) !== null - ) { - setCheckDataCompletion("true"); - setNavigationEvent({ name: "next" }); - } else nextStep(); - }, [props.checkDataCompleteness, nextStep, setNavigationEvent]); - - // Function to handle step click - const stepClickHandler = useCallback( - (index) => { - if (index === currentPage?.id) return; - if (!props.stepNavigationActive) return; - if ( - (props.checkDataCompleteness && - props?.config[currentPage?.id]?.checkForCompleteness && - LoadCustomComponent({ component: props.components[currentPage?.component] }) !== null) || - currentPage?.id === props.config[props.config.length - 1].id - ) { - setCheckDataCompletion("true"); - setNavigationEvent({ name: "step", step: index }); - } else { - onStepClick(index); - } - }, - [props.checkDataCompleteness, props.stepNavigationActive, onStepClick] - ); - - // Function to set current page - const changeCurrentPage = (newPage) => { - if (props.setCurrentPageExternally) { - props.setCurrentPageExternally({ currentPage: newPage, method: "save" }); - } - }; - - const completeNavigation = () => { - setNavigationEvent({ name: "next" }); - setCheckDataCompletion("true"); - }; - - // changing active state - useEffect(() => { - if (currentPage?.id > activeSteps) { - setActiveSteps(currentPage?.id); - Digit.SessionStorage.set("microplanHelperData", { ...(Digit.SessionStorage.get("microplanHelperData") || {}), activeSteps: currentPage?.id }); - } - }, [currentPage]); - - return ( -
- {/* Stepper component */} - t(item.name))} - direction="horizontal" - activeSteps={activeSteps >= 0 ? activeSteps + 1 : null} - onStepClick={stepClickHandler} - /> - - {/* Load custom component based on current page */} - {props?.components[currentPage?.component] ? ( - LoadCustomComponent({ component: props.components[currentPage?.component] }) !== null ? ( - - ) : ( -
{t("COMMON_DATA_NOT_PRESENT")}
- ) - ) : ( - "" - )} - - {/* Action bar */} - - {/* Back button */} - {currentPage?.id > 0 && ( - - -
- ); -}); - -// Component to load custom component based on current page -const LoadCustomComponent = (props) => { - if (props && !props.component) return null; - const secondaryProps = props.secondaryProps; - return ; -}; -LoadCustomComponent.propTypes = { - component: PropTypes.elementType.isRequired, - secondaryProps: PropTypes.object, -}; - -const handleNavigationEvent = ( - checkDataCompletion, - navigationEvent, - currentPage, - setCheckDataCompletion, - setNavigationEvent, - onStepClick, - nextStep, - previousStep, - props -) => { - if (checkDataCompletion === "perform-action") { - if (navigationEvent && navigationEvent.name === "next") { - if (currentPage?.id === props.config.length - 1 && typeof props?.completeNavigation === "function") { - return props?.completeNavigation(); - } - nextStep(); - } else if (navigationEvent && navigationEvent.name === "step" && navigationEvent.step !== undefined) onStepClick(navigationEvent.step); - else if (navigationEvent && navigationEvent.name === "previousStep") previousStep(); - setCheckDataCompletion("false"); - setNavigationEvent(undefined); - } -}; - -export default Navigator; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/RuleEngine.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/RuleEngine.js deleted file mode 100644 index 7ece3cce04d..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/RuleEngine.js +++ /dev/null @@ -1,876 +0,0 @@ -import React, { useState, useEffect, useCallback, Fragment, useRef } from "react"; -import { useTranslation } from "react-i18next"; -import { Info, Trash } from "@egovernments/digit-ui-svg-components"; -import { ModalHeading } from "./CommonComponents"; -import { Button, Modal } from "@egovernments/digit-ui-react-components"; -import { Dropdown, InfoCard, Toast } from "@egovernments/digit-ui-components"; -import { tourSteps } from "../configs/tourSteps"; -import { useMyContext } from "../utils/context"; -import { v4 as uuidv4 } from "uuid"; -import { PlusWithSurroundingCircle } from "../icons/Svg"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; - -const page = "ruleEngine"; - -const RuleEngine = ({ - campaignType = Digit.SessionStorage.get("microplanHelperData")?.campaignData?.projectType, - microplanData, - setMicroplanData, - checkDataCompletion, - setCheckDataCompletion, - currentPage, - pages, - setToast, -}) => { - const { t } = useTranslation(); - - // States - const [editable, setEditable] = useState(true); - const [modal, setModalState] = useState("none"); - const [rules, setRules] = useState([]); - const [hypothesisAssumptionsList, setHypothesisAssumptionsList] = useState([]); - const [itemForDeletion, setItemForDeletion] = useState(); - const [exampleOption, setExampleOption] = useState(""); - const [inputs, setInputs] = useState([]); - const [outputs, setOutputs] = useState([]); - const [operators, setOperators] = useState([]); - const [validationSchemas, setValidationSchemas] = useState([]); - const [autofillData, setAutoFillData] = useState([]); - const { state, dispatch } = useMyContext(); - const [originalRuleOutputCount, setOriginalRuleOutputCount] = useState(0); - // const [toast, setToast] = useState(); - const [pureInputList, setPureInputList] = useState([]); - // Set TourSteps - useEffect(() => { - const tourData = tourSteps(t)?.[page] || {}; - if (state?.tourStateData?.name === page) return; - dispatch({ - type: "SETINITDATA", - state: { tourStateData: tourData }, - }); - }, []); - - const setModal = (modalString) => { - const elements = document.querySelectorAll(".popup-wrap-rest-unfocus"); - elements.forEach((element) => { - element.classList.toggle("popup-wrap-rest-unfocus-active"); - }); - setModalState(modalString); - }; - - // UseEffect to extract data on first render - useEffect(() => { - if (pages) { - const previouspage = pages[currentPage?.id - 1]; - if (previouspage?.checkForCompleteness && !microplanData?.status?.[previouspage?.name]) setEditable(false); - else setEditable(true); - } - }, []); - - // UseEffect for checking completeness of data before moveing to next section - useEffect(() => { - if (!rules || checkDataCompletion !== "true" || !setCheckDataCompletion) return; - // uncomment to activate data change save check - // if (!microplanData?.ruleEngine || !_.isEqual(rules, microplanData.ruleEngine)) setModal("data-change-check"); - // else - updateData(true); - }, [checkDataCompletion]); - - // UseEffect to store current data - useEffect(() => { - if (!rules || !setMicroplanData) return; - setMicroplanData((previous) => ({ ...previous, ruleEngine: rules })); - }, [rules]); - - // UseEffect to add a event listener for keyboard - useEffect(() => { - window.addEventListener("keydown", handleKeyPress); - - return () => window.removeEventListener("keydown", handleKeyPress); - }, [modal]); - - const handleKeyPress = (event) => { - // if (modal !== "upload-guidelines") return; - if (["x", "Escape"].includes(event.key)) { - // Perform the desired action when "x" or "esc" is pressed - // if (modal === "upload-guidelines") - setCheckDataCompletion("false"); - setModal("none"); - } - }; - - // check if data has changed or not - const updateData = useCallback( - (check) => { - if (!rules || !setMicroplanData) return; - if (check) { - setMicroplanData((previous) => ({ ...previous, ruleEngine: rules })); - const activeRules = rules.filter((item) => item.active); - const isValid = activeRules.every((item) => Object.values(item).every((data) => data !== "")) && activeRules.length !== 0; - if (isValid) setCheckDataCompletion("valid"); - else setCheckDataCompletion("invalid"); - } else { - let isValid = microplanData?.ruleEngine?.every((item) => Object.values(item).every((data) => data !== "")); - isValid = isValid && rules.length !== 0; - if (isValid) setCheckDataCompletion("valid"); - else setCheckDataCompletion("invalid"); - } - }, - [rules, setMicroplanData, microplanData, setCheckDataCompletion] - ); - - const cancelUpdateData = useCallback(() => { - setCheckDataCompletion(false); - setModal("none"); - }, [setCheckDataCompletion, setModal]); - - // useEffect to initialise the data from MDMS - useEffect(() => { - if (!state) return; - const schemas = state?.Schemas; - const hypothesisAssumptions = []; - microplanData?.hypothesis?.filter((item) => item.active).forEach((item) => (item.key !== "" ? hypothesisAssumptions.push(item.key) : null)); - const ruleConfigureOutput = state?.RuleConfigureOutput; - const UIConfiguration = state?.UIConfiguration; - const ruleConfigureInputs = getRuleConfigInputsFromSchema(campaignType, microplanData, schemas) || []; - let AutoFilledRuleConfigurationsList = state?.AutoFilledRuleConfigurations; - AutoFilledRuleConfigurationsList = AutoFilledRuleConfigurationsList.find((item) => item.campaignType === campaignType)?.data; - microplanData?.ruleEngine?.forEach((item) => { - if (Object.values(item).every((e) => e !== "")) ruleConfigureInputs.push(item?.output); - }); - if (schemas) setValidationSchemas(schemas); - - let temp; - setHypothesisAssumptionsList(hypothesisAssumptions); - let outputs; - if (ruleConfigureOutput) temp = ruleConfigureOutput?.find((item) => item.campaignType === campaignType); - if (temp?.data) { - let data = temp.data; - setOriginalRuleOutputCount(data.length); - microplanData?.ruleEngine?.forEach((item) => { - if (item.active) { - const filteredData = data.filter((e) => e !== item?.output); - data = filteredData; - } - }); - outputs = data; - setOutputs(data); - } - - if (ruleConfigureInputs) setInputs(ruleConfigureInputs); - let operator; - if (UIConfiguration) temp = UIConfiguration.find((item) => item.name === "ruleConfigure"); - if (temp?.ruleConfigureOperators) { - temp = temp.ruleConfigureOperators.map((item) => item.name); - operator = temp; - setOperators(temp); - } - // if (AutoFilledRuleConfigurationsList) setAutoFillData(AutoFilledRuleConfigurationsList); - // Pure inputs - output not there - const pureInputs = getRuleConfigInputsFromSchema(campaignType, microplanData, schemas); - setPureInputList(pureInputs); - - const ssnRuleOutputs = microplanData?.ruleEngine?.reduce((acc, item) => { - if (item?.active && item?.output) acc.push(item?.output); - return acc; - }, []); - const tempOutput = [...outputs, ...(ssnRuleOutputs ? ssnRuleOutputs : [])]; - setExampleOption({ - output: tempOutput.length ? tempOutput[0] : "", - input: pureInputs.length ? pureInputs[0] : "", - operator: operator.length ? operator[0] : "", - assumptionValue: hypothesisAssumptions.length ? hypothesisAssumptions[0] : "", - }); - - let filteredRules = []; - let response; - if (microplanData?.ruleEngine && microplanData?.hypothesis) { - const hypothesisAssumptions = microplanData?.hypothesis?.filter((item) => item.active && item.key !== "").map((item) => item.key) || []; - if (hypothesisAssumptions.length !== 0) { - setHypothesisAssumptionsList(hypothesisAssumptions); - response = filterRulesAsPerConstrains( - microplanData.ruleEngine, - [], - hypothesisAssumptions, - tempOutput, - operator, - pureInputs, - setInputs, - setOutputs, - false - ); - filteredRules = response?.rules; - - // setRuleEngineDataFromSsn(microplanData.ruleEngine, hypothesisAssumptions, setRules); - } - } - if (response?.rulesDeleted) - setToast({ - state: "warning", - message: t("WARNING_RULES_DELETED_DUE_TO_PRIOR_SECTION_DATA_CHANGES"), - }); - if (!AutoFilledRuleConfigurationsList || !outputs || !hypothesisAssumptions || !schemas) return; - - response = filterRulesAsPerConstrains( - AutoFilledRuleConfigurationsList, - filteredRules, - hypothesisAssumptions, - outputs, - operator, - pureInputs, - setInputs, - setOutputs, - true - ); - - if (response?.rules) setRules(response?.rules); - }, []); - - const closeModal = useCallback(() => { - setModal("none"); - }, [setModal]); - - // Function to Delete an assumption - const deleteAssumptionHandlerCallback = useCallback(() => { - deleteAssumptionHandler(itemForDeletion, setItemForDeletion, setRules, setOutputs, setInputs, pureInputList); - closeModal(); - }, [itemForDeletion, deleteAssumptionHandler, setItemForDeletion, setRules, setOutputs, setInputs, closeModal, pureInputList]); - - const sectionClass = `jk-header-btn-wrapper rule-engine-section ${editable ? "" : "non-editable-component"} popup-wrap-rest-unfocus`; - return ( - <> -
-
-
- {/* NonInterractable Section */} - - {/* Interractable Section that includes the example as well as the rules */} - -
- -
-
- {/* delete conformation */} -
- {modal === "delete-conformation" && ( - } - actionCancelLabel={t("YES")} - actionCancelOnSubmit={deleteAssumptionHandlerCallback} - actionSaveLabel={t("NO")} - actionSaveOnSubmit={closeModal} - > -
-

{t("RULE_ENGINE_INSTRUCTIONS_DELETE_ENTRY_CONFIRMATION")}

-
-
- )} -
- - ); -}; - -// Function to add a new assumption -const addRulesHandler = (setRules) => { - const uuid = uuidv4(); - setRules((previous) => [ - ...previous, - { - id: uuid, - // previous.length ? previous[previous.length - 1].id + 1 : 0, - output: "", - input: "", - operator: "", - assumptionValue: "", - active: true, - }, - ]); -}; - -// Defination for NonInterractable Section -const NonInterractableSection = React.memo(({ t }) => { - return ( -
-

{t("HEADING_RULE_ENGINE")}

-

{t("INSTRUCTION_RULE_ENGINE")}

-
- ); -}); - -// Defination for NonInterractable Section -const InterractableSection = React.memo( - ({ - rules, - setRules, - hypothesisAssumptionsList, - setHypothesisAssumptionsList, - setModal, - setItemForDeletion, - exampleOption, - inputs, - outputs, - operators, - setInputs, - setOutputs, - setOperators, - pureInputList, - t, - }) => { - // References to the items in the list - const itemRefs = useRef([]); - // State to keep track of the currently expanded item index - const [expandedIndex, setExpandedIndex] = useState(null); - // Reference to the scroll container - const scrollContainerRef = useRef(null); - // State to track the render cycle count - const [renderCycle, setRenderCycle] = useState(0); - - // Effect to reset the render cycle count whenever the expandedIndex changes - useEffect(() => { - if (expandedIndex !== null) { - setRenderCycle(0); - } - }, [expandedIndex]); - - // Effect to handle scrolling to the expanded item after the DOM has updated - useEffect(() => { - if (renderCycle < 3) { - // Increment render cycle count to ensure multiple render checks - setRenderCycle((prev) => prev + 1); - } else if (expandedIndex !== null && itemRefs.current[expandedIndex]) { - try { - const parentElement = itemRefs.current[expandedIndex]; - const childElement = itemRefs.current[expandedIndex].children[1]; - - if (parentElement) { - const scrollContainer = scrollContainerRef.current; - const parentRect = parentElement.getBoundingClientRect(); - const containerRect = scrollContainer.getBoundingClientRect(); - - // Calculate the offset from the top of the container - const offset = parentRect.top - containerRect.top; - - // Scroll the container to the target position - scrollContainer.scrollTo({ - top: scrollContainer.scrollTop + offset - 100, - behavior: "smooth", - }); - } - - if (childElement) { - // Focus the child element if it exists - childElement.focus(); - } - } catch (error) { - console.error("Error scrolling to element:", error); - } - } - }, [renderCycle, expandedIndex]); - - // Effect to observe DOM changes in the expanded item and trigger render cycle - useEffect(() => { - if (expandedIndex !== null) { - const observer = new MutationObserver(() => { - setRenderCycle((prev) => prev + 1); - }); - - if (itemRefs.current[expandedIndex]) { - observer.observe(itemRefs.current[expandedIndex], { childList: true, subtree: true }); - } - - return () => observer.disconnect(); - } - }, [expandedIndex]); - - // Function to toggle the expanded state of an item - const toggleExpand = (index) => { - setExpandedIndex(index === expandedIndex ? null : index); - }; - - // Handler for deleting an assumption on conformation - const deleteHandler = useCallback( - (item) => { - setModal("delete-conformation"); - setItemForDeletion(item); - }, - [setModal, setItemForDeletion] - ); - - return ( -
- -
-
-
-

{t("VALUE")}

-
-
=
-
-

{t("RULE_ENGINE_INPUT")}

-
-
-

{t("RULE_ENGINE_OPERATOR")}

-
-
-

{t("KEY")}

-
-
- -
-
- {rules - .filter((item) => item.active) - .map((item, index) => ( -
{ - itemRefs.current[index] = el; - }} - onClick={() => toggleExpand(index)} - > -
- -
-
- -
-
- -
-
- ))} -
-
- ); - } -); - -const Example = ({ exampleOption, t }) => { - return ( -
-
-

{t("EXAMPLE")}

-
-
-

{t("VALUE")}

- -

{t("RULE_ENGINE_VALUE_HELP_TEXT")}

-
- -
-

{"="}

- -
=
-

{"="}

-
- -
-

{t("RULE_ENGINE_INPUT")}

- -

{t("RULE_ENGINE_INPUT_HELP_TEXT")}

-
-
-

{t("RULE_ENGINE_OPERATOR")}

- -

{t("RULE_ENGINE_OPERATOR_HELP_TEXT")}

-
-
-

{t("KEY")}

- -

{t("RULE_ENGINE_KEY_HELP_TEXT")}

-
-
-
-
- -
-
- ); -}; - -const deleteAssumptionHandler = (item, setItemForDeletion, setRules, setOutputs, setInputs, pureInputList) => { - try { - const outputToRemove = []; - setRules((previous) => { - if (!previous.length) return []; - const deletionElementIndex = previous.findIndex((data) => data.id === item.id); - const filteredData = previous.map((data, index) => (index === deletionElementIndex ? { ...data, active: false } : data)); - const newRules = filteredData.reduce((acc, dataItem, index) => { - if (dataItem.active) { - const possibleOutputs = acc.reduce((reducedData, element, index) => { - if (element.active && !Object.values(element).some((e) => e === "")) reducedData.push(element?.output); - return reducedData; - }, []); - possibleOutputs.push(...pureInputList); - if (!possibleOutputs.includes(dataItem?.input)) { - if (dataItem?.output !== "") outputToRemove.push(dataItem.output); - acc.push({ ...dataItem, input: "", oldInput: dataItem?.input ? dataItem?.input : dataItem?.oldInput }); - } else { - acc.push(dataItem); - } - } else { - acc.push(dataItem); - } - return acc; - }, []); - - return newRules || []; - }); - if (item?.output) { - setOutputs((previous) => { - if (!previous?.includes(item.output)) return previous ? [...previous, item.output] : [item.output]; - }); - setInputs((previous) => { - return previous?.filter((e) => e !== item.output && !outputToRemove.includes(e)); - }); - } - setItemForDeletion(); - } catch (error) { - console.error("Error while deleting a rule: ", error.message); - } -}; - -const Select = React.memo( - ({ item, rules, setRules, disabled = false, options, setOptions, toChange, unique, setInputs, outputs, pureInputList, t }) => { - const [selected, setSelected] = useState(""); - const [filteredOptions, setFilteredOptions] = useState([]); - - useEffect(() => { - if (item) { - if (outputs?.some((e) => e === item.input)) { - if (rules.filter((item) => item.active).some((e) => e?.output === item?.input)) setSelected({ code: item?.[toChange] }); - } else setSelected({ code: item[toChange] }); - } - }, [item]); - - useEffect(() => { - if (!options) return; - const filteredOptions = options.length ? options : []; - let filteredOptionPlaceHolder = []; - if (item?.[toChange] && !filteredOptions.includes(item[toChange])) { - filteredOptionPlaceHolder = [item[toChange], ...filteredOptions]; - } else filteredOptionPlaceHolder = filteredOptions; - - if (toChange === "input") { - const currentRuleIndex = rules.findIndex((e) => e?.id === item?.id); - filteredOptionPlaceHolder = filteredOptionPlaceHolder.filter((data) => { - let priorOutputs = []; - if (currentRuleIndex !== -1) { - priorOutputs = rules.reduce((acc, item, index) => { - if (item.active && index < currentRuleIndex) acc.push(item?.output); - return acc; - }, []); - } - priorOutputs.push(...pureInputList); - return data !== item.output && priorOutputs.includes(data); - }); - } - setFilteredOptions(filteredOptionPlaceHolder); - }, [options]); - - const selectChangeHandler = useCallback( - (e) => { - if (e.code === "SELECT_OPTION") return; - const existingEntry = rules.find((item) => item.active && item[toChange] === e.code); - if (existingEntry && unique) { - console.error("Attempted to add a duplicate entry where uniqueness is required."); - return; - } - const newDataSegment = { ...item }; - newDataSegment[toChange] = e.code; - setRules((previous) => { - const filteredAssumptionsList = previous.map((data) => { - if (data.id === item.id) return newDataSegment; - return data; - }); - return filteredAssumptionsList; - }); - if (typeof setInputs === "function") { - setInputs((previous) => { - let temp = _.cloneDeep(previous); - if (toChange === "output") { - temp = temp.filter((item) => item !== selected?.code); - } - if (!temp.includes(newDataSegment.output) && Object.values(newDataSegment).every((item) => item !== "")) - temp = [...temp, newDataSegment.output]; - - const currentRuleIndex = rules.findIndex((e) => e?.id === item?.id); - temp = temp.filter((data) => { - let priorOutputs = []; - if (currentRuleIndex !== -1) { - priorOutputs = rules.reduce((acc, item, index) => { - if (index < currentRuleIndex) acc.push(item?.output); - return acc; - }, []); - } - priorOutputs.push(...pureInputList); - return data !== item.output && priorOutputs.includes(data); - }); - return temp; - }); - } - if (unique) - setOptions((previous) => { - const newOptions = previous.filter((item) => item !== e.code); - if (selected?.code && !newOptions.includes(selected?.code)) newOptions.unshift(selected?.code); - return newOptions; - }); - }, - [rules, item, selected, setRules, setOptions, setInputs] - ); - - return ( - ({ code: item }))} - selected={selected} - select={selectChangeHandler} - optionKey="code" - placeholder={t("SELECT_OPTION")} - showToolTip={true} - /> - ); - } -); - -// get schema for validation -const getRuleConfigInputsFromSchema = (campaignType, microplanData, schemas) => { - if (!schemas || !microplanData || !microplanData?.upload || !campaignType) return []; - const sortData = []; - if (!schemas) return; - for (const value of microplanData?.upload?.filter((value) => value?.active && value?.error === null) || []) { - sortData.push({ section: value?.section, fileType: value?.fileType }); - } - const filteredSchemas = - schemas?.filter((schema) => { - if (schema.campaignType) { - return schema.campaignType === campaignType && sortData.some((entry) => entry.section === schema.section && entry.fileType === schema.type); - } - return sortData.some((entry) => entry.section === schema.section && entry.fileType === schema.type); - }) || []; - const finalData = filteredSchemas - ?.flatMap((item) => - Object.entries(item?.schema?.Properties || {}).reduce((acc, [key, value]) => { - if (value?.isRuleConfigureInputs) { - acc.push(key); - } - return acc; - }, []) - ) - .filter((item) => !!item); - return [...new Set(finalData)]; -}; - -// This function adding the rules configures in MDMS with respect to the canpaign when rule section is empty -const filterRulesAsPerConstrains = (autofillData, rules, hypothesisAssumptionsList, outputs, operators, inputs, setInputs, setOutputs, autofill) => { - if (rules && rules.filter((item) => item.active).length !== 0) return { rules }; - - let wereRulesNotDeleted = true; - const newRules = []; - const ruleOuputList = rules ? rules.filter((item) => item.active).map((item) => item?.output) : []; - let rulePlusInputs; - if (ruleOuputList) rulePlusInputs = [...inputs, ...ruleOuputList]; - else rulePlusInputs = inputs; - for (const item of autofillData) { - let active = !(item && item.active === false); - const ruleNotCompleteCheck = (!autofill && item && Object.values(item).filter((e) => e === "").length === 0) || autofill; - if ( - (ruleOuputList?.includes(item?.output) || - (outputs && !outputs.includes(item?.output)) || - (rulePlusInputs && !rulePlusInputs.includes(item?.input)) || - (operators && !operators.includes(item?.operator)) || - (hypothesisAssumptionsList && !hypothesisAssumptionsList.includes(item?.assumptionValue)) || - !outputs || - !rulePlusInputs || - !operators || - !hypothesisAssumptionsList) && - ruleNotCompleteCheck - ) { - if (autofill) { - continue; - } - if (active) { - wereRulesNotDeleted = false; - active = false; - } - } - if (!item["id"]) { - const uuid = uuidv4(); - item["id"] = uuid; - } - item.active = active; - newRules.push(item); - if (active && ruleNotCompleteCheck) { - rulePlusInputs?.push(item?.output); - ruleOuputList?.push(item?.output); - } - } - if (newRules.length !== 0) { - let newOutputs = []; - outputs.forEach((e) => { - if (!ruleOuputList.includes(e)) { - newOutputs.push(e); - } - }); - setOutputs(newOutputs); - setInputs(rulePlusInputs); - // setRules((previous) => [...previous, ...newRules]); - } - - return { rules: [...(rules ? rules : []), ...newRules], rulesDeleted: !autofill && !wereRulesNotDeleted }; -}; - -export default RuleEngine; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js deleted file mode 100644 index e6309dd74f3..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js +++ /dev/null @@ -1,1137 +0,0 @@ -import React, { useState, useEffect, useMemo, Fragment, useCallback } from "react"; -import { useTranslation } from "react-i18next"; -import { LoaderWithGap, Modal } from "@egovernments/digit-ui-react-components"; -import { ModalWrapper } from "./Modal"; -import { geojsonPropertiesValidation } from "../utils/geojsonValidations"; -import { SpatialDataPropertyMapping } from "./resourceMapping"; -import { JsonPreviewInExcelForm } from "./JsonPreviewInExcelForm"; -import { ButtonType1, ButtonType2, CloseButton, ModalHeading } from "./CommonComponents"; -import { Loader } from "@egovernments/digit-ui-components"; -import { EXCEL, FILE_STORE, GEOJSON, PRIMARY_THEME_COLOR, SHAPEFILE } from "../configs/constants"; -import { tourSteps } from "../configs/tourSteps"; -import { useMyContext } from "../utils/context"; -import { v4 as uuidv4 } from "uuid"; -import { - handleExcelFile, - validateNamingConvention, - findReadMe, - downloadTemplate, - getSchema, - prepareExcelFileBlobWithErrors, - boundaryDataGeneration, - handleGeojsonFile, - handleShapefiles, - convertToSheetArray, - findGuideLine, - delay, -} from "../utils/uploadUtils"; -import { UploadGuideLines, UploadedFile, FileUploadComponent, UploadComponents, UploadInstructions, UploadSection } from "./UploadHelperComponents"; - -const page = "upload"; - -const Upload = ({ - MicroplanName = "default", - campaignType = Digit.SessionStorage.get("microplanHelperData")?.campaignData?.projectType, - microplanData, - setMicroplanData, - checkDataCompletion, - setCheckDataCompletion, - currentPage, - pages, - navigationEvent, - setToast, -}) => { - const { t } = useTranslation(); - - // States - const [editable, setEditable] = useState(true); - const [sections, setSections] = useState([]); - const [selectedSection, setSelectedSection] = useState(null); - const [modal, setModalState] = useState("none"); - const [selectedFileType, setSelectedFileType] = useState(null); - const [dataPresent, setDataPresent] = useState(false); - const [dataUpload, setDataUpload] = useState(false); - const [loader, setLoader] = useState(false); - const [fileData, setFileData] = useState(); - const [uploadedFileError, setUploadedFileError] = useState(); - const [fileDataList, setFileDataList] = useState([]); - const [validationSchemas, setValidationSchemas] = useState([]); - const [template, setTemplate] = useState([]); - const [resourceMapping, setResourceMapping] = useState([]); - const [previewUploadedData, setPreviewUploadedData] = useState(); - const { state, dispatch } = useMyContext(); - - //fetch campaign data - const { id = "" } = Digit.Hooks.useQueryParams(); - const { isLoading: isCampaignLoading, data: campaignData } = Digit.Hooks.microplan.useSearchCampaign( - { - CampaignDetails: { - tenantId: Digit.ULBService.getCurrentTenantId(), - ids: [id], - }, - }, - { - enabled: !!id, - } - ); - - // request body for boundary hierarchy api - const reqCriteria = { - url: `/boundary-service/boundary-hierarchy-definition/_search`, - params: {}, - body: { - BoundaryTypeHierarchySearchCriteria: { - tenantId: Digit.ULBService.getCurrentTenantId(), - hierarchyType: campaignData?.hierarchyType, - // hierarchyType: "Microplan", - }, - }, - config: { - enabled: !!campaignData?.hierarchyType, - select: (data) => { - return ( - data?.BoundaryHierarchy?.[0]?.boundaryHierarchy?.map( - (item) => `${campaignData?.hierarchyType}_${Digit.Utils.microplan.transformIntoLocalisationCode(item?.boundaryType)}` - ) || {} - ); - }, - }, - }; - const { isLoading: ishierarchyLoading, data: hierarchy } = Digit.Hooks.useCustomAPIHook(reqCriteria); - // Set TourSteps - useEffect(() => { - const tourData = tourSteps(t)?.[page] || {}; - if (state?.tourStateData?.name === page) return; - dispatch({ - type: "SETINITDATA", - state: { tourStateData: tourData }, - }); - }, [t]); - - const setModal = (modalString) => { - const elements = document.querySelectorAll(".popup-wrap-rest-unfocus"); - elements.forEach((element) => { - element.classList.toggle("popup-wrap-rest-unfocus-active"); - }); - setModalState(modalString); - }; - - // UseEffect for checking completeness of data before moveing to next section - useEffect(() => { - if (!fileDataList || checkDataCompletion !== "true" || !setCheckDataCompletion) return; - updateData(true); - }, [checkDataCompletion]); - - // UseEffect to store current data - useEffect(() => { - if (!fileDataList || !setMicroplanData) return; - setMicroplanData((previous) => ({ ...previous, upload: fileDataList })); - }, [fileDataList]); - - // check if data has changed or not - const updateData = useCallback( - (check) => { - if (!fileDataList || !setMicroplanData) return; - - // if user has selected a file type and wants to go back to file type selection he/she can click back buttom - const currentSectionIndex = sections.findIndex((item) => item.id === selectedSection.id); - if (!dataPresent) { - if (navigationEvent?.name !== "step") { - if (navigationEvent?.name === "next") { - if (currentSectionIndex < sections.length - 1) { - setSelectedSection(sections[currentSectionIndex + 1]); - setCheckDataCompletion("false"); - return; - } - } else if (navigationEvent?.name === "previousStep") { - if (dataUpload) { - setDataUpload(false); - setSelectedFileType(null); - setCheckDataCompletion("false"); - return; - } - if (currentSectionIndex > 0) { - setSelectedSection(sections[currentSectionIndex - 1]); - setCheckDataCompletion("false"); - return; - } - } - } - } else { - if (navigationEvent?.name === "next") { - if (currentSectionIndex < sections.length - 1) { - setSelectedSection(sections[currentSectionIndex + 1]); - setCheckDataCompletion("false"); - return; - } - } else if (navigationEvent?.name === "previousStep") { - if (currentSectionIndex > 0) { - setSelectedSection(sections[currentSectionIndex - 1]); - setCheckDataCompletion("false"); - return; - } - } - } - - if (check) { - setMicroplanData((previous) => ({ ...previous, upload: fileDataList })); - const valueList = fileDataList ? fileDataList : []; - const sectionCheckList = sections?.filter((item) => item.required); - - if ( - valueList.length !== 0 && - sectionCheckList.every((item) => { - const filteredList = fileDataList?.filter((e) => e.active && e.templateIdentifier === item.id); - if (filteredList?.length === 0) return false; - return filteredList?.every((element) => element?.error === null) && fileDataList && !fileDataList.some((e) => e?.active && e?.error); - }) - ) - setCheckDataCompletion("valid"); - else setCheckDataCompletion("invalid"); - } else { - const valueList = microplanData?.Upload ? Object.values(microplanData?.Upload) : []; - if ( - valueList.length !== 0 && - sectionCheckList.every((item) => - fileDataList?.filter((e) => e.templateIdentifier === item.id)?.every((element) => element.active && element?.error === null) - ) - ) - setCheckDataCompletion("valid"); - else setCheckDataCompletion("invalid"); - } - }, - [fileDataList, setMicroplanData, microplanData, setCheckDataCompletion, dataPresent, dataUpload, navigationEvent] - ); - - // UseEffect to extract data on first render - useEffect(() => { - if (microplanData?.upload) { - setFileDataList(microplanData.upload); - } - - if (pages) { - const previouspage = pages[currentPage?.id - 1]; - if (previouspage?.checkForCompleteness && !microplanData?.status?.[previouspage?.name]) setEditable(false); - else setEditable(true); - } - }, []); - - // UseEffect to add a event listener for keyboard - useEffect(() => { - window.addEventListener("keydown", handleKeyPress); - - return () => window.removeEventListener("keydown", handleKeyPress); - }, [modal, previewUploadedData]); - - const handleKeyPress = (event) => { - // if (modal !== "upload-guidelines") return; - if (["x", "Escape"].includes(event.key)) { - // Perform the desired action when "x" or "esc" is pressed - if (modal === "upload-guidelines") { - setModal("none"); - } - if (previewUploadedData) setPreviewUploadedData(undefined); - } - }; - - // Effect to update sections and selected section when data changes - useEffect(() => { - if (state) { - const uploadSections = state?.UploadConfiguration; - const schemas = state?.Schemas; - if (schemas) setValidationSchemas(schemas); - if (uploadSections) { - setSelectedSection(uploadSections.length > 0 ? uploadSections[0] : null); - setSections(uploadSections); - } - } - }, []); - - // Memoized section options to prevent unnecessary re-renders - const sectionOptions = useMemo(() => { - if (!sections) return []; - return sections.map((item) => ( - e.active && e.templateIdentifier === item.id && !e.error)?.length !== 0} - /> - )); - }, [sections, selectedSection, fileDataList]); - - const showDownloadTemplate = () => { - if (selectedSection?.UploadFileTypes) { - const schema = getSchema(campaignType, selectedFileType?.id, selectedSection.id, validationSchemas); - if (schema?.template?.showTemplateDownload) return true; - } - return false; - }; - - // Handler for when a file type is selected for uplaod - const selectFileTypeHandler = (e) => { - if (selectedSection?.UploadFileTypes) { - const schema = getSchema(campaignType, e.target.name, selectedSection.id, validationSchemas); - setSelectedFileType(selectedSection.UploadFileTypes.find((item) => item.id === e.target.name)); - if (schema?.template?.showTemplateDownload) setModal("upload-modal"); - else UploadFileClickHandler(false); - return; - } - setToast({ - state: "error", - message: t("ERROR_UNKNOWN"), - }); - setLoader(false); - return; - }; - - // Memoized section components to prevent unnecessary re-renders - const sectionComponents = useMemo(() => { - if (!sections) return; - return sections.map((item) => ( - - )); - }, [sections, selectedSection, selectedFileType]); - - // Close model click handler - const closeModal = () => { - setResourceMapping([]); - setModal("none"); - }; - - // handler for show file upload screen - const UploadFileClickHandler = (download = false) => { - if (download) { - downloadTemplateHandler(); - } - setModal("none"); - setDataUpload(true); - }; - const readMeConstant = state?.CommonConstants?.find((item) => item?.name === "readMeSheetName"); - const downloadTemplateHandler = () => { - const downloadParams = { - campaignType, - type: selectedFileType.id, - section: selectedSection.id, - setToast, - campaignData, - hierarchyType: campaignData?.hierarchyType, - Schemas: validationSchemas, - HierarchyConfigurations: state?.HierarchyConfigurations, - setLoader, - hierarchy, - readMeData: state?.ReadMeData, - readMeSheetName: readMeConstant ? readMeConstant.value : undefined, - t, - }; - downloadTemplate(downloadParams); - }; - // Effect for updating current session data in case of section change - useEffect(() => { - if (selectedSection) { - let file = fileDataList?.find((item) => item.active && item.templateIdentifier === selectedSection.id); - if (file?.resourceMapping) { - setSelectedFileType(selectedSection.UploadFileTypes.find((item) => item?.id === file?.fileType)); - setUploadedFileError(file?.error); - setFileData(file); - setDataPresent(true); - } else { - resetSectionState(); - } - } else { - resetSectionState(); - } - }, [selectedSection]); - - const resetSectionState = () => { - setUploadedFileError(null); - setSelectedFileType(null); - setDataPresent(false); - setResourceMapping([]); - setDataUpload(false); - }; - - // Function for handling upload file event - const UploadFileToFileStorage = async (file) => { - if (!file) return; - try { - // setting loader - setLoader("FILE_UPLOADING"); - let check; - let fileDataToStore; - let errorMsg; - let errorLocationObject; // object containing the location and type of error - let response; - let callMapping = false; - // Checking if the file follows name convention rules - if (!validateNamingConvention(file, selectedFileType["namingConvention"], setToast, t)) { - setLoader(false); - return; - } - - let schemaData; - if (selectedFileType.id !== SHAPEFILE) { - // Check if validation schema is present or not - schemaData = getSchema(campaignType, selectedFileType.id, selectedSection.id, validationSchemas); - if (!schemaData) { - setToast({ - state: "error", - message: t("ERROR_VALIDATION_SCHEMA_ABSENT"), - }); - setLoader(false); - return; - } - } - let resourceMappingData = []; - let additionalSheets = []; - // Handling different filetypes - switch (selectedFileType.id) { - case EXCEL: - // let response = handleExcelFile(file,schemaData); - try { - response = await handleExcelFile( - file, - schemaData, - hierarchy, - selectedFileType, - {}, - setUploadedFileError, - t, - campaignData, - state?.CommonConstants?.find((item) => item?.name === "readMeSheetName")?.value - ); - check = response.check; - errorMsg = response.errorMsg; - errorLocationObject = response.errors; - fileDataToStore = response.fileDataToStore; - resourceMappingData = response?.tempResourceMappingData || []; - additionalSheets = response?.additionalSheets; - if (check === true) { - if (response?.toast) setToast(response.toast); - else setToast({ state: "success", message: t("FILE_UPLOADED_SUCCESSFULLY") }); - } else if (response.toast) { - setToast(response.toast); - } else { - setToast({ state: "error", message: t("ERROR_UPLOADED_FILE") }); - } - if (response.interruptUpload) { - setLoader(false); - return; - } - } catch (error) { - console.error("Excel parsing error", error.message); - setToast({ state: "error", message: t("ERROR_UPLOADED_FILE") }); - handleValidationErrorResponse(t("ERROR_UPLOADED_FILE")); - return; - } - break; - case GEOJSON: - try { - response = await handleGeojsonFile(file, schemaData, setUploadedFileError, t); - file = new File([file], file.name, { type: "application/geo+json" }); - if (response.check === false && response.stopUpload) { - setLoader(false); - setToast(response.toast); - return; - } - check = response.check; - errorMsg = response.error; - fileDataToStore = response.fileDataToStore; - callMapping = true; - } catch (error) { - // console.error("Geojson parsing error", error.message); - setToast({ state: "error", message: t("ERROR_UPLOADED_FILE") }); - handleValidationErrorResponse(t("ERROR_UPLOADED_FILE")); - return; - } - break; - case SHAPEFILE: - try { - response = await handleShapefiles(file, schemaData, setUploadedFileError, selectedFileType, setToast, t); - file = new File([file], file.name, { type: "application/octet-stream" }); - check = response.check; - errorMsg = response.error; - fileDataToStore = response.fileDataToStore; - callMapping = true; - } catch (error) { - console.error("Shapefile parsing error", error.message); - setToast({ state: "error", message: t("ERROR_UPLOADED_FILE") }); - handleValidationErrorResponse(t("ERROR_UPLOADED_FILE")); - return; - } - break; - default: - setToast({ - state: "error", - message: t("ERROR_UNKNOWN_FILETYPE"), - }); - setLoader(false); - return; - } - let filestoreId; - if (!errorMsg && !callMapping) { - try { - const filestoreResponse = await Digit.UploadServices.Filestorage(FILE_STORE, file, Digit.ULBService.getCurrentTenantId()); - if (filestoreResponse?.data?.files?.length > 0) { - filestoreId = filestoreResponse?.data?.files[0]?.fileStoreId; - } else { - errorMsg = t("ERROR_UPLOADING_FILE"); - setToast({ state: "error", message: t("ERROR_UPLOADING_FILE") }); - setFileData((previous) => ({ ...previous, error: errorMsg })); - setUploadedFileError(errorMsg); - } - } catch (errorData) { - console.error(errorData.message); - errorMsg = t("ERROR_UPLOADING_FILE"); - setToast({ state: "error", message: t("ERROR_UPLOADING_FILE") }); - setUploadedFileError(errorMsg); - handleValidationErrorResponse(t("ERROR_UPLOADING_FILE")); - return; - } - } - - if (selectedFileType.id === EXCEL) { - resourceMappingData = resourceMappingData.map((item) => ({ ...item, filestoreId })); - } - const uuid = uuidv4(); - // creating a fileObject to save all the data collectively - let fileObject = { - id: uuid, - templateIdentifier: `${selectedSection.id}`, - fileName: file.name, - section: selectedSection.id, - fileType: selectedFileType.id, - data: fileDataToStore, - file, - error: errorMsg ? errorMsg : null, - filestoreId, - resourceMapping: resourceMappingData, - active: true, - additionalSheets, - errorLocationObject, // contains location and type of error - }; - setFileDataList((prevFileDataList) => { - let temp = _.cloneDeep(prevFileDataList); - if (!temp) return temp; - let index = prevFileDataList?.findIndex((item) => item.active && item.templateIdentifier === selectedSection.id); - if (index !== -1) - temp[index] = { ...temp[index], resourceMapping: temp[index]?.resourceMapping.map((e) => ({ active: false, ...e })), active: false }; - temp.push(fileObject); - return temp; - }); - setFileData(fileObject); - if (errorMsg === undefined && callMapping) { - setModal("spatial-data-property-mapping"); - } - setDataPresent(true); - setLoader(false); - } catch (error) { - console.error(error.message); - console.error("File Upload error", error?.message); - setUploadedFileError("ERROR_UPLOADING_FILE"); - setLoader(false); - } - }; - - // Reupload the selected file - const reuplaodFile = () => { - setResourceMapping([]); - setFileData(undefined); - setDataPresent(false); - setUploadedFileError(null); - setDataUpload(false); - setSelectedFileType(null); - closeModal(); - }; - - const convertAndCombineFileData = () => { - let combinedData = fileData?.data ? Object.entries(fileData.data)?.map(([key, value]) => ({ sheetName: key, data: value })) : []; - if (fileData?.additionalSheets) { - for (const sheet of fileData.additionalSheets) { - if (sheet?.data && sheet.sheetName) { - const index = sheet?.position < combinedData.length && sheet.position !== -1 ? sheet.position : combinedData.length; - combinedData.splice(index, 0, sheet); - } - } - } - return combinedData; - }; - - // Function for creating blob out of data - const dataToBlob = async () => { - try { - let blob; - const schema = getSchema(campaignType, selectedFileType.id, selectedSection.id, validationSchemas); - const filteredReadMeData = findReadMe(state?.ReadMeData, campaignType, selectedFileType.id, selectedSection.id); - let combinedData = convertAndCombineFileData(); - const readMeSheetName = state?.CommonConstants?.find((item) => item?.name === "readMeSheetName")?.value; - switch (fileData.fileType) { - case EXCEL: - if (fileData?.errorLocationObject?.length !== 0) - blob = await prepareExcelFileBlobWithErrors( - combinedData, - fileData.errorLocationObject, - schema, - hierarchy, - filteredReadMeData, - readMeSheetName, - t - ); - else blob = fileData.file; - break; - case SHAPEFILE: - case GEOJSON: - if (fileData?.data) { - const result = convertToSheetArray(Digit.Utils.microplan.convertGeojsonToExcelSingleSheet(fileData?.data?.features, fileData?.section)); - - if (fileData?.errorLocationObject?.length !== 0) - blob = await prepareExcelFileBlobWithErrors( - result, - fileData.errorLocationObject, - schema, - hierarchy, - filteredReadMeData, - readMeSheetName, - t - ); - } - break; - } - return blob; - } catch (error) { - console.error("Error generating blob:", error); - return; - } - }; - - // Download the selected file - const downloadFile = async () => { - setLoader("LOADING"); - try { - await delay(100); - let blob = await dataToBlob(); - if (blob) { - // Crating a url object for the blob - const url = URL.createObjectURL(blob); - const link = document.createElement("a"); - link.href = url; - - // Forming a name for downloaded file - let fileNameParts = fileData.fileName.split("."); - fileNameParts.pop(); - fileNameParts.push("xlsx"); - fileNameParts.join("."); - - //Downloading the file - link.download = fileNameParts.join("."); - link.click(); - URL.revokeObjectURL(url); - } else { - let downloadUrl = await Digit.UploadServices.Filefetch([fileData.filestoreId], Digit.ULBService.getCurrentTenantId()); - const link = document.createElement("a"); - link.href = downloadUrl; - // Forming a name for downloaded file - let fileNameParts = fileData.fileName.split("."); - fileNameParts.pop(); - fileNameParts.push("xlsx"); - fileNameParts.join("."); - link.download = fileNameParts; // Replace with the desired file name and extension - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - } - } catch (error) { - console.error(error.message); - setToast({ - state: "error", - message: t("ERROR_UNKNOWN_ERROR"), - }); - } - setLoader(false); - }; - - // delete the selected file - const deleteFile = () => { - setResourceMapping([]); - setFileDataList((previous) => { - let temp = _.cloneDeep(previous); - if (!temp) return temp; - let index = temp?.findIndex((item) => { - return item.id === fileData.id; - }); - if (index !== -1) - temp[index] = { ...temp[index], resourceMapping: temp[index]?.resourceMapping.map((e) => ({ active: false, ...e })), active: false }; - return temp; - }); - setFileData(undefined); - setDataPresent(false); - setUploadedFileError(null); - setDataUpload(false); - setSelectedFileType(null); - closeModal(); - }; - - // Function for handling the validations for geojson and shapefiles after mapping of properties - const validationForMappingAndDataSaving = async () => { - try { - setLoader("LOADING"); - const schemaData = getSchema(campaignType, selectedFileType.id, selectedSection.id, validationSchemas); - let error; - if (!checkForSchemaData(schemaData)) return; - const { data, valid, errors } = computeMappedDataAndItsValidations(schemaData); - error = errors; - if (!valid) return; - let filestoreId; - if (!error) { - filestoreId = await saveFileToFileStore(); - } - let resourceMappingData; - if (filestoreId) { - resourceMappingData = resourceMapping.map((item) => { - return { ...item, filestoreId }; - }); - } - setResourceMapping([]); - - let boundaryDataAgainstBoundaryCode = (await boundaryDataGeneration(schemaData, campaignData, t)) || {}; - const mappedToList = resourceMappingData.map((item) => item.mappedTo); - if (hierarchy.every((item) => !mappedToList.includes(t(item)))) { - data.features.forEach((feature) => { - const boundaryCode = feature.properties.boundaryCode; - let additionalDetails = {}; - for (let i = 0; i < hierarchy.length; i++) { - if (boundaryDataAgainstBoundaryCode[boundaryCode]?.[i] || boundaryDataAgainstBoundaryCode[boundaryCode]?.[i] === "") { - additionalDetails[hierarchy[i]] = boundaryDataAgainstBoundaryCode[boundaryCode][i]; - } else { - additionalDetails[hierarchy[i]] = ""; - } - } - feature.properties = { ...additionalDetails, ...feature.properties }; - }); - } - - let fileObject = _.cloneDeep(fileData); - fileObject = { ...fileData, data, resourceMapping: resourceMappingData, error: error ? error : null, filestoreId }; - setFileData(fileObject); - setFileDataList((prevFileDataList) => { - let temp = _.cloneDeep(prevFileDataList); - if (!temp) return temp; - let index = prevFileDataList?.findIndex((item) => item.id === fileData.id); - if (index !== -1) temp[index] = fileObject; - // temp.push(fileObject); - return temp; - }); - - setToast({ state: "success", message: t("FILE_UPLOADED_SUCCESSFULLY") }); - setLoader(false); - } catch (error) { - console.error(error.message); - setUploadedFileError(t("ERROR_UPLOADING_FILE")); - setToast({ state: "error", message: t("ERROR_UPLOADING_FILE") }); - setLoader(false); - handleValidationErrorResponse("ERROR_UPLOADING_FILE"); - } - }; - const saveFileToFileStore = async () => { - try { - const filestoreResponse = await Digit.UploadServices.Filestorage(FILE_STORE, fileData.file, Digit.ULBService.getCurrentTenantId()); - if (filestoreResponse?.data?.files?.length > 0) { - return filestoreResponse?.data?.files[0]?.fileStoreId; - } - error = t("ERROR_UPLOADING_FILE"); - setToast({ state: "error", message: t("ERROR_UPLOADING_FILE") }); - setResourceMapping([]); - setUploadedFileError(error); - } catch (errorData) { - console.error("Error while uploading file to filestore: ", errorData?.message); - let error = t("ERROR_UPLOADING_FILE"); - handleValidationErrorResponse(error); - setResourceMapping([]); - return; - } - }; - const computeMappedDataAndItsValidations = (schemaData) => { - const data = computeGeojsonWithMappedProperties(); - const response = geojsonPropertiesValidation(data, schemaData.schema, fileData?.section, t); - if (!response.valid) { - handleValidationErrorResponse(response.message, response.errors); - return { data: data, errors: response.errors, valid: response.valid }; - } - return { data: data, valid: response.valid }; - }; - - const handleValidationErrorResponse = (error, errorLocationObject = {}) => { - const fileObject = fileData; - if (fileObject) { - fileObject.error = [error]; - if (errorLocationObject) fileObject.errorLocationObject = errorLocationObject; - setFileData((previous) => ({ ...previous, error, errorLocationObject })); - setFileDataList((prevFileDataList) => { - let temp = _.cloneDeep(prevFileDataList); - if (!temp) return temp; - let index = prevFileDataList?.findIndex((item) => item.id === fileData.id); - temp[index] = fileObject; - return temp; - }); - setToast({ state: "error", message: t("ERROR_UPLOADED_FILE") }); - if (error) setUploadedFileError(error); - } - setLoader(false); - }; - - const checkForSchemaData = (schemaData) => { - if (resourceMapping?.length === 0) { - setToast({ state: "warning", message: t("WARNING_INCOMPLETE_MAPPING") }); - setLoader(false); - return false; - } - - if (!schemaData || !schemaData.schema || !schemaData.schema["Properties"]) { - setToast({ state: "error", message: t("ERROR_VALIDATION_SCHEMA_ABSENT") }); - setLoader(false); - return; - } - - let columns = []; - if (schemaData?.doHierarchyCheckInUploadedData) { - columns.push(...hierarchy); - } - columns.push( - ...Object.entries(schemaData?.schema?.Properties || {}).reduce((acc, [key, value]) => { - if (value?.isRequired) { - acc.push(key); - } - return acc; - }, []) - ); - - const resourceMappingLength = resourceMapping.filter((e) => !!e?.mappedFrom && columns.includes(e?.mappedTo)).length; - if (resourceMappingLength !== columns?.length) { - setToast({ state: "warning", message: t("WARNING_INCOMPLETE_MAPPING") }); - setLoader(false); - return false; - } - setModal("none"); - return true; - }; - - const computeGeojsonWithMappedProperties = () => { - const schemaData = getSchema(campaignType, selectedFileType.id, selectedSection.id, validationSchemas); - let schemaKeys; - if (schemaData?.schema?.["Properties"]) schemaKeys = hierarchy.concat(Object.keys(schemaData.schema["Properties"])); - // Sorting the resourceMapping list inorder to maintain the column sequence - const sortedSecondList = Digit.Utils.microplan.sortSecondListBasedOnFirstListOrder(schemaKeys, resourceMapping); - // Creating a object with input data with MDMS keys - const newFeatures = fileData.data["features"].map((item) => { - let newProperties = {}; - - sortedSecondList.forEach((e) => { - newProperties[e["mappedTo"]] = item["properties"][e["mappedFrom"]]; - }); - item["properties"] = newProperties; - return item; - }); - let data = fileData.data; - data["features"] = newFeatures; - return data; - }; - - // Handler for checing file extension and showing errors in case it is wrong - const onTypeErrorWhileFileUpload = () => { - switch (selectedFileType.id) { - case EXCEL: - setToast({ state: "error", message: t("ERROR_EXCEL_EXTENSION") }); - break; - case GEOJSON: - setToast({ state: "error", message: t("ERROR_GEOJSON_EXTENSION") }); - break; - case SHAPEFILE: - setToast({ state: "error", message: t("ERROR_SHAPE_FILE_EXTENSION") }); - break; - } - }; - - // Cancle mapping and uplaod in case of geojson and shapefiles - const cancelUpload = () => { - setFileDataList((previous) => { - let temp = previous?.filter((item) => item.id !== fileData?.id); - return temp; - }); - setFileData(undefined); - setDataPresent(false); - setUploadedFileError(null); - setDataUpload(false); - setSelectedFileType(null); - closeModal(); - }; - - const openDataPreview = () => { - let data; - switch (fileData.fileType) { - case EXCEL: - data = fileData.data; - break; - case SHAPEFILE: - case GEOJSON: - if (!fileData || !fileData.data) { - setToast({ - state: "error", - message: t("ERROR_DATA_NOT_PRESENT"), - }); - return; - } - data = Digit.Utils.microplan.convertGeojsonToExcelSingleSheet(fileData?.data?.features, fileData?.section); - break; - } - if (!data || Object.keys(data).length === 0) { - setToast({ - state: "error", - message: t("ERROR_DATA_NOT_PRESENT"), - }); - return; - } - setPreviewUploadedData(data); - }; - - if (isCampaignLoading || ishierarchyLoading) { - return ( -
- -
- ); - } - - return ( - <> -
-
-
- {!dataPresent ? ( - dataUpload ? ( -
- e.id === selectedSection.id)[0]} - selectedSection={selectedSection} - selectedFileType={selectedFileType} - UploadFileToFileStorage={UploadFileToFileStorage} - onTypeError={onTypeErrorWhileFileUpload} - downloadTemplateHandler={downloadTemplateHandler} - showDownloadTemplate={showDownloadTemplate} - /> -
- ) : ( -
{sectionComponents}
- ) - ) : ( -
- {selectedSection != null && fileData !== null && ( - { - setModal("reupload-conformation"); - }} - DownloadFile={downloadFile} - DeleteFile={() => { - setModal("delete-conformation"); - }} - error={uploadedFileError} - openDataPreview={openDataPreview} - downloadTemplateHandler={downloadTemplateHandler} - showDownloadTemplate={showDownloadTemplate} - /> - )} -
- )} - {!dataPresent && dataUpload && ( - { - setModal("upload-guidelines"); - }} - t={t} - /> - )} -
- -
{sectionOptions}
-
- -
- {modal === "upload-modal" && ( - { - closeModal(); - setSelectedFileType(null); - }} - LeftButtonHandler={() => UploadFileClickHandler(false)} - RightButtonHandler={() => UploadFileClickHandler(true)} - sections={sections} - popupModuleActionBarStyles={{ - flex: 1, - justifyContent: "space-between", - padding: "1rem", - gap: "1rem", - }} - footerLeftButtonBody={} - footerRightButtonBody={} - header={ - - } - bodyText={t(`INSTRUCTIONS_DOWNLOAD_TEMPLATE_FOR_${selectedSection.code}_${selectedFileType.code}`)} - /> - )} - {modal === "delete-conformation" && ( - } - actionCancelLabel={t("YES")} - actionCancelOnSubmit={deleteFile} - actionSaveLabel={t("NO")} - actionSaveOnSubmit={closeModal} - > -
-

{t("INSTRUCTIONS_DELETE_FILE_CONFIRMATION")}

-
-
- )} - {modal === "reupload-conformation" && ( - } - actionCancelLabel={t("YES")} - actionCancelOnSubmit={reuplaodFile} - actionSaveLabel={t("NO")} - actionSaveOnSubmit={closeModal} - > -
-

{t("INSTRUCTIONS_REUPLOAD_FILE_CONFIRMATION")}

-
-
- )} - {modal === "spatial-data-property-mapping" && ( - } - actionSaveOnSubmit={validationForMappingAndDataSaving} - actionSaveLabel={t("COMPLETE_MAPPING")} - headerBarEnd={} - > -
-

{t("INSTRUCTION_SPATIAL_DATA_PROPERTY_MAPPING")}

-
- -
- )} - {modal === "upload-guidelines" && ( - - } - headerBarEnd={} - > - - - )} - {loader && } - - {previewUploadedData && ( -
- setPreviewUploadedData(undefined)} - onDownload={downloadFile} - /> -
- )} -
-
- - ); -}; - -export default Upload; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/UploadHelperComponents.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/UploadHelperComponents.js deleted file mode 100644 index 5a520c4a1bd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/UploadHelperComponents.js +++ /dev/null @@ -1,299 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { useTranslation } from "react-i18next"; -import * as Icons from "@egovernments/digit-ui-svg-components"; -import { FileUploader } from "react-drag-drop-files"; -import { InfoButton, InfoCard } from "@egovernments/digit-ui-components"; -import { PRIMARY_THEME_COLOR } from "../configs/constants"; - -// Component for rendering individual section option -export const UploadSection = ({ item, selected, setSelectedSection, uploadDone }) => { - const { t } = useTranslation(); - // Handle click on section option - const handleClick = () => { - setSelectedSection(item); - }; - - return ( -
-
- -
-

{t(item.code)}

- {uploadDone && ( -
- -
- )} -
- ); -}; - -export const UploadInstructions = ({ setModal, t }) => { - return ( - - {t("REFER")} -
- {t("INFORMATION_DESCRIPTION_LINK")} -
-
, - ]} - /> - ); -}; - -// Component for rendering individual upload option -export const UploadComponents = ({ item, selected, uploadOptions, selectedFileType, selectFileTypeHandler }) => { - const { t } = useTranslation(); - const title = item.code; - - // Component for rendering individual upload option container - const UploadOptionContainer = ({ item, selectedFileType, selectFileTypeHandler }) => { - const [isHovered, setIsHovered] = useState(false); - - const handleMouseEnter = () => { - setIsHovered(true); - }; - - const handleMouseLeave = () => { - setIsHovered(false); - }; - - return ( -
- -

{t(item.code)}

- -
- ); - }; - - return ( -
-
-
-

{t(`HEADING_UPLOAD_DATA_${title}`)}

-
- -

{t(`INSTRUCTIONS_DATA_UPLOAD_OPTIONS_${title}`)}

-
-
- {uploadOptions?.map((item) => ( - - ))} -
-
- ); -}; - -// Component for uploading file -export const FileUploadComponent = ({ - selectedSection, - selectedFileType, - UploadFileToFileStorage, - section, - onTypeError, - downloadTemplateHandler, - showDownloadTemplate, -}) => { - if (!selectedSection || !selectedFileType) return
; - const { t } = useTranslation(); - let types; - section["UploadFileTypes"].forEach((item) => { - if (item.id === selectedFileType.id) types = item.fileExtension; - }); - return ( -
-
-
-

{t(`HEADING_FILE_UPLOAD_${selectedSection.code}_${selectedFileType.code}`)}

- {showDownloadTemplate() && ( - - )} -
-

{t(`INSTRUCTIONS_FILE_UPLOAD_FROM_TEMPLATE_${selectedSection.code}`)}

- -
- -
- {t(`INSTRUCTIONS_UPLOAD_${selectedFileType.code}`)} 
{t("INSTRUCTIONS_UPLOAD_BROWSE_FILES")}
-
-
-
-
-
- ); -}; - -// Component to display uploaded file -export const UploadedFile = ({ - selectedSection, - selectedFileType, - file, - ReuplaodFile, - DownloadFile, - DeleteFile, - error, - openDataPreview, - downloadTemplateHandler, - showDownloadTemplate, -}) => { - const { t } = useTranslation(); - const [errorList, setErrorList] = useState([]); - useEffect(() => { - let tempErrorList = []; - if (file?.errorLocationObject) { - for (const [sheetName, values] of Object.entries(file?.errorLocationObject)) { - for (const [row, columns] of Object.entries(values)) { - for (const [column, errors] of Object.entries(columns)) { - for (const error of errors) { - let convertedError; - if (typeof error === "object") { - let { error: actualError, ...otherProperties } = error; - convertedError = t(actualError, otherProperties?.values); - } else { - convertedError = t(error); - } - tempErrorList.push( - t("ERROR_UPLOAD_DATA_LOCATION_AND_MESSAGE", { - rowNumber: Number(row) + 1, - columnName: t(column), - error: convertedError, - sheetName: sheetName, - }) - ); - } - } - } - } - } - if (tempErrorList.length !== 0) { - setErrorList(tempErrorList); - } - }, [file]); - return ( -
-
-
-

{t(`HEADING_FILE_UPLOAD_${selectedSection.code}_${selectedFileType.code}`)}

- {showDownloadTemplate() && ( - - )} -
-

{t(`INSTRUCTIONS_FILE_UPLOAD_FROM_TEMPLATE_${selectedSection.code}`)}

- -
-
-
- -
-

{file.fileName}

-
-
- - - -
-
-
- {error && Array.isArray(error) && ( - , -
- {error?.map((item) => { - if (item !== "ERROR_REFER_UPLOAD_PREVIEW_TO_SEE_THE_ERRORS") { - return

{t(item)}

; - } - return null; - })} - {errorList.length !== 0 && errorList.map((item) =>

{item}

)} -
, - ]} - /> - )} -
- ); -}; - -// Uplaod GuideLines -export const UploadGuideLines = ({ uploadGuideLines, t }) => { - const formMsgFromObject = (item) => { - if (!item?.hasLink) { - return t(item?.name); - } - return ( - <> - {t(item?.name)} {t(item?.linkName)}{" "} - - ); - }; - return ( -
- {uploadGuideLines?.map((item, index) => ( -
-

- {t(index + 1)}. -

-
- {formMsgFromObject(item)} -
-
- ))} -
- ); -}; - -export const CustomIcon = (props) => { - if (!props.Icon) return null; - return ; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/ZoomControl.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/ZoomControl.js deleted file mode 100644 index 5a0cdabf735..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/ZoomControl.js +++ /dev/null @@ -1,29 +0,0 @@ -import React, { memo, useCallback } from "react"; -import { useTranslation } from "react-i18next"; - -const ZoomControl = memo(({ map, t }) => { - if (!map) return
{t("LOADING_MAP")}
; - - const zoomIn = useCallback(() => { - map.zoomIn(); - }, [map]); - - const zoomOut = useCallback(() => { - map.zoomOut(); - }, [map]); - - return ( -
-
- - -
-
- ); -}); - -export default ZoomControl; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/resourceMapping.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/resourceMapping.js deleted file mode 100644 index df1eb78c135..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/resourceMapping.js +++ /dev/null @@ -1,187 +0,0 @@ -import { Dropdown } from "@egovernments/digit-ui-components"; -import { Table } from "@egovernments/digit-ui-react-components"; -import { PaginationFirst, PaginationLast, PaginationNext, PaginationPrevious } from "@egovernments/digit-ui-svg-components"; -import React, { useState, useEffect, useMemo, useRef, useCallback } from "react"; -const SCROLL_OFFSET = 100; - -export const SpatialDataPropertyMapping = ({ uploadedData, resourceMapping, setResourceMapping, schema, setToast, hierarchy, close, t }) => { - // If no data is uploaded, display a message - if (!uploadedData) return
{t("NO_DATA_TO_DO_MAPPING")}
; - - const itemRefs = useRef([]); - const [expandedIndex, setExpandedIndex] = useState(null); - // State to track the render cycle count - const [renderCycle, setRenderCycle] = useState(0); - const scrollContainerRef = useRef(null); - - // Effect to reset the render cycle count whenever the expandedIndex changes - useEffect(() => { - if (expandedIndex !== null) { - setRenderCycle(0); - } - }, [expandedIndex]); - - // Effect to handle scrolling to the expanded item after the DOM has updated - useEffect(() => { - if (renderCycle < 3) { - // Increment render cycle count to ensure multiple render checks - setRenderCycle((prev) => prev + 1); - } else if (expandedIndex !== null && itemRefs.current[expandedIndex]) { - try { - const parentElement = itemRefs.current[expandedIndex]; - const childElement = itemRefs.current[expandedIndex].children[1]; - - if (parentElement) { - const scrollContainer = scrollContainerRef.current; - const parentRect = parentElement.getBoundingClientRect(); - const containerRect = scrollContainer.getBoundingClientRect(); - - // Calculate the offset from the top of the container - const offset = parentRect.top - containerRect.top; - // Scroll the container to the target position - scrollContainer.scrollTo({ - top: scrollContainer.scrollTop + offset - SCROLL_OFFSET, - behavior: "smooth", - }); - } - - if (childElement) { - // Focus the child element if it exists - childElement.focus(); - } - } catch (error) { - console.error("Error scrolling to element:", error); - } - } - }, [renderCycle, expandedIndex]); - - // Effect to observe DOM changes in the expanded item and trigger render cycle - useEffect(() => { - if (expandedIndex !== null) { - const observer = new MutationObserver(() => { - setRenderCycle((prev) => prev + 1); - }); - - if (itemRefs.current[expandedIndex]) { - observer.observe(itemRefs.current[expandedIndex], { childList: true, subtree: true }); - } - - return () => observer.disconnect(); - } - }, [expandedIndex]); - - // State variables - const [userColumns, setUserColumns] = useState([]); - const [templateColumns, setTemplateColumns] = useState([]); - - // Fetch template columns when schema changes - useEffect(() => { - if (!schema || !schema["schema"] || !schema.schema["Properties"]) - return setToast({ state: "error", message: t("ERROR_VALIDATION_SCHEMA_ABSENT") }); - - const columns = Object.keys(schema.schema["Properties"]); - if (columns) { - const newTemplateColumns = schema && !schema.doHierarchyCheckInUploadedData ? columns : [...hierarchy, ...columns]; - setTemplateColumns(newTemplateColumns); - } - }, [schema]); - - // Update user columns when uploaded data changes - useEffect(() => { - const userUploadedColumns = new Set(); - uploadedData?.["features"]?.forEach((item) => { - Object.keys(item["properties"]).forEach((key) => userUploadedColumns.add(key)); - }); - - //field level validations - for (const item of userUploadedColumns) { - if (item.length < 2) { - setToast({ state: "error", message: t("ERROR_FIELD_LENGTH") }); - close(); - } - } - setUserColumns((preUserColumns) => [...preUserColumns, ...userUploadedColumns]); - }, [uploadedData]); - - // Dropdown component for selecting user columns - const DropDownUserColumnSelect = ({ id, index }) => { - const [selectedOption, setSelectedOption] = useState(""); - useEffect(() => { - const obj = resourceMapping.find((item) => item["mappedTo"] === id); - if (obj) setSelectedOption({ code: obj["mappedFrom"] }); - else setSelectedOption(); - }, [id, resourceMapping]); - - const handleSelectChange = (event) => { - const newValue = event.code; - setSelectedOption(event); - setResourceMapping((previous) => { - const revisedData = previous.filter((item) => !(item["mappedTo"] === id || item["mappedFrom"] === newValue)); - return [...revisedData, { mappedTo: id, mappedFrom: newValue }]; - }); - }; - - const toggleExpand = (index) => { - setExpandedIndex(index === expandedIndex ? null : index); - }; - - return ( -
{ - itemRefs.current[index] = el; - }} - onClick={() => toggleExpand(index)} - onKeyDown={() => toggleExpand(index)} - > - ({ code: item }))} - selected={selectedOption} - optionKey="code" - select={handleSelectChange} - style={{ width: "100%", backgroundColor: "rgb(0,0,0,0)" }} - showToolTip={true} - /> -
- ); - }; - - const tableColumns = useMemo( - () => [ - { - Header: t("COLUMNS_IN_TEMPLATE"), - accessor: "COLUMNS_IN_TEMPLATE", - }, - { - Header: t("COLUMNS_IN_USER_UPLOAD"), - accessor: "COLUMNS_IN_USER_UPLOAD", - Cell: ({ cell: { value }, row: { index } }) => - useMemo(() => , [value, index]), - }, - ], - [userColumns, setResourceMapping, resourceMapping, t, itemRefs] - ); - const data = useMemo(() => templateColumns.map((item) => ({ COLUMNS_IN_TEMPLATE: t(item), COLUMNS_IN_USER_UPLOAD: item })), [templateColumns]); - return ( -
- { - return { style: {} }; - }} - getHeaderProps={(cellInfo) => { - return { style: {} }; - }} - /> - - ); -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/UICustomizations.js deleted file mode 100644 index 8f7fd717aba..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/UICustomizations.js +++ /dev/null @@ -1,324 +0,0 @@ -import _ from "lodash"; - -//create functions here based on module name set in mdms(eg->SearchProjectConfig) -//how to call these -> Digit?.Customizations?.[masterName]?.[moduleName] -// these functions will act as middlewares -// var Digit = window.Digit || {}; - -const businessServiceMap = { - "muster roll": "MR", -}; - -const inboxModuleNameMap = { - "muster-roll-approval": "muster-roll-service", -}; - -function filterUniqueByKey(arr, key) { - const uniqueValues = new Set(); - const result = []; - - arr.forEach((obj) => { - const value = obj[key]; - if (!uniqueValues.has(value)) { - uniqueValues.add(value); - result.push(obj); - } - }); - - return result; -} - -const epochTimeForTomorrow12 = () => { - const now = new Date(); - - // Create a new Date object for tomorrow at 12:00 PM - const tomorrowNoon = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1, 12, 0, 0, 0); - - // Format the date as "YYYY-MM-DD" - const year = tomorrowNoon.getFullYear(); - const month = String(tomorrowNoon.getMonth() + 1).padStart(2, "0"); // Months are 0-indexed - const day = String(tomorrowNoon.getDate()).padStart(2, "0"); - - return Digit.Utils.date.convertDateToEpoch(`${year}-${month}-${day}`); -}; - -function cleanObject(obj) { - for (const key in obj) { - if (Object.hasOwn(obj, key)) { - if (Array.isArray(obj[key])) { - if (obj[key].length === 0) { - delete obj[key]; - } - } else if ( - obj[key] === undefined || - obj[key] === null || - obj[key] === false || - obj[key] === "" || // Check for empty string - (typeof obj[key] === "object" && Object.keys(obj[key]).length === 0) - ) { - delete obj[key]; - } - } - } - return obj; -} - -export const UICustomizations = { - businessServiceMap, - updatePayload: (applicationDetails, data, action, businessService) => { - if (businessService === businessServiceMap.estimate) { - const workflow = { - comment: data.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - estimate: applicationDetails, - workflow, - }; - } - if (businessService === businessServiceMap.contract) { - const workflow = { - comment: data?.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - contract: applicationDetails, - workflow, - }; - } - if (businessService === businessServiceMap?.["muster roll"]) { - const workflow = { - comment: data?.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - musterRoll: applicationDetails, - workflow, - }; - } - if (businessService === businessServiceMap?.["works.purchase"]) { - const workflow = { - comment: data.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - const additionalFieldsToSet = { - projectId: applicationDetails.additionalDetails.projectId, - invoiceDate: applicationDetails.billDate, - invoiceNumber: applicationDetails.referenceId.split("_")?.[1], - contractNumber: applicationDetails.referenceId.split("_")?.[0], - documents: applicationDetails.additionalDetails.documents, - }; - return { - bill: { ...applicationDetails, ...additionalFieldsToSet }, - workflow, - }; - } - }, - enableModalSubmit: (businessService, action, setModalSubmit, data) => { - if (businessService === businessServiceMap?.["muster roll"] && action.action === "APPROVE") { - setModalSubmit(data?.acceptTerms); - } - }, - enableHrmsSearch: (businessService, action) => { - if (businessService === businessServiceMap.estimate) { - return action.action.includes("TECHNICALSANCTION") || action.action.includes("VERIFYANDFORWARD"); - } - if (businessService === businessServiceMap.contract) { - return action.action.includes("VERIFY_AND_FORWARD"); - } - if (businessService === businessServiceMap?.["muster roll"]) { - return action.action.includes("VERIFY"); - } - if (businessService === businessServiceMap?.["works.purchase"]) { - return action.action.includes("VERIFY_AND_FORWARD"); - } - return false; - }, - getBusinessService: (moduleCode) => { - if (moduleCode?.includes("estimate")) { - return businessServiceMap?.estimate; - } else if (moduleCode?.includes("contract")) { - return businessServiceMap?.contract; - } else if (moduleCode?.includes("muster roll")) { - return businessServiceMap?.["muster roll"]; - } else if (moduleCode?.includes("works.purchase")) { - return businessServiceMap?.["works.purchase"]; - } else if (moduleCode?.includes("works.wages")) { - return businessServiceMap?.["works.wages"]; - } else if (moduleCode?.includes("works.supervision")) { - return businessServiceMap?.["works.supervision"]; - } else { - return businessServiceMap; - } - }, - getInboxModuleName: (moduleCode) => { - if (moduleCode?.includes("estimate")) { - return inboxModuleNameMap?.estimate; - } else if (moduleCode?.includes("contract")) { - return inboxModuleNameMap?.contracts; - } else if (moduleCode?.includes("attendence")) { - return inboxModuleNameMap?.attendencemgmt; - } else { - return inboxModuleNameMap; - } - }, - SearchCampaign: { - preProcess: (data, additionalDetails) => { - const { campaignName = "", endDate = "", projectType = "", startDate = "" } = data?.state?.searchForm || {}; - data.body.CampaignDetails = {}; - data.body.CampaignDetails.pagination = data?.state?.tableForm; - data.body.CampaignDetails.tenantId = Digit.ULBService.getCurrentTenantId(); - // data.body.CampaignDetails.boundaryCode = boundaryCode; - data.body.CampaignDetails.createdBy = Digit.UserService.getUser().info.uuid; - data.body.CampaignDetails.campaignName = campaignName; - data.body.CampaignDetails.status = ["drafted"]; - if (startDate) { - data.body.CampaignDetails.startDate = Digit.Utils.date.convertDateToEpoch(startDate); - } else { - data.body.CampaignDetails.startDate = epochTimeForTomorrow12(); - } - if (endDate) { - data.body.CampaignDetails.endDate = Digit.Utils.date.convertDateToEpoch(endDate); - } - data.body.CampaignDetails.projectType = projectType?.[0]?.code; - - cleanObject(data.body.CampaignDetails); - - return data; - }, - populateProjectType: () => { - const tenantId = Digit.ULBService.getCurrentTenantId(); - - return { - url: "/egov-mdms-service/v1/_search", - params: { tenantId }, - body: { - MdmsCriteria: { - tenantId, - moduleDetails: [ - { - moduleName: "HCM-PROJECT-TYPES", - masterDetails: [ - { - name: "projectTypes", - }, - ], - }, - ], - }, - }, - changeQueryName: "projectType", - config: { - enabled: true, - select: (data) => { - const dropdownData = filterUniqueByKey(data?.MdmsRes?.["HCM-PROJECT-TYPES"]?.projectTypes, "code").map((row) => { - return { - ...row, - i18nKey: Digit.Utils.locale.getTransformedLocale(`CAMPAIGN_TYPE_${row.code}`), - }; - }); - return dropdownData; - }, - }, - }; - }, - customValidationCheck: (data) => { - //checking if both to and from date are present then they should be startDate<=endDate - const { startDate, endDate } = data; - const startDateEpoch = Digit.Utils.date.convertDateToEpoch(startDate); - const endDateEpoch = Digit.Utils.date.convertDateToEpoch(endDate); - - if (startDate && endDate && startDateEpoch > endDateEpoch) { - return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; - } - return false; - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - if (key === "CAMPAIGN_DATE") { - return `${Digit.DateUtils.ConvertEpochToDate(value)} - ${Digit.DateUtils.ConvertEpochToDate(row?.endDate)}`; - } - }, - }, - SearchMicroplan: { - preProcess: (data, additionalDetails) => { - const { name, status } = data?.state?.searchForm || {}; - - data.body.PlanConfigurationSearchCriteria = {}; - data.body.PlanConfigurationSearchCriteria.limit = data?.state?.tableForm?.limit; - // data.body.PlanConfigurationSearchCriteria.limit = 10 - data.body.PlanConfigurationSearchCriteria.offset = data?.state?.tableForm?.offset; - data.body.PlanConfigurationSearchCriteria.name = name; - data.body.PlanConfigurationSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId(); - data.body.PlanConfigurationSearchCriteria.userUuid = Digit.UserService.getUser().info.uuid; - // delete data.body.PlanConfigurationSearchCriteria.pagination - data.body.PlanConfigurationSearchCriteria.status = status?.status; - cleanObject(data.body.PlanConfigurationSearchCriteria); - return data; - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - if (key === "CAMPAIGN_DATE") { - return `${Digit.DateUtils.ConvertEpochToDate(value)} - ${Digit.DateUtils.ConvertEpochToDate(row?.CampaignDetails?.endDate)}`; - } - }, - }, -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/constants.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/constants.js deleted file mode 100644 index c9f5af95d46..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/constants.js +++ /dev/null @@ -1,36 +0,0 @@ -export const LOCALITY = "Locality"; - -export const EXCEL = "Excel"; - -export const GEOJSON = "GeoJSON"; - -export const SHAPEFILE = "Shapefile"; - -export const commonColumn = "boundaryCode"; - -export const ACCEPT_HEADERS = { - GeoJSON: "application/geo+json", - Shapefile: "application/shapefile", - Excel: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", -}; - -// Define the colors of the gradient for choropleth mapping -export const MapChoroplethGradientColors = [ - { percent: 0, color: "#edd1cf" }, - { percent: 100, color: "#b52626" }, -]; - -export const PRIMARY_THEME_COLOR = "#C84C0E"; - -export const BOUNDARY_DATA_SHEET = "MICROPLAN_BOUNDARY_DATA_SHEET"; -export const FACILITY_DATA_SHEET = "MICROPLAN_FACILITY_DATA_SHEET"; - -export const FILE_STORE = "microplan"; - -export const SHEET_PASSWORD = "eGov_sheet_password"; - -export const SHEET_COLUMN_WIDTH = 40; - -export const SCHEMA_PROPERTIES_PREFIX = "DISPLAY"; - -export const UNPROTECT_TILL_ROW = "10000"; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/timeLineOptions.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/timeLineOptions.json deleted file mode 100644 index 768e323ef86..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/timeLineOptions.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "timeLineOptions": [ - { - "id": 0, - "name": "MICROPLAN_DETAILS", - "component": "MicroplanDetails", - "checkForCompleteness": true - }, - { - "id": 1, - "name": "UPLOAD_DATA", - "component": "Upload", - "checkForCompleteness": true - }, - { - "id": 2, - "name": "HYPOTHESIS", - "component": "Hypothesis", - "checkForCompleteness": true - }, - { - "id": 3, - "name": "FORMULA_CONFIGURATION", - "component": "RuleEngine", - "checkForCompleteness": true - }, - { - "id": 4, - "name": "MAPPING", - "component": "Mapping", - "checkForCompleteness": false - }, - { - "id": 5, - "name": "MICROPLAN_GENERATION", - "component": "MicroplanPreview", - "checkForCompleteness": false - } - ] -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/tourSteps.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/tourSteps.js deleted file mode 100644 index 241f8ec64ec..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/configs/tourSteps.js +++ /dev/null @@ -1,193 +0,0 @@ -export const tourSteps = (t) => { - return { - microplanDetails: { - name: "microplanDetails", - run: true, - steps: [ - { - content: t("HELP_MICROPLAN_DETAILS_CAMPAIGN_DETAILS"), - target: ".microplan-campaign-detials", - disableBeacon: true, - placement: "bottom", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - { - content: t("HELP_MICROPLAN_DETAILS_MICROPLAN_NAME"), - target: ".microplan-name", - disableBeacon: true, - placement: "bottom", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - ], - tourActive: true, - }, - upload: { - name: "upload", - run: true, - steps: [ - { - content: t("HELP_UPLOAD_FILETYPE_OPTION_CONTAINER"), - target: ".upload-option-container", - disableBeacon: true, - placement: "top-end", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - ], - tourActive: true, - }, - hypothesis: { - name: "hypothesis", - run: true, - steps: [ - { - content: t("HELP_HYPOTHESIS_INTERACTABLE_SECTION"), - target: ".hypothesis-help", - disableBeacon: true, - placement: "right-start", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - // { - // content: - // t("HELP_RULE_ENGINE_INPUT"), - // target: ".last-container .key", - // disableBeacon: true, - // placement: "top-start", - // title: "", - // }, - // { - // content: - // t("HELP_HYPOTHESIS_DELETE_BUTTON"), - // target: ".last-containe .delete-button-help-locator", - // disableBeacon: true, - // placement: "top-start", - // title: "", - // }, - { - content: t("HELP_HYPOTHESIS_ADD_BUTTON"), - target: ".add-button-help", - disableBeacon: true, - placement: "top-start", - title: "", - disableOverlay :true, - }, - ], - tourActive: true, - }, - ruleEngine: { - name: "ruleEngine", - run: true, - steps: [ - { - content: t("HELP_RULE_ENGINE_INTERACTABLE_SECTION"), - target: ".rule-engine-help", - disableBeacon: true, - placement: "right-start", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - { - content: t("HELP_RULE_ENGINE_INPUT"), - target: ".user-input-section .interactable-section .select-and-input-wrapper-first .input", - disableBeacon: true, - placement: "top-end", - title: "", - disableOverlay :true, - }, - { - content: t("HELP_RULE_ENGINE_DELETE_BUTTON"), - target: ".select-and-input-wrapper-first .delete-button", - disableBeacon: true, - placement: "left-start", - title: "", - disableOverlay :true, - }, - { - content: t("HELP_RULE_ENGINE_ADD_BUTTON"), - target: ".add-button-help", - disableBeacon: true, - placement: "top-start", - title: "", - disableOverlay :true, - }, - ], - tourActive: true, - }, - mapping: { - name: "mapping", - run: true, - steps: [ - { - content: t("HELP_MAPPING_BOUNDARY_SELECTION"), - target: ".filter-by-boundary .button-primary", - disableBeacon: true, - placement: "right-end", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - { - content: t("HELP_MAPPING_BASE_MAP"), - target: ".base-map-selector .icon-first", - disableBeacon: true, - placement: "left-start", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - { - content: t("HELP_MAPPING_FILTER"), - target: ".filter-icon p", - disableBeacon: true, - placement: "left-start", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - { - content: t("HELP_MAPPING_VIRTUALIZATION"), - target: ".virtualization-icon p", - disableBeacon: true, - placement: "left-start", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - { - content: t("HELP_MAPPING_MAP_GEOMETRIES"), - target: ".map-container", - disableBeacon: true, - placement: "top-end", - title: "", - disableScrolling: true, - disableOverlay :true, - }, - ], - tourActive: true, - }, - microplanPreview: { - name: "microplanPreview", - run: true, - steps: [ - { - content: t("HELP_MICROPLAN_DETAILS_EDIT_ROWS"), - target: ".preview-container", - disableBeacon: true, - placement: "top-end", - title: "", - disableOverlay :true, - disableScrolling: true, - }, - ], - tourActive: true, - }, - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/index.js deleted file mode 100644 index 1241d678738..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import utils from "../utils"; -import useCreatePlanConfig from "./useCreatePlanConfig"; -import useSearchPlanConfig from "./useSearchPlanConfig"; -import useUpdatePlanConfig from "./useUpdatePlanConfig"; -import useSavedMicroplans from "./useSavedMicroplans"; -import useSearchCampaign from "./useSearchCampaign"; -import { useGenerateIdCampaign } from "./useGenerateIdCampaign"; -const UserService = {}; - -const microplan = { - useCreatePlanConfig, - useSearchPlanConfig, - useUpdatePlanConfig, - useSavedMicroplans, - useSearchCampaign, - useGenerateIdCampaign, -}; - -const contracts = {}; - -const Hooks = { - attendance: { - update: () => {}, - }, - microplan, - contracts, -}; - -const Utils = { - browser: { - sample: () => {}, - }, - microplan: { - ...utils, - }, -}; - -export const CustomisedHooks = { - Hooks, - UserService, - Utils, -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useCreatePlanConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useCreatePlanConfig.js deleted file mode 100644 index 6afb891b15b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useCreatePlanConfig.js +++ /dev/null @@ -1,8 +0,0 @@ -import { useMutation } from "react-query"; -import CreatePlanConfig from "../services/CreatePlanConfig"; - -const useCreatePlanConfig = () => { - return useMutation(data => CreatePlanConfig(data)) -} - -export default useCreatePlanConfig; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useGenerateIdCampaign.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useGenerateIdCampaign.js deleted file mode 100644 index f315dda5ff8..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useGenerateIdCampaign.js +++ /dev/null @@ -1,26 +0,0 @@ -export const useGenerateIdCampaign = ({ type, hierarchyType, filters, campaignId, config = {} }) => { - const updatedFilters = filters?.map(({ type, ...rest }) => ({ - ...rest, - boundaryType: type, - })); - const reqCriteria = { - url: `/project-factory/v1/data/_generate`, - changeQueryName: `${type}${hierarchyType}${filters}`, - params: { - tenantId: Digit.ULBService.getCurrentTenantId(), - type: type, - forceUpdate: true, - hierarchyType: hierarchyType, - campaignId: campaignId, - }, - body: type === "boundary" ? (updatedFilters === undefined ? { Filters: null } : { Filters: { boundaries: updatedFilters } }) : {}, - config: { - ...config, - cacheTime: 0, - staleTime: 0, - }, - }; - const { data: Data, refetch, isLoading } = Digit.Hooks.useCustomAPIHook(reqCriteria); - - return { isLoading: isLoading, data: Data?.GeneratedResource?.[0]?.id, refetch }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useNumberFormatter.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useNumberFormatter.js deleted file mode 100644 index 15e423d59e0..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useNumberFormatter.js +++ /dev/null @@ -1,21 +0,0 @@ -import { useTranslation } from "react-i18next"; - -export const useNumberFormatter = (FormatMapping) => { - const { i18n } = useTranslation(); - - const formatNumber = (value, options) => { - try { - const currentLanguage = i18n.language; - const fallbackLanguage = i18n.options.fallbackLng[0]; // Get the first language in the fallback list - const locale = FormatMapping?.[currentLanguage] || FormatMapping?.[fallbackLanguage] || currentLanguage || ""; - return new Intl.NumberFormat(locale, options).format(value); - } catch (error) { - console.error("Error formatting number:", error); - return value; - } - }; - - return { formatNumber }; -}; - -export default useNumberFormatter; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSavedMicroplans.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSavedMicroplans.js deleted file mode 100644 index 23c1259c6c4..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSavedMicroplans.js +++ /dev/null @@ -1,23 +0,0 @@ -import { useQuery } from "react-query"; -import SearchSavedPlans from "../services/searchSavedPlans"; - -const useSavedMicroplans = (reqCriteria) => { - const { body, config, params, state, url } = reqCriteria; - const { isLoading, data, isFetching, refetch } = useQuery(["SAVED_MICROPLANS", url], () => SearchSavedPlans(body), { - ...config, - cacheTime: 0, - staleTime: 0, - onError: (err) => console.error("Error fetching saved microplans:", err), - }); - - return { - isLoading, - isFetching, - data, - refetch, - revalidate: () => {}, - }; -}; - -// () => SearchSavedPlans(data) -export default useSavedMicroplans; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSearchCampaign.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSearchCampaign.js deleted file mode 100644 index e2644f00ca9..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSearchCampaign.js +++ /dev/null @@ -1,8 +0,0 @@ -import { useQuery } from "react-query"; -import SearchCampaignConfig from "../services/SearchCampaignConfig"; - -const useSearchCampaign = (data, config = {}) => { - return useQuery(["SEARCH_CAMPAIGN",data], () => SearchCampaignConfig(data), { ...config }); -}; - -export default useSearchCampaign; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSearchPlanConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSearchPlanConfig.js deleted file mode 100644 index 003fdaa4f51..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useSearchPlanConfig.js +++ /dev/null @@ -1,8 +0,0 @@ -import { useMutation } from "react-query"; -import SearchPlanConfig from "../services/SearchPlanConfig"; - -const useSearchPlanConfig = (data, config = {}) => { - return useQuery([data?.tenantId, data?.id, data?.name, data?.executionPlanId, data?.userUuid, data?.offset, data?.limit], () => SearchPlanConfig(data), { ...config }); -}; - -export default useSearchPlanConfig; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useUpdatePlanConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useUpdatePlanConfig.js deleted file mode 100644 index 17b16145a08..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/useUpdatePlanConfig.js +++ /dev/null @@ -1,8 +0,0 @@ -import { useMutation } from "react-query"; -import UpdatePlanConfig from "../services/UpdatePlanConfig"; - -const useUpdatePlanConfig = () => { - return useMutation(data => UpdatePlanConfig(data)) -} - -export default useUpdatePlanConfig; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/icons/Svg.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/icons/Svg.js deleted file mode 100644 index 03f82f59456..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/icons/Svg.js +++ /dev/null @@ -1,217 +0,0 @@ -import React from "react"; - -export const PopulationSvg = (style) => { - return ` - - - - - - - - - - - - `; -}; - -export const HelpOutlineIcon = ({ className = "", fill = "", style = {} }) => ( - - - - - - - - - - -); - -export const DefaultMapMarkerSvg = (style) => { - return ` - - - - - `; -}; - - -export const WarehouseMarker = ({ - className = "", - fill = "white", - fillBackground = "#42BBFF", - style = {}, - width = "3.125rem", - height = "3.125rem", -}) => { - return ` - - - - - - - - - - - - `; -}; - -export const Warehouse = ({ className = "", fill = "white", fillBackground = "#42BBFF", style = {}, width = "1.5rem", height = "1.5rem" }) => { - return ( - - - - - - - - - - - - ); -}; - -export const Church = ({ className = "", fill = "white", fillBackground = "#064466", style = {}, width = "1.5rem", height = "1.5rem" }) => { - return ( - - - - - - - - - - - - - ); -}; - -export const School = ({ className = "", fill = "white", fillBackground = "#FF7B42", style = {}, width = "1.5rem", height = "1.5rem" }) => { - return ( - - - - - - - - - - - - - - - - - ); -}; - -export const HealthFacility = ({ className = "", fill = "white", fillBackground = "#0C9219", style = {}, width = "1.5rem", height = "1.5rem" , onClick=null}) => { - return ( - - - - - - - - - - - - ); -}; - -export const ChurchMarker = ({ className = "", fill = "white", fillBackground = "#064466", style = {}, width = "3.125rem", height = "3.125rem" }) => { - return ` - - - - - -`; -}; - -export const SchoolMarker = ({ className = "", fill = "white", fillBackground = "#FF7B42", style = {}, width = "3.125rem", height = "3.125rem" }) => { - return ` - - - - - - - - - - - - - - - - -`; -}; - -export const HealthFacilityMarker = ({ - className = "", - fill = "white", - fillBackground = "#0C9219", - style = {}, - width = "3.125rem", - height = "3.125rem", -}) => { - return ` - - - - - - - - - - - -`; -}; - - - - - -export const PlusWithSurroundingCircle = ({ className = "", fill = "white", fillBackground = "#FF7B42", style = {}, width = "1rem", height = "1rem" ,onClick=null }) => { - return ( - - - - ); -}; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js deleted file mode 100644 index 3885795450c..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js +++ /dev/null @@ -1,288 +0,0 @@ -import React, { useState, useEffect, useCallback, Fragment } from "react"; -import { useTranslation } from "react-i18next"; -import { timeLineOptions } from "../../configs/timeLineOptions.json"; -import Upload from "../../components/Upload"; -import Hypothesis from "../../components/Hypothesis"; -import RuleEngine from "../../components/RuleEngine"; -import Mapping from "../../components/Mapping"; -import Navigator from "../../components/Nagivator"; -import { Toast } from "@egovernments/digit-ui-components"; -import MicroplanPreview from "../../components/MicroplanPreview"; -import MicroplanDetails from "../../components/MicroplanDetails"; - -export const components = { - MicroplanDetails, - Upload, - Hypothesis, - RuleEngine, - Mapping, - MicroplanPreview, -}; - -import MicroplanCreatedScreen from "../../components/MicroplanCreatedScreen"; -import { LoaderWithGap, Tutorial } from "@egovernments/digit-ui-react-components"; -import { useMyContext } from "../../utils/context"; -import { updateSessionUtils } from "../../utils/updateSessionUtils"; -import { render } from "react-dom"; - -// Main component for creating a microplan -const CreateMicroplan = () => { - // Fetching data using custom MDMS hook - const { id: campaignId = "" } = Digit.Hooks.useQueryParams(); - const { mutate: CreateMutate } = Digit.Hooks.microplan.useCreatePlanConfig(); - const { mutate: UpdateMutate } = Digit.Hooks.microplan.useUpdatePlanConfig(); - const [toRender, setToRender] = useState("navigator"); - const { t } = useTranslation(); - - // States - const [microplanData, setMicroplanData] = useState(); - const [operatorsObject, setOperatorsObject] = useState([]); - const [toast, setToast] = useState(); - const [checkForCompleteness, setCheckForCompletion] = useState([]); - const [loaderActivation, setLoaderActivation] = useState(false); - const { state } = useMyContext(); - - //fetch campaign data - const { id = "" } = Digit.Hooks.useQueryParams(); - const { isLoading: isCampaignLoading, data: campaignData } = Digit.Hooks.microplan.useSearchCampaign( - { - CampaignDetails: { - tenantId: Digit.ULBService.getCurrentTenantId(), - ids: [id], - }, - }, - { - enabled: !!id, - } - ); - // to save microplan helper data to ssn - useEffect(() => { - if (campaignData) Digit.SessionStorage.set("microplanHelperData", { ...Digit.SessionStorage.get("microplanHelperData"), campaignData }); - }, [campaignData]); - - const campaignType = campaignData?.projectType; - - // request body for boundary hierarchy api - const reqCriteria = { - url: `/boundary-service/boundary-hierarchy-definition/_search`, - params: {}, - body: { - BoundaryTypeHierarchySearchCriteria: { - tenantId: Digit.ULBService.getStateId(), - hierarchyType: campaignData?.hierarchyType, - }, - }, - config: { - enabled: !!campaignData?.hierarchyType, - select: (data) => { - return data?.BoundaryHierarchy?.[0]?.boundaryHierarchy?.map((item) => item?.boundaryType) || {}; - }, - }, - }; - const { isLoading: ishierarchyLoading, data: hierarchyData } = Digit.Hooks.useCustomAPIHook(reqCriteria); - - // useEffect to initialise the data from MDMS - useEffect(() => { - let temp; - if (!state || !state.UIConfiguration) return; - const UIConfiguration = state?.UIConfiguration || {}; - if (UIConfiguration) temp = UIConfiguration.find((item) => item.name === "ruleConfigure"); - if (!temp?.ruleConfigureOperators) return; - setOperatorsObject(temp.ruleConfigureOperators); - }, []); - - // useEffect to store data in session storage - useEffect(() => { - if (!microplanData) return; - Digit.SessionStorage.set("microplanData", microplanData); - }, [microplanData]); - - // useEffect to store data in session storage - useEffect(() => { - const data = Digit.SessionStorage.get("microplanData"); - if (data?.microplanStatus === "GENERATED") setToRender("success-screen"); - let statusData = {}; - let toCheckCompletenesData = []; - timeLineOptions.forEach((item) => { - statusData[item.name] = false; - if (item?.checkForCompleteness) toCheckCompletenesData.push(item.name); - }); - if (data && data?.status) { - if (Object.keys(data?.status) === 0) setMicroplanData({ ...data, status: statusData }); - else setMicroplanData({ ...data }); - } - setCheckForCompletion(toCheckCompletenesData); - }, []); - - // An addon function to pass to Navigator - const nextEventAddon = useCallback( - async (currentPage, checkDataCompletion, setCheckDataCompletion) => { - if (!microplanData) { - setCheckDataCompletion("perform-action"); - return; - } - setMicroplanData((previous) => ({ - ...previous, - status: { ...previous?.status, [currentPage?.name]: checkDataCompletion === "valid" }, - })); - - setCheckDataCompletion("false"); - let body = Digit.Utils.microplan.mapDataForApi( - microplanData, - operatorsObject, - microplanData?.microplanDetails?.name, - campaignId, - "DRAFT", - microplanData?.planConfigurationId ? "update" : "create" - ); - if (!Digit.Utils.microplan.planConfigRequestBodyValidator(body, state, campaignType)) { - setCheckDataCompletion("perform-action"); - return; - } - setLoaderActivation(true); - try { - if (!microplanData?.planConfigurationId) { - await createPlanConfiguration(body, setCheckDataCompletion, setLoaderActivation, state); - } else if (microplanData?.planConfigurationId) { - await updatePlanConfiguration(body, setCheckDataCompletion, setLoaderActivation, state); - } - } catch (error) { - console.error("Failed to create/update plan configuration:", error); - } - }, - [microplanData, UpdateMutate, CreateMutate] - ); - - const createPlanConfiguration = async (body, setCheckDataCompletion, setLoaderActivation, state) => { - await CreateMutate(body, { - onSuccess: async (data) => { - const readMeConstant = state?.CommonConstants?.find((item) => item?.name === "readMeSheetName"); - const additionalProps = { - hierarchyData: hierarchyData, - t, - campaignType, - campaignData, - readMeSheetName: readMeConstant ? readMeConstant.value : undefined, - }; - const computedSession = await updateSessionUtils.computeSessionObject(data?.PlanConfiguration[0], state, additionalProps); - if (computedSession) { - computedSession.microplanStatus = "DRAFT"; - setMicroplanData(computedSession); - } else { - console.error("Failed to compute session data."); - } - setLoaderActivation(false); - setCheckDataCompletion("perform-action"); - }, - onError: (error, variables) => { - setToast({ - message: t("ERROR_DATA_NOT_SAVED"), - state: "error", - transitionTime: 10000, - }); - setTimeout(() => { - setLoaderActivation(false); - setCheckDataCompletion("false"); - }, 2000); - }, - }); - }; - - const updatePlanConfiguration = async (body, setCheckDataCompletion, setLoaderActivation, state) => { - body.PlanConfiguration["id"] = microplanData?.planConfigurationId; - body.PlanConfiguration["auditDetails"] = microplanData?.auditDetails; - await UpdateMutate(body, { - onSuccess: async (data) => { - const readMeConstant = state?.CommonConstants?.find((item) => item?.name === "readMeSheetName"); - const additionalProps = { - hierarchyData: hierarchyData, - t, - campaignType, - campaignData, - readMeSheetName: readMeConstant ? readMeConstant.value : undefined, - }; - const computedSession = await updateSessionUtils.computeSessionObject(data?.PlanConfiguration[0], state, additionalProps); - if (computedSession) { - computedSession.microplanStatus = "DRAFT"; - setMicroplanData(computedSession); - } else { - console.error("Failed to compute session data."); - } - setLoaderActivation(false); - setCheckDataCompletion("perform-action"); - }, - onError: (error, variables) => { - setToast({ - message: t("ERROR_DATA_NOT_SAVED"), - state: "error", - transitionTime: 10000, - }); - setTimeout(() => { - setLoaderActivation(false); - setCheckDataCompletion("false"); - }, 2000); - }, - }); - }; - - const setCurrentPageExternally = useCallback( - (props) => { - switch (props.method) { - case "set": { - let currentPage; - const data = Digit.SessionStorage.get("microplanData"); - if (data?.currentPage) currentPage = data.currentPage; - if (currentPage && props?.setCurrentPage && timeLineOptions.find((item) => item.id === currentPage?.id)) { - props.setCurrentPage(currentPage); - return true; - } - break; - } - case "save": { - if (props.currentPage) { - setMicroplanData((previous) => ({ ...previous, currentPage: props.currentPage })); - } - break; - } - } - }, - [microplanData, setMicroplanData, Navigator] - ); - - const completeNavigation = useCallback(() => { - setToRender("success-screen"); - }, [setToRender]); - - return ( - <> -
- {toRender === "navigator" && ( - - )} - {toRender === "success-screen" && } -
- {toast && ( - setToast(undefined)} - /> - )} - {loaderActivation && } - - ); -}; - -export default CreateMicroplan; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Guidelines.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Guidelines.js deleted file mode 100644 index 7534c1b2af1..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Guidelines.js +++ /dev/null @@ -1,54 +0,0 @@ -import React, { Fragment } from "react"; -import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; -import { ArrowForward } from "@egovernments/digit-ui-svg-components"; -import { Button } from "@egovernments/digit-ui-react-components"; -import { useHistory } from "react-router-dom"; -import { ActionBar } from "@egovernments/digit-ui-components"; - -const Guidelines = ({ path }) => { - const { t } = useTranslation(); - const history = useHistory() - // Keeping inline style for now because design for this screen is not given yet - const { id = "" } = Digit.Hooks.useQueryParams(); - const onNextClick = ()=>{ - history.push(`/${window.contextPath}/employee/microplanning/create-microplan?id=${id}`); - } - return ( - <> - -
- {t("CREATE_MICROPLAN_GUIDELINES")} -
- - {/* Action bar */} - - {/* Next/Submit button */} - - - - ); -}; - -export default Guidelines; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/SavedMicroplans.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/SavedMicroplans.js deleted file mode 100644 index bbb0aef7628..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/SavedMicroplans.js +++ /dev/null @@ -1,200 +0,0 @@ -import React, { useState } from "react"; -import { useTranslation } from "react-i18next"; -import { Header, InboxSearchComposerV2, Loader } from "@egovernments/digit-ui-react-components"; -import { useHistory } from "react-router-dom"; -import { updateSessionUtils } from "../../utils/updateSessionUtils"; -import { useMyContext } from "../../utils/context"; - -const configs = { - label: "SAVED_MICROPLANS", - type: "search", - apiDetails: { - serviceName: "/plan-service/config/_search", - requestParam: {}, - requestBody: {}, - minParametersForSearchForm: 0, - masterName: "commonUiConfig", - moduleName: "SearchMicroplan", - tableFormJsonPath: "requestBody.PlanConfigurationSearchCriteria.pagination", - searchFormJsonPath: "requestBody.PlanConfigurationSearchCriteria", - }, - sections: { - search: { - uiConfig: { - type: "search", - typeMobile: "filter", - headerLabel: "SAVED_MICROPLANS", - headerStyle: null, - primaryLabel: "ES_COMMON_SEARCH", - secondaryLabel: "ES_COMMON_CLEAR_SEARCH", - minReqFields: 0, - // "showFormInstruction": "TQM_SEARCH_HINT", - defaultValues: { - name: "", - status: "", - }, - fields: [ - { - label: "MICROPLAN_NAME", - type: "text", - isMandatory: false, - disable: false, - populators: { - name: "name", - style: { - marginBottom: "0px", - }, - }, - }, - { - label: "MICROPLAN_STATUS", - type: "dropdown", - isMandatory: false, - disable: false, - populators: { - name: "status", - optionsKey: "status", - optionsCustomStyle: { - top: "2.3rem", - }, - mdmsConfig: { - masterName: "MicroplanStatus", - moduleName: "hcm-microplanning", - localePrefix: "MICROPLAN_STATUS", - }, - }, - }, - ], - }, - label: "", - children: {}, - show: true, - // "labelMobile": "TQM_INBOX_SEARCH" - }, - searchResult: { - uiConfig: { - columns: [ - { - label: "MICROPLAN_NAME", - jsonPath: "name", - }, - { - label: "MICROPLAN_STATUS", - jsonPath: "status", - prefix: "MICROPLAN_STATUS_COLUMN_", - translate: true, - }, - { - label: "CAMPAIGNS_ASSIGNED", - jsonPath: "CampaignDetails.campaignName", - }, - { - label: "CAMPAIGN_DATE", - jsonPath: "CampaignDetails.startDate", - additionalCustomization: true, - }, - ], - showActionBarMobileCard: true, - actionButtonLabelMobileCard: "TQM_VIEW_RESULTS", - enableGlobalSearch: false, - enableColumnSort: true, - resultsJsonPath: "PlanConfiguration", - tableClassName: "table pqm-table", - noColumnBorder: true, - rowClassName: "table-row-mdms table-row-mdms-hover", - }, - children: {}, - show: true, - }, - }, - additionalSections: {}, - persistFormData: true, - showAsRemovableTagsInMobile: false, - customHookName: "microplan.useSavedMicroplans", -}; - -const SavedMicroplans = () => { - const [showLoader, setShowLoader] = useState(false); - const { state } = useMyContext(); - const history = useHistory(); - const { t } = useTranslation(); - - const fetchHierarchyData = async (hierarchyType) => { - const response = await Digit.CustomService.getResponse({ - url: "/boundary-service/boundary-hierarchy-definition/_search", - useCache: false, - method: "POST", - userService: false, - body: { - BoundaryTypeHierarchySearchCriteria: { - tenantId: Digit.ULBService.getStateId(), - hierarchyType, - }, - }, - }); - if (response?.BoundaryHierarchy?.length) { - return response.BoundaryHierarchy[0].boundaryHierarchy.map((item) => item.boundaryType); - } - console.error("Invalid response structure"); - }; - - const computeAdditionalProps = (row, state, t, hierarchyData) => { - const campaignDetails = row?.original?.CampaignDetails; - const readMeSheetName = state?.CommonConstants?.find((item) => item?.name === "readMeSheetName")?.value; - return { - hierarchyData, - t, - campaignType: campaignDetails?.projectType, - campaignData: campaignDetails, - readMeSheetName, - }; - }; - - const onClickRow = (row) => { - const handleClick = async () => { - setShowLoader(true); - try { - const campaignType = row?.original?.CampaignDetails?.projectType; - const hierarchyData = await fetchHierarchyData(row?.original?.CampaignDetails?.hierarchyType); - const additionalProps = computeAdditionalProps(row, state, t, hierarchyData); - - // Compute the session object based on the row?.original data and then re-route - const computedSession = await updateSessionUtils.computeSessionObject(row.original, state, additionalProps); - Digit.SessionStorage.set("microplanData", computedSession); - - setShowLoader(false); - history.push(`/${window.contextPath}/employee/microplanning/create-microplan?id=${row?.original?.executionPlanId}`); - } catch (error) { - console.error(`Failed to process the request: ${error.message}`); - setShowLoader(false); - } - }; - - handleClick(); - }; - - const savedMircoplanSession = Digit.Hooks.useSessionStorage("SAVED_MICROPLAN_SESSION", {}); - - if (showLoader) { - return ; - } - - return ( - -
{t(configs?.label)}
-
- -
-
- ); -}; - -export default SavedMicroplans; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/SelectCampaign.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/SelectCampaign.js deleted file mode 100644 index 8f2131eefdd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/SelectCampaign.js +++ /dev/null @@ -1,226 +0,0 @@ -import React, { useEffect, useMemo } from "react"; -import { useTranslation } from "react-i18next"; -import { Header, InboxSearchComposer, InboxSearchComposerV2, Loader } from "@egovernments/digit-ui-react-components"; -import { useHistory, useParams } from "react-router-dom"; - -const configs = { - label: "SELECT_CAMPAIGN", - type: "search", - apiDetails: { - serviceName: "/project-factory/v1/project-type/search", - requestParam: {}, - requestBody: {}, - minParametersForSearchForm: 0, - masterName: "commonUiConfig", - moduleName: "SearchCampaign", - tableFormJsonPath: "requestBody.CampaignDetails.pagination", - searchFormJsonPath: "requestBody.CampaignDetails", - }, - sections: { - search: { - uiConfig: { - type: "search", - // typeMobile: "filter", - headerLabel: "SELECT_CAMPAIGN", - headerStyle: null, - primaryLabel: "ES_COMMON_SEARCH", - secondaryLabel: "ES_COMMON_CLEAR_SEARCH", - minReqFields: 1, - // "showFormInstruction": "TQM_SEARCH_HINT", - defaultValues: { - campaignName: "", - projectType: "", - startDate: "", - endDate: "", - boundaryCode: "", - }, - fields: [ - { - label: "CAMPAIGN_NAME", - type: "text", - isMandatory: false, - disable: false, - populators: { - name: "campaignName", - style: { - marginBottom: "0px", - }, - error: "ERR_MIN_LENGTH_CAMPAIGN_NAME", - validationErrorStyles: { - marginTop: "0.3rem", - }, - validation: { - minLength: 2, - }, - }, - }, - // { - // label: "CAMPAIGN_TYPE", - // type: "dropdown", - // isMandatory: false, - // disable: false, - // populators: { - // name: "projectType", - // optionsKey: "name", - // optionsCustomStyle: { - // top: "2.3rem", - // }, - // mdmsConfig: { - // masterName: "projectTypes", - // moduleName: "HCM-PROJECT-TYPES", - // localePrefix: "CAMPAIGN_TYPE", - // }, - // }, - // }, - { - label: "CAMPAIGN_TYPE", - type: "apidropdown", - isMandatory: false, - disable: false, - populators: { - name: "projectType", - optionsKey: "i18nKey", - optionsCustomStyle: { - top: "2.3rem", - }, - allowMultiSelect: false, - masterName: "commonUiConfig", - moduleName: "SearchCampaign", - customfn: "populateProjectType", - }, - }, - { - label: "CAMPAIGN_START_DATE", - type: "date", - isMandatory: false, - key: "startDate", - disable: false, - preProcess: { - updateDependent: ["populators.max"], - }, - populators: { - name: "startDate", - style: { - marginBottom: "0px", - }, - error: "DATE_VALIDATION_MSG", - }, - }, - { - label: "CAMPAIGN_END_DATE", - type: "date", - isMandatory: false, - disable: false, - key: "endDate", - preProcess: { - updateDependent: ["populators.max"], - }, - populators: { - name: "endDate", - error: "DATE_VALIDATION_MSG", - min: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString().slice(0, 10), - style: { - marginBottom: "0px", - }, - }, - }, - // { - // label: "CAMPAIGN_BOUNDARY", - // type: "text", - // isMandatory: false, - // disable: false, - // populators: { - // name: "boundaryCode", - // style: { - // marginBottom: "0px", - // }, - // }, - // }, - ], - }, - label: "", - children: {}, - show: true, - // "labelMobile": "TQM_INBOX_SEARCH" - }, - searchResult: { - uiConfig: { - columns: [ - { - label: "CAMPAIGN_NAME", - jsonPath: "campaignName", - // "additionalCustomization": true - }, - { - label: "CAMPAIGN_TYPE", - jsonPath: "projectType", - // "additionalCustomization": false, - prefix: "CAMPAIGN_TYPE_", - translate: true, - }, - { - label: "CAMPAIGN_BOUNDARY_CAMP", - jsonPath: "boundaryCode", - // "additionalCustomization": false, - prefix: "CAMPAIGN_BOUNDARY_", - translate: true, - }, - { - label: "CAMPAIGN_BENEFICIARY_TYPE", - jsonPath: "additionalDetails.beneficiaryType", - prefix: "CAMPAIGN_BENEFICIARY_TYPE_", - translate: true, - }, - { - label: "CAMPAIGN_DATE", - jsonPath: "startDate", - additionalCustomization: true, - }, - ], - showActionBarMobileCard: true, - actionButtonLabelMobileCard: "TQM_VIEW_RESULTS", - enableGlobalSearch: false, - enableColumnSort: true, - resultsJsonPath: "CampaignDetails", - tableClassName: "table pqm-table", - rowClassName: "table-row-mdms table-row-mdms-hover", - noColumnBorder: true, - }, - children: {}, - show: true, - }, - }, - additionalSections: {}, - persistFormData: true, - showAsRemovableTagsInMobile: false, -}; -const SelectCampaign = () => { - const { t } = useTranslation(); - const history = useHistory(); - - const onClickRow = (row) => { - // history.push(`/${window.contextPath}/employee/microplanning/help-guidelines?id=${row?.original?.id}`); - history.push(`/${window.contextPath}/employee/microplanning/create-microplan?id=${row?.original?.id}`); - }; - - const SelectCampaignSession = Digit.Hooks.useSessionStorage("SELECT_CAMPAIGN_SESSION", {}); - - return ( - -
{t(configs?.label)}
-
- -
-
- ); -}; - -export default SelectCampaign; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/index.js deleted file mode 100644 index 6f58779637a..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/index.js +++ /dev/null @@ -1,128 +0,0 @@ -import React, { useEffect } from "react"; -import { Switch, useLocation } from "react-router-dom"; -import { useTranslation } from "react-i18next"; -import { PrivateRoute, AppContainer, BreadCrumb, Loader } from "@egovernments/digit-ui-react-components"; -import MicroplanningHeader from "../../components/MicroplanningHeader"; -import Guidelines from "./Guidelines"; -import CreateMicroplan from "./CreateMicroplan"; -import SavedMicroplans from "./SavedMicroplans"; -import SelectCampaign from "./SelectCampaign"; -import { useMyContext } from "../../utils/context"; - -const MicroplanningBreadCrumb = ({ location, defaultPath }) => { - const { t } = useTranslation(); - const pathVar = location.pathname.replace(`${defaultPath}/`, "").split("?")?.[0]; - const { masterName, moduleName, uniqueIdentifier } = Digit.Hooks.useQueryParams(); - - const crumbs = [ - { - path: `/${window?.contextPath}/employee`, - content: t("Home"), - show: true, - }, - // { - // content: t(`UPLOAD`) , - // show: pathVar.includes("upload")?true: false, - // }, - // { - // content: t(`HYPOTHESIS`) , - // show: pathVar.includes("hypothesis")?true: false, - // }, - // { - // content: t(`RULE_ENGINE`) , - // show: pathVar.includes("rule-engine")?true: false, - // }, - { - content: t(`CREATE_MICROPLAN`), - show: pathVar.includes("create-microplan"), - }, - { - content: t(`SAVED_MICROPLANS_TEXT`), - show: pathVar.includes("saved-microplan"), - }, - { - content: t(`CREATE_MICROPLAN`), - show: pathVar.includes("select-campaign"), - }, - ]; - return ; -}; - -const App = ({ path }) => { - const { dispatch } = useMyContext(); - - const location = useLocation(); - const MDMSCreateSession = Digit.Hooks.useSessionStorage("MDMS_add", {}); - const [sessionFormData, setSessionFormData, clearSessionFormData] = MDMSCreateSession; - - const MDMSViewSession = Digit.Hooks.useSessionStorage("MDMS_view", {}); - const [sessionFormDataView, setSessionFormDataView, clearSessionFormDataView] = MDMSViewSession; - - const { isLoading: isLoadingMdmsBaseData, data } = Digit.Hooks.useCustomMDMS( - Digit.ULBService.getCurrentTenantId(), - "hcm-microplanning", - [ - { name: "UploadConfiguration" }, - { name: "UIConfiguration" }, - { name: "Schemas" }, - { name: "RuleConfigureOutput" }, - { name: "Resources" }, - { name: "HypothesisAssumptions" }, - { name: "BaseMapLayers" }, - { name: "MicroplanPreviewAggregates" }, - { name: "AutoFilledRuleConfigurations" }, - { name: "MapFilters" }, - { name: "HierarchyConfigurations" }, - { name: "NumberFormatMappingForTranslation" }, - { name: "UploadGuidelines" }, - { name: "ReadMeData" }, - { name: "CommonConstants" }, - ], - { - select: (data) => { - dispatch({ - type: "SETINITDATA", - state: { - ...data?.["hcm-microplanning"], - }, - }); - }, - } - ); - - //destroying session - useEffect(() => { - const pathVar = location.pathname.replace(`${path}/`, "").split("?")?.[0]; - Digit.Utils.microplan.destroySessionHelper(pathVar, ["create-microplan"], "microplanData"); - Digit.Utils.microplan.destroySessionHelper(pathVar, ["create-microplan"], "microplanHelperData"); - Digit.Utils.microplan.destroySessionHelper(pathVar, ["select-campaign"], "SELECT_CAMPAIGN_SESSION"); - Digit.Utils.microplan.destroySessionHelper(pathVar, ["saved-microplans"], "SAVED_MICROPLAN_SESSION"); - }, [location]); - - if (isLoadingMdmsBaseData) { - return ; - } - - return ( - -
- - -
- - - {/* } /> - } /> - } /> */} - } /> - - } /> - } /> - } /> - - -
- ); -}; - -export default App; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/CreatePlanConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/CreatePlanConfig.js deleted file mode 100644 index cabc9b67b56..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/CreatePlanConfig.js +++ /dev/null @@ -1,19 +0,0 @@ -const CreatePlanConfig = async (body) => { - try { - const response = await Digit.CustomService.getResponse({ - url: "/plan-service/config/_create", - useCache: false, - method: "POST", - userService: true, - body, - }); - return response; - } catch (error) { - if (error?.response?.data?.Errors) { - throw new Error(error.response.data.Errors[0].message); - } - throw new Error("An unknown error occurred"); - } -}; - -export default CreatePlanConfig; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/Search.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/Search.js deleted file mode 100644 index 83d4fb5fc72..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/Search.js +++ /dev/null @@ -1,181 +0,0 @@ -import _ from "lodash"; - -const createProjectsArray = (t, project, searchParams, headerLocale) => { - let totalProjects = { - searchedProject: {}, - subProjects: [], - }; - let basicDetails = {}; - let totalProjectsLength = project.length; - // for(let projectIndex = 0; projectIndex < totalProjectsLength; projectIndex++) { - let currentProject = project[0]; - const headerDetails = { - title: " ", - asSectionHeader: true, - values: [ - { title: "WORKS_PROJECT_ID", value: currentProject?.projectNumber || "NA" }, - { title: "ES_COMMON_PROPOSAL_DATE", value: Digit.Utils.pt.convertEpochToDate(currentProject?.additionalDetails?.dateOfProposal) || "NA" }, - { title: "WORKS_PROJECT_NAME", value: currentProject?.name || "NA" }, - { title: "PROJECT_PROJECT_DESC", value: currentProject?.description || "NA" }, - ], - }; - - const projectDetails = { - title: "WORKS_PROJECT_DETAILS", - asSectionHeader: true, - values: [ - { title: "PROJECT_LOR", value: currentProject?.referenceID || "NA" }, - { - title: "WORKS_PROJECT_TYPE", - value: currentProject?.projectType ? t(`COMMON_MASTERS_${Digit.Utils.locale.getTransformedLocale(currentProject?.projectType)}`) : "NA", - }, - { - title: "PROJECT_TARGET_DEMOGRAPHY", - value: currentProject?.additionalDetails?.targetDemography - ? t(`COMMON_MASTERS_${currentProject?.additionalDetails?.targetDemography}`) - : "NA", - }, - { - title: "PROJECT_ESTIMATED_COST", - value: currentProject?.additionalDetails?.estimatedCostInRs - ? `₹ ${Digit.Utils.dss.formatterWithoutRound(currentProject?.additionalDetails?.estimatedCostInRs, "number")}` - : "NA", - }, - ], - }; - - const locationDetails = { - title: "WORKS_LOCATION_DETAILS", - asSectionHeader: true, - values: [ - { - title: "WORKS_GEO_LOCATION", - value: - currentProject?.address?.latitude || currentProject?.address?.longitude - ? `${currentProject?.address?.latitude}, ${currentProject?.address?.longitude}` - : "NA", - }, - { - title: "WORKS_CITY", - value: currentProject?.address?.city ? t(`TENANT_TENANTS_${Digit.Utils.locale.getTransformedLocale(currentProject?.address?.city)}`) : "NA", - }, //will check with Backend - { title: "WORKS_WARD", value: currentProject?.address?.boundary ? t(`${headerLocale}_ADMIN_${currentProject?.address?.boundary}`) : "NA" }, ///backend to update this - { - title: "WORKS_LOCALITY", - value: currentProject?.additionalDetails?.locality ? t(`${headerLocale}_ADMIN_${currentProject?.additionalDetails?.locality}`) : "NA", - }, - ], - }; - - // const financialDetails = { - // title: "WORKS_FINANCIAL_DETAILS", - // asSectionHeader: false, - // values: [ - // { title: "WORKS_HEAD_OF_ACCOUNTS", value: currentProject?.additionalDetails?.fund ? t(`COMMON_MASTERS_FUND_${currentProject?.additionalDetails?.fund}`) : "NA" }, - // ], - // }; - - let documentDetails = { - title: "", - asSectionHeader: true, - additionalDetails: { - documents: [ - { - title: "WORKS_RELEVANT_DOCUMENTS", - BS: "Works", - values: currentProject?.documents?.map((document) => { - if (document?.status !== "INACTIVE") { - return { - title: document?.documentType === "OTHERS" ? document?.additionalDetails?.otherCategoryName : t(`PROJECT_${document?.documentType}`), - documentType: document?.documentType, - documentUid: document?.fileStore, - fileStoreId: document?.fileStore, - }; - } - return {}; - }), - }, - ], - }, - }; - - //filter any empty object - documentDetails.additionalDetails.documents[0].values = documentDetails?.additionalDetails?.documents?.[0]?.values?.filter((value) => { - if (value?.title) { - return value; - } - }); - - // if(currentProject?.projectNumber === searchParams?.Projects?.[0]?.projectNumber) { - basicDetails = { - projectID: currentProject?.projectNumber, - projectProposalDate: Digit.Utils.pt.convertEpochToDate(currentProject?.additionalDetails?.dateOfProposal) || "NA", - projectName: currentProject?.name || "NA", - projectDesc: currentProject?.description || "NA", - projectHasSubProject: totalProjectsLength > 1 ? "COMMON_YES" : "COMMON_NO", - projectParentProjectID: currentProject?.ancestors?.[0]?.projectNumber || "NA", - uuid: currentProject?.id, - address: currentProject?.address, - ward: currentProject?.address?.boundary, - locality: currentProject?.additionalDetails?.locality, - }; - totalProjects.searchedProject = { - basicDetails, - headerDetails, - projectDetails, - locationDetails, - documentDetails, - }; - // } - // } - return totalProjects; -}; - -export const Search = { - viewProjectDetailsScreen: async ( - t, - tenantId, - searchParams, - filters = { limit: 10, offset: 0, includeAncestors: true, includeDescendants: true }, - headerLocale - ) => { - const response = await Digit.WorksService?.searchProject(tenantId, searchParams, filters); - - let projectDetails = { - searchedProject: { - basicDetails: {}, - details: { - projectDetails: [], - }, - }, - }; - - if (response?.Project) { - let projects = createProjectsArray(t, response?.Project, searchParams, headerLocale); - - //searched Project details - projectDetails.searchedProject["basicDetails"] = projects?.searchedProject?.basicDetails; - projectDetails.searchedProject["details"]["projectDetails"] = { - applicationDetails: [ - projects?.searchedProject?.headerDetails, - projects?.searchedProject?.projectDetails, - projects?.searchedProject?.locationDetails, - projects?.searchedProject?.documentDetails, - ], - }; //rest categories will come here - } - - return { - projectDetails: response?.Project ? projectDetails : [], - response: response?.Project, - processInstancesDetails: [], - workflowDetails: [], - applicationData: {}, - isNoDataFound: response?.Project?.length === 0, - }; - }, - searchEstimate: async (tenantId, filters) => { - const response = await Digit.WorksService?.estimateSearch({ tenantId, filters }); - return response?.estimates; - }, -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/SearchCampaignConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/SearchCampaignConfig.js deleted file mode 100644 index bb6a9f26916..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/SearchCampaignConfig.js +++ /dev/null @@ -1,22 +0,0 @@ -const SearchCampaignConfig = async (body) => { - try { - const response = await Digit.CustomService.getResponse({ - url: "/project-factory/v1/project-type/search", - useCache: false, - method: "POST", - userService: false, - body, - }); - if (response?.CampaignDetails?.length === 0) { - throw new Error("Campaign not found with the given id"); - } - return response?.CampaignDetails?.[0]; - } catch (error) { - if (error?.response?.data?.Errors) { - throw new Error(error.response.data.Errors[0].message); - } - throw new Error("An unknown error occurred"); - } -}; - -export default SearchCampaignConfig; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/SearchPlanConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/SearchPlanConfig.js deleted file mode 100644 index 1fe11f206a7..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/SearchPlanConfig.js +++ /dev/null @@ -1,19 +0,0 @@ -const SearchPlanConfig = async (body) => { - try { - const response = await Digit.CustomService.getResponse({ - url: "/plan-service/config/_search", - useCache: false, - method: "POST", - userService: true, - body, - }); - return response; - } catch (error) { - if (error?.response?.data?.Errors) { - throw new Error(error.response.data.Errors[0].message); - } - throw new Error("An unknown error occurred"); - } -}; - -export default SearchPlanConfig; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/UpdatePlanConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/UpdatePlanConfig.js deleted file mode 100644 index d1623cbd167..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/UpdatePlanConfig.js +++ /dev/null @@ -1,18 +0,0 @@ -const UpdatePlanConfig = async (body) => { - try { - const response = await Digit.CustomService.getResponse({ - url: "/plan-service/config/_update", - useCache: false, - method: "POST", - userService: true, - body, - }); - return response; - } catch (error) { - if (error?.response?.data?.Errors) { - throw new Error(error.response.data.Errors[0].message); - } - throw new Error("An unknown error occurred"); - } -}; -export default UpdatePlanConfig; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/searchSavedPlans.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/searchSavedPlans.js deleted file mode 100644 index ba4342526a8..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/services/searchSavedPlans.js +++ /dev/null @@ -1,67 +0,0 @@ -function mergeArrays(array1, key1, array2, key2) { - const mergedArray = []; - - // Create a map of values from array2 using key2 - const map = new Map(); - array2.forEach((item) => { - map.set(item[key2], item); - }); - - // Iterate over array1 and merge with matching items from array2 - array1.forEach((item) => { - const matchingItem = map.get(item[key1]); - if (matchingItem) { - // Merge properties from both items and append to 'CampaignDetails' - const mergedItem = { ...item, CampaignDetails: { ...matchingItem } }; - mergedArray.push(mergedItem); - } else { - // No matching item found in array2, add array1 item with empty 'CampaignDetails' - const mergedItem = { ...item, CampaignDetails: {} }; - mergedArray.push(mergedItem); - } - }); - return mergedArray; -} - -const SearchSavedPlans = async (body) => { - try { - //here get response from both apis and process data and return - const responsePlan = await Digit.CustomService.getResponse({ - url: "/plan-service/config/_search", - useCache: false, - method: "POST", - userService: false, - body, - }); - - const { PlanConfiguration } = responsePlan; - if (!PlanConfiguration || PlanConfiguration.length === 0) return []; - - const executionPlanIds = PlanConfiguration?.map((row) => row?.executionPlanId)?.filter((item) => item); - const CampaignDetails = { - tenantId: Digit.ULBService.getCurrentTenantId(), - ids: executionPlanIds, - }; - - const responseCampaign = await Digit.CustomService.getResponse({ - url: "/project-factory/v1/project-type/search", - useCache: false, - method: "POST", - userService: false, - body: { - CampaignDetails, - }, - }); - const finalResult = { - PlanConfiguration: mergeArrays(responsePlan?.PlanConfiguration, "executionPlanId", responseCampaign?.CampaignDetails, "id"), - }; - return finalResult; - } catch (error) { - if (error?.response?.data?.Errors) { - throw new Error(error.response.data.Errors[0].message); - } - throw new Error("An unknown error occurred"); - } -}; - -export default SearchSavedPlans; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/context.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/context.js deleted file mode 100644 index 5e6c18f699e..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/context.js +++ /dev/null @@ -1,31 +0,0 @@ -import React,{useContext,createContext,useReducer} from "react" - -const MyContext = createContext() -const initialState = { - -} - -const reducer = (state=initialState,action) => { - switch (action.type) { - case "SETINITDATA": - return {...state,...action.state} - default: - return state; - } -} - -export const useMyContext = () => { - - return useContext(MyContext) -} - -export const ProviderContext = ({children}) => { - - const [state,dispatch] = useReducer(reducer,initialState) - - return ( - - {children} - - ) -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/createTemplate.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/createTemplate.js deleted file mode 100644 index a3f79c2358e..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/createTemplate.js +++ /dev/null @@ -1,485 +0,0 @@ -import { BOUNDARY_DATA_SHEET, FACILITY_DATA_SHEET, SCHEMA_PROPERTIES_PREFIX, commonColumn } from "../configs/constants"; - -export const fetchBoundaryData = async (tenantId, hierarchyType, codes) => { - // request for boundary relation api - const reqCriteria = { - url: "/boundary-service/boundary-relationships/_search", - params: { tenantId, hierarchyType, codes, includeChildren: true }, - body: {}, - }; - let response; - try { - response = (await Digit.CustomService.getResponse(reqCriteria))?.TenantBoundary?.[0]?.boundary || {}; - } catch (error) { - console.error("Error in fetching boundary Data: ", error.message); - } - return response; -}; - -export const getFacilities = async (params, body) => { - // request for boundary relation api - const reqCriteria = { - url: "/facility/v1/_search", - params: params, - body: body, - }; - let response; - try { - response = (await Digit.CustomService.getResponse(reqCriteria))?.Facilities || {}; - } catch (error) { - if (error.response) { - throw new Error(`Failed to fetch facility data: ${error.response.data.message}`); - } - if (error.request) { - // Network error - throw new Error("Network error while fetching facility data"); - } - // Other errors - throw new Error(`Error while fetching facility data: ${error.message}`); - } - return response; -}; - -// export const fetchColumnsFromMdms = (schema)=>{ -// return -// } - -/** - * - * @param {*} xlsxData - * @param {*} boundaryData - * @returns xlsxData with boundary data added - */ -export const addBoundaryData = (xlsxData, boundaryData, hierarchyType) => { - // Return the original data if there is no boundary data to add - if (!boundaryData) return xlsxData; - - // Initialize the array to hold new data - let newXlsxData = []; - - // Recursive function to convert boundary data into sheet format - const convertBoundaryDataToSheets = (boundaryData, currentBoundaryPredecessor = [], hierarchyAccumulator = [], dataAccumulator = []) => { - // Return if boundary data is not valid or not an array - if (!boundaryData || !Array.isArray(boundaryData)) return; - - // Clone the current boundary predecessor to avoid modifying the original data - const rowData = [...currentBoundaryPredecessor]; - // Clone the data accumulator to preserve the accumulated data - let tempDataAccumulator = [...dataAccumulator]; - // Use a set to accumulate unique hierarchy levels - let tempHierarchyAccumulator = new Set(hierarchyAccumulator); - - // Iterate over each item in the boundary data array - for (const item of boundaryData) { - if (item?.code) { - // Create a new row with the current item's code - const tempRow = [...rowData, item?.code]; - let response; - // Add the current item's boundary type to the hierarchy - tempHierarchyAccumulator.add(item.boundaryType); - - // If the current item has children, recursively process them - if (item.children) - response = convertBoundaryDataToSheets(item.children, tempRow, tempHierarchyAccumulator, [...tempDataAccumulator, tempRow]); - - // Update the accumulators with the response from the recursive call - if (response) { - tempDataAccumulator = response.tempDataAccumulator; - tempHierarchyAccumulator = response.tempHierarchyAccumulator; - } - } - } - - // Return the accumulated data and hierarchy - return { tempDataAccumulator, tempHierarchyAccumulator }; - }; - - // Convert the boundary data into sheet format and extract the sorted data and hierarchy - let { tempDataAccumulator: sortedBoundaryDataForXlsxSheet, tempHierarchyAccumulator: hierarchy } = convertBoundaryDataToSheets(boundaryData); - - // Add the hierarchy as the first row of the sheet - hierarchy = [...hierarchy].map((item) => `${hierarchyType}_${Digit.Utils.microplan.transformIntoLocalisationCode(item)}`); - sortedBoundaryDataForXlsxSheet = [[...hierarchy], ...sortedBoundaryDataForXlsxSheet]; - - // Determine the maximum row length to ensure all rows have the same length - const topIndex = Math.max(...sortedBoundaryDataForXlsxSheet.map((row) => row.length)) - 1; - - // Ensure all rows are of the same length by filling them with empty strings - sortedBoundaryDataForXlsxSheet = sortedBoundaryDataForXlsxSheet.map((item, index) => { - let newItem = item; - if (index !== 0) { - if (!newItem) { - newItem = []; - } - const itemLength = newItem.length; - while (newItem.length <= topIndex) { - newItem.push(""); - } - newItem.push(newItem[itemLength - 1]); - } else { - newItem.push(commonColumn); - } - - return newItem; - }); - - // Add the new sheet data to the original data - newXlsxData = [...xlsxData, ...newXlsxData, { sheetName: BOUNDARY_DATA_SHEET, data: sortedBoundaryDataForXlsxSheet }]; - - // Return the updated data - return newXlsxData; -}; - -const fillDataWithBlanks = (data, tillRow) => { - while (data.length < tillRow) { - data.push([]); - } - - const maxLength = Math.max(...data.map((row) => row.length)); - return data.map((row) => [...row, ...new Array(maxLength - row.length).fill("")]); -}; -const generateLocalisationKeyForSchemaProperties = (code) => { - if (!code) return code; - return `${SCHEMA_PROPERTIES_PREFIX}_${code}`; -}; -/** - * - * @param {array} xlsxData , xlsx data - * @param {object} schema , schema to refer to - * @returns {Array of Object} , xlsxData with schema data added - * - * adds schema data to sheets - */ -const addSchemaData = (xlsxData, schema, extraColumnsToAdd) => { - if (!schema) return xlsxData; - let columnSchema = schema.schema?.Properties || {}; - const newXlsxData = []; - const columnList = [[], [], [], []]; // Initialize columnList with four empty arrays - - for (const [key, value] of Object.entries(columnSchema)) { - if (key === commonColumn) continue; - - columnList[0].push(generateLocalisationKeyForSchemaProperties(key)); // Add key to the first array - - // columnList[1].push(value.type || ""); // Add type to the second array - - // columnList[2].push(value.isRequired ? "MANDATORY" : "OPTIONAL"); // Add requirement status to the third array - - // columnList[3].push(value.pattern || ""); // Add pattern to the fourth array - } - - if (extraColumnsToAdd) columnList[0].push(...extraColumnsToAdd); - - for (let { sheetName, data } of xlsxData) { - data = fillDataWithBlanks(data, 4); - columnList.forEach((item, index) => { - // Append the new items to the row - if (data[index]) { - data[index] = [...data[index], ...item]; - } else { - data[index] = [...item]; - } - }); - - newXlsxData.push({ sheetName, data }); - } - - return newXlsxData; -}; - -/** - * - * @param {Array of Object} xlsxData - * @param {string} hierarchyLevelName - */ -const devideXlsxDataHierarchyLevelWise = (xlsxData, hierarchyLevelName) => { - if (!hierarchyLevelName) return xlsxData; // Return original data if no hierarchy level name - - const result = []; // Initialize result array - - // Iterate over each sheet in the xlsxData - for (const sheet of xlsxData) { - const sheetData = sheet.data; - const hierarchyLevelIndex = sheetData[0].indexOf(hierarchyLevelName); - - // If hierarchy level name not found, skip this sheet - if (hierarchyLevelIndex === -1) { - result.push(sheet); - continue; - } - - const { sheetsMap, danglingDataMap } = processSheetData(sheetData, hierarchyLevelIndex); - - // Combine danglingDataMap with sheetsMap - for (const key of Object.keys(danglingDataMap)) { - if (sheetsMap[key]) { - sheetsMap[key].data = [sheetData[0], ...danglingDataMap[key], ...sheetsMap[key].data.slice(1)]; - } else { - sheetsMap[key] = { - sheetName: key, - data: [...danglingDataMap[key], sheetData[0]], - }; - } - } - - // Add sheetsMap values to result - result.push(...Object.values(sheetsMap)); - } - - return result.length > 0 ? result : xlsxData; // Return result or original data if result is empty -}; - -// Function to process sheet data and return sheetsMap and danglingDataMap -const processSheetData = (sheetData, hierarchyLevelIndex) => { - const sheetsMap = {}; - const danglingDataMap = {}; - let emptyHierarchyRow = []; - let lastWasEmpty = true; - - // Iterate through sheet data starting from the second row (skipping header) - for (let i = 1; i < sheetData.length; i++) { - const row = sheetData[i]; - const hierarchyValue = row[hierarchyLevelIndex]; - - if (emptyHierarchyRow.length && hierarchyValue !== "") { - danglingDataMap[hierarchyValue] = emptyHierarchyRow; - } - - if (hierarchyValue === "" && lastWasEmpty) { - emptyHierarchyRow.push(row); - } else { - emptyHierarchyRow = []; - } - - if (!sheetsMap[hierarchyValue] && hierarchyValue !== "") { - sheetsMap[hierarchyValue] = { - sheetName: hierarchyValue, - data: [sheetData[0]], - }; - } - - if (hierarchyValue === row[hierarchyLevelIndex] && hierarchyValue !== "") { - sheetsMap[hierarchyValue].data.push(row); - } - - lastWasEmpty = hierarchyValue === ""; - } - - return { sheetsMap, danglingDataMap }; -}; - -export const filterBoundaries = (boundaryData, boundaryFilters) => { - if (!boundaryFilters) return boundaryData; - // Define a helper function to recursively filter boundaries - function filterRecursive(boundary) { - // Find the filter that matches the current boundary - const filter = boundaryFilters?.find((f) => f.code === boundary.code && f.type === boundary.boundaryType); - - // If no filter is found, return the boundary with its children filtered recursively - if (!filter) { - return { - ...boundary, - children: boundary.children.map(filterRecursive), - }; - } - - // If the boundary has no children, handle the case where includeAllChildren is false - if (!boundary.children.length) { - // Return the boundary with an empty children array - return { - ...boundary, - children: [], - }; - } - - // If includeAllChildren is true, return the boundary with all children - if (filter.includeAllChildren) { - return { - ...boundary, - children: boundary.children.map(filterRecursive), - }; - } - - // Filter children based on the filters - const filteredChildren = boundary.children - .filter((child) => boundaryFilters.some((f) => f.code === child.code && f.type === child.boundaryType)) - .map(filterRecursive); - - // Return the boundary with filtered children - return { - ...boundary, - children: filteredChildren, - }; - } - - // Map through the boundary data and apply the recursive filter function to each boundary - const filteredData = boundaryData.map(filterRecursive); - return filteredData; -}; - -/** - * Retrieves all facilities for a given tenant ID. - * @param tenantId The ID of the tenant. - * @returns An array of facilities. - */ -async function getAllFacilities(tenantId) { - // Retrieve all facilities for the given tenant ID - const facilitySearchBody = { - Facility: { isPermanent: true }, - }; - - const facilitySearchParams = { - limit: 50, - offset: 0, - tenantId: tenantId, - }; - - const searchedFacilities = []; - let searchAgain = true; - - while (searchAgain) { - const response = await getFacilities(facilitySearchParams, facilitySearchBody); - if (response) { - searchAgain = response.length >= 50; - searchedFacilities.push(...response); - facilitySearchParams.offset += 50; - } else searchAgain = false; - } - - return searchedFacilities; -} - -const addFacilitySheet = (xlsxData, mapping, facilities, schema, t) => { - if (!mapping) return xlsxData; - // Create header row - const headers = Object.keys(mapping); - - // Create data rows - const dataRow = []; - for (const facility of facilities) { - facility.isPermanent = facility.isPermanent ? t("PERMAENENT") : t("TEMPORARY"); - dataRow.push(headers.map((header) => facility[mapping[header]])); - } - headers.push(commonColumn); - const additionalCols = []; - if (schema?.schema?.Properties) { - const properties = Object.keys(schema.schema.Properties); - for (const col of properties) { - if (!headers.includes(col)) { - additionalCols.push(col); - } - } - } - headers.push(...additionalCols); - // Combine headers and data rows - const arrayOfArrays = [headers.map((item) => generateLocalisationKeyForSchemaProperties(item)), ...dataRow]; - - const facilitySheet = { - sheetName: FACILITY_DATA_SHEET, - data: arrayOfArrays, - }; - const updatedXlsxData = [facilitySheet, ...xlsxData]; - return updatedXlsxData; -}; - -const addReadMeSheet = (xlsxData, readMeData, readMeSheetName) => { - if (!readMeSheetName) return xlsxData; - const data = readMeData.reduce((acc, item) => { - if (item?.header) { - acc.push([item.header], ...(item.points || []).map((item) => [item]), [], [], [], []); - } - return acc; - }, []); - - const readMeSheet = { - sheetName: readMeSheetName, - data: [["MICROPLAN_TEMPLATE_README_MAIN_HEADER"], [], [], [], ...data], - }; - xlsxData.unshift(readMeSheet); - return xlsxData; -}; - -/** - * @param {Object} options - * @param {boolean} options.hierarchyLevelWiseSheets - * @param {string} options.hierarchyLevelName - * @param {boolean} options.addFacilityData - * @param {Object} options.schema - * @param {Object[]} options.boundaries - * @param {string} options.tenantId - * @param {string} options.hierarchyType - * @param {Object} options.readMeData - * @param {string} options.readMeSheetName - * @param {string} options.t // Assuming t is some context or translation object - */ -export const createTemplate = async ({ - hierarchyLevelWiseSheets = true, - hierarchyLevelName, - addFacilityData = false, - schema, - boundaries, - tenantId, - hierarchyType, - readMeData, - readMeSheetName, - t, -}) => { - // Fetch or retrieve boundary data - const filteredBoundaries = await fetchFilteredBoundaries(boundaries, tenantId, hierarchyType); - - // Initialize xlsxData array - let xlsxData = []; - - // Add boundary data to xlsxData - xlsxData = addBoundaryData(xlsxData, filteredBoundaries, hierarchyType); - - // Handle hierarchy level sheets - if (hierarchyLevelWiseSheets) { - xlsxData = devideXlsxDataHierarchyLevelWise(xlsxData, hierarchyLevelName); - } - - // Handle facility data addition - if (addFacilityData) { - xlsxData = await addFacilityDataToSheets(xlsxData, schema, tenantId, t); - } else { - // If no facility data, add schema data directly - xlsxData = addSchemaData(xlsxData, schema); - } - - // Add readme sheet data if provided - xlsxData = addReadMeSheet(xlsxData, readMeData, readMeSheetName); - - return xlsxData; -}; - -// Function to fetch filtered boundaries -const fetchFilteredBoundaries = async (boundaries, tenantId, hierarchyType) => { - const rootBoundary = boundaries?.find((boundary) => boundary.isRoot); - const sessionData = Digit.SessionStorage.get("microplanHelperData") || {}; - let boundaryData = sessionData.filteredBoundaries; - - if (!boundaryData) { - boundaryData = await fetchBoundaryData(tenantId, hierarchyType, rootBoundary?.code); - const filteredBoundaries = await filterBoundaries(boundaryData, boundaries); - Digit.SessionStorage.set("microplanHelperData", { - ...sessionData, - filteredBoundaries: filteredBoundaries, - }); - return filteredBoundaries; - } - return boundaryData; -}; - -// Function to add facility data to sheets -const addFacilityDataToSheets = async (xlsxData, schema, tenantId, t) => { - const facilities = await getAllFacilities(tenantId); - if (schema?.template?.facilitySchemaApiMapping) { - return addFacilitySheet(xlsxData, schema.template.facilitySchemaApiMapping, facilities, schema, t); - } - // If no specific facility schema mapping, add default facility data - const facilitySheet = { - sheetName: FACILITY_DATA_SHEET, - data: [], - }; - return addSchemaData([facilitySheet], schema); -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelUtils.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelUtils.js deleted file mode 100644 index b50b2ad48a6..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelUtils.js +++ /dev/null @@ -1,150 +0,0 @@ -import { SHEET_PASSWORD, UNPROTECT_TILL_ROW } from "../configs/constants"; - -export function updateFontNameToRoboto(worksheet) { - worksheet.eachRow({ includeEmpty: true }, (row) => { - row.eachCell({ includeEmpty: true }, (cell) => { - // Preserve existing font properties - const existingFont = cell.font || {}; - - // Update only the font name to Roboto - cell.font = { - ...existingFont, // Spread existing properties - name: "Roboto", // Update the font name - }; - }); - }); -} - -export const freezeWorkbookValues = async (workbook) => { - workbook.eachSheet((worksheet) => { - worksheet.eachRow((row) => { - row.eachCell((cell) => { - // Lock each cell - cell.protection = { - locked: true, - }; - }); - }); - // Protect the worksheet - worksheet.protect(SHEET_PASSWORD, { - selectLockedCells: true, - selectUnlockedCells: true, - }); - }); - - return workbook; -}; - -export const unfreezeColumnsByHeader = async (workbook, headers) => { - workbook.eachSheet((worksheet) => { - const headerRow = worksheet.getRow(1); // Assuming headers are in the first row - const columnsToUnfreeze = []; - - headerRow.eachCell((cell, colNumber) => { - if (headers.includes(cell.value)) { - columnsToUnfreeze.push(colNumber); - } - }); - - worksheet.eachRow((row, rowNumber) => { - if (rowNumber === 1) return; - columnsToUnfreeze.forEach((colNumber) => { - const cell = row.getCell(colNumber); - cell.protection = { - locked: false, - }; - }); - }); - - // Re-protect the worksheet after modifying cell protection - worksheet.protect(SHEET_PASSWORD, { - selectLockedCells: true, - selectUnlockedCells: true, - }); - }); - - return workbook; -}; - -export const freezeSheetValues = async (workbook, sheetName) => { - const worksheet = workbook.getWorksheet(sheetName); - if (worksheet) { - worksheet.eachRow((row) => { - row.eachCell((cell) => { - // Lock each cell - cell.protection = { - locked: true, - }; - }); - }); - // Protect the worksheet - worksheet.protect(SHEET_PASSWORD, { - selectLockedCells: true, - selectUnlockedCells: true, - }); - } - - return workbook; -}; - -export const freezeCellsWithData = async (workbook, sheetName) => { - const worksheet = workbook.getWorksheet(sheetName); - if (worksheet) { - worksheet.eachRow((row) => { - row.eachCell((cell) => { - if (cell.value) { - // Check if the cell has data - cell.protection = { - locked: true, - }; - } else { - cell.protection = { - locked: false, - }; - } - }); - }); - // Protect the worksheet - worksheet.protect(SHEET_PASSWORD, { - selectLockedCells: true, - selectUnlockedCells: true, - }); - } - - return workbook; -}; -export const performUnfreezeCells = async (workbook, sheetName) => { - const sheet = workbook.getWorksheet(sheetName); - - let lastFilledColumn = 1; - sheet.getRow(1).eachCell((cell, colNumber) => { - if (cell.value !== undefined && cell.value !== null && cell.value !== "") { - lastFilledColumn = colNumber; - } - }); - - for (let row = 1; row <= parseInt(UNPROTECT_TILL_ROW); row++) { - for (let col = 1; col <= lastFilledColumn; col++) { - const cell = sheet.getCell(row, col); - if (!cell.value && cell.value !== 0) { - cell.protection = { locked: false }; - } - } - } - sheet.protect(SHEET_PASSWORD, { selectLockedCells: true, selectUnlockedCells: true }); -}; - -export const hideUniqueIdentifierColumn = async (workbook, sheetName, column) => { - const sheet = workbook.getWorksheet(sheetName); - for (const item of column) { - let colIndex; - sheet.getRow(1).eachCell((cell, colNumber) => { - if (cell.value === item) { - colIndex = colNumber; - } - }); - if (column && sheet.getColumn(colIndex)) { - sheet.getColumn(colIndex).hidden = true; - } - } -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelValidations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelValidations.js deleted file mode 100644 index 0d2a344a8f1..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelValidations.js +++ /dev/null @@ -1,199 +0,0 @@ -import Ajv from "ajv"; -const ajv = new Ajv({ allErrors: true }); -ajv.addKeyword("isRequired"); -ajv.addKeyword("isLocationDataColumns"); -ajv.addKeyword("isRuleConfigureInputs"); -ajv.addKeyword("isFilterPropertyOfMapSection"); -ajv.addKeyword("isVisualizationPropertyOfMapSection"); -ajv.addKeyword("toShowInMicroplanPreview"); - -// Function responsible for excel data validation with respect to the template/schema provided -const translateSchema = (schemaData) => { - const required = Object.entries(schemaData?.Properties || {}).reduce((acc, [key, value]) => { - if (value?.isRequired) { - acc.push(key); - } - return acc; - }, []); - - return { required, properties: schemaData.Properties }; -}; - -const createSchema = (properties, required) => { - return { - type: "object", - patternProperties: { - ".*": { - type: "array", - items: { - type: "object", - properties: properties, - required: required, - additionalProperties: true, - }, - }, - }, - minProperties: 1, - additionalProperties: false, - }; -}; - -const extractLocationDataColumns = (schemaData) => { - return Object.entries(schemaData?.Properties || {}).reduce((acc, [key, value]) => { - if (value?.isLocationDataColumns) { - acc.push(key); - } - return acc; - }, []); -}; - -const setNestedError = (errors, path, error) => { - if (!path.length) return; - - let current = errors; - for (let i = 0; i < path.length - 1; i++) { - if (!current[path[i]]) { - current[path[i]] = {}; - } - current = current[path[i]]; - } - - if (!current[path[path.length - 1]]) { - current[path[path.length - 1]] = []; - } - - current[path[path.length - 1]] = [...new Set([...current[path[path.length - 1]], error])]; -}; - -const formatErrors = (validateExcelErrors, locationDataColumns, t) => { - const errors = {}; - let hasDataErrors = "false"; // true, false, missing_properties, unknown - const missingColumnsList = new Set(); - let errorMessages = {}; - - validateExcelErrors.forEach((error) => { - let tempErrorStore = ""; - let instancePathTypeGlobal; - - switch (error.keyword) { - case "additionalProperties": - tempErrorStore = "ERROR_ADDITIONAL_PROPERTIES"; - hasDataErrors = "true"; - break; - case "type": - { - const instancePathType = error.instancePath.split("/"); - const neededType = error.params?.type; - instancePathTypeGlobal = instancePathType; - tempErrorStore = locationDataColumns.includes(instancePathType[instancePathType.length - 1]) - ? "ERROR_INCORRECT_LOCATION_COORDINATES" - : neededType === "number" - ? "ERROR_MUST_BE_A_NUMBER" - : "ERROR_MUST_BE_A_STRING"; - hasDataErrors = "true"; - } - break; - case "required": - { - const missing = error.params.missingProperty; - const instancePathType = error.instancePath.split("/"); - instancePathTypeGlobal = [...instancePathType, missing]; - tempErrorStore = "ERROR_MANDATORY_FIELDS_CANT_BE_EMPTY"; - missingColumnsList.add(missing); - hasDataErrors = "true"; - } - break; - case "maximum": - case "minimum": - { - const instancePathMinMax = error.instancePath.split("/"); - instancePathTypeGlobal = instancePathMinMax; - tempErrorStore = locationDataColumns.includes(instancePathMinMax[instancePathTypeGlobal.length - 1]) - ? "ERROR_INCORRECT_LOCATION_COORDINATES" - : "ERROR_DATA_EXCEEDS_LIMIT_CONSTRAINTS"; - hasDataErrors = "true"; - } - break; - case "pattern": - tempErrorStore = "ERROR_VALUE_NOT_ALLOWED"; - hasDataErrors = "true"; - break; - case "minProperties": - hasDataErrors = "minProperties"; - break; - case "enum": - { - const instancePathType = error.instancePath.split("/"); - instancePathTypeGlobal = instancePathType; - tempErrorStore = { - error: "ERROR_UPLOAD_DATA_ENUM", - values: { allowedValues: error.params?.allowedValues?.map((item) => t(item)).join(", ") }, - }; - hasDataErrors = "true"; - } - break; - default: - hasDataErrors = "unknown"; - } - - if (tempErrorStore && instancePathTypeGlobal) { - setNestedError(errors, instancePathTypeGlobal.slice(1, 4), tempErrorStore); - } - - switch (hasDataErrors) { - case "true": - errorMessages = { dataError: "ERROR_REFER_UPLOAD_PREVIEW_TO_SEE_THE_ERRORS" }; - break; - case "minProperties": - errorMessages = { minProperties: "ERROR_UPLOADED_DATA_IS_EMPTY" }; - break; - case "unknown": - errorMessages = { unknown: "ERROR_UNKNOWN" }; - break; - case "false": - break; - } - }); - - return { - valid: !hasDataErrors, - message: errorMessages ? [...new Set(Object.values(errorMessages))] : [], - errors, - missingColumnsList, - }; -}; - -export const excelValidations = (data, schemaData, t) => { - const { required, properties } = translateSchema(schemaData); - const schema = createSchema(properties, required); - const validateExcel = ajv.compile(schema); - const valid = validateExcel(data); - const locationDataColumns = extractLocationDataColumns(schemaData); - - if (!valid) { - const validationResult = formatErrors(validateExcel.errors, locationDataColumns, t); - ajv.removeSchema(); - return validationResult; - } - - ajv.removeSchema(); - return { valid }; -}; - -export const checkForErrorInUploadedFileExcel = async (fileInJson, schemaData, t) => { - try { - const valid = excelValidations(fileInJson, schemaData, t); - if (valid.valid) { - return { valid: true }; - } - return { - valid: false, - message: valid.message, - errors: valid.errors, - missingProperties: valid.missingColumnsList, - }; - } catch (error) { - console.error("Error in excel validations: ", error?.message); - return { valid: false, message: ["ERROR_PARSING_FILE"] }; - } -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/exceltojson.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/exceltojson.js deleted file mode 100644 index f2d4f277ba6..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/exceltojson.js +++ /dev/null @@ -1,99 +0,0 @@ -import ExcelJS from "exceljs"; - -// input is a xlsx blob -// options {header} -// header: true -> have seperate header so data will be in key: value pair -export const parseXlsxToJsonMultipleSheets = async (file, options = {}) => { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - - reader.onload = async (event) => { - try { - const arrayBuffer = event.target.result; - const workbook = await loadWorkbook(arrayBuffer); - const jsonData = processWorkbook(workbook, options); - resolve(jsonData); - } catch (error) { - console.error(error); - resolve({ error: true }); - } - }; - - reader.onerror = (error) => { - console.error(error); - resolve({ error: true, details: error }); - }; - - reader.readAsArrayBuffer(file); - }); -}; - -const loadWorkbook = async (arrayBuffer) => { - const workbook = new ExcelJS.Workbook(); - await workbook.xlsx.load(arrayBuffer); - return workbook; -}; - -const processWorkbook = (workbook, options) => { - const jsonData = {}; - workbook.eachSheet((worksheet) => { - const jsonSheetData = processSheet(worksheet, options); - if (jsonSheetData.length !== 0 && jsonSheetData?.[0].length !== 0) { - jsonData[worksheet.name] = jsonSheetData; - } - }); - return jsonData; -}; - -const processSheet = (worksheet, options) => { - const jsonSheetData = []; - let headers = []; - - worksheet.eachRow({ includeEmpty: true }, (row, rowNumber) => { - const rowData = cleanRowData(row.values); - if (options.header && rowNumber === 1) { - headers = rowData; - } else if (options.header && headers.length > 0) { - jsonSheetData.push(mapRowToHeaders(rowData, headers)); - } else { - jsonSheetData.push(rowData); - } - }); - - removeTrailingEmptyRows(jsonSheetData); - return jsonSheetData; -}; - -const cleanRowData = (rowData) => { - return rowData.slice(1).map((cell) => (typeof cell === "string" ? cell.trim() : cell)); -}; - -const mapRowToHeaders = (rowData, headers) => { - const rowObject = {}; - headers.forEach((header, index) => { - rowObject[header] = rowData[index]; - }); - return rowObject; -}; - -const removeTrailingEmptyRows = (data) => { - while (data.length > 0) { - const lastRow = data[data.length - 1]; - const isEmptyRow = checkIfRowIsEmpty(lastRow); - if (isEmptyRow) { - data.pop(); - } else { - break; - } - } -}; - -const checkIfRowIsEmpty = (row) => { - if (Array.isArray(row)) { - return row.filter((item) => item !== "").length === 0; - } - if (typeof row === "object" && row !== null) { - return Object.values(row).filter((item) => item !== "").length === 0; - } - return false; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/geojsonValidations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/geojsonValidations.js deleted file mode 100644 index 42a465740b5..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/geojsonValidations.js +++ /dev/null @@ -1,234 +0,0 @@ -import gjv from "geojson-validation"; -import Ajv from "ajv"; -const ajv = new Ajv({ allErrors: true }); -ajv.addKeyword("isRequired"); -ajv.addKeyword("isLocationDataColumns"); -ajv.addKeyword("isRuleConfigureInputs"); -ajv.addKeyword("isFilterPropertyOfMapSection"); -ajv.addKeyword("isVisualizationPropertyOfMapSection"); -ajv.addKeyword("toShowInMicroplanPreview"); - -//the postion must be valid point on the earth, x between -180 and 180 -gjv.define("Position", (position) => { - let errors = []; - if (position[0] < -180 || position[0] > 180) { - errors.push("Location Coordinates Error: the x must be between -180 and 180"); - } - if (position[1] < -90 || position[1] > 90) { - errors.push("Location Coordinates Error: the y must be between -90 and 90"); - } - return errors; -}); - -// Main functino for geojson validation that includes structural and property validations -export const geojsonValidations = (data, schemaData, t) => { - const valid = geojsonStructureValidation(data); - return valid.valid ? { valid: true } : { valid: false, message: valid.message || ["ERROR_INVALID_GEOJSON"] }; -}; - -// Funciton responsible for structural verification of geojson data -export const geojsonStructureValidation = (data) => { - let valid = true; - const trace = {}; - for (let i = 0; i < data["features"].length; i++) { - const check = gjv.valid(data["features"][i]); - valid = valid && check; - const errors = gjv.isFeature(data["features"][i], true); - // check if the location coordinates are according to the provided guidlines - if (errors.some((str) => str.includes("Location Coordinates Error:"))) return { valid: false, message: ["ERROR_INCORRECT_LOCATION_COORDINATES"] }; - if (!check) trace[i] = [errors]; - // let error; - // Object.keys(data["features"][i]["properties"]).forEach((j) => { - // if (j.length > 10) error = { valid: false, trace, message: ["ERROR_FIELD_NAME"] }; - // return j; - // }); - // if (error) return error; - } - return { valid, trace }; -}; - -const geometryValidation = (data) => { - let firstType; - for (const feature of data.features) { - if (!feature.geometry || !feature.geometry.type) { - return false; // Missing geometry or geometry type - } - if (!firstType) { - firstType = feature.geometry.type; - } else { - // Check if the current geometry type matches the first one - if (feature.geometry.type !== firstType) { - return false; // Different geometry types found - } - } - } - return true; -}; - -// Function responsible for property verification of geojson data -export const geojsonPropertiesValidation = (data, schemaData, name, t) => { - const translate = () => { - const required = Object.entries(schemaData?.Properties || {}).reduce((acc, [key, value]) => { - if (value?.isRequired) { - acc.push(key); - } - return acc; - }, []); - - // const properties = prepareProperties(schemaData.Properties, t); - return { required, properties: schemaData.Properties }; - }; - const { required, properties } = translate(); - const schema = { - type: "object", - properties: { - type: { const: "FeatureCollection" }, - }, - patternProperties: { - "^features$": { - type: "array", - items: { - type: "object", - patternProperties: { - "^properties$": { - type: "object", - patternProperties: properties, - required: required, - additionalProperties: true, - }, - }, - }, - }, - }, - additionalProperties: true, - }; - const validateGeojson = ajv.compile(schema); - const valid = validateGeojson(data); - const errors = {}; - let hasDataErrors = "false"; // true, false, missing_properties, unknown - const missingColumnsList = new Set(); - let errorMessages = []; - if (!valid) { - for (let i = 0; i < validateGeojson.errors.length; i++) { - let tempErrorStore = ""; - let instancePathTypeGlobal = validateGeojson.errors[i].instancePath.split("/"); - switch (validateGeojson.errors[i].keyword) { - case "additionalProperties": { - tempErrorStore = "ERROR_ADDITIONAL_PROPERTIES"; - hasDataErrors = "true"; - break; - } - case "type": - { - const instancePathType = validateGeojson.errors[i].instancePath.split("/"); - const neededType = validateGeojson.errors[i].params?.type; - instancePathTypeGlobal = instancePathType; - tempErrorStore = neededType === "number" ? "ERROR_MUST_BE_A_NUMBER" : "ERROR_MUST_BE_A_STRING"; - hasDataErrors = "true"; - } - break; - case "const": { - if (validateGeojson.errors[i].params.allowedValue === "FeatureCollection") tempErrorStore = "ERROR_FEATURECOLLECTION"; - hasDataErrors = "true"; - break; - } - case "required": { - const missing = validateGeojson.errors[i].params.missingProperty; - const instancePathType = validateGeojson.errors[i].instancePath.split("/"); - instancePathTypeGlobal = [...instancePathType, missing]; - tempErrorStore = "ERROR_MANDATORY_FIELDS_CANT_BE_EMPTY"; - missingColumnsList.add(missing); - // hasDataErrors = "missing_properties"; - hasDataErrors = "true"; - break; - } - case "pattern": - tempErrorStore = "ERROR_VALUE_NOT_ALLOWED"; - hasDataErrors = "true"; - break; - case "minProperties": { - hasDataErrors = "minProperties"; - break; - } - case "enum": { - const instancePathType = validateGeojson.errors[i].instancePath.split("/"); - instancePathTypeGlobal = instancePathType; - tempErrorStore = { - error: "ERROR_UPLOAD_DATA_ENUM", - values: { allowedValues: validateGeojson.errors[i]?.params?.allowedValues?.map((item) => t(item)).join(", ") }, - }; - hasDataErrors = "true"; - break; - } - default: - hasDataErrors = "unknown"; - break; - } - if (tempErrorStore) - errors[name] = { - ...(errors[name] ? errors[name] : {}), - [instancePathTypeGlobal[2]]: { - ...(errors?.[name]?.[instancePathTypeGlobal[2]] ? errors?.[name]?.[instancePathTypeGlobal[2]] : {}), - [instancePathTypeGlobal[4]]: [ - ...new Set( - ...(errors?.[name]?.[instancePathTypeGlobal[2]]?.[instancePathTypeGlobal[4]] - ? errors?.[name]?.[instancePathTypeGlobal[2]]?.[instancePathTypeGlobal[4]] - : []) - ), - tempErrorStore, - ], - }, - }; - - switch (hasDataErrors) { - case "true": - errorMessages = { ...errorMessages, dataError: t("ERROR_REFER_UPLOAD_PREVIEW_TO_SEE_THE_ERRORS") }; - break; - case "unknown": - errorMessages = { ...errorMessages, unkown: t("ERROR_UNKNOWN") }; - break; - case "missing_properties": - errorMessages = { - ...errorMessages, - missingProperty: t("ERROR_MISSING_PROPERTY", { properties: [...missingColumnsList].map((item) => t(item)).join(", ") }), - }; - break; - case "false": - break; - } - } - - ajv.removeSchema(); - return { - valid: !hasDataErrors, - message: errorMessages ? [...new Set(Object.values(errorMessages))] : [], - errors, - validationError: validateGeojson.errors, - }; - } - ajv.removeSchema(); - if (!geometryValidation(data)) return { valid: false, message: t("ERROR_MULTIPLE_GEOMETRY_TYPES") }; - return { valid: true }; -}; - -//////////////////////////// -// // Might be needed -// function filterOutWordAndLocalise(inputString, operation) { -// // Define a regular expression to match the string parts -// var regex = /(\w+)/g; // Matches one or more word characters - -// // Replace each match using the provided function -// var replacedString = inputString.replace(regex, function (match) { -// // Apply the function to each matched string part -// return operation(match); -// }); - -// return replacedString; -// } -// const prepareProperties = (properties, t) => { -// let newProperties = {}; -// Object.keys(properties).forEach((item) => (newProperties[filterOutWordAndLocalise(item, t)] = properties[item])); -// return newProperties; -// }; - -//////////////////////////// diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js deleted file mode 100644 index 0d21a93ca46..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js +++ /dev/null @@ -1,478 +0,0 @@ -import _ from "lodash"; -import { findChildren, findParent } from "../utils/processHierarchyAndData"; -import { EXCEL, LOCALITY, commonColumn } from "../configs/constants"; - -const formatDates = (value, type) => { - let newValue = value; - if (type !== "EPOC" && (!newValue || Number.isNaN(Number(newValue)))) { - newValue = new Date(); - } - switch (type) { - case "date": - return new Date(newValue)?.toISOString?.()?.split?.("T")?.[0]; - case "datetime": - return new Date(newValue).toISOString(); - case "EPOC": - return String(new Date(newValue)?.getTime()); - } -}; - -// get schema for validation -const getSchema = (campaignType, type, section, schemas) => { - if (!campaignType || !type || !section || !schemas) return {}; - return schemas.find((schema) => { - if (!schema.campaignType) { - return schema.type === type && schema.section === section; - } - return schema.campaignType === campaignType && schema.type === type && schema.section === section; - }); -}; - -// Sorting 2 lists, The first list is a list of string and second one is list of Objects -const sortSecondListBasedOnFirstListOrder = (firstList, secondList) => { - if (!firstList) return []; - // Create a map to store the indices of elements in the first list - const indexMap = {}; - firstList.forEach((value, index) => { - indexMap[value] = index; - }); - - // Sort the second list based on the order of elements in the first list - secondList.sort((objecta, objectb) => { - // Get the mappedTo values of each object - const mappedToA = objecta.mappedTo; - const mappedToB = objectb.mappedTo; - - // Get the indices of mappedTo values in the first list - const indexA = indexMap[mappedToA]; - const indexB = indexMap[mappedToB]; - - // Compare the indices - return indexA - indexB; - }); - - return secondList; -}; - -const computeGeojsonWithMappedProperties = ({ campaignType, fileType, templateIdentifier, validationSchemas }) => { - const schemaData = getSchema(campaignType, fileType, templateIdentifier, validationSchemas); - let schemaKeys; - if (schemaData?.schema?.["Properties"]) schemaKeys = hierarchy.concat(Object.keys(schemaData.schema["Properties"])); - // Sorting the resourceMapping list inorder to maintain the column sequence - const sortedSecondList = sortSecondListBasedOnFirstListOrder(schemaKeys, resourceMapping); - // Creating a object with input data with MDMS keys - const newFeatures = fileData.data["features"].map((item) => { - const newProperties = sortedSecondList.reduce( - (acc, e) => ({ - ...acc, - [e["mappedTo"]]: item["properties"][e["mappedFrom"]], - }), - {} - ); - item["properties"] = newProperties; - return item; - }); - const data = fileData.data; - data["features"] = newFeatures; - return data; -}; - -const destroySessionHelper = (currentPath, pathList, sessionName) => { - if (!pathList.includes(currentPath)) { - sessionStorage.removeItem(`Digit.${sessionName}`); - } -}; - -const convertGeojsonToExcelSingleSheet = (InputData, fileName) => { - if (!InputData || !Array.isArray(InputData) || InputData.length === 0) { - return null; - } - - // Extract keys from the first feature's properties - const keys = Object.keys(InputData?.[0]?.properties); - - if (!keys || keys.length === 0) { - return null; - } - - // Extract corresponding values for each feature - const values = InputData?.map((feature) => { - return keys.map((key) => feature.properties[key]); - }); - - // Group keys and values into the desired format - return { [fileName]: [keys, ...values] }; -}; - -const areObjectsEqual = (obj1, obj2) => { - return obj1.name === obj2.name && obj1.code === obj2.code; -}; - -const computeDifferences = (data1, data2) => { - const removed = {}; - const added = {}; - - for (const key in data1) { - if (Object.hasOwn(data2, key)) { - removed[key] = data1[key].filter((item1) => !data2[key].some((item2) => areObjectsEqual(item1, item2))); - added[key] = data2[key].filter((item2) => !data1[key].some((item1) => areObjectsEqual(item1, item2))); - } else { - removed[key] = data1[key]; - added[key] = []; - } - } - - for (const key in data2) { - if (!data1.hasOwnProperty(key)) { - added[key] = data2[key]; - removed[key] = []; - } - } - - return { removed, added }; -}; - -const extractNames = (data) => { - return Object.values(data) - .flatMap((items) => items) - .filter((item) => item.name) - .map((item) => item.name); -}; -// function that handles dropdown selection. used in: mapping and microplan preview -const handleSelection = (e, boundaryType, boundarySelections, hierarchy, setBoundarySelections, boundaryData, setIsLoading) => { - setIsLoading(true); - if (!e || !boundaryType) return; - const selections = e.map((item) => item?.[1]); - const newComputedSelection = { ...boundarySelections, [boundaryType]: selections }; - const { removed, added } = computeDifferences(boundarySelections, newComputedSelection); - // for(const item in removed){ - if (removed && Object.keys(removed).length !== 0 && Object.values(removed)?.flatMap((item) => item).length !== 0) { - const filteredRemoved = extractNames(removed); - const children = Object.values(findChildren(filteredRemoved, Object.values(boundaryData)?.[0]?.hierarchicalData))?.map((item) => item?.name); - for (const key in newComputedSelection) { - newComputedSelection[key] = newComputedSelection[key].filter((item) => !children.includes(item?.name)); - } - } - setBoundarySelections(newComputedSelection); -}; - -// Preventing default action when we scroll on input[number] is that it increments or decrements the number -const inputScrollPrevention = (e) => { - e.target.addEventListener("wheel", (e) => e.preventDefault(), { passive: false }); -}; - -const mapDataForApi = (data, Operators, microplanName, campaignId, status, reqType = "update") => { - const files = extractFiles(data, reqType); - const resourceMapping = extractResourceMapping(data, reqType); - const assumptions = extractAssumptions(data, reqType); - const operations = extractOperations(data, Operators, reqType); - - return createApiRequestBody(status, microplanName, campaignId, files, assumptions, operations, resourceMapping); -}; - -const extractFiles = (data, reqType) => { - const files = []; - if (data && data.upload) { - Object.values(data.upload).forEach((item) => { - if (isValidFile(item, reqType)) { - files.push(mapFile(item)); - } - }); - } - return files; -}; - -const isValidFile = (item, reqType) => { - if (!item || item.error || !item.filestoreId) return false; - if (reqType === "create" && !item.active) return false; - return true; -}; - -const mapFile = (item) => ({ - active: item.active, - filestoreId: item.filestoreId, - inputFileType: item.fileType, - templateIdentifier: item.section, - id: item.fileId, -}); - -const extractResourceMapping = (data, reqType) => { - let resourceMapping = []; - if (data && data.upload) { - Object.values(data.upload).forEach((item) => { - if (isValidResourceMapping(item, reqType)) { - resourceMapping.push(item.resourceMapping); - } - }); - resourceMapping = resourceMapping.flat(); - } - return resourceMapping; -}; - -const isValidResourceMapping = (item, reqType) => { - if (reqType === "create" && item.resourceMapping && item.resourceMapping.every((i) => i.active === false)) return false; - if (!item || !item.resourceMapping || item.error || !Array.isArray(item.resourceMapping)) return false; - if (!item.resourceMapping.every((i) => i.mappedFrom && i.mappedTo)) return false; - return true; -}; - -const extractAssumptions = (data, reqType) => { - if (!data || !data.hypothesis) return []; - return data.hypothesis.reduce((acc, item) => { - if (isValidAssumption(item, reqType)) { - acc.push({ ...item }); - } - return acc; - }, []); -}; - -const isValidAssumption = (item, reqType) => { - if (reqType === "create" && !item.active) return false; - if (!item.key || !item.value) return false; - return true; -}; - -const extractOperations = (data, Operators, reqType) => { - if (!data || !data.ruleEngine) return []; - return data.ruleEngine.reduce((acc, item) => { - if (isValidOperation(item, reqType)) { - acc.push(mapOperation(item, Operators)); - } - return acc; - }, []); -}; - -const isValidOperation = (item, reqType) => { - if (reqType === "create" && !item.active) return false; - if (!item.active && !item.input) return true; - if (!item.active && !item.operator && !item.output && !item.input && !item.assumptionValue) return false; - return true; -}; - -const mapOperation = (item, Operators) => { - const data = { ...item }; - const operator = Operators.find((e) => e.name === data.operator); - if (operator && operator.code) data.operator = operator.code; - if (data.oldInput) data.input = data.oldInput; - return data; -}; - -const createApiRequestBody = (status, microplanName, campaignId, files, assumptions, operations, resourceMapping) => ({ - PlanConfiguration: { - status, - tenantId: Digit.ULBService.getStateId(), - name: microplanName, - executionPlanId: campaignId, - files, - assumptions, - operations, - resourceMapping, - }, -}); - -const addResourcesToFilteredDataToShow = (previewData, resources, hypothesisAssumptionsList, formulaConfiguration, userEditedResources, t) => { - // Clone the preview data to avoid mutating the original data - const data = _.cloneDeep(previewData); - - // Helper function to check for user-edited data - const checkUserEditedData = (commonColumnData, resourceName) => { - if (userEditedResources && userEditedResources[commonColumnData]) { - return userEditedResources[commonColumnData][resourceName]; - } - }; - - // Ensure the previewData has at least one row and the first row is an array - if (!Array.isArray(data) || !Array.isArray(data[0])) { - return []; - } - - // Identify the index of the common column - const conmmonColumnIndex = data[0].indexOf(commonColumn); - if (conmmonColumnIndex === -1) { - return []; - } - - // Ensure resources is a valid array - if (!Array.isArray(resources)) { - return data; - } - - // Process each row of the data - const combinedData = data.map((item, index) => { - if (!Array.isArray(item)) { - return item; - } - - if (index === 0) { - // Add resource names to the header row - resources.forEach((e) => item.push(e)); - return item; - } - - // Process each resource for the current row - resources.forEach((resourceName, resourceIndex) => { - let savedData = checkUserEditedData(item[conmmonColumnIndex], resourceName); - if (savedData !== undefined) { - item.push(savedData); - } else { - let calculations = calculateResource(resourceName, item, formulaConfiguration, previewData[0], hypothesisAssumptionsList, t); - if (calculations !== null) calculations = Math.round(calculations); - item.push(calculations !== null && calculations !== undefined ? calculations : undefined); - } - }); - - return item; - }); - - return combinedData; -}; - -const calculateResource = (resourceName, rowData, formulaConfiguration, headers, hypothesisAssumptionsList, t) => { - let formula = formulaConfiguration?.find((item) => item?.active && item?.output === resourceName); - if (!formula) return null; - - // Finding Input - // check for Uploaded Data - const inputValue = findInputValue(formula, rowData, formulaConfiguration, headers, hypothesisAssumptionsList, t); - if (inputValue === undefined || inputValue === null) return null; - const assumptionValue = hypothesisAssumptionsList?.find((item) => item?.active && item?.key === formula?.assumptionValue)?.value; - if (assumptionValue === undefined) return null; - - return findResult(inputValue, assumptionValue, formula?.operator); -}; - -// function to find input value, it calls calculateResource fucntion recurcively until it get a proper value -const findInputValue = (formula, rowData, formulaConfiguration, headers, hypothesisAssumptionsList, t) => { - const inputIndex = headers?.indexOf(formula?.input); - if (inputIndex === -1 || !rowData[inputIndex]) { - // let tempFormula = formulaConfiguration.find((item) => item?.output === formula?.input); - return calculateResource(formula?.input, rowData, formulaConfiguration, headers, hypothesisAssumptionsList, t); - } else return rowData[inputIndex]; -}; - -const findResult = (inputValue, assumptionValue, operator) => { - switch (operator) { - case "DEVIDED_BY": - if (assumptionValue === 0) return; - return inputValue / assumptionValue; - case "MULTIPLIED_BY": - return inputValue * assumptionValue; - case "ADDITION": - return inputValue + assumptionValue; - case "SUBSTRACTION": - return inputValue - assumptionValue; - case "RAISE_TO": - return inputValue ** assumptionValue; - default: - return; - } -}; - -const fetchData = (state, campaignType) => { - let hypothesis = []; - let rulesOutputs = []; - let uploadList = []; - - hypothesis = state?.HypothesisAssumptions?.find((item) => item.campaignType === campaignType)?.assumptions; - rulesOutputs = state?.RuleConfigureOutput?.find((item) => item.campaignType === campaignType)?.data; - uploadList = state?.UploadConfiguration?.reduce((acc, item) => { - if (item.required) acc.push(item.id); - return acc; - }, []); - return { hypothesisList: hypothesis, rulesOutputs, uploadList }; -}; -const hypothesisCheck = (hypothesis, validList) => { - if (hypothesis && Array.isArray(hypothesis) && hypothesis.length !== 0 && validList && Array.isArray(validList) && validList.length !== 0) { - return hypothesis.filter((item) => item.active).every((item) => validList.includes(item.key)); - } - return false; -}; -const ruleOutputCheck = (rules, ruleOuputList) => { - if ( - rules && - Array.isArray(rules) && - rules.filter((item) => item.active).length !== 0 && - ruleOuputList && - Array.isArray(ruleOuputList) && - ruleOuputList.length !== 0 - ) { - return rules.filter((item) => item.active).every((item) => ruleOuputList.includes(item.output)); - } - return false; -}; -const emptyRuleCheck = (rules) => { - return !rules || rules.filter((item) => item.active && Object.values(item)?.filter((e) => e === "").length !== 0).length === 0; -}; -const ruleHypothesisCheck = (rules, ruleHypothesis) => { - if (rules && Array.isArray(rules) && rules.length !== 0 && ruleHypothesis && Array.isArray(ruleHypothesis) && ruleHypothesis.length !== 0) { - return rules.filter((item) => item.active).every((item) => ruleHypothesis.includes(item.assumptionValue)); - } - return false; -}; -const uploadCheck = (uploads, uploadList) => { - if (uploads && Array.isArray(uploads) && uploads.length !== 0 && uploadList && Array.isArray(uploadList) && uploadList.length !== 0) { - return uploads.some((item) => uploadList.includes(item.templateIdentifier) && item.active); - } - return false; -}; -const planConfigRequestBodyValidator = (data, state, campaignType) => { - if (!data || !campaignType || !state) return false; - - const { hypothesisList, rulesOutputs, uploadList } = fetchData(state, campaignType); - let checks = - // microplan name check - (!data || !data.name) && - hypothesisCheck(data?.PlanConfiguration?.assumptions, hypothesisList) && - emptyRuleCheck(data?.PlanConfiguration?.operations) && - ruleOutputCheck(data?.PlanConfiguration?.operations, rulesOutputs) && - ruleHypothesisCheck( - data?.PlanConfiguration?.operations, - data?.PlanConfiguration?.assumptions?.filter((item) => item.active)?.map((item) => item.key) - ) && - uploadCheck(data?.PlanConfiguration?.files, uploadList); - return checks; - // if() -}; - -const processDropdownForNestedMultiSelect = (dropDownOptions) => { - if (!dropDownOptions) return dropDownOptions; - const result = dropDownOptions.reduce((acc, item) => { - const { parent, ...rest } = item; - - // Find the group by parentBoundaryType - let group = acc.find((g) => g.name === parent?.name); - - // If not found, create a new group - if (!group) { - group = { name: parent?.name, options: [] }; - acc.push(group); - } - - // Add the item to the options of the found/created group - group.options.push(rest); - - return acc; - }, []); - return result; -}; - -const transformIntoLocalisationCode = (code) => { - return code?.toUpperCase(); -}; - -export default { - formatDates, - computeGeojsonWithMappedProperties, - destroySessionHelper, - mapDataForApi, - inputScrollPrevention, - handleSelection, - convertGeojsonToExcelSingleSheet, - sortSecondListBasedOnFirstListOrder, - addResourcesToFilteredDataToShow, - calculateResource, - planConfigRequestBodyValidator, - getSchema, - processDropdownForNestedMultiSelect, - transformIntoLocalisationCode, -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/jsonToExcelBlob.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/jsonToExcelBlob.js deleted file mode 100644 index ae470038a91..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/jsonToExcelBlob.js +++ /dev/null @@ -1,72 +0,0 @@ -import ExcelJS from "exceljs"; -import { SHEET_COLUMN_WIDTH } from "../configs/constants"; - -export const convertJsonToXlsx = async (jsonData, columnWithStyle, returnWorkbook = false) => { - const workbook = new ExcelJS.Workbook(); - - for (const [sheetName, data] of Object.entries(jsonData)) { - const worksheet = workbook.addWorksheet(sheetName); - populateWorksheet(worksheet, data, columnWithStyle); - } - - if (returnWorkbook) return workbook; - return await writeWorkbookToBuffer(workbook); -}; - -const populateWorksheet = (worksheet, data, columnWithStyle) => { - data.forEach((row, rowIndex) => { - const newRow = worksheet.addRow(row); - if (columnWithStyle?.errorColumn && rowIndex > 0) { - applyStyleToColumn(newRow, data[0], columnWithStyle); - } - }); - - styleHeaderRow(worksheet); - setColumnWidths(worksheet); -}; - -/** - * Applies a specified style to a column in a given row of a spreadsheet. - * - * @param {Object} newRow - The row object where the style will be applied. - * @param {Array} headerRow - The header row array containing column names. - * @param {Object} columnWithStyle - An object containing the column name and the style to be applied. - * @param {string} columnWithStyle.errorColumn - The name of the column where the style should be applied. - * @param {Object} columnWithStyle.style - The style properties to be applied to the cell. - */ -const applyStyleToColumn = (newRow, headerRow, columnWithStyle) => { - const errorColumnIndex = headerRow.indexOf(columnWithStyle.errorColumn); - if (errorColumnIndex !== -1) { - const columnIndex = errorColumnIndex + 1; - const newCell = newRow.getCell(columnIndex); - if (columnWithStyle.style && newCell) { - for (const key in columnWithStyle.style) { - newCell[key] = columnWithStyle.style[key]; - } - } - } -}; - -const styleHeaderRow = (worksheet) => { - const headerRow = worksheet.getRow(1); - if (headerRow) { - headerRow.font = { bold: true }; - } -}; - -const setColumnWidths = (worksheet) => { - // Iterate over all rows in the worksheet - worksheet.eachRow((worksheetRow, rowNumber) => { - worksheetRow.eachCell((cell, colNumber) => { - // Update column width based on the length of the cell's text - const currentWidth = worksheet.getColumn(colNumber).width || SHEET_COLUMN_WIDTH; // Default width or current width - const newWidth = Math.max(currentWidth, cell.value.toString().length + 2); // Add padding - worksheet.getColumn(colNumber).width = newWidth; - }); - }); -}; - -export const writeWorkbookToBuffer = async (workbook) => { - const buffer = await workbook.xlsx.writeBuffer({ compression: true }); - return new Blob([buffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }); -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/mappingUtils.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/mappingUtils.js deleted file mode 100644 index f742ffd5e47..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/mappingUtils.js +++ /dev/null @@ -1,760 +0,0 @@ -import L from "leaflet"; -import "leaflet/dist/leaflet.css"; -import { processHierarchyAndData, findChildren, calculateAggregateForTree } from "../utils/processHierarchyAndData"; -import { EXCEL, GEOJSON, SHAPEFILE, MapChoroplethGradientColors } from "../configs/constants"; -import { PopulationSvg } from "../icons/Svg"; -import chroma from "chroma-js"; -import * as MicroplanIconCollection from "../icons/Svg"; -import * as DigitSvgs from "@egovernments/digit-ui-svg-components"; - -const IconCollection = { ...MicroplanIconCollection, ...DigitSvgs }; - -export const generatePreviewUrl = (baseMapUrl, center = [0, 0], zoom = 5) => { - const lon = Math.floor(((center[1] + 180) / 360) * Math.pow(0, zoom)); - const lat = Math.floor( - ((1 - Math.log(Math.tan((center[0] * Math.PI) / 180) + 1 / Math.cos((center[0] * Math.PI) / 180)) / Math.PI) / 2) * Math.pow(2, zoom) - ); - if (baseMapUrl) { - return baseMapUrl.replace("{z}", zoom).replace("{x}", lat).replace("{y}", lon); - } - // Return a default preview URL or handle this case as needed - return "default-preview-url.jpg"; // todo -}; - -// get schema for validation -export const getSchema = (campaignType, type, section, schemas) => { - return schemas.find((schema) => { - if (!schema.campaignType) { - return schema.type === type && schema.section === section; - } - return schema.campaignType === campaignType && schema.type === type && schema.section === section; - }); -}; - -export const calculateAggregateForTreeMicroplanWrapper = (entity) => { - if (!entity || typeof entity !== "object") return {}; - let newObject = {}; - for (let [key, value] of Object.entries(entity)) { - if (!value?.["hierarchicalData"]) continue; - let aggregatedTree = calculateAggregateForTree(value?.["hierarchicalData"]); - newObject[key] = { ...value, hierarchicalData: aggregatedTree }; - } - return newObject; -}; - -export const extractGeoData = ( - campaignType, - microplanData, - filterDataOrigin, - validationSchemas, - setToast, - setDataAvailability, - hierarchy, - setBoundaryData, - setFilterData, - setFilterProperties, - setFilterSelections, - setFilterPropertyNames, - state, - setChoroplethProperties, - setDataCompleteness, - t -) => { - if (!hierarchy) return; - - const initializeDataAvailability = (microplanData) => (microplanData?.upload ? "initialStage" : undefined); - - const checkFileActivity = (fileData) => fileData.active; - - const checkFileSection = (fileData, filterDataOrigin) => - filterDataOrigin?.boundriesDataOrigin?.includes(fileData?.section) || filterDataOrigin?.layerDataOrigin?.includes(fileData?.section); - - const getFileValidationSchema = (campaignType, fileData, validationSchemas) => - getSchema(campaignType, fileData?.fileType, fileData?.section, validationSchemas); - - const updateDataAvailabilityCheck = (dataAvailabilityCheck, condition, partialState) => - condition ? partialState : dataAvailabilityCheck === "initialStage" ? "false" : partialState; - - const handleFileDataError = (dataAvailabilityCheck, fileData) => - fileData?.error ? updateDataAvailabilityCheck(dataAvailabilityCheck, true, "partial") : dataAvailabilityCheck; - - const addResourcesToFilteredData = (data, resources, hypothesisAssumptionsList, formulaConfiguration, microplanData, t) => - Digit.Utils.microplan.addResourcesToFilteredDataToShow( - data, - resources, - hypothesisAssumptionsList, - formulaConfiguration, - microplanData?.microplanPreview?.userEditedResources || [], - t - ); - - const processFileData = ( - fileData, - schema, - filterDataOrigin, - virtualizationPropertiesCollector, - filterPropertiesCollector, - filterPropertieNameCollector, - resources, - hypothesisAssumptionsList, - formulaConfiguration, - t - ) => { - const properties = Object.entries(schema?.schema?.Properties || {}); - const latLngColumns = []; - const filterProperty = []; - - for (const [key, value] of properties) { - if (value?.isLocationDataColumns) latLngColumns.push(t(key)); - if (filterDataOrigin?.layerDataOrigin?.includes(fileData?.section) && value?.isFilterPropertyOfMapSection) filterProperty.push(key); - if (value?.isVisualizationPropertyOfMapSection && filterDataOrigin?.boundriesDataOrigin?.includes(fileData?.section)) - virtualizationPropertiesCollector.add(key); - } - - filterProperty.forEach((property) => filterPropertieNameCollector.add(property)); - - return { latLngColumns, filterProperty }; - }; - - const processExcelFile = (fileData, latLngColumns, resources, formulaConfiguration, hypothesisAssumptionsList, schema, t) => { - let dataAvailabilityCheck = "true"; - const columnList = Object.values(fileData?.data)?.[0]?.[0]; - const check = latLngColumns.every((colName) => columnList.includes(t(colName))); - - if (!check) dataAvailabilityCheck = "partial"; - - let dataWithResources = Object.values(fileData?.data); - if (resources && formulaConfiguration && hypothesisAssumptionsList && schema?.showResourcesInMappingSection) { - dataWithResources = dataWithResources.map((item) => - addResourcesToFilteredData(item, resources, hypothesisAssumptionsList, formulaConfiguration, microplanData, t) - ); - } - - const hasLocationData = dataWithResources.some((item) => item.some((row) => row.includes("lat") && row.includes("long"))); - - const convertedData = dataWithResources.map((item) => - item.map((row, rowIndex) => { - if (rowIndex === 0) { - if (row.indexOf("features") === -1) row.push("feature"); - return row; - } - const latIndex = item[0].findIndex((cell) => cell === "lat"); - const lonIndex = item[0].findIndex((cell) => cell === "long"); - const properties = item[0].reduce((acc, cell, index) => ({ ...acc, [cell]: row[index] }), {}); - const feature = - latIndex !== -1 && lonIndex !== -1 - ? { - type: "Feature", - properties, - geometry: { - type: "Point", - coordinates: [row[lonIndex], row[latIndex]], - }, - } - : null; - row.push(feature); - return row; - }) - ); - - return { dataAvailabilityCheck, hasLocationData, convertedData }; - }; - - const processGeoJsonFile = (fileData, filterProperty, resources, formulaConfiguration, hypothesisAssumptionsList, t) => { - const dataAvailabilityCheck = "true"; - const keys = [...Object.keys(fileData?.data.features[0].properties), "feature"]; - const values = fileData?.data.features.map((feature) => keys.map((key) => (key === "feature" ? feature : feature.properties[key] || null))); - - const dataWithResources = [[...keys, ...resources], ...values]; - const processedDataWithResources = dataWithResources.map((item, index) => { - if (index === 0) return item; - const newProperties = keys.reduce((acc, key, i) => (key !== "feature" ? { ...acc, [key]: item[i] } : acc), {}); - item[item.length - 1] = { ...item[item.length - 1], properties: newProperties }; - return item; - }); - - return { dataAvailabilityCheck, dataWithResources: processedDataWithResources }; - }; - - const updateFilterPropertiesCollector = (fileData, filterProperty, filterPropertiesCollector) => { - filterProperty.forEach((item) => { - Object.values(fileData?.data).forEach((data) => { - const filterPropertyIndex = data[0].indexOf(item); - if (filterPropertyIndex !== -1) data.slice(1).forEach((e) => filterPropertiesCollector.add(e[filterPropertyIndex])); - }); - }); - }; - - const setAvailabilityAndToastMessages = (dataAvailabilityCheck, combineList, files, setToast, t) => { - if (dataAvailabilityCheck === "true") { - const sectionWiseCheck = combineList.every((item) => Object.keys(files).includes(item)); - if (!sectionWiseCheck) dataAvailabilityCheck = "partial"; - } - - if (dataAvailabilityCheck === "initialStage" && (combineList.length === 0 || Object.keys(files).length === 0)) dataAvailabilityCheck = "false"; - - const toastMessages = { - false: { state: "warning", message: t("MAPPING_NO_DATA_TO_SHOW") }, - partial: { state: "warning", message: t("MAPPING_PARTIAL_DATA_TO_SHOW") }, - undefined: { state: "error", message: t("MAPPING_NO_DATA_TO_SHOW") }, - }; - - setToast(toastMessages[dataAvailabilityCheck]); - return dataAvailabilityCheck; - }; - - const setFinalDataAndProperties = ( - dataAvailabilityCheck, - setBoundary, - setFilter, - setBoundaryData, - setFilterData, - setFilterProperties, - setFilterSelections, - setFilterPropertyNames, - filterPropertiesCollector, - filterPropertieNameCollector, - virtualizationPropertiesCollector, - setChoroplethProperties, - resources - ) => { - setDataCompleteness(dataAvailabilityCheck); - setBoundary = calculateAggregateForTreeMicroplanWrapper(setBoundary); - setFilter = calculateAggregateForTreeMicroplanWrapper(setFilter); - setBoundaryData((previous) => ({ ...previous, ...setBoundary })); - setFilterData((previous) => ({ ...previous, ...setFilter })); - setFilterProperties([...filterPropertiesCollector]); - setFilterSelections([...filterPropertiesCollector]); - setFilterPropertyNames([...filterPropertieNameCollector]); - const tempVirtualizationPropertiesCollectorArray = [...virtualizationPropertiesCollector]; - if (tempVirtualizationPropertiesCollectorArray.length !== 0) - setChoroplethProperties([...tempVirtualizationPropertiesCollectorArray, ...(resources || [])]); - }; - - let setBoundary = {}; - let setFilter = {}; - const virtualizationPropertiesCollector = new Set(); - const filterPropertiesCollector = new Set(); - const filterPropertieNameCollector = new Set(); - const resources = state?.Resources?.find((item) => item.campaignType === campaignType)?.data; - const hypothesisAssumptionsList = microplanData?.hypothesis; - const formulaConfiguration = microplanData?.ruleEngine; - - let dataAvailabilityCheck = initializeDataAvailability(microplanData); - if (!dataAvailabilityCheck) return setToast({ state: "error", message: t("MAPPING_NO_DATA_TO_SHOW") }); - - const files = _.cloneDeep(microplanData.upload); - for (const fileData of files) { - if (!checkFileActivity(fileData) || !checkFileSection(fileData, filterDataOrigin)) { - dataAvailabilityCheck = "false"; - continue; - } - - if (!fileData?.fileType || !fileData?.section) continue; - - const schema = getFileValidationSchema(campaignType, fileData, validationSchemas); - dataAvailabilityCheck = handleFileDataError(dataAvailabilityCheck, fileData); - - const { latLngColumns, filterProperty } = processFileData( - fileData, - schema, - filterDataOrigin, - virtualizationPropertiesCollector, - filterPropertiesCollector, - filterPropertieNameCollector, - resources, - hypothesisAssumptionsList, - formulaConfiguration, - t - ); - - if (fileData?.data && Object.keys(fileData?.data).length > 0) { - switch (fileData?.fileType) { - case EXCEL: - const { dataAvailabilityCheck: excelDataAvailabilityCheck, hasLocationData, convertedData } = processExcelFile( - fileData, - latLngColumns, - resources, - formulaConfiguration, - hypothesisAssumptionsList, - schema, - t - ); - dataAvailabilityCheck = excelDataAvailabilityCheck; - if (hasLocationData) updateFilterPropertiesCollector(fileData, filterProperty, filterPropertiesCollector); - const { hierarchyLists: excelHierarchyLists, hierarchicalData: excelHierarchicalData } = processHierarchyAndData(hierarchy, convertedData); - if (filterDataOrigin?.boundriesDataOrigin?.includes(fileData.section)) - setBoundary = { ...setBoundary, [fileData.section]: { hierarchyLists: excelHierarchyLists, hierarchicalData: excelHierarchicalData } }; - else if (filterDataOrigin?.layerDataOrigin?.includes(fileData.section)) - setFilter = { ...setFilter, [fileData.section]: { hierarchyLists: excelHierarchyLists, hierarchicalData: excelHierarchicalData } }; - break; - case GEOJSON: - case SHAPEFILE: - const { dataAvailabilityCheck: geoJsonDataAvailabilityCheck, dataWithResources } = processGeoJsonFile( - fileData, - filterProperty, - resources, - formulaConfiguration, - hypothesisAssumptionsList, - t - ); - dataAvailabilityCheck = geoJsonDataAvailabilityCheck; - const { hierarchyLists: geoJsonHierarchyLists, hierarchicalData: geoJsonHierarchicalData } = processHierarchyAndData(hierarchy, [ - dataWithResources, - ]); - if (filterDataOrigin?.boundriesDataOrigin?.includes(fileData.section)) - setBoundary = { - ...setBoundary, - [fileData.section]: { hierarchyLists: geoJsonHierarchyLists, hierarchicalData: geoJsonHierarchicalData }, - }; - else if (filterDataOrigin?.layerDataOrigin?.includes(fileData.section)) - setFilter = { ...setFilter, [fileData.section]: { hierarchyLists: geoJsonHierarchyLists, hierarchicalData: geoJsonHierarchicalData } }; - break; - default: - break; - } - } - } - - const combineList = [...(filterDataOrigin?.boundriesDataOrigin || []), ...(filterDataOrigin?.layerDataOrigin || [])]; - dataAvailabilityCheck = setAvailabilityAndToastMessages(dataAvailabilityCheck, combineList, files, setToast, t); - - setFinalDataAndProperties( - dataAvailabilityCheck, - setBoundary, - setFilter, - setBoundaryData, - setFilterData, - setFilterProperties, - setFilterSelections, - setFilterPropertyNames, - filterPropertiesCollector, - filterPropertieNameCollector, - virtualizationPropertiesCollector, - setChoroplethProperties, - resources - ); -}; - -//prepare geojson to show on the map -export const prepareGeojson = (boundaryData, selection, style = {}) => { - if (!boundaryData || Object.keys(boundaryData).length === 0) return []; - let geojsonRawFeatures = []; - if (selection === "ALL") { - for (let data of Object.values(boundaryData)) { - const templist = fetchFeatures(data?.hierarchicalData, selection, [], style); - if (templist?.length !== 0) geojsonRawFeatures = [...geojsonRawFeatures, ...templist]; - } - } else if (Array.isArray(selection)) { - for (let data of Object.values(boundaryData)) { - const templist = fetchFeatures(data?.hierarchicalData, selection, [], style); - if (templist?.length !== 0) geojsonRawFeatures = [...geojsonRawFeatures, ...templist]; - } - } - - return geojsonRawFeatures.filter(Boolean); -}; -export const fetchFeatures = (data, parameter = "ALL", outputList = [], addOn = {}) => { - let tempStorage = []; - if (parameter === "ALL") { - // outputList(Object.values(data).flatMap(item=>item?.data?.feature)) - for (let [entityKey, entityValue] of Object.entries(data)) { - if (entityValue?.data?.feature) { - let feature = entityValue.data.feature; - feature.properties["name"] = entityKey; - feature.properties["addOn"] = addOn; - if (entityValue?.children) tempStorage = [...tempStorage, feature, ...fetchFeatures(entityValue?.children, parameter, outputList, addOn)]; - else tempStorage = [...tempStorage, feature]; - } else { - tempStorage = [...tempStorage, ...fetchFeatures(entityValue?.children, parameter, outputList, addOn)]; - } - } - return tempStorage; - } - if (Array.isArray(parameter)) { - for (let [entityKey, entityValue] of Object.entries(data)) { - if (parameter.includes(entityKey) && entityValue && entityValue.data && entityValue.data.feature) { - let feature = entityValue.data.feature; - feature.properties["name"] = entityKey; - feature.properties["addOn"] = addOn; - if (entityValue?.children) tempStorage = [...tempStorage, feature, ...fetchFeatures(entityValue?.children, parameter, outputList, addOn)]; - else tempStorage = [...tempStorage, feature]; - } - if (entityValue?.children) tempStorage = [...tempStorage, ...fetchFeatures(entityValue?.children, parameter, outputList, addOn)]; - } - return tempStorage; - } -}; - -export const addChoroplethProperties = (geojson, choroplethProperty, filteredSelection) => { - // Calculate min and max values of the property - const values = geojson.map((feature) => feature.properties[choroplethProperty]).filter((item) => !!item || item === 0) || []; - if (!values || values.length === 0) return []; - const convertedValues = values.map((item) => (!isNaN(item) ? item : 0)); - const minValue = Math.min(...convertedValues); - const maxValue = Math.max(...convertedValues); - - // Create a new geojson object - const newGeojson = geojson.map((feature) => { - const newFeature = { ...feature, properties: { ...feature.properties, addOn: { ...feature.properties.addOn } } }; - let color; - - if (choroplethProperty) { - color = interpolateColor(newFeature.properties[choroplethProperty], minValue, maxValue, MapChoroplethGradientColors); - } - - newFeature.properties.addOn.fillColor = color; - newFeature.properties.addOn.color = "rgba(0, 0, 0, 1)"; - if (!filteredSelection || filteredSelection.length === 0 || filteredSelection.includes(newFeature.properties.name)) { - newFeature.properties.addOn.fillOpacity = 1; - } else { - newFeature.properties.addOn.fillOpacity = 0.4; - newFeature.properties.addOn.opacity = 0.7; - } - - return newFeature; - }); - return newGeojson; -}; - -/** - * filterGeojsons : json - * filterSelection : array - * MapFilters : - */ -export const addFilterProperties = (filterGeojsons, filterSelections, filterPropertyNames, iconMapping) => { - try { - if (!filterGeojsons || !iconMapping || !filterSelections) return []; - let newFilterGeojson = []; - filterGeojsons.forEach((item) => { - if (filterPropertyNames && filterPropertyNames.length !== 0 && item.properties) { - let icon; - filterPropertyNames.forEach((name) => { - if (item.properties[name]) { - let temp = item.properties[name]; - if (!filterSelections.includes(temp)) return; - temp = iconMapping?.find((e) => e?.name == temp)?.icon?.marker; - let DynamicIcon = IconCollection?.[temp]; - if (typeof DynamicIcon === "function") { - icon = L.divIcon({ - className: "custom-svg-icon", - html: DynamicIcon({}), - iconAnchor: [25, 50], - }); - newFilterGeojson.push({ ...item, properties: { ...item?.properties, addOn: { ...item?.properties?.addOn, icon: icon } } }); - } else { - icon = DefaultMapMarker({}); - newFilterGeojson.push({ ...item, properties: { ...item?.properties, addOn: { ...item?.properties?.addOn, icon: icon } } }); - } - } - }); - } - return item; - }); - return newFilterGeojson; - } catch (error) { - console.error(error.message); - } -}; - -/** - * map: map - * geojson: geojson - * t: translator - */ - -export const addGeojsonToMap = (map, geojson, t) => { - try { - if (!map || !geojson) return false; - const geojsonLayer = L.geoJSON(geojson, { - style: (feature) => { - if (Object.keys(feature.properties.addOn).length !== 0) { - return feature.properties.addOn; - } - return { - weight: 2, - opacity: 1, - color: "rgba(176, 176, 176, 1)", - fillColor: "rgb(0,0,0,0)", - // fillColor: choroplethProperty ? color : "rgb(0,0,0,0)", - fillOpacity: 0, - // fillOpacity: choroplethProperty ? (feature?.properties?.style?.fillOpacity ? feature.properties.style.fillOpacity : 0.7) : 0, - }; - }, - pointToLayer: (feature, latlng) => { - if (feature.properties.addOn.icon) { - let icon = feature.properties.addOn.icon; - if (icon) { - return L.marker(latlng, { - icon: icon, - }); - } - } - return L.marker(latlng, { - icon: MapMarker(feature.properties.addOn), - }); - }, - onEachFeature: (feature, layer) => { - let popupContent; - popupContent = "
"; - popupContent += "
"; - popupContent += `
${feature.properties["name"]}
`; - for (let prop in feature.properties) { - if (prop !== "name" && prop !== "addOn" && prop !== "feature") { - let data = feature.properties[prop] ? feature.properties[prop] : t("NO_DATA"); - popupContent += - ""; - } - } - popupContent += "
" + - t(prop) + - "" + - data + - "
"; - layer.bindPopup(popupContent, { - minWidth: "28rem", - padding: "0", - }); - // Adjust map here when pop up closes - layer.on("popupclose", () => { - map.fitBounds(geojsonLayer.getBounds()); - }); - layer.on({ - mouseover: (e) => { - const layer = e.target; - if (layer.feature.properties.addOn && !layer.feature.properties.addOn.child) { - return; - } - if (layer.setStyle) - layer.setStyle({ - weight: 2.7, - opacity: 1, - color: "rgba(255, 255, 255, 1)", - }); - // layer.openPopup(); - }, - mouseout: (e) => { - const layer = e.target; - if (layer.feature.properties.addOn && !layer.feature.properties.addOn.child) { - return; - } - if (layer.setStyle) { - if (layer.feature.properties.addOn && Object.keys(layer.feature.properties.addOn).length !== 0) - layer.setStyle({ - ...layer.feature.properties.addOn, - }); - else - layer.setStyle({ - weight: 2, - color: "rgba(176, 176, 176, 1)", - }); - } - // layer.closePopup(); - }, - }); - }, - }); - geojsonLayer.addTo(map); - return geojsonLayer; - } catch (error) { - console.error(error.message); - } -}; - -export const interpolateColor = (value, minValue, maxValue, colors) => { - // Handle case where min and max values are the same - if (minValue === maxValue) { - // Return a default color or handle the case as needed - return colors[0].color; - } - - // Normalize the value to a percentage between 0 and 100 - const percent = !isNaN(value) ? ((value - minValue) / (maxValue - minValue)) * 100 : 0; - // Find the two colors to interpolate between - let lowerColor, upperColor; - for (let i = 0; i < colors.length - 1; i++) { - if (!isNaN(percent) && percent >= colors[i].percent && percent <= colors[i + 1].percent) { - lowerColor = colors[i]; - upperColor = colors[i + 1]; - break; - } - } - // Interpolate between the two colors - const t = (percent - lowerColor.percent) / (upperColor.percent - lowerColor.percent); - return chroma.mix(lowerColor.color, upperColor.color, t, "lab").hex(); -}; - -// Find bounds for multiple geojson together -export const findBounds = (data, buffer = 0.1) => { - if (!Array.isArray(data) || data.length === 0) { - return null; - } - - // Initialize variables to store bounds - var minLat = Number.MAX_VALUE; - var maxLat = -Number.MAX_VALUE; - var minLng = Number.MAX_VALUE; - var maxLng = -Number.MAX_VALUE; - - // Iterate through the data to find bounds - data.forEach(function (feature) { - if (!feature || !feature.geometry || !feature.geometry.type || !feature.geometry.coordinates) { - return null; - } - - var coords = feature.geometry.coordinates; - var geometryType = feature.geometry.type; - - switch (geometryType) { - case "Point": - var coord = coords; - var lat = coord[1]; - var lng = coord[0]; - minLat = Math.min(minLat, lat); - maxLat = Math.max(maxLat, lat); - minLng = Math.min(minLng, lng); - maxLng = Math.max(maxLng, lng); - break; - case "MultiPoint": - coords.forEach(function (coord) { - var lat = coord[1]; - var lng = coord[0]; - minLat = Math.min(minLat, lat); - maxLat = Math.max(maxLat, lat); - minLng = Math.min(minLng, lng); - maxLng = Math.max(maxLng, lng); - }); - break; - case "LineString": - case "MultiLineString": - case "Polygon": - case "MultiPolygon": - coords.forEach(function (polygons) { - if ((geometryType === "Polygon" || geometryType === "MultiPolygon") && Array.isArray(polygons[0][0])) { - polygons.forEach(function (coordinates) { - coordinates.forEach(function (coord) { - if (!Array.isArray(coord) || coord.length !== 2 || typeof coord[0] !== "number" || typeof coord[1] !== "number") { - return null; - } - - var lat = coord[1]; - var lng = coord[0]; - minLat = Math.min(minLat, lat); - maxLat = Math.max(maxLat, lat); - minLng = Math.min(minLng, lng); - maxLng = Math.max(maxLng, lng); - }); - }); - } else { - polygons.forEach(function (coord) { - if (!Array.isArray(coord) || coord.length !== 2 || typeof coord[0] !== "number" || typeof coord[1] !== "number") { - return null; - } - - var lat = coord[1]; - var lng = coord[0]; - minLat = Math.min(minLat, lat); - maxLat = Math.max(maxLat, lat); - minLng = Math.min(minLng, lng); - maxLng = Math.max(maxLng, lng); - }); - } - }); - break; - default: - return null; - } - }); - - // Check if valid bounds found - if (minLat === Number.MAX_VALUE || maxLat === -Number.MAX_VALUE || minLng === Number.MAX_VALUE || maxLng === -Number.MAX_VALUE) { - return null; - } - // Apply buffer to bounds - minLat -= buffer; - maxLat += buffer; - minLng -= buffer; - maxLng += buffer; - - // Set bounds for the Leaflet map - var bounds = [ - [minLat, minLng], - [maxLat, maxLng], - ]; - - return bounds; -}; - -export const filterBoundarySelection = (boundaryData, boundarySelections) => { - if (Object.keys(boundaryData).length === 0 || Object.keys(boundarySelections).length === 0) return []; - let selectionList = []; - Object.values(boundarySelections).forEach((item) => (selectionList = [...selectionList, ...item.map((e) => e.name)])); - let childrenList = []; - const set1 = new Set(selectionList); - selectionList = selectionList.filter((item) => { - const children = findChildren([item], Object.values(boundaryData)?.[0]?.hierarchicalData); - if (children) { - let childrenKeyList = getAllKeys(children); - childrenList = [...childrenList, ...childrenKeyList]; - const nonePresent = childrenKeyList.every((item) => !set1.has(item)); - const allPresent = childrenKeyList.every((item) => set1.has(item)); - return nonePresent ? true : allPresent ? true : false; - } - return true; - }); - return { filteredSelection: selectionList, childrenList }; -}; - -// Recursive function to extract all keys -export const getAllKeys = (obj, keys = []) => { - for (let [key, value] of Object.entries(obj)) { - keys.push(key); - if (value.children) { - getAllKeys(value.children, keys); - } - } - return keys; -}; - -// Remove all layers from the map -export const removeAllLayers = (map, layer) => { - if (!map) return; - layer.forEach((layer) => { - map.removeLayer(layer); - }); -}; -// Map-Marker -export const MapMarker = (style = {}) => { - return L.divIcon({ - className: "custom-svg-icon", - html: PopulationSvg(style), - iconAnchor: [25, 50], - }); -}; -export const DefaultMapMarker = (style = {}) => { - return L.divIcon({ - className: "custom-svg-icon", - html: IconCollection.DefaultMapMarkerSvg(style), - iconAnchor: [25, 50], - }); -}; - -export const disableMapInteractions = (map) => { - if (!map) return; - map.dragging.disable(); - map.scrollWheelZoom.disable(); - map.touchZoom.disable(); - map.doubleClickZoom.disable(); - map.boxZoom.disable(); - map.keyboard.disable(); -}; - -export const enableMapInteractions = (map) => { - if (!map) return; - map.dragging.enable(); - map.scrollWheelZoom.enable(); - map.touchZoom.enable(); - map.doubleClickZoom.enable(); - map.boxZoom.enable(); - map.keyboard.enable(); -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/microplanPreviewUtils.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/microplanPreviewUtils.js deleted file mode 100644 index ff5cd55208f..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/microplanPreviewUtils.js +++ /dev/null @@ -1,413 +0,0 @@ -import { EXCEL, GEOJSON, SHAPEFILE, commonColumn } from "../configs/constants"; - -export const calculateAggregateValue = (aggregateName, dataToShow) => { - if (!aggregateName || !dataToShow || dataToShow.length === 0) return; - let aggregateNameList = aggregateName; - if (typeof aggregateName !== "object") aggregateNameList = { name: aggregateName, entities: [aggregateName] }; - let aggregateData = 0; - if (aggregateNameList) - for (const item of aggregateNameList.entities) { - const columnIndex = dataToShow?.[0].indexOf(item); - dataToShow.slice(1).forEach((e) => { - if (e?.[columnIndex]) aggregateData = aggregateData + Number(e[columnIndex]); - }); - } - return aggregateData; -}; - -export const fetchMicroplanData = (microplanData, campaignType, validationSchemas) => { - if (!microplanData) return []; - - let combinesDataList = []; - // Check if microplanData and its upload property exist - if (microplanData?.upload) { - let files = microplanData?.upload; - // Loop through each file in the microplan upload - for (let fileData of files) { - const schema = getSchema(campaignType, fileData.fileType, fileData.templateIdentifier, validationSchemas); - - // Check if the file is not part of boundary or layer data origins - if (!fileData.active || !fileData.fileType || !fileData?.section) continue; // Skip files with errors or missing properties - - // Check if file contains latitude and longitude columns - if (fileData?.data) { - // Check file type and update data availability accordingly - switch (fileData?.fileType) { - case EXCEL: { - // extract dada - const mergedData = schema?.template?.hierarchyLevelWiseSheets ? Object.values(fileData?.data).flat() : Object.values(fileData?.data)?.[0]; - - let commonColumnIndex = mergedData?.[0]?.indexOf(commonColumn); - - let uniqueEntries; - if (commonColumnIndex !== undefined) - uniqueEntries = schema?.template?.hierarchyLevelWiseSheets - ? Array.from(new Map(mergedData.map((entry) => [entry[commonColumnIndex], entry])).values()) - : mergedData; - if (uniqueEntries) combinesDataList.push(uniqueEntries); - break; - } - case GEOJSON: - case SHAPEFILE: { - // Extract keys from the first feature's properties - let keys = Object.keys(fileData?.data.features[0].properties); - - // Extract corresponding values for each feature - const values = fileData?.data?.features.map((feature) => { - // list with features added to it - const temp = keys.map((key) => { - // if (feature.properties[key] === "") { - // return null; - // } - return feature.properties[key]; - }); - return temp; - }); - - let data = [keys, ...values]; - combinesDataList.push(data); - } - } - } - } - } - return combinesDataList; -}; - -// get schema for validation -export const getSchema = (campaignType, type, section, schemas) => { - return schemas.find((schema) => - schema.campaignType - ? schema.campaignType === campaignType && schema.type === type && schema.section === section - : schema.type === type && schema.section === section - ); -}; - -export const fetchMicroplanPreviewData = (campaignType, microplanData, validationSchemas, hierarchy) => { - try { - const filteredSchemaColumns = getFilteredSchemaColumnsList(campaignType, microplanData, validationSchemas, hierarchy); - const fetchedData = fetchMicroplanData(microplanData, campaignType, validationSchemas); - const dataAfterJoins = performDataJoins(fetchedData, filteredSchemaColumns); - return dataAfterJoins; - } catch (error) { - console.error("Error in fetch microplan data: ", error.message); - } -}; - -const getFilteredSchemaColumnsList = (campaignType, microplanData, validationSchemas, hierarchy) => { - let filteredSchemaColumns = getRequiredColumnsFromSchema(campaignType, microplanData, validationSchemas) || []; - if (hierarchy) { - filteredSchemaColumns = [...hierarchy, commonColumn, ...filteredSchemaColumns.filter((e) => e !== commonColumn)]; - } - return filteredSchemaColumns; -}; - -const performDataJoins = (fetchedData, filteredSchemaColumns) => { - return fetchedData.reduce((accumulator, currentData, index) => { - if (index === 0) { - return innerJoinLists(currentData, null, commonColumn, filteredSchemaColumns); - } - return innerJoinLists(accumulator, currentData, commonColumn, filteredSchemaColumns); - }, null); -}; - -export const filterObjects = (arr1, arr2) => { - if (!arr1 || !arr2) return []; - // Create a new array to store the filtered objects - let filteredArray = []; - - // Iterate through the first array - arr1.forEach((obj1) => { - // Find the corresponding object in the second array - let obj2 = _.cloneDeep(arr2.find((item) => item.key === obj1.key)); - - // If the object with the same key is found in the second array and their values are the same - if (obj2 && obj1.value !== obj2.value) { - // Push the object to the filtered array - obj1.oldValue = obj2.value; - filteredArray.push(obj1); - } - }); - - return filteredArray; -}; - -export const useHypothesis = (tempHypothesisList, hypothesisAssumptionsList) => { - // Handles the change in hypothesis value - const valueChangeHandler = (e, setTempHypothesisList, boundarySelections, setToast, t) => { - // Checks it the boundary filters at at root level ( given constraints ) - if (Object.keys(boundarySelections).length !== 0 && Object.values(boundarySelections)?.every((item) => item?.length !== 0)) - return setToast({ state: "error", message: t("HYPOTHESIS_CAN_BE_ONLY_APPLIED_ON_ADMIN_LEVEL_ZORO") }); - - // validating user input - if (e?.newValue.includes("+") || e?.newValue.includes("e")) return; - if ((e?.newValue < 0 || e.newValue > 10000000000) && e?.newValue !== "") return; - let value; - const decimalIndex = e.newValue.indexOf("."); - if (decimalIndex !== -1) { - const numDecimals = e.newValue.length - decimalIndex - 1; - if (numDecimals <= 2) { - value = e.newValue; - } else if (numDecimals > 2) { - value = e.newValue.substring(0, decimalIndex + 3); - } - } else value = parseFloat(e.newValue); - value = !isNaN(value) ? value : ""; - - // update the state with user input - let newhypothesisEntityIndex = hypothesisAssumptionsList.findIndex((item) => item?.id === e?.item?.id); - let unprocessedHypothesisList = _.cloneDeep(tempHypothesisList); - if (newhypothesisEntityIndex !== -1) unprocessedHypothesisList[newhypothesisEntityIndex].value = value; - setTempHypothesisList(unprocessedHypothesisList); - }; - - return { - valueChangeHandler, - }; -}; - -const validateRequestBody = (body, state, campaignType, setLoaderActivation, setToast, setCheckDataCompletion, navigationEvent, t) => { - if (!Digit.Utils.microplan.planConfigRequestBodyValidator(body, state, campaignType)) { - setLoaderActivation(false); - if (navigationEvent.name === "next") { - setToast({ - message: t("ERROR_DATA_NOT_SAVED"), - state: "error", - }); - setCheckDataCompletion("false"); - } else { - setCheckDataCompletion("perform-action"); - } - return false; - } - return true; -}; - -const handleApiSuccess = (data, updateData, setLoaderActivation, setMicroplanData, status) => { - updateData(); - setLoaderActivation(false); - setMicroplanData((previous) => ({ ...previous, microplanStatus: status })); -}; - -const handleApiError = (error, variables, setLoaderActivation, setToast, status, cancleNavigation, updateData, t) => { - setLoaderActivation(false); - setToast({ - message: t("ERROR_DATA_NOT_SAVED"), - state: "error", - }); - if (status === "GENERATED") { - cancleNavigation(); - } else { - updateData(); - } -}; - -const constructRequestBody = (microplanData, operatorsObject, MicroplanName, campaignId, status) => { - const body = Digit.Utils.microplan.mapDataForApi(microplanData, operatorsObject, MicroplanName, campaignId, status); - body.PlanConfiguration["id"] = microplanData?.planConfigurationId; - body.PlanConfiguration["auditDetails"] = microplanData?.auditDetails; - return body; -}; - -export const updateHyothesisAPICall = async ( - microplanData, - setMicroplanData, - operatorsObject, - MicroplanName, - campaignId, - UpdateMutate, - setToast, - updateData, - setLoaderActivation, - status, - cancleNavigation, - state, - campaignType, - navigationEvent, - setCheckDataCompletion, - t -) => { - try { - const body = constructRequestBody(microplanData, operatorsObject, MicroplanName, campaignId, status); - const isValid = validateRequestBody(body, state, campaignType, setLoaderActivation, setToast, setCheckDataCompletion, navigationEvent, t); - if (!isValid) return; - - await UpdateMutate(body, { - onSuccess: (data) => handleApiSuccess(data, updateData, setLoaderActivation, setMicroplanData, status), - onError: (error, variables) => handleApiError(error, variables, setLoaderActivation, setToast, status, cancleNavigation, updateData, t), - }); - } catch (error) { - setLoaderActivation(false); - setToast({ - message: t("ERROR_DATA_NOT_SAVED"), - state: "error", - }); - } -}; - -// get schema for validation -export const getRequiredColumnsFromSchema = (campaignType, microplanData, schemas) => { - if (!schemas || !microplanData || !microplanData?.upload || !campaignType) return []; - const sortData = []; - if (microplanData?.upload) { - for (const value of microplanData.upload) { - if (value.active && value?.error === null) { - sortData.push({ section: value.section, fileType: value?.fileType }); - } - } - } - const filteredSchemas = - schemas?.filter((schema) => { - if (schema.campaignType) { - return schema.campaignType === campaignType && sortData.some((entry) => entry.section === schema.section && entry.fileType === schema.type); - } - return sortData.some((entry) => entry.section === schema.section && entry.fileType === schema.type); - }) || []; - - let finalData = []; - let tempdata; - - tempdata = filteredSchemas - ?.flatMap((item) => - Object.entries(item?.schema?.Properties || {}).reduce((acc, [key, value]) => { - if (value?.isRuleConfigureInputs && value?.toShowInMicroplanPreview) { - acc.push(key); - } - return acc; - }, []) - ) - .filter((item) => !!item); - finalData = [...finalData, ...tempdata]; - - tempdata = filteredSchemas - ?.flatMap((item) => - Object.entries(item?.schema?.Properties || {}).reduce((acc, [key, value]) => { - if (value?.toShowInMicroplanPreview) acc.push(key); - return acc; - }, []) - ) - .filter((item) => !!item); - finalData = [...finalData, ...tempdata]; - return [...new Set(finalData)]; -}; - -/** - * Combines two datasets based on a common column, duplicating rows from data1 for each matching row in data2. - * The final dataset's columns and their order are determined by listOfColumnsNeededInFinalData. - * If data2 is not provided, rows from data1 are included with null values for missing columns. - */ -export const innerJoinLists = (data1, data2, commonColumnName, listOfColumnsNeededInFinalData) => { - // Error handling: Check if data1 array is provided - if (!Array.isArray(data1)) { - throw new Error("The first data input must be an array."); - } - - // Error handling: Check if common column name is provided - if (typeof commonColumnName !== "string") { - throw new Error("Common column name must be a string."); - } - - // Error handling: Check if listOfColumnsNeededInFinalData is provided and is an array - if (!Array.isArray(listOfColumnsNeededInFinalData)) { - throw new Error("listOfColumnsNeededInFinalData must be an array."); - } - - // Find the index of the common column in the first dataset - const commonColumnIndex1 = data1[0].indexOf(commonColumnName); - - // Error handling: Check if common column exists in the first dataset - if (commonColumnIndex1 === -1) { - throw new Error(`Common column "${commonColumnName}" not found in the first dataset.`); - } - - let commonColumnIndex2 = -1; - const data2Map = new Map(); - if (data2) { - // Find the index of the common column in the second dataset - commonColumnIndex2 = data2[0].indexOf(commonColumnName); - - // Error handling: Check if common column exists in the second dataset - if (commonColumnIndex2 === -1) { - throw new Error(`Common column "${commonColumnName}" not found in the second dataset.`); - } - - // Create a map for the second dataset for quick lookup by the common column value - for (let i = 1; i < data2.length; i++) { - const row = data2[i]; - const commonValue = row[commonColumnIndex2]; - if (!data2Map.has(commonValue)) { - data2Map.set(commonValue, []); - } - data2Map.get(commonValue).push(row); - } - } - - // Determine the headers for the final combined dataset based on listOfColumnsNeededInFinalData - const combinedHeaders = listOfColumnsNeededInFinalData.filter((header) => data1[0].includes(header) || data2?.[0].includes(header)); - - // Combine rows - const combinedData = [combinedHeaders]; - const addedCommonValues = new Set(); - for (let i = 1; i < data1.length; i++) { - const row1 = data1[i]; - const commonValue = row1[commonColumnIndex1]; - const rows2 = data2 ? data2Map.get(commonValue) || [[null]] : [[null]]; // Handle missing common values with a placeholder array of null - - // Check if rows2 is the placeholder array - const isPlaceholderArray = rows2.length === 1 && rows2[0].every((value) => value === null); - - // Create combined rows for each row in data2 - if (isPlaceholderArray) { - // If no corresponding row found in data2, use row from data1 with null values for missing columns - const combinedRow = combinedHeaders.map((header) => { - const index1 = data1[0].indexOf(header); - return index1 !== -1 ? row1[index1] : null; - }); - combinedData.push(combinedRow); - } else { - // If corresponding rows found in data2, combine each row from data2 with row from data1 - rows2.forEach((row2) => { - const combinedRow = combinedHeaders.map((header) => { - const index1 = data1[0].indexOf(header); - const index2 = data2 ? data2[0].indexOf(header) : -1; - return index1 !== -1 ? row1[index1] : index2 !== -1 ? row2[index2] : null; - }); - combinedData.push(combinedRow); - }); - } - addedCommonValues.add(commonValue); - } - // Add rows from data2 that do not have a matching row in data1 - if (data2) { - for (let i = 1; i < data2.length; i++) { - const row2 = data2[i]; - const commonValue = row2[commonColumnIndex2]; - if (!addedCommonValues.has(commonValue)) { - const combinedRow = combinedHeaders.map((header) => { - // const index1 = data1[0].indexOf(header); - const index2 = data2[0].indexOf(header); - return index2 !== -1 ? row2[index2] : null; - }); - combinedData.push(combinedRow); - } - } - } - - return combinedData; -}; - -// function to filter the microplan data with respect to the hierarchy selected by the user -export const filterMicroplanDataToShowWithHierarchySelection = (data, selections, hierarchy, hierarchyIndex = 0) => { - if (!selections || selections?.length === 0) return data; - if (hierarchyIndex >= hierarchy?.length) return data; - const filteredHirarchyLevelList = selections?.[hierarchy?.[hierarchyIndex]]?.map((item) => item?.name); - if (!filteredHirarchyLevelList || filteredHirarchyLevelList?.length === 0) return data; - const columnDataIndexForHierarchyLevel = data?.[0]?.indexOf(hierarchy?.[hierarchyIndex]); - if (columnDataIndexForHierarchyLevel === -1) return data; - const levelFilteredData = data.filter((item, index) => { - if (index === 0) return true; - if (item?.[columnDataIndexForHierarchyLevel] && filteredHirarchyLevelList.includes(item?.[columnDataIndexForHierarchyLevel])) return true; - return false; - }); - return filterMicroplanDataToShowWithHierarchySelection(levelFilteredData, selections, hierarchy, hierarchyIndex + 1); -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/processHierarchyAndData.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/processHierarchyAndData.js deleted file mode 100644 index 09e24a4658e..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/processHierarchyAndData.js +++ /dev/null @@ -1,351 +0,0 @@ -export const processHierarchyAndData = (hierarchy, allData) => { - const hierarchyLists = {}; - let hierarchicalData = {}; - try { - // Process hierarchy - hierarchy.forEach((item) => { - hierarchyLists[item.boundaryType] = []; - }); - - // Process all sets of data - allData.forEach((data) => { - const dataHierarchicalData = {}; - - // Process data for this set - data.slice(1).forEach((row) => { - // Exclude the header row - let currentNode = dataHierarchicalData; - let parent = null; - hierarchy.forEach((item, index) => { - const boundaryType = item.boundaryType; - const dataIndex = data?.[0].indexOf(boundaryType); - if (dataIndex === -1) return; - const cellValue = row[dataIndex]; - if (!cellValue) return; - // Populate hierarchy lists - if (!hierarchyLists[boundaryType].includes(cellValue) && cellValue !== null && cellValue !== "" && cellValue !== undefined) { - hierarchyLists[boundaryType].push(cellValue); - } - - // Populate hierarchical data - if (!currentNode[cellValue]) { - currentNode[cellValue] = { - name: cellValue, - boundaryType: boundaryType, - children: {}, - data: null, - }; - } - - // Assign row data to the correct hierarchical level - if (cellValue) { - if (index === hierarchy.length - 1) { - currentNode[cellValue].data = createDataObject(data[0], row); - } else if (index + 1 < hierarchy.length) { - let nextHierarchyList = hierarchy.slice(index + 1); - let check = true; - nextHierarchyList.forEach((e) => { - const boundaryType = e.boundaryType; - const dataIndex = data?.[0].indexOf(boundaryType); - if (dataIndex === -1) return; - check = check && !row[dataIndex]; - }); - if (check) currentNode[cellValue].data = createDataObject(data[0], row); - } - } - currentNode = currentNode[cellValue].children; - }); - }); - - // Merge dataHierarchicalData into hierarchicalData - hierarchicalData = mergeHierarchicalData(hierarchicalData, dataHierarchicalData); - }); - - // Remove null element from children of each province - Object.values(hierarchicalData).forEach((country) => { - if (country.children[null]) { - country.data = country.children[null].data; - country.children[null] = undefined; - } - }); - } catch (error) { - console.error("Error in processing hierarchy and uploaded data: ", error.message); - // Return empty objects in case of error - return { hierarchyLists: {}, hierarchicalData: {} }; - } - - return { hierarchyLists, hierarchicalData }; -}; - -// Function to merge two hierarchical data objects -const mergeHierarchicalData = (data1, data2) => { - for (const [key, value] of Object.entries(data2)) { - if (!data1[key]) { - if (!value.data) value.data = {}; - data1[key] = value || {}; - } else { - data1[key].data = value.data; // Merge data - mergeHierarchicalData(data1[key].children, value.children); // Recursively merge children - } - if (data1[key].data?.feature) { - const { feature, ...temp } = value.data ? _.cloneDeep(value.data) : {}; - data1[key].data.feature.properties = { ...data1[key].data?.feature?.properties, ...temp }; - } - } - return data1; -}; - -// Function to create a data object with key-value pairs from headers and row data -const createDataObject = (headers, row) => { - const dataObject = {}; - headers.forEach((header, index) => { - dataObject[header] = row[index]; - }); - return dataObject; -}; - -// Find parent in hierarchy -export const findParent = (name, hierarchy, parent, accumulator = []) => { - if (!name || !hierarchy) return null; - for (let key in hierarchy) { - if (hierarchy[key]?.name == name) { - accumulator.push(parent); - } - if (hierarchy[key]?.children) { - let response = findParent(name, hierarchy[key]?.children, hierarchy[key], accumulator); - if (response) - response.forEach((item) => { - if (!accumulator.includes(item)) { - accumulator.push(item); - } - }); - } else { - return accumulator; - } - } - return accumulator; -}; - -/** - * - * @param {Array of parents} parents - * @param {hierarchycal Object data} hierarchy - * @returns An Array containing all the cummulative children - */ -export const findChildren = (parents, hierarchy) => { - const hierarchyTraveller = (parents, hierarchy, accumulator = {}) => { - let tempData = []; - if (accumulator && Object.keys(accumulator).length !== 0) - tempData = { - ...accumulator, - ...hierarchy.reduce((data, item) => { - if (parents.includes(item?.name) && item?.children) { - for (const key in item.children) { - if (!data[key]) { - data[key] = item.children[key]; - } - } - } - return data; - }, {}), - }; - else - tempData = hierarchy.reduce((data, item) => { - if (parents.includes(item?.name) && item?.children) { - for (const key in item.children) { - if (!data[key]) { - data[key] = item.children[key]; - } - } - } - return data; - }, {}); - for (let parent of hierarchy) { - if (parent?.children) tempData = hierarchyTraveller(parents, Object.values(parent?.children), tempData); - } - return tempData; - }; - return hierarchyTraveller(parents, Object.values(hierarchy), {}); -}; - -// Fetched data from tree -export const fetchDropdownValues = (boundaryData, hierarchy, boundarySelections, changedBoundaryType) => { - if ( - !hierarchy || - !boundaryData || - !boundarySelections || - hierarchy.length === 0 || - Object.keys(hierarchy).length === 0 || - Object.keys(boundaryData).length === 0 - ) - return []; - let TempHierarchy = _.cloneDeep(hierarchy); - if (!boundarySelections || Object.values(boundarySelections)?.every((item) => item?.length === 0)) { - for (let i in TempHierarchy) { - if (i === "0") { - TempHierarchy[0].dropDownOptions = findByBoundaryType( - TempHierarchy?.[0]?.boundaryType, - Object.values(boundaryData)?.[0]?.hierarchicalData - ).map((data, index) => ({ - name: data, - code: data, - boundaryType: TempHierarchy?.[0]?.boundaryType, - parentBoundaryType: undefined, - })); - } else TempHierarchy[i].dropDownOptions = []; - } - } else { - const currentHierarchy = findCurrentFilteredHierarchy(Object.values(boundaryData)?.[0]?.hierarchicalData, boundarySelections, TempHierarchy); - let currentDropdownIndex = 0; - hierarchy.forEach((e, index) => { - if (e && e?.boundaryType == changedBoundaryType) { - // && boundarySelections && boundarySelections[e.boundaryType] && boundarySelections[e.boundaryType].length !== 0) { - currentDropdownIndex = index; - } - }); - Object.entries(boundarySelections)?.forEach(([key, value]) => { - let currentindex = hierarchy.findIndex((e) => e?.boundaryType === key); - if (currentDropdownIndex !== currentindex) return; - let childIndex = hierarchy.findIndex((e) => e?.parentBoundaryType === key); - if (childIndex == -1) return; - if (TempHierarchy?.[childIndex]) { - let newDropDownValuesForChild = []; - for (const element of value) { - let tempStore = Object.values(findChildren([element.name], currentHierarchy)).map((value) => ({ - name: value?.name, - code: value?.name, - parent: element, - boundaryType: TempHierarchy[childIndex]?.boundaryType, - parentBoundaryType: TempHierarchy[childIndex]?.parentBoundaryType, - })); - if (tempStore) newDropDownValuesForChild.push(...tempStore); - } - // if (TempHierarchy[childIndex].dropDownOptions) - // TempHierarchy[childIndex].dropDownOptions = [...TempHierarchy[childIndex].dropDownOptions, ...newDropDownValuesForChild]; - TempHierarchy[childIndex].dropDownOptions = newDropDownValuesForChild; - } - }); - } - return TempHierarchy; -}; - -const findByBoundaryType = (boundaryType, hierarchy) => { - for (let [key, value] of Object.entries(hierarchy)) { - if (value?.boundaryType === boundaryType) return Object.keys(hierarchy).filter(Boolean); - if (value?.children) return findByBoundaryType(boundaryType, value?.children); - return []; - } - return []; -}; - -// makes a tree with the boundary selections as there might be duplicates in different branches that are not yet selected -const findCurrentFilteredHierarchy = (hierarchyTree, boundarySelections, hierarchy) => { - const newtree = constructNewHierarchyTree(hierarchy, hierarchyTree, boundarySelections); - return newtree; -}; - -const constructNewHierarchyTree = (hierarchy, oldTree, boundarySelection, level = 0) => { - // let newTree = { ...oldTree }; // Initialize a new hierarchy tree - let newTree = {}; // Initialize a new hierarchy tree - if (!hierarchy?.[level]) return; - const levelName = hierarchy[level].boundaryType; - - // Get the selections for this level from the boundary selection object - const selections = boundarySelection[levelName] || []; - // If there are selections for this level - if (selections.length > 0) { - // Construct the new hierarchy tree based on selections - for (const selection of selections) { - const { name } = selection; - // If the selection exists in the existing hierarchy tree - if (oldTree[name]) { - // Add the selected division to the new hierarchy tree - newTree[name] = { ...oldTree[name] }; - // If there are children, recursively construct the children - if (oldTree[name].children) { - oldTree[name].children; - const nonNullObject = Object.entries(oldTree[name].children).reduce((acc, [key, value]) => { - if (value.name !== null) { - acc[key] = value; - } - return acc; - }, {}); - newTree[name].children = constructNewHierarchyTree(hierarchy, nonNullObject, boundarySelection, level + 1); - } - } - } - } else { - const nonNullObject = Object.entries(oldTree).reduce((acc, [key, value]) => { - if (value.name !== null) { - acc[key] = value; - } - return acc; - }, {}); - newTree = nonNullObject; - } - - return newTree; -}; - -// Recursively calculates aggregate values for numerical properties within the `data` objects of each node in a hierarchical tree structure. -// Updates the `properties` object within the `feature` object of each node with the aggregate values, if present. -export const calculateAggregateForTree = (tree) => { - try { - function calculateAggregate(node) { - if (!node.children || Object.keys(node.children).length === 0) { - // if the node has no children, return a new node with its own data - return { ...node, data: { ...node.data } }; - } - - // Recursively calculate aggregate values for each child - const newChildren = {}; - - for (const childKey in node.children) { - const child = node.children[childKey]; - const newChild = calculateAggregate(child); - newChildren[childKey] = newChild; - } - - // Aggregate numerical values dynamically - const aggregate = {}; - for (const childKey in newChildren) { - const child = newChildren[childKey]; - for (const prop in child.data) { - if (typeof child.data[prop] === "number") { - aggregate[prop] = (aggregate[prop] || 0) + child.data[prop]; - } - } - } - - // Create a new node with updated data - const newNode = { - ...node, - data: { ...node.data, ...aggregate }, - children: newChildren, - }; - - // Update properties in the feature object - if (newNode.data.feature) { - newNode.data.feature.properties = { ...newNode.data.feature.properties, ...aggregate }; - } - - return newNode; - } - - const newTree = {}; - - // Iterate over each node object - for (const nodeKey in tree) { - const node = tree[nodeKey]; - // Calculate aggregate values for the current node - const newNode = calculateAggregate(node); - // Add the updated node to the new tree - newTree[nodeKey] = newNode; - } - - return newTree; - } catch (error) { - console.error("Failed to calculate treenode aggregates"); - return {}; - } -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js deleted file mode 100644 index 129ec488b43..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js +++ /dev/null @@ -1,486 +0,0 @@ -import { Request } from "@egovernments/digit-ui-libraries"; -import { parseXlsxToJsonMultipleSheetsForSessionUtil } from "../utils/exceltojson"; -import JSZip from "jszip"; -import * as XLSX from "xlsx"; -import axios from "axios"; -import shp from "shpjs"; -import { EXCEL, GEOJSON, SHAPEFILE, ACCEPT_HEADERS, LOCALITY, commonColumn } from "../configs/constants"; -import { addBoundaryData, fetchBoundaryData, filterBoundaries } from "./createTemplate"; -import { handleExcelFile } from "./uploadUtils"; - -function handleExcelArrayBuffer(arrayBuffer, file) { - return new Promise((resolve, reject) => { - try { - // Read the response as an array buffer - // const arrayBuffer = response.arrayBuffer(); - - // Convert the array buffer to binary string - const data = new Uint8Array(arrayBuffer); - const binaryString = String.fromCharCode.apply(null, data); - - // Parse the binary string into a workbook - const workbook = XLSX.read(binaryString, { type: "binary" }); - - // Assuming there's only one sheet in the workbook - const sheetName = workbook.SheetNames[0]; - const sheet = workbook.Sheets[sheetName]; - - // Convert the sheet to JSON object - const jsonData = XLSX.utils.sheet_to_json(sheet); - - resolve(jsonData); - } catch (error) { - reject(error); - } - }); -} - -function shpToGeoJSON(shpBuffer, file) { - return new Promise((resolve, reject) => { - try { - shp(shpBuffer) - .then((geojson) => { - resolve({ jsonData: geojson, file }); - }) - .catch((error) => reject(error)); - } catch (error) { - reject(error); - } - }); -} - -function parseGeoJSONResponse(arrayBuffer, file) { - return new Promise((resolve, reject) => { - try { - const decoder = new TextDecoder("utf-8"); - const jsonString = decoder.decode(arrayBuffer); - const jsonData = JSON.parse(jsonString); - resolve({ jsonData, file }); - } catch (error) { - reject(error); - } - }); -} - -// Function to read blob data and parse it into JSON -function parseBlobToJSON(blob, file) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - - reader.onload = function (event) { - const data = new Uint8Array(event.target.result); - const workbook = XLSX.read(data, { type: "array" }); - const jsonData = {}; - - workbook.SheetNames.forEach((sheetName) => { - const sheetData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]); - jsonData[sheetName] = sheetData; - }); - - resolve({ jsonData, file }); - }; - - reader.onerror = function () { - reject(new Error("Error reading the blob data")); - }; - - reader.readAsArrayBuffer(blob); - }); -} - -export const updateSessionUtils = { - computeSessionObject: async (row, state, additionalProps) => { - const sessionObj = {}; - const setCurrentPage = () => { - sessionObj.currentPage = { - id: 0, - name: "MICROPLAN_DETAILS", - component: "MicroplanDetails", - checkForCompleteness: true, - }; - }; - - //currently hardcoded - const setMicroplanStatus = () => { - sessionObj.status = { - MICROPLAN_DETAILS: true, - UPLOAD_DATA: true, - HYPOTHESIS: true, - FORMULA_CONFIGURATION: true, - }; - }; - - const setMicroplanDetails = () => { - if (row.name) { - sessionObj.microplanDetails = { - name: row?.name, - }; - } - }; - - const setMicroplanHypothesis = () => { - if (row.assumptions.length > 0) { - sessionObj.hypothesis = row.assumptions?.filter((item) => item?.active); - } - }; - - const sortRules = (rules) => { - // Step 1: Identify all unique rule outputs - const allOutputs = [...new Set(rules.map((rule) => rule.output))]; - - // Step 2: Build input-output relationships - const inputOutputMap = new Map(); // Map to store input -> output relationship - rules.forEach((rule) => { - const { input, output } = rule; - if (!inputOutputMap.has(input)) { - inputOutputMap.set(input, []); - } - inputOutputMap.get(input).push(output); - }); - - // Step 3: Sort the output list based on dependencies - const sortedOutputList = []; - const visited = new Set(); - - const dfs = (output) => { - if (!visited.has(output)) { - visited.add(output); - if (inputOutputMap.has(output)) { - inputOutputMap.get(output).forEach((input) => { - dfs(input); - }); - } - sortedOutputList.push(output); - } - }; - - // Sort outputs based on dependencies - allOutputs.forEach((output) => { - dfs(output); - }); - - // Reverse to get outputs in the correct order (outputs first) - sortedOutputList.reverse(); - - // Step 4: Arrange rules based on sorted output list - const sortedRules = []; - const ruleMap = new Map(rules.map((rule) => [rule.id, rule])); - - sortedOutputList.forEach((output) => { - rules - .filter((rule) => rule.output === output) - .forEach((rule) => { - sortedRules.push(rule); - }); - }); - - return sortedRules; - }; - - const setMicroplanRuleEngine = () => { - const rulesList = state.UIConfiguration?.filter((item) => item.name === "ruleConfigure")?.[0]?.ruleConfigureOperators; - let sortedRules = sortRules(row.operations); - if (row.operations.length > 0) { - sessionObj.ruleEngine = sortedRules?.map((item) => { - return { - ...item, - operator: rulesList.filter((rule) => rule.code === item.operator)?.[0]?.name, - }; - }); - } - }; - - const setDraftValues = () => { - sessionObj.planConfigurationId = row?.id; - sessionObj.auditDetails = row.auditDetails; - }; - - const fetchBoundaryDataWrapper = async (schemaData) => { - let boundaryDataAgainstBoundaryCode = {}; - // if (!schemaData?.doHierarchyCheckInUploadedData) { - try { - const rootBoundary = additionalProps.campaignData?.boundaries?.filter((boundary) => boundary.isRoot); // Retrieve session storage data once and store it in a variable - const sessionData = Digit.SessionStorage.get("microplanHelperData") || {}; - let boundaryData = sessionData.filteredBoundaries; - let filteredBoundaries; - if (!boundaryData) { - // Only fetch boundary data if not present in session storage - boundaryData = await fetchBoundaryData( - await Digit.ULBService.getCurrentTenantId(), - additionalProps.campaignData?.hierarchyType, - rootBoundary?.[0]?.code - ); - filteredBoundaries = await filterBoundaries(boundaryData, additionalProps.campaignData?.boundaries); - - // Update the session storage with the new filtered boundaries - Digit.SessionStorage.set("microplanHelperData", { - ...sessionData, - filteredBoundaries: filteredBoundaries, - }); - } else { - filteredBoundaries = boundaryData; - } - const xlsxData = addBoundaryData([], filteredBoundaries, additionalProps.campaignData?.hierarchyType)?.[0]?.data; - xlsxData.forEach((item, i) => { - if (i === 0) return; - let boundaryCodeIndex = xlsxData?.[0]?.indexOf(commonColumn); - if (boundaryCodeIndex >= item.length) { - // If boundaryCodeIndex is out of bounds, return the item as is - boundaryDataAgainstBoundaryCode[item[boundaryCodeIndex]] = item.slice().map(additionalProps.t); - } else { - // Otherwise, remove the element at boundaryCodeIndex - boundaryDataAgainstBoundaryCode[item[boundaryCodeIndex]] = item - .slice(0, boundaryCodeIndex) - .concat(item.slice(boundaryCodeIndex + 1)) - .map(additionalProps.t); - } - }); - } catch (error) { - console.error(error?.message); - } - // } - return boundaryDataAgainstBoundaryCode; - }; - - const handleGeoJson = async (file, result, upload, translatedData, active, processedData, shapefileOrigin = false) => { - if (!file) { - console.error(`${shapefileOrigin ? "Shapefile" : "Geojson"} file is undefined`); - return upload; - } - - const { inputFileType, templateIdentifier, filestoreId, id: fileId } = file || {}; - let uploadObject = createUploadObject(templateIdentifier, inputFileType, fileId, filestoreId, shapefileOrigin ? ".zip" : ".geojson", active); - - const schema = findSchema(inputFileType, templateIdentifier, additionalProps?.campaignType); - if (!schema) { - console.error("Schema got undefined while handling geojson at handleGeoJson"); - return [...upload, uploadObject]; - } - - await handleGeoJsonSpecific(schema, uploadObject, templateIdentifier, result, translatedData, filestoreId, processedData); - upload.push(uploadObject); - return upload; - }; - - const handleExcel = (file, result, upload, translatedData, active) => { - if (!file) { - console.error("Excel file is undefined"); - return upload; - } - - const { inputFileType, templateIdentifier, filestoreId, id: fileId } = file || {}; - let uploadObject = createUploadObject(templateIdentifier, inputFileType, fileId, filestoreId, ".xlsx", active), - schema = findSchema(inputFileType, templateIdentifier, additionalProps.campaignType); - if (!schema) { - console.error("Schema got undefined while handling excel at handleExcel"); - return [...upload, uploadObject]; - } - - uploadObject.data = result; //resultAfterMapping?.tempFileDataToStore; - upload.push(uploadObject); - return upload; - }; - - const createUploadObject = (templateIdentifier, inputFileType, fileId, filestoreId, extension, active) => ({ - id: fileId, - templateIdentifier, - section: templateIdentifier, - fileName: `${templateIdentifier}${extension}`, - fileType: inputFileType, - file: null, - fileId: fileId, - filestoreId: filestoreId, - error: null, - resourceMapping: row?.resourceMapping?.filter((resourse) => resourse.filestoreId === filestoreId).map((item) => ({ ...item, filestoreId })), - data: {}, - active, - }); - - const findSchema = (inputFileType, templateIdentifier, campaignType) => { - return state?.Schemas?.find( - (schema) => - schema.type === inputFileType && schema.section === templateIdentifier && (!schema.campaignType || schema.campaignType === campaignType) - ); - }; - - const handleGeoJsonSpecific = async (schema, upload, templateIdentifier, result, translatedData, filestoreId, processedData) => { - let schemaKeys; - if (schema?.schema?.["Properties"]) { - schemaKeys = additionalProps.hierarchyData?.concat(Object.keys(schema.schema["Properties"])); - } - upload.data = result; - if (processedData) return; - const mappedToList = upload?.resourceMapping.map((item) => item.mappedTo); - let sortedSecondList = Digit.Utils.microplan.sortSecondListBasedOnFirstListOrder(schemaKeys, upload?.resourceMapping); - const newFeatures = result["features"].map((item) => { - let newProperties = {}; - sortedSecondList - ?.filter((resourse) => resourse.filestoreId === filestoreId) - .forEach((e) => { - newProperties[e["mappedTo"]] = item["properties"][e["mappedFrom"]]; - }); - item["properties"] = newProperties; - return item; - }); - upload.data.features = newFeatures; - if ( - additionalProps.hierarchyData?.every( - (item) => - !mappedToList.includes(`${additionalProps.campaignData?.hierarchyType}_${Digit.Utils.microplan.transformIntoLocalisationCode(item)}`) - ) - ) { - let boundaryDataAgainstBoundaryCode = await fetchBoundaryDataWrapper(schema); - upload.data.features.forEach((feature) => { - const boundaryCode = feature.properties.boundaryCode; - let additionalDetails = {}; - for (let i = 0; i < additionalProps.hierarchyData?.length; i++) { - if (boundaryDataAgainstBoundaryCode[boundaryCode]?.[i] || boundaryDataAgainstBoundaryCode[boundaryCode]?.[i] === "") { - additionalDetails[additionalProps.hierarchyData?.[i]] = boundaryDataAgainstBoundaryCode[boundaryCode][i]; - } else { - additionalDetails[additionalProps.hierarchyData?.[i]] = ""; - } - } - feature.properties = { ...additionalDetails, ...feature.properties }; - }); - } - }; - - const fetchFiles = async () => { - const files = row?.files; - if (!files || files.length === 0) { - return []; - } - - const promises = []; - let storedData = []; - for (const { filestoreId, inputFileType, templateIdentifier, id, active } of files) { - if (!active) continue; - const schemaData = findSchema(inputFileType, templateIdentifier, additionalProps?.campaignType); - if (!schemaData) { - console.error("Schema got undefined while handling geojson at handleGeoJson"); - return [...upload, uploadObject]; - } - const boundaryDataAgainstBoundaryCode = {}; - let fileData = { - filestoreId, - inputFileType, - templateIdentifier, - id, - }; - let dataInSsn = Digit.SessionStorage.get("microplanData")?.upload?.find((item) => item.active && item.id === id); - if (dataInSsn && dataInSsn.filestoreId === filestoreId) { - storedData.push({ file: fileData, jsonData: dataInSsn?.data, processedData: true, translatedData: false, active }); - } else { - const promiseToAttach = axios - .get("/filestore/v1/files/id", { - responseType: "arraybuffer", - headers: { - "Content-Type": "application/json", - Accept: ACCEPT_HEADERS[inputFileType], - "auth-token": Digit.UserService.getUser()?.["access_token"], - }, - params: { - tenantId: Digit.ULBService.getCurrentTenantId(), - fileStoreId: filestoreId, - }, - }) - .then(async (res) => { - if (inputFileType === EXCEL) { - try { - const file = new Blob([res.data], { type: ACCEPT_HEADERS[inputFileType] }); - const response = await handleExcelFile( - file, - schemaData, - additionalProps.hierarchyData.map( - (item) => `${additionalProps.campaignData?.hierarchyType}_${Digit.Utils.microplan.transformIntoLocalisationCode(item)}` - ), - { id: inputFileType }, - boundaryDataAgainstBoundaryCode, - () => {}, - additionalProps.t, - additionalProps.campaignData, - additionalProps.readMeSheetName - ); - let fileData = { - filestoreId, - inputFileType, - templateIdentifier, - id, - }; - - return { jsonData: response.fileDataToStore, file: fileData, translatedData: true, active }; - } catch (error) { - console.error(error); - } - } else if (inputFileType === GEOJSON) { - let response = await parseGeoJSONResponse(res.data, { - filestoreId, - inputFileType, - templateIdentifier, - id, - }); - return { ...response, translatedData: true, active }; - } else if (inputFileType === SHAPEFILE) { - const geoJson = await shpToGeoJSON(res.data, { - filestoreId, - inputFileType, - templateIdentifier, - id, - }); - return { ...geoJson, translatedData: true, active }; - } - }); - promises.push(promiseToAttach); - } - } - - const resolvedPromises = await Promise.all(promises); - let result = storedData; - if (resolvedPromises) result = [...storedData, ...resolvedPromises]; - return result; - }; - const setMicroplanUpload = async (filesResponse) => { - //here based on files response set data in session - if (filesResponse.length === 0) { - return {}; - } - //populate this object based on the files and return - let upload = []; - - await filesResponse.forEach(async ({ jsonData, file, translatedData, active, processedData }, idx) => { - switch (file?.inputFileType) { - case "Shapefile": - upload = await handleGeoJson(file, jsonData, upload, translatedData, active, processedData, true); - break; - case "Excel": - upload = handleExcel(file, jsonData, upload, translatedData, active); - break; - case "GeoJSON": - upload = await handleGeoJson(file, jsonData, upload, translatedData, active, processedData); - break; - default: - break; - } - }); - //here basically parse the files data from filestore parse it and populate upload object based on file type -> excel,shape,geojson - return upload; - }; - - try { - setCurrentPage(); - setMicroplanStatus(); - setMicroplanDetails(); - setMicroplanHypothesis(); - setMicroplanRuleEngine(); - setDraftValues(); - // calling fucntion to cache filtered boundary data - await fetchBoundaryDataWrapper({}); - const filesResponse = await fetchFiles(); - const upload = await setMicroplanUpload(filesResponse); - sessionObj.upload = upload; - return sessionObj; - } catch (error) { - console.error(error.message); - } - }, -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/uploadUtils.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/uploadUtils.js deleted file mode 100644 index 066f47c47f3..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/uploadUtils.js +++ /dev/null @@ -1,880 +0,0 @@ -import ExcelJS from "exceljs"; -import { - freezeSheetValues, - freezeWorkbookValues, - hideUniqueIdentifierColumn, - performUnfreezeCells, - unfreezeColumnsByHeader, - updateFontNameToRoboto, -} from "../utils/excelUtils"; -import { addBoundaryData, createTemplate, fetchBoundaryData, filterBoundaries } from "../utils/createTemplate"; -import { BOUNDARY_DATA_SHEET, EXCEL, FACILITY_DATA_SHEET, SCHEMA_PROPERTIES_PREFIX, SHEET_COLUMN_WIDTH, commonColumn } from "../configs/constants"; -import shp from "shpjs"; -import JSZip from "jszip"; -import { checkForErrorInUploadedFileExcel } from "../utils/excelValidations"; -import { convertJsonToXlsx } from "../utils/jsonToExcelBlob"; -import { parseXlsxToJsonMultipleSheets } from "../utils/exceltojson"; -import { geojsonValidations } from "../utils/geojsonValidations"; - -// Function for checking the uploaded file for nameing conventions -export const validateNamingConvention = (file, namingConvention, setToast, t) => { - try { - let processedConvention = namingConvention.replace("$", ".[^.]*$"); - const regx = new RegExp(processedConvention); - - if (regx && !regx.test(file.name)) { - setToast({ - state: "error", - message: t("ERROR_NAMING_CONVENSION"), - }); - return false; - } - return true; - } catch (error) { - console.error(error.message); - setToast({ - state: "error", - message: t("ERROR_UNKNOWN"), - }); - } -}; - -// Function for reading ancd checking geojson data -export const readGeojson = async (file, t) => { - return new Promise((resolve, reject) => { - if (!file) return resolve({ valid: false, toast: { state: "error", message: t("ERROR_PARSING_FILE") } }); - - const reader = new FileReader(); - reader.onload = (e) => { - try { - const geoJSONData = JSON.parse(e.target.result); - const trimmedGeoJSONData = trimJSON(geoJSONData); - resolve({ valid: true, geojsonData: trimmedGeoJSONData }); - } catch (error) { - resolve({ valid: false, toast: { state: "error", message: t("ERROR_INCORRECT_FORMAT") } }); - } - }; - reader.onerror = (error) => { - resolve({ valid: false, toast: { state: "error", message: t("ERROR_CORRUPTED_FILE") } }); - }; - - reader.readAsText(file); - }); -}; - -// Function to recursively trim leading and trailing spaces from string values in a JSON object -export const trimJSON = (jsonObject) => { - if (typeof jsonObject !== "object") { - return jsonObject; // If not an object, return as is - } - - if (Array.isArray(jsonObject)) { - return jsonObject.map((item) => trimJSON(item)); // If it's an array, recursively trim each item - } - - const trimmedObject = {}; - for (const key in jsonObject) { - if (Object.hasOwn(jsonObject, key)) { - const value = jsonObject[key]; - // Trim string values, recursively trim objects - trimmedObject[key.trim()] = typeof value === "string" ? value.trim() : typeof value === "object" ? trimJSON(value) : value; - } - } - return trimmedObject; -}; -// Function for reading and validating shape file data -export const readAndValidateShapeFiles = async (file, t, namingConvention) => { - return new Promise((resolve, reject) => { - const readAndValidate = async () => { - if (!file) { - resolve({ valid: false, toast: { state: "error", message: t("ERROR_PARSING_FILE") } }); - } - const fileRegex = new RegExp(namingConvention.replace("$", ".*$")); - // File Size Check - const fileSizeInBytes = file.size; - const maxSizeInBytes = 2 * 1024 * 1024 * 1024; // 2 GB - - // Check if file size is within limit - if (fileSizeInBytes > maxSizeInBytes) - resolve({ valid: false, message: t("ERROR_FILE_SIZE"), toast: { state: "error", message: t("ERROR_FILE_SIZE") } }); - - try { - const zip = await JSZip.loadAsync(file); - const isEPSG4326 = await checkProjection(zip); - if (!isEPSG4326) { - resolve({ valid: false, message: t("ERROR_WRONG_PRJ"), toast: { state: "error", message: t("ERROR_WRONG_PRJ") } }); - } - const files = Object.keys(zip.files); - const allFilesMatchRegex = files.every((fl) => { - return fileRegex.test(fl); - }); - let regx = new RegExp(namingConvention.replace("$", "\\.shp$")); - const shpFile = zip.file(regx)[0]; - regx = new RegExp(namingConvention.replace("$", "\\.shx$")); - const shxFile = zip.file(regx)[0]; - regx = new RegExp(namingConvention.replace("$", "\\.dbf$")); - const dbfFile = zip.file(regx)[0]; - - let geojson; - if (shpFile && dbfFile) { - const shpArrayBuffer = await shpFile.async("arraybuffer"); - const dbfArrayBuffer = await dbfFile.async("arraybuffer"); - - geojson = shp.combine([shp.parseShp(shpArrayBuffer), shp.parseDbf(dbfArrayBuffer)]); - } - if (shpFile && dbfFile && shxFile && allFilesMatchRegex) resolve({ valid: true, data: geojson }); - else if (!allFilesMatchRegex) - resolve({ - valid: false, - message: [t("ERROR_CONTENT_NAMING_CONVENSION")], - toast: { state: "error", data: geojson, message: t("ERROR_CONTENT_NAMING_CONVENSION") }, - }); - else if (!shpFile) - resolve({ valid: false, message: [t("ERROR_SHP_MISSING")], toast: { state: "error", data: geojson, message: t("ERROR_SHP_MISSING") } }); - else if (!dbfFile) - resolve({ valid: false, message: [t("ERROR_DBF_MISSING")], toast: { state: "error", data: geojson, message: t("ERROR_DBF_MISSING") } }); - else if (!shxFile) - resolve({ valid: false, message: [t("ERROR_SHX_MISSING")], toast: { state: "error", data: geojson, message: t("ERROR_SHX_MISSING") } }); - } catch (error) { - resolve({ valid: false, toast: { state: "error", message: t("ERROR_PARSING_FILE") } }); - } - }; - readAndValidate(); - }); -}; - -// Function for projections check in case of shapefile data -export const checkProjection = async (zip) => { - const prjFile = zip.file(/.prj$/i)[0]; - if (!prjFile) { - return "absent"; - } - - const prjText = await prjFile.async("text"); - - if (prjText.includes("GEOGCS") && prjText.includes("WGS_1984") && prjText.includes("DATUM") && prjText.includes("D_WGS_1984")) { - return "EPSG:4326"; - } - return false; -}; - -// find readMe as per campaign, template identifier and file type -export const findReadMe = (readMeCollection, campaignType, type, section) => { - if (!readMeCollection) return readMeCollection; - return ( - readMeCollection.find( - (readMe) => readMe.fileType === type && readMe.templateIdentifier === section && (!readMe.campaignType || readMe.campaignType === campaignType) - )?.data || {} - ); -}; - -// Function to handle the template download -export const downloadTemplate = async ({ - campaignType, - type, - section, - setToast, - campaignData, - hierarchyType, - Schemas, - HierarchyConfigurations, - setLoader, - hierarchy, - readMeData, - readMeSheetName, - t, -}) => { - try { - setLoader("LOADING"); - await delay(100); - // Find the template based on the provided parameters - const schema = getSchema(campaignType, type, section, Schemas); - const hierarchyLevelName = HierarchyConfigurations?.find((item) => item.name === "devideBoundaryDataBy")?.value; - const filteredReadMeData = findReadMe(readMeData, campaignType, type, section); - let template = await createTemplate({ - hierarchyLevelWiseSheets: schema?.template?.hierarchyLevelWiseSheets, - hierarchyLevelName, - addFacilityData: schema?.template?.includeFacilityData, - schema, - boundaries: campaignData?.boundaries, - tenantId: Digit.ULBService.getCurrentTenantId(), - hierarchyType, - readMeData: filteredReadMeData, - readMeSheetName, - t, - }); - const translatedTemplate = translateTemplate(template, t); - - // Create a new workbook - const workbook = new ExcelJS.Workbook(); - - formatTemplate(translatedTemplate, workbook); - - // Color headers - colorHeaders( - workbook, - [...hierarchy.map((item) => t(item)), t(commonColumn)], - schema?.schema?.Properties ? Object.keys(schema.schema.Properties).map((item) => t(generateLocalisationKeyForSchemaProperties(item))) : [], - [] - ); - - formatAndColorReadMeFile( - workbook, - filteredReadMeData?.map((item) => item?.header), - readMeSheetName - ); - - // protextData - await protectData({ - workbook, - hierarchyLevelWiseSheets: schema?.template?.hierarchyLevelWiseSheets, - addFacilityData: schema?.template?.includeFacilityData, - schema, - t, - }); - - // Write the workbook to a buffer - workbook.xlsx.writeBuffer({ compression: true }).then((buffer) => { - // Create a Blob from the buffer - const blob = new Blob([buffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }); - // Create a URL for the Blob - const url = URL.createObjectURL(blob); - // Create a link element and simulate click to trigger download - const link = document.createElement("a"); - link.href = url; - link.download = `${t(section)}.xlsx`; - link.click(); - // Revoke the URL to release the Blob - URL.revokeObjectURL(url); - setLoader(false); - }); - } catch (error) { - setLoader(false); - console.error(error?.message); - setToast({ state: "error", message: t("ERROR_DOWNLOADING_TEMPLATE") }); - } -}; - -export const formatAndColorReadMeFile = (workbook, headerSet, readMeSheetName) => { - const readMeSheet = workbook.getWorksheet(readMeSheetName); - if (!readMeSheet) return; - setAndFormatHeaders(readMeSheet); - formatWorksheet(readMeSheet, headerSet); -}; - -export function setAndFormatHeaders(worksheet) { - const row = worksheet.getRow(1); - // Color the header cell - row.eachCell((cell) => { - cell.fill = { - type: "pattern", - pattern: "solid", - fgColor: { argb: "f25449" }, // Header cell color - }; - cell.alignment = { vertical: "middle", horizontal: "center", wrapText: true }; // Center align and wrap text - cell.font = { bold: true }; - }); -} -export function formatWorksheet(worksheet, headerSet) { - // Add the data rows with text wrapping - const lineHeight = 15; // Set an approximate line height - const maxCharactersPerLine = 100; // Set a maximum number of characters per line for wrapping - - worksheet.eachRow((row) => { - row.eachCell({ includeEmpty: true }, (cell) => { - cell.alignment = { vertical: "middle", horizontal: "left", wrapText: true }; // Apply text wrapping - // Calculate the required row height based on content length - const numberOfLines = Math.ceil(cell?.value.length / maxCharactersPerLine); - row.height = numberOfLines * lineHeight; - - // Make the header text bold - if (headerSet?.includes(cell.value)) { - cell.font = { bold: true }; - } - }); - }); - worksheet.getColumn(1).width = 130; -} - -export const protectData = async ({ workbook, hierarchyLevelWiseSheets = true, addFacilityData = false, schema, t }) => { - if (hierarchyLevelWiseSheets) { - if (addFacilityData) { - await freezeSheetValues(workbook, t(BOUNDARY_DATA_SHEET)); - await performUnfreezeCells(workbook, t(FACILITY_DATA_SHEET)); - if (schema?.template?.propertiesToHide && Array.isArray(schema.template.propertiesToHide)) { - let tempPropertiesToHide = schema?.template?.propertiesToHide.map((item) => t(generateLocalisationKeyForSchemaProperties(item))); - await hideUniqueIdentifierColumn(workbook, t(FACILITY_DATA_SHEET), tempPropertiesToHide); - } - if (schema?.template?.facilitySchemaApiMapping) { - } else { - } - } else { - await freezeWorkbookValues(workbook); - await unfreezeColumnsByHeader( - workbook, - schema?.schema?.Properties ? Object.keys(schema.schema.Properties).map((item) => t(generateLocalisationKeyForSchemaProperties(item))) : [] - ); - } - } else { - // total boundary Data in one sheet - if (addFacilityData) { - await freezeSheetValues(workbook, t(BOUNDARY_DATA_SHEET)); - await performUnfreezeCells(workbook, t(FACILITY_DATA_SHEET)); - if (schema?.template?.propertiesToHide && Array.isArray(schema.template.propertiesToHide)) { - let tempPropertiesToHide = schema?.template?.propertiesToHide.map((item) => t(generateLocalisationKeyForSchemaProperties(item))); - await hideUniqueIdentifierColumn(workbook, t(FACILITY_DATA_SHEET), tempPropertiesToHide); - } - - if (schema?.template?.facilitySchemaApiMapping) { - } else { - } - } else { - await freezeWorkbookValues(workbook); - await unfreezeColumnsByHeader( - workbook, - schema?.schema?.Properties ? Object.keys(schema.schema.Properties).map((item) => t(generateLocalisationKeyForSchemaProperties(item))) : [] - ); - } - } -}; - -export const colorHeaders = async (workbook, headerList1, headerList2, headerList3) => { - try { - // Iterate through each sheet - workbook.eachSheet((sheet, sheetId) => { - // Get the first row - const firstRow = sheet.getRow(1); - - // Iterate through each cell in the first row - firstRow.eachCell((cell, colNumber) => { - const cellValue = cell.value.toString(); - - // Check conditions and set colors - if (headerList1?.includes(cellValue)) { - cell.fill = { - type: "pattern", - pattern: "solid", - fgColor: { argb: "ff9248" }, - }; - } else if (headerList2?.includes(cellValue)) { - cell.fill = { - type: "pattern", - pattern: "solid", - fgColor: { argb: "93C47D" }, - }; - } else if (headerList3?.includes(cellValue)) { - cell.fill = { - type: "pattern", - pattern: "solid", - fgColor: { argb: "CCCC00" }, - }; - } - }); - }); - } catch (error) { - console.error("Error coloring headers:", error); - } -}; - -export const formatTemplate = (template, workbook) => { - template.forEach(({ sheetName, data }) => { - // Create a new worksheet with properties - const worksheet = workbook.addWorksheet(sheetName); - data?.forEach((row, index) => { - const worksheetRow = worksheet.addRow(row); - - // Apply fill color to each cell in the first row and make cells bold - if (index === 0) { - worksheetRow.eachCell((cell, colNumber) => { - // Set font to bold - cell.font = { bold: true }; - - // Enable text wrapping - cell.alignment = { wrapText: true }; - // Update column width based on the length of the cell's text - const currentWidth = worksheet.getColumn(colNumber).width || SHEET_COLUMN_WIDTH; // Default width or current width - const newWidth = Math.max(currentWidth, cell.value.toString().length + 2); // Add padding - worksheet.getColumn(colNumber).width = newWidth; - }); - } - }); - updateFontNameToRoboto(worksheet); - }); -}; - -export const translateTemplate = (template, t) => { - // Initialize an array to hold the transformed result - const transformedResult = []; - - // Iterate over each sheet in the divided data - for (const sheet of template) { - const sheetData = sheet.data; - - // Find the index of the boundaryCode column in the header row - const boundaryCodeIndex = sheetData[0].indexOf(commonColumn); - - const sheetName = t(sheet.sheetName); - const transformedSheet = { - sheetName: sheetName.length > 31 ? sheetName.slice(0, 31) : sheetName, - data: [], - }; - - // Iterate over each row in the sheet data - for (const [rowIndex, row] of sheetData.entries()) { - // Transform each entity in the row using the transformFunction - const transformedRow = row.map((entity, index) => { - // Skip transformation for the boundaryCode column - if ((index === boundaryCodeIndex && rowIndex !== 0) || typeof entity === "number") { - return entity; - } - return t(entity); - }); - transformedSheet.data.push(transformedRow); - } - - // Add the transformed sheet to the transformed result - transformedResult.push(transformedSheet); - } - - return transformedResult; -}; - -// get schema for validation -export const getSchema = (campaignType, type, section, schemas) => { - return schemas.find((schema) => { - if (!schema.campaignType) { - return schema.type === type && schema.section === section; - } - return schema.campaignType === campaignType && schema.type === type && schema.section === section; - }); -}; - -// Performs resource mapping and data filtering for Excel files based on provided schema data, hierarchy, and file data. -export const resourceMappingAndDataFilteringForExcelFiles = (schemaData, hierarchy, selectedFileType, fileDataToStore, t) => { - const resourceMappingData = []; - const newFileData = {}; - if (selectedFileType.id === EXCEL && fileDataToStore) { - // Extract all unique column names from fileDataToStore and then doing thir resource mapping - const columnForMapping = new Set(Object.values(fileDataToStore).flatMap((value) => value?.[0] || [])); - if (schemaData?.schema?.["Properties"]) { - const schemaKeys = Object.keys(schemaData.schema["Properties"]) - .map((item) => generateLocalisationKeyForSchemaProperties(item)) - .concat([...hierarchy, commonColumn]); - schemaKeys.forEach((item) => { - if (columnForMapping.has(t(item))) { - resourceMappingData.push({ - mappedFrom: t(item), - mappedTo: revertLocalisationKey(item), - }); - } - }); - } - - // Filtering the columns with respect to the resource mapping and removing the columns that are not needed - Object.entries(fileDataToStore).forEach(([key, value]) => { - const data = []; - const headers = []; - const toRemove = []; - if (value && value.length > 0) { - value[0].forEach((item, index) => { - const mappedTo = resourceMappingData.find((e) => e.mappedFrom === item)?.mappedTo; - if (!mappedTo) { - toRemove.push(index); - return; - } - headers.push(mappedTo); - return; - }); - for (let i = 1; i < value?.length; i++) { - let temp = []; - for (let j = 0; j < value[i].length; j++) { - if (!toRemove.includes(j)) { - temp.push(value[i][j]); - } - } - data.push(temp); - } - } - newFileData[key] = [headers, ...data]; - }); - } - return { tempResourceMappingData: resourceMappingData, tempFileDataToStore: newFileData }; -}; -export const revertLocalisationKey = (localisedCode) => { - if (!localisedCode || !localisedCode.startsWith(SCHEMA_PROPERTIES_PREFIX + "_")) { - return localisedCode; - } - return localisedCode.substring(SCHEMA_PROPERTIES_PREFIX.length + 1); -}; -export const prepareExcelFileBlobWithErrors = async (data, errors, schema, hierarchy, readMeData, readMeSheetName, t) => { - let tempData = [...data]; - // Process each dataset within the data object - const processedData = {}; - const schemaCols = schema?.schema?.Properties ? Object.keys(schema.schema.Properties) : []; - for (const sheet of tempData) { - const dataset = [...sheet.data]; - - // Add the 'error' column to the header - dataset[0] = dataset[0].map((item) => { - if (item !== commonColumn && schemaCols.includes(item)) { - return t(generateLocalisationKeyForSchemaProperties(item)); - } - return t(item); - }); - if (sheet.sheetName !== t(BOUNDARY_DATA_SHEET) && sheet.sheetName !== t(readMeSheetName)) { - // Process each data row - if (errors) { - dataset[0].push(t("MICROPLAN_ERROR_STATUS_COLUMN"), t("MICROPLAN_ERROR_COLUMN")); - let headerCount = 0; - for (let i = 1; i < dataset.length; i++) { - const row = dataset[i]; - if (i === 1 && row) { - headerCount = row.length; - } - - if (headerCount > row.length) { - row.push(...Array(headerCount - row.length).fill("")); - } - - // Check if there are errors for the given commonColumnData - const errorInfo = errors?.[sheet.sheetName]?.[i - 1]; - if (errorInfo) { - let rowDataAddOn = Object.entries(errorInfo) - .map(([key, value]) => { - return `${t(key)}: ${value.map((item) => t(item)).join(", ")}`; - }) - .join(". "); - row.push(t("MICROPLAN_ERROR_STATUS_INVALID"), rowDataAddOn); - } else { - row.push(""); - } - } - } - } - processedData[sheet.sheetName] = dataset; - } - const errorColumns = ["MICROPLAN_ERROR_STATUS_COLUMN", "MICROPLAN_ERROR_COLUMN"]; - const style = { - font: { color: { argb: "B91900" } }, - border: { - top: { style: "thin", color: { argb: "B91900" } }, - left: { style: "thin", color: { argb: "B91900" } }, - bottom: { style: "thin", color: { argb: "B91900" } }, - right: { style: "thin", color: { argb: "B91900" } }, - }, - }; - const workbook = await convertToWorkBook(processedData, { errorColumns, style }); - colorHeaders( - workbook, - [...hierarchy.map((item) => t(item)), t(commonColumn)], - schema?.schema?.Properties ? Object.keys(schema.schema.Properties).map((item) => t(generateLocalisationKeyForSchemaProperties(item))) : [], - [t("MICROPLAN_ERROR_STATUS_COLUMN"), t("MICROPLAN_ERROR_COLUMN")] - ); - - formatAndColorReadMeFile( - workbook, - readMeData?.map((item) => item?.header), - readMeSheetName - ); - - // protextData - await protectData({ - workbook, - hierarchyLevelWiseSheets: schema?.template?.hierarchyLevelWiseSheets, - addFacilityData: schema?.template?.includeFacilityData, - schema, - t, - }); - return await workbook.xlsx.writeBuffer({ compression: true }).then((buffer) => { - // Create a Blob from the buffer - return new Blob([buffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }); - }); - // return xlsxBlob; -}; -export const convertToWorkBook = async (jsonData, columnWithStyle) => { - const workbook = new ExcelJS.Workbook(); - - // Iterate over each sheet in jsonData - for (const [sheetName, data] of Object.entries(jsonData)) { - // Create a new worksheet - const worksheet = workbook.addWorksheet(sheetName); - - // Convert data to worksheet - for (const row of data) { - const newRow = worksheet.addRow(row); - const rowHasData = row?.filter((item) => item !== "").length !== 0; - // Apply red font color to the errorColumn if it exists - if (rowHasData && columnWithStyle?.errorColumns) { - for (const errorColumn of columnWithStyle?.errorColumns) { - const errorColumnIndex = data[0].indexOf(errorColumn); - if (errorColumnIndex !== -1) { - const columnIndex = errorColumnIndex + 1; - if (columnIndex > 0) { - const newCell = newRow.getCell(columnIndex); - if (columnWithStyle.style && newCell) for (const key in columnWithStyle.style) newCell[key] = columnWithStyle.style[key]; - } - } - } - } - } - - // Make the first row bold - if (worksheet.getRow(1)) { - worksheet.getRow(1).font = { bold: true }; - } - - // Set column widths - const columnCount = data?.[0]?.length || 0; - const wscols = Array(columnCount).fill({ width: 30 }); - wscols.forEach((col, colIndex) => { - worksheet.getColumn(colIndex + 1).width = col.width; - }); - } - return workbook; -}; -export const boundaryDataGeneration = async (schemaData, campaignData, t) => { - let boundaryDataAgainstBoundaryCode = {}; - if (schemaData && !schemaData.doHierarchyCheckInUploadedData) { - try { - const rootBoundary = campaignData?.boundaries?.filter((boundary) => boundary.isRoot); // Retrieve session storage data once and store it in a variable - const sessionData = Digit.SessionStorage.get("microplanHelperData") || {}; - let boundaryData = sessionData.filteredBoundaries; - let filteredBoundaries; - if (!boundaryData) { - // Only fetch boundary data if not present in session storage - boundaryData = await fetchBoundaryData(Digit.ULBService.getCurrentTenantId(), campaignData?.hierarchyType, rootBoundary?.[0]?.code); - filteredBoundaries = filterBoundaries(boundaryData, campaignData?.boundaries); - - // Update the session storage with the new filtered boundaries - Digit.SessionStorage.set("microplanHelperData", { - ...sessionData, - filteredBoundaries: filteredBoundaries, - }); - } else { - filteredBoundaries = boundaryData; - } - const xlsxData = addBoundaryData([], filteredBoundaries, campaignData?.hierarchyType)?.[0]?.data; - xlsxData.forEach((item, i) => { - if (i === 0) return; - let boundaryCodeIndex = xlsxData?.[0]?.indexOf(commonColumn); - if (boundaryCodeIndex >= item.length) { - // If boundaryCodeIndex is out of bounds, return the item as is - boundaryDataAgainstBoundaryCode[item[boundaryCodeIndex]] = item.slice().map(t); - } else { - // Otherwise, remove the element at boundaryCodeIndex - boundaryDataAgainstBoundaryCode[item[boundaryCodeIndex]] = item - .slice(0, boundaryCodeIndex) - .concat(item.slice(boundaryCodeIndex + 1)) - .map(t); - } - }); - return boundaryDataAgainstBoundaryCode; - } catch (error) { - console.error(error?.message); - } - } -}; - -export const handleExcelFile = async ( - file, - schemaData, - hierarchy, - selectedFileType, - boundaryDataAgainstBoundaryCode, - setUploadedFileError, - t, - campaignData, - readMeSheetName -) => { - try { - // Converting the file to preserve the sequence of columns so that it can be stored - let fileDataToStore = await parseXlsxToJsonMultipleSheets(file, { header: 0 }); - const additionalSheets = []; - if (fileDataToStore[t(BOUNDARY_DATA_SHEET)]) { - additionalSheets.push({ sheetName: t(BOUNDARY_DATA_SHEET), data: fileDataToStore[t(BOUNDARY_DATA_SHEET)], position: -1 }); - delete fileDataToStore[t(BOUNDARY_DATA_SHEET)]; - } - if (fileDataToStore[t(readMeSheetName)]) { - additionalSheets.push({ sheetName: t(readMeSheetName), data: fileDataToStore[t(readMeSheetName)], position: 0 }); - delete fileDataToStore[t(readMeSheetName)]; - } - let { tempResourceMappingData, tempFileDataToStore } = resourceMappingAndDataFilteringForExcelFiles( - schemaData, - hierarchy, - selectedFileType, - fileDataToStore, - t - ); - fileDataToStore = await convertJsonToXlsx(tempFileDataToStore); - // Converting the input file to json format - let result = await parseXlsxToJsonMultipleSheets(fileDataToStore, { header: 1 }); - if (result?.error) { - return { - check: false, - interruptUpload: true, - error: result.error, - fileDataToStore: {}, - toast: { state: "error", message: t("ERROR_CORRUPTED_FILE") }, - }; - } - let extraColumns = [commonColumn]; - // checking if the hierarchy and common column is present the uploaded data - extraColumns = [...hierarchy, commonColumn]; - let data = Object.values(tempFileDataToStore); - let errorMsg; - let errors; // object containing the location and type of error - let toast; - let hierarchyDataPresent = true; - let latLngColumns = - Object.entries(schemaData?.schema?.Properties || {}).reduce((acc, [key, value]) => { - if (value?.isLocationDataColumns) { - acc.push(key); - } - return acc; - }, []) || []; - data.forEach((item) => { - const keys = item[0]; - if (keys?.length !== 0) { - if (!extraColumns?.every((e) => keys.includes(e))) { - if (schemaData && !schemaData.doHierarchyCheckInUploadedData) { - hierarchyDataPresent = false; - } else { - errorMsg = { - check: false, - interruptUpload: true, - error: t("ERROR_BOUNDARY_DATA_COLUMNS_ABSENT"), - fileDataToStore: {}, - toast: { state: "error", message: t("ERROR_BOUNDARY_DATA_COLUMNS_ABSENT") }, - }; - } - } - if (!latLngColumns?.every((e) => keys.includes(e))) { - toast = { state: "warning", message: t("ERROR_UPLOAD_EXCEL_LOCATION_DATA_MISSING") }; - } - } - }); - if (errorMsg && !errorMsg?.check) return errorMsg; - // Running Validations for uploaded file - let response = await checkForErrorInUploadedFileExcel(result, schemaData.schema, t); - if (!response.valid) setUploadedFileError(response.message); - errorMsg = response.message; - errors = response.errors; - const missingProperties = response.missingProperties; - let check = response.valid; - try { - if ( - schemaData && - !schemaData.doHierarchyCheckInUploadedData && - !hierarchyDataPresent && - boundaryDataAgainstBoundaryCode && - (!missingProperties || [...missingProperties]?.includes(commonColumn)) - ) { - let tempBoundaryDataAgainstBoundaryCode = (await boundaryDataGeneration(schemaData, campaignData, t)) || {}; - for (const sheet in tempFileDataToStore) { - const commonColumnIndex = tempFileDataToStore[sheet]?.[0]?.indexOf(commonColumn); - if (commonColumnIndex !== -1) { - const dataCollector = []; - for (let index = 0; index < tempFileDataToStore[sheet].length; index++) { - let row = tempFileDataToStore[sheet][index]; - const commonColumnValues = row[commonColumnIndex]?.split(",").map((item) => item.trim()); - if (!commonColumnValues) { - dataCollector.push([...new Array(hierarchy.length).fill(""), ...row]); - continue; - } - for (const value of commonColumnValues) { - const newRowData = [...row]; - newRowData[commonColumnIndex] = value; - dataCollector.push([ - ...(tempBoundaryDataAgainstBoundaryCode[value] - ? tempBoundaryDataAgainstBoundaryCode[value] - : index !== 0 - ? new Array(hierarchy.length).fill("") - : []), - ...newRowData, - ]); - } - } - tempFileDataToStore[sheet] = dataCollector; - } - - tempFileDataToStore[sheet][0] = [...hierarchy, ...tempFileDataToStore[sheet][0]]; - } - } - } catch (error) { - console.error("Error in boundary adding operaiton: ", error); - } - tempFileDataToStore = addMissingPropertiesToFileData(tempFileDataToStore, missingProperties); - return { check, errors, errorMsg, fileDataToStore: tempFileDataToStore, tempResourceMappingData, toast, additionalSheets }; - } catch (error) { - console.error("Error in handling Excel file:", error.message); - } -}; -export const addMissingPropertiesToFileData = (data, missingProperties) => { - if (!data || !missingProperties) return data; - let tempData = {}; - Object.entries(data).forEach(([key, value], index) => { - const filteredMissingProperties = [...missingProperties]?.reduce((acc, item) => { - if (!value?.[0]?.includes(item)) { - acc.push(item); - } - return acc; - }, []); - const newTempHeaders = value?.[0].length !== 0 ? [...value[0], ...filteredMissingProperties] : [...filteredMissingProperties]; - tempData[key] = [newTempHeaders, ...value.slice(1)]; - }); - return tempData; -}; - -export const handleGeojsonFile = async (file, schemaData, setUploadedFileError, t) => { - // Reading and checking geojson data - const data = await readGeojson(file, t); - if (!data.valid) { - return { check: false, stopUpload: true, toast: data.toast }; - } - - // Running geojson validaiton on uploaded file - let response = geojsonValidations(data.geojsonData, schemaData.schema, t); - if (!response.valid) setUploadedFileError(response.message); - let check = response.valid; - let error = response.message; - let fileDataToStore = data.geojsonData; - return { check, error, fileDataToStore }; -}; - -const generateLocalisationKeyForSchemaProperties = (code) => { - if (!code) return code; - return `${SCHEMA_PROPERTIES_PREFIX}_${code}`; -}; -export const handleShapefiles = async (file, schemaData, setUploadedFileError, selectedFileType, setToast, t) => { - // Reading and validating the uploaded geojson file - let response = await readAndValidateShapeFiles(file, t, selectedFileType["namingConvention"]); - if (!response.valid) { - setUploadedFileError(response.message); - setToast(response.toast); - } - let check = response.valid; - let error = response.message; - let fileDataToStore = response.data; - return { check, error, fileDataToStore }; -}; - -export const convertToSheetArray = (data) => { - if (!data) return []; - const convertedSheetData = []; - for (const [key, value] of Object.entries(data)) { - convertedSheetData.push({ sheetName: key, data: value }); - } - return convertedSheetData; -}; - -//find guideline -export const findGuideLine = (campaignType, type, section, guidelineArray) => { - if (!guidelineArray) return guidelineArray; - return guidelineArray.find( - (guideline) => - guideline.fileType === type && guideline.templateIdentifier === section && (!guideline.campaignType || guideline.campaignType === campaignType) - )?.guidelines; -}; - -// Utility function to introduce a delay -export const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/AttendanceActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/AttendanceActionModal.js deleted file mode 100644 index a2c50215207..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/AttendanceActionModal.js +++ /dev/null @@ -1,133 +0,0 @@ -import React, { useState, useEffect } from "react"; -import _ from "lodash"; -import { Loader, Modal, FormComposer } from "@egovernments/digit-ui-react-components"; -import { configAttendanceApproveModal, configAttendanceRejectModal, configAttendanceCheckModal } from "../config"; - - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const AttendanceActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationData, businessService, moduleCode,applicationDetails,workflowDetails, saveAttendanceState}) => { - const [config, setConfig] = useState({}); - - const userUuid = Digit.UserService.getUser()?.info.uuid; - const { isLoading, data:employeeData } = Digit.Hooks.hrms.useHRMSSearch( - { uuids : userUuid }, tenantId - ); - - const empData = employeeData?.Employees[0] - const empDepartment = empData?.assignments?.[0].department - const empDesignation = empData?.assignments?.[0].designation - const empName = empData?.user?.name - - useEffect(() => { - const selectedAction = action?.action - switch(selectedAction) { - case "VERIFY": - submitBasedOnAction(action, 'Verify muster roll') - break; - case "REJECT": - setConfig( - configAttendanceRejectModal({ - t, - action, - empDepartment, - empDesignation, - empName - }) - ) - break; - case "APPROVE": - setConfig( - configAttendanceApproveModal({ - t, - action - }) - ) - break; - case "RESUBMIT": - submitBasedOnAction(action, 'Resubmit muster roll') - break; - case "SAVE": - submitBasedOnAction(action, 'Verify muster roll') - break; - default: - break - } - }, [employeeData]); - - function onSubmit (data) { - submitBasedOnAction(action, data?.comments) - } - - const submitBasedOnAction = (action, comments) => { - let musterRoll = { tenantId, id: applicationDetails?.applicationDetails?.[0]?.applicationData?.id} - let workflow = { action: action?.action, comments: (comments || `${action?.action} done`), assignees: [] } - - const selectedAction = action?.action - switch(selectedAction) { - case "SAVE": - musterRoll.individualEntries = saveAttendanceState?.updatePayload - workflow.action = 'VERIFY' - break; - case "RESUBMIT": - musterRoll.additionalDetails = { computeAttendance : true } - break; - default: - break; - } - const dataTobeSubmitted = {musterRoll, workflow} - submitAction(dataTobeSubmitted) - } - - const cardStyle = () => { - if(config.label.heading === "Processing Details") { - return { - "padding" : "0px" - } - } - return {} - } - - return action && config?.form ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => {}} - formId="modal-action" - > - - - ) : ( - - ); -} - -export default AttendanceActionModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAActionModal.js deleted file mode 100644 index 269bbefa1dd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAActionModal.js +++ /dev/null @@ -1,283 +0,0 @@ -import { Loader, Modal, FormComposer } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect } from "react"; -import { useQueryClient } from "react-query"; -import { configBPAApproverApplication } from "../config"; -import * as predefinedConfig from "../config"; - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const ActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationDetails, applicationData, businessService, moduleCode,workflowDetails }) => { - const mutation1 = Digit.Hooks.obps.useObpsAPI( - applicationData?.landInfo?.address?.city ? applicationData?.landInfo?.address?.city : tenantId, - false - ); - const { data: approverData, isLoading: PTALoading } = Digit.Hooks.useEmployeeSearch( - tenantId, - { - roles: workflowDetails?.data?.initialActionState?.nextActions?.filter(ele=>ele?.action==action?.action)?.[0]?.assigneeRoles?.map(role=>({code:role})), - isActive: true, - }, - { enabled: !action?.isTerminateState } - ); - - const queryClient = useQueryClient(); - const [config, setConfig] = useState({}); - const [defaultValues, setDefaultValues] = useState({}); - const [approvers, setApprovers] = useState([]); - const [selectedApprover, setSelectedApprover] = useState({}); - const [file, setFile] = useState(null); - const [uploadedFile, setUploadedFile] = useState(null); - const [error, setError] = useState(null); - const [selectedFinancialYear, setSelectedFinancialYear] = useState(null); - const mobileView = Digit.Utils.browser.isMobile() ? true : false; - - useEffect(() => { - setApprovers(approverData?.Employees?.map((employee) => ({ uuid: employee?.uuid, name: employee?.user?.name }))); - }, [approverData]); - - function selectFile(e) { - setFile(e.target.files[0]); - } - - useEffect(() => { - (async () => { - setError(null); - if (file) { - const allowedFileTypesRegex = /(.*?)(jpg|jpeg|png|image|pdf)$/i - if (file.size >= 5242880) { - setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); - } else if (file?.type && !allowedFileTypesRegex.test(file?.type)) { - setError(t(`NOT_SUPPORTED_FILE_TYPE`)) - } else { - try { - const response = await Digit.UploadServices.Filestorage("OBPS", file, Digit.ULBService.getStateId() || tenantId?.split(".")[0]); - if (response?.data?.files?.length > 0) { - setUploadedFile(response?.data?.files[0]?.fileStoreId); - } else { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } catch (err) { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } - } - })(); - }, [file]); - - const getInspectionDocs = (docs) => { - let refinedDocs = []; - docs && docs.map((doc,ind) => { - refinedDocs.push({ - "documentType":(doc.documentType+"_"+doc.documentType.split("_")[1]).replaceAll("_","."), - "fileStoreId":doc.fileStoreId, - "fileStore":doc.fileStoreId, - "fileName":"", - "dropDownValues": { - "value": (doc.documentType+"_"+doc.documentType.split("_")[1]).replaceAll("_","."), - } - }) - }) - return refinedDocs; - } - - const getQuestion = (data) => { - let refinedQues = []; - var i; - for(i=0; i { - let formdata = [], inspectionOb = []; - - if (data?.additionalDetails?.fieldinspection_pending?.length > 0) { - inspectionOb = data?.additionalDetails?.fieldinspection_pending - } - - if(data.status == "FIELDINSPECTION_INPROGRESS") { - formdata = JSON.parse(sessionStorage.getItem("INSPECTION_DATA")); - formdata?.length > 0 && formdata.map((ob,ind) => { - inspectionOb.push({ - docs: getInspectionDocs(ob.Documents), - date: ob.InspectionDate, - questions: getQuestion(ob), - time: ob?.InspectionTime, - }) - }) - inspectionOb = inspectionOb.filter((ob) => ob.docs && ob.docs.length>0); - } else { - sessionStorage.removeItem("INSPECTION_DATA") - } - - let fieldinspection_pending = [ ...inspectionOb]; - return fieldinspection_pending; - } - - const getDocuments = (applicationData) => { - let documentsformdata = JSON.parse(sessionStorage.getItem("BPA_DOCUMENTS")); - let documentList = []; - documentsformdata.map(doc => { - if(doc?.uploadedDocuments?.[0]?.values?.length > 0) documentList = [...documentList, ...doc?.uploadedDocuments?.[0]?.values]; - if(doc?.newUploadedDocs?.length > 0) documentList = [...documentList, ...doc?.newUploadedDocs] - }); - return documentList; - } - - const getPendingApprovals = () => { - const approvals = Digit.SessionStorage.get("OBPS_APPROVAL_CHECKS"); - const newApprovals = Digit.SessionStorage.get("OBPS_NEW_APPROVALS"); - let result = approvals?.reduce((acc, approval) => approval?.checked ? acc.push(approval?.label) && acc : acc, []); - result = result?.concat(newApprovals !== null?newApprovals.filter(ob => ob.label !== "").map(approval => approval?.label):[]); - return result; - } - - function submit(data) { - let workflow = { action: action?.action, comments: data?.comments, businessService, moduleName: moduleCode }; - applicationData = { - ...applicationData, - documents: getDocuments(applicationData), - additionalDetails: {...applicationData?.additionalDetails, fieldinspection_pending:getfeildInspection(applicationData), pendingapproval: getPendingApprovals() }, - workflow:{ - action: action?.action, - comment: data?.comments?.length > 0 ? data?.comments : null, - comments: data?.comments?.length > 0 ? data?.comments : null, - assignee: !selectedApprover?.uuid ? null : [selectedApprover?.uuid], - assignes: !selectedApprover?.uuid ? null : [selectedApprover?.uuid], - varificationDocuments: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : null, - }, - action: action?.action, - comment: data?.comments, - assignee: !selectedApprover?.uuid ? null : [selectedApprover?.uuid], - wfDocuments: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : null, - }; - - const nocDetails = applicationDetails?.nocData?.map(noc => { - const uploadedDocuments = Digit.SessionStorage.get(noc?.nocType) || []; - return { - Noc: { - ...noc, - documents: [ - ...(noc?.documents?noc?.documents:[]), - ...(uploadedDocuments?uploadedDocuments:[]) - ] - } - } - }) - - let nocData = []; - if (nocDetails) { - nocDetails.map(noc => { - if ( - noc?.Noc?.applicationStatus?.toUpperCase() != "APPROVED" && - noc?.Noc?.applicationStatus?.toUpperCase() != "AUTO_APPROVED" && - noc?.Noc?.applicationStatus?.toUpperCase() != "REJECTED" && - noc?.Noc?.applicationStatus?.toUpperCase() != "AUTO_REJECTED" && - noc?.Noc?.applicationStatus?.toUpperCase() != "VOIDED" - ) { - nocData.push(noc); - } - }) - } - - submitAction({ - BPA:applicationData - }, nocData?.length > 0 ? nocData : false, {isStakeholder: false, bpa: true}); - } - - - useEffect(() => { - if (action) { - setConfig( - configBPAApproverApplication({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - businessService, - assigneeLabel: "WF_ASSIGNEE_NAME_LABEL", - error - }) - ); - } - }, [action, approvers, selectedFinancialYear, uploadedFile, error]); - - return action && config.form ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => { }} - formId="modal-action" - isOBPSFlow={true} - popupStyles={mobileView?{width:"720px"}:{}} - style={!mobileView?{minHeight: "45px", height: "auto", width:"107px",paddingLeft:"0px",paddingRight:"0px"}:{minHeight: "45px", height: "auto",width:"44%"}} - popupModuleMianStyles={mobileView?{paddingLeft:"5px"}: {}} - > - {PTALoading ? ( - - ) : ( - - )} - - ) : ( - - ); -}; - -export default ActionModal; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAREGActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAREGActionModal.js deleted file mode 100644 index dc0bfe07776..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAREGActionModal.js +++ /dev/null @@ -1,153 +0,0 @@ -import { Loader, Modal, FormComposer } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect } from "react"; -import { configBPAREGApproverApplication } from "../config"; -import * as predefinedConfig from "../config"; - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const ActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationData, businessService, moduleCode }) => { - const { data: approverData, isLoading: PTALoading } = Digit.Hooks.useEmployeeSearch( - tenantId, - { - roles: action?.assigneeRoles?.map?.((e) => ({ code: e })), - isActive: true, - }, - { enabled: !action?.isTerminateState } - ); - - const [config, setConfig] = useState({}); - const [defaultValues, setDefaultValues] = useState({}); - const [approvers, setApprovers] = useState([]); - const [selectedApprover, setSelectedApprover] = useState({}); - const [file, setFile] = useState(null); - const [uploadedFile, setUploadedFile] = useState(null); - const [error, setError] = useState(null); - const mobileView = Digit.Utils.browser.isMobile() ? true : false; - - useEffect(() => { - setApprovers(approverData?.Employees?.map((employee) => ({ uuid: employee?.uuid, name: employee?.user?.name }))); - }, [approverData]); - - function selectFile(e) { - setFile(e.target.files[0]); - } - - useEffect(() => { - (async () => { - setError(null); - if (file) { - const allowedFileTypesRegex = /(.*?)(jpg|jpeg|png|image|pdf)$/i - if (file.size >= 5242880) { - setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); - } else if (file?.type && !allowedFileTypesRegex.test(file?.type)) { - setError(t(`NOT_SUPPORTED_FILE_TYPE`)) - } else { - try { - const response = await Digit.UploadServices.Filestorage("OBPS", file, Digit.ULBService.getStateId() || tenantId?.split(".")[0]); - if (response?.data?.files?.length > 0) { - setUploadedFile(response?.data?.files[0]?.fileStoreId); - } else { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } catch (err) { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } - } - })(); - }, [file]); - - function submit(data) { - let workflow = { action: action?.action, comments: data?.comments, businessService, moduleName: moduleCode }; - applicationData = { - ...applicationData, - action: action?.action, - comment: data?.comments, - assignee: !selectedApprover?.uuid ? null : [selectedApprover?.uuid], - wfDocuments: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : null, - }; - submitAction({ - Licenses: [applicationData], - }, false, {isStakeholder: true, bpa: false}); - } - - useEffect(() => { - if (action) { - setConfig( - configBPAREGApproverApplication({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - businessService, - error - }) - ); - } - }, [action, approvers, uploadedFile, error]); - - return action && config.form ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => { }} - formId="modal-action" - isOBPSFlow={true} - popupStyles={mobileView?{width:"720px"}:{}} - style={!mobileView?{height: "45px", width:"107px",paddingLeft:"0px",paddingRight:"0px"}:{height:"45px",width:"44%"}} - popupModuleMianStyles={mobileView?{paddingLeft:"5px"}: {}} - > - {PTALoading ? ( - - ) : ( - - )} - - ) : ( - - ); -}; - -export default ActionModal; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/ExpenditureActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/ExpenditureActionModal.js deleted file mode 100644 index 95393b5ae05..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/ExpenditureActionModal.js +++ /dev/null @@ -1,190 +0,0 @@ -import { Loader, Modal, FormComposer, WorkflowModal } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect, Fragment } from "react"; -import { configViewBillApproveModal, configViewBillRejectModal, configViewBillCheckModal } from "../config"; -import _ from "lodash"; - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const ExpenditureActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationData, businessService, moduleCode,applicationDetails,workflowDetails }) => { - - let { loiNumber, estimateNumber } = Digit.Hooks.useQueryParams(); - const [config, setConfig] = useState({}); - const [defaultValues, setDefaultValues] = useState({}); - const [approvers, setApprovers] = useState([]); - const [selectedApprover, setSelectedApprover] = useState({}); - - const [department, setDepartment] = useState([]); - const [selectedDept,setSelectedDept] = useState({}) - - const [designation, setDesignation] = useState([]); - const [selectedDesignation,setSelectedDesignation] = useState({}) - - const mdmsConfig = { - moduleName: "common-masters", - department : { - masterName: "Department", - localePrefix: "COMMON_MASTERS_DEPARTMENT", - }, - designation : { - masterName: "Designation", - localePrefix: "COMMON_MASTERS_DESIGNATION", - } - } - - const { isLoading: mdmsLoading, data: mdmsData,isSuccess:mdmsSuccess } = Digit.Hooks.useCustomMDMS( - Digit.ULBService.getStateId(), - mdmsConfig?.moduleName, - [{name : mdmsConfig?.designation?.masterName}, {name : mdmsConfig?.department?.masterName}, {name : mdmsConfig?.rejectReasons?.masterName}], - { - select: (data) => { - let designationData = _.get(data, `${mdmsConfig?.moduleName}.${mdmsConfig?.designation?.masterName}`, []); - designationData = designationData.filter((opt) => opt?.active).map((opt) => ({ ...opt, name: `${mdmsConfig?.designation?.localePrefix}_${opt.code}` })); - designationData?.map(designation => {designation.i18nKey = designation?.name}) - - let departmentData = _.get(data, `${mdmsConfig?.moduleName}.${mdmsConfig?.department?.masterName}`, []); - departmentData = departmentData.filter((opt) => opt?.active).map((opt) => ({ ...opt, name: `${mdmsConfig?.department?.localePrefix}_${opt.code}` })); - departmentData?.map(department => { department.i18nKey = department?.name}) - - return {designationData, departmentData}; - }, - enabled: mdmsConfig?.moduleName ? true : false, - } - ); - useEffect(() => { - setDepartment(mdmsData?.departmentData) - setDesignation(mdmsData?.designationData) - }, [mdmsData]); - - - - const { isLoading: approverLoading, isError, error, data: employeeDatav1 } = Digit.Hooks.hrms.useHRMSSearch({ designations: selectedDesignation?.code, departments: selectedDept?.code, roles: action?.assigneeRoles?.toString(), isActive: true }, Digit.ULBService.getCurrentTenantId(), null, null, { enabled: action?.action === "CHECK" || action?.action === "TECHNICALSANCATION"}); - - - employeeDatav1?.Employees.map(emp => emp.nameOfEmp = emp?.user?.name || "NA") - - useEffect(() => { - setApprovers(employeeDatav1?.Employees?.length > 0 ? employeeDatav1?.Employees.filter(emp => emp?.nameOfEmp !== "NA") : []) - }, [employeeDatav1]) - - useEffect(() => { - - if(action?.action?.includes("CHECK")){ - setConfig( - configViewBillCheckModal({ - t, - action, - businessService, - approvers, - selectedApprover, - setSelectedApprover, - designation, - selectedDesignation, - setSelectedDesignation, - department, - selectedDept, - setSelectedDept, - approverLoading - }) - ) - }else if(action?.action?.includes("APPROVE")){ - setConfig( - configViewBillApproveModal({ - t, - action - }) - ) - } - else if(action?.action?.includes("REJECT")){ - setConfig( - configViewBillRejectModal({ - t, - action, - }) - ) - } - }, [approvers,designation,department]); - - const dummy_exp_response = { - CHECK : { - header: "Bill Forwarded Successfully", - id: "Bill/2021-22/09/0001", - info: "Bill ID", - message: "Bill has been successfully created and forwarded for approval.", - responseData:{}, - requestData:{}, - links : [] - }, - REJECT : { - header: "Bill Rejected Successfully", - id: "Bill/2021-22/09/0001", - info: "Bill ID", - message: "Bill has been Rejected.", - responseData:{}, - requestData:{}, - links : [] - }, - APPROVE : { - header: "Bill Approved Successfully", - id: "Bill/2021-22/09/0001", - info: "Bill ID", - message: "Bill has been approved", - responseData:{}, - requestData:{}, - links : [] - } - } - - - function submit (_data) { - const workflow = { - action: action?.action, - comment: _data?.comments, - response : dummy_exp_response, - type : "bills", - assignees: selectedApprover?.uuid ? [selectedApprover?.uuid] : undefined - } - submitAction({workflow}); - } - - const cardStyle = () => { - if(config.label.heading === "Processing Details") { - return { - "padding" : "0px" - } - } - return {} - } - - return ( - <> - { - action && config?.form ? - - : - mdmsLoading ? - : null - } - ) -} - -export default ExpenditureActionModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/FSMActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/FSMActionModal.js deleted file mode 100644 index af0e0e8e701..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/FSMActionModal.js +++ /dev/null @@ -1,298 +0,0 @@ -import { Loader, Modal, FormComposer, Toast } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect } from "react"; -import { useQueryClient } from "react-query"; - -import { configAssignDso, configCompleteApplication, configReassignDSO, configAcceptDso, configRejectApplication } from "../config"; - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const ActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData }) => { - const { data: dsoData, isLoading: isDsoLoading, isSuccess: isDsoSuccess, error: dsoError } = Digit.Hooks.fsm.useDsoSearch(tenantId); - const { isLoading, isSuccess, isError, data: applicationData, error } = Digit.Hooks.fsm.useSearch( - tenantId, - { applicationNos: id }, - { - staleTime: Infinity, - select: (details) => { - let { additionalDetails } = details; - - const parseTillObject = (str) => { - if (typeof str === "object") return str; - else return parseTillObject(JSON.parse(str)); - }; - - additionalDetails = parseTillObject(additionalDetails); - return { ...details, additionalDetails }; - }, - } - ); - const client = useQueryClient(); - const stateCode = Digit.ULBService.getStateId(); - const { data: vehicleList, isLoading: isVehicleData, isSuccess: isVehicleDataLoaded } = Digit.Hooks.fsm.useMDMS( - stateCode, - "Vehicle", - "VehicleType", - { staleTime: Infinity } - ); - const [dsoList, setDsoList] = useState([]); - const [vehicleNoList, setVehicleNoList] = useState([]); - const [config, setConfig] = useState({}); - const [dso, setDSO] = useState(null); - const [vehicleNo, setVehicleNo] = useState(null); - const [vehicleMenu, setVehicleMenu] = useState([]); - const [vehicle, setVehicle] = useState(null); - const [defaultValues, setDefautValue] = useState({ - capacity: vehicle?.capacity, - wasteCollected: vehicle?.capacity, - }); - // const [toastError, setToastError] = useState(false); - const { data: Reason, isLoading: isReasonLoading } = Digit.Hooks.fsm.useMDMS(stateCode, "FSM", "Reason", { staleTime: Infinity }, [ - "ReassignReason", - "RejectionReason", - "DeclineReason", - "CancelReason", - ]); - - const [reassignReason, selectReassignReason] = useState(null); - const [rejectionReason, setRejectionReason] = useState(null); - const [declineReason, setDeclineReason] = useState(null); - const [cancelReason, selectCancelReason] = useState(null); - - const [formValve, setFormValve] = useState(false); - - useEffect(() => { - if (isSuccess && isVehicleDataLoaded) { - const [vehicle] = vehicleList.filter((item) => item.code === applicationData.vehicleType); - setVehicleMenu([vehicle]); - setVehicle(vehicle); - setDefautValue({ - capacity: vehicle?.capacity, - wasteCollected: vehicle?.capacity, - }); - } - }, [isVehicleDataLoaded, isSuccess]); - - useEffect(() => { - if (vehicle && isDsoSuccess) { - const dsoList = dsoData.filter((dso) => dso.vehicles.find((dsoVehicle) => dsoVehicle.type === vehicle.code)); - setDsoList(dsoList); - } - }, [vehicle, isDsoSuccess]); - - useEffect(() => { - if (isSuccess && isDsoSuccess && applicationData.dsoId) { - const [dso] = dsoData.filter((dso) => dso.id === applicationData.dsoId); - const vehicleNoList = dso.vehicles.filter((vehicle) => vehicle.type === applicationData.vehicleType); - setVehicleNoList(vehicleNoList); - } - }, [isSuccess, isDsoSuccess]); - - useEffect(() => { - reassignReason || (actionData && actionData[0] && actionData[0].comment?.length > 0) ? setFormValve(true) : setFormValve(false); - }, [reassignReason]); - - useEffect(() => { - setFormValve(rejectionReason ? true : false); - }, [rejectionReason]); - - useEffect(() => { - setFormValve(declineReason ? true : false); - }, [declineReason]); - - useEffect(() => { - setFormValve(cancelReason ? true : false); - }, [cancelReason]); - - function selectDSO(dsoDetails) { - setDSO(dsoDetails); - } - - function selectVehicleNo(vehicleNo) { - setVehicleNo(vehicleNo); - } - - function selectVehicle(value) { - setVehicle(value); - setDefautValue({ - capacity: value?.capacity, - wasteCollected: value?.capacity, - }); - } - - function addCommentToWorkflow(state, workflow, data) { - workflow.comments = data.comments ? state.code + "~" + data.comments : state.code; - } - - function submit(data) { - const workflow = { action: action }; - - if (dso) applicationData.dsoId = dso.id; - if (vehicleNo && action === "ACCEPT") applicationData.vehicleId = vehicleNo.id; - if (vehicleNo && action === "DSO_ACCEPT") applicationData.vehicleId = vehicleNo.id; - if (vehicle && action === "ASSIGN") applicationData.vehicleType = vehicle.code; - if (data.date) applicationData.possibleServiceDate = new Date(`${data.date}`).getTime(); - if (data.desluged) applicationData.completedOn = new Date(data.desluged).getTime(); - if (data.wasteCollected) applicationData.wasteCollected = data.wasteCollected; - if (reassignReason) addCommentToWorkflow(reassignReason, workflow, data); - if (rejectionReason) addCommentToWorkflow(rejectionReason, workflow, data); - if (declineReason) addCommentToWorkflow(declineReason, workflow, data); - if (cancelReason) addCommentToWorkflow(cancelReason, workflow, data); - - submitAction({ fsm: applicationData, workflow }); - } - useEffect(() => { - switch (action) { - case "DSO_ACCEPT": - case "ACCEPT": - setFormValve(vehicleNo ? true : false); - return setConfig( - configAcceptDso({ - t, - dsoData, - dso, - vehicle, - vehicleNo, - vehicleNoList, - selectVehicleNo, - action, - }) - ); - - case "ASSIGN": - case "GENERATE_DEMAND": - case "FSM_GENERATE_DEMAND": - setFormValve(dso && vehicle ? true : false); - return setConfig( - configAssignDso({ - t, - dsoData, - dso, - selectDSO, - vehicleMenu, - vehicle, - selectVehicle, - action, - }) - ); - case "REASSIGN": - case "REASSING": - case "FSM_REASSING": - dso && vehicle && (reassignReason || (actionData && actionData[0] && actionData[0].comment?.length > 0)) - ? setFormValve(true) - : setFormValve(false); - return setConfig( - configReassignDSO({ - t, - dsoData, - dso, - selectDSO, - vehicleMenu, - vehicle, - selectVehicle, - reassignReasonMenu: Reason?.ReassignReason, - reassignReason, - selectReassignReason, - action, - showReassignReason: actionData && actionData[0] && actionData[0].comment?.length > 0 ? false : true, - }) - ); - case "COMPLETE": - case "COMPLETED": - setFormValve(true); - return setConfig(configCompleteApplication({ t, vehicle, applicationCreatedTime: applicationData?.auditDetails?.createdTime, action })); - case "SUBMIT": - case "FSM_SUBMIT": - return history.push(`/${window?.contextPath}/employee/fsm/modify-application/` + applicationNumber); - case "DECLINE": - case "DSO_REJECT": - //declinereason - setFormValve(declineReason ? true : false); - return setConfig( - configRejectApplication({ - t, - rejectMenu: Reason?.DeclineReason, - setReason: setDeclineReason, - reason: declineReason, - action, - }) - ); - case "REJECT": - case "SENDBACK": - // rejectionReason - setFormValve(rejectionReason ? true : false); - return setConfig( - configRejectApplication({ - t, - rejectMenu: Reason?.RejectionReason, - setReason: setRejectionReason, - reason: rejectionReason, - action, - }) - ); - case "CANCEL": - ///cancellreason - setFormValve(cancelReason ? true : false); - return setConfig( - configRejectApplication({ - t, - rejectMenu: Reason?.CancelReason, - setReason: selectCancelReason, - reason: cancelReason, - action, - }) - ); - - case "PAY": - case "ADDITIONAL_PAY_REQUEST": - case "FSM_PAY": - return history.push(`/${window?.contextPath}/employee/payment/collect/FSM.TRIP_CHARGES/${applicationNumber}`); - default: - break; - } - }, [action, isDsoLoading, dso, vehicleMenu, rejectionReason, vehicleNo, vehicleNoList, Reason]); - - return action && config.form && !isDsoLoading && !isReasonLoading && isVehicleDataLoaded ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => {}} - formId="modal-action" - isDisabled={!formValve} - > - - {/* {toastError && } */} - - ) : ( - - ); -}; - -export default ActionModal; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/NOCActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/NOCActionModal.js deleted file mode 100644 index 09266ca1b7b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/NOCActionModal.js +++ /dev/null @@ -1,169 +0,0 @@ -import { Loader, Modal, FormComposer } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect } from "react"; -import { useQueryClient } from "react-query"; -import { useHistory } from "react-router-dom"; -import { configNOCApproverApplication } from "../config"; -import * as predefinedConfig from "../config"; - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const ActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationData, businessService, moduleCode }) => { - - const { data: approverData, isLoading: PTALoading } = Digit.Hooks.useEmployeeSearch( - tenantId, - { - roles: action?.assigneeRoles?.map?.((e) => ({ code: e })), - isActive: true, - }, - { enabled: !action?.isTerminateState } - ); - - const queryClient = useQueryClient(); - const [config, setConfig] = useState({}); - const [defaultValues, setDefaultValues] = useState({}); - const [approvers, setApprovers] = useState([]); - const [selectedApprover, setSelectedApprover] = useState({}); - const [file, setFile] = useState(null); - const [uploadedFile, setUploadedFile] = useState(null); - const [error, setError] = useState(null); - const mobileView = Digit.Utils.browser.isMobile() ? true : false; - const history = useHistory(); - - useEffect(() => { - setApprovers(approverData?.Employees?.map((employee) => ({ uuid: employee?.uuid, name: employee?.user?.name }))); - }, [approverData]); - - function selectFile(e) { - setFile(e.target.files[0]); - } - - useEffect(() => { - (async () => { - setError(null); - if (file) { - const allowedFileTypesRegex = /(.*?)(jpg|jpeg|png|image|pdf)$/i - if (file.size >= 5242880) { - setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); - } else if (file?.type && !allowedFileTypesRegex.test(file?.type)) { - setError(t(`NOT_SUPPORTED_FILE_TYPE`)) - } else { - try { - const response = await Digit.UploadServices.Filestorage("NOC", file, Digit.ULBService.getStateId() || tenantId?.split(".")[0]); - if (response?.data?.files?.length > 0) { - setUploadedFile(response?.data?.files[0]?.fileStoreId); - } else { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } catch (err) { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } - } - })(); - }, [file]); - - - function submit(data) { - let enteredDocs = JSON.parse(sessionStorage.getItem("NewNOCDocs")); - let newDocs = applicationData?.documents?.length > 0 ? [...applicationData?.documents] : []; - enteredDocs.map((d,index) => { - newDocs.push(d); - }) - applicationData = { - ...applicationData, - workflow:{ - action: action?.action, - comment: data?.comments ? data?.comments : null, - assignee: !selectedApprover?.uuid ? null : [selectedApprover?.uuid], - documents: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : null, - }, - documents: newDocs, - }; - - - submitAction({ - Noc: applicationData, - }, false, {isNoc: true}); - } - - useEffect(() => { - if (action) { - setConfig( - configNOCApproverApplication({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - businessService, - assigneeLabel: "WF_ASSIGNEE_NAME_LABEL", - error - }) - ); - } - }, [action, approvers, uploadedFile, error]); - - return action && config.form ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => { }} - formId="modal-action" - isOBPSFlow={true} - popupStyles={mobileView?{width:"720px"}:{}} - style={!mobileView?{height: "45px", width:"107px",paddingLeft:"0px",paddingRight:"0px"}:{height:"45px",width:"44%"}} - popupModuleMianStyles={mobileView?{paddingLeft:"5px"}: {}} - > - {PTALoading ? ( - - ) : ( - - )} - - ) : ( - - ); -}; - -export default ActionModal; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/PTActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/PTActionModal.js deleted file mode 100644 index 37b3d996177..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/PTActionModal.js +++ /dev/null @@ -1,190 +0,0 @@ -import { Loader, Modal, FormComposer } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect } from "react"; - -import { configPTApproverApplication, configPTAssessProperty } from "../config"; -import * as predefinedConfig from "../config"; - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const ActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationData, businessService, moduleCode }) => { - const { data: approverData, isLoading: PTALoading } = Digit.Hooks.useEmployeeSearch( - tenantId, - { - roles: action?.assigneeRoles?.map?.((e) => ({ code: e })), - isActive: true, - }, - { enabled: !action?.isTerminateState } - ); - const { isLoading: financialYearsLoading, data: financialYearsData } = Digit.Hooks.pt.useMDMS( - tenantId, - businessService, - "FINANCIAL_YEARLS", - {}, - { - details: { - tenantId: Digit.ULBService.getStateId(), - moduleDetails: [{ moduleName: "egf-master", masterDetails: [{ name: "FinancialYear", filter: "[?(@.module == 'PT')]" }] }], - }, - } - ); - - const [config, setConfig] = useState({}); - const [defaultValues, setDefaultValues] = useState({}); - const [approvers, setApprovers] = useState([]); - const [selectedApprover, setSelectedApprover] = useState(null); - const [file, setFile] = useState(null); - const [uploadedFile, setUploadedFile] = useState(null); - const [error, setError] = useState(null); - const [financialYears, setFinancialYears] = useState([]); - const [selectedFinancialYear, setSelectedFinancialYear] = useState(null); - const [disableActionSubmit, setDisableActionSubmit] = useState(false); - - useEffect(() => { - if (financialYearsData && financialYearsData["egf-master"]) { - setFinancialYears(financialYearsData["egf-master"]?.["FinancialYear"]); - } - }, [financialYearsData]); - - useEffect(() => { - setApprovers(approverData?.Employees?.map((employee) => ({ uuid: employee?.uuid, name: employee?.user?.name }))); - }, [approverData]); - - function selectFile(e) { - setFile(e.target.files[0]); - } - - useEffect(() => { - (async () => { - setError(null); - if (file) { - if (file.size >= 5242880) { - setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); - } else { - try { - const response = await Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId()); - if (response?.data?.files?.length > 0) { - setUploadedFile(response?.data?.files[0]?.fileStoreId); - } else { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } catch (err) { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } - } - })(); - }, [file]); - - function submit(data) { - if (!action?.showFinancialYearsModal) { - let workflow = { action: action?.action, comment: data?.comments, businessService, moduleName: moduleCode }; - workflow["assignes"] = action?.isTerminateState || !selectedApprover ? [] : [selectedApprover]; - if (uploadedFile) - workflow["documents"] = [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ]; - - submitAction({ - Property: { - ...applicationData, - workflow, - }, - }); - } else { - submitAction({ - customFunctionToExecute: action?.customFunctionToExecute, - Assessment: { - financialYear: selectedFinancialYear?.name, - propertyId: applicationData?.propertyId, - tenantId, - source: applicationData?.source, - channel: applicationData?.channel, - assessmentDate: Date.now(), - }, - }); - } - } - - useEffect(() => { - if (action) { - if (action?.showFinancialYearsModal) { - setConfig( - configPTAssessProperty({ - t, - action, - financialYears, - selectedFinancialYear, - setSelectedFinancialYear, - }) - ); - } else { - setConfig( - configPTApproverApplication({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - businessService, - }) - ); - } - } - }, [action, approvers, financialYears, selectedFinancialYear, uploadedFile]); - - return action && config.form ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => {}} - isDisabled={!action.showFinancialYearsModal ? PTALoading || (action?.docUploadRequired && !uploadedFile) : !selectedFinancialYear} - formId="modal-action" - > - {financialYearsLoading ? ( - - ) : ( - - )} - - ) : ( - - ); -}; - -export default ActionModal; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/TLActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/TLActionModal.js deleted file mode 100644 index f11658a987a..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/TLActionModal.js +++ /dev/null @@ -1,166 +0,0 @@ -import { Loader, Modal, FormComposer } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect } from "react"; - -import { configTLApproverApplication } from "../config"; -import * as predefinedConfig from "../config"; - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const ActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationData, businessService, moduleCode }) => { - const { data: approverData, isLoading: PTALoading } = Digit.Hooks.useEmployeeSearch( - tenantId, - { - roles: action?.assigneeRoles?.map?.((e) => ({ code: e })), - isActive: true, - }, - { enabled: !action?.isTerminateState } - ); - const { isLoading: financialYearsLoading, data: financialYearsData } = Digit.Hooks.pt.useMDMS( - tenantId, - businessService, - "FINANCIAL_YEARLS", - {}, - { - details: { - tenantId: Digit.ULBService.getStateId(), - moduleDetails: [{ moduleName: "egf-master", masterDetails: [{ name: "FinancialYear", filter: "[?(@.module == 'TL')]" }] }], - }, - } - ); - - const [config, setConfig] = useState({}); - const [defaultValues, setDefaultValues] = useState({}); - const [approvers, setApprovers] = useState([]); - const [selectedApprover, setSelectedApprover] = useState({}); - const [file, setFile] = useState(null); - const [uploadedFile, setUploadedFile] = useState(null); - const [error, setError] = useState(null); - const [financialYears, setFinancialYears] = useState([]); - const [selectedFinancialYear, setSelectedFinancialYear] = useState(null); - - useEffect(() => { - if (financialYearsData && financialYearsData["egf-master"]) { - setFinancialYears(financialYearsData["egf-master"]?.["FinancialYear"]); - } - }, [financialYearsData]); - - useEffect(() => { - setApprovers(approverData?.Employees?.map((employee) => ({ uuid: employee?.uuid, name: employee?.user?.name }))); - }, [approverData]); - - function selectFile(e) { - setFile(e.target.files[0]); - } - - useEffect(() => { - (async () => { - setError(null); - if (file) { - if (file.size >= 5242880) { - setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); - } else { - try { - const response = await Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId()); - if (response?.data?.files?.length > 0) { - setUploadedFile(response?.data?.files[0]?.fileStoreId); - } else { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } catch (err) { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } - } - })(); - }, [file]); - - function submit(data) { - let workflow = { action: action?.action, comments: data?.comments, businessService, moduleName: moduleCode }; - applicationData = { - ...applicationData, - action: action?.action, - comment: data?.comments, - assignee: !selectedApprover?.uuid ? null : [selectedApprover?.uuid], - // assignee: action?.isTerminateState ? [] : [selectedApprover?.uuid], - wfDocuments: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : null, - }; - submitAction({ - Licenses: [applicationData], - }); - } - - useEffect(() => { - if (action) { - setConfig( - configTLApproverApplication({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - businessService, - }) - ); - } - }, [action, approvers, financialYears, selectedFinancialYear, uploadedFile]); - - return action && config.form ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => {}} - // isDisabled={!action.showFinancialYearsModal ? PTALoading || (!action?.isTerminateState && !selectedApprover?.uuid) : !selectedFinancialYear} - formId="modal-action" - > - {financialYearsLoading ? ( - - ) : ( - - )} - - ) : ( - - ); -}; - -export default ActionModal; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WNSActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WNSActionModal.js deleted file mode 100644 index eb64a09804b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WNSActionModal.js +++ /dev/null @@ -1,261 +0,0 @@ -import { Loader, Modal, FormComposer } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect } from "react"; -import { configWSApproverApplication, configWSDisConnectApplication } from "../config"; -import * as predefinedConfig from "../config"; -import cloneDeep from "lodash/cloneDeep"; - - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const convertDateToEpochNew = (dateString, dayStartOrEnd = "dayend") => { - //example input format : "2018-10-02" - try { - const parts = dateString.match(/(\d{4})-(\d{1,2})-(\d{1,2})/); - const DateObj = new Date(Date.UTC(parts[1], parts[3] - 1, parts[2])); - - DateObj.setMinutes(DateObj.getMinutes() + DateObj.getTimezoneOffset()); - if (dayStartOrEnd === "dayend") { - DateObj.setHours(DateObj.getHours() + 24); - DateObj.setSeconds(DateObj.getSeconds() - 1); - } - return DateObj.getTime(); - } catch (e) { - return dateString; - } -}; - -const ActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationData, businessService, moduleCode }) => { - const { data: approverData, isLoading: PTALoading } = Digit.Hooks.useEmployeeSearch( - tenantId, - { - roles: action?.assigneeRoles?.map?.((e) => ({ code: e })), - isActive: true, - }, - { enabled: !action?.isTerminateState } - ); - - const [config, setConfig] = useState({}); - const [defaultValues, setDefaultValues] = useState({}); - const [approvers, setApprovers] = useState([]); - const [selectedApprover, setSelectedApprover] = useState({}); - const [file, setFile] = useState(null); - const [uploadedFile, setUploadedFile] = useState(null); - const [error, setError] = useState(null); - - useEffect(() => { - setApprovers(approverData?.Employees?.map((employee) => ({ uuid: employee?.uuid, name: employee?.user?.name }))); - }, [approverData]); - - function selectFile(e) { - setFile(e.target.files[0]); - } - - useEffect(() => { - (async () => { - setError(null); - if (file) { - const allowedFileTypesRegex = /(.*?)(jpg|jpeg|png|image|pdf)$/i - if (file.size >= 5242880) { - setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); - } else if (file?.type && !allowedFileTypesRegex.test(file?.type)) { - setError(t(`NOT_SUPPORTED_FILE_TYPE`)) - } else { - try { - const response = await Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getCurrentTenantId()); - if (response?.data?.files?.length > 0) { - setUploadedFile(response?.data?.files[0]?.fileStoreId); - } else { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } catch (err) { - console.error("Modal -> err ", err); - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } - } - })(); - }, [file]); - - function submit(data) { - if(applicationData?.isBillAmend){ - const comments = data?.comments ? data.comments : null - - const additionalDetails = { ...applicationData?.billAmendmentDetails?.additionalDetails, comments } - const amendment = { - ...applicationData?.billAmendmentDetails, - workflow:{ - businessId:applicationData?.billAmendmentDetails?.amendmentId, - action:action?.action, - tenantId:tenantId, - businessService:"BS.AMENDMENT", - moduleName:"BS" - }, - additionalDetails, - comment: data?.comments || "", - wfDocuments: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : null, - processInstance: { - action: action?.action, - assignes: !selectedApprover?.uuid ? [] : [{ uuid: selectedApprover?.uuid }], - comment: data?.comments || "", - documents: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : [] - } - } - //amendment?.additionalDetails?.comments = comments - submitAction({AmendmentUpdate:amendment}) - return - } - let workflow = { action: action?.action, comments: data?.comments, businessService, moduleName: moduleCode }; - applicationData = { - ...applicationData, - action: action?.action, - comment: data?.comments || "", - assignee: !selectedApprover?.uuid ? [] : [selectedApprover?.uuid], - assignes: !selectedApprover?.uuid ? [] : [{ uuid: selectedApprover?.uuid }], - wfDocuments: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : null, - processInstance: { - ...applicationData?.processInstance, - action: action?.action, - assignes: !selectedApprover?.uuid ? [] : [{ uuid: selectedApprover?.uuid }], - comment: data?.comments || "", - documents: uploadedFile - ? [ - { - documentType: action?.action + " DOC", - fileName: file?.name, - fileStoreId: uploadedFile, - }, - ] - : [] - } - }; - - if (data?.date) { - const connectionExecutionDate = cloneDeep(data?.date); - applicationData.connectionExecutionDate = convertDateToEpochNew(connectionExecutionDate) - } - if (applicationData?.processInstance?.businessService == "DisconnectWSConnection" || applicationData?.processInstance?.businessService == "DisconnectSWConnection"){ - applicationData?.serviceType == "WATER" ? - submitAction({ WaterConnection: applicationData, disconnectRequest: true }) : - submitAction({ SewerageConnection: applicationData, disconnectRequest: true }) - } else { - const adhocRebateData = sessionStorage.getItem("Digit.ADHOC_ADD_REBATE_DATA"); - const parsedAdhocRebateData = adhocRebateData ? JSON.parse(adhocRebateData) : ""; - if (parsedAdhocRebateData?.value?.adhocPenalty) applicationData.additionalDetails.adhocPenalty = parseInt(parsedAdhocRebateData?.value?.adhocPenalty) || ""; - if (parsedAdhocRebateData?.value?.adhocPenaltyComment) applicationData.additionalDetails.adhocPenaltyComment = parsedAdhocRebateData?.value?.adhocPenaltyComment || ""; - if (parsedAdhocRebateData?.value?.adhocPenaltyReason) applicationData.additionalDetails.adhocPenaltyReason = parsedAdhocRebateData?.value?.adhocPenaltyReason || ""; - if (parsedAdhocRebateData?.value?.adhocRebate) applicationData.additionalDetails.adhocRebate = parseInt(parsedAdhocRebateData?.value?.adhocRebate) || ""; - if (parsedAdhocRebateData?.value?.adhocRebateComment) applicationData.additionalDetails.adhocRebateComment = parsedAdhocRebateData?.value?.adhocRebateComment || ""; - if (parsedAdhocRebateData?.value?.adhocRebateReason) applicationData.additionalDetails.adhocRebateReason = parsedAdhocRebateData?.value?.adhocRebateReason || ""; - applicationData?.serviceType == "WATER" ? submitAction({ WaterConnection: applicationData }) : submitAction({ SewerageConnection: applicationData }); - } - } - - useEffect(() => { - if (applicationData?.processInstance?.businessService == "DisconnectWSConnection" || applicationData?.processInstance?.businessService == "DisconnectSWConnection") { - if (action) { - setConfig( - configWSDisConnectApplication({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - businessService, - error - }) - ); - } - } else { - if (action) { - setConfig( - configWSApproverApplication({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - businessService, - error - }) - ); - } - } - }, [action, approvers, uploadedFile, error]); - - return action && config.form ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => { }} - formId="modal-action" - > - {PTALoading ? ( - - ) : ( - - )} - - ) : ( - - ); -}; - -export default ActionModal; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WorksActionModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WorksActionModal.js deleted file mode 100644 index dd19cf33a1e..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WorksActionModal.js +++ /dev/null @@ -1,262 +0,0 @@ -import { Loader, Modal, FormComposer } from "@egovernments/digit-ui-react-components"; -import React, { useState, useEffect } from "react"; -import { configApproveModal, configRejectModal, configCheckModal } from "../config"; - -import cloneDeep from "lodash/cloneDeep"; - - -const Heading = (props) => { - return

{props.label}

; -}; - -const Close = () => ( - - - - -); - -const CloseBtn = (props) => { - return ( -
- -
- ); -}; - -const convertDateToEpochNew = (dateString, dayStartOrEnd = "dayend") => { - //example input format : "2018-10-02" - try { - const parts = dateString.match(/(\d{4})-(\d{1,2})-(\d{1,2})/); - const DateObj = new Date(Date.UTC(parts[1], parts[3] - 1, parts[2])); - - DateObj.setMinutes(DateObj.getMinutes() + DateObj.getTimezoneOffset()); - if (dayStartOrEnd === "dayend") { - DateObj.setHours(DateObj.getHours() + 24); - DateObj.setSeconds(DateObj.getSeconds() - 1); - } - return DateObj.getTime(); - } catch (e) { - return dateString; - } -}; - - -const WorksActionModal = ({ t, action, tenantId, state, id, closeModal, submitAction, actionData, applicationData, businessService, moduleCode,applicationDetails,workflowDetails }) => { - //here according to the action selected render appropriate modal - - // const { data: approverData, isLoading: PTALoading } = Digit.Hooks.useEmployeeSearch( - // tenantId, - // { - // roles: action?.assigneeRoles?.map?.((e) => ({ code: e })), - // isActive: true, - // }, - // { enabled: !action?.isTerminateState } - // ); - let { loiNumber, estimateNumber } = Digit.Hooks.useQueryParams(); - const [config, setConfig] = useState({}); - const [approvers, setApprovers] = useState([]); - const [selectedApprover, setSelectedApprover] = useState({}); - - const [department, setDepartment] = useState([]); - const [selectedDept,setSelectedDept] = useState({}) - - const [rejectionReason, setRejectionReason] = useState([]); - const [selectedReason,setSelectedReason] = useState([]) - - const [designation, setDesignation] = useState([]); - const [selectedDesignation,setSelectedDesignation] = useState({}) - - //get approverDept,designation,approver(hrms),rejectionReason - - const rejectReasons = [ - { - name: "Estimate Details are incorrect" - }, - { - name: "Financial Details are incorrect" - }, - { - name: "Agreement Details are incorrect" - }, - { - name: "Vendor Details are incorrect" - }, - { - name: "Attachments provided are wrong" - }, - { - name: "Others" - }, - ] - - const { isLoading: mdmsLoading, data: mdmsData,isSuccess:mdmsSuccess } = Digit.Hooks.useCustomMDMS( - Digit.ULBService.getCurrentTenantId(), - "common-masters", - [ - { - "name": "Designation" - }, - { - "name": "Department" - } - ] - ); - - mdmsData?.["common-masters"]?.Designation?.map(designation => { - designation.i18nKey = `ES_COMMON_DESIGNATION_${designation?.name}` - }) - - mdmsData?.["common-masters"]?.Department?.map(department => { - department.i18nKey = `ES_COMMON_${department?.code}` - }) - // const { data: approverData, isLoading: approverLoading } = Digit.Hooks.useEmployeeSearch( - // tenantId, - // { - // roles: action?.assigneeRoles?.map?.((e) => ({ code: e })), - // isActive: true, - // }, - // { enabled: !action?.isTerminateState } - // ); - - - // const { isLoading: approverLoading, isError,isSuccess:approverSuccess, error, data: employeeDatav1 } = Digit.Hooks.hrms.useHRMSSearch({ Designation: selectedDesignation?.code, Department: selectedDept?.code }, Digit.ULBService.getCurrentTenantId(), null, null, { enabled: !!(selectedDept?.code && selectedDesignation?.code) }); - // employeeDatav1?.Employees.map(emp => emp.nameOfEmp = emp.user.name) - - - // useEffect(() => { - - // setApprovers(approverData?.Employees?.map((employee) => ({ uuid: employee?.uuid, name: employee?.user?.name }))); - // }, [approverData]); - - useEffect(() => { - - //setApprovers(approverData?.Employees?.map((employee) => ({ uuid: employee?.uuid, name: employee?.user?.name }))); - //setApprovers(employeeDatav1?.Employees?.length > 0 ? employeeDatav1?.Employees : []) - setDepartment(mdmsData?.["common-masters"]?.Department) - setDesignation(mdmsData?.["common-masters"]?.Designation) - setRejectionReason(rejectReasons) - }, [mdmsData]); - - - - const { isLoading: approverLoading, isError, error, data: employeeDatav1 } = Digit.Hooks.hrms.useHRMSSearch({ designations: selectedDesignation?.code, departments: selectedDept?.code, roles: action?.assigneeRoles?.toString(), isActive: true }, Digit.ULBService.getCurrentTenantId(), null, null, { enabled: action?.action === "CHECK" || action?.action === "TECHNICALSANCATION"}); - - - employeeDatav1?.Employees.map(emp => emp.nameOfEmp = emp?.user?.name || "NA") - - useEffect(() => { - setApprovers(employeeDatav1?.Employees?.length > 0 ? employeeDatav1?.Employees.filter(emp => emp?.nameOfEmp !== "NA") : []) - }, [employeeDatav1]) - - - // if (employeeDatav1?.Employees?.length > 0) { - // setApprovers(employeeDatav1?.Employees) - // } - - useEffect(() => { - - if(action?.action?.includes("CHECK") || action?.action?.includes("TECHNICALSANCATION")){ - setConfig( - configCheckModal({ - t, - action, - businessService, - approvers, - selectedApprover, - setSelectedApprover, - designation, - selectedDesignation, - setSelectedDesignation, - department, - selectedDept, - setSelectedDept, - approverLoading - }) - ) - }else if(action?.action?.includes("APPROVE") || action?.action?.includes("ADMINSANCTION")){ - setConfig( - configApproveModal({ - t, - action - }) - ) - } - else if(action?.action?.includes("REJECT")){ - setConfig( - configRejectModal({ - t, - action, - rejectReasons, - selectedReason, - setSelectedReason, - loiNumber, - department, - estimateNumber - }) - ) - } - }, [approvers,designation,department]); - - - function submit (_data) { - //make the update object here and call submitAction - //if the action is reject then you need to make a search call and get creater's uuid - const workflow = { - action: action?.action, - comment: _data?.comments, - assignees: selectedApprover?.uuid ? [selectedApprover?.uuid] : undefined - } - - if(action?.action.includes("REJECT")) { - workflow.assignee = [applicationData?.auditDetails?.createdBy] - } - - Object.keys(workflow).forEach(key => { - if (workflow[key] === undefined) { - delete workflow[key]; - } - }); - {estimateNumber ? submitAction({estimate:applicationData,workflow}) : - submitAction({letterOfIndent:applicationData,workflow})} - - } - - // if(mdmsLoading || approverLoading ) { - // return - // } - - - - - - return action && config?.form ? ( - } - headerBarEnd={} - actionCancelLabel={t(config.label.cancel)} - actionCancelOnSubmit={closeModal} - actionSaveLabel={t(config.label.submit)} - actionSaveOnSubmit={() => { }} - formId="modal-action" - > - {mdmsLoading ? ( - - ) : ( - - )} - - ) : ( - - ); -} - -export default WorksActionModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/index.js deleted file mode 100644 index 56465790b8b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/index.js +++ /dev/null @@ -1,49 +0,0 @@ -import React, { useState, useEffect } from "react"; -import FSMActionModal from "./FSMActionModal"; -import PTActionModal from "./PTActionModal"; -import TLActionModal from "./TLActionModal"; -import BPAREGActionModal from "./BPAREGActionModal"; -import BPAActionModal from "./BPAActionModal"; -import NOCActionModal from "./NOCActionModal"; -import WNSActionModal from "./WNSActionModal"; -import WorksActionModal from "./WorksActionModal"; -import AttendanceActionModal from "./AttendanceActionModal"; -import ExpenditureActionModal from "./ExpenditureActionModal"; - -const ActionModal = (props) => { - if (props?.businessService.includes("PT")) { - return ; - } - - if (props?.businessService.includes("NewTL") || props?.businessService.includes("TL") || props?.businessService.includes("EDITRENEWAL") || props?.businessService.includes("DIRECTRENEWAL")) { - return ; - } - - if (props?.moduleCode.includes("BPAREG")) { - return ; - } - - if (props?.moduleCode.includes("BPA")) { - return ; - } - - if (props?.moduleCode.includes("NOC")) { - return ; - } - - if (props?.moduleCode.includes("WS")) { - return ; - } - if (props?.moduleCode.includes("works")) { - return ; - } - if (props?.moduleCode.includes("AttendenceMgmt")) { - return ; - } - if (props?.moduleCode.includes("Expenditure")) { - return ; - } - -}; - -export default ActionModal; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsActionBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsActionBar.js deleted file mode 100644 index 7ad3a0f95ce..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsActionBar.js +++ /dev/null @@ -1,80 +0,0 @@ -import React, {useEffect, useRef} from "react"; -import { useTranslation } from "react-i18next"; -import { SubmitBar, ActionBar, Menu } from "@egovernments/digit-ui-react-components"; - -function ApplicationDetailsActionBar({ workflowDetails, displayMenu, onActionSelect, setDisplayMenu, businessService, forcedActionPrefix,ActionBarStyle={},MenuStyle={}, saveAttendanceState }) { - const { t } = useTranslation(); - let user = Digit.UserService.getUser(); - const menuRef = useRef(); - if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) { - const userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject"); - const userInfo = userInfos ? JSON.parse(userInfos) : {}; - user = userInfo?.value; - } - const userRoles = user?.info?.roles?.map((e) => e.code); - let isSingleButton = false; - let isMenuBotton = false; - let actions = workflowDetails?.data?.actionState?.nextActions?.filter((e) => { - return userRoles.some((role) => e.roles?.includes(role)) || !e.roles; - }) || workflowDetails?.data?.nextActions?.filter((e) => { - return userRoles.some((role) => e.roles?.includes(role)) || !e.roles; - }); - - const closeMenu = () => { - setDisplayMenu(false); - } - Digit.Hooks.useClickOutside(menuRef, closeMenu, displayMenu ); - - if (((window.location.href.includes("/obps") || window.location.href.includes("/noc")) && actions?.length == 1) || (actions?.[0]?.redirectionUrl?.pathname.includes("/pt/property-details/")) && actions?.length == 1) { - isMenuBotton = false; - isSingleButton = true; - } else if (actions?.length > 0) { - isMenuBotton = true; - isSingleButton = false; - } - - if(saveAttendanceState?.displaySave) { - isMenuBotton = false; - isSingleButton = true; - actions = [ - { - action: "SAVE", - state: "UPDATED" - } - ] - } - - return ( - - {!workflowDetails?.isLoading && isMenuBotton && !isSingleButton && ( - - {displayMenu && (workflowDetails?.data?.actionState?.nextActions || workflowDetails?.data?.nextActions) ? ( - - ) : null} - setDisplayMenu(!displayMenu)} /> - - )} - {!workflowDetails?.isLoading && !isMenuBotton && isSingleButton && ( - - - - )} - - ); -} - -export default ApplicationDetailsActionBar; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsContent.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsContent.js deleted file mode 100644 index 5596d7b694b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsContent.js +++ /dev/null @@ -1,484 +0,0 @@ -import { - BreakLine, - Card, - CardSectionHeader, - CardSubHeader, - CheckPoint, - CollapseAndExpandGroups, - ConnectingCheckPoints, - ViewImages, - Loader, - Row, - StatusTable, - Table, -} from "@egovernments/digit-ui-react-components"; -import { values } from "lodash"; -import React, { Fragment, useCallback, useReducer, useState } from "react"; -import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; -import BPADocuments from "./BPADocuments"; -import InspectionReport from "./InspectionReport"; -import NOCDocuments from "./NOCDocuments"; -import PermissionCheck from "./PermissionCheck"; -import PropertyDocuments from "./PropertyDocuments"; -import PropertyEstimates from "./PropertyEstimates"; -import PropertyFloors from "./PropertyFloors"; -import PropertyOwners from "./PropertyOwners"; -import ScruntinyDetails from "./ScruntinyDetails"; -import SubOccupancyTable from "./SubOccupancyTable"; -import TLCaption from "./TLCaption"; -import TLTradeAccessories from "./TLTradeAccessories"; -import TLTradeUnits from "./TLTradeUnits"; -//import WSAdditonalDetails from "./WSAdditonalDetails"; -import WSFeeEstimation from "./WSFeeEstimation"; -//import WSInfoLabel from "../../../ws/src/pageComponents/WSInfoLabel"; -import DocumentsPreview from "./DocumentsPreview"; -import InfoDetails from "./InfoDetails"; -import ViewBreakup from "./ViewBreakup"; -import SubWorkTableDetails from "./SubWorkTableDetails"; - - - -function ApplicationDetailsContent({ - applicationDetails, - workflowDetails, - isDataLoading, - applicationData, - businessService, - timelineStatusPrefix, - showTimeLine = true, - statusAttribute = "status", - paymentsList, - oldValue, - isInfoLabel = false, - noBoxShadow = false, - sectionHeadStyle = false, - modify, - setSaveAttendanceState -}) { - const { t } = useTranslation(); - const [localSearchParams, setLocalSearchParams] = useState(() => ({})); - - - const handleDateRangeChange = useCallback((data) => { - setLocalSearchParams(() => ({ ...data })); - }, []); - - function OpenImage(imageSource, index, thumbnailsToShow) { - window.open(thumbnailsToShow?.fullImage?.[0], "_blank"); - } - - const convertEpochToDateDMY = (dateEpoch) => { - if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") { - return "NA"; - } - const dateFromApi = new Date(dateEpoch); - let month = dateFromApi.getMonth() + 1; - let day = dateFromApi.getDate(); - let year = dateFromApi.getFullYear(); - month = (month > 9 ? "" : "0") + month; - day = (day > 9 ? "" : "0") + day; - return `${day}/${month}/${year}`; - }; - const getTimelineCaptions = (checkpoint) => { - if (checkpoint.state === "OPEN" || (checkpoint.status === "INITIATED" && !window.location.href.includes("/obps/"))) { - const caption = { - date: convertEpochToDateDMY(applicationData?.auditDetails?.createdTime), - source: applicationData?.channel || "", - }; - return ; - } else if (window.location.href.includes("/obps/") || window.location.href.includes("/noc/") || window.location.href.includes("/ws/")) { - //From BE side assigneeMobileNumber is masked/unmasked with connectionHoldersMobileNumber and not assigneeMobileNumber - const privacy = { uuid: checkpoint?.assignes?.[0]?.uuid, fieldName: ["connectionHoldersMobileNumber"], model: "WaterConnectionOwner" }; - const caption = { - date: checkpoint?.auditDetails?.lastModified, - name: checkpoint?.assignes?.[0]?.name, - mobileNumber: - applicationData?.processInstance?.assignes?.[0]?.uuid === checkpoint?.assignes?.[0]?.uuid && - applicationData?.processInstance?.assignes?.[0]?.mobileNumber - ? applicationData?.processInstance?.assignes?.[0]?.mobileNumber - : checkpoint?.assignes?.[0]?.mobileNumber, - comment: t(checkpoint?.comment), - wfComment: checkpoint.wfComment, - thumbnailsToShow: checkpoint?.thumbnailsToShow, - }; - return ; - } else { - const caption = { - date: `${Digit.DateUtils?.ConvertTimestampToDate(checkpoint.auditDetails.lastModifiedEpoch)} ${Digit.DateUtils?.ConvertEpochToTimeInHours( - checkpoint.auditDetails.lastModifiedEpoch - )} ${Digit.DateUtils?.getDayfromTimeStamp(checkpoint.auditDetails.lastModifiedEpoch)}`, - // name: checkpoint?.assigner?.name, - name: checkpoint?.assignes?.[0]?.name, - // mobileNumber: checkpoint?.assigner?.mobileNumber, - wfComment: checkpoint?.wfComment, - mobileNumber: checkpoint?.assignes?.[0]?.mobileNumber, - }; - - return ; - } - }; - - const getTranslatedValues = (dataValue, isNotTranslated) => { - if (dataValue) { - return !isNotTranslated ? t(dataValue) : dataValue; - } else { - return t("NA"); - } - }; - - const checkLocation = - window.location.href.includes("employee/tl") || window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc"); - const isNocLocation = window.location.href.includes("employee/noc"); - const isBPALocation = window.location.href.includes("employee/obps"); - let isWS = window.location.href.includes("employee/ws") || window.location.href.includes("employee/works")|| window.location.href.includes("employee/project") || window.location.href.includes("employee/estimate") ; - - - - const getRowStyles = (tab="") => { - - if (window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc")) { - return { justifyContent: "space-between", fontSize: "16px", lineHeight: "19px", color: "#0B0C0C" }; - } else if (checkLocation) { - return { justifyContent: "space-between", fontSize: "16px", lineHeight: "19px", color: "#0B0C0C" }; - } - else if ( tab==="fieldSurvey") { - return { - justifyContent: "space-between", flexDirection:"column" - } - } - else { - return {}; - } - - }; - const getTextStyles = (tab="") => { - if ( tab==="fieldSurvey" ) { - return { - marginTop:"1rem", - marginBottom:"1rem" - } - } - else { - return {}; - } - - }; - const getLabelStyles = (tab = "") => { - if ( tab === "fieldSurvey") { - return { - width:"100%" - } - } - else { - return {}; - } - - }; - - const getTableStyles = () => { - if (window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc")) { - return { position: "relative", marginTop: "19px" }; - } else if (checkLocation) { - return { position: "relative", marginTop: "19px" }; - } else { - return {}; - } - }; - - const getMainDivStyles = () => { - if ( - window.location.href.includes("employee/obps") || - window.location.href.includes("employee/noc") || - window.location.href.includes("employee/ws") || - window.location.href.includes("employee/works") || - window.location.href.includes("employee/contracts") - ) { - return { lineHeight: "19px", maxWidth: "950px", minWidth: "280px" }; - } else if (checkLocation) { - return { lineHeight: "19px", maxWidth: "600px", minWidth: "280px" }; - } else { - return {}; - } - }; - - const getTextValue = (value) => { - if (value?.skip) return value.value; - else if (value?.isUnit) return value?.value ? `${getTranslatedValues(value?.value, value?.isNotTranslated)} ${t(value?.isUnit)}` : t("N/A"); - else if (value?.value === "Approved") return { `${getTranslatedValues(value?.value, value?.isNotTranslated)}`} - else if (value?.value === "Rejected") return {t(value?.value)} - else return value?.value ? getTranslatedValues(value?.value, value?.isNotTranslated) : t("N/A"); - }; - - const getClickInfoDetails = () => { - if (window.location.href.includes("disconnection") || window.location.href.includes("application")) { - return "WS_DISCONNECTION_CLICK_ON_INFO_LABEL"; - } else { - return "WS_CLICK_ON_INFO_LABEL"; - } - }; - - const getClickInfoDetails1 = () => { - if (window.location.href.includes("disconnection") || window.location.href.includes("application")) { - return "WS_DISCONNECTION_CLICK_ON_INFO1_LABEL"; - } else { - return ""; - } - }; - - const getCardStyles = () => { - let styles = { position: "relative" } - if (noBoxShadow) styles = { ...styles, boxShadow: "none" }; - return styles; - }; - - return ( - - - {isInfoLabel ? ( - - ) : null} - {applicationDetails?.applicationDetails?.map((detail, index) => ( - - -
- {index === 0 && !detail.asSectionHeader ? ( - {t(detail.title)} - ) : ( - - - {isNocLocation ? `${t(detail.title)}` : t(detail.title)} - {detail?.Component ? : null} - - - )} - {/* TODO, Later will move to classes */} - {/* Here Render the table for adjustment amount details detail.isTable is true for that table*/} - {/* {detail?.isTable && ( - - - {detail?.headers.map((header) => ( - - ))} - - - {detail?.tableRows.map((row,index)=>{ - if(index===detail?.tableRows.length - 1){ - return <> -
- - {row.map(element => )} - - - } - return - {row.map(element => )} - })} -
{t(header)}
{t(element)}
{t(element)}
- )} */} - {detail?.isTable && } - - - {detail?.title && - !detail?.title.includes("NOC") && - detail?.values?.map((value, index) => { - if (value.map === true && value.value !== "N/A") { - return } />; - } - if (value?.isLink == true) { - return ( - - - - {t(value?.title)} - - -
- ) : isNocLocation || isBPALocation ? ( - `${t(value.title)}` - ) : ( - t(value.title) - ) - } - text={ -
- - - {value?.value} - - -
- } - last={index === detail?.values?.length - 1} - caption={value.caption} - className="border-none" - rowContainerStyle={getRowStyles()} - /> - ); - } - return ( - { }} />: getTextValue(value)} - last={index === detail?.values?.length - 1} - caption={value.caption} - className="border-none" - /* privacy object set to the Row Component */ - privacy={value?.privacy} - // TODO, Later will move to classes - rowContainerStyle={getRowStyles(detail?.tab)} - textStyle={getTextStyles(detail?.tab)} - labelStyle={getLabelStyles(detail?.tab)} - /> - ); - })} - -
- - - {detail?.additionalDetails?.table - ? detail?.additionalDetails?.table?.weekTable?.tableHeader && ( - <> - - {t(detail?.additionalDetails?.table?.weekTable?.tableHeader)} - - - ) - : null} - - {detail?.additionalDetails?.inspectionReport && ( - - )} - {applicationDetails?.applicationData?.additionalDetails?.fieldinspection_pending?.length > 0 && detail?.additionalDetails?.fiReport && ( - - )} - {/* {detail?.additionalDetails?.FIdocuments && detail?.additionalDetails?.values?.map((doc,index) => ( -
- {doc.isNotDuplicate &&
- - - -
-
-
} -
- )) } */} - {detail?.additionalDetails?.floors && } - {detail?.additionalDetails?.owners && } - {detail?.additionalDetails?.units && } - {detail?.additionalDetails?.accessories && } - {detail?.additionalDetails?.permissions && workflowDetails?.data?.nextActions?.length > 0 && ( - - )} - {detail?.additionalDetails?.obpsDocuments && ( - - )} - {detail?.additionalDetails?.noc && ( - - )} - {detail?.additionalDetails?.scruntinyDetails && } - {detail?.additionalDetails?.buildingExtractionDetails && } - {detail?.additionalDetails?.subOccupancyTableDetails && ( - - )} - {detail?.additionalDetails?.documentsWithUrl && } - {detail?.additionalDetails?.documents && } - {detail?.additionalDetails?.taxHeadEstimatesCalculation && ( - - )} - {/* {detail?.isWaterConnectionDetails && } */} - {detail?.additionalDetails?.redirectUrl && ( -
- - - {detail?.additionalDetails?.redirectUrl?.title} - - -
- )} - {detail?.additionalDetails?.estimationDetails && } - {detail?.additionalDetails?.estimationDetails && } - - - ))} - {showTimeLine && workflowDetails?.data?.timeline?.length > 0 && ( - - {workflowDetails?.breakLineRequired === undefined ? : workflowDetails?.breakLineRequired ? : null} - {(workflowDetails?.isLoading || isDataLoading) && } - {!workflowDetails?.isLoading && !isDataLoading && ( - - - {/* {t("ES_APPLICATION_DETAILS_APPLICATION_TIMELINE")} */} - {t("WORKS_WORKFLOW_HISTORY")} - - {workflowDetails?.data?.timeline && workflowDetails?.data?.timeline?.length === 1 ? ( - - ) : ( - - {workflowDetails?.data?.timeline && - workflowDetails?.data?.timeline.map((checkpoint, index, arr) => { - return ( - - - - ); - })} - - )} - - )} - - )} - - - ); -} - -export default ApplicationDetailsContent; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsToast.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsToast.js deleted file mode 100644 index 9540495f32a..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsToast.js +++ /dev/null @@ -1,74 +0,0 @@ -import React from "react"; -import { Toast } from "@egovernments/digit-ui-react-components"; - -function ApplicationDetailsToast({ t, showToast, closeToast, businessService }) { - if (businessService?.includes("NewTL") || businessService?.includes("TL") || businessService?.includes("EDITRENEWAL")) { - let label = ""; - switch (showToast?.action?.action) { - case "SENDBACK": - label = showToast?.key === "error" ? showToast?.error?.message : t("TL_SENDBACK_CHECKLIST_MESSAGE_HEAD"); - break; - case "FORWARD": - label = showToast?.key === "error" ? showToast?.error?.message : t("TL_FORWARD_SUCCESS_MESSAGE_MAIN"); - break; - case "APPROVE": - label = showToast?.key === "error" ? showToast?.error?.message : t("TL_APPROVAL_CHECKLIST_MESSAGE_HEAD"); - break; - case "SENDBACKTOCITIZEN": - label = showToast?.key === "error" ? showToast?.error?.message : t("TL_SENDBACK_TOCITIZEN_CHECKLIST_MESSAGE_HEAD"); - break; - case "REJECT": - label = showToast?.key === "error" ? showToast?.error?.message : t("TL_APPROVAL_REJ_MESSAGE_HEAD"); - break; - case "RESUBMIT": - label = showToast?.key === "error" ? showToast?.error?.message : t("TL_APPLICATION_RESUBMIT_SUCCESS_MESSAGE_MAIN"); - break; - case "CANCEL": - label = showToast?.key === "error" ? showToast?.error?.message : t("TL_TL_CANCELLED_MESSAGE_HEAD"); - break; - default: - label = showToast?.key === "error" ? showToast?.error?.message : t(`ES_${businessService}_${showToast?.action?.action}_UPDATE_SUCCESS`); - } - return {showToast && }; - } else if (businessService?.includes("BPA") || businessService?.includes("BPA_LOW") || businessService?.includes("BPA_OC")) { - const getMessage = (messages = []) => { - let returnValue = messages[0]; - if(messages?.length == 2) returnValue = businessService?.includes("BPA_OC") ? t(messages[1]) : t(messages [0]); - else returnValue = t(messages[0]); - return returnValue; - } - let label = ""; - switch (showToast?.action?.action) { - case "REVOCATE": - label = showToast?.key === "error" ? showToast?.error?.message : getMessage(["BPA_APPROVAL_REVOCATED_MESSAGE_HEAD", "BPA_APPROVAL_OC_REVOCATED_MESSAGE_HEAD"]); - break; - case "VERIFY_AND_FORWARD": - label = showToast?.key === "error" ? showToast?.error?.message : getMessage(["BPA_FORWARD_SUCCESS_MESSAGE_MAIN"]); - break; - case "SEND_BACK_TO_CITIZEN": - label = showToast?.key === "error" ? showToast?.error?.message : getMessage(["BPA_SENDBACK_SUCCESS_MESSAGE_MAIN"]); - break; - case "APPROVE": - label = showToast?.key === "error" ? showToast?.error?.message : getMessage(["BPA_APPROVAL_CHECKLIST_MESSAGE_HEAD"]); - break; - case "REJECT": - label = showToast?.key === "error" ? showToast?.error?.message : getMessage(["BPA_APPROVAL_REJECTED_MESSAGE_HEAD", "BPA_OC_APPROVAL_REJECTED_MESSAGE_HEAD"]); - break; - case "FORWARD": - label = showToast?.key === "error" ? showToast?.error?.message : getMessage(["BPA_FORWARD_SUCCESS_MESSAGE_MAIN"]); - break; - case "SEND_BACK_FOR_DOCUMENT_VERIFICATION": - case "SEND_BACK_FOR_FIELD_INSPECTION": - label = showToast?.key === "error" ? showToast?.error?.message : getMessage(["BPA_SENDBACK_SUCCESS_MESSAGE_MAIN"]); - break; - default: - label = showToast?.key === "error" ? showToast?.error?.message : t(`ES_${businessService}_${showToast?.action?.action}_UPDATE_SUCCESS`); - } - return {showToast && }; - } else { - const label = showToast?.key === "error" ? showToast?.error?.message : `ES_${businessService}_${showToast?.action?.action}_UPDATE_SUCCESS`; - return {showToast && }; - } -} - -export default ApplicationDetailsToast; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsWarningPopup.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsWarningPopup.js deleted file mode 100644 index e95b9e038cd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsWarningPopup.js +++ /dev/null @@ -1,54 +0,0 @@ -import { Card, ButtonSelector, CardText, CardSubHeader, Modal, CardSectionHeader, Row } from "@egovernments/digit-ui-react-components"; -import React from "react"; -import { useTranslation } from "react-i18next"; - -const Close = () => ( - - - - - ); - -const CloseBtn = (props) => { - return ( -
- -
- ); - }; - -function ApplicationDetailsWarningPopup({ action,workflowDetails,businessService,isWarningPop,closeWarningPopup }) { -const { t } = useTranslation(); -const isMobile = window.Digit.Utils.browser.isMobile(); -return ( - - {t("PT_DUES_ARE_PENDING")}} - headerBarEnd={ - { - closeWarningPopup(); - }} - /> - } - hideSubmit={true} - isDisabled={false} - popupStyles={isMobile ? {} : { width: "29%", marginTop: "auto" }} - > - -
-

{t("PT_YOU_HAVE")} ₹{action?.AmountDueForPay} {t("PT_DUE_WARNING_MSG2")}

-
- -
- - window.location.assign(`${window.location.origin}${action?.redirectionUrl?.pathname}`)} style={{ marginLeft: "10px" }} /> -
-
-
- ) -
-) -} - -export default ApplicationDetailsWarningPopup; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/BPADocuments.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/BPADocuments.js deleted file mode 100644 index 9a1febe081b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/BPADocuments.js +++ /dev/null @@ -1,234 +0,0 @@ -import React, { useEffect, useState } from "react"; -import { - CardLabel, - Dropdown, - LabelFieldPair, - MultiUploadWrapper, - CardSubHeader -} from "@egovernments/digit-ui-react-components"; -import DocumentsPreview from "./DocumentsPreview"; - -const BPADocuments = ({ t, formData, applicationData, docs, bpaActionsDetails }) => { - const applicationStatus = applicationData?.status || ""; - const actions = bpaActionsDetails?.data?.nextActions || []; - const stateId = Digit.ULBService.getStateId(); - const [documents, setDocuments] = useState(formData?.documents?.documents || []); - const [error, setError] = useState(null); - const [bpaTaxDocuments, setBpaTaxDocuments] = useState([]); - const [enableSubmit, setEnableSubmit] = useState(true) - const [checkRequiredFields, setCheckRequiredFields] = useState(false); - const [checkEnablingDocs, setCheckEnablingDocs] = useState(false); - - const { isLoading: bpaDocsLoading, data: bpaDocs } = Digit.Hooks.obps.useMDMS(stateId, "BPA", ["DocTypeMapping"]); - const { isLoading: commonDocsLoading, data: commonDocs } = Digit.Hooks.obps.useMDMS(stateId, "common-masters", ["DocumentType"]); - - useEffect(() => { - let filtredBpaDocs = []; - if (bpaDocs?.BPA?.DocTypeMapping) { - // filtredBpaDocs = bpaDocs?.BPA?.DocTypeMapping?.filter(data => (data.WFState == "INPROGRESS")) - filtredBpaDocs = bpaDocs?.BPA?.DocTypeMapping?.filter(data => (data.WFState == applicationData?.status ? applicationData?.status : "INPROGRESS" && data.RiskType == applicationData?.riskType && data.ServiceType == applicationData?.additionalDetails?.serviceType && data.applicationType == applicationData?.additionalDetails?.applicationType)) - } - let documentsList = []; - filtredBpaDocs?.[0]?.docTypes?.forEach(doc => { - let code = doc.code; doc.dropdownData = []; doc.uploadedDocuments = []; - commonDocs?.["common-masters"]?.DocumentType?.forEach(value => { - let values = value.code.slice(0, code.length); - if (code === values) { - doc.hasDropdown = true; - value.i18nKey = value.code; - doc.dropdownData.push(value); - } - }); - doc.uploadedDocuments[0] = {}; - doc.uploadedDocuments[0].values = []; - docs?.[0]?.values?.map(upDocs => { - if (code === `${upDocs?.documentType?.split('.')[0]}.${upDocs?.documentType?.split('.')[1]}`) { - doc.uploadedDocuments[0].values.push(upDocs) - } - }) - documentsList.push(doc); - }); - sessionStorage.setItem("BPA_DOCUMENTS", JSON.stringify(documentsList)); - setBpaTaxDocuments(documentsList); - - }, [!bpaDocsLoading, !commonDocsLoading]); - - useEffect(() => { - let count = 0; - bpaTaxDocuments.map(doc => { - let isRequired = false; - documents.map(data => { - if (doc.required && doc.code == `${data.documentType.split('.')[0]}.${data.documentType.split('.')[1]}`) { - isRequired = true; - } - }); - if (!isRequired && doc.required) { - count = count + 1; - } - }); - if ((count == "0" || count == 0) && documents.length > 0) setEnableSubmit(false); - else setEnableSubmit(true); - }, [documents, checkRequiredFields]) - - useEffect(() => { - if ( applicationStatus === "DOC_VERIFICATION_INPROGRESS" && actions?.length > 0 ) setCheckEnablingDocs(true); - else setCheckEnablingDocs(false); - }, [applicationData, bpaActionsDetails]) - - return ( -
- {bpaTaxDocuments?.map((document, index) => { - return ( -
- -
- ); - })} -
- ); -} - -function SelectDocument({ - t, - document: doc, - setDocuments, - error, - setError, - documents, - setCheckRequiredFields, - index, - applicationStatus, - actions, - bpaTaxDocuments, - checkEnablingDocs -}) { - - const filteredDocument = documents?.filter((item) => item?.documentType?.includes(doc?.code))[0]; - const tenantId = Digit.ULBService.getStateId(); - const [selectedDocument, setSelectedDocument] = useState( - filteredDocument - ? { ...filteredDocument, active: true, code: filteredDocument?.documentType, i18nKey: filteredDocument?.documentType } - : doc?.dropdownData?.length === 1 - ? doc?.dropdownData[0] - : {} - ); - const [file, setFile] = useState(null); - const [uploadedFile, setUploadedFile] = useState(() => filteredDocument?.fileStoreId || null); - const [selectArrayFiles, SetSelectArrayFiles] = useState([]); - const handleSelectDocument = (value) => setSelectedDocument(value); - const allowedFileTypes = /(.*?)(jpg|jpeg|png|image|pdf)$/i; - - function selectfiles(e) { - e && setFile(e.file); - } - - - useEffect(() => { - if (selectedDocument?.code) { - setDocuments((prev) => { - const filteredDocumentsByDocumentType = prev?.filter((item) => item?.documentType !== selectedDocument?.code); - if (uploadedFile?.length === 0 || uploadedFile === null) return filteredDocumentsByDocumentType; - const filteredDocumentsByFileStoreId = filteredDocumentsByDocumentType?.filter((item) => item?.fileStoreId !== uploadedFile); - return [ - ...filteredDocumentsByFileStoreId, - { - documentType: selectedDocument?.code, - fileStoreId: uploadedFile, - documentUid: uploadedFile, - fileName: file?.name || "", - id: documents ? documents.find(x => x.documentType === selectedDocument?.code)?.id : undefined, - }, - ]; - }); - } - }, [uploadedFile, selectedDocument]); - - useEffect(() => { - (async () => { - if (selectArrayFiles.length > 0) { - sessionStorage.removeItem("BPA_DOCUMENTS"); - doc.newUploadedDocs = []; - selectArrayFiles.map(newDoc => { - if (selectedDocument?.code) { - doc.newUploadedDocs.push({ - documentType: selectedDocument?.code, - fileStoreId: newDoc?.fileStoreId?.fileStoreId, - documentUid: newDoc?.fileStoreId?.fileStoreId, - tenantId: newDoc?.fileStoreId?.tenantId - }); - } - }) - bpaTaxDocuments[index] = doc; - sessionStorage.setItem("BPA_DOCUMENTS", JSON.stringify(bpaTaxDocuments)); - } - })(); - }, [selectArrayFiles, selectedDocument]); - - useEffect(() => { - (async () => { - - })(); - }, [file]); - - const getData = (index, state) => { - let data = Object.fromEntries(state); - let newArr = Object.values(data); - if (Object.keys(data).length !== 0) SetSelectArrayFiles(newArr); - selectfiles(newArr[newArr.length - 1]); - } - - return ( -
- {`${t(doc?.code)}`} - {doc?.uploadedDocuments?.length && } - { - checkEnablingDocs ? -
- - {doc?.required ? `${t(doc?.code)}* ` : `${t(doc?.code)}`} - - - - -
- getData(index, e)} - t={t} - allowedFileTypesRegex={allowedFileTypes} - allowedMaxSizeInMB={5} - acceptFiles= "image/*, .pdf, .png, .jpeg, .jpg" - /> -
-
-
: null - } -
- ); -} - -export default BPADocuments; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/DocumentsPreview.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/DocumentsPreview.js deleted file mode 100644 index dfd57683def..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/DocumentsPreview.js +++ /dev/null @@ -1,49 +0,0 @@ -import React from "react"; -import { useTranslation } from "react-i18next"; -import { CardSubHeader, PDFSvg } from "@egovernments/digit-ui-react-components"; - -function DocumentsPreview({ documents, svgStyles = {}, isSendBackFlow = false, isHrLine = false, titleStyles }) { - const { t } = useTranslation(); - const isStakeholderApplication = window.location.href.includes("stakeholder"); - - return ( -
- {!isStakeholderApplication && documents?.map((document, index) => ( - - {document?.title ? {t(document?.title)} : null} -
- {document?.values && document?.values.length > 0 ? document?.values?.map((value, index) => ( - -
- -
-

{t(value?.title)}

- {isSendBackFlow ? value?.documentType?.includes("NOC") ?

{t(value?.documentType.split(".")[1])}

:

{t(value?.documentType)}

: ""} -
- )) : !(window.location.href.includes("citizen")) &&

{t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")}

} -
- {isHrLine && documents?.length != index + 1 ?
: null} -
- ))} - {isStakeholderApplication && documents?.map((document, index) => ( - - {document?.title ? {t(document?.title)} : null} -
- {document?.values && document?.values.length > 0 ? document?.values?.map((value, index) => ( - -
-

{t(value?.title)}

- {value?.docInfo ?
{`${t(value?.docInfo)}`}
: null} - -

{`${t(value?.title)}`}

-
-
- )) : !(window.location.href.includes("citizen")) &&

{t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")}

} -
-
- ))} -
- ); -} - -export default DocumentsPreview; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InfoDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InfoDetails.js deleted file mode 100644 index 12e2f64fac6..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InfoDetails.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react"; -import { InfoBannerIcon } from "@egovernments/digit-ui-react-components"; - -const EyeSvgINdex = ({ style }) => { - return - - - - - -} -const InfoDetails = ({ t, userType = false, infoBannerLabel = "", infoClickLable = "", infoClickInfoLabel = "", infoClickInfoLabel1 = "" }) => { - userType = userType || Digit.SessionStorage.get("userType"); - return ( - -
-
-
- -

{t(infoBannerLabel)}

-
- {`${t(infoClickLable)} `} - - {` ${t(infoClickInfoLabel)}`} -
- {` ${t(infoClickInfoLabel1)}`} -
-
-
-
- ); -}; - -export default InfoDetails; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InspectionReport.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InspectionReport.js deleted file mode 100644 index a824b05a435..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InspectionReport.js +++ /dev/null @@ -1,49 +0,0 @@ -import { StatusTable, Row, CardHeader, CardSectionHeader } from "@egovernments/digit-ui-react-components"; -import React from "react"; -import { useTranslation } from "react-i18next"; -import DocumentsPreview from "./DocumentsPreview"; - -const getDocuments = (fiDocuments) => { - const returnDocuments = [{ - title: "BPA_DOCUMENT_DETAILS_LABEL", - values: fiDocuments?.map(doc => ({ - title: doc?.documentType?.replaceAll('.', '_'), - documentType: doc?.documentType, - documentUid: doc?.documentUid, - fileStoreId: doc?.fileStoreId, - id: doc?.id, - url: doc?.url - })) - }]; - return returnDocuments; -}; - -function InspectionReport({ fiReport, isCitizen=false }) { - const { t } = useTranslation(); - - return ( - -
- {isCitizen?{`${t(`BPA_FI_REPORT`)}`}: - {`${t(`BPA_FI_REPORT`)}`}} - {fiReport.map((fiData, index) => -
- - {fiReport?.length == 1 ? `${t(`BPA_FI_REPORT`)}` : `${t(`BPA_FI_REPORT`)} - ${index + 1}`} - - - {fiData?.questions?.length && - fiData?.questions?.map((qstn) => -
- - -
)} - -
-
)} -
-
- ); -} - -export default InspectionReport; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/NOCDocuments.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/NOCDocuments.js deleted file mode 100644 index 1581744f756..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/NOCDocuments.js +++ /dev/null @@ -1,202 +0,0 @@ -import React, { useEffect, useState } from "react"; -import { - CardLabel, - MultiUploadWrapper, - StatusTable, - Row, - LabelFieldPair -} from "@egovernments/digit-ui-react-components"; -import DocumentsPreview from "./DocumentsPreview"; - -function SelectDocument({ - t, - document: doc, - setNocDocuments, - setError, - nocDocuments -}) { - const filteredDocument = nocDocuments?.filter((item) => item?.documentType?.includes(doc?.code))[0]; - const tenantId = Digit.ULBService.getStateId(); - const [selectedDocument, setSelectedDocument] = useState(); - const [file, setFile] = useState(null); - const [uploadedFile, setUploadedFile] = useState(() => filteredDocument?.fileStoreId || null); - const handleSelectDocument = (value) => setSelectedDocument(value); - const allowedFileTypes = /(.*?)(jpg|jpeg|png|image|pdf)$/i; - - function selectfile(e) { - e && setFile(e.file); - } - - useEffect(() => { - if (doc?.dropdownData?.[0]?.code) { - setNocDocuments((prev) => { - const filteredDocumentsByDocumentType = prev?.filter((item) => item?.documentType !== doc?.dropdownData?.[0]?.code); - - if (uploadedFile?.length === 0 || uploadedFile === null) { - return filteredDocumentsByDocumentType; - } - - const filteredDocumentsByFileStoreId = filteredDocumentsByDocumentType?.filter((item) => item?.fileStoreId !== uploadedFile); - return [ - ...filteredDocumentsByFileStoreId, - { - documentType: doc?.dropdownData?.[0].code, - fileStoreId: uploadedFile, - documentUid: uploadedFile, - fileName: file?.name || "", - }, - ]; - }); - } - }, [uploadedFile]); - - - useEffect(() => { - (async () => { - setError(null); - if (file) { - const allowedFileTypesRegex = /(.*?)(jpg|jpeg|png|image|pdf)$/i - if (file.size >= 5242880) { - setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); - } else if (file?.type && !allowedFileTypesRegex.test(file?.type)) { - setError(t(`NOT_SUPPORTED_FILE_TYPE`)) - } else { - try { - setUploadedFile(null); - const response = await Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId()); - if (response?.data?.files?.length > 0) { - setUploadedFile(response?.data?.files[0]?.fileStoreId); - } else { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } catch (err) { - setError(t("CS_FILE_UPLOAD_ERROR")); - } - } - } - })(); - }, [file]); - - const getData =(state) => { - let data = Object.fromEntries(state); - let newArr = Object.values(data); - selectfile(newArr[newArr.length-1]); - } - - return ( -
- - {doc?.required ? `${t("TL_BUTTON_UPLOAD FILE")}*` : `${t("TL_BUTTON_UPLOAD FILE")}`} -
- getData(e)} - t={t} - allowedFileTypesRegex={allowedFileTypes} - allowedMaxSizeInMB={5} - acceptFiles="image/*, .pdf, .png, .jpeg, .jpg" - /> -
-
-
- ); -} -const NOCDocuments = ({ t, noc, docs, isNoc, applicationData,NOCdata, bpaActionsDetails }) => { - const tenantId = Digit.ULBService.getStateId(); - const stateId = Digit.ULBService.getStateId(); - const bpaApplicationStatus = applicationData?.status || ""; - const actions = bpaActionsDetails?.data?.nextActions || []; - const { isLoading: nocDocsLoading, data: nocDocs } = Digit.Hooks.obps.useMDMS(stateId, "NOC", ["DocumentTypeMapping"], { enabled: isNoc }); - const { isLoading: bpaDocsLoading, data: bpaDocs } = Digit.Hooks.obps.useMDMS(stateId, "BPA", ["DocTypeMapping"], { enabled: !isNoc }); - const { isLoading: commonDocsLoading, data: commonDocs } = Digit.Hooks.obps.useMDMS(stateId, "common-masters", ["DocumentType"]); - const [commonDocMaping, setCommonDocMaping] = useState([]); - const [nocTaxDocuments, setNocTaxDocuments] = useState([]); - const [checkEnablingDocs, setCheckEnablingDocs] = useState(false); - const [nocDocuments, setNocDocuments] = Digit.Hooks.useSessionStorage(noc?.nocType, []); - const [error, setError] = useState(null); - const isEmployee = window.location.href.includes("/employee/") - - useEffect(() => { - setCommonDocMaping(commonDocs?.["common-masters"]?.DocumentType); - }, [commonDocs]); - - useEffect(() => { - let documents = []; - let filteredData - if (isNoc) { - filteredData = nocDocs?.NOC?.DocumentTypeMapping?.filter((data => { - return data?.applicationType === noc?.applicationType && data?.nocType === noc?.nocType - })); - } - else { - filteredData = bpaDocs?.BPA?.DocTypeMapping?.filter(data => (data.WFState == applicationData?.status && data.RiskType == applicationData?.riskType && data.ServiceType == applicationData?.additionalDetails?.serviceType && data.applicationType == applicationData?.additionalDetails?.applicationType)) - } - if (filteredData?.[0]?.docTypes?.[0]) { - filteredData[0].docTypes[0].nocType = filteredData[0].nocType; - filteredData[0].docTypes[0].additionalDetails = { - submissionDetails: noc?.additionalDetails, - applicationStatus: noc?.applicationStatus, - appNumberLink: noc?.applicationNo, - nocNo: noc?.nocNo - } - documents.push(filteredData[0].docTypes[0]); - } - let documentsList = []; - if (documents && documents.length > 0) { - documents.map((doc) => { - let code = doc.documentType; - let nocType = doc.nocType; - doc.dropdownData = []; - commonDocMaping?.forEach((value) => { - let values = value.code.slice(0, code?.length); - if (code === values) { - doc.hasDropdown = true; - doc.dropdownData.push(value); - } - }); - documentsList.push(doc); - }); - setNocTaxDocuments(documentsList); - } - }, [nocDocs, commonDocMaping]); - - useEffect(() => { - if (bpaApplicationStatus === 'NOC_VERIFICATION_INPROGRESS' && actions?.length > 0) setCheckEnablingDocs(true); - else setCheckEnablingDocs(false); - }, [applicationData, bpaActionsDetails]) - - return ( -
- - - {NOCdata && NOCdata.map((noc,index) => { - if (noc?.value) { - if (noc?.field == "STATUS") { - return - } else { - return - } - } - })} - - - {checkEnablingDocs && nocTaxDocuments?.map((document, index) => { - return ( - - ); - })} -
- ); -} - -export default NOCDocuments; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PermissionCheck.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PermissionCheck.js deleted file mode 100644 index 89007789722..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PermissionCheck.js +++ /dev/null @@ -1,87 +0,0 @@ -import { CheckBox, LinkButton, TextInput,Close, CardSubHeader } from "@egovernments/digit-ui-react-components"; -import React, { useEffect, useState } from "react"; - -const PermissionCheck = ({ permissions, t }) => { - const [approvalChecks, setApprovalChecks, clearApprovals] = Digit.Hooks.useSessionStorage("OBPS_APPROVAL_CHECKS", permissions?.map(permission => ({ label: permission, checked: false }))); //useState(() => permissions?.map(permission => ({ label: permission, checked: false }))) - const [newApprovals, setNewApprovals, clearNewApprovals] = Digit.Hooks.useSessionStorage('OBPS_NEW_APPROVALS', []); - - useEffect(() => { - return () => { - Digit.SessionStorage.del("OBPS_NEW_APPROVALS"); - Digit.SessionStorage.del("OBPS_APPROVAL_CHECKS"); - } - }, []) - - const handleAdd = () => { - setNewApprovals([...newApprovals, { label: '' }]); - } - - const handleRemove = (index) => { - const values = [...newApprovals]; - values.splice(index, 1); - setNewApprovals([...values]); - } - - const handleChange = (event, index) => { - setNewApprovals(() => { - return newApprovals?.map((approval, id) => { - if (index === id) { - return { - label: event?.target?.value, - } - } - return approval; - }) - }) - } - - const handleCheck = (event, label, index) => { - const isChecked = event.target.checked; - setApprovalChecks(() => { - return approvalChecks?.map((approval, id) => { - if (index === id) { - return { - ...approval, - checked: isChecked - } - } - return approval; - }) - }) - } - - return ( -
- {t("BPA_PERMIT_CONDITIONS")} - {approvalChecks?.map((permission, index) => ( - handleCheck(event, permission?.label, index))} - isLabelFirst={true} - index={index} - /> - ))} - {newApprovals?.map((approval, index) => ( -
handleChange(event, index)} textInputStyle={{maxWidth: "830px", width: "830px"}} placeholder={"Enter permit conditions.........."} /> - { - - - -
- } - style={{ }} - onClick={(e) => handleRemove(index)} - />} -
- ))} - -
- ) -} - -export default PermissionCheck; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyDocuments.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyDocuments.js deleted file mode 100644 index ea8cd1eb104..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyDocuments.js +++ /dev/null @@ -1,83 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { useTranslation } from "react-i18next"; -import { CardSubHeader, PDFSvg } from "@egovernments/digit-ui-react-components"; - -// const PDFSvg = ({ width = 34, height = 34, style, viewBox = "0 0 34 34" }) => ( -// -// -// -// ); - -function PropertyDocuments({ documents, svgStyles = {}, isSendBackFlow=false }) { - const { t } = useTranslation(); - const [filesArray, setFilesArray] = useState(() => [] ); - const tenantId = Digit.ULBService.getCurrentTenantId(); - const [pdfFiles, setPdfFiles] = useState({}); - - useEffect(() => { - let acc = []; - documents?.forEach((element, index, array) => { - acc = [...acc, ...(element.values?element.values:[])]; - }); - setFilesArray(acc?.map((value) => value?.fileStoreId)); - }, [documents]); - - useEffect(() => { - if (filesArray?.length && documents?.[0]?.BS === "BillAmend") { - Digit.UploadServices.Filefetch(filesArray, Digit.ULBService.getCurrentTenantId()).then((res) => { - setPdfFiles(res?.data); - }); - } - else if(filesArray?.length) - { - Digit.UploadServices.Filefetch(filesArray, Digit.ULBService.getStateId()).then((res) => { - setPdfFiles(res?.data); - }); - } - - }, [filesArray]); - - const checkLocation = window.location.href.includes("employee/tl") || window.location.href.includes("/obps") || window.location.href.includes("employee/ws"); - const isStakeholderApplication = window.location.href.includes("stakeholder"); - - return ( -
- {!isStakeholderApplication && documents?.map((document, index) => ( - - {document?.title ? {t(document?.title)}: null} -
- {document?.values && document?.values.length>0 ? document?.values?.map((value, index) => ( - -
- -
-

{t(value?.title)}

- {isSendBackFlow? value?.documentType?.includes("NOC")?

{t(value?.documentType.split(".")[1])}

:

{t(value?.documentType)}

:""} -
- )):!(window.location.href.includes("citizen"))&&

{t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")}

} -
-
- ))} - {isStakeholderApplication && documents?.map((document, index) => ( - - {document?.title ? {t(document?.title)} : null} -
- {document?.values && document?.values.length>0 ? document?.values?.map((value, index) => ( - -
-

{t(value?.title)}

- {value?.docInfo ?
{`${t(value?.docInfo)}`}
: null} - - {/*
{decodeURIComponent(pdfFiles[value.fileStoreId]?.split(",")[0].split("?")[0].split("/").pop().slice(13))}
*/} -

{`${t(value?.title)}`}

-
-
- )):!(window.location.href.includes("citizen"))&&

{t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")}

} -
-
- ))} -
- ); -} - -export default PropertyDocuments; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyEstimates.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyEstimates.js deleted file mode 100644 index c4cde76709f..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyEstimates.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from "react"; -import { useTranslation } from "react-i18next"; -import { StatusTable, Row, BreakLine } from "@egovernments/digit-ui-react-components"; - -function PropertyEstimates({ taxHeadEstimatesCalculation }) { - const { taxHeadEstimates } = taxHeadEstimatesCalculation; - const { t } = useTranslation(); - - return ( -
- - - - {taxHeadEstimates?.map((estimate, index) => { - return ( - - ); - })} - - - -
- ); -} - -export default PropertyEstimates; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyFloors.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyFloors.js deleted file mode 100644 index 4f33bbdcff4..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyFloors.js +++ /dev/null @@ -1,49 +0,0 @@ -import React from "react"; -import { useTranslation } from "react-i18next"; -import { CardSubHeader, StatusTable, Row, CardSectionHeader } from "@egovernments/digit-ui-react-components"; - -function PropertyFloors({ floors }) { - const { t } = useTranslation(); - - return ( - - {floors.map((floor) => ( -
- {t(floor?.title)} - {floor?.values?.map((value, index) => { - return ( - - - {t(value.title)} - - -
- {value?.values?.map((value, index) => { - if (value.map === true && value.value !== "N/A") { - return } />; - } - return ( - - ); - })} -
-
-
- ); - })} -
- ))} -
- ); -} - -export default PropertyFloors; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyOwners.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyOwners.js deleted file mode 100644 index dac9f41c79b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyOwners.js +++ /dev/null @@ -1,94 +0,0 @@ -import { CardSubHeader, Row, StatusTable } from "@egovernments/digit-ui-react-components"; -import React from "react"; -import { useTranslation } from "react-i18next"; - -function PropertyOwners({ owners }) { - const { t } = useTranslation(); - - const checkLocation = true; - const checkOwnerLength = owners?.length || 1; - let cardStyles = { marginTop: "19px" }; - let statusTableStyles = { position: "relative", padding: "8px" }; - let rowContainerStyle = { justifyContent: "space-between", fontSize: "16px", lineHeight: "19px", color: "#0B0C0C" }; - if (checkLocation && Number(checkOwnerLength) > 1) { - cardStyles = { - marginTop: "19px", - background: "#FAFAFA", - border: "1px solid #D6D5D4", - borderRadius: "4px", - padding: "8px", - lineHeight: "19px", - maxWidth: "600px", - minWidth: "280px", - }; - } else if (checkLocation && !(Number(checkOwnerLength) > 1)) { - cardStyles = { marginTop: "19px", lineHeight: "19px", maxWidth: "600px", minWidth: "280px" }; - statusTableStyles = { position: "relative", marginTop: "19px" }; - } - - if (window.location.href.includes("obps")) { - cardStyles = { ...cardStyles, maxWidth: "950px" }; - cardStyles = { ...cardStyles, maxWidth: "950px" }; - rowContainerStyle = {}; - } - - return ( - - {owners.map((owner, index) => ( -
- {/* TODO, Later will move to classes */} - 1 - ? { marginBottom: "8px", paddingBottom: "9px", color: "#0B0C0C", fontSize: "16px", lineHeight: "19px" } - : { marginBottom: "8px", color: "#505A5F", fontSize: "24px" } - } - > - {checkLocation && Number(checkOwnerLength) > 1 ? `${t(owner?.title)} ${index + 1}` : t(owner?.title)} - - - -
- {owner?.values?.map((value, index) => { - if (value.map === true && value.value !== "N/A") { - return } />; - } - return ( - - - - ); - })} -
-
-
- ))} -
- ); -} - -export default PropertyOwners; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/Reason.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/Reason.js deleted file mode 100644 index 0f226935c5b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/Reason.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from "react"; - -const Reason = ({ headComment, otherComment }) => ( -
-

{headComment}

-

{otherComment}

-
-); - -export default Reason; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ScruntinyDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ScruntinyDetails.js deleted file mode 100644 index bde27623ba8..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ScruntinyDetails.js +++ /dev/null @@ -1,46 +0,0 @@ -import { StatusTable, Row, PDFSvg, CardLabel, CardSubHeader } from "@egovernments/digit-ui-react-components"; -import React, { Fragment } from "react"; -import { useTranslation } from "react-i18next"; - -const ScruntinyDetails = ({ scrutinyDetails, paymentsList=[] }) => { - const { t } = useTranslation(); - let count = 0; - const getTextValues = (data) => { - if (data?.value && data?.isTransLate) return {t(data?.value)}; - else if (data?.value && data?.isTransLate) return t(data?.value); - else if (data?.value) return data?.value; - else t("NA"); - } - return ( - - {!scrutinyDetails?.isChecklist &&
- -
- {scrutinyDetails?.values?.map((value, index) => { - if (value?.isUnit) return - else if (value?.isHeader && !value?.isUnit) return {t(value?.title)} - else if (value?.isSubTitle && !value?.isUnit) return {t(value?.title)} - else return - })} - {scrutinyDetails?.permit?.map((value,ind) => { - return {value?.title} - })} -
-
- {scrutinyDetails?.scruntinyDetails?.map((report, index) => { - return ( - - - -

{t(report?.text)}

-
- ) - })} -
-
-
} -
- ) -} - -export default ScruntinyDetails; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubOccupancyTable.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubOccupancyTable.js deleted file mode 100644 index e266bed6be2..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubOccupancyTable.js +++ /dev/null @@ -1,126 +0,0 @@ -import React, { Fragment, useMemo } from "react"; -import { Table, StatusTable, Row, CardSubHeader, CardSectionHeader } from "@egovernments/digit-ui-react-components"; -import { useTranslation } from "react-i18next"; - -const SubOccupancyTable = ({ edcrDetails, applicationData }) => { - const { t } = useTranslation(); - const isMobile = window.Digit.Utils.browser.isMobile(); - - const tableHeader = [ - { - name: "BPA_TABLE_COL_FLOOR", - id: "Floor", - }, - { - name: "BPA_TABLE_COL_LEVEL", - id: "Level", - }, - { - name: "BPA_TABLE_COL_OCCUPANCY", - id: "Occupancy", - }, - { - name: "BPA_TABLE_COL_BUILDUPAREA", - id: "BuildupArea", - }, - { - name: "BPA_TABLE_COL_FLOORAREA", - id: "FloorArea", - }, - { - name: "BPA_TABLE_COL_CARPETAREA", - id: "CarpetArea", - } - ] - - const accessData = (plot) => { - const name = plot; - return (originalRow, rowIndex, columns) => { - return originalRow[name]; - } - } - - - const tableColumns = useMemo( - () => { - return tableHeader.map((ob) => ({ - Header: t(`${ob.name}`), - accessor: accessData(ob.id), - id: ob.id - })); - }); - - function getFloorData(block) { - let floors = []; - block?.building?.floors.map((ob) => { - floors.push({ - Floor: t(`BPA_FLOOR_NAME_${ob.number}`), - Level: ob.number, - Occupancy: t(`${ob.occupancies?.[0]?.type}`), - BuildupArea: ob.occupancies?.[0]?.builtUpArea, - FloorArea: ob.occupancies?.[0]?.floorArea || 0, - CarpetArea: ob.occupancies?.[0]?.CarpetArea || 0, - key: t(`BPA_FLOOR_NAME_${ob.number}`), - }); - }); - return floors; - } - - const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => { - if (searcher == "") return str; - while (str.includes(searcher)) { - str = str.replace(searcher, replaceWith); - } - return str; - }; - - function getSubOccupancyValues(index) { - let values = applicationData?.landInfo?.unit; - let returnValue = ""; - if (values?.length > 0) { - let splitArray = values[index]?.usageCategory?.split(','); - if (splitArray?.length) { - const returnValueArray = splitArray.map(data => data ? `${t(`BPA_SUBOCCUPANCYTYPE_${stringReplaceAll(data?.toUpperCase(), "-", "_")}`)}` : "NA"); - returnValue = returnValueArray.join(', ') - } - } - return returnValue ? returnValue : "NA"; - } - - return ( - -
- - {edcrDetails?.values?.map((value, index) => { - if (value?.isHeader) return {t(value?.title)} - else return - })} - - - {edcrDetails?.subOccupancyTableDetails?.[0]?.value?.planDetail?.blocks.map((block, index) => ( -
0 ? {marginBottom: "30px", background: "#FAFAFA", border: "1px solid #D6D5D4", padding: "8px", borderRadius: "4px", maxWidth: "950px", minWidth: "280px"} : {marginBottom: "30px"}}> - {t("BPA_BLOCK_SUBHEADER")} {index + 1} - - - -
- { return { style: {} } }} - /> - - ))} - - - ) -} - -export default SubOccupancyTable; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubWorkTableDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubWorkTableDetails.js deleted file mode 100644 index 08b89e68419..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubWorkTableDetails.js +++ /dev/null @@ -1,77 +0,0 @@ -import { EditIcon } from '@egovernments/digit-ui-react-components'; -import React from 'react' -import { useTranslation } from "react-i18next"; -import { useHistory } from 'react-router-dom'; - -const SubWorkTableDetails = ({data}) => { - const { t } = useTranslation(); - const history = useHistory(); - const getStyles = (index) => { - let obj = {} - switch (index) { - case 1: - obj = { "width": "1vw" } - break; - case 2: - obj = { "width": "60vw" } - break; - case 3: - obj = { "width": "20vw" } - break; - case 4: - obj = { "width": "10vw" } - break; - default: - obj = { "width": "1vw" } - break; - } - return obj - } - const renderHeader = (headers) => { - return headers?.map((key, index) => { - return - }) - } - - const renderBody = (rows) => { - return rows?.map((row, index) => { - return - - - {row[1] === t("WORKS_TOTAL_AMT") - ? - : } - {row[3] && } - {/* */} - - }) - } - - return ( -
{t(key)}
{row[0]} { row[1] === t("WORKS_TOTAL_AMT") ?
{row[1]}
:
{row[1]}
}
{row[2]}
{row[2]}
-
history.push( - { - pathname: `/digit-ui/employee/contracts/create-contract?estimateNumber=${data?.state?.estimateNumber}&task=${data?.state?.estimateDetails[index]?.name}&subEstimate=${data?.state?.estimateDetails[index]?.estimateDetailNumber}`, - state:{index, data} - } - )}> - {row[3]} -
-
{showDelete() && removeRow(row)}>}
- - {renderHeader(data?.headers)} - - - {renderBody(data?.tableRows)} - {/* - - - - - */} - -
- ) -} - -export default SubWorkTableDetails \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLCaption.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLCaption.js deleted file mode 100644 index e5fbcde20cd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLCaption.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react"; -import { useTranslation } from "react-i18next"; -import { TelePhone, DisplayPhotos, UnMaskComponent } from "@egovernments/digit-ui-react-components"; -import Reason from "./Reason"; - -const TLCaption = ({ data,OpenImage,privacy={}}) => { - - const { t } = useTranslation(); - return ( -
- {data.date &&

{data.date}

} -

{data.name}

- {data.mobileNumber && - -

    

- -
} - {data.source &&

{t("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_" + data.source.toUpperCase())}

} - {data.comment && } - {data?.wfComment ?
{data?.wfComment?.map( e => -
-

{t("WF_COMMON_COMMENTS")}

-

{e}

-
- )}
: null} - {data?.thumbnailsToShow?.thumbs?.length > 0 ?
-

{t("CS_COMMON_ATTACHMENTS")}

- {OpenImage(src, index,data?.thumbnailsToShow)}} /> -
: null} -
- ); -}; - -export default TLCaption; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeAccessories.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeAccessories.js deleted file mode 100644 index 536a2ce3eca..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeAccessories.js +++ /dev/null @@ -1,52 +0,0 @@ - -import React from "react"; -import { useTranslation } from "react-i18next"; -import { CardSubHeader, StatusTable, Row, CardSectionHeader } from "@egovernments/digit-ui-react-components"; - -function TLTradeAccessories({ units }) { - const { t } = useTranslation(); - return ( - - {units.map((unit, index) => ( - // TODO, Later will move to classes -
- {`${t(unit?.title)} ${index + 1}`} - - -
- {unit?.values?.map((value, index) => { - if (value.map === true && value.value !== "N/A") { - return } />; - } - return ( - - ); - })} -
-
-
- ))} -
- ); -} - -export default TLTradeAccessories; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeUnits.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeUnits.js deleted file mode 100644 index bf1c1fbc780..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeUnits.js +++ /dev/null @@ -1,51 +0,0 @@ -import React from "react"; -import { useTranslation } from "react-i18next"; -import { CardSubHeader, StatusTable, Row, CardSectionHeader } from "@egovernments/digit-ui-react-components"; - -function TLTradeUnits({ units }) { - const { t } = useTranslation(); - return ( - - {units.map((unit, index) => ( - // TODO, Later will move to classes -
- {`${t(unit?.title)} ${index + 1}`} - - -
- {unit?.values?.map((value, index) => { - if (value.map === true && value.value !== "N/A") { - return } />; - } - return ( - - ); - })} -
-
-
- ))} -
- ); -} - -export default TLTradeUnits; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ViewBreakup.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ViewBreakup.js deleted file mode 100644 index 5608aeb2d2a..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ViewBreakup.js +++ /dev/null @@ -1,73 +0,0 @@ -import React, { useState, Fragment } from "react"; -import { useTranslation } from "react-i18next"; -import { CardSectionHeader, Modal, Row, StatusTable } from "@egovernments/digit-ui-react-components"; - -const ViewBreakup = ({ wsAdditionalDetails, workflowDetails }) => { - const { t } = useTranslation(); - const [popup, showPopUp] = useState(false); - const [breakUpData, setBreakUpData] = useState({}); - - const Heading = (props) => { - return

{props.label}

; - }; - - const Close = () => ( - - - - - ); - - const CloseBtn = (props) => { - return ( -
- -
- ); - }; - - const onPopupOpen = () => { - let breakupData = wsAdditionalDetails.additionalDetails.data || {}; - const sessionBillData = sessionStorage.getItem("Digit.ADHOC_BILL_ADD_REBATE_DATA"); - const sessionBillFormData = sessionBillData ? JSON.parse(sessionBillData) : {}; - if (sessionBillFormData?.value?.totalAmount) breakupData = sessionBillFormData?.value; - setBreakUpData(breakupData); - showPopUp(true); - } - - return ( - -
- {wsAdditionalDetails?.additionalDetails?.isViewBreakup ?
onPopupOpen()} style={{ marginTop: "12px" }}> - {t("WS_PAYMENT_VIEW_BREAKUP")} -
: null - } - {popup && - } - headerBarEnd={ { showPopUp(false); }} />} - hideSubmit={true} - popupStyles={{ overflowY: "auto" }} //maxHeight: "calc(100% - 90px)" - headerBarMainStyle={{ marginBottom: "0px" }} - popupModuleMianStyles={{ paddingTop: "0px" }} - > - { - {t("WS_APPLICATION_FEE_HEADER")} - {breakUpData?.billSlabData?.FEE?.map(data => ₹{Number(data?.amount) || 0}} textStyle={{ textAlign: "right" }} />)} -
- ₹{Number(breakUpData?.fee) || 0}} textStyle={{ textAlign: "right", fontWeight: "700", fontSize: "24px" }} /> - {t("WS_SERVICE_FEE_HEADER")} - {breakUpData?.billSlabData?.CHARGES?.map(data => ₹{Number(data?.amount) || 0}} textStyle={{ textAlign: "right" }} />)} -
- ₹{Number(breakUpData?.charge) || 0}} textStyle={{ textAlign: "right", fontWeight: "700", fontSize: "24px" }} /> - {breakUpData?.billSlabData?.TAX?.map(data => ₹{Number(data?.amount) || 0}} textStyle={{ textAlign: "right" }} />)} -
- ₹{Number(breakUpData?.totalAmount) || 0}} textStyle={{ textAlign: "right", fontWeight: "700", fontSize: "24px" }} /> -
} -
} -
-
- ) -} - -export default ViewBreakup; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSAdditonalDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSAdditonalDetails.js deleted file mode 100644 index 06814062d96..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSAdditonalDetails.js +++ /dev/null @@ -1,399 +0,0 @@ -import { StatusTable, Row, CardSubHeader } from "@egovernments/digit-ui-react-components"; -import React, { Fragment } from "react"; -import { useTranslation } from "react-i18next"; -import { getQueryStringParams } from "../../../ws/src/utils"; - -const cardSubHeaderStyles = () => { - // return { fontSize: "24px", padding: "0px", margin: "0px", color: "#505A5F" }; - return { fontSize: "24px", marginBottom: "16px", marginTop: "32px" }; -}; - -const cardDivStyles = () => { - return { - border: "1px solid #D6D5D4", - background: "#FAFAFA", - borderRadius: "4px", - padding: "10px 10px 0px 10px", - marginBottom: "10px", - display: "flex", - }; -}; - -const convertEpochToDate = (dateEpoch) => { - if (dateEpoch) { - const dateFromApi = new Date(dateEpoch); - let month = dateFromApi.getMonth() + 1; - let day = dateFromApi.getDate(); - let year = dateFromApi.getFullYear(); - month = (month > 9 ? "" : "0") + month; - day = (day > 9 ? "" : "0") + day; - return `${day}/${month}/${year}`; - } else { - return null; - } -}; - -const WSAdditonalDetails = ({ wsAdditionalDetails, oldValue }) => { - const { t } = useTranslation(); - let filters = getQueryStringParams(location.search); - const serviceType = filters?.service; - const isModify = filters?.mode; - - const oldValueData = oldValue?.[1]; - - const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => { - if (searcher == "") return str; - while (str.includes(searcher)) { - str = str.replace(searcher, replaceWith); - } - return str; - }; - - const renderSWConnectionDetails = () => { - return ( -
- {oldValueData?.connectionType ? ( - - ) : ( -
{"NA"}
- )} - - {oldValueData?.noOfWaterClosets ? ( - - ) : ( -
{"NA"}
- )} - {oldValueData?.noOfToilets ? ( - - ) : ( -
{"NA"}
- )} -
- ); - }; - - const renderWSConnectionDetails = () => { - return ( -
- {oldValueData?.connectionType && ( )} - {oldValueData?.noOfTaps && ( )} - {oldValueData?.waterSource && ( )} - {oldValueData?.pipeSize && ( )} - {oldValueData?.waterSource && ( )} -
- ); - }; - - const renderSWPlumberDetails = () => { - return ( -
- {oldValueData?.additionalDetails?.detailsProvidedBy !== wsAdditionalDetails?.additionalDetails?.plumberDetails[0]?.value && - oldValueData?.additionalDetails?.detailsProvidedBy !== null ? ( - - ) : ( -
{"NA"}
- )} - {oldValueData?.plumberInfo ? ( - - ) : ( -
{"NA"}
- )} - {oldValueData?.plumberInfo ? ( - - ) : ( -
{"NA"}
- )} - {oldValueData?.plumberInfo ? ( - - ) : ( -
{"NA"}
- )} -
- ); - }; - - const renderWSPlumberDetails = () => { - return ( -
- {oldValueData?.additionalDetails?.detailsProvidedBy !== wsAdditionalDetails?.additionalDetails?.plumberDetails[0]?.value ? ( - - ) : ( -
{"NA"}
- )} -
- ); - }; - - const renderSWRoadCuttingDetails = () => { - { - oldValueData?.roadCuttingInfo?.map((info) => { - return ( -
- - -
- ); - }); - } - }; - - const renderSWActivationDetails = () => { - return ( -
- {oldValueData?.connectionExecutionDate ? ( - - ) : ( -
{"NA"}
- )} -
- ); - }; - - const renderWSActivationDetails = () => { - return ( -
- {oldValueData?.meterId && ( )} - {oldValueData?.additionalDetails?.initialMeterReading && ( )} - {oldValueData?.meterInstallationDate && ( )} - {oldValueData?.connectionExecutionDate && ( )} -
- ); - }; - - var { connectionDetails, plumberDetails, roadCuttingDetails, activationDetails } = wsAdditionalDetails?.additionalDetails || {connectionDetails:[], plumberDetails: []}; - - // binding old values with new values - if(isModify === "MODIFY"){ - - connectionDetails = connectionDetails?.map((value) => { - if(value.title == "WS_SERV_DETAIL_CONN_TYPE" && oldValueData?.connectionType) value["oldValue"] = [ - { value:value?.value, className:"newValue", style:{ display:"inline"} }, - { - value:`${t("WS_OLD_LABEL_NAME")} ${oldValueData?.connectionType}`, - className:"oldValue", style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"} - }]; - if(value.title == "WS_SERV_DETAIL_NO_OF_TAPS" && oldValueData?.noOfTaps) value["oldValue"] = [ - {value:value?.value,className:"newValue", style:{ display:"inline"}}, - {value:`${t("WS_OLD_LABEL_NAME")} ${oldValueData?.noOfTaps}`, style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"},className:"oldValue"} - ]; - if(value.title == "WS_SERV_DETAIL_WATER_SOURCE" && oldValueData?.waterSource) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${t(oldValueData?.waterSource?.toUpperCase()?.split(".")[0])}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_PIPE_SIZE_IN_INCHES_LABEL" && oldValueData?.pipeSize) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.pipeSize}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_SERV_DETAIL_WATER_SUB_SOURCE" && oldValueData?.waterSource) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${t(oldValueData?.waterSource?.toUpperCase()?.split(".")[1])}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_NUMBER_WATER_CLOSETS_LABEL" && oldValueData?.noOfWaterClosets) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.noOfWaterClosets}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_SERV_DETAIL_NO_OF_TOILETS" && oldValueData?.noOfWaterClosets) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.noOfWaterClosets}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - - return value; - }) - - plumberDetails = plumberDetails?.map((value) => { - if(value.title == "WS_ADDN_DETAILS_PLUMBER_PROVIDED_BY" && oldValueData?.additionalDetails?.detailsProvidedBy && oldValueData?.additionalDetails?.detailsProvidedBy !== value.value ) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.additionalDetails?.detailsProvidedBy}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_ADDN_DETAILS_PLUMBER_LICENCE_NO_LABEL" && oldValueData?.plumberInfo[0]?.licenseNo ) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.plumberInfo[0]?.licenseNo}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_ADDN_DETAILS_PLUMBER_NAME_LABEL" && oldValueData?.plumberInfo[0]?.name ) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.plumberInfo[0]?.name}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_PLUMBER_MOBILE_NO_LABEL" && oldValueData?.plumberInfo[0]?.mobileNumber ) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.plumberInfo[0]?.mobileNumber}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - return value; - }) - - roadCuttingDetails = roadCuttingDetails?.map((roadDetail) => { - const roadDetailValues = roadDetail?.values?.map((value) => { - if(value.title == "WS_ADDN_DETAIL_ROAD_TYPE" && oldValueData?.roadCuttingInfo[0]?.roadType) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.roadCuttingInfo[0]?.roadType}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_ROAD_CUTTING_AREA_LABEL" && oldValueData?.roadCuttingInfo[0]?.roadCuttingArea) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.roadCuttingInfo[0]?.roadCuttingArea}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - return value; - }) - return ({...roadDetail,values:roadDetailValues}); - }) - - activationDetails = activationDetails?.map((value) => { - if(value.title == "WS_SERV_DETAIL_CONN_EXECUTION_DATE" && oldValueData?.connectionExecutionDate) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${convertEpochToDate(oldValueData?.connectionExecutionDate)}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - - if(value.title == "WS_SERV_DETAIL_METER_ID" && oldValueData?.meterId) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.meterId}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - - if(value.title == "WS_INITIAL_METER_READING_LABEL" && oldValueData?.initialMeterReading) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${oldValueData?.initialMeterReading}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - - if(value.title == "WS_INSTALLATION_DATE_LABEL" && oldValueData?.meterInstallationDate) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${convertEpochToDate(oldValueData?.meterInstallationDate)}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - if(value.title == "WS_SERV_DETAIL_CONN_EXECUTION_DATE" && oldValueData?.connectionExecutionDate) value["oldValue"] = [ - {value:value?.value, className:"newValue", style:{ display:"inline"}}, - { - value: `${t("WS_OLD_LABEL_NAME")} ${convertEpochToDate(oldValueData?.connectionExecutionDate)}`, - style:{color:'gray', paddingLeft:"10px", display:"inline", fontSize:"13px"}, className:"oldValue" - } - ]; - return value; - }) - }; - - return ( - -
- {wsAdditionalDetails?.additionalDetails?.connectionDetails && ( - - {t("WS_COMMON_CONNECTION_DETAIL")} -
-
- {connectionDetails?.map((value, index) => { - return ( -
- -
- ); - })} -
-
-
- )} - {wsAdditionalDetails?.additionalDetails?.plumberDetails && ( - - {t("WS_COMMON_PLUMBER_DETAILS")} -
-
- - {plumberDetails?.map((value, index) => { - return ; - })} -
-
-
- )} - {wsAdditionalDetails?.additionalDetails?.roadCuttingDetails && ( - - {t("WS_ROAD_CUTTING_DETAILS")} -
-
- {roadCuttingDetails?.map((value) => { - return ( -
1 - ? { - border: "1px solid #D6D5D4", - background: "#FAFAFA", - borderRadius: "4px", - padding: "10px 10px 0px 10px", - margin: "5px 0px", - } - : {} - } - > - {value?.values?.map((roadValue) => ( - - ))} -
- ); - })} -
-
-
- )} - {wsAdditionalDetails?.additionalDetails?.activationDetails && ( - - {t("WS_ACTIVATION_DETAILS")} -
-
- {activationDetails?.map((value, index) => { - return ( - - ); - })} -
-
-
- )} -
-
- ); -}; - -export default WSAdditonalDetails; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSFeeEstimation.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSFeeEstimation.js deleted file mode 100644 index 9a4fe591f9d..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSFeeEstimation.js +++ /dev/null @@ -1,346 +0,0 @@ -import React, { useState, Fragment, useEffect } from "react"; -import { useTranslation } from "react-i18next"; -import { Card, CardSectionHeader, CardLabel } from "@egovernments/digit-ui-react-components"; -import { Modal, Dropdown, Row, StatusTable, TextInput, Toast } from "@egovernments/digit-ui-react-components"; -import cloneDeep from "lodash/cloneDeep"; - -const Penality_menu = [ - { - title: "PT_PENDING_DUES_FROM_EARLIER", - value: "Pending dues from earlier", - }, - { - title: "PT_MISCALCULATION_OF_EARLIER_ASSESSMENT", - value: "Miscalculation of earlier Assessment", - }, - { - title: "PT_ONE_TIME_PENALITY", - value: "One time penality", - }, - { - title: "PT_OTHERS", - value: "Others", - }, -] -const Rebate_menu = [ - { - title: "PT_ADVANCED_PAID_BY_CITIZEN_EARLIER", - value: "Advanced Paid By Citizen Earlier", - }, - { - title: "PT_REBATE_PROVIDED_BY_COMMISSIONER_EO", - value: "Rebate provided by commissioner/EO", - }, - { - title: "PT_ADDITIONAL_AMOUNT_CHARGED_FROM_THE_CITIZEN", - value: "Additional amount charged from the citizen", - }, - { - title: "PT_OTHERS", - value: "Others", - }, -]; - - -const WSFeeEstimation = ({ wsAdditionalDetails, workflowDetails }) => { - const { t } = useTranslation(); - const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA", {}); - const [sessionBillFormData, setSessionBillFormData, clearBillSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_BILL_ADD_REBATE_DATA", {}); - const isPaid = wsAdditionalDetails?.additionalDetails?.isPaid ? true : false; - const [popup, showPopUp] = useState(false); - const [fields, setFields] = useState(sessionFormData ? sessionFormData : {}); - const [showToast, setShowToast] = useState(null); - const [billDetails, setBillDetails] = useState(wsAdditionalDetails.additionalDetails.data ? wsAdditionalDetails.additionalDetails.data : {}); - const [values, setValues] = useState(wsAdditionalDetails.additionalDetails.values ? wsAdditionalDetails.additionalDetails.values : []); - - const stateCode = Digit.ULBService.getStateId(); - const { isMdmsLoading, data: mdmsRes } = Digit.Hooks.ws.useMDMS(stateCode, "BillingService", ["TaxHeadMaster"]); - - useEffect(() => { - const data = { ...wsAdditionalDetails?.additionalDetails?.appDetails?.additionalDetails }; - setSessionFormData(data); - setFields(data); - if (sessionFormData?.billDetails?.length > 0) { - const values = [ - { title: "WS_APPLICATION_FEE_HEADER", value: sessionFormData?.billDetails?.[0]?.fee }, - { title: "WS_SERVICE_FEE_HEADER", value: sessionFormData?.billDetails?.[0]?.charge }, - { title: "WS_TAX_HEADER", value: sessionFormData?.billDetails?.[0]?.taxAmount }, - ]; - setValues(values); - setBillDetails(sessionFormData?.billDetails?.[0]); - } - }, []); - - let validation = {}; - - const Heading = (props) => { - return

{props.label}

; - }; - - const Close = () => ( - - - - - ); - - const CloseBtn = (props) => { - return ( -
- -
- ); - }; - - const closeToast = () => { - setShowToast(false); - }; - - const addAdhocRebatePenality = (e) => { - const adhocAmount = fields?.adhocPenalty ? Number(fields?.adhocPenalty) : 0; - const rebateAmount = fields?.adhocRebate ? Number(fields?.adhocRebate) : 0; - if (adhocAmount || rebateAmount) { - - const totalAmount = wsAdditionalDetails?.additionalDetails?.data?.totalAmount; - const demandId = wsAdditionalDetails?.additionalDetails?.data?.billDetails?.[0]?.demandId; - - if (rebateAmount > totalAmount) { - setShowToast({ isError: false, isWarning: true, key: "error", message: t("ERR_WS_REBATE_GREATER_THAN_AMOUNT") }); - } else { - const applicationNo = wsAdditionalDetails?.additionalDetails?.appDetails?.applicationNo; - const tenantId = wsAdditionalDetails?.additionalDetails?.appDetails?.tenantId; - const appAdditionalDetails = { ...wsAdditionalDetails?.additionalDetails?.appDetails?.additionalDetails, ...fields } - wsAdditionalDetails.additionalDetails.appDetails.additionalDetails = appAdditionalDetails; - - const data = { - CalculationCriteria: - wsAdditionalDetails?.additionalDetails?.appDetails?.service == "WATER" - ? [ - { - applicationNo: applicationNo, - tenantId: tenantId, - waterConnection: wsAdditionalDetails.additionalDetails.appDetails, - }, - ] - : [ - { - applicationNo: applicationNo, - tenantId: tenantId, - sewerageConnection: wsAdditionalDetails.additionalDetails.appDetails, - }, - ], - isconnectionCalculation: false, - }; - - let businessService = wsAdditionalDetails?.additionalDetails?.appDetails?.service == "WATER" ? "WS" : "SW"; - Digit.WSService.wsCalculationEstimate(data, businessService) - .then((result, err) => { - if (result?.Calculation?.[0]?.taxHeadEstimates?.length > 0) { - result?.Calculation?.[0]?.taxHeadEstimates?.forEach(data => data.amount = data.estimateAmount); - } - - result.Calculation[0].billSlabData = _.groupBy(result?.Calculation?.[0]?.taxHeadEstimates, 'category'); - const values = [ - { title: "WS_APPLICATION_FEE_HEADER", value: result.Calculation?.[0]?.fee }, - { title: "WS_SERVICE_FEE_HEADER", value: result.Calculation?.[0]?.charge }, - { title: "WS_TAX_HEADER", value: result.Calculation?.[0]?.taxAmount }, - ]; - setSessionBillFormData(cloneDeep(result.Calculation[0])); - setBillDetails(result?.Calculation?.[0]); - setValues(values); - fields.billDetails = result?.Calculation; - setSessionFormData(fields); - showPopUp(false); - }) - .catch((e) => { - setShowToast({ isError: true, isWarning: false, key: "error", message: e?.response?.data?.Errors[0]?.message ? t(`${e?.response?.data?.Errors[0]?.code}`) : t("PT_COMMON_ADD_REBATE_PENALITY") }); - }); - } - } else { - setShowToast({ isError: false, isWarning: true, key: "warning", message: t("ERR_WS_ENTER_ATLEAST_ONE_FIELD") }); - } - } - - const selectedValuesData = (value, isDropDownValue = false, e) => { - let values = { ...fields }; - if (isDropDownValue) { - values[`${value}_data`] = e; - values[value] = e.title; - if (e.title == "PT_OTHERS" && value == "adhocPenaltyReason") values[`adhocPenaltyComment`] = ""; - if (e.title == "PT_OTHERS" && value == "adhocRebateReason") values[`adhocRebateComment`] = ""; - } else { - values[value] = e.target.value; - } - setFields(values); - } - - return ( - -
- {values && - -
- {values?.map((value, index) => { - return - })} -
-
-
- - -
-
} - { - wsAdditionalDetails?.additionalDetails?.isAdhocRebate ?
{ - showPopUp(true) - }} - > - {t("WS_PAYMENT_ADD_REBATE_PENALTY")} -
: null - } - {popup && - } - headerBarEnd={ - { - setFields(sessionFormData); - showPopUp(false); - }} />} - actionCancelLabel={t("PT_CANCEL")} - actionCancelOnSubmit={() => { - setFields(sessionFormData); - showPopUp(false); - }} - actionSaveLabel={t("PT_ADD")} - actionSaveOnSubmit={(e) => addAdhocRebatePenality(e)} - hideSubmit={false} - popupStyles={{ overflowY: "auto" }} - > - { -
- - {t("PT_AD_PENALTY")} - - {t("PT_TX_HEADS")} - -
- selectedValuesData("adhocPenaltyReason", true, e)} - selected={fields?.adhocPenaltyReason_data || ""} - isPropertyAssess={true} - name={"adhocPenaltyReason_data"} - t={t} - /> -
- {fields?.adhocPenaltyReason_data?.title === "PT_OTHERS" &&
- {t("PT_REASON")} -
- selectedValuesData("adhocPenaltyComment", false, e)} - {...(validation = { - isRequired: true, - pattern: "^[a-zA-Z-.`' ]*$", - type: "text", - title: t("TL_NAME_ERROR_MESSAGE"), - })} - /> -
-
} - {t("PT_HEAD_AMT")} -
- selectedValuesData("adhocPenalty", false, e)} - {...(validation = { - isRequired: true, - pattern: "^[1-9]+[0-9]*$", - title: t("ERR_DEFAULT_INPUT_FIELD_MSG"), - })} - /> - -
-
- - {t("PT_AD_REBATE")} - {t("PT_TX_HEADS")} -
- selectedValuesData("adhocRebateReason", true, e)} - selected={fields?.adhocRebateReason_data || ""} - name={"adhocRebateReason_data"} - isPropertyAssess={true} - t={t} - /> -
- {fields?.adhocRebateReason_data?.title === "PT_OTHERS" &&
- {t("PT_REASON")} - selectedValuesData("adhocRebateComment", false, e)} - {...(validation = { - isRequired: true, - pattern: "^[a-zA-Z-.`' ]*$", - type: "text", - title: t("TL_NAME_ERROR_MESSAGE"), - })} - /> -
} - {t("PT_HEAD_AMT")} -
- selectedValuesData("adhocRebate", false, e)} - {...(validation = { - isRequired: true, - pattern: "^[1-9]+[0-9]*$", - title: t("ERR_DEFAULT_INPUT_FIELD_MSG"), - })} - /> -
-
-
- }
} - {showToast && - } -
-
- ) -} - -export default WSFeeEstimation; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WeekDateRange.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WeekDateRange.js deleted file mode 100644 index 75069dd741f..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WeekDateRange.js +++ /dev/null @@ -1,30 +0,0 @@ -import React, { useCallback, useState } from "react"; -import { useTranslation } from "react-i18next"; - -const WeekDateRange = (props) => { - const [localSearchParams, setLocalSearchParams] = useState(() => ({})); - const { t } = useTranslation(); - const handleChange = useCallback((data) => { - setLocalSearchParams(() => ({ ...data })); - }, []); - - return ( -
-
-

{props.title}

-
- -
-
-
- ); -}; - -export default WeekDateRange; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AcceptDso.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AcceptDso.js deleted file mode 100644 index e870f2e9a67..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AcceptDso.js +++ /dev/null @@ -1,45 +0,0 @@ -import React from "react"; -import { Dropdown } from "@egovernments/digit-ui-react-components"; - -export const configAcceptDso = ({ t, dsoData, dso, selectVehicleNo, vehicleNoList, vehicleNo, vehicle, action }) => { - return { - label: { - heading: `ES_FSM_ACTION_TITLE_${action}`, - submit: `CS_COMMON_${action}`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: t("ES_FSM_ACTION_VEHICLE_REGISTRATION_NO"), - isMandatory: true, - type: "dropdown", - populators: ( - - ), - }, - { - label: t("ES_FSM_ACTION_VEHICLE_CAPACITY_IN_LTRS"), - isMandatory: true, - type: "text", - populators: { - name: "capacity", - validation: { - required: true, - }, - }, - disable: true, - }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AssignDso.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AssignDso.js deleted file mode 100644 index 418caf1e4bc..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AssignDso.js +++ /dev/null @@ -1,115 +0,0 @@ -import React from "react"; -import { DatePicker, Dropdown, CardLabelError } from "@egovernments/digit-ui-react-components"; - -function todayDate() { - var today = new Date(); - var dd = today.getDate(); - var mm = today.getMonth() + 1; - var yyyy = today.getFullYear(); - - if (dd < 10) { - dd = "0" + dd; - } - - if (mm < 10) { - mm = "0" + mm; - } - - return yyyy + "-" + mm + "-" + dd; -} - -function getFilteredDsoData(dsoData, vehicle) { - return dsoData?.filter((e) => e.vehicles?.find((veh) => veh?.type == vehicle?.code)); -} - -export const configAssignDso = ({ t, dsoData, dso, selectDSO, vehicleMenu, vehicle, selectVehicle, action }) => { - return { - label: { - heading: `ES_FSM_ACTION_TITLE_${action}`, - submit: `CS_COMMON_${action}`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: t("ES_FSM_ACTION_VEHICLE_TYPE"), - isMandatory: true, - type: "dropdown", - populators: ( - - ), - }, - { - label: t("ES_FSM_ACTION_DSO_NAME"), - isMandatory: true, - type: "dropdown", - populators: ( - - {getFilteredDsoData(dsoData, vehicle) && !getFilteredDsoData(dsoData, vehicle).length ? ( - {t("ES_COMMON_NO_DSO_AVAILABLE_WITH_SUCH_VEHICLE")} - ) : null} - - - ), - }, - { - label: t("ES_FSM_ACTION_VEHICLE_CAPACITY_IN_LTRS"), - isMandatory: true, - type: "text", - populators: { - name: "capacity", - validation: { - required: true, - }, - }, - disable: true, - }, - // { - // label: t("ES_FSM_ACTION_SERVICE_DATE"), - // isMandatory: true, - // type: "date", - // populators: { - // name: "date", - // validation: { - // required: true, - // }, - // min: Digit.Utils.date.getDate(), - // defaultValue: Digit.Utils.date.getDate(), - // }, - // }, - { - label: t("ES_FSM_ACTION_SERVICE_DATE"), - isMandatory: true, - type: "custom", - populators: { - name: "date", - validation: { - required: true, - }, - customProps: { min: Digit.Utils.date.getDate() }, - defaultValue: Digit.Utils.date.getDate(), - component: (props, customProps) => , - }, - }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAApproverApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAApproverApplication.js deleted file mode 100644 index ca66865bb77..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAApproverApplication.js +++ /dev/null @@ -1,77 +0,0 @@ -import { Dropdown, UploadFile } from "@egovernments/digit-ui-react-components"; -import React from "react"; - -export const configBPAApproverApplication = ({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - assigneeLabel, - businessService, - error -}) => { - let isRejectOrRevocate = false; - if(action?.action == "REVOCATE" || action?.action == "REJECT" || action.action == "SKIP_PAYMENT" || action?.action == "SEND_BACK_TO_CITIZEN" || action?.action == "APPROVE") { - isRejectOrRevocate = true; - } - - let isCommentRequired = false; - if(action?.action == "REVOCATE" || action?.action == "REJECT") { - isCommentRequired = true; - } - - return { - label: { - heading: `WF_${action?.action}_APPLICATION`, - submit: `WF_${businessService}_${action?.action}`, - cancel: "BPA_CITIZEN_CANCEL_BUTTON", - }, - form: [ - { - body: [ - { - label: action.isTerminateState || isRejectOrRevocate ? null : t(assigneeLabel || `WF_ROLE_${action.assigneeRoles?.[0]}`), - type: "dropdown", - populators: action.isTerminateState || isRejectOrRevocate ? null : ( - - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - isMandatory: isCommentRequired, - populators: { - name: "comments", - }, - }, - { - label: `${t("WF_APPROVAL_UPLOAD_HEAD")}`, - populators: ( - { - setUploadedFile(null); - }} - message={uploadedFile ? `1 ${t(`ES_PT_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`)} - accept= "image/*, .pdf, .png, .jpeg, .jpg" - iserror={error} - /> - ), - }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAREGApproverApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAREGApproverApplication.js deleted file mode 100644 index 0bdba14bc5b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAREGApproverApplication.js +++ /dev/null @@ -1,71 +0,0 @@ -import { Dropdown, UploadFile } from "@egovernments/digit-ui-react-components"; -import React from "react"; - -export const configBPAREGApproverApplication = ({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - assigneeLabel, - businessService, - error -}) => { - let checkCondtions = true; - if (action?.action == "SENDBACKTOCITIZEN") checkCondtions = false; - if (action.isTerminateState) checkCondtions = false; - - return { - label: { - heading: `WF_${action?.action}_APPLICATION`, - submit: `WF_${businessService?.toUpperCase()}_${action?.action}`, - cancel: "WF_EMPLOYEE_BPAREG_CANCEL", - }, - form: [ - { - body: [ - { - label: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_LABEL"), - placeholder: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - type: "dropdown", - populators: !checkCondtions ? null : ( - - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - { - label: t("BPA_APPROVAL_CHECKLIST_BUTTON_UP_FILE"), - populators: ( - { - setUploadedFile(null); - }} - message={uploadedFile ? `1 ${t(`ES_PT_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`)} - accept= "image/*, .pdf, .png, .jpeg, .jpg" - iserror={error} - /> - ) - }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/CompleteApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/CompleteApplication.js deleted file mode 100644 index a4c7c96b2fd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/CompleteApplication.js +++ /dev/null @@ -1,46 +0,0 @@ -import React from "react"; -import { DatePicker } from "@egovernments/digit-ui-react-components"; - -export const configCompleteApplication = ({ t, vehicle, applicationCreatedTime = 0, action }) => ({ - label: { - heading: `ES_FSM_ACTION_TITLE_${action}`, - submit: `CS_COMMON_${action}`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: t("ES_FSM_ACTION_DESLUGED_DATE_LABEL"), - isMandatory: true, - type: "custom", - populators: { - name: "desluged", - validation: { - required: true, - }, - defaultValue: Digit.Utils.date.getDate(), - customProps: { - min: Digit.Utils.date.getDate(applicationCreatedTime), - max: Digit.Utils.date.getDate(), - }, - component: (props, customProps) => , - }, - }, - { - label: t("ES_FSM_ACTION_WASTE_VOLUME_LABEL"), - type: "text", - isMandatory: true, - populators: { - name: "wasteCollected", - validation: { - required: true, - validate: (value) => parseInt(value) <= parseInt(vehicle.capacity), - }, - error: `${t("ES_FSM_ACTION_INVALID_WASTE_VOLUME")} ${vehicle?.capacity} ${t("CS_COMMON_LITRES")}`, - }, - }, - ], - }, - ], -}); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/NOCApproverApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/NOCApproverApplication.js deleted file mode 100644 index 12922b0575e..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/NOCApproverApplication.js +++ /dev/null @@ -1,79 +0,0 @@ -import { Dropdown, UploadFile } from "@egovernments/digit-ui-react-components"; -import React from "react"; - -export const configNOCApproverApplication = ({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - assigneeLabel, - businessService, - error -}) => { - - let isCommentRequired = false; - if(action?.action == "REVOCATE" || action?.action == "REJECT") { - isCommentRequired = true; - } - - let isRejectOrRevocate = false; - if(action?.action == "APPROVE" || action?.action == "REJECT" || action.action == "AUTO_APPROVE" || action.action == "AUTO_REJECT") { - isRejectOrRevocate = true; - } - - return { - label: { - heading: `WF_${action?.action}_APPLICATION`, - submit: `WF_${businessService}_${action?.action}`, - cancel: "CORE_LOGOUTPOPUP_CANCEL", - }, - form: [ - { - body: [ - { - label: action.isTerminateState || isRejectOrRevocate ? null : t(assigneeLabel || `WF_ROLE_${action.assigneeRoles?.[0]}`), - type: "dropdown", - populators: action.isTerminateState || isRejectOrRevocate ? null : ( - - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - isMandatory: isCommentRequired, - populators: { - name: "comments", - }, - }, - { - label: `${t("WF_APPROVAL_UPLOAD_HEAD")}`, - populators: ( - { - setUploadedFile(null); - }} - showHint={true} - message={uploadedFile ? `1 ${t(`ES_PT_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`)} - accept= "image/*, .pdf, .png, .jpeg, .jpg" - iserror={error} - /> - ), - }, - ], - }, - ], - }; -}; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTApproverApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTApproverApplication.js deleted file mode 100644 index afcc6a19be2..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTApproverApplication.js +++ /dev/null @@ -1,66 +0,0 @@ -import { Dropdown, UploadFile } from "@egovernments/digit-ui-react-components"; -import React from "react"; - -export const configPTApproverApplication = ({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - assigneeLabel, - businessService, -}) => { - return { - label: { - heading: `WF_${action?.action}_APPLICATION`, - submit: `WF_${businessService}_${action?.action}`, - cancel: "ES_PT_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: action.isTerminateState || action?.action === "SENDBACKTOCITIZEN" ? null : t(assigneeLabel || `WF_ROLE_${action.assigneeRoles?.[0]}`), - // isMandatory: !action.isTerminateState, - type: "dropdown", - populators: action.isTerminateState || action?.action === "SENDBACKTOCITIZEN" ? null : ( - - ), - }, - { - label: t("ES_PT_ACTION_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - { - label: `${t("ES_PT_ATTACH_FILE")}${action.docUploadRequired ? " *" : ""}`, - populators: ( - { - setUploadedFile(null); - }} - showHint={true} - hintText={t("PT_ATTACH_RESTRICTIONS_SIZE")} - message={uploadedFile ? `1 ${t(`ES_PT_ACTION_FILEUPLOADED`)}` : t(`ES_PT_ACTION_NO_FILEUPLOADED`)} - /> - ), - }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTAssessProperty.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTAssessProperty.js deleted file mode 100644 index dd04037aab6..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTAssessProperty.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react"; -import { RadioButtons } from "@egovernments/digit-ui-react-components"; - -export const configPTAssessProperty = ({ t, action, financialYears, selectedFinancialYear, setSelectedFinancialYear }) => { - return { - label: { - heading: `WF_${action.action}_APPLICATION`, - submit: `WF_PT.CREATE_${action.action}`, - cancel: "ES_PT_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: t("ES_PT_FINANCIAL_YEARS"), - isMandatory: true, - type: "radio", - populators: ( - - ), - }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/ReassignDso.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/ReassignDso.js deleted file mode 100644 index 132a5bc6a7c..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/ReassignDso.js +++ /dev/null @@ -1,101 +0,0 @@ -import React from "react"; -import { Dropdown } from "@egovernments/digit-ui-react-components"; - -function getFilteredDsoData(dsoData, vehicle) { - return dsoData?.filter((e) => e.vehicles?.find((veh) => veh?.type == vehicle?.code)); -} - -export const configReassignDSO = ({ - t, - dsoData, - dso, - selectDSO, - vehicleMenu, - vehicle, - selectVehicle, - reassignReasonMenu, - reassignReason, - selectReassignReason, - action, - showReassignReason, -}) => ({ - label: { - heading: `ES_FSM_ACTION_TITLE_${action}`, - submit: `CS_COMMON_${action}`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - ...(showReassignReason - ? [ - { - label: t("ES_FSM_ACTION_REASSIGN_REASON"), - type: "dropdown", - isMandatory: true, - populators: ( - - ), - }, - ] - : []), - { - label: t("ES_FSM_ACTION_VEHICLE_TYPE"), - isMandatory: vehicle ? false : true, - type: "dropdown", - populators: ( - - ), - }, - { - label: t("ES_FSM_ACTION_DSO_NAME"), - isMandatory: true, - type: "dropdown", - populators: ( - - ), - }, - { - label: t("ES_FSM_ACTION_VEHICLE_CAPACITY_IN_LTRS"), - type: "text", - populators: { - name: "capacity", - validation: { - required: true, - }, - }, - disable: true, - }, - { - label: t("ES_FSM_ACTION_SERVICE_DATE"), - isMandatory: true, - type: "date", - populators: { - name: "date", - validation: { - required: true, - }, - min: Digit.Utils.date.getDate(), - defaultValue: Digit.Utils.date.getDate(), - }, - }, - ], - }, - ], -}); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/RejectApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/RejectApplication.js deleted file mode 100644 index a18bdaf1110..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/RejectApplication.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react"; -import { Dropdown } from "@egovernments/digit-ui-react-components"; - -export const configRejectApplication = ({ t, rejectMenu, setReason, reason, action }) => { - return { - label: { - heading: `ES_FSM_ACTION_TITLE_${action}`, - submit: `CS_COMMON_${action}`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: t(`ES_FSM_ACTION_${action.toUpperCase()}_REASON`), - type: "dropdown", - populators: , - isMandatory: true, - }, - { - label: t("ES_FSM_ACTION_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/TLApproverApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/TLApproverApplication.js deleted file mode 100644 index 23b20e5be2b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/TLApproverApplication.js +++ /dev/null @@ -1,83 +0,0 @@ -import { Dropdown, UploadFile } from "@egovernments/digit-ui-react-components"; -import React from "react"; - -export const configTLApproverApplication = ({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - assigneeLabel, - businessService, -}) => { - let checkCondtions = true; - if (action?.action == "SENDBACKTOCITIZEN" || action?.action == "APPROVE") checkCondtions = false; - if (action.isTerminateState) checkCondtions = false; - - return { - label: { - heading: `WF_${action?.action}_APPLICATION`, - submit: `WF_${businessService?.toUpperCase()}_${action?.action}`, - cancel: "WF_EMPLOYEE_NEWTL_CANCEL", - }, - form: [ - { - body: [ - { - label: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_LABEL"), - placeholder: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - // isMandatory: false, - type: "dropdown", - populators: !checkCondtions ? null : ( - - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - { - label: t("TL_APPROVAL_CHECKLIST_BUTTON_UP_FILE"), - populators: ( - { - setUploadedFile(null); - }} - message={uploadedFile ? `1 ${t(`ES_PT_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`)} - /> - ) - }, - // { - // label: action.docUploadRequired ? t("ES_PT_UPLOAD_FILE") : null, - // populators: action.docUploadRequired ? ( - // { - // setUploadedFile(null); - // }} - // message={uploadedFile ? `1 ${t(`ES_PT_ACTION_FILEUPLOADED`)}` : t(`ES_PT_ACTION_NO_FILEUPLOADED`)} - // /> - // ) : null, - // }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSApproverApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSApproverApplication.js deleted file mode 100644 index 2f5f2d45a6a..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSApproverApplication.js +++ /dev/null @@ -1,73 +0,0 @@ -import { Dropdown, UploadFile } from "@egovernments/digit-ui-react-components"; -import React from "react"; - -export const configWSApproverApplication = ({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - assigneeLabel, - businessService, - error -}) => { - let checkCondtions = true; - if (action?.action?.includes("SEND_BACK") || action?.action == "APPROVE_FOR_CONNECTION") checkCondtions = false; - if (action.isTerminateState) checkCondtions = false; - - return { - label: { - heading: `WF_${action?.action}_APPLICATION`, - submit: `WF_${businessService?.toUpperCase()}_${action?.action}`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_LABEL"), - placeholder: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - // isMandatory: false, - type: "dropdown", - populators: !checkCondtions ? null : ( - - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - { - label: t("WS_APPROVAL_CHECKLIST_BUTTON_UP_FILE"), - populators: ( - { - setUploadedFile(null); - }} - message={uploadedFile ? `1 ${t(`ES_PT_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`)} - error={error} - iserror={error} - /> - ) - }, - ], - }, - ], - }; -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSDisconnectApplication.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSDisconnectApplication.js deleted file mode 100644 index 5acdcebe041..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSDisconnectApplication.js +++ /dev/null @@ -1,89 +0,0 @@ -import { Dropdown, UploadFile, DatePicker } from "@egovernments/digit-ui-react-components"; -import React from "react"; - -export const configWSDisConnectApplication = ({ - t, - action, - approvers, - selectedApprover, - setSelectedApprover, - selectFile, - uploadedFile, - setUploadedFile, - assigneeLabel, - businessService, - error -}) => { - let checkCondtions = true, isDatePickerDisplay = false; - if (action?.action?.includes("SEND_BACK") || action?.action == "APPROVE_FOR_DISCONNECTION" || action?.action == "RESUBMIT_APPLICATION") checkCondtions = false; - if (action.isTerminateState) checkCondtions = false; - if (action?.action == "EXECUTE_DISCONNECTION" || action?.action == "DISCONNECTION_EXECUTED") isDatePickerDisplay = true; - - - return { - label: { - heading: `WF_${action?.action}_APPLICATION`, - submit: `WF_${businessService?.toUpperCase()}_${action?.action}`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_LABEL"), - placeholder: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - // isMandatory: false, - type: "dropdown", - populators: !checkCondtions ? null : ( - - ), - }, - isDatePickerDisplay && { - label: t("ES_FSM_ACTION_SERVICE_DATE"), - isMandatory: isDatePickerDisplay ? true : false, - type: "custom", - populators: isDatePickerDisplay ? { - name: "date", - validation: { - required: true, - }, - // customProps: { max: Digit.Utils.date.getDate() }, - defaultValue: Digit.Utils.date.getDate(), - component: (props, customProps) => , - } : null, - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - { - label: t("WS_APPROVAL_CHECKLIST_BUTTON_UP_FILE"), - populators: ( - { - setUploadedFile(null); - }} - message={uploadedFile ? `1 ${t(`ES_PT_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`)} - error={error} - iserror={error} - /> - ) - }, - ], - }, - ], - }; -}; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configApproveModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configApproveModal.js deleted file mode 100644 index 03beb885925..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configApproveModal.js +++ /dev/null @@ -1,53 +0,0 @@ -import { Dropdown } from '@egovernments/digit-ui-react-components'; -import React, { useState } from 'react' - -const configApproveModal = ({ - t, - action -}) => { - if(action?.action === 'ADMINSANCTION'){ - return { - label: { - heading: `WORKS_APPROVE_ESTIMATE`, - submit: `WORKS_APPROVE_ESTIMATE`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ] - } - ] - } - - }else - return { - label: { - heading: `WORKS_APPROVE_LOI`, - submit: `WORKS_APPROVE_LOI`, - cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ] - } - ] - } -} - -export default configApproveModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceApproveModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceApproveModal.js deleted file mode 100644 index 06a29a26339..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceApproveModal.js +++ /dev/null @@ -1,27 +0,0 @@ - -const configAttendanceApproveModal = ({ t, action }) => { - if (action?.applicationStatus === "APPROVED") { - return { - label: { - heading: t("ATM_PROCESSINGMODAL_HEADER"), - submit: t("ATM_FORWARD_FOR_APPROVAL"), - cancel: t("CS_COMMON_CANCEL"), - }, - form: [ - { - body: [ - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ], - }, - ] - }; - } -}; - -export default configAttendanceApproveModal; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceCheckModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceCheckModal.js deleted file mode 100644 index 374219cc6d4..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceCheckModal.js +++ /dev/null @@ -1,93 +0,0 @@ -const configAttendanceCheckModal = ({ - t, - action, - businessService, - approvers, - selectedApprover, - setSelectedApprover, - designation, - selectedDesignation, - setSelectedDesignation, - department, - selectedDept, - setSelectedDept, - approverLoading = false, -}) => { - let checkConditions = true; - if (action.isTerminateState) checkConditions = false; - - if (designation?.length === 0 || department?.length === 0) return {}; - - if (action?.applicationStatus === "ATTENDANCE_CHECKED") { - return { - label: { - heading: t("ATM_PROCESSINGMODAL_HEADER"), - submit: t("ATM_FORWARD_FOR_CHECK"), - cancel: t("WORKS_CANCEL"), - }, - form: [ - { - body: [ - { - isMandatory: true, - key: "department", - type: "radioordropdown", - label: !checkConditions ? null : t("ATM_APPROVER_DEPT"), - disable: false, - populators: { - name: "department", - optionsKey: "i18nKey", - error: "Department is required", - required: true, - options: department, - }, - }, - { - isMandatory: true, - key: "designation", - type: "radioordropdown", - label: !checkConditions ? null : t("ATM_APPROVER_DESIGNATION"), - disable: false, - populators: { - name: "designation", - optionsKey: "i18nKey", - error: "Designation is required", - required: true, - options: designation, - }, - }, - { - isMandatory: true, - key: "approvers", - type: "radioordropdown", - label: !checkConditions ? null : t("WORKS_APPROVER"), - disable: false, - populators: { - name: "approvers", - optionsKey: "nameOfEmp", - error: "Designation is required", - required: true, - options: approvers, - }, - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ], - }, - ], - defaultValues: { - department: "", - designation: "", - approvers: "", - comments: "", - }, - }; - } -}; - -export default configAttendanceCheckModal; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceRejectModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceRejectModal.js deleted file mode 100644 index c732127aac7..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceRejectModal.js +++ /dev/null @@ -1,61 +0,0 @@ -import { LabelFieldPair,CardLabel} from '@egovernments/digit-ui-react-components'; -import React from 'react' - -const configAttendanceRejectModal = ({ - t, - empDepartment, - empDesignation, - empName -}) => { - - const fieldLabelStyle = { - "display" : "grid", - "gridTemplateColumns" : "60% 1fr" - }; - - return { - label: { - heading: t("ATM_PROCESSINGMODAL_HEADER"), - submit: t("ATM_CONFIRM_REJECT"), - cancel: t("CS_COMMON_CANCEL"), - }, - form: [ - { - body: [ - { - withoutLabel:true, - populators: - {t("ATM_DEPARTMENT")} - {empDepartment} - , - }, - { - withoutLabel:true, - populators: - {t("ATM_DESIGNATION")} - {empDesignation} - , - }, - { - withoutLabel:true, - populators: - {t("ATM_REJECTED_BY")} - {empName} - , - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - key: "org_name", - populators: { - name: "comments", - }, - }, - ] - } - ] - } - -} - -export default configAttendanceRejectModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configCheckModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configCheckModal.js deleted file mode 100644 index c267eb9f32f..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configCheckModal.js +++ /dev/null @@ -1,105 +0,0 @@ -import { Dropdown,Loader } from '@egovernments/digit-ui-react-components'; -import React,{useState} from 'react' - -const configCheckModal = ({ - t, - action, - businessService, - approvers, - selectedApprover, - setSelectedApprover, - designation, - selectedDesignation, - setSelectedDesignation, - department, - selectedDept, - setSelectedDept, - approverLoading=false, -}) => { - - let checkConditions = true - if (action.isTerminateState) checkConditions = false; - - if(designation?.length===0 || department?.length===0) return {} - - return { - label: { - heading: `WORKS_CHECK_FORWARD`, - submit: `WORKS_FORWARD_FOR_APPROVAL`, - cancel: "WORKS_CANCEL", - }, - form: [ - { - body:[ - { - label: !checkConditions ? null : t("WORKS_APPROVER_DEPT"), - placeholder: !checkConditions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - isMandatory: true, - type: "goToDefaultCase", - populators: !checkConditions ? null : ( - { - setSelectedDept(val) - setSelectedApprover("") - //setValue() - }} - selected={selectedDept} - t={t} - /> - ), - }, - { - label: !checkConditions ? null : t("WORKS_APPROVER_DESIGNATION"), - //placeholder: !checkConditions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - isMandatory: true, - type: "goToDefaultCase", - populators: !checkConditions ? null : ( - { - setSelectedDesignation(val) - setSelectedApprover("") - //resetting approver dropdown when dept/designation changes - }} - selected={selectedDesignation} - t={t} - /> - ), - }, - { - label: !checkConditions ? null : t("WORKS_APPROVER"), - //placeholder: !checkConditions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - isMandatory: true, - type: "goToDefaultCase", - populators: !checkConditions ? null : ( - approverLoading ? : - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ] - } - ] - } -} - -export default configCheckModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configRejectModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configRejectModal.js deleted file mode 100644 index ae4be5af3fd..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configRejectModal.js +++ /dev/null @@ -1,127 +0,0 @@ -import { Dropdown,LabelFieldPair,CardLabel} from '@egovernments/digit-ui-react-components'; -import React, { useState } from 'react' - -const configRejectModal = ({ - t, - action, - rejectReasons, - selectedReason, - setSelectedReason, - loiNumber, - department, - estimateNumber -}) => { - - let checkConditions = true - if (action.isTerminateState) checkConditions = false; - - if(rejectReasons?.length === 0) return {} - if(loiNumber){ - return { - label: { - heading: `WORKS_REJECT_LOI`, - submit: `WORKS_REJECT_LOI`, - //cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - withoutLabel:true, - populators: - {t("WORKS_DEPARTMENT")} - {"ENGG"} - , - }, - { - //label: t("WORKS_LOI_ID"), - //type: "text", - withoutLabel: true, - populators: - {t("WORKS_LOI_ID")} - {loiNumber} - - }, - { - label: !checkConditions ? null : t("WORKS_REJECT_REASON"), - //placeholder: !checkConditions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - // isMandatory: false, - type: "goToDefaultCase", - populators: !checkConditions ? null : ( - - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ] - } - ] - } - }else{ - return { - label: { - heading: `WORKS_REJECT_ESTIMATE`, - submit: `WORKS_REJECT_ESTIMATE`, - //cancel: "CS_COMMON_CANCEL", - }, - form: [ - { - body: [ - { - withoutLabel:true, - populators: - {t("WORKS_DEPARTMENT")} - {"ENGG"} - , - }, - { - //label: t("WORKS_LOI_ID"), - //type: "text", - withoutLabel: true, - populators: - {t("WORKS_ESTIMATE_ID")} - {estimateNumber} - - }, - { - label: !checkConditions ? null : t("WORKS_REJECT_REASON"), - //placeholder: !checkConditions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - // isMandatory: false, - type: "goToDefaultCase", - populators: !checkConditions ? null : ( - - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ] - } - ] - } - - } -} - -export default configRejectModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillApproveModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillApproveModal.js deleted file mode 100644 index cd01fdc4414..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillApproveModal.js +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react' -import { LabelFieldPair,CardLabel} from '@egovernments/digit-ui-react-components'; - -const configViewBillApprovalModal = ({ - t, -}) => { - const fieldLabelStyle = { - "display" : "grid", - "gridTemplateColumns" : "60% 1fr" - }; - return { - label: { - heading: t("EXP_PROCESSINGMODAL_HEADER"), - submit: t("EXP_FORWARD_FOR_APPROVAL"), - cancel: t("CS_COMMON_CANCEL"), - }, - form: [ - { - body: [ - { - withoutLabel:true, - populators: - {t("EXP_DEPARTMENT")} - Engineering - , - }, - { - withoutLabel:true, - populators: - {t("EXP_DESIGNATION")} - Junior Engineer - , - }, - { - withoutLabel:true, - populators: - {t("EXP_APPROVER")} - {"RASHMI"} - , - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ], - }, - ], - defaultValues: { - comments: "", - }, - }; -} - -export default configViewBillApprovalModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillCheckModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillCheckModal.js deleted file mode 100644 index 53204b28e75..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillCheckModal.js +++ /dev/null @@ -1,107 +0,0 @@ -import { Dropdown, Loader } from '@egovernments/digit-ui-react-components'; -import React, { useState } from 'react' - -const configViewBillCheckModal = ({ - t, - approvers, - selectedApprover, - setSelectedApprover, - designation, - selectedDesignation, - setSelectedDesignation, - department, - selectedDept, - setSelectedDept, - approverLoading = false, -}) => { - - let checkConditions = true - - - if (designation?.length === 0 || department?.length === 0) return {} - - return { - label: { - heading: t("EXP_FORWARD_BILL_FOR_APPROVAL"), - submit: t("EXP_FORWARD_BILL_FOR_APPROVAL"), - cancel: t("CS_COMMON_CANCEL"), - }, - form: [ - { - body: [ - { - label: !checkConditions ? null : t("WORKS_APPROVER_DEPT"), - placeholder: !checkConditions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - isMandatory: true, - type: "goToDefaultCase", - populators: !checkConditions ? null : ( - { - setSelectedDept(val) - setSelectedApprover("") - //setValue() - }} - selected={selectedDept} - t={t} - /> - ), - }, - { - label: !checkConditions ? null : t("WORKS_APPROVER_DESIGNATION"), - //placeholder: !checkConditions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - isMandatory: true, - type: "goToDefaultCase", - name: "designation", - populators: !checkConditions ? null : ( - { - setSelectedDesignation(val) - setSelectedApprover("") - //resetting approver dropdown when dept/designation changes - }} - selected={selectedDesignation} - t={t} - /> - ), - }, - { - label: !checkConditions ? null : t("WORKS_APPROVER"), - //placeholder: !checkConditions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"), - isMandatory: true, - type: "goToDefaultCase", - populators: !checkConditions ? null : ( - approverLoading ? : - ), - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ] - } - ] - } -} - -export default configViewBillCheckModal; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillRejectModal.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillRejectModal.js deleted file mode 100644 index 716d6179d10..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillRejectModal.js +++ /dev/null @@ -1,59 +0,0 @@ -import React from 'react' -import { LabelFieldPair,CardLabel} from '@egovernments/digit-ui-react-components'; - -const configViewBillRejectModal = ({ - t, -}) => { - - const fieldLabelStyle = { - "display" : "grid", - "gridTemplateColumns" : "60% 1fr" - }; - - return { - label: { - heading: t("EXP_PROCESSINGMODAL_HEADER"), - submit: t("EXP_CONFIRM_REJECT"), - cancel: t("CS_COMMON_CANCEL"), - }, - form: [ - { - body: [ - { - withoutLabel:true, - populators: - {t("EXP_DEPARTMENT")} - Engineering - , - }, - { - withoutLabel:true, - populators: - {t("EXP_DESIGNATION")} - Junior Engineer - , - }, - { - withoutLabel:true, - populators: - {t("EXP_REJECTED_BY")} - {"RASHMI"} - , - }, - { - label: t("WF_COMMON_COMMENTS"), - type: "textarea", - populators: { - name: "comments", - }, - }, - ] - } - ], - defaultValues : { - comments : "", - } - } -} - -export default configViewBillRejectModal \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/index.js deleted file mode 100644 index a736b8ed3eb..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/index.js +++ /dev/null @@ -1,47 +0,0 @@ -import { configAssignDso } from "./AssignDso"; -import { configCompleteApplication } from "./CompleteApplication"; -import { configReassignDSO } from "./ReassignDso"; -import { configRejectApplication } from "./RejectApplication"; -import { configAcceptDso } from "./AcceptDso"; -import { configPTApproverApplication } from "./PTApproverApplication"; -import { configPTAssessProperty } from "./PTAssessProperty"; -import { configTLApproverApplication } from "./TLApproverApplication"; -import { configBPAREGApproverApplication } from "./BPAREGApproverApplication"; -import { configBPAApproverApplication } from "./BPAApproverApplication"; -import { configNOCApproverApplication } from "./NOCApproverApplication"; -import { configWSApproverApplication } from "./WSApproverApplication"; -import { configWSDisConnectApplication } from "./WSDisconnectApplication"; -import configCheckModal from "./configCheckModal" -import configApproveModal from "./configApproveModal" -import configRejectModal from "./configRejectModal" -import configAttendanceApproveModal from "./configAttendanceApproveModal"; -import configAttendanceCheckModal from "./configAttendanceCheckModal"; -import configAttendanceRejectModal from "./configAttendanceRejectModal"; -import configViewBillApproveModal from "./configViewBillApproveModal"; -import configViewBillCheckModal from "./configViewBillCheckModal"; -import configViewBillRejectModal from "./configViewBillRejectModal"; - -export { - configAttendanceRejectModal, - configAttendanceCheckModal, - configAttendanceApproveModal, - configCheckModal, - configApproveModal, - configRejectModal, - configAssignDso, - configCompleteApplication, - configReassignDSO, - configRejectApplication, - configAcceptDso, - configPTApproverApplication, - configPTAssessProperty, - configTLApproverApplication, - configBPAREGApproverApplication, - configBPAApproverApplication, - configNOCApproverApplication, - configWSApproverApplication, - configWSDisConnectApplication, - configViewBillRejectModal, - configViewBillCheckModal, - configViewBillApproveModal -}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/index.js deleted file mode 100644 index feb622ab712..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/index.js +++ /dev/null @@ -1,368 +0,0 @@ -import React, { useEffect, useState } from "react"; -import { useTranslation } from "react-i18next"; -import { useQueryClient } from "react-query"; -import { format } from "date-fns"; - -import { Loader } from "@egovernments/digit-ui-react-components"; - -import ActionModal from "./Modal"; - -import { useHistory, useParams } from "react-router-dom"; -import ApplicationDetailsContent from "./components/ApplicationDetailsContent"; -import ApplicationDetailsToast from "./components/ApplicationDetailsToast"; -import ApplicationDetailsActionBar from "./components/ApplicationDetailsActionBar"; -import ApplicationDetailsWarningPopup from "./components/ApplicationDetailsWarningPopup"; - -const ApplicationDetails = (props) => { - const tenantId = Digit.ULBService.getCurrentTenantId(); - const state = Digit.ULBService.getStateId(); - const { t } = useTranslation(); - const history = useHistory(); - let { id: applicationNumber } = useParams(); - const [displayMenu, setDisplayMenu] = useState(false); - const [selectedAction, setSelectedAction] = useState(null); - const [showModal, setShowModal] = useState(false); - const [isEnableLoader, setIsEnableLoader] = useState(false); - const [isWarningPop, setWarningPopUp] = useState(false); - const [modify, setModify] = useState(false); - const [saveAttendanceState, setSaveAttendanceState] = useState({ displaySave : false, updatePayload: []}) - - const { - applicationDetails, - showToast, - setShowToast, - isLoading, - isDataLoading, - applicationData, - mutate, - nocMutation, - workflowDetails, - businessService, - closeToast, - moduleCode, - timelineStatusPrefix, - forcedActionPrefix, - statusAttribute, - ActionBarStyle, - MenuStyle, - paymentsList, - showTimeLine = true, - oldValue, - isInfoLabel = false, - clearDataDetails, - noBoxShadow, - sectionHeadStyle, - showActionBar = true - } = props; - - useEffect(() => { - if (showToast) { - workflowDetails.revalidate(); - } - }, [showToast]); - - function onActionSelect(action) { - if (action) { - if(action?.isToast){ - setShowToast({ key: "error", error: { message: action?.toastMessage } }); - setTimeout(closeToast, 5000); - } - else if (action?.isWarningPopUp) { - setWarningPopUp(true); - } else if (action?.redirectionUrll) { - //here do the loi edit upon rejection - if (action?.redirectionUrll?.action === "EDIT_LOI_APPLICATION") { - history.push(`${action?.redirectionUrll?.pathname}`, { data: action?.redirectionUrll?.state }); - } - if (action?.redirectionUrll?.action === "EDIT_ESTIMATE_APPLICATION") { - history.push(`${action?.redirectionUrll?.pathname}`,{ data: action?.redirectionUrll?.state }); - } - - } else if (!action?.redirectionUrl) { - if(action?.action === 'EDIT') setModify(true) - else setShowModal(true); - } else { - history.push({ - pathname: action.redirectionUrl?.pathname, - state: { ...action.redirectionUrl?.state }, - }); - } - } - setSelectedAction(action); - setDisplayMenu(false); - } - - const queryClient = useQueryClient(); - - const closeModal = () => { - setSelectedAction(null); - setShowModal(false); - }; - - const closeWarningPopup = () => { - setWarningPopUp(false); - }; - - const getResponseHeader = (action) => { - - if(action?.includes("CHECK")){ - return t("WORKS_LOI_RESPONSE_FORWARD_HEADER") - } else if (action?.includes("APPROVE")){ - return t("WORKS_LOI_RESPONSE_APPROVE_HEADER") - }else if(action?.includes("REJECT")){ - return t("WORKS_LOI_RESPONSE_REJECT_HEADER") - } - } - - const getResponseMessage = (action,updatedLOI) => { - - if (action?.includes("CHECK")) { - return t("WORKS_LOI_RESPONSE_MESSAGE_CHECK", { loiNumber: updatedLOI?.letterOfIndentNumber,name:"Nipun",designation:"SE" }) - } else if (action?.includes("APPROVE")) { - return t("WORKS_LOI_RESPONSE_MESSAGE_APPROVE", { loiNumber: updatedLOI?.letterOfIndentNumber }) - } else if (action?.includes("REJECT")) { - return t("WORKS_LOI_RESPONSE_MESSAGE_REJECT", { loiNumber: updatedLOI?.letterOfIndentNumber }) - } - } - - const getEstimateResponseHeader = (action) => { - - if(action?.includes("CHECK")){ - return t("WORKS_ESTIMATE_RESPONSE_FORWARD_HEADER") - } else if (action?.includes("TECHNICALSANCATION")){ - return t("WORKS_ESTIMATE_RESPONSE_FORWARD_HEADER") - }else if (action?.includes("ADMINSANCTION")){ - return t("WORKS_ESTIMATE_RESPONSE_APPROVE_HEADER") - }else if(action?.includes("REJECT")){ - return t("WORKS_ESTIMATE_RESPONSE_REJECT_HEADER") - } - } - - const getEstimateResponseMessage = (action,updatedEstimate) => { - - if (action?.includes("CHECK")) { - return t("WORKS_ESTIMATE_RESPONSE_MESSAGE_CHECK", { estimateNumber: updatedEstimate?.estimateNumber,Name:"Super",Designation:"SE",Department:"Health" }) - } else if (action?.includes("TECHNICALSANCATION")) { - return t("WORKS_ESTIMATE_RESPONSE_MESSAGE_CHECK", { estimateNumber: updatedEstimate?.estimateNumber,Name:"Super",Designation:"SE",Department:"Health" }) - } else if (action?.includes("ADMINSANCTION")) { - return t("WORKS_ESTIMATE_RESPONSE_MESSAGE_APPROVE", { estimateNumber: updatedEstimate?.estimateNumber }) - } else if (action?.includes("REJECT")) { - return t("WORKS_ESTIMATE_RESPONSE_MESSAGE_REJECT", { estimateNumber: updatedEstimate?.estimateNumber }) - } - } - - const getAttendanceResponseHeaderAndMessage = (action) => { - let response = {} - if (action?.includes("VERIFY")) { - response.header = t("ATM_ATTENDANCE_VERIFIED") - response.message = t("ATM_ATTENDANCE_VERIFIED_SUCCESS") - } else if (action?.includes("REJECT")) { - response.header = t("ATM_ATTENDANCE_REJECTED") - response.message = t("ATM_ATTENDANCE_REJECTED_SUCCESS") - } else if (action?.includes("APPROVE")) { - response.header = t("ATM_ATTENDANCE_APPROVED") - response.message = t("ATM_ATTENDANCE_APPROVED_SUCCESS") - } - return response - } - - const submitAction = async (data, nocData = false, isOBPS = {}) => { - const performedAction = data?.workflow?.action - setIsEnableLoader(true); - if (mutate) { - setIsEnableLoader(true); - mutate(data, { - onError: (error, variables) => { - setIsEnableLoader(false); - setShowToast({ key: "error", error }); - setTimeout(closeToast, 5000); - }, - onSuccess: (data, variables) => { - setIsEnableLoader(false); - //just history.push to the response component from here and show relevant details - if(data?.letterOfIndents?.[0]){ - const updatedLOI = data?.letterOfIndents?.[0] - const state = { - header:getResponseHeader(performedAction,updatedLOI), - id: updatedLOI?.letterOfIndentNumber, - info: t("WORKS_LOI_ID"), - message: getResponseMessage(performedAction,updatedLOI), - links: [ - { - name: t("WORKS_CREATE_NEW_LOI"), - redirectUrl: `/${window.contextPath}/employee/works/create-loi`, - code: "", - svg: "CreateEstimateIcon", - isVisible:false, - type:"add" - }, - { - name: t("WORKS_GOTO_LOI_INBOX"), - redirectUrl: `/${window.contextPath}/employee/works/LOIInbox`, - code: "", - svg: "CreateEstimateIcon", - isVisible:true, - type:"inbox" - }, - ], - responseData:data, - requestData:variables - } - history.push(`/${window.contextPath}/employee/works/response`, state) - } - if(data?.estimates?.[0]){ - const updatedEstimate = data?.estimates?.[0] - const state = { - header:getEstimateResponseHeader(performedAction,updatedEstimate), - id: updatedEstimate?.estimateNumber, - info: t("WORKS_ESTIMATE_ID"), - message: getEstimateResponseMessage(performedAction,updatedEstimate), - links: [ - { - name: t("WORKS_CREATE_ESTIMATE"), - redirectUrl: `/${window.contextPath}/employee/works/create-estimate`, - code: "", - svg: "CreateEstimateIcon", - isVisible:false, - type:"add" - }, - { - name: t("WORKS_GOTO_ESTIMATE_INBOX"), - redirectUrl: `/${window.contextPath}/employee/works/inbox`, - code: "", - svg: "RefreshIcon", - isVisible:true, - type:"inbox" - }, - ], - responseData:data, - requestData:variables - } - history.push(`/${window.contextPath}/employee/works/response`, state) - } - if (isOBPS?.bpa) { - data.selectedAction = selectedAction; - history.replace(`/${window?.contextPath}/employee/obps/response`, { data: data }); - } - if (isOBPS?.isStakeholder) { - data.selectedAction = selectedAction; - history.push(`/${window?.contextPath}/employee/obps/stakeholder-response`, { data: data }); - } - if (isOBPS?.isNoc) { - history.push(`/${window?.contextPath}/employee/noc/response`, { data: data }); - } - if (data?.Amendments?.length > 0 ){ - //RAIN-6981 instead just show a toast here with appropriate message - //show toast here and return - //history.push("/${window?.contextPath}/employee/ws/response-bill-amend", { status: true, state: data?.Amendments?.[0] }) - - if(variables?.AmendmentUpdate?.workflow?.action.includes("SEND_BACK")){ - setShowToast({ key: "success", label: t("ES_MODIFYSWCONNECTION_SEND_BACK_UPDATE_SUCCESS")}) - } else if (variables?.AmendmentUpdate?.workflow?.action.includes("RE-SUBMIT")){ - setShowToast({ key: "success", label: t("ES_MODIFYSWCONNECTION_RE_SUBMIT_UPDATE_SUCCESS") }) - } else if (variables?.AmendmentUpdate?.workflow?.action.includes("APPROVE")){ - setShowToast({ key: "success", label: t("ES_MODIFYSWCONNECTION_APPROVE_UPDATE_SUCCESS") }) - } - else if (variables?.AmendmentUpdate?.workflow?.action.includes("REJECT")){ - setShowToast({ key: "success", label: t("ES_MODIFYWSCONNECTION_REJECT_UPDATE_SUCCESS") }) - } - return - } - if(data?.musterRolls?.[0]) { - const musterRoll = data?.musterRolls?.[0] - const response = getAttendanceResponseHeaderAndMessage(performedAction) - const state = { - header: response?.header, - message: response?.message, - info: t("ATM_REGISTER_ID_WEEK"), - id: `${musterRoll.registerId} | ${format(new Date(musterRoll.startDate), "dd/MM/yyyy")} - ${format(new Date(musterRoll.endDate), "dd/MM/yyyy")}`, - } - history.push(`/${window.contextPath}/employee/attendencemgmt/response`, state) - } - setShowToast({ key: "success", action: selectedAction }); - clearDataDetails && setTimeout(clearDataDetails, 3000); - setTimeout(closeToast, 5000); - queryClient.clear(); - queryClient.refetchQueries("APPLICATION_SEARCH"); - //push false status when reject - - }, - }); - } - - closeModal(); - }; - - if (isLoading || isEnableLoader) { - return ; - } - - return ( - - {!isLoading ? ( - - - {showModal ? ( - - ) : null} - {isWarningPop ? ( - - ) : null} - - {showActionBar && } - - ) : ( - - )} - - ); -}; - -export default ApplicationDetails; diff --git a/frontend/micro-ui/web/micro-ui-internals/publish-develop.sh b/frontend/micro-ui/web/micro-ui-internals/publish-develop.sh deleted file mode 100644 index 4909658c697..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/publish-develop.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -BASEDIR="$(cd "$(dirname "$0")" && pwd)" - -msg() { - echo -e "\n\n\033[32;32m$1\033[0m" -} - - -# msg "Pre-building all packages" -# yarn build -# sleep 5 - -msg "Building and publishing css" -cd "$BASEDIR/packages/css" && rm -rf dist && yarn && npm publish --tag campaign-1.0 - - -# msg "Building and publishing libraries" -# cd "$BASEDIR/packages/modules/workbench-hcm" && rm -rf dist && yarn&& npm publish --tag workbench-1.0 - diff --git a/frontend/micro-ui/web/micro-ui-internals/publish.sh b/frontend/micro-ui/web/micro-ui-internals/publish.sh deleted file mode 100644 index 4909658c697..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/publish.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -BASEDIR="$(cd "$(dirname "$0")" && pwd)" - -msg() { - echo -e "\n\n\033[32;32m$1\033[0m" -} - - -# msg "Pre-building all packages" -# yarn build -# sleep 5 - -msg "Building and publishing css" -cd "$BASEDIR/packages/css" && rm -rf dist && yarn && npm publish --tag campaign-1.0 - - -# msg "Building and publishing libraries" -# cd "$BASEDIR/packages/modules/workbench-hcm" && rm -rf dist && yarn&& npm publish --tag workbench-1.0 - diff --git a/frontend/micro-ui/web/micro-ui-internals/scripts/create.sh b/frontend/micro-ui/web/micro-ui-internals/scripts/create.sh deleted file mode 100755 index 9de72331774..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/scripts/create.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./scripts/run.sh core utilities diff --git a/frontend/micro-ui/web/micro-ui-internals/scripts/deploy.sh b/frontend/micro-ui/web/micro-ui-internals/scripts/deploy.sh deleted file mode 100755 index 5b0c7b831ed..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/scripts/deploy.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -curl -v -X POST https://builds.digit.org/job/builds/job/digit-ui/buildWithParameters \ - --user saurabh-egov:114cbf3df675835931688b2d3f0014a1f7 \ - --data-urlencode json='{"parameter": [{"name":"BRANCH", "value":"origin/'$1'"}]}' - -# curl https://builds.digit.org/job/builds/job/digit-ui/lastBuild/api/json | grep --color result\":null - diff --git a/frontend/micro-ui/web/micro-ui-internals/scripts/jenkins.sh b/frontend/micro-ui/web/micro-ui-internals/scripts/jenkins.sh deleted file mode 100755 index a1711fec55b..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/scripts/jenkins.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./scripts/deploy.sh dev \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/scripts/run.sh b/frontend/micro-ui/web/micro-ui-internals/scripts/run.sh deleted file mode 100755 index f00c59f13b8..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/scripts/run.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -MODULES=( "components" "core" "libraries" "example" ) - -RUNARGS=() -BUILDARGS=() - -for var in "$@" -do - BUILDARGS=( ${BUILDARGS[@]} build:"$var" ) - RUNARGS=( ${RUNARGS[@]} dev:"$var" ) -done - -a=0 -while [ "$a" -lt 3 ] -do - BUILD[$a]=build:${MODULES[$a]} - a=` expr $a + 1 ` -done - -echo "BUILDING MODULES:-" ${BUILD[*]} ${BUILDARGS[*]} -yarn run-p ${BUILD[*]} ${BUILDARGS[*]} - -b=0 -while [ "$b" -lt 4 ] -do - RUN[$b]=dev:${MODULES[$b]} - b=` expr $b + 1 ` -done - -echo "SERVING MODULES:-" ${RUN[*]} ${RUNARGS[*]} -yarn run-p ${RUN[*]} ${RUNARGS[*]} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/test.js b/frontend/micro-ui/web/micro-ui-internals/test.js deleted file mode 100644 index 60c958d0bac..00000000000 --- a/frontend/micro-ui/web/micro-ui-internals/test.js +++ /dev/null @@ -1,31 +0,0 @@ -const middleWare_1 = (data, _break, _next) => { - data.a = "a"; - _next(data); -}; - - -const middleWare_2 = (data, _break, _next) => { - data.b = "b"; - // _break(); - _next(data); -}; - -const middleWare_3 = (data, _break, _next) => { - data.c = "c"; - _next(data); -}; - -let middleWares = [middleWare_1, middleWare_2, middleWare_3]; - -const callMiddlewares = () => { - let applyBreak = false; - let itr = -1; - let _break = () => (applyBreak = true); - let _next = (data) => { - if (!applyBreak && ++itr < middleWares.length) middleWares[itr](data, _break, _next); - else return; - }; - _next({}); -}; - -callMiddlewares(); diff --git a/frontend/micro-ui/web/microplan/App.js b/frontend/micro-ui/web/microplan/App.js deleted file mode 100644 index afcd26669c6..00000000000 --- a/frontend/micro-ui/web/microplan/App.js +++ /dev/null @@ -1,61 +0,0 @@ -import React from "react"; -import { initLibraries } from "@egovernments/digit-ui-libraries"; - -import { DigitUI } from "@egovernments/digit-ui-module-core"; - -import { UICustomizations } from "./Customisations/UICustomizations"; -import { initMicroplanningComponents } from "@egovernments/digit-ui-module-hcmmicroplanning"; - - -window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); - -const enabledModules = [ - "DSS", - "NDSS", - "Utilities", - "HRMS", - "Engagement", - "Workbench", - "Microplanning" -]; - -const moduleReducers = (initData) => ({ - initData, -}); - -const initDigitUI = () => { - window.Digit.ComponentRegistryService.setupRegistry({ - - }); - - - initMicroplanningComponents() - window.Digit.Customizations = { - PGR: {}, - commonUiConfig: UICustomizations, - }; -}; - -initLibraries().then(() => { - initDigitUI(); -}); - -function App() { - window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); - const stateCode = - window.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || - process.env.REACT_APP_STATE_LEVEL_TENANT_ID; - if (!stateCode) { - return

stateCode is not defined

; - } - return ( - - ); -} - -export default App; diff --git a/frontend/micro-ui/web/microplan/Dockerfile b/frontend/micro-ui/web/microplan/Dockerfile deleted file mode 100644 index 56388b8e2d7..00000000000 --- a/frontend/micro-ui/web/microplan/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -FROM egovio/alpine-node-builder-14:yarn AS build -#FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build -RUN apk update && apk upgrade -RUN apk add --no-cache git>2.30.0 -ARG WORK_DIR -WORKDIR /app -ENV NODE_OPTIONS "--max-old-space-size=4792" - -COPY ${WORK_DIR} . -RUN ls -lah - -#RUN node web/envs.js -RUN cd web/ \ - && node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' \ - && node -e 'console.log("core only")' \ - && cd microplan/ \ - && chmod +x ./install-deps.sh \ - && ./install-deps.sh \ - && cd ../ \ - && yarn install \ - && yarn build:webpack - -FROM nginx:mainline-alpine -#FROM ghcr.io/egovernments/nginx:mainline-alpine -ENV WORK_DIR=/var/web/microplan-ui - -RUN mkdir -p ${WORK_DIR} - -COPY --from=build /app/web/build ${WORK_DIR}/ -COPY --from=build /app/web/microplan/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/frontend/micro-ui/web/microplan/install-deps.sh b/frontend/micro-ui/web/microplan/install-deps.sh deleted file mode 100644 index b090c8d6f04..00000000000 --- a/frontend/micro-ui/web/microplan/install-deps.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -BRANCH="$(git branch --show-current)" - -echo "Main Branch: $BRANCH" - -INTERNALS="micro-ui-internals" -cd .. - -cp microplan/App.js src -cp microplan/package.json package.json -cp microplan/webpack.config.js webpack.config.js -cp microplan/inter-package.json $INTERNALS/package.json - -cp $INTERNALS/example/src/UICustomizations.js src/Customisations - -echo "UI :: microplan " && echo "Branch: $(git branch --show-current)" && echo "$(git log -1 --pretty=%B)" && echo "installing packages" - diff --git a/frontend/micro-ui/web/microplan/inter-package.json b/frontend/micro-ui/web/microplan/inter-package.json deleted file mode 100644 index 635c9cc954b..00000000000 --- a/frontend/micro-ui/web/microplan/inter-package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "egovernments", - "version": "1.0.0", - "main": "index.js", - "workspaces": [ - "example", - "packages/css", - "packages/modules/*" - ], - "author": "JaganKumar ", - "license": "MIT", - "private": true, - "engines": { - "node": ">=14" - }, - "scripts": { - "start": "SKIP_PREFLIGHT_CHECK=true run-s build start:dev", - "sprint": "SKIP_PREFLIGHT_CHECK=true run-s start:script", - "start:dev": "run-p dev:**", - "start:script": "./scripts/create.sh", - "dev:css": "cd packages/css && yarn start", - "publish:css": "cd packages/css && yarn publish --access public", - "dev:example": "cd example && yarn start", - "dev:hcm-microplanning": "cd packages/modules/hcm-microplanning && yarn start", - "build": "run-p build:**", - "build:hcm-microplanning": "cd packages/modules/hcm-microplanning && yarn build", - "deploy:jenkins": "./scripts/jenkins.sh", - "clean": "rm -rf node_modules" - }, - "resolutions": { - "**/@babel/runtime": "7.20.1", - "**/babel-preset-react-app": "10.0.0", - "**/babel-loader": "8.2.2", - "**/@babel/core": "7.14.0", - "**/@babel/preset-env": "7.14.0", - "**/@babel/plugin-transform-modules-commonjs": "7.14.0", - "**/polished":"4.2.2", - "fast-uri":"2.1.0" - }, - "devDependencies": { - "husky": "7.0.4", - "lint-staged": "12.3.7", - "npm-run-all": "4.1.5", - "prettier": "2.1.2" - }, - "husky": {}, - "lint-staged": { - "*.{js,css,md}": "prettier --write" - }, - "dependencies": { - "lodash": "4.17.21", - "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.1-beta.2", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "react-router-dom": "5.3.0" - } -} diff --git a/frontend/micro-ui/web/microplan/nginx.conf b/frontend/micro-ui/web/microplan/nginx.conf deleted file mode 100644 index 9c84c01c4be..00000000000 --- a/frontend/micro-ui/web/microplan/nginx.conf +++ /dev/null @@ -1,12 +0,0 @@ -server -{ - listen 80; - underscores_in_headers on; - - location /microplan-ui - { - root /var/web; - index index.html index.htm; - try_files $uri $uri/ /microplan-ui/index.html; - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/microplan/package.json b/frontend/micro-ui/web/microplan/package.json deleted file mode 100644 index dff749d1780..00000000000 --- a/frontend/micro-ui/web/microplan/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "micro-ui", - "version": "1.0.0", - "author": "Jagankumar ", - "license": "MIT", - "private": true, - "engines": { - "node": ">=14" - }, - "workspaces": [ - "micro-ui-internals/packages/modules/*" - ], - "homepage": "/microplan-ui", - "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.2-beta.1", - "@egovernments/digit-ui-module-core": "1.8.2-beta.1", - "@egovernments/digit-ui-module-utilities": "1.0.1-beta.23", - "@egovernments/digit-ui-react-components": "1.8.2-beta.1", - "@egovernments/digit-ui-module-hcmmicroplanning":"0.0.1", - "@egovernments/digit-ui-components": "0.0.2-beta.2", - "babel-loader": "8.1.0", - "clean-webpack-plugin": "4.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "jsonpath": "^1.1.1", - "react-router-dom": "5.3.0", - "react-scripts": "4.0.1", - "web-vitals": "1.1.2", - "terser-brunch": "^4.1.0", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "css-loader": "5.2.6", - "style-loader": "2.0.0", - "webpack-cli": "4.10.0" - }, - "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "7.21.0", - "file-loader": "^6.2.0", - "http-proxy-middleware": "1.3.1", - "lodash": "4.17.21", - "microbundle-crl": "0.13.11", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "react-router-dom": "5.3.0", - "husky": "7.0.4", - "lint-staged": "12.3.7", - "npm-run-all": "4.1.5", - "prettier": "2.1.2" - }, - "scripts": { - "start": "react-scripts start", - "build": "GENERATE_SOURCEMAP=false SKIP_PREFLIGHT_CHECK=true react-scripts build", - "build:prepare": "./build.sh", - "build:libraries": "cd micro-ui-internals && yarn build", - "build:prod": "webpack --mode production", - "build:webpack": "yarn build:libraries &&cd .. && ls && cd ./web && ls && yarn build:prod", - "clean": "rm -rf node_modules" - }, - "eslintConfig": { - "extends": [ - "react-app" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/microplan/webpack.config.js b/frontend/micro-ui/web/microplan/webpack.config.js deleted file mode 100644 index c8036364605..00000000000 --- a/frontend/micro-ui/web/microplan/webpack.config.js +++ /dev/null @@ -1,52 +0,0 @@ -const path = require("path"); -const HtmlWebpackPlugin = require("html-webpack-plugin"); -const { CleanWebpackPlugin } = require("clean-webpack-plugin"); -// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; - -module.exports = { - // mode: 'development', - entry: "./src/index.js", - devtool: "none", - module: { - rules: [ - { - test: /\.(js)$/, - exclude: /node_modules/, - use: ["babel-loader"], - }, - { - test: /\.css$/i, - use: ["style-loader", "css-loader"], - }, - { - test: /\.(png|jpe?g|gif)$/i, - use: [ - { - loader: 'file-loader', - }, - ], - }, - ], - }, - output: { - filename: "[name].bundle.js", - path: path.resolve(__dirname, "build"), - publicPath: "/microplan-ui/", - }, - optimization: { - splitChunks: { - chunks: 'all', - minSize:20000, - maxSize:50000, - enforceSizeThreshold:50000, - minChunks:1, - maxAsyncRequests:30, - maxInitialRequests:30 - }, - }, - plugins: [ - new CleanWebpackPlugin(), - // new BundleAnalyzerPlugin(), - new HtmlWebpackPlugin({ inject: true, template: "public/index.html" }), - ], -}; \ No newline at end of file diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json deleted file mode 100644 index e90ab5a52ba..00000000000 --- a/frontend/micro-ui/web/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "micro-ui", - "version": "0.1.0", - "author": "Jagankumar ", - "license": "MIT", - "private": true, - "engines": { - "node": ">=14" - }, - "workspaces": [ - "micro-ui-internals/packages/libraries", - "micro-ui-internals/packages/react-components", - "micro-ui-internals/packages/modules/*" - ], - "homepage": "/digit-ui", - "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.1-beta.4", - "@egovernments/digit-ui-module-workbench": "1.0.1-beta.16", - "@egovernments/digit-ui-module-core": "1.8.2-beta.2", - "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", - "@egovernments/digit-ui-react-components": "1.8.2-beta.6", - "@egovernments/digit-ui-components": "0.0.2-beta.1", - "@egovernments/digit-ui-module-dss": "1.8.0-beta", - "@egovernments/digit-ui-module-common": "1.8.0-beta", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta", - "@egovernments/digit-ui-module-engagement": "1.5.20", - "babel-loader": "8.1.0", - "clean-webpack-plugin": "4.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "jsonpath": "^1.1.1", - "react-router-dom": "5.3.0", - "react-scripts": "4.0.1", - "web-vitals": "1.1.2", - "terser-brunch": "^4.1.0", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "css-loader": "5.2.6", - "style-loader": "2.0.0", - "webpack-cli": "4.10.0" - }, - "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "7.21.0", - "http-proxy-middleware": "1.3.1", - "lodash": "4.17.21", - "microbundle-crl": "0.13.11", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "react-router-dom": "5.3.0", - "husky": "7.0.4", - "lint-staged": "12.3.7", - "npm-run-all": "4.1.5", - "prettier": "2.1.2" - }, - "scripts": { - "start": "react-scripts start", - "build": "GENERATE_SOURCEMAP=false SKIP_PREFLIGHT_CHECK=true react-scripts build", - "build:prepare": "./build.sh", - "build:libraries": "cd micro-ui-internals && yarn build", - "build:prod": "webpack --mode production", - "build:webpack": "yarn build:libraries &&cd .. && ls && cd ./web && ls && yarn build:prod", - "clean": "rm -rf node_modules" - }, - "eslintConfig": { - "extends": [ - "react-app" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html deleted file mode 100644 index 661b6fa2425..00000000000 --- a/frontend/micro-ui/web/public/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - DIGIT - - - - - - -
- - - - \ No newline at end of file diff --git a/frontend/micro-ui/web/public/robots.txt b/frontend/micro-ui/web/public/robots.txt deleted file mode 100644 index e9e57dc4d41..00000000000 --- a/frontend/micro-ui/web/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/frontend/micro-ui/web/src/App.js b/frontend/micro-ui/web/src/App.js deleted file mode 100644 index d871f8e8f4c..00000000000 --- a/frontend/micro-ui/web/src/App.js +++ /dev/null @@ -1,74 +0,0 @@ -import React from "react"; -import { initLibraries } from "@egovernments/digit-ui-libraries"; -import { - paymentConfigs, - PaymentLinks, - PaymentModule, -} from "@egovernments/digit-ui-module-common"; -import { DigitUI,initCoreComponents } from "@egovernments/digit-ui-module-core"; -import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; -import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; -import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; -import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; -import { UICustomizations } from "./Customisations/UICustomizations"; -import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench"; -// import { initWorkbenchHCMComponents } from "@egovernments/digit-ui-module-hcmworkbench"; - -window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); - -const enabledModules = [ - "DSS", - "NDSS", - "Utilities", - "HRMS", - "Engagement", - "Workbench", - "Microplanning" -]; - -const moduleReducers = (initData) => ({ - initData, -}); - -const initDigitUI = () => { - window.Digit.ComponentRegistryService.setupRegistry({ - PaymentModule, - ...paymentConfigs, - PaymentLinks, - }); - initCoreComponents(); - initDSSComponents(); - initHRMSComponents(); - initEngagementComponents(); - initUtilitiesComponents(); - initWorkbenchComponents(); - - window.Digit.Customizations = { - PGR: {}, - commonUiConfig: UICustomizations, - }; -}; - -initLibraries().then(() => { - initDigitUI(); -}); - -function App() { - window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); - const stateCode = - window.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || - process.env.REACT_APP_STATE_LEVEL_TENANT_ID; - if (!stateCode) { - return

stateCode is not defined

; - } - return ( - - ); -} - -export default App; diff --git a/frontend/micro-ui/web/src/ComponentRegistry.js b/frontend/micro-ui/web/src/ComponentRegistry.js deleted file mode 100644 index 9bafce3dc89..00000000000 --- a/frontend/micro-ui/web/src/ComponentRegistry.js +++ /dev/null @@ -1,11 +0,0 @@ -class Registry { - constructor(registry = {}) { - this._registry = registry; - } - - getComponent(id) { - return this._registry[id]; - } -} - -export default Registry; diff --git a/frontend/micro-ui/web/src/Customisations/UICustomizations.js b/frontend/micro-ui/web/src/Customisations/UICustomizations.js deleted file mode 100644 index 6d17ab0d51b..00000000000 --- a/frontend/micro-ui/web/src/Customisations/UICustomizations.js +++ /dev/null @@ -1,428 +0,0 @@ -import { Link } from "react-router-dom"; -import _ from "lodash"; - -//create functions here based on module name set in mdms(eg->SearchProjectConfig) -//how to call these -> Digit?.Customizations?.[masterName]?.[moduleName] -// these functions will act as middlewares -var Digit = window.Digit || {}; - - - -const businessServiceMap = { - - "muster roll": "MR" -}; - -const inboxModuleNameMap = { - "muster-roll-approval": "muster-roll-service", -}; - -export const UICustomizations = { - businessServiceMap, - updatePayload: (applicationDetails, data, action, businessService) => { - - if (businessService === businessServiceMap.estimate) { - const workflow = { - comment: data.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - estimate: applicationDetails, - workflow, - }; - } - if (businessService === businessServiceMap.contract) { - const workflow = { - comment: data?.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - contract: applicationDetails, - workflow, - }; - } - if (businessService === businessServiceMap?.["muster roll"]) { - const workflow = { - comment: data?.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - return { - musterRoll: applicationDetails, - workflow, - }; - } - if(businessService === businessServiceMap?.["works.purchase"]){ - const workflow = { - comment: data.comments, - documents: data?.documents?.map((document) => { - return { - documentType: action?.action + " DOC", - fileName: document?.[1]?.file?.name, - fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, - documentUid: document?.[1]?.fileStoreId?.fileStoreId, - tenantId: document?.[1]?.fileStoreId?.tenantId, - }; - }), - assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, - action: action.action, - }; - //filtering out the data - Object.keys(workflow).forEach((key, index) => { - if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; - }); - - const additionalFieldsToSet = { - projectId:applicationDetails.additionalDetails.projectId, - invoiceDate:applicationDetails.billDate, - invoiceNumber:applicationDetails.referenceId.split('_')?.[1], - contractNumber:applicationDetails.referenceId.split('_')?.[0], - documents:applicationDetails.additionalDetails.documents - } - return { - bill: {...applicationDetails,...additionalFieldsToSet}, - workflow, - }; - } - }, - enableModalSubmit:(businessService,action,setModalSubmit,data)=>{ - if(businessService === businessServiceMap?.["muster roll"] && action.action==="APPROVE"){ - setModalSubmit(data?.acceptTerms) - } - }, - enableHrmsSearch: (businessService, action) => { - if (businessService === businessServiceMap.estimate) { - return action.action.includes("TECHNICALSANCTION") || action.action.includes("VERIFYANDFORWARD"); - } - if (businessService === businessServiceMap.contract) { - return action.action.includes("VERIFY_AND_FORWARD"); - } - if (businessService === businessServiceMap?.["muster roll"]) { - return action.action.includes("VERIFY"); - } - if(businessService === businessServiceMap?.["works.purchase"]){ - return action.action.includes("VERIFY_AND_FORWARD") - } - return false; - }, - getBusinessService: (moduleCode) => { - if (moduleCode?.includes("estimate")) { - return businessServiceMap?.estimate; - } else if (moduleCode?.includes("contract")) { - return businessServiceMap?.contract; - } else if (moduleCode?.includes("muster roll")) { - return businessServiceMap?.["muster roll"]; - } - else if (moduleCode?.includes("works.purchase")) { - return businessServiceMap?.["works.purchase"]; - } - else if (moduleCode?.includes("works.wages")) { - return businessServiceMap?.["works.wages"]; - } - else if (moduleCode?.includes("works.supervision")) { - return businessServiceMap?.["works.supervision"]; - } - else { - return businessServiceMap; - } - }, - getInboxModuleName: (moduleCode) => { - if (moduleCode?.includes("estimate")) { - return inboxModuleNameMap?.estimate; - } else if (moduleCode?.includes("contract")) { - return inboxModuleNameMap?.contracts; - } else if (moduleCode?.includes("attendence")) { - return inboxModuleNameMap?.attendencemgmt; - } else { - return inboxModuleNameMap; - } - }, - - AttendanceInboxConfig: { - preProcess: (data) => { - - //set tenantId - data.body.inbox.tenantId = Digit.ULBService.getCurrentTenantId(); - data.body.inbox.processSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId(); - - const musterRollNumber = data?.body?.inbox?.moduleSearchCriteria?.musterRollNumber?.trim(); - if(musterRollNumber) data.body.inbox.moduleSearchCriteria.musterRollNumber = musterRollNumber - - const attendanceRegisterName = data?.body?.inbox?.moduleSearchCriteria?.attendanceRegisterName?.trim(); - if(attendanceRegisterName) data.body.inbox.moduleSearchCriteria.attendanceRegisterName = attendanceRegisterName - - // deleting them for now(assignee-> need clarity from pintu,ward-> static for now,not implemented BE side) - const assignee = _.clone(data.body.inbox.moduleSearchCriteria.assignee); - delete data.body.inbox.moduleSearchCriteria.assignee; - if (assignee?.code === "ASSIGNED_TO_ME") { - data.body.inbox.moduleSearchCriteria.assignee = Digit.UserService.getUser().info.uuid; - } - - //cloning locality and workflow states to format them - // let locality = _.clone(data.body.inbox.moduleSearchCriteria.locality ? data.body.inbox.moduleSearchCriteria.locality : []); - - let selectedOrg = _.clone(data.body.inbox.moduleSearchCriteria.orgId ? data.body.inbox.moduleSearchCriteria.orgId : null); - delete data.body.inbox.moduleSearchCriteria.orgId; - if(selectedOrg) { - data.body.inbox.moduleSearchCriteria.orgId = selectedOrg?.[0]?.applicationNumber; - } - - // let selectedWard = _.clone(data.body.inbox.moduleSearchCriteria.ward ? data.body.inbox.moduleSearchCriteria.ward : null); - // delete data.body.inbox.moduleSearchCriteria.ward; - // if(selectedWard) { - // data.body.inbox.moduleSearchCriteria.ward = selectedWard?.[0]?.code; - // } - - let states = _.clone(data.body.inbox.moduleSearchCriteria.state ? data.body.inbox.moduleSearchCriteria.state : []); - let ward = _.clone(data.body.inbox.moduleSearchCriteria.ward ? data.body.inbox.moduleSearchCriteria.ward : []); - // delete data.body.inbox.moduleSearchCriteria.locality; - delete data.body.inbox.moduleSearchCriteria.state; - delete data.body.inbox.moduleSearchCriteria.ward; - - // locality = locality?.map((row) => row?.code); - states = Object.keys(states)?.filter((key) => states[key]); - ward = ward?.map((row) => row?.code); - - - // //adding formatted data to these keys - // if (locality.length > 0) data.body.inbox.moduleSearchCriteria.locality = locality; - if (states.length > 0) data.body.inbox.moduleSearchCriteria.status = states; - if (ward.length > 0) data.body.inbox.moduleSearchCriteria.ward = ward; - const projectType = _.clone(data.body.inbox.moduleSearchCriteria.projectType ? data.body.inbox.moduleSearchCriteria.projectType : {}); - if (projectType?.code) data.body.inbox.moduleSearchCriteria.projectType = projectType.code; - - //adding tenantId to moduleSearchCriteria - data.body.inbox.moduleSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId(); - - //setting limit and offset becoz somehow they are not getting set in muster inbox - data.body.inbox .limit = data.state.tableForm.limit - data.body.inbox.offset = data.state.tableForm.offset - delete data.state - return data; - }, - postProcess: (responseArray, uiConfig) => { - const statusOptions = responseArray?.statusMap - ?.filter((item) => item.applicationstatus) - ?.map((item) => ({ code: item.applicationstatus, i18nKey: `COMMON_MASTERS_${item.applicationstatus}` })); - if (uiConfig?.type === "filter") { - let fieldConfig = uiConfig?.fields?.filter((item) => item.type === "dropdown" && item.populators.name === "musterRollStatus"); - if (fieldConfig.length) { - fieldConfig[0].populators.options = statusOptions; - } - } - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - if (key === "ATM_MUSTER_ROLL_ID") { - return ( - - - {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} - - - ); - } - if (key === "ATM_ATTENDANCE_WEEK") { - const week = `${Digit.DateUtils.ConvertTimestampToDate(value?.startDate, "dd/MM/yyyy")}-${Digit.DateUtils.ConvertTimestampToDate( - value?.endDate, - "dd/MM/yyyy" - )}`; - return
{week}
; - } - if (key === "ATM_NO_OF_INDIVIDUALS") { - return
{value?.length}
; - } - if(key === "ATM_AMOUNT_IN_RS"){ - return {value ? Digit.Utils.dss.formatterWithoutRound(value, "number") : t("ES_COMMON_NA")}; - } - if (key === "ATM_SLA") { - return parseInt(value) > 0 ? ( - {t(value) || ""} - ) : ( - {t(value) || ""} - ); - } - if (key === "COMMON_WORKFLOW_STATES") { - return {t(`WF_MUSTOR_${value}`)} - } - //added this in case we change the key and not updated here , it'll throw that nothing was returned from cell error if that case is not handled here. To prevent that error putting this default - return {t(`CASE_NOT_HANDLED`)} - }, - MobileDetailsOnClick: (row, tenantId) => { - let link; - Object.keys(row).map((key) => { - if (key === "ATM_MUSTER_ROLL_ID") - link = `/${window.contextPath}/employee/attendencemgmt/view-attendance?tenantId=${tenantId}&musterRollNumber=${row[key]}`; - }); - return link; - }, - populateReqCriteria: () => { - const tenantId = Digit.ULBService.getCurrentTenantId(); - return { - url: "/org-services/organisation/v1/_search", - params: { limit: 50, offset: 0 }, - body: { - SearchCriteria: { - tenantId: tenantId, - functions : { - type : "CBO" - } - }, - }, - config: { - enabled: true, - select: (data) => { - return data?.organisations; - }, - }, - }; - }, - }, - SearchWageSeekerConfig: { - customValidationCheck: (data) => { - //checking both to and from date are present - const { createdFrom, createdTo } = data; - if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) - return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; - - return false; - }, - preProcess: (data) => { - data.params = { ...data.params, tenantId: Digit.ULBService.getCurrentTenantId() }; - - let requestBody = { ...data.body.Individual }; - const pathConfig = { - name: "name.givenName", - }; - const dateConfig = { - createdFrom: "daystart", - createdTo: "dayend", - }; - const selectConfig = { - wardCode: "wardCode[0].code", - socialCategory: "socialCategory.code", - }; - const textConfig = ["name", "individualId"] - let Individual = Object.keys(requestBody) - .map((key) => { - if (selectConfig[key]) { - requestBody[key] = _.get(requestBody, selectConfig[key], null); - } else if (typeof requestBody[key] == "object") { - requestBody[key] = requestBody[key]?.code; - } else if (textConfig?.includes(key)) { - requestBody[key] = requestBody[key]?.trim() - } - return key; - }) - .filter((key) => requestBody[key]) - .reduce((acc, curr) => { - if (pathConfig[curr]) { - _.set(acc, pathConfig[curr], requestBody[curr]); - } else if (dateConfig[curr] && dateConfig[curr]?.includes("day")) { - _.set(acc, curr, Digit.Utils.date.convertDateToEpoch(requestBody[curr], dateConfig[curr])); - } else { - _.set(acc, curr, requestBody[curr]); - } - return acc; - }, {}); - - data.body.Individual = { ...Individual }; - return data; - }, - additionalCustomizations: (row, key, column, value, t, searchResult) => { - //here we can add multiple conditions - //like if a cell is link then we return link - //first we can identify which column it belongs to then we can return relevant result - switch (key) { - case "MASTERS_WAGESEEKER_ID": - return ( - - - {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} - - - ); - - case "MASTERS_SOCIAL_CATEGORY": - return value ? {String(t(`MASTERS_${value}`))} : t("ES_COMMON_NA"); - - case "CORE_COMMON_PROFILE_CITY": - return value ? {String(t(Digit.Utils.locale.getCityLocale(value)))} : t("ES_COMMON_NA"); - - case "MASTERS_WARD": - return value ? ( - {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} - ) : ( - t("ES_COMMON_NA") - ); - - case "MASTERS_LOCALITY": - return value ? ( - {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} - ) : ( - t("ES_COMMON_NA") - ); - default: - return t("ES_COMMON_NA"); - } - }, - MobileDetailsOnClick: (row, tenantId) => { - let link; - Object.keys(row).map((key) => { - if (key === "MASTERS_WAGESEEKER_ID") - link = `/${window.contextPath}/employee/masters/view-wageseeker?tenantId=${tenantId}&wageseekerId=${row[key]}`; - }); - return link; - }, - additionalValidations: (type, data, keys) => { - if (type === "date") { - return data[keys.start] && data[keys.end] ? () => new Date(data[keys.start]).getTime() <= new Date(data[keys.end]).getTime() : true; - } - } - }, -}; diff --git a/frontend/micro-ui/web/src/Customisations/index.js b/frontend/micro-ui/web/src/Customisations/index.js deleted file mode 100644 index 803b1e8763e..00000000000 --- a/frontend/micro-ui/web/src/Customisations/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import { ptComponents } from "./pt"; -import { tlComponents } from "./tl"; - -var Digit = window.Digit || {}; - -const customisedComponent = { - ...ptComponents, - ...tlComponents -} - - - -export const initCustomisationComponents = () => { - Object.entries(customisedComponent).forEach(([key, value]) => { - Digit.ComponentRegistryService.setComponent(key, value); - }); -}; - - diff --git a/frontend/micro-ui/web/src/Customisations/pt/index.js b/frontend/micro-ui/web/src/Customisations/pt/index.js deleted file mode 100644 index 0063fcd4774..00000000000 --- a/frontend/micro-ui/web/src/Customisations/pt/index.js +++ /dev/null @@ -1,13 +0,0 @@ -import PropertyUsageType from "./pageComponents/PropertyUsageType"; -import PTVasikaDetails from "./pageComponents/PTVasikaDetails"; -import PTAllotmentDetails from "./pageComponents/PTAllotmentDetails"; -import PTBusinessDetails from "./pageComponents/PTBusinessDetails"; - - - -export const ptComponents = { - PropertyUsageType: PropertyUsageType, - PTVasikaDetail:PTVasikaDetails, - PTAllotmentDetails:PTAllotmentDetails, - PTBusinessDetails:PTBusinessDetails -}; diff --git a/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTAllotmentDetails.js b/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTAllotmentDetails.js deleted file mode 100644 index 569aa45e409..00000000000 --- a/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTAllotmentDetails.js +++ /dev/null @@ -1,64 +0,0 @@ -import { CardLabel, CitizenInfoLabel, FormStep, LabelFieldPair, TextInput,CardLabelError } from "@egovernments/digit-ui-react-components"; -import React, { useState } from "react"; -var validation ={}; -const PTAllotmentDetails = ({ t, config, onSelect, value, userType, formData }) => { - - const [ - val, setValue - ] = useState(formData?.[config.key]?.alotmentDetails||""); - - const goNext = () => { - onSelect(config.key, {alotmentDetails:val}); - }; - - - if (userType === "employee") { - return ( - - - {t("PT_VASIKA_NO_LABEL") } -
- setValue(e?.target?.value)} - // autoFocus={presentInModifyApplication} - /> -
-
-
- ); - } - return ( - - -
- {`${t("PT_VASIKA_ALLOTMENT_LABEL")}`} - setValue(e?.target?.value)} - - /> -
-
- {} -
- ); -}; - -export default PTAllotmentDetails; diff --git a/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTBusinessDetails.js b/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTBusinessDetails.js deleted file mode 100644 index 3d28785e7e5..00000000000 --- a/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTBusinessDetails.js +++ /dev/null @@ -1,68 +0,0 @@ -import { CardLabel, CitizenInfoLabel, FormStep, LabelFieldPair, TextInput,CardLabelError } from "@egovernments/digit-ui-react-components"; -import React, { useState } from "react"; -var validation ={}; -const PTBusinessDetails = ({ t, config, onSelect, value, userType, formData }) => { - - - const [ - val, setValue - ] = useState(formData?.[config.key]?.businessDetails||""); - - const goNext = () => { - onSelect(config.key, {businessDetails:val}); - }; - - - if (userType === "employee") { - return ( - - - {t("PT_VASIKA_NO_LABEL") } -
- setValue(e?.target?.value)} - // autoFocus={presentInModifyApplication} - /> -
-
- -
- ); - } - return ( - - - -
- {`${t("PT_VASIKA_BUS_DETAILS_LABEL")}`} - setValue(e?.target?.value)} - - /> -
- -
- {} -
- ); -}; - -export default PTBusinessDetails; diff --git a/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTVasikaDetails.js b/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTVasikaDetails.js deleted file mode 100644 index 0e4b6895745..00000000000 --- a/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PTVasikaDetails.js +++ /dev/null @@ -1,79 +0,0 @@ -import { CardLabel, CitizenInfoLabel, FormStep, LabelFieldPair, TextInput,CardLabelError } from "@egovernments/digit-ui-react-components"; -import React, { useState } from "react"; -var validation ={}; -const PTVasikaDetails = ({ t, config, onSelect, value, userType, formData }) => { - - - const [ - val, setValue - ] = useState(formData?.[config.key]?.vasikaNo||""); - const [ - other, setOther - ] = useState(formData?.[config.key]?.vasikaArea||""); - const goNext = () => { - onSelect(config.key, {vasikaNo:val,vasikaArea:other}); - }; - - - if (userType === "employee") { - return ( - - - {t("PT_VASIKA_NO_LABEL") } -
- setValue(e?.target?.value)} - // autoFocus={presentInModifyApplication} - /> -
-
- -
- ); - } - return ( - - - -
- {`${t("PT_VASIKA_NO_LABEL")}`} - setValue(e?.target?.value)} - - /> -
- {`${t("PT_VASIKA_AREA_LABEL")}`} - setOther(e?.target?.value)} - /> -
- {} -
- ); -}; - -export default PTVasikaDetails; diff --git a/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PropertyUsageType.js b/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PropertyUsageType.js deleted file mode 100644 index deade4fc2ad..00000000000 --- a/frontend/micro-ui/web/src/Customisations/pt/pageComponents/PropertyUsageType.js +++ /dev/null @@ -1,134 +0,0 @@ -import { - CardLabel, CardLabelError, CitizenInfoLabel, Dropdown, FormStep, LabelFieldPair, RadioButtons -} from "@egovernments/digit-ui-react-components"; -import React, { useEffect, useState } from "react"; -import { useLocation } from "react-router-dom"; - -var Digit = window.Digit || {}; - -const PropertyUsageType = ({ t, config, onSelect, userType, formData, formState, setError, clearErrors, onBlur }) => { - const [usageCategoryMajor, setPropertyPurpose] = useState( - formData?.usageCategoryMajor && formData?.usageCategoryMajor?.code === "NONRESIDENTIAL.OTHERS" - ? { code: `${formData?.usageCategoryMajor?.code}`, i18nKey: `PROPERTYTAX_BILLING_SLAB_OTHERS` } - : formData?.usageCategoryMajor - ); - - const tenantId = Digit.ULBService.getCurrentTenantId(); - const stateId = tenantId.split(".")[0]; - const { data: Menu = { }, isLoading: menuLoading } = Digit.Hooks.pt.usePropertyMDMS(stateId, "PropertyTax", "UsageCategory") || { }; - let usagecat = []; - usagecat = Menu?.PropertyTax?.UsageCategory || []; - let i; - let menu = []; - - const { pathname } = useLocation(); - const presentInModifyApplication = pathname.includes("modify"); - - function usageCategoryMajorMenu(usagecat) { - if (userType === "employee") { - const catMenu = usagecat - ?.filter((e) => e?.code.split(".").length <= 2 && e.code !== "NONRESIDENTIAL") - ?.map((item) => { - const arr = item?.code.split("."); - if (arr.length == 2) return { i18nKey: "PROPERTYTAX_BILLING_SLAB_" + arr[1], code: item?.code }; - else return { i18nKey: "PROPERTYTAX_BILLING_SLAB_" + item?.code, code: item?.code }; - }); - return catMenu; - } else { - for (i = 0; i < 10; i++) { - if ( - Array.isArray(usagecat) && - usagecat.length > 0 && - usagecat[i].code.split(".")[0] == "NONRESIDENTIAL" && - usagecat[i].code.split(".").length == 2 - ) { - menu.push({ i18nKey: "PROPERTYTAX_BILLING_SLAB_" + usagecat[i].code.split(".")[1], code: usagecat[i].code }); - } - } - return menu; - } - } - - useEffect(() => { - if (!menuLoading && presentInModifyApplication && userType === "employee") { - const original = formData?.originalData?.usageCategory; - const selectedOption = usageCategoryMajorMenu(usagecat).filter((e) => e.code === original)[0]; - setPropertyPurpose(selectedOption); - } - }, [menuLoading]); - - const onSkip = () => onSelect(); - - - function selectPropertyPurpose(value) { - setPropertyPurpose(value); - } - - function goNext() { - if (usageCategoryMajor?.i18nKey === "PROPERTYTAX_BILLING_SLAB_OTHERS") { - usageCategoryMajor.i18nKey = "PROPERTYTAX_BILLING_SLAB_NONRESIDENTIAL"; - onSelect(config.key, usageCategoryMajor); - } else { - onSelect(config.key, usageCategoryMajor); - } - } - - useEffect(() => { - if (userType === "employee") { - if (!usageCategoryMajor) { - setError(config.key, { type: "required", message: t(`CORE_COMMON_REQUIRED_ERRMSG`) }); - } else { - clearErrors(config.key); - } - goNext(); - } - }, [usageCategoryMajor]); - - if (userType === "employee") { - return ( - - - {t("PT_ASSESMENT_INFO_USAGE_TYPE") + " *"} - { - selectPropertyPurpose(e); - }} - optionKey="i18nKey" - onBlur={onBlur} - t={t} - /> - - {formState.touched[config.key] ? ( - - {formState.errors?.[config.key]?.message} - - ) : null} - - ); - } - - return ( - - -
- -
-
- {} -
- ); -}; - -export default PropertyUsageType; diff --git a/frontend/micro-ui/web/src/Customisations/tl/TLCustomisation.js b/frontend/micro-ui/web/src/Customisations/tl/TLCustomisation.js deleted file mode 100644 index 642acc52090..00000000000 --- a/frontend/micro-ui/web/src/Customisations/tl/TLCustomisation.js +++ /dev/null @@ -1,5 +0,0 @@ -export const TLCustomisations = { - customiseCreateFormData: (formData, licenceObject) => licenceObject, - customiseRenewalCreateFormData: (formData, licenceObject) => licenceObject, - customiseSendbackFormData: (formData, licenceObject) => licenceObject -} \ No newline at end of file diff --git a/frontend/micro-ui/web/src/Customisations/tl/index.js b/frontend/micro-ui/web/src/Customisations/tl/index.js deleted file mode 100644 index fe2ae4f4e6a..00000000000 --- a/frontend/micro-ui/web/src/Customisations/tl/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import TLUsageType from "./pageComponents/PropertyUsageType"; - - - -export const tlComponents = { - TLPropertyUsageType: TLUsageType, -}; diff --git a/frontend/micro-ui/web/src/Customisations/tl/pageComponents/PropertyUsageType.js b/frontend/micro-ui/web/src/Customisations/tl/pageComponents/PropertyUsageType.js deleted file mode 100644 index 5520a66fc5a..00000000000 --- a/frontend/micro-ui/web/src/Customisations/tl/pageComponents/PropertyUsageType.js +++ /dev/null @@ -1,136 +0,0 @@ -import { - CardLabel, CardLabelError, CitizenInfoLabel, Dropdown, FormStep, LabelFieldPair, RadioButtons -} from "@egovernments/digit-ui-react-components"; -import React, { useEffect, useState } from "react"; -import { useLocation } from "react-router-dom"; - -var Digit = window.Digit || {}; - -const TLUsageType = ({ t, config, onSelect, userType, formData, formState, setError, clearErrors, onBlur }) => { - const [usageCategoryMajor, setPropertyPurpose] = useState( - formData?.usageCategoryMajor && formData?.usageCategoryMajor?.code === "NONRESIDENTIAL.OTHERS" - ? { code: `${formData?.usageCategoryMajor?.code}`, i18nKey: `PROPERTYTAX_BILLING_SLAB_OTHERS` } - : formData?.usageCategoryMajor - ); - - const tenantId = Digit.ULBService.getCurrentTenantId(); - const stateId = tenantId.split(".")[0]; - const { data: Menu = { }, isLoading: menuLoading } = Digit.Hooks.pt.usePropertyMDMS(stateId, "PropertyTax", "UsageCategory") || { }; - let usagecat = []; - usagecat = Menu?.PropertyTax?.UsageCategory || []; - let i; - let menu = []; - - const { pathname } = useLocation(); - const presentInModifyApplication = pathname.includes("modify"); - - function usageCategoryMajorMenu(usagecat) { - if (userType === "employee") { - const catMenu = usagecat - ?.filter((e) => e?.code.split(".").length <= 2 && e.code !== "NONRESIDENTIAL") - ?.map((item) => { - const arr = item?.code.split("."); - if (arr.length == 2) return { i18nKey: "PROPERTYTAX_BILLING_SLAB_" + arr[1], code: item?.code }; - else return { i18nKey: "PROPERTYTAX_BILLING_SLAB_" + item?.code, code: item?.code }; - }); - return catMenu; - } else { - for (i = 0; i < 10; i++) { - if ( - Array.isArray(usagecat) && - usagecat.length > 0 && - usagecat[i].code.split(".")[0] == "NONRESIDENTIAL" && - usagecat[i].code.split(".").length == 2 - ) { - menu.push({ i18nKey: "PROPERTYTAX_BILLING_SLAB_" + usagecat[i].code.split(".")[1], code: usagecat[i].code }); - } - } - return menu; - } - } - - useEffect(() => { - if (!menuLoading && presentInModifyApplication && userType === "employee") { - const original = formData?.originalData?.usageCategory; - const selectedOption = usageCategoryMajorMenu(usagecat).filter((e) => e.code === original)[0]; - setPropertyPurpose(selectedOption); - } - }, [menuLoading]); - - const onSkip = () => onSelect(); - - - function selectPropertyPurpose(value) { - setPropertyPurpose(value); - } - - function goNext() { - if (usageCategoryMajor?.i18nKey === "PROPERTYTAX_BILLING_SLAB_OTHERS") { - usageCategoryMajor.i18nKey = "PROPERTYTAX_BILLING_SLAB_NONRESIDENTIAL"; - onSelect(config.key, usageCategoryMajor); - } else { - onSelect(config.key, usageCategoryMajor); - } - } - - useEffect(() => { - if (userType === "employee") { - if (!usageCategoryMajor) { - setError(config.key, { type: "required", message: t(`CORE_COMMON_REQUIRED_ERRMSG`) }); - } else { - clearErrors(config.key); - } - goNext(); - } - }, [usageCategoryMajor]); - - if (userType === "employee") { - return ( - - - {t("PT_ASSESMENT_INFO_USAGE_TYPE") + " *"} - { - selectPropertyPurpose(e); - }} - optionKey="i18nKey" - onBlur={onBlur} - t={t} - /> - - {formState.touched[config.key] ? ( - - {formState.errors?.[config.key]?.message} - - ) : null} - - ); - } - - return ( - - -
- - - -
-
- {} -
- ); -}; - -export default TLUsageType; diff --git a/frontend/micro-ui/web/src/index.css b/frontend/micro-ui/web/src/index.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/frontend/micro-ui/web/src/index.js b/frontend/micro-ui/web/src/index.js deleted file mode 100644 index 9f20bf1b506..00000000000 --- a/frontend/micro-ui/web/src/index.js +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import { initLibraries } from "@egovernments/digit-ui-libraries"; -import "./index.css"; -import App from './App'; -import { TLCustomisations } from './Customisations/tl/TLCustomisation'; - - -initLibraries(); - - -window.Digit.Customizations = { PGR: {} ,TL:TLCustomisations}; - -const user = window.Digit.SessionStorage.get("User"); - -if (!user || !user.access_token || !user.info) { - // login detection - - const parseValue = (value) => { - try { - return JSON.parse(value) - } catch (e) { - return value - } - } - - const getFromStorage = (key) => { - const value = window.localStorage.getItem(key); - return value && value !== "undefined" ? parseValue(value) : null; - } - - const token = getFromStorage("token") - - const citizenToken = getFromStorage("Citizen.token") - const citizenInfo = getFromStorage("Citizen.user-info") - const citizenTenantId = getFromStorage("Citizen.tenant-id") - - const employeeToken = getFromStorage("Employee.token") - const employeeInfo = getFromStorage("Employee.user-info") - const employeeTenantId = getFromStorage("Employee.tenant-id") - const userType = token === citizenToken ? "citizen" : "employee"; - - window.Digit.SessionStorage.set("user_type", userType); - window.Digit.SessionStorage.set("userType", userType); - - const getUserDetails = (access_token, info) => ({ token: access_token, access_token, info }) - - const userDetails = userType === "citizen" ? getUserDetails(citizenToken, citizenInfo) : getUserDetails(employeeToken, employeeInfo) - - window.Digit.SessionStorage.set("User", userDetails); - window.Digit.SessionStorage.set("Citizen.tenantId", citizenTenantId); - window.Digit.SessionStorage.set("Employee.tenantId", employeeTenantId); - // end -} - -ReactDOM.render( - - - , - document.getElementById('root') -); - diff --git a/frontend/micro-ui/web/src/setupProxy.js b/frontend/micro-ui/web/src/setupProxy.js deleted file mode 100644 index 1b8eda94a19..00000000000 --- a/frontend/micro-ui/web/src/setupProxy.js +++ /dev/null @@ -1,30 +0,0 @@ -const { createProxyMiddleware } = require("http-proxy-middleware"); -const createProxy = createProxyMiddleware({ - target: process.env.REACT_APP_PROXY_URL, - changeOrigin: true, -}); -module.exports = function (app) { - [ - "/egov-mdms-service", - "/egov-location", - "/localization", - "/egov-workflow-v2", - "/pgr-services", - "/filestore", - "/egov-hrms", - "/user-otp", - "/user", - "/fsm", - "/billing-service", - "/collection-services", - "/pdf-service", - "/pg-service", - "/vehicle", - "/vendor", - "/property-services", - "/fsm-calculator/v1/billingSlab/_search", - "/muster-roll" - ].forEach((location) => - app.use(location, createProxy) - ); -}; diff --git a/frontend/micro-ui/web/webpack.config.js b/frontend/micro-ui/web/webpack.config.js deleted file mode 100644 index 5f3dc46967a..00000000000 --- a/frontend/micro-ui/web/webpack.config.js +++ /dev/null @@ -1,43 +0,0 @@ -const path = require("path"); -const HtmlWebpackPlugin = require("html-webpack-plugin"); -const { CleanWebpackPlugin } = require("clean-webpack-plugin"); -// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; - -module.exports = { - // mode: 'development', - entry: "./src/index.js", - devtool: "none", - module: { - rules: [ - { - test: /\.(js)$/, - use: ["babel-loader"], - }, - { - test: /\.css$/i, - use: ["style-loader", "css-loader"], - } - ], - }, - output: { - filename: "[name].bundle.js", - path: path.resolve(__dirname, "build"), - publicPath: "/digit-ui/", - }, - optimization: { - splitChunks: { - chunks: 'all', - minSize:20000, - maxSize:50000, - enforceSizeThreshold:50000, - minChunks:1, - maxAsyncRequests:30, - maxInitialRequests:30 - }, - }, - plugins: [ - new CleanWebpackPlugin(), - // new BundleAnalyzerPlugin(), - new HtmlWebpackPlugin({ inject: true, template: "public/index.html" }), - ], -}; \ No newline at end of file diff --git a/frontend/micro-ui/web/workbench/App.js b/frontend/micro-ui/web/workbench/App.js deleted file mode 100644 index 93b15440c5e..00000000000 --- a/frontend/micro-ui/web/workbench/App.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * The above code initializes various Digit UI modules and components, sets up customizations, and - * renders the DigitUI component based on the enabled modules and state code. - * @returns The `App` component is being returned, which renders the `DigitUI` component with the - * specified props such as `stateCode`, `enabledModules`, `moduleReducers`, and `defaultLanding`. The - * `DigitUI` component is responsible for rendering the UI based on the provided configuration and - * modules. - */ -import React from "react"; -import { initLibraries } from "@egovernments/digit-ui-libraries"; -import { DigitUI } from "@egovernments/digit-ui-module-core"; -// import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; -import { UICustomizations } from "./Customisations/UICustomizations"; -import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench"; -import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; -import { initWorkbenchHCMComponents } from "@egovernments/digit-ui-module-hcmworkbench"; -import { initCampaignComponents } from "@egovernments/digit-ui-module-campaign-manager" - -window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); - -const enabledModules = [ - "DSS", - "NDSS", - "Utilities", - // "HRMS", - "Engagement", - "Workbench", - "HCMWORKBENCH", - "Campaign" -]; - -const moduleReducers = (initData) => ({ - initData, -}); - -const initDigitUI = () => { - window.Digit.ComponentRegistryService.setupRegistry({}); - window.Digit.Customizations = { - PGR: {}, - commonUiConfig: UICustomizations, - }; - // initHRMSComponents(); - initUtilitiesComponents(); - initWorkbenchComponents(); - initWorkbenchHCMComponents(); - initCampaignComponents(); - -}; - -initLibraries().then(() => { - initDigitUI(); -}); - -function App() { - window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); - const stateCode = - window.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || - process.env.REACT_APP_STATE_LEVEL_TENANT_ID; - if (!stateCode) { - return

stateCode is not defined

; - } - return ( - - ); -} - -export default App; diff --git a/frontend/micro-ui/web/workbench/Dockerfile b/frontend/micro-ui/web/workbench/Dockerfile deleted file mode 100644 index 31b3912759b..00000000000 --- a/frontend/micro-ui/web/workbench/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -FROM egovio/alpine-node-builder-14:yarn AS build -#FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build -RUN apk update && apk upgrade -RUN apk add --no-cache git>2.30.0 -ARG WORK_DIR -WORKDIR /app -ENV NODE_OPTIONS "--max-old-space-size=4792" - -COPY ${WORK_DIR} . -RUN ls -lah - -#RUN node web/envs.js -RUN cd web/ \ - && node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' \ - && node -e 'console.log("core only")' \ - && cd workbench/ \ - && ./install-deps.sh \ - && cd ../ \ - && yarn install \ - && yarn build:webpack - -FROM nginx:mainline-alpine -#FROM ghcr.io/egovernments/nginx:mainline-alpine -ENV WORK_DIR=/var/web/workbench-ui - -RUN mkdir -p ${WORK_DIR} - -COPY --from=build /app/web/build ${WORK_DIR}/ -COPY --from=build /app/web/workbench/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/frontend/micro-ui/web/workbench/install-deps.sh b/frontend/micro-ui/web/workbench/install-deps.sh deleted file mode 100755 index 54b8a4c3d7f..00000000000 --- a/frontend/micro-ui/web/workbench/install-deps.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -BRANCH="$(git branch --show-current)" - -echo "Main Branch: $BRANCH" - -INTERNALS="micro-ui-internals" -cd .. - -cp workbench/App.js src -cp workbench/package.json package.json -cp workbench/webpack.config.js webpack.config.js -cp workbench/inter-package.json $INTERNALS/package.json - -cp $INTERNALS/example/src/UICustomizations.js src/Customisations - -echo "UI :: workbench " && echo "Branch: $(git branch --show-current)" && echo "$(git log -1 --pretty=%B)" && echo "installing packages" - diff --git a/frontend/micro-ui/web/workbench/inter-package.json b/frontend/micro-ui/web/workbench/inter-package.json deleted file mode 100644 index 5216443ec23..00000000000 --- a/frontend/micro-ui/web/workbench/inter-package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "egovernments", - "version": "1.0.0", - "main": "index.js", - "workspaces": [ - "example", - "packages/css", - "packages/modules/*" - ], - "author": "JaganKumar ", - "license": "MIT", - "private": true, - "engines": { - "node": ">=14" - }, - "scripts": { - "start": "SKIP_PREFLIGHT_CHECK=true run-s build start:dev", - "sprint": "SKIP_PREFLIGHT_CHECK=true run-s start:script", - "start:dev": "run-p dev:**", - "start:script": "./scripts/create.sh", - "dev:css": "cd packages/css && yarn start", - "publish:css": "cd packages/css && yarn publish --access public", - "dev:example": "cd example && yarn start", - "dev:campaign": "cd packages/modules/campaign-manager && yarn start", - "build": "run-p build:**", - "build:campaign": "cd packages/modules/campaign-manager && yarn build", - "deploy:jenkins": "./scripts/jenkins.sh", - "clean": "rm -rf node_modules" - }, - "resolutions": { - "**/@babel/runtime": "7.20.1", - "**/babel-preset-react-app": "10.0.0", - "**/ajv": "8.11.2", - "fast-uri":"2.1.0" - }, - "devDependencies": { - "husky": "7.0.4", - "lint-staged": "12.3.7", - "npm-run-all": "4.1.5", - "prettier": "2.1.2" - }, - "husky": {}, - "lint-staged": { - "*.{js,css,md}": "prettier --write" - }, - "dependencies": { - "lodash": "4.17.21", - "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.2-beta.1", - "@egovernments/digit-ui-components": "0.0.2-beta.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "react-router-dom": "5.3.0" - } -} diff --git a/frontend/micro-ui/web/workbench/nginx.conf b/frontend/micro-ui/web/workbench/nginx.conf deleted file mode 100644 index 974ef82f241..00000000000 --- a/frontend/micro-ui/web/workbench/nginx.conf +++ /dev/null @@ -1,12 +0,0 @@ -server -{ - listen 80; - underscores_in_headers on; - - location /workbench-ui - { - root /var/web; - index index.html index.htm; - try_files $uri $uri/ /workbench-ui/index.html; - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/workbench/package.json b/frontend/micro-ui/web/workbench/package.json deleted file mode 100644 index 7cc60ef7bff..00000000000 --- a/frontend/micro-ui/web/workbench/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "micro-ui", - "version": "1.0.0", - "author": "Jagankumar ", - "license": "MIT", - "private": true, - "engines": { - "node": ">=14" - }, - "workspaces": [ - "micro-ui-internals/packages/modules/*" - ], - "homepage": "/workbench-ui", - "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.2-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.2-beta.3", - "@egovernments/digit-ui-components": "0.0.2-beta.1", - "@egovernments/digit-ui-module-core": "1.8.2-beta.2", - "@egovernments/digit-ui-module-utilities": "1.0.1-beta.30", - "@egovernments/digit-ui-react-components": "1.8.2-beta.6", - "@egovernments/digit-ui-module-hcmworkbench":"0.0.38", - "@egovernments/digit-ui-module-campaign-manager": "0.0.1", - "babel-loader": "8.1.0", - "clean-webpack-plugin": "4.0.0", - "react": "17.0.2", - "react-dom": "17.0.2", - "jsonpath": "^1.1.1", - "react-router-dom": "5.3.0", - "react-scripts": "4.0.1", - "web-vitals": "1.1.2", - "terser-brunch": "^4.1.0", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "css-loader": "5.2.6", - "style-loader": "2.0.0", - "webpack-cli": "4.10.0" - }, - "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "7.21.0", - "http-proxy-middleware": "1.3.1", - "lodash": "4.17.21", - "microbundle-crl": "0.13.11", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-hook-form": "6.15.8", - "react-i18next": "11.16.2", - "react-query": "3.6.1", - "react-router-dom": "5.3.0", - "husky": "7.0.4", - "lint-staged": "12.3.7", - "npm-run-all": "4.1.5", - "prettier": "2.1.2" - }, - "resolutions": { - "**/babel-loader": "8.2.2", - "**/@babel/core": "7.14.0", - "**/@babel/preset-env": "7.14.0", - "**/@babel/plugin-transform-modules-commonjs": "7.14.0", - "**/polished":"4.2.2", - "fast-uri":"2.1.0" - }, - "scripts": { - "start": "react-scripts start", - "build": "GENERATE_SOURCEMAP=false SKIP_PREFLIGHT_CHECK=true react-scripts build", - "build:prepare": "./build.sh", - "build:libraries": "cd micro-ui-internals && yarn build", - "build:prod": "webpack --mode production", - "build:webpack": "yarn build:libraries &&cd .. && ls && cd ./web && ls && yarn build:prod", - "clean": "rm -rf node_modules" - }, - "eslintConfig": { - "extends": [ - "react-app" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} diff --git a/frontend/micro-ui/web/workbench/webpack.config.js b/frontend/micro-ui/web/workbench/webpack.config.js deleted file mode 100644 index c19e631fe01..00000000000 --- a/frontend/micro-ui/web/workbench/webpack.config.js +++ /dev/null @@ -1,44 +0,0 @@ -const path = require("path"); -const HtmlWebpackPlugin = require("html-webpack-plugin"); -const { CleanWebpackPlugin } = require("clean-webpack-plugin"); -// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; - -module.exports = { - // mode: 'development', - entry: "./src/index.js", - devtool: "none", - module: { - rules: [ - { - test: /\.(js)$/, - exclude: /node_modules/, - use: ["babel-loader"], - }, - { - test: /\.css$/i, - use: ["style-loader", "css-loader"], - } - ], - }, - output: { - filename: "[name].bundle.js", - path: path.resolve(__dirname, "build"), - publicPath: "/workbench-ui/", - }, - optimization: { - splitChunks: { - chunks: 'all', - minSize:20000, - maxSize:50000, - enforceSizeThreshold:50000, - minChunks:1, - maxAsyncRequests:30, - maxInitialRequests:30 - }, - }, - plugins: [ - new CleanWebpackPlugin(), - // new BundleAnalyzerPlugin(), - new HtmlWebpackPlugin({ inject: true, template: "public/index.html" }), - ], -}; \ No newline at end of file diff --git a/health-services/project-factory/CHANGELOG.md b/health-services/project-factory/CHANGELOG.md index 55f990d91ba..8781f319963 100644 --- a/health-services/project-factory/CHANGELOG.md +++ b/health-services/project-factory/CHANGELOG.md @@ -8,3 +8,9 @@ All notable changes to this module will be documented in this file. 3. Create Data: Validates and creates resource details of type facility,user and boundary. 4. Generate Data: Generates sheet data of type facility,user and boundary. 5. Boundary and Resource Validation: Validates boundaries and resources during campaign creation and updating. + +## 0.2.0 - 2024-08-7 +#### ProjectFactory service version 0.2 + 1. Timeline integration for workflow of campaign. + 2. Call user, facility and boundary generate when boundaries changed in campaign update flow + 3. Generate target template based on delivery conditions changed to anything from default. diff --git a/health-services/project-factory/README.md b/health-services/project-factory/README.md index 40aee6d33bc..0b545626fe6 100644 --- a/health-services/project-factory/README.md +++ b/health-services/project-factory/README.md @@ -1,84 +1,93 @@ -# ProjectFactory-Service +# ProjectFactory Service -The Project Factory Service is responsible for managing project-type campaigns, including creating, updating, searching, and creating campaigns. +The **ProjectFactory Service** is responsible for managing project-type campaigns, including creating, updating, searching, and generating campaign data. -### DB UML Diagram +## DB UML Diagram -![image](https://github.com/egovernments/DIGIT-Frontend/assets/137176738/8c43998d-742b-4629-ae90-63ab2b18772b) -![image](https://github.com/egovernments/DIGIT-Frontend/assets/137176738/3ff9609d-771a-4c6e-a769-54766e7111f7) +![DB UML Diagram](https://github.com/egovernments/DIGIT-Frontend/assets/137176738/8c43998d-742b-4629-ae90-63ab2b18772b) +![DB UML Diagram](https://github.com/egovernments/DIGIT-Frontend/assets/137176738/3ff9609d-771a-4c6e-a769-54766e7111f7) +## Service Dependencies -### Service Dependencies +### Core Services -#### Core services +- `egov-localization` +- `egov-filestore` +- `egov-persister` +- `egov-mdms` +- `egov-idgen` +- `egov-boundaryservice-v2` -- egov-localization -- egov-filestore -- egov-persister -- egov-mdms -- egov-idgen -- egov-boundaryservice-v2 +### Health Services -#### Health services -- health-project -- health-hrms -- health-facility +- `health-project` +- `health-hrms` +- `health-facility` -### Swagger API Contract -Please refer to the below Swagger API contract, for ProjectFactory service to understand the structure of APIs and to have visualization of all internal APIs [Swagger API contract](https://editor.swagger.io/?url=https://raw.githubusercontent.com/jagankumar-egov/DIGIT-Specs/hcm-workbench/Domain%20Services/Health/project-factory.yaml) +### Caching +- `Redis` is now used to store cache for frequently accessed data to improve performance. + +## Swagger API Contract + +For the structure and visualization of APIs, refer to the [Swagger API contract](https://editor.swagger.io/?url=https://raw.githubusercontent.com/jagankumar-egov/DIGIT-Specs/hcm-workbench/Domain%20Services/Health/project-factory.yaml). ## Service Details -### Funcatinality -1. ProjectFactory Service manages campaigns: creation, updating, searching, and data generation. -2. Project Mapping : In campaign creation full project mapping is done with staff, facility and resources along with proper target values. -3. Create Data: Validates and creates resource details of type facility,user and boundary. -4. Generate Data: Generates sheet data of type facility,user and boundary. -5. Boundary and Resource Validation: Validates boundaries and resources during campaign creation and updating. - -### Feature -1. Functionality to create campaigns easily. -2. Uploading generated datas sheets to filestore and return filestore id for easy access. -3. Supports localisation. -4. Customizable Delivery Rules: Allows defining delivery rules for projects based on specific criteria. -5. Search and Filtering: Enables searching and filtering campaigns based on various parameters like status, date, and creator. -6. Batch Processing: Supports batch processing for creating and updating multiple campaigns simultaneously. +### Functionality + +1. **Campaign Management**: Manages project-type campaigns, including creation, updating, searching, and data generation. +2. **Project Mapping**: Completes full project mapping with staff, facility, and resources along with proper target values during campaign creation. +3. **Data Creation**: Validates and creates resource details of types `facility`, `user`, and `boundary`. +4. **Data Generation**: Generates sheet data of types `facility`, `user`, and `boundary`. +5. **Validation**: Validates boundaries and resources during campaign creation and updating. + +### Features + +1. **Easy Campaign Creation**: Facilitates easy creation of campaigns. +2. **File Storage**: Uploads generated data sheets to `egov-filestore` and returns the file store ID for easy access. +3. **Localization Support**: Supports localization for multi-language adaptability. +4. **Customizable Delivery Rules**: Allows defining delivery rules for projects based on specific criteria. +5. **Search and Filtering**: Enables searching and filtering campaigns based on parameters like status, date, and creator. +6. **Batch Processing**: Supports batch processing for creating and updating multiple campaigns simultaneously. +7. **Caching with Redis**: Improves performance by caching frequently accessed data. ### External Libraries Used -[xlsx](https://github.com/SheetJS/sheetjs):- For reading and writing Excel files. -[ajv](https://github.com/ajv-validator/ajv):- For JSON schema validation. +- **[xlsx](https://github.com/SheetJS/sheetjs)**: For reading and writing Excel files. +- **[ajv](https://github.com/ajv-validator/ajv)**: For JSON schema validation. +- **[lodash](https://github.com/lodash/lodash)**: For utility functions like data manipulation and object iteration. -[lodash](https://github.com/lodash/lodash):- For utility functions like data manipulation and object iteration. +## Configuration +- **Persister Config**: [Link](https://github.com/egovernments/configs/blob/UNIFIED-UAT/health/egov-persister/project-factory-persister.yml) +- **Helm Chart Details**: [Link](https://github.com/egovernments/DIGIT-DevOps/blob/unified-env/deploy-as-code/helm/charts/health-services/project-factory/values.yaml) -### Configuration +## API Endpoints -- Persister config: [here](https://github.com/egovernments/configs/blob/UNIFIED-UAT/health/egov-persister/project-factory-persister.yml) -- Helm chart details: [here](https://github.com/egovernments/DIGIT-DevOps/blob/unified-env/deploy-as-code/helm/charts/health-services/project-factory/values.yaml) - -### API Endpoints +- **`POST /project-factory/v1/project-type/create`**: Creates a new project-type campaign. +- **`PUT /project-factory/v1/project-type/update`**: Updates an existing project-type campaign. +- **`POST /project-factory/v1/project-type/search`**: Searches for project-type campaigns based on specified criteria. +- **`POST /project-factory/v1/data/_create`**: Creates or validates resource data (e.g., facility, user, boundary). +- **`POST /project-factory/v1/data/_search`**: Searches for resource data based on specified criteria. +- **`POST /project-factory/v1/data/_generate`**: Initiates the generation of new data based on provided parameters. +- **`GET /project-factory/v1/data/_download`**: Downloads resource data based on specified criteria. -- `/project-factory/v1/project-type/create`: Creates a new project type campaign. -- `/project-factory/v1/project-type/update`: Updates an existing project type campaign. -- `/project-factory/v1/project-type/search`: Searches for project type campaigns based on specified criteria. -- `/project-factory/v1/data/_create`: Creates or validates resource data (e.g., facility, user, boundary). -- `/project-factory/v1/data/_search`: Searches for resource data based on specified criteria. -- `/project-factory/v1/data/_generate`: Initiates the generation of new data based on provided parameters. -- `/project-factory/v1/data/_download`: Downloads resource data based on specified criteria. +## Kafka Consumers +- **`start-campaign-mapping`**: Initiates the mapping process for campaigns. -### Kafka Consumers +## Kafka Producers -- start-campaign-mapping: This topic is used by the service to initiate the mapping process for campaigns. +- **`save-project-campaign-details`**: Saves project campaign details after creation. +- **`update-project-campaign-details`**: Updates project campaign details. +- **`create-resource-details`**: Creates resource details. +- **`update-resource-details`**: Updates resource details. +- **`create-resource-activity`**: Creates resource activity. +- **`create-generated-resource-details`**: Saves details for generated resources. +- **`update-generated-resource-details`**: Updates details for generated resources. -### Kafka Producers +## Redis Caching -- save-project-campaign-details: This topic is used to save project campaign details after creation. -- update-project-campaign-details: This topic is used to update project campaign details. -- create-resource-details: This topic is used to create resource details. -- update-resource-details: This topic is used to update resource details. -- create-resource-activity: This topic is used to create resource activity creation. -- create-generated-resource-details: This topic is used to save details for generated resources. -- update-generated-resource-details: This topic is used to update details for generated resources. +- **Purpose**: Enhances performance by caching frequently accessed data and reducing the load on the database. +- **Usage**: Commonly used to store temporary data like search results, and other frequently accessed resources. diff --git a/health-services/project-factory/migration/main/V20240624210000__generated_resource_details_alter_column.sql b/health-services/project-factory/migration/main/V20240624210000__generated_resource_details_alter_column.sql new file mode 100644 index 00000000000..dfd13713c78 --- /dev/null +++ b/health-services/project-factory/migration/main/V20240624210000__generated_resource_details_alter_column.sql @@ -0,0 +1,13 @@ +DO $$ +DECLARE + table_name1 TEXT := 'eg_cm_generated_resource_details'; + column_name1 TEXT := 'campaignId'; +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM information_schema.columns + WHERE table_name = table_name1 + AND column_name = column_name1 + ) THEN + EXECUTE format('ALTER TABLE %I ADD COLUMN %I character varying(128);', table_name1, column_name1); + END IF; +END $$; \ No newline at end of file diff --git a/health-services/project-factory/migration/main/V20240625141100__process_details_ddl.sql b/health-services/project-factory/migration/main/V20240625141100__process_details_ddl.sql new file mode 100644 index 00000000000..e7b4037bd8d --- /dev/null +++ b/health-services/project-factory/migration/main/V20240625141100__process_details_ddl.sql @@ -0,0 +1,11 @@ +CREATE TABLE health.eg_cm_campaign_process ( + id VARCHAR(128) PRIMARY KEY, + campaignId VARCHAR(128) NOT NULL, + type VARCHAR(128), + status VARCHAR(128), + details JSONB, + createdtime BIGINT, + lastmodifiedtime BIGINT, + additionaldetails JSONB, + CONSTRAINT fk_campaignId FOREIGN KEY (campaignId) REFERENCES health.eg_cm_campaign_details(id) +); diff --git a/health-services/project-factory/migration/main/V20240708153000__generated_resource_detail_alter_column.sql b/health-services/project-factory/migration/main/V20240708153000__generated_resource_detail_alter_column.sql new file mode 100644 index 00000000000..a67a8061f42 --- /dev/null +++ b/health-services/project-factory/migration/main/V20240708153000__generated_resource_detail_alter_column.sql @@ -0,0 +1,24 @@ +DO $$ +DECLARE + table_name1 TEXT := 'eg_cm_generated_resource_details'; + column_name1 TEXT := 'campaignId'; + column_name2 TEXT := 'campaignid'; +BEGIN + -- Check if "campaignId" column exists and drop it if it does + IF EXISTS ( + SELECT 1 FROM information_schema.columns + WHERE table_name = table_name1 + AND column_name = column_name1 + ) THEN + EXECUTE format('ALTER TABLE %I DROP COLUMN %I;', table_name1, column_name1); + END IF; + + -- Check if "campaignid" column exists (case-insensitive) and create it if it doesn't + IF NOT EXISTS ( + SELECT 1 FROM information_schema.columns + WHERE table_name = table_name1 + AND lower(column_name) = lower(column_name2) + ) THEN + EXECUTE format('ALTER TABLE %I ADD COLUMN %I character varying(128);', table_name1, column_name2); + END IF; +END $$; diff --git a/health-services/project-factory/migration/main/V20240725155100__remove_constraint_process_details.sql b/health-services/project-factory/migration/main/V20240725155100__remove_constraint_process_details.sql new file mode 100644 index 00000000000..9142fc152e0 --- /dev/null +++ b/health-services/project-factory/migration/main/V20240725155100__remove_constraint_process_details.sql @@ -0,0 +1,3 @@ +-- Migration script to remove the foreign key constraint +ALTER TABLE eg_cm_campaign_process DROP CONSTRAINT IF EXISTS fk_campaignId; +ALTER TABLE eg_cm_resource_activity DROP CONSTRAINT IF EXISTS eg_cm_resource_activity_resourceDetailsId_fkey; \ No newline at end of file diff --git a/health-services/project-factory/migration/main/V20240731162600__add_uniqiue_constraint_process_track.sql b/health-services/project-factory/migration/main/V20240731162600__add_uniqiue_constraint_process_track.sql new file mode 100644 index 00000000000..d9bfbd0af53 --- /dev/null +++ b/health-services/project-factory/migration/main/V20240731162600__add_uniqiue_constraint_process_track.sql @@ -0,0 +1,10 @@ +-- Step 1: Remove duplicate rows +DELETE FROM eg_cm_campaign_process a +USING health.eg_cm_campaign_process b +WHERE a.id < b.id +AND a.campaignId = b.campaignId +AND a.type = b.type; + +-- Step 2: Add the unique constraint +ALTER TABLE eg_cm_campaign_process +ADD CONSTRAINT uq_campaignId_type UNIQUE (campaignId, type); diff --git a/health-services/project-factory/migration/migrate.sh b/health-services/project-factory/migration/migrate.sh index 5593a173eba..c433c239956 100755 --- a/health-services/project-factory/migration/migrate.sh +++ b/health-services/project-factory/migration/migrate.sh @@ -1,3 +1,4 @@ #!/bin/sh +flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS repair flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS -baselineOnMigrate=true -outOfOrder=true migrate \ No newline at end of file diff --git a/health-services/project-factory/package-lock.json b/health-services/project-factory/package-lock.json index 5d9d7df918a..a7479aa962a 100644 --- a/health-services/project-factory/package-lock.json +++ b/health-services/project-factory/package-lock.json @@ -18,6 +18,7 @@ "hash-sum": "2.0.0", "helmet": "7.1.0", "http-proxy-middleware": "^3.0.0", + "ioredis": "^5.4.1", "jaeger-client": "^3.19.0", "jsonpath": "1.1.1", "kafka-node": "5.0.0", @@ -40,6 +41,7 @@ "@types/http-proxy-middleware": "^1.0.0", "@types/jaeger-client": "^3.18.7", "@types/jest": "29.5.12", + "@types/lodash": "^4.17.5", "@types/morgan": "1.9.9", "@types/node": "20.11.29", "@types/pg": "8.11.3", @@ -53,22 +55,11 @@ "typescript": "5.4.2" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" @@ -78,38 +69,43 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.4", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz", + "integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==", "dev": true, - "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.4", + "@babel/generator": "^7.24.5", "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.4", - "@babel/parser": "^7.24.4", + "@babel/helper-module-transforms": "^7.24.5", + "@babel/helpers": "^7.24.5", + "@babel/parser": "^7.24.5", "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -124,26 +120,11 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.2", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/core/node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -160,25 +141,24 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { - "version": "7.24.4", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", + "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.24.0", + "@babel/types": "^7.24.5", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -192,7 +172,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/compat-data": "^7.23.5", "@babel/helper-validator-option": "^7.23.5", @@ -204,22 +183,35 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -229,7 +221,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/template": "^7.22.15", "@babel/types": "^7.23.0" @@ -243,7 +234,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" }, @@ -256,7 +246,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.24.0" }, @@ -265,17 +254,16 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz", + "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.24.3", + "@babel/helper-simple-access": "^7.24.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -285,36 +273,33 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz", + "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -325,17 +310,15 @@ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -345,32 +328,31 @@ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.4", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz", + "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==", "dev": true, - "license": "MIT", "dependencies": { "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.5", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -384,7 +366,6 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -397,7 +378,6 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -412,7 +392,6 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "1.1.3" } @@ -421,25 +400,13 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } + "dev": true }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -449,7 +416,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -458,9 +424,10 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.4", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true, - "license": "MIT", "bin": { "parser": "bin/babel-parser.js" }, @@ -473,7 +440,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -486,7 +452,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -499,7 +464,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -512,7 +476,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -525,7 +488,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -538,7 +500,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.0" }, @@ -554,7 +515,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -567,7 +527,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -580,7 +539,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -593,7 +551,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -606,7 +563,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -619,7 +575,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -632,7 +587,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -648,7 +602,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.0" }, @@ -664,7 +617,6 @@ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.23.5", "@babel/parser": "^7.24.0", @@ -674,35 +626,20 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.2", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", + "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -710,26 +647,11 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.2", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/traverse/node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -747,7 +669,6 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -756,18 +677,16 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -778,14 +697,12 @@ "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@colors/colors": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", - "license": "MIT", "engines": { "node": ">=0.1.90" } @@ -795,7 +712,6 @@ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -808,7 +724,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -818,7 +733,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", - "license": "MIT", "dependencies": { "colorspace": "1.1.x", "enabled": "2.0.x", @@ -891,6 +805,18 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@fast-csv/format": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", @@ -928,11 +854,15 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==" }, + "node_modules/@ioredis/commands": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", + "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -949,7 +879,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "license": "MIT", "engines": { "node": ">=12" }, @@ -957,29 +886,10 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -996,7 +906,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -1007,29 +916,11 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -1046,7 +937,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -1056,7 +946,6 @@ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -1066,7 +955,6 @@ "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -1084,7 +972,6 @@ "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, - "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", @@ -1127,12 +1014,32 @@ } } }, + "node_modules/@jest/core/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/core/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@jest/environment": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", @@ -1148,7 +1055,6 @@ "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, - "license": "MIT", "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" @@ -1162,7 +1068,6 @@ "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, - "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3" }, @@ -1175,7 +1080,6 @@ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", @@ -1193,7 +1097,6 @@ "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -1209,7 +1112,6 @@ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, - "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", @@ -1248,40 +1150,79 @@ } } }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "node_modules/@jest/reporters/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@jest/test-result": { + "node_modules/@jest/reporters/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, - "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/types": "^29.6.3", @@ -1297,7 +1238,6 @@ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", @@ -1313,7 +1253,6 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -1340,7 +1279,6 @@ "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", @@ -1358,7 +1296,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1373,7 +1310,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -1383,7 +1319,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -1392,15 +1327,13 @@ "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -1410,7 +1343,6 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", - "license": "ISC", "dependencies": { "agent-base": "^7.1.0", "http-proxy-agent": "^7.0.0", @@ -1422,20 +1354,10 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@npmcli/agent/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/@npmcli/fs": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", - "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", - "license": "ISC", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", "dependencies": { "semver": "^7.3.5" }, @@ -1443,11 +1365,21 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "license": "MIT", "optional": true, "engines": { "node": ">=14" @@ -1457,15 +1389,13 @@ "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } @@ -1475,7 +1405,6 @@ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0" } @@ -1484,36 +1413,31 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -1527,7 +1451,6 @@ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" } @@ -1537,7 +1460,6 @@ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, - "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" @@ -1548,7 +1470,6 @@ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.20.7" } @@ -1558,7 +1479,6 @@ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dev": true, - "license": "MIT", "dependencies": { "@types/connect": "*", "@types/node": "*" @@ -1569,7 +1489,6 @@ "resolved": "https://registry.npmjs.org/@types/compression/-/compression-1.7.5.tgz", "integrity": "sha512-AAQvK5pxMpaT+nDvhHrsBhLSYG5yQdtkaJE1WYieSNY2mVFKAgmU4ks65rkZD5oqnGCFLyQpUr1CqI4DmUMyDg==", "dev": true, - "license": "MIT", "dependencies": { "@types/express": "*" } @@ -1579,7 +1498,6 @@ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -1589,7 +1507,6 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -1598,11 +1515,10 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.43", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz", - "integrity": "sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz", + "integrity": "sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -1615,7 +1531,6 @@ "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -1624,15 +1539,13 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@types/hash-sum/-/hash-sum-1.0.2.tgz", "integrity": "sha512-UP28RddqY8xcU0SCEp9YKutQICXpaAq9N8U2klqF5hegGha7KzTOL8EdhIIV3bOSGBzjEpN9bU/d+nNZBdJYVw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/helmet": { "version": "0.0.47", "resolved": "https://registry.npmjs.org/@types/helmet/-/helmet-0.0.47.tgz", "integrity": "sha512-TcHA/djjdUtrMtq/QAayVLrsgjNNZ1Uhtz0KhfH01mrmjH44E54DA1A0HNbwW0H/NBFqV+tGMo85ACuEhMXcdg==", "dev": true, - "license": "MIT", "dependencies": { "@types/express": "*" } @@ -1641,8 +1554,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/http-proxy": { "version": "1.17.14", @@ -1666,15 +1578,13 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" } @@ -1684,7 +1594,6 @@ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } @@ -1705,25 +1614,28 @@ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, - "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, + "node_modules/@types/lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==", + "dev": true + }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/morgan": { "version": "1.9.9", "resolved": "https://registry.npmjs.org/@types/morgan/-/morgan-1.9.9.tgz", "integrity": "sha512-iRYSDKVaC6FkGSpEVVIvrRGw0DfJMiQzIn3qr2G5B3C//AWkulhXgaBd7tS9/J79GWSYMTHGs7PfI5b3Y8m+RQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -1732,7 +1644,6 @@ "version": "20.11.29", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.29.tgz", "integrity": "sha512-P99thMkD/1YkCvAtOd6/zGedKNA0p2fj4ZpjCzcNiSCBWgm3cNRTBfa/qjFnsKkkojxu4vVLtWpesnZ9+ap+gA==", - "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } @@ -1742,7 +1653,6 @@ "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.3.tgz", "integrity": "sha512-xocw4LvpDcj/Ta7bN52tLZm34mso5SZ0Q8fVC0UtD8s85Itip3YHvBeYZhBmC0OThpdOujHsxXtRbEIRxqXPXg==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*", "pg-protocol": "*", @@ -1750,25 +1660,22 @@ } }, "node_modules/@types/qs": { - "version": "6.9.14", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", - "integrity": "sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==", - "dev": true, - "license": "MIT" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "dev": true }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dev": true, - "license": "MIT", "dependencies": { "@types/mime": "^1", "@types/node": "*" @@ -1779,7 +1686,6 @@ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dev": true, - "license": "MIT", "dependencies": { "@types/http-errors": "*", "@types/node": "*", @@ -1790,35 +1696,30 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/strip-json-comments": { "version": "0.0.30", "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/triple-beam": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", - "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", - "license": "MIT" + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==" }, "node_modules/@types/uuid": { "version": "9.0.8", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/xlsx": { "version": "0.0.36", @@ -1835,7 +1736,6 @@ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, - "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -1844,14 +1744,12 @@ "version": "21.0.3", "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -1860,7 +1758,6 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -1895,7 +1792,6 @@ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -1904,7 +1800,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", - "license": "Apache-2.0", "engines": { "node": ">=0.8" } @@ -1913,7 +1808,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -1922,10 +1816,9 @@ } }, "node_modules/agent-base/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -1941,14 +1834,12 @@ "node_modules/agent-base/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "license": "MIT" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -1993,7 +1884,6 @@ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -2003,7 +1893,6 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -2019,7 +1908,6 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -2028,24 +1916,20 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "optional": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -2056,7 +1940,6 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2069,7 +1952,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "license": "ISC", "optional": true }, "node_modules/archiver": { @@ -2109,6 +1991,26 @@ "node": ">= 6" } }, + "node_modules/archiver-utils/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/archiver/node_modules/async": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", @@ -2156,7 +2058,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", - "license": "ISC", + "deprecated": "This package is no longer supported.", "optional": true, "dependencies": { "delegates": "^1.0.0", @@ -2167,31 +2069,33 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, + "node_modules/argparse/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -2200,7 +2104,6 @@ "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "license": "MIT", "dependencies": { "lodash": "^4.17.14" } @@ -2208,14 +2111,12 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { "version": "1.6.8", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", - "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -2227,7 +2128,6 @@ "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, - "license": "MIT", "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", @@ -2249,7 +2149,6 @@ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -2266,7 +2165,6 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", @@ -2283,7 +2181,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -2293,7 +2190,6 @@ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -2309,7 +2205,6 @@ "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", @@ -2333,7 +2228,6 @@ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, - "license": "MIT", "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" @@ -2348,8 +2242,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base64-js": { "version": "1.5.1", @@ -2374,7 +2267,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "license": "MIT", "dependencies": { "safe-buffer": "5.1.2" }, @@ -2394,10 +2286,12 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==", - "license": "MIT", "dependencies": { "buffers": "~0.1.1", "chainsaw": "~0.1.0" + }, + "engines": { + "node": "*" } }, "node_modules/binary-extensions": { @@ -2405,7 +2299,6 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -2417,7 +2310,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "license": "MIT", "optional": true, "dependencies": { "file-uri-to-path": "1.0.0" @@ -2433,7 +2325,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "license": "MIT", "dependencies": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -2471,7 +2362,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2481,7 +2371,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -2508,7 +2397,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "caniuse-lite": "^1.0.30001587", "electron-to-chromium": "^1.4.668", @@ -2527,7 +2415,6 @@ "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } @@ -2559,7 +2446,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "license": "MIT", "optional": true, "dependencies": { "buffer-alloc-unsafe": "^1.1.0", @@ -2570,14 +2456,12 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "license": "MIT", "optional": true }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "license": "MIT", "engines": { "node": "*" } @@ -2586,15 +2470,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", - "license": "MIT", "optional": true }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/buffer-indexof-polyfill": { "version": "1.0.2", @@ -2608,7 +2490,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/buffermaker/-/buffermaker-1.2.1.tgz", "integrity": "sha512-IdnyU2jDHU65U63JuVQNTHiWjPRH0CS3aYd/WPaEwyX84rFdukhOduAVb1jwUScmb5X0JWPw8NZOrhoLMiyAHQ==", - "license": "MIT", "dependencies": { "long": "1.1.2" } @@ -2639,16 +2520,14 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/cacache": { - "version": "18.0.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.2.tgz", - "integrity": "sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw==", - "license": "ISC", + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.3.tgz", + "integrity": "sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==", "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -2667,66 +2546,10 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/cacache/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/cacache/node_modules/glob": { - "version": "10.3.12", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", - "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.6", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.10.2" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/cacache/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, - "node_modules/cacache/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -2746,7 +2569,6 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -2756,15 +2578,14 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001605", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", - "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", + "version": "1.0.30001620", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz", + "integrity": "sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew==", "dev": true, "funding": [ { @@ -2779,14 +2600,12 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ], - "license": "CC-BY-4.0" + ] }, "node_modules/cfb": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", - "license": "Apache-2.0", "dependencies": { "adler-32": "~1.3.0", "crc-32": "~1.2.0" @@ -2799,9 +2618,11 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==", - "license": "MIT/X11", "dependencies": { "traverse": ">=0.3.0 <0.4" + }, + "engines": { + "node": "*" } }, "node_modules/chalk": { @@ -2809,7 +2630,6 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2821,12 +2641,26 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -2836,7 +2670,6 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -2857,13 +2690,10 @@ } }, "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "license": "ISC", - "engines": { - "node": ">=10" - } + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "optional": true }, "node_modules/ci-info": { "version": "3.9.0", @@ -2876,23 +2706,20 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true, - "license": "MIT" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "dev": true }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "license": "MIT", "engines": { "node": ">=6" } @@ -2902,7 +2729,6 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2912,12 +2738,41 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "node_modules/cliui/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -2927,7 +2782,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -2937,21 +2791,56 @@ "node": ">=8" } }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "license": "MIT", "engines": { "node": ">=0.8" } }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" @@ -2961,7 +2850,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "license": "MIT", "optional": true, "engines": { "node": ">=0.10.0" @@ -2971,7 +2859,6 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", - "license": "Apache-2.0", "engines": { "node": ">=0.8" } @@ -2980,14 +2867,12 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/color": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "license": "MIT", "dependencies": { "color-convert": "^1.9.3", "color-string": "^1.6.0" @@ -2997,7 +2882,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -3008,14 +2892,12 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/color-string": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "license": "MIT", "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -3025,7 +2907,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "license": "MIT", "dependencies": { "color-name": "1.1.3" } @@ -3033,14 +2914,12 @@ "node_modules/color/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "license": "MIT" + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/colorspace": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", - "license": "MIT", "dependencies": { "color": "^3.1.3", "text-hex": "1.0.x" @@ -3050,7 +2929,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -3089,7 +2967,6 @@ "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "license": "MIT", "dependencies": { "mime-db": ">= 1.43.0 < 2" }, @@ -3101,7 +2978,6 @@ "version": "1.7.4", "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "license": "MIT", "dependencies": { "accepts": "~1.3.5", "bytes": "3.0.0", @@ -3119,7 +2995,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -3127,21 +3002,18 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "license": "ISC", "optional": true }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" }, @@ -3166,14 +3038,12 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/content-type": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3182,8 +3052,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/cookie": { "version": "0.6.0", @@ -3196,20 +3065,17 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "license": "MIT" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "license": "MIT" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/crc-32": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "license": "Apache-2.0", "bin": { "crc32": "bin/crc32.njs" }, @@ -3247,7 +3113,6 @@ "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -3268,14 +3133,12 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -3285,6 +3148,20 @@ "node": ">= 8" } }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/dayjs": { "version": "1.11.11", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", @@ -3294,7 +3171,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -3303,7 +3179,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "license": "MIT", "optional": true, "dependencies": { "mimic-response": "^1.0.0" @@ -3313,11 +3188,10 @@ } }, "node_modules/dedent": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", "dev": true, - "license": "MIT", "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, @@ -3331,7 +3205,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "license": "MIT", "optional": true, "engines": { "node": ">=4.0.0" @@ -3340,15 +3213,13 @@ "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "license": "MIT" + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3357,7 +3228,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -3374,7 +3244,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -3383,14 +3252,12 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "license": "MIT", "optional": true }, "node_modules/denque": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", - "license": "Apache-2.0", "engines": { "node": ">=0.10" } @@ -3399,7 +3266,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -3408,7 +3274,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -3418,7 +3283,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "license": "Apache-2.0", "optional": true, "bin": { "detect-libc": "bin/detect-libc.js" @@ -3432,7 +3296,6 @@ "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -3442,7 +3305,6 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -3452,7 +3314,6 @@ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, - "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -3462,7 +3323,6 @@ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -3483,7 +3343,6 @@ "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", "integrity": "sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ==", "dev": true, - "license": "MIT", "dependencies": { "xtend": "^4.0.0" } @@ -3491,26 +3350,24 @@ "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "license": "MIT" + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.726", - "dev": true, - "license": "ISC" + "version": "1.4.772", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.772.tgz", + "integrity": "sha512-jFfEbxR/abTTJA3ci+2ok1NTuOBBtB4jH+UT6PUmRN+DY3WSD4FFRsgoVQ+QNIJ0T7wrXwzsWCI2WKC46b++2A==", + "dev": true }, "node_modules/emittery": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -3519,22 +3376,19 @@ } }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, "node_modules/enabled": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", - "license": "MIT" + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -3543,7 +3397,6 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "license": "MIT", "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -3553,7 +3406,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "license": "MIT", "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -3566,7 +3418,6 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "license": "MIT", "dependencies": { "once": "^1.4.0" } @@ -3576,7 +3427,6 @@ "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" @@ -3585,11 +3435,31 @@ "node": ">=8.6" } }, + "node_modules/enquirer/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/enquirer/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "license": "MIT", "engines": { "node": ">=6" } @@ -3597,8 +3467,7 @@ "node_modules/err-code": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "license": "MIT" + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" }, "node_modules/error": { "version": "7.0.2", @@ -3614,16 +3483,20 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, + "node_modules/error-ex/node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -3635,7 +3508,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", "engines": { "node": ">= 0.4" } @@ -3645,7 +3517,6 @@ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -3653,14 +3524,21 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } }, "node_modules/escodegen": { "version": "1.14.3", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", - "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^4.2.0", @@ -3678,54 +3556,16 @@ "source-map": "~0.6.1" } }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "license": "MIT", - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2" + "node_modules/escodegen/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": ">= 0.8.0" + "node": ">=4" } }, "node_modules/eslint": { @@ -3787,7 +3627,6 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -3801,7 +3640,6 @@ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, - "license": "MIT", "dependencies": { "eslint-visitor-keys": "^1.1.0" }, @@ -3817,7 +3655,6 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=4" } @@ -3827,7 +3664,6 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10" } @@ -3848,12 +3684,20 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/eslint/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -3872,12 +3716,98 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/eslint/node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/eslint/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/eslint/node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } }, "node_modules/espree": { "version": "7.3.1", @@ -3903,16 +3833,15 @@ } }, "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "license": "BSD-2-Clause", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, "node_modules/esquery": { @@ -3920,7 +3849,6 @@ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -3933,7 +3861,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3943,7 +3870,6 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -3956,7 +3882,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3965,7 +3890,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3974,7 +3898,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -3983,7 +3906,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4038,7 +3960,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -4070,7 +3991,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "license": "(MIT OR WTFPL)", "optional": true, "engines": { "node": ">=6" @@ -4081,7 +4001,6 @@ "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", @@ -4096,8 +4015,7 @@ "node_modules/exponential-backoff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", - "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", - "license": "Apache-2.0" + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" }, "node_modules/express": { "version": "4.19.2", @@ -4157,8 +4075,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/fast-csv": { "version": "4.3.6", @@ -4175,28 +4092,24 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "license": "MIT" + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" } @@ -4204,15 +4117,13 @@ "node_modules/fecha": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", - "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", - "license": "MIT" + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -4224,14 +4135,12 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "license": "MIT", "optional": true }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -4243,7 +4152,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "license": "MIT", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -4262,7 +4170,6 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -4276,7 +4183,6 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, - "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -4290,14 +4196,12 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/fn.name": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", - "license": "MIT" + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { "version": "1.15.6", @@ -4309,7 +4213,6 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -4320,10 +4223,9 @@ } }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "license": "ISC", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", + "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -4339,7 +4241,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", "engines": { "node": ">=14" }, @@ -4351,7 +4252,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -4365,7 +4265,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4374,7 +4273,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz", "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", - "license": "Apache-2.0", "engines": { "node": ">=0.8" } @@ -4383,7 +4281,6 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4391,14 +4288,12 @@ "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "license": "MIT" + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -4409,8 +4304,21 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/fstream": { "version": "1.0.12", @@ -4427,6 +4335,26 @@ "node": ">=0.6" } }, + "node_modules/fstream/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fstream/node_modules/rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -4443,7 +4371,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4452,14 +4379,13 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", - "license": "ISC", + "deprecated": "This package is no longer supported.", "optional": true, "dependencies": { "aproba": "^1.0.3", @@ -4472,35 +4398,11 @@ "wide-align": "^1.1.0" } }, - "node_modules/gauge/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gauge/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "license": "MIT", - "optional": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -4510,7 +4412,6 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -4519,7 +4420,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -4539,7 +4439,6 @@ "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.0.0" } @@ -4549,7 +4448,6 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -4561,24 +4459,24 @@ "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "license": "MIT", "optional": true }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "license": "ISC", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -4589,7 +4487,6 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -4597,6 +4494,28 @@ "node": ">= 6" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/globals": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", @@ -4612,11 +4531,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -4627,15 +4554,13 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -4644,7 +4569,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -4656,7 +4580,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4668,7 +4591,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4680,20 +4602,17 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "license": "ISC", "optional": true }, "node_modules/hash-sum": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "license": "MIT" + "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==" }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -4705,7 +4624,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/helmet/-/helmet-7.1.0.tgz", "integrity": "sha512-g+HZqgfbpXdCkme/Cd/mZkV0aV3BZZZSugecH03kl38m/Kmdx8jKjBikpDj2cr+Iynv4KpYEviojNdTJActJAg==", - "license": "MIT", "engines": { "node": ">=16.0.0" } @@ -4731,20 +4649,17 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "license": "BSD-2-Clause" + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -4773,7 +4688,6 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "license": "MIT", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -4783,10 +4697,9 @@ } }, "node_modules/http-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -4802,8 +4715,7 @@ "node_modules/http-proxy-agent/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "license": "MIT" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/http-proxy-middleware": { "version": "3.0.0", @@ -4846,7 +4758,6 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", - "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -4856,10 +4767,9 @@ } }, "node_modules/https-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -4875,15 +4785,13 @@ "node_modules/https-proxy-agent/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "license": "MIT" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } @@ -4892,7 +4800,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -4931,8 +4838,7 @@ "node_modules/immediate": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "license": "MIT" + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" }, "node_modules/import-fresh": { "version": "3.3.0", @@ -4955,7 +4861,6 @@ "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, - "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -4974,7 +4879,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -4983,7 +4887,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "license": "MIT", "engines": { "node": ">=8" } @@ -4992,7 +4895,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "license": "ISC", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -5001,57 +4904,96 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC", "optional": true }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "license": "MIT", + "node_modules/ioredis": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.4.1.tgz", + "integrity": "sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==", "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" + "@ioredis/commands": "^1.1.1", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" }, "engines": { - "node": ">= 12" + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" } }, - "node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "license": "BSD-3-Clause" + "node_modules/ioredis/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/ioredis/node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/ioredis/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", "engines": { "node": ">= 0.10" } }, "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT" + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -5064,7 +5006,6 @@ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, - "license": "MIT", "dependencies": { "hasown": "^2.0.0" }, @@ -5076,7 +5017,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5085,7 +5025,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "license": "MIT", "optional": true, "dependencies": { "number-is-nan": "^1.0.0" @@ -5099,7 +5038,6 @@ "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -5108,7 +5046,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -5119,14 +5056,12 @@ "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "license": "MIT" + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -5146,7 +5081,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "license": "MIT", "engines": { "node": ">=8" }, @@ -5157,21 +5091,18 @@ "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "license": "MIT" + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -5181,7 +5112,6 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.23.9", "@babel/parser": "^7.23.9", @@ -5193,12 +5123,23 @@ "node": ">=10" } }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -5213,7 +5154,6 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -5228,7 +5168,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -5245,15 +5184,13 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -5263,10 +5200,9 @@ } }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", - "license": "BlueOak-1.0.0", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -5308,7 +5244,6 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -5335,7 +5270,6 @@ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, - "license": "MIT", "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", @@ -5345,12 +5279,26 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-changed-files/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jest-circus": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -5377,38 +5325,19 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "node_modules/jest-circus/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" + "yocto-queue": "^0.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + "node": ">=10" }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/jest-config": { @@ -5416,7 +5345,6 @@ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", @@ -5457,12 +5385,44 @@ } } }, + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-config/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jest-diff": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", @@ -5478,7 +5438,6 @@ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, - "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, @@ -5491,7 +5450,6 @@ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -5508,7 +5466,6 @@ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -5526,7 +5483,6 @@ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -5536,7 +5492,6 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -5562,7 +5517,6 @@ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, - "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" @@ -5576,7 +5530,6 @@ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", @@ -5592,7 +5545,6 @@ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^29.6.3", @@ -5608,26 +5560,11 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.2", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -5642,7 +5579,6 @@ "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -5660,7 +5596,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -5670,7 +5605,6 @@ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", @@ -5691,7 +5625,6 @@ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, - "license": "MIT", "dependencies": { "jest-regex-util": "^29.6.3", "jest-snapshot": "^29.7.0" @@ -5705,7 +5638,6 @@ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", @@ -5733,12 +5665,26 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-runner/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jest-runtime": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -5767,12 +5713,32 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/jest-snapshot": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", @@ -5799,12 +5765,23 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -5822,7 +5799,6 @@ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", @@ -5840,7 +5816,6 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -5853,7 +5828,6 @@ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, - "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", @@ -5873,7 +5847,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -5889,7 +5862,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5900,19 +5872,50 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jest/node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -5921,18 +5924,29 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { + "node_modules/js-yaml/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "license": "MIT" + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, - "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, @@ -5944,15 +5958,13 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/json-schema-traverse": { "version": "1.0.0", @@ -5963,15 +5975,13 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -5983,30 +5993,16 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", - "license": "MIT", "dependencies": { "esprima": "1.2.2", "static-eval": "2.0.2", "underscore": "1.12.1" } }, - "node_modules/jsonpath/node_modules/esprima": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", - "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "license": "(MIT OR GPL-3.0-or-later)", "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", @@ -6018,7 +6014,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/kafka-node/-/kafka-node-5.0.0.tgz", "integrity": "sha512-dD2ga5gLcQhsq1yNoQdy1MU4x4z7YnXM5bcG9SdQuiNr5KKuAmXixH1Mggwdah5o7EfholFbcNDPSVA6BIfaug==", - "license": "MIT", "dependencies": { "async": "^2.6.2", "binary": "~0.3.0", @@ -6045,7 +6040,7 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "license": "MIT", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "bin": { "uuid": "bin/uuid" } @@ -6055,7 +6050,6 @@ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, - "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -6065,7 +6059,6 @@ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -6073,8 +6066,7 @@ "node_modules/kuler": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", - "license": "MIT" + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, "node_modules/lazystream": { "version": "1.0.1", @@ -6092,20 +6084,17 @@ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" }, "engines": { "node": ">= 0.8.0" @@ -6115,7 +6104,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "license": "MIT", "dependencies": { "immediate": "~3.0.5" } @@ -6124,8 +6112,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/listenercount": { "version": "1.0.1", @@ -6137,7 +6124,6 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -6148,8 +6134,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.defaults": { "version": "4.2.0", @@ -6176,6 +6161,11 @@ "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==" }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==" + }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", @@ -6210,8 +6200,7 @@ "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/lodash.union": { "version": "4.6.0", @@ -6227,7 +6216,6 @@ "version": "2.6.0", "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", - "license": "MIT", "dependencies": { "@colors/colors": "1.6.0", "@types/triple-beam": "^1.3.2", @@ -6243,26 +6231,22 @@ "node_modules/logform/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/long": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/long/-/long-1.1.2.tgz", "integrity": "sha512-pjR3OP1X2VVQhCQlrq3s8UxugQsuoucwMOn9Yj/kN/61HMc+lDFJS5bvpNEHneZ9NVaSm8gNWxZvtGS7lqHb3Q==", - "license": "Apache-2.0", "engines": { "node": ">=0.6" } }, "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "engines": { + "node": "14 || >=16.14" } }, "node_modules/make-dir": { @@ -6270,7 +6254,6 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -6281,18 +6264,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/make-fetch-happen": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz", - "integrity": "sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A==", - "license": "ISC", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", "dependencies": { "@npmcli/agent": "^2.0.0", "cacache": "^18.0.0", @@ -6303,6 +6296,7 @@ "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", + "proc-log": "^4.2.0", "promise-retry": "^2.0.1", "ssri": "^10.0.0" }, @@ -6310,12 +6304,19 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/make-fetch-happen/node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" } @@ -6324,7 +6325,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6332,21 +6332,18 @@ "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "license": "MIT" + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6355,7 +6352,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "license": "MIT", "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -6368,7 +6364,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", "bin": { "mime": "cli.js" }, @@ -6380,7 +6375,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6389,7 +6383,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -6402,7 +6395,6 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -6411,7 +6403,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "license": "MIT", "optional": true, "engines": { "node": ">=4" @@ -6421,7 +6412,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6433,16 +6423,14 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", - "license": "ISC", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "engines": { "node": ">=16 || 14 >=14.17" } @@ -6451,7 +6439,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -6460,10 +6447,9 @@ } }, "node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", - "license": "MIT", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -6480,7 +6466,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -6492,7 +6477,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -6500,17 +6484,10 @@ "node": ">=8" } }, - "node_modules/minipass-flush/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -6522,7 +6499,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -6530,17 +6506,10 @@ "node": ">=8" } }, - "node_modules/minipass-pipeline/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, "node_modules/minipass-sized": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -6552,7 +6521,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -6560,17 +6528,10 @@ "node": ">=8" } }, - "node_modules/minipass-sized/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, "node_modules/minizlib": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "license": "MIT", "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -6583,7 +6544,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -6591,17 +6551,10 @@ "node": ">=8" } }, - "node_modules/minizlib/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -6613,7 +6566,6 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "license": "MIT", "dependencies": { "basic-auth": "~2.0.1", "debug": "2.6.9", @@ -6629,7 +6581,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -6640,35 +6591,30 @@ "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/nan": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==", - "license": "MIT", "optional": true }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "license": "MIT", "optional": true }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6676,34 +6622,21 @@ "node_modules/nested-error-stacks": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz", - "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==", - "license": "MIT" + "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==" }, "node_modules/node-abi": { "version": "2.30.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", - "license": "MIT", "optional": true, "dependencies": { "semver": "^5.4.1" } }, - "node_modules/node-abi/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "license": "ISC", - "optional": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/node-cache": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/node-cache/-/node-cache-5.1.2.tgz", "integrity": "sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg==", - "license": "MIT", "dependencies": { "clone": "2.x" }, @@ -6734,101 +6667,38 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/node-gyp/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/node-gyp/node_modules/glob": { - "version": "10.3.12", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", - "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.6", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.10.2" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/node-gyp/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/node-gyp/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/node-gyp/node_modules/which": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", - "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "bin": { - "node-which": "bin/which.js" + "semver": "bin/semver.js" }, "engines": { - "node": "^16.13.0 || >=18.0.0" + "node": ">=10" } }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "license": "MIT" + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/noop-logger": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", "integrity": "sha512-6kM8CLXvuW5crTxsAtva2YLrRrDaiTIkIePWs9moLHqbFWT94WpNFjwS/5dfLfECg5i/lkmw3aoqVidxt23TEQ==", - "license": "MIT", "optional": true }, "node_modules/nopt": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", - "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", - "license": "ISC", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", "dependencies": { "abbrev": "^2.0.0" }, @@ -6843,7 +6713,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6853,7 +6722,6 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -6865,7 +6733,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "license": "ISC", + "deprecated": "This package is no longer supported.", "optional": true, "dependencies": { "are-we-there-yet": "~1.1.2", @@ -6878,7 +6746,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "license": "MIT", "optional": true, "engines": { "node": ">=0.10.0" @@ -6888,7 +6755,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "license": "MIT", "optional": true, "engines": { "node": ">=0.10.0" @@ -6898,7 +6764,6 @@ "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6907,14 +6772,12 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -6926,7 +6789,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -6935,7 +6797,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", "dependencies": { "wrappy": "1" } @@ -6944,7 +6805,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "license": "MIT", "dependencies": { "fn.name": "1.x.x" } @@ -6954,7 +6814,6 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, - "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -6976,22 +6835,19 @@ "node_modules/optional": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", - "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==", - "license": "MIT" + "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "license": "MIT", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" }, "engines": { "node": ">= 0.8.0" @@ -7001,23 +6857,21 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "license": "MIT", "optional": true, "engines": { "node": ">=0.10.0" } }, "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { - "yocto-queue": "^0.1.0" + "p-try": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7028,7 +6882,6 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -7036,27 +6889,10 @@ "node": ">=8" } }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -7072,7 +6908,6 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -7080,8 +6915,7 @@ "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "license": "(MIT AND Zlib)" + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "node_modules/parent-module": { "version": "1.0.1", @@ -7100,7 +6934,6 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -7118,7 +6951,6 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -7128,7 +6960,6 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -7137,7 +6968,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7146,7 +6976,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "license": "MIT", "engines": { "node": ">=8" } @@ -7155,39 +6984,27 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/path-scurry": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", - "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", - "license": "BlueOak-1.0.0", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "license": "MIT" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "node_modules/pg": { "version": "8.12.0", @@ -7221,22 +7038,19 @@ "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", "dev": true, - "license": "MIT", "optional": true }, "node_modules/pg-connection-string": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz", "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/pg-int8": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", "dev": true, - "license": "ISC", "engines": { "node": ">=4.0.0" } @@ -7246,7 +7060,6 @@ "resolved": "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz", "integrity": "sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==", "dev": true, - "license": "ISC", "engines": { "node": ">=4" } @@ -7256,7 +7069,6 @@ "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.2.tgz", "integrity": "sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==", "dev": true, - "license": "MIT", "peerDependencies": { "pg": ">=8.0" } @@ -7265,15 +7077,13 @@ "version": "1.6.1", "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.1.tgz", "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/pg-types": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz", "integrity": "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==", "dev": true, - "license": "MIT", "dependencies": { "pg-int8": "1.0.1", "pg-numeric": "1.0.2", @@ -7292,7 +7102,6 @@ "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", "dev": true, - "license": "MIT", "dependencies": { "pg-int8": "1.0.1", "postgres-array": "~2.0.0", @@ -7309,7 +7118,6 @@ "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -7319,7 +7127,6 @@ "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7329,7 +7136,6 @@ "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7339,7 +7145,6 @@ "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", "dev": true, - "license": "MIT", "dependencies": { "xtend": "^4.0.0" }, @@ -7352,23 +7157,20 @@ "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", "dev": true, - "license": "MIT", "dependencies": { "split2": "^4.1.0" } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true, - "license": "ISC" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -7381,7 +7183,6 @@ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } @@ -7391,7 +7192,6 @@ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -7404,7 +7204,6 @@ "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz", "integrity": "sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" } @@ -7414,7 +7213,6 @@ "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz", "integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==", "dev": true, - "license": "MIT", "dependencies": { "obuf": "~1.1.2" }, @@ -7427,7 +7225,6 @@ "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz", "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" } @@ -7437,7 +7234,6 @@ "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz", "integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" } @@ -7446,14 +7242,12 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz", "integrity": "sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/prebuild-install": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.0.tgz", "integrity": "sha512-aaLVANlj4HgZweKttFNUVNRxDukytuIuxeK2boIMHjagNJCiVKWFsKF4tCE3ql3GbrD2tExPQ7/pwtEJcHNZeg==", - "license": "MIT", "optional": true, "dependencies": { "detect-libc": "^1.0.3", @@ -7481,11 +7275,9 @@ } }, "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "engines": { "node": ">= 0.8.0" } @@ -7495,7 +7287,6 @@ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -7510,7 +7301,6 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -7522,7 +7312,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -7538,15 +7327,13 @@ "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "license": "MIT" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -7567,7 +7354,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "license": "MIT", "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" @@ -7580,7 +7366,6 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "license": "MIT", "engines": { "node": ">= 4" } @@ -7590,7 +7375,6 @@ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, - "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -7602,14 +7386,12 @@ "node_modules/property-expr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz", - "integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==", - "license": "MIT" + "integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==" }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -7621,14 +7403,12 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "license": "MIT", "optional": true, "dependencies": { "end-of-stream": "^1.1.0", @@ -7639,7 +7419,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", "engines": { "node": ">=6" } @@ -7658,14 +7437,12 @@ "type": "opencollective", "url": "https://opencollective.com/fast-check" } - ], - "license": "MIT" + ] }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.4" }, @@ -7680,7 +7457,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -7689,7 +7465,6 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -7704,7 +7479,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "optional": true, "dependencies": { "deep-extend": "^0.6.0", @@ -7716,28 +7490,16 @@ "rc": "cli.js" } }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true, - "license": "MIT" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -7780,7 +7542,6 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -7788,12 +7549,30 @@ "node": ">=8.10.0" } }, + "node_modules/redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "dependencies": { + "redis-errors": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -7806,7 +7585,6 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7815,7 +7593,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7830,7 +7607,6 @@ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, - "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -7848,7 +7624,6 @@ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -7861,7 +7636,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -7880,7 +7654,6 @@ "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -7889,7 +7662,6 @@ "version": "0.10.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", "integrity": "sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ==", - "license": "MIT", "engines": { "node": "*" } @@ -7898,8 +7670,8 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -7910,17 +7682,36 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-stable-stringify": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", - "license": "MIT", "engines": { "node": ">=10" } @@ -7928,14 +7719,12 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sax": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", - "license": "ISC" + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" }, "node_modules/saxes": { "version": "5.0.1", @@ -7949,43 +7738,18 @@ } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "optional": true, "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "semver": "bin/semver" } }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, "node_modules/send": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -8008,14 +7772,12 @@ "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/serve-static": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "license": "MIT", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -8030,14 +7792,12 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC", "optional": true }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -8053,20 +7813,17 @@ "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "license": "MIT" + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -8078,7 +7835,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "license": "MIT", "engines": { "node": ">=8" } @@ -8087,7 +7843,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -8105,8 +7860,7 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "devOptional": true, - "license": "ISC" + "devOptional": true }, "node_modules/simple-concat": { "version": "1.0.1", @@ -8126,14 +7880,12 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "optional": true }, "node_modules/simple-get": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", - "license": "MIT", "optional": true, "dependencies": { "decompress-response": "^3.3.0", @@ -8145,30 +7897,21 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "license": "MIT", "dependencies": { "is-arrayish": "^0.3.1" } }, - "node_modules/simple-swizzle/node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "license": "MIT" - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -8178,7 +7921,6 @@ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -8191,12 +7933,26 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -8205,7 +7961,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -8216,7 +7971,6 @@ "resolved": "https://registry.npmjs.org/snappy/-/snappy-6.3.5.tgz", "integrity": "sha512-lonrUtdp1b1uDn1dbwgQbBsb5BbaiLeKq+AGwOk2No+en+VvJThwmtztwulEQsLinRF681pBqib0NUZaizKLIA==", "hasInstallScript": true, - "license": "MIT", "optional": true, "dependencies": { "bindings": "^1.3.1", @@ -8225,10 +7979,9 @@ } }, "node_modules/socks": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", - "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", - "license": "MIT", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -8242,7 +7995,6 @@ "version": "8.0.3", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", - "license": "MIT", "dependencies": { "agent-base": "^7.1.1", "debug": "^4.3.4", @@ -8253,10 +8005,9 @@ } }, "node_modules/socks-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -8272,15 +8023,13 @@ "node_modules/socks-proxy-agent/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "license": "MIT" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "devOptional": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -8290,7 +8039,6 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -8301,23 +8049,19 @@ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", "dev": true, - "license": "ISC", "engines": { "node": ">= 10.x" } }, "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" }, "node_modules/ssf": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", - "license": "Apache-2.0", "dependencies": { "frac": "~1.1.2" }, @@ -8326,10 +8070,9 @@ } }, "node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", - "license": "ISC", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dependencies": { "minipass": "^7.0.3" }, @@ -8341,7 +8084,6 @@ "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", - "license": "MIT", "engines": { "node": "*" } @@ -8351,7 +8093,6 @@ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, - "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -8364,16 +8105,19 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/standard-as-callback": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==" + }, "node_modules/static-eval": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", - "license": "MIT", "dependencies": { "escodegen": "^1.8.1" } @@ -8382,7 +8126,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -8391,7 +8134,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -8401,7 +8143,6 @@ "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, - "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -8410,6 +8151,27 @@ "node": ">=10" } }, + "node_modules/string-length/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string-template": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", @@ -8419,7 +8181,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "license": "MIT", "optional": true, "dependencies": { "code-point-at": "^1.0.0", @@ -8435,40 +8196,48 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" - }, + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "license": "MIT", - "optional": true, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/string-width/node_modules/strip-ansi": { + "node_modules/strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "license": "MIT", "optional": true, "dependencies": { "ansi-regex": "^2.0.0" @@ -8477,27 +8246,19 @@ "node": ">=0.10.0" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" - }, + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { "node": ">=8" } @@ -8507,7 +8268,6 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -8517,22 +8277,17 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "devOptional": true, + "engines": { + "node": ">=0.10.0" } }, "node_modules/supports-color": { @@ -8540,7 +8295,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -8553,7 +8307,6 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8566,7 +8319,6 @@ "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -8578,12 +8330,26 @@ "node": ">=10.0.0" } }, + "node_modules/table/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "node_modules/table/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -8593,7 +8359,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -8603,11 +8368,22 @@ "node": ">=8" } }, + "node_modules/table/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/tar": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "license": "ISC", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -8624,7 +8400,6 @@ "version": "1.16.3", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", - "license": "MIT", "optional": true, "dependencies": { "chownr": "^1.0.1", @@ -8633,18 +8408,10 @@ "tar-stream": "^1.1.2" } }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "license": "ISC", - "optional": true - }, "node_modules/tar-fs/node_modules/pump": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", - "license": "MIT", "optional": true, "dependencies": { "end-of-stream": "^1.1.0", @@ -8655,7 +8422,6 @@ "version": "1.6.2", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "license": "MIT", "optional": true, "dependencies": { "bl": "^1.0.0", @@ -8674,18 +8440,24 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "license": "MIT", "optional": true, "dependencies": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" } }, + "node_modules/tar/node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, "node_modules/tar/node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -8697,7 +8469,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8709,7 +8480,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "license": "ISC", "engines": { "node": ">=8" } @@ -8718,7 +8488,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -8726,12 +8495,6 @@ "node": ">=10" } }, - "node_modules/tar/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, "node_modules/tdigest": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", @@ -8746,7 +8509,6 @@ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -8756,18 +8518,37 @@ "node": ">=8" } }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/text-hex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", - "license": "MIT" + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/thriftrw": { "version": "3.11.4", @@ -8796,8 +8577,7 @@ "node_modules/tiny-case": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz", - "integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==", - "license": "MIT" + "integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==" }, "node_modules/tmp": { "version": "0.2.3", @@ -8811,14 +8591,12 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true, - "license": "BSD-3-Clause" + "dev": true }, "node_modules/to-buffer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", - "license": "MIT", "optional": true }, "node_modules/to-fast-properties": { @@ -8826,7 +8604,6 @@ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -8835,7 +8612,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -8847,7 +8623,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", "engines": { "node": ">=0.6" } @@ -8855,21 +8630,21 @@ "node_modules/toposort": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", - "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==", - "license": "MIT" + "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==" }, "node_modules/traverse": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", - "license": "MIT/X11" + "engines": { + "node": "*" + } }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, - "license": "MIT", "bin": { "tree-kill": "cli.js" } @@ -8878,7 +8653,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", - "license": "MIT", "engines": { "node": ">= 14.0.0" } @@ -8888,7 +8662,6 @@ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, - "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -8932,7 +8705,6 @@ "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-2.0.0.tgz", "integrity": "sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==", "dev": true, - "license": "MIT", "dependencies": { "chokidar": "^3.5.1", "dynamic-dedupe": "^0.3.0", @@ -8962,12 +8734,32 @@ } } }, + "node_modules/ts-node-dev/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/ts-node-dev/node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -8979,8 +8771,8 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -8993,7 +8785,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -9006,7 +8797,6 @@ "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", "dev": true, - "license": "MIT", "dependencies": { "@types/strip-bom": "^3.0.0", "@types/strip-json-comments": "0.0.30", @@ -9019,26 +8809,14 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, - "node_modules/tsconfig/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "license": "Apache-2.0", "optional": true, "dependencies": { "safe-buffer": "^5.0.1" @@ -9048,13 +8826,11 @@ } }, "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dependencies": { - "prelude-ls": "^1.2.1" + "prelude-ls": "~1.1.2" }, "engines": { "node": ">= 0.8.0" @@ -9065,25 +8841,25 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "engines": { - "node": ">=8" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -9097,7 +8873,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -9109,20 +8884,17 @@ "node_modules/underscore": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", - "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", - "license": "MIT" + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "license": "MIT" + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/unique-filename": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", - "license": "ISC", "dependencies": { "unique-slug": "^4.0.0" }, @@ -9134,7 +8906,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" }, @@ -9146,7 +8917,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -9169,9 +8939,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "dev": true, "funding": [ { @@ -9187,10 +8957,9 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -9203,7 +8972,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -9211,14 +8979,12 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -9231,7 +8997,6 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], - "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -9240,22 +9005,19 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, - "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -9269,7 +9031,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -9279,41 +9040,45 @@ "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" } }, "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "license": "ISC", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dependencies": { - "isexe": "^2.0.0" + "isexe": "^3.1.1" }, "bin": { - "node-which": "bin/node-which" + "node-which": "bin/which.js" }, "engines": { - "node": ">= 8" + "node": "^16.13.0 || >=18.0.0" } }, "node_modules/which-pm-runs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.1.0.tgz", "integrity": "sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==", - "license": "MIT", "optional": true, "engines": { "node": ">=4" } }, + "node_modules/which/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "engines": { + "node": ">=16" + } + }, "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "license": "ISC", "optional": true, "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" @@ -9323,7 +9088,6 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/winston/-/winston-3.12.0.tgz", "integrity": "sha512-OwbxKaOlESDi01mC9rkM0dQqQt2I8DAUMRLZ/HpbwvDXm85IryEHgoogy5fziQy38PntgZsLlhAYHz//UPHZ5w==", - "license": "MIT", "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", @@ -9345,7 +9109,6 @@ "version": "4.7.0", "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", - "license": "MIT", "dependencies": { "logform": "^2.3.2", "readable-stream": "^3.6.0", @@ -9359,7 +9122,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -9372,14 +9134,12 @@ "node_modules/winston/node_modules/async": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", - "license": "MIT" + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" }, "node_modules/winston/node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -9393,7 +9153,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz", "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", - "license": "Apache-2.0", "engines": { "node": ">=0.8" } @@ -9402,7 +9161,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz", "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", - "license": "Apache-2.0", "engines": { "node": ">=0.8" } @@ -9411,24 +9169,21 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -9439,24 +9194,43 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", "engines": { "node": ">=8" } @@ -9465,7 +9239,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -9475,43 +9248,68 @@ "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, "engines": { "node": ">=8" } }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" @@ -9544,7 +9342,6 @@ "version": "1.21.0", "resolved": "https://registry.npmjs.org/xlsx-populate/-/xlsx-populate-1.21.0.tgz", "integrity": "sha512-8v2Gm8BehXo6LU7KT802QoXTPkYY1SKk5V8g/UuYZnNB3JzXqud/P99Pxr2yXeKyt+sKlCatmidz6jQNie1hRw==", - "license": "MIT", "dependencies": { "cfb": "^1.1.3", "jszip": "^3.2.2", @@ -9566,7 +9363,6 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "license": "MIT", "engines": { "node": ">=0.4" } @@ -9576,24 +9372,20 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -9612,17 +9404,30 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "node_modules/yargs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -9632,7 +9437,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -9642,12 +9446,23 @@ "node": ">=8" } }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -9657,7 +9472,6 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -9669,7 +9483,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/yup/-/yup-1.4.0.tgz", "integrity": "sha512-wPbgkJRCqIf+OHyiTBQoJiP5PFuAXaWiJK6AmYkzQAh5/c2K9hzSApBZG5wV9KoKSePF7sAxmNSvh/13YHkFDg==", - "license": "MIT", "dependencies": { "property-expr": "^2.0.5", "tiny-case": "^1.0.3", @@ -9677,18 +9490,6 @@ "type-fest": "^2.19.0" } }, - "node_modules/yup/node_modules/type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/zip-stream": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", @@ -9722,6 +9523,26 @@ "node": ">= 10" } }, + "node_modules/zip-stream/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/zip-stream/node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", diff --git a/health-services/project-factory/package.json b/health-services/project-factory/package.json index a91771378fa..31dd40bc152 100644 --- a/health-services/project-factory/package.json +++ b/health-services/project-factory/package.json @@ -1,6 +1,6 @@ { "name": "project-factory", - "version": "0.1.0", + "version": "0.2.0", "main": "src/server/index.ts", "author": "Jagankumar ", "description": "Backend For Frontend service", @@ -54,6 +54,7 @@ "@types/http-proxy-middleware": "^1.0.0", "@types/jaeger-client": "^3.18.7", "@types/jest": "29.5.12", + "@types/lodash": "^4.17.5", "@types/morgan": "1.9.9", "@types/node": "20.11.29", "@types/pg": "8.11.3", diff --git a/health-services/project-factory/postman_collection.json b/health-services/project-factory/postman_collection.json index 5780448766a..d99524df3c1 100644 --- a/health-services/project-factory/postman_collection.json +++ b/health-services/project-factory/postman_collection.json @@ -1,18 +1,13 @@ { "info": { - "_postman_id": "4faeccce-fc50-4dfb-8fef-d973aca136c4", - "name": "Project factory", + "_postman_id": "42be4494-a788-4977-b8f2-e14894cce42b", + "name": "Project-Factory Collection", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "18845214" + "_exporter_id": "28207698" }, "item": [ { - "name": "facility data generate(template generate)", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - } - }, + "name": "campain-manage-create Copy", "request": { "method": "POST", "header": [ @@ -30,8 +25,7 @@ }, { "key": "content-type", - "value": "application/json", - "disabled": true + "value": "application/json" }, { "key": "cookie", @@ -72,65 +66,37 @@ { "key": "user-agent", "value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" - }, - { - "key": "Content-Type", - "value": "application/json", - "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"RequestInfo\":{\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"b902a184-4582-41f8-8144-99930548631d\",\n \"userInfo\": {\n \"id\": 1284,\n \"uuid\": \"867ba408-1b82-4746-8274-eb916e625fea\",\n \"userName\": \"EMP57\",\n \"name\": \"Jagan\",\n \"mobileNumber\": \"6667776662\",\n \"emailId\": \"xyz@egovernments.org\",\n \"locale\": \"string\",\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": \"Amritsar\"\n },\n \"msgId\": \"1716457221446|en_MZ\",\n \"plainAccessRequest\": {}\n}\n}" + "raw": "{\n // 43cfaf3f-f31f-492f-afeb-cebe4f4301e8\n // d71a1963-27a8-4300-a1c4-2ec99e95331b multiplesheet\n // 6c091ddb-523e-4afd-8a81-afe94196d080 without matching sheetName\n // for unifieddev\n // 1d27af7d-3736-408d-b9bc-796c92fd5f4b multiplesheet\n \"Campaign\": {\n // \"id\": \"string\",\n // \"campaignNo\": \"string\",\n \"hierarchyType\": \"string\",\n \"tenantId\": \"mz\",\n \"campaignName\": \"string\",\n \"boundaryCode\": \"mz\",\n \"startDate\": 1677594987,\n // \"endDate\": 9776881655,\n \"endDate\": 1677594987,\n \"projectType\": \"Household Based Project\",\n \"CampaignDetails\": [\n {\n \"boundaryCode\": \"f5F6xAskA05\",\n \"boundaryType\": \"Provincia\",\n \"startDate\": 1665497225000,\n \"endDate\": 1666497225000,\n \"targets\": [\n {\n \"total\": 300,\n \"target\": 250,\n \"type\": \"household|individual\"\n }\n ],\n \"description\": \"test\",\n \"department\": \"test\",\n \"referenceID\": \" 3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"projectSubType\": \"test\",\n \"parentBoundaryCode\": \"mz\",\n // \"projectId\": \"string\",\n \"resources\": [\n {\n \"resourceIds\": [\n \"867ba408-1b82-4746-8274-eb916e625fea\"\n ],\n \"count\": 0,\n \"active\": true,\n \"type\": \"staff\"\n }\n ]\n },\n {\n \"boundaryCode\": \"f5F6xAskA05\",\n \"boundaryType\": \"Provincia\",\n \"startDate\": 1665497225000,\n \"endDate\": 1666497225000,\n \"targets\": [\n {\n \"total\": 700,\n \"target\": 600,\n \"type\": \"household|individual\"\n }\n ],\n \"description\": \"test\",\n \"department\": \"test\",\n \"referenceID\": \" 3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"projectSubType\": \"test\",\n \"parentBoundaryCode\": \"mz\",\n // \"projectId\": \"string\",\n \"resources\": [\n {\n \"resourceIds\": [\n \"867ba408-1b82-4746-8274-eb916e625fea\"\n ],\n \"count\": 0,\n \"active\": true,\n \"type\": \"staff\"\n }\n ]\n },\n {\n \"boundaryCode\": \"mz\",\n \"boundaryType\": \"Country\",\n \"startDate\": 1665497225000,\n \"endDate\": 1666497225000,\n \"targets\": [\n {\n \"total\": 1000,\n \"target\": 800,\n \"type\": \"household|individual\"\n }\n ],\n \"description\": \"test\",\n \"department\": \"test\",\n \"referenceID\": \" 3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"projectSubType\": \"test\",\n \"parentBoundaryCode\": null,\n // \"projectId\": \"string\",\n \"resources\": [\n {\n \"resourceIds\": [\n \"F-2024-03-21-000882\"\n ],\n \"count\": 0,\n \"active\": true,\n \"type\": \"facility\"\n }\n ]\n },\n {\n \"boundaryCode\": \"mz\",\n \"boundaryType\": \"Country\",\n \"startDate\": 1665497225000,\n \"endDate\": 1666497225000,\n \"targets\": [\n {\n \"total\": 450,\n \"target\": 350,\n \"type\": \"household|individual\"\n }\n ],\n \"description\": \"test\",\n \"department\": \"test\",\n \"referenceID\": \" 3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"projectSubType\": \"test\",\n \"parentBoundaryCode\": null,\n // \"projectId\": \"string\",\n \"resources\": [\n {\n \"resourceIds\": [\n // \"e82c3f49-da7c-459c-86a5-a56ac2d4f5b1\"\n \"PVAR-2024-03-21-000052\"\n ],\n \"count\": 0,\n \"active\": true,\n \"type\": \"resource\"\n // \"type\": \"staff|resource|facility\"\n }\n ]\n }\n // Add more entries as needed...\n ],\n \"deliveryRules\": [\n {\n \"startDate\": \"string\",\n \"endDate\": \"string\",\n \"cycle\": \"string\"\n }\n ],\n \"additionalDetails\": {}\n },\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"e45445a1-6891-4a76-a4e6-528e1dd24946\",\n \"userInfo\": {\n \"id\": 1284,\n \"uuid\": \"867ba408-1b82-4746-8274-eb916e625fea\",\n \"userName\": \"EMP57\",\n \"name\": \"Jagan\",\n \"mobileNumber\": \"6667776662\",\n \"emailId\": \"xyz@egovernments.org\",\n \"locale\": \"string\",\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": \"Amritsar\"\n },\n \"msgId\": \"1710912592752|en_MZ\",\n \"plainAccessRequest\": {}\n}\n}" }, "url": { - "raw": "https://unified-uat.digit.org/project-factory/v1/data/_generate?tenantId=mz&type=boundary&forceUpdate=true&hierarchyType=ADMIN&campaignId=3b331cd6-c0e9-4fd4-9d15-9212ba51706c", - "protocol": "https", + "raw": "http://localhost:8080/project-factory/v1/project-type/createCampaign", + "protocol": "http", "host": [ - "unified-uat", - "digit", - "org" + "localhost" ], + "port": "8080", "path": [ "project-factory", "v1", - "data", - "_generate" - ], - "query": [ - { - "key": "tenantId", - "value": "mz" - }, - { - "key": "type", - "value": "boundary" - }, - { - "key": "forceUpdate", - "value": "true" - }, - { - "key": "hierarchyType", - "value": "ADMIN" - }, - { - "key": "campaignId", - "value": "3b331cd6-c0e9-4fd4-9d15-9212ba51706c" - } + "project-type", + "createCampaign" ] } }, "response": [] }, { - "name": "boundary data generate(template generate)", + "name": "mdms bulk search Copy", "request": { "method": "POST", "header": [ { "key": "authority", - "value": "unified-uat.digit.org" + "value": "unified-dev.digit.org" }, { "key": "accept", @@ -142,19 +108,19 @@ }, { "key": "content-type", - "value": "application/json;charset=UTF-8" + "value": "application/json" }, { "key": "cookie", - "value": "_ga_XBQP06FR8V=GS1.1.1691570094.3.1.1691570094.60.0.0; _ga=GA1.1.2124364284.1689669598; _ga_P1TZCPKF6S=GS1.1.1691648339.2.0.1691648339.60.0.0; __cuid=fe28d9c8c84c4d2487b9cb6c9e4cdec1; amp_fef1e8=f4a3f3ed-50f2-409b-be4f-a1ce1dbb59f2R...1ho6v1de2.1ho6v2ouk.ot.21.qu; _ga_H9YC8FEN6F=GS1.1.1709630860.87.1.1709630957.60.0.0; PGADMIN_LANGUAGE=en" + "value": "_ga_XBQP06FR8V=GS1.1.1691570094.3.1.1691570094.60.0.0; _ga=GA1.1.2124364284.1689669598; _ga_P1TZCPKF6S=GS1.1.1691648339.2.0.1691648339.60.0.0; __cuid=fe28d9c8c84c4d2487b9cb6c9e4cdec1; amp_fef1e8=f4a3f3ed-50f2-409b-be4f-a1ce1dbb59f2R...1hgs4r9gr.1hgs4robc.nu.1r.pp; _ga_H9YC8FEN6F=GS1.1.1701751656.77.1.1701751677.39.0.0" }, { "key": "origin", - "value": "https://unified-uat.digit.org" + "value": "https://unified-dev.digit.org" }, { "key": "referer", - "value": "https://unified-uat.digit.org/workbench-ui/employee/campaign/setup-campaign?key=7&preview=false&id=2c948509-4245-4df7-b46b-9cabd5cdb577" + "value": "https://unified-dev.digit.org/works-ui/employee/measurement/update?tenantId=pg.citya&workOrderNumber=WO/2023-24/000894&mbNumber=MB/2023-24/001252" }, { "key": "sec-ch-ua", @@ -187,21 +153,20 @@ ], "body": { "mode": "raw", - "raw": "{\"Filters\":null,\"RequestInfo\":{\"apiId\":\"Rainmaker\",\"authToken\":\"f364ac54-8e9a-49ec-8aff-a3df278bd68d\",\"userInfo\":{\"id\":1052,\"uuid\":\"8b110055-330f-4e7b-b4c0-f618f29b9d47\",\"userName\":\"UATMZ\",\"name\":\"UATMZ\",\"mobileNumber\":\"8998988112\",\"emailId\":null,\"locale\":null,\"type\":\"EMPLOYEE\",\"roles\":[{\"name\":\"System Administrator\",\"code\":\"SYSTEM_ADMINISTRATOR\",\"tenantId\":\"mz\"},{\"name\":\"Campaign Manager\",\"code\":\"CAMPAIGN_MANAGER\",\"tenantId\":\"mz\"},{\"name\":\"Localisation admin\",\"code\":\"LOC_ADMIN\",\"tenantId\":\"mz\"},{\"name\":\"MDMS ADMIN\",\"code\":\"MDMS_ADMIN\",\"tenantId\":\"mz\"}],\"active\":true,\"tenantId\":\"mz\",\"permanentCity\":null},\"msgId\":\"1716892389916|en_IN\",\"plainAccessRequest\":{}}}" + "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{Auth}}\",\n \"userInfo\": {\n \"id\": 1284,\n \"uuid\": \"867ba408-1b82-4746-8274-eb916e625fea\",\n \"userName\": \"EMP57\",\n \"name\": \"Jagan\",\n \"mobileNumber\": \"6667776662\",\n \"emailId\": \"xyz@egovernments.org\",\n \"locale\": \"string\",\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": \"Amritsar\"\n },\n \"msgId\": \"1710912592752|en_MZ\",\n \"plainAccessRequest\": {}\n }\n}" }, "url": { - "raw": "https://unified-uat.digit.org/project-factory/v1/data/_generate?tenantId=mz&type=boundary&forceUpdate=true&hierarchyType=ADMIN&campaignId=2c948509-4245-4df7-b46b-9cabd5cdb577", - "protocol": "https", + "raw": "http://localhost:8080/mdms-bff/v1/mdmsbulk/search?tenantId=mz&schemaName=Dummy.dummy", + "protocol": "http", "host": [ - "unified-uat", - "digit", - "org" + "localhost" ], + "port": "8080", "path": [ - "project-factory", + "mdms-bff", "v1", - "data", - "_generate" + "mdmsbulk", + "search" ], "query": [ { @@ -209,20 +174,8 @@ "value": "mz" }, { - "key": "type", - "value": "boundary" - }, - { - "key": "forceUpdate", - "value": "true" - }, - { - "key": "hierarchyType", - "value": "ADMIN" - }, - { - "key": "campaignId", - "value": "2c948509-4245-4df7-b46b-9cabd5cdb577" + "key": "schemaName", + "value": "Dummy.dummy" } ] } @@ -230,7 +183,12 @@ "response": [] }, { - "name": "User generate data(template generate)", + "name": "campaign-generate Copy", + "protocolProfileBehavior": { + "disabledSystemHeaders": { + "content-type": true + } + }, "request": { "method": "POST", "header": [ @@ -260,7 +218,7 @@ }, { "key": "referer", - "value": "https://unified-uat.digit.org/workbench-ui/employee/campaign/setup-campaign?key=7&preview=false&id=2c948509-4245-4df7-b46b-9cabd5cdb577" + "value": "https://unified-uat.digit.org/workbench-ui/employee/campaign/setup-campaign?id=22f77798-3645-44b3-98ee-cc5c0ff2888c&draft=true&fetchBoundary=true&key=8&preview=false&skip=false" }, { "key": "sec-ch-ua", @@ -293,16 +251,15 @@ ], "body": { "mode": "raw", - "raw": "{\"RequestInfo\":{\"apiId\":\"Rainmaker\",\"authToken\":\"f364ac54-8e9a-49ec-8aff-a3df278bd68d\",\"userInfo\":{\"id\":1052,\"uuid\":\"8b110055-330f-4e7b-b4c0-f618f29b9d47\",\"userName\":\"UATMZ\",\"name\":\"UATMZ\",\"mobileNumber\":\"8998988112\",\"emailId\":null,\"locale\":null,\"type\":\"EMPLOYEE\",\"roles\":[{\"name\":\"System Administrator\",\"code\":\"SYSTEM_ADMINISTRATOR\",\"tenantId\":\"mz\"},{\"name\":\"Campaign Manager\",\"code\":\"CAMPAIGN_MANAGER\",\"tenantId\":\"mz\"},{\"name\":\"Localisation admin\",\"code\":\"LOC_ADMIN\",\"tenantId\":\"mz\"},{\"name\":\"MDMS ADMIN\",\"code\":\"MDMS_ADMIN\",\"tenantId\":\"mz\"}],\"active\":true,\"tenantId\":\"mz\",\"permanentCity\":null},\"msgId\":\"1716892389917|en_IN\",\"plainAccessRequest\":{}}}" + "raw": "{\n \"ResourceDetails\": {\n \"type\": \"facility\",\n \"hierarchyType\": \"ADMIN\",\n \"tenantId\": \"mz\",\n \"fileStoreId\": \"fd451260-67e8-4d57-a7bf-81734b0dccc7\",\n \"action\": \"validate\",\n \"campaignId\": \"22f77798-3645-44b3-98ee-cc5c0ff2888c\",\n \"additionalDetails\": {}\n },\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{Auth}}\",\n \"userInfo\": {\n \"id\": 1052,\n \"uuid\": \"8b110055-330f-4e7b-b4c0-f618f29b9d47\",\n \"userName\": \"UATMZ\",\n \"name\": \"UATMZ\",\n \"mobileNumber\": \"8998988112\",\n \"emailId\": null,\n \"locale\": null,\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS ADMIN\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": null\n },\n \"msgId\": \"1716899532287|en_IN\",\n \"plainAccessRequest\": {}\n }\n}" }, "url": { - "raw": "https://unified-uat.digit.org/project-factory/v1/data/_generate?tenantId=mz&type=userWithBoundary&forceUpdate=true&hierarchyType=ADMIN&campaignId=2c948509-4245-4df7-b46b-9cabd5cdb577", - "protocol": "https", + "raw": "http://localhost:8080/project-factory/v1/data/_generate?tenantId=mz&type=userWithBoundary&forceUpdate=true&hierarchyType=ADMIN&campaignId=3b331cd6-c0e9-4fd4-9d15-9212ba51706c", + "protocol": "http", "host": [ - "unified-uat", - "digit", - "org" + "localhost" ], + "port": "8080", "path": [ "project-factory", "v1", @@ -328,7 +285,7 @@ }, { "key": "campaignId", - "value": "2c948509-4245-4df7-b46b-9cabd5cdb577" + "value": "3b331cd6-c0e9-4fd4-9d15-9212ba51706c" } ] } @@ -336,7 +293,7 @@ "response": [] }, { - "name": "data download", + "name": "download-generated Copy", "protocolProfileBehavior": { "disabledSystemHeaders": { "content-type": true @@ -454,13 +411,13 @@ "response": [] }, { - "name": "data create", + "name": "project-factory/v1/data/_create Copy", "request": { "method": "POST", "header": [ { "key": "authority", - "value": "unified-dev.digit.org" + "value": "unified-uat.digit.org" }, { "key": "accept", @@ -472,19 +429,19 @@ }, { "key": "content-type", - "value": "application/json" + "value": "application/json;charset=UTF-8" }, { "key": "cookie", - "value": "_ga_XBQP06FR8V=GS1.1.1691570094.3.1.1691570094.60.0.0; _ga=GA1.1.2124364284.1689669598; _ga_P1TZCPKF6S=GS1.1.1691648339.2.0.1691648339.60.0.0; __cuid=fe28d9c8c84c4d2487b9cb6c9e4cdec1; amp_fef1e8=f4a3f3ed-50f2-409b-be4f-a1ce1dbb59f2R...1hgs4r9gr.1hgs4robc.nu.1r.pp; _ga_H9YC8FEN6F=GS1.1.1701751656.77.1.1701751677.39.0.0" + "value": "_ga_XBQP06FR8V=GS1.1.1691570094.3.1.1691570094.60.0.0; _ga=GA1.1.2124364284.1689669598; _ga_P1TZCPKF6S=GS1.1.1691648339.2.0.1691648339.60.0.0; __cuid=fe28d9c8c84c4d2487b9cb6c9e4cdec1; amp_fef1e8=f4a3f3ed-50f2-409b-be4f-a1ce1dbb59f2R...1ho6v1de2.1ho6v2ouk.ot.21.qu; _ga_H9YC8FEN6F=GS1.1.1709630860.87.1.1709630957.60.0.0; PGADMIN_LANGUAGE=en" }, { "key": "origin", - "value": "https://unified-dev.digit.org" + "value": "https://unified-uat.digit.org" }, { "key": "referer", - "value": "https://unified-dev.digit.org/works-ui/employee/measurement/update?tenantId=pg.citya&workOrderNumber=WO/2023-24/000894&mbNumber=MB/2023-24/001252" + "value": "https://unified-uat.digit.org/workbench-ui/employee/campaign/setup-campaign?id=3a567d66-9de5-4812-9441-240ae6ccb674&draft=true&fetchBoundary=true&key=9&preview=false" }, { "key": "sec-ch-ua", @@ -517,7 +474,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"RequestInfo\":{\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"3dcb7be0-fa76-440f-959c-30c7839ca1d0\",\n \"userInfo\": {\n \"id\": 6152,\n \"uuid\": \"63a21269-d40d-4c26-878f-4f4486b1f44b\",\n \"userName\": \"MDMSMZ\",\n \"name\": \"MDMSMZ\",\n \"mobileNumber\": \"8998989222\",\n \"emailId\": null,\n \"locale\": null,\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": null\n },\n \"msgId\": \"1715753883629|en_MZ\",\n \"plainAccessRequest\": {}\n},\n \"ResourceDetails\": {\n \"type\": \"facility\",\n // \"type\": \"facility|user|boundary\",\n \"tenantId\": \"mz\",\n // empty facility\n // \"fileStoreId\": \"cf37fb7a-f07e-44da-9f11-c06841ffdd44\",\n // worng\n // \"fileStoreId\": \"823110ca-55a1-434b-83d4-138e9e262661\",\n // right\n // \"fileStoreId\":\"252e68d4-44f8-4088-814c-ba0046f7da0f\",\n // right user\n // \"fileStoreId\":\"589fc456-70ab-422f-9c9a-b92ea3304f54\",\n //rightt with 5000 rows\n // \"fileStoreId\": \"0b47f2b3-840a-40b5-af8d-2273b836fd79\",\n //rightt with 200 rows\n // \"fileStoreId\":\"078a35f3-6db9-497b-bed5-d58e0ae3800a\",\n \"fileStoreId\":\"ae72d4a2-1a3a-431c-b30a-699983cf9468\",\n \"action\": \"validate\",\n \"hierarchyType\": \"ADMIN\",\n \"additionalDetails\": {}\n }\n}" + "raw": "{\n \"ResourceDetails\": {\n \"type\": \"boundary\",\n \"hierarchyType\": \"TEST15\",\n \"tenantId\": \"mz\",\n \"fileStoreId\": \"{{fileId}}\",\n \"action\": \"create\",\n // \"campaignId\": \"56cd8661-9d4b-4946-80e9-d50bdcfcce60\",\n \"additionalDetails\": {}\n },\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{Auth}}\",\n \"userInfo\": {\n \"id\": 1052,\n \"uuid\": \"8b110055-330f-4e7b-b4c0-f618f29b9d47\",\n \"userName\": \"UATMZ\",\n \"name\": \"UATMZ\",\n \"mobileNumber\": \"8998988112\",\n \"emailId\": null,\n \"locale\": null,\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS ADMIN\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": null\n },\n \"msgId\": \"1717482930188|en_IN\",\n \"plainAccessRequest\": {}\n}\n}" }, "url": { "raw": "http://localhost:8080/project-factory/v1/data/_create", @@ -537,7 +494,90 @@ "response": [] }, { - "name": "data search", + "name": "project-factory/v1/project-type/search Copy", + "request": { + "method": "POST", + "header": [ + { + "key": "authority", + "value": "unified-qa.digit.org" + }, + { + "key": "accept", + "value": "application/json, text/plain, */*" + }, + { + "key": "accept-language", + "value": "en-GB,en-US;q=0.9,en;q=0.8" + }, + { + "key": "content-type", + "value": "application/json;charset=UTF-8" + }, + { + "key": "cookie", + "value": "_ga_XBQP06FR8V=GS1.1.1691570094.3.1.1691570094.60.0.0; _ga=GA1.1.2124364284.1689669598; _ga_P1TZCPKF6S=GS1.1.1691648339.2.0.1691648339.60.0.0; __cuid=fe28d9c8c84c4d2487b9cb6c9e4cdec1; amp_fef1e8=f4a3f3ed-50f2-409b-be4f-a1ce1dbb59f2R...1ho6v1de2.1ho6v2ouk.ot.21.qu; _ga_H9YC8FEN6F=GS1.1.1709630860.87.1.1709630957.60.0.0" + }, + { + "key": "origin", + "value": "https://unified-qa.digit.org" + }, + { + "key": "referer", + "value": "https://unified-qa.digit.org/workbench-ui/employee/campaign/my-campaign" + }, + { + "key": "sec-ch-ua", + "value": "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"" + }, + { + "key": "sec-ch-ua-mobile", + "value": "?0" + }, + { + "key": "sec-ch-ua-platform", + "value": "\"Linux\"" + }, + { + "key": "sec-fetch-dest", + "value": "empty" + }, + { + "key": "sec-fetch-mode", + "value": "cors" + }, + { + "key": "sec-fetch-site", + "value": "same-origin" + }, + { + "key": "user-agent", + "value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{Auth}}\",\n \"userInfo\": {\n \"id\": 6152,\n \"uuid\": \"63a21269-d40d-4c26-878f-4f4486b1f44b\",\n \"userName\": \"MDMSMZ\",\n \"name\": \"MDMSMZ\",\n \"mobileNumber\": \"8998989222\",\n \"emailId\": null,\n \"locale\": null,\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": null\n },\n \"msgId\": \"1716986778045|en_MZ\",\n \"plainAccessRequest\": {}\n },\n \"CampaignDetails\": {\n \"tenantId\": \"mz\",\n \"ids\":[\"{{campaignId}}\"],\n // \"status\": [\n // \"creating\",\n // \"created\"\n // ],\n // \"createdBy\": \"63a21269-d40d-4c26-878f-4f4486b1f44b\",\n // \"campaignsIncludeDates\": true,\n // \"startDate\": 1716986778045,\n // \"endDate\": 1716986778045,\n // \"campaignName\":\"Performance Test Campaign Jun 17 id 00051\",\n \"pagination\": {\n \"sortBy\": \"createdTime\",\n \"sortOrder\": \"desc\",\n \"limit\": 10,\n \"offset\": 0\n }\n }\n}" + }, + "url": { + "raw": "http://localhost:8080/project-fctory/v1/project-type/search", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "project-fctory", + "v1", + "project-type", + "search" + ] + } + }, + "response": [] + }, + { + "name": "project-factory/v1/project-type/search Copy 2", "request": { "method": "POST", "header": [ @@ -624,10 +664,142 @@ ] } }, - "response": [] + "response": [ + { + "name": "project-factory/v1/project-type/search Copy", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "authority", + "value": "unified-dev.digit.org" + }, + { + "key": "accept", + "value": "application/json, text/plain, */*" + }, + { + "key": "accept-language", + "value": "en-GB,en-US;q=0.9,en;q=0.8" + }, + { + "key": "content-type", + "value": "application/json" + }, + { + "key": "cookie", + "value": "_ga_XBQP06FR8V=GS1.1.1691570094.3.1.1691570094.60.0.0; _ga=GA1.1.2124364284.1689669598; _ga_P1TZCPKF6S=GS1.1.1691648339.2.0.1691648339.60.0.0; __cuid=fe28d9c8c84c4d2487b9cb6c9e4cdec1; amp_fef1e8=f4a3f3ed-50f2-409b-be4f-a1ce1dbb59f2R...1hgs4r9gr.1hgs4robc.nu.1r.pp; _ga_H9YC8FEN6F=GS1.1.1701751656.77.1.1701751677.39.0.0" + }, + { + "key": "origin", + "value": "https://unified-dev.digit.org" + }, + { + "key": "referer", + "value": "https://unified-dev.digit.org/works-ui/employee/measurement/update?tenantId=pg.citya&workOrderNumber=WO/2023-24/000894&mbNumber=MB/2023-24/001252" + }, + { + "key": "sec-ch-ua", + "value": "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"" + }, + { + "key": "sec-ch-ua-mobile", + "value": "?0" + }, + { + "key": "sec-ch-ua-platform", + "value": "\"Linux\"" + }, + { + "key": "sec-fetch-dest", + "value": "empty" + }, + { + "key": "sec-fetch-mode", + "value": "cors" + }, + { + "key": "sec-fetch-site", + "value": "same-origin" + }, + { + "key": "user-agent", + "value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"4d18d41f-bf61-4a50-9382-c7728d57b076\",\n \"userInfo\": {\n \"id\": 947,\n \"uuid\": \"e82c3f49-da7c-459c-86a5-a56ac2d4f5b1\",\n \"userName\": \"EMP44\",\n \"name\": \"Jagan\",\n \"mobileNumber\": \"6667776662\",\n \"emailId\": \"xyz@egovernments.org\",\n \"locale\": \"string\",\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"pg\"\n },\n {\n \"name\": \"HCM SYSTEM ADMINISTRATOR\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"pg\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"pg\"\n },\n {\n \"name\": \"SUPER USER\",\n \"code\": \"SUPERUSER\",\n \"tenantId\": \"pg\"\n },\n {\n \"name\": \"HRMS Admin\",\n \"code\": \"HRMS_ADMIN\",\n \"tenantId\": \"pg\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"pg\",\n \"permanentCity\": \"Amritsar\"\n },\n \"msgId\": \"1709110250993|en_IN\",\n \"plainAccessRequest\": {}\n },\n \"SearchCriteria\": {\n \"id\": [\n \"fb34e006-0435-4565-acac-988a6992da54\"\n ],\n \"tenantId\": \"mz\",\n \"type\": \"facility\",\n \"status\": \"data-accepted\",\n \"action\": \"create\",\n \"createdBy\": \"e82c3f49-da7c-459c-86a5-a56ac2d4f5b1\"\n }\n}" + }, + "url": { + "raw": "http://localhost:8095/project-factory/v1/data/_search", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8095", + "path": [ + "project-factory", + "v1", + "data", + "_search" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "563" + }, + { + "key": "ETag", + "value": "W/\"233-jv57E1Q5Yt5KHhUp7M2vxbi5Abg\"" + }, + { + "key": "Date", + "value": "Tue, 02 Apr 2024 05:35:08 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"ResponseInfo\": {\n \"apiId\": \"egov-bff\",\n \"ver\": \"0.0.1\",\n \"ts\": 1712036108718,\n \"status\": \"successful\",\n \"desc\": \"new-response\"\n },\n \"ResourceDetails\": [\n {\n \"id\": \"fb34e006-0435-4565-acac-988a6992da54\",\n \"tenantId\": \"mz\",\n \"status\": \"data-accepted\",\n \"action\": \"create\",\n \"fileStoreId\": \"d5a6f652-37da-49a2-9284-e867b9e4de83\",\n \"processedFilestoreId\": \"5f1fcf05-e6d1-47e0-a96f-019a454cc7d2\",\n \"type\": \"facility\",\n \"createdBy\": \"e82c3f49-da7c-459c-86a5-a56ac2d4f5b1\",\n \"lastModifiedBy\": \"e82c3f49-da7c-459c-86a5-a56ac2d4f5b1\",\n \"createdTime\": 1710921693188,\n \"lastModifiedTime\": 1710921693188,\n \"additionalDetails\": {}\n }\n ]\n}" + } + ] }, { - "name": "campaign create", + "name": "/project-factory/v1/project-type/create Copy", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var response=pm.response.json();", + "pm.environment.set(\"campaignId\", response.CampaignDetails.id);", + "pm.environment.set(\"campaignNum\",response.CampaignDetails.campaignNumber)" + ], + "type": "text/javascript", + "packages": {} + } + } + ], "protocolProfileBehavior": { "disabledSystemHeaders": { "content-type": true @@ -699,15 +871,16 @@ ], "body": { "mode": "raw", - "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"0cc530cb-aeb7-4735-a89b-ed5b0607518d\",\n \"userInfo\": {\n \"id\": 1284,\n \"uuid\": \"867ba408-1b82-4746-8274-eb916e625fea\",\n \"userName\": \"EMP57\",\n \"name\": \"Jagan\",\n \"mobileNumber\": \"6667776662\",\n \"emailId\": \"xyz@egovernments.org\",\n \"locale\": \"string\",\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": \"Amritsar\"\n },\n \"msgId\": \"1713593588138|en_MZ\",\n \"plainAccessRequest\": {}\n},\n \"CampaignDetails\": {\n // \"id\":\"f9f9b96a-d8aa-427b-a755-25bcc22ef60f\",\n \"hierarchyType\": \"ADMIN\",\n \"tenantId\": \"mz\",\n \"campaignName\": \"testName860\",\n \"action\": \"create\",\n // \"action\": \"create\",\n \"startDate\": 1765497222002,\n \"endDate\": 1767497225002,\n // \"projectId\":\"74c57591-13cc-4e21-97d3-2b6c87e7fc98\",\n \"boundaries\": [\n {\n \"code\": \"f5F6xAskA05\",\n \"type\": \"Provincia\",\n \"isRoot\": false\n },\n {\n \"code\": \"mz\",\n \"type\": \"Country\",\n \"isRoot\": true,\n \"includeAllChildren\": true\n }\n ],\n \"resources\": [\n {\n \"filestoreId\": \"252e68d4-44f8-4088-814c-ba0046f7da0f\",\n \"type\": \"facility\",\n \"filename\": \"hkjsss.xlsx\"\n },\n {\n \"filestoreId\":\"49280d90-31f2-4911-8d1e-0482cc6bf70c\",\n \"type\": \"user\",\n \"filename\": \"hkjsss.xlsx\"\n }\n // {\n // \"filestoreId\": \"d96c0248-dcfd-414c-8f8c-635dad0a89f1\",\n // \"type\": \"boundary\",\n // \"filename\": \"s.xlsx\"\n // }\n ],\n \"projectType\": \"LLIN-mz\",\n \"deliveryRules\": [\n {\n \"startDate\": 1666497225000,\n \"endDate\": 1666497225000,\n \"cycleNumber\": 0,\n \"deliveryNumber\": 0,\n \"deliveryRuleNumber\": 0,\n \"products\": [\n \"string\"\n ],\n \"conditions\": [\n {\n \"attribute\": \"string\",\n \"operator\": \"string\",\n \"value\": 0\n }\n ]\n }\n // {\n // \"startDate\": 1667497225001,\n // \"endDate\": 1668897225001,\n // \"cycleNumber\": 0,\n // \"deliveryNumber\": 0,\n // \"deliveryRuleNumber\": 0,\n // \"products\": [\n // \"string\"\n // ],\n // \"conditions\": [\n // {\n // \"attribute\": \"string\",\n // \"operator\": \"string\",\n // \"value\": 0\n // }\n // ]\n // }\n ],\n \"additionalDetails\": {\n \"beneficiaryType\": \"HOUSEHOLD\"\n }\n }\n}" + "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{Auth}}\",\n \"userInfo\": {\n \"id\": 1284,\n \"uuid\": \"867ba408-1b82-4746-8274-eb916e625fea\",\n \"userName\": \"EMP57\",\n \"name\": \"Jagan\",\n \"mobileNumber\": \"6667776662\",\n \"emailId\": \"xyz@egovernments.org\",\n \"locale\": \"string\",\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": \"Amritsar\"\n },\n \"msgId\": \"1713593588138|en_MZ\",\n \"plainAccessRequest\": {}\n },\n \"CampaignDetails\": {\n // \"id\": \"992f8c27-7dde-43f8-9dad-e6ec9d821d39\",\n \"tenantId\": \"mz\",\n // \"status\": \"created\",\n \"action\": \"draft\",\n // \"campaignNumber\": \"CMP-2024-07-30-001374\",\n \"campaignName\": \"jul31_3\",\n \"projectType\": \"LLIN-mz\",\n \"hierarchyType\": \"Health\",\n \"boundaryCode\": \"HEALTH_MO\",\n // \"projectId\": \"baeadf90-ded8-47eb-a02a-c4c9c4527321\",\n \"startDate\": 1722450600000,\n \"endDate\": 1725560999000,\n \"additionalDetails\": {\n \"key\": 10,\n \"beneficiaryType\": \"HOUSEHOLD\"\n },\n \"resources\": [\n {\n \"type\": \"facility\",\n \"filename\": \"Facility Template (56).xlsx\",\n \"resourceId\": \"31a528c6-1345-4587-ad21-7bafcbe3b28f\",\n \"filestoreId\": \"6aebec94-463d-4f81-bb13-5c42ac848c25\",\n \"createResourceId\": \"628b0382-4964-441a-a687-9391b92fa5e5\"\n },\n {\n \"type\": \"boundaryWithTarget\",\n \"filename\": \"Target Template (84).xlsx\",\n \"resourceId\": \"7244300a-dd01-49ca-a39f-27845e84f28c\",\n \"filestoreId\": \"dc3c52ea-96b0-49b4-b38e-6360f09b98e3\"\n },\n {\n \"type\": \"user\",\n \"filename\": \"User Template (30).xlsx\",\n \"resourceId\": \"3fa115c9-a394-48a9-8c53-c9929b0abd0e\",\n \"filestoreId\": \"a0254f2e-1ed0-4255-b471-9a912230eb96\",\n \"createResourceId\": \"ebeaf8e1-e185-4b64-98f1-43b9eb8cc095\"\n }\n ],\n \"boundaries\": [\n {\n \"code\": \"HEALTH_MO\",\n \"type\": \"Country\",\n \"isRoot\": true,\n \"includeAllChildren\": false\n },\n {\n \"code\": \"HEALTH_MO_13_NAMPULA\",\n \"type\": \"Province\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO\",\n \"includeAllChildren\": false\n },\n {\n \"code\": \"HEALTH_MO_13_02_MOSSURILEE\",\n \"type\": \"District\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_NAMPULA\",\n \"includeAllChildren\": false\n },\n {\n \"code\": \"HEALTH_MO_13_02_02_CHITIMA-01\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_02_MOSSURILEE\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_02_01_NSADZO\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_02_MOSSURILEE\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"type\": \"District\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_NAMPULA\",\n \"includeAllChildren\": false\n },\n {\n \"code\": \"HEALTH_MO_13_01_04_NIHESSIUE\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_01_03_CHITEEIMA\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_01_02_CHIFUNDE-01\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_01_01_MUALDZI\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"includeAllChildren\": true\n }\n ],\n \"deliveryRules\": [\n {\n \"endDate\": 1723573799000,\n \"products\": [\n {\n \"name\": \"SP 500mg\",\n \"count\": 1,\n \"value\": \"PVAR-2024-03-15-000043\"\n }\n ],\n \"startDate\": 1722537000000,\n \"conditions\": [\n {\n \"value\": 3,\n \"operator\": \"LESS_THAN_EQUAL_TO\",\n \"attribute\": \"CAMPAIGN_BEDNET_INDIVIDUAL_LABEL\"\n },\n {\n \"value\": 1.8,\n \"operator\": \"LESS_THAN_EQUAL_TO\",\n \"attribute\": \"CAMPAIGN_BEDNET_HOUSEHOLD_LABEL\"\n }\n ],\n \"cycleNumber\": 1,\n \"deliveryNumber\": 1,\n \"deliveryRuleNumber\": 1\n }\n ],\n \"auditDetails\": {\n \"createdBy\": \"bfab6822-ec28-40f0-aef1-efd1cda8fcd5\",\n \"lastModifiedBy\": \"bfab6822-ec28-40f0-aef1-efd1cda8fcd5\",\n \"createdTime\": 1722324752043,\n \"lastModifiedTime\": 1722324899659\n }\n }\n}" }, "url": { - "raw": "http://localhost:8080/project-factory/v1/project-type/create", - "protocol": "http", + "raw": "https://unified-dev.digit.org/project-factory/v1/project-type/create", + "protocol": "https", "host": [ - "localhost" + "unified-dev", + "digit", + "org" ], - "port": "8080", "path": [ "project-factory", "v1", @@ -719,7 +892,7 @@ "response": [] }, { - "name": "update campaign", + "name": "/project-factory/v1/project-type/update Copy", "protocolProfileBehavior": { "disabledSystemHeaders": { "content-type": true @@ -792,13 +965,13 @@ ], "body": { "mode": "raw", - "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"44cb5589-8dc2-4182-b5a4-afdb692ce831\",\n \"userInfo\": {\n \"id\": 6152,\n \"uuid\": \"63a21269-d40d-4c26-878f-4f4486b1f44b\",\n \"userName\": \"MDMSMZ\",\n \"name\": \"MDMSMZ\",\n \"mobileNumber\": \"8998989222\",\n \"emailId\": null,\n \"locale\": null,\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": null\n },\n \"msgId\": \"1713364121714|en_MZ\",\n \"plainAccessRequest\": {}\n },\n \"CampaignDetails\": {\n \"id\": \"f9ea7046-75f2-4ac3-837d-caf14fdcdcca\",\n \"tenantId\": \"mz\",\n \"status\": \"drafted\",\n \"action\": \"draft\",\n \"campaignNumber\": \"CMP-2024-05-02-000855\",\n \"campaignName\": \"weartux\",\n \"projectType\": \"MR-DN\",\n \"hierarchyType\": \"ADMIN\",\n \"boundaryCode\": \"\",\n \"projectId\": null,\n \"startDate\": 0,\n \"endDate\": 0,\n \"createdBy\": \"63a21269-d40d-4c26-878f-4f4486b1f44b\",\n \"lastModifiedBy\": \"63a21269-d40d-4c26-878f-4f4486b1f44b\",\n \"createdTime\": 1714654527543,\n \"lastModifiedTime\": 1714654527544,\n \"additionalDetails\": {\n \"key\": 2,\n \"beneficiaryType\": \"INDIVIDUAL\"\n },\n \"campaignDetails\": {\n \"resources\": []\n }\n }\n}\n// \"boundaries\": [\n// {\n// \"code\": \"f5F6xAskA05\",\n// \"type\": \"Provincia\",\n// \"isRoot\": false\n// },\n// {\n// \"code\": \"mz\",\n// \"type\": \"Country\",\n// \"isRoot\": true,\n// \"includeAllChildren\": true\n// }\n// ]," + "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"44cb5589-8dc2-4182-b5a4-afdb692ce831\",\n \"userInfo\": {\n \"id\": 6152,\n \"uuid\": \"63a21269-d40d-4c26-878f-4f4486b1f44b\",\n \"userName\": \"MDMSMZ\",\n \"name\": \"MDMSMZ\",\n \"mobileNumber\": \"8998989222\",\n \"emailId\": null,\n \"locale\": null,\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": null\n },\n \"msgId\": \"1713364121714|en_MZ\",\n \"plainAccessRequest\": {}\n },\n \"CampaignDetails\": {\n \"id\": \"{{campaignId}}\",\n \"tenantId\": \"mz\",\n \"status\": \"drafted\",\n \"action\": \"create\",\n \"campaignNumber\": \"{{campaignNum}}\",\n \"campaignName\": \"{{campaignName}}\",\n \"projectType\": \"LLIN-mz\",\n \"hierarchyType\": \"Health\",\n \"boundaryCode\": \"HEALTH_MO\",\n // \"projectId\": \"baeadf90-ded8-47eb-a02a-c4c9c4527321\",\n \"startDate\": 1722450600000,\n \"endDate\": 1725560999000,\n \"additionalDetails\": {\n \"key\": 10,\n \"beneficiaryType\": \"HOUSEHOLD\"\n },\n \"resources\": [\n {\n \"type\": \"facility\",\n \"filename\": \"Facility Template (56).xlsx\",\n \"resourceId\": \"31a528c6-1345-4587-ad21-7bafcbe3b28f\",\n \"filestoreId\": \"6aebec94-463d-4f81-bb13-5c42ac848c25\",\n \"createResourceId\": \"628b0382-4964-441a-a687-9391b92fa5e5\"\n },\n {\n \"type\": \"boundaryWithTarget\",\n \"filename\": \"Target Template (84).xlsx\",\n \"resourceId\": \"7244300a-dd01-49ca-a39f-27845e84f28c\",\n \"filestoreId\": \"dc3c52ea-96b0-49b4-b38e-6360f09b98e3\"\n },\n {\n \"type\": \"user\",\n \"filename\": \"User Template (30).xlsx\",\n \"resourceId\": \"3fa115c9-a394-48a9-8c53-c9929b0abd0e\",\n \"filestoreId\": \"a0254f2e-1ed0-4255-b471-9a912230eb96\",\n \"createResourceId\": \"ebeaf8e1-e185-4b64-98f1-43b9eb8cc095\"\n }\n ],\n \"boundaries\": [\n {\n \"code\": \"HEALTH_MO\",\n \"type\": \"Country\",\n \"isRoot\": true,\n \"includeAllChildren\": false\n },\n {\n \"code\": \"HEALTH_MO_13_NAMPULA\",\n \"type\": \"Province\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO\",\n \"includeAllChildren\": false\n },\n {\n \"code\": \"HEALTH_MO_13_02_MOSSURILEE\",\n \"type\": \"District\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_NAMPULA\",\n \"includeAllChildren\": false\n },\n {\n \"code\": \"HEALTH_MO_13_02_02_CHITIMA-01\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_02_MOSSURILEE\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_02_01_NSADZO\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_02_MOSSURILEE\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"type\": \"District\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_NAMPULA\",\n \"includeAllChildren\": false\n },\n {\n \"code\": \"HEALTH_MO_13_01_04_NIHESSIUE\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_01_03_CHITEEIMA\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_01_02_CHIFUNDE-01\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"includeAllChildren\": true\n },\n {\n \"code\": \"HEALTH_MO_13_01_01_MUALDZI\",\n \"type\": \"Post Administrative\",\n \"isRoot\": false,\n \"parent\": \"HEALTH_MO_13_01_MURRUPULA\",\n \"includeAllChildren\": true\n }\n ],\n \"deliveryRules\": [\n {\n \"endDate\": 1723573799000,\n \"products\": [\n {\n \"name\": \"SP 500mg\",\n \"count\": 1,\n \"value\": \"PVAR-2024-03-15-000043\"\n }\n ],\n \"startDate\": 1722537000000,\n \"conditions\": [\n {\n \"value\": 3,\n \"operator\": \"LESS_THAN_EQUAL_TO\",\n \"attribute\": \"CAMPAIGN_BEDNET_INDIVIDUAL_LABEL\"\n },\n {\n \"value\": 1.8,\n \"operator\": \"LESS_THAN_EQUAL_TO\",\n \"attribute\": \"CAMPAIGN_BEDNET_HOUSEHOLD_LABEL\"\n }\n ],\n \"cycleNumber\": 1,\n \"deliveryNumber\": 1,\n \"deliveryRuleNumber\": 1\n }\n ],\n \"auditDetails\": {\n \"createdBy\": \"bfab6822-ec28-40f0-aef1-efd1cda8fcd5\",\n \"lastModifiedBy\": \"bfab6822-ec28-40f0-aef1-efd1cda8fcd5\",\n \"createdTime\": 1722324752043,\n \"lastModifiedTime\": 1722324899659\n }\n }\n}" }, "url": { - "raw": "https://unified-qa.digit.org/project-factory/v1/project-type/update", + "raw": "https://unified-dev.digit.org/project-factory/v1/project-type/update", "protocol": "https", "host": [ - "unified-qa", + "unified-dev", "digit", "org" ], @@ -813,7 +986,12 @@ "response": [] }, { - "name": "campaign search", + "name": "getProcessTracks Copy", + "protocolProfileBehavior": { + "disabledSystemHeaders": { + "content-type": true + } + }, "request": { "method": "POST", "header": [ @@ -872,28 +1050,39 @@ { "key": "user-agent", "value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" + }, + { + "key": "Content-Type", + "value": "application/json" } ], "body": { "mode": "raw", - "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"b2985fc2-9980-4fba-adcf-3248e3a66490\",\n \"userInfo\": {\n \"id\": 6152,\n \"uuid\": \"63a21269-d40d-4c26-878f-4f4486b1f44b\",\n \"userName\": \"MDMSMZ\",\n \"name\": \"MDMSMZ\",\n \"mobileNumber\": \"8998989222\",\n \"emailId\": null,\n \"locale\": null,\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": null\n },\n \"msgId\": \"1713364121714|en_MZ\",\n \"plainAccessRequest\": {}\n },\n \"CampaignDetails\": {\n \"ids\": [\n \"7cfc93f2-9c4c-4415-9417-e61d2203bdd8\"\n ],\n \"tenantId\": \"mz\",\n // \"startDate\": 1665497224000,\n // \"endDate\": 1665929226005,\n // \"projectType\": \"default1\",\n // \"campaignName\": \"test1Name803\",\n // \"status\": \"started\",\n // \"createdBy\": \"string\",\n // \"campaignNumber\": \"string\",\n \"pagination\": {\n \"sortBy\": \"createdTime\",\n \"sortOrder\": \"desc\",\n \"limit\": 15,\n \"offset\": 0\n }\n // \"createdTime\":1665929226005\n }\n}" + "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{Auth}}\",\n \"userInfo\": {\n \"id\": 1284,\n \"uuid\": \"867ba408-1b82-4746-8274-eb916e625fea\",\n \"userName\": \"EMP57\",\n \"name\": \"Jagan\",\n \"mobileNumber\": \"6667776662\",\n \"emailId\": \"xyz@egovernments.org\",\n \"locale\": \"string\",\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"System Administrator\",\n \"code\": \"SYSTEM_ADMINISTRATOR\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Localisation admin\",\n \"code\": \"LOC_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"MDMS Admin\",\n \"code\": \"MDMS_ADMIN\",\n \"tenantId\": \"mz\"\n },\n {\n \"name\": \"Campaign Manager\",\n \"code\": \"CAMPAIGN_MANAGER\",\n \"tenantId\": \"mz\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"mz\",\n \"permanentCity\": \"Amritsar\"\n },\n \"msgId\": \"1713593588138|en_MZ\",\n \"plainAccessRequest\": {}\n}\n}" }, "url": { - "raw": "http://localhost:8080/project-factory/v1/project-type/search", - "protocol": "http", + "raw": "https://unified-dev.digit.org/project-factory/v1/project-type/getProcessTrack?campaignId=eeded5f1-e779-454f-9cc7-2b20ba4839e0", + "protocol": "https", "host": [ - "localhost" + "unified-dev", + "digit", + "org" ], - "port": "8080", "path": [ "project-factory", "v1", "project-type", - "search" + "getProcessTrack" + ], + "query": [ + { + "key": "campaignId", + "value": "eeded5f1-e779-454f-9cc7-2b20ba4839e0" + } ] } }, "response": [] } ] -} +} \ No newline at end of file diff --git a/health-services/project-factory/src/server/api/campaignApis.ts b/health-services/project-factory/src/server/api/campaignApis.ts index f0a5a231965..c063f1e653d 100644 --- a/health-services/project-factory/src/server/api/campaignApis.ts +++ b/health-services/project-factory/src/server/api/campaignApis.ts @@ -3,15 +3,17 @@ import { v4 as uuidv4 } from 'uuid'; import { httpRequest } from "../utils/request"; import { getFormattedStringForDebug, logger } from "../utils/logger"; import createAndSearch from '../config/createAndSearch'; -import { getDataFromSheet, generateActivityMessage, throwError, translateSchema, replicateRequest } from "../utils/genericUtils"; +import { getDataFromSheet, generateActivityMessage, throwError, translateSchema, replicateRequest, appendProjectTypeToCapacity } from "../utils/genericUtils"; import { immediateValidationForTargetSheet, validateSheetData, validateTargetSheetData } from '../validators/campaignValidators'; import { callMdmsTypeSchema, getCampaignNumber } from "./genericApis"; -import { boundaryBulkUpload, convertToTypeData, generateHierarchy, generateProcessedFileAndPersist, getLocalizedName, reorderBoundariesOfDataAndValidate } from "../utils/campaignUtils"; +import { boundaryBulkUpload, convertToTypeData, generateHierarchy, generateProcessedFileAndPersist, getBoundaryOnWhichWeSplit, getLocalizedName, reorderBoundariesOfDataAndValidate, checkIfSourceIsMicroplan } from "../utils/campaignUtils"; const _ = require('lodash'); -import { produceModifiedMessages } from "../kafka/Listener"; +import { produceModifiedMessages } from "../kafka/Producer"; import { createDataService } from "../service/dataManageService"; import { searchProjectTypeCampaignService } from "../service/campaignManageService"; import { getExcelWorkbookFromFileURL } from "../utils/excelUtils"; +import { processTrackStatuses, processTrackTypes } from "../config/constants"; +import { persistTrack } from "../utils/processTrackUtils"; @@ -258,8 +260,18 @@ async function getUuidsError(request: any, response: any, mobileNumberRowNumberM errors.push({ status: "INVALID", rowNumber: mobileNumberRowNumberMapping[user?.mobileNumber], errorDetails: `User with mobileNumber ${user?.mobileNumber} doesn't have username` }) count++; } + else if (!user?.userDetails?.password) { + logger.info(`User with mobileNumber ${user?.mobileNumber} doesn't have password`) + errors.push({ status: "INVALID", rowNumber: mobileNumberRowNumberMapping[user?.mobileNumber], errorDetails: `User with mobileNumber ${user?.mobileNumber} doesn't have password` }) + count++; + } + else if (!user?.userUuid) { + logger.info(`User with mobileNumber ${user?.mobileNumber} doesn't have userServiceUuid`) + errors.push({ status: "INVALID", rowNumber: mobileNumberRowNumberMapping[user?.mobileNumber], errorDetails: `User with mobileNumber ${user?.mobileNumber} doesn't have userServiceUuid` }) + count++; + } else { - request.body.mobileNumberUuidsMapping[user?.mobileNumber] = { userUuid: user?.id, code: user?.userDetails?.username, rowNumber: mobileNumberRowNumberMapping[user?.mobileNumber] } + request.body.mobileNumberUuidsMapping[user?.mobileNumber] = { userUuid: user?.id, code: user?.userDetails?.username, rowNumber: mobileNumberRowNumberMapping[user?.mobileNumber], password: user?.userDetails?.password, userServiceUuid: user?.userUuid } } } if (count > 0) { @@ -518,11 +530,12 @@ async function processValidate(request: any, localizationMap?: { [key: string]: const createAndSearchConfig = createAndSearch[type] const dataFromSheet = await getDataFromSheet(request, request?.body?.ResourceDetails?.fileStoreId, request?.body?.ResourceDetails?.tenantId, createAndSearchConfig, null, localizationMap) if (type == 'boundaryWithTarget') { + let differentTabsBasedOnLevel = await getBoundaryOnWhichWeSplit(request); + differentTabsBasedOnLevel = getLocalizedName(`${request?.body?.ResourceDetails?.hierarchyType}_${differentTabsBasedOnLevel}`.toUpperCase(), localizationMap); logger.info("target sheet format validation started"); - // added await to ensure validations complete before proceeding, preventing premature errors. - await immediateValidationForTargetSheet(dataFromSheet, localizationMap); + await immediateValidationForTargetSheet(request, dataFromSheet, differentTabsBasedOnLevel, localizationMap); logger.info("target sheet format validation completed and starts with data validation"); - validateTargetSheetData(dataFromSheet, request, createAndSearchConfig?.boundaryValidation, localizationMap); + validateTargetSheetData(dataFromSheet, request, createAndSearchConfig?.boundaryValidation, differentTabsBasedOnLevel, localizationMap); } else { @@ -693,7 +706,8 @@ async function enrichAlreadyExsistingUser(request: any) { employee.uuid = request?.body?.mobileNumberUuidsMapping[employee?.user?.mobileNumber].userUuid; employee.code = request?.body?.mobileNumberUuidsMapping[employee?.user?.mobileNumber].code; employee.user.userName = request?.body?.mobileNumberUuidsMapping[employee?.user?.mobileNumber].code; - employee.user.password = config.user.userDefaultPassword; + employee.user.password = request?.body?.mobileNumberUuidsMapping[employee?.user?.mobileNumber].password; + employee.user.userServiceUuid = request?.body?.mobileNumberUuidsMapping[employee?.user?.mobileNumber].userServiceUuid; } } } @@ -716,7 +730,7 @@ async function performAndSaveResourceActivity(request: any, createAndSearchConfi } _.set(newRequestBody, createAndSearchConfig?.createBulkDetails?.createPath, chunkData); creationTime = Date.now(); - if (type == "facility") { + if (type == "facility" || type == "facilityMicroplan") { await handeFacilityProcess(request, createAndSearchConfig, params, activities, newRequestBody); } else if (type == "user") { @@ -774,16 +788,27 @@ async function handleResouceDetailsError(request: any, error: any) { if (request?.body?.ResourceDetails?.action == "create") { persistMessage.ResourceDetails.additionalDetails = { error: stringifiedError } } - produceModifiedMessages(persistMessage, config?.kafka?.KAFKA_UPDATE_RESOURCE_DETAILS_TOPIC); + await produceModifiedMessages(persistMessage, config?.kafka?.KAFKA_UPDATE_RESOURCE_DETAILS_TOPIC); } - if (request?.body?.Activities && Array.isArray(request?.body?.Activities && request?.body?.Activities.length > 0)) { + if (request?.body?.Activities && Array.isArray(request?.body?.Activities) && request?.body?.Activities.length > 0) { logger.info("Waiting for 2 seconds"); await new Promise(resolve => setTimeout(resolve, 2000)); - produceModifiedMessages(request?.body, config?.kafka?.KAFKA_CREATE_RESOURCE_ACTIVITY_TOPIC); + const activityObject = request?.body?.Activities; + await produceModifiedMessages(activityObject, config?.kafka?.KAFKA_CREATE_RESOURCE_ACTIVITY_TOPIC); + } +} + +async function persistCreationProcess(request: any, status: any) { + if (request?.body?.ResourceDetails?.type == "facility") { + await persistTrack(request?.body?.ResourceDetails?.campaignId, processTrackTypes.facilityCreation, status); + } + else if (request?.body?.ResourceDetails?.type == "user") { + await persistTrack(request?.body?.ResourceDetails?.campaignId, processTrackTypes.staffCreation, status); } } async function processAfterValidation(dataFromSheet: any, createAndSearchConfig: any, request: any, localizationMap?: { [key: string]: string }) { + await persistCreationProcess(request, processTrackStatuses.inprogress) try { const typeData = await convertToTypeData(request, dataFromSheet, createAndSearchConfig, request.body, localizationMap) request.body.dataToCreate = typeData.createData; @@ -801,8 +826,10 @@ async function processAfterValidation(dataFromSheet: any, createAndSearchConfig: } } catch (error: any) { console.log(error) + await persistCreationProcess(request, processTrackStatuses.failed) await handleResouceDetailsError(request, error) } + await persistCreationProcess(request, processTrackStatuses.completed) } /** @@ -817,14 +844,39 @@ async function processCreate(request: any, localizationMap?: any) { boundaryBulkUpload(request, localizationMap); } else { - const createAndSearchConfig = createAndSearch[type] + // console.log(`Source is MICROPLAN -->`, source); + let createAndSearchConfig: any; + createAndSearchConfig = createAndSearch[type]; + const responseFromCampaignSearch = await getCampaignSearchResponse(request); + const campaignType = responseFromCampaignSearch?.CampaignDetails[0]?.projectType; + if (checkIfSourceIsMicroplan(request?.body?.ResourceDetails)) { + logger.info(`Data create Source is MICROPLAN`); + if (createAndSearchConfig?.parseArrayConfig?.parseLogic) { + createAndSearchConfig.parseArrayConfig.parseLogic = createAndSearchConfig.parseArrayConfig.parseLogic.map( + (item: any) => { + if (item.sheetColumn === "E") { + item.sheetColumnName += `_${campaignType}`; + } + return item; + } + ); + } + } + const dataFromSheet = await getDataFromSheet(request, request?.body?.ResourceDetails?.fileStoreId, request?.body?.ResourceDetails?.tenantId, createAndSearchConfig, undefined, localizationMap) let schema: any; + if (type == "facility") { logger.info("Fetching schema to validate the created data for type: " + type); const mdmsResponse = await callMdmsTypeSchema(request, tenantId, type); schema = mdmsResponse } + else if (type == "facilityMicroplan") { + const mdmsResponse = await callMdmsTypeSchema(request, tenantId, "facility", "microplan"); + schema = mdmsResponse + logger.info("Appending project type to capacity for microplan " + campaignType); + schema = await appendProjectTypeToCapacity(schema, campaignType); + } else if (type == "user") { logger.info("Fetching schema to validate the created data for type: " + type); const mdmsResponse = await callMdmsTypeSchema(request, tenantId, type); @@ -843,33 +895,41 @@ async function processCreate(request: any, localizationMap?: any) { * @param request The HTTP request object. */ async function createProjectCampaignResourcData(request: any) { - // Create resources for a project campaign - if (request?.body?.CampaignDetails?.action == "create" && request?.body?.CampaignDetails?.resources) { - for (const resource of request?.body?.CampaignDetails?.resources) { - if (resource.type != "boundaryWithTarget") { - const resourceDetails = { - type: resource.type, - fileStoreId: resource.filestoreId, - tenantId: request?.body?.CampaignDetails?.tenantId, - action: "create", - hierarchyType: request?.body?.CampaignDetails?.hierarchyType, - additionalDetails: {}, - campaignId: request?.body?.CampaignDetails?.id - }; - logger.info(`Creating the resources for type ${resource.type}`) - logger.debug("resourceDetails " + getFormattedStringForDebug(resourceDetails)) - const createRequestBody = { - RequestInfo: request.body.RequestInfo, - ResourceDetails: resourceDetails - } - const req = replicateRequest(request, createRequestBody) - const res: any = await createDataService(req) - if (res?.id) { - resource.createResourceId = res?.id + await persistTrack(request.body.CampaignDetails.id, processTrackTypes.triggerResourceCreation, processTrackStatuses.inprogress); + try { + // Create resources for a project campaign + if (request?.body?.CampaignDetails?.action == "create" && request?.body?.CampaignDetails?.resources) { + for (const resource of request?.body?.CampaignDetails?.resources) { + if (resource.type != "boundaryWithTarget") { + const resourceDetails = { + type: resource.type, + fileStoreId: resource.filestoreId, + tenantId: request?.body?.CampaignDetails?.tenantId, + action: "create", + hierarchyType: request?.body?.CampaignDetails?.hierarchyType, + additionalDetails: {}, + campaignId: request?.body?.CampaignDetails?.id + }; + logger.info(`Creating the resources for type ${resource.type}`) + logger.debug("resourceDetails " + getFormattedStringForDebug(resourceDetails)) + const createRequestBody = { + RequestInfo: request.body.RequestInfo, + ResourceDetails: resourceDetails + } + const req = replicateRequest(request, createRequestBody) + const res: any = await createDataService(req) + if (res?.id) { + resource.createResourceId = res?.id + } } } } + } catch (error: any) { + console.log(error) + await persistTrack(request?.body?.CampaignDetails?.id, processTrackTypes.triggerResourceCreation, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + throw new Error(error) } + await persistTrack(request.body.CampaignDetails.id, processTrackTypes.triggerResourceCreation, processTrackStatuses.completed); } async function confirmProjectParentCreation(request: any, projectId: any) { diff --git a/health-services/project-factory/src/server/api/genericApis.ts b/health-services/project-factory/src/server/api/genericApis.ts index 3325efc9d73..c7fa9ced8e0 100644 --- a/health-services/project-factory/src/server/api/genericApis.ts +++ b/health-services/project-factory/src/server/api/genericApis.ts @@ -6,10 +6,9 @@ import { getFormattedStringForDebug, logger } from "../utils/logger"; // Import import { correctParentValues, findMapValue, generateActivityMessage, getBoundaryRelationshipData, getDataSheetReady, getLocalizedHeaders, sortCampaignDetails, throwError } from "../utils/genericUtils"; // Import utility functions import { extractCodesFromBoundaryRelationshipResponse, generateFilteredBoundaryData, getConfigurableColumnHeadersBasedOnCampaignType, getFiltersFromCampaignSearchResponse, getLocalizedName } from '../utils/campaignUtils'; // Import utility functions import { getCampaignSearchResponse, getHierarchy } from './campaignApis'; -import { validateMappingId } from '../utils/campaignMappingUtils'; -import { campaignStatuses } from '../config/constants'; const _ = require('lodash'); // Import lodash library import { getExcelWorkbookFromFileURL } from "../utils/excelUtils"; +import { processMapping } from "../utils/campaignMappingUtils"; //Function to get Workbook with different tabs (for type target) @@ -38,9 +37,9 @@ const getTargetWorkbook = async (fileUrl: string, localizationMap?: any) => { function getJsonData(sheetData: any, getRow = false, getSheetName = false, sheetName = "sheet1") { const jsonData: any[] = []; - const headers = sheetData[1]; // Extract the headers from the first row + const headers = sheetData[0]; // Extract the headers from the first row - for (let i = 2; i < sheetData.length; i++) { + for (let i = 1; i < sheetData.length; i++) { const rowData: any = {}; const row = sheetData[i]; if (row) { @@ -52,7 +51,7 @@ function getJsonData(sheetData: any, getRow = false, getSheetName = false, sheet } } if (Object.keys(rowData).length > 0) { - if (getRow) rowData["!row#number!"] = i; + if (getRow) rowData["!row#number!"] = i + 1; if (getSheetName) rowData["!sheet#name!"] = sheetName; jsonData.push(rowData); } @@ -62,11 +61,7 @@ function getJsonData(sheetData: any, getRow = false, getSheetName = false, sheet } function validateFirstRowColumn(createAndSearchConfig: any, worksheet: any, localizationMap: any) { - if ( - createAndSearchConfig && - createAndSearchConfig.parseArrayConfig && - createAndSearchConfig.parseArrayConfig.parseLogic - ) { + if (createAndSearchConfig?.parseArrayConfig?.parseLogic) { const parseLogic = createAndSearchConfig.parseArrayConfig.parseLogic; // Iterate over each column configuration for (const columnConfig of parseLogic) { @@ -91,6 +86,25 @@ function validateFirstRowColumn(createAndSearchConfig: any, worksheet: any, loca } } +function getSheetDataFromWorksheet(worksheet: any) { + var sheetData: any[][] = []; + + worksheet.eachRow({ includeEmpty: true }, (row: any, rowNumber: any) => { + const rowData: any[] = []; + + row.eachCell({ includeEmpty: true }, (cell: any, colNumber: any) => { + const cellValue = getRawCellValue(cell); + rowData[colNumber - 1] = cellValue; // Store cell value (0-based index) + }); + + // Push non-empty row only + if (rowData.some(value => value !== null && value !== undefined)) { + sheetData[rowNumber - 1] = rowData; // Store row data (0-based index) + } + }); + return sheetData; +} + // Function to retrieve data from a specific sheet in an Excel file const getSheetData = async ( fileUrl: string, @@ -99,19 +113,42 @@ const getSheetData = async ( createAndSearchConfig?: any, localizationMap?: { [key: string]: string } ) => { - // Retrieve workbook using the getTargetWorkbook function + // Retrieve workbook using the getExcelWorkbookFromFileURL function const localizedSheetName = getLocalizedName(sheetName, localizationMap); const workbook: any = await getExcelWorkbookFromFileURL(fileUrl, localizedSheetName); const worksheet: any = workbook.getWorksheet(localizedSheetName); - // If parsing array configuration is provided, validate first row of each column validateFirstRowColumn(createAndSearchConfig, worksheet, localizationMap); - const sheetData = worksheet.getSheetValues({ includeEmpty: true }); + // Collect sheet data by iterating through rows and cells + const sheetData = getSheetDataFromWorksheet(worksheet); const jsonData = getJsonData(sheetData, getRow); return jsonData; +}; + +// Helper function to extract raw cell value +function getRawCellValue(cell: any) { + if (cell.value && typeof cell.value === 'object') { + if ('richText' in cell.value) { + // Handle rich text + return cell.value.richText.map((rt: any) => rt.text).join(''); + } else if ('formula' in cell.value) { + // Get the result of the formula + return cell.value.result; + } else if ('error' in cell.value) { + // Get the error value + return cell.value.error; + } else if (cell.value instanceof Date) { + // Handle date values + return cell.value.toISOString(); + } else { + // Return as-is for other object types + return cell.value; + } + } + return cell.value; // Return raw value for plain strings, numbers, etc. } const getTargetSheetData = async ( @@ -131,7 +168,7 @@ const getTargetSheetData = async ( for (const sheetName of localizedSheetNames) { const worksheet = workbook.getWorksheet(sheetName); - const sheetData = worksheet.getSheetValues({ includeEmpty: true }); + const sheetData = getSheetDataFromWorksheet(worksheet); workbookData[sheetName] = getJsonData(sheetData, getRow, getSheetName, sheetName); } return workbookData; @@ -155,10 +192,10 @@ const getTargetSheetDataAfterCode = async ( for (const sheetName of localizedSheetNames) { const worksheet = workbook.getWorksheet(sheetName); - const sheetData = worksheet.getSheetValues({ includeEmpty: true }); + const sheetData = getSheetDataFromWorksheet(worksheet); // Find the target column index where the first row value matches codeColumnName - const firstRow = sheetData[1]; + const firstRow = sheetData[0]; let targetColumnIndex = -1; for (let colIndex = 1; colIndex < firstRow.length; colIndex++) { if (firstRow[colIndex] === codeColumnName) { @@ -545,26 +582,31 @@ async function getAutoGeneratedBoundaryCodes(boundaryList: any, childParentMap: const column = columnsData[i]; for (const element of column) { if (!findMapValue(elementCodesMap, element)) { - const parentCode = findMapValue(childParentMap, element) - if (parentCode !== undefined && parentCode !== null) { - countMap.set(parentCode, (findMapValue(countMap, parentCode) || 0) + 1); - let code; - const grandParentCode = findMapValue(childParentMap, parentCode); - if (grandParentCode != null && grandParentCode != undefined) { - const parentBoundaryCode = findMapValue(elementCodesMap, parentCode) - const lastUnderscoreIndex = parentBoundaryCode.lastIndexOf('_'); - const parentBoundaryCodeTrimmed = lastUnderscoreIndex !== -1 ? parentBoundaryCode.substring(0, lastUnderscoreIndex) : parentBoundaryCode; - code = generateElementCode(countMap.get(parentCode), parentBoundaryCodeTrimmed, element.value); - } else { - code = generateElementCode(countMap.get(parentCode), findMapValue(elementCodesMap, parentCode), element.value); - } + const parentElement = findMapValue(childParentMap, element); + if (parentElement !== undefined && parentElement !== null) { + const parentBoundaryCode = findMapValue(elementCodesMap, parentElement); + const currentCount = (findMapValue(countMap, parentElement) || 0) + 1; + countMap.set(parentElement, currentCount); + + const code = generateElementCode( + currentCount, + parentElement, + parentBoundaryCode, + element.value, + config.excludeBoundaryNameAtLastFromBoundaryCodes, + childParentMap, + elementCodesMap + ); + elementCodesMap.set(element, code); // Store the code of the element in the map } else { // Generate default code if parent code is not found - elementCodesMap.set(element, (request?.body?.ResourceDetails?.hierarchyType + "_").toUpperCase() + element.value.toString().substring(0, 2).toUpperCase()); + const prefix = config?.excludeHierarchyTypeFromBoundaryCodes + ? element.value.toString().substring(0, 2).toUpperCase() + : `${(request?.body?.ResourceDetails?.hierarchyType + "_").toUpperCase()}${element.value.toString().substring(0, 2).toUpperCase()}`; + + elementCodesMap.set(element, prefix); } - } else { - continue; } } } @@ -574,21 +616,33 @@ async function getAutoGeneratedBoundaryCodes(boundaryList: any, childParentMap: /** * Function to generate an element code based on sequence, parent code, and element. * @param sequence Sequence number - * @param parentCode Parent code + * @param parentElement Parent element + * @param parentBoundaryCode Parent boundary code * @param element Element + * @param excludeBoundaryNameAtLastFromBoundaryCodes Whether to exclude boundary name at last + * @param childParentMap Map of child to parent elements + * @param elementCodesMap Map of elements to their codes * @returns Generated element code */ -function generateElementCode(sequence: any, parentCode: any, element: any) { +function generateElementCode(sequence: any, parentElement: any, parentBoundaryCode: any, element: any, excludeBoundaryNameAtLastFromBoundaryCodes?: any, childParentMap?: any, elementCodesMap?: any) { // Pad single-digit numbers with leading zero - let paddedSequence = sequence.toString().padStart(2, "0"); - const code = parentCode.toUpperCase() + - "_" + - paddedSequence + - "_" + - element.toUpperCase(); - return ( - code.trim() - ); + const paddedSequence = sequence.toString().padStart(2, "0"); + let code; + + if (excludeBoundaryNameAtLastFromBoundaryCodes) { + code = `${parentBoundaryCode.toUpperCase()}_${paddedSequence}`; + } else { + const grandParentElement = findMapValue(childParentMap, parentElement); + if (grandParentElement != null && grandParentElement != undefined) { + const lastUnderscoreIndex = parentBoundaryCode ? parentBoundaryCode.lastIndexOf('_') : -1; + const parentBoundaryCodeTrimmed = lastUnderscoreIndex !== -1 ? parentBoundaryCode.substring(0, lastUnderscoreIndex) : parentBoundaryCode; + code = `${parentBoundaryCodeTrimmed.toUpperCase()}_${paddedSequence}_${element.toString().toUpperCase()}`; + } else { + code = `${parentBoundaryCode.toUpperCase()}_${paddedSequence}_${element.toString().toUpperCase()}`; + } + } + + return code.trim(); } /** @@ -637,21 +691,35 @@ async function getBoundarySheetData( headers ); } else { - // logger.info("boundaryData for sheet " + JSON.stringify(boundaryData)) - const responseFromCampaignSearch = - await getCampaignSearchResponse(request); - const FiltersFromCampaignId = getFiltersFromCampaignSearchResponse(responseFromCampaignSearch) - if (FiltersFromCampaignId?.Filters != null) { + let Filters: any = {}; + if (request?.body?.Filters && request?.body?.Filters.boundaries && Array.isArray(request?.body?.Filters.boundaries) && request?.body?.Filters.boundaries.length > 0) { + Filters = { + Filters: { + boundaries: request.body.Filters.boundaries.map((boundary: any) => ({ + ...boundary, + boundaryType: boundary.type // Adding boundaryType field + })) + } + }; + } + else { + // logger.info("boundaryData for sheet " + JSON.stringify(boundaryData)) + const responseFromCampaignSearch = + await getCampaignSearchResponse(request); + Filters = getFiltersFromCampaignSearchResponse(responseFromCampaignSearch) + } + if (Filters?.Filters && Filters.Filters.boundaries && Array.isArray(Filters.Filters.boundaries) && Filters.Filters.boundaries.length > 0) { const filteredBoundaryData = await generateFilteredBoundaryData( request, - FiltersFromCampaignId + Filters ); return await getDataSheetReady( filteredBoundaryData, request, localizationMap ); - } else { + } + else { return await getDataSheetReady(boundaryData, request, localizationMap); } } @@ -671,8 +739,7 @@ async function createStaff(resouceBody: any) { undefined, undefined, undefined, - false, - true + false ); logger.info("Project Staff mapping created"); logger.debug( @@ -700,8 +767,7 @@ async function createProjectResource(resouceBody: any) { undefined, undefined, undefined, - false, - true + false ); logger.debug("Project Resource Created"); logger.debug( @@ -729,8 +795,7 @@ async function createProjectFacility(resouceBody: any) { undefined, undefined, undefined, - false, - true + false ); logger.info("Project Facility Created"); logger.debug( @@ -792,32 +857,31 @@ const createProjectFacilityHelper = (resourceId: any, projectId: any, resouceBod * @param resouceBody The resource body. */ async function createRelatedEntity( - resources: any, - tenantId: any, - projectId: any, - startDate: any, - endDate: any, - resouceBody: any + createRelatedEntityArray: any[], + CampaignDetails: any, + requestBody: any ) { - // Array to hold all promises - const promises = []; - - // Create related entities - for (const resource of resources) { - const type = resource?.type; - for (const resourceId of resource?.resourceIds) { - logger.info(`creating project ${type} mapping for project : ${projectId} and resourceId ${resourceId}`); - if (type === "staff") { - promises.push(createStaffHelper(resourceId, projectId, resouceBody, tenantId, startDate, endDate)); - } else if (type === "resource") { - promises.push(createProjectResourceHelper(resourceId, projectId, resouceBody, tenantId, startDate, endDate)); - } else if (type === "facility") { - promises.push(createProjectFacilityHelper(resourceId, projectId, resouceBody, tenantId)); + const mappingArray = [] + for (const entity of createRelatedEntityArray) { + const { tenantId, projectId, startDate, endDate, resouceBody, campaignId, resources } = entity + for (const resource of resources) { + const type = resource?.type; + const mappingObject: any = { + type, + tenantId, + resource, + projectId, + startDate, + endDate, + resouceBody, + campaignId, + CampaignDetails } + mappingArray.push(mappingObject) } } - // Wait for all promises to complete - await Promise.all(promises); + const mappingObject: any = { mappingArray: mappingArray, CampaignDetails: CampaignDetails, RequestInfo: requestBody?.RequestInfo } + await processMapping(mappingObject) } @@ -827,32 +891,34 @@ async function createRelatedEntity( */ async function createRelatedResouce(requestBody: any) { const id = requestBody?.Campaign?.id; - const campaignDetails = await validateMappingId(requestBody, id); - if (campaignDetails?.status == campaignStatuses.inprogress) { - logger.info("Campaign Already In Progress and Mapped"); - } else { - sortCampaignDetails(requestBody?.Campaign?.CampaignDetails); - correctParentValues(requestBody?.Campaign?.CampaignDetails); - // Create related resources - const { tenantId } = requestBody?.Campaign; - - for (const campaignDetails of requestBody?.Campaign?.CampaignDetails) { - const resouceBody: any = { - RequestInfo: requestBody.RequestInfo, - }; - var { projectId, startDate, endDate, resources } = campaignDetails; - startDate = parseInt(startDate); - endDate = parseInt(endDate); - await createRelatedEntity( - resources, - tenantId, - projectId, - startDate, - endDate, - resouceBody - ); - } + sortCampaignDetails(requestBody?.Campaign?.CampaignDetails); + correctParentValues(requestBody?.Campaign?.CampaignDetails); + // Create related resources + const { tenantId } = requestBody?.Campaign; + const createRelatedEntityArray = []; + for (const campaignDetails of requestBody?.Campaign?.CampaignDetails) { + const resouceBody: any = { + RequestInfo: requestBody.RequestInfo, + }; + var { projectId, startDate, endDate, resources } = campaignDetails; + campaignDetails.id = id; + startDate = parseInt(startDate); + endDate = parseInt(endDate); + createRelatedEntityArray.push({ + resources, + tenantId, + projectId, + startDate, + endDate, + resouceBody, + campaignId: id, + }); } + await createRelatedEntity( + createRelatedEntityArray, + requestBody?.CampaignDetails, + requestBody + ); } /** @@ -1006,7 +1072,7 @@ async function createBoundaryRelationship(request: any, boundaryMap: Map<{ key: logger.info(`Boundary relationship created for boundaryType :: ${boundaryType} & boundaryCode :: ${boundaryCode} `); const newRequestBody = JSON.parse(JSON.stringify(request.body)); - activityMessage.push(await generateActivityMessage(request?.body?.ResourceDetails?.tenantId, request.body, newRequestBody, response, request?.body?.ResourceDetails?.type, url, response?.statusCode)); + activityMessage.push(await generateActivityMessage(request?.body?.ResourceDetails?.tenantId, request.body, newRequestBody, response, request?.body?.ResourceDetails?.type, `${config.host.boundaryHost}${config.paths.boundaryRelationshipCreate}`, response?.statusCode)); } catch (error) { // Log the error and rethrow to be caught by the outer try...catch block logger.error(`Error creating boundary relationship for boundaryType :: ${boundaryType} & boundaryCode :: ${boundaryCode} :: `, error); @@ -1187,5 +1253,8 @@ export { getTargetSheetDataAfterCode, callMdmsData, getMDMSV1Data, - callMdmsTypeSchema -} + callMdmsTypeSchema, + getSheetDataFromWorksheet, + createStaffHelper, + createProjectFacilityHelper, createProjectResourceHelper +}; diff --git a/health-services/project-factory/src/server/config/constants.ts b/health-services/project-factory/src/server/config/constants.ts index fffa89a7c87..5023c9de00b 100644 --- a/health-services/project-factory/src/server/config/constants.ts +++ b/health-services/project-factory/src/server/config/constants.ts @@ -10,7 +10,8 @@ export const CONSTANTS: any = { INVALID_PAGINATION: "Invalid pagination", KAFKA_ERROR: "Some error occured in kafka", SCHEMA_ERROR: " Schema related error", - RESPONSE_NOT_FOUND_ERROR: "Response not found" + RESPONSE_NOT_FOUND_ERROR: "Response not found", + GENERATE_ERROR: "Error while generating user/facility/boundary" }, FILE: { INVALID_FILE: "No download URL returned for the given fileStoreId", @@ -32,7 +33,8 @@ export const CONSTANTS: any = { CAMPAIGN_NOT_FOUND: "Campaign not found", GENERATION_REQUIRE: "First generate then download", RESOURCE_CREATION_ERROR: "Some error occured during resource creation", - CAMPAIGN_NAME_ERROR: "Campaign name already exists" + CAMPAIGN_NAME_ERROR: "Campaign name already exists", + CAMPAIGN_ALREADY_MAPPED: "Campaign is already mapped", }, BOUNDARY: { BOUNDARY_DATA_NOT_FOUND: "No boundary data found in the system.", @@ -108,6 +110,41 @@ export const generatedResourceStatuses: any = { expired: "expired" } +export const processTrackTypes = { + validation: "validation", + triggerResourceCreation: "trigger-resource-creation", + facilityCreation: "facility-creation", + staffCreation: "staff-creation", + targetAndDeliveryRulesCreation: "target-and-delivery-rules-creation", + confirmingResourceCreation: "confirming-resource-creation", + prepareResourceForMapping: "prepare-resource-for-mapping", + validateMappingResource: "validate-mapping-resource", + staffMapping: "staff-mapping", + resourceMapping: "resource-mapping", + facilityMapping: "facility-mapping", + campaignCreation: "campaign-creation", + error: "error" +} + +export const processTrackForUi = [ + processTrackTypes.facilityCreation, + processTrackTypes.staffCreation, + processTrackTypes.targetAndDeliveryRulesCreation, + processTrackTypes.staffMapping, + processTrackTypes.resourceMapping, + processTrackTypes.facilityMapping, + processTrackTypes.campaignCreation, + processTrackTypes.error +]; + + +export const processTrackStatuses = { + inprogress: "inprogress", + completed: "completed", + toBeCompleted: "toBeCompleted", + failed: "failed", +} + // Retrieves the error object containing the error code, message, and notFound flag. export const getErrorCodes = (module: string, key: string): Error => { diff --git a/health-services/project-factory/src/server/config/createAndSearch.ts b/health-services/project-factory/src/server/config/createAndSearch.ts index d89c45b7606..8fb63b1be9f 100644 --- a/health-services/project-factory/src/server/config/createAndSearch.ts +++ b/health-services/project-factory/src/server/config/createAndSearch.ts @@ -132,6 +132,138 @@ const createAndSearch: any = { searchPath: "Facilities" } }, + "facilityMicroplan": { + requiresToSearchFromSheet: [ + { + sheetColumnName: "HCM_ADMIN_CONSOLE_FACILITY_CODE", + searchPath: "Facility.id" + } + ], + boundaryValidation: { + column: "HCM_ADMIN_CONSOLE_BOUNDARY_CODE_MANDATORY" + }, + sheetSchema: { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FacilityTemplateSchema", + "type": "object", + "properties": { + "Facility Name": { + "type": "string", + "maxLength": 2000, + "minLength": 1 + }, + "Facility Type": { + // "type": "string", + "enum": ["Warehouse", "Health Facility", "Storing Resource"] + }, + "Facility Status": { + // "type": "string", + "enum": ["Temporary", "Permanent"] + }, + "Capacity": { + "type": "number", + "minimum": 1, + "maximum": 100000000 + } + }, + "required": [ + "Facility Name", + "Facility Type", + "Facility Status", + "Capacity" + ], + "unique": [ + "Facility Name" + ] + }, + uniqueIdentifier: "id", + uniqueIdentifierColumn: "A", + activeColumn: "F", + activeColumnName: "HCM_ADMIN_CONSOLE_FACILITY_USAGE_MICROPLAN", + uniqueIdentifierColumnName: "HCM_ADMIN_CONSOLE_FACILITY_CODE", + matchEachKey: true, + parseArrayConfig: { + sheetName: "HCM_ADMIN_CONSOLE_FACILITIES", + parseLogic: [ + { + sheetColumn: "A", + sheetColumnName: "HCM_ADMIN_CONSOLE_FACILITY_CODE", + resultantPath: "id", + type: "string" + }, + { + sheetColumn: "B", + sheetColumnName: "HCM_ADMIN_CONSOLE_FACILITY_NAME_MICROPLAN", + resultantPath: "name", + type: "string" + }, + { + sheetColumn: "C", + sheetColumnName: "HCM_ADMIN_CONSOLE_FACILITY_TYPE_MICROPLAN", + resultantPath: "usage", + type: "string" + }, + { + sheetColumn: "D", + sheetColumnName: "HCM_ADMIN_CONSOLE_FACILITY_STATUS_MICROPLAN", + resultantPath: "isPermanent", + type: "boolean", + conversionCondition: { + "Permanent": "true", + "Temporary": "" + } + }, + { + sheetColumn: "E", + sheetColumnName: "HCM_ADMIN_CONSOLE_FACILITY_CAPACITY_MICROPLAN", + resultantPath: "storageCapacity", + type: "number" + }, + { + sheetColumn: "J", + sheetColumnName: "HCM_ADMIN_CONSOLE_RESIDING_BOUNDARY_CODE_MICROPLAN" + } + ], + tenantId: { + getValueViaPath: "ResourceDetails.tenantId", + resultantPath: "tenantId" + } + }, + createBulkDetails: { + limit: 50, + createPath: "Facilities", + url: config.host.facilityHost + "facility/v1/bulk/_create" + }, + searchDetails: { + searchElements: [ + { + keyPath: "tenantId", + getValueViaPath: "ResourceDetails.tenantId", + isInParams: true, + isInBody: false, + }, + { + keyPath: "Facility", + isInParams: false, + isInBody: true, + } + ], + searchLimit: { + keyPath: "limit", + value: "200", + isInParams: true, + isInBody: false, + }, + searchOffset: { + keyPath: "offset", + value: "0", + isInParams: true, + isInBody: false, + }, + url: config.host.facilityHost + "facility/v1/_search", + searchPath: "Facilities" + } + }, "boundary": { parseArrayConfig: { sheetName: "HCM_ADMIN_CONSOLE_BOUNDARY_CODE", diff --git a/health-services/project-factory/src/server/config/index.ts b/health-services/project-factory/src/server/config/index.ts index 07286afac9e..7260b93c59d 100644 --- a/health-services/project-factory/src/server/config/index.ts +++ b/health-services/project-factory/src/server/config/index.ts @@ -16,7 +16,14 @@ const getDBSchemaName = (dbSchema = "") => { } // Configuration object containing various environment variables const config = { + cacheTime : 300, + enableDynamicTemplateFor: process.env.ENABLE_DYNAMIC_TEMPLATE_FOR || "", + isCallGenerateWhenDeliveryConditionsDiffer: (process.env.IS_CALL_GENERATE_WHEN_DELIVERY_CONDITIONS_DIFFER === "true") || false, + prefixForMicroplanCampaigns: "MP", + excludeHierarchyTypeFromBoundaryCodes: (process.env.EXCLUDE_HIERARCHY_TYPE_FROM_BOUNDARY_CODES === "true") || false, + excludeBoundaryNameAtLastFromBoundaryCodes: (process.env.EXCLUDE_BOUNDARY_NAME_AT_LAST_FROM_BOUNDARY_CODES === "true") || false, masterNameForSchemaOfColumnHeaders: "adminSchema", + masterNameForSplitBoundariesOn: "hierarchyConfig", boundary: { boundaryCode: process.env.BOUNDARY_CODE_HEADER_NAME || "HCM_ADMIN_CONSOLE_BOUNDARY_CODE", boundaryTab: process.env.BOUNDARY_TAB_NAME || "HCM_ADMIN_CONSOLE_BOUNDARY_DATA", @@ -35,6 +42,7 @@ const config = { userSchemaMasterName: process.env.USER_SCHEMA_MASTER || "userSchema", userDefaultPassword: process.env.USER_DEFAULT_PASSWORD || "eGov@123", userPasswordAutoGenerate: process.env.USER_PASSWORD_AUTO_GENERATE || "true", + mapUserViaCommonParent: process.env.MAP_USER_VIA_COMMON_PARENT || false, }, cacheValues: { cacheEnabled: process.env.CACHE_ENABLED, @@ -44,7 +52,7 @@ const config = { kafka: { // Kafka topics KAFKA_SAVE_PROJECT_CAMPAIGN_DETAILS_TOPIC: process.env.KAFKA_SAVE_PROJECT_CAMPAIGN_DETAILS_TOPIC || "save-project-campaign-details", - KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC: process.env.KAFKA_SAVE_PROJECT_CAMPAIGN_DETAILS_TOPIC || "update-project-campaign-details", + KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC: process.env.KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC || "update-project-campaign-details", KAFKA_START_CAMPAIGN_MAPPING_TOPIC: process.env.KAFKA_START_CAMPAIGN_MAPPING_TOPIC || "start-campaign-mapping", KAFKA_UPDATE_CAMPAIGN_DETAILS_TOPIC: process.env.KAFKA_UPDATE_CAMPAIGN_DETAILS_TOPIC || "update-campaign-details", KAFKA_CREATE_RESOURCE_DETAILS_TOPIC: process.env.KAFKA_CREATE_RESOURCE_DETAILS_TOPIC || "create-resource-details", @@ -54,6 +62,7 @@ const config = { KAFKA_CREATE_GENERATED_RESOURCE_DETAILS_TOPIC: process.env.KAFKA_CREATE_GENERATED_RESOURCE_DETAILS_TOPIC || "create-generated-resource-details", KAFKA_SAVE_PROCESS_TRACK_TOPIC: process.env.KAFKA_SAVE_PROCESS_TRACK_TOPIC || "save-process-track", KAFKA_UPDATE_PROCESS_TRACK_TOPIC: process.env.KAFKA_UPDATE_PROCESS_TRACK_TOPIC || "update-process-track", + KAFKA_TEST_TOPIC: "test-topic-project-factory", }, // Database configuration diff --git a/health-services/project-factory/src/server/config/models/createRequestSchema.ts b/health-services/project-factory/src/server/config/models/createRequestSchema.ts index ed56e706d16..18a96101fbd 100644 --- a/health-services/project-factory/src/server/config/models/createRequestSchema.ts +++ b/health-services/project-factory/src/server/config/models/createRequestSchema.ts @@ -4,7 +4,7 @@ export const createRequestSchema = { "properties": { "type": { "type": "string", - "enum": ["boundary", "facility", "user", "boundaryWithTarget"] + "enum": ["boundary", "facility", "user", "boundaryWithTarget","facilityMicroplan"] }, "tenantId": { "type": "string", diff --git a/health-services/project-factory/src/server/config/models/downloadRequestSchema.ts b/health-services/project-factory/src/server/config/models/downloadRequestSchema.ts index b47e714dac5..d23b7df2f4f 100644 --- a/health-services/project-factory/src/server/config/models/downloadRequestSchema.ts +++ b/health-services/project-factory/src/server/config/models/downloadRequestSchema.ts @@ -5,7 +5,7 @@ export const downloadRequestSchema = { "tenantId": { "type": "string", "maxLength": 128, - "minLength": 1, + "minLength": 1 }, "type": { "type": "string", @@ -22,14 +22,24 @@ export const downloadRequestSchema = { "hierarchyType": { "type": "string", "maxLength": 128, - "minLength": 1, + "minLength": 1 }, "id": { "type": "string", - "maxlength": 128, - "minLength": 1, + "maxLength": 128, + "minLength": 1 + }, + "status": { + "type": "string", + "maxLength": 500, + "minLength": 1 + }, + "campaignId": { + "type": "string", + "maxLength": 128, + "minLength": 1 } }, "required": ["tenantId", "type", "hierarchyType"], "additionalProperties": false -} \ No newline at end of file +} \ No newline at end of file diff --git a/health-services/project-factory/src/server/config/models/generateRequestSchema.ts b/health-services/project-factory/src/server/config/models/generateRequestSchema.ts index cc1df4b70e6..4ca530f9393 100644 --- a/health-services/project-factory/src/server/config/models/generateRequestSchema.ts +++ b/health-services/project-factory/src/server/config/models/generateRequestSchema.ts @@ -12,8 +12,6 @@ export const generateRequestSchema = { "maxLength": 128, "minLength": 1, "enum": [ - "facility", - "user", "boundary", "facilityWithBoundary", "userWithBoundary" diff --git a/health-services/project-factory/src/server/controllers/campaignManage/campaignManage.controller.ts b/health-services/project-factory/src/server/controllers/campaignManage/campaignManage.controller.ts index 384735fb683..dc3232294e2 100644 --- a/health-services/project-factory/src/server/controllers/campaignManage/campaignManage.controller.ts +++ b/health-services/project-factory/src/server/controllers/campaignManage/campaignManage.controller.ts @@ -1,5 +1,5 @@ import * as express from "express"; -import { createCampaignService, createProjectTypeCampaignService, searchProjectTypeCampaignService, updateProjectTypeCampaignService } from "../../service/campaignManageService"; +import { createCampaignService, createProjectTypeCampaignService, searchProcessTracksService, searchProjectTypeCampaignService, updateProjectTypeCampaignService } from "../../service/campaignManageService"; import { logger } from "../../utils/logger"; import { errorResponder, sendResponse } from "../../utils/genericUtils"; @@ -23,6 +23,7 @@ class campaignManageController { this.router.post(`${this.path}/update`, this.updateProjectTypeCampaign); this.router.post(`${this.path}/search`, this.searchProjectTypeCampaign); this.router.post(`${this.path}/createCampaign`, this.createCampaign); + this.router.post(`${this.path}/getProcessTrack`, this.searchProcessTracks); } /** * Handles the creation of a project type campaign. @@ -111,6 +112,24 @@ class campaignManageController { } }; + searchProcessTracks = async ( + request: express.Request, + response: express.Response + ) => { + try { + logger.info("RECEIVED A PROCESS SEARCH REQUEST"); + const processTrack = await searchProcessTracksService(request); + // Send response with campaign details + return sendResponse(response, { processTrack }, request); + } + catch (e: any) { + console.log(e) + logger.error(String(e)) + // Handle errors and send error response + return errorResponder({ message: String(e), code: e?.code, description: e?.description }, request, response, e?.status || 500); + } + }; + }; export default campaignManageController; diff --git a/health-services/project-factory/src/server/kafka/Listener.ts b/health-services/project-factory/src/server/kafka/Listener.ts index ac91786b621..128f99c08cb 100644 --- a/health-services/project-factory/src/server/kafka/Listener.ts +++ b/health-services/project-factory/src/server/kafka/Listener.ts @@ -1,105 +1,55 @@ -import { Message ,ConsumerGroup, ConsumerGroupOptions} from 'kafka-node'; +import { ConsumerGroup, ConsumerGroupOptions, Message } from 'kafka-node'; import config from '../config'; -import { getFormattedStringForDebug, logger } from '../utils/logger'; // Importing logger utility for logging -import { producer } from './Producer'; // Importing producer from the Producer module -import { processCampaignMapping } from '../utils/campaignMappingUtils'; -import { enrichAndPersistCampaignWithError } from '../utils/campaignUtils'; -import { throwError } from '../utils/genericUtils'; +import { getFormattedStringForDebug, logger } from '../utils/logger'; +import { shutdownGracefully } from '../utils/genericUtils'; +import { handleCampaignMapping } from '../utils/campaignMappingUtils'; - - -// Replace with the correct Kafka broker(s) and topic name -const kafkaConfig:ConsumerGroupOptions = { - kafkaHost: config?.host?.KAFKA_BROKER_HOST, // Use the correct broker address and port +// Kafka Configuration +const kafkaConfig: ConsumerGroupOptions = { + kafkaHost: config?.host?.KAFKA_BROKER_HOST, groupId: 'project-factory', autoCommit: true, autoCommitIntervalMs: 5000, fromOffset: 'latest', - }; -const topicName = config?.kafka?.KAFKA_START_CAMPAIGN_MAPPING_TOPIC; - -// Create a Kafka client -// const kafkaClient = new KafkaClient(kafkaConfig); - -// Create a Kafka consumer -// const consumer = new Consumer(kafkaClient, [{ topic: topicName, partition: 0 }], { autoCommit: true }); - +// Topic Names +const topicNames = [ + config.kafka.KAFKA_START_CAMPAIGN_MAPPING_TOPIC, + config.kafka.KAFKA_TEST_TOPIC +]; -const consumerGroup=new ConsumerGroup(kafkaConfig, topicName) +// Consumer Group Initialization +const consumerGroup = new ConsumerGroup(kafkaConfig, topicNames); -// Exported listener function +// Kafka Listener export function listener() { - // Set up a message event handler consumerGroup.on('message', async (message: Message) => { try { - // Parse the message value as an array of objects - const messageObject: any = JSON.parse(message.value?.toString() || '{}'); - try { - // await processCampaignMapping(messageObject); - logger.info("Received a messageObject for campaign mapping : "); - logger.debug("Message Object of campaign mapping :: " + getFormattedStringForDebug(messageObject)); - await processCampaignMapping(messageObject); - } catch (error: any) { - console.log(error) - logger.error(error) - enrichAndPersistCampaignWithError(messageObject, error) + const messageObject = JSON.parse(message.value?.toString() || '{}'); + + switch (message.topic) { + case config.kafka.KAFKA_START_CAMPAIGN_MAPPING_TOPIC: + await handleCampaignMapping(messageObject); + break; + default: + logger.warn(`Unhandled topic: ${message.topic}`); } - logger.info(`KAFKA :: LISTENER :: Received a message`); - logger.debug(`KAFKA :: LISTENER :: message ${getFormattedStringForDebug(messageObject)}`); + + logger.info(`KAFKA :: LISTENER :: Received a message from topic ${message.topic}`); + logger.debug(`KAFKA :: LISTENER :: Message: ${getFormattedStringForDebug(messageObject)}`); } catch (error) { - logger.info('KAFKA :: LISTENER :: Some Error Occurred '); // Log successful message production - logger.error(`KAFKA :: LISTENER :: Error : ${JSON.stringify(error)}`); // Log producer error - console.log(error) + logger.error(`KAFKA :: LISTENER :: Error processing message: ${error}`); + console.error(error); } }); - // Set up error event handlers consumerGroup.on('error', (err) => { - console.error(`Consumer Error: ${err}`); + logger.error(`Consumer Error: ${err}`); + shutdownGracefully(); }); consumerGroup.on('offsetOutOfRange', (err) => { - console.error(`Offset out of range error: ${err}`); + logger.error(`Offset out of range error: ${err}`); }); } - - -/** - * Produces modified messages to a specified Kafka topic. - * @param modifiedMessages An array of modified messages to be produced. - * @param topic The Kafka topic to which the messages will be produced. - * @returns A promise that resolves when the messages are successfully produced. - */ -async function produceModifiedMessages(modifiedMessages: any[], topic: any) { - try { - logger.info(`KAFKA :: PRODUCER :: a message sent to topic ${topic}`); - logger.debug(`KAFKA :: PRODUCER :: message ${getFormattedStringForDebug(modifiedMessages)}`); - return new Promise((resolve, reject) => { - const payloads = [ - { - topic: topic, - messages: JSON.stringify(modifiedMessages), // Convert modified messages to JSON string - }, - ]; - - // Send payloads to the Kafka producer - producer.send(payloads, (err) => { - if (err) { - logger.info('KAFKA :: PRODUCER :: Some Error Occurred '); - logger.error(`KAFKA :: PRODUCER :: Error : ${JSON.stringify(err)}`); - // reject(err); // Reject promise if there's an error - } else { - logger.info('KAFKA :: PRODUCER :: message sent successfully '); - // resolve(); // Resolve promise if messages are successfully produced - } - }); - }); - } catch (error) { - logger.error(`KAFKA :: PRODUCER :: Exception caught: ${JSON.stringify(error)}`); - throwError("COMMON", 400, "KAKFA_ERROR", "Some error occured in kafka"); // Re-throw the error after logging it - } -} - -export { produceModifiedMessages } // Export the produceModifiedMessages function for external use diff --git a/health-services/project-factory/src/server/kafka/Producer.ts b/health-services/project-factory/src/server/kafka/Producer.ts index b728b48a2ca..dc19acc2fa1 100644 --- a/health-services/project-factory/src/server/kafka/Producer.ts +++ b/health-services/project-factory/src/server/kafka/Producer.ts @@ -1,25 +1,111 @@ -import config from '../config'; // Importing configuration settings -import { Producer, KafkaClient } from 'kafka-node'; // Importing Producer and KafkaClient from 'kafka-node' library +import { Producer, KafkaClient } from 'kafka-node'; import { logger } from "../utils/logger"; +import { shutdownGracefully, throwError } from '../utils/genericUtils'; +import config from '../config'; -// Creating a new Kafka client instance using the configured Kafka broker host -const kafkaClient = new KafkaClient({ - kafkaHost: config?.host?.KAFKA_BROKER_HOST, // Configuring Kafka broker host - connectRetryOptions: { retries: 1 }, // Configuring connection retry options -}); +let kafkaClient: KafkaClient; +let producer: Producer; -// Creating a new Kafka producer instance using the Kafka client -const producer = new Producer(kafkaClient, { partitionerType: 2 }); // Using partitioner type 2 +const createKafkaClientAndProducer = () => { + kafkaClient = new KafkaClient({ + kafkaHost: config?.host?.KAFKA_BROKER_HOST, + connectRetryOptions: { retries: 1 }, + }); -// Event listener for 'ready' event, indicating that the producer is ready to send messages -producer.on('ready', () => { - logger.info('Producer is ready'); // Log message indicating producer is ready -}); + // Event listener for 'error' event, indicating that the client encountered an error + kafkaClient.on('error', (err: any) => { + logger.error('Kafka client is in error state'); // Log message indicating client is in error state + console.error(err.stack || err); // Log the error stack or message + shutdownGracefully(); + }); -// Event listener for 'error' event, indicating that the producer encountered an error -producer.on('error', (err) => { - logger.error('Producer is in error state'); // Log message indicating producer is in error state - console.error(err.stack || err); // Log the error stack or message -}); + producer = new Producer(kafkaClient, { partitionerType: 2 }); -export { producer }; // Exporting the producer instance for external use + producer.on('ready', () => { + logger.info('Producer is ready'); + checkBrokerAvailability(); + }); + + producer.on('error', (err: any) => { + logger.error('Producer is in error state'); + console.error(err); + shutdownGracefully(); + }); +}; + +// Function to check broker availability by listing all brokers +const checkBrokerAvailability = () => { + kafkaClient.loadMetadataForTopics([], (err: any, data: any) => { + if (err) { + logger.error('Error checking broker availability:', err); + shutdownGracefully(); + } else { + const brokers = data[1]?.metadata || {}; + const brokerCount = Object.keys(brokers).length; + logger.info('Broker count:' + String(brokerCount)); + + if (brokerCount <= 0) { + logger.error('No brokers found. Shutting down the service.'); + shutdownGracefully(); + } else { + logger.info('Brokers are available:', brokers); + } + } + }); +}; + + +createKafkaClientAndProducer(); + +const sendWithRetries = (payloads: any[], retries = 3, shutdown: boolean = false): Promise => { + return new Promise((resolve, reject) => { + producer.send(payloads, async (err: any) => { + if (err) { + logger.error('Error sending message:', err); + logger.debug(`Was trying to send: ${JSON.stringify(payloads)}`); + if (retries > 0) { + logger.info(`Retrying to send message. Retries left: ${retries}`); + await new Promise(resolve => setTimeout(resolve, 2000)); // wait before retrying + resolve(sendWithRetries(payloads, retries - 1, shutdown)); + } else { + // Attempt to reconnect and retry + logger.error('Failed to send message after retries. Reconnecting producer...'); + if (shutdown) { + shutdownGracefully(); + } + else { + producer.close(() => { + createKafkaClientAndProducer(); + setTimeout(() => { + sendWithRetries(payloads, 1, true).catch(reject); + }, 2000); // wait before retrying after reconnect + }); + } + } + } else { + logger.info('Message sent successfully'); + resolve(); + } + }); + }); +}; + +async function produceModifiedMessages(modifiedMessages: any[], topic: any) { + try { + logger.info(`KAFKA :: PRODUCER :: A message sent to topic ${topic}`); + logger.debug(`KAFKA :: PRODUCER :: Message ${JSON.stringify(modifiedMessages)}`); + const payloads = [ + { + topic: topic, + messages: JSON.stringify(modifiedMessages), + }, + ]; + + await sendWithRetries(payloads, 3); + } catch (error) { + logger.error(`KAFKA :: PRODUCER :: Exception caught: ${JSON.stringify(error)}`); + throwError("COMMON", 400, "KAFKA_ERROR", "Some error occurred in Kafka"); // Re-throw the error after logging it + } +} + +export { produceModifiedMessages }; diff --git a/health-services/project-factory/src/server/service/campaignManageService.ts b/health-services/project-factory/src/server/service/campaignManageService.ts index 3d3652bb441..4b397e8b28f 100644 --- a/health-services/project-factory/src/server/service/campaignManageService.ts +++ b/health-services/project-factory/src/server/service/campaignManageService.ts @@ -1,10 +1,11 @@ import express from "express"; import { processBasedOnAction, searchProjectCampaignResourcData } from "../utils/campaignUtils"; import { logger } from "../utils/logger"; -import { validateProjectCampaignRequest, validateSearchProjectCampaignRequest } from "../validators/campaignValidators"; +import { validateProjectCampaignRequest, validateSearchProcessTracksRequest, validateSearchProjectCampaignRequest } from "../validators/campaignValidators"; import { validateCampaignRequest } from "../validators/genericValidator"; import { createRelatedResouce } from "../api/genericApis"; import { enrichCampaign } from "../api/campaignApis"; +import { getProcessDetails, modifyProcessDetails } from "../utils/processTrackUtils"; async function createProjectTypeCampaignService(request: express.Request) { // Validate the request for creating a project type campaign @@ -53,10 +54,26 @@ async function createCampaignService( return requestBody?.Campaign }; +async function searchProcessTracksService( + request: express.Request +) { + await validateSearchProcessTracksRequest(request) + logger.info("VALIDATED THE PROCESS SEARCH REQUEST"); + + // Search and return related process tracks + const processDetailsArray = await getProcessDetails(request?.query?.campaignId as string) + + // sort and modify process details so that details with status as toBeCompleted comes in last + const resultArray = modifyProcessDetails(processDetailsArray) + + return resultArray +}; + export { createProjectTypeCampaignService, updateProjectTypeCampaignService, searchProjectTypeCampaignService, - createCampaignService -} \ No newline at end of file + createCampaignService, + searchProcessTracksService +} diff --git a/health-services/project-factory/src/server/service/dataManageService.ts b/health-services/project-factory/src/server/service/dataManageService.ts index ed224dc824f..f6ad7105f65 100644 --- a/health-services/project-factory/src/server/service/dataManageService.ts +++ b/health-services/project-factory/src/server/service/dataManageService.ts @@ -3,12 +3,15 @@ import { processGenericRequest } from "../api/campaignApis"; import { createAndUploadFile, getBoundarySheetData } from "../api/genericApis"; import { getLocalizedName, processDataSearchRequest } from "../utils/campaignUtils"; import { addDataToSheet, enrichResourceDetails, getLocalizedMessagesHandler, searchGeneratedResources, processGenerate, throwError } from "../utils/genericUtils"; -import { logger } from "../utils/logger"; +import { getFormattedStringForDebug, logger } from "../utils/logger"; import { validateCreateRequest, validateDownloadRequest, validateSearchRequest } from "../validators/campaignValidators"; import { validateGenerateRequest } from "../validators/genericValidator"; import { getLocalisationModuleName } from "../utils/localisationUtils"; import { getBoundaryTabName } from "../utils/boundaryUtils"; import { getNewExcelWorkbook } from "../utils/excelUtils"; +import { redis, checkRedisConnection } from "../utils/redisUtils"; // Importing checkRedisConnection function +import config from '../config/index' + const generateDataService = async (request: express.Request) => { @@ -38,24 +41,48 @@ const downloadDataService = async (request: express.Request) => { } const getBoundaryDataService = async ( - request: express.Request) => { + request: express.Request, enableCaching = false) => { try { + const { hierarchyType, campaignId } = request?.query; + const cacheTTL = config?.cacheTime; // TTL in seconds (5 minutes) + const cacheKey = `${campaignId}-${hierarchyType}`; + let isRedisConnected = false; + let cachedData: any = null; + if (cacheKey && enableCaching) { + isRedisConnected = await checkRedisConnection(); + cachedData = await redis.get(cacheKey); // Get cached data + } + if (cachedData) { + logger.info("CACHE HIT :: " + cacheKey); + logger.debug(`CACHED DATA :: ${getFormattedStringForDebug(cachedData)}`); + + // Reset the TTL for the cache key + if (config.cacheValues.resetCache) { + await redis.expire(cacheKey, cacheTTL); + } + + return JSON.parse(cachedData); // Return parsed cached data if available + } else { + logger.info("NO CACHE FOUND :: REQUEST :: " + cacheKey); + } const workbook = getNewExcelWorkbook(); - const { hierarchyType } = request?.query; const localizationMapHierarchy = hierarchyType && await getLocalizedMessagesHandler(request, request?.query?.tenantId, getLocalisationModuleName(hierarchyType)); const localizationMapModule = await getLocalizedMessagesHandler(request, request?.query?.tenantId); const localizationMap = { ...localizationMapHierarchy, ...localizationMapModule }; // Retrieve boundary sheet data const boundarySheetData: any = await getBoundarySheetData(request, localizationMap); - const localizedBoundaryTab = getLocalizedName(getBoundaryTabName(), localizationMap); const boundarySheet = workbook.addWorksheet(localizedBoundaryTab); addDataToSheet(boundarySheet, boundarySheetData); - const BoundaryFileDetails: any = await createAndUploadFile(workbook, request); + const boundaryFileDetails: any = await createAndUploadFile(workbook, request); // Return boundary file details logger.info("RETURNS THE BOUNDARY RESPONSE"); - return BoundaryFileDetails; + if (cacheKey && isRedisConnected) { + await redis.set(cacheKey, JSON.stringify(boundaryFileDetails), "EX", cacheTTL); // Cache the response data with TTL + } + return boundaryFileDetails; } catch (e: any) { + console.log(e) logger.error(String(e)) // Handle errors and send error response throw (e); diff --git a/health-services/project-factory/src/server/utils/campaignMappingUtils.ts b/health-services/project-factory/src/server/utils/campaignMappingUtils.ts index ac34761d2f8..f4698f4b77d 100644 --- a/health-services/project-factory/src/server/utils/campaignMappingUtils.ts +++ b/health-services/project-factory/src/server/utils/campaignMappingUtils.ts @@ -1,12 +1,15 @@ import createAndSearch from "../config/createAndSearch"; import config from "../config"; -import { getDataFromSheet, throwError } from "./genericUtils"; +import { getDataFromSheet, getLocalizedMessagesHandlerViaRequestInfo, throwError } from "./genericUtils"; import { getFormattedStringForDebug, logger } from "./logger"; -import { httpRequest } from "./request"; -import { produceModifiedMessages } from "../kafka/Listener"; -import { getLocalizedName } from "./campaignUtils"; +import { defaultheader, httpRequest } from "./request"; +import { produceModifiedMessages } from "../kafka/Producer"; +import { enrichAndPersistCampaignWithError, getLocalizedName } from "./campaignUtils"; import { campaignStatuses, resourceDataStatuses } from "../config/constants"; import { createCampaignService } from "../service/campaignManageService"; +import { persistTrack } from "./processTrackUtils"; +import { processTrackTypes, processTrackStatuses } from "../config/constants"; +import { createProjectFacilityHelper, createProjectResourceHelper, createStaffHelper } from "../api/genericApis"; async function createBoundaryWithProjectMapping(projects: any, boundaryWithProject: any) { @@ -36,8 +39,107 @@ function getPvarIds(messageObject: any) { return Array.from(uniquePvarIds); // Convert Set to array before returning } +function trimBoundaryCodes(root: any) { + if (root) { + root.code = root.code.trim(); // Trim the code + + // Recursively trim the codes in the children + for (const child of root.children) { + trimBoundaryCodes(child); + } + } +} + +async function getAllBoundaries(messageObject: any, tenantId: any, rootBoundary: any, hierarchyType: any) { + const BoundarySearchBody = { + RequestInfo: messageObject?.RequestInfo, + } + const params = { + tenantId, + codes: rootBoundary, + hierarchyType, + includeChildren: true + } + const header = { + ...defaultheader, + cachekey: `boundaryRelationShipSearch${params?.hierarchyType}${params?.tenantId}${params.codes || ''}${params?.includeChildren || ''}`, + } + const boundaryResponse = await httpRequest(config.host.boundaryHost + config.paths.boundaryRelationship, BoundarySearchBody, params, undefined, undefined, header); + trimBoundaryCodes(boundaryResponse?.TenantBoundary?.[0]?.boundary?.[0]); + return boundaryResponse?.TenantBoundary?.[0]?.boundary?.[0] +} + +// Function to find the path to a given boundary code +function findPath(root: any, code: string, path: any[] = []) { + if (root.code === code) { + return [...path, root]; + } + for (const child of root.children) { + const result: any = findPath(child, code, [...path, root]); + if (result) return result; + } + return null; +} + +// Function to find the common parent for multiple codes +function findCommonParent(codes: string[], root: any) { + if (codes.length === 0) return null; + + // Find paths for all codes + const paths = codes.map(code => findPath(root, code)).filter(path => path !== null); + + if (paths.length === 0) return null; + + // Compare paths to find the common ancestor + let commonParent: any = null; + + for (let i = 0; i < Math.min(...paths.map(path => path.length)); i++) { + const currentParent = paths[0][i]; + if (paths.every(path => path[i] && path[i].code === currentParent.code)) { + commonParent = currentParent; + } else { + break; + } + } + + return commonParent?.code; +} + +function mapBoundaryCodes(resource: any, code: string, boundaryCode: string, boundaryCodes: any, allBoundaries: any) { + // Split boundary codes if they have comma separated values + const boundaryCodesArray = boundaryCode.split(',').map((bc: string) => bc.trim()); + if (resource?.type == "user" && boundaryCodesArray?.length > 1 && config.user.mapUserViaCommonParent) { + const commonParent = findCommonParent(boundaryCodesArray, allBoundaries); + if (commonParent) { + logger.info(`Boundary Codes Array ${boundaryCodesArray.join(",")} for resource ${resource?.type} has common parent ${commonParent}`) + if (!boundaryCodes[resource?.type]) { + boundaryCodes[resource?.type] = {}; + } + if (!boundaryCodes[resource?.type][commonParent]) { + boundaryCodes[resource?.type][commonParent] = []; + } + boundaryCodes[resource?.type][commonParent].push(code); + logger.info(`Common Parent Boundary code ${commonParent} mapped to resource ${resource?.type} with code ${code}`) + } + } + else { + boundaryCodesArray.forEach((trimmedBC: string) => { + // Trim any leading or trailing spaces + if (!boundaryCodes[resource?.type]) { + boundaryCodes[resource?.type] = {}; + } + if (!boundaryCodes[resource?.type][trimmedBC]) { + boundaryCodes[resource?.type][trimmedBC] = []; + } + boundaryCodes[resource?.type][trimmedBC].push(code); + logger.info(`Boundary code ${trimmedBC} mapped to resource ${resource?.type} with code ${code}`) + }); + } +} + async function enrichBoundaryCodes(resources: any[], messageObject: any, boundaryCodes: any, sheetName: any) { const localizationMap: any = messageObject?.localizationMap + const allBoundaries = await getAllBoundaries(messageObject, messageObject?.Campaign?.tenantId, messageObject?.Campaign?.boundaryCode, messageObject?.Campaign?.hierarchyType); for (const resource of resources) { const processedFilestoreId = resource?.processedFilestoreId; if (processedFilestoreId) { @@ -54,20 +156,7 @@ async function enrichBoundaryCodes(resources: any[], messageObject: any, boundar active = data[activeColumn]; } if (boundaryCode && active == "Active") { - // Split boundary codes if they have comma separated values - const boundaryCodesArray = boundaryCode.split(','); - boundaryCodesArray.forEach((bc: string) => { - // Trim any leading or trailing spaces - const trimmedBC = bc.trim(); - if (!boundaryCodes[resource?.type]) { - boundaryCodes[resource?.type] = {}; - } - if (!boundaryCodes[resource?.type][trimmedBC]) { - boundaryCodes[resource?.type][trimmedBC] = []; - } - boundaryCodes[resource?.type][trimmedBC].push(code); - logger.info(`Boundary code ${trimmedBC} mapped to resource ${resource?.type} with code ${code}`) - }); + mapBoundaryCodes(resource, code, boundaryCode, boundaryCodes, allBoundaries); } } else { @@ -134,34 +223,39 @@ async function getProjectMappingBody(messageObject: any, boundaryWithProject: an } return { RequestInfo: messageObject?.RequestInfo, - Campaign: Campaign + Campaign: Campaign, + CampaignDetails: messageObject?.CampaignDetails } } async function fetchAndMap(resources: any[], messageObject: any) { - const localizationMap = messageObject?.localizationMap; - const sheetName: any = { - "user": getLocalizedName(createAndSearch?.user?.parseArrayConfig?.sheetName, localizationMap), - "facility": getLocalizedName(createAndSearch?.facility?.parseArrayConfig?.sheetName, localizationMap) - } - // Object to store boundary codes - const boundaryCodes: any = {}; + await persistTrack(messageObject?.Campaign?.id, processTrackTypes.prepareResourceForMapping, processTrackStatuses.inprogress) + const localizationMap = await getLocalizedMessagesHandlerViaRequestInfo(messageObject?.RequestInfo, messageObject?.Campaign?.tenantId); + messageObject.localizationMap = localizationMap + try { + const localizationMap = messageObject?.localizationMap; + const sheetName: any = { + "user": getLocalizedName(createAndSearch?.user?.parseArrayConfig?.sheetName, localizationMap), + "facility": getLocalizedName(createAndSearch?.facility?.parseArrayConfig?.sheetName, localizationMap) + } + // Object to store boundary codes + const boundaryCodes: any = {}; - await enrichBoundaryCodes(resources, messageObject, boundaryCodes, sheetName); - logger.info("boundaryCodes : " + JSON.stringify(boundaryCodes)); - var boundaryWithProject: any = {}; - await enrichBoundaryWithProject(messageObject, boundaryWithProject, boundaryCodes); - logger.info("boundaryWithProject : " + JSON.stringify(boundaryWithProject)); - const projectMappingBody = await getProjectMappingBody(messageObject, boundaryWithProject, boundaryCodes); - logger.info("projectMappingBody : " + JSON.stringify(projectMappingBody)); - logger.info("projectMapping started "); - const projectMappingResponse: any = await createCampaignService(projectMappingBody); - logger.info("Project Mapping Response received"); - if (projectMappingResponse) { - logger.info("Campaign Mapping done") - messageObject.CampaignDetails.status = campaignStatuses.inprogress - produceModifiedMessages(messageObject, config?.kafka?.KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC) + await enrichBoundaryCodes(resources, messageObject, boundaryCodes, sheetName); + logger.info("boundaryCodes : " + JSON.stringify(boundaryCodes)); + var boundaryWithProject: any = {}; + await enrichBoundaryWithProject(messageObject, boundaryWithProject, boundaryCodes); + logger.info("boundaryWithProject : " + JSON.stringify(boundaryWithProject)); + var projectMappingBody = await getProjectMappingBody(messageObject, boundaryWithProject, boundaryCodes); + logger.info("projectMappingBody : " + JSON.stringify(projectMappingBody)); + logger.info("projectMapping started "); + } catch (error: any) { + console.log(error) + await persistTrack(messageObject?.Campaign?.id, processTrackTypes.prepareResourceForMapping, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + throw new Error(error) } + await persistTrack(messageObject?.Campaign?.id, processTrackTypes.prepareResourceForMapping, processTrackStatuses.completed) + await createCampaignService(projectMappingBody); } async function searchResourceDetailsById(resourceDetailId: string, messageObject: any) { @@ -202,45 +296,150 @@ async function processCampaignMapping(messageObject: any) { logger.info("Campaign Already In Progress and Mapped"); } else { - var completedResources: any = [] - var resources = []; - for (const resourceDetailId of resourceDetailsIds) { - var retry = 75; - while (retry--) { - const response = await searchResourceDetailsById(resourceDetailId, messageObject); - logger.info(`response for resourceDetailId: ${resourceDetailId}`); - logger.debug(` response : ${getFormattedStringForDebug(response)}`) - if (response?.status == "invalid") { - logger.error(`resource with id ${resourceDetailId} is invalid`); - throwError("COMMON", 400, "INTERNAL_SERVER_ERROR", "resource with id " + resourceDetailId + " is invalid"); - break; - } - else if (response?.status == resourceDataStatuses.failed) { - logger.error(`resource with id ${resourceDetailId} is ${resourceDataStatuses.failed}`); - throwError("COMMON", 400, "INTERNAL_SERVER_ERROR", `resource with id ${resourceDetailId} is ${resourceDataStatuses.failed} : with errorlog ${response?.additionalDetails?.error}`); - break; - } - else if (response?.status == resourceDataStatuses.completed) { - completedResources.push(resourceDetailId); - resources.push(response); - break; - } - else { - logger.info(`Waiting for 20 seconds for resource with id ${resourceDetailId} on retry ${retry}`); - await new Promise(resolve => setTimeout(resolve, 20000)); + await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.inprogress); + try { + var completedResources: any = [] + var resources = []; + for (const resourceDetailId of resourceDetailsIds) { + var retry = 75; + while (retry--) { + const response = await searchResourceDetailsById(resourceDetailId, messageObject); + logger.info(`response for resourceDetailId: ${resourceDetailId}`); + logger.debug(` response : ${getFormattedStringForDebug(response)}`) + if (response?.status == "invalid") { + logger.error(`resource type ${response?.type} is invalid`); + throwError("COMMON", 400, "INTERNAL_SERVER_ERROR", "Data File for resource type " + response?.type + " is invalid"); + break; + } + else if (response?.status == resourceDataStatuses.failed) { + logger.error(`resource type ${response?.type} is ${resourceDataStatuses.failed}`); + throwError("COMMON", 400, "INTERNAL_SERVER_ERROR", `Resource creation of type ${response?.type} failed : with errorlog ${response?.additionalDetails?.error}`); + break; + } + else if (response?.status == resourceDataStatuses.completed) { + completedResources.push(resourceDetailId); + resources.push(response); + break; + } + else { + logger.info(`Waiting for 20 seconds for resource with id ${resourceDetailId} on retry ${retry}`); + await new Promise(resolve => setTimeout(resolve, 20000)); + } } } + var uncompletedResourceIds = resourceDetailsIds?.filter((x: any) => !completedResources.includes(x)); + logger.info("uncompletedResourceIds " + JSON.stringify(uncompletedResourceIds)); + logger.info("completedResources " + JSON.stringify(completedResources)); + if (uncompletedResourceIds?.length > 0) { + throwError("COMMON", 400, "INTERNAL_SERVER_ERROR", "resource with id " + JSON.stringify(uncompletedResourceIds) + " is not completed after long wait. Check file"); + } + } catch (error: any) { + console.log(error) + await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + throw new Error(error) } - var uncompletedResourceIds = resourceDetailsIds?.filter((x: any) => !completedResources.includes(x)); - logger.info("uncompletedResourceIds " + JSON.stringify(uncompletedResourceIds)); - logger.info("completedResources " + JSON.stringify(completedResources)); - if (uncompletedResourceIds?.length > 0) { - throwError("COMMON", 400, "INTERNAL_SERVER_ERROR", "resource with id " + JSON.stringify(uncompletedResourceIds) + " is not validated after long wait. Check file"); - } + await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.completed); await fetchAndMap(resources, messageObject); } } +export async function handleCampaignMapping(messageObject: any) { + try { + logger.info("Received a message for campaign mapping"); + logger.debug("Message Object of campaign mapping: " + getFormattedStringForDebug(messageObject)); + await processCampaignMapping(messageObject); + } catch (error) { + logger.error("Error in campaign mapping: " + error); + await enrichAndPersistCampaignWithError(messageObject, error); + } +} + +export async function handleStaffMapping(mappingArray: any[], campaignId: string, messageObject: any) { + await persistTrack(campaignId, processTrackTypes.staffMapping, processTrackStatuses.inprogress); + try { + const promises = [] + logger.debug("Array of staff mapping: " + getFormattedStringForDebug(mappingArray)); + for (const staffMapping of mappingArray) { + const { resource, projectId, resouceBody, tenantId, startDate, endDate } = staffMapping; + for (const resourceId of resource?.resourceIds) { + promises.push(createStaffHelper(resourceId, projectId, resouceBody, tenantId, startDate, endDate)) + } + } + await Promise.all(promises); + } catch (error: any) { + logger.error("Error in staff mapping: " + error); + await persistTrack(campaignId, processTrackTypes.staffMapping, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + await enrichAndPersistCampaignWithError(messageObject, error); + throw new Error(error) + } + await persistTrack(campaignId, processTrackTypes.staffMapping, processTrackStatuses.completed); +} + +export async function handleResourceMapping(mappingArray: any, campaignId: any, messageObject: any) { + await persistTrack(campaignId, processTrackTypes.resourceMapping, processTrackStatuses.inprogress); + try { + const promises = [] + logger.debug("Arrray of resource mapping: " + getFormattedStringForDebug(mappingArray)); + for (const mapping of mappingArray) { + const { resource, projectId, resouceBody, tenantId, startDate, endDate } = mapping; + for (const resourceId of resource?.resourceIds) { + promises.push(createProjectResourceHelper(resourceId, projectId, resouceBody, tenantId, startDate, endDate)); + } + } + await Promise.all(promises); + } catch (error: any) { + logger.error("Error in resource mapping: " + error); + await persistTrack(campaignId, processTrackTypes.resourceMapping, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + await enrichAndPersistCampaignWithError(messageObject, error); + throw new Error(error) + } + await persistTrack(campaignId, processTrackTypes.resourceMapping, processTrackStatuses.completed); +} + +export async function handleFacilityMapping(mappingArray: any, campaignId: any, messageObject: any) { + await persistTrack(campaignId, processTrackTypes.facilityMapping, processTrackStatuses.inprogress); + try { + const promises = [] + logger.debug("Array of facility mapping: " + getFormattedStringForDebug(mappingArray)); + for (const mapping of mappingArray) { + const { resource, projectId, resouceBody, tenantId } = mapping; + for (const resourceId of resource?.resourceIds) { + promises.push(createProjectFacilityHelper(resourceId, projectId, resouceBody, tenantId)); + } + } + await Promise.all(promises); + } catch (error: any) { + logger.error("Error in facility mapping: " + error); + await persistTrack(campaignId, processTrackTypes.facilityMapping, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + await enrichAndPersistCampaignWithError(messageObject, error); + throw new Error(error) + } + await persistTrack(campaignId, processTrackTypes.facilityMapping, processTrackStatuses.completed); +} + +export async function processMapping(mappingObject: any) { + try { + if (mappingObject?.mappingArray && Array.isArray(mappingObject?.mappingArray) && mappingObject?.mappingArray?.length > 0) { + const resourceMappingArray = mappingObject?.mappingArray?.filter((mappingObject: any) => mappingObject?.type == "resource"); + const facilityMappingArray = mappingObject?.mappingArray?.filter((mappingObject: any) => mappingObject?.type == "facility"); + const staffMappingArray = mappingObject?.mappingArray?.filter((mappingObject: any) => mappingObject?.type == "staff"); + await handleResourceMapping(resourceMappingArray, mappingObject?.CampaignDetails?.id, mappingObject); + await handleFacilityMapping(facilityMappingArray, mappingObject?.CampaignDetails?.id, mappingObject); + await handleStaffMapping(staffMappingArray, mappingObject?.CampaignDetails?.id, mappingObject); + } + logger.info("Mapping completed successfully for campaign: " + mappingObject?.CampaignDetails?.id); + mappingObject.CampaignDetails.status = campaignStatuses.inprogress + const produceMessage: any = { + CampaignDetails: mappingObject?.CampaignDetails + } + await produceModifiedMessages(produceMessage, config?.kafka?.KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC) + await persistTrack(mappingObject?.CampaignDetails?.id, processTrackTypes.campaignCreation, processTrackStatuses.completed) + } catch (error) { + logger.error("Error in campaign mapping: " + error); + await enrichAndPersistCampaignWithError(mappingObject, error); + } +} + export { processCampaignMapping, diff --git a/health-services/project-factory/src/server/utils/campaignUtils.ts b/health-services/project-factory/src/server/utils/campaignUtils.ts index f2b4e1f37ca..1fbf424ecf9 100644 --- a/health-services/project-factory/src/server/utils/campaignUtils.ts +++ b/health-services/project-factory/src/server/utils/campaignUtils.ts @@ -2,9 +2,9 @@ import { defaultheader, httpRequest } from "./request"; import config from "../config/index"; import { v4 as uuidv4 } from 'uuid'; -import { produceModifiedMessages } from '../kafka/Listener' +import { produceModifiedMessages } from "../kafka/Producer"; import { confirmProjectParentCreation, createProjectCampaignResourcData, getCampaignSearchResponse, getHierarchy, handleResouceDetailsError, projectCreate } from "../api/campaignApis"; -import { getCampaignNumber, createAndUploadFile, getSheetData, createExcelSheet, getAutoGeneratedBoundaryCodesHandler, createBoundaryEntities, createBoundaryRelationship, getMDMSV1Data, getTargetSheetDataAfterCode, callMdmsTypeSchema } from "../api/genericApis"; +import { getCampaignNumber, createAndUploadFile, getSheetData, createExcelSheet, getAutoGeneratedBoundaryCodesHandler, createBoundaryEntities, createBoundaryRelationship, getMDMSV1Data, getTargetSheetDataAfterCode, callMdmsTypeSchema, getSheetDataFromWorksheet } from "../api/genericApis"; import { getFormattedStringForDebug, logger } from "./logger"; import createAndSearch from "../config/createAndSearch"; import { addDataToSheet, createBoundaryDataMainSheet, createReadMeSheet, findMapValue, getBoundaryRelationshipData, getConfigurableColumnHeadersFromSchemaForTargetSheet, getLocalizedHeaders, getLocalizedMessagesHandler, getMdmsDataBasedOnCampaignType, modifyBoundaryData, replicateRequest, throwError } from "./genericUtils"; @@ -12,11 +12,14 @@ import { enrichProjectDetailsFromCampaignDetails } from "./transforms/projectTyp import { executeQuery } from "./db"; import { campaignDetailsTransformer, genericResourceTransformer } from "./transforms/searchResponseConstructor"; import { transformAndCreateLocalisation } from "./transforms/localisationMessageConstructor"; -import { campaignStatuses, headingMapping, resourceDataStatuses } from "../config/constants"; +import { campaignStatuses, headingMapping, processTrackStatuses, processTrackTypes, resourceDataStatuses } from "../config/constants"; import { getBoundaryColumnName, getBoundaryTabName } from "./boundaryUtils"; import { searchProjectTypeCampaignService } from "../service/campaignManageService"; import { validateBoundaryOfResouces } from "../validators/campaignValidators"; import { getExcelWorkbookFromFileURL, getNewExcelWorkbook, lockTargetFields, updateFontNameToRoboto } from "./excelUtils"; +import { areBoundariesSame, callGenerateIfBoundariesDiffer } from "./generateUtils"; +import { createProcessTracks, persistTrack } from "./processTrackUtils"; +import { generateDynamicTargetHeaders, isDynamicTargetTemplateForProjectType, updateTargetColumnsIfDeliveryConditionsDifferForSMC } from "./targetUtils"; const _ = require('lodash'); @@ -220,7 +223,7 @@ function deterMineLastColumnAndEnrichUserDetails(worksheet: any, errorDetailsCol } function adjustRef(worksheet: any, lastColumn: any) { - const range = worksheet.getSheetValues().filter((row: any) => row).length; // Get the number of used rows + const range = getSheetDataFromWorksheet(worksheet).filter((row: any) => row).length; // Get the number of used rows worksheet.views = [ { state: 'frozen', ySplit: 1, topLeftCell: 'A2', activeCell: 'A2' } ]; @@ -475,14 +478,15 @@ async function generateProcessedFileAndPersist(request: any, localizationMap?: { if (request?.body?.ResourceDetails?.action == "create") { persistMessage.ResourceDetails.additionalDetails = {} } - produceModifiedMessages(persistMessage, config?.kafka?.KAFKA_UPDATE_RESOURCE_DETAILS_TOPIC); + await produceModifiedMessages(persistMessage, config?.kafka?.KAFKA_UPDATE_RESOURCE_DETAILS_TOPIC); logger.info(`ResourceDetails to persist : ${request.body.ResourceDetails.type}`); - if (request?.body?.Activities && Array.isArray(request?.body?.Activities && request?.body?.Activities.length > 0)) { + if (request?.body?.Activities && Array.isArray(request?.body?.Activities) && request?.body?.Activities.length > 0) { logger.info("Activities to persist : ") logger.debug(getFormattedStringForDebug(request?.body?.Activities)); logger.info(`Waiting for 2 seconds`); await new Promise(resolve => setTimeout(resolve, 2000)); - produceModifiedMessages(request?.body, config?.kafka?.KAFKA_CREATE_RESOURCE_ACTIVITY_TOPIC); + const activityObject = request?.body?.Activities; + await produceModifiedMessages(activityObject, config.kafka.KAFKA_CREATE_RESOURCE_ACTIVITY_TOPIC); } } @@ -535,10 +539,15 @@ async function enrichAndPersistCampaignWithError(requestBody: any, error: any) { } requestBody.CampaignDetails.additionalDetails = { ...requestBody?.CampaignDetails?.additionalDetails, - error: String((error?.message + " : " + error?.description) || error) + error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) } const topic = config?.kafka?.KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC - produceModifiedMessages(requestBody, topic); + // wait for 2 seconds + logger.info(`Waiting for 2 seconds to persist errors`); + await new Promise(resolve => setTimeout(resolve, 2000)); + const produceMessage: any = { CampaignDetails: requestBody.CampaignDetails } + await produceModifiedMessages(produceMessage, topic); + await persistTrack(requestBody?.CampaignDetails?.id, processTrackTypes.error, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); delete requestBody.CampaignDetails.campaignDetails } @@ -569,7 +578,10 @@ async function enrichAndPersistCampaignForCreate(request: any, firstPersist: boo } const topic = firstPersist ? config?.kafka?.KAFKA_SAVE_PROJECT_CAMPAIGN_DETAILS_TOPIC : config?.kafka?.KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC delete request.body.CampaignDetails.codesTargetMapping - produceModifiedMessages(request?.body, topic); + const produceMessage: any = { + CampaignDetails: request?.body?.CampaignDetails + }; + await produceModifiedMessages(produceMessage, topic); delete request.body.CampaignDetails.campaignDetails } @@ -579,8 +591,16 @@ function enrichInnerCampaignDetails(request: any, updatedInnerCampaignDetails: a updatedInnerCampaignDetails.boundaries = request?.body?.CampaignDetails?.boundaries || [] } + async function enrichAndPersistCampaignForUpdate(request: any, firstPersist: boolean = false) { const action = request?.body?.CampaignDetails?.action; + const existingCampaignDetails = request?.body?.ExistingCampaignDetails; + callGenerateIfBoundariesDiffer(request); + if (existingCampaignDetails) { + if (areBoundariesSame(existingCampaignDetails?.boundaries, request?.body?.CampaignDetails?.boundaries)) { + updateTargetColumnsIfDeliveryConditionsDifferForSMC(request); + } + } const ExistingCampaignDetails = request?.body?.ExistingCampaignDetails; var updatedInnerCampaignDetails = {} enrichInnerCampaignDetails(request, updatedInnerCampaignDetails) @@ -607,7 +627,10 @@ async function enrichAndPersistCampaignForUpdate(request: any, firstPersist: boo request.body.CampaignDetails.projectId = request?.body?.CampaignDetails?.projectId || ExistingCampaignDetails?.projectId || null } delete request.body.CampaignDetails.codesTargetMapping - produceModifiedMessages(request?.body, config?.kafka?.KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC); + const producerMessage: any = { + CampaignDetails: request?.body?.CampaignDetails + } + await produceModifiedMessages(producerMessage, config?.kafka?.KAFKA_UPDATE_PROJECT_CAMPAIGN_DETAILS_TOPIC); delete request.body.ExistingCampaignDetails delete request.body.CampaignDetails.campaignDetails } @@ -644,10 +667,10 @@ async function persistForCampaignProjectMapping(request: any, createResourceDeta enrichInnerCampaignDetails(request, updatedInnerCampaignDetails) requestBody.CampaignDetails = request?.body?.CampaignDetails requestBody.CampaignDetails.campaignDetails = updatedInnerCampaignDetails - requestBody.localizationMap = localizationMap + // requestBody.localizationMap = localizationMap logger.info("Persisting CampaignProjectMapping..."); logger.debug(`CampaignProjectMapping: ${getFormattedStringForDebug(requestBody)}`); - produceModifiedMessages(requestBody, config?.kafka?.KAFKA_START_CAMPAIGN_MAPPING_TOPIC); + await produceModifiedMessages(requestBody, config?.kafka?.KAFKA_START_CAMPAIGN_MAPPING_TOPIC); } } @@ -665,6 +688,9 @@ async function enrichAndPersistProjectCampaignForFirst(request: any, actionInUrl else if (actionInUrl == "update") { await enrichAndPersistCampaignForUpdate(request, firstPersist) } + if (request?.body?.CampaignDetails?.action == "create") { + await createProcessTracks(request.body.CampaignDetails.id) + } } @@ -1286,38 +1312,46 @@ async function getCodesTarget(request: any, localizationMap?: any) { } async function createProject(request: any, actionUrl: any, localizationMap?: any) { - logger.info("Create Projects started for the given Campaign") - var { tenantId, boundaries, projectType, projectId } = request?.body?.CampaignDetails; - if (boundaries && projectType && !projectId) { - const projectTypeResponse = await getMDMSV1Data({}, 'HCM-PROJECT-TYPES', "projectTypes", tenantId); - var Projects: any = enrichProjectDetailsFromCampaignDetails(request?.body?.CampaignDetails, projectTypeResponse?.filter((types: any) => types?.code == projectType)?.[0]); - const projectCreateBody = { - RequestInfo: request?.body?.RequestInfo, - Projects - } - await reorderBoundaries(request, localizationMap) - boundaries = request?.body?.CampaignDetails?.boundaries; - for (const boundary of boundaries) { - Projects[0].address = { tenantId: tenantId, boundary: boundary?.code, boundaryType: boundary?.type } - if (request?.body?.boundaryProjectMapping?.[boundary?.code]?.parent) { - const parent = request?.body?.boundaryProjectMapping?.[boundary?.code]?.parent - await confirmProjectParentCreation(request, request?.body?.boundaryProjectMapping?.[parent]?.projectId) - Projects[0].parent = request?.body?.boundaryProjectMapping?.[parent]?.projectId - } - else { - Projects[0].parent = null + await persistTrack(request.body.CampaignDetails.id, processTrackTypes.targetAndDeliveryRulesCreation, processTrackStatuses.inprogress); + try { + logger.info("Create Projects started for the given Campaign") + var { tenantId, boundaries, projectType, projectId } = request?.body?.CampaignDetails; + if (boundaries && projectType && !projectId) { + const projectTypeResponse = await getMDMSV1Data({}, 'HCM-PROJECT-TYPES', "projectTypes", tenantId); + var Projects: any = enrichProjectDetailsFromCampaignDetails(request?.body?.CampaignDetails, projectTypeResponse?.filter((types: any) => types?.code == projectType)?.[0]); + const projectCreateBody = { + RequestInfo: request?.body?.RequestInfo, + Projects } - Projects[0].referenceID = request?.body?.CampaignDetails?.id - Projects[0].targets = [ - { - beneficiaryType: request?.body?.CampaignDetails?.additionalDetails?.beneficiaryType, - totalNo: request?.body?.CampaignDetails?.codesTargetMapping[boundary?.code], - targetNo: request?.body?.CampaignDetails?.codesTargetMapping[boundary?.code] + await reorderBoundaries(request, localizationMap) + boundaries = request?.body?.CampaignDetails?.boundaries; + for (const boundary of boundaries) { + Projects[0].address = { tenantId: tenantId, boundary: boundary?.code, boundaryType: boundary?.type } + if (request?.body?.boundaryProjectMapping?.[boundary?.code]?.parent) { + const parent = request?.body?.boundaryProjectMapping?.[boundary?.code]?.parent + await confirmProjectParentCreation(request, request?.body?.boundaryProjectMapping?.[parent]?.projectId) + Projects[0].parent = request?.body?.boundaryProjectMapping?.[parent]?.projectId } - ] - await projectCreate(projectCreateBody, request) + else { + Projects[0].parent = null + } + Projects[0].referenceID = request?.body?.CampaignDetails?.id + Projects[0].targets = [ + { + beneficiaryType: request?.body?.CampaignDetails?.additionalDetails?.beneficiaryType, + totalNo: request?.body?.CampaignDetails?.codesTargetMapping[boundary?.code], + targetNo: request?.body?.CampaignDetails?.codesTargetMapping[boundary?.code] + } + ] + await projectCreate(projectCreateBody, request) + } } + } catch (error: any) { + console.log(error) + await persistTrack(request?.body?.CampaignDetails?.id, processTrackTypes.targetAndDeliveryRulesCreation, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + throw new Error(error) } + await persistTrack(request?.body?.CampaignDetails?.id, processTrackTypes.targetAndDeliveryRulesCreation, processTrackStatuses.completed); } @@ -1325,6 +1359,7 @@ async function processAfterPersist(request: any, actionInUrl: any) { try { const localizationMap = await getLocalizedMessagesHandler(request, request?.body?.CampaignDetails?.tenantId); if (request?.body?.CampaignDetails?.action == "create") { + await persistTrack(request.body.CampaignDetails.id, processTrackTypes.validation, processTrackStatuses.completed); await createProjectCampaignResourcData(request); await createProject(request, actionInUrl, localizationMap) await enrichAndPersistProjectCampaignRequest(request, actionInUrl, false, localizationMap) @@ -1336,7 +1371,7 @@ async function processAfterPersist(request: any, actionInUrl: any) { } catch (error: any) { console.log(error) logger.error(error) - enrichAndPersistCampaignWithError(request?.body, error) + await enrichAndPersistCampaignWithError(request?.body, error) } } @@ -1372,13 +1407,19 @@ async function appendSheetsToWorkbook(request: any, boundaryData: any[], differe const localisedHeading = getLocalizedName(headingInSheet, localizationMap); await createReadMeSheet(request, workbook, localisedHeading, localizationMap); const [mainSheetData, uniqueDistrictsForMainSheet, districtLevelRowBoundaryCodeMap] = createBoundaryDataMainSheet(request, boundaryData, differentTabsBasedOnLevel, hierarchy, localizationMap) - const mainSheet = workbook.addWorksheet(getLocalizedName(getBoundaryTabName(), localizationMap)); - const columnWidths = Array(12).fill(30); - mainSheet.columns = columnWidths.map(width => ({ width })); - // mainSheetData.forEach(row => mainSheet.addRow(row)); - addDataToSheet(mainSheet, mainSheetData, 'F3842D', 30, false, true); + const responseFromCampaignSearch = await getCampaignSearchResponse(request); + const campaignObject = responseFromCampaignSearch?.CampaignDetails?.[0]; + const isSourceMicroplan = checkIfSourceIsMicroplan(campaignObject); + if (!(isSourceMicroplan)) { + const mainSheet = workbook.addWorksheet(getLocalizedName(getBoundaryTabName(), localizationMap)); + const columnWidths = Array(12).fill(30); + mainSheet.columns = columnWidths.map(width => ({ width })); + // mainSheetData.forEach(row => mainSheet.addRow(row)); + addDataToSheet(mainSheet, mainSheetData, 'F3842D', 30, false, true); + mainSheet.state = 'hidden'; + } logger.info("appending different districts tab in the sheet started") - await appendDistricts(request, workbook, uniqueDistrictsForMainSheet, differentTabsBasedOnLevel, boundaryData, localizationMap, districtLevelRowBoundaryCodeMap, hierarchy); + await appendDistricts(request, workbook, uniqueDistrictsForMainSheet, differentTabsBasedOnLevel, boundaryData, localizationMap, districtLevelRowBoundaryCodeMap, hierarchy, campaignObject); logger.info("Sheet with different tabs generated successfully"); return workbook; } catch (error) { @@ -1388,8 +1429,8 @@ async function appendSheetsToWorkbook(request: any, boundaryData: any[], differe } -async function appendDistricts(request: any, workbook: any, uniqueDistrictsForMainSheet: any, differentTabsBasedOnLevel: any, boundaryData: any, localizationMap: any, districtLevelRowBoundaryCodeMap: any, hierarchy: any) { - const configurableColumnHeadersFromSchemaForTargetSheet = await getConfigurableColumnHeadersFromSchemaForTargetSheet(request, hierarchy, boundaryData, differentTabsBasedOnLevel, localizationMap); +async function appendDistricts(request: any, workbook: any, uniqueDistrictsForMainSheet: any, differentTabsBasedOnLevel: any, boundaryData: any, localizationMap: any, districtLevelRowBoundaryCodeMap: any, hierarchy: any, campaignObject: any) { + const configurableColumnHeadersFromSchemaForTargetSheet = await getConfigurableColumnHeadersFromSchemaForTargetSheet(request, hierarchy, boundaryData, differentTabsBasedOnLevel, campaignObject, localizationMap); for (const uniqueData of uniqueDistrictsForMainSheet) { const uniqueDataFromLevelForDifferentTabs = uniqueData.slice(uniqueData.lastIndexOf('#') + 1); logger.info(`generating the boundary data for ${uniqueDataFromLevelForDifferentTabs} - ${differentTabsBasedOnLevel}`) @@ -1404,19 +1445,24 @@ async function appendDistricts(request: any, workbook: any, uniqueDistrictsForMa } newSheetData.push(rowData); } - await createNewSheet(request, workbook, newSheetData, uniqueData, localizationMap, districtLevelRowBoundaryCodeMap, configurableColumnHeadersFromSchemaForTargetSheet); + await createNewSheet(request, workbook, newSheetData, uniqueData, localizationMap, districtLevelRowBoundaryCodeMap, configurableColumnHeadersFromSchemaForTargetSheet, campaignObject); logger.info(`${uniqueDataFromLevelForDifferentTabs} - ${differentTabsBasedOnLevel} boundary data generation completed`) } } } - -async function createNewSheet(request: any, workbook: any, newSheetData: any, uniqueData: any, localizationMap: any, districtLevelRowBoundaryCodeMap: any, localizedHeaders: any) { +async function createNewSheet(request: any, workbook: any, newSheetData: any, uniqueData: any, localizationMap: any, districtLevelRowBoundaryCodeMap: any, localizedHeaders: any, campaignObject: any) { const newSheet = workbook.addWorksheet(getLocalizedName(districtLevelRowBoundaryCodeMap.get(uniqueData), localizationMap)); addDataToSheet(newSheet, newSheetData, 'F3842D', 40); + let columnsNotToBeFreezed: any; const boundaryCodeColumnIndex = localizedHeaders.findIndex((header: any) => header === getLocalizedName(config?.boundary?.boundaryCode, localizationMap)); - const mdmsResponse = await getMdmsDataBasedOnCampaignType(request, localizationMap) - const columnsNotToBeFreezed = mdmsResponse?.columnsNotToBeFreezed; + if (isDynamicTargetTemplateForProjectType(campaignObject?.projectType) && campaignObject.deliveryRules && campaignObject.deliveryRules.length > 0) { + columnsNotToBeFreezed = localizedHeaders.slice(boundaryCodeColumnIndex + 1); + } + else { + const mdmsResponse = await getMdmsDataBasedOnCampaignType(request, localizationMap) + columnsNotToBeFreezed = mdmsResponse?.columnsNotToBeFreezed; + } const localizedColumnsNotToBeFreezed = getLocalizedHeaders(columnsNotToBeFreezed, localizationMap); lockTargetFields(newSheet, localizedColumnsNotToBeFreezed, boundaryCodeColumnIndex); } @@ -1575,10 +1621,12 @@ const autoGenerateBoundaryCodes = async (request: any, localizationMap?: any) => const modifiedBoundaryData = modifyBoundaryDataHeaders(updatedBoundaryData, hierarchy, localizationMap); const [withBoundaryCode, withoutBoundaryCode] = modifyBoundaryData(modifiedBoundaryData, localizationMap); const { mappingMap, countMap } = getCodeMappingsOfExistingBoundaryCodes(withBoundaryCode); - const childParentMap = getChildParentMap(withoutBoundaryCode); + const childParentMap = getChildParentMap([...withBoundaryCode, ...withoutBoundaryCode]); const boundaryMap = await getAutoGeneratedBoundaryCodesHandler(withoutBoundaryCode, childParentMap, mappingMap, countMap, request); logger.info("Boundary Code Auto Generation Completed"); await createBoundaryEntities(request, boundaryMap); + logger.info("waiting for 2 secs to persist the boundary entities before creating boundary relationship") + await new Promise(resolve => setTimeout(resolve, 2000)); const modifiedChildParentMap = modifyChildParentMap(childParentMap, boundaryMap); await createBoundaryRelationship(request, boundaryMap, modifiedChildParentMap); const boundaryDataForSheet = addBoundaryCodeToData(withBoundaryCode, withoutBoundaryCode, boundaryMap); @@ -1738,8 +1786,10 @@ function getFiltersFromCampaignSearchResponse(responseFromCampaignSearch: any) { const getConfigurableColumnHeadersBasedOnCampaignType = async (request: any, localizationMap?: any) => { try { const responseFromCampaignSearch = await getCampaignSearchResponse(request); - const campaignType = responseFromCampaignSearch?.CampaignDetails[0]?.projectType; - + const campaignObject = responseFromCampaignSearch?.CampaignDetails?.[0]; + let campaignType = campaignObject?.projectType; + const isSourceMicroplan = checkIfSourceIsMicroplan(campaignObject); + campaignType = (isSourceMicroplan) ? `${config?.prefixForMicroplanCampaigns}-${campaignType}` : campaignType; const mdmsResponse = await callMdmsTypeSchema(request, request?.query?.tenantId || request?.body?.ResourceDetails?.tenantId, request?.query?.type || request?.body?.ResourceDetails?.type, campaignType) if (!mdmsResponse || mdmsResponse?.columns.length === 0) { logger.error(`Campaign Type ${campaignType} has not any columns configured in schema`) @@ -1763,22 +1813,24 @@ const getConfigurableColumnHeadersBasedOnCampaignType = async (request: any, loc } -async function getFinalValidHeadersForTargetSheetAsPerCampaignType(request: any, hierarchy: any[], localizationMap?: any) { +async function getFinalValidHeadersForTargetSheetAsPerCampaignType(request: any, hierarchy: any[], differentTabsBasedOnLevel: any, localizationMap?: any) { const modifiedHierarchy = hierarchy.map(ele => `${request?.body?.ResourceDetails?.hierarchyType}_${ele}`.toUpperCase()); const localizedHierarchy = getLocalizedHeaders(modifiedHierarchy, localizationMap); - const index = localizedHierarchy.indexOf(getLocalizedName(config?.boundary?.generateDifferentTabsOnBasisOf, localizationMap)); + const index = localizedHierarchy.indexOf(getLocalizedName(differentTabsBasedOnLevel, localizationMap)); const expectedHeadersForTargetSheetUptoHierarchy = index !== -1 ? localizedHierarchy.slice(index) : throwError("COMMON", 400, "VALIDATION_ERROR", `${getLocalizedName(config?.boundary?.generateDifferentTabsOnBasisOf, localizationMap)} level not present in the hierarchy`); - const columnFromSchemaOfTargetTemplate = await getConfigurableColumnHeadersBasedOnCampaignType(request); + const responseFromCampaignSearch = await getCampaignSearchResponse(request); + const campaignObject = responseFromCampaignSearch?.CampaignDetails?.[0]; + const columnFromSchemaOfTargetTemplate = await generateDynamicTargetHeaders(request, campaignObject, localizationMap); const localizedcolumnFromSchemaOfTargetTemplate = getLocalizedHeaders(columnFromSchemaOfTargetTemplate, localizationMap) - const expectedHeadersForTargetSheet = [...expectedHeadersForTargetSheetUptoHierarchy, ...localizedcolumnFromSchemaOfTargetTemplate]; + const expectedHeadersForTargetSheet = [...expectedHeadersForTargetSheetUptoHierarchy, getLocalizedName(config?.boundary?.boundaryCode, localizationMap), ...localizedcolumnFromSchemaOfTargetTemplate]; return expectedHeadersForTargetSheet; } async function getDifferentTabGeneratedBasedOnConfig(request: any, boundaryDataGeneratedBeforeDifferentTabSeparation: any, localizationMap?: any) { - // assigning fileStoreId of a single district tab if criteria for multiple tabs are not met var boundaryDataGeneratedAfterDifferentTabSeparation: any = boundaryDataGeneratedBeforeDifferentTabSeparation; const boundaryData = await getBoundaryDataAfterGeneration(boundaryDataGeneratedBeforeDifferentTabSeparation, request, localizationMap); - const differentTabsBasedOnLevel = getLocalizedName(config?.boundary?.generateDifferentTabsOnBasisOf, localizationMap); + let differentTabsBasedOnLevel = await getBoundaryOnWhichWeSplit(request); + differentTabsBasedOnLevel = getLocalizedName(`${request?.query?.hierarchyType}_${differentTabsBasedOnLevel}`.toUpperCase(), localizationMap); logger.info(`Boundaries are seperated based on hierarchy type ${differentTabsBasedOnLevel}`) const isKeyOfThatTypePresent = boundaryData.some((data: any) => data.hasOwnProperty(differentTabsBasedOnLevel)); const boundaryTypeOnWhichWeSplit = boundaryData.filter((data: any) => data[differentTabsBasedOnLevel]); @@ -1789,6 +1841,19 @@ async function getDifferentTabGeneratedBasedOnConfig(request: any, boundaryDataG return boundaryDataGeneratedAfterDifferentTabSeparation; } +async function getBoundaryOnWhichWeSplit(request: any) { + const mdmsResponse = await getMDMSV1Data(request, config?.values?.moduleName, config?.masterNameForSplitBoundariesOn, request?.query?.tenantId || request?.body?.ResourceDetails?.tenantId); + const responseFromCampaignSearch = await getCampaignSearchResponse(request); + const hierarchyTypeFromCampaignResponseObject = responseFromCampaignSearch?.CampaignDetails?.[0].hierarchyType; + return mdmsResponse.filter((item: any) => item.hierarchy == hierarchyTypeFromCampaignResponseObject).map((item: any) => item.splitBoundariesOn); +} + + +function checkIfSourceIsMicroplan(objectWithAdditionalDetails: any): boolean { + return objectWithAdditionalDetails?.additionalDetails?.source === 'microplan'; +} + + @@ -1821,5 +1886,7 @@ export { getFiltersFromCampaignSearchResponse, getConfigurableColumnHeadersBasedOnCampaignType, getFinalValidHeadersForTargetSheetAsPerCampaignType, - getDifferentTabGeneratedBasedOnConfig + getDifferentTabGeneratedBasedOnConfig, + checkIfSourceIsMicroplan, + getBoundaryOnWhichWeSplit } diff --git a/health-services/project-factory/src/server/utils/excelUtils.ts b/health-services/project-factory/src/server/utils/excelUtils.ts index 8624ed7b977..8f7a0acc614 100644 --- a/health-services/project-factory/src/server/utils/excelUtils.ts +++ b/health-services/project-factory/src/server/utils/excelUtils.ts @@ -71,8 +71,8 @@ function updateFontNameToRoboto(worksheet: ExcelJS.Worksheet) { function formatWorksheet(worksheet: any, datas: any, headerSet: any) { // Add empty rows after the main header - worksheet.addRow([]); - worksheet.addRow([]); + // worksheet.addRow([]); + // worksheet.addRow([]); worksheet.addRow([]); // Add the data rows with text wrapping @@ -136,46 +136,70 @@ function performFreezeWholeSheet(sheet: any) { sheet.protect('passwordhere', { selectLockedCells: true }); } -function addDataToSheet(sheet: any, sheetData: any, firstRowColor: any = '93C47D', columnWidth = 40, frozeCells = false, frozeWholeSheet = false) { +// Function to add data to the sheet +function addDataToSheet(sheet: any, sheetData: any, firstRowColor: string = '93C47D', columnWidth: number = 40, frozeCells: boolean = false, frozeWholeSheet: boolean = false) { sheetData?.forEach((row: any, index: number) => { const worksheetRow = sheet.addRow(row); - // Apply fill color to each cell in the first row and make cells bold if (index === 0) { - worksheetRow.eachCell((cell: any, colNumber: number) => { - // Set cell fill color - cell.fill = { - type: 'pattern', - pattern: 'solid', - fgColor: { argb: firstRowColor } // Green color - }; - - // Set font to bold - cell.font = { bold: true }; + formatFirstRow(worksheetRow, sheet, firstRowColor, columnWidth, frozeCells); + } else { + formatOtherRows(worksheetRow, frozeCells); + } + }); + + finalizeSheet(sheet, frozeCells, frozeWholeSheet); +} + +// Function to format the first row +function formatFirstRow(row: any, sheet: any, firstRowColor: string, columnWidth: number, frozeCells: boolean) { + row.eachCell((cell: any, colNumber: number) => { + setFirstRowCellStyles(cell, firstRowColor, frozeCells); + adjustColumnWidth(sheet, colNumber, columnWidth); + adjustRowHeight(row, cell, columnWidth); + }); +} + +// Function to set styles for the first row's cells +function setFirstRowCellStyles(cell: any, firstRowColor: string, frozeCells: boolean) { + cell.fill = { + type: 'pattern', + pattern: 'solid', + fgColor: { argb: firstRowColor } + }; + + cell.font = { bold: true }; - // Enable text wrapping - cell.alignment = { wrapText: true }; + if (frozeCells) { + cell.protection = { locked: true }; + } - // Optionally lock the cell - if (frozeCells) { - cell.protection = { locked: true }; - } + cell.alignment = { vertical: 'top', horizontal: 'left', wrapText: true }; +} - // Update column width based on the length of the cell's text - const currentWidth = sheet.getColumn(colNumber).width || columnWidth; // Default width or current width - const newWidth = Math.max(currentWidth, cell.value.toString().length + 2); // Add padding - sheet.getColumn(colNumber).width = newWidth; - }); +// Function to adjust column width +function adjustColumnWidth(sheet: any, colNumber: number, columnWidth: number) { + sheet.getColumn(colNumber).width = columnWidth; +} +// Function to adjust row height based on content +function adjustRowHeight(row: any, cell: any, columnWidth: number) { + const text = cell.value ? cell.value.toString() : ''; + const lines = Math.ceil(text.length / (columnWidth - 2)); // Approximate number of lines + row.height = Math.max(row.height ?? 0, lines * 15); +} + +// Function to format cells in other rows +function formatOtherRows(row: any, frozeCells: boolean) { + row.eachCell((cell: any) => { + if (frozeCells) { + cell.protection = { locked: true }; } - worksheetRow.eachCell((cell: any) => { - if (frozeCells) { - cell.protection = { locked: true }; - } - }); }); +} - // Protect the entire sheet to enable cell protection settings +// Function to finalize the sheet settings +function finalizeSheet(sheet: any, frozeCells: boolean, frozeWholeSheet: boolean) { if (frozeCells) { performUnfreezeCells(sheet); } @@ -183,9 +207,13 @@ function addDataToSheet(sheet: any, sheetData: any, firstRowColor: any = '93C47D performFreezeWholeSheet(sheet); } updateFontNameToRoboto(sheet); + sheet.views = [{ state: 'frozen', ySplit: 1, zoomScale: 110 }]; } + + + function lockTargetFields(newSheet: any, columnsNotToBeFreezed: any, boundaryCodeColumnIndex: any) { // Make every cell locked by default newSheet.eachRow((row: any) => { diff --git a/health-services/project-factory/src/server/utils/generateUtils.ts b/health-services/project-factory/src/server/utils/generateUtils.ts new file mode 100644 index 00000000000..a8a03e65d7c --- /dev/null +++ b/health-services/project-factory/src/server/utils/generateUtils.ts @@ -0,0 +1,85 @@ +import { getLocalizedMessagesHandler, processGenerate, replicateRequest, throwError } from "./genericUtils"; +import _ from 'lodash'; +import { logger } from "./logger"; +import { getBoundarySheetData } from "../api/genericApis"; +import { getLocalisationModuleName } from "./localisationUtils"; + +// Now you can use Lodash functions with the "_" prefix, e.g., _.isEqual(), _.sortBy(), etc. +function extractProperties(obj: any) { + return { + code: obj.code || null, + includeAllChildren: obj.includeAllChildren || null, + isRoot: obj.isRoot || null + }; +} + +function areBoundariesSame(existingBoundaries: any, currentBoundaries: any) { + if (!existingBoundaries || !currentBoundaries) return false; + if (existingBoundaries.length !== currentBoundaries.length) return false; + const existingSetOfBoundaries = new Set(existingBoundaries.map((exboundary: any) => JSON.stringify(extractProperties(exboundary)))); + const currentSetOfBoundaries = new Set(currentBoundaries.map((currboundary: any) => JSON.stringify(extractProperties(currboundary)))); + return _.isEqual(existingSetOfBoundaries, currentSetOfBoundaries); +} + +async function callGenerateIfBoundariesDiffer(request: any) { + try { + const ExistingCampaignDetails = request?.body?.ExistingCampaignDetails; + if (ExistingCampaignDetails) { + if (!areBoundariesSame(ExistingCampaignDetails?.boundaries, request?.body?.CampaignDetails?.boundaries)) { + logger.info("Boundaries differ, generating new resources"); + + const newRequestBody = { + RequestInfo: request?.body?.RequestInfo, + Filters: { + boundaries: request?.body?.CampaignDetails?.boundaries + } + }; + + const { query } = request; + const params = { + tenantId: request?.body?.CampaignDetails?.tenantId, + forceUpdate: 'true', + hierarchyType: request?.body?.CampaignDetails?.hierarchyType, + campaignId: request?.body?.CampaignDetails?.id + }; + + const newParamsBoundary = { ...query, ...params, type: "boundary" }; + const newRequestBoundary = replicateRequest(request, newRequestBody, newParamsBoundary); + await callGenerate(newRequestBoundary, "boundary"); + + const newParamsFacilityWithBoundary = { ...query, ...params, type: "facilityWithBoundary" }; + const newRequestFacilityWithBoundary = replicateRequest(request, newRequestBody, newParamsFacilityWithBoundary); + await callGenerate(newRequestFacilityWithBoundary, "facilityWithBoundary"); + + const newParamsUserWithBoundary = { ...query, ...params, type: "userWithBoundary" }; + const newRequestUserWithBoundary = replicateRequest(request, newRequestBody, newParamsUserWithBoundary); + await callGenerate(newRequestUserWithBoundary, "userWithBoundary"); + } + } + } catch (error: any) { + logger.error(error); + throwError("COMMON", 400, "GENERATE_ERROR", `Error while generating user/facility/boundary: ${error.message}`); + } +} + +async function callGenerate(request: any, type: any, enableCaching = false) { + logger.info(`calling generate api for type ${type}`); + if (type === "facilityWithBoundary" || type == "userWithBoundary") { + const { hierarchyType } = request.query; + const localizationMapHierarchy = hierarchyType && await getLocalizedMessagesHandler( + request, + request.query.tenantId, + getLocalisationModuleName(hierarchyType) + ); + const localizationMapModule = await getLocalizedMessagesHandler(request, request.query.tenantId); + const localizationMap = { ...localizationMapHierarchy, ...localizationMapModule }; + const filteredBoundary = await getBoundarySheetData(request, localizationMap); + await processGenerate(request, enableCaching, filteredBoundary); + } else { + await processGenerate(request, enableCaching); + } +} + + + +export { callGenerateIfBoundariesDiffer, callGenerate, areBoundariesSame } diff --git a/health-services/project-factory/src/server/utils/genericUtils.ts b/health-services/project-factory/src/server/utils/genericUtils.ts index fa3c194b8ca..df6f5ec8bfb 100644 --- a/health-services/project-factory/src/server/utils/genericUtils.ts +++ b/health-services/project-factory/src/server/utils/genericUtils.ts @@ -2,20 +2,21 @@ import { NextFunction, Request, Response } from "express"; import { httpRequest, defaultheader } from "./request"; import config, { getErrorCodes } from "../config/index"; import { v4 as uuidv4 } from 'uuid'; -import { produceModifiedMessages } from "../kafka/Listener"; +import { produceModifiedMessages } from "../kafka/Producer"; import { generateHierarchyList, getAllFacilities, getCampaignSearchResponse, getHierarchy } from "../api/campaignApis"; import { getBoundarySheetData, getSheetData, createAndUploadFile, createExcelSheet, getTargetSheetData, callMdmsData, callMdmsTypeSchema } from "../api/genericApis"; import { logger } from "./logger"; -import { getConfigurableColumnHeadersBasedOnCampaignType, getDifferentTabGeneratedBasedOnConfig, getLocalizedName } from "./campaignUtils"; +import { checkIfSourceIsMicroplan, getConfigurableColumnHeadersBasedOnCampaignType, getDifferentTabGeneratedBasedOnConfig, getLocalizedName } from "./campaignUtils"; import Localisation from "../controllers/localisationController/localisation.controller"; import { executeQuery } from "./db"; import { generatedResourceTransformer } from "./transforms/searchResponseConstructor"; import { generatedResourceStatuses, headingMapping, resourceDataStatuses } from "../config/constants"; -import { getLocaleFromRequest, getLocalisationModuleName } from "./localisationUtils"; +import { getLocaleFromRequest, getLocaleFromRequestInfo, getLocalisationModuleName } from "./localisationUtils"; import { getBoundaryColumnName, getBoundaryTabName } from "./boundaryUtils"; import { getBoundaryDataService } from "../service/dataManageService"; import { addDataToSheet, formatWorksheet, getNewExcelWorkbook, updateFontNameToRoboto } from "./excelUtils"; import createAndSearch from "../config/createAndSearch"; +import { generateDynamicTargetHeaders } from "./targetUtils"; const NodeCache = require("node-cache"); const updateGeneratedResourceTopic = config?.kafka?.KAFKA_UPDATE_GENERATED_RESOURCE_DETAILS_TOPIC; @@ -51,6 +52,12 @@ const throwErrorViaRequest = (message: any = "Internal Server Error") => { } }; +function shutdownGracefully() { + logger.info('Shutting down gracefully...'); + // Perform any cleanup tasks here, like closing database connections + process.exit(1); // Exit with a non-zero code to indicate an error +} + function capitalizeFirstLetter(str: string | undefined) { if (!str) return str; return str.charAt(0).toUpperCase() + str.slice(1); @@ -240,27 +247,47 @@ async function generateActivityMessage(tenantId: any, requestBody: any, requestP /* Fetches data from the database */ async function searchGeneratedResources(request: any) { try { - const { type } = request.query; - const { tenantId, hierarchyType } = request.query; - const status = generatedResourceStatuses.completed; - let queryResult: any; - let queryString: string; + const { type, tenantId, hierarchyType, id, status, campaignId } = request.query; + let queryString = `SELECT * FROM ${config?.DB_CONFIG.DB_GENERATED_RESOURCE_DETAILS_TABLE_NAME} WHERE `; + let queryConditions: string[] = []; let queryValues: any[] = []; + if (id) { + queryConditions.push(`id = $${queryValues.length + 1}`); + queryValues.push(id); + } + if (type) { + queryConditions.push(`type = $${queryValues.length + 1}`); + queryValues.push(type); + } - queryString = `SELECT * FROM ${config?.DB_CONFIG.DB_GENERATED_RESOURCE_DETAILS_TABLE_NAME} WHERE `; - // query for download with id - if (request?.query?.id) { - queryString += "id = $1 AND type = $2 AND hierarchytype = $3 AND tenantid = $4 "; - queryValues = [request.query.id, type, hierarchyType, tenantId]; + if (hierarchyType) { + queryConditions.push(`hierarchyType = $${queryValues.length + 1}`); + queryValues.push(hierarchyType); } - else { - queryString += "type = $1 AND hierarchytype = $2 AND tenantid = $3 AND status =$4 "; - queryValues = [type, hierarchyType, tenantId, status]; + if (tenantId) { + queryConditions.push(`tenantId = $${queryValues.length + 1}`); + queryValues.push(tenantId); + } + if (campaignId) { + queryConditions.push(`campaignId = $${queryValues.length + 1}`); + queryValues.push(campaignId); } - queryResult = await executeQuery(queryString, queryValues); + if (status) { + const statusArray = status.split(',').map((s: any) => s.trim()); + const statusConditions = statusArray.map((_: any, index: any) => `status = $${queryValues.length + index + 1}`); + queryConditions.push(`(${statusConditions.join(' OR ')})`); + queryValues.push(...statusArray); + } + + queryString += queryConditions.join(" AND "); + + // Add sorting and limiting + queryString += " ORDER BY createdTime DESC OFFSET 0 LIMIT 1"; + + const queryResult = await executeQuery(queryString, queryValues); return generatedResourceTransformer(queryResult?.rows); - } - catch (error: any) { + } catch (error: any) { + console.log(error) logger.error(`Error fetching data from the database: ${error.message}`); throwError("COMMON", 500, "INTERNAL_SERVER_ERROR", error?.message); return null; // Return null in case of an error @@ -300,7 +327,8 @@ async function generateNewRequestObject(request: any) { lastModifiedBy: request?.body?.RequestInfo?.userInfo.uuid, }, additionalDetails: additionalDetails, - count: null + count: null, + campaignId: request?.query?.campaignId }; return [newEntry]; } @@ -333,20 +361,20 @@ async function getFinalUpdatedResponse(result: any, responseData: any, request: -async function fullProcessFlowForNewEntry(newEntryResponse: any, generatedResource: any, request: any) { +async function fullProcessFlowForNewEntry(newEntryResponse: any, generatedResource: any, request: any, enableCaching = false, filteredBoundary?: any) { try { const { type, hierarchyType } = request?.query; generatedResource = { generatedResource: newEntryResponse } // send message to create toppic logger.info(`processing the generate request for type ${type}`) - produceModifiedMessages(generatedResource, createGeneratedResourceTopic); + await produceModifiedMessages(generatedResource, createGeneratedResourceTopic); const localizationMapHierarchy = hierarchyType && await getLocalizedMessagesHandler(request, request?.query?.tenantId, getLocalisationModuleName(hierarchyType)); const localizationMapModule = await getLocalizedMessagesHandler(request, request?.query?.tenantId); const localizationMap = { ...localizationMapHierarchy, ...localizationMapModule }; if (type === 'boundary') { // get boundary data from boundary relationship search api logger.info("Generating Boundary Data") - const boundaryDataSheetGeneratedBeforeDifferentTabSeparation = await getBoundaryDataService(request); + const boundaryDataSheetGeneratedBeforeDifferentTabSeparation = await getBoundaryDataService(request, enableCaching); logger.info(`Boundary data generated successfully: ${JSON.stringify(boundaryDataSheetGeneratedBeforeDifferentTabSeparation)}`); // get boundary sheet data after being generated logger.info("generating different tabs logic ") @@ -355,18 +383,19 @@ async function fullProcessFlowForNewEntry(newEntryResponse: any, generatedResour const finalResponse = await getFinalUpdatedResponse(boundaryDataSheetGeneratedAfterDifferentTabSeparation, newEntryResponse, request); const generatedResourceNew: any = { generatedResource: finalResponse } // send to update topic - produceModifiedMessages(generatedResourceNew, updateGeneratedResourceTopic); + await produceModifiedMessages(generatedResourceNew, updateGeneratedResourceTopic); request.body.generatedResource = finalResponse; } else if (type == "facilityWithBoundary" || type == 'userWithBoundary') { - await processGenerateRequest(request, localizationMap); + await processGenerateRequest(request, localizationMap, filteredBoundary); const finalResponse = await getFinalUpdatedResponse(request?.body?.fileDetails, newEntryResponse, request); const generatedResourceNew: any = { generatedResource: finalResponse } - produceModifiedMessages(generatedResourceNew, updateGeneratedResourceTopic); + await produceModifiedMessages(generatedResourceNew, updateGeneratedResourceTopic); request.body.generatedResource = finalResponse; } } catch (error: any) { - handleGenerateError(newEntryResponse, generatedResource, error); + console.log(error) + await handleGenerateError(newEntryResponse, generatedResource, error); } } @@ -420,13 +449,40 @@ function correctParentValues(campaignDetails: any) { return campaignDetails; } +function setDropdownFromSchema(request: any, schema: any, localizationMap?: { [key: string]: string }) { + const dropdowns = Object.entries(schema.properties) + .filter(([key, value]: any) => Array.isArray(value.enum) && value.enum.length > 0) + .reduce((result: any, [key, value]: any) => { + // Transform the key using localisedValue function + const newKey: any = getLocalizedName(key, localizationMap); + result[newKey] = value.enum; + return result; + }, {}); + logger.info(`dropdowns to set ${JSON.stringify(dropdowns)}`) + request.body.dropdowns = dropdowns; +} + async function createFacilitySheet(request: any, allFacilities: any[], localizationMap?: { [key: string]: string }) { const tenantId = request?.query?.tenantId; - const schema = await callMdmsTypeSchema(request, tenantId, "facility"); + const responseFromCampaignSearch = await getCampaignSearchResponse(request); + const isSourceMicroplan = checkIfSourceIsMicroplan(responseFromCampaignSearch?.CampaignDetails?.[0]); + let schema; + if (isSourceMicroplan) { + schema = await callMdmsTypeSchema(request, tenantId, "facility", "microplan"); + } else { + schema = await callMdmsTypeSchema(request, tenantId, "facility", "all"); + } const keys = schema?.columns; + setDropdownFromSchema(request, schema, localizationMap); const headers = ["HCM_ADMIN_CONSOLE_FACILITY_CODE", ...keys] - const localizedHeaders = getLocalizedHeaders(headers, localizationMap); + let localizedHeaders; + if (isSourceMicroplan) { + localizedHeaders = getLocalizedHeadersForMicroplan(responseFromCampaignSearch, headers, localizationMap); + } + else { + localizedHeaders = getLocalizedHeaders(headers, localizationMap); + } const facilities = allFacilities.map((facility: any) => { return [ facility?.id, @@ -471,13 +527,15 @@ async function createReadMeSheet(request: any, workbook: any, mainHeader: any, l const headerSet = new Set(); - const datas = readMeConfig.texts.flatMap((text: any) => { - const descriptions = text.descriptions.map((description: any) => { - return getLocalizedName(description.text, localizationMap); + const datas = readMeConfig.texts + .filter((text: any) => text?.inSheet) // Filter out texts with inSheet set to false + .flatMap((text: any) => { + const descriptions = text.descriptions.map((description: any) => { + return getLocalizedName(description.text, localizationMap); + }); + headerSet.add(getLocalizedName(text.header, localizationMap)); + return [getLocalizedName(text.header, localizationMap), ...descriptions, ""]; }); - headerSet.add(getLocalizedName(text.header, localizationMap)); - return [getLocalizedName(text.header, localizationMap), ...descriptions, "", "", "", ""]; - }); // Create the worksheet and add the main header const worksheet = workbook.addWorksheet(getLocalizedName("HCM_README_SHEETNAME", localizationMap)); @@ -525,6 +583,21 @@ function getLocalizedHeaders(headers: any, localizationMap?: { [key: string]: st return messages; } +function getLocalizedHeadersForMicroplan(responseFromCampaignSearch: any, headers: any, localizationMap?: { [key: string]: string }) { + + const projectType = responseFromCampaignSearch?.CampaignDetails?.[0]?.projectType; + + headers = headers.map((header: string) => { + if (header === 'HCM_ADMIN_CONSOLE_FACILITY_CAPACITY_MICROPLAN') { + return `${header}_${projectType}`; + } + return header; + }); + + const messages = headers.map((header: any) => (localizationMap ? localizationMap[header] || header : header)); + return messages; +} + function modifyRequestForLocalisation(request: any, tenantId: string) { @@ -594,6 +667,7 @@ async function createFacilityAndBoundaryFile(facilitySheetData: any, boundaryShe addDataToSheet(facilitySheet, facilitySheetData, undefined, undefined, true); hideUniqueIdentifierColumn(facilitySheet, createAndSearch?.["facility"]?.uniqueIdentifierColumn); changeFirstRowColumnColour(facilitySheet, 'E06666'); + await handledropdownthings(facilitySheet, request.body?.dropdowns); // Add boundary sheet to the workbook const localizedBoundaryTab = getLocalizedName(getBoundaryTabName(), localizationMap); @@ -605,8 +679,41 @@ async function createFacilityAndBoundaryFile(facilitySheetData: any, boundaryShe request.body.fileDetails = fileDetails; } - -// Helper function to add data to a sheet +async function handledropdownthings(facilitySheet: any, dropdowns: any) { + let dropdownColumnIndex = -1; + if (dropdowns) { + for (const key of Object.keys(dropdowns)) { + if (dropdowns[key]) { + // Iterate through each row to find the column index of "Boundary Code (Mandatory)" + await facilitySheet.eachRow({ includeEmpty: true }, (row: any) => { + row.eachCell({ includeEmpty: true }, (cell: any, colNumber: any) => { + if (cell.value === key) { + dropdownColumnIndex = colNumber; + } + }); + }); + + // If dropdown column index is found, set multi-select dropdown for subsequent rows + if (dropdownColumnIndex !== -1) { + facilitySheet.getColumn(dropdownColumnIndex).eachCell({ includeEmpty: true }, (cell: any, rowNumber: any) => { + if (rowNumber > 1) { + // Set dropdown list with no typing allowed + cell.dataValidation = { + type: 'list', + formulae: [`"${dropdowns[key].join(',')}"`], + showDropDown: true, // Ensures dropdown is visible + error: 'Please select a value from the dropdown list.', + errorStyle: 'stop', // Prevents any input not in the list + showErrorMessage: true, // Ensures error message is shown + errorTitle: 'Invalid Entry' + }; + } + }); + } + } + } + } +} @@ -623,6 +730,7 @@ async function createUserAndBoundaryFile(userSheetData: any, boundarySheetData: const userSheet = workbook.addWorksheet(localizedUserTab); addDataToSheet(userSheet, userSheetData, undefined, undefined, true); + await handledropdownthings(userSheet, request.body?.dropdowns); // Add boundary sheet to the workbook const localizedBoundaryTab = getLocalizedName(getBoundaryTabName(), localizationMap) const boundarySheet = workbook.addWorksheet(localizedBoundaryTab); @@ -633,7 +741,7 @@ async function createUserAndBoundaryFile(userSheetData: any, boundarySheetData: } -async function generateFacilityAndBoundarySheet(tenantId: string, request: any, localizationMap?: { [key: string]: string }) { +async function generateFacilityAndBoundarySheet(tenantId: string, request: any, localizationMap?: { [key: string]: string }, filteredBoundary?: any) { // Get facility and boundary data logger.info("Generating facilities started"); const allFacilities = await getAllFacilities(tenantId, request.body); @@ -641,38 +749,49 @@ async function generateFacilityAndBoundarySheet(tenantId: string, request: any, logger.info(`Facilities generation completed and found ${allFacilities?.length} facilities`); const facilitySheetData: any = await createFacilitySheet(request, allFacilities, localizationMap); // request.body.Filters = { tenantId: tenantId, hierarchyType: request?.query?.hierarchyType, includeChildren: true } - const boundarySheetData: any = await getBoundarySheetData(request, localizationMap); - await createFacilityAndBoundaryFile(facilitySheetData, boundarySheetData, request, localizationMap); + if (filteredBoundary && filteredBoundary.length > 0) { + await createFacilityAndBoundaryFile(facilitySheetData, filteredBoundary, request, localizationMap); + } + else { + const boundarySheetData: any = await getBoundarySheetData(request, localizationMap); + await createFacilityAndBoundaryFile(facilitySheetData, boundarySheetData, request, localizationMap); + } } -async function generateUserAndBoundarySheet(request: any, localizationMap?: { [key: string]: string }) { +async function generateUserAndBoundarySheet(request: any, localizationMap?: { [key: string]: string }, filteredBoundary?: any) { const userData: any[] = []; const tenantId = request?.query?.tenantId; const schema = await callMdmsTypeSchema(request, tenantId, "user"); + setDropdownFromSchema(request, schema, localizationMap); const headers = schema?.columns; const localizedHeaders = getLocalizedHeaders(headers, localizationMap); // const localizedUserTab = getLocalizedName(config?.user?.userTab, localizationMap); logger.info("Generated an empty user template"); const userSheetData = await createExcelSheet(userData, localizedHeaders); - const boundarySheetData: any = await getBoundarySheetData(request, localizationMap); - await createUserAndBoundaryFile(userSheetData, boundarySheetData, request, localizationMap); + if (filteredBoundary && filteredBoundary.length > 0) { + await createUserAndBoundaryFile(userSheetData, filteredBoundary, request, localizationMap); + } + else { + const boundarySheetData: any = await getBoundarySheetData(request, localizationMap); + await createUserAndBoundaryFile(userSheetData, boundarySheetData, request, localizationMap); + } } -async function processGenerateRequest(request: any, localizationMap?: { [key: string]: string }) { +async function processGenerateRequest(request: any, localizationMap?: { [key: string]: string }, filteredBoundary?: any) { const { type, tenantId } = request.query if (type == "facilityWithBoundary") { - await generateFacilityAndBoundarySheet(String(tenantId), request, localizationMap); + await generateFacilityAndBoundarySheet(String(tenantId), request, localizationMap, filteredBoundary); } if (type == "userWithBoundary") { - await generateUserAndBoundarySheet(request, localizationMap); + await generateUserAndBoundarySheet(request, localizationMap, filteredBoundary); } } -async function processGenerateForNew(request: any, generatedResource: any, newEntryResponse: any) { +async function processGenerateForNew(request: any, generatedResource: any, newEntryResponse: any, enableCaching = false, filteredBoundary?: any) { request.body.generatedResource = newEntryResponse; - fullProcessFlowForNewEntry(newEntryResponse, generatedResource, request); + await fullProcessFlowForNewEntry(newEntryResponse, generatedResource, request, enableCaching, filteredBoundary); return request.body.generatedResource; } -function handleGenerateError(newEntryResponse: any, generatedResource: any, error: any) { +async function handleGenerateError(newEntryResponse: any, generatedResource: any, error: any) { newEntryResponse.map((item: any) => { item.status = generatedResourceStatuses.failed, item.additionalDetails = { ...item.additionalDetails, error: { @@ -685,21 +804,21 @@ function handleGenerateError(newEntryResponse: any, generatedResource: any, erro }) generatedResource = { generatedResource: newEntryResponse }; logger.error(String(error)); - produceModifiedMessages(generatedResource, updateGeneratedResourceTopic); + await produceModifiedMessages(generatedResource, updateGeneratedResourceTopic); } -async function updateAndPersistGenerateRequest(newEntryResponse: any, oldEntryResponse: any, responseData: any, request: any) { +async function updateAndPersistGenerateRequest(newEntryResponse: any, oldEntryResponse: any, responseData: any, request: any, enableCaching = false, filteredBoundary?: any) { const { forceUpdate } = request.query; const forceUpdateBool: boolean = forceUpdate === 'true'; let generatedResource: any; if (forceUpdateBool && responseData.length > 0) { generatedResource = { generatedResource: oldEntryResponse }; // send message to update topic - produceModifiedMessages(generatedResource, updateGeneratedResourceTopic); + await produceModifiedMessages(generatedResource, updateGeneratedResourceTopic); request.body.generatedResource = oldEntryResponse; } if (responseData.length === 0 || forceUpdateBool) { - processGenerateForNew(request, generatedResource, newEntryResponse) + processGenerateForNew(request, generatedResource, newEntryResponse, enableCaching, filteredBoundary) } else { request.body.generatedResource = responseData @@ -708,7 +827,7 @@ async function updateAndPersistGenerateRequest(newEntryResponse: any, oldEntryRe /* */ -async function processGenerate(request: any) { +async function processGenerate(request: any, enableCaching = false, filteredBoundary?: any) { // fetch the data from db to check any request already exists const responseData = await searchGeneratedResources(request); // modify response from db @@ -718,7 +837,7 @@ async function processGenerate(request: any) { // make old data status as expired const oldEntryResponse = await updateExistingResourceExpired(modifiedResponse, request); // generate data - await updateAndPersistGenerateRequest(newEntryResponse, oldEntryResponse, responseData, request); + await updateAndPersistGenerateRequest(newEntryResponse, oldEntryResponse, responseData, request, enableCaching, filteredBoundary); } /* TODO add comments @nitish-egov @@ -739,8 +858,11 @@ async function enrichResourceDetails(request: any) { lastModifiedBy: request?.body?.RequestInfo?.userInfo?.uuid, lastModifiedTime: Date.now() } + if (request.body.ResourceDetails.type === 'boundary') { + request.body.ResourceDetails.campaignId = null; + } const persistMessage: any = { ResourceDetails: request.body.ResourceDetails }; - produceModifiedMessages(persistMessage, config?.kafka?.KAFKA_CREATE_RESOURCE_DETAILS_TOPIC); + await produceModifiedMessages(persistMessage, config?.kafka?.KAFKA_CREATE_RESOURCE_DETAILS_TOPIC); } function getFacilityIds(data: any) { @@ -931,6 +1053,13 @@ async function getLocalizedMessagesHandler(request: any, tenantId: any, module = return localizationResponse; } +async function getLocalizedMessagesHandlerViaRequestInfo(RequestInfo: any, tenantId: any, module = config.localisation.localizationModule) { + const localisationcontroller = Localisation.getInstance(); + const locale = getLocaleFromRequestInfo(RequestInfo); + const localizationResponse = await localisationcontroller.getLocalisedData(module, locale, tenantId); + return localizationResponse; +} + async function translateSchema(schema: any, localizationMap?: { [key: string]: string }) { @@ -983,25 +1112,78 @@ function getDifferentDistrictTabs(boundaryData: any, differentTabsBasedOnLevel: } -async function getConfigurableColumnHeadersFromSchemaForTargetSheet(request: any, hierarchy: any, boundaryData: any, differentTabsBasedOnLevel: any, localizationMap?: any) { +async function getConfigurableColumnHeadersFromSchemaForTargetSheet(request: any, hierarchy: any, boundaryData: any, differentTabsBasedOnLevel: any, campaignObject: any, localizationMap?: any) { const districtIndex = hierarchy.indexOf(differentTabsBasedOnLevel); - var headers = getLocalizedHeaders(hierarchy.slice(districtIndex), localizationMap); - - const headerColumnsAfterHierarchy = await getConfigurableColumnHeadersBasedOnCampaignType(request); + let headers: any; + const isSourceMicroplan = checkIfSourceIsMicroplan(campaignObject); + if (isSourceMicroplan) { + logger.info(`Source is Microplan.`); + headers = getLocalizedHeaders(hierarchy, localizationMap); + } + else { + headers = getLocalizedHeaders(hierarchy.slice(districtIndex), localizationMap); + } + const headerColumnsAfterHierarchy = await generateDynamicTargetHeaders(request, campaignObject, localizationMap); const localizedHeadersAfterHierarchy = getLocalizedHeaders(headerColumnsAfterHierarchy, localizationMap); - headers = [...headers, ...localizedHeadersAfterHierarchy] + headers = [...headers, getLocalizedName(config?.boundary?.boundaryCode, localizationMap), ...localizedHeadersAfterHierarchy] return getLocalizedHeaders(headers, localizationMap); } async function getMdmsDataBasedOnCampaignType(request: any, localizationMap?: any) { const responseFromCampaignSearch = await getCampaignSearchResponse(request); - const campaignType = responseFromCampaignSearch?.CampaignDetails[0]?.projectType; + const campaignObject = responseFromCampaignSearch?.CampaignDetails?.[0]; + let campaignType = campaignObject.projectType; + const isSourceMicroplan = checkIfSourceIsMicroplan(campaignObject); + campaignType = (isSourceMicroplan) ? `${config?.prefixForMicroplanCampaigns}-${campaignType}` : campaignType; const mdmsResponse = await callMdmsTypeSchema(request, request?.query?.tenantId || request?.body?.ResourceDetails?.tenantId, request?.query?.type || request?.body?.ResourceDetails?.type, campaignType) return mdmsResponse; } +function appendProjectTypeToCapacity(schema: any, projectType: string): any { + const updatedSchema = JSON.parse(JSON.stringify(schema)); // Deep clone the schema + + const capacityKey = 'HCM_ADMIN_CONSOLE_FACILITY_CAPACITY_MICROPLAN'; + const newCapacityKey = `${capacityKey}_${projectType}`; + + // Update properties + if (updatedSchema.properties[capacityKey]) { + updatedSchema.properties[newCapacityKey] = { + ...updatedSchema.properties[capacityKey], + name: `${updatedSchema.properties[capacityKey].name}_${projectType}` + }; + delete updatedSchema.properties[capacityKey]; + } + + // Update required + updatedSchema.required = updatedSchema.required.map((item: string) => + item === capacityKey ? newCapacityKey : item + ); + + // Update columns + updatedSchema.columns = updatedSchema.columns.map((item: string) => + item === capacityKey ? newCapacityKey : item + ); + + // Update unique + updatedSchema.unique = updatedSchema.unique.map((item: string) => + item === capacityKey ? newCapacityKey : item + ); + + // Update errorMessage + if (updatedSchema.errorMessage[capacityKey]) { + updatedSchema.errorMessage[newCapacityKey] = updatedSchema.errorMessage[capacityKey]; + delete updatedSchema.errorMessage[capacityKey]; + } + + // Update columnsNotToBeFreezed + updatedSchema.columnsNotToBeFreezed = updatedSchema.columnsNotToBeFreezed.map((item: string) => + item === capacityKey ? newCapacityKey : item + ); + + return updatedSchema; +} export { @@ -1048,7 +1230,10 @@ export { changeFirstRowColumnColour, getConfigurableColumnHeadersFromSchemaForTargetSheet, createBoundaryDataMainSheet, - getMdmsDataBasedOnCampaignType + getMdmsDataBasedOnCampaignType, + shutdownGracefully, + appendProjectTypeToCapacity, + getLocalizedMessagesHandlerViaRequestInfo }; diff --git a/health-services/project-factory/src/server/utils/localisationUtils.ts b/health-services/project-factory/src/server/utils/localisationUtils.ts index 0b1bd4804be..3d5585947ef 100644 --- a/health-services/project-factory/src/server/utils/localisationUtils.ts +++ b/health-services/project-factory/src/server/utils/localisationUtils.ts @@ -6,7 +6,15 @@ export const getLocaleFromRequest = (request: any) => { const msgId = request?.body?.RequestInfo?.msgId; // Split msgId by '|' delimiter and get the second part (index 1) // If splitting fails or no second part is found, use default locale from config - return msgId.split("|")?.[1] || config?.localisation?.defaultLocale; + return msgId?.split("|")?.[1] || config?.localisation?.defaultLocale; +}; + +export const getLocaleFromRequestInfo = (RequestInfo: any) => { + // Extract msgId from request body + const msgId = RequestInfo?.msgId; + // Split msgId by '|' delimiter and get the second part (index 1) + // If splitting fails or no second part is found, use default locale from config + return msgId?.split("|")?.[1] || config?.localisation?.defaultLocale; }; // Function to generate localisation module name based on hierarchy type @@ -22,17 +30,17 @@ export const getLocalisationModuleName = (hierarchyType: any) => { * @returns The transformed locale string. */ export const getTransformedLocale = (label: string) => { - // Trim leading and trailing whitespace from the label - label = label?.trim(); - // If label is not empty, convert to uppercase and replace special characters with underscores - return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_"); - }; + // Trim leading and trailing whitespace from the label + label = label?.trim(); + // If label is not empty, convert to uppercase and replace special characters with underscores + return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_"); +}; - export const convertLocalisationResponseToMap=(messages:any=[])=>{ - const localizationMap: any = {}; - messages.forEach((message: any) => { - localizationMap[message.code] = message.message; - }); - return localizationMap; - } \ No newline at end of file +export const convertLocalisationResponseToMap = (messages: any = []) => { + const localizationMap: any = {}; + messages.forEach((message: any) => { + localizationMap[message.code] = message.message; + }); + return localizationMap; +} \ No newline at end of file diff --git a/health-services/project-factory/src/server/utils/processTrackUtils.ts b/health-services/project-factory/src/server/utils/processTrackUtils.ts index d822e28fded..6d80346825f 100644 --- a/health-services/project-factory/src/server/utils/processTrackUtils.ts +++ b/health-services/project-factory/src/server/utils/processTrackUtils.ts @@ -1,52 +1,224 @@ import config from './../config'; -import { produceModifiedMessages } from '../kafka/Listener'; +import { produceModifiedMessages } from "../kafka/Producer";; import { v4 as uuidv4 } from 'uuid'; import { executeQuery } from './db'; +import { processTrackForUi, processTrackStatuses, processTrackTypes } from '../config/constants'; +import { logger } from './logger'; + +async function getProcessDetails(id: string, type?: string): Promise { + let query: string; + const values: any[] = [id]; + + logger.info(`Fetching process details for campaignId: ${id}${type ? `, type: ${type}` : ''}`); + + if (type) { + query = ` + SELECT * FROM ${config?.DB_CONFIG.DB_CAMPAIGN_PROCESS_TABLE_NAME} + WHERE campaignid = $1 AND type = $2 + ORDER BY lastmodifiedtime ASC; + `; + values.push(type); + } else { + query = ` + SELECT * FROM ${config?.DB_CONFIG.DB_CAMPAIGN_PROCESS_TABLE_NAME} + WHERE campaignid = $1 + ORDER BY lastmodifiedtime ASC; + `; + } -async function getProcessDetails(id: any): Promise { - const query = `SELECT * FROM ${config?.DB_CONFIG.DB_CAMPAIGN_PROCESS_TABLE_NAME} WHERE id = $1`; - const values = [id]; const queryResponse = await executeQuery(query, values); - return queryResponse.rows[0]; // Assuming only one row is expected + + if (queryResponse.rows.length === 0) { + logger.info('No process details found'); + return []; + } + const uiSet = new Set(processTrackForUi.map((item: any) => item)); + return queryResponse.rows.map((result: any) => ({ + id: result.id, + campaignId: result.campaignid, + type: result.type, + status: result.status, + showInUi: uiSet.has(result.type), + details: result.details, + additionalDetails: result.additionaldetails, + createdTime: parseInt(result.createdtime, 10), + lastModifiedTime: parseInt(result.lastmodifiedtime, 10), + })); } async function persistTrack( - campaignId: any, - type: any, - status: any, - details?: any, - additionalDetails?: any, - id?: any + campaignId: string, + type: string, + status: string, + details?: Record, + additionalDetails?: Record +): Promise { + if (!campaignId) { + logger.info('campaignId is missing, aborting persistTrack'); + return; + } + + logger.info(`Persisting track for campaignId: ${campaignId}, type: ${type}, status: ${status}`); + + if (type == processTrackTypes.error) { + await handleFailedStatus(campaignId, type, status, details, additionalDetails); + } else { + await handleNonFailedStatus(campaignId, type, status, details, additionalDetails); + } +} + +// Handles the case when the status is 'failed' +async function handleFailedStatus( + campaignId: string, + type: string, + status: string, + details?: Record, + additionalDetails?: Record +): Promise { + const processDetailsArray = await getProcessDetails(campaignId); + const inProgressProcessDetails = processDetailsArray.filter((processDetail: any) => processDetail.status === processTrackStatuses.inprogress); + const toBeCompletedProcessDetails = processDetailsArray.filter((processDetail: any) => processDetail.status === processTrackStatuses.toBeCompleted); + const failedStatusArray = processDetailsArray.filter((processDetail: any) => processDetail.status === processTrackStatuses.failed); + if (failedStatusArray.length > 0) { + logger.info('Process already failed, nothing to persist'); + await updateToBeCompletedProcess(toBeCompletedProcessDetails, status, details, additionalDetails, config?.kafka?.KAFKA_UPDATE_PROCESS_TRACK_TOPIC); + return; + } + if (inProgressProcessDetails.length > 0) { + logger.info('Generic fail occured so changing the lastest inprogress status to failed'); + await updateAndProduceMessage(inProgressProcessDetails[inProgressProcessDetails.length - 1], status, details, additionalDetails, config?.kafka?.KAFKA_UPDATE_PROCESS_TRACK_TOPIC); + } else { + logger.info('No inprogress process found, creating a new processDetail to failed'); + await createAndProduceNewProcessDetail(campaignId, type, status, details, additionalDetails, config?.kafka?.KAFKA_SAVE_PROCESS_TRACK_TOPIC); + } + await updateToBeCompletedProcess(toBeCompletedProcessDetails, status, details, additionalDetails, config?.kafka?.KAFKA_UPDATE_PROCESS_TRACK_TOPIC); +} + +async function updateToBeCompletedProcess( + processDetailsArray: any[], + status: string, + details?: Record, + additionalDetails?: Record, + kafkaTopic?: string) { + details = details || {}, + details.error = "HCM_PROCESS_TRACK_PREVIOUS_PROCESS_FAILED" + if (processDetailsArray.length > 0) { + for (let i = 0; i < processDetailsArray.length; i++) { + await updateAndProduceMessage(processDetailsArray[i], status, details, additionalDetails, kafkaTopic); + } + } +} + +// Handles the case when the status is not 'failed' +async function handleNonFailedStatus( + campaignId: string, + type: string, + status: string, + details?: Record, + additionalDetails?: Record ): Promise { - let processDetails: any; + const processDetailsArray = await getProcessDetails(campaignId, type); - if (id) { - processDetails = await getProcessDetails(id); - details = { ...processDetails?.details, ...details }; - additionalDetails = { ...processDetails?.additionalDetails, ...additionalDetails }; + if (processDetailsArray.length === 0) { + logger.info('No process details found, nothing to persist'); + return; } - const processId = id || uuidv4(); - const createdTime = Date.now(); - const lastModifiedTime = Date.now(); + updateAndProduceMessage(processDetailsArray[0], status, details, additionalDetails, config?.kafka?.KAFKA_UPDATE_PROCESS_TRACK_TOPIC); +} + +// Updates an existing process detail and produces the message +async function updateAndProduceMessage( + processDetails: any, + status: string, + details?: Record, + additionalDetails?: Record, + kafkaTopic?: string +) { + updateProcessDetails(processDetails, processDetails.type, status, details, additionalDetails); + const produceMessage: any = { processDetails }; + await produceModifiedMessages(produceMessage, kafkaTopic); +} - processDetails = { - id: processId, +// Creates a new process detail and produces the message +async function createAndProduceNewProcessDetail( + campaignId: string, + type: string, + status: string, + details?: Record, + additionalDetails?: Record, + kafkaTopic?: string +) { + const currentTime = Date.now(); + const processDetail: any = { + id: uuidv4(), campaignId, type, status, - details, - additionalDetails, - createdTime, - lastModifiedTime + createdTime: currentTime, + lastModifiedTime: currentTime, + details: details || {}, + additionalDetails: additionalDetails || {}, }; - const produceObject: any = { - processDetails - }; + updateProcessDetails(processDetail, type, status, details, additionalDetails); + const produceMessage: any = { processDetails: [processDetail] }; + await produceModifiedMessages(produceMessage, kafkaTopic); +} + + +function updateProcessDetails( + processDetails: any, + type: string, + status: string, + details?: any, + additionalDetails?: any +) { + processDetails.lastModifiedTime = Date.now(); + processDetails.details = { ...processDetails.details, ...details }; + processDetails.additionalDetails = { ...processDetails.additionalDetails, ...additionalDetails }; + processDetails.type = type; + processDetails.status = status; +} + +async function createProcessTracks(campaignId: string) { + logger.info(`Creating process tracks for campaignId: ${campaignId}`); + + const processDetailsArray: any[] = []; + + Object.keys(processTrackTypes).forEach(key => { + const type: any = (processTrackTypes as any)[key]; + const currentTime = Date.now(); + if (type != processTrackTypes.error) { + const processDetail: any = { + id: uuidv4(), + campaignId, + type, + status: processTrackStatuses.toBeCompleted, + createdTime: currentTime, + lastModifiedTime: currentTime, + details: {}, + additionalDetails: {} + }; + processDetailsArray.push(processDetail); + } + }); + + logger.info(`Created ${processDetailsArray.length} process tracks`); + const produceMessage: any = { processDetails: processDetailsArray } + await produceModifiedMessages(produceMessage, config?.kafka?.KAFKA_SAVE_PROCESS_TRACK_TOPIC); +} + +function getOrderedDetailsArray(toBeCompletedArray: any[]) { + const order = Object.values(processTrackTypes); + return toBeCompletedArray.sort((a, b) => order.indexOf(a.type) - order.indexOf(b.type)); +} - const topic = id ? config?.kafka?.KAFKA_UPDATE_PROCESS_TRACK_TOPIC : config?.kafka?.KAFKA_SAVE_PROCESS_TRACK_TOPIC; - produceModifiedMessages(produceObject, topic); +export function modifyProcessDetails(processDetailsArray: any[]) { + const toBeCompletedArray = processDetailsArray.filter((item: any) => item.status === processTrackStatuses.toBeCompleted); + const orderedToBeCompletedArray = getOrderedDetailsArray(toBeCompletedArray); + const otherArray = processDetailsArray.filter((item: any) => item.status !== processTrackStatuses.toBeCompleted); + return otherArray.concat(orderedToBeCompletedArray); } -export { persistTrack }; \ No newline at end of file +export { persistTrack, getProcessDetails, createProcessTracks }; diff --git a/health-services/project-factory/src/server/utils/targetUtils.ts b/health-services/project-factory/src/server/utils/targetUtils.ts new file mode 100644 index 00000000000..74a91782dba --- /dev/null +++ b/health-services/project-factory/src/server/utils/targetUtils.ts @@ -0,0 +1,137 @@ +import config from '../config' +import { checkIfSourceIsMicroplan, getConfigurableColumnHeadersBasedOnCampaignType, getLocalizedName } from './campaignUtils'; +import _ from 'lodash'; +import { replicateRequest } from './genericUtils'; +import { callGenerate } from './generateUtils'; + + +async function generateDynamicTargetHeaders(request: any, campaignObject: any, localizationMap?: any) { + const isSourceMicroplan = checkIfSourceIsMicroplan(campaignObject); + let headerColumnsAfterHierarchy: any; + if (isDynamicTargetTemplateForProjectType(campaignObject?.projectType) && campaignObject.deliveryRules && campaignObject.deliveryRules.length > 0 && !isSourceMicroplan) { + const modifiedUniqueDeliveryConditions = modifyDeliveryConditions(campaignObject.deliveryRules); + headerColumnsAfterHierarchy = generateTargetColumnsBasedOnDeliveryConditions(modifiedUniqueDeliveryConditions, localizationMap); + + } + else { + headerColumnsAfterHierarchy = await getConfigurableColumnHeadersBasedOnCampaignType(request); + headerColumnsAfterHierarchy.shift(); + } + return headerColumnsAfterHierarchy; +} + + +function modifyDeliveryConditions(dataa: any[]): any { + let resultSet = new Set(); + dataa.forEach((delivery) => { + const conditions = delivery.conditions; + let newArray: any[] = []; + + conditions.forEach((item: any) => { + const existingIndex = newArray.findIndex( + (element) => element.attribute.code === item.attribute + ); + + if (existingIndex !== -1) { + const existingItem = newArray[existingIndex]; + // Combine conditions if necessary + if (existingItem.operator.code !== item.operator.code) { + newArray[existingIndex] = { + attribute: existingItem.attribute, + operator: { code: "IN_BETWEEN" }, + toValue: + existingItem.value && item.value ? Math.max(existingItem.value, item.value) : null, + fromValue: + existingItem.value && item.value ? Math.min(existingItem.value, item.value) : null + }; + } + } else { + // If attribute does not exist in newArray, add the item + newArray.push({ + attribute: { code: item.attribute }, + operator: { code: item.operator }, + value: item.value + }); + } + }); + newArray.map((element: any) => { + const stringifiedElement = JSON.stringify(element); // Convert object to string + resultSet.add(stringifiedElement); + }) + }); + return resultSet; +} + + +function generateTargetColumnsBasedOnDeliveryConditions(uniqueDeliveryConditions: any, localizationMap?: any) { + const targetColumnsBasedOnDeliveryConditions: string[] = []; + uniqueDeliveryConditions.forEach((str: any, index: number) => { + const uniqueDeliveryConditionsObject = JSON.parse(str); // Parse JSON string into object + const targetColumnString = createTargetString(uniqueDeliveryConditionsObject, localizationMap); + targetColumnsBasedOnDeliveryConditions.push(targetColumnString); + }); + if (targetColumnsBasedOnDeliveryConditions.length > 18) { + targetColumnsBasedOnDeliveryConditions.splice(18); + targetColumnsBasedOnDeliveryConditions.push(getLocalizedName("OTHER_TARGETS", localizationMap)); + } + return targetColumnsBasedOnDeliveryConditions; +} + +function createTargetString(uniqueDeliveryConditionsObject: any, localizationMap?: any) { + let targetString: any; + const prefix = getLocalizedName("HCM_ADMIN_CONSOLE_TARGET_SMC", localizationMap); + const attributeCode = getLocalizedName(uniqueDeliveryConditionsObject.attribute.code.toUpperCase(), localizationMap); + const operatorMessage = getLocalizedName(uniqueDeliveryConditionsObject.operator.code, localizationMap); + const localizedFROM = getLocalizedName("FROM", localizationMap); + const localizedTO = getLocalizedName("TO", localizationMap); + if (uniqueDeliveryConditionsObject.operator.code === 'IN_BETWEEN') { + targetString = `${prefix} ${attributeCode} ${localizedFROM} ${uniqueDeliveryConditionsObject.fromValue} ${localizedTO} ${uniqueDeliveryConditionsObject.toValue}`; + } else { + targetString = `${prefix} ${attributeCode} ${operatorMessage} ${uniqueDeliveryConditionsObject.value}`; + } + return targetString; +} + +async function updateTargetColumnsIfDeliveryConditionsDifferForSMC(request: any) { + const existingCampaignDetails = request?.body?.ExistingCampaignDetails; + if (existingCampaignDetails) { + if (isDynamicTargetTemplateForProjectType(request?.body?.CampaignDetails?.projectType) && config?.isCallGenerateWhenDeliveryConditionsDiffer && !_.isEqual(existingCampaignDetails?.deliveryRules, request?.body?.CampaignDetails?.deliveryRules)) { + const newRequestBody = { + RequestInfo: request?.body?.RequestInfo, + Filters: { + boundaries: request?.body?.CampaignDetails?.boundaries + } + }; + + const { query } = request; + const params = { + tenantId: request?.body?.CampaignDetails?.tenantId, + forceUpdate: 'true', + hierarchyType: request?.body?.CampaignDetails?.hierarchyType, + campaignId: request?.body?.CampaignDetails?.id + }; + + const newParamsBoundary = { ...query, ...params, type: "boundary" }; + const newRequestBoundary = replicateRequest(request, newRequestBody, newParamsBoundary); + await callGenerate(newRequestBoundary, "boundary", true); + } + } +} + +function isDynamicTargetTemplateForProjectType(projectType: string) { + const projectTypesFromConfig = config?.enableDynamicTemplateFor; + const projectTypesArray = projectTypesFromConfig ? projectTypesFromConfig.split(',') : []; + return projectTypesArray.includes(projectType); +} + + + + + +export { + modifyDeliveryConditions, + generateTargetColumnsBasedOnDeliveryConditions, + generateDynamicTargetHeaders, + updateTargetColumnsIfDeliveryConditionsDifferForSMC, + isDynamicTargetTemplateForProjectType +}; diff --git a/health-services/project-factory/src/server/validators/campaignValidators.ts b/health-services/project-factory/src/server/validators/campaignValidators.ts index cddd2c9958a..8c50b9bcd46 100644 --- a/health-services/project-factory/src/server/validators/campaignValidators.ts +++ b/health-services/project-factory/src/server/validators/campaignValidators.ts @@ -2,7 +2,7 @@ import createAndSearch from "../config/createAndSearch"; import config from "../config"; import { getFormattedStringForDebug, logger } from "../utils/logger"; import { defaultheader, httpRequest } from "../utils/request"; -import { getHeadersOfBoundarySheet, getHierarchy, handleResouceDetailsError } from "../api/campaignApis"; +import { getCampaignSearchResponse, getHeadersOfBoundarySheet, getHierarchy, handleResouceDetailsError } from "../api/campaignApis"; import { campaignDetailsSchema } from "../config/models/campaignDetails"; import Ajv from "ajv"; import { getDifferentDistrictTabs, getLocalizedHeaders, getLocalizedMessagesHandler, getMdmsDataBasedOnCampaignType, replicateRequest, throwError } from "../utils/genericUtils"; @@ -20,7 +20,7 @@ import { searchProjectTypeCampaignService } from "../service/campaignManageServi import { campaignStatuses, resourceDataStatuses } from "../config/constants"; import { getBoundaryColumnName, getBoundaryTabName } from "../utils/boundaryUtils"; import addAjvErrors from "ajv-errors"; - +import { generateTargetColumnsBasedOnDeliveryConditions, isDynamicTargetTemplateForProjectType, modifyDeliveryConditions } from "../utils/targetUtils"; @@ -83,75 +83,75 @@ async function fetchBoundariesFromCampaignDetails(request: any) { return responseBoundaries; } -// Compares unique boundaries with response boundaries and throws error for missing codes. -function compareBoundariesWithUnique(uniqueBoundaries: any[], responseBoundaries: any[], request: any) { - // Extracts boundary codes from response boundaries - const responseBoundaryCodes = responseBoundaries.map(boundary => boundary.code.trim()); - - // Finds missing codes from unique boundaries - const missingCodes = uniqueBoundaries.filter(code => !responseBoundaryCodes.includes(code)); - - // Throws error if missing codes exist - if (missingCodes.length > 0) { - throwError( - "COMMON", - 400, - "VALIDATION_ERROR", - `Boundary codes ${missingCodes.join(', ')} do not exist in hierarchyType ${request?.body?.ResourceDetails?.hierarchyType}` - ); - } -} +// // Compares unique boundaries with response boundaries and throws error for missing codes. +// function compareBoundariesWithUnique(uniqueBoundaries: any[], responseBoundaries: any[], request: any) { +// // Extracts boundary codes from response boundaries +// const responseBoundaryCodes = responseBoundaries.map(boundary => boundary.code.trim()); + +// // Finds missing codes from unique boundaries +// const missingCodes = uniqueBoundaries.filter(code => !responseBoundaryCodes.includes(code)); + +// // Throws error if missing codes exist +// if (missingCodes.length > 0) { +// throwError( +// "COMMON", +// 400, +// "VALIDATION_ERROR", +// `Boundary codes ${missingCodes.join(', ')} do not exist in hierarchyType ${request?.body?.ResourceDetails?.hierarchyType}` +// ); +// } +// } // Validates unique boundaries against the response boundaries. -async function validateUniqueBoundaries(uniqueBoundaries: any[], request: any) { - // Fetches response boundaries in chunks - const responseBoundaries = await fetchBoundariesInChunks(request); +// async function validateUniqueBoundaries(uniqueBoundaries: any[], request: any) { +// // Fetches response boundaries in chunks +// const responseBoundaries = await fetchBoundariesInChunks(request); - // Compares unique boundaries with response boundaries - compareBoundariesWithUnique(uniqueBoundaries, responseBoundaries, request); -} +// // Compares unique boundaries with response boundaries +// compareBoundariesWithUnique(uniqueBoundaries, responseBoundaries, request); +// } -async function validateBoundaryData(data: any[], request: any, boundaryColumn: any, localizationMap: any) { - const boundarySet = new Set(); // Create a Set to store unique boundaries - logger.info("validating for the boundary data") - const activeColumnName = createAndSearch?.[request?.body?.ResourceDetails?.type]?.activeColumnName ? getLocalizedName(createAndSearch?.[request?.body?.ResourceDetails?.type]?.activeColumnName, localizationMap) : null; - const uniqueIdentifierColumnName = createAndSearch?.[request?.body?.ResourceDetails?.type]?.uniqueIdentifierColumnName ? getLocalizedName(createAndSearch?.[request?.body?.ResourceDetails?.type]?.uniqueIdentifierColumnName, localizationMap) : null; - if (activeColumnName && uniqueIdentifierColumnName) { - data = data.filter((item: any) => item[activeColumnName] === "Active" || !item[uniqueIdentifierColumnName]); - data.forEach((item: any) => item[activeColumnName] = "Active"); - } - if (data.length == 0) { - if (request?.body?.ResourceDetails?.type == "facility") { - throwError("COMMON", 400, "VALIDATION_ERROR", "All facilities are set to Inactive for this campaign. Please set at least one facility to Active for this campaign or add a new facility for this campaign"); - } - else { - throwError("COMMON", 400, "VALIDATION_ERROR", "Data is empty for this campaign, add atleast one data row"); - } - } - data.forEach((element) => { - const boundaries = element[boundaryColumn]; - if (!boundaries) { - throwError("COMMON", 400, "VALIDATION_ERROR", `Boundary Code is required for element in rowNumber ${element['!row#number!']}`); - } +// async function validateBoundaryData(data: any[], request: any, boundaryColumn: any, localizationMap: any) { +// const boundarySet = new Set(); // Create a Set to store unique boundaries +// logger.info("validating for the boundary data") +// const activeColumnName = createAndSearch?.[request?.body?.ResourceDetails?.type]?.activeColumnName ? getLocalizedName(createAndSearch?.[request?.body?.ResourceDetails?.type]?.activeColumnName, localizationMap) : null; +// const uniqueIdentifierColumnName = createAndSearch?.[request?.body?.ResourceDetails?.type]?.uniqueIdentifierColumnName ? getLocalizedName(createAndSearch?.[request?.body?.ResourceDetails?.type]?.uniqueIdentifierColumnName, localizationMap) : null; +// if (activeColumnName && uniqueIdentifierColumnName) { +// data = data.filter((item: any) => item[activeColumnName] === "Active" || !item[uniqueIdentifierColumnName]); +// data.forEach((item: any) => item[activeColumnName] = "Active"); +// } +// if (data.length == 0) { +// if (request?.body?.ResourceDetails?.type == "facility") { +// throwError("COMMON", 400, "VALIDATION_ERROR", "All facilities are set to Inactive for this campaign. Please set at least one facility to Active for this campaign or add a new facility for this campaign"); +// } +// else { +// throwError("COMMON", 400, "VALIDATION_ERROR", "Data is empty for this campaign, add atleast one data row"); +// } +// } +// data.forEach((element) => { +// const boundaries = element[boundaryColumn]; +// if (!boundaries) { +// throwError("COMMON", 400, "VALIDATION_ERROR", `Boundary Code is required for element in rowNumber ${element['!row#number!']}`); +// } - const boundaryList = boundaries.split(",").map((boundary: any) => boundary.trim()); - if (boundaryList.length === 0) { - throwError("COMMON", 400, "VALIDATION_ERROR", `At least 1 boundary is required for element in rowNumber ${element['!row#number!']}`); - } +// const boundaryList = boundaries.split(",").map((boundary: any) => boundary.trim()); +// if (boundaryList.length === 0) { +// throwError("COMMON", 400, "VALIDATION_ERROR", `At least 1 boundary is required for element in rowNumber ${element['!row#number!']}`); +// } - for (const boundary of boundaryList) { - if (!boundary) { - throwError("COMMON", 400, "VALIDATION_ERROR", `Boundary format is invalid in rowNumber ${element['!row#number!']}. Put it with one comma between boundary codes`); - } - boundarySet.add(boundary); // Add boundary to the set - } - }); - const uniqueBoundaries = Array.from(boundarySet); - await validateUniqueBoundaries(uniqueBoundaries, request); -} +// for (const boundary of boundaryList) { +// if (!boundary) { +// throwError("COMMON", 400, "VALIDATION_ERROR", `Boundary format is invalid in rowNumber ${element['!row#number!']}. Put it with one comma between boundary codes`); +// } +// boundarySet.add(boundary); // Add boundary to the set +// } +// }); +// const uniqueBoundaries = Array.from(boundarySet); +// await validateUniqueBoundaries(uniqueBoundaries, request); +// } // async function validateTargetBoundaryData(data: any[], request: any, boundaryColumn: any, errors: any[], localizationMap?: any) { // // const responseBoundaries = await fetchBoundariesInChunks(request); @@ -217,10 +217,21 @@ async function validateBoundaryData(data: any[], request: any, boundaryColumn: a async function validateTargets(request: any, data: any[], errors: any[], localizationMap?: any) { - const mdmsResponse = await getMdmsDataBasedOnCampaignType(request); - const columnsNotToBeFreezed = mdmsResponse?.columnsNotToBeFreezed; - const requiredColumns = mdmsResponse?.required; - const columnsToValidate = columnsNotToBeFreezed.filter((element: any) => requiredColumns.includes(element)); + let columnsToValidate: any; + const responseFromCampaignSearch = await getCampaignSearchResponse(request); + const campaignObject = responseFromCampaignSearch?.CampaignDetails?.[0]; + if (isDynamicTargetTemplateForProjectType(campaignObject?.projectType) && campaignObject.deliveryRules && campaignObject.deliveryRules.length > 0) { + + const modifiedUniqueDeliveryConditions = modifyDeliveryConditions(campaignObject.deliveryRules); + columnsToValidate = generateTargetColumnsBasedOnDeliveryConditions(modifiedUniqueDeliveryConditions, localizationMap); + + } + else { + const mdmsResponse = await getMdmsDataBasedOnCampaignType(request); + const columnsNotToBeFreezed = mdmsResponse?.columnsNotToBeFreezed; + const requiredColumns = mdmsResponse?.required; + columnsToValidate = columnsNotToBeFreezed.filter((element: any) => requiredColumns.includes(element)); + } const localizedTargetColumnNames = getLocalizedHeaders(columnsToValidate, localizationMap); for (const key in data) { if (key !== getLocalizedName(getBoundaryTabName(), localizationMap) && key !== getLocalizedName(config?.values?.readMeTab, localizationMap)) { @@ -411,16 +422,12 @@ async function validateViaSchema(data: any, schema: any, request: any, localizat async function validateSheetData(data: any, request: any, schema: any, boundaryValidation: any, localizationMap?: { [key: string]: string }) { await validateViaSchema(data, schema, request, localizationMap); - if (boundaryValidation) { - const localisedBoundaryCode = getLocalizedName(boundaryValidation?.column, localizationMap) - await validateBoundaryData(data, request, localisedBoundaryCode, localizationMap); - } } -async function validateTargetSheetData(data: any, request: any, boundaryValidation: any, localizationMap?: any) { +async function validateTargetSheetData(data: any, request: any, boundaryValidation: any, differentTabsBasedOnLevel: any, localizationMap?: any) { try { const errors: any[] = []; - await validateHeadersOfTargetSheet(request, localizationMap); + await validateHeadersOfTargetSheet(request, differentTabsBasedOnLevel, localizationMap); if (boundaryValidation) { // const localizedBoundaryValidationColumn = getLocalizedName(boundaryValidation?.column, localizationMap) // await validateTargetBoundaryData(data, request, localizedBoundaryValidationColumn, errors, localizationMap); @@ -440,11 +447,11 @@ async function validateTargetSheetData(data: any, request: any, boundaryValidati } -async function validateHeadersOfTargetSheet(request: any, localizationMap?: any) { +async function validateHeadersOfTargetSheet(request: any, differentTabsBasedOnLevel: any, localizationMap?: any) { const fileUrl = await validateFile(request); const targetWorkbook: any = await getTargetWorkbook(fileUrl); const hierarchy = await getHierarchy(request, request?.body?.ResourceDetails?.tenantId, request?.body?.ResourceDetails?.hierarchyType); - const finalValidHeadersForTargetSheetAsPerCampaignType = await getFinalValidHeadersForTargetSheetAsPerCampaignType(request, hierarchy, localizationMap); + const finalValidHeadersForTargetSheetAsPerCampaignType = await getFinalValidHeadersForTargetSheetAsPerCampaignType(request, hierarchy, differentTabsBasedOnLevel, localizationMap); logger.info("finalValidHeadersForTargetSheetAsPerCampaignType :" + JSON.stringify(finalValidHeadersForTargetSheetAsPerCampaignType)); logger.info("validating headers of target sheet started") validateHeadersOfTabsWithTargetInTargetSheet(targetWorkbook, finalValidHeadersForTargetSheetAsPerCampaignType); @@ -712,7 +719,7 @@ async function validateBoundariesForTabs(CampaignDetails: any, resource: any, re const resourceBoundaryCodesArray: any[] = []; var activeColumnName: any = null; if (createAndSearch?.[resource.type]?.activeColumn && createAndSearch?.[resource.type]?.activeColumnName) { - activeColumnName = getLocalizedName(createAndSearch?.[resource.type]?.activeColumn, localizationMap); + activeColumnName = getLocalizedName(createAndSearch?.[resource.type]?.activeColumnName, localizationMap); } datas.forEach((data: any) => { const codes = data?.[boundaryColumn]?.split(',').map((code: string) => code.trim()) || []; @@ -730,7 +737,7 @@ async function validateBoundariesForTabs(CampaignDetails: any, resource: any, re var missingBoundaries = rowData.boundaryCodes.filter((code: any) => !boundaryCodesArray.includes(code)); if (missingBoundaries.length > 0) { const errorString = `The following boundary codes are not present in selected boundaries : ${missingBoundaries.join(', ')}` - errors.push({ status: "BOUNDARYMISSING", rowNumber: rowData.rowNumber, errorDetails: errorString }) + errors.push({ status: "BOUNDARYERROR", rowNumber: rowData.rowNumber, errorDetails: errorString }) } } if (errors?.length > 0) { @@ -1159,9 +1166,9 @@ async function validateDownloadRequest(request: any) { await validateHierarchyType(request, hierarchyType, tenantId); } -async function immediateValidationForTargetSheet(dataFromSheet: any, localizationMap: any) { +async function immediateValidationForTargetSheet(request: any, dataFromSheet: any, differentTabsBasedOnLevel: any, localizationMap: any) { logger.info("validating all district tabs present started") - validateAllDistrictTabsPresentOrNot(dataFromSheet, localizationMap); + validateAllDistrictTabsPresentOrNot(request, dataFromSheet, differentTabsBasedOnLevel, localizationMap); logger.info("validation of all district tabs present completed") for (const key in dataFromSheet) { if (key !== getLocalizedName(getBoundaryTabName(), localizationMap) && key !== getLocalizedName(config?.values?.readMeTab, localizationMap)) { @@ -1170,7 +1177,7 @@ async function immediateValidationForTargetSheet(dataFromSheet: any, localizatio if (dataArray.length === 0) { throwError("COMMON", 400, "VALIDATION_ERROR", `The Target Sheet ${key} you have uploaded is empty`) } - const root = getLocalizedName(config?.boundary?.generateDifferentTabsOnBasisOf, localizationMap); + const root = getLocalizedName(differentTabsBasedOnLevel, localizationMap); for (const boundaryRow of dataArray) { for (const columns in boundaryRow) { if (columns.startsWith('__EMPTY')) { @@ -1187,16 +1194,15 @@ async function immediateValidationForTargetSheet(dataFromSheet: any, localizatio } -function validateAllDistrictTabsPresentOrNot(dataFromSheet: any, localizationMap?: any) { +function validateAllDistrictTabsPresentOrNot(request: any, dataFromSheet: any, differentTabsBasedOnLevel: any, localizationMap?: any) { let tabsIndex = 2; logger.info("target sheet getting validated for different districts"); - const differentTabsBasedOnLevel = getLocalizedName(config?.boundary?.generateDifferentTabsOnBasisOf, localizationMap); const tabsOfDistrict = getDifferentDistrictTabs(dataFromSheet[getLocalizedName(config?.boundary?.boundaryTab, localizationMap)], differentTabsBasedOnLevel); logger.info("found " + tabsOfDistrict?.length + " districts"); logger.debug("actual districts in boundary data sheet : " + getFormattedStringForDebug(tabsOfDistrict)); const tabsFromTargetSheet = Object.keys(dataFromSheet); logger.info("districts present in user filled sheet : " + (tabsFromTargetSheet?.length - tabsIndex)); - logger.debug("districts present in user filled sheet : " + getFormattedStringForDebug(tabsFromTargetSheet)); + logger.debug("districts present in user filled sheet (exclude first two tabs): " + getFormattedStringForDebug(tabsFromTargetSheet)); if (tabsFromTargetSheet.length - tabsIndex !== tabsOfDistrict.length) { throwError("COMMON", 400, "VALIDATION_ERROR", `${differentTabsBasedOnLevel} tabs uplaoded by user is either less or more than the ${differentTabsBasedOnLevel} in the boundary system `) @@ -1207,11 +1213,16 @@ function validateAllDistrictTabsPresentOrNot(dataFromSheet: any, localizationMap throwError("COMMON", 400, "VALIDATION_ERROR", `${differentTabsBasedOnLevel} tab ${tab} not present in the Target Sheet Uploaded`); } } - } } +function validateSearchProcessTracksRequest(request: any) { + if (!request?.query?.campaignId) { + throwError("COMMON", 400, "VALIDATION_ERROR", "CampaignId is required in params"); + } +} + export { fetchBoundariesInChunks, @@ -1227,5 +1238,6 @@ export { validateDownloadRequest, validateTargetSheetData, immediateValidationForTargetSheet, - validateBoundaryOfResouces + validateBoundaryOfResouces, + validateSearchProcessTracksRequest } diff --git a/health-services/project-factory/src/server/validators/genericValidator.ts b/health-services/project-factory/src/server/validators/genericValidator.ts index 426f1de67e7..245579d6134 100644 --- a/health-services/project-factory/src/server/validators/genericValidator.ts +++ b/health-services/project-factory/src/server/validators/genericValidator.ts @@ -7,6 +7,9 @@ import { httpRequest } from "../utils/request"; import { getBoundaryRelationshipData, throwError } from "../utils/genericUtils"; import { validateFilters } from "./campaignValidators"; import { generateRequestSchema } from "../config/models/generateRequestSchema"; +import { persistTrack } from "../utils/processTrackUtils"; +import { processTrackTypes, processTrackStatuses, campaignStatuses } from "../config/constants"; +import { validateMappingId } from "../utils/campaignMappingUtils"; // Function to validate data against a JSON schema function validateDataWithSchema(data: any, schema: any): { isValid: boolean; error: any | null | undefined } { @@ -30,6 +33,11 @@ function validateCampaignBodyViaSchema(schema: any, objectData: any) { const dataPath = error.dataPath.replace(/\//g, '.').replace(/^\./, ''); formattedErrorMessage = `${dataPath} ${error.message}`; } + else if (error?.instancePath) { + // Replace slash with dot and remove leading dot if present + const dataPath = error.instancePath.replace(/\//g, '.').replace(/^\./, ''); + formattedErrorMessage = `${dataPath} ${error.message}`; + } else { formattedErrorMessage = `${error.message}` } @@ -61,6 +69,11 @@ function validateBodyViaSchema(schema: any, objectData: any) { const dataPath = error.dataPath.replace(/\//g, '.').replace(/^\./, ''); formattedErrorMessage = `${dataPath} ${error.message}`; } + else if (error?.instancePath) { + // Replace slash with dot and remove leading dot if present + const dataPath = error.instancePath.replace(/\//g, '.').replace(/^\./, ''); + formattedErrorMessage = `${dataPath} ${error.message}`; + } else { formattedErrorMessage = `${error.message}` } @@ -115,15 +128,40 @@ async function validateCampaign(requestBody: any) { // Function to validate the entire campaign request async function validateCampaignRequest(requestBody: any) { - if (requestBody?.Campaign) { - if (!requestBody?.Campaign?.tenantId) { - throwError("COMMON", 400, "VALIDATION_ERROR", "Enter TenantId"); + await persistTrack(requestBody?.Campaign?.id, processTrackTypes.validateMappingResource, processTrackStatuses.inprogress); + try { + if (requestBody?.Campaign) { + if (!requestBody?.Campaign?.tenantId) { + throwError("COMMON", 400, "VALIDATION_ERROR", "Enter TenantId"); + } + await validateCampaign(requestBody); + const id = requestBody?.Campaign?.id; + const campaignDetails = await validateMappingId(requestBody, id); + if (campaignDetails?.status == campaignStatuses.inprogress) { + logger.error("Campaign Already In Progress and Mapped"); + throwError("CAMPAIGN", 400, "CAMPAIGN_ALREADY_MAPPED"); + } } - await validateCampaign(requestBody); - } - else { - throwError("COMMON", 400, "VALIDATION_ERROR", "Campaign is required"); + else { + throwError("COMMON", 400, "VALIDATION_ERROR", "Campaign object is missing"); + } + if (requestBody?.CampaignDetails) { + if (!requestBody?.CampaignDetails?.tenantId) { + throwError("COMMON", 400, "VALIDATION_ERROR", "Enter TenantId"); + } + if (!requestBody?.CampaignDetails?.id) { + throwError("COMMON", 400, "VALIDATION_ERROR", "Enter id in CampaignDetails"); + } + } + else { + throwError("COMMON", 400, "VALIDATION_ERROR", "CampaignDetails is missing"); + } + } catch (error: any) { + console.log(error) + await persistTrack(requestBody?.Campaign?.id, processTrackTypes.validateMappingResource, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + throw new Error(error) } + await persistTrack(requestBody?.Campaign?.id, processTrackTypes.validateMappingResource, processTrackStatuses.completed); } // Function to validate and update project response and its ID @@ -220,4 +258,4 @@ export { validateGenerateRequest, validateHierarchyType, validateCampaignBodyViaSchema -}; \ No newline at end of file +}; diff --git a/health-services/project-factory/yarn.lock b/health-services/project-factory/yarn.lock index 0584dc93095..4e9c73bf0f7 100644 --- a/health-services/project-factory/yarn.lock +++ b/health-services/project-factory/yarn.lock @@ -2,11 +2,6 @@ # yarn lockfile v1 -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - "@ampproject/remapping@^2.2.0": version "2.3.0" resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz" @@ -15,14 +10,7 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@babel/code-frame@^7.0.0": - version "7.12.11" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/code-frame@^7.12.13", "@babel/code-frame@^7.23.5": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2": version "7.24.2" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz" integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== @@ -30,179 +18,148 @@ "@babel/highlight" "^7.24.2" picocolors "^1.0.0" -"@babel/code-frame@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" - integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== - dependencies: - "@babel/highlight" "^7.24.7" - picocolors "^1.0.0" +"@babel/compat-data@^7.23.5": + version "7.24.4" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz" + integrity sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== -"@babel/compat-data@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" - integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== - -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" - integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.8.0": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz" + integrity sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helpers" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.24.5" + "@babel/helpers" "^7.24.5" + "@babel/parser" "^7.24.5" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.5" + "@babel/types" "^7.24.5" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.24.7", "@babel/generator@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" - integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== +"@babel/generator@^7.24.5", "@babel/generator@^7.7.2": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz" + integrity sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA== dependencies: - "@babel/types" "^7.24.7" + "@babel/types" "^7.24.5" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" - integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== +"@babel/helper-compilation-targets@^7.23.6": + version "7.23.6" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz" + integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" + "@babel/compat-data" "^7.23.5" + "@babel/helper-validator-option" "^7.23.5" browserslist "^4.22.2" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-environment-visitor@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" - integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== - dependencies: - "@babel/types" "^7.24.7" +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-function-name@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" - integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" -"@babel/helper-hoist-variables@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" - integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== dependencies: - "@babel/types" "^7.24.7" + "@babel/types" "^7.22.5" -"@babel/helper-module-imports@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" - integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== +"@babel/helper-module-imports@^7.24.3": + version "7.24.3" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz" + integrity sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/types" "^7.24.0" -"@babel/helper-module-transforms@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" - integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== +"@babel/helper-module-transforms@^7.24.5": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz" + integrity sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-module-imports" "^7.24.7" - "@babel/helper-simple-access" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/helper-validator-identifier" "^7.24.7" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.24.3" + "@babel/helper-simple-access" "^7.24.5" + "@babel/helper-split-export-declaration" "^7.24.5" + "@babel/helper-validator-identifier" "^7.24.5" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.0", "@babel/helper-plugin-utils@^7.8.0": - version "7.24.0" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz" - integrity sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w== + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz" + integrity sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ== -"@babel/helper-simple-access@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" - integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== +"@babel/helper-simple-access@^7.24.5": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz" + integrity sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ== dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/types" "^7.24.5" -"@babel/helper-split-export-declaration@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" - integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== +"@babel/helper-split-export-declaration@^7.24.5": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz" + integrity sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q== dependencies: - "@babel/types" "^7.24.7" + "@babel/types" "^7.24.5" -"@babel/helper-string-parser@^7.23.4": +"@babel/helper-string-parser@^7.24.1": version "7.24.1" resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz" integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== -"@babel/helper-string-parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" - integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== - -"@babel/helper-validator-identifier@^7.22.20": - version "7.22.20" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz" - integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== - -"@babel/helper-validator-identifier@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" - integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== +"@babel/helper-validator-identifier@^7.24.5": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz" + integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== -"@babel/helper-validator-option@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" - integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== +"@babel/helper-validator-option@^7.23.5": + version "7.23.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz" + integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== -"@babel/helpers@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" - integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== +"@babel/helpers@^7.24.5": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz" + integrity sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q== dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/highlight@^7.10.4", "@babel/highlight@^7.24.2": - version "7.24.2" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz" - integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== - dependencies: - "@babel/helper-validator-identifier" "^7.22.20" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.5" + "@babel/types" "^7.24.5" -"@babel/highlight@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" - integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== +"@babel/highlight@^7.24.2": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz" + integrity sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw== dependencies: - "@babel/helper-validator-identifier" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.5" chalk "^2.4.2" js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.0", "@babel/parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" - integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.0", "@babel/parser@^7.24.5": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz" + integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -302,16 +259,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.0" -"@babel/template@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" - integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/template@^7.3.3": +"@babel/template@^7.22.15", "@babel/template@^7.24.0", "@babel/template@^7.3.3": version "7.24.0" resolved "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz" integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== @@ -320,38 +268,29 @@ "@babel/parser" "^7.24.0" "@babel/types" "^7.24.0" -"@babel/traverse@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" - integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-hoist-variables" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" +"@babel/traverse@^7.24.5": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz" + integrity sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA== + dependencies: + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.24.5" + "@babel/parser" "^7.24.5" + "@babel/types" "^7.24.5" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.0", "@babel/types@^7.3.3": - version "7.24.0" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz" - integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5", "@babel/types@^7.3.3": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz" + integrity sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ== dependencies: - "@babel/helper-string-parser" "^7.23.4" - "@babel/helper-validator-identifier" "^7.22.20" - to-fast-properties "^2.0.0" - -"@babel/types@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" - integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== - dependencies: - "@babel/helper-string-parser" "^7.24.7" - "@babel/helper-validator-identifier" "^7.24.7" + "@babel/helper-string-parser" "^7.24.1" + "@babel/helper-validator-identifier" "^7.24.5" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -359,7 +298,7 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@colors/colors@1.6.0", "@colors/colors@^1.6.0": +"@colors/colors@^1.6.0", "@colors/colors@1.6.0": version "1.6.0" resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz" integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA== @@ -423,7 +362,7 @@ "@ioredis/commands@^1.1.1": version "1.2.0" - resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11" + resolved "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz" integrity sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg== "@isaacs/cliui@^8.0.2": @@ -670,14 +609,6 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" @@ -686,6 +617,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@npmcli/agent@^2.0.0": version "2.2.2" resolved "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz" @@ -698,9 +637,9 @@ socks-proxy-agent "^8.0.3" "@npmcli/fs@^3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz" - integrity sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w== + version "3.1.1" + resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz" + integrity sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg== dependencies: semver "^7.3.5" @@ -804,9 +743,9 @@ "@types/node" "*" "@types/express-serve-static-core@^4.17.33": - version "4.17.43" - resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz" - integrity sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg== + version "4.19.0" + resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz" + integrity sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ== dependencies: "@types/node" "*" "@types/qs" "*" @@ -897,6 +836,11 @@ expect "^29.0.0" pretty-format "^29.0.0" +"@types/lodash@^4.17.5": + version "4.17.5" + resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.5.tgz" + integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw== + "@types/mime@^1": version "1.3.5" resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz" @@ -931,9 +875,9 @@ pg-types "^4.0.1" "@types/qs@*": - version "6.9.14" - resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz" - integrity sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA== + version "6.9.15" + resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz" + integrity sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg== "@types/range-parser@*": version "1.2.7" @@ -1024,7 +968,7 @@ acorn-walk@^8.1.1: resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz" integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -acorn@^7.4.0: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^7.4.0: version "7.4.1" resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -1059,7 +1003,17 @@ ajv-errors@^3.0.0: resolved "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz" integrity sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ== -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.10.0: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^6.12.4: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1118,7 +1072,14 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -1230,7 +1191,12 @@ async@^2.6.2: dependencies: lodash "^4.17.14" -async@^3.2.3, async@^3.2.4: +async@^3.2.3: + version "3.2.5" + resolved "https://registry.npmjs.org/async/-/async-3.2.5.tgz" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + +async@^3.2.4: version "3.2.5" resolved "https://registry.npmjs.org/async/-/async-3.2.5.tgz" integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== @@ -1386,7 +1352,7 @@ bluebird@~3.4.1: resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz" integrity sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA== -body-parser@1.20.2, body-parser@^1.20.2: +body-parser@^1.20.2, body-parser@1.20.2: version "1.20.2" resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz" integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== @@ -1426,7 +1392,7 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -browserslist@^4.22.2: +browserslist@^4.22.2, "browserslist@>= 4.21.0": version "4.23.0" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz" integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== @@ -1517,9 +1483,9 @@ bytes@3.1.2: integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== cacache@^18.0.0: - version "18.0.2" - resolved "https://registry.npmjs.org/cacache/-/cacache-18.0.2.tgz" - integrity sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw== + version "18.0.3" + resolved "https://registry.npmjs.org/cacache/-/cacache-18.0.3.tgz" + integrity sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg== dependencies: "@npmcli/fs" "^3.1.0" fs-minipass "^3.0.0" @@ -1561,9 +1527,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001587: - version "1.0.30001605" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz" - integrity sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ== + version "1.0.30001620" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz" + integrity sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew== cfb@^1.1.3, cfb@~1.2.1: version "1.2.2" @@ -1633,9 +1599,9 @@ ci-info@^3.2.0: integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cjs-module-lexer@^1.0.0: - version "1.2.3" - resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz" - integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== + version "1.3.1" + resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz" + integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== clean-stack@^2.0.0: version "2.2.0" @@ -1658,7 +1624,7 @@ clone@2.x: cluster-key-slot@^1.1.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz#88ddaa46906e303b5de30d3153b7d9fe0a0c19ac" + resolved "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz" integrity sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA== co@^4.6.0: @@ -1681,7 +1647,14 @@ collect-v8-coverage@^1.0.0: resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz" integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== -color-convert@^1.9.0, color-convert@^1.9.3: +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^1.9.3: version "1.9.3" resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -1695,16 +1668,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + color-string@^1.6.0: version "1.9.1" resolved "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz" @@ -1853,14 +1826,21 @@ dayjs@^1.8.34: resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz" integrity sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg== -debug@2.6.9, debug@^2.1.3: +debug@^2.1.3, debug@2.6.9: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.3.1, debug@^4.3.4: +debug@^4.0.1: + version "4.3.5" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + +debug@^4.1.0: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1874,6 +1854,27 @@ debug@^4.1.1: dependencies: ms "2.1.2" +debug@^4.3.1: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +debug@^4.3.4: + version "4.3.5" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + +debug@4: + version "4.3.5" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz" @@ -1882,9 +1883,9 @@ decompress-response@^3.3.0: mimic-response "^1.0.0" dedent@^1.0.0: - version "1.5.1" - resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz" - integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== + version "1.5.3" + resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz" + integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== deep-extend@^0.6.0: version "0.6.0" @@ -1927,10 +1928,10 @@ denque@^1.3.0: denque@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" + resolved "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz" integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== -depd@2.0.0, depd@~2.0.0: +depd@~2.0.0, depd@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== @@ -1992,9 +1993,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.668: - version "1.4.806" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.806.tgz#2cb046631cbabceb26fc72be68d273fa183e36bc" - integrity sha512-nkoEX2QIB8kwCOtvtgwhXWy2IHVcOLQZu9Qo36uaGB835mdX/h8uLRlosL6QIhLVUnAiicXRW00PwaPZC74Nrg== + version "1.4.772" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.772.tgz" + integrity sha512-jFfEbxR/abTTJA3ci+2ok1NTuOBBtB4jH+UT6PUmRN+DY3WSD4FFRsgoVQ+QNIJ0T7wrXwzsWCI2WKC46b++2A== emittery@^0.13.1: version "0.13.1" @@ -2060,7 +2061,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -error@7.0.2, error@^7.0.0: +error@^7.0.0, error@7.0.2: version "7.0.2" resolved "https://registry.npmjs.org/error/-/error-7.0.2.tgz" integrity sha512-UtVv4l5MhijsYUxPJo4390gzfZvAnTHreNnDjnTZaKIiZ/SemXxAhBkYSKtWa5RtBXbLP8tMgn/n0RUa/H7jXw== @@ -2080,7 +2081,7 @@ es-errors@^1.3.0: resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -escalade@^3.1.1: +escalade@^3.1.1, escalade@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz" integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== @@ -2127,7 +2128,12 @@ eslint-utils@^2.1.0: dependencies: eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: +eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== @@ -2189,16 +2195,21 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -esprima@1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz" - integrity sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A== +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esprima@^4.0.0, esprima@^4.0.1: +esprima@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== +esprima@1.2.2: + version "1.2.2" + resolved "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz" + integrity sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A== + esquery@^1.2.0: version "1.5.0" resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" @@ -2218,7 +2229,12 @@ estraverse@^4.1.1, estraverse@^4.2.0: resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.1.0, estraverse@^5.2.0: +estraverse@^5.1.0: + version "5.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estraverse@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -2431,9 +2447,9 @@ follow-redirects@^1.0.0, follow-redirects@^1.15.6: integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== foreground-child@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz" - integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + version "3.2.0" + resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz" + integrity sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA== dependencies: cross-spawn "^7.0.0" signal-exit "^4.0.1" @@ -2486,11 +2502,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - fstream@^1.0.12: version "1.0.12" resolved "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz" @@ -2569,17 +2580,41 @@ glob-parent@^5.0.0, glob-parent@~5.1.2: is-glob "^4.0.1" glob@^10.2.2, glob@^10.3.10: - version "10.3.12" - resolved "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz" - integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== + version "10.4.1" + resolved "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz" + integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw== dependencies: foreground-child "^3.1.0" - jackspeak "^2.3.6" - minimatch "^9.0.1" - minipass "^7.0.4" - path-scurry "^1.10.2" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + path-scurry "^1.11.1" -glob@^7.1.3, glob@^7.1.4, glob@^7.2.3: +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.4: + version "7.2.3" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.2.3: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -2737,13 +2772,6 @@ human-signals@^2.1.0: resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" @@ -2751,6 +2779,13 @@ iconv-lite@^0.6.2: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + ieee754@^1.1.13: version "1.2.1" resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" @@ -2800,7 +2835,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.3: +inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.3, inherits@2, inherits@2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -2812,7 +2847,7 @@ ini@~1.3.0: ioredis@^5.4.1: version "5.4.1" - resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.4.1.tgz#1c56b70b759f01465913887375ed809134296f40" + resolved "https://registry.npmjs.org/ioredis/-/ioredis-5.4.1.tgz" integrity sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA== dependencies: "@ioredis/commands" "^1.1.1" @@ -2979,10 +3014,10 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jackspeak@^2.3.6: - version "2.3.6" - resolved "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz" - integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== +jackspeak@^3.1.2: + version "3.4.0" + resolved "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz" + integrity sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -3203,7 +3238,7 @@ jest-resolve-dependencies@^29.7.0: jest-regex-util "^29.6.3" jest-snapshot "^29.7.0" -jest-resolve@^29.7.0: +jest-resolve@*, jest-resolve@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== @@ -3546,7 +3581,7 @@ lodash.groupby@^4.6.0: lodash.isarguments@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + resolved "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" integrity sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg== lodash.isboolean@^3.0.3: @@ -3594,7 +3629,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== -lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4: +lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4, lodash@4.17.21: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -3611,20 +3646,20 @@ logform@^2.3.2, logform@^2.4.0: safe-stable-stringify "^2.3.1" triple-beam "^1.3.0" -long@1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/long/-/long-1.1.2.tgz" - integrity sha512-pjR3OP1X2VVQhCQlrq3s8UxugQsuoucwMOn9Yj/kN/61HMc+lDFJS5bvpNEHneZ9NVaSm8gNWxZvtGS7lqHb3Q== - long@^2.4.0: version "2.4.0" resolved "https://registry.npmjs.org/long/-/long-2.4.0.tgz" integrity sha512-ijUtjmO/n2A5PaosNG9ZGDsQ3vxJg7ZW8vsY8Kp0f2yIZWhSJvjmegV7t+9RPQKxKrvj8yKGehhS+po14hPLGQ== +long@1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/long/-/long-1.1.2.tgz" + integrity sha512-pjR3OP1X2VVQhCQlrq3s8UxugQsuoucwMOn9Yj/kN/61HMc+lDFJS5bvpNEHneZ9NVaSm8gNWxZvtGS7lqHb3Q== + lru-cache@^10.0.1, lru-cache@^10.2.0: - version "10.2.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz" - integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== + version "10.2.2" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== lru-cache@^5.1.1: version "5.1.1" @@ -3633,13 +3668,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - make-dir@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" @@ -3653,9 +3681,9 @@ make-error@^1.1.1: integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== make-fetch-happen@^13.0.0: - version "13.0.0" - resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz" - integrity sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A== + version "13.0.1" + resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz" + integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA== dependencies: "@npmcli/agent" "^2.0.0" cacache "^18.0.0" @@ -3666,6 +3694,7 @@ make-fetch-happen@^13.0.0: minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" negotiator "^0.6.3" + proc-log "^4.2.0" promise-retry "^2.0.1" ssri "^10.0.0" @@ -3704,7 +3733,7 @@ micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": +"mime-db@>= 1.43.0 < 2", mime-db@1.52.0: version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -3745,7 +3774,7 @@ minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.1: +minimatch@^9.0.4: version "9.0.4" resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz" integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== @@ -3765,9 +3794,9 @@ minipass-collect@^2.0.1: minipass "^7.0.3" minipass-fetch@^3.0.0: - version "3.0.4" - resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz" - integrity sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg== + version "3.0.5" + resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz" + integrity sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg== dependencies: minipass "^7.0.3" minipass-sized "^1.0.3" @@ -3803,16 +3832,16 @@ minipass@^3.0.0: dependencies: yallist "^4.0.0" +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + minipass@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.0.4: - version "7.0.4" - resolved "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz" - integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== - minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz" @@ -3821,14 +3850,19 @@ minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" -"mkdirp@>=0.5 0", mkdirp@^0.5.1: +mkdirp@^0.5.1, "mkdirp@>=0.5 0": version "0.5.6" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" -mkdirp@^1.0.3, mkdirp@^1.0.4: +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -3844,6 +3878,11 @@ morgan@1.10.0: on-finished "~2.3.0" on-headers "~1.0.2" +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" @@ -3854,7 +3893,7 @@ ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1: +ms@2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -3874,7 +3913,7 @@ natural-compare@^1.4.0: resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -negotiator@0.6.3, negotiator@^0.6.3: +negotiator@^0.6.3, negotiator@0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== @@ -3930,9 +3969,9 @@ noop-logger@^0.1.1: integrity sha512-6kM8CLXvuW5crTxsAtva2YLrRrDaiTIkIePWs9moLHqbFWT94WpNFjwS/5dfLfECg5i/lkmw3aoqVidxt23TEQ== nopt@^7.0.0: - version "7.2.0" - resolved "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz" - integrity sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA== + version "7.2.1" + resolved "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz" + integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w== dependencies: abbrev "^2.0.0" @@ -3978,13 +4017,6 @@ obuf@~1.1.2: resolved "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - on-finished@~2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" @@ -3992,6 +4024,13 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + on-headers@~1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz" @@ -4041,16 +4080,16 @@ optionator@^0.8.1: word-wrap "~1.2.3" optionator@^0.9.1: - version "0.9.3" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + version "0.9.4" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" + word-wrap "^1.2.5" os-homedir@^1.0.1: version "1.0.2" @@ -4137,10 +4176,10 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.2: - version "1.10.2" - resolved "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz" - integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== dependencies: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -4204,7 +4243,7 @@ pg-types@^4.0.1: postgres-interval "^3.0.0" postgres-range "^1.1.1" -pg@8.12.0: +pg@>=8.0, pg@8.12.0: version "8.12.0" resolved "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz" integrity sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ== @@ -4224,10 +4263,10 @@ pgpass@1.x: dependencies: split2 "^4.1.0" -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.0.0, picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -4341,6 +4380,11 @@ proc-log@^3.0.0: resolved "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz" integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== +proc-log@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz" + integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" @@ -4456,9 +4500,9 @@ rc@^1.2.7: strip-json-comments "~2.0.1" react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + version "18.3.1" + resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.8" @@ -4498,12 +4542,12 @@ readdirp@~3.6.0: redis-errors@^1.0.0, redis-errors@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/redis-errors/-/redis-errors-1.2.0.tgz#eb62d2adb15e4eaf4610c04afe1529384250abad" + resolved "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz" integrity sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w== redis-parser@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4" + resolved "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz" integrity sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A== dependencies: redis-errors "^1.0.0" @@ -4569,7 +4613,7 @@ retry@^0.12.0: resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== -rimraf@2, rimraf@^2.6.1: +rimraf@^2.6.1: version "2.7.1" resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -4583,7 +4627,14 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +rimraf@2: + version "2.7.1" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -4620,17 +4671,35 @@ semver@^5.4.1: resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.3.0, semver@^6.3.1: +semver@^6.3.0: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.2.1, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4: - version "7.6.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.2.1: + version "7.6.2" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + +semver@^7.3.5: + version "7.6.2" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + +semver@^7.5.3: + version "7.6.2" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + +semver@^7.5.4: + version "7.6.2" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== send@0.18.0: version "0.18.0" @@ -4784,14 +4853,14 @@ socks-proxy-agent@^8.0.3: socks "^2.7.1" socks@^2.7.1: - version "2.8.1" - resolved "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz" - integrity sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ== + version "2.8.3" + resolved "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== dependencies: ip-address "^9.0.5" smart-buffer "^4.2.0" -source-map-support@0.5.13, source-map-support@^0.5.12: +source-map-support@^0.5.12, source-map-support@0.5.13: version "0.5.13" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== @@ -4827,9 +4896,9 @@ ssf@~0.11.2: frac "~1.1.2" ssri@^10.0.0: - version "10.0.5" - resolved "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz" - integrity sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A== + version "10.0.6" + resolved "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz" + integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ== dependencies: minipass "^7.0.3" @@ -4847,7 +4916,7 @@ stack-utils@^2.0.3: standard-as-callback@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/standard-as-callback/-/standard-as-callback-2.1.0.tgz#8953fc05359868a77b5b9739a665c5977bb7df45" + resolved "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz" integrity sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A== static-eval@2.0.2: @@ -4862,6 +4931,13 @@ statuses@2.0.1: resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +string_decoder@^1.1.1, string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + string-length@^4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" @@ -4893,7 +4969,7 @@ string-width@^1.0.1, "string-width@^1.0.2 || 2 || 3 || 4": is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -4902,7 +4978,16 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^5.0.1, string-width@^5.1.2: +string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^5.0.1: version "5.1.2" resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== @@ -4911,12 +4996,14 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string_decoder@^1.1.1, string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== +string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== dependencies: - safe-buffer "~5.1.0" + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" "strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" @@ -4966,7 +5053,12 @@ strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -5162,7 +5254,7 @@ ts-node-dev@2.0.0: ts-node "^10.4.0" tsconfig "^7.0.0" -ts-node@^10.4.0: +ts-node@^10.4.0, ts-node@>=9.0.0: version "10.9.2" resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== @@ -5240,7 +5332,7 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typescript@5.4.2: +typescript@*, typescript@>=2.7, typescript@5.4.2: version "5.4.2" resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz" integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ== @@ -5269,7 +5361,7 @@ unique-slug@^4.0.0: dependencies: imurmurhash "^0.1.4" -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@~1.0.0, unpipe@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -5291,12 +5383,12 @@ unzipper@^0.10.11: setimmediate "~1.0.4" update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + version "1.0.16" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz" + integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" + escalade "^3.1.2" + picocolors "^1.0.1" uri-js@^4.2.2, uri-js@^4.4.1: version "4.4.1" @@ -5315,21 +5407,26 @@ utils-merge@1.0.1: resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== -uuid@9.0.1: - version "9.0.1" - resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - uuid@^3.0.0: version "3.4.0" resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.3.0, uuid@^8.3.2: +uuid@^8.3.0: + version "8.3.2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +uuid@^8.3.2: version "8.3.2" resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@9.0.1: + version "9.0.1" + resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" @@ -5418,7 +5515,7 @@ wmf@~1.0.1: resolved "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz" integrity sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw== -word-wrap@~1.2.3: +word-wrap@^1.2.5, word-wrap@~1.2.3: version "1.2.5" resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==