Compare commits

..
Author SHA1 Message Date
prafull-opensignlabsandGitHub 533059e747 Fix indentation in opensign.yaml security scheme 2026-04-30 18:45:13 +05:30
prafull-opensignlabsandGitHub 88b6a83e40 Update opensign.yaml 2026-04-30 12:15:21 +05:30
prafull-opensignlabsandGitHub 26aeab5f12 Enhance API documentation for signing links and templates
Added new parameters for template creation and signing links API, including 'file_password', 'allow_offline_sign', and 'signer_role'. Updated documentation to reflect these changes.
2026-04-29 18:27:38 +05:30
prafull-opensignlabsandGitHub 21a479dee9 Add file_password field to OpenSign API documentation 2026-04-16 10:28:48 +05:30
prafull-opensignlabsandGitHub 1e31203e13 Introduced api v1.2 2026-04-15 16:35:06 +05:30
prafull-opensignlabsandGitHub 465d5e217c Update opensign.yaml 2026-03-17 18:49:30 +05:30
prafull-opensignlabsandGitHub d1019e3ef6 Enhance field descriptions in opensign.yaml
Updated descriptions for several fields to clarify behavior regarding template values and request body overrides.
2026-03-17 18:25:03 +05:30
prafull-opensignlabsandGitHub 5c3949239e Merge pull request #2148 from OpenSignLabs/prafull-opensignlabs-patch-13
Refine parameter descriptions in opensign.yaml
2026-03-17 17:59:40 +05:30
prafull-opensignlabsandGitHub 3e0fb1cf15 Refine parameter descriptions in opensign.yaml
Updated descriptions for various parameters in opensign.yaml to enhance clarity and detail.
2026-03-17 17:59:07 +05:30
RaktimaandGitHub 9ffde3b609 Merge pull request #2146 from pravinOpenSign/patch-69
Update Preferences.md
2026-03-16 20:07:43 +05:30
pravinandGitHub 235665dca2 Update Preferences.md
update the icon for use profile name as sender under preferences.
2026-03-16 20:04:21 +05:30
prafull-opensignlabsandGitHub baa1579d1b Merge pull request #2144 from pravinOpenSign/patch-68
Update Preferences.md
2026-03-16 19:56:49 +05:30
prafull-opensignlabsandGitHub d95c559d01 Merge pull request #2145 from OpenSignLabs/doc_v2.38.0
Add 'bcc' field to API schemas
2026-03-16 19:56:11 +05:30
pravinandGitHub 2b3ff7ba92 Update Preferences.md
updated the settings help content under preferences.
2026-03-16 19:51:21 +05:30
prafull-opensignlabsandGitHub 42802da227 Merge pull request #2137 from pravinOpenSign/patch-64
Update quick-send.md
2026-03-16 17:47:51 +05:30
prafull-opensignlabsandGitHub 59c7440c61 Add 'bcc' field to API schemas
Added 'bcc' field to multiple schemas with examples and descriptions.
2026-03-14 21:17:32 +05:30
prafull-opensignlabsandGitHub 047c43ecf4 Merge pull request #2139 from pravinOpenSign/patch-66
Update quick-send.md
2026-03-10 15:55:19 +05:30
pravinandGitHub a881fd6061 Update quick-send.md
updated the gif images on the bulk send page.
2026-03-10 14:50:21 +05:30
RaktimaandGitHub 672bf237a8 Merge pull request #2138 from pravinOpenSign/patch-65
Update publicTemplate.md
2026-03-10 12:53:18 +05:30
pravinandGitHub 1642955a4e Update publicTemplate.md
Removed the note from the public template page
2026-03-10 12:38:13 +05:30
pravinandGitHub 232b1251fa Update quick-send.md
update the screenshots
2026-03-10 12:29:22 +05:30
RaktimaandGitHub d7846f299a Merge pull request #2136 from pravinOpenSign/patch-63
Patch 63
2026-03-10 10:06:47 +05:30
pravinandGitHub aa6eec7a2c Update APIToken.md
update the setting api token help docs
2026-03-09 19:44:43 +05:30
pravinandGitHub 4c7094c0a5 Update manage-templates.md
updated the help document for manage template added the api credit deductions notes
2026-03-09 19:36:55 +05:30
pravinandGitHub 6abdad8d84 Update quick-send.md
Update the bulk send help documents
2026-03-09 19:26:42 +05:30
AmolandGitHub 67b7303c2b Added warning
Added a warning about exposing port 27017 and clarified local running instructions.
2026-03-06 13:31:55 +05:30
prafull-opensignlabsandGitHub 4ea968219b Merge pull request #2127 from OpenSignLabs/prafull-opensignlabs-patch-12
Add hint parameter to widget options in API docs
2026-03-02 13:53:33 +05:30
prafull-opensignlabsandGitHub 4138ab7e21 Update opensign.yaml 2026-03-02 13:51:43 +05:30
prafull-opensignlabsandGitHub e7157b3de1 Add hint parameter to widget options in API docs
Added optional hint parameter for various widgets in the OpenSign API documentation.
2026-03-02 13:45:58 +05:30
prafull-opensignlabsandGitHub 771bc3a04e Add timeToCompleteDays field to opensign.yaml
Added 'timeToCompleteDays' field to specify the number of days for document expiry calculation.
2026-02-27 17:57:17 +05:30
prafull-opensignlabsandGitHub db2b788ec9 Merge pull request #2121 from pravinOpenSign/patch-62
Update and rename credit-deductions.md to Credit-Deductions.md
2026-02-24 10:29:40 +05:30
pravinandGitHub 8a7bdfff30 Update and rename credit-deductions.md to Credit-Deductions.md
Update and rename credit-deductions.md to Credit-Deductions.md
2026-02-24 10:26:14 +05:30
prafull-opensignlabsandGitHub fcc1b0634c Merge pull request #2120 from pravinOpenSign/patch-61
Update credit-deductions.md
2026-02-23 16:43:44 +05:30
pravinandGitHub 00fc014845 Update credit-deductions.md
Remove the repeated content on the credit deductions page.
2026-02-23 15:22:16 +05:30
prafull-opensignlabsandGitHub 8c306714c3 Merge pull request #2119 from pravinOpenSign/patch-60
Create credit-deductions.md
2026-02-23 14:09:59 +05:30
pravinandGitHub e4d0dd9554 Create credit-deductions.md
Credit usage FAQ added
2026-02-23 14:08:05 +05:30
prafull-opensignlabsandGitHub 8287d3988e Merge pull request #2110 from pravinOpenSign/patch-58
Update quick-send.md
2026-02-10 11:49:09 +05:30
pravinandGitHub 1c5160c356 Update quick-send.md
update the sentences on the bulk send page
2026-02-10 11:46:37 +05:30
prafull-opensignlabsandGitHub c7dcfb908c Merge pull request #2106 from pravinOpenSign/patch-57
Update quick-send.md
2026-02-09 20:10:07 +05:30
pravinandGitHub 1c09b6e1fa Update quick-send.md
update the help text for bulk send functionality.
2026-02-09 20:06:42 +05:30
prafull-opensignlabs 53ee5a36c7 remove unncessary file 2026-02-06 17:27:36 +05:30
prafull-opensignlabs c0b7cd08e5 revert top level package files 2026-02-06 17:23:26 +05:30
prafull-opensignlabs bae0f228a8 remove uncessary files and folder from docs branch 2026-02-06 17:21:46 +05:30
prafull-opensignlabs edce724ad8 update node version in action 2026-02-06 16:00:10 +05:30
prafull-opensignlabs 01b0f8ba94 fix: update node package to 20 2026-02-06 15:58:28 +05:30
prafull-opensignlabs 94cb7b301c remove microfrontend and update package-lock file 2026-02-06 15:55:22 +05:30
prafull-opensignlabsandGitHub 0835b1332b Delete docs/package-lock.json 2026-02-06 15:42:29 +05:30
prafull-opensignlabsandGitHub b98c10a28e Update API documentation for opensign.yaml 2026-02-06 14:17:17 +05:30
prafull-opensignlabsandGitHub 5a84fcf89d Enhance Get Template API documentation
Expanded the description of the Get Template API to include detailed responses for various signer widgets and prefill widgets.
2026-02-06 14:14:26 +05:30
prafull-opensignlabsandGitHub 26882f9a8b Merge pull request #2079 from pravinOpenSign/patch-55
Update Preferences.md
2026-01-07 18:14:32 +05:30
pravinandGitHub 731a60f15b Update Preferences.md 2026-01-07 17:48:21 +05:30
prafull-opensignlabsandGitHub 8f05404029 Merge pull request #2078 from pravinOpenSign/patch-53
Patch 53
2026-01-07 16:27:58 +05:30
pravinandGitHub cc8ddc1e55 Update create-template.md
Added the help content for prefill draw widget in create template page.
2026-01-07 16:24:38 +05:30
pravinandGitHub 9052edb9c5 Update request-signatures.md
added the content for prefill draw widget.
2026-01-07 16:23:27 +05:30
pravinandGitHub 9073445b37 Update Preferences.md
Corrected the spelling
2026-01-07 16:21:22 +05:30
pravinandGitHub ca5e34e64d Update Preferences.md
updated the preferences.
2026-01-07 14:37:01 +05:30
prafull-opensignlabsandGitHub 233c66044d Merge pull request #2074 from OpenSignLabs/prafull-opensignlabs-patch-11
Fix duplicate readonly field in opensign.yaml
2026-01-06 20:15:44 +05:30
prafull-opensignlabsandGitHub 64d768386e Fix duplicate readonly field in opensign.yaml
Removed duplicate 'readonly' field and ensured proper formatting.
2026-01-06 20:15:13 +05:30
prafull-opensignlabsandGitHub f0a8263aff Enhance date widget options and formatting
Added 'signing_date' option to date widget specifications and provided required for prefill widget
2026-01-06 12:28:33 +05:30
prafull-opensignlabsandGitHub a320835a73 Update prefill widgets description for clarity 2026-01-05 10:36:18 +05:30
prafull-opensignlabsandGitHub 805d0d1d84 Update opensign.yaml 2026-01-05 10:29:58 +05:30
prafull-opensignlabsandGitHub b0d159462a Merge pull request #2061 from pravinOpenSign/patch-52
Patch 52
2025-12-22 19:37:03 +05:30
pravinandGitHub 84bdcfbcba Enhance Date widget documentation in create-template.md
Expanded the documentation for the Date widget, including detailed options for configuration such as date format, default date, and required status.
2025-12-22 19:33:32 +05:30
pravinandGitHub e4a51b5390 Update request-signatures.md
added the help text for date widget.
2025-12-22 19:32:24 +05:30
pravinandGitHub 891ff460a9 Update my-signature.md
updated the document for my signature
2025-12-22 13:18:05 +05:30
pravinandGitHub 03c311ca7b Update Webhook.md
updated the image height
2025-12-22 12:50:22 +05:30
prafull-opensignlabsandGitHub 620274e1eb Merge pull request #2058 from OpenSignLabs/prafull-opensignlabs-patch-9
Add min_date and max_date to date configurations
2025-12-22 10:00:17 +05:30
prafull-opensignlabsandGitHub dfb5b1bb94 Add min_date and max_date to date configurations
1. Added notify_on_signatures, pen_colors parameter for document and template 
2. Addded 'min_date' and 'max_date' fields to date configurations in 
Updated examples and descriptions for clarity.
2025-12-22 09:59:48 +05:30
AmolandGitHub 0994f80891 Merge pull request #2057 from pravinOpenSign/patch-51 2025-12-19 21:46:03 +05:30
pravinandGitHub cb9f75bf2f Update Webhook.md
update the help document for webhook secret key
2025-12-19 21:43:47 +05:30
pravinandGitHub ee8525dac3 Update Webhook.md
update the image on the webhook page.
2025-12-17 17:54:05 +05:30
pravinandGitHub 8919a2b2e9 Update Webhook.md
Updated the document for webhook secret key
2025-12-17 16:39:53 +05:30
prafull-opensignlabsandGitHub efa5e2e491 Merge pull request #2052 from pravinOpenSign/patch-50
Patch 50
2025-12-10 17:49:21 +05:30
pravinandGitHub c58566ea1b Update manage-users.md
Updated the document to reflect the API credits functionality.
2025-12-10 17:00:05 +05:30
pravinandGitHub e1da69398c Update APIToken.md
Updated the help document for api credits
2025-12-10 16:52:40 +05:30
pravinandGitHub 3f4cffb157 Update manage-users.md
updated the help document to add api credits
2025-12-10 16:17:20 +05:30
prafull-opensignlabsandGitHub 3d91b8b12e Enhance 'cells' widget documentation in opensign.yaml
Added detailed specifications for 'cells' widget including options like 'cell_count', 'default', and 'hint'. Updated multiple sections to ensure consistency in widget definitions.
2025-12-08 17:11:57 +05:30
prafull-opensignlabsandGitHub 592f35f47f Update opensign.yaml 2025-12-01 18:42:13 +05:30
prafull-opensignlabsandGitHub ed9fe3c5f9 Merge pull request #2044 from pravinOpenSign/patch-49
Patch 49
2025-11-28 20:06:04 +05:30
pravinandGitHub c6e1593df5 Update completed.md
update the help document for view form data feature.
2025-11-28 19:31:18 +05:30
pravinandGitHub 900f929b53 Update in-progress.md
Update the help document for view data feature
2025-11-28 19:29:39 +05:30
pravinandGitHub e8093f1bf0 Update manage-templates.md
update the manage template help text for download all formdata
2025-11-28 19:24:31 +05:30
pravinandGitHub 97912d2432 Update request-signatures.md
update the  documents for Hide text with asterisks
2025-11-28 19:03:14 +05:30
pravinandGitHub 6fd6cd3eb8 Update create-template.md
update the help document for Hide text with asterisks feature.
2025-11-28 18:59:26 +05:30
pravinandGitHub 37465082e4 Update request-signatures.md
update the document with hide text with asterisk feature.
2025-11-28 18:49:07 +05:30
prafull-opensignlabsandGitHub d011edd3a1 Update sent_date example in opensign.yaml 2025-11-27 14:49:29 +05:30
prafull-opensignlabsandGitHub 694483aa2d Introduce hide_text_with_asterisks option for widgets
Added 'hide_text_with_asterisks' option for widgets.
2025-11-27 00:43:08 +05:30
prafull-opensignlabsandGitHub c6be12b16a Replace phone with ip_address in opensign.yaml 2025-11-26 23:26:39 +05:30
prafull-opensignlabsandGitHub 0213807732 Merge pull request #2040 from OpenSignLabs/prafull-opensignlabs-patch-8
Add API endpoints for signer IPs and form data
2025-11-26 22:09:14 +05:30
prafull-opensignlabsandGitHub d758062c07 Add API endpoints for signer IPs and form data
Added new API endpoints to retrieve signer IPs and form data for documents. Updated schemas and descriptions for better clarity.
2025-11-26 22:08:25 +05:30
prafull-opensignlabsandGitHub cf698be79e Merge pull request #2020 from pravinOpenSign/patch-48
Update emails.md
2025-11-19 12:32:52 +05:30
pravinandGitHub c3298ccc6f Update emails.md
corrected the wrong sentences on custom template page.
2025-11-19 12:31:49 +05:30
prafull-opensignlabsandGitHub eefa11d827 Merge pull request #2019 from pravinOpenSign/patch-47
Patch 47
2025-11-19 12:00:26 +05:30
pravinandGitHub dadc79600f Update emails.md
update the content on the emails page.
2025-11-19 11:47:08 +05:30
pravinandGitHub 76d10d6ab9 Update Preferences.md
update page content for smtp configuration in preferences page
2025-11-19 11:43:47 +05:30
pravinandGitHub c8733e6903 Update orgadmin.md 2025-11-19 11:37:40 +05:30
pravinandGitHub 88ec854dbd Update organizations.md 2025-11-19 11:37:08 +05:30
pravinandGitHub 717d2c0ddd Update signing_certificate.md 2025-11-19 11:36:32 +05:30
pravinandGitHub 8e2d463089 Update custom_filestorage.md 2025-11-19 11:36:04 +05:30
pravinandGitHub 1344d8d12f Update emails.md
Updated the index of mail
2025-11-19 11:35:18 +05:30
pravinandGitHub 51c8040d60 Update globalSMTP.md
changed the index number of Setup the global smtp
2025-11-19 11:34:24 +05:30
pravinandGitHub e505396e53 Update branding.md
Changed the index number
2025-11-19 11:32:26 +05:30
prafull-opensignlabsandGitHub 606bedd2ec Merge pull request #2018 from pravinOpenSign/patch-46
Patch 46
2025-11-18 19:35:45 +05:30
pravinandGitHub dc82af0a0a Update general.md
Updated the general page content.
2025-11-18 19:17:57 +05:30
pravinandGitHub 8dfc61eeef Create globalSMTP.md
updated the console menu for global smtp help text.
2025-11-18 17:17:09 +05:30
pravinandGitHub 2133a3a460 Update Preferences.md
updated the preferences help text for smtp
2025-11-18 17:14:29 +05:30
prafull-opensignlabsandGitHub 6f615db29d Merge pull request #2017 from pravinOpenSign/patch-45
Update Preferences.md
2025-11-18 16:51:52 +05:30
pravinandGitHub 4141b3538c Update Preferences.md
updated the help text content for email template and customize smtp.
2025-11-18 16:50:40 +05:30
RaktimaandGitHub 3bbb78b7b5 Merge pull request #2014 from pravinOpenSign/patch-44
Update orgadmin.md
2025-11-04 15:36:08 +05:30
pravinandGitHub 2caa231154 Update orgadmin.md 2025-11-04 15:34:58 +05:30
RaktimaandGitHub 9ac382c188 Merge pull request #2013 from pravinOpenSign/patch-43
Update _category_.json
2025-11-04 15:30:16 +05:30
pravinandGitHub 852e109a52 Update _category_.json
updated the navigation index
2025-11-04 15:28:20 +05:30
RaktimaandGitHub d292b5bd6a Merge pull request #2012 from pravinOpenSign/patch-42
Patch 42
2025-11-04 15:02:56 +05:30
pravinandGitHub d868fdf6f2 Update custom_filestorage.md 2025-11-04 13:52:34 +05:30
pravinandGitHub 4145ce8c0c Update custom_filestorage.md
updated the content on the custom file storage page.
2025-11-04 13:31:46 +05:30
pravinandGitHub e093d7a5f4 Update general.md
updated the image on the general page
2025-11-04 13:06:21 +05:30
pravinandGitHub 3d4e43ede5 Update orgadmin.md
update the org admin page help text
2025-11-04 12:50:14 +05:30
pravinandGitHub 0bbfe5ae3d Update organizations.md
updated the help text for the organization page.
2025-11-04 12:47:16 +05:30
pravinandGitHub 8538f0710a Update signing_certificate.md
added new screenshot on the pfx certificate page.
2025-11-04 10:50:46 +05:30
pravinandGitHub 61be45cba2 Update organizations.md
updated the content of manage organization
2025-11-03 20:34:31 +05:30
pravinandGitHub 162e07bacc Create orgadmin.md
added the new help text for manage orgadmin page.
2025-11-03 20:08:59 +05:30
pravinandGitHub 806bb2e387 Update organizations.md
updated the sidebar menu.
2025-11-03 19:58:28 +05:30
pravinandGitHub 9de3331cd2 Create organizations.md
added the help content on manage organizations page.
2025-11-03 19:57:22 +05:30
pravinandGitHub 76699d7dc9 Create signing_certificate.md
pfx certificate content updates.
2025-11-03 19:41:41 +05:30
pravinandGitHub 5888387dd0 Create custom_filestorage.md
added the help content for console custom file storage.
2025-11-03 19:35:21 +05:30
pravinandGitHub 83e9537176 Create emails.md
Added the help text to setup customize email template at organization level.
2025-11-03 18:29:40 +05:30
pravinandGitHub d973a8fea4 Create branding.md
added the help text for branding page
2025-11-03 17:19:11 +05:30
pravinandGitHub ae6f727646 Create general.md for OpenSign General settings
Added documentation for the General section in OpenSign, covering settings for signature types, public profile indexing, and email template customization.
2025-11-03 15:44:57 +05:30
pravinandGitHub f9eb9201f0 Modify Console category in _category_.json
Updated the label and position for the Console category and changed the description for clarity.
2025-11-03 15:23:57 +05:30
pravinandGitHub 0d884e2f4f Create analystics.md
add the new pages for console analytics.
2025-11-03 15:18:43 +05:30
prafull-opensignlabsandGitHub 1c70e4c059 Merge pull request #2009 from pravinOpenSign/patch-41
Patch 41
2025-10-30 15:54:34 +05:30
pravinandGitHub e747d0d699 Update edit-document-before-sending.md
Update the page Content on the edit document before send for request signature page.
2025-10-30 15:52:26 +05:30
pravinandGitHub 2edbafd520 Update title for Widgets in OpenSign documentation
updated the heading on the number widget page
2025-10-30 15:28:51 +05:30
AmolandGitHub 14c57cceb3 Update maximum file upload size information in FAQs
Clarified maximum file upload size details for OpenSign, including specific limits for self-hosted and cloud users.
2025-10-29 23:02:11 +05:30
prafull-opensignlabsandGitHub 6337f3057e Add decimalplaces property to number field
Added 'decimalplaces' property to the number field in opensign.yaml.
2025-10-17 10:42:13 +05:30
prafull-opensignlabsandGitHub 537949b7c3 Add decimalplaces field to number widgets
Added 'decimalplaces' field to number widget specifications across multiple sections.
2025-10-17 10:24:49 +05:30
prafull-opensignlabsandGitHub 180e7c1435 Merge pull request #1996 from pravinOpenSign/patch-40
Patch 40
2025-10-16 18:49:44 +05:30
pravinandGitHub 9139422180 Update Preferences.md
updated the preferences added the content for Merge certificate to pdf.
2025-10-16 18:45:05 +05:30
pravinandGitHub 274d01b548 Update sign-yourself.md
update the images on the sign your self page.
2025-10-16 18:20:14 +05:30
prafull-opensignlabsandGitHub 4d62048d36 Merge pull request #1992 from pravinOpenSign/patch-39
Patch 39
2025-10-15 18:17:24 +05:30
pravinandGitHub 921f7c89e9 Update create-template.md
updated heading tags for prefill in create template panel
2025-10-15 16:32:13 +05:30
pravinandGitHub 6bfa3e61b5 Update request-signatures.md
Update prefill widgets heading tags
2025-10-15 16:25:25 +05:30
prafull-opensignlabsandGitHub 840c7165ff Merge pull request #1991 from pravinOpenSign/patch-38
Patch 38
2025-10-14 19:05:44 +05:30
pravinandGitHub 9eeb1e9bc2 Update create-template.md
Added the help text for prefill widgets on the create template page
2025-10-14 19:04:32 +05:30
pravinandGitHub bc7f2d69cf Update request-signatures.md
update the heading tags in request signature prefill functionality.
2025-10-14 18:22:20 +05:30
prafull-opensignlabsandGitHub 34d9296c70 Merge pull request #1989 from pravinOpenSign/patch-37
Update widgets.md
2025-10-13 20:02:29 +05:30
pravinandGitHub 725b67e75e Update widgets.md
Remove the unsupported examples in the formula help text for number widget.
2025-10-13 20:01:23 +05:30
prafull-opensignlabsandGitHub 71bb6d6206 Update opensign.yaml 2025-10-13 18:58:16 +05:30
prafull-opensignlabsandGitHub f271a113b6 Update opensign.yaml 2025-10-13 18:15:50 +05:30
prafull-opensignlabsandGitHub 71b254f69d Update opensign.yaml 2025-10-13 17:28:19 +05:30
prafull-opensignlabsandGitHub 28b6e9d4aa Merge pull request #1988 from pravinOpenSign/patch-36
Patch 36
2025-10-13 12:16:15 +05:30
pravinandGitHub c6f57db04b Update widgets.md
added the br closing tag
2025-10-13 12:13:20 +05:30
prafull-opensignlabsandGitHub 5626b18ab0 Merge pull request #1987 from pravinOpenSign/patch-36
Patch 36
2025-10-13 12:05:13 +05:30
prafull-opensignlabsandGitHub 5adf336119 Update opensign.yaml 2025-10-13 12:00:24 +05:30
pravinandGitHub ef1d4967d9 Update widgets.md
Update the content for number widget
2025-10-10 13:00:31 +05:30
pravinandGitHub 7680c8e140 Update and rename navigate-between-pages.md to widgets.md 2025-10-10 10:46:24 +05:30
pravinandGitHub 0a14122cbf Update request-signatures.md
Update the help document for navigation menu.
2025-10-10 10:40:32 +05:30
prafull-opensignlabsandGitHub 6587268f53 Update opensign.yaml 2025-10-04 14:01:30 +05:30
prafull-opensignlabsandGitHub 96d0db22c8 Update opensign.yaml 2025-10-03 12:33:07 +05:30
prafull-opensignlabsandGitHub d35a03d588 Update opensign.yaml 2025-10-03 12:23:09 +05:30
prafull-opensignlabsandGitHub 7fd743f325 Update opensign.yaml 2025-10-03 11:17:23 +05:30
prafull-opensignlabsandGitHub b81ff12ae5 fix prefill json in create document with template v1.1 2025-10-03 11:11:43 +05:30
prafull-opensignlabsandGitHub 65be6d1e20 Merge pull request #1972 from pravinOpenSign/patch-31
Update request-signatures.md
2025-09-30 21:22:17 +05:30
pravinandGitHub 9dfd1fb4f1 Update request-signatures.md
Update the images on the request signature pages
2025-09-30 19:55:57 +05:30
prafull-opensignlabsandGitHub abbc0e91a9 Merge pull request #1971 from pravinOpenSign/patch-21
Update request-signatures.md
2025-09-30 18:28:27 +05:30
pravinandGitHub 1bf2f5622f Update request-signatures.md 2025-09-30 18:26:48 +05:30
prafull-opensignlabsandGitHub 8a1f2bc9a0 Update and rename User Deletion – FAQ.md to User Deletion.md 2025-09-29 18:50:49 +05:30
prafull-opensignlabsandGitHub 75518b3f6b Create User Deletion – FAQ.md 2025-09-29 18:50:16 +05:30
prafull-opensignlabsandGitHub 53d874fd12 Update Max File Upload Size.md 2025-09-29 18:44:48 +05:30
prafull-opensignlabsandGitHub b7b61df983 Update Max File Upload Size.md 2025-09-29 18:40:34 +05:30
prafull-opensignlabsandGitHub 20f1e68b13 Update Max File Upload Size.md 2025-09-29 18:36:03 +05:30
prafull-opensignlabsandGitHub e26fac8498 Create Max File Upload Size.md 2025-09-29 18:35:17 +05:30
prafull-opensignlabsandGitHub 02dfec3a0f Merge pull request #1956 from pravinOpenSign/patch-33
Update Profile.md
2025-09-22 10:50:38 +05:30
pravinandGitHub e6a04670b6 Update Profile.md
removed the images height
2025-09-22 10:49:25 +05:30
prafull-opensignlabsandGitHub 41aa91152d Merge pull request #1948 from pravinOpenSign/patch-28
Patch 28
2025-09-19 19:51:55 +05:30
pravinandGitHub e69fb8eeba Update _category_.json
update the faqs sidebar position
2025-09-19 19:10:42 +05:30
pravinandGitHub cb2dab8222 Create _category_.json
update the menu
2025-09-19 19:09:52 +05:30
pravinandGitHub ad2672f205 Create Profile.md
Help content for the Profile menu has been added.
2025-09-19 19:00:31 +05:30
pravinandGitHub e45314c1df Update manage-users.md
added the content for delete users functionality on the teams user page.
2025-09-19 16:32:22 +05:30
prafull-opensignlabsandGitHub 34b0a1ca02 Update merge_certificate description in docs 2025-09-15 14:23:18 +05:30
prafull-opensignlabsandGitHub c05f541189 Update docs as per v2.28.0 2025-09-15 14:05:28 +05:30
prafull-opensignlabsandGitHub 68cad8e10c update operation id of get credits in docs 2025-09-06 12:50:16 +05:30
prafull-opensignlabsandGitHub 2afad89b29 add get credits API documenation 2025-09-06 11:55:37 +05:30
prafull-opensignlabsandGitHub 6c57ee6591 Update company and job_title param for contact 2025-09-04 11:11:28 +05:30
prafull-opensignlabsandGitHub 48bcaa5614 Update opensign.yaml 2025-08-28 18:16:05 +05:30
prafull-opensignlabsandGitHub e595672e3c Update opensign.yaml 2025-08-28 18:10:23 +05:30
prafull-opensignlabsandGitHub 8fe31ee59b Update opensign.yaml 2025-08-28 18:03:26 +05:30
prafull-opensignlabsandGitHub c6b139c456 Update public template documentation 2025-08-28 17:56:40 +05:30
prafull-opensignlabsandGitHub 10d99f12bb update api order 2025-08-28 17:43:52 +05:30
prafull-opensignlabsandGitHub 55ebdb5919 Update sidebars.js 2025-08-28 17:41:52 +05:30
prafull-opensignlabsandGitHub 4b6712a0ff Update sidebars.js 2025-08-28 17:41:16 +05:30
prafull-opensignlabsandGitHub fcb983f68a Update intro.md 2025-08-28 17:40:37 +05:30
prafull-opensignlabsandGitHub f92ff170db Update sidebars.js 2025-08-28 17:33:35 +05:30
prafull-opensignlabsandGitHub c8b3f1fcbf change opensign-api-v-1 to v1.1 2025-08-28 16:53:03 +05:30
prafull-opensignlabsandGitHub 936717fc6f Update sidebars.js 2025-08-28 16:43:25 +05:30
prafull-opensignlabsandGitHub be948ed4df Update sidebars.js 2025-08-28 16:33:49 +05:30
prafull-opensignlabsandGitHub 5d8e7f738d Update sidebars.js 2025-08-28 16:31:12 +05:30
prafull-opensignlabsandGitHub 128f6378cf Merge pull request #1913 from OpenSignLabs/feat-doc-v2
Update docusaurus.config.js
2025-08-28 16:21:56 +05:30
prafull-opensignlabsandGitHub 1641217c43 Update docusaurus.config.js 2025-08-28 16:21:15 +05:30
prafull-opensignlabsandGitHub 63cc034b4a Merge pull request #1912 from OpenSignLabs/feat-doc-v2
update doc path
2025-08-28 16:14:06 +05:30
prafull-opensignlabsandGitHub 49a63eeb50 Update docusaurus.config.js 2025-08-28 16:12:53 +05:30
prafull-opensignlabsandGitHub da45fcfc85 Merge pull request #1910 from OpenSignLabs/feat-doc-v2
add v1.1
2025-08-28 15:36:02 +05:30
prafull-opensignlabsandGitHub b73b0c6b2d Update introduction of opensign v1.1 2025-08-28 11:42:52 +05:30
prafull-opensignlabsandGitHub c9fe580e44 add prefill widget json 2025-08-28 11:34:53 +05:30
prafull-opensignlabsandGitHub b0556310dd Delete docs/docs/API-docs/v2 directory 2025-08-28 10:38:23 +05:30
prafull-opensignlabsandGitHub 9da13a23cc Create intro.md v1.1 2025-08-28 10:38:01 +05:30
prafull-opensignlabsandGitHub d727e16ef9 Create opensign.yaml 2025-08-28 10:37:24 +05:30
prafull-opensignlabsandGitHub 1508c63d0e Delete docs/docs/API-docs/v1.1 2025-08-28 10:36:54 +05:30
prafull-opensignlabsandGitHub 8a198c1543 Create v1.1 2025-08-28 10:36:27 +05:30
prafull-opensignlabsandGitHub da0652d8ed Create opensign.yaml v2 2025-08-28 10:35:39 +05:30
prafull-opensignlabsandGitHub 59f1453176 Rename opensign.yml to opensign.yaml 2025-08-28 10:33:31 +05:30
prafull-opensignlabsandGitHub ad748fbd03 Update intro.md v2 2025-08-28 10:32:41 +05:30
prafull-opensignlabsandGitHub 2a1afca818 Create intro.md 2025-08-28 10:32:29 +05:30
prafull-opensignlabsandGitHub 8e1cfd1ce5 Update intro.md v1 2025-08-28 10:31:56 +05:30
prafull-opensignlabsandGitHub 6236353316 Create opensign.yml v1 2025-08-28 10:31:03 +05:30
prafull-opensignlabsandGitHub b5271017dc Create intro.md 2025-08-28 10:29:14 +05:30
prafull-opensignlabsandGitHub 4b6b955fe5 Merge pull request #1905 from pravinOpenSign/patch-21
Patch 21
2025-08-22 13:17:24 +05:30
pravinandGitHub a2b3761d5e Update create-template.md
Update the content on the create template page.
2025-08-22 12:53:46 +05:30
pravinandGitHub 2c5e311c7f Update embed-template.md 2025-08-22 12:46:31 +05:30
pravinandGitHub 98facb2f6d Update publicTemplate.md
update the menu sequence
2025-08-22 12:46:11 +05:30
pravinandGitHub 77618e57ea Update quick-send.md
update the Menu sequence.
2025-08-22 12:45:38 +05:30
pravinandGitHub 0bb8aa880d Update use-template.md
Update the menu sequence
2025-08-22 12:44:57 +05:30
pravinandGitHub f97f2c1253 Create manage-templates.md
A new page has been added: Manage Templates.
2025-08-22 12:42:30 +05:30
prafull-opensignlabsandGitHub b76add3b2b Merge pull request #1891 from pravinOpenSign/patch-31
Update APIToken.md
2025-08-06 13:27:03 +05:30
prafull-opensignlabsandGitHub 07b14a0a47 Merge pull request #1890 from pravinOpenSign/patch-33
Update Preferences.md
2025-08-06 13:25:30 +05:30
pravinandGitHub aa7326a941 Update Preferences.md
Update the page content on the preferences page
2025-08-06 13:24:23 +05:30
pravinandGitHub 336d3424fe Update APIToken.md
update the page content and images on the api token page
2025-08-06 12:24:32 +05:30
prafull-opensignlabsandGitHub 73ae7b1c06 Merge pull request #1879 from pravinOpenSign/patch-28
Update quick-send.md
2025-08-01 21:04:24 +05:30
pravinandGitHub ccfd7450d5 Update quick-send.md
update the bullet list
2025-08-01 18:36:23 +05:30
prafull-opensignlabsandGitHub e23c04cf06 Merge pull request #1878 from pravinOpenSign/patch-21
Patch 21
2025-08-01 18:25:17 +05:30
pravinandGitHub 7bf661d584 Update quick-send.md
update the page content and images for bulk send.
2025-08-01 18:11:45 +05:30
pravinandGitHub 98c18357cd Update contactbook.md
updated the image and details on the contact page.
2025-08-01 17:24:37 +05:30
pravinandGitHub 8b7079bd8b Update in-progress.md
Update the image on the in progress document page
2025-08-01 16:47:16 +05:30
prafull-opensignlabsandGitHub 9f0963d8a3 Merge pull request #1876 from pravinOpenSign/patch-29
Update need-your-sign.md
2025-08-01 15:45:48 +05:30
prafull-opensignlabsandGitHub ebc79ddec7 Merge pull request #1874 from pravinOpenSign/patch-30
Update in-progress.md
2025-08-01 15:45:04 +05:30
pravinandGitHub 24c6e9f5c0 Update declined.md
Update the content and images on the declined documents report.
2025-08-01 14:10:54 +05:30
pravinandGitHub 475b2e09af Update expired.md
update the text and images on the expired documents report.
2025-08-01 14:06:10 +05:30
pravinandGitHub 05a922446a Update drafts.md
removed the extra text
2025-08-01 14:00:42 +05:30
pravinandGitHub 81a426b087 Update drafts.md
update the image and content on the draft document report.
2025-08-01 13:59:23 +05:30
pravinandGitHub 743b751b5a Update completed.md
update the images and the text on the complete report
2025-08-01 13:56:56 +05:30
pravinandGitHub 3d6e83b4af Update in-progress.md
update the content and images on the page.
2025-08-01 13:36:01 +05:30
pravinandGitHub 4f3e8ab95a Update need-your-sign.md
update the images
2025-08-01 12:58:39 +05:30
prafull-opensignlabsandGitHub cc00b35ac8 Merge pull request #1873 from pravinOpenSign/patch-28
Patch 28
2025-07-31 19:38:16 +05:30
pravinandGitHub 1c86caac1f Update rename-document.md
update the images on rename the folder opensign draive.
2025-07-31 19:34:36 +05:30
pravinandGitHub 20dd3c90d6 Update organize-documents.md
update the images on the OpenSign drive page
2025-07-31 19:31:59 +05:30
pravinandGitHub 8b87a90e78 Update create-document.md
Update the page content and images in OpenSign drive page.
2025-07-31 19:21:42 +05:30
pravinandGitHub bd7937deb2 Update request-signatures.md
update the bullate points
2025-07-31 18:39:16 +05:30
pravinandGitHub 7b0dc4cf9a Update edit-document-before-sending.md
update the content for edit document before send.
2025-07-31 18:34:35 +05:30
prafull-opensignlabsandGitHub 81c47190bf Merge pull request #1872 from pravinOpenSign/patch-20
Patch 20
2025-07-31 17:39:53 +05:30
pravinandGitHub cecf22bb85 Update create-template.md
update the bullet points
2025-07-31 17:19:23 +05:30
pravinandGitHub 17eacfe86b Update request-signatures.md
update the bullet points
2025-07-31 17:16:26 +05:30
pravinandGitHub 8f5c9d1b40 Update request-signatures.md
Add the description about new functionality and updated the images.
2025-07-31 17:13:03 +05:30
pravinandGitHub f34e277657 Update create-template.md
corrected the spelling mistakes.
2025-07-31 16:34:19 +05:30
pravinandGitHub 7cc7e36f64 Update request-signatures.md
Add the description about the widgets.
2025-07-31 16:29:32 +05:30
pravinandGitHub b340463ea7 Update create-template.md
Update the list and sub list bullet points.
2025-07-31 16:16:46 +05:30
prafull-opensignlabsandGitHub 9364bb7859 Merge pull request #1870 from pravinOpenSign/patch-20
Update create-template.md
2025-07-31 16:06:02 +05:30
pravinandGitHub 9f676c12e7 Update create-template.md
Fixed spelling errors and added missing descriptions for the widgets.
2025-07-31 16:03:49 +05:30
prafull-opensignlabsandGitHub 0077b71388 Merge pull request #1869 from pravinOpenSign/patch-19
Patch 19
2025-07-31 13:14:52 +05:30
pravinandGitHub 50af669bd2 Update create-template.md
update the template help text and images.
2025-07-31 12:35:10 +05:30
pravinandGitHub 45055b567f Update create-template.md
update the create template help document.
2025-07-30 19:37:04 +05:30
pravinandGitHub 4a7fd118bb Update create-template.md
Update the help document for manage template.
2025-07-30 17:41:21 +05:30
pravinandGitHub d27e8a43dc Update sign-yourself.md
update the help text for cells widget.
2025-07-30 17:01:23 +05:30
pravinandGitHub 4d3635a5bd Update request-signatures.md
update the help text foe input field
2025-07-30 16:59:22 +05:30
pravinandGitHub aeef6ca567 Update create-template.md
update the cells widget info
2025-07-30 16:49:07 +05:30
pravinandGitHub cc68dd109f Update create-template.md
Updated the images and content on the create template page.
2025-07-30 16:44:22 +05:30
pravinandGitHub 7943f1444f Update request-signatures.md
updated the content and images on the request signature help doc.
2025-07-30 14:10:35 +05:30
pravinandGitHub 876e04d815 Update sign-yourself.md
updated the sign yourself help text and screenshots.
2025-07-30 13:35:22 +05:30
prafull-opensignlabsandGitHub 43dbe71c99 update example of email_subject and email_body in docs 2025-07-08 15:44:40 +05:30
prafull-opensignlabsandGitHub 73b36fafd7 feat: add date format in doc APIs and title in request parameter of create document from template API 2025-07-04 18:34:21 +05:30
AmolandGitHub 095040713e Merge pull request #1797 from OpenSignLabs/feature/correct-spelling-mistakes-in-documentation
Fix docs typos
2025-06-16 03:09:19 +05:30
Amol ac884185b4 fix: correct spelling in docs 2025-06-16 02:34:45 +05:30
prafull-opensignlabsandGitHub eede170d16 update response of get document, get document list from status, get template and get templatelist 2025-06-06 10:57:05 +05:30
prafull-opensignlabsandGitHub c4d6d8e442 update GET APIs of document and template response 2025-06-04 21:21:27 +05:30
prafull-opensignlabsandGitHub 14a2f6f78a Merge pull request #1783 from pravinOpenSign/patch-17
Update SecurityManagement.md
2025-06-03 10:49:02 +05:30
pravinandGitHub dd28cefac8 Update SecurityManagement.md
added the react player to play the video
2025-06-02 19:28:36 +05:30
prafull-opensignlabsandGitHub 00179f5415 Merge pull request #1780 from pravinOpenSign/patch-17
Patch 17
2025-06-02 19:06:13 +05:30
pravinandGitHub 7b465687ef Update SecurityManagement.md
updated the navigation labels
2025-06-02 19:04:59 +05:30
pravinandGitHub e67fdfb134 Update Custom-email-templates.md
update the sidebar titles
2025-06-02 19:04:09 +05:30
prafull-opensignlabsandGitHub ceee0e1089 Merge pull request #1779 from pravinOpenSign/patch-17
Patch 17
2025-06-02 17:20:56 +05:30
pravinandGitHub 1d184a69b0 Update SecurityManagement.md
sidebar removed
2025-06-02 17:19:21 +05:30
pravinandGitHub 8e09d7235b Update Custom-email-templates.md
sidebar removed
2025-06-02 17:19:00 +05:30
prafull-opensignlabsandGitHub a39c01ef12 Merge pull request #1775 from pravinOpenSign/patch-17
Patch 17
2025-06-02 16:46:04 +05:30
pravinandGitHub d96504bb30 Update Preferences.md
updated the Preferences page content.
2025-06-02 16:40:31 +05:30
pravinandGitHub 0b8c4eac6e Update Preferences.md
updated the preferences page content.
2025-06-02 14:45:40 +05:30
pravinandGitHub 98f7de5e0c Update Custom-email-templates.md
Updated the custom email template page content
2025-06-02 14:20:47 +05:30
pravinandGitHub 998a50412a Update Custom-email-templates.md
Updated the custom email template text
2025-06-02 14:15:07 +05:30
pravinandGitHub e16c5e08a8 Update SecurityManagement.md
Updated the security management page.
2025-06-02 13:55:24 +05:30
pravinandGitHub 72a61bc621 Create SecurityManagement.md
Added the security management tab
2025-06-02 13:40:11 +05:30
pravinandGitHub f095629134 Create Custom-email-templates.md
added the page for custom email template
2025-06-02 12:15:08 +05:30
pravinandGitHub a0c1e08091 Update Preferences.md
updated the preferences page.
2025-06-02 11:52:01 +05:30
prafull-opensignlabsandGitHub 3583d7a549 add regular expression's help url 2025-06-02 11:33:36 +05:30
prafull-opensignlabsandGitHub 69e679982a update introduction, add redirect_url and auto_reminder parameter in document and template APIs 2025-05-27 18:11:03 +05:30
AmolandGitHub 3303fcb895 Update request-signatures.md 2025-05-22 15:02:42 +05:30
pravinandGitHub 6b5815f52a Update disabledocumentid.md
updated the menu option preference for disabled docuemnt id tab
2025-05-20 13:08:36 +05:30
pravinandGitHub a01e361d14 Update Preferences.md
Updated the preferences page content
2025-05-20 13:07:41 +05:30
pravinandGitHub c059e95fa9 Update Preferences.md
updated Preferences page contents.
2025-05-20 11:26:49 +05:30
pravinandGitHub 70abddec3a Create Preferences.md
Preferences page added
2025-05-19 19:17:25 +05:30
RaktimaandGitHub ca8eaa492c Merge pull request #1747 from pravinOpenSign/patch-32
Update manage-users.md
2025-05-19 13:15:35 +05:30
pravinandGitHub 94806c895f Update manage-users.md
Fixed the br tag closing issue on manage user form.
2025-05-19 13:05:00 +05:30
RaktimaandGitHub 8b08995e7d Merge pull request #1743 from pravinOpenSign/patch-31
Patch 31
2025-05-19 12:00:58 +05:30
pravinandGitHub de9c58e5fd Update manage-users.md
added fequently ask questions on the manage users page.
2025-05-19 10:48:42 +05:30
pravinandGitHub 6d914829e9 Update Teams.md
updated image alter tags
2025-05-16 19:32:45 +05:30
pravinandGitHub 0193e4946f Update manage-users.md
updated the image alter tags
2025-05-16 19:32:00 +05:30
pravinandGitHub 14c6b14c27 Update manage-users.md
updated the manage user page content.
2025-05-16 19:30:40 +05:30
pravinandGitHub 794365f6dc Create Teams.md
New help document added to manage teams page
2025-05-16 17:56:57 +05:30
pravinandGitHub d0a0a28dec Update manage-users.md
changed teh navigation sequence
2025-05-16 16:41:16 +05:30
pravinandGitHub 1385f12543 Update disabledocumentid.md
change the navigation sequence
2025-05-16 16:40:43 +05:30
pravinandGitHub 0d81ffe677 Update Webhook.md
Updated the webhook help text
2025-05-16 16:39:48 +05:30
pravinandGitHub 9d7376aedb Update APIToken.md
Updated the api token help text
2025-05-16 16:09:54 +05:30
pravinandGitHub 5eb7d8ce13 Create Webhook.md
Add the help docuemnt. how to setup webhook in OpenSign.
2025-05-16 15:34:37 +05:30
prafull-opensignlabsandGitHub 4609bba4c1 feat: add generate api token url 2025-05-16 12:49:10 +05:30
prafull-opensignlabsandGitHub de0de1973e Update APIToken.md 2025-05-16 12:33:28 +05:30
prafull-opensignlabsandGitHub 16c48e9d23 feat: update position of api token in settings menu 2025-05-16 12:32:32 +05:30
prafull-opensignlabsandGitHub 344ccadfb1 Merge pull request #1739 from pravinOpenSign/patch-30
Create APIToken.md
2025-05-16 12:27:50 +05:30
pravinandGitHub eb1086e5b1 Create APIToken.md
added new file how to genarate api token
2025-05-16 12:26:42 +05:30
AmolandGitHub ae568a89d5 Update _category_.json 2025-05-12 01:16:11 +05:30
AmolandGitHub daa348c2e3 Update expired.md 2025-05-12 01:15:11 +05:30
AmolandGitHub 78532731da Update drafts.md 2025-05-12 01:14:46 +05:30
AmolandGitHub 2e26d5687e Update declined.md 2025-05-12 01:13:54 +05:30
AmolandGitHub 4b8b7ed8d9 Update contactbook.md 2025-05-12 01:12:57 +05:30
AmolandGitHub ac986af20f Update completed.md 2025-05-12 01:12:30 +05:30
AmolandGitHub a96333bba5 Update in-progress.md 2025-05-12 01:12:05 +05:30
AmolandGitHub 78ca0d1fdb Update need-your-sign.md 2025-05-12 01:11:36 +05:30
AmolandGitHub 415760ba52 Update navigate-between-pages.md 2025-05-12 01:03:01 +05:30
AmolandGitHub 67bd246ef9 Create edit-document-before-sending.md 2025-05-12 00:58:43 +05:30
AmolandGitHub 4963a7ad7f Update navigate-between-pages.md 2025-05-12 00:47:03 +05:30
AmolandGitHub 94b02105f3 Update sign-yourself.md 2025-05-08 14:32:31 +05:30
AmolandGitHub 6aaeeeeaf5 Create azure-vm-setup.md 2025-04-21 04:40:00 +05:30
prafull-opensignlabsandGitHub 8039f5a744 add file parameter in update template, create document from template APIs 2025-04-17 12:25:55 +05:30
prafull-opensignlabsandGitHub a5ebd67967 Update template_id in response of getdocument and getdocumentlist 2025-04-15 19:57:33 +05:30
prafull-opensignlabsandGitHub 266a4c5654 update {{note}} variable in documentation 2025-04-05 11:44:14 +05:30
prafull-opensignlabsandGitHub 406a29054e Update opensign.yaml 2025-03-28 13:28:53 +05:30
prafull-opensignlabsandGitHub 57f8ba8a72 Merge pull request #1665 from pravinOpenSign/patch-28
Update upgrade-deployment.md
2025-03-28 12:31:56 +05:30
pravinandGitHub f1a70eac5a Update upgrade-deployment.md
removed the description for docker compose up command.
2025-03-28 12:31:17 +05:30
AmolandGitHub f228ae5ba8 Update opensign.yaml 2025-03-26 20:16:20 +05:30
prafull-opensignlabsandGitHub 2c1239dcf0 Update upgrade-deployment.md 2025-03-24 14:11:29 +05:30
prafull-opensignlabsandGitHub 6ca9cbab16 changes in upgrade docker command to support one click deployment 2025-03-24 14:07:20 +05:30
prafull-opensignlabsandGitHub 9922f22ef7 Update opensign.yaml 2025-03-20 16:51:34 +05:30
prafull-opensignlabsandGitHub 84cc1d65fe Update date format 2025-03-20 16:49:51 +05:30
prafull-opensignlabsandGitHub 7a5db1ca40 deprecated env updated 2025-03-20 11:21:07 +05:30
prafull-opensignlabsandGitHub de79c9a4b3 Update deprecated env 2025-03-20 11:20:02 +05:30
prafull-opensignlabsandGitHub 7a7e1b506a Update opensign.yaml 2025-03-19 18:49:07 +05:30
prafull-opensignlabsandGitHub fa2e66914d Update opensign.yaml 2025-03-19 10:37:02 +05:30
prafull-opensignlabsandGitHub b0c65fe5f1 Merge pull request #1642 from OpenSignLabs/revoke-api
docs: add revoke api and update desc of create document from template
2025-03-18 22:11:15 +05:30
prafull-opensignlabsandGitHub b0440876cd docs: add revoke api and update desc of create document from template 2025-03-17 17:06:19 +05:30
AmolandGitHub 6359067839 Update publicTemplate.md 2025-03-07 03:18:13 +05:30
prafull-opensignlabsandGitHub 71f36ff383 Update opensign.yaml 2025-03-06 01:15:56 +05:30
prafull-opensignlabsandGitHub beab4bdfc9 Update opensign.yaml 2025-03-05 18:06:54 +05:30
prafull-opensignlabsandGitHub c9e6750724 Update opensign.yaml 2025-03-05 17:42:46 +05:30
prafull-opensignlabsandGitHub 06c7355efd Update env-variables.md 2025-02-27 17:01:32 +05:30
prafull-opensignlabsandGitHub 73f7d1b32f Update run-locally.md 2025-02-27 17:00:12 +05:30
prafull-opensignlabsandGitHub fecc87d8c3 Update run-locally.md 2025-02-27 16:55:24 +05:30
prafull-opensignlabsandGitHub 57c89bf601 commented unused envs 2025-02-27 16:53:25 +05:30
prafull-opensignlabsandGitHub b10b2617b8 appName commented 2025-02-27 15:59:05 +05:30
prafull-opensignlabsandGitHub eaed35cefd reverted description parameter in API 2025-02-18 19:02:00 +05:30
prafull-opensignlabsandGitHub 44e92344fc Update draft template API description 2025-02-18 13:36:51 +05:30
prafull-opensignlabsandGitHub 9aebbde627 Update selfsign API 2025-02-18 13:11:31 +05:30
prafull-opensignlabsandGitHub 8ece6ef046 Update draft doc API 2025-02-18 12:52:35 +05:30
prafull-opensignlabsandGitHub 7d46e26365 update webhook API 2025-02-18 12:26:35 +05:30
prafull-opensignlabsandGitHub e2646bd49f Update draft and create template api 2025-02-18 11:51:00 +05:30
prafull-opensignlabsandGitHub 6158ac7bc4 Update create doc api 2025-02-18 11:31:43 +05:30
prafull-opensignlabsandGitHub 596340bea9 Update draft doc 2025-02-18 11:23:45 +05:30
nxglabs 73d1cdee00 version updates 2025-02-17 03:53:31 +05:30
prafull-opensignlabsandGitHub f88f2c681b Update webhook doc 2025-02-16 14:25:05 +05:30
prafull-opensignlabsandGitHub 25ecf7221d update create document and create document from template response 2025-02-16 12:41:58 +05:30
prafull-opensignlabsandGitHub bb18feaacf docs: make phone field optional 2025-02-10 16:41:47 +05:30
prafull-opensignlabsandGitHub 19324ad0d8 docs: update sender_name and sender_email in selfsign API 2025-02-10 11:56:57 +05:30
prafull-opensignlabsandGitHub 8a0f5c460f Update opensign.yaml 2025-02-07 22:40:56 +05:30
AmolandGitHub 625689b203 Update s3.md 2025-02-06 03:54:31 +05:30
prafull-opensignlabsandGitHub d919e8514b remove description parameter from selfsign and draft document API 2025-02-05 18:35:12 +05:30
prafull-opensignlabsandGitHub 18f183f48b removed swagger url 2025-02-05 12:23:36 +05:30
prafull-opensignlabsandGitHub 69135afe6b docs: removed description parameter from create and update document API 2025-02-05 12:23:07 +05:30
AmolandGitHub 474a20aa41 Update opensign.yaml 2025-01-31 18:23:37 +05:30
AmolandGitHub 19478536b3 Update opensign.yaml 2025-01-31 15:17:52 +05:30
prafull-opensignlabsandGitHub dc29d7a23b Update opensign.yaml 2025-01-20 13:29:50 +05:30
prafull-opensignlabsandGitHub f5137f54b0 Merge pull request #1538 from OpenSignLabs/draft_doc_api
Draft doc api
2025-01-18 00:34:55 +05:30
prafull-opensignlabsandGitHub 42f2122070 Update draft document api documentation 2025-01-18 00:33:34 +05:30
prafull-opensignlabsandGitHub e4ca29c2c3 Update opensign.yaml 2025-01-18 00:30:03 +05:30
AmolandGitHub b8a039bc20 Update env-variables.md 2025-01-17 01:42:03 +05:30
prafull-opensignlabsandGitHub 331b2d5a40 Merge pull request #1527 from pravinOpenSign/patch-27
Update upgrade-deployment.md
2025-01-02 20:46:25 +05:30
pravinandGitHub 46e390d3c5 Update upgrade-deployment.md
updated the self host upgrade document
2025-01-02 20:34:37 +05:30
prafull-opensignlabsandGitHub 0b8fb87a29 add certificate parameter in completed webhook event 2024-12-23 17:54:39 +05:30
prafull-opensignlabsandGitHub e0249211d2 update webhook event for draft template and readonly for dropdown, textbox widget 2024-12-19 19:11:55 +05:30
prafull-opensignlabsandGitHub a244c1ba3d docs: update info of drodown, radio button, checkbox 2024-12-13 20:49:53 +05:30
prafull-opensignlabsandGitHub 0a79807cb4 feat: add api documentation for selfsign 2024-12-11 19:10:11 +05:30
prafull-opensignlabsandGitHub b70c473002 docs: change parameter from size to fontsize in api docs 2024-11-12 15:28:15 +05:30
prafull-opensignlabsandGitHub 937390fca0 docs: update font size in api documentation 2024-11-12 12:25:12 +05:30
prafull-opensignlabsandGitHub 1140318719 Update info 2024-11-11 17:09:24 +05:30
prafull-opensignlabsandGitHub 655371c6d9 added draft template and color for widget cotent 2024-11-11 16:23:11 +05:30
AmolandGitHub f07fc78eff Update enforce-email-verification.md 2024-11-07 00:53:23 +05:30
AmolandGitHub 60034a4ad8 Create enforce-email-verification.md 2024-11-07 00:49:49 +05:30
RaktimaandGitHub ead7bf8841 Merge pull request #1421 from pravinOpenSign/patch-26
Update run-locally.md
2024-11-06 17:25:31 +05:30
pravinandGitHub 15d2798aab Update run-locally.md 2024-11-06 17:22:44 +05:30
prafull-opensignlabsandGitHub 58a0af40e6 Merge pull request #1397 from pravinOpenSign/patch-22
Update embed-template.md
2024-10-29 16:21:49 +05:30
prafull-opensignlabsandGitHub 1b79b45b1f Update embed-template.md 2024-10-29 16:21:29 +05:30
pravinandGitHub f831ff3b7a Update embed-template.md
Updated the react player settings, default playing set to False,  playing ={false}
2024-10-29 16:17:16 +05:30
prafull-opensignlabsandGitHub f1b6859e9c remove import statement from publictemplate doc 2024-10-29 14:11:16 +05:30
ZathielandGitHub 2148f5196c Merge pull request #1395 from pravinOpenSign/patch-15 2024-10-29 09:15:28 +01:00
pravinandGitHub 5495e569df Update publicTemplate.md
Added dependency import ReactPlayer from 'react-player';
2024-10-29 13:36:51 +05:30
pravinandGitHub e121df48fe Update embed-template.md
added the dependency import ReactPlayer from 'react-player'
2024-10-29 13:33:05 +05:30
prafull-opensignlabsandGitHub 39c05b1eb3 Merge pull request #1394 from pravinOpenSign/patch-12
Patch 12
2024-10-29 12:56:29 +05:30
pravinandGitHub 78892a497d Update embed-template.md
Updated the content for embeding the template
2024-10-29 12:19:22 +05:30
pravinandGitHub ccb08949ff Update sign-yourself.md
Added the details about My signature
2024-10-28 17:37:28 +05:30
pravinandGitHub 74b091b1eb Create embed-template.md
Added a new help document for embedding the template.
2024-10-24 19:13:22 +05:30
AmolandGitHub 264214babd Update opensign.yaml 2024-10-24 17:30:37 +05:30
pravinandGitHub 38930133f7 Update publicTemplate.md
Updated the steps
2024-10-24 16:29:58 +05:30
pravinandGitHub 758cfc8e8d Update publicTemplate.md 2024-10-24 16:15:37 +05:30
pravinandGitHub 2a9ae74c33 Update publicTemplate.md
Updated the page content
2024-10-24 16:14:48 +05:30
pravinandGitHub 2f73ba974c Update publicTemplate.md
updated the content
2024-10-24 16:08:25 +05:30
pravinandGitHub 7c0b744c40 Update publicTemplate.md
Update the header font
2024-10-24 15:07:08 +05:30
pravinandGitHub 010d2dba60 Update publicTemplate.md
Updated the content
2024-10-24 15:04:58 +05:30
pravinandGitHub c0b45e97ea Create publicTemplate.md
help document for public template
2024-10-23 17:04:02 +05:30
RaktimaandGitHub 7316fcd18a Merge pull request #1370 from pravinOpenSign/patch-25
Patch 25
2024-10-22 10:21:25 +05:30
pravinandGitHub 08a2d8a1a4 Update create-template.md
Correct the spelling
2024-10-21 18:24:54 +05:30
pravinandGitHub dbd53ba0d2 Update create-template.md
Updated the document content and Images.
2024-10-21 17:54:53 +05:30
pravinandGitHub 8b0c73c58e Update need-your-sign.md 2024-10-21 14:28:45 +05:30
pravinandGitHub a292687a8c Update expired.md 2024-10-21 14:28:16 +05:30
pravinandGitHub 8659c1f4dc Update contactbook.md
update the label actions button to Action buttons
2024-10-21 14:27:45 +05:30
pravinandGitHub 8ed73ba07b Create contactbook.md
Added the new contact book report
2024-10-21 14:26:20 +05:30
pravinandGitHub a41a31176d Update expired.md
Update the report name from Expired Documents Report to Expired documents report
2024-10-21 13:40:13 +05:30
pravinandGitHub d6740efaf9 Update declined.md
Updated the report name "Declined Documents Report"  to "Declined documents report"
2024-10-21 13:37:23 +05:30
pravinandGitHub aac4ea8e2a Update drafts.md
update the report name from "Draft Documents Report" to Draft documents report"
2024-10-21 13:34:51 +05:30
pravinandGitHub 3fe26cfb07 Update need-your-sign.md
Updated the header from # Need your sign report in OpenSign  to # Need your sign report to maintain the consistency in all report.
2024-10-21 13:30:23 +05:30
pravinandGitHub c837df6540 Update completed.md
Updated the word from 
"Completed Documents Report" to ""Completed documents report"
2024-10-21 13:28:43 +05:30
pravinandGitHub 03b6b567fc Update in-progress.md
Updated the sentence "In progress document Interface  " to  "In progress document report"
2024-10-21 13:22:58 +05:30
pravinandGitHub 09fbd442be Update need-your-sign.md
Updated the sentence "Understanding the Need your sign Interface  " to  "Understanding the Need your sign report"
2024-10-21 13:22:15 +05:30
pravinandGitHub 5f32ca0140 Update in-progress.md
Updated the Document and The latest Images in in-progress report.
2024-10-21 13:12:12 +05:30
pravinandGitHub 46e5aa2815 Update run-locally.md
Updated the sentence 
"Create a Docker Hub account if you don't already have one."
2024-10-21 12:31:15 +05:30
pravinandGitHub db635f80f8 Update need-your-sign.md
Update the Word "Need Your Signature" to "Need your signature.
2024-10-21 12:21:19 +05:30
prafull-opensignlabsandGitHub c3a101bc18 Merge pull request #1352 from pravinOpenSign/patch-23
Update upgrade-deployment.md
2024-10-18 19:47:26 +05:30
pravinandGitHub 1af4bd430f Update upgrade-deployment.md
Update the command to pull upgrade the opensign deployment
2024-10-18 17:18:13 +05:30
AmolandGitHub 0459c404f5 Update completed.md 2024-10-18 16:16:51 +05:30
prafull-opensignlabsandGitHub 492f242e4d update local command 2024-10-16 13:21:44 +05:30
prafull-opensignlabsandGitHub e06d6d5427 update command of local 2024-10-16 13:16:44 +05:30
prafull-opensignlabsandGitHub 747c7c549c Merge pull request #1344 from OpenSignLabs/update-doc
feat: update doc add enableTour variable
2024-10-15 11:51:03 +05:30
RaktimaNXG e91d615e68 feat: update doc add enableTour variable 2024-10-15 11:14:10 +05:30
prafull-opensignlabsandGitHub 2d527d59b0 Merge pull request #1310 from OpenSignLabs/revert-1303-update-doc
Revert "feat: update doc add enableTour variable"
2024-10-09 10:08:00 +05:30
prafull-opensignlabsandGitHub 340947a36d Revert "feat: update doc add enableTour variable" 2024-10-09 10:07:44 +05:30
prafull-opensignlabsandGitHub 91d098ef65 Merge pull request #1303 from OpenSignLabs/update-doc
feat: update doc add enableTour variable
2024-10-09 10:04:27 +05:30
RaktimaNXG d9f8ea8aca refactor code 2024-10-07 10:23:28 +05:30
AndrewandGitHub 33bcb55124 Update s3.md 2024-10-03 12:59:28 +05:30
AndrewandGitHub 5a93207dc2 Update s3.md 2024-10-03 12:55:03 +05:30
AndrewandGitHub fa7c36dbe2 fix syntax issue 2024-10-03 12:26:13 +05:30
prafull-opensignlabsandGitHub faba8b8201 Merge pull request #1286 from OpenSignLabs/docs_s3
update s3 doc
2024-10-03 10:52:42 +05:30
prafull-opensignlabsandGitHub 3422bc6f9e Update s3.md 2024-10-03 10:51:19 +05:30
prafull-opensignlabsandGitHub a195b758e6 Update s3.md 2024-10-03 10:49:26 +05:30
ZathielandGitHub 083cd60f2d Merge pull request #1284 from pravinOpenSign/patch-15 2024-10-01 10:19:21 +02:00
pravinandGitHub f4b7449262 Update run-locally.md 2024-10-01 13:19:00 +05:30
prafull-opensignlabsandGitHub fb68931538 Merge pull request #1281 from OpenSignLabs/docs_s3
Docs: Update s3 documentation
2024-09-30 21:28:55 +05:30
prafull-opensignlabsandGitHub be07fcec24 Update s3 documentation 2024-09-30 21:24:58 +05:30
RaktimaNXG f6245cfada feat: update doc add enableTourvariable 2024-09-30 16:47:08 +05:30
prafull-opensignlabsandGitHub 77cf6de722 Update run-locally.md 2024-09-26 10:11:25 +05:30
prafull-opensignlabsandGitHub 2b17c26722 Merge pull request #1177 from EDIflyer/feature/ediflyer-docs
docs: update install guidance
2024-09-25 20:07:19 +05:30
RaktimaNXG 9862921297 Merge branch 'feat-docs' of https://github.com/OpenSignLabs/OpenSign into feat-docs 2024-09-19 14:56:55 +05:30
RaktimaNXG 685b2ceabd update opensign-demo video 2024-09-19 14:55:20 +05:30
prafull-opensignlabsandGitHub 786b674db3 Update opensign.yaml 2024-09-18 19:11:20 +05:30
prafull-opensignlabsandGitHub 0b9074611a Update opensign.yaml 2024-09-18 14:56:23 +05:30
prafull-opensignlabsandGitHub 6ebfa038b3 Update opensign.yaml 2024-09-18 14:53:47 +05:30
prafull-opensignlabsandGitHub 4c809bb8d3 Merge pull request #1214 from pravinOpenSign/patch-62
Create upgrade-deployment.md
2024-09-18 14:33:56 +05:30
pravinandGitHub 2dcb7eb7a2 Create upgrade-deployment.md
Added deployment upgrade help document.
2024-09-18 11:56:53 +05:30
prafull-opensignlabsandGitHub 743e89038c webhook response schema updated 2024-09-09 20:19:36 +05:30
AndrewandGitHub f9f25dc0c3 Update run-locally.md 2024-09-09 02:45:33 +05:30
EDIflyerandEDIflyer ca75698328 better differentiate between custom domain and local 2024-09-08 16:26:01 +01:00
EDIflyerandEDIflyer f117aeb7c4 Add comment re CPU architecture
As per Discord discussions
2024-09-08 16:25:54 +01:00
EDIflyerandEDIflyer e36557e844 Update run-locally.md
Remove reference to NodeJS and Git as these aren't required for Docker as are included within it.
2024-09-08 16:25:39 +01:00
prafull-opensignlabsandGitHub e73b8ed5a5 Update opensign.yaml 2024-09-06 21:01:18 +05:30
AmolandGitHub 0aaeb28eb7 change branches in command 2024-09-03 22:32:08 +05:30
prafull-opensignlabsandGitHub 305a5f6fda added staging url 2024-09-02 11:06:33 +05:30
prafull-opensignlabsandGitHub 045961be02 update testing url 2024-09-02 10:28:14 +05:30
RaktimaNXG c612dd3e70 feat: replace opensign video to gif 2024-08-30 19:02:29 +05:30
RaktimaNXG ea4527e2dd feat: add opensign-react npm demo video 2024-08-30 18:49:55 +05:30
prafull-opensignlabsandGitHub aada33f23f Update run-locally.md 2024-08-30 11:02:17 +05:30
prafull-opensignlabsandGitHub 1f44582658 Update run-locally.md 2024-08-30 10:52:14 +05:30
prafull-opensignlabsandGitHub 198a58e524 Update run-locally.md 2024-08-29 20:01:58 +05:30
prafull-opensignlabsandGitHub 0d78aef414 Update run-locally.md 2024-08-29 20:01:31 +05:30
prafull-opensignlabsandGitHub 8f99cb0514 Update run-locally.md 2024-08-29 19:59:30 +05:30
prafull-opensignlabsandGitHub 9a734d9b3c Merge pull request #1132 from pravinOpenSign/patch-57
Update need-your-sign.md
2024-08-29 19:15:54 +05:30
prafull-opensignlabsandGitHub 7a2c93a3e9 Merge pull request #1133 from pravinOpenSign/patch-58
Update drafts.md
2024-08-29 19:13:23 +05:30
pravinandGitHub a5e1768f7e Update drafts.md
update the title Complete documents report to "draft documents report"
2024-08-29 18:20:49 +05:30
pravinandGitHub 30e27062bd Update need-your-sign.md
Corrected the spelling mistake Spelling mistake Action button  to Actions buttons
2024-08-29 18:19:05 +05:30
prafull-opensignlabsandGitHub 97d28a1b48 Merge pull request #1123 from pravinOpenSign/patch-52
Update declined.md
2024-08-29 10:43:36 +05:30
prafull-opensignlabsandGitHub aade153f1c Merge pull request #1125 from pravinOpenSign/patch-54
Update completed.md
2024-08-29 10:42:38 +05:30
prafull-opensignlabsandGitHub df6f5d4b33 Merge pull request #1126 from pravinOpenSign/patch-55
Update in-progress.md
2024-08-29 10:41:51 +05:30
prafull-opensignlabsandGitHub ab14628769 Merge pull request #1127 from pravinOpenSign/patch-56
Update drafts.md
2024-08-29 10:41:33 +05:30
RaktimaNXG 69effb5af0 feat: replace demo-video 2024-08-28 18:41:17 +05:30
RaktimaNXG 6e9078d64b feat: upload public demo video 2024-08-28 18:22:17 +05:30
pravinandGitHub 9c73b7818f Update drafts.md
title updated
2024-08-28 18:04:23 +05:30
pravinandGitHub c5246d7a83 Update in-progress.md
content updated for shared document popup
2024-08-28 18:03:04 +05:30
pravinandGitHub 35511e08ac Update completed.md
Title updated
2024-08-28 17:57:59 +05:30
pravinandGitHub 39dc8b226a Update declined.md
page title updated
2024-08-28 17:53:52 +05:30
prafull-opensignlabsandGitHub 7cb531b183 Merge pull request #1118 from pravinOpenSign/patch-48
Update drafts.md
2024-08-28 17:42:44 +05:30
prafull-opensignlabsandGitHub 58422b17e5 Merge pull request #1119 from pravinOpenSign/patch-49
Update in-progress.md
2024-08-28 17:42:14 +05:30
prafull-opensignlabsandGitHub 0b2191f97c Merge pull request #1121 from pravinOpenSign/patch-50
Update expired.md
2024-08-28 17:41:40 +05:30
prafull-opensignlabsandGitHub a3e672cde0 Merge pull request #1122 from pravinOpenSign/patch-51
Update declined.md
2024-08-28 17:41:16 +05:30
pravinandGitHub 5a0b10bdff Update declined.md
Declined Document report
2024-08-28 17:18:37 +05:30
pravinandGitHub dfbf4d8a8f Update expired.md
Expired documents report help document completed
2024-08-28 17:15:51 +05:30
pravinandGitHub 4727d622db Update in-progress.md
Updated the help document for in-progress report.
2024-08-28 17:02:43 +05:30
pravinandGitHub e18e62754f Update drafts.md
Draft document report help document updated
2024-08-28 15:28:15 +05:30
prafull-opensignlabsandGitHub bec7af5142 Merge pull request #1117 from pravinOpenSign/patch-47
Update completed.md
2024-08-28 12:58:03 +05:30
pravinandGitHub 0db937eeeb Update completed.md
content updated
2024-08-28 12:57:20 +05:30
prafull-opensignlabsandGitHub c8d26a5ea9 Merge pull request #1114 from pravinOpenSign/patch-46
Update create-document.md
2024-08-28 12:45:54 +05:30
pravinandGitHub 1659ebd2ac Update create-document.md
fixed the end tag <img> issue
2024-08-27 19:34:35 +05:30
prafull-opensignlabsandGitHub 7877d13776 Merge pull request #1113 from pravinOpenSign/patch-45
Update create-document.md
2024-08-27 19:16:39 +05:30
pravinandGitHub 2f7cacb933 Update create-document.md
Added the Missing <img> tag
2024-08-27 16:47:17 +05:30
prafull-opensignlabsandGitHub 16fcbf8a54 Update create-document.md 2024-08-27 16:37:29 +05:30
prafull-opensignlabsandGitHub 719a23c95b Update create-document.md 2024-08-27 16:30:52 +05:30
prafull-opensignlabsandGitHub f4db8af201 Update create-document.md 2024-08-27 16:23:01 +05:30
prafull-opensignlabsandGitHub 3549c63cc0 Merge pull request #1109 from pravinOpenSign/patch-42
Update declined.md
2024-08-27 16:17:25 +05:30
prafull-opensignlabsandGitHub b9ed7e5293 Merge pull request #1100 from pravinOpenSign/patch-34
Update completed.md
2024-08-27 16:16:30 +05:30
prafull-opensignlabsandGitHub e34e2c4386 Merge pull request #1110 from pravinOpenSign/patch-43
Update create-template.md
2024-08-27 16:16:09 +05:30
prafull-opensignlabsandGitHub a09b2e186f Merge pull request #1099 from pravinOpenSign/patch-33
Update list-grid-view.md
2024-08-27 16:15:52 +05:30
prafull-opensignlabsandGitHub cc273261c3 Merge pull request #1111 from pravinOpenSign/patch-44
Update need-your-sign.md
2024-08-27 16:15:17 +05:30
prafull-opensignlabsandGitHub 26c5c951b6 Merge pull request #1098 from pravinOpenSign/patch-32
Update create-document.md
2024-08-27 16:14:59 +05:30
prafull-opensignlabsandGitHub e63178b899 Merge pull request #1105 from pravinOpenSign/patch-39
Update my-signature.md
2024-08-27 16:14:36 +05:30
pravinandGitHub eb42f08640 Update need-your-sign.md
updated the signers description paragraph.
2024-08-27 15:30:36 +05:30
pravinandGitHub 2843bfd5c9 Update create-template.md
Updated the quick send paragraph description
2024-08-27 15:25:10 +05:30
pravinandGitHub b2a838dc4e Update declined.md
Update the signers description
2024-08-27 15:02:01 +05:30
pravinandGitHub c682a6d8eb Update my-signature.md
Updated the Images on my signature page
2024-08-27 13:19:16 +05:30
prafull-opensignlabsandGitHub c4a23b4f1b Merge pull request #1104 from pravinOpenSign/patch-38
Update declined.md
2024-08-27 11:21:50 +05:30
pravinandGitHub 12e74533c7 Update declined.md
updated the heading "Understanding the Completed Documents Report"
2024-08-27 11:20:14 +05:30
prafull-opensignlabsandGitHub 24c8f6012f Merge pull request #1102 from pravinOpenSign/patch-36
Update declined.md
2024-08-27 10:24:08 +05:30
prafull-opensignlabsandGitHub b20fb9ea3f Merge pull request #1103 from pravinOpenSign/patch-37
Update need-your-sign.md
2024-08-27 10:22:24 +05:30
prafull-opensignlabsandGitHub 079e0defc4 Merge pull request #1097 from pravinOpenSign/patch-31
Update my-signature.md
2024-08-27 10:08:02 +05:30
prafull-opensignlabsandGitHub 00ad406e1b Merge pull request #1090 from pravinOpenSign/patch-30
Update quick-send.md
2024-08-27 10:03:59 +05:30
pravinandGitHub 5c7a9e1d08 Update need-your-sign.md
Need your signature report help document completed.
2024-08-26 19:02:23 +05:30
pravinandGitHub ea2c981a7f Update declined.md
help document for decline document reports is completed.
2024-08-26 18:45:08 +05:30
pravinandGitHub ee18d1b317 Update completed.md
Help document added for completed document report
2024-08-26 18:18:23 +05:30
pravinandGitHub 7f6771e56d Update list-grid-view.md
Images updated
2024-08-26 17:21:37 +05:30
pravinandGitHub 1308b143c4 Update create-document.md
Help document for creating and managing folders in OpenSign Drive has been completed
2024-08-26 17:07:42 +05:30
pravinandGitHub 7be2d1f06a Update my-signature.md
Update the signature page image
2024-08-26 14:34:51 +05:30
pravinandGitHub 62021e8870 Update quick-send.md
Help documents finalized for signature requests using Quick Send.
2024-08-23 19:16:54 +05:30
prafull-opensignlabsandGitHub ea5f407786 Merge pull request #1083 from pravinOpenSign/patch-29
Update use-template.md
2024-08-22 13:07:26 +05:30
pravinandGitHub 2ecd1823e1 Update use-template.md
completed help document: create the document from template
2024-08-21 19:02:26 +05:30
prafull-opensignlabsandGitHub 1e2eee63df Update create-template.md 2024-08-19 16:03:45 +05:30
prafull-opensignlabsandGitHub 8fda979870 Update create-template.md 2024-08-19 15:58:24 +05:30
prafull-opensignlabsandGitHub c59002c375 Update create-template.md 2024-08-19 15:55:50 +05:30
prafull-opensignlabsandGitHub 1fe05b402b Update create-template.md 2024-08-19 15:51:48 +05:30
prafull-opensignlabsandGitHub c7d5bef886 Merge pull request #1075 from pravinOpenSign/patch-26
Update create-template.md
2024-08-19 15:45:20 +05:30
pravinandGitHub ca2fc2bd5c Update create-template.md
Create template help document updated.
2024-08-19 15:43:27 +05:30
prafull-opensignlabsandGitHub 8bf9fb6299 Delete docs/docs/self-host/docker/run-locally-windows.md 2024-08-19 10:42:11 +05:30
prafull-opensignlabsandGitHub 031f24180a Merge pull request #1061 from pravinOpenSign/patch-25
Update sign-yourself.md
2024-08-14 21:05:21 +05:30
prafull-opensignlabsandGitHub 8663777097 Update run-locally.md 2024-08-14 21:04:16 +05:30
prafull-opensignlabsandGitHub 342876cd0b Update run-locally.md 2024-08-14 21:02:17 +05:30
prafull-opensignlabsandGitHub beaa256e3f Update run-locally.md 2024-08-14 20:59:06 +05:30
pravinandGitHub 27ae27187d Update sign-yourself.md
updated the Side bar position.
2024-08-14 19:43:38 +05:30
prafull-opensignlabsandGitHub e8d692a707 Merge pull request #1059 from pravinOpenSign/patch-24
Update sign-yourself.md
2024-08-14 17:07:15 +05:30
prafull-opensignlabsandGitHub 4f71d1bd03 Merge pull request #1057 from pravinOpenSign/patch-23
Update request-signatures.md
2024-08-14 13:42:43 +05:30
prafull-opensignlabsandGitHub 8d33d4c44e Update run-locally.md 2024-08-13 20:21:56 +05:30
prafull-opensignlabsandGitHub 8be55a30c1 Update run-locally.md 2024-08-13 20:18:26 +05:30
prafull-opensignlabsandGitHub 46a0cfa1eb Update run-locally.md 2024-08-13 20:16:29 +05:30
prafull-opensignlabsandGitHub 6988bca7f4 Update run-locally.md 2024-08-13 20:13:33 +05:30
prafull-opensignlabsandGitHub 1a2c0ecbfc Update run-locally.md 2024-08-13 20:11:10 +05:30
prafull-opensignlabsandGitHub f2281505a4 Update run-locally.md 2024-08-13 20:10:52 +05:30
prafull-opensignlabsandGitHub 3ff790c57b Update run-locally.md 2024-08-13 20:02:04 +05:30
pravinandGitHub d5b0fc4e3b Update sign-yourself.md
Updated the title and removed some text
2024-08-13 18:52:25 +05:30
pravinandGitHub 69129c2d47 Update request-signatures.md
Image Location Changed and updated the support line add the bottom
2024-08-13 18:46:38 +05:30
prafull-opensignlabsandGitHub 1486d66b9b Update run-locally.md 2024-08-13 18:33:20 +05:30
prafull-opensignlabsandGitHub 67323d01f5 Update run-locally.md 2024-08-13 18:18:17 +05:30
prafull-opensignlabsandGitHub d0566e6645 Update run-locally.md 2024-08-13 18:16:57 +05:30
prafull-opensignlabsandGitHub a3e1fa866e Update request-signatures.md 2024-08-13 17:45:58 +05:30
prafull-opensignlabsandGitHub 6d6b70a888 Update run-locally.md 2024-08-13 17:31:33 +05:30
prafull-opensignlabsandGitHub c152d3bf35 Update sign-yourself.md 2024-08-13 17:24:25 +05:30
prafull-opensignlabsandGitHub 56a0211b03 Update request-signatures.md 2024-08-13 17:20:43 +05:30
prafull-opensignlabsandGitHub 87fb943ddb Update request-signatures.md 2024-08-13 17:12:40 +05:30
prafull-opensignlabsandGitHub dacc9bb27e Update request-signatures.md 2024-08-13 17:07:02 +05:30
prafull-opensignlabsandGitHub 43a9fa6820 Update run-locally.md 2024-08-13 16:52:11 +05:30
prafull-opensignlabsandGitHub 523d7a0896 Update request-signatures.md 2024-08-13 16:06:50 +05:30
prafull-opensignlabsandGitHub df53e243a5 Update request-signatures.md 2024-08-13 15:51:03 +05:30
prafull-opensignlabsandGitHub b30d7e3337 Update request-signatures.md 2024-08-13 15:45:36 +05:30
AmolandGitHub 7a8e2bcd02 Update run-locally.md 2024-08-13 15:35:17 +05:30
AmolandGitHub 7aa505f1a3 Update run-locally.md 2024-08-13 15:34:34 +05:30
AmolandGitHub beecd2d26f Merge pull request #1008 from pravinOpenSign/patch-20
Update request-signatures.md
2024-08-02 17:49:43 +05:30
pravinandGitHub 96ecbe97f1 Update request-signatures.md
The issue with the image closing tag has been fixed.
2024-08-02 17:47:22 +05:30
AndrewandGitHub 7161da4a2f Merge pull request #1004 from pravinOpenSign/patch-17 2024-08-02 17:21:48 +05:30
AndrewandGitHub 462fdfe1be Merge pull request #1005 from pravinOpenSign/patch-18 2024-08-02 17:21:41 +05:30
AndrewandGitHub dc25133b10 Merge pull request #1006 from pravinOpenSign/patch-19 2024-08-02 17:21:21 +05:30
pravinandGitHub bb7552a7bf Update sign-yourself.md
Added padding between images and the subsequent line
2024-08-02 16:58:28 +05:30
pravinandGitHub 79b4ca053a Update sign-yourself.md
The images in the "Sign Yourself" help document have been updated.
2024-08-02 16:44:24 +05:30
pravinandGitHub 8d91bd218b Update request-signatures.md
The request signature flow help document has been updated.
2024-08-02 16:36:50 +05:30
AmolandGitHub 8e0c96589a Update manage-users.md 2024-07-28 12:41:29 +05:30
AmolandGitHub 3ac66ea4c5 Update manage-users.md 2024-07-28 12:39:43 +05:30
AndrewandGitHub acbff61d9e Update run-locally.md 2024-07-25 02:07:01 +05:30
prafull-opensignlabsandGitHub 83a1da04d1 Update run-locally-windows.md 2024-07-25 01:37:30 +05:30
AmolandGitHub b86155de49 Merge pull request #951 from pravinOpenSign/patch-11
Update sign-yourself.md
2024-07-24 23:50:43 +05:30
prafull-opensignlabsandGitHub 2108ce52ca Update how-to-generate-self-signed-document-signing-certificate.md 2024-07-24 22:56:51 +05:30
AmolandGitHub 4af96da515 Create upgrade-to-v2.1.0.md 2024-07-24 15:31:57 +05:30
pravinandGitHub eda2085d4b Update sign-yourself.md
Replace the duplicate step 4 to step 5
2024-07-19 11:49:14 +05:30
AmolandGitHub 6cdcf66e81 Merge pull request #947 from pravinOpenSign/patch-9
Update sign-yourself.md
2024-07-18 18:20:45 +05:30
pravinandGitHub a701522dca Update sign-yourself.md
Completed Sign yourself help document.
2024-07-18 18:19:05 +05:30
AmolandGitHub ddeb31e530 Update opensign.yaml 2024-07-11 08:58:16 +05:30
AmolandGitHub f827ead0b6 Update opensign.yaml 2024-07-11 08:32:19 +05:30
AmolandGitHub ae87703a34 Update index.js 2024-07-11 08:07:54 +05:30
AmolandGitHub 250c2d768b Update DigitalOcean.md 2024-06-14 23:29:24 +05:30
AmolandGitHub e5e6587490 Create env-variables.md 2024-06-12 03:15:47 +05:30
AmolandGitHub 4921152336 Update expired.md 2024-06-10 22:50:29 +05:30
AmolandGitHub 0c7da91fab Update expired.md 2024-06-10 22:49:17 +05:30
AmolandGitHub add07026bc Update Ensure this field is accurately filled and meets all requirements.md 2024-06-06 12:37:37 +05:30
AmolandGitHub 7f64418a6c Create Ensure this field is accurately filled and meets all requirements.md 2024-06-06 12:23:07 +05:30
AmolandGitHub e83ceaa815 Update sign-yourself.md 2024-06-05 00:05:58 +05:30
AmolandGitHub e3dcb99438 Update FAQs.md 2024-06-04 18:48:29 +05:30
AmolandGitHub 78821cb5e4 Update _category_.json 2024-06-04 18:47:55 +05:30
AmolandGitHub 548441dded Create FAQs.md 2024-06-04 18:43:50 +05:30
AmolandGitHub 7c53ae421c Create _category_.json 2024-06-04 18:12:25 +05:30
AmolandGitHub a71a867aea Update opensign.yaml 2024-05-31 20:50:13 +05:30
AmolandGitHub 4d0d2e9a58 Update my-signature.md 2024-05-23 10:37:06 +05:30
AmolandGitHub fcda1e325e Update manage-users.md 2024-05-22 02:59:26 +05:30
AmolandGitHub b41fed0d12 Update my-signature.md 2024-05-22 02:58:14 +05:30
AmolandGitHub ac533d92f6 Create _category_.json 2024-05-22 02:37:55 +05:30
AmolandGitHub 792b48b75a Create how-to-generate-self-signed-document-signing-certificate.md 2024-05-22 02:35:09 +05:30
AmolandGitHub 175eb921c1 Update run-locally-windows.md 2024-05-22 02:27:08 +05:30
prafull-opensignlabsandGitHub 4cd959b34b stop automatic playing 2024-05-16 10:06:42 +05:30
AmolandGitHub 0083efb7dc Update run-locally-windows.md 2024-05-16 00:41:25 +05:30
AmolandGitHub 18738a56c0 Add files via upload 2024-05-15 22:41:11 +05:30
AmolandGitHub 3254fc8199 Rename favicon.ico to favicon-old.ico 2024-05-15 22:40:29 +05:30
prafull-opensignlabsandGitHub 4a52299d35 Update opensign.yaml 2024-05-15 10:28:34 +05:30
prafull-opensignlabsandGitHub 7a1247051c Update opensign.yaml 2024-05-14 10:44:12 +05:30
prafull-opensignlabsandGitHub 71d34dd3d3 Update opensign.yaml 2024-05-13 19:43:09 +05:30
prafull-opensignlabsandGitHub 1971ffd221 Update opensign.yaml 2024-05-13 19:35:17 +05:30
prafull-opensignlabsandGitHub a0af2145f3 Update opensign.yaml 2024-05-13 19:10:31 +05:30
prafull-opensignlabsandGitHub 64bd5cef35 Update opensign.yaml 2024-05-13 19:06:46 +05:30
prafull-opensignlabsandGitHub 4eb511e76e Update opensign.yaml 2024-05-13 19:01:23 +05:30
prafull-opensignlabsandGitHub 6e7fa2a7f8 add documentation for folder api 2024-05-13 18:51:48 +05:30
prafull-opensignlabsandGitHub 1e3765990a Update opensign.yaml 2024-05-13 14:11:53 +05:30
prafull-opensignlabsandGitHub 2ef608fa33 add resend mail api 2024-05-13 11:50:04 +05:30
AmolandGitHub 479878a59d Update primary color 2024-05-07 16:28:09 +05:30
AmolandGitHub 475eba8b7e Update index.js 2024-04-24 18:06:24 +05:30
AmolandGitHub c0ddec8896 Update index.js 2024-04-24 18:02:41 +05:30
prafull-opensignlabsandGitHub 38cd32b8c8 Update opensign.yaml 2024-04-22 19:49:00 +05:30
prafull-opensignlabsandGitHub 9a6ee0397b Update opensign.yaml 2024-04-22 19:29:13 +05:30
prafull-opensignlabsandGitHub 57f7bf6375 add all widgets json 2024-04-22 19:11:46 +05:30
AmolandGitHub 93f3cd7868 Update docusaurus.config.js 2024-04-21 16:11:20 +05:30
AmolandGitHub 157b5a891e Update run-locally.md 2024-04-20 22:12:36 +05:30
AmolandGitHub fcd10703a8 Update sign-yourself.md 2024-04-15 12:15:03 +05:30
AmolandGitHub d17a8524c5 Update sign-yourself.md 2024-04-15 12:12:57 +05:30
AmolandGitHub 2d42013fed Update index.js 2024-04-14 17:23:56 +05:30
AmolandGitHub 5288fe1512 Update index.js 2024-04-14 17:18:40 +05:30
AmolandGitHub 3988361471 Update run-locally-windows.md 2024-04-14 16:45:57 +05:30
AmolandGitHub 62204bda9d Update list-grid-view.md 2024-04-14 16:37:37 +05:30
AmolandGitHub 1ac4418d41 Create run-locally-windows.md 2024-04-14 16:35:09 +05:30
AmolandGitHub 23914274b5 Update run-locally.md 2024-04-14 16:30:27 +05:30
AmolandGitHub a668aa11db Update home page 2024-04-14 16:20:24 +05:30
AmolandGitHub 0aefb792dc Update list-grid-view.md 2024-04-12 17:19:11 +05:30
AmolandGitHub 54de1c1f5a Create navigate-between-pages.md 2024-04-12 17:08:32 +05:30
prafull-opensignlabsandGitHub f53f125e3e Update debugUI url 2024-04-03 09:37:00 +05:30
AmolandGitHub 0269647d75 Update disabledocumentid.md 2024-03-26 19:18:26 +05:30
AmolandGitHub 5fc05e7faa Rename profile.md to disabledocumentid.md 2024-03-26 16:59:44 +05:30
AmolandGitHub 8c3caed1fb Update profile.md 2024-03-26 16:59:15 +05:30
AmolandGitHub fbcb1fc47a fix: spelling mistakes 2024-03-26 16:46:16 +05:30
AmolandGitHub fdd6e64060 Update profile.md 2024-03-26 16:36:27 +05:30
AmolandGitHub 3dd88f2453 Update profile.md 2024-03-26 12:41:38 +05:30
prafull-opensignlabsandGitHub d06bfefc40 Update run-locally.md 2024-03-23 17:16:43 +05:30
prafull-opensignlabsandGitHub 30236206bc remove CI env variables 2024-03-23 15:52:51 +05:30
prafull-opensignlabsandGitHub 24b0231495 Update opensign.yaml 2024-03-19 13:16:14 +05:30
prafull-opensignlabsandGitHub 57946fea6d Update run-locally.md 2024-03-18 17:39:42 +05:30
prafull-opensignlabsandGitHub 187990ce05 Update run-locally.md 2024-03-18 17:29:58 +05:30
AmolandGitHub 8cfcecf440 Update s3.md 2024-03-12 12:35:29 +05:30
AmolandGitHub 041d290f0f Create _category_.json 2024-03-12 12:28:43 +05:30
AmolandGitHub 291791cb08 Update docusaurus.config.js 2024-03-12 12:24:58 +05:30
AmolandGitHub 3d081cb7a0 Create s3.md 2024-03-12 11:58:03 +05:30
AmolandGitHub 0201159b31 Update INSTALLATION.md 2024-03-12 11:55:47 +05:30
AndrewandGitHub 4caaa203bb Update docusaurus.config.js 2024-03-11 10:48:51 +05:30
AndrewandGitHub 783bd63da0 Update docusaurus.config.js 2024-03-11 10:46:06 +05:30
AndrewandGitHub 82a187fe46 Add sitemap 2024-03-11 10:43:09 +05:30
prafull-opensignlabsandGitHub 8ebf96f1e1 Update run-locally.md 2024-03-02 14:44:55 +05:30
prafull-opensignlabsandGitHub b25152a5e8 Update run-locally.md 2024-02-29 19:11:34 +05:30
prafull-opensignlabsandGitHub b1b488a8a0 Update INSTALLATION.md 2024-02-29 19:08:47 +05:30
prafull-opensignlabsandGitHub 8a76b92b5f Update run-locally.md 2024-02-29 15:31:01 +05:30
prafull-opensignlabsandGitHub 724f3a9724 Update run-locally.md 2024-02-29 15:29:40 +05:30
prafull-opensignlabsandGitHub 388d9cb29e Update run-locally.md 2024-02-29 15:22:55 +05:30
prafull-opensignlabsandGitHub 6b463c6f1a Update run-locally.md 2024-02-29 15:15:10 +05:30
prafull-opensignlabsandGitHub 4afca77d1e Update run-locally.md 2024-02-29 15:14:20 +05:30
prafull-opensignlabsandGitHub 53d8e60ec3 Update run-locally.md 2024-02-23 20:43:58 +05:30
prafull-opensignlabsandGitHub 23c22b79d8 Update run-locally.md 2024-02-23 20:40:39 +05:30
prafull-opensignlabsandGitHub 4943517145 Update run-locally.md 2024-02-23 20:12:42 +05:30
prafull-opensignlabsandGitHub c71398c6e3 Update run-locally.md 2024-02-23 20:09:39 +05:30
prafull-opensignlabsandGitHub dfaa278636 Update run-locally.md 2024-02-22 17:24:42 +05:30
prafull-opensignlabsandGitHub 139c3b42f5 Update run-locally.md 2024-02-22 17:18:16 +05:30
prafull-opensignlabsandGitHub d89c28334e Update run-locally.md 2024-02-22 17:15:31 +05:30
prafull-opensignlabsandGitHub 7638bcad02 Update run-locally.md 2024-02-22 17:15:13 +05:30
prafull-opensignlabsandGitHub 63090b82e3 Update run-locally.md 2024-02-22 17:11:07 +05:30
prafull-opensignlabsandGitHub 63b7cb8188 update info of env 2024-02-22 16:58:04 +05:30
prafull-opensignlabsandGitHub ad9dda27ba Update INSTALLATION.md 2024-02-22 16:39:14 +05:30
prafull-opensignlabsandGitHub 3f3137874a change sidebar position of installation instructions 2024-02-22 16:37:00 +05:30
prafull-opensignlabsandGitHub 440eaaeb26 Update title of installation instructiosn 2024-02-22 16:29:39 +05:30
prafull-opensignlabsandGitHub 2d6d8ce2be update run command 2024-02-22 16:25:45 +05:30
prafull-opensignlabsandGitHub 229d0731b8 Update INSTALLATION.md 2024-02-22 16:23:59 +05:30
prafull-opensignlabsandGitHub 418cd92f80 Update opensign.yaml 2024-02-16 19:56:49 +05:30
prafull-opensignlabsandGitHub 6e4ed4bc09 Update opensign.yaml 2024-02-16 16:43:42 +05:30
prafull-opensignlabsandGitHub 51b417aa7e Update opensign.yaml 2024-02-16 16:38:00 +05:30
prafull-opensignlabsandGitHub 0fc895ad17 Update opensign.yaml 2024-02-15 19:11:15 +05:30
prafull-opensignlabsandGitHub 2dea2172bc send in order 2024-02-15 19:04:20 +05:30
prafull-opensignlabsandGitHub fcd3c15ec7 Update opensign.yaml 2024-02-15 15:49:21 +05:30
prafull-opensignlabsandGitHub 4cd9b08698 Update opensign.yaml 2024-02-14 21:26:07 +05:30
prafull-opensignlabsandGitHub b21b641e2a Update opensign.yaml 2024-02-14 21:18:45 +05:30
prafull-opensignlabsandGitHub af9c8d71c6 removed binary api from document and template 2024-02-12 18:01:04 +05:30
prafull-opensignlabsandGitHub 8bd1891fcc Update opensign.yaml 2024-02-12 17:39:09 +05:30
prafull-opensignlabsandGitHub e5a62f17a5 Update opensign.yaml 2024-02-12 17:16:12 +05:30
prafull-opensignlabsandGitHub db383d0e88 Update opensign.yaml 2024-02-12 17:06:21 +05:30
prafull-opensignlabsandGitHub e519d86cad Update opensign.yaml 2024-02-09 17:31:54 +05:30
prafull-opensignlabsandGitHub bf68656d05 Update opensign.yaml 2024-02-09 13:56:43 +05:30
prafull-opensignlabsandGitHub 69913151b6 Update opensign.yaml 2024-02-09 13:47:27 +05:30
prafull-opensignlabsandGitHub 46312eb138 Update opensign.yaml 2024-02-09 12:43:17 +05:30
prafull-opensignlabsandGitHub 1a13936681 Update opensign.yaml 2024-02-09 12:35:33 +05:30
prafull-opensignlabsandGitHub 251ea22f5f Update opensign.yaml 2024-02-09 09:49:48 +05:30
prafull-opensignlabsandGitHub 8f8808ce1c Update opensign.yaml 2024-02-09 09:41:31 +05:30
prafull-opensignlabsandGitHub bb207b953c Update opensign.yaml 2024-02-09 09:35:34 +05:30
prafull-opensignlabsandGitHub 2984d6876d add event description in webhook 2024-02-09 09:25:56 +05:30
prafull-opensignlabsandGitHub 5d2b131c99 remove webhook description 2024-02-09 09:15:08 +05:30
prafull-opensignlabsandGitHub 43c9b4db9c Update opensign.yaml 2024-02-08 10:39:43 +05:30
prafull-opensignlabsandGitHub ce9e27e116 Update opensign.yaml 2024-02-08 10:29:28 +05:30
prafull-opensignlabsandGitHub e25b7deaf3 update description of webhook , create document, create template 2024-02-07 20:51:13 +05:30
prafull-opensignlabsandGitHub 81078073cb Update opensign.yaml 2024-02-02 18:48:59 +05:30
prafull-opensignlabsandGitHub e6e5db95ba Update opensign.yaml 2024-02-02 18:41:50 +05:30
prafull-opensignlabsandGitHub 2cf3af242b Update opensign.yaml 2024-02-02 12:30:49 +05:30
prafull-opensignlabsandGitHub ed664359a6 Update opensign.yaml 2024-02-01 19:46:46 +05:30
prafull-opensignlabsandGitHub 4a5e855b76 Update opensign.yaml 2024-01-29 18:40:43 +05:30
prafull-opensignlabsandGitHub 1e60863a40 Update opensign.yaml 2024-01-29 18:21:44 +05:30
prafull-opensignlabsandGitHub 10ad3ee5bd Update opensign.yaml 2024-01-29 18:20:02 +05:30
prafull-opensignlabsandGitHub 32c5a0a77a Update opensign.yaml 2024-01-29 15:16:37 +05:30
prafull-opensignlabsandGitHub b6651f12e2 Update opensign.yaml 2024-01-25 23:46:25 +05:30
prafull-opensignlabsandGitHub 15ad35bf76 fix: all body parameter must be in lowercase 2024-01-25 18:29:32 +05:30
prafull-opensignlabsandGitHub 9a986dd000 Update title of create template api 2024-01-24 23:40:13 +05:30
prafull-opensignlabsandGitHub 714146f616 update create template API 2024-01-24 23:34:25 +05:30
prafull-opensignlabsandGitHub 96d2b4e9fd Update createdocument api 2024-01-24 18:31:54 +05:30
prafull-opensignlabsandGitHub 122c42153e add webhook api 2024-01-24 12:37:58 +05:30
AmolandGitHub 32c4ee16a0 Create rename-document.md 2024-01-19 15:47:57 +05:30
AmolandGitHub 53cdb411b7 Update organize-documents.md 2024-01-19 15:36:10 +05:30
AmolandGitHub 0708e0ae1c Update intro.md 2024-01-19 15:27:29 +05:30
AmolandGitHub 95db24f8ed Delete docs/docs/help/New-Document/video-tutes.mdx 2024-01-19 15:26:58 +05:30
AmolandGitHub bcdd2e7feb Update REPORTING_GUIDELINES.md 2024-01-19 15:24:10 +05:30
AmolandGitHub 4adfa9f830 Update REPORTING_GUIDELINES.md 2024-01-19 15:23:30 +05:30
AmolandGitHub dcc8f99991 update video link 2024-01-19 14:57:01 +05:30
AmolandGitHub 3bdb56462d Update video-tutes.mdx 2024-01-19 14:47:50 +05:30
AmolandGitHub b8bffe97b5 Update video-tutes.mdx 2024-01-19 14:28:09 +05:30
AmolandGitHub af817b6bc3 Update video-tutes.mdx 2024-01-18 21:18:25 +05:30
nxglabs 8e1cbc65d7 update package lock 2024-01-18 21:10:41 +05:30
nxglabs e38a1f9c1a add help docs 2024-01-18 21:09:17 +05:30
nxglabs 50c3133dae docs updates 2024-01-18 21:09:17 +05:30
AmolandGitHub b1e2a74ad5 Create video-tutes.mdx 2024-01-18 20:40:56 +05:30
AmolandGitHub 7e9dc8cd65 Update package.json 2024-01-18 20:38:19 +05:30
AmolandGitHub 7d87cc27fc Update run-locally.md 2024-01-18 20:30:57 +05:30
AmolandGitHub 25714cde90 Update DigitalOcean.md 2024-01-18 20:28:23 +05:30
AmolandGitHub 8241482c19 Update run-locally.md 2024-01-18 20:23:11 +05:30
AmolandGitHub 3044e010f6 Update run-locally.md 2024-01-18 20:22:19 +05:30
AmolandGitHub 9743b933da Update DigitalOcean.md 2024-01-18 20:19:32 +05:30
AmolandGitHub 1ce8ec4758 Create run-locally.md 2024-01-18 20:16:38 +05:30
AmolandGitHub cb99b7646c Update intro.md 2024-01-18 20:14:56 +05:30
AmolandGitHub 5af7279c67 Delete docs/docs/self-host/tutorial-extras directory 2024-01-18 20:06:23 +05:30
AmolandGitHub 224d9f6787 Rename _category_.json to _category_.json 2024-01-18 20:06:11 +05:30
AmolandGitHub ed7df13f9b Update _category_.json 2024-01-18 20:05:55 +05:30
AmolandGitHub 2c5f6631d7 Delete docs/docs/self-host/tutorial-basics directory 2024-01-18 20:04:56 +05:30
AmolandGitHub a32b88f6b0 Rename docs/docs/self-host/oneclick-install_category_.json to docs/docs/self-host/One-click-Install/oneclick-install_category_.json 2024-01-18 20:02:49 +05:30
AmolandGitHub 88cb271332 Rename DigitalOcean.md to DigitalOcean.md 2024-01-18 20:02:15 +05:30
AmolandGitHub e18d1a7a16 Update DigitalOcean.md 2024-01-18 20:00:59 +05:30
AmolandGitHub b2dfc6f32c Update and rename create-a-page.md to DigitalOcean.md 2024-01-18 19:56:00 +05:30
AmolandGitHub a64e30a94c Update intro.md 2024-01-18 19:52:13 +05:30
AmolandGitHub 6d5b28f75f Update and rename docs/docs/self-host/tutorial-basics/_category_.json to docs/docs/self-host/oneclick-install_category_.json 2024-01-18 19:49:27 +05:30
AmolandGitHub c7decaec02 Update INSTALLATION.md 2024-01-18 19:45:33 +05:30
AmolandGitHub 8600437c5a Update COMMUNITY.md 2024-01-18 19:41:55 +05:30
AmolandGitHub ece3f42ab3 Update COMMUNITY.md 2024-01-18 17:20:06 +05:30
prafull-opensignlabsandGitHub 32be8dfe3a Update opensign.yaml 2024-01-17 17:01:26 +05:30
prafull-opensignlabsandGitHub 2aebceda24 remove duplicate header 2024-01-17 11:55:41 +05:30
prafull-opensignlabsandGitHub 85b463f0e0 Update description of apis 2024-01-17 11:23:43 +05:30
prafull-opensignlabsandGitHub f6c8d4f51a change request body for create document and template 2024-01-17 10:04:49 +05:30
AmolandGitHub b84c1c8821 Update server url 2024-01-16 18:14:10 +05:30
prafull-opensignlabsandGitHub a3334fdf2d remove code from response 2024-01-15 22:17:51 +05:30
prafull-opensignlabsandGitHub d6b12b75b0 Update create template template response 2024-01-15 16:09:15 +05:30
prafull-opensignlabsandGitHub a9e623391b Update response of create contact 2024-01-15 15:35:36 +05:30
prafull-opensignlabsandGitHub fd34ba778c Update opensign.yaml 2024-01-15 13:17:55 +05:30
prafull-opensignlabsandGitHub d00d31eaf2 Update response syntax 2024-01-15 13:03:23 +05:30
prafull-opensignlabsandGitHub 016a0f62bd Update opensign.yaml 2024-01-15 12:11:54 +05:30
prafull-opensignlabsandGitHub cf52292f7c Update documentlist 2024-01-15 11:59:17 +05:30
prafull-opensignlabsandGitHub 8b26c94ada Update document list api 2024-01-12 18:19:02 +05:30
prafull-opensignlabsandGitHub 582b10b5ee Update opensign.yaml 2024-01-12 13:23:34 +05:30
prafull-opensignlabsandGitHub b51e152d10 Update opensign.yaml 2024-01-12 12:35:01 +05:30
prafull-opensignlabsandGitHub 5f197f5f9f Update opensign.yaml 2024-01-12 11:03:13 +05:30
AmolandGitHub 5a3ee25dfd Add clean API docs step 2024-01-12 00:57:03 +05:30
AmolandGitHub 7050138e5e Add build api-docs step 2024-01-12 00:49:06 +05:30
prafull-opensignlabsandGitHub 049d268314 Update template section 2024-01-11 19:59:07 +05:30
prafull-opensignlabsandGitHub 6f71afb418 Update template section name 2024-01-11 17:08:54 +05:30
AndrewandGitHub 7e65692b5a Update CODE_OF_CONDUCT.md 2024-01-01 01:26:47 +05:30
AndrewandGitHub bd1f44479b Delete docs/docs/contribute/tutorial-extras directory 2024-01-01 01:22:47 +05:30
AndrewandGitHub c0935001ce Delete docs/docs/contribute/tutorial-basics directory 2024-01-01 01:22:24 +05:30
AndrewandGitHub f65ab5dfea Update CODE_OF_CONDUCT.md 2024-01-01 01:19:42 +05:30
AndrewandGitHub dbb7fd576f Create REPORTING_GUIDELINES.md 2024-01-01 01:17:56 +05:30
AndrewandGitHub be5cc6126e Update CODE_OF_CONDUCT.md 2024-01-01 01:16:33 +05:30
AndrewandGitHub 6a4eb24630 Update CODE_OF_CONDUCT.md 2024-01-01 01:14:59 +05:30
AndrewandGitHub 61a8bc519f Update sign-yourself.md 2024-01-01 01:10:45 +05:30
AmolandGitHub b15f3c0333 Update request-signatures.md 2023-12-30 00:44:56 +05:30
AmolandGitHub 5830fda578 Update request-signatures.md 2023-12-30 00:44:19 +05:30
AmolandGitHub 102f837263 Update intro.md 2023-12-28 01:30:14 +05:30
AmolandGitHub 5cee42a76e Update intro.md 2023-12-28 01:29:32 +05:30
AmolandGitHub 8fc7cc924a Update sign-yourself.md 2023-12-28 01:20:25 +05:30
AmolandGitHub 80170b814f Create COMMUNITY.md 2023-12-28 01:17:24 +05:30
AmolandGitHub 91fcb71bc3 Update intro.md 2023-12-28 01:13:45 +05:30
AmolandGitHub eb13d91bbb Create INSTALLATION.md 2023-12-28 01:11:46 +05:30
AmolandGitHub a464437b3a Create CODE_OF_CONDUCT.md 2023-12-28 01:10:31 +05:30
AmolandGitHub 3a67dc9b08 Update intro.md 2023-12-28 01:07:49 +05:30
AmolandGitHub a6ff20a657 Update intro.md 2023-12-28 01:00:24 +05:30
AmolandGitHub 4bf380edf8 Update intro.md 2023-12-28 00:58:03 +05:30
AmolandGitHub ab3148b705 Update intro.md 2023-12-28 00:55:20 +05:30
AmolandGitHub 2ffd1ebf2a Update sign-yourself.md 2023-12-28 00:54:17 +05:30
AmolandGitHub d1155bc8ef Update intro.md 2023-12-28 00:44:42 +05:30
AmolandGitHub 33ff706803 docs: Update dropbox icon documentation 2023-12-27 16:46:47 +05:30
nxglabs 7fdd819722 docs: update docs 2023-12-27 02:35:12 +05:30
AmolandGitHub aeaea23098 docs: fix build issue due to no closing img tag 2023-12-27 02:28:55 +05:30
AmolandGitHub ff7f45f055 docs: update screenshot 2023-12-27 02:26:04 +05:30
nxglabs 40665684a8 docs: update intro 2023-12-27 02:23:40 +05:30
nxglabs 861f822151 docs: update docs 2023-12-27 02:19:58 +05:30
nxglabs 62541f1450 docs: fix broken link 2023-12-25 03:30:46 +05:30
nxglabs a356e77f54 docs: fix broken link 2023-12-25 03:29:29 +05:30
nxglabs 74abeff8d9 docs: OpenAPI setup 2023-12-25 03:22:18 +05:30
AmolandGitHub 78dfaccd38 docs: fix broken link 2023-12-24 18:39:33 +05:30
AmolandGitHub 757b72161a docs: add closing img tag 2023-12-24 18:20:26 +05:30
AmolandGitHub c2065bf752 docs: move to other directory 2023-12-24 18:09:30 +05:30
AmolandGitHub 5608dae6e3 docs: add sign yourself documentation 2023-12-24 18:05:03 +05:30
AmolandGitHub 2288880eba docs: update intro 2023-12-24 17:25:32 +05:30
nxglabs ba7d0a9723 chore: add CNAME file for setting up custom domain 2023-12-18 23:09:19 +05:30
nxglabs 1ac8800b40 docs: setup help docs 2023-12-18 23:00:04 +05:30
nxglabs bb7827b762 chore: change the build directory 2023-12-18 20:56:52 +05:30
nxglabs 8caa0275ab chore: change working dir 2023-12-18 20:49:35 +05:30
nxglabs 7e1d0f8a49 chore: add debig code 2023-12-18 20:45:33 +05:30
nxglabs f7f5c2de37 chore: fix syntax issue 2023-12-18 20:44:09 +05:30
nxglabs f75710c836 fix syntax 2023-12-18 20:42:40 +05:30
nxglabs a02cc89e5d chore: change dir 2023-12-18 20:41:37 +05:30
nxglabs f54a51c546 chore: change yarn to npm 2023-12-18 20:38:07 +05:30
nxglabs b12eb87b38 chore: setup github pages action to publish docs 2023-12-18 20:34:20 +05:30
nxglabs 93f7408847 docs: add docs verson 1 2023-12-18 20:21:12 +05:30
494 changed files with 50368 additions and 90067 deletions
-246
View File
@@ -1,246 +0,0 @@
{
"projectName": "OpenSign",
"projectOwner": "OpenSignLabs",
"files": [
"README.md"
],
"commitType": "docs",
"commitConvention": "angular",
"contributorsPerLine": 7,
"contributors": [
{
"login": "ajakov",
"name": "Aleksandar Jakovljevic",
"avatar_url": "https://avatars.githubusercontent.com/u/2115393?v=4",
"profile": "https://aleksandarjakovljevic.com/",
"contributions": [
"code"
]
},
{
"login": "BuilderPrid",
"name": "Priyanshu Dwivedi",
"avatar_url": "https://avatars.githubusercontent.com/u/106882895?v=4",
"profile": "https://github.com/BuilderPrid",
"contributions": [
"code"
]
},
{
"login": "Tashuuuu",
"name": "Akriti Sengar",
"avatar_url": "https://avatars.githubusercontent.com/u/85075827?v=4",
"profile": "https://github.com/Tashuuuu",
"contributions": [
"code"
]
},
{
"login": "parthrc",
"name": "Parth Chawande",
"avatar_url": "https://avatars.githubusercontent.com/u/101104958?v=4",
"profile": "https://github.com/parthrc",
"contributions": [
"code"
]
},
{
"login": "Rishabh-git10",
"name": "Rishabh Dewangan",
"avatar_url": "https://avatars.githubusercontent.com/u/107680241?v=4",
"profile": "https://github.com/Rishabh-git10",
"contributions": [
"code"
]
},
{
"login": "LemonDrop847",
"name": "Nitin Mishra",
"avatar_url": "https://avatars.githubusercontent.com/u/106615670?v=4",
"profile": "https://github.com/LemonDrop847",
"contributions": [
"code"
]
},
{
"login": "Jobin-S",
"name": "Jobin Selvanose",
"avatar_url": "https://avatars.githubusercontent.com/u/63976083?v=4",
"profile": "http://jobinselvanose.com",
"contributions": [
"doc"
]
},
{
"login": "HansF",
"name": "Hans Fraiponts",
"avatar_url": "https://avatars.githubusercontent.com/u/1503?v=4",
"profile": "https://github.com/HansF",
"contributions": [
"doc"
]
},
{
"login": "Monilprajapati",
"name": "Monil Prajapati",
"avatar_url": "https://avatars.githubusercontent.com/u/99136041?v=4",
"profile": "http://linktr.ee/monilprajapati",
"contributions": [
"code"
]
},
{
"login": "Emm-dev0",
"name": "Edogbanya Emmanuel",
"avatar_url": "https://avatars.githubusercontent.com/u/97445413?v=4",
"profile": "https://emm-dev0.github.io/portfolio/",
"contributions": [
"bug"
]
},
{
"login": "pranav514",
"name": "pranav514",
"avatar_url": "https://avatars.githubusercontent.com/u/76992202?v=4",
"profile": "https://github.com/pranav514",
"contributions": [
"code"
]
},
{
"login": "arianxq",
"name": "Aria",
"avatar_url": "https://avatars.githubusercontent.com/u/122199576?v=4",
"profile": "https://github.com/arianxq",
"contributions": [
"code"
]
},
{
"login": "SoumyadiptoPal",
"name": "Soumyadipto Pal",
"avatar_url": "https://avatars.githubusercontent.com/u/119007659?v=4",
"profile": "https://github.com/SoumyadiptoPal",
"contributions": [
"code"
]
},
{
"login": "AndreyCurious",
"name": "Andrey Didenko",
"avatar_url": "https://avatars.githubusercontent.com/u/105622604?v=4",
"profile": "https://github.com/AndreyCurious",
"contributions": [
"code"
]
},
{
"login": "VishakhaSainani",
"name": "VishakhaSainani",
"avatar_url": "https://avatars.githubusercontent.com/u/113436770?v=4",
"profile": "https://github.com/VishakhaSainani",
"contributions": [
"code"
]
},
{
"login": "andrew-opensignlabs",
"name": "Andrew",
"avatar_url": "https://avatars.githubusercontent.com/u/148278535?v=4",
"profile": "https://github.com/andrew-opensignlabs",
"contributions": [
"code"
]
},
{
"login": "rishabjasrotia",
"name": "Rishab",
"avatar_url": "https://avatars.githubusercontent.com/u/33950743?v=4",
"profile": "https://github.com/rishabjasrotia",
"contributions": [
"code"
]
},
{
"login": "maoo",
"name": "Maurizio Pillitu",
"avatar_url": "https://avatars.githubusercontent.com/u/327285?v=4",
"profile": "https://session.it",
"contributions": [
"bug"
]
},
{
"login": "lsprr",
"name": "Luis Parra",
"avatar_url": "https://avatars.githubusercontent.com/u/16653744?v=4",
"profile": "https://luisparra.dev",
"contributions": [
"a11y"
]
},
{
"login": "Govinda04",
"name": "Govinda Kocharekar",
"avatar_url": "https://avatars.githubusercontent.com/u/50038172?v=4",
"profile": "https://github.com/Govinda04",
"contributions": [
"code"
]
},
{
"login": "crediblebilal",
"name": "Bilal Ahmad Bhat",
"avatar_url": "https://avatars.githubusercontent.com/u/55330484?v=4",
"profile": "https://bilal.cc",
"contributions": [
"code"
]
},
{
"login": "VikramNagwal",
"name": "Vikram",
"avatar_url": "https://avatars.githubusercontent.com/u/123088024?v=4",
"profile": "https://github.com/VikramNagwal",
"contributions": [
"code"
]
},
{
"login": "ugoconsonni",
"name": "ugoconsonni",
"avatar_url": "https://avatars.githubusercontent.com/u/13661702?v=4",
"profile": "https://github.com/ugoconsonni",
"contributions": [
"code"
]
},
{
"login": "daniel-mutwiri",
"name": "Daniel Mutwiri",
"avatar_url": "https://avatars.githubusercontent.com/u/8936960?v=4",
"profile": "https://github.com/daniel-mutwiri",
"contributions": [
"code"
]
},
{
"login": "Zathiel",
"name": "Zathiel",
"avatar_url": "https://avatars.githubusercontent.com/u/26553418?v=4",
"profile": "https://github.com/Zathiel",
"contributions": [
"code"
]
},
{
"login": "1024mb",
"name": "1024mb",
"avatar_url": "https://avatars.githubusercontent.com/u/9301204?v=4",
"profile": "https://github.com/1024mb",
"contributions": [
"translation"
]
}
]
}
-58
View File
@@ -1,58 +0,0 @@
# Frontend config ************************************************************************************************************************************************************************************************
# Set it to the URL form where the app home page will be accessed
PUBLIC_URL=https://app.opensignlabs.com/
# Set it to true if you want to generate the Sourcemap for debugging
GENERATE_SOURCEMAP=false
# Set it to the URL from where APIs will be accessible, for local development it should be localhost:3000/api/app (use your local port number instead)
REACT_APP_SERVERURL=https://app.opensignlabs.com/api/app
# A 12 character long random app identifier. The value of this should be same as APP_ID which is a variable used by backend API.
REACT_APP_APPID=opensign
# Google tag manager container id for configuring GTM on all pages of the app
REACT_APP_GTM=GTM-123N7LD
# Backend ExpressJS config ****************************************************************************************************************************************************************************************
# A 12 character long random app identifier. The value of this should be same as REACT_APP_APPID which is a variable used by Frontend React App.
APP_ID=opensign
# Name of the app. It will be visible in the verification emails sent out.
appName=open_sign_server
# A 12 character long random secret key that allows access to all the data. It is used in Parse dashboard config to view all the data in the database.
MASTER_KEY=XnAadwKxxByMr
# Mongodb URI to connect to
MONGODB_URI=mongodb://username:password@localhost:27017
# Path on which APIs should be mounted. Do not change this. This variable shall be removed & value hardcoded in the source code in coming versions.
PARSE_MOUNT=/app
# Set it to the URL from where APIs will be accessible to the NodeJS functions, for local development it should be localhost:3000/api/app (use your local port number instead)
SERVER_URL=https://app.opensignlabs.com/api/app
# Storage config ************************************************************************************************************************************************************************************************
# Digital ocean space name or AWS S3 bucket name for uploading documents
DO_SPACE=DOSPACENAME
# Digital ocean spaces endpoint or AWS S3 endpoint for uploading documents
DO_ENDPOINT=ams3.digitaloceanspaces.com
# Digital ocean baseurl or AWS S3 base URL
DO_BASEURL=https://DOSPACENAME.ams3.digitaloceanspaces.com
# Digital ocean spaces access key ID or AWS s3 Access key ID for uploading the docs
DO_ACCESS_KEY_ID=
# Digital ocean spaces secret access key or AWS s3 secret access key for uploading the docs
DO_SECRET_ACCESS_KEY=
# Digital ocean spaces region or AWS s3 region
DO_REGION=us-west
# Set this to true id you are using local storage instead of s3 compatible storage
# USE_LOCAL=TRUE
# Email mailgun or set SMTP_ENABLE true to use SMTP config (The app will not initialize if any of these 3 variables are not set) *********************************************************************************************************************
MAILGUN_API_KEY=XXXXX
MAILGUN_DOMAIN=mail.yourdomain.com
MAILGUN_SENDER=postmaster@mail.yourdomain.com
SMTP_ENABLE=
SMTP_HOST=
SMTP_PORT=
SMTP_USER_EMAIL=
SMTP_PASS=
# Base64 encoded PFX or p12 document signing certificate file *********************************************************************************************************************
PFX_BASE64=
# Provide Pass pharse of above PFX or p12 document
PASS_PHRASE=
-114
View File
@@ -1,114 +0,0 @@
# Clone the repo and rename this file to .env if you want to run the frontend react app locally for some quick contributions to the project.
# When used as it is, this env config will connect to our hosted UAT backend
# Note that any data in staging will get cleared from time to time and you may have to sign up again and again
# Set it to the URL form where the app home page will be accessed
PUBLIC_URL=https://localhost:3001
# Set it to true if you want to generate the Sourcemap for debugging
GENERATE_SOURCEMAP=false
# Set it to the URL from where APIs will be accessible, for local development it should be localhost:3000/api/app (use your local port number instead)
# REACT_APP_SERVERURL=http://localhost:8080/app
# (DEPRECATED) This should not be changed if provided; it should be 'opensign'.
REACT_APP_APPID=opensign
# Backend ExpressJS config ****************************************************************************************************************************************************************************************
# Name of the app. It will be visible in the verification emails sent out.
appName=open_sign_server
# A 12 character long random secret key that allows access to all the data. It is used in Parse dashboard config to view all the data in the database.
MASTER_KEY=XnAadwKxxByMr
# Mongodb URI to connect to
MONGODB_URI=mongodb://mongo-container:27017/OpenSignDB
# Path on which APIs should be mounted. Do not change this. This variable shall be removed & value hardcoded in the source code in coming versions.
PARSE_MOUNT=/app
# Set it to the URL from where APIs will be accessible to the NodeJS functions, for local development it should be localhost:3000/api/app (use your local port number instead)
SERVER_URL=http://127.0.0.1:8080/app
# Storage config ************************************************************************************************************************************************************************************************
# Digital ocean space name or AWS S3 bucket name for uploading documents
DO_SPACE=DOSPACENAME
# Digital ocean spaces endpoint or AWS S3 endpoint for uploading documents
DO_ENDPOINT=ams3.digitaloceanspaces.com
# Digital ocean baseurl or AWS S3 base URL
DO_BASEURL=https://DOSPACENAME.ams3.digitaloceanspaces.com
# Digital ocean spaces access key ID or AWS s3 Access key ID for uploading the docs
DO_ACCESS_KEY_ID=
# Digital ocean spaces secret access key or AWS s3 secret access key for uploading the docs
DO_SECRET_ACCESS_KEY=
# Digital ocean spaces region or AWS s3 region
DO_REGION=us-west
# local storage
USE_LOCAL=true
# Email mailgun or set SMTP_ENABLE true to use SMTP config (The app will not initialize if any of these 3 variables are not set) *********************************************************************************************************************
MAILGUN_API_KEY=
MAILGUN_DOMAIN=mail.yourdomain.com
MAILGUN_SENDER=postmaster@mail.yourdomain.com
SMTP_ENABLE=true
SMTP_HOST=smtp.yourhost.com
SMTP_PORT=443
SMTP_USER_EMAIL=mailer@yourdomain.com
SMTP_PASS=password # if your password includes spaces then write password in single quotes ('asdf pasd asdf bgds').
# Base64 encoded PFX or p12 document signing certificate file *********************************************************************************************************************
PFX_BASE64='MIIKCQIBAzCCCc8GCSqGSIb3DQEHAaCCCcAEggm8MIIJuDCCBG8GCSqGSIb3DQEH
BqCCBGAwggRcAgEAMIIEVQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIpumu
bFabBWACAggAgIIEKDqHS7Icd5MzIBk1dBokGK2s+5a2fA4308WA1QzEWmczqVYI
z6lYmW8qsiZIw4PFkRzdIx1+zCmP8jgWiiqh5RKnbHYmh1JPNyx9SqmUDILDXmjg
KxO9agRw9LXge4hgRL7YW0TxYZYw4EeXV9Yr7kcOq9DoO2MoRikJ+2Tuvvq/hfuV
9zFHsz4jpf7W95k1IeH6bZ92klz5R1e/EK8JuHy592i/u+BxxW1vTkiPpTaHD6s9
1lDSkT1j0LIDU6l9gVvJvFBV8j88vet/Z4QkTbHPMYvBnKNRstKuOvDasEJE4RkA
PV4TfBwFF6uvREZI1vBboM/18pzeyjoRX+mlJNfcH3kh1tkck+Jg+M2bLXAH1EdD
GRwENvnTNW1CFIn37VVja7SFBQNXA+E6rejmqtUmZ5XktSINDBUyjow9XuYTUtI/
sgcRSC0aB0EKKpphbFPp1niKCLm1ef33e+bWyWbtR2L2Kc3ETmhjNADpyapAGmzc
LP2BafGaKj18KiLAG4GL6+kXk0GUz7Fw5q8H8RY1T33o+xjWvC0+aJgvr65qWdKw
+ug6wuu4Cr2kFEuXxPKsnYqmE5NT/x+lfunlZ5iEQN3w2XO5J2u2eMXVRUsPH2T6
0sJKomjY0RB1JsqZBnyleWm+tYo0RpVAyJ3NGBp9dVb7a3Qw6jNZBG/xMW+gvtUJ
q6hfK/cD3cagD0NQFVD5STMOuGOSqq/bbwAKjZ/lrPmCCYATKwkjAFybYfHJVrrW
Y2tQgCQ/zrZLIxQjp7F17hU0+gT54x0MpF6AoqIM/qqNnHrQ0fi50ECmLvx3SqYa
nvjvt/HZhMZfqRXiXjeicIwpnNoG7+uQknySk+7cc9GNhHZR7cfPfkTpgvuuebrQ
l5YW+k9tG+xrX8g72nvtFMnammlBixlFwECJaEszEQk5tc2ti8uG2z+kGnFoDoBV
M6ZVMpKDJzXPxLdzT6ChIPyatjIkqOKe6vDpnmzcoEhbBhmtkVjWFA2dfX846ugV
y1QiecWgk8pMNWhh3IDd05v/wzbFwNcq+Gi+1dZsPmFH+egIcrQKZu2r3jCJtGHh
DNG/nyf/anqvKXF90bi4hRT3vdDXXuWgY7EUwfn9h5jYabCO6HsQxQOBjFYNmBrh
MfaiBZe72E8fzNAfIlwDcJ4AWY1SOM7hi8bqfRWw1NtNxuMUiRFoR31O6XkQauye
9hAmpdlZHZXtJ6LM0QaWkPJmG3058GMtIn/qS60V9nINh+zXhwza/1pnFB+e9MWc
hAPgo0nn55FusM//g1nM31PKe+nOm3Jyp0nEQ4m8aDtJS63o2fvp3e2KJbPWQMHE
a83W975diWg4NTdevV9lFpNllHclVoPoavUHIzHd7HF9TcPpjbXJSUZ7cITHHefr
kQTa/2G9cWuRhN9GKIHBdr13nfEvMIIFQQYJKoZIhvcNAQcBoIIFMgSCBS4wggUq
MIIFJgYLKoZIhvcNAQwKAQKgggTuMIIE6jAcBgoqhkiG9w0BDAEDMA4ECDgnjfOf
AjArAgIIAASCBMgkbVuptroBdyMY5gl/eBQj5+iAV02YSaF969ihStLSWI4x5FAf
HuDgqCyEMSl4RHG8ZvNaO9JoNfIpMK/TPQBoQRCzE2Vjf66VTERaQtU6h7tZrbQt
K96n9eqvohm/vXbXe08fsodYp2s79kAvKgpuGG5iX77qYVzJHBPed87cvczo4ToP
CpurDpByt8fGEmjtcikal8o+H9uoHjcFwqMigX1Q7IEjuKXrb5e6wTvxMRob8yfv
LVl6ahteKSkWCMb6rLZ5f12jDoCGX/YXRrSsU9t/lXe0Nxv5i7c8flb2EsNtwygD
fexVvn5u6ble6RDYNpuQkPgF41HyZh+JvGAF6i1r4tJPL9Pf4HnjEB8Y8IHgon+w
T5I+8LTgcrWyhptzblXMjKySTEp9OEa2cCVwZkl4z43PWJ5oIAQ2IDTOQ603/5o/
d9KA76/zMPQ5O0gv17OA7kwFv98v6sTcR4vgkQZqnyDpJSEPHyNxhw2MSBqS3jq3
YPhRz+3Ei1oFp9uYFhzn39f9gzNi++X9pOjSrDb8v3mcDXZKNrxQLuoRMSf0eQNI
dgJRqj/fuqNZ5ac3kd4P5BALCsnA1tM27zYrgUdpOnrc2D9FBthEjpRlQKMMzhQf
cNMFWmoNjakDilvvLcsQeQ3P6cXbN1ODoNnjgK3VzcmeKyzW2PrTXEPHARUM3j4V
sZzGaUOVKLqaaDrXWQKC0vrTvxP2WMfjQ1dTdXQP/kSZTXRC5rtB9tky38flBor0
N9rhUDIGMs5qBvyrkV2hKXiW39G69p1KWY+Cw28AzY+CNSjePRi60TsnUxgcOS7i
0AT25Gx3A4YqxmTY38MPB4wPcBPcw4hjNoQamaC9mqs+KVHcP5YHUlqykMeH0YVi
J+ehytJE9xuDcfBOjxjadxp3/q/Lku4rky89gdJGFQWuuz75VulDywPRZRwmQTel
sjEGMHR1zTOlPJdTDWhqaKmWvL4GhbCgEPIKwmqd1QKRTl/3Baa1nYllJeYVwiTT
qLCkbA6qXrLGj1ENZxrKn9yqr8HwOoApjwhARu4LF/BRMgdkzelK2kOXHnZ26sZ2
NY/MMtVmq4c59y6iQwmsbHr9tWGz3ahyXcZZufjNXU/AVnO1c92g7umAWZF4RohL
gMmh57cAhN9PEbEv6j/6BT3XXp8jB0ywcRriYxfxwidviCKH/76Q4sytYJQaDFI1
fnzmv0aDotbG2BdpWSiYPDOPm+3cmfjlULsn1FYWL4NDCX1f+C4lNtKVX9LU8c5M
m8dA1DUlDfnuNO5/BShuoGXG2z4O/XwxIaRFizMxWS2sWurbAEFJ6oNw3kC7WSah
NIe8aUC1umpc1Gk3X2f4Ytzj9OEqn0y55qoqLINJuejXMffF/gjopxHWadLVaVaj
Q1SewrECuEXdSbBR/a10po24wmRtkmlvRJXJl7sG95xE5ZCqp+m6sRPWGdf1yKbV
vyWNUe4Qvkxe4a0VAJpTyIGr980CKz/jkvtNQMobGl7AfhxKJ450wg454WcexMct
BYXvZMSdUDCgMLlh0nHJHl5btrFWqE0Z/fqWmIknZL2jZ4J+2hdVl/xB/sUt6kcu
txw+RfL+vNE8PxhTNaOdJFwD8yeN1mJ3yMUA8HHYpw9yljgxJTAjBgkqhkiG9w0B
CRUxFgQUDYlgGVxSxuOknhQc256x3++7BDwwMTAhMAkGBSsOAwIaBQAEFFjASdYl
3pXAXxZuvVvv9tsb4bdrBAhyb+KCIjp/gAICCAA='
# Provide Pass pharse of above PFX or p12 document
PASS_PHRASE=opensign
# (DEPRECATED) This should not be changed if provided; it should be 'opensign'.
APP_ID=opensign
+5 -15
View File
@@ -1,15 +1,8 @@
name: ci
# 👇 add this block
permissions:
contents: read # allow checkout & metadata-action to read repo
id-token: write # needed by docker/metadata-action v4
on:
push:
branches:
- 'main'
- 'staging'
jobs:
docker:
@@ -17,10 +10,10 @@ jobs:
strategy:
matrix:
include:
- image: opensign/opensign
dockerfile: apps/OpenSign/Dockerhubfile
- image: opensign/opensignserver
dockerfile: apps/OpenSignServer/Dockerhubfile
- image: amolshejole/OpenSign
dockerfile: apps/OpenSign/Dockerfile
- image: amolshejole/OpenSignServer
dockerfile: apps/OpenSignServer/Dockerfile
steps:
-
name: Checkout
@@ -38,11 +31,8 @@ jobs:
with:
images: ${{ matrix.image }}
-
name: Debug - List files opensign
name: Debug - List files
run: ls -R apps/OpenSign/ # Adjust the path as needed
-
name: Debug - List files opensignserver
run: ls -R apps/OpenSignServer/ # Adjust the path as needed
-
name: Build and push
uses: docker/build-push-action@v4
+50
View File
@@ -0,0 +1,50 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- feat-docs
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
permissions:
contents: write
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install dependencies
working-directory: ./docs
run: npm ci
- name: Clean api-docs
working-directory: ./docs
run: npm run docusaurus clean-api-docs all
- name: Build api-docs
working-directory: ./docs
run: npm run docusaurus gen-api-docs all
- name: Build website
working-directory: ./docs
run: npm run build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
-7
View File
@@ -1,7 +0,0 @@
{$HOST_URL} {
reverse_proxy client:3000
handle_path /api/* {
reverse_proxy server:8080
rewrite * {uri}
}
}
-29
View File
@@ -1,29 +0,0 @@
# INSTALLATON INSTRUCTIONS HAS A NEW HOME
We've updated our installation instructions and moved them to our dedicated documentation portal to provide you with a better experience and updated guidance. Whether you're looking to self-host OpenSign™ or contribute to its development, you can find detailed instructions tailored to your needs at [docs.opensignlabs.com](https://docs.opensignlabs.com).
## Self Hosting
If you're interested in self-hosting OpenSign™, our new documentation portal provides comprehensive, step-by-step instructions to help you set up OpenSign™ in your own environment. This section is designed for system administrators and those looking to deploy OpenSign™ within their organization or for personal use.
- **Access Self Hosting Instructions:** [Self Hosting Guide](https://docs.opensignlabs.com/docs/category/docker)
## Contributors
For developers and contributors who are looking to build upon or contribute to OpenSign™, we've prepared a separate section that covers the setup, development environment configuration, and guidelines for contributing to the OpenSign™ project.
- **Access Contributor Instructions:** [Contributors Guide](https://docs.opensignlabs.com/docs/contribute/INSTALLATION)
## Additional Resources
Should you need further assistance or have any questions, please feel free to reach out to us through our support channels:
- **Twitter:** [OpenSignHQ on Twitter](https://twitter.com/OpenSignHQ)
- **Facebook:** [OpenSign on Facebook](https://www.facebook.com/profile.php?id=61551030403669)
- **LinkedIn:** [OpenSign™ on LinkedIn](https://www.linkedin.com/company/opensign%E2%84%A2/)
- **Discord:** [Join our Discord Community](https://discord.com/invite/opensign)
- **YouTube:** [OpenSignHQ on YouTube](https://www.youtube.com/@opensignhq)
We are committed to providing you with the support you need to successfully install and use OpenSign™. Visit our website at [www.opensignlabs.com](https://www.opensignlabs.com) for more information about our project and its features.
-666
View File
@@ -1,666 +0,0 @@
* All content that resides under the "apps/OpenSignServer/cloud/customRoute" directory of this repository, if that directory exists, is licensed under the license defined in "apps/OpenSignServer/cloud/customRoute".
* All third party components incorporated into the OpenSign Software are licensed under the original license provided by the owner of the applicable component.
* Content outside of the above mentioned directories or restrictions above is available under the "GNU AFFERO GENERAL PUBLIC LICENSE" as defined below -
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
-10
View File
@@ -1,10 +0,0 @@
build:
@echo "Building with HOST_URL=${HOST_URL}"
cp .env.local_dev .env
cd apps/OpenSign && cp ../../.env.local_dev .env && npm install && npm run build
HOST_URL=${HOST_URL} docker compose up --build --force-recreate
run:
@echo "Building with HOST_URL=${HOST_URL}"
cp .env.local_dev .env
docker compose up -d
-178
View File
@@ -1,178 +0,0 @@
<h1 align="center"><a href='https://www.opensignlabs.com'><img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/e518cc9c-5de3-47da-950b-f93336b9f14e></a>
</h1><div align="center">
[The free and open source alternative to DocuSign](https://www.opensignlabs.com)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/opensignlabs/opensign.svg)](http://isitmaintained.com/project/opensignlabs/opensign "Average time to resolve an issue")
[![All Contributors](https://img.shields.io/github/all-contributors/opensignlabs/opensign?color=ee8449&style=flat-square)](#contributors)
![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/w/opensignlabs/opensign)
![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/opensignlabs/opensign)
<a href="https://www.opensignlabs.com/">Website</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://docs.opensignlabs.com">Help Docs</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://docs.opensignlabs.com/docs/API-docs/opensign-api-v-1">API Docs</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://www.opensignlabs.com/blog">Blog</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://discord.com/invite/xe9TDuyAyj">Discord</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://twitter.com/opensignlabs">Twitter</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://www.linkedin.com/company/opensign%E2%84%A2/about/">LinkedIn</a>
## The premier open source document signing solution(DocuSign alternative)
---
</div>
### Table of Contents
1. [Introduction](#introduction)
2. [Features](#features)
3. [Installation](#installation)
4. [Usage](#usage)
5. [Contribution Guidelines](#contribution-guidelines)
6. [License](#license)
7. [Acknowledgments](#acknowledgments)
---
Please star ⭐ the repo to support us! 😀
### Introduction
Welcome to OpenSign, the premier open source docusign alternative - document e-signing solution designed to provide a secure, reliable and free alternative to commercial esign platforms like DocuSign, PandaDoc, SignNow, Adobe Sign, Smartwaiver, SignRequest, HelloSign & Zoho sign. Our mission is to democratize the document signing process, making it accessible and straightforward for everyone.
---
### Features
- **Secure PDF E-Signing:** With the help of robust encryption algorithms, OpenSign™ ensures maximum security, privacy & compatibility. Now sign unlimited documents even on the [cloud hosted free version of OpenSign](https://www.opensignlabs.com/).
- **Annotate Documents:** OpenSign™ allows you to annotate PDF documents with an advanced signing pad that allows hand drawn signatures, uploaded images, typed signatures & saved signatures for the simplest open source document signing experience ever.
- **User-Friendly Interface:** OpenSign™ was built while keeping Intuitive design in mind for ease of use. Features like "Sign yourself", "Templates", "One click signatures" and "OpenSign™ Drive" makes it stand out of the crowd and even makes it better than a lot of so-called industry leaders. OpenSign intends to provide the best document signing experience in the open source ecosystem.
- **Multi-signer Support:** OpenSign's ability to invite multiple signers for signing along with the ability to invite by sharing signing links & being able to enforce signing in a sequence makes it the only open source solution that is fully loaded and allows it to compete head-to-head with established players in e-signature space.
- **Email Unique Code(OTP) verification support for guest signers:** With OpenSign™, your documents are fully secure even when being signed by guest users. Guest signers can only sign the document after entering a unique code sent to their email address. 
- **"Expiring Docs" & "Rejection":** You can set documents to expire after certain number of days after which nobody will be able to sign. Not just this, OpenSign™ also allows signers to reject signing a document with a reason that will be promptly shared with the sender.
- **Beautiful email templates:** All document signing invitations, completion notifications & reminders are formatted using great looking email templates. Not just this, you are even allowed to customise the email templates making your free document signing invitations look the way you always wanted them to be.
- **PDF Template Creation:** OpenSign™ allows you to create and store PDF document templates for repeated use thereby saving you a lot of time & collect e-signatures seamlessly.
- **OpenSign™ Drive:** It is a centralised secure vault for your digital documents that makes storing, signing, organizing, sharing & archieving your docs a breeze.
- **Audit Trails & completion certificate:** Being a security focused solution, OpenSign™ makes it a top priority to save detailed logs for tracking document activities along with time-stamps, IP addresses, email IDs & phone numbers. A completion certificate is generated as soon as document is completed which contains all the document related logs for added safety.
- **API Support:** OpenSign™ API allows seamless integration into existing systems and software. You can generate an API key from the app and refer the [official API docs](https://docs.opensignlabs.com/docs/API-docs/opensign-api-v-1) to start integrating it in your existing applications.
- **Integrations:** The open source document signing experience becomes even more seamless because of integrations with various Cloud storage systems, CRMs & enterprise platforms. We also have a Zapier integration that allows you to integrate it with virtually any application.
<img alt="Login page" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/8016edb6-7d6e-4185-ab72-82d2c4a16032" height='200' >
<img alt="Dash_board" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/6e7b96f7-3154-4c25-bc1e-caf33925cc47" height='200'>
<img alt="Widgets" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/7edb65bd-c265-4b3d-9758-38e79766c5c2" height='200'>
<img alt="Request Signature" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/1697ae46-dcac-41c9-a081-aded25693846" height='200'>
<img alt="Create template" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/c2060fda-50f1-4116-a532-51b94b48463a" height='200'>
<img alt="Manage_Template" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/90310c74-8271-49bd-8c5f-89daa5a623c4" height='200'>
<img alt="Folders" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/a52207e7-3b0e-497c-b5f6-747bc4e67918" height='200'>
<img alt="OpenSign_Confetti" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/8f4c6a6e-4a73-439c-9f34-f426044d0a7f" height='200'>
---
### Deploy
Note: The default MongoDB instance used in deployment is not persistant and will be cleared on every restart. To retain your data, configure and supply your own MongoDB connection URL.
#### DigitalOcean
[![Deploy on DigitalOcean](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/OpenSignLabs/Deploy-OpenSign-to-Digital-Ocean/tree/main&refcode=30db1c901ab0)
#### Docker
The simplest way to install OpenSign on your own server is using official docker images by running the following command -
**Command for linux/MacOS**
```
export HOST_URL=https://opensign.yourdomain.com && curl --remote-name-all https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/docker-compose.yml https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/Caddyfile https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/.env.local_dev && mv .env.local_dev .env.prod && docker compose up --force-recreate
```
**Command for Windows (Powershell)**
```
$env:HOST_URL="https://opensign.yourdomain.com"; Invoke-WebRequest -Uri https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/docker-compose.yml -OutFile docker-compose.yml; Invoke-WebRequest -Uri https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/Caddyfile -OutFile Caddyfile; Invoke-WebRequest -Uri https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/.env.local_dev -OutFile .env.local_dev; Rename-Item -Path .env.local_dev -NewName .env.prod; docker compose up --force-recreate
```
**Command for Windows (CMD/Terminal)**
```
set HOST_URL=https://opensign.yourdomain.com && curl -O https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/docker-compose.yml && curl -O https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/Caddyfile && curl -O https://raw.githubusercontent.com/OpenSignLabs/OpenSign/main/.env.local_dev && rename .env.local_dev .env.prod && docker compose up --force-recreate
```
Make sure that you have `Docker` and `git` installed before you run this command -
Please refer to the [Installation Guide](https://docs.opensignlabs.com/docs/self-host/docker/run-locally/) for detailed instructions on how to install OpenSign on your system.
---
### Usage
For comprehensive guidelines on how to use OpenSign™, please consult our [User Manual](USAGE.md).
---
### Contribution Guidelines
We welcome contributions from the open-source community. For more information on how to contribute, please read our [Contribution Guidelines](CONTRIBUTING.md).
---
### License
OpenSign is licensed under the AGPL-3 License. For more details, see the [LICENSE](LICENSE) file.
---
### Acknowledgments
We would like to thank all our contributors and users for their support and feedback. Special thanks to [OpenSignLabs](https://www.opensignlabs.com) for spearheading this initiative.
---
## Contributors
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://aleksandarjakovljevic.com/"><img src="https://avatars.githubusercontent.com/u/2115393?v=4?s=100" width="100px;" alt="Aleksandar Jakovljevic"/><br /><sub><b>Aleksandar Jakovljevic</b></sub></a><br /><a href="#code-ajakov" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BuilderPrid"><img src="https://avatars.githubusercontent.com/u/106882895?v=4?s=100" width="100px;" alt="Priyanshu Dwivedi"/><br /><sub><b>Priyanshu Dwivedi</b></sub></a><br /><a href="#code-BuilderPrid" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tashuuuu"><img src="https://avatars.githubusercontent.com/u/85075827?v=4?s=100" width="100px;" alt="Akriti Sengar"/><br /><sub><b>Akriti Sengar</b></sub></a><br /><a href="#code-Tashuuuu" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/parthrc"><img src="https://avatars.githubusercontent.com/u/101104958?v=4?s=100" width="100px;" alt="Parth Chawande"/><br /><sub><b>Parth Chawande</b></sub></a><br /><a href="#code-parthrc" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Rishabh-git10"><img src="https://avatars.githubusercontent.com/u/107680241?v=4?s=100" width="100px;" alt="Rishabh Dewangan"/><br /><sub><b>Rishabh Dewangan</b></sub></a><br /><a href="#code-Rishabh-git10" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/LemonDrop847"><img src="https://avatars.githubusercontent.com/u/106615670?v=4?s=100" width="100px;" alt="Nitin Mishra"/><br /><sub><b>Nitin Mishra</b></sub></a><br /><a href="#code-LemonDrop847" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://jobinselvanose.com"><img src="https://avatars.githubusercontent.com/u/63976083?v=4?s=100" width="100px;" alt="Jobin Selvanose"/><br /><sub><b>Jobin Selvanose</b></sub></a><br /><a href="#doc-Jobin-S" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/HansF"><img src="https://avatars.githubusercontent.com/u/1503?v=4?s=100" width="100px;" alt="Hans Fraiponts"/><br /><sub><b>Hans Fraiponts</b></sub></a><br /><a href="#doc-HansF" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://linktr.ee/monilprajapati"><img src="https://avatars.githubusercontent.com/u/99136041?v=4?s=100" width="100px;" alt="Monil Prajapati"/><br /><sub><b>Monil Prajapati</b></sub></a><br /><a href="#code-Monilprajapati" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://emm-dev0.github.io/portfolio/"><img src="https://avatars.githubusercontent.com/u/97445413?v=4?s=100" width="100px;" alt="Edogbanya Emmanuel"/><br /><sub><b>Edogbanya Emmanuel</b></sub></a><br /><a href="#bug-Emm-dev0" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pranav514"><img src="https://avatars.githubusercontent.com/u/76992202?v=4?s=100" width="100px;" alt="pranav514"/><br /><sub><b>pranav514</b></sub></a><br /><a href="#code-pranav514" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/arianxq"><img src="https://avatars.githubusercontent.com/u/122199576?v=4?s=100" width="100px;" alt="Aria"/><br /><sub><b>Aria</b></sub></a><br /><a href="#code-arianxq" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SoumyadiptoPal"><img src="https://avatars.githubusercontent.com/u/119007659?v=4?s=100" width="100px;" alt="Soumyadipto Pal"/><br /><sub><b>Soumyadipto Pal</b></sub></a><br /><a href="#code-SoumyadiptoPal" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/AndreyCurious"><img src="https://avatars.githubusercontent.com/u/105622604?v=4?s=100" width="100px;" alt="Andrey Didenko"/><br /><sub><b>Andrey Didenko</b></sub></a><br /><a href="#code-AndreyCurious" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/VishakhaSainani"><img src="https://avatars.githubusercontent.com/u/113436770?v=4?s=100" width="100px;" alt="VishakhaSainani"/><br /><sub><b>VishakhaSainani</b></sub></a><br /><a href="#code-VishakhaSainani" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/andrew-opensignlabs"><img src="https://avatars.githubusercontent.com/u/148278535?v=4?s=100" width="100px;" alt="Andrew"/><br /><sub><b>Andrew</b></sub></a><br /><a href="#code-andrew-opensignlabs" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rishabjasrotia"><img src="https://avatars.githubusercontent.com/u/33950743?v=4?s=100" width="100px;" alt="Rishab"/><br /><sub><b>Rishab</b></sub></a><br /><a href="#code-rishabjasrotia" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://session.it"><img src="https://avatars.githubusercontent.com/u/327285?v=4?s=100" width="100px;" alt="Maurizio Pillitu"/><br /><sub><b>Maurizio Pillitu</b></sub></a><br /><a href="#bug-maoo" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://luisparra.dev"><img src="https://avatars.githubusercontent.com/u/16653744?v=4?s=100" width="100px;" alt="Luis Parra"/><br /><sub><b>Luis Parra</b></sub></a><br /><a href="#a11y-lsprr" title="Accessibility">️♿️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Govinda04"><img src="https://avatars.githubusercontent.com/u/50038172?v=4?s=100" width="100px;" alt="Govinda Kocharekar"/><br /><sub><b>Govinda Kocharekar</b></sub></a><br /><a href="#code-Govinda04" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://bilal.cc"><img src="https://avatars.githubusercontent.com/u/55330484?v=4?s=100" width="100px;" alt="Bilal Ahmad Bhat"/><br /><sub><b>Bilal Ahmad Bhat</b></sub></a><br /><a href="#code-crediblebilal" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/VikramNagwal"><img src="https://avatars.githubusercontent.com/u/123088024?v=4?s=100" width="100px;" alt="Vikram"/><br /><sub><b>Vikram</b></sub></a><br /><a href="#code-VikramNagwal" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ugoconsonni"><img src="https://avatars.githubusercontent.com/u/13661702?v=4?s=100" width="100px;" alt="ugoconsonni"/><br /><sub><b>ugoconsonni</b></sub></a><br /><a href="#code-ugoconsonni" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/daniel-mutwiri"><img src="https://avatars.githubusercontent.com/u/8936960?v=4?s=100" width="100px;" alt="Daniel Mutwiri"/><br /><sub><b>Daniel Mutwiri</b></sub></a><br /><a href="#code-daniel-mutwiri" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Zathiel"><img src="https://avatars.githubusercontent.com/u/26553418?v=4?s=100" width="100px;" alt="Zathiel"/><br /><sub><b>Zathiel</b></sub></a><br /><a href="#code-Zathiel" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/1024mb"><img src="https://avatars.githubusercontent.com/u/9301204?v=4?s=100" width="100px;" alt="1024mb"/><br /><sub><b>1024mb</b></sub></a><br /><a href="#translation-1024mb" title="Translation">🌍</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project is tested with BrowserStack.
-1
View File
@@ -1 +0,0 @@
Please visit the official documentation [here](https://docs.opensignlabs.com).
-3
View File
@@ -1,3 +0,0 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
-6
View File
@@ -1,6 +0,0 @@
[tool.commitizen]
version = "0.1.0" # This should be your current semver version
version_files = [
"package.json:\"version\":",
"package-lock.json:\"version\":",
]
-2
View File
@@ -1,2 +0,0 @@
node_modules
npm-debug.log
-29
View File
@@ -1,29 +0,0 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"react/prop-types": 0,
"no-unused-vars": 1
},
"ignorePatterns": ["**/build/**", "**/*.config.js"],
"settings": {
"react": {
"version": "detect"
}
}
}
-25
View File
@@ -1,25 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
/mfbuild
# misc
.env
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
-5
View File
@@ -1,5 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx eslint '**/*.{js,jsx}'
npx pretty-quick --staged '**/*.{js,jsx}'
-7
View File
@@ -1,7 +0,0 @@
node_modules/
public/
build/
package.json
package-lock.json
dist/
docs/
-7
View File
@@ -1,7 +0,0 @@
{
"bracketSpacing": true,
"semi": true,
"trailingComma": "none",
"printWidth": 80,
"tabWidth": 2
}
-36
View File
@@ -1,36 +0,0 @@
# Use an official Node runtime as the base image
FROM node:22.14.0
# Set the working directory inside the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json first to leverage Docker cache
COPY apps/OpenSign/package*.json ./
# Install application dependencies
RUN npm install
# Copy the current directory contents into the container
COPY apps/OpenSign/ .
COPY apps/OpenSign/.husky .
COPY apps/OpenSign/entrypoint.sh .
# make the entrypoint.sh file executable
RUN chmod +x entrypoint.sh
# Define environment variables if needed
ENV NODE_ENV=production
ENV GENERATE_SOURCEMAP=false
# build
RUN npm run build
# Inject env.js loader into index.html
RUN sed -i '/<head>/a\<script src="/env.js"></script>' build/index.html
# Make port 3000 available to the world outside this container
EXPOSE 3000
ENTRYPOINT ["./entrypoint.sh"]
# Run the application
CMD ["npm", "start"]
-25
View File
@@ -1,25 +0,0 @@
# Open Sign
Open source is true platform to sign pdf with digital signature
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
-3
View File
@@ -1,3 +0,0 @@
module.exports = {
presets: ["@babel/preset-env", "@babel/preset-react"]
};
-213
View File
@@ -1,213 +0,0 @@
# Tailwind Dark Mode Usage Guide
## Overview
This guide shows how to use the new Tailwind utilities for better dark mode visibility in OpenSign.
## Button Styling
### VS Code-style Disabled Buttons
```jsx
// Option 1: Direct VS Code styling
<button className="op-btn op-btn-primary op-btn-vscode-disabled" disabled>
Disabled Button
</button>
// Option 2: Themed disabled styling
<button className="op-btn btn-themed-disabled">
Themed Button
</button>
// Option 3: Conditional styling
<button
className={`op-btn op-btn-primary ${isDisabled ? 'op-btn-vscode-disabled' : ''}`}
disabled={isDisabled}
>
Dynamic Button
</button>
```
## Icon Styling
### Theme-aware Icons
```jsx
// Better visibility in dark mode
<i className="fa-light fa-folder icon-improved"></i>
// Muted but still visible
<i className="fa-light fa-plus icon-muted"></i>
// Disabled state
<i className="fa-light fa-trash icon-disabled"></i>
```
### CSS Variable Approach
```jsx
// Using CSS variables
<i className="fa-light fa-search icon-themed"></i>
<i className="fa-light fa-settings icon-themed-muted"></i>
// Inline styles with CSS variables
<i
className="fa-light fa-plus"
style={{ color: 'var(--icon-color)' }}
/>
```
### Legacy JavaScript Function (Still Supported)
```jsx
// Existing approach - still works
<i
className="fa-light fa-plus"
style={{ color: getThemeIconColor() }}
/>
```
## Text Styling
### Improved Gray Text
```jsx
// These automatically improve in dark mode
<span className="text-gray-500">More visible in dark mode</span>
<span className="text-gray-400">Muted but readable</span>
<span className="text-gray-600">Clear text</span>
```
## Complete Examples
### Toolbar with Better Visibility
```jsx
const Toolbar = () => (
<div className="flex space-x-2 p-2">
<button className="p-2 hover:bg-gray-200 rounded">
<i className="fa-light fa-plus icon-improved"></i>
</button>
<button className="p-2 hover:bg-gray-200 rounded" disabled>
<i className="fa-light fa-trash icon-disabled"></i>
</button>
<button className="p-2 hover:bg-gray-200 rounded">
<i className="fa-light fa-edit icon-improved"></i>
</button>
</div>
);
```
### Form with Disabled States
```jsx
const Form = ({ isSubmitting }) => (
<form>
<input className="op-input" />
<button
className={`op-btn op-btn-primary ${isSubmitting ? 'op-btn-vscode-disabled' : ''}`}
disabled={isSubmitting}
>
{isSubmitting ? 'Submitting...' : 'Submit'}
</button>
</form>
);
```
## React-Tour and Tooltip Dark Mode Support
### React-Tour Modals
The react-tour modals now automatically support dark mode with VS Code-inspired styling:
```jsx
// These components automatically get dark mode styling
<Tour
onRequestClose={closeTour}
steps={tourConfig}
isOpen={isOpen}
rounded={5}
/>
```
### ReactTooltip Components
All ReactTooltip instances now support dark mode:
```jsx
// Automatically styled for dark mode
<ReactTooltip id="my-tooltip" className="z-[999]">
<div className="max-w-[200px]">
<p>Tooltip content</p>
</div>
</ReactTooltip>
```
### HoverCard Balloon UI
The balloon tooltips in OpenSign Drive now properly support dark mode:
```jsx
// These automatically get dark styling in dark mode
<HoverCard>
<HoverCardContent>
Document information
</HoverCardContent>
</HoverCard>
```
## Dark Mode Features Added
### 1. **React-Tour Modal Styling**
- Background: `#1F2937` (VS Code modal background)
- Text: `#E5E7EB` (soft white for readability)
- Borders: `#374151` (subtle borders)
- Buttons: VS Code-style primary/secondary buttons
### 2. **ReactTooltip Styling**
- Background: `#1F2937` with proper contrast
- Border: `#374151` for definition
- Box shadow: Enhanced for dark backgrounds
- Text: `#E5E7EB` for optimal readability
### 3. **HoverCard Balloon UI**
- Background: `#1F2937` (matches VS Code)
- Text: `#E5E7EB` for readability
- Arrow: Automatically matches background color
- Enhanced shadows for dark backgrounds
### 4. **React-Datepicker Support**
- Calendar background: `#1F2937`
- Selected dates: VS Code blue (`#007ACC`)
- Hover states: Proper contrast ratios
- Navigation arrows: Themed appropriately
## CSS Classes Reference
| Class | Purpose | Dark Mode Color |
|-------|---------|----------------|
| `icon-improved` | Better icon visibility | `#CCCCCC` |
| `icon-muted` | Muted but visible icons | `#999999` |
| `icon-disabled` | Disabled icon state | `#858585` |
| `op-btn-vscode-disabled` | VS Code disabled button | Background: `#3C3C3C` |
| `btn-themed-disabled` | Themed disabled button | Uses CSS variables |
| `icon-themed` | Variable-based icon color | `var(--icon-color)` |
| `.reactour__helper` | `#1F2937` background |
| `.react-tooltip` | `#1F2937` background |
| `.HoverCardContent` | `#1F2937` background |
| `.react-datepicker` | `#1F2937` background |
## Migration Guide
### From JavaScript Function to Tailwind
```jsx
// Before
<i style={{ color: getThemeIconColor() }} className="fa-light fa-plus" />
// After
<i className="fa-light fa-plus icon-improved" />
```
### From Hardcoded Colors to Theme-aware
```jsx
// Before
<i className="fa-light fa-plus text-gray-500" />
// After (automatic improvement)
<i className="fa-light fa-plus text-gray-500" />
// OR explicitly
<i className="fa-light fa-plus icon-improved" />
```
## Migration Notes
All existing tooltip and tour components will automatically inherit the new dark mode styling when the theme is set to `opensigndark`. No code changes required for existing implementations.
-29
View File
@@ -1,29 +0,0 @@
#!/bin/sh
ENV_FILE=./build/env.js
DOTENV_FILE=./.env.prod # ✅ use .env.prod
echo "Generating runtime env file at $ENV_FILE..."
echo "window.RUNTIME_ENV = {" > $ENV_FILE
# List of keys to include
RUNTIME_KEYS="REACT_APP_SERVERURL"
for key in $RUNTIME_KEYS; do
# First check docker env (-e), fallback to .env file
value=$(printenv "$key")
if [ -z "$value" ] && [ -f "$DOTENV_FILE" ]; then
# fallback: read from .env
value=$(grep "^$key=" "$DOTENV_FILE" | cut -d '=' -f2- | tr -d '\r\n' | sed 's/"/\\"/g')
else
value=$(echo "$value" | sed 's/"/\\"/g')
fi
echo " $key: \"$value\"," >> $ENV_FILE
done
echo "};" >> $ENV_FILE
exec "$@"
@@ -1,92 +0,0 @@
/**
* Tailwind Dark Mode Usage Examples for OpenSign
*
* This file demonstrates how to use the new Tailwind utilities
* for better dark mode visibility of buttons and icons.
*/
// Example 1: VS Code-style disabled buttons
const DisabledButtonExamples = () => {
return (
<div>
{/* Option A: Using the VS Code disabled style */}
<button className="op-btn op-btn-primary op-btn-vscode-disabled" disabled>
VS Code Style Disabled Button
</button>
{/* Option B: Using themed disabled style */}
<button className="op-btn btn-themed-disabled">
Themed Disabled Button
</button>
{/* Option C: Conditional styling */}
<button
className={`op-btn op-btn-primary ${
isDisabled ? "op-btn-vscode-disabled" : ""
}`}
disabled={isDisabled}
>
Conditional Button
</button>
</div>
);
};
// Example 2: Icon visibility improvements
const IconExamples = () => {
return (
<div>
{/* Theme-aware icons with better visibility */}
<i className="fa-light fa-folder icon-improved"></i>
<i className="fa-light fa-plus icon-muted"></i>
<i className="fa-light fa-trash icon-disabled"></i>
{/* Using CSS variables */}
<i className="fa-light fa-search icon-themed"></i>
<i className="fa-light fa-settings icon-themed-muted"></i>
{/* Gray text that automatically improves in dark mode */}
<span className="text-gray-500">
This text is now more visible in dark mode
</span>
<span className="text-gray-400">Muted but still readable</span>
</div>
);
};
// Example 3: Using CSS variables in inline styles
const InlineStyleExamples = () => {
return (
<div>
{/* Using CSS variables directly */}
<i className="fa-light fa-plus" style={{ color: "var(--icon-color)" }} />
{/* Using the existing JavaScript function */}
<i className="fa-light fa-minus" style={{ color: getThemeIconColor() }} />
</div>
);
};
// Example 4: Toolbar with improved icons
const ToolbarExample = () => {
return (
<div className="flex space-x-2 p-2">
<button className="p-2 hover:bg-gray-200 rounded">
<i className="fa-light fa-plus icon-improved"></i>
</button>
<button className="p-2 hover:bg-gray-200 rounded" disabled>
<i className="fa-light fa-trash icon-disabled"></i>
</button>
<button className="p-2 hover:bg-gray-200 rounded">
<i className="fa-light fa-edit icon-improved"></i>
</button>
</div>
);
};
export {
DisabledButtonExamples,
IconExamples,
InlineStyleExamples,
ToolbarExample
};
@@ -1,94 +0,0 @@
/**
* Tailwind Dark Mode Usage Examples for OpenSign
*
* This file demonstrates how to use the new Tailwind utilities
* for better dark mode visibility of buttons and icons.
*/
// Example 1: VS Code-style disabled buttons
const DisabledButtonExamples = () => {
return (
<div>
{/* Option A: Using the VS Code disabled style */}
<button className="op-btn op-btn-primary op-btn-vscode-disabled" disabled>
VS Code Style Disabled Button
</button>
{/* Option B: Using themed disabled style */}
<button className="op-btn btn-themed-disabled">
Themed Disabled Button
</button>
{/* Option C: Conditional styling */}
<button
className={`op-btn op-btn-primary ${isDisabled ? 'op-btn-vscode-disabled' : ''}`}
disabled={isDisabled}
>
Conditional Button
</button>
</div>
);
};
// Example 2: Icon visibility improvements
const IconExamples = () => {
return (
<div>
{/* Theme-aware icons with better visibility */}
<i className="fa-light fa-folder icon-improved"></i>
<i className="fa-light fa-plus icon-muted"></i>
<i className="fa-light fa-trash icon-disabled"></i>
{/* Using CSS variables */}
<i className="fa-light fa-search icon-themed"></i>
<i className="fa-light fa-settings icon-themed-muted"></i>
{/* Gray text that automatically improves in dark mode */}
<span className="text-gray-500">This text is now more visible in dark mode</span>
<span className="text-gray-400">Muted but still readable</span>
</div>
);
};
// Example 3: Using CSS variables in inline styles
const InlineStyleExamples = () => {
return (
<div>
{/* Using CSS variables directly */}
<i
className="fa-light fa-plus"
style={{ color: 'var(--icon-color)' }}
/>
{/* Using the existing JavaScript function */}
<i
className="fa-light fa-minus"
style={{ color: getThemeIconColor() }}
/>
</div>
);
};
// Example 4: Toolbar with improved icons
const ToolbarExample = () => {
return (
<div className="flex space-x-2 p-2">
<button className="p-2 hover:bg-gray-200 rounded">
<i className="fa-light fa-plus icon-improved"></i>
</button>
<button className="p-2 hover:bg-gray-200 rounded" disabled>
<i className="fa-light fa-trash icon-disabled"></i>
</button>
<button className="p-2 hover:bg-gray-200 rounded">
<i className="fa-light fa-edit icon-improved"></i>
</button>
</div>
);
};
export {
DisabledButtonExamples,
IconExamples,
InlineStyleExamples,
ToolbarExample
};
-22
View File
@@ -1,22 +0,0 @@
<!DOCTYPE html>
<html lang="en" data-theme="opensigncss">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="The fastest way to sign PDFs & request signatures from others" />
<!-- <link rel="apple-touch-icon" href="/logo192.png" /> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.opensignlabs.com/fonts.css" />
<title>...Loading</title>
</head>
<body>
<div id="root" style="touch-action:pan-x pan-y;"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
-131
View File
@@ -1,131 +0,0 @@
{
"name": "open_sign",
"version": "2.26.0",
"private": true,
"dependencies": {
"@formkit/auto-animate": "^0.9.0",
"@imgly/background-removal": "^1.7.0",
"@lottiefiles/dotlottie-react": "^0.16.2",
"@pdf-lib/fontkit": "^1.1.1",
"@radix-ui/themes": "^3.2.1",
"@reduxjs/toolkit": "^2.8.2",
"axios": "^1.12.2",
"date-fns-tz": "^3.2.0",
"file-saver": "^2.0.5",
"i18next": "^25.4.0",
"i18next-browser-languagedetector": "^8.2.0",
"i18next-http-backend": "^3.0.2",
"jszip": "^3.10.1",
"jwt-decode": "^4.0.0",
"moment": "^2.30.1",
"parse": "^6.1.1",
"pdf-lib": "^1.17.1",
"pkijs": "^3.0.8",
"print-js": "^1.6.0",
"prismjs": "^1.30.0",
"quill-html-edit-button": "^3.0.0",
"radix-ui": "^1.4.3",
"react": "^18.3.1",
"react-bootstrap": "^2.10.10",
"react-confetti": "^6.4.0",
"react-datepicker": "^8.7.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-multi-backend": "^9.0.0",
"react-dnd-touch-backend": "^16.0.1",
"react-dom": "^18.3.1",
"react-gtm-module": "^2.0.11",
"react-helmet": "^6.1.0",
"react-i18next": "^15.7.3",
"react-konva": "^18.2.12",
"react-pdf": "^9.2.1",
"react-quill-new": "^3.6.0",
"react-redux": "^9.2.0",
"react-rnd": "^10.5.2",
"react-router": "^7.9.1",
"react-scrollbars-custom": "^4.1.1",
"react-select": "^5.10.2",
"react-signature-canvas": "^1.1.0-alpha.2",
"react-timezone-select": "^3.2.8",
"react-tooltip": "^5.29.1",
"reactour": "^1.19.4",
"redux": "^5.0.1",
"regex-parser": "^2.3.1",
"serve": "^14.2.5",
"styled-components": "^5.3.11",
"web-vitals": "^5.1.0",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
},
"scripts": {
"build": "npm run version && NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
"start-dev": "vite",
"dev": "vite",
"preview": "vite preview",
"start": "serve -s build",
"version": "curl -s https://api.github.com/repos/opensignlabs/opensign/releases/latest | grep '\"tag_name\":' | awk -F '\"' '{print $4}' > ./public/version.txt",
"version-win": "powershell -Command \"Invoke-RestMethod -Uri 'https://api.github.com/repos/opensignlabs/opensign/releases/latest' | Select-Object -ExpandProperty tag_name | Out-File -FilePath ./public/version.txt\"",
"build-win": "npm run version-win && vite build",
"test": "vitest run",
"test:watch": "vitest",
"release": "standard-version",
"commit": "cz"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"devDependencies": {
"@babel/core": "^7.28.3",
"@babel/preset-env": "^7.28.3",
"@babel/preset-react": "^7.27.1",
"@babel/runtime-corejs2": "^7.28.3",
"@testing-library/jest-dom": "^6.8.0",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/react": "^19.1.13",
"@vitejs/plugin-react": "^4.7.0",
"@vitest/ui": "^3.2.4",
"autoprefixer": "^10.4.21",
"babel-loader": "^10.0.0",
"commitizen": "^4.3.1",
"concurrently": "^9.2.1",
"css-loader": "^7.1.2",
"daisyui": "^4.12.24",
"eslint": "^9.34.0",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-react": "^7.37.5",
"jsdom": "^27.0.0",
"lint-staged": "^16.1.6",
"postcss": "^8.5.6",
"prettier": "^3.6.2",
"pretty-quick": "^4.2.2",
"rollup-plugin-node-polyfills": "^0.2.1",
"tailwindcss": "^3.4.17",
"vite": "^7.1.4",
"vite-plugin-svgr": "^4.5.0",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^3.2.4"
},
"engines": {
"node": "18 || 20 || 22"
}
}
-6
View File
@@ -1,6 +0,0 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-25
View File
@@ -1,25 +0,0 @@
{
"short_name": "Open sign",
"name": "Open sign",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
-3
View File
@@ -1,3 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
-4
View File
@@ -1,4 +0,0 @@
Name,Email,Phone,Company,JobTitle
John Doe,john@example.com,1234567890,abc firm,dev
Jane Smith,jane@example.com,9876543210,xyz firm,manager
Foo Bar,foo@example.com,5555555555,xyz firm,director
1 Name Email Phone Company JobTitle
2 John Doe john@example.com 1234567890 abc firm dev
3 Jane Smith jane@example.com 9876543210 xyz firm manager
4 Foo Bar foo@example.com 5555555555 xyz firm director
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.
-1
View File
@@ -1 +0,0 @@
import "@testing-library/jest-dom";
-155
View File
@@ -1,155 +0,0 @@
import { useState, useEffect } from "react";
import { lazyWithRetry, hideUpgradeProgress } from "./utils";
import { Routes, Route, BrowserRouter } from "react-router";
import { pdfjs } from "react-pdf";
import Form from "./pages/Form";
import Report from "./pages/Report";
import Dashboard from "./pages/Dashboard";
import HomeLayout from "./layout/HomeLayout";
import PageNotFound from "./pages/PageNotFound";
import ValidateRoute from "./primitives/ValidateRoute";
import Validate from "./primitives/Validate";
import TemplatePlaceholder from "./pages/TemplatePlaceholder";
import SignYourSelf from "./pages/SignyourselfPdf";
import DraftDocument from "./components/pdf/DraftDocument";
import PlaceHolderSign from "./pages/PlaceHolderSign";
import PdfRequestFiles from "./pages/PdfRequestFiles";
import Lazy from "./primitives/LazyPage";
import Loader from "./primitives/Loader";
import UserList from "./pages/UserList";
import { serverUrl_fn } from "./constant/appinfo";
import DocSuccessPage from "./pages/DocSuccessPage";
import ValidateSession from "./primitives/ValidateSession";
import DragProvider from "./components/DragProivder";
import Title from "./components/Title";
const DebugPdf = lazyWithRetry(() => import("./pages/DebugPdf"));
const ForgetPassword = lazyWithRetry(() => import("./pages/ForgetPassword"));
const GuestLogin = lazyWithRetry(() => import("./pages/GuestLogin"));
const ChangePassword = lazyWithRetry(() => import("./pages/ChangePassword"));
const UserProfile = lazyWithRetry(() => import("./pages/UserProfile"));
const Opensigndrive = lazyWithRetry(() => import("./pages/Opensigndrive"));
const ManageSign = lazyWithRetry(() => import("./pages/Managesign"));
const AddAdmin = lazyWithRetry(() => import("./pages/AddAdmin"));
const UpdateExistUserAdmin = lazyWithRetry(
() => import("./pages/UpdateExistUserAdmin")
);
const Preferences = lazyWithRetry(() => import("./pages/Preferences"));
const Login = lazyWithRetry(() => import("./pages/Login"));
const VerifyDocument = lazyWithRetry(() => import("./pages/VerifyDocument"));
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.mjs`;
const AppLoader = () => {
return (
<div className="flex justify-center items-center h-[100vh]">
<Loader />
</div>
);
};
function App() {
const [isloading, setIsLoading] = useState(true);
useEffect(() => {
// initialize creds
const id = process.env.REACT_APP_APPID ?? "opensign";
localStorage.setItem("parseAppId", id);
localStorage.setItem("baseUrl", `${serverUrl_fn()}/`);
hideUpgradeProgress();
localStorage.removeItem("showUpgradeProgress");
setIsLoading(false);
}, []);
return (
<div className="bg-base-200">
{isloading ? (
<AppLoader />
) : (
<BrowserRouter>
<Title />
<Routes>
<Route element={<ValidateRoute />}>
<Route exact path="/" element={<Lazy Page={Login} />} />
<Route path="/addadmin" element={<Lazy Page={AddAdmin} />} />
<Route
path="/upgrade-2.1"
element={<Lazy Page={UpdateExistUserAdmin} />}
/>
</Route>
<Route element={<Validate />}>
<Route
exact
path="/load/recipientSignPdf/:docId/:contactBookId"
element={<DragProvider Page={PdfRequestFiles} />}
/>
</Route>
<Route
path="/login/:base64url"
element={<Lazy Page={GuestLogin} />}
/>
<Route path="/debugpdf" element={<Lazy Page={DebugPdf} />} />
<Route
path="/forgetpassword"
element={<Lazy Page={ForgetPassword} />}
/>
<Route
element={
<ValidateSession>
<HomeLayout />
</ValidateSession>
}
>
<Route path="/users" element={<UserList />} />
<Route
path="/changepassword"
element={<Lazy Page={ChangePassword} />}
/>
<Route path="/form/:id" element={<Form />} />
<Route path="/report/:id" element={<Report />} />
<Route path="/dashboard/:id" element={<Dashboard />} />
<Route path="/profile" element={<Lazy Page={UserProfile} />} />
<Route path="/drive" element={<Lazy Page={Opensigndrive} />} />
<Route path="/managesign" element={<Lazy Page={ManageSign} />} />
<Route
path="/template/:templateId"
element={<DragProvider Page={TemplatePlaceholder} />}
/>
{/* signyouself route with no rowlevel data using docId from url */}
<Route
path="/signaturePdf/:docId"
element={<DragProvider Page={SignYourSelf} />}
/>
{/* draft document route to handle and navigate route page according to document status */}
<Route
path="/draftDocument"
element={<DragProvider Page={DraftDocument} />}
/>
{/* recipient placeholder set route with no rowlevel data using docId from url*/}
<Route
path="/placeHolderSign/:docId"
element={<DragProvider Page={PlaceHolderSign} />}
/>
{/* recipient signature route with no rowlevel data using docId from url */}
<Route
path="/recipientSignPdf/:docId/:contactBookId"
element={<DragProvider Page={PdfRequestFiles} />}
/>
<Route
path="/recipientSignPdf/:docId"
element={<DragProvider Page={PdfRequestFiles} />}
/>
<Route
path="/verify-document"
element={<Lazy Page={VerifyDocument} />}
/>
<Route
path="/preferences"
element={<Lazy Page={Preferences} />}
/>
</Route>
<Route path="/success" element={<DocSuccessPage />} />
<Route path="*" element={<PageNotFound />} />
</Routes>
</BrowserRouter>
)}
</div>
);
}
export default App;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

-302
View File
@@ -1,302 +0,0 @@
import React, { useState, useEffect } from "react";
import Parse from "parse";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
import { emailRegex } from "../constant/const";
const AddSigner = (props) => {
const { t } = useTranslation();
const [name, setName] = useState("");
const [phone, setPhone] = useState("");
const [email, setEmail] = useState("");
const [addYourself, setAddYourself] = useState(false);
const [isLoader, setIsLoader] = useState(false);
const [isUserExist, setIsUserExist] = useState(false);
useEffect(() => {
checkUserExist();
}, []);
// Load user details from localStorage when the component mounts
useEffect(() => {
const savedUserDetails = JSON.parse(
localStorage.getItem("UserInformation")
);
if (savedUserDetails && addYourself) {
setName(savedUserDetails.name);
setPhone(savedUserDetails?.phone || "");
setEmail(savedUserDetails.email?.toLowerCase()?.replace(/\s/g, ""));
}
}, [addYourself]);
const checkUserExist = async () => {
const user = Parse.User.current();
try {
const query = new Parse.Query("contracts_Contactbook");
query.equalTo("CreatedBy", user);
query.notEqualTo("IsDeleted", true);
query.equalTo("Email", user.getEmail());
const res = await query.first();
// console.log(res);
if (!res) {
setIsUserExist(true);
}
} catch (err) {
console.log("err", err);
}
};
// Define a function to handle form submission
const handleSubmit = async (e) => {
e.preventDefault();
e.stopPropagation();
if (!emailRegex.test(email)) {
alert(t("valid-email-alert"));
} else {
setIsLoader(true);
if (localStorage.getItem("TenantId")) {
try {
const user = Parse.User.current();
const query = new Parse.Query("contracts_Contactbook");
query.equalTo("CreatedBy", user);
query.notEqualTo("IsDeleted", true);
query.equalTo("Email", email);
const res = await query.first();
// console.log(res);
if (!res) {
const contactQuery = new Parse.Object("contracts_Contactbook");
contactQuery.set("Name", name);
if (phone) {
contactQuery.set("Phone", phone);
}
contactQuery.set("Email", email);
contactQuery.set("UserRole", "contracts_Guest");
contactQuery.set("TenantId", {
__type: "Pointer",
className: "partners_Tenant",
objectId: localStorage.getItem("TenantId")
});
try {
const _users = Parse.Object.extend("User");
const _user = new _users();
_user.set("name", name);
_user.set("username", email);
_user.set("email", email);
_user.set("password", email);
if (phone) {
_user.set("phone", phone);
}
const user = await _user.save();
if (user) {
const currentUser = Parse.User.current();
contactQuery.set(
"CreatedBy",
Parse.User.createWithoutData(currentUser.id)
);
contactQuery.set("UserId", user);
const acl = new Parse.ACL();
acl.setPublicReadAccess(true);
acl.setPublicWriteAccess(true);
acl.setReadAccess(currentUser.id, true);
acl.setWriteAccess(currentUser.id, true);
contactQuery.setACL(acl);
const res = await contactQuery.save();
const parseData = JSON.parse(JSON.stringify(res));
if (props.details) {
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey],
email: parseData?.Email
});
}
if (props.closePopup) {
props.closePopup();
}
if (props.handleUserData) {
props.handleUserData(parseData);
}
setIsLoader(false);
// Reset the form fields
setAddYourself(false);
setName("");
setPhone("");
setEmail("");
}
} catch (err) {
console.log("err ", err);
if (err.code === 202) {
const params = { email: email };
const userRes = await Parse.Cloud.run("getUserId", params);
const currentUser = Parse.User.current();
contactQuery.set(
"CreatedBy",
Parse.User.createWithoutData(currentUser.id)
);
contactQuery.set("UserId", {
__type: "Pointer",
className: "_User",
objectId: userRes.id
});
const acl = new Parse.ACL();
acl.setPublicReadAccess(true);
acl.setPublicWriteAccess(true);
acl.setReadAccess(currentUser.id, true);
acl.setWriteAccess(currentUser.id, true);
contactQuery.setACL(acl);
const res = await contactQuery.save();
const parseData = JSON.parse(JSON.stringify(res));
if (props.details) {
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey],
email: parseData?.Email
});
}
if (props.closePopup) {
props.closePopup();
}
if (props.handleUserData) {
props.handleUserData(parseData);
}
setIsLoader(false);
// Reset the form fields
setAddYourself(false);
setName("");
setPhone("");
setEmail("");
}
}
} else {
alert(t("add-signer-alert"));
setIsLoader(false);
}
} catch (err) {
console.log("err in fetch contact", err);
setIsLoader(false);
alert(t("something-went-wrong-mssg"));
}
} else {
setIsLoader(false);
alert(t("something-went-wrong-mssg"));
}
}
};
// Define a function to handle the "add yourself" checkbox
const handleAddYourselfChange = () => {
if (addYourself) {
setAddYourself(false);
setName("");
setPhone("");
setEmail("");
} else {
setAddYourself(true);
}
};
const handleReset = () => {
setAddYourself(false);
};
return (
<div className="h-full p-[20px]">
{isLoader && (
<div className="fixed inset-0 flex justify-center items-center bg-black bg-opacity-30">
<Loader />
</div>
)}
<div className="w-full mx-auto p-2 text-base-content">
<p className="mb-3 text-xs text-gray-500">{t("add-signer-note")}</p>
{isUserExist && (
<div className="mb-3 flex items-center">
<input
type="checkbox"
id="addYourself"
checked={addYourself}
onChange={handleAddYourselfChange}
className="op-checkbox op-checkbox-sm"
/>
<label htmlFor="addYourself" className="ml-2 mb-0">
{t("add-yourself")}
</label>
</div>
)}
<form onSubmit={handleSubmit}>
<div className="mb-3">
<label htmlFor="name" className="block text-xs font-semibold">
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="text"
id="name"
value={name}
onChange={(e) => setName(e.target.value)}
required
disabled={addYourself}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
placeholder={t("enter-name")}
/>
</div>
<div className="mb-3">
<label htmlFor="email" className="block text-xs font-semibold">
{t("email")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="email"
id="email"
value={email}
onChange={(e) =>
setEmail(e.target.value?.toLowerCase()?.replace(/\s/g, ""))
}
required
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
disabled={addYourself}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
placeholder={t("enter-email")}
/>
</div>
<div className="mb-3">
<label htmlFor="phone" className="block text-xs font-semibold">
{t("phone")}
</label>
<input
type="text"
id="phone"
value={phone}
onChange={(e) => setPhone(e.target.value)}
disabled={addYourself}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
placeholder={t("phone-optional")}
/>
</div>
<div className="mt-4 flex gap-x-2 justify-start">
<button type="submit" className="op-btn op-btn-primary">
{t("submit")}
</button>
<button
type="button"
onClick={() => handleReset()}
className="op-btn op-btn-secondary"
>
{t("reset")}
</button>
</div>
</form>
</div>
</div>
);
};
export default AddSigner;
-287
View File
@@ -1,287 +0,0 @@
import { useEffect, useState } from "react";
import Parse from "parse";
import Loader from "../primitives/Loader";
import {
copytoData,
usertimezone
} from "../constant/Utils";
import {
emailRegex,
} from "../constant/const";
import {
useTranslation
} from "react-i18next";
function generatePassword(length) {
const characters =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
let result = "";
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
const AddUser = (props) => {
const { t } = useTranslation();
const [formdata, setFormdata] = useState({
name: "",
phone: "",
email: "",
team: "",
password: "",
role: ""
});
const [isFormLoader, setIsFormLoader] = useState(false);
const [teamList, setTeamList] = useState([]);
const role = ["OrgAdmin", "Editor", "User"];
useEffect(() => {
getTeamList();
// eslint-disable-next-line
}, []);
const getTeamList = async () => {
setFormdata((prev) => ({ ...prev, password: generatePassword(12) }));
const teamRes = await Parse.Cloud.run("getteams", { active: true });
if (teamRes.length > 0) {
const _teamRes = JSON.parse(JSON.stringify(teamRes));
setTeamList(_teamRes);
const allUserId =
_teamRes.find((x) => x.Name === "All Users")?.objectId || "";
setFormdata((prev) => ({ ...prev, team: allUserId }));
}
};
const checkUserExist = async () => {
try {
const res = await Parse.Cloud.run("getUserDetails", {
email: formdata.email
});
if (res) {
return true;
} else {
return false;
}
} catch (err) {
console.log("err", err);
}
};
// Define a function to handle form submission
const handleSubmit = async (e) => {
e.preventDefault();
e.stopPropagation();
if (!emailRegex.test(formdata.email)) {
alert(t("valid-email-alert"));
} else {
const localUser = JSON.parse(localStorage.getItem("Extand_Class"))?.[0];
setIsFormLoader(true);
const res = await checkUserExist();
if (res) {
props.showAlert("danger", t("user-already-exist"));
setIsFormLoader(false);
} else {
if (localStorage.getItem("TenantId")) {
const timezone = usertimezone;
try {
const params = {
name: formdata.name,
email: formdata.email,
phone: formdata.phone,
password: formdata.password,
role: formdata.role,
team: formdata.team,
timezone: timezone,
tenantId: localStorage.getItem("TenantId"),
organization: {
objectId: localUser?.OrganizationId?.objectId,
company: localUser?.Company
},
};
const res = await Parse.Cloud.run("adduser", params);
const parseData = JSON.parse(JSON.stringify(res));
if (props.closePopup) {
props.closePopup();
}
if (props.handleUserData) {
if (formdata?.team) {
const team = teamList.find((x) => x.objectId === formdata.team);
parseData.TeamIds = parseData.TeamIds.map((y) =>
y.objectId === team.objectId ? team : y
);
}
props.handleUserData(parseData);
}
setIsFormLoader(false);
setFormdata({
name: "",
email: "",
phone: "",
team: "",
role: ""
});
props.showAlert("success", t("user-created-successfully"));
} catch (err) {
console.log("err", err);
setIsFormLoader(false);
props.showAlert("danger", t("something-went-wrong-mssg"));
}
} else {
props.showAlert("danger", t("something-went-wrong-mssg"));
}
}
}
};
// Define a function to handle the "add yourself" checkbox
const handleReset = () => {
setFormdata({ name: "", email: "", phone: "", team: "", role: "" });
if (props.closePopup) {
props.closePopup();
}
};
const handleChange = (event) => {
let { name, value } = event.target;
if (name === "email") {
value = value?.toLowerCase()?.replace(/\s/g, "");
}
setFormdata((prev) => ({ ...prev, [name]: value }));
};
const copytoclipboard = (text) => {
copytoData(text);
props.showAlert("success", t("copied"));
};
return (
<div className="shadow-md rounded-box my-[1px] p-3 bg-base-100 relative">
{isFormLoader && (
<div className="absolute w-full h-full inset-0 flex justify-center items-center bg-base-content/30 z-50">
<Loader />
</div>
)}
<div className="w-full mx-auto">
<form onSubmit={handleSubmit}>
<div className="mb-3">
<label
htmlFor="name"
className="block text-xs font-semibold"
>
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="text"
name="name"
value={formdata.name}
onChange={(e) => handleChange(e)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
placeholder={t("enter-name")}
/>
</div>
<div className="mb-3">
<label
htmlFor="email"
className="block text-xs font-semibold"
>
{t("email")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="email"
name="email"
value={formdata.email}
onChange={(e) => handleChange(e)}
required
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
placeholder={t("enter-email")}
/>
</div>
<div className="mb-3">
<label className="block text-xs font-semibold">
{t("password")}
</label>
<div className="flex justify-between items-center op-input op-input-bordered op-input-sm text-base-content w-full h-full text-[13px]">
<div className="break-all">{formdata?.password}</div>
<i
onClick={() => copytoclipboard(formdata?.password)}
className="fa-light fa-copy rounded-full hover:bg-base-300 p-[8px] cursor-pointer "
></i>
</div>
<div className="text-[12px] ml-2 mb-0 text-[red] select-none">
{t("password-generateed")}
</div>
</div>
<div className="mb-3">
<label
htmlFor="phone"
className="block text-xs font-semibold"
>
{t("phone")}
{/* <span className="text-[red] text-[13px]"> *</span> */}
</label>
<input
type="text"
name="phone"
placeholder={t("phone-optional")}
value={formdata.phone}
onChange={(e) => handleChange(e)}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-3">
<label
htmlFor="phone"
className="block text-xs font-semibold"
>
{t("Role")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<select
value={formdata.role}
onChange={(e) => handleChange(e)}
name="role"
className="op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content w-full text-xs"
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
>
<option defaultValue={""} value={""}>
{t("Select")}
</option>
{role.length > 0 &&
role.map((x) => (
<option key={x} value={x}>
{x}
</option>
))}
</select>
</div>
<div className="flex items-center mt-3 gap-2 text-white">
<button type="submit" className="op-btn op-btn-primary">
{t("submit")}
</button>
<div
type="button"
onClick={() => handleReset()}
className="op-btn op-btn-secondary"
>
{t("cancel")}
</div>
</div>
</form>
</div>
</div>
);
};
export default AddUser;
-316
View File
@@ -1,316 +0,0 @@
import React, { useState, useEffect, useRef } from "react";
import axios from "axios";
import SuggestionInput from "./shared/fields/SuggestionInput";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
import {
emailRegex,
} from "../constant/const";
const BulkSendUi = (props) => {
const { t } = useTranslation();
const [forms, setForms] = useState([]);
const formRef = useRef(null);
const [scrollOnNextUpdate, setScrollOnNextUpdate] = useState(false);
const [isSubmit, setIsSubmit] = useState(false);
const [isSignatureExist, setIsSignatureExist] = useState();
const [isDisableBulkSend, setIsDisableBulkSend] = useState(false);
const [isLoader, setIsLoader] = useState(false);
const [signers, setSigners] = useState([]);
const [emails, setEmails] = useState([]);
const [isPrefillExist, setIsPrefillExist] = useState(false);
useEffect(() => {
signatureExist();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
//function to check at least one signature field exist
const signatureExist = async () => {
const isPrefill = props?.Placeholders.some((x) => x?.Role === "prefill");
if (isPrefill) {
setIsPrefillExist(isPrefill);
}
setIsDisableBulkSend(false);
const getPlaceholder = props?.Placeholders;
const removePrefill = getPlaceholder.filter((x) => x?.Role !== "prefill");
const checkIsSignatureExistt = removePrefill?.every((placeholderObj) =>
placeholderObj?.placeHolder?.some((holder) =>
holder?.pos?.some((posItem) => posItem?.type === "signature")
)
);
setIsSignatureExist(checkIsSignatureExistt);
setIsLoader(false);
};
useEffect(() => {
if (scrollOnNextUpdate && formRef.current) {
formRef.current.scrollIntoView({
behavior: "smooth",
block: "end",
inline: "nearest"
});
setScrollOnNextUpdate(false);
}
}, [forms, scrollOnNextUpdate]);
useEffect(() => {
(() => {
if (props?.Placeholders?.length > 0) {
let users = [];
let emails = [];
props?.Placeholders?.forEach((element) => {
const signerEmail = element?.email || element?.signerPtr?.Email;
// only add when there's a non-empty signerEmail
if (signerEmail) {
emails = [...emails, signerEmail];
}
if (!element.signerObjId) {
users = [
...users,
{
fieldId: element.Id,
email: "",
label: element.Role,
signer: {}
}
];
}
});
setEmails(emails);
setForms((prevForms) => [...prevForms, { Id: 1, fields: users }]);
const signer = props.item?.Signers?.filter((x) => x?.objectId);
setSigners(signer);
}
})();
// eslint-disable-next-line
}, []);
const handleInputChange = (index, signer, fieldIndex) => {
const newForms = [...forms];
newForms[index].fields[fieldIndex].email = signer?.Email
? signer?.Email
: signer || "";
newForms[index].fields[fieldIndex].signer = signer?.objectId ? signer : "";
setForms(newForms);
};
const handleRemoveForm = (index) => {
const updatedForms = forms.filter((_, i) => i !== index);
setForms(updatedForms);
};
function validateEmails(data) {
for (const item of data) {
let email = "";
for (const field of item.fields) {
if (!emailRegex.test(field.email)) {
alert(t("invalid-email-found", { email: field.email }));
return false;
} else if (email === field.email || emails?.includes(field.email)) {
alert(t("duplicate-email-found", { email: field.email }));
return false;
} else {
email = field.email;
}
}
}
return true;
}
const handleSubmit = async (e) => {
e.preventDefault();
e.stopPropagation();
setIsSubmit(true);
if (validateEmails(forms)) {
// Create a copy of Placeholders array from props.item
let Placeholders = [...props.Placeholders];
// Initialize an empty array to store updated documents
let Documents = [];
// Loop through each form
forms.forEach((form) => {
//checking if user enter email which already exist as a signer then add user in a signers array
let existSigner = [];
form.fields.map((data) => {
if (data.signer) {
existSigner.push(data.signer);
}
});
// Map through the copied Placeholders array to update email values
const updatedPlaceholders = Placeholders.map((placeholder) => {
// Find the field in the current form that matches the placeholder Id
const field = form.fields.find(
(element) => parseInt(element.fieldId) === placeholder.Id
);
// If a matching field is found, update the email value in the placeholder
const signer = field?.signer?.objectId ? field.signer : "";
if (field) {
if (signer) {
return {
...placeholder,
signerObjId: field?.signer?.objectId || "",
signerPtr: signer
};
} else {
return {
...placeholder,
email: field.email,
signerObjId: field?.signer?.objectId || "",
signerPtr: signer
};
}
}
// If no matching field is found, keep the placeholder as is
return placeholder;
});
// Push a new document object with updated Placeholders into the Documents array
if (existSigner?.length > 0) {
Documents.push({
...props.item,
Placeholders: updatedPlaceholders,
Signers: signers ? [...signers, ...existSigner] : [...existSigner]
});
} else {
Documents.push({
...props.item,
Placeholders: updatedPlaceholders,
SignatureType: props.signatureType,
Signers: signers
});
}
});
await batchQuery(Documents);
} else {
setIsSubmit(false);
}
};
const batchQuery = async (Documents) => {
const token =
{ "X-Parse-Session-Token": localStorage.getItem("accesstoken") };
const functionsUrl = `${localStorage.getItem(
"baseUrl"
)}functions/batchdocuments`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
...token,
};
const params = { Documents: JSON.stringify(Documents) };
try {
const res = await axios.post(functionsUrl, params, { headers: headers });
// console.log("res ", res);
if (res.data && res.data.result) {
props.handleClose("success", Documents?.length);
}
} catch (err) {
console.log("Err ", err);
props.handleClose("error", 0);
} finally {
setIsSubmit(false);
}
};
return (
<>
{isLoader ? (
<div className="w-full h-[100px] flex justify-center items-center z-[999]">
<Loader />
</div>
) : (
<>
{isSubmit && (
<div className="absolute z-[999] h-full w-full flex justify-center items-center bg-black bg-opacity-30">
<Loader />
</div>
)}
{isPrefillExist ? (
<div className="text-black p-3 bg-white w-full text-sm md:text-base flex justify-center items-center">
{t("prefill-bulk-error")}
</div>
) : !isDisableBulkSend ? (
<>
{props.Placeholders?.length > 0 ? (
isSignatureExist ? (
<>
{props.Placeholders?.some((x) => !x.signerObjId) ? (
<>
<form onSubmit={handleSubmit}>
<div className="min-h-max max-h-[250px] overflow-y-auto">
{forms?.map((form, index) => (
<div
key={form.Id}
className="p-3 op-card border-[1px] border-gray-400 mt-3 mx-4 mb-4 bg-base-200 text-base-content grid grid-cols-1 md:grid-cols-2 gap-2 relative"
>
{form?.fields?.map((field, fieldIndex) => (
<div
className="flex flex-col"
key={field.fieldId}
>
<label className="block text-xs font-semibold">
{field.label}
</label>
<SuggestionInput
required
type="email"
value={field.value}
index={fieldIndex}
onChange={(signer) =>
handleInputChange(
index,
signer,
fieldIndex
)
}
/>
</div>
))}
{forms?.length > 1 && (
<button
onClick={() => handleRemoveForm(index)}
className="absolute right-3 top-1 text-[red] border-[1px] border-[red] rounded-lg w-[1.7rem] h-[1.7rem]"
>
<i className="fa-light fa-trash"></i>
</button>
)}
<div ref={formRef}></div>
</div>
))}
</div>
<div className="flex flex-col mx-4 mb-4 gap-3">
<button
type="submit"
className="op-btn op-btn-accent focus:outline-none"
>
<i className="fa-light fa-paper-plane"></i>{" "}
<span>{t("send")}</span>
</button>
</div>
</form>
</>
) : (
<div className="text-black p-3 bg-white w-full text-sm md:text-base flex justify-center items-center">
{t("quick-send-alert-1")}
</div>
)}
</>
) : (
<div className="text-black p-3 bg-white w-full text-sm md:text-base flex justify-center items-center">
{t("quick-send-alert-2")}
</div>
)
) : (
<div className="text-black p-3 bg-white w-full text-sm md:text-base flex justify-center items-center">
{t("quick-send-alert-3")}
</div>
)}
</>
) : (
<>
</>
)}
</>
)}
</>
);
};
export default BulkSendUi;
@@ -1,63 +0,0 @@
import React, { useState, useEffect } from "react";
import ModalUi from "../primitives/ModalUi";
import { useTranslation } from "react-i18next";
const ColumnSelector = ({
isOpen,
allColumns = [],
visibleColumns = [],
columnLabels = {},
defaultColumns = [],
onApply,
onClose
}) => {
const { t } = useTranslation();
const [selected, setSelected] = useState(visibleColumns);
const [names, setNames] = useState(columnLabels);
useEffect(() => {
setSelected(visibleColumns);
setNames(columnLabels);
}, [visibleColumns, columnLabels]);
const handleChange = (col) => {
setSelected((prev) =>
prev.includes(col) ? prev.filter((c) => c !== col) : [...prev, col]
);
};
const handleApply = () => {
onApply && onApply(selected, names);
onClose && onClose();
};
return (
<ModalUi isOpen={isOpen} title={t("select-columns")} handleClose={onClose}>
<div className="p-[20px] flex flex-col gap-2">
{allColumns.map((col, i) => (
<div key={col} className="flex justify-between items-center gap-2">
<span className="flex justify-center items-center h-full">
<input
id={col + "_" + i}
type="checkbox"
checked={selected.includes(col)}
onChange={() => handleChange(col)}
className="mb-0"
/>
<span className="whitespace-nowrap ml-1">
{t(`report-heading.${col}`, { defaultValue: col })}
</span>
</span>
</div>
))}
<div className="flex justify-start mt-2">
<button onClick={handleApply} className="op-btn op-btn-primary">
{t("apply")}
</button>
</div>
</div>
</ModalUi>
);
};
export default ColumnSelector;
@@ -1,51 +0,0 @@
import { HTML5Backend } from "react-dnd-html5-backend";
import { TouchBackend } from "react-dnd-touch-backend";
import {
DndProvider,
TouchTransition,
MouseTransition,
Preview
} from "react-dnd-multi-backend";
import DragElement from "./pdf/DragElement";
import LazyPage from "../primitives/LazyPage";
import { GuidelinesProvider } from "../context/GuidelinesContext";
const HTML5toTouch = {
backends: [
{
id: "html5",
backend: HTML5Backend,
transition: MouseTransition
},
{
id: "touch",
backend: TouchBackend,
options: { enableMouseEvents: true },
preview: true,
transition: TouchTransition
}
]
};
/* This handling in only for devices which support touch */
const generatePreview = (props) => {
const { item, style } = props;
const newStyle = { ...style };
return (
<div style={newStyle}>
<DragElement {...item} />
</div>
);
};
export default function DragProvider({ Page, lazy = false }) {
return (
<DndProvider options={HTML5toTouch}>
<Preview>{generatePreview}</Preview>
<GuidelinesProvider>
{lazy ? <LazyPage Page={Page} /> : <Page />}
</GuidelinesProvider>
</DndProvider>
);
}
-73
View File
@@ -1,73 +0,0 @@
import React, { useEffect, useState } from "react";
import Package from "../../package.json";
import axios from "axios";
import { openInNewTab } from "../constant/Utils";
import { useTranslation } from "react-i18next";
const Footer = () => {
const appName = "OpenSign™";
const { t } = useTranslation();
const [showButton, setShowButton] = useState(false);
const [version, setVersion] = useState("");
useEffect(() => {
axios
.get("/version.txt")
.then((response) => {
setVersion(response.data); // Set the retrieved data to the state variable
})
.catch((error) => {
console.error("Error reading the file:", error);
});
}, []);
const handleScroll = () => {
if (window.pageYOffset >= 50) {
setShowButton(true);
} else {
setShowButton(false);
}
};
const scrollToTop = () => {
window.scrollTo(0, 0);
setShowButton(false);
};
useEffect(() => {
window.addEventListener("scroll", handleScroll);
return () => {
window.removeEventListener("scroll", handleScroll);
};
}, []);
const openUrl = () => {
openInNewTab(
"https://github.com/OpenSignLabs/OpenSign/releases/tag/" + version
);
};
return (
<>
<footer className="op-footer op-footer-center py-3 bg-base-300 text-base-content text-center text-[13px]">
<aside>
<p>
{t("all-right")} &copy; {new Date().getFullYear()} &nbsp;
<span onClick={openUrl} className="hover:underline cursor-pointer">
{appName} ( {t("version")}:{" "}
{version ? version : `${Package.version} `})
</span>
</p>
</aside>
</footer>
<button
className={`${
showButton ? "block" : "hidden"
} fixed bottom-4 right-4 px-3 p-2 text-xl op-bg-secondary text-white rounded focus:outline-none`}
onClick={scrollToTop}
>
<i className="fa-light fa-angle-up"></i>
</button>
</>
);
};
export default Footer;
@@ -1,82 +0,0 @@
// FullScreenButton.js
import React, { useState, useEffect } from "react";
const FullScreenButton = () => {
const [isFullScreen, setIsFullScreen] = useState(false);
useEffect(() => {
document.addEventListener("fullscreenchange", handleFullScreenChange);
document.addEventListener("webkitfullscreenchange", handleFullScreenChange);
document.addEventListener("mozfullscreenchange", handleFullScreenChange);
document.addEventListener("MSFullscreenChange", handleFullScreenChange);
return () => {
document.removeEventListener("fullscreenchange", handleFullScreenChange);
document.removeEventListener(
"webkitfullscreenchange",
handleFullScreenChange
);
document.removeEventListener(
"mozfullscreenchange",
handleFullScreenChange
);
document.removeEventListener(
"MSFullscreenChange",
handleFullScreenChange
);
};
}, []);
const handleFullScreenChange = () => {
setIsFullScreen(!!document.fullscreenElement);
};
const toggleFullScreen = () => {
if (isFullScreen) {
exitFullScreen();
} else {
requestFullScreen();
}
};
const requestFullScreen = () => {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
}
};
const exitFullScreen = () => {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
};
return (
<div className="flex items-center">
<button
onClick={toggleFullScreen}
className="text-base-content p-2 text-sm focus:outline-none"
>
{isFullScreen ? (
<i className="fa-light fa-compress"></i>
) : (
<i className="fa-light fa-maximize"></i>
)}
</button>
</div>
);
};
export default FullScreenButton;
-268
View File
@@ -1,268 +0,0 @@
import { useState, useEffect } from "react";
import dp from "../assets/images/dp.png";
import FullScreenButton from "./FullScreenButton";
import ThemeToggle from "./ThemeToggle";
import { useNavigate } from "react-router";
import Parse from "parse";
import { useWindowSize } from "../hook/useWindowSize";
import {
getAppLogo,
openInNewTab,
saveLanguageInLocal
} from "../constant/Utils";
import { useTranslation } from "react-i18next";
import { appInfo } from "../constant/appinfo";
import { useDispatch } from "react-redux";
import { toggleSidebar } from "../redux/reducers/sidebarReducer.js";
const Header = ({ isConsole, setIsLoggingOut }) => {
const { t, i18n } = useTranslation();
const navigate = useNavigate();
const { width } = useWindowSize();
const dispatch = useDispatch();
const username = localStorage.getItem("username") || "";
const image = localStorage.getItem("profileImg") || dp;
const [isOpen, setIsOpen] = useState(false);
const [applogo, setAppLogo] = useState("");
const [isDarkTheme, setIsDarkTheme] = useState();
const toggleDropdown = () => {
setIsOpen(!isOpen);
closeSidebar();
};
const closeSidebar = () => {
if (width && width <= 768) {
dispatch(toggleSidebar(false));
}
};
useEffect(() => {
initializeHead();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => {
closeSidebar();
}, [width]);
const showSidebar = () => {
dispatch(toggleSidebar());
};
async function initializeHead() {
const applogo = await getAppLogo();
if (applogo?.logo) {
setAppLogo(applogo?.logo);
} else {
const logo = localStorage.getItem("appLogo") || appInfo.applogo;
setAppLogo(logo);
}
}
const handleLogout = async () => {
setIsOpen(false);
setIsLoggingOut(true);
try {
await Parse.User.logOut();
} catch (err) {
console.log("Err while logging out", err);
}
let appdata = localStorage.getItem("userSettings");
let applogo = localStorage.getItem("appLogo");
let defaultmenuid = localStorage.getItem("defaultmenuid");
let PageLanding = localStorage.getItem("PageLanding");
let baseUrl = localStorage.getItem("baseUrl");
let appid = localStorage.getItem("parseAppId");
let favicon = localStorage.getItem("favicon");
localStorage.clear();
saveLanguageInLocal(i18n);
localStorage.setItem("appLogo", applogo);
localStorage.setItem("defaultmenuid", defaultmenuid);
localStorage.setItem("PageLanding", PageLanding);
localStorage.setItem("userSettings", appdata);
localStorage.setItem("baseUrl", baseUrl);
localStorage.setItem("parseAppId", appid);
localStorage.setItem("favicon", favicon);
setIsLoggingOut(false);
navigate("/");
};
//handle to close profile drop down menu onclick screen
useEffect(() => {
const closeMenuOnOutsideClick = (e) => {
if (isOpen && !e.target.closest("#profile-menu")) {
setIsOpen(false);
}
};
document.addEventListener("click", closeMenuOnOutsideClick);
return () => {
// Cleanup the event listener when the component unmounts
document.removeEventListener("click", closeMenuOnOutsideClick);
};
}, [isOpen]);
useEffect(() => {
const updateThemeStatus = () => {
const isDarkTheme =
document.documentElement.getAttribute("data-theme") === "opensigndark";
setIsDarkTheme(isDarkTheme);
};
updateThemeStatus();
const observer = new MutationObserver(() => {
updateThemeStatus();
});
observer.observe(document.documentElement, {
attributes: true,
attributeFilter: ["data-theme"]
});
return () => observer.disconnect();
}, []);
return (
<>
<div className="op-navbar bg-base-100 shadow touch-none">
<div className="flex-none">
<button
className="op-btn op-btn-square op-btn-ghost focus:outline-none hover:bg-transparent op-btn-sm no-animation"
onClick={showSidebar}
>
<i className="fa-light fa-bars text-xl text-base-content"></i>
</button>
</div>
<div className="flex-1 ml-2">
<div className="h-[25px] md:h-[40px] w-auto overflow-hidden">
{applogo && (
<img
className="object-contain h-full w-auto"
src={
isDarkTheme
? "/static/js/assets/images/logo-dark.png"
: applogo
}
alt="logo"
/>
)}
</div>
</div>
<div id="profile-menu" className="flex-none gap-2">
<div>
<FullScreenButton />
</div>
{width >= 768 && (
<div
onClick={toggleDropdown}
className="cursor-pointer w-[35px] h-[35px] rounded-full ring-[1px] ring-offset-2 ring-gray-400 overflow-hidden"
>
<img
className="w-[35px] h-[35px] object-contain"
src={image}
alt="img"
/>
</div>
)}
{width >= 768 && (
<div
onClick={toggleDropdown}
role="button"
tabIndex="0"
className="cursor-pointer text-base-content text-sm"
>
{username && username}
</div>
)}
<div
className="op-dropdown op-dropdown-open op-dropdown-end"
id="profile-menu"
>
<div
tabIndex={0}
role="button"
onClick={toggleDropdown}
className="op-btn op-btn-ghost op-btn-xs w-[10px] h-[20px] hover:bg-transparent"
>
<i className="fa-light fa-angle-down text-base-content"></i>
</div>
<ul
tabIndex={0}
className={`mt-3 z-[1] p-2 shadow op-dropdown-open op-menu op-menu-sm op-dropdown-content text-base-content bg-base-100 rounded-box w-56 ${
isOpen ? "" : "hidden"
}`}
>
{!isConsole && (
<>
<li
onClick={() =>
openInNewTab("https://docs.opensignlabs.com")
}
>
<span>
<i className="fa-light fa-book"></i> {t("docs")}
</span>
</li>
<li
onClick={() => {
setIsOpen(false);
navigate("/profile");
}}
>
<span>
<i className="fa-light fa-user"></i> {t("profile")}
</span>
</li>
<li
onClick={() => {
setIsOpen(false);
navigate("/changepassword");
}}
>
<span>
<i className="fa-light fa-lock"></i>{" "}
{t("change-password")}
</span>
</li>
<li
onClick={() => {
setIsOpen(false);
navigate("/verify-document");
}}
>
<span>
<i className="fa-light fa-check-square"></i>{" "}
{t("verify-document")}
</span>
</li>
<li>
<span>
<i className="fa-light fa-moon"></i>
{t("dark-mode")}
<span className="text-[10px] font-semibold bg-base-300 text-base-content px-1 rounded-md">
BETA
</span>
<ThemeToggle />
</span>
</li>
</>
)}
<li onClick={handleLogout}>
<span>
<i className="fa-light fa-arrow-right-from-bracket"></i>{" "}
{t("log-out")}
</span>
</li>
</ul>
</div>
</div>
</div>
</>
);
};
export default Header;
@@ -1,80 +0,0 @@
import React from "react";
import { Document, Page } from "react-pdf";
import { Stage, Layer, Rect, Text } from "react-konva";
import { useTranslation } from "react-i18next";
const RenderDebugPdf = (props) => {
const { t } = useTranslation();
return (
<div>
<div className="sticky top-0 p-[10px] z-10 bg-white border-[1px] border-[gray] my-[5px]">
{`Co-ordinates: X - ${props.hoverCoordinates.x}, Y - ${props.hoverCoordinates.y}`}
</div>
<div
className="relative flex-1 cursor-crosshair border-[1px] border-[gray] overflow-auto"
onMouseMove={props.handleMouseMoveDiv}
>
<Document
onLoadError={() => props.setPdfLoadFail(false)}
loading={t("loading-doc")}
error={<p className="mx-2">{t("failed-to-load-refresh-page")}</p>}
onLoadSuccess={props.pageDetails}
ref={props.pdfRef}
file={props.pdfUrl}
>
<Page
onLoadSuccess={props.handlePageLoadSuccess}
pageNumber={props.pageNumber}
renderAnnotationLayer={false}
renderTextLayer={false}
onGetAnnotationsError={(error) => {
console.log("annotation error", error);
}}
/>
</Document>
<Stage
onMouseMove={props.handleMouseMove}
onMouseDown={props.handleMouseDown}
onMouseUp={props.handleMouseUp}
width={props.pdfDimension.width}
height={props.pdfDimension.height}
className="absolute top-0 right-0"
>
<Layer>
{props.annotations
.filter((value) => value.page === props.pageNumber)
.map((value) => {
const textX = value.x + value.width / 3;
const textY = value.y + value.height / 2.5;
return (
<React.Fragment key={value.key}>
<Rect
x={value.x}
y={value.y}
width={value.width}
height={value.height}
fill="#cbe9ed"
stroke="black"
/>
<Text
x={textX}
y={textY}
text={
value?.key > 0 ? "box " + value.key.toString() : "box"
}
fontSize={16}
fill="black"
align="center"
verticalAlign="middle"
/>
</React.Fragment>
);
})}
</Layer>
</Stage>
</div>
</div>
);
};
export default RenderDebugPdf;
@@ -1,39 +0,0 @@
import React from "react";
import ModalUi from "../primitives/ModalUi";
import { useTranslation } from "react-i18next";
function RotateAlert(props) {
const { t } = useTranslation();
return (
<ModalUi
isOpen={props.showRotateAlert}
title={t("Rotation-alert")}
handleClose={() => props.setShowRotateAlert({ status: false, degree: 0 })}
>
<div className="p-[20px] h-full">
<p>{t("rotate-alert-mssg")}</p>
<div className="h-[1px] w-full my-[15px] bg-[#9f9f9f]"></div>
<div className="flex gap-1">
<button
onClick={() => props.handleRemoveWidgets()}
type="button"
className="op-btn op-btn-primary"
>
{t("yes")}
</button>
<button
onClick={() =>
props.setShowRotateAlert({ status: false, degree: 0 })
}
type="button"
className="op-btn op-btn-ghost text-base-content shadow-md"
>
{t("no")}
</button>
</div>
</div>
</ModalUi>
);
}
export default RotateAlert;
@@ -1,54 +0,0 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { NavLink } from "react-router";
const SocialMedia = () => {
const { t } = useTranslation();
return (
<React.Fragment>
<NavLink
to="https://github.com/opensignlabs/opensign"
target="_blank"
rel="noopener noreferrer"
>
<i aria-hidden="true" className="fa-brands fa-github"></i>
<span className="fa-sr-only">
OpenSign&apos;s {t("social-media.github")}
</span>
</NavLink>
<NavLink
to="https://www.linkedin.com/company/opensign%E2%84%A2/"
target="_blank"
rel="noopener noreferrer"
>
<i aria-hidden="true" className="fa-brands fa-linkedin"></i>
<span className="fa-sr-only">
OpenSign&apos;s {t("social-media.linked-in")}
</span>
</NavLink>
<NavLink
to="https://www.twitter.com/opensignlabs"
target="_blank"
rel="noopener noreferrer"
>
<i aria-hidden="true" className="fa-brands fa-square-x-twitter"></i>
<span className="fa-sr-only">
OpenSign&apos;s {t("social-media.twitter")}
</span>
</NavLink>
<NavLink
to="https://discord.com/invite/xe9TDuyAyj"
target="_blank"
rel="noopener noreferrer"
>
<i aria-hidden="true" className="fa-brands fa-discord"></i>
<span className="fa-sr-only">
OpenSign&apos;s {t("social-media.discord")}
</span>
</NavLink>
</React.Fragment>
);
};
export default SocialMedia;
@@ -1,41 +0,0 @@
import { useEffect, useState } from "react";
const ThemeToggle = () => {
const [isDark, setIsDark] = useState(false);
useEffect(() => {
const storedTheme = localStorage.getItem("theme");
if (storedTheme === "dark") {
setIsDark(true);
document.documentElement.setAttribute("data-theme", "opensigndark");
} else {
document.documentElement.setAttribute("data-theme", "opensigncss");
}
}, []);
const handleChange = () => {
const newTheme = !isDark;
setIsDark(newTheme);
if (newTheme) {
document.documentElement.setAttribute("data-theme", "opensigndark");
localStorage.setItem("theme", "dark");
} else {
document.documentElement.setAttribute("data-theme", "opensigncss");
localStorage.setItem("theme", "light");
}
};
return (
<>
<input
id="dark-mode-toggle"
type="checkbox"
className="op-toggle checked:[--tglbg:#3368ff] transition-all checked:bg-white"
checked={isDark}
onChange={handleChange}
/>
</>
);
};
export default ThemeToggle;
-82
View File
@@ -1,82 +0,0 @@
import { Helmet } from "react-helmet";
import { useLocation, matchPath } from "react-router";
import { useTranslation } from "react-i18next";
import { useMemo } from "react";
import { useManifestUrl } from "../hook/useManifestUrl";
const TITLE_MAP = {
"/": "login",
// Homelayout
"/dashboard/35KBoSgoAK": "Dashboard",
"/form/sHAnZphf69": "Sign Yourself",
"/form/8mZzFxbG1z": "Request Signatures",
"/form/template": "New Template",
"/report/6TeaPr321t": "Templates",
"/report/4Hhwbp482K": "Need your sign",
"/report/1MwEuxLEkF": "In Progress",
"/report/kQUoW4hUXz": "Completed",
"/report/ByHuevtCFY": "Drafts",
"/report/UPr2Fm5WY3": "Declined",
"/report/zNqBHXHsYH": "Expired",
"/report/contacts": "Contactbook",
"/drive": "Drive",
"/managesign": "My Signature",
"/preferences": "Preferences",
"/users": "Users",
"/profile": "profile",
"/changepassword": "change-password",
"/verify-document": "verify-document",
"/signaturePdf/:docId": "Sign Yourself",
"/placeHolderSign/:docId": "Request Signatures",
"/template/:templateId": "New Template",
"/recipientSignPdf/:docId": "Request Signatures",
"/recipientSignPdf/:docId/:contactBookId": "Request Signatures",
"/load/recipientSignPdf/:docId/:contactBookId": "Request Signatures",
// alone
"/debugpdf": "Debug Pdf",
"/forgetpassword": "forgot-password",
"/success": "success",
"/addadmin": "add-admin",
"/upgrade-2.1": "add-admin",
"/draftDocument": "New Document",
"/login/:base64url": "Request Signatures",
};
function resolveTitle(pathname, override) {
if (override) return override;
for (let [pattern, label] of Object.entries(TITLE_MAP)) {
if (matchPath({ path: pattern, end: true }, pathname)) {
return label;
}
}
return "";
}
export default function Title() {
const { pathname, state } = useLocation();
const { t } = useTranslation();
const appName =
"OpenSign™";
const logo = useMemo(() => localStorage.getItem("favicon"), []);
const prefix = useMemo(
() => resolveTitle(pathname, state?.title),
[pathname, state?.title]
);
const title = useMemo(
() => (prefix ? `${t(prefix)} - ${appName}` : appName),
[t, prefix, appName]
);
const manifestUrl = useManifestUrl(appName, logo);
return (
<Helmet>
<title>{title}</title>
<meta name="description" content={title} />
{logo && <link rel="icon" type="image/png" href={logo} />}
<link rel="manifest" href={manifestUrl} />
</Helmet>
);
}
@@ -1,60 +0,0 @@
import React from "react";
import { useNavigate } from "react-router";
import { openInNewTab } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
const DashboardButton = (props) => {
const navigate = useNavigate();
const { t } = useTranslation();
function openReport() {
if (props.Data && props.Data.Redirect_type) {
const Redirect_type = props.Data.Redirect_type;
const id = props.Data.Redirect_id;
if (Redirect_type === "Form") {
navigate(`/form/${id}`);
} else if (Redirect_type === "Report") {
navigate(`/report/${id}`);
} else if (Redirect_type === "Url") {
openInNewTab(id);
}
}
}
return (
<div
onClick={() => openReport()}
className={`${
props.Data && props.Data.Redirect_type
? "cursor-pointer"
: "cursor-default"
} w-full shadow-md px-3 py-2 op-card bg-base-100`}
>
<div className="flex flex-row items-center text-base-content">
<div className="flex flex-row items-center">
<span className="rounded-full bg-base-content bg-opacity-20 w-[60px] h-[60px] self-start flex justify-center items-center">
<i
className={`${
props.Icon ? props.Icon : "fa-light fa-info"
} text-[25px] lg:text-[30px]`}
></i>
</span>
</div>
<div className="text-lg ml-3">
{t(`sidebar.${props.Label}`)}
{props.Label === "Sign yourself" && (
<div className="text-gray-500 text-xs mt-1">
{t("signyour-self-button")}
</div>
)}
{props.Label === "Request signatures" && (
<div className="text-gray-500 text-xs mt-1">
{t("requestsign-button")}
</div>
)}
</div>
</div>
</div>
);
};
export default DashboardButton;
@@ -1,351 +0,0 @@
import { useState, useEffect } from "react";
import axios from "axios";
import Parse from "parse";
import getReplacedHashQuery from "../../constant/getReplacedHashQuery";
import { useNavigate } from "react-router";
import Tooltip from "../../primitives/Tooltip";
import { useTranslation } from "react-i18next";
const DashboardCard = (props) => {
const navigate = useNavigate();
const { t } = useTranslation();
const [parseBaseUrl] = useState(localStorage.getItem("baseUrl"));
const [parseAppId] = useState(localStorage.getItem("parseAppId"));
const [response, setresponse] = useState("");
const [loading, setLoading] = useState(false);
const renderData = async () => {
if (props.Data.queryType === "function") {
setLoading(true);
try {
let url = `${parseBaseUrl}${props.Data.class}`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
sessionToken: localStorage.getItem("accesstoken")
};
let body = {};
let res;
if (localStorage.getItem("Extand_Class")) {
let data = JSON.parse(localStorage.getItem("Extand_Class"));
res = data[0];
} else {
res = await Parse.Cloud.run("getUserDetails");
if (res) res = res.toJSON();
}
if (res) {
let json = res;
var reg = /(\#.*?\#)/gi; // eslint-disable-line
var str = props.Data.query;
var test = "";
if (props.Data.extendkey) {
let a = props.Data.extendkey.split(".");
if (a.length > 0) {
test = str.replace(reg, json[a[0]][a[1]]);
} else {
test = str.replace(reg, json[a[0]]);
}
} else {
test = str.replace(reg, json.objectId);
}
if (str.replace(reg, json.objectId)) {
body = test;
} else {
body = props.Data.query;
}
} else {
body = props.Data.query;
}
await axios.post(url, body, { headers: headers }).then((res) => {
if (res) {
if (res.data.result.length > 0) {
setresponse(res.data.result[0][props.Data.key]);
} else {
setresponse(0);
}
setLoading(false);
} else {
setLoading(false);
}
});
} catch (e) {
console.error("Problem", e.message);
setLoading(false);
}
} else {
setLoading(true);
try {
const currentUser = Parse.User.current();
let reg1 = /(\#.*?\#)/gi; // eslint-disable-line
let _query = props.Data.query;
let str = _query;
var test1;
str = str.split("#$").join("$");
str = str.split("#*").join("$");
str = str.split("_DOT_").join(".");
if (str.includes("#")) {
let resr;
if (localStorage.getItem("Extand_Class")) {
let data = JSON.parse(localStorage.getItem("Extand_Class"));
resr = data[0];
} else {
resr = await Parse.Cloud.run("getUserDetails");
if (resr) resr = resr.toJSON();
}
let json = resr;
let output = str.match(reg1);
const HashCount = str.match(reg1);
if (HashCount.length > 1) {
// `getReplacedHashQuery` is used to replace multiple hash keyword with actual values from query
test1 = getReplacedHashQuery(str, json);
} else {
output = output.join();
output = output.substring(1, output.length - 1);
output = output.split(".");
if (output.length > 1) {
test1 = str.replace(reg1, json[output[0]][output[1]]);
} else if (json[output[0]]) {
if (typeof json[output[0]] === "object") {
test1 = str.replace(reg1, JSON.stringify(json[output[0]]));
} else {
test1 = str.replace(reg1, json[output[0]]);
}
} else {
test1 = str.replace(reg1, currentUser.id);
}
}
} else {
test1 = str.replace(reg1, currentUser.id);
}
let url = `${parseBaseUrl}classes/${props.Data.class}?${test1}`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
};
// handle need your sign report count
if (props.Data.Redirect_id === "4Hhwbp482K") {
const params = {
reportId: props.Data.Redirect_id,
skip: 0,
limit: 200
};
const url = `${parseBaseUrl}functions/getReport`;
await axios
.post(url, params, {
headers: {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
sessiontoken: localStorage.getItem("accesstoken")
}
})
.then((res) => {
const listData = res.data?.result?.filter(
(x) => x.Signers.length > 0
);
let arr = [];
for (const obj of listData) {
const isSigner = obj.Signers?.some(
(item) => item.UserId.objectId === currentUser.id
);
if (isSigner) {
let isRecord;
if (obj?.AuditTrail && obj?.AuditTrail.length > 0) {
isRecord = obj?.AuditTrail.some(
(item) =>
item?.UserPtr?.UserId?.objectId === currentUser.id &&
item.Activity === "Signed"
);
} else {
isRecord = false;
}
if (isRecord === false) {
arr.push(obj);
}
}
}
setresponse(arr.length);
});
} else {
await axios.get(url, { headers: headers }).then((res) => {
if (res?.data?.[props.Data.key]) {
setresponse(parseInt(res.data[props.Data.key]));
} else if (res?.data?.results?.length > 0) {
setresponse(res.data.results.length);
} else {
setresponse(0);
}
});
}
} catch (e) {
console.error("Problem", e);
} finally {
setLoading(false);
}
}
};
const filterRender = async () => {
if (props.FilterData && props.FilterData.queryType === "function") {
setLoading(true);
try {
let url = `${parseBaseUrl}${props.FilterData.class}`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
sessionToken: localStorage.getItem("accesstoken")
};
let body = {};
var str = props.FilterData.query;
let restr = JSON.stringify(props.FilterData.query);
var reg = /(\#.*?\#)/gi; // eslint-disable-line
restr = restr.split("#$").join("$");
restr = restr.split("#*").join("$");
restr = restr.split("_DOT_").join(".");
if (restr.includes("#")) {
try {
let res;
if (localStorage.getItem("Extand_Class")) {
let data = JSON.parse(localStorage.getItem("Extand_Class"));
res = data[0];
} else {
let resr = await Parse.Cloud.run("getUserDetails");
if (res) res = resr.toJSON();
}
let json = res;
let output = restr.match(reg);
if (output.length === 1) {
output = output.filter((x) => x === "#filterCondition#");
if (output.length === 1) {
str = str.replace("#filterCondition#", props.Filter);
} else {
output = output.join();
output = output.substring(1, output.length - 1);
output = output.split(".");
if (output.length > 0) {
str = str.replace(reg, json[output[0]][output[1]]);
} else {
str = str.replace(reg, json[output[0]]);
}
}
} else if (output.length === 2) {
output = output.filter((x) => x !== "#filterCondition#");
if (output.length === 1) {
str = str.replace("#filterCondition#", props.Filter);
output = output.join();
output = output.substring(1, output.length - 1);
output = output.split(".");
if (output.length > 1) {
str = str.replace(reg, json[output[0]][output[1]]);
} else {
str = str.replace(reg, json[output[0]]);
}
}
}
body = str;
const response = await axios.post(url, body, { headers: headers });
if (response.data.result.length > 0) {
setresponse(response.data.result[0][props.FilterData.key]);
setLoading(false);
} else {
setresponse("0");
setLoading(false);
}
} catch (error) {
setLoading(false);
}
}
} catch (e) {
console.error("Problem", e);
setLoading(false);
}
}
};
const setFormat = (val) => {
switch (props.Format) {
case "INR":
if (val)
return Number(val)
.toFixed(2)
.toString()
.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return 0;
default:
return val;
}
};
useEffect(() => {
renderData();
//eslint-disable-next-line
}, []);
useEffect(() => {
if (props.Filter) {
filterRender();
}
//eslint-disable-next-line
}, [props.Filter]);
function openReport() {
if (props.Data && props.Data.Redirect_type) {
const Redirect_type = props.Data.Redirect_type;
const id = props.Data.Redirect_id;
if (Redirect_type === "Form") {
navigate(`/form/${id}`);
} else if (Redirect_type === "Report") {
navigate(`/report/${id}`);
} else if (Redirect_type === "Url") {
window.location = id;
} else if (Redirect_type === "Microapp") {
navigate(`/microapp/${id}`);
}
}
}
return (
<div
onClick={() => openReport()}
className={`${
props.Data && props.Data.Redirect_type
? "cursor-pointer"
: "cursor-default"
}`}
>
<div className="flex items-center justify-start gap-5 text-white">
<span className="rounded-full bg-base-300 bg-opacity-20 w-[60px] h-[60px] self-start flex justify-center items-center">
<i
className={`${
props.Icon ? props.Icon : "fa-light fa-info"
} text-[25px] lg:text-[30px]`}
></i>
</span>
<div className="font-medium">
<div className="text-base lg:text-lg">
{t(`dashboard-card.${props.Label}`)}
</div>
<div className="text-2xl font-light">
{loading ? <div className="loader-01"></div> : setFormat(response)}
</div>
</div>
</div>
<div className="text-xs absolute top-3 right-2">
<Tooltip
id={props.Label}
iconColor={"white"}
message={t(`tour-mssg.${props.Label}`)}
/>
</div>
</div>
);
};
export default DashboardCard;
@@ -1,230 +0,0 @@
import { useEffect, useState, useRef } from "react";
import Parse from "parse";
import DocumentsReport from "../../reports/document/DocumentsReport";
import reportJson from "../../json/ReportJson";
import axios from "axios";
import Loader from "../../primitives/Loader";
import { useTranslation } from "react-i18next";
function DashboardReport(props) {
const { t } = useTranslation();
// console.log("props ", props)
const [List, setList] = useState([]);
const [isLoader, setIsLoader] = useState(true);
const [reportName, setReportName] = useState("");
const [actions, setActions] = useState([]);
const [heading, setHeading] = useState([]);
const [isNextRecord, setIsNextRecord] = useState(false);
const [isMoreDocs, setIsMoreDocs] = useState(true);
const abortController = new AbortController();
const docPerPage = 5;
const [searchTerm, setSearchTerm] = useState("");
const [mobileSearchOpen, setMobileSearchOpen] = useState(false);
const [isSearchResult, setIsSearchResult] = useState(false);
const debounceTimer = useRef(null);
useEffect(() => {
setReportName("");
setSearchTerm("");
setMobileSearchOpen(false);
getReportData(props.Record.reportId, 0, 20, "");
// Function returned from useEffect is called on unmount
return () => {
setIsLoader(true);
setList([]);
setIsNextRecord(false);
// Here it'll abort the fetch
abortController.abort();
};
// eslint-disable-next-line
}, [props.Record.reportId]);
// below useEffect call when isNextRecord state is true and fetch next record
useEffect(() => {
if (isNextRecord) {
getReportData(props.Record.reportId, List.length, 20, searchTerm);
}
// eslint-disable-next-line
}, [isNextRecord]);
const handleSearchChange = async (e) => {
const term = e.target.value.toLowerCase();
setSearchTerm(term);
if (debounceTimer.current) {
clearTimeout(debounceTimer.current);
}
debounceTimer.current = setTimeout(async () => {
try {
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
sessiontoken: localStorage.getItem("accesstoken")
};
const url = `${localStorage.getItem("baseUrl")}functions/getReport`;
const res = await axios.post(
url,
{
reportId: props.Record.reportId,
searchTerm: term,
skip: 0,
limit: docPerPage
},
{ headers }
);
const data = res.data?.result || [];
if (!data.error) {
setList(data);
setIsMoreDocs(data.length >= docPerPage);
setIsNextRecord(false);
setIsSearchResult(true);
}
} catch (err) {
console.error("Search error:", err);
}
}, 300);
setIsSearchResult(false);
};
const handleSearchPaste = (e) => {
setTimeout(() => {
handleSearchChange({ target: { value: e.target.value } });
}, 0);
};
useEffect(() => {
return () => {
if (debounceTimer.current) {
clearTimeout(debounceTimer.current);
}
};
}, []);
const getReportData = async (
id,
skipUserRecord = 0,
limit = 20,
term = searchTerm
) => {
setIsLoader(true);
const json = reportJson(id);
if (json) {
setActions(json.actions);
setReportName(json.reportName);
setHeading(json.heading);
const currentUser = Parse.User.current().id;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
sessiontoken: localStorage.getItem("accesstoken")
};
try {
const skipRecord = id === "5Go51Q7T8r" ? 0 : skipUserRecord;
const limitRecord = id === "5Go51Q7T8r" ? 200 : limit;
const params = { reportId: id, skip: skipRecord, limit: limitRecord };
if (term) {
params.searchTerm = term;
}
const url = `${localStorage.getItem("baseUrl")}functions/getReport`;
const res = await axios.post(url, params, {
headers: headers,
signal: abortController.signal // is used to cancel fetch query
});
if (id === "5Go51Q7T8r") {
const listData = res.data?.result.filter((x) => x.Signers.length > 0);
let arr = [];
for (const obj of listData) {
const isSigner = obj.Signers?.some(
(item) => item.UserId.objectId === currentUser
);
if (isSigner) {
let isRecord;
if (obj?.AuditTrail && obj?.AuditTrail.length > 0) {
isRecord = obj?.AuditTrail.some(
(item) =>
item?.UserPtr?.UserId?.objectId === currentUser &&
item.Activity === "Signed"
);
} else {
isRecord = false;
}
if (isRecord === false) {
arr.push(obj);
}
}
}
if (arr.length === docPerPage) {
setIsMoreDocs(true);
} else {
setIsMoreDocs(false);
}
setList((prevRecord) =>
prevRecord.length > 0 ? [...prevRecord, ...arr] : arr
);
} else {
if (res.data.result.length >= docPerPage) {
setIsMoreDocs(true);
} else {
setIsMoreDocs(false);
}
setIsNextRecord(false);
if (!res.data.result.error) {
setList((prevRecord) =>
prevRecord.length > 0
? [...prevRecord, ...res.data.result]
: res.data.result
);
}
}
setIsLoader(false);
} catch (err) {
const isCancel = axios.isCancel(err);
if (!isCancel) {
console.log("err ", err);
setIsLoader(false);
}
setIsLoader(false);
}
} else {
setIsLoader(false);
}
};
return (
<>
{isLoader ? (
<div className="h-[250px] flex justify-center items-center">
<Loader />
</div>
) : (
<>
{reportName ? (
<DocumentsReport
ReportName={reportName}
List={List}
setList={setList}
actions={actions}
heading={heading}
setIsNextRecord={setIsNextRecord}
isMoreDocs={isMoreDocs}
docPerPage={docPerPage}
mobileSearchOpen={mobileSearchOpen}
setMobileSearchOpen={setMobileSearchOpen}
searchTerm={searchTerm}
handleSearchChange={handleSearchChange}
handleSearchPaste={handleSearchPaste}
isSearchResult={isSearchResult}
/>
) : (
<div className="flex items-center justify-center h-[100px] w-full bg-white rounded-box">
<div className="text-center text-xl text-base-content">
{t("report-not-found")}
</div>
</div>
)}
</>
)}
</>
);
}
export default DashboardReport;
@@ -1,140 +0,0 @@
import React, { Suspense } from "react";
import { lazyWithRetry } from "../../utils";
import { useTranslation } from "react-i18next";
const DashboardButton = lazyWithRetry(() => import("./DashboardButton"));
const DashboardCard = lazyWithRetry(() => import("./DashboardCard"));
const DashboardReport = lazyWithRetry(() => import("./DashboardReport"));
const buttonList = [
{
label: "Sign yourself",
redirectId: "sHAnZphf69",
redirectType: "Form",
icon: "fa-light fa-pen-nib"
},
{
label: "Request signatures",
redirectId: "8mZzFxbG1z",
redirectType: "Form",
icon: "fa-light fa-paper-plane"
}
];
const GetDashboard = (props) => {
const { t } = useTranslation();
const Button = ({ label, redirectId, redirectType, icon }) => (
<DashboardButton
Icon={icon}
Label={label}
Data={{ Redirect_type: redirectType, Redirect_id: redirectId }}
/>
);
const renderSwitchWithTour = (col) => {
switch (col.widget.type) {
case "Card":
return (
<div
className={`${
col?.widget?.bgColor ? col.widget.bgColor : "bg-[#2ed8b6]"
} op-card w-full h-[140px] px-3 pt-4 mb-3 shadow-md`}
data-tut={col.widget.data.tourSection}
>
<Suspense
fallback={
<div className="h-[150px] w-full flex justify-center items-center">
{t("loading")}
</div>
}
>
<DashboardCard
Icon={col.widget.icon}
Label={col.widget.label}
Format={col.widget.format && col.widget.format}
Data={col.widget.data}
FilterData={col.widget.filter}
/>
</Suspense>
</div>
);
case "report": {
return (
<div data-tut={col.widget.data.tourSection}>
<Suspense fallback={<div>please wait</div>}>
<div className="mb-3 md:mb-0">
<DashboardReport Record={col.widget} />
</div>
</Suspense>
</div>
);
}
default:
return <></>;
}
};
const renderSwitch = (col) => {
switch (col.widget.type) {
case "Card":
return (
<div
className={`${
col?.widget?.bgColor ? col.widget.bgColor : "bg-[#2ed8b6]"
} op-card w-full h-[140px] px-3 pt-4 mb-3 shadow-md"`}
>
<Suspense fallback={<div>please wait</div>}>
<DashboardCard
Icon={col.widget.icon}
Label={col.widget.label}
Format={col.widget.format && col.widget.format}
Data={col.widget.data}
FilterData={col.widget.filter}
/>
</Suspense>
</div>
);
case "report": {
return (
<Suspense fallback={<div>please wait</div>}>
<div className="mb-3 md:mb-0">
<DashboardReport Record={col.widget} />
</div>
</Suspense>
);
}
default:
return <></>;
}
};
return (
<div>
<div className="mb-3">
<div
data-tut={"tourbutton"}
className="flex flex-col md:flex-row gap-4"
>
{buttonList.map((btn) => (
<Button
key={btn.label}
label={btn.label}
redirectType={btn.redirectType}
redirectId={btn.redirectId}
icon={btn.icon}
/>
))}
</div>
</div>
<div className="grid grid-cols-12 w-full gap-x-4">
{props?.dashboard?.columns?.map((col, i) =>
col.widget.data && col.widget.data.tourSection ? (
<div key={i} className={col?.colsize}>
{renderSwitchWithTour(col)}
</div>
) : (
<div key={i} className={col?.colsize}>
{renderSwitch(col)}
</div>
)
)}
</div>
</div>
);
};
export default GetDashboard;
@@ -1,694 +0,0 @@
import React, { useState, useEffect, useRef } from "react";
import "../../styles/opensigndrive.css";
import axios from "axios";
import { ContextMenu } from "radix-ui";
import { useNavigate } from "react-router";
import Table from "react-bootstrap/Table";
import { HoverCard } from "radix-ui";
import ModalUi from "../../primitives/ModalUi";
import FolderModal from "../shared/fields/FolderModal";
import { useTranslation } from "react-i18next";
import { handleDownloadPdf, isMobile } from "../../constant/Utils";
import Parse from "parse";
function DriveBody(props) {
const { t } = useTranslation();
const [rename, setRename] = useState("");
const [renameValue, setRenameValue] = useState("");
const inputRef = useRef(null);
const [isOpenMoveModal, setIsOpenMoveModal] = useState(false);
const [selectDoc, setSelectDoc] = useState();
const [isDeleteDoc, setIsDeleteDoc] = useState({});
const contextMenu = [
{ type: "Download", icon: "fa-light fa-arrow-down" },
{ type: "Rename", icon: "fa-light fa-font" },
{ type: "Move", icon: "fa-light fa-file-export" },
{ type: "Delete", icon: "fa-light fa-trash" }
];
const navigate = useNavigate();
//to focus input box on press rename to change doc name
useEffect(() => {
if (rename && inputRef.current) {
setTimeout(() => {
inputRef.current.focus();
}, 10);
}
}, [rename]);
//function to handle folder component
const handleOnclikFolder = (data) => {
const folderData = {
name: data.Name,
objectId: data.objectId
};
props.setFolderName((prev) => [...prev, folderData]);
props.setIsLoading({
isLoad: true,
message: t("loading-mssg")
});
props.setDocId(data.objectId);
props.setPdfData([]);
props.setSkip(0);
};
//function for change doc name and update doc name in _document class
const handledRenameDoc = async (data) => {
setRename("");
const trimmedValue = renameValue.trim();
if (trimmedValue.length > 0) {
const updateName = {
Name: renameValue
};
const docId = data.objectId;
const docData = props.pdfData;
const updatedData = docData.map((item) => {
if (item.objectId === docId) {
// If the item's ID matches the target ID, update the name
return { ...item, Name: renameValue };
}
// If the item's ID doesn't match, keep it unchanged
return item;
});
props.setPdfData(updatedData);
props.sortingData(null, null, updatedData);
await axios
.put(
`${localStorage.getItem(
"baseUrl"
)}classes/contracts_Document/${docId}`,
updateName,
{
headers: {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
}
}
)
.then(() => {
// const res = result.data;
// console.log("res", res);
})
.catch((err) => {
console.log("Err ", err);
props.setIsAlert({
isShow: true,
alertMessage: t("something-went-wrong-mssg")
});
});
}
};
//function for navigate user to microapp-signature component
const checkPdfStatus = async (data) => {
const signerExist = data?.Signers;
const isDecline = data?.IsDeclined;
const isPlaceholder = data?.Placeholders;
const signedUrl = data?.SignedUrl;
const isSignYourself = data?.IsSignyourself;
//checking if document has completed and request signature flow
if (data?.IsCompleted && signerExist?.length > 0) {
navigate(`/recipientSignPdf/${data.objectId}`);
}
//checking if document has completed and signyour-self flow
else if ((!signerExist && !isPlaceholder) || isSignYourself) {
navigate(`/signaturePdf/${data.objectId}`);
}
//checking if document has declined by someone
else if (isDecline) {
navigate(`/recipientSignPdf/${data.objectId}`);
//checking draft type document
} else if (
signerExist?.length > 0 &&
isPlaceholder?.length > 0 &&
!signedUrl
) {
navigate(`/placeHolderSign/${data.objectId}`);
}
//Inprogress document
else if (isPlaceholder?.length > 0 && signedUrl) {
navigate(`/recipientSignPdf/${data.objectId}`);
} //placeholder draft document
else if (
(signerExist?.length > 0 &&
(!isPlaceholder || isPlaceholder?.length === 0)) ||
((!signerExist || signerExist?.length === 0) && isPlaceholder?.length > 0)
) {
navigate(`/placeHolderSign/${data.objectId}`);
}
};
const handleMenuItemClick = async (selectType, data, deleteType) => {
switch (selectType) {
case "Download": {
await handleDownloadPdf([data]);
break;
}
case "Rename": {
setRenameValue(data.Name);
setRename(data.objectId);
break;
}
case "Delete": {
setIsDeleteDoc({ status: true, deleteType });
setSelectDoc(data);
break;
}
case "Move": {
handleMoveDocument(data);
break;
}
default:
null;
}
};
//function for delete document
const handleDeleteDocument = async (docData) => {
setIsDeleteDoc({});
const docId = docData.objectId;
const data = {
IsArchive: true
};
await axios
.put(
`${localStorage.getItem("baseUrl")}classes/contracts_Document/${docId}`,
data,
{
headers: {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
}
}
)
.then((result) => {
const res = result.data;
if (res) {
const updatedData = props.pdfData.filter((x) => x.objectId !== docId);
props.setPdfData(updatedData);
}
})
.catch((err) => {
console.log("Err ", err);
props.setIsAlert({
isShow: true,
alertMessage: t("something-went-wrong-mssg")
});
});
};
const handleMoveDocument = async (docData) => {
setIsOpenMoveModal(true);
setSelectDoc(docData);
};
//function for move document from one folder to another folder
const handleMoveFolder = async (selectFolderData) => {
const selecFolderId = selectDoc?.Folder?.objectId;
const moveFolderId = selectFolderData?.ObjectId;
let updateDocId = selectDoc?.objectId;
let updateData;
const checkExist = moveFolderId
? selecFolderId === moveFolderId
? true
: false
: selecFolderId
? false
: true;
if (!checkExist) {
if (moveFolderId) {
updateData = {
Folder: {
__type: "Pointer",
className: "contracts_Document",
objectId: moveFolderId
}
};
} else {
updateData = {
Folder: { __op: "Delete" }
};
}
await axios
.put(
`${localStorage.getItem(
"baseUrl"
)}classes/contracts_Document/${updateDocId}`,
updateData,
{
headers: {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
}
}
)
.then((Listdata) => {
// console.log("Listdata ", Listdata);
const res = Listdata.data;
if (res) {
const updatedData = props.pdfData.filter(
(x) => x.objectId !== updateDocId
);
props.setPdfData(updatedData);
}
})
.catch((err) => {
console.log("err", err);
});
setIsOpenMoveModal(false);
} else {
alert(t("folder-already-exist!"));
setIsOpenMoveModal(false);
}
};
const handleEnterPress = (e, data) => {
if (e.key === "Enter") {
handledRenameDoc(data);
}
};
const checkFolderEmpty = async (docData) => {
let isEmptyFolder = true;
const query = new Parse.Query("contracts_Document");
query.equalTo("Folder", {
__type: "Pointer",
className: "contracts_Document",
objectId: docData.objectId
});
query.notEqualTo("IsArchive", true);
const res = await query.find();
const jsonRes = JSON.parse(JSON.stringify(res));
if (jsonRes && jsonRes.length > 0) {
isEmptyFolder = false;
return isEmptyFolder;
} else {
return isEmptyFolder;
}
};
const handleDeleteFolder = async (docData) => {
setIsDeleteDoc({});
const isEmptyFolder = await checkFolderEmpty(docData);
if (isEmptyFolder) {
const docId = docData?.objectId;
try {
const updateQuery = new Parse.Query("contracts_Document");
const updateObj = await updateQuery.get(docId);
updateObj.set("IsArchive", true);
const res = await updateObj.save();
if (res) {
const updatedData = props.pdfData.filter((x) => x.objectId !== docId);
props.setPdfData(updatedData);
}
} catch (err) {
console.log("Err ", err);
props.setIsAlert({
isShow: true,
alertMessage: t("something-went-wrong-mssg")
});
}
} else {
alert(t("delete-folder-alert-1"));
}
};
//component to handle type of document and render according to type
const handleFolderData = (data, ind, listType) => {
let createddate, status, isDecline, signerExist, isComplete;
if (data.Type !== "Folder") {
const expireDate = data.ExpiryDate && data.ExpiryDate.iso;
const createdDate = data.createdAt && data.createdAt;
createddate = new Date(createdDate).toLocaleDateString();
isComplete = data.IsCompleted && data.IsCompleted ? true : false;
isDecline = data.IsDeclined && data.IsDeclined;
signerExist = data.Signers && data.Signers;
const signedUrl = data.SignedUrl;
const expireUpdateDate = new Date(expireDate).getTime();
const currDate = new Date().getTime();
let isExpire = false;
if (currDate > expireUpdateDate) {
isExpire = true;
}
if (isComplete) {
status = "Completed";
} else if (isDecline) {
status = "Declined";
} else if (!signedUrl) {
status = "Draft";
} else if (isExpire) {
status = "Expired";
} else {
status = "In Progress";
}
}
const signersName = () => {
const getSignersName =
signerExist?.length > 0 && signerExist?.map((data) => data?.Name || "");
const signerName =
getSignersName?.length > 0 ? getSignersName?.join(", ") : "";
return (
<span className="text-[12px] font-medium w-[90%] break-words">
{signerName && signerName}
</span>
);
};
return listType === "table" ? (
data.Type === "Folder" ? (
<tr onClick={() => handleOnclikFolder(data)}>
<td className="cursor-pointer flex items-center gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
className="w-[26px] h-[26px] fill-current"
>
<path d="M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z" />
</svg>
<span className="text-[12px] font-medium">{data.Name}</span>
</td>
<td>_</td>
<td>{t("folder")}</td>
<td>_</td>
<td>_</td>
</tr>
) : (
<tr onClick={() => checkPdfStatus(data)}>
<td className="cursor-pointer flex items-center gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 384 512"
className="w-[26px] h-[26px] fill-current op-text-primary"
>
<path d="M374.629 150.627L233.371 9.373C227.371 3.371 219.23 0 210.746 0H64C28.652 0 0 28.652 0 64V448C0 483.345 28.652 512 64 512H320C355.348 512 384 483.345 384 448V173.254C384 164.767 380.629 156.629 374.629 150.627ZM224 22.629L361.375 160H248C234.781 160 224 149.234 224 136V22.629ZM368 448C368 474.467 346.469 496 320 496H64C37.531 496 16 474.467 16 448V64C16 37.533 37.531 16 64 16H208V136C208 158.062 225.938 176 248 176H368V448ZM96 264C96 268.406 99.594 272 104 272H280C284.406 272 288 268.406 288 264S284.406 256 280 256H104C99.594 256 96 259.594 96 264ZM280 320H104C99.594 320 96 323.594 96 328S99.594 336 104 336H280C284.406 336 288 332.406 288 328S284.406 320 280 320ZM280 384H104C99.594 384 96 387.594 96 392S99.594 400 104 400H280C284.406 400 288 396.406 288 392S284.406 384 280 384Z" />
</svg>
<span className="text-[12px] font-medium">{data.Name}</span>
</td>
<td>{createddate}</td>
<td>{t("pdf")}</td>
<td>{t(`drive-document-status.${status}`)}</td>
<td>
<i
onClick={(e) => {
e.stopPropagation();
handleMenuItemClick("Download", data);
}}
className="fa-light fa-download mr-[8px] op-text-primary cursor-pointer"
aria-hidden="true"
></i>
</td>
</tr>
)
) : listType === "list" && data.Type === "Folder" ? (
<div className="relative w-[100px] h-[100px] mx-2 my-3">
<ContextMenu.Root>
<ContextMenu.Trigger className="flex flex-col justify-center items-center select-none-cls">
{/* folder */}
<div
data-tut={props.dataTutSeventh}
onClick={() => {
if (!rename) {
handleOnclikFolder(data);
}
}}
className="cursor-pointer"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
className="w-[100px] h-[100px] fill-current"
>
<path d="M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z" />
</svg>
{rename === data.objectId ? (
<input
onFocus={() => {
const input = inputRef.current;
if (input) {
input.select();
}
}}
autoFocus={true}
type="text"
onBlur={() => handledRenameDoc(data)}
onKeyDown={(e) => handleEnterPress(e, data)}
ref={inputRef}
defaultValue={renameValue}
onChange={(e) => setRenameValue(e.target.value)}
className="op-input op-input-bordered op-input-xs w-[100px] focus:outline-none hover:border-base-content text-[10px]"
/>
) : (
<span className="fileName select-none-cls">{data.Name}</span>
)}
</div>
</ContextMenu.Trigger>
<ContextMenu.Portal>
<ContextMenu.Content
className="ContextMenuContent"
sideOffset={5}
align="end"
>
<ContextMenu.Item
onClick={() => handleMenuItemClick("Rename", data)}
className="ContextMenuItem"
>
<i className="fa-light fa-font mr-[8px]"></i>
<span>{t(`context-menu.Rename`)}</span>
</ContextMenu.Item>
<ContextMenu.Item
onClick={() => handleMenuItemClick("Delete", data, data.Type)}
className="ContextMenuItem"
>
<i className="fa-light fa-trash mr-[8px]"></i>
<span>{t(`context-menu.Delete`)}</span>
</ContextMenu.Item>
</ContextMenu.Content>
</ContextMenu.Portal>
</ContextMenu.Root>
</div>
) : (
<HoverCard.Root
open={rename || isMobile ? false : undefined}
openDelay={0}
closeDelay={100}
>
<HoverCard.Trigger asChild>
<div>
<ContextMenu.Root>
<div className="relative w-[100px] h-[100px] mx-2 my-3">
<ContextMenu.Trigger
asChild
className="flex flex-col justify-center items-center select-none-cls"
>
{/* pdf */}
<div
data-tut={props.dataTutSixth}
onClick={() => {
if (!rename) {
checkPdfStatus(data);
}
}}
className="cursor-pointer"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 384 512"
className="w-[100px] h-[100px] fill-current op-text-primary"
>
<path d="M374.629 150.627L233.371 9.373C227.371 3.371 219.23 0 210.746 0H64C28.652 0 0 28.652 0 64V448C0 483.345 28.652 512 64 512H320C355.348 512 384 483.345 384 448V173.254C384 164.767 380.629 156.629 374.629 150.627ZM224 22.629L361.375 160H248C234.781 160 224 149.234 224 136V22.629ZM368 448C368 474.467 346.469 496 320 496H64C37.531 496 16 474.467 16 448V64C16 37.533 37.531 16 64 16H208V136C208 158.062 225.938 176 248 176H368V448ZM96 264C96 268.406 99.594 272 104 272H280C284.406 272 288 268.406 288 264S284.406 256 280 256H104C99.594 256 96 259.594 96 264ZM280 320H104C99.594 320 96 323.594 96 328S99.594 336 104 336H280C284.406 336 288 332.406 288 328S284.406 320 280 320ZM280 384H104C99.594 384 96 387.594 96 392S99.594 400 104 400H280C284.406 400 288 396.406 288 392S284.406 384 280 384Z" />
</svg>
{rename === data.objectId ? (
<input
autoFocus={true}
type="text"
onFocus={() => {
const input = inputRef.current;
if (input) {
input.select();
}
}}
onBlur={() => handledRenameDoc(data)}
onKeyDown={(e) => handleEnterPress(e, data, data.Type)}
ref={inputRef}
defaultValue={renameValue}
onChange={(e) => setRenameValue(e.target.value)}
className="op-input op-input-bordered op-input-xs w-[100px] focus:outline-none hover:border-base-content text-[10px]"
/>
) : (
<span className="fileName select-none-cls">
{data.Name}
</span>
)}
</div>
</ContextMenu.Trigger>
{status === "Completed" ? (
<div className="status-badge completed">
<i className="fa-light fa-check-circle"></i>
</div>
) : status === "Declined" ? (
<div className="status-badge declined">
<i className="fa-light fa-thumbs-down"></i>
</div>
) : status === "Expired" ? (
<div className="status-badge expired">
<i className="fa-light fa-hourglass-end"></i>
</div>
) : status === "Draft" ? (
<div className="status-badge draft">
<i className="fa-light fa-file"></i>
</div>
) : (
status === "In Progress" && (
<div className="status-badge in-progress">
<i className="fa-light fa-paper-plane"></i>
</div>
)
)}
</div>
<ContextMenu.Portal>
<ContextMenu.Content
className="ContextMenuContent"
sideOffset={5}
align="end"
>
{contextMenu.map((menu, ind) => {
return (
<ContextMenu.Item
key={ind}
onClick={() => handleMenuItemClick(menu.type, data)}
className="ContextMenuItem"
>
<i className={menu.icon}></i>
<span className="ml-[8px]">
{t(`context-menu.${menu.type}`)}
</span>
</ContextMenu.Item>
);
})}
</ContextMenu.Content>
</ContextMenu.Portal>
</ContextMenu.Root>
</div>
</HoverCard.Trigger>
<HoverCard.Portal>
<HoverCard.Content className="HoverCardContent" sideOffset={5}>
<strong className="text-[13px]">
{t("report-heading.Title")}:{" "}
</strong>
<span className="text-[12px] font-medium mb-0"> {data.Name}</span>
<br />
<strong className="text-[13px]">
{t("report-heading.Status")}:{" "}
</strong>
<span className="text-[12px] font-medium">
{t(`drive-document-status.${status}`)}
</span>
<br />
<strong className="text-[13px]">
{t("report-heading.created-date")}:{" "}
</strong>
<span className="text-[12px] font-medium">{createddate}</span>
<br />
{signerExist && (
<>
<strong className="text-[13px]">
{t("report-heading.Signers")}:{" "}
</strong>
{signersName()}
</>
)}
<HoverCard.Arrow className="HoverCardArrow" />
</HoverCard.Content>
</HoverCard.Portal>
</HoverCard.Root>
);
};
//component to handle type of document and render according to type
return (
<>
{props.isList ? (
<div className="container" style={{ overflowX: "auto" }}>
<Table striped bordered hover>
<thead>
<tr>
<th>{t("report-heading.Name")}</th>
<th>{t("report-heading.created-date")}</th>
<th>{t("report-heading.Type")}</th>
<th>{t("report-heading.Status")}</th>
<th>{t("action")}</th>
</tr>
</thead>
<tbody>
{props?.pdfData?.map((data, ind) => (
<React.Fragment key={ind}>
{handleFolderData(data, ind, "table")}
</React.Fragment>
))}
</tbody>
</Table>
</div>
) : (
<div className="flex flex-row flex-wrap items-center mt-1 pb-[20px] mx-[5px]">
{props?.pdfData?.map((data, ind) => (
<React.Fragment key={ind}>
{handleFolderData(data, ind, "list")}
</React.Fragment>
))}
</div>
)}
{isOpenMoveModal && (
<FolderModal
onSuccess={handleMoveFolder}
isOpenModal={isOpenMoveModal}
folderCls={"contracts_Document"}
setIsOpenMoveModal={setIsOpenMoveModal}
setPdfData={props.setPdfData}
/>
)}
<ModalUi
isOpen={isDeleteDoc.status}
title={t("delete-document")}
handleClose={() => setIsDeleteDoc({})}
>
<div className="h-full p-[20px] text-base-content">
{isDeleteDoc.deleteType ? (
<p>{t("delete-folder-alert")}</p>
) : (
<p>{t("delete-document-alert")}</p>
)}
<div className="h-[1px] w-full bg-[#9f9f9f] my-[15px]"></div>
<button
onClick={() => {
if (isDeleteDoc.deleteType) {
handleDeleteFolder(selectDoc);
} else {
handleDeleteDocument(selectDoc);
}
}}
type="button"
className="op-btn op-btn-primary mr-2"
>
{t("yes")}
</button>
<button
onClick={() => setIsDeleteDoc({})}
type="button"
className="op-btn op-btn-neutral"
>
{t("no")}
</button>
</div>
</ModalUi>
</>
);
}
export default DriveBody;
@@ -1,47 +0,0 @@
import React from "react";
import ModalUi from "../../primitives/ModalUi";
import { useTranslation } from "react-i18next";
const AddRoleModal = (props) => {
const { t } = useTranslation();
return (
<ModalUi
title={t("add-role")}
isOpen={props.isModalRole}
handleClose={props.handleCloseRoleModal}
>
<div className="text-base-content h-full py-[10px] px-[20px]">
<form className="flex flex-col" onSubmit={props.handleAddRole}>
<input
value={props.roleName}
onChange={(e) => props.setRoleName(e.target.value)}
placeholder={
props.signersdata.length > 0
? "Role " + (props.signersdata.length + 1)
: "Role 1"
}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs mt-1"
/>
<p className="text-[gray] text-[11px] mt-[5px] mb-[10px] ml-[10px]">
{t("role-ex")}..
</p>
<div>
<div className="h-[1px] w-full bg-[#9f9f9f] mb-[10px]"></div>
<button type="submit" className="op-btn op-btn-primary">
{t("add")}
</button>
<button
onClick={props.handleCloseRoleModal}
type="button"
className="op-btn op-btn-ghost text-base-content ml-2"
>
{t("close")}
</button>
</div>
</form>
</div>
</ModalUi>
);
};
export default AddRoleModal;
@@ -1,133 +0,0 @@
import React from "react";
import { useTranslation } from "react-i18next";
import ModalUi from "../../primitives/ModalUi";
function AgreementContent(props) {
const { t } = useTranslation();
const appName =
"OpenSign™";
const h2Style = "text-base-content font-medium text-lg";
const ulStyle = "list-disc px-4 py-3";
const handleOnclick = () => {
props.setIsAgree(true);
props.setIsShowAgreeTerms(false);
props.showFirstWidget();
};
return (
<div>
<ModalUi
isOpen={true}
title={t("term-cond-title")}
handleClose={() => props.setIsShowAgreeTerms(false)}
>
<div className="h-[100%] p-[20px]">
<h2 className={h2Style}>{t("term-cond-h")}</h2>
<span className="mt-2">
{t("term-cond-p1", { appName: appName })}
</span>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h1")}</h2>
<span className="mt-2">
{t("term-cond-p2", { appName: appName })}
</span>
<ul className={ulStyle}>
<li>{t("term-cond-p3", { appName: appName })}</li>
<li>{t("term-cond-p4")}</li>
</ul>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h2")}</h2>
<span className="mt-2">{t("term-cond-p5")}</span>
<ul className={ulStyle}>
<li>{t("term-cond-p6", { appName: appName })}</li>
<li>{t("term-cond-p7", { appName: appName })}</li>
<li>{t("term-cond-p8")}</li>
</ul>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h3")}</h2>
<span className="mt-2">{t("term-cond-p9")}</span>
<ul className={ulStyle}>
<li>{t("term-cond-p10")}</li>
<li>{t("term-cond-p11")}</li>
</ul>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h4")}</h2>
<span className="mt-2">
{t("term-cond-p12", { appName: appName })}
</span>
<ul className={ulStyle}>
<li>{t("term-cond-p13")}</li>
<li>{t("term-cond-p14")}</li>
<li>{t("term-cond-p15")}</li>
</ul>
<span>{t("term-cond-p16", { appName: appName })}</span>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h5")}</h2>
<p>{t("term-cond-p17", { appName: appName })}</p>
<p className="mt-2">{t("term-cond-p18")}</p>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h6")}</h2>
<span className="mt-2">{t("term-cond-p19")}</span>
<ul className={ulStyle}>
<li>{t("term-cond-p20")}</li>
<li>{t("term-cond-p21")}</li>
<li>{t("term-cond-p22", { appName: appName })}</li>
</ul>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h7")}</h2>
<span className="mt-2">
{t("term-cond-p23", { appName: appName })}
</span>
<ul className={ulStyle}>
<li>{t("term-cond-p24")}</li>
<li>{t("term-cond-p25")}</li>
</ul>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h8")}</h2>
<span className="mt-2">
{t("term-cond-p26", { appName: appName })}
</span>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<h2 className={h2Style}>{t("term-cond-h9")}</h2>
<span className="mt-2">
{t("term-cond-p27", { appName: appName })}
</span>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<span className="mt-2 font-medium">
{t("term-cond-p28", { appName: appName })}
</span>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<span className="mt-2">
{t("term-cond-p29", { appName: appName })}
</span>
<a
href="www.opensignlabs.com"
target="_blank"
className="text-blue-700 cursor-pointer"
>
www.opensignlabs.com
</a>
<span>{t("term-cond-p30")}</span>
<span className="font-medium"> support@opensignlabs.com </span>
<hr className="bg-[#9f9f9f] w-full my-[15px]" />
<div className="mt-6 flex justify-start gap-2">
<button
onClick={() => handleOnclick()}
className="op-btn op-btn-primary"
>
{t("agrre-button")}
</button>
<button
className="op-btn op-btn-ghost text-base-content"
onClick={() => props.setIsShowAgreeTerms(false)}
>
{t("close")}
</button>
</div>
</div>
</ModalUi>
</div>
);
}
export default AgreementContent;
@@ -1,54 +0,0 @@
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import AgreementContent from "./AgreementContent";
function AgreementSign(props) {
const { t } = useTranslation();
const [isShowAgreeTerms, setIsShowAgreeTerms] = useState(false);
return (
<>
<div className="op-modal op-modal-open absolute z-[448]">
<div className="w-[95%] md:w-[60%] lg:w-[40%] op-modal-box overflow-y-auto hide-scrollbar text-sm p-4">
<div className="flex flex-row items-center">
<div className="text-[11px] md:text-base text-base-content">
<span>{t("agree-p1")}</span>
<span
className="font-bold text-blue-600 cursor-pointer"
onClick={() => {
setIsShowAgreeTerms(true);
}}
>
{t("agree-p2")}
</span>
<span> {t("agree-p3")}</span>
</div>
</div>
<div className="flex mt-3">
<button
onClick={() => {
props.setIsAgree(true);
props.showFirstWidget();
}}
className="op-btn op-btn-primary op-btn-sm w-full md:w-auto"
>
{t("agrre-button")}
</button>
</div>
<div className="mt-2 text-base-content">
<span className="text-[11px]">{t("agreement-note")}</span>
</div>
</div>
</div>
{isShowAgreeTerms && (
<AgreementContent
setIsAgree={props.setIsAgree}
setIsShowAgreeTerms={setIsShowAgreeTerms}
showFirstWidget={props.showFirstWidget}
/>
)}
</>
);
}
export default AgreementSign;
@@ -1,23 +0,0 @@
import React from "react";
function BorderResize(props) {
const getHeight = () => {
const height = props.posHeight(props.pos, props.isSignYourself);
if (height > 14) {
return "14px";
} else {
return `${height}px`;
}
};
return (
<div
style={{ width: getHeight() || "14px", height: getHeight() || "14px" }}
className={`${props.right ? `-right-[12px]` : "-right-[2px]"} ${
props.top ? `-bottom-[12px]` : "-bottom-[2px]"
} absolute inline-block hover:cursor-sw-resize border-r-[3px] border-b-[3px] border-[#188ae2]`}
></div>
);
}
export default BorderResize;
@@ -1,104 +0,0 @@
import React, { useState, useEffect } from "react";
import ModalUi from "../../primitives/ModalUi";
import { fontsizeArr, fontColorArr } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
export default function CellsSettingModal({
isOpen,
handleClose,
defaultData,
handleSave
}) {
const { t } = useTranslation();
const [name, setName] = useState("");
const [cellCount, setCellCount] = useState(5);
const [fontSize, setFontSize] = useState(12);
const [fontColor, setFontColor] = useState("black");
useEffect(() => {
if (defaultData) {
setName(defaultData.options?.name || "Cells");
setCellCount(defaultData.options?.cellCount || 5);
setFontSize(defaultData.options?.fontSize || 12);
setFontColor(defaultData.options?.fontColor || "black");
}
}, [defaultData]);
const onSubmit = (e) => {
e.preventDefault();
handleSave &&
handleSave({
name,
cellCount: parseInt(cellCount, 10),
fontSize,
fontColor
});
};
return (
<ModalUi isOpen={isOpen} handleClose={handleClose} title={t("widget-info")}>
<form onSubmit={onSubmit} className="p-[20px] text-base-content flex flex-col gap-3">
<div>
<label htmlFor="name" className="text-[13px]">
{t("name")} <span className="text-[red]">*</span>
</label>
<input
required
name="name"
className="op-input op-input-bordered op-input-sm w-full text-xs focus:outline-none hover:border-base-content"
value={name}
onChange={(e) => setName(e.target.value)}
/>
</div>
<div>
<label htmlFor="cellCount" className="text-[13px]">
{t("cell-count")}
</label>
<input
type="number"
min="1"
name="cellCount"
className="op-input op-input-bordered op-input-sm w-full text-xs focus:outline-none hover:border-base-content"
value={cellCount}
onChange={(e) => setCellCount(e.target.value)}
/>
</div>
<div className="flex flex-col md:flex-row md:items-center gap-3">
<div className="flex items-center gap-2">
<span className="whitespace-nowrap">{t("font-size")}: </span>
<select
className="ml-[7px] w-[60%] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={fontSize}
onChange={(e) => setFontSize(parseInt(e.target.value))}
>
{fontsizeArr.map((size, ind) => (
<option className="text-[13px]" value={size} key={ind}>
{size}
</option>
))}
</select>
</div>
<div className="flex items-center">
<span>{t("color")}: </span>
<select
className="ml-[33px] md:ml-4 w-[65%] md:w-full op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={fontColor}
onChange={(e) => setFontColor(e.target.value)}
>
{fontColorArr.map((color, ind) => (
<option value={color} key={ind}>
{t(`color-type.${color}`)}
</option>
))}
</select>
<span className="w-5 h-[19px] ml-1" style={{ background: fontColor }} />
</div>
</div>
<div className="h-[1px] w-full bg-[#b7b3b3] my-[16px]"></div>
<button type="submit" className="op-btn op-btn-primary">
{t("save")}
</button>
</form>
</ModalUi>
);
}
@@ -1,143 +0,0 @@
import { useState, useEffect, useRef } from "react";
const Cell = ({
isEnabled,
count,
h,
value,
editable,
onChange,
onKeyDown,
onBlur,
inputRef,
index,
fontSize,
fontColor,
hint
}) => (
<div
className={`${isEnabled ? "bg-white border-gray-400" : "select-none-cls pointer-events-none border-gray-500"} flex items-center justify-center border-[1px]`}
style={{ flex: `0 0 ${100 / count}%`, height: h }}
>
<input
disabled={!isEnabled}
maxLength={1}
value={value}
readOnly={!editable}
ref={inputRef}
onChange={editable ? (e) => onChange && onChange(e, index) : undefined}
onKeyDown={editable ? (e) => onKeyDown && onKeyDown(e, index) : undefined}
// trigger validation when leaving a cell
onBlur={editable ? (e) => onBlur && onBlur(e, index) : undefined}
className={`${isEnabled ? "placeholder-gray-300" : "placeholder-gray-500"} w-full text-center focus:outline-none bg-transparent`}
placeholder={hint}
style={{ fontFamily: "Arial, sans-serif", fontSize, color: fontColor }}
/>
</div>
);
export default function CellsWidget({
isEnabled,
count = 8,
height = 40,
value = "",
editable = false,
onChange,
onKeyDown,
onBlur,
onCellCountChange,
inputRefs,
resizable = false,
fontSize = "12px",
fontColor = "black",
hint = ""
}) {
const [cellCount, setCellCount] = useState(count);
// keep internal state in sync with prop updates
useEffect(() => setCellCount(count), [count]);
const startX = useRef(0);
const startCount = useRef(cellCount);
const capture = (downEv, onMove, onUp = () => {}) => {
const id = downEv.pointerId;
const move = (ev) => id === ev.pointerId && onMove(ev);
const up = (ev) => {
if (id !== ev.pointerId) return;
onUp(ev);
downEv.target.releasePointerCapture(id);
window.removeEventListener("pointermove", move);
window.removeEventListener("pointerup", up);
};
window.addEventListener("pointermove", move);
window.addEventListener("pointerup", up);
downEv.target.setPointerCapture(id);
};
const onTopHandlePointerDown = (ev) => {
// Prevent triggering the widget drag logic
ev.stopPropagation();
ev.preventDefault();
startX.current = ev.clientX;
startCount.current = cellCount;
capture(ev, (moveEv) => {
const dx = moveEv.clientX - startX.current;
const delta = Math.floor(-dx / 5);
let newCount = Math.max(1, startCount.current + delta);
if (newCount !== cellCount) {
setCellCount(newCount);
onCellCountChange?.(newCount);
}
});
};
const cells = Array.from({ length: cellCount }).map((_, i) => value[i] || "");
const hints = Array.from({ length: cellCount }).map((_, i) => hint[i] || "");
return (
<div
className="relative flex w-full h-full overflow-visible"
style={{ height }}
>
{resizable && (
<div
className="cell-size-handle absolute left-1/2 -translate-x-1/2 -bottom-4 rotate-180 cursor-ew-resize touch-none"
onPointerDown={onTopHandlePointerDown}
>
<svg
className="w-4 h-4 text-blue-600"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fillRule="evenodd"
d="m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z"
clipRule="evenodd"
/>
</svg>
</div>
)}
{cells.map((val, i) => (
<Cell
key={i}
isEnabled={isEnabled}
count={cellCount}
h={height}
value={val}
editable={editable}
onChange={onChange}
onKeyDown={onKeyDown}
onBlur={onBlur}
inputRef={inputRefs ? (el) => (inputRefs.current[i] = el) : undefined}
index={i}
fontSize={fontSize}
fontColor={fontColor}
hint={hints[i]}
/>
))}
</div>
);
}
@@ -1,155 +0,0 @@
import { useRef, useState } from "react";
import ModalUi from "../../primitives/ModalUi";
import { EmailBody } from "./EmailBody";
import {
contractDocument,
sendEmailToSigners
} from "../../constant/Utils";
import { useTranslation } from "react-i18next";
import Loader from "../../primitives/Loader";
import { useNavigate } from "react-router";
function CustomizeMail(props) {
const { t } = useTranslation();
const editorRef = useRef();
const navigate = useNavigate();
const copyUrlRef = useRef(null);
const [isCustomize, setIsCustomize] = useState(false);
const [isLoader, setIsLoader] = useState(false);
const handleCloseSendmailModal = () => {
if (props?.handleClose) {
props?.handleClose();
return;
}
props?.setIsMailModal(false);
navigate("/report/1MwEuxLEkF");
};
const handleOnchangeRequest = () => {
if (editorRef.current) {
const html = editorRef.current.editor.root.innerHTML;
props?.setCustomizeMail((prev) => ({
...prev,
body: html
}));
}
};
const handleEmailSendToSigners = async () => {
setIsLoader(true);
const documentData = await contractDocument(props?.documentId);
if (documentData && documentData?.length > 0) {
props?.setDocumentDetails(documentData[0]);
if (
documentData?.[0]?.SendinOrder &&
documentData?.[0]?.SendinOrder === true
) {
const ownerEmail = documentData[0].ExtUserPtr.Email;
const ownerDetails = documentData[0].Signers.find(
(x) => x.Email === ownerEmail
);
props?.setCurrUserId(ownerDetails?.objectId);
}
//function is used to send email to signers for sign the document
const mailRes = await sendEmailToSigners(
documentData,
props?.signerList,
props?.customizeMail,
props?.defaultMail,
isCustomize,
);
props?.setIsMailModal(false);
props?.setIsSend(true);
setIsLoader(false);
if (mailRes?.status === "success") {
props?.setMailStatus("success");
} else if (mailRes?.status === "quota-reached") {
props?.setMailStatus("quotareached");
} else if (mailRes?.status === "daily-quota-reached") {
props?.setMailStatus("dailyquotareached");
} else {
props?.setMailStatus("failed");
}
// setMailStatus(mail_status);
} else {
alert("something-went-wrong-mssg");
}
};
return (
<>
{isLoader ? (
<div className="absolute w-full h-full flex justify-center items-center bg-black/30 rounded-box z-30">
<Loader />
</div>
) : (
<ModalUi
isOpen={props?.isMailModal}
title={t("send-mail")}
handleClose={() => handleCloseSendmailModal()}
>
<div className="max-h-96 overflow-y-scroll scroll-hide p-[20px] text-base-content">
{!isCustomize && <span>{t("placeholder-alert-3")}</span>}
{
isCustomize && (
<>
<EmailBody
editorRef={editorRef}
requestBody={props?.customizeMail.body}
requestSubject={props?.customizeMail.subject}
handleOnchangeRequest={handleOnchangeRequest}
setCustomizeMail={props?.setCustomizeMail}
/>
<div
className="flex justify-end items-center gap-1 mt-2 op-link op-link-primary"
onClick={() => {
props?.setCustomizeMail(props?.defaultMail);
}}
>
<span>{t("reset-to-default")}</span>
</div>
</>
)
}
<div className="flex flex-row items-center gap-2 md:gap-6 mt-2">
<div className="flex flex-row gap-2">
<button
onClick={() => handleEmailSendToSigners()}
className="op-btn op-btn-primary font-[500] text-sm shadow"
>
{t("send")}
</button>
{isCustomize && (
<button
onClick={() => setIsCustomize(false)}
className="op-btn op-btn-ghost font-[500] text-sm"
>
{t("close")}
</button>
)}
</div>
{
!isCustomize && (
<span
className="op-link op-link-accent text-sm"
onClick={() => setIsCustomize(!isCustomize)}
>
{t("cutomize-email")}
</span>
)
}
</div>
<div className="flex justify-center items-center mt-3">
<span className="h-[1px] w-[20%] bg-[#ccc]"></span>
<span className="ml-[5px] mr-[5px]">{t("or")}</span>
<span className="h-[1px] w-[20%] bg-[#ccc]"></span>
</div>
<div className="my-3">{props?.handleShareList()}</div>
<p id="copyUrl" ref={copyUrlRef} className="hidden"></p>
</div>
</ModalUi>
)}
</>
);
}
export default CustomizeMail;
@@ -1,118 +0,0 @@
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { useSelector } from "react-redux";
function DefaultSignature(props) {
const { t } = useTranslation();
const defaultSignImg = useSelector((state) => state.widget.defaultSignImg);
const myInitial = useSelector((state) => state.widget.myInitial);
const tabName = ["my-signature", "my-initials"];
const [activeTab, setActiveTab] = useState(0);
const confirmToaddDefaultSign = (type) => {
if (props?.xyPosition.length > 0) {
//check signature or initial widgets exist or not for auto signing
const getCurrentSignerXY = props?.xyPosition.filter(
(data) => data.Id === props.uniqueId
);
const checkIsSignInitialExist = getCurrentSignerXY?.every(
(placeholderObj) =>
placeholderObj?.placeHolder?.some((placeholder) =>
placeholder?.pos?.some((posItem) => posItem?.type === type)
)
);
if (checkIsSignInitialExist) {
props?.setDefaultSignAlert({
isShow: true,
alertMessage: t("default-sign-alert", { widgetsType: type }),
type: type
});
} else {
props?.setDefaultSignAlert({
isShow: true,
alertMessage: t("defaultSign-alert", { widgetsType: type })
});
}
} else {
props?.setDefaultSignAlert({
isShow: true,
alertMessage: t("please-select-position!")
});
}
};
return (
<div data-tut="reactourThird">
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
<p className="text-base-content">{t("signature")}</p>
</div>
<div className="flex justify-center items-center mt-2">
<div role="tablist" className="op-tabs op-tabs-bordered">
{tabName.map((tabData, ind) => (
<div
onClick={() => setActiveTab(ind)}
key={ind}
role="tab"
className={`${
activeTab === ind ? "op-tab-active" : ""
} op-tab flex items-center pb-10 md:pb-0`}
>
<span className="ml-1 text-[7px] font-medium md:font-normal md:text-[12px]">
{t(`${tabData}`)}
</span>
</div>
))}
</div>
</div>
<div className="flex flex-col items-center mt-[10px] font-semibold relative">
<div className="op-card shadow-md h-[111px] w-[90%] p-2">
{activeTab === 0 ? (
<img
alt="signature"
className="w-full h-full object-contain"
src={defaultSignImg}
/>
) : (
activeTab === 1 &&
(myInitial ? (
<img
alt="signature"
className="w-full h-full object-contain"
src={myInitial}
/>
) : (
<div className="flex justify-center items-center h-full">
<span>{t("initial-alert")}</span>
</div>
))
)}
</div>
<button
type="button"
className="op-btn op-btn-primary op-btn-sm mt-[10px]"
onClick={() =>
confirmToaddDefaultSign(
activeTab === 0 ? "signature" : activeTab === 1 && "initials"
)
}
disabled={
activeTab === 0 && !props?.isDefault
? true
: activeTab === 1 && !myInitial
? true
: false
}
>
{t("auto-sign-all")}
</button>
{!props.isDefault && (
<div className="absolute bg-black/70 text-white w-full h-full flex items-center justify-center text-[11px] cursor-default">
<span className="-rotate-45">
Document creator has disabled this option
</span>
</div>
)}
</div>
</div>
);
}
export default DefaultSignature;
@@ -1,99 +0,0 @@
import React, { useEffect, useState } from "react";
import LoaderWithMsg from "../../primitives/LoaderWithMsg";
import { contractDocument } from "../../constant/Utils";
import HandleError from "../../primitives/HandleError";
import { useLocation, useNavigate } from "react-router";
import { useTranslation } from "react-i18next";
function useQuery() {
return new URLSearchParams(useLocation().search);
}
function DraftDocument() {
const { t } = useTranslation();
const navigate = useNavigate();
const query = useQuery();
const docId = query.get("docId");
const [isLoading, setIsLoading] = useState({
isLoader: true,
message: t("loading-mssg")
});
useEffect(() => {
getDocumentDetails();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
//get document details
const getDocumentDetails = async () => {
//getting document details
const documentData = await contractDocument(docId);
if (documentData && documentData.length > 0) {
handleDraftDoc(documentData);
} else if (
documentData === "Error: Something went wrong!" ||
(documentData.result && documentData.result.error)
) {
if (documentData?.result?.error?.includes("deleted")) {
setIsLoading({
isLoader: false,
message: t("document-deleted")
});
} else {
setIsLoading({
isLoader: false,
message: t("something-went-wrong-mssg")
});
}
} else {
setIsLoading({ isLoader: false, message: t("no-data") });
}
};
//check document type and render on signyour self and placeholder route
const handleDraftDoc = (documentData) => {
const data = documentData[0];
const signerExist = data.Signers && data.Signers;
const isDecline = data.IsDeclined && data.IsDeclined;
const isPlaceholder = data.Placeholders && data.Placeholders;
const signedUrl = data.SignedUrl;
//checking if document has completed and request signature flow
if (data?.IsCompleted && signerExist?.length > 0) {
navigate(`/recipientSignPdf/${data.objectId}`);
}
//checking if document has completed and signyour-self flow
else if ((!signerExist && !isPlaceholder) || data?.IsSignyourself) {
navigate(`/signaturePdf/${data.objectId}`);
}
//checking if document has declined by someone
else if (isDecline) {
navigate(`/recipientSignPdf/${data.objectId}`);
//checking draft type document
} else if (
signerExist?.length > 0 &&
isPlaceholder?.length > 0 &&
!signedUrl
) {
navigate(`/placeHolderSign/${data.objectId}`);
}
//Inprogress document
else if (isPlaceholder?.length > 0 && signedUrl) {
navigate(`/recipientSignPdf/${data.objectId}`);
} //placeholder draft document
else if (
(signerExist?.length > 0 &&
(!isPlaceholder || isPlaceholder?.length === 0)) ||
((!signerExist || signerExist?.length === 0) && isPlaceholder?.length > 0)
) {
navigate(`/placeHolderSign/${data.objectId}`);
}
};
return (
<div>
{isLoading.isLoader ? (
<LoaderWithMsg isLoading={isLoading} />
) : (
<HandleError handleError={isLoading.message} />
)}
</div>
);
}
export default DraftDocument;
@@ -1,13 +0,0 @@
import { widgets } from "../../constant/Utils";
import getWidgetType from "./getWidgetType";
function DragElement(item) {
const getWidgets = widgets;
const filterWidgetPreview = getWidgets.filter(
(data) => data.type === item?.text
);
return <div>{getWidgetType(filterWidgetPreview[0])}</div>;
}
export default DragElement;
@@ -1,446 +0,0 @@
import React, { useEffect, useState } from "react";
import ModalUi from "../../primitives/ModalUi";
import { radioButtonWidget } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
import { fontColorArr, fontsizeArr } from "../../constant/Utils";
function DropdownWidgetOption(props) {
const { t } = useTranslation();
const [dropdownOptionList, setDropdownOptionList] = useState([
"Option-1",
"Option-2"
]);
const [minCount, setMinCount] = useState(0);
const [maxCount, setMaxCount] = useState(0);
const [dropdownName, setDropdownName] = useState();
const [isReadOnly, setIsReadOnly] = useState(false);
const [isHideLabel, setIsHideLabel] = useState(false);
const [status, setStatus] = useState("required");
const [defaultValue, setDefaultValue] = useState("");
const [defaultCheckbox, setDefaultCheckbox] = useState([]);
const [layout, setLayout] = useState("vertical");
const statusArr = ["required", "optional"];
const layoutArr = ["vertical", "horizontal"];
const isPrefillExist = props?.roleName === "prefill";
const resetState = () => {
setDropdownOptionList(["Option-1", "Option-2"]);
setDropdownName(props.currWidgetsDetails?.options?.name || props.type);
setIsReadOnly(false);
setIsHideLabel(false);
setMinCount(0);
setMaxCount(0);
setDefaultCheckbox([]);
setDefaultValue("");
setLayout("vertical");
};
useEffect(() => {
if (
props.currWidgetsDetails?.options?.name &&
props.currWidgetsDetails?.options?.values?.length > 0
) {
setDropdownName(props.currWidgetsDetails?.options?.name);
setDropdownOptionList(props.currWidgetsDetails?.options?.values);
setMinCount(
props.currWidgetsDetails?.options?.validation?.minRequiredCount
);
setMaxCount(
props.currWidgetsDetails?.options?.validation?.maxRequiredCount
);
setIsReadOnly(props.currWidgetsDetails?.options?.isReadOnly);
setIsHideLabel(props.currWidgetsDetails?.options?.isHideLabel);
setStatus(props.currWidgetsDetails?.options?.status || "required");
setDefaultValue(props.currWidgetsDetails?.options?.defaultValue || "");
setDefaultCheckbox(props.currWidgetsDetails?.options?.defaultValue || []);
setLayout(props.currWidgetsDetails?.options?.layout || "vertical");
} else {
setStatus("required");
resetState();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.currWidgetsDetails]);
const handleInputChange = (index, value) => {
setDropdownOptionList((prevInputs) => {
const newInputs = [...prevInputs];
newInputs[index] = value;
return newInputs;
});
};
//function add add checkbox option and add width of checkbox
const handleAddInput = () => {
const deleteOption = false;
const addOption = true;
setDropdownOptionList((prevInputs) => [...prevInputs, ""]);
props.handleSaveWidgetsOptions(
null,
null,
null,
null,
null,
addOption,
deleteOption
);
};
//function add add checkbox option and delete width of checkbox
const handleDeleteInput = (ind) => {
const deleteOption = true;
const addOption = false;
const getUpdatedOptions = dropdownOptionList.filter(
(_, index) => index !== ind
);
setDropdownOptionList(getUpdatedOptions);
props.handleSaveWidgetsOptions(
null,
null,
null,
null,
null,
addOption,
deleteOption
);
};
const handleSaveOption = () => {
if (["checkbox", radioButtonWidget, "dropdown"].includes(props.type)) {
const allUnique =
new Set(dropdownOptionList).size === dropdownOptionList.length;
if (!allUnique) {
alert("Please remove duplicate option");
return;
}
}
const defaultData =
defaultCheckbox && defaultCheckbox.length > 0
? defaultCheckbox
: defaultValue;
const isDropdownOrRadio =
props?.type === "dropdown" || props?.type === radioButtonWidget;
const readOnlyWithoutValue =
isReadOnly && !defaultValue && status !== "optional";
const isCheckbox = props?.type === "checkbox";
const WidgetLayout = ["checkbox", radioButtonWidget].includes(props.type)
? layout
: null;
// If its a dropdown and its read-only without a value (nor marked optional), stop here.
if (isDropdownOrRadio && readOnlyWithoutValue) {
alert(t("readonly-error", { widgetName: props?.type }));
return;
} else if (
isCheckbox &&
isReadOnly &&
minCount > 0 &&
defaultCheckbox?.length === 0
) {
alert(t("readonly-error", { widgetName: props?.type }));
return;
}
// Otherwise (either not a dropdown, or a valid dropdown), do the save + reset exactly once.
props.handleSaveWidgetsOptions(
dropdownName,
dropdownOptionList,
minCount,
maxCount,
isReadOnly,
null,
null,
status,
defaultData,
isHideLabel,
WidgetLayout
);
resetState();
};
const handleDefaultCheck = (index) => {
const getDefaultCheck = defaultCheckbox.includes(index);
if (getDefaultCheck) {
return true;
} else {
return false;
}
};
return (
<ModalUi isOpen={props.showDropdown} title={props.title} showClose={false}>
<div className="h-full p-[15px] text-base-content">
<form
onSubmit={(e) => {
e.preventDefault();
handleSaveOption();
}}
>
<div>
<label htmlFor="title" className="text-[13px] font-semibold">
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
id="title"
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
value={dropdownName}
onChange={(e) => setDropdownName(e.target.value)}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
required
/>
<label className="text-[13px] font-semibold mt-[5px]">
{t("options")}
</label>
<div className="flex flex-col">
{dropdownOptionList?.map((option, index) => (
<div
key={index}
className="flex flex-row mb-[5px] items-center"
>
{props.type === "checkbox" && props.isShowAdvanceFeature && (
<input
type="checkbox"
checked={handleDefaultCheck(index)}
onChange={(e) => {
if (e.target.checked) {
const getDefaultCheck =
defaultCheckbox?.includes(index);
if (!getDefaultCheck) {
setDefaultCheckbox((prev) => [...prev, index]);
}
} else {
const removeOption = defaultCheckbox.filter(
(data) => data !== index
);
setDefaultCheckbox(removeOption);
}
}}
className="op-checkbox focus:outline-none hover:border-base-content mr-[5px]"
/>
)}
<input
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
type="text"
value={option}
onChange={(e) => handleInputChange(index, e.target.value)}
/>
<i
className="fa-light fa-rectangle-xmark text-[25px] ml-[10px] text-accent cursor-pointer"
onClick={() => handleDeleteInput(index)}
></i>
</div>
))}
<div>
<i
className="fa-light fa-square-plus text-[25px] ml-[10px] op-text-primary cursor-pointer"
aria-label="Add option"
onClick={handleAddInput}
></i>
</div>
</div>
{["dropdown", radioButtonWidget].includes(props.type) &&
!isPrefillExist && (
<>
<label className="text-[13px] font-semibold mt-[5px]">
{t("default-value")}
</label>
<select
value={defaultValue}
onChange={(e) => setDefaultValue(e.target.value)}
className="op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content w-full text-xs"
name="defaultvalue"
>
<option value="" disabled hidden className="text-[13px]">
{t("select")}...
</option>
{dropdownOptionList.map((data, ind) => {
return (
<option className="text-[13px]" key={ind} value={data}>
{data}
</option>
);
})}
</select>
</>
)}
{props.type !== "checkbox" && !isPrefillExist && (
<div className="flex flex-row gap-[10px] mt-[0.5rem]">
{statusArr.map((data, ind) => (
<div
key={ind}
className="flex flex-row gap-[5px] items-center"
>
<input
className="op-radio op-radio-xs my-1"
type="radio"
name="status"
onChange={() => setStatus(data.toLowerCase())}
checked={status.toLowerCase() === data.toLowerCase()}
/>
<div className="text-[13px] font-500 capitalize">
{data}
</div>
</div>
))}
</div>
)}
<div className="flex items-center mt-3 mb-3">
<span>{t("font-size")} :</span>
<select
className="ml-[7px] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={
props.fontSize ||
props.currWidgetsDetails?.options?.fontSize ||
12
}
onChange={(e) => props.setFontSize(parseInt(e.target.value))}
>
{fontsizeArr.map((size, ind) => {
return (
<option className="text-[13px]" value={size} key={ind}>
{size}
</option>
);
})}
</select>
<div className="flex flex-row gap-1 items-center ml-4">
<span className="capitalize">{t("color")} : </span>
<select
value={
props.fontColor ||
props.currWidgetsDetails?.options?.fontColor ||
"black"
}
onChange={(e) => props.setFontColor(e.target.value)}
className="ml-[7px] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
>
{fontColorArr.map((color, ind) => {
return (
<option value={color} key={ind}>
{t(`color-type.${color}`)}
</option>
);
})}
</select>
<span
style={{
background:
props.fontColor ||
props.currWidgetsDetails?.options?.fontColor ||
"black"
}}
className="w-5 h-[19px] ml-1"
></span>
</div>
</div>
{["checkbox", radioButtonWidget, "dropdown"].includes(
props.type
) && (
<div className="flex flex-row gap-5 my-2 items-center text-center">
{props.isShowAdvanceFeature && !isPrefillExist && (
<div className="flex items-center">
<input
id="isreadonly"
type="checkbox"
checked={isReadOnly}
className="op-checkbox op-checkbox-sm"
onChange={(e) => setIsReadOnly(e.target.checked)}
/>
<label
className="ml-2 mb-0 capitalize"
htmlFor="isreadonly"
>
{t("read-only")}
</label>
</div>
)}
{props.type !== "dropdown" && (
<div className="flex items-center">
<input
id="ishidelabel"
type="checkbox"
checked={isHideLabel}
className="op-checkbox op-checkbox-sm"
onChange={(e) => setIsHideLabel(e.target.checked)}
/>
<label
className="ml-2 mb-0 capitalize"
htmlFor="ishidelabel"
>
{t("hide-labels")}
</label>
</div>
)}
</div>
)}
{["checkbox", radioButtonWidget].includes(props.type) && (
<>
<div className="text-[13px] font-semibold mt-[5px] capitalize">
{t("layout")}
</div>
<div
className={`${props.type === "checkbox" ? "mb-[10px]" : ""} flex flex-row gap-[10px] mt-[0.5rem]`}
>
{layoutArr.map((data, ind) => (
<div
key={ind}
className="flex flex-row gap-[5px] items-center"
>
<input
className="op-radio op-radio-xs my-1"
type="radio"
name="layout"
checked={layout.toLowerCase() === data.toLowerCase()}
onChange={() => setLayout(data.toLowerCase())}
/>
<label className="text-[13px] font-500 mb-0">
{t(data)}
</label>
</div>
))}
</div>
</>
)}
</div>
<div
className={`${
props.type === "checkbox" && props.isShowAdvanceFeature
? "mb-[15px]"
: "my-[15px]"
} w-full h-[1px] bg-[#9f9f9f]`}
></div>
<button
disabled={dropdownOptionList.length === 0 && true}
type="submit"
className="op-btn op-btn-primary"
>
{t("save")}
</button>
{props.currWidgetsDetails?.options?.values?.length > 0 && (
<button
type="submit"
className="op-btn op-btn-ghost text-base-content ml-1"
onClick={() => {
props.handleClose && props.handleClose();
resetState();
}}
>
{t("cancel")}
</button>
)}
</form>
</div>
</ModalUi>
);
}
export default DropdownWidgetOption;
@@ -1,542 +0,0 @@
import {
useState,
useRef,
} from "react";
import {
base64ToArrayBuffer,
convertBase64ToFile,
generatePdfName,
getFileName
} from "../../constant/Utils";
import {
maxDescriptionLength,
maxNoteLength,
maxTitleLength
} from "../../constant/const";
import { useTranslation } from "react-i18next";
import { Tooltip } from "react-tooltip";
import SignersInput from "../shared/fields/SignersInput";
import { PDFDocument } from "pdf-lib";
import ModalUi from "../../primitives/ModalUi";
import { SaveFileSize } from "../../constant/saveFileSize";
const EditTemplate = ({
title,
handleClose,
pdfbase64,
template,
onSuccess,
setPdfArrayBuffer,
setPdfBase64Url,
isAddYourSelfCheckbox,
}) => {
const appName =
"OpenSign™";
const { t } = useTranslation();
const inputFileRef = useRef(null);
const [formData, setFormData] = useState({
Name: template?.Name || "",
Note: template?.Note || "",
Description: template?.Description || "",
SendinOrder: template?.SendinOrder ? `${template?.SendinOrder}` : "false",
AutomaticReminders: template?.AutomaticReminders || false,
RemindOnceInEvery: template?.RemindOnceInEvery || 5,
IsEnableOTP: template?.IsEnableOTP ? `${template?.IsEnableOTP}` : "false",
IsTourEnabled: template?.IsTourEnabled
? `${template?.IsTourEnabled}`
: "false",
NotifyOnSignatures:
template?.NotifyOnSignatures !== undefined
? template?.NotifyOnSignatures
: false,
Bcc: template?.Bcc,
RedirectUrl: template?.RedirectUrl || "",
AllowModifications: template?.AllowModifications || false,
TimeToCompleteDays: template?.TimeToCompleteDays || 15,
});
const [isUpdate, setIsUpdate] = useState(false);
const [showConfirm, setShowConfirm] = useState(false);
const [uploadPdf, setUploadPdf] = useState({
name: "",
base64: "",
url: ""
});
const handleDrop = (e) => {
e.preventDefault();
const file = e.dataTransfer.files[0];
handleFile(file);
};
const handleFile = (file) => {
if (file && file.type === "application/pdf") {
handleReplaceFileValdition(file);
// You can handle the file here
} else {
alert(t("only-pdf-allowed"));
if (inputFileRef.current) inputFileRef.current.value = "";
}
};
const handleDragOver = (e) => {
e.preventDefault();
};
// `isValidURL` is used to check valid webhook url
function isValidURL(value) {
try {
const url = new URL(value);
return url.protocol === "https:" || url.protocol === "http:";
} catch (error) {
return false;
}
}
const handleStrInput = (e) => {
setIsUpdate(true);
setFormData({ ...formData, [e.target.name]: e.target.value });
};
const getPdfMetadataHash = async (pdfBytes) => {
const pdfDoc = await PDFDocument.load(pdfBytes);
const pages = pdfDoc.getPages();
const metaString = pages
.map((page, index) => {
const { width, height } = page.getSize();
return `${index + 1}:${Math.round(width)}x${Math.round(height)}`;
})
.join("|");
const encoder = new TextEncoder();
const data = encoder.encode(metaString);
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
return Array.from(new Uint8Array(hashBuffer))
.map((b) => b.toString(16).padStart(2, "0"))
.join("");
};
const handleFileInput = async (e) => {
const file = e.target.files[0];
if (!file) return;
handleReplaceFileValdition(file);
};
const handleReplaceFileValdition = async (file) => {
try {
const basePdfBytes = base64ToArrayBuffer(pdfbase64);
const expectedHash = await getPdfMetadataHash(basePdfBytes);
const fileReader = new FileReader();
fileReader.onload = async (event) => {
const uploadedPdfBytes = event.target.result;
const uploadedHash = await getPdfMetadataHash(uploadedPdfBytes);
if (expectedHash === uploadedHash) {
const arrayBuffer = uploadedPdfBytes;
const uint8Array = new Uint8Array(arrayBuffer);
const binaryString = Array.from(uint8Array)
.map((b) => String.fromCharCode(b))
.join("");
const base64 = btoa(binaryString);
const pdfName = generatePdfName(16);
setIsUpdate(true);
setUploadPdf((prev) => ({ ...prev, name: pdfName, base64: base64 }));
// alert("✅ PDFs match (based on page number, width, height)");
} else {
alert("❌ PDF do NOT match based on page number, width, height");
if (inputFileRef.current) inputFileRef.current.value = "";
}
};
fileReader.readAsArrayBuffer(file);
} catch (err) {
alert("Error: " + err.message);
if (inputFileRef.current) inputFileRef.current.value = "";
}
};
// Define a function to handle form submission
const handleSubmit = async (e) => {
e.preventDefault();
e.stopPropagation();
if (formData.RedirectUrl && !isValidURL(formData?.RedirectUrl)) {
alert(t("invalid-redirect-url"));
return;
}
if (formData?.Name?.length > maxTitleLength) {
alert(t("title-length-alert"));
return;
}
if (formData?.Note?.length > maxNoteLength) {
alert(t("note-length-alert"));
return;
}
if (formData?.Description?.length > maxDescriptionLength) {
alert(t("description-length-alert"));
return;
}
let pdfUrl;
if (uploadPdf?.base64) {
pdfUrl = await convertBase64ToFile(
uploadPdf.name,
uploadPdf.base64,
);
setUploadPdf((prev) => ({ ...prev, url: pdfUrl }));
const pdfBuffer = base64ToArrayBuffer(uploadPdf.base64);
setPdfArrayBuffer && setPdfArrayBuffer(pdfBuffer);
setPdfBase64Url && setPdfBase64Url(uploadPdf.base64);
const tenantId =
localStorage.getItem("TenantId") ||
template?.ExtUserPtr?.TenantId?.objectId;
const buffer = atob(uploadPdf.base64);
const userId = template?.ExtUserPtr?.UserId?.objectId;
SaveFileSize(buffer.length, pdfUrl, tenantId, userId);
}
const isChecked = formData.SendinOrder === "true" ? true : false;
const isTourEnabled = formData?.IsTourEnabled === "false" ? false : true;
const AutoReminder = formData?.AutomaticReminders || false;
const IsEnableOTP = formData.IsEnableOTP === "true" ? true : false;
const allowModify = formData?.AllowModifications || false;
let reminderDate = {};
const remindOnceInEvery = formData?.RemindOnceInEvery;
const TimeToCompleteDays = parseInt(formData?.TimeToCompleteDays);
const reminderCount = TimeToCompleteDays / remindOnceInEvery;
if (AutoReminder && reminderCount > 15) {
alert(t("only-15-reminder-allowed"));
return;
}
if (AutoReminder) {
const RemindOnceInEvery = parseInt(formData?.RemindOnceInEvery);
const ReminderDate = new Date(template?.createdAt);
ReminderDate.setDate(ReminderDate.getDate() + RemindOnceInEvery);
reminderDate = { NextReminderDate: ReminderDate };
}
const data = {
...formData,
...(pdfUrl ? { URL: pdfUrl } : {}),
SendinOrder: isChecked,
IsEnableOTP: IsEnableOTP,
IsTourEnabled: isTourEnabled,
AllowModifications: allowModify,
...reminderDate
};
onSuccess(data);
};
// `handleNotifySignChange` is trigger when user change radio of notify on signatures
const handleNotifySignChange = (value) => {
setIsUpdate(true);
setFormData((obj) => ({ ...obj, NotifyOnSignatures: value }));
};
const handleBcc = (data) => {
if (data && data.length > 0) {
const trimEmail = data.map((item) => ({
objectId: item?.value,
Name: item?.label,
Email: item?.email
}));
setIsUpdate(true);
setFormData((prev) => ({ ...prev, Bcc: trimEmail }));
}
};
const handleEditTemplateClose = () => {
if (isUpdate) {
setShowConfirm(true);
} else {
handleClose();
}
};
const discardChanges = () => {
setShowConfirm(false);
handleClose();
};
return (
<ModalUi
isOpen
title={isUpdate ? `${title} (unsaved)` : title}
handleClose={handleEditTemplateClose}
>
<ModalUi isOpen={showConfirm} showClose={false}>
<div className="p-[20px]">
<p className="text-base font-normal text-base-content py-[5px] md:py-[6px] px-[5px]">
{t("unsaved-changes-discard-them?")}
</p>
<div className="flex items-center mt-2.5 gap-2 md:gap-3 text-white">
<button
className="op-btn op-btn-primary px-6"
onClick={discardChanges}
>
{t("yes-discard")}
</button>
<button
className="op-btn op-btn-secondary px-4 md:px-6"
onClick={() => setShowConfirm(false)}
>
{t("cancel")}
</button>
</div>
</div>
</ModalUi>
<div className="max-h-[300px] md:max-h-[400px] overflow-y-scroll p-[10px]">
<div className="text-base-content">
<form onSubmit={handleSubmit}>
<div className="mb-[0.35rem]">
<label htmlFor="name" className="text-[13px]">
{t("report-heading.File")}
</label>
<div
className="border-[1.5px] border-dashed border-gray-300 rounded-lg px-4 py-6 text-center text-gray-500 bg-white cursor-pointer hover:border-base-content transition"
onDrop={handleDrop}
onDragOver={handleDragOver}
onClick={() => inputFileRef?.current?.click()}
>
<label
htmlFor="fileUpload"
className="cursor-pointer text-center mb-0"
>
{t("browse-or-drag-to-replace-existing-file")}
</label>
</div>
<input
ref={inputFileRef}
type="file"
className="hidden"
accept="application/pdf"
onChange={(e) => handleFileInput(e)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
/>
{uploadPdf?.name && (
<div
onClick={() => inputFileRef?.current?.click()}
className="mt-2 cursor-pointer op-input op-input-bordered op-input-sm focus:outline-none py-2 font-semibold w-full text-xs"
>
selected:{" "}
{uploadPdf?.url
? `${uploadPdf?.name}.pdf`
: getFileName(template.URL)}
</div>
)}
</div>
<div className="mb-[0.35rem]">
<label htmlFor="name" className="text-[13px]">
{t("Title")}
<span className="text-[13px] text-[red]"> *</span>
</label>
<input
type="text"
name="Name"
value={formData.Name}
onChange={(e) => handleStrInput(e)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-[0.35rem]">
<label htmlFor="Note" className="text-[13px]">
{t("report-heading.Note")}
</label>
<input
type="text"
name="Note"
id="Note"
value={formData.Note}
onChange={(e) => handleStrInput(e)}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-[0.35rem]">
<label htmlFor="Description" className="text-[13px]">
{t("description")}
</label>
<input
type="text"
name="Description"
id="Description"
value={formData.Description}
onChange={(e) => handleStrInput(e)}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-[0.35rem]">
<label className="text-[13px]">{t("send-in-order")}</label>
<div className="flex flex-col md:flex-row md:gap-4">
<div className="flex items-center gap-[8px] ml-[8px] mb-[5px]">
<input
type="radio"
value={"true"}
className="op-radio op-radio-xs"
name="SendinOrder"
checked={formData.SendinOrder === "true"}
onChange={handleStrInput}
/>
<div className="text-[12px]">{t("yes")}</div>
</div>
<div className="flex items-center gap-[8px] ml-[8px] mb-[5px]">
<input
type="radio"
value={"false"}
name="SendinOrder"
className="op-radio op-radio-xs"
checked={formData.SendinOrder === "false"}
onChange={handleStrInput}
/>
<div className="text-[12px]">{t("no")}</div>
</div>
</div>
</div>
<div className="text-xs mt-3">
<label className="block">
<span>
{t("enable-tour")}
<a data-tooltip-id="istourenabled-tooltip" className="ml-1">
<sup>
<i className="fa-light fa-question rounded-full border-[#33bbff] text-[#33bbff] text-[13px] border-[1px] py-[1.5px] px-[4px]"></i>
</sup>
</a>{" "}
</span>
<Tooltip id="istourenabled-tooltip" className="z-50">
<div className="max-w-[200px] md:max-w-[450px]">
<p className="font-bold">{t("enable-tour")}</p>
<div className="p-[5px]">
<ol className="list-disc">
<li>
<span className="font-bold">{t("yes")}: </span>
<span>{t("istourenabled-help.p1")}</span>
</li>
<li>
<span className="font-bold">{t("no")}: </span>
<span>{t("istourenabled-help.p2")}</span>
</li>
</ol>
</div>
<p>{t("istourenabled-help.p3", { appName: appName })}</p>
</div>
</Tooltip>
</label>
<div className="flex flex-col md:flex-row md:gap-4">
<div className="flex items-center gap-2 ml-2 mb-1">
<input
type="radio"
value={"true"}
className="op-radio op-radio-xs"
name="IsTourEnabled"
checked={formData.IsTourEnabled === "true"}
onChange={handleStrInput}
/>
<div className="text-center">{t("yes")}</div>
</div>
<div className="flex items-center gap-2 ml-2 mb-1">
<input
type="radio"
value={"false"}
name="IsTourEnabled"
className="op-radio op-radio-xs"
checked={formData.IsTourEnabled === "false"}
onChange={handleStrInput}
/>
<div className="text-center">{t("no")}</div>
</div>
</div>
</div>
<div className="text-xs mt-3">
<label>
{t("notify-on-signatures")}
<a data-tooltip-id="nos-tooltip" className="ml-1">
<sup>
<i className="fa-light fa-question rounded-full border-[#33bbff] text-[#33bbff] text-[13px] border-[1px] py-[1.5px] px-[4px]"></i>
</sup>
</a>{" "}
<Tooltip id="nos-tooltip" className="z-[999]">
<div className="max-w-[200px] md:max-w-[450px] text-[11px]">
<p className="font-bold">{t("notify-on-signatures")}</p>
<p>{t("notify-on-signatures-help.p1")}</p>
<p>{t("notify-on-signatures-help.note")}</p>
</div>
</Tooltip>
</label>
<div className="flex flex-col md:flex-row md:gap-4">
<div
className={
`flex items-center gap-2 ml-2 mb-1`
}
>
<input
className="mr-[2px] op-radio op-radio-xs"
type="radio"
onChange={() => handleNotifySignChange(true)}
checked={formData.NotifyOnSignatures === true}
/>
<div className="text-center">{t("yes")}</div>
</div>
<div
className={
`flex items-center gap-2 ml-2 mb-1`
}
>
<input
className="mr-[2px] op-radio op-radio-xs"
type="radio"
onChange={() => handleNotifySignChange(false)}
checked={formData.NotifyOnSignatures === false}
/>
<div className="text-center">{t("no")}</div>
</div>
</div>
</div>
<div className="text-xs mt-3">
<SignersInput
label={t("Bcc")}
initialData={template?.Bcc}
onChange={handleBcc}
helptextZindex={50}
helpText={t("bcc-help")}
isCaptureAllData
isAddYourSelfCheckbox={isAddYourSelfCheckbox}
/>
</div>
<div className="text-xs mt-2">
<label className="block">{t("redirect-url")}</label>
<input
name="RedirectUrl"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={formData.RedirectUrl}
onChange={handleStrInput}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
/>
</div>
<div className="text-xs mt-2">
<label className="block">
{t("time-to-complete")}
<span className="text-red-500 text-[13px]">*</span>
</label>
<input
type="number"
name="TimeToCompleteDays"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={formData.TimeToCompleteDays}
onChange={(e) => handleStrInput(e)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
<div className="mt-[1rem] flex justify-start">
<button type="submit" className="op-btn op-btn-primary">
{t("submit")}
</button>
</div>
</form>
</div>
</div>
</ModalUi>
);
};
export default EditTemplate;
@@ -1,168 +0,0 @@
import React from "react";
import { Quill } from "react-quill-new";
// Use a third-party plugin so editors can toggle raw HTML view.
import htmlEditButton from "quill-html-edit-button";
// Register the module which adds a "<>" button for HTML editing.
Quill.register("modules/htmlEditButton", htmlEditButton);
// Custom Undo button icon component for Quill editor. You can import it directly
// from 'quill/assets/icons/undo.svg' but I found that a number of loaders do not
// handle them correctly
const CustomUndo = () => (
<svg viewBox="0 0 18 18">
<polygon className="ql-fill ql-stroke" points="6 10 4 12 2 10 6 10" />
<path
className="ql-stroke"
d="M8.09,13.91A4.6,4.6,0,0,0,9,14,5,5,0,1,0,4,9"
/>
</svg>
);
// Redo button icon component for Quill editor
const CustomRedo = () => (
<svg viewBox="0 0 18 18">
<polygon className="ql-fill ql-stroke" points="12 10 14 12 16 10 12 10" />
<path
className="ql-stroke"
d="M9.91,13.91A4.6,4.6,0,0,1,9,14a5,5,0,1,1,5-5"
/>
</svg>
);
// Undo and redo functions for Custom Toolbar
function undoChange() {
this.quill.history.undo();
}
function redoChange() {
this.quill.history.redo();
}
// Add sizes to whitelist and register them
const Size = Quill.import("formats/size");
Size.whitelist = ["extra-small", "small", "medium", "large"];
Quill.register(Size, true);
// Add fonts to whitelist and register them
const Font = Quill.import("formats/font");
Font.whitelist = [
"arial",
"comic-sans",
"courier-new",
"georgia",
"helvetica",
"lucida"
];
Quill.register(Font, true);
// Modules object for setting up the Quill editor
export const module1 = {
toolbar: {
container: "#toolbar1",
handlers: { undo: undoChange, redo: redoChange }
},
history: { delay: 500, maxStack: 100, userOnly: true },
// Enable the "<>" button registered above
htmlEditButton: {}
};
// Modules object for setting up the Quill editor
export const module2 = {
toolbar: {
container: "#toolbar2",
handlers: { undo: undoChange, redo: redoChange }
},
history: { delay: 500, maxStack: 100, userOnly: true },
// Enable the "<>" button registered above
htmlEditButton: {}
};
// Formats objects for setting up the Quill editor
export const formats = [
"header",
"font",
"size",
"bold",
"italic",
"underline",
"align",
"strike",
"script",
"blockquote",
"background",
"list",
"indent",
"link",
"image",
"color",
"code-block"
];
// Quill Toolbar component
export const QuillToolbar = ({ containerId }) => (
<div id={containerId}>
<span className="ql-formats">
<select className="ql-font" defaultValue="arial">
<option value="arial">Arial</option>
<option value="comic-sans">Comic Sans</option>
<option value="courier-new">Courier New</option>
<option value="georgia">Georgia</option>
<option value="helvetica">Helvetica</option>
<option value="lucida">Lucida</option>
</select>
<select className="ql-size" defaultValue="medium">
<option value="extra-small">Size 1</option>
<option value="small">Size 2</option>
<option value="medium">Size 3</option>
<option value="large">Size 4</option>
</select>
<select className="ql-header" defaultValue="3">
<option value="1">Heading</option>
<option value="2">Subheading</option>
<option value="3">Normal</option>
</select>
</span>
<span className="ql-formats">
<button className="ql-bold" />
<button className="ql-italic" />
<button className="ql-underline" />
<button className="ql-strike" />
</span>
<span className="ql-formats">
<button className="ql-list" value="ordered" />
<button className="ql-list" value="bullet" />
<button className="ql-indent" value="-1" />
<button className="ql-indent" value="+1" />
</span>
<span className="ql-formats">
<button className="ql-script" value="super" />
<button className="ql-script" value="sub" />
<button className="ql-blockquote" />
<button className="ql-direction" />
</span>
<span className="ql-formats">
<select className="ql-align" />
<select className="ql-color" />
<select className="ql-background" />
</span>
<span className="ql-formats">
<button className="ql-link" />
<button className="ql-image" />
<button className="ql-video" />
</span>
<span className="ql-formats">
<button className="ql-formula" />
<button className="ql-code-block" />
<button className="ql-clean" />
</span>
<span className="ql-formats">
<button className="ql-undo">
<CustomUndo />
</button>
<button className="ql-redo">
<CustomRedo />
</button>
</span>
</div>
);
export default QuillToolbar;
@@ -1,49 +0,0 @@
import React from "react";
import Tooltip from "../../primitives/Tooltip";
import ReactQuill from "react-quill-new";
import "../../styles/quill.css";
import EditorToolbar, { module1, formats } from "./EditorToolbar";
import { useTranslation } from "react-i18next";
export function EmailBody(props) {
const { t } = useTranslation();
return (
<form className="flex flex-col text-base-content text-lg font-normal">
<div className="m-2 md:m-10 p-3 md:p-10 shadow-md hover:shadow-lg border-[1px] border-indigo-800 rounded-md">
<label className="text-sm ml-2">
{t("subject")} <Tooltip message={t("email-subject")} />
</label>
<input
required
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
value={props.requestSubject}
onChange={(e) => {
props?.setRequestSubject(e.target.value);
props?.setCustomizeMail((prev) => ({
...prev,
subject: e.target.value
}));
}}
placeholder='${senderName} has requested you to sign "${documentName}"'
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
<label className="text-sm ml-2 mt-3">
{t("body")} <Tooltip message={t("email-body")} />
</label>
<div className="px-1 py-2 w-full focus:outline-none text-xs">
<EditorToolbar containerId="toolbar1" />
<ReactQuill
theme="snow"
value={props.requestBody}
placeholder={t("email-placeholder")}
ref={props.editorRef}
modules={module1}
formats={formats}
onChange={props.handleOnchangeRequest}
/>
</div>
</div>
</form>
);
}
@@ -1,230 +0,0 @@
import React, { useState } from "react";
import {
handleToPrint,
} from "../../constant/Utils";
import {
emailRegex,
} from "../../constant/const";
import Loader from "../../primitives/Loader";
import ModalUi from "../../primitives/ModalUi";
import { useTranslation } from "react-i18next";
import Parse from "parse";
function EmailComponent({
isEmail,
setIsEmail,
setSuccessEmail,
pdfDetails,
setIsAlert,
setIsDownloadModal
}) {
const { t } = useTranslation();
const [emailList, setEmailList] = useState([]);
const [emailValue, setEmailValue] = useState("");
const [isLoading, setIsLoading] = useState(false);
const [emailErr, setEmailErr] = useState(false);
const [isDownloading, setIsDownloading] = useState("");
const isAndroid = /Android/i.test(navigator.userAgent);
//function for send email
const sendEmail = async () => {
setIsLoading(true);
const params = { docId: pdfDetails?.[0]?.objectId, recipients: emailList };
const sendmail = await Parse.Cloud.run("forwarddoc", params);
console.log("sendmail ", sendmail);
if (sendmail?.status === "success") {
setSuccessEmail(true);
setIsEmail(false);
setTimeout(() => {
setSuccessEmail(false);
setEmailValue("");
setEmailList([]);
}, 1500);
setIsLoading(false);
}
else {
setIsLoading(false);
setIsEmail(false);
setIsAlert({
isShow: true,
alertMessage: t("something-went-wrong-mssg")
});
setEmailValue("");
setEmailList([]);
}
};
//function for remove email
const removeChip = (index) => {
const updateEmailCount = emailList.filter((data, key) => key !== index);
setEmailList(updateEmailCount);
};
//function for get email value
const handleEmailValue = (e) => {
const value = e.target.value?.toLowerCase()?.replace(/\s/g, "");
setEmailErr(false);
setEmailValue(value);
};
//function for save email in array after press enter
const handleEnterPress = (e) => {
const pattern = emailRegex;
const validate = emailValue?.match(pattern);
if (e.key === "Enter" && emailValue) {
if (validate) {
const emailLowerCase = emailValue?.toLowerCase();
setEmailList((prev) => [...prev, emailLowerCase]);
setEmailValue("");
} else {
setEmailErr(true);
}
} else if (e === "add" && emailValue) {
if (validate) {
const emailLowerCase = emailValue?.toLowerCase();
setEmailList((prev) => [...prev, emailLowerCase]);
setEmailValue("");
} else {
setEmailErr(true);
}
}
};
const handleClose = () => {
setIsEmail(false);
setEmailValue("");
setEmailList([]);
};
return (
<div>
{/* isEmail */}
{isEmail && (
<ModalUi isOpen showHeader={false}>
{isLoading && (
<div className="absolute w-full h-full flex flex-col justify-center items-center z-[20] bg-[#e6f2f2]/70">
<Loader />
<span className="text-[12px] text-base-content">
{t("loader")}
</span>
</div>
)}
{isDownloading === "pdf" && (
<div className="fixed z-[200] inset-0 flex justify-center items-center bg-black bg-opacity-30">
<Loader />
</div>
)}
<div className="flex justify-between items-center py-[10px] px-[20px] border-b-[1px] border-base-content">
<span className="text-base-content font-bold text-sm md:text-lg">
{t("successfully-signed")}
</span>
<div className="flex flex-row">
{!isAndroid && (
<button
onClick={(e) =>
handleToPrint(e, setIsDownloading, pdfDetails)
}
className="op-btn op-btn-neutral op-btn-sm text-xs md:text-[15px]"
>
<i className="fa-light fa-print" aria-hidden="true"></i>
{t("print")}
</button>
)}
<button
className="op-btn op-btn-primary op-btn-sm text-xs md:text-[15px] ml-2"
onClick={() => {
handleClose();
setIsDownloadModal(true);
}}
>
<i className="fa-light fa-download" aria-hidden="true"></i>
{t("download")}
</button>
</div>
</div>
<div className="h-full p-[20px]">
<p className="font-medium text-[15px] mb-[5px] text-base-content align-baseline">
{t("email-mssg")}
</p>
{emailList.length > 0 ? (
<div className="p-0 border-[1px] op-border-primary w-full rounded-md text-[15px] overflow-hidden">
<div className="flex flex-row flex-wrap">
{emailList.map((data, ind) => {
return (
<div
className="flex flex-row items-center op-bg-primary mx-[2px] mt-[2px] rounded-md py-[5px] px-[10px]"
key={ind}
>
<span className="text-base-100 text-[13px]">
{data}
</span>
<span
className="text-base-100 text-[13px] font-semibold ml-[7px] cursor-pointer"
onClick={() => removeChip(ind)}
>
<i className="fa-light fa-xmark"></i>
</span>
</div>
);
})}
</div>
{emailList.length <= 9 && (
<input
type="email"
value={emailValue}
className="p-[10px] rounded-md w-full text-[15px] bg-transparent outline-none"
onChange={handleEmailValue}
onKeyDown={handleEnterPress}
onBlur={() => emailValue && handleEnterPress("add")}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
)}
</div>
) : (
<div>
<input
type="email"
value={emailValue}
className="p-[10px] pb-[20px] text-base-content rounded-md w-full text-[15px] outline-none bg-transparent border-[1px] op-border-primary"
onChange={handleEmailValue}
onKeyDown={handleEnterPress}
placeholder={t("enter-email-plaholder")}
onBlur={() => emailValue && handleEnterPress("add")}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
)}
{emailErr && (
<p className="text-xs text-[red] ml-1.5 mt-0.5">
{t("email-error-1")}
</p>
)}
<div className="mt-2">
<button
type="button"
className="op-btn op-btn-secondary"
onClick={() => emailList.length > 0 && sendEmail()}
>
{t("send")}
</button>
<button
type="button"
className="op-btn op-btn-ghost text-base-content ml-2"
onClick={() => handleClose()}
>
{t("close")}
</button>
</div>
</div>
</ModalUi>
)}
</div>
);
}
export default EmailComponent;
@@ -1,30 +0,0 @@
const Guidelines = ({ x1, x2, y1, y2 }) => {
return (
<>
{/* Horizontal guidelines */}
{/* top guide */}{" "}
<div
className="absolute pointer-events-none z-[1000] left-0 w-full border-t-[1px] border-dashed border-[#3b82f6]"
style={{ top: y1 }}
/>
{/* bottom guide */}
<div
className="absolute pointer-events-none z-[1000] left-0 w-full border-t-[1px] border-dashed border-[#3b82f6]"
style={{ top: y2 }}
/>
{/* Vertical guidelines */}
{/* left guide */}
<div
className="absolute pointer-events-none z-[1000] top-0 h-full border-l-[1px] border-dashed border-[#3b82f6]"
style={{ left: x1 }}
/>
{/* right guide */}
<div
className="absolute pointer-events-none z-[1000] top-0 h-full border-l-[1px] border-dashed border-[#3b82f6]"
style={{ left: x2 }}
/>
</>
);
};
export default Guidelines;
@@ -1,94 +0,0 @@
import React, { useEffect, useState, useRef } from "react";
import ModalUi from "../../primitives/ModalUi";
import { useTranslation } from "react-i18next";
export default function PageReorderModal({
isOpen,
handleClose,
totalPages = 0,
onSave
}) {
const { t } = useTranslation();
const [order, setOrder] = useState([]);
// Keeps track of the page order relative to the original PDF
const orderRef = useRef([]);
// Captures the order when the modal opens
const initialOrderRef = useRef([]);
// Initialize orderRef when total pages change (e.g. after upload)
useEffect(() => {
if (orderRef.current.length !== totalPages) {
orderRef.current = Array.from({ length: totalPages }, (_, i) => i + 1);
}
}, [totalPages]);
// When modal opens, display the last saved order and store it as initial
useEffect(() => {
if (isOpen) {
setOrder(orderRef.current);
initialOrderRef.current = [...orderRef.current];
}
}, [isOpen]);
const move = (index, dir) => {
const swapIndex = index + dir;
if (swapIndex < 0 || swapIndex >= order.length) return;
const newOrder = [...order];
[newOrder[index], newOrder[swapIndex]] = [newOrder[swapIndex], newOrder[index]];
setOrder(newOrder);
};
const handleSave = () => {
const saveOrder = order.map((num) =>
initialOrderRef.current.indexOf(num) + 1
);
// Persist the new display order for next time
orderRef.current = [...order];
onSave && onSave(saveOrder);
};
const isUnchanged =
order.length === initialOrderRef.current.length &&
order.every((n, i) => n === initialOrderRef.current[i]);
return (
<ModalUi isOpen={isOpen} handleClose={handleClose} title={t("reorder-pages")}>
<div className="p-[20px] flex flex-col gap-2 text-base-content">
{order.map((num, i) => (
<div key={num} className="flex items-center justify-between">
<span>
{t("page")} {num}
</span>
<div className="flex gap-1">
<button
className="op-btn op-btn-xs op-btn-ghost text-base-content"
disabled={i === 0}
onClick={() => move(i, -1)}
>
<i className="fa-light fa-arrow-up"></i>
</button>
<button
className="op-btn op-btn-xs op-btn-ghost text-base-content"
disabled={i === order.length - 1}
onClick={() => move(i, 1)}
>
<i className="fa-light fa-arrow-down"></i>
</button>
</div>
</div>
))}
<div className="h-[1px] bg-[#9f9f9f] w-full my-[15px]"></div>
<button onClick={handleSave} type="button" className="op-btn op-btn-primary" disabled={isUnchanged}>
{t("save")}
</button>
<button
onClick={handleClose}
type="button"
className="op-btn op-btn-ghost text-base-content ml-1"
>
{t("close")}
</button>
</div>
</ModalUi>
);
}
@@ -1,739 +0,0 @@
import React, { useRef, useState } from "react";
import PrevNext from "./PrevNext";
import {
base64ToArrayBuffer,
decryptPdf,
deletePdfPage,
flattenPdf,
getFileAsArrayBuffer,
handleDownloadCertificate,
handleDownloadPdf,
handleRemoveWidgets,
handleToPrint,
reorderPdfPages
} from "../../constant/Utils";
import "../../styles/signature.css";
import { DropdownMenu } from "radix-ui";
import ModalUi from "../../primitives/ModalUi";
import Loader from "../../primitives/Loader";
import PageReorderModal from "./PageReorderModal";
import { useTranslation } from "react-i18next";
import { PDFDocument } from "pdf-lib";
import { maxFileSize } from "../../constant/const";
function Header(props) {
const { t } = useTranslation();
const isMobile = window.innerWidth < 767;
const [isDownloading, setIsDownloading] = useState("");
const [isDeletePage, setIsDeletePage] = useState(false);
const [isReorderModal, setIsReorderModal] = useState(false);
const mergePdfInputRef = useRef(null);
const enabledBackBtn = props?.disabledBackBtn === true ? false : true;
//function for show decline alert
const handleDeclinePdfAlert = async () => {
if (props?.handleDecline) {
props.handleDecline();
} else {
const currentDecline = { currnt: "Sure", isDeclined: true };
props?.setIsDecline(currentDecline);
}
};
const handleDetelePage = async () => {
props?.setIsUploadPdf && props?.setIsUploadPdf(true);
const pdfupdatedData = await deletePdfPage(
props?.pdfArrayBuffer,
props?.pageNumber
);
if (pdfupdatedData?.totalPages === 1) {
alert(t("delete-alert"));
} else {
props?.setPdfBase64Url(pdfupdatedData.base64);
props?.setPdfArrayBuffer(pdfupdatedData.arrayBuffer);
setIsDeletePage(false);
handleRemoveWidgets(
props?.setSignerPos,
props?.signerPos,
props?.pageNumber
);
}
};
// `removeFile` is used to remove file if exists
const removeFile = (e) => {
if (e) {
e.target.value = "";
}
};
const handleFileUpload = async (e) => {
const file = e.target.files[0];
if (!file) {
alert(t("please-select-pdf"));
return;
}
if (!file.type.includes("pdf")) {
alert(t("only-pdf-allowed"));
return;
}
const mb = Math.round(file?.size / Math.pow(1024, 2));
if (mb > maxFileSize) {
alert(`${t("file-alert-1")} ${maxFileSize} MB`);
removeFile(e);
return;
}
try {
let uploadedPdfBytes = await file.arrayBuffer();
try {
uploadedPdfBytes = await flattenPdf(uploadedPdfBytes);
} catch (err) {
if (err?.message?.includes("is encrypted")) {
try {
const pdfFile = await decryptPdf(file, "");
const pdfArrayBuffer = await getFileAsArrayBuffer(pdfFile);
uploadedPdfBytes = await flattenPdf(pdfArrayBuffer);
} catch (err) {
if (err?.response?.status === 401) {
const password = prompt(
`PDF "${file.name}" is password-protected. Enter password:`
);
if (password) {
try {
const pdfFile = await decryptPdf(file, password);
const pdfArrayBuffer = await getFileAsArrayBuffer(pdfFile);
uploadedPdfBytes = await flattenPdf(pdfArrayBuffer);
// Upload the file to Parse Server
} catch (err) {
console.error("Incorrect password or decryption failed", err);
alert(t("incorrect-password-or-decryption-failed"));
}
} else {
alert(t("provide-password"));
}
} else {
console.log("Err ", err);
alert(t("error-uploading-pdf"));
}
}
} else {
alert(t("error-uploading-pdf"));
}
}
const uploadedPdfDoc = await PDFDocument.load(uploadedPdfBytes, {
ignoreEncryption: true
});
const basePdfDoc = await PDFDocument.load(props.pdfArrayBuffer);
// Copy pages from the uploaded PDF to the base PDF
const uploadedPdfPages = await basePdfDoc.copyPages(
uploadedPdfDoc,
uploadedPdfDoc.getPageIndices()
);
uploadedPdfPages.forEach((page) => basePdfDoc.addPage(page));
// Save the updated PDF
const pdfBase64 = await basePdfDoc.saveAsBase64({
useObjectStreams: false
});
const pdfBuffer = base64ToArrayBuffer(pdfBase64);
props.setPdfArrayBuffer(pdfBuffer);
props.setPdfBase64Url(pdfBase64);
props.setIsUploadPdf && props.setIsUploadPdf(true);
mergePdfInputRef.current.value = "";
} catch (error) {
mergePdfInputRef.current.value = "";
console.error("Error merging PDF:", error);
}
};
const handleReorderSave = async (order) => {
try {
const pdfupdatedData = await reorderPdfPages(props.pdfArrayBuffer, order);
if (pdfupdatedData) {
props.setPdfArrayBuffer(pdfupdatedData.arrayBuffer);
props.setPdfBase64Url(pdfupdatedData.base64);
props.setAllPages(pdfupdatedData.totalPages);
props.setPageNumber(1);
}
} catch (e) {
console.log("error in reorder pdf pages", e);
}
setIsReorderModal(false);
};
const handleDownloadDoc = async () => {
await handleDownloadPdf(
props?.pdfDetails,
setIsDownloading,
props.pdfBase64
);
};
const handleDownloadBtn = async () => {
if (
props?.isCompleted
) {
props?.setIsDownloadModal(true);
} else {
await handleDownloadDoc();
}
};
return (
<div className="flex py-[5px]">
{isMobile && props?.isShowHeader ? (
<div
id="navbar"
className="stickyHead touch-none"
style={{
width: window.innerWidth + "px"
}}
>
<div className="flex justify-between items-center py-[5px] pl-[10px] ">
<div onClick={() => window.history.go(-2)}>
<i
className="fa-light fa-arrow-left text-base-content"
aria-hidden="true"
></i>
</div>
<PrevNext
pageNumber={props?.pageNumber}
allPages={props?.allPages}
changePage={props?.changePage}
/>
{props?.isCompleted || props?.alreadySign ? (
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<div className="op-link op-link-primary no-underline text-[16px] font-semibold px-3">
<i
className="fa-light fa-ellipsis-v"
aria-hidden="true"
></i>
</div>
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content
className="DropdownMenuContent"
sideOffset={5}
>
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => handleDownloadBtn()}
>
<div className="flex flex-row">
<i
className="fa-light fa-arrow-down mr-[3px]"
aria-hidden="true"
></i>
{t("download")}
</div>
</DropdownMenu.Item>
{
props?.isCompleted && (
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() =>
handleDownloadCertificate(
props?.pdfDetails,
setIsDownloading
)
}
>
<div className="border-none bg-[#fff]">
<i
className="fa-light fa-award mr-[3px]"
aria-hidden="true"
></i>
{t("certificate")}
</div>
</DropdownMenu.Item>
)
}
{props?.isSignYourself && (
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => props?.setIsEmail(true)}
>
<div className="flex flex-row">
<i
className="fa-light fa-envelope mr-[3px]"
aria-hidden="true"
></i>
{t("mail")}
</div>
</DropdownMenu.Item>
)}
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={(e) =>
handleToPrint(e, setIsDownloading, props?.pdfDetails)
}
>
<div className="flex flex-row">
<i
className="fa-light fa-print mr-[3px]"
aria-hidden="true"
></i>
{t("print")}
</div>
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root>
) : (
<div className="flex justify-around items-center">
{/* current signer is checking user send request and check status of pdf sign than if current
user exist than show finish button else no
*/}
{props?.currentSigner && (
<div className="flex items-center" data-tut="reactourFifth">
{props?.decline && (
<div
onClick={() => handleDeclinePdfAlert()}
className="text-[red] border-none font-[650] text-[14px] mr-2"
>
{t("decline")}
</div>
)}
{props?.isPlaceholder ? (
<div
onClick={() => {
if (!props?.isMailSend) {
props?.handleSaveDoc();
}
}}
className={`${
props?.isMailSend ? "" : "op-link-primary"
} op-link no-underline font-[650] text-[14px]`}
data-tut="headerArea"
>
{props?.completeBtnTitle
? props?.completeBtnTitle
: t("send")}
</div>
) : (
<div
data-tut="reactourThird"
onClick={() => props?.embedWidgetsData()}
className="border-none font-[650] text-[14px] op-link op-link-primary no-underline"
>
{t("finish")}
</div>
)}
<input
type="file"
className="hidden"
accept="application/pdf"
ref={mergePdfInputRef}
onChange={handleFileUpload}
/>
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<div className="font-[650] text-[18px] px-3 text-base-content no-underline">
<i
className="fa-light fa-ellipsis-v"
aria-hidden="true"
></i>
</div>
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content
className="bg-white shadow-md rounded-md px-3 py-2"
sideOffset={5}
>
{props?.setIsEditTemplate && (
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => props?.setIsEditTemplate(true)}
>
<div className="flex flex-row">
<i
className="fa-light fa-gear mr-[3px]"
aria-hidden="true"
></i>
<span className="font-[500]">{t("Edit")}</span>
</div>
</DropdownMenu.Item>
)}
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => handleDownloadDoc()}
>
<div className="flex flex-row">
<i
className="fa-light fa-arrow-down mr-[3px]"
aria-hidden="true"
></i>
<span className="font-[500]">
{t("download")}
</span>
</div>
</DropdownMenu.Item>
{!props?.isDisablePdfEditTools && (
<>
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => mergePdfInputRef.current.click()}
>
<div className="flex flex-row">
<i className="fa-light fa-plus text-gray-500 2xl:text-[30px] mr-[3px]"></i>
<span className="font-[500]">
{t("add-pages")}
</span>
</div>
</DropdownMenu.Item>
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => setIsDeletePage(true)}
>
<div className="flex flex-row">
<i className="fa-light fa-trash text-gray-500 2xl:text-[30px] mr-[3px]"></i>
<span className="font-[500]">
{t("delete-page")}
</span>
</div>
</DropdownMenu.Item>
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => setIsReorderModal(true)}
>
<div className="flex flex-row">
<i className="fa-light fa-list-ol text-gray-500 2xl:text-[30px] mr-[3px]"></i>
<span className="font-[500]">
{t("reorder-pages")}
</span>
</div>
</DropdownMenu.Item>
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => props?.handleRotationFun(90)}
>
<div className="flex flex-row">
<i className="fa-light fa-rotate-right text-gray-500 2xl:text-[30px] mr-[3px]"></i>
<span className="font-[500]">
{t("rotate-right")}
</span>
</div>
</DropdownMenu.Item>
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => props?.handleRotationFun(-90)}
>
<div className="flex flex-row">
<i className="fa-light fa-rotate-left text-gray-500 2xl:text-[30px] mr-[3px]"></i>
<span className="font-[500]">
{t("rotate-left")}
</span>
</div>
</DropdownMenu.Item>
</>
)}
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => props?.clickOnZoomIn()}
>
<div className="flex flex-row">
<i className="fa-light fa-magnifying-glass-plus text-gray-500 2xl:text-[30px] mr-[3px]"></i>
<span className="font-[500]">{t("zoom-in")}</span>
</div>
</DropdownMenu.Item>
<DropdownMenu.Item
className="DropdownMenuItem"
onClick={() => props?.clickOnZoomOut()}
>
<div className="flex flex-row">
<i className="fa-light fa-magnifying-glass-minus text-gray-500 2xl:text-[30px] mr-[3px]"></i>
<span className="font-[500]">
{t("zoom-out")}
</span>
</div>
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root>
</div>
)}
{props?.isPublicTemplate && (
<div
data-tut="reactourThird"
onClick={() => props?.embedWidgetsData()}
className="border-none font-[650] text-[14px] pr-2 op-link op-link-primary no-underline"
>
{t("sign-now")}
</div>
)}
</div>
)}
</div>
</div>
) : (
<div className="flex flex-wrap justify-between items-center w-full gap-y-1 ml-1">
<PrevNext
pageNumber={props?.pageNumber}
allPages={props?.allPages}
changePage={props?.changePage}
/>
{props?.isPlaceholder ? (
<>
<div className="flex mx-[100px] lg:mx-0 order-last lg:order-none"></div>
<div className="flex">
{props?.setIsEditTemplate && (
<button
onClick={() => props?.setIsEditTemplate(true)}
className="outline-none border-none text-center mr-[3px]"
>
<i className="fa-light fa-gear fa-lg text-base-content"></i>
</button>
)}
{enabledBackBtn && (
<button
onClick={() => window.history.go(-2)}
type="button"
className="op-btn op-btn-ghost text-base-content op-btn-sm mr-[3px]"
>
{t("back")}
</button>
)}
<button
disabled={props?.isMailSend && true}
data-tut="headerArea"
className="op-btn op-btn-primary op-btn-sm mr-[3px]"
onClick={() => props?.handleSaveDoc()}
>
{props?.completeBtnTitle
? props?.completeBtnTitle
: props?.isMailSend
? t("sent")
: t("send")}
</button>
</div>
</>
) : props?.isPdfRequestFiles || props?.isSelfSign ? (
props?.alreadySign || (props?.isSelfSign && props?.isCompleted) ? (
<div className="flex flex-row">
<button
onClick={(e) =>
handleToPrint(e, setIsDownloading, props?.pdfDetails)
}
type="button"
className="op-btn op-btn-neutral op-btn-sm mr-[3px] shadow"
>
<i
className="fa-light fa-print py-[3px]"
aria-hidden="true"
></i>
<span className="hidden lg:block">{t("print")}</span>
</button>
{
props?.isCompleted && (
<button
type="button"
onClick={() =>
handleDownloadCertificate(
props?.pdfDetails,
setIsDownloading
)
}
className="op-btn op-btn-secondary op-btn-sm mr-[3px] shadow"
>
<i
className="fa-light fa-award py-[3px]"
aria-hidden="true"
></i>
<span className="hidden lg:block">
{t("certificate")}
</span>
</button>
)
}
<button
type="button"
className="op-btn op-btn-primary op-btn-sm mr-[3px] shadow"
onClick={() => handleDownloadBtn()}
>
<i
className="fa-light fa-download py-[3px]"
aria-hidden="true"
></i>
<span className="hidden lg:block">{t("download")}</span>
</button>
</div>
) : (
<div className="flex" data-tut="reactourFifth">
{props?.currentSigner && (
<>
{props?.templateId && (
<button
onClick={() => handleDownloadDoc()}
type="button"
className="op-btn op-btn-ghost text-base-content op-btn-sm mr-[3px]"
>
<span className="hidden lg:block">{t("download")}</span>
</button>
)}
{!props?.isSelfSign && (
<button
className="op-btn op-btn-secondary op-btn-sm mr-[3px] shadow"
onClick={() => handleDeclinePdfAlert()}
>
{t("decline")}
</button>
)}
{!props?.templateId && (
<button
type="button"
className="op-btn op-btn-ghost text-base-content op-btn-sm mr-[3px]"
onClick={() => handleDownloadDoc()}
>
<i className="fa-light fa-arrow-down font-semibold lg:hidden"></i>
<span className="hidden lg:block">{t("download")}</span>
</button>
)}
<button
type="button"
className="op-btn op-btn-primary op-btn-sm mr-[3px] shadow"
onClick={() => props?.embedWidgetsData()}
>
{t("finish")}
</button>
</>
)}
</div>
)
) : props?.isCompleted ? (
<div className="flex flex-row">
{
props?.isCompleted && (
<button
type="button"
onClick={() =>
handleDownloadCertificate(
props?.pdfDetails,
setIsDownloading
)
}
className="op-btn op-btn-secondary op-btn-sm gap-0 font-medium text-[12px] mr-[3px] shadow"
>
<i className="fa-light fa-award" aria-hidden="true"></i>
<span className="hidden lg:block ml-1">
{t("certificate")}
</span>
</button>
)
}
<button
onClick={(e) =>
handleToPrint(e, setIsDownloading, props?.pdfDetails)
}
type="button"
className="op-btn op-btn-neutral op-btn-sm gap-0 font-medium text-[12px] mr-[3px] shadow"
>
<i className="fa-light fa-print" aria-hidden="true"></i>
<span className="hidden lg:block ml-1">{t("print")}</span>
</button>
<button
type="button"
className="op-btn op-btn-primary op-btn-sm gap-0 font-medium text-[12px] mr-[3px] shadow"
// onClick={() => props?.setIsDownloadModal(true)}
onClick={() => handleDownloadBtn()}
>
<i className="fa-light fa-download" aria-hidden="true"></i>
<span className="hidden lg:block ml-1">{t("download")}</span>
</button>
<button
type="button"
className="op-btn op-btn-info op-btn-sm gap-0 font-medium text-[12px] mr-[3px] shadow"
onClick={() => props?.setIsEmail(true)}
>
<i className="fa-light fa-envelope" aria-hidden="true"></i>
<span className="hidden lg:block ml-1">{t("mail")}</span>
</button>
</div>
) : props?.isPublicTemplate ? (
<div className="flex">
<button
type="button"
className="op-btn op-btn-primary op-btn-sm shadow"
onClick={() => props?.embedWidgetsData()}
>
{t("sign-now")}
</button>
</div>
) : (
<div className="flex">
<button
onClick={() => window.history.go(-2)}
type="button"
className="op-btn op-btn-ghost text-base-content op-btn-sm mr-[3px]"
>
{t("back")}
</button>
<button
type="button"
className="op-btn op-btn-primary op-btn-sm mr-[3px]"
onClick={() => props?.embedWidgetsData()}
>
{t("finish")}
</button>
</div>
)}
</div>
)}
{isDownloading === "pdf" && (
<div className="fixed z-[200] inset-0 flex justify-center items-center bg-black bg-opacity-30">
<Loader />
</div>
)}
<ModalUi
isOpen={
isDownloading === "certificate" || isDownloading === "certificate_err"
}
title={
isDownloading === "certificate" || isDownloading === "certificate_err"
? t("generating-certificate")
: t("pdf-download")
}
handleClose={() => setIsDownloading("")}
>
<div className="p-3 md:p-5 text-[13px] md:text-base text-center text-base-content">
{isDownloading === "certificate" ? (
<p>{t("generate-certificate-alert")}</p>
) : (
<p>{t("generate-certificate-err")}</p>
)}
</div>
</ModalUi>
<ModalUi
isOpen={isDeletePage}
title={t("delete-page")}
handleClose={() => setIsDeletePage(false)}
>
<div className="h-[100%] p-[20px]">
<p className="font-medium text-base-content">{t("delete-alert-2")}</p>
<p className="pt-3 text-base-content">{t("delete-note")}</p>
<div className="h-[1px] bg-[#9f9f9f] w-full my-[15px]"></div>
<button
onClick={() => handleDetelePage()}
type="button"
className="op-btn op-btn-primary"
>
{t("yes")}
</button>
<button
onClick={() => setIsDeletePage(false)}
type="button"
className="op-btn op-btn-ghost text-base-content"
>
{t("no")}
</button>
</div>
</ModalUi>
<PageReorderModal
isOpen={isReorderModal}
handleClose={() => setIsReorderModal(false)}
totalPages={props.allPages}
onSave={handleReorderSave}
/>
</div>
);
}
export default Header;
@@ -1,288 +0,0 @@
import { useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import {
base64ToArrayBuffer,
decryptPdf,
deletePdfPage,
flattenPdf,
getFileAsArrayBuffer,
handleRemoveWidgets,
reorderPdfPages
} from "../../constant/Utils";
import ModalUi from "../../primitives/ModalUi";
import { PDFDocument } from "pdf-lib";
import { maxFileSize } from "../../constant/const";
import PageReorderModal from "./PageReorderModal";
function PdfTools(props) {
const { t } = useTranslation();
const mergePdfInputRef = useRef(null);
const [isDeletePage, setIsDeletePage] = useState(false);
const [isReorderModal, setIsReorderModal] = useState(false);
const handleDetelePage = async () => {
props.setIsUploadPdf && props.setIsUploadPdf(true);
try {
const pdfupdatedData = await deletePdfPage(
props.pdfArrayBuffer,
props.pageNumber
);
if (pdfupdatedData?.totalPages === 1) {
alert(t("delete-alert"));
} else {
props.setPdfBase64Url(pdfupdatedData.base64);
props.setPdfArrayBuffer(pdfupdatedData.arrayBuffer);
setIsDeletePage(false);
handleRemoveWidgets(
props.setSignerPos,
props.signerPos,
props.pageNumber
);
props.setAllPages(pdfupdatedData.remainingPages || 1);
if (props.allPages === props.pageNumber) {
props.setPageNumber(props.pageNumber - 1);
} else if (props.allPages > 2) {
props.setPageNumber(props.pageNumber);
}
}
} catch (e) {
console.log("error in delete pdf page", e);
}
};
// `removeFile` is used to remove file if exists
const removeFile = (e) => {
if (e) {
e.target.value = "";
}
};
const handleFileUpload = async (e) => {
props.setIsTour && props.setIsTour(false);
const file = e.target.files[0];
if (!file) {
alert(t("please-select-pdf"));
return;
}
if (!file.type.includes("pdf")) {
alert(t("only-pdf-allowed"));
return;
}
const mb = Math.round(file?.size / Math.pow(1024, 2));
if (mb > maxFileSize) {
alert(`${t("file-alert-1")} ${maxFileSize} MB`);
removeFile(e);
return;
}
try {
let uploadedPdfBytes = await file.arrayBuffer();
try {
uploadedPdfBytes = await flattenPdf(uploadedPdfBytes);
} catch (err) {
if (err?.message?.includes("is encrypted")) {
try {
const pdfFile = await decryptPdf(file, "");
const pdfArrayBuffer = await getFileAsArrayBuffer(pdfFile);
uploadedPdfBytes = await flattenPdf(pdfArrayBuffer);
} catch (err) {
if (err?.response?.status === 401) {
const password = prompt(
`PDF "${file.name}" is password-protected. Enter password:`
);
if (password) {
try {
const pdfFile = await decryptPdf(file, password);
const pdfArrayBuffer = await getFileAsArrayBuffer(pdfFile);
uploadedPdfBytes = await flattenPdf(pdfArrayBuffer);
// Upload the file to Parse Server
} catch (err) {
console.error("Incorrect password or decryption failed", err);
alert(t("incorrect-password-or-decryption-failed"));
}
} else {
alert(t("provide-password"));
}
} else {
console.log("Err ", err);
alert(t("error-uploading-pdf"));
}
}
} else {
alert(t("error-uploading-pdf"));
}
}
const uploadedPdfDoc = await PDFDocument.load(uploadedPdfBytes, {
ignoreEncryption: true
});
const basePdfDoc = await PDFDocument.load(props.pdfArrayBuffer);
// Copy pages from the uploaded PDF to the base PDF
const uploadedPdfPages = await basePdfDoc.copyPages(
uploadedPdfDoc,
uploadedPdfDoc.getPageIndices()
);
uploadedPdfPages.forEach((page) => basePdfDoc.addPage(page));
// Save the updated PDF
const pdfBase64 = await basePdfDoc.saveAsBase64({
useObjectStreams: false
});
const pdfBuffer = base64ToArrayBuffer(pdfBase64);
props.setPdfArrayBuffer(pdfBuffer);
props.setPdfBase64Url(pdfBase64);
props.setIsUploadPdf && props.setIsUploadPdf(true);
mergePdfInputRef.current.value = "";
} catch (error) {
mergePdfInputRef.current.value = "";
console.error("Error merging PDF:", error);
}
};
const handleReorderSave = async (order) => {
try {
const pdfupdatedData = await reorderPdfPages(props.pdfArrayBuffer, order);
if (pdfupdatedData) {
props.setPdfArrayBuffer(pdfupdatedData.arrayBuffer);
props.setPdfBase64Url(pdfupdatedData.base64);
props.setAllPages(pdfupdatedData.totalPages);
props.setPageNumber(1);
}
} catch (e) {
console.log("error in reorder pdf pages", e);
}
setIsReorderModal(false);
};
const handleDeletePage = () => {
setIsDeletePage(true);
props.setIsTour && props.setIsTour(false);
};
const handleReorderPages = () => {
setIsReorderModal(true);
props.setIsTour && props.setIsTour(false);
};
const handleZoomIn = () => {
props.clickOnZoomIn();
props.setIsTour && props.setIsTour(false);
};
const handleZoomOut = () => {
props.clickOnZoomOut();
props.setIsTour && props.setIsTour(false);
};
const handleRotate = () => {
props.handleRotationFun(90);
props.setIsTour && props.setIsTour(false);
};
const handleAntiRotate = () => {
props.handleRotationFun(-90);
props.setIsTour && props.setIsTour(false);
};
return (
<>
<span
data-tut="pdftools"
className="hidden h-max md:flex flex-col gap-1 text-center md:w-[5%] mt-[42px]"
>
{!props.isDisableEditTools && (
<>
<span
className="bg-gray-50 px-[4px] 2xl:py-[10px] cursor-pointer"
onClick={() => mergePdfInputRef.current.click()}
title={t("add-pages")}
>
<input
type="file"
className="hidden"
accept="application/pdf"
ref={mergePdfInputRef}
onChange={handleFileUpload}
/>
<i className="fa-light fa-plus text-gray-500 2xl:text-[25px]"></i>
</span>
<span
className="bg-gray-50 px-[4px] 2xl:py-[10px] cursor-pointer"
onClick={handleDeletePage}
title={t("delete-page")}
>
<i className="fa-light fa-trash text-gray-500 2xl:text-[25px]"></i>
</span>
<span
className="bg-gray-50 px-[4px] 2xl:py-[10px] cursor-pointer"
onClick={handleReorderPages}
title={t("reorder-pages")}
>
<i className="fa-light fa-list-ol text-gray-500 2xl:text-[25px]"></i>
</span>
</>
)}
<span
className="bg-gray-50 px-[4px] 2xl:py-[10px] cursor-pointer"
onClick={handleZoomIn}
title={t("zoom-in")}
>
<i className="fa-light fa-magnifying-glass-plus text-gray-500 2xl:text-[25px]"></i>
</span>
{!props.isDisableEditTools && (
<>
<span
className="bg-gray-50 px-[4px] 2xl:py-[10px] cursor-pointer"
onClick={handleRotate}
title={t("rotate-right")}
>
<i className="fa-light fa-rotate-right text-gray-500 2xl:text-[25px]"></i>
</span>
<span
className="bg-gray-50 px-[4px] 2xl:py-[10px] cursor-pointer"
title={t("rotate-left")}
onClick={handleAntiRotate}
>
<i className="fa-light fa-rotate-left text-gray-500 2xl:text-[25px]"></i>
</span>
</>
)}
<span
className="bg-gray-50 px-[4px] 2xl:py-[10px] cursor-pointer"
onClick={handleZoomOut}
title={t("zoom-out")}
>
<i className="fa-light fa-magnifying-glass-minus text-gray-500 2xl:text-[30px]"></i>
</span>
</span>
<ModalUi
isOpen={isDeletePage}
title={t("delete-page")}
handleClose={() => setIsDeletePage(false)}
>
<div className="h-[100%] p-[20px]">
<p className="font-medium text-base-content">{t("delete-alert-2")}</p>
<p className="pt-3 text-base-content">{t("delete-note")}</p>
<div className="h-[1px] bg-[#9f9f9f] w-full my-[15px]"></div>
<button
onClick={() => handleDetelePage()}
type="button"
className="op-btn op-btn-primary"
>
{t("yes")}
</button>
<button
onClick={() => setIsDeletePage(false)}
type="button"
className="op-btn op-btn-ghost text-base-content ml-1"
>
{t("no")}
</button>
</div>
</ModalUi>
<PageReorderModal
isOpen={isReorderModal}
handleClose={() => setIsReorderModal(false)}
totalPages={props.allPages}
onSave={handleReorderSave}
/>
</>
);
}
export default PdfTools;
File diff suppressed because it is too large Load Diff
@@ -1,317 +0,0 @@
import { useState } from "react";
import ModalUi from "../../primitives/ModalUi";
import { handleCopyNextToWidget, randomId } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
function PlaceholderCopy(props) {
const { t } = useTranslation();
const copyType = [
{ id: 1, type: "All pages" },
{ id: 2, type: "All pages but last" },
{ id: 3, type: "All pages but first" },
{ id: 4, type: "Next to current widget" }
];
const [selectCopyType, setSelectCopyType] = useState(1);
//function for get copy placeholder position
const getCopyPlaceholderPosition = (
type,
newPlaceholder,
newPageNumber,
existPlaceholderPosition
) => {
//remove existing page position when used option copy but first or copy but last
const filterPosition =
existPlaceholderPosition &&
existPlaceholderPosition.filter(
(data) => data.xPosition !== newPlaceholder.xPosition
);
//first option - copy all page but not first
//copy all page placeholder at requested position except first page
if (newPageNumber === 1 && type === 3) {
//when user choose this option and placed widget on first page then do not remove first page widget
//it should be copy all page included first page on same postion
if (props.pageNumber === 1) {
return {
pageNumber: newPageNumber,
pos: [...existPlaceholderPosition]
};
} //else when user copy widget and choose this option and not at first page then copy all page but not at first
else if (filterPosition && filterPosition.length > 0) {
return {
pageNumber: newPageNumber,
pos: [...filterPosition]
};
}
}
//second option - copy all page but not last
//copy all page placeholder at requested position except last page
else if (newPageNumber === props.allPages && type === 2) {
if (existPlaceholderPosition) {
//when user choose this option and placed widget on last page then do not remove last page widget
//it should be copy all page included last page on same postion
if (props.pageNumber === props.allPages) {
return {
pageNumber: newPageNumber,
pos: [...existPlaceholderPosition]
};
} else {
return {
pageNumber: newPageNumber,
pos: [...filterPosition]
};
}
}
}
//this optin - copy all page with exiting widgets on same page
//copy all page placeholder at requested position with existing placeholder position
else if (existPlaceholderPosition) {
if (newPageNumber === props.pageNumber) {
return {
pageNumber: props.pageNumber,
pos: [...existPlaceholderPosition]
};
} else {
return {
pageNumber: newPageNumber,
pos: [...existPlaceholderPosition, newPlaceholder]
};
}
}
//copy all page placeholder at requested position
else {
if (newPageNumber === props.pageNumber) {
return {
pageNumber: props.pageNumber,
pos: [...existPlaceholderPosition]
};
} else {
return {
pageNumber: newPageNumber,
pos: [newPlaceholder]
};
}
}
};
//function for copy placeholder as per select copy type
const copyPlaceholder = (type) => {
let newPlaceholderPosition = [];
let newPageNumber = 1;
const signerPosition = props.xyPosition;
const signerId = props.signerObjId ? props.signerObjId : props.Id;
//handle placeholder array and copy for multiple signers placeholder at requested location
if (signerId) {
//get current signers data
let filterSignerPosition;
if (props?.signerObjId) {
filterSignerPosition = signerPosition.filter(
(data) => data.signerObjId === signerId
);
} else {
filterSignerPosition = signerPosition.filter(
(item) => item.Id === signerId
);
}
//get current pagenumber's all placeholder position data
const placeholderPosition = filterSignerPosition[0].placeHolder.filter(
(data) => data.pageNumber === props.pageNumber
);
//get current placeholder position data which user want to copy
const currentPlaceholder = placeholderPosition[0].pos.find(
(position) => position.key === props.signKey
);
for (let i = 0; i < props.allPages; i++) {
const newId = randomId();
const nameId = randomId(2)
const widgetName = `${currentPlaceholder?.options?.name}${nameId}`;
const newPlaceholder = {
...currentPlaceholder,
key: newId,
options: { ...currentPlaceholder?.options, name: widgetName }
};
//get exist placeholder position for particular page
const existPlaceholder = filterSignerPosition[0].placeHolder.filter(
(data) => data.pageNumber === newPageNumber
);
const existPlaceholderPosition =
existPlaceholder[0] && existPlaceholder[0].pos;
//function for get copy to requested location of placeholder position
const getPlaceholderObj = getCopyPlaceholderPosition(
type,
newPlaceholder,
newPageNumber,
existPlaceholderPosition
);
if (getPlaceholderObj?.pos) {
newPlaceholderPosition.push(getPlaceholderObj);
}
newPageNumber++;
}
let updatedSignerPlaceholder;
if (props?.signerObjId) {
updatedSignerPlaceholder = signerPosition.map((signersData) => {
if (signersData.signerObjId === props.signerObjId) {
return {
...signersData,
placeHolder: newPlaceholderPosition
};
}
return signersData;
});
} else {
updatedSignerPlaceholder = signerPosition.map((signersData) => {
if (signersData.Id === props.Id) {
return {
...signersData,
placeHolder: newPlaceholderPosition
};
}
return signersData;
});
}
const signersData = signerPosition;
signersData.splice(0, signerPosition.length, ...updatedSignerPlaceholder);
props.setXyPosition(signersData);
}
//handle signyourself array and copy for single signers placeholder at requested location
else {
const xyPosition = props.xyPosition;
const placeholderPosition = xyPosition.filter(
(data) => data.pageNumber === props.pageNumber
);
//get current placeholder position data which user want to copy
const currentPlaceholder = placeholderPosition[0].pos.find(
(pos) => pos.key === props.signKey
);
for (let i = 0; i < props.allPages; i++) {
//get exist placeholder position for particular page
const existPlaceholder = xyPosition.filter(
(data) => data.pageNumber === newPageNumber
);
const existPlaceholderPosition =
existPlaceholder[0] && existPlaceholder[0].pos;
const newId = randomId();
const newPlaceholder = { ...currentPlaceholder, key: newId };
//function for get copy to requested location of placeholder position
const getPlaceholderObj = getCopyPlaceholderPosition(
type,
newPlaceholder,
newPageNumber,
existPlaceholderPosition
);
if (getPlaceholderObj) {
newPlaceholderPosition.push(getPlaceholderObj);
}
newPageNumber++;
}
props.setXyPosition(newPlaceholderPosition);
}
};
//function for getting selected type placeholder copy
const handleApplyCopy = () => {
const newId = randomId();
if (selectCopyType === 4) {
const signerPosition = props.xyPosition;
let currentXYposition;
const signerId = props.signerObjId ? props.signerObjId : props.Id;
if (signerId) {
const filterSignerPosition = signerPosition.filter(
(item) => item?.Id === signerId
);
currentXYposition = filterSignerPosition[0].placeHolder.filter(
(data) => data.pageNumber === props?.pageNumber
);
//get current placeholder position data which user want to copy
currentXYposition = currentXYposition[0].pos.find(
(position) => position.key === props.signKey
);
//function to create new widget next to just widget
handleCopyNextToWidget(
newId,
currentXYposition,
props.xyPosition,
props.pageNumber,
props.setXyPosition,
props?.Id
);
} else {
const getIndex = props?.xyPosition.findIndex(
(data) => data.pageNumber === props.pageNumber
);
const placeholderPosition = props?.xyPosition[getIndex];
//get current placeholder position data which user want to copy
currentXYposition = placeholderPosition.pos.find(
(pos) => pos.key === props.signKey
);
//function to create new widget next to just widget
handleCopyNextToWidget(
newId,
currentXYposition,
props.xyPosition,
getIndex,
props.setXyPosition
);
}
} else {
copyPlaceholder(selectCopyType);
}
};
const handleUniqueId = () => {
props.setIsPageCopy(false);
setSelectCopyType(1);
};
return (
<ModalUi
isOpen={props.isPageCopy}
title={t("copy-title")}
handleClose={() => handleUniqueId()}
>
<div className="h-full p-[20px] text-base-content">
{copyType.map((data, key) => {
return (
<div key={key} className="flex flex-col">
<label className="text-[16px] font-medium">
<input
className="mr-[8px] op-radio op-radio-xs"
type="radio"
value={data.id}
onChange={() => setSelectCopyType(data.id)}
checked={selectCopyType === data.id}
/>
{t(`copy-type.${data.type}`)}
</label>
</div>
);
})}
<div className="flex flex-row bg-[#9f9f9f] w-full my-[15px]"></div>
<button
onClick={() => {
handleApplyCopy();
handleUniqueId();
}}
type="button"
disabled={!selectCopyType}
className="op-btn op-btn-primary"
>
{t("apply")}
</button>
<button
type="button"
className="op-btn op-btn-ghost text-base-content ml-2"
onClick={() => handleUniqueId()}
>
{t("cancel")}
</button>
</div>
</ModalUi>
);
}
export default PlaceholderCopy;
@@ -1,556 +0,0 @@
import { useEffect, useState, forwardRef } from "react";
import {
getMonth,
getYear,
radioButtonWidget,
textInputWidget,
cellsWidget,
textWidget,
months,
years,
selectCheckbox,
checkRegularExpress,
isBase64
} from "../../constant/Utils";
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import "../../styles/signature.css";
import { useTranslation } from "react-i18next";
import CellsWidget from "./CellsWidget";
import { useSelector } from "react-redux";
import Loader from "../../primitives/Loader";
const textWidgetCls =
"w-full h-full md:min-w-full md:min-h-full z-[999] text-[12px] overflow-hidden resize-none outline-none text-base-content item-center whitespace-pre-wrap";
const widgetCls =
"select-none-cls overflow-hidden w-full h-full text-black flex flex-col justify-center items-center";
function PlaceholderType(props) {
const selectWidgetCls = `w-full h-full absolute left-0 top-0 focus:outline-none text-base-content`;
const { t } = useTranslation();
const prefillImg = useSelector((state) => state.widget.prefillImg);
const prefillImgLoad = useSelector((state) => state.widget.prefillImgLoad);
const type = props?.pos?.type;
const iswidgetEnable =
props.isSignYourself ||
((props.isSelfSign || props.isNeedSign) &&
props.data?.signerObjId === props.signerObjId);
const isReadOnly =
props.pos.options?.isReadOnly ||
props.data?.signerObjId !== props.signerObjId;
// prefer the latest response value over any default value
const widgetData =
props.pos?.options?.response ?? props.pos?.options?.defaultValue ?? "";
const widgetTypeTranslation = t(`widgets-name.${props?.pos?.type}`);
const [widgetValue, setwidgetValue] = useState();
const [selectedCheckbox, setSelectedCheckbox] = useState([]);
const [hint, setHint] = useState("");
const [imgUrl, setImgUrl] = useState("");
const fontSize = props.calculateFont(props.pos.options?.fontSize);
const fontColor = props.pos.options?.fontColor || "black";
const textWidgetStyle = {
fontSize: fontSize,
color: fontColor,
fontFamily: "Arial, sans-serif",
overflow: "hidden",
textAlign: "start",
width: "100%",
display: "flex",
height: "100%"
};
useEffect(() => {
if (type !== "date") {
if (type && type === "checkbox") {
setSelectedCheckbox(
props?.pos?.options?.response ||
props?.pos?.options?.defaultValue ||
[]
);
} else {
// keep displayed value in sync with the stored response
setwidgetValue(widgetData);
}
if (props.pos?.options?.hint) {
setHint(props.pos?.options.hint);
} else if (props.pos?.options?.validation?.type) {
checkRegularExpress(props.pos?.options?.validation?.type, setHint);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.pos]);
const ExampleCustomInput = forwardRef(({ value, onClick }, ref) => (
<div
style={{
fontSize: fontSize,
color: fontColor,
fontFamily: "Arial, sans-serif"
}}
className={`${isReadOnly ? `select-none` : ``} ${selectWidgetCls} overflow-hidden`}
disabled={isReadOnly}
onClick={onClick}
ref={ref}
>
{value}
<i className="fa-light fa-calendar ml-[5px]"></i>
</div>
));
ExampleCustomInput.displayName = "ExampleCustomInput";
const handleRadioCheck = (data) => {
const defaultData = props.pos.options?.defaultValue;
if (widgetValue === data) {
return true;
} else if (defaultData === data) {
return true;
} else {
return false;
}
};
//function is used to get prefill image's signedUrl after expired
useEffect(() => {
const loadImage = async () => {
const isBase64Url = isBase64(props?.pos?.SignUrl);
if (
props.pos.SignUrl &&
props.pos.type === "image" &&
props?.data?.Role === "prefill" &&
!isBase64Url
) {
const getPrefillImg = prefillImg?.find((x) => x.id === props.pos.key);
if (getPrefillImg) {
setImgUrl(getPrefillImg?.base64);
}
} else {
setImgUrl(props.pos.SignUrl);
}
};
loadImage();
}, [props.pos.SignUrl]);
switch (type) {
case "signature":
return props.pos.SignUrl ? (
<img
alt="signature"
draggable="false"
src={props.pos.SignUrl}
className={`${props.pos.signatureType !== "type" ? "object-contain" : ""} w-full h-full select-none-cls`}
/>
) : (
<div className={widgetCls}>
{props.pos.type && (
<div
style={{
fontSize: props.pos
? props.calculateFontsize(props.pos)
: "11px"
}}
className="font-medium"
>
{hint || widgetTypeTranslation}
</div>
)}
</div>
);
case "stamp":
return props.pos.SignUrl ? (
<img
alt="stamp"
draggable="false"
src={props.pos.SignUrl}
className="w-full h-full select-none-cls object-contain"
/>
) : (
<div className={widgetCls}>
{props.pos.type && (
<div
style={{
fontSize: props.pos
? props.calculateFontsize(props.pos)
: "11px"
}}
className="font-medium"
>
{hint || widgetTypeTranslation}
</div>
)}
</div>
);
case "checkbox":
const checkBoxLayout = props.pos.options?.layout || "vertical";
const isMultipleCheckbox =
props.pos.options?.values?.length > 0 ? true : false;
const checkBoxWrapperClass = `flex items-start whitespace-pre-wrap ${
checkBoxLayout === "horizontal"
? `flex-row flex-wrap lg:py-[1.6px] ${isMultipleCheckbox ? "gap-x-2" : ""}`
: `flex-col ${isMultipleCheckbox ? "gap-y-[3px]" : ""}`
}`; // Using gap-y-1 for consistency, adjust if needed
return (
<div
className={checkBoxWrapperClass}
style={{ zIndex: props.isSignYourself && "99" }}
>
{props.pos.options?.values?.map((data, ind) => (
<div key={ind} className="select-none-cls pointer-events-none">
<label
htmlFor={`checkbox-${props.pos.key + ind}`}
style={{ fontSize: fontSize, color: fontColor }}
className={`mb-0 flex items-center gap-1`}
>
<input
id={`checkbox-${props.pos.key + ind}`}
style={{ width: fontSize, height: fontSize }}
className="op-checkbox rounded-[1px]"
disabled={props.isNeedSign && isReadOnly}
type="checkbox"
readOnly
checked={!!selectCheckbox(ind, selectedCheckbox)}
/>
{!props.pos.options?.isHideLabel && (
<span className="leading-none">{data}</span>
)}
</label>
</div>
))}
</div>
);
case textInputWidget:
return props.isSignYourself || iswidgetEnable ? (
<textarea
placeholder={hint || t("widgets-name.text")}
rows={1}
value={widgetValue}
className={`${textWidgetCls} ${isReadOnly ? "select-none" : ""}`}
style={{
fontSize: fontSize,
color: fontColor,
background: isReadOnly ? props.data?.blockColor : "white",
pointerEvents: "none"
}}
readOnly
disabled={props.isNeedSign && isReadOnly}
cols="50"
/>
) : (
<div style={textWidgetStyle} className="select-none-cls">
<span>{hint || widgetTypeTranslation}</span>
</div>
);
case cellsWidget: {
const count = props.pos.options?.cellCount || 5;
const cells = (widgetValue || "").split("");
const height = "100%";
const fontSize = props.calculateFont(props.pos.options?.fontSize);
const fontColor = props.pos.options?.fontColor || "black";
const handleCellResize = (newCount) => {
if (props.setCellCount) props.setCellCount(props.pos.key, newCount);
};
const isEditable =
props.isPlaceholder || props.isSignYourself || props.isSelfSign;
return (
<CellsWidget
isEnabled={iswidgetEnable}
count={count}
height={height}
value={cells.join("")}
editable={isEditable}
resizable={props?.isAllowModify}
fontSize={fontSize}
fontColor={fontColor}
hint={hint}
onCellCountChange={handleCellResize}
/>
);
}
case "dropdown":
return (
<div
style={textWidgetStyle}
className="select-none-cls flex justify-between items-center"
>
{widgetData || t("choose-one")}
<i className="fa-light fa-circle-chevron-down mr-1 "></i>
</div>
);
case "initials":
return props.pos.SignUrl ? (
<img
alt="initials"
draggable="false"
src={props.pos.SignUrl}
className={`${props.pos.signatureType !== "type" ? "object-contain" : ""} w-full h-full select-none-cls`}
/>
) : (
<div className={widgetCls}>
{props.pos.type && (
<div
style={{
fontSize: props.pos
? props.calculateFontsize(props.pos)
: "11px"
}}
className="font-medium text-center"
>
{hint || widgetTypeTranslation}
</div>
)}
</div>
);
case "name":
return iswidgetEnable ? (
<textarea
readOnly
placeholder={hint || widgetTypeTranslation}
rows={1}
value={widgetValue}
className={`${textWidgetCls} ${isReadOnly ? "select-none" : ""}`}
style={{
fontSize: fontSize,
color: fontColor,
background: isReadOnly ? props.data?.blockColor : "white",
pointerEvents: "none"
}}
cols="50"
disabled={props.isNeedSign && isReadOnly}
/>
) : (
<div className="flex h-full select-none-cls" style={textWidgetStyle}>
<span> {props.pos?.options?.hint || widgetTypeTranslation}</span>
</div>
);
case "company":
return iswidgetEnable ? (
<textarea
readOnly
placeholder={hint || widgetTypeTranslation}
rows={1}
value={widgetValue}
className={`${textWidgetCls} ${isReadOnly ? "select-none" : ""}`}
style={{
fontSize: fontSize,
color: fontColor,
background: isReadOnly ? props.data?.blockColor : "white",
pointerEvents: "none"
}}
cols="50"
disabled={props.isNeedSign && isReadOnly}
/>
) : (
<div style={textWidgetStyle} className="select-none-cls">
<span>{hint || widgetTypeTranslation}</span>
</div>
);
case "job title":
return iswidgetEnable ? (
<textarea
readOnly
placeholder={hint || widgetTypeTranslation}
rows={1}
value={widgetValue}
className={`${textWidgetCls} ${isReadOnly ? "select-none" : ""}`}
style={{
fontSize: fontSize,
color: fontColor,
background: isReadOnly ? props.data?.blockColor : "white",
pointerEvents: "none"
}}
cols="50"
disabled={props.isNeedSign && isReadOnly}
/>
) : (
<div style={textWidgetStyle} className="select-none-cls">
<span>{hint || widgetTypeTranslation}</span>
</div>
);
case "date":
return iswidgetEnable || props?.data?.Role === "prefill" ? (
<DatePicker
renderCustomHeader={({ date, changeYear, changeMonth }) => (
<div className="flex justify-start ml-2 ">
<select
className="bg-transparent outline-none"
value={months[getMonth(date)]}
onChange={({ target: { value } }) =>
changeMonth(months.indexOf(value))
}
>
{months.map((option) => (
<option key={option} value={option}>
{option}
</option>
))}
</select>
<select
className="bg-transparent outline-none"
value={getYear(date)}
onChange={({ target: { value } }) => changeYear(value)}
>
{years.map((option) => (
<option key={option} value={option}>
{option}
</option>
))}
</select>
</div>
)}
disabled={true}
closeOnScroll={true}
className={`${selectWidgetCls} outline-[#007bff]`}
selected={props?.startDate}
popperPlacement="top-end"
customInput={<ExampleCustomInput />}
dateFormat={
props.selectDate
? props.selectDate?.format
: props.pos?.options?.validation?.format
? props.pos?.options?.validation?.format
: "MM/dd/yyyy"
}
/>
) : (
<div
style={textWidgetStyle}
className="select-none-cls overflow-hidden"
>
<span>
{props.selectDate
? props.selectDate?.format
: props.pos?.options?.validation?.format
? props.pos?.options?.validation?.format
: "MM/dd/yyyy"}
</span>
</div>
);
case "image":
return prefillImgLoad[props.pos?.key] ? (
<div className="absolute w-full h-full inset-0 flex justify-center items-center bg-white/30 z-50">
<Loader />
</div>
) : imgUrl ? (
<img
alt="image"
draggable="false"
src={imgUrl}
className="w-full h-full select-none-cls object-contain"
/>
) : (
<div className={widgetCls}>
{props.pos.type && (
<div
style={{
fontSize: props.pos
? props.calculateFontsize(props.pos)
: "11px"
}}
className="font-medium text-center"
>
{hint || widgetTypeTranslation}
</div>
)}
</div>
);
case "email":
return iswidgetEnable ? (
<textarea
readOnly
placeholder={hint || widgetTypeTranslation}
rows={1}
value={widgetValue}
className={`${textWidgetCls} ${isReadOnly ? "select-none" : ""}`}
style={{
fontSize: fontSize,
color: fontColor,
background: isReadOnly ? props.data?.blockColor : "white",
pointerEvents: "none"
}}
cols="1"
disabled={props.isNeedSign && isReadOnly}
/>
) : (
<div style={textWidgetStyle} className="select-none-cls">
<span>{hint || widgetTypeTranslation}</span>
</div>
);
case radioButtonWidget:
const radioLayout = props.pos.options?.layout || "vertical";
const isOnlyOneBtn = props.pos.options?.values?.length > 0 ? true : false;
const radioWrapperClass = `flex items-start whitespace-pre-wrap ${
radioLayout === "horizontal"
? `flex-row flex-wrap lg:py-[1.6px] ${isOnlyOneBtn ? "gap-x-[10px]" : ""}`
: `flex-col ${isOnlyOneBtn ? "gap-y-[5px]" : ""}`
}`; // Using gap-y-1 for consistency, adjust if needed
return (
<div className={radioWrapperClass}>
{props.pos.options?.values.map((data, ind) => (
<div key={ind} className="select-none-cls pointer-events-none">
<label
htmlFor={`radio-${props.pos.key + ind}`}
style={{ fontSize: fontSize, color: fontColor }}
className="text-xs mb-0 flex items-center gap-1"
>
<input
readOnly
id={`radio-${props.pos.key + ind}`}
style={{ width: fontSize, height: fontSize, lineHeight: 2 }}
className={`op-radio rounded-full border-black appearance-none bg-white inline-block align-middle relative ${
handleRadioCheck(data) ? "checked-radio" : ""
}`}
type="radio"
disabled={props.isNeedSign && isReadOnly}
checked={handleRadioCheck(data)}
/>
{!props.pos.options?.isHideLabel && (
<span className="leading-none">{data}</span>
)}
</label>
</div>
))}
</div>
);
case textWidget:
return (
<textarea
readOnly
placeholder={t("widgets-name.text")}
rows={1}
value={widgetValue}
className={textWidgetCls}
style={{
fontFamily: "Arial, sans-serif",
fontSize: fontSize,
color: fontColor,
background: "white"
}}
cols="50"
/>
);
default:
return props.pos.SignUrl ? (
<div className="pointer-events-none">
<img
alt="image"
draggable="false"
src={props.pos.SignUrl}
className="w-full h-full "
/>
</div>
) : (
<div className={widgetCls}>
{props.pos.isStamp ? <div>stamp</div> : <div>signature</div>}
{props.pos.type && (
<div
style={{
fontSize: props.pos
? props.calculateFontsize(props.pos)
: "11px"
}}
className="font-medium"
>
{hint || widgetTypeTranslation}
</div>
)}
</div>
);
}
}
export default PlaceholderType;
@@ -1,764 +0,0 @@
import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
import ModalUi from "../../primitives/ModalUi";
import {
getMonth,
getYear,
radioButtonWidget,
compressedFileSize,
textWidget,
months,
changeDateToMomentFormat,
convertBase64ToFile,
generatePdfName,
isBase64
} from "../../constant/Utils";
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { range } from "pdf-lib";
import { useTranslation } from "react-i18next";
import moment from "moment";
import AsyncSelect from "react-select/async";
import axios from "axios";
import AddContact from "../../primitives/AddContact";
import Loader from "../../primitives/Loader";
import { useDispatch, useSelector } from "react-redux";
import {
resetWidgetState,
setPrefillImg
} from "../../redux/reducers/widgetSlice";
import * as utils from "../../utils";
const ShowTextWidget = ({ position, handleWidgetDetails }) => {
const inputRef = useRef(null);
const [inputValue, setInputValue] = useState(position.options.response || "");
return (
<input
ref={inputRef}
rows={1}
value={inputValue}
onChange={(e) => {
setInputValue(e.target.value);
handleWidgetDetails(position, e.target.value);
}}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
);
};
function PrefillWidgetModal(props) {
const { t } = useTranslation();
const dispatch = useDispatch();
// Track already loaded image keys so they don't increment multiple times
const loadedSet = useRef(new Set());
const initializedRef = useRef(false); // prevent rerun on state updates
const prefillImg = useSelector((state) => state.widget.prefillImg);
const [uniqueWidget, setUniqueWidget] = useState([]);
const [image, setImage] = useState(null);
const [imageLoaders, setImageLoaders] = useState({});
const [currentWidget, setCurrentWidget] = useState("");
const [userList, setUserList] = useState([]);
const [totalImages, setTotalImages] = useState(0);
const [loadedImages, setLoadedImages] = useState(0);
const [loading, setLoading] = useState(false);
const years = range(1950, getYear(new Date()) + 16, 1);
const widgetTitle = "font-medium";
const isAnyLoaderActive = Object.values(imageLoaders).some(
(val) => val === true
);
// useMemo to memoize the calculation of unique widgets
const memoizedUniqueWidget = useMemo(() => {
//functions to used remove duplicate name values across all pages
if (!props.prefillData) return [];
//This will help us track which name values have already been encountered across all pages.
const uniqueNames = new Set();
//Filter and flatten placeholder widgets while keeping unique names
const filteredArray = props.prefillData?.placeHolder?.map((item) => ({
...item,
pos: item.pos.filter((curr) => {
if (uniqueNames.has(curr?.options?.name)) return false; //Duplicate name found, remove it
uniqueNames.add(curr?.options?.name); //First time seen, add to set
return true;
})
}));
//latten the filtered array and exclude read-only widgets
const flatArray = filteredArray?.flatMap((page) =>
page.pos
.filter((widget) => !widget.options?.isReadOnly)
.map((widget) => ({
widget,
pageNumber: page.pageNumber
}))
);
return flatArray || [];
}, [props.prefillData]);
useEffect(() => {
dispatch(resetWidgetState([]));
}, []);
// Reset loader state when modal closes
useEffect(() => {
if (!props?.isPrefillModal) {
initializedRef.current = false;
setTotalImages(0);
setLoadedImages(0);
setLoading(false);
}
}, [props?.isPrefillModal]);
useEffect(() => {
//function is used to save all image base64 in redux state to display prefill images
const savePrefillImg = async () => {
const prefillImg = await utils?.savePrefillImg(props.xyPosition);
if (Array.isArray(prefillImg)) {
prefillImg.forEach((img) => dispatch(setPrefillImg(img)));
}
setImageLoaders({});
};
savePrefillImg();
}, [props.xyPosition]);
useEffect(() => {
setUniqueWidget(memoizedUniqueWidget);
}, [memoizedUniqueWidget]);
useEffect(() => {
if (totalImages > 0 && loadedImages === totalImages) {
setLoading(false);
}
}, [loadedImages, totalImages]);
useEffect(() => {
if (image?.src) {
handleWidgetDetails(currentWidget);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [image]);
// Run only once per modal open
useEffect(() => {
if (props?.isPrefillModal && !initializedRef.current) {
const getImgWidgets = uniqueWidget?.filter(
(w) => w.widget?.type === "image" && w.widget?.options?.response
);
if (getImgWidgets?.length > 0) {
const imgCount = getImgWidgets.length;
setTotalImages(imgCount);
setLoadedImages(0);
setLoading(true);
initializedRef.current = true; // mark as initialized
}
}
}, [props?.isPrefillModal, uniqueWidget]);
// The getDatePickerDate function retrieves the date in the correct format supported by the DatePicker.
const getDatePickerDate = (selectedDate, format = "dd-MM-yyyy") => {
let date;
if (format && format === "dd-MM-yyyy") {
const [day, month, year] = selectedDate?.split("-");
date = new Date(`${year}-${month}-${day}`);
} else if (format && format === "dd.MM.yyyy") {
const [day, month, year] = selectedDate?.split(".");
date = new Date(`${year}.${month}.${day}`);
} else if (format && format === "dd/MM/yyyy") {
const [day, month, year] = selectedDate?.split("/");
date = new Date(`${year}/${month}/${day}`);
} else {
date = new Date(selectedDate);
}
return date;
};
const ImageComponent = (props) => {
const imageRefs = useRef([]);
let imgUrl = "";
const isBase64Url = isBase64(props?.position?.SignUrl);
if (isBase64Url) {
imgUrl = props?.position?.SignUrl;
} else {
const getPrefillImg = prefillImg?.find(
(x) => x.id === props?.position?.key
);
imgUrl = getPrefillImg?.base64;
}
return (
<>
<span className={widgetTitle}>{props?.position.options?.name}</span>
{imgUrl ? (
<>
<div className="cursor-pointer op-card border-[1px] border-gray-400 flex flex-col w-full h-full justify-center items-center ">
<img
alt="print img"
ref={(el) => (imageRefs.current[props?.position.key] = el)} // Assign ref dynamicallys
src={imgUrl}
draggable="false"
className="object-contain h-full w-full aspect-[5/2]"
onLoad={() => handleImageLoaded?.(props?.position.key)}
onError={() => handleImageLoaded?.(props?.position.key)}
/>
</div>
<span
onClick={() => handleClearImage(props?.position)}
className="flex justify-start text-blue-500 underline cursor-pointer"
>
{t("clear")}
</span>
</>
) : (
<div
className="cursor-pointer op-card border-[1px] op-border-hover flex flex-col overflow-hidden w-full h-full aspect-[5/2] justify-center items-center"
onClick={() => imageRefs.current[props?.position.key]?.click()}
>
{imageLoaders[props?.position?.key] && (
<div className="absolute w-full h-full inset-0 flex justify-center items-center bg-white/30 z-50">
<Loader />
</div>
)}
<input
type="file"
onChange={(e) => onImageChange(e, props?.position)}
className="filetype"
accept="image/png,image/jpeg"
ref={(el) => (imageRefs.current[props?.position.key] = el)} // Assign ref dynamically
hidden
/>
<i className="fa-light text-base-content fa-cloud-upload-alt text-[25px]"></i>
<div className="text-[10px] text-base-content">{t("upload")}</div>
</div>
)}
</>
);
};
const ExampleCustomInput = forwardRef(({ value, onClick }, ref) => (
<div
style={{ fontFamily: "Arial, sans-serif" }}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full"
onClick={onClick}
ref={ref}
>
{value}
<i className="fa-light fa-calendar ml-[5px]"></i>
</div>
));
ExampleCustomInput.displayName = "ExampleCustomInput";
const handleDate = (position) => {
// The getDatePickerDate function retrieves the date in the correct format supported by the DatePicker.
const getDate = getDatePickerDate(
position?.options.response || new Date(),
position?.options?.validation?.format
);
return getDate;
};
//function to set date with required date format onchange date
const handleOnDateChange = (date, position) => {
const format = position?.options?.validation?.format || "MM/dd/yyyy";
let updateDate = date;
let newDate;
const isSpecialDateFormat =
format && ["dd-MM-yyyy", "dd.MM.yyyy", "dd/MM/yyyy"].includes(format);
if (isSpecialDateFormat) {
newDate = moment(updateDate).format(changeDateToMomentFormat(format));
} else {
//using moment package is used to change date as per the format provided in selectDate obj e.g. - MM/dd/yyyy -> 03/12/2024
newDate = new Date(updateDate);
newDate = moment(newDate.getTime()).format(
changeDateToMomentFormat(format)
);
}
handleWidgetDetails(position, newDate);
};
const handleSavePrefillImg = async (widgetDetails) => {
setImageLoaders((prev) => ({ ...prev, [widgetDetails?.key]: true }));
try {
const imageName = generatePdfName(16);
const imageUrl = await convertBase64ToFile(
imageName,
image.src,
image.imgType
);
setImageLoaders({});
if (imageUrl) {
return imageUrl;
}
} catch (e) {
console.log("error in handleSavePrefillImg function ", e);
}
};
//function is used to handle prefill widgets details and check if there are any duplicate widget name field exist then update all duplicate value
const handleWidgetDetails = async (widgetDetails, response) => {
const widgetName = widgetDetails?.options?.name;
const getPrefill = props.xyPosition.find((x) => x?.Role === "prefill");
const getPlaceholder = getPrefill?.placeHolder;
let imgUrl;
if (widgetDetails?.type === "image") {
imgUrl = await handleSavePrefillImg(widgetDetails);
}
const updatedData = getPlaceholder.map((page) => ({
...page,
pos: page.pos.map((item) => {
if (item.options.name === widgetName) {
if (widgetDetails?.type === "image") {
return {
...item,
SignUrl: imgUrl,
ImageType: image.imgType,
options: { ...item.options, response: imgUrl }
};
} else {
return {
...item,
options: { ...item.options, response: response }
};
}
} else {
return item;
}
})
}));
const newUpdateSigner = props.xyPosition.map((obj) => {
if (obj.Role === "prefill") {
return { ...obj, placeHolder: updatedData };
}
return obj;
});
props.setXyPosition(newUpdateSigner);
};
//function for set checked and unchecked value of checkbox
const handleCheckboxValue = (isChecked, ind, position) => {
let updateSelectedCheckbox = [];
updateSelectedCheckbox =
position.options?.defaultValue || position.options?.response || [];
if (isChecked) {
updateSelectedCheckbox.push(ind);
} else {
updateSelectedCheckbox = updateSelectedCheckbox.filter(
(data) => data !== ind
);
}
handleWidgetDetails(position, updateSelectedCheckbox);
};
//function for image upload or update
const onImageChange = (event, position) => {
if (event.target.files && event.target.files[0]) {
const file = event.target.files[0];
compressedFileSize(file, setImage);
setCurrentWidget(position);
}
};
const handleRadioCheck = (data, position) => {
const res = position?.options?.response;
const defaultCheck = position?.options?.defaultValue;
if (res === data || defaultCheck === data) {
return true;
} else {
return false;
}
};
//function for show checked checkbox
const selectCheckbox = (ind, position) => {
const res = position?.options?.response;
const defaultCheck = position?.options?.defaultValue;
if (res && res?.length > 0) {
const isSelectIndex = res.indexOf(ind);
if (isSelectIndex > -1) {
return true;
} else {
return false;
}
} else if (defaultCheck) {
const isSelectIndex = defaultCheck.indexOf(ind);
if (isSelectIndex > -1) {
return true;
} else {
return false;
}
} else {
return false;
}
};
const handleClearImage = (position) => {
let prefillPlaceholder = props?.xyPosition.filter(
(data) => data?.Role === "prefill"
);
const updatedArray = prefillPlaceholder[0]?.placeHolder?.map((page) => ({
...page,
pos: page.pos.map((item) => {
if (item.options.name === position.options.name) {
return {
...item,
SignUrl: "",
options: {
...position.options,
response: ""
}
};
}
return item;
})
}));
const newUpdateSigner = props.xyPosition.map((obj) => {
if (obj.Role === "prefill") {
return { ...obj, placeHolder: updatedArray };
}
return obj;
});
props.setXyPosition(newUpdateSigner);
};
const handleImageLoaded = (key) => {
// Prevent counting the same image multiple times.
// If this image (key) has not already been marked as loaded...
if (!loadedSet.current.has(key)) {
// Mark this image as loaded by adding its key to the Set
loadedSet.current.add(key);
// Increment the loadedImages state by 1
// (tracks how many images have finished loading)
setLoadedImages((prev) => prev + 1);
}
};
const handleWidgetType = (position) => {
switch (position?.type) {
case "checkbox":
return (
<>
<span className={widgetTitle}>{position.options?.name}</span>
<div className="flex flex-col gap-y-1">
{position.options?.values?.map((data, ind) => (
<div
key={ind}
className="select-none-cls flex items-center text-center gap-0.5"
>
<input
id={`checkbox-${position.key + ind}`}
className="mt-[2px] op-checkbox op-checkbox-xs"
type="checkbox"
checked={selectCheckbox(ind, position)}
onChange={(e) => {
handleCheckboxValue(e.target.checked, ind, position);
}}
/>
<label
htmlFor={`checkbox-${position.key + ind}`}
className="text-xs mb-0 text-center ml-[3px] cursor-pointer"
>
{data}
</label>
</div>
))}
</div>
</>
);
case textWidget:
return (
<>
<span className={widgetTitle}>{position.options?.name}</span>
<ShowTextWidget
position={position}
handleWidgetDetails={handleWidgetDetails}
/>
</>
);
case "dropdown":
return (
<>
<span className={widgetTitle}>{position.options?.name}</span>
<select
className="op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-base-content w-full"
id="myDropdown"
value={
position?.options?.response || position?.options?.defaultValue
}
onChange={(e) => {
handleWidgetDetails(position, e.target.value);
}}
>
{/* Default/Title option */}
<option value="" disabled hidden>
{t("choose-one")}
</option>
{position?.options?.values?.map((data, ind) => (
<option key={ind} value={data}>
{data}
</option>
))}
</select>
</>
);
case "date":
return (
<>
<span className={widgetTitle}>{position.options?.name}</span>
<DatePicker
portalId="datepicker-portal-root"
renderCustomHeader={({ date, changeYear, changeMonth }) => (
<div className="flex justify-start ml-2">
<select
className="bg-transparent outline-none"
value={months[getMonth(date)]}
onChange={({ target: { value } }) =>
changeMonth(months.indexOf(value))
}
>
{months.map((option) => (
<option key={option} value={option}>
{option}
</option>
))}
</select>
<select
className="bg-transparent outline-none"
value={getYear(date)}
onChange={({ target: { value } }) => changeYear(value)}
>
{years.map((option) => (
<option key={option} value={option}>
{option}
</option>
))}
</select>
</div>
)}
closeOnScroll={true}
selected={handleDate(position)}
onChange={(date) => {
handleOnDateChange(date, position);
}}
customInput={<ExampleCustomInput />}
dateFormat={position?.options?.validation?.format || "MM/dd/yyyy"}
/>
</>
);
case "image":
return (
<ImageComponent
position={position}
docId={props?.docId}
/>
);
case radioButtonWidget:
return (
<>
<span className={widgetTitle}>{position.options?.name}</span>
<div className="flex flex-col gap-y-1">
{position.options?.values.map((data, ind) => (
<div
key={ind}
className="select-none-cls flex items-center text-center gap-0.5"
>
<input
id={`radio-${position.key + ind}`}
className="mt-[2px] op-radio op-radio-xs"
type="radio"
checked={handleRadioCheck(data, position)}
onChange={() => {
handleWidgetDetails(position, data);
}}
/>
<label
htmlFor={`radio-${position.key + ind}`}
className="text-xs mb-0 ml-[2px] cursor-pointer"
>
{data}
</label>
</div>
))}
</div>
</>
);
default:
return position?.SignUrl ? (
<div className="pointer-events-none">
<img
alt="image"
draggable="false"
src={position?.SignUrl}
className="w-full h-full"
/>
</div>
) : (
<div className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full">
No widget
</div>
);
}
};
const handleEmbedPrefill = async (item) => {
await props.handleCreateDocument();
};
//`loadOptions` function to use show all list of signer in dropdown
const loadOptions = async (inputValue) => {
try {
const baseURL = localStorage.getItem("baseUrl");
const url = `${baseURL}functions/getsigners`;
const token = {
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
};
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
...token
};
const search = inputValue;
const axiosRes = await axios.post(url, { search }, { headers });
const contactRes = axiosRes?.data?.result || [];
if (contactRes) {
const res = JSON.parse(JSON.stringify(contactRes));
const result = res;
setUserList(result);
return await result.map((item) => ({
label: `${item.Name}<${item.Email}>`,
value: item.objectId
}));
}
} catch (error) {
console.log("err", error);
}
};
//`handleInputChange` function to get signers list from dropdown
const handleInputChange = (item, id) => {
const signerExist = props.forms.some((x) => x.label === item.label);
if (signerExist) {
alert(t("already-exist-signer"));
} else {
let newForm = [...props.forms];
let signerId = newForm[id].value;
newForm[id].label = item?.label;
// newForm[id].value = item?.value;
props.setForms(newForm);
const getSigner = userList.find((x) => x.objectId === item.value);
props.handleAddUser(getSigner, signerId);
}
};
//show modal to create new contact
const handleCreateNew = (e, id) => {
e.preventDefault();
props.setIsNewContact({ status: true, id: id });
};
const closePopup = () => {
props.setIsNewContact({ status: false, id: "" });
};
return (
<>
<ModalUi
title={uniqueWidget?.length > 0 ? t("prefill-widget") : "Recipients"}
isOpen={true}
handleClose={props.handleClosePrefillModal}
>
<div className="relative">
{(props?.isSubmit || loading) && (
<div className="absolute inset-0 flex items-center justify-center bg-white/70 z-[9999]">
<Loader />
</div>
)}
{uniqueWidget?.length > 0 && (
<div className="py-3 px-[10px] op-card border-[1px] border-gray-400 m-3 md:m-6 text-base-content flex flex-col relative">
<div className="grid grid-cols-1 md:grid-cols-2 gap-x-10 gap-y-4 w-full">
{uniqueWidget.map((x, id) => (
<div key={id} className="flex flex-col gap-2 w-full">
{handleWidgetType(x.widget)}
</div>
))}
</div>
</div>
)}
<div>
{props.forms.length > 0 && (
<div className="overflow-y-auto m-3">
{uniqueWidget?.length > 0 && (
<h1 className="font-medium text-[15px] mb-2">
{t("recipients")}
</h1>
)}
<div className="py-3 px-[10px] op-card border-[1px] border-gray-400 md:mx-3 text-base-content flex flex-col relative">
{props.forms?.map((field, id) => {
return (
<div className="flex flex-col" key={field?.value}>
<label>{field?.role}</label>
<div className="flex justify-between items-center gap-1">
<div className="flex-1">
<AsyncSelect
cacheOptions
defaultOptions
value={field}
loadingMessage={() => t("loading")}
noOptionsMessage={() => t("contact-not-found")}
loadOptions={loadOptions}
onChange={(item) => handleInputChange(item, id)}
unstyled
onFocus={() => loadOptions()}
classNames={{
control: () =>
"op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full h-full text-[11px]",
valueContainer: () =>
"flex flex-row gap-x-[2px] gap-y-[2px] md:gap-y-0 w-full my-[2px]",
multiValue: () =>
"op-badge op-badge-primary h-full text-[11px]",
multiValueLabel: () => "mb-[2px]",
menu: () =>
"mt-1 shadow-md rounded-lg bg-base-200 text-base-content absolute z-9999",
menuList: () => "shadow-md rounded-lg ",
option: () =>
"bg-base-200 text-base-content rounded-lg m-1 hover:bg-base-300 p-2 ",
noOptionsMessage: () =>
"p-2 bg-base-200 rounded-lg m-1 p-2"
}}
menuPortalTarget={document.getElementById(
"selectSignerModal"
)}
/>
</div>
<button
onClick={(e) => handleCreateNew(e, field.value)}
className="op-btn op-btn-accent op-btn-outline op-btn-sm "
>
<i className="fa-light fa-plus"></i>
</button>
</div>
</div>
);
})}
</div>
</div>
)}
</div>
<div className="flex gap-2 mx-4 mb-3">
<button
disabled={isAnyLoaderActive || props?.isSubmit}
className="op-btn op-btn-primary op-btn-sm w-[80px]"
onClick={() => handleEmbedPrefill(props?.item)}
>
<span>{t("next")}</span>
</button>
<button
className="op-btn op-btn-ghost op-btn-sm"
onClick={() => props.navigatePageToDoc()}
>
<span>{t("edit-draft")}</span>
</button>
</div>
</div>
</ModalUi>
<ModalUi
title={t("add-contact")}
isOpen={props.isNewContact.status}
handleClose={closePopup}
>
<AddContact
isDisableTitle
isAddYourSelfCheckbox
details={props.handleAddUser}
closePopup={closePopup}
newContactId={props.isNewContact.id}
/>
</ModalUi>
</>
);
}
export default PrefillWidgetModal;
@@ -1,42 +0,0 @@
import React from "react";
import { useTranslation } from "react-i18next";
function PrevNext({ pageNumber, allPages, changePage }) {
const { t } = useTranslation();
//for go to previous page
function previousPage() {
changePage(-1);
}
//for go to next page
function nextPage() {
changePage(1);
}
return (
<div className="flex items-center">
<button
className="op-btn op-btn-neutral op-btn-xs md:op-btn-sm font-semibold text-xs"
disabled={pageNumber <= 1}
onClick={previousPage}
>
<span className="block">
<i className="fa-light fa-chevron-up" aria-hidden="true"></i>
</span>
</button>
<span className="text-xs text-base-content font-medium mx-2 2xl:text-[20px]">
{pageNumber || (allPages ? 1 : "--")} {t("of")} {allPages || "--"}
</span>
<button
className="op-btn op-btn-neutral op-btn-xs md:op-btn-sm font-semibold text-xs"
disabled={pageNumber >= allPages}
onClick={nextPage}
>
<span className="block">
<i className="fa-light fa-chevron-down" aria-hidden="true"></i>
</span>
</button>
</div>
);
}
export default PrevNext;
@@ -1,272 +0,0 @@
import { useRef, useState } from "react";
import { useAutoAnimate } from "@formkit/auto-animate/react";
import {
color,
darkenColor,
getFirstLetter,
isMobile,
nameColor
} from "../../constant/Utils";
const cursor =
"cursor-[url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAASElEQVR4nGNgwAMkJSUbpKSkOvCpIaT5PxSTbogUQjMYMwxeIIXmVFIxA8UGDDyQGg0DnIDi6JKUlCxHMqCeZAOghjSAMD5FAKfeaURdUFxCAAAAAElFTkSuQmCC'),_pointer]";
const RecipientList = (props) => {
const [animationParent] = useAutoAnimate();
const [isHover, setIsHover] = useState();
const [isPrefill, setIsPrefill] = useState(false);
const [isEdit, setIsEdit] = useState(false);
//function for onhover signer name change background color
const inputRef = useRef(null);
const isWidgetExist = (Id) => {
return props.signerPos.some((x) => x.Id === Id && x.placeHolder);
};
//handle drag start
const handleDragStart = (e, id) => {
// `e.dataTransfer.setData('text/plain')`is used to set the data to be transferred during a drag operation.
// The first argument specifies the type of data being set, and the second argument is the actual data you want to transfer.
e.dataTransfer.setData("text/plain", id);
};
//handleDragOver prevents the default behavior of the dragover event, which is necessary for the drop event to be triggered.
const handleDragOver = (e) => {
e.preventDefault();
};
//handle draggable element drop and also used in mobile view on up and down key to change sequence of recipient's list
const handleChangeSequence = (e, ind, isUp, isDown, obj) => {
e.preventDefault();
let draggedItemId;
let index = ind;
//if isUp true then set item's id and index in mobile view
if (isUp) {
draggedItemId = index;
index = index - 1;
}
//if isDown true then set item's id and index in mobile view
else if (isDown) {
draggedItemId = index;
index = index + 1;
} //else set id on drag element in desktop viiew
else {
//`e.dataTransfer.getData('text/plain')` is used to get data that you have saved.
draggedItemId = e.dataTransfer.getData("text/plain");
}
//convert string to number
const intDragId = parseInt(draggedItemId);
//get that item to change position
const draggedItem = props.signersdata.filter((_, ind) => ind === intDragId);
const remainingItems = props.signersdata.filter(
(_, ind) => ind !== intDragId
);
//splice method is used to replace or add new value in array at specific index
remainingItems.splice(index, 0, ...draggedItem);
//set current draggable recipient details,objectId,index,contract_className ... after replace recipient list
props?.setSignersData(remainingItems);
props?.setIsSelectId(index);
props?.setUniqueId(remainingItems[index]?.Id);
props?.setRoleName(remainingItems[index]?.Role);
props?.setBlockColor(obj.blockColor);
//change order of placeholder's list using sorting method
//`remainingItems` is correct order of signers after change order
const changeOrderSignerList = props?.signerPos.sort((a, b) => {
//`indexA` and `indexB` is to get element position using index in correct order array
const indexA = remainingItems.findIndex((item) => item.Id === a.Id);
const indexB = remainingItems.findIndex((item) => item.Id === b.Id);
//and then compare `indexA - indexB` value
//if positive it means indexB element comes before indexA then need to sorting
//if negative it means indexA element is on correct position do not need to sorting
return indexA - indexB;
});
props?.setSignerPos(changeOrderSignerList);
};
const handleSelectRecipient = (e, index, obj, prefill) => {
e.preventDefault();
props?.setIsSelectId(index);
props?.setUniqueId(obj.Id);
props?.setRoleName(obj.Role);
props?.setBlockColor(obj?.blockColor);
props?.handleModal && props?.handleModal();
setIsPrefill(prefill ?? false);
props.setIsTour && props?.setIsTour(false);
};
const isSelected = (ind) => {
const isUserSelected =
(!isMobile && isHover === ind) ||
(!isPrefill && props.isSelectListId === ind);
return isUserSelected;
};
return (
<>
{props?.prefillSigner?.length > 0 &&
props?.prefillSigner?.map((obj, ind) => (
<div
key={ind}
data-tut="prefillTour"
className={`${
props.uniqueId === obj.Id
? "op-bg-primary text-white"
: "transparent text-base-content"
} cursor-pointer px-2 py-1 m-1 mb-2 border-[1px] gap-1 rounded-xl flex justify-center items-center op-border-primary text-[12px] font-bold whitespace-nowrap text-ellipsis`}
onClick={(e) => handleSelectRecipient(e, ind, obj, true)}
>
<i
className={`${props.uniqueId === obj.Id ? "bg-white op-text-primary" : "op-bg-primary text-white"} w-[20px] h-[20px] flex justify-center items-center text-[10px] fa-light fa-signature rounded-full`}
></i>
<span>{obj.Name}</span>
</div>
))}
{props.signersdata.length > 0 &&
props.signersdata.map((obj, ind) => {
return (
<div
ref={animationParent}
key={ind}
draggable={props.sendInOrder && !isMobile ? true : false}
onDragStart={(e) =>
props.sendInOrder && !isMobile && handleDragStart(e, ind)
}
onDragOver={(e) =>
props.sendInOrder && !isMobile && handleDragOver(e)
}
onDrop={(e) =>
props.sendInOrder &&
!isMobile &&
handleChangeSequence(e, ind, null, null, obj)
}
data-tut="recipientArea"
onMouseEnter={() => setIsHover(ind)}
onMouseLeave={() => setIsHover(null)}
className={`${
props.sendInOrder
? props.isMailSend
? "pointer-events-none bg-opacity-80"
: `text-[12px] font-bold ${cursor}`
: props.isMailSend && "pointer-events-none bg-opacity-80"
} flex flex-row rounded-xl px-2 py-[10px] mt-1 mx-1 items-center last:mb-0.5`}
style={{
background:
(!isMobile && isHover === ind) || props.uniqueId === obj.Id
? obj?.blockColor
? obj?.blockColor
: color[ind % color.length]
: "transparent"
}}
onClick={(e) => handleSelectRecipient(e, ind, obj)}
>
<div className="flex flex-row items-center w-full overflow-hidden pr-2">
<div
className="flex flex-shrink-0 w-[30px] h-[30px] rounded-full items-center justify-center mr-2"
style={{
background: obj?.blockColor
? darkenColor(obj?.blockColor, 0.4)
: nameColor[ind % nameColor.length]
}}
>
<span className="text-white uppercase font-bold text-center text-[12px]">
{isWidgetExist(obj.Id) ? (
<i className="fa-light fa-check"></i>
) : (
<>{getFirstLetter(obj?.Name ?? obj?.Role)}</>
)}
</span>
</div>
<div
className={`${obj.Name ? "flex-col" : "flex-row"} ${
isSelected(ind) ? "text-[#424242]" : "text-base-content"
} flex overflow-hidden flex-grow-0`}
>
{obj.Name ? (
<span className="text-[12px] font-bold truncate whitespace-nowrap">
{obj.Name}
</span>
) : (
<span
className="text-[12px] font-bold truncate whitespace-nowrap cursor-pointer"
onClick={() => {
setIsEdit({ [obj.Id]: true });
props.setRoleName(obj.Role);
}}
>
{isEdit?.[obj.Id] && props.handleRoleChange ? (
<input
ref={inputRef}
className="bg-transparent p-[3px] w-full"
value={obj.Role}
onChange={(e) => props.handleRoleChange(e, obj.Id)}
onBlur={() => {
setIsEdit({});
props.handleOnBlur(obj.Role, obj.Id);
}}
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
inputRef.current.blur();
}
}}
/>
) : (
<span className="text-[13px] 2xl:text-[17px]">
{obj.Role}
</span>
)}
</span>
)}
{obj.Name && (
<span className="text-[10px] font-medium truncate whitespace-nowrap">
{obj?.Role || obj?.Email}
</span>
)}
</div>
</div>
{isMobile && props.sendInOrder && (
<div className="flex flex-row items-center gap-[5px] mr-2">
<div
onClick={(e) => {
if (ind !== 0) {
e.stopPropagation();
handleChangeSequence(e, ind, "up", null, obj);
}
}}
className={ind === 0 ? "text-[gray]" : "text-black"}
>
</div>
<div
onClick={(e) => {
if (ind !== props.signersdata.length - 1) {
e.stopPropagation();
handleChangeSequence(e, ind, null, "down", obj);
}
}}
className={
ind === props.signersdata.length - 1
? "text-[gray]"
: "text-black"
}
>
</div>
</div>
)}
{props.handleDeleteUser && obj?.Role !== "prefill" && (
<div
onClick={(e) => {
e.stopPropagation();
props.handleDeleteUser(obj.Id);
}}
className={`${isSelected(ind) ? "text-[#424242]" : "text-base-content"} cursor-pointer`}
>
<i className="fa-light fa-trash-can 2xl:text-[22px]"></i>
</div>
)}
<hr />
</div>
);
})}
</>
);
};
export default RecipientList;
@@ -1,222 +0,0 @@
import React, { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Document, Page } from "react-pdf";
import { useSelector } from "react-redux";
import { PDFDocument } from "pdf-lib";
import {
base64ToArrayBuffer,
decryptPdf,
flattenPdf,
getFileAsArrayBuffer
} from "../../constant/Utils";
import { maxFileSize } from "../../constant/const";
function RenderAllPdfPage(props) {
const { t } = useTranslation();
const pageContainer = useRef();
const mergePdfInputRef = useRef(null);
const [signPageNumber, setSignPageNumber] = useState([]);
const [bookmarkColor, setBookmarkColor] = useState("");
const isSidebar = useSelector((state) => state.sidebar.isOpen);
const [pageWidth, setPageWidth] = useState("");
//set all number of pages after load pdf
function onDocumentLoad({ numPages }) {
props?.setAllPages(numPages);
//check if signerPos array exist then save page number exist in signerPos array to show bookmark icon
if (props?.signerPos) {
const checkUser = props?.signerPos.filter(
(data) => data.Id === props?.id
);
setBookmarkColor(checkUser[0]?.blockColor);
let pageNumberArr = [];
if (checkUser?.length > 0) {
checkUser[0]?.placeHolder?.map((data) => {
pageNumberArr.push(data?.pageNumber);
});
setSignPageNumber(pageNumberArr);
}
}
}
useEffect(() => {
const updateSize = () => {
if (pageContainer.current) {
setPageWidth(pageContainer.current.offsetWidth);
}
};
// Use setTimeout to wait for the transition to complete
const timer = setTimeout(updateSize, 100); // match the transition duration
return () => clearTimeout(timer);
}, [isSidebar, pageContainer, props?.containerWH]);
//'function `addSignatureBookmark` is used to display the page where the user's signature is located.
const addSignatureBookmark = (index) => {
const ispageNumber = signPageNumber.includes(index + 1);
return (
ispageNumber && (
<div className="absolute z-20 top-[1px] -right-[13px] -translate-x-1/2 -translate-y-1/2">
<i
style={{ color: bookmarkColor || "red" }}
className="fa-solid fa-bookmark"
></i>
</div>
)
);
};
const pdfDataBase64 = `data:application/pdf;base64,${props?.pdfBase64Url}`;
// `removeFile` is used to remove file if exists
const removeFile = (e) => {
if (e) {
e.target.value = "";
}
};
// `handleFileUpload` is trigger when user click on add pages btn and is used to merge multiple pdf
const handleFileUpload = async (e) => {
const file = e.target.files[0];
if (!file) {
alert(t("please-select-pdf"));
return;
}
if (!file.type.includes("pdf")) {
alert(t("only-pdf-allowed"));
return;
}
const mb = Math.round(file?.size / Math.pow(1024, 2));
if (mb > maxFileSize) {
alert(`${t("file-alert-1")} ${maxFileSize} MB`);
removeFile(e);
return;
}
try {
let uploadedPdfBytes = await file.arrayBuffer();
try {
uploadedPdfBytes = await flattenPdf(uploadedPdfBytes);
} catch (err) {
if (err?.message?.includes("is encrypted")) {
try {
const pdfFile = await decryptPdf(file, "");
const pdfArrayBuffer = await getFileAsArrayBuffer(pdfFile);
uploadedPdfBytes = await flattenPdf(pdfArrayBuffer);
} catch (err) {
if (err?.response?.status === 401) {
const password = prompt(
`PDF "${file.name}" is password-protected. Enter password:`
);
if (password) {
try {
const pdfFile = await decryptPdf(file, password);
const pdfArrayBuffer = await getFileAsArrayBuffer(pdfFile);
uploadedPdfBytes = await flattenPdf(pdfArrayBuffer);
// Upload the file to Parse Server
} catch (err) {
console.error("Incorrect password or decryption failed", err);
alert(t("incorrect-password-or-decryption-failed"));
}
} else {
alert(t("provide-password"));
}
} else {
console.log("Err ", err);
alert(t("error-uploading-pdf"));
}
}
} else {
alert(t("error-uploading-pdf"));
}
}
const uploadedPdfDoc = await PDFDocument.load(uploadedPdfBytes, {
ignoreEncryption: true
});
const basePdfDoc = await PDFDocument.load(props.pdfArrayBuffer);
// Copy pages from the uploaded PDF to the base PDF
const uploadedPdfPages = await basePdfDoc.copyPages(
uploadedPdfDoc,
uploadedPdfDoc.getPageIndices()
);
uploadedPdfPages.forEach((page) => basePdfDoc.addPage(page));
// Save the updated PDF
const pdfBase64 = await basePdfDoc.saveAsBase64({
useObjectStreams: false
});
const pdfBuffer = base64ToArrayBuffer(pdfBase64);
props.setPdfArrayBuffer(pdfBuffer);
props.setPdfBase64Url(pdfBase64);
props.setIsUploadPdf && props.setIsUploadPdf(true);
mergePdfInputRef.current.value = "";
} catch (error) {
mergePdfInputRef.current.value = "";
console.error("Error merging PDF:", error);
}
};
return (
<div ref={pageContainer} className="hidden w-[20%] bg-base-100 md:block">
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
{t("pages")}
</div>
<div
className={`flex h-[90%] flex-col items-center m-2
autoSignScroll hide-scrollbar max-h-[100vh] `}
>
<Document
error=""
loading={t("loading-doc")}
onLoadSuccess={onDocumentLoad}
file={pdfDataBase64}
>
{Array.from(new Array(props?.allPages), (el, index) => (
<div
key={index}
className={`${
props?.pageNumber - 1 === index
? "border-[red]"
: "border-[#878787]"
} border-2 m-[10px] flex justify-center items-center relative`}
onClick={() => {
props?.setPageNumber(index + 1);
if (props?.setSignBtnPosition) {
props?.setSignBtnPosition([]);
}
}}
>
{props?.signerPos && addSignatureBookmark(index)}
<Page
key={`page_${index + 1}`}
pageNumber={index + 1}
width={pageWidth - 60}
scale={1}
renderAnnotationLayer={false}
renderTextLayer={false}
/>
</div>
))}
</Document>
{props?.isMergePdfBtn && (
<button
className="mb-2 bg-base-100 px-2 py-2 ring-[0.5px] ring-base-content rounded-box flex gap-1 justify-center items-center"
onClick={() => mergePdfInputRef.current.click()}
title={t("add-pages")}
>
<input
type="file"
className="hidden"
accept="application/pdf"
ref={mergePdfInputRef}
onChange={handleFileUpload}
/>
<i className="fa-light fa-plus text-gray-500"></i>
<span className="text-xs lg:text-sm text-base-content">
{t("add-pages")}
</span>
</button>
)}
</div>
</div>
);
}
export default RenderAllPdfPage;
@@ -1,538 +0,0 @@
import React, {
useState,
useRef,
useCallback,
useLayoutEffect,
useEffect
} from "react";
import RSC from "react-scrollbars-custom";
import { Document, Page } from "react-pdf";
import {
defaultWidthHeight,
getContainerScale,
handleImageResize,
handleSignYourselfImageResize,
isMobile
} from "../../constant/Utils";
import Placeholder from "./Placeholder";
import Alert from "../../primitives/Alert";
import { useTranslation } from "react-i18next";
import usePdfPinchZoom from "../../hook/usePdfPinchZoom";
import { useDispatch, useSelector } from "react-redux";
import Guidelines from "./Guidelines";
import { useGuidelinesContext } from "../../context/GuidelinesContext";
import { toggleSidebar } from "../../redux/reducers/sidebarReducer";
function RenderPdf(props) {
const { t } = useTranslation();
const dispatch = useDispatch();
const [scaledHeight, setScaledHeight] = useState();
const { guideline } = useGuidelinesContext();
//check isGuestSigner is present in local if yes than handle login flow header in mobile view
const isGuestSigner = localStorage.getItem("isGuestSigner");
const scrollTriggerId = useSelector((state) => state.widget.scrollTriggerId);
const isOpen = useSelector((state) => state.sidebar.isOpen);
const scrollRef = useRef(null);
const pdfContainerRef = useRef(null);
useEffect(() => {
dispatch(toggleSidebar(false));
return () => {
dispatch(toggleSidebar(true));
};
}, []);
// enable pinch to zoom only on actual pdf wrapper
usePdfPinchZoom(
pdfContainerRef,
props.scale,
props.setScale,
props.setZoomPercent
);
// handle signature block width and height according to screen
const posWidth = (pos, signYourself) => {
const containerScale = getContainerScale(
props.pdfOriginalWH,
props.pageNumber,
props.containerWH
);
const defaultWidth = defaultWidthHeight(pos.type).width;
const posWidth = pos.Width ? pos.Width : defaultWidth;
if (signYourself) {
return posWidth * props.scale * containerScale;
} else {
if (pos.isMobile && pos.scale) {
if (pos.IsResize) {
if (props.scale > 1) {
return posWidth * pos.scale * containerScale * props.scale;
} else {
return posWidth * containerScale;
}
} else {
if (props.scale > 1) {
return posWidth * pos.scale * containerScale * props.scale;
} else {
return posWidth * pos.scale * containerScale;
}
}
} else {
return posWidth * props.scale * containerScale;
}
}
};
const posHeight = (pos, signYourself) => {
const containerScale = getContainerScale(
props.pdfOriginalWH,
props.pageNumber,
props.containerWH
);
const posHeight = pos.Height || defaultWidthHeight(pos.type).height;
if (signYourself) {
return posHeight * props.scale * containerScale;
} else {
if (pos.isMobile && pos.scale) {
if (pos.IsResize) {
if (props.scale > 1) {
return posHeight * pos.scale * containerScale * props.scale;
} else {
return posHeight * containerScale;
}
} else {
if (props.scale > 1) {
return posHeight * pos.scale * containerScale * props.scale;
} else {
return posHeight * pos.scale * containerScale;
}
}
} else {
return posHeight * props.scale * containerScale;
}
}
};
// `smoothScrollTo` is used to provide smooth scrolling while focus on widget
const smoothScrollTo = (targetY, duration = 500) => {
const sb = scrollRef.current;
if (!sb) return;
const start = sb.scrollTop;
const change = targetY - start;
const startTime = performance.now();
const animate = (now) => {
const elapsed = now - startTime;
const t = Math.min(1, elapsed / duration);
// easeInOutQuad
const ease = t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
sb.scrollTo(sb.scrollLeft, start + change * ease);
if (t < 1) requestAnimationFrame(animate);
};
requestAnimationFrame(animate);
};
// `scrollToTarget` is used to focus on widget and scroll to top
const scrollToTarget = useCallback(() => {
// Get the scrollbar container ref
const sb = scrollRef.current;
// If there's no content element or no widget details, bail out
if (!sb?.contentElement || !props.currWidgetsDetails) return;
// The absolute Y position (relative to the document) where we want to scroll
const yPosition = props?.currWidgetsDetails?.yPosition || 0;
const containerScale = getContainerScale(
props.pdfOriginalWH,
props.pageNumber,
props.containerWH
);
const targetTop = yPosition * containerScale * props.scale;
// The Y offset of the scrollable content container itself
const { offsetTop } = sb.contentElement;
// Account for the header height + a little extra padding
// Different header height if user is a guest signer
const headerOffset = isGuestSigner ? 10 : 79;
// Compute the scroll position inside the container
const positionTop = targetTop - offsetTop - headerOffset;
const pageNumber = props.pageNumber > 0 ? props.pageNumber - 1 : 0;
const ogH = props.pdfOriginalWH[pageNumber]?.height;
// If the modal for this widget is open, we may need to expand the PDF container
if (props.isShowModal[scrollTriggerId]) {
// Original PDF height for this page
if (pdfContainerRef?.current) {
// Increase container height to include the area up to the target
pdfContainerRef.current.style.height = `${ogH + (targetTop - offsetTop)}px`;
}
} else {
// Otherwise, reset any inline height override
if (pdfContainerRef?.current) {
pdfContainerRef.current.style.height = "";
}
}
// Actually perform the scroll: keep the same horizontal scroll, scroll vertically
if (targetTop > ogH * 0.75 && !isGuestSigner && isOpen) {
smoothScrollTo(positionTop - 300);
} else if (targetTop > ogH * 0.75 && !isGuestSigner && !isOpen) {
smoothScrollTo(positionTop - 100);
} else {
smoothScrollTo(positionTop);
}
// Highlight only the target widget; reset others to default border
document.querySelectorAll(".signYourselfBlock").forEach((w) => {
w.style.border =
w.id === String(scrollTriggerId)
? "1.5px solid red" // active widget in red
: "1.5px solid #007bff"; // others in blue
});
}, [
scrollTriggerId,
props.currWidgetsDetails?.yPosition,
props.isShowModal,
props.pdfOriginalWH,
props.pageNumber
]);
useLayoutEffect(() => {
// Whenever scrollTriggerId changes, fire off the scroll in the next rAF
// to ensure the DOM has painted/layout is stable before scrolling
if (scrollTriggerId) {
scrollToTarget();
}
}, [scrollTriggerId, scrollToTarget]);
// function for render placeholder block over pdf document (all signing flow)
const checkSignedSigners = (data) => {
let checkSign = [];
//condition to handle quick send flow and using normal request sign flow
checkSign = props.signedSigners
? props.signedSigners?.filter(
(sign) =>
sign?.Id === data?.Id || sign?.objectId === data?.signerObjId
)
: [];
return (
checkSign.length === 0 &&
data?.placeHolder?.map((placeData, key) => (
<React.Fragment key={key}>
{placeData.pageNumber === props.pageNumber &&
placeData.pos.map(
(pos, ind) =>
pos && (
<React.Fragment key={ind}>
<Placeholder
pos={pos}
handleSignYourselfImageResize={handleImageResize}
index={props.pageNumber}
xyPosition={props.signerPos}
setXyPosition={props.setSignerPos}
data={data}
setIsResize={props.setIsResize}
isShowBorder={props.isSelfSign}
isAlllowModify={props.isAlllowModify}
signerObjId={props.signerObjectId}
isShowDropdown={true}
isNeedSign={props.pdfRequest}
isSelfSign={true}
isSignYourself={false}
posWidth={posWidth}
posHeight={posHeight}
isDragging={props.isDragging}
pdfDetails={props.pdfDetails}
unSignedWidgetId={props.unSignedWidgetId}
setCurrWidgetsDetails={props.setCurrWidgetsDetails}
uniqueId={props.uniqueId}
scale={props.scale}
containerWH={props.containerWH}
pdfOriginalWH={props.pdfOriginalWH}
pageNumber={props.pageNumber}
ispublicTemplate={props.ispublicTemplate}
handleUserDetails={props.handleUserDetails}
isResize={props.isResize}
handleTabDrag={props.handleTabDrag}
handleStop={props.handleStop}
setUniqueId={props.setUniqueId}
setIsSelectId={props.setIsSelectId}
handleDeleteWidget={props.handleDeleteWidget}
setIsPageCopy={props.setIsPageCopy}
handleTextSettingModal={props.handleTextSettingModal}
handleCellSettingModal={props.handleCellSettingModal}
setIsCheckbox={props.setIsCheckbox}
isFreeResize={props.isSelfSign ? true : false}
isOpenSignPad={true}
assignedWidgetId={props.assignedWidgetId}
setCellCount={props.setCellCount}
setFontSize={props.setFontSize}
fontSize={props.fontSize}
fontColor={props.fontColor}
setFontColor={props.setFontColor}
setIsReqSignTourDisabled={props.setIsReqSignTourDisabled}
calculateFontsize={calculateFontsize}
currWidgetsDetails={props?.currWidgetsDetails}
/>
</React.Fragment>
)
)}
</React.Fragment>
))
);
};
const calculateFontsize = (pos) => {
const width = posWidth(pos);
const height = posHeight(pos);
if (height === width || height < width) {
return `${height / 5}px`;
} else if (width < height) {
return `${width / 10}px`;
}
};
const pdfDataBase64 = `data:application/pdf;base64,${props.pdfBase64Url}`;
// calculate render height of pdf in mobile view
const handlePageLoadSuccess = (page) => {
if (isMobile) {
const containerWidth = props.divRef.current.offsetWidth; // Get container width
const viewport = page.getViewport({ scale: 1 });
const scale = containerWidth / viewport.width; // Scale to fit container width
const scaleHeight = viewport.height * scale;
setScaledHeight(scaleHeight);
}
};
return (
<>
{props.successEmail && (
<Alert type={"success"}>{t("success-email-alert")}</Alert>
)}
<RSC
ref={scrollRef}
style={{
position: "relative",
boxShadow: "rgba(17, 12, 46, 0.15) 0px 48px 100px 0px",
height: isMobile
? isGuestSigner
? window.innerHeight - 49 // 49 is height of header
: scaledHeight
: `${window.innerHeight}px`,
zIndex: 0
}}
noScrollY={isMobile ? props.scale === 1 : false}
noScrollX={props.scale === 1}
>
<div
data-tut={isMobile ? "reactourForth" : undefined}
className={
isMobile
? `${isGuestSigner ? "30px" : ""} border-[0.1px] border-[#ebe8e8] overflow-x-auto relative`
: "relative"
}
style={{
width:
props.containerWH?.width && props.containerWH?.width * props.scale
}}
ref={(node) => {
pdfContainerRef.current = node;
props.drop && props.drop(node);
}}
id="container"
>
{props.pdfLoad !== false &&
props.containerWH?.width &&
props.pdfOriginalWH.length > 0 && (
<>
{props.pdfRequest || props.isSelfSign
? // request sign, guest sign,
props.signerPos?.map((data, key) => (
<React.Fragment key={key}>
{checkSignedSigners(data)}
</React.Fragment>
))
: props.placeholder // placeholdersign document, draft document, create template, draft template
? props.signerPos?.map((data, ind) => (
<React.Fragment key={ind}>
{data?.placeHolder &&
data?.placeHolder.map((placeData, index) => (
<React.Fragment key={index}>
{placeData.pageNumber === props.pageNumber &&
placeData.pos.map((pos) => (
<React.Fragment key={pos.key}>
<Placeholder
pos={pos}
setIsPageCopy={props.setIsPageCopy}
handleDeleteWidget={
props.handleDeleteWidget
}
handleTabDrag={props.handleTabDrag}
handleStop={props.handleStop}
handleSignYourselfImageResize={
handleImageResize
}
index={props.pageNumber}
xyPosition={props.signerPos}
setXyPosition={props.setSignerPos}
data={data}
setIsResize={props.setIsResize}
setShowDropdown={props.setShowDropdown}
isShowBorder={true}
isPlaceholder={true}
setUniqueId={props.setUniqueId}
handleLinkUser={props.handleLinkUser}
isSignYourself={false}
posWidth={posWidth}
posHeight={posHeight}
isDragging={props.isDragging}
setIsValidate={props.setIsValidate}
setIsRadio={props.setIsRadio}
setIsCheckbox={props.setIsCheckbox}
setCurrWidgetsDetails={
props.setCurrWidgetsDetails
}
handleNameModal={props.handleNameModal}
uniqueId={props.uniqueId}
handleTextSettingModal={
props.handleTextSettingModal
}
handleCellSettingModal={
props.handleCellSettingModal
}
scale={props.scale}
containerWH={props.containerWH}
pdfOriginalWH={props.pdfOriginalWH}
pageNumber={props.pageNumber}
setIsSelectId={props.setIsSelectId}
fontSize={props.fontSize}
setFontSize={props.setFontSize}
setCellCount={props.setCellCount}
fontColor={props.fontColor}
setFontColor={props.setFontColor}
isResize={props.isResize}
unSignedWidgetId={
props.unSignedWidgetId
}
isFreeResize={true}
calculateFontsize={calculateFontsize}
currWidgetsDetails={
props?.currWidgetsDetails
}
setRoleName={props?.setRoleName}
pdfDetails={props.pdfDetails}
setIsReqSignTourDisabled={
props.setIsReqSignTourDisabled
}
/>
</React.Fragment>
))}
</React.Fragment>
))}
</React.Fragment>
))
: !props.pdfDetails?.[0]?.IsCompleted && // signyourself flow
props.xyPosition?.map((data, ind) => (
<React.Fragment key={ind}>
{data.pageNumber === props.pageNumber &&
data.pos.map(
(pos, id) =>
pos && (
<Placeholder
key={id}
pos={pos}
setIsPageCopy={props.setIsPageCopy}
handleDeleteWidget={
props.handleDeleteWidget
}
handleTabDrag={props.handleTabDrag}
handleStop={props.handleStop}
handleSignYourselfImageResize={
handleSignYourselfImageResize
}
index={props.index}
xyPosition={props.xyPosition}
setXyPosition={props.setXyPosition}
containerWH={props.containerWH}
isShowBorder={true}
isSignYourself={true}
posWidth={posWidth}
posHeight={posHeight}
isDragging={props.isDragging}
setIsCheckbox={props.setIsCheckbox}
setCurrWidgetsDetails={
props.setCurrWidgetsDetails
}
handleTextSettingModal={
props.handleTextSettingModal
}
handleCellSettingModal={
props.handleCellSettingModal
}
scale={props.scale}
pdfOriginalWH={props.pdfOriginalWH}
pageNumber={props.pageNumber}
fontSize={props.fontSize}
setFontSize={props.setFontSize}
fontColor={props.fontColor}
setFontColor={props.setFontColor}
isResize={props.isResize}
setIsResize={props.setIsResize}
isFreeResize={true}
isOpenSignPad={true}
calculateFontsize={calculateFontsize}
currWidgetsDetails={
props?.currWidgetsDetails
}
setIsReqSignTourDisabled={
props.setIsReqSignTourDisabled
}
/>
)
)}
</React.Fragment>
))}
</>
)}
<Document
error={<p className="mx-2">{t("failed-to-load-refresh-page")}</p>}
onLoadError={(e) => {
console.log("PDF load error", e);
props.setPdfLoad(false);
}}
loading={t("loading-doc")}
onLoadSuccess={(pdf) => {
props.setPdfLoad(true);
props.pageDetails(pdf);
}}
onClick={() =>
props.setCurrWidgetsDetails && props.setCurrWidgetsDetails({})
}
file={pdfDataBase64}
>
<Page
key={props.index}
onLoadSuccess={handlePageLoadSuccess}
width={props.containerWH.width}
scale={props.scale || 1}
className={isMobile ? "select-none touch-callout-none" : "-z-[1]"}
pageNumber={props.pageNumber}
renderAnnotationLayer={false}
renderTextLayer={false}
onGetAnnotationsError={(error) => {
console.log("annotation error", error);
}}
/>
</Document>
{guideline.show && (
<Guidelines
x1={guideline.x1}
x2={guideline.x2}
y1={guideline.y1}
y2={guideline.y2}
/>
)}
</div>
</RSC>
</>
);
}
export default RenderPdf;
@@ -1,49 +0,0 @@
import i18next from "i18next";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
function SelectLanguage(props) {
const { i18n } = useTranslation();
const languages = [
{ value: "en", text: "English" }, //english
{ value: "es", text: "Española" }, //spanish
{ value: "fr", text: "Français" }, //french
{ value: "it", text: "Italiano" }, //italian
{ value: "de", text: "Deutsch" }, //german
{ value: "hi", text: "हिन्दी" } //hindi
];
const defaultLanguage = i18next.language || "en";
const [lang, setLang] = useState(defaultLanguage);
// This function put query that helps to change the language
const handleChangeLang = (e) => {
setLang(e.target.value);
i18n.changeLanguage(e.target.value);
props?.updateExtUser && props.updateExtUser({ language: e.target.value });
};
return (
<div
className={`${
!props.isProfile && " mt-[9px] pb-2 md:pb-0 "
} flex justify-center items-center text-base-content`}
>
<select
value={lang}
onChange={handleChangeLang}
className={`${
!props.isProfile ? " md:w-[15%] w-[50%]" : "w-[180px]"
} op-select op-select-bordered op-select-sm `}
>
<option disabled>select</option>
{languages.map((item) => {
return (
<option key={item.value} value={item.value}>
{item.text}
</option>
);
})}
</select>
</div>
);
}
export default SelectLanguage;
@@ -1,47 +0,0 @@
import React from "react";
import "../../styles/signature.css";
import { useTranslation } from "react-i18next";
function Signedby(props) {
const { t } = useTranslation();
const getFirstLetter = (pdfData) => {
const name = props.isSelfSign
? (pdfData?.Signers && pdfData?.Signers[0]?.Name) || "User"
: pdfData.ExtUserPtr?.Name;
const firstLetter = name.charAt(0);
return firstLetter;
};
return (
<div className="hidden md:block w-full h-full bg-base-100">
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
{props.isSelfSign ? t("user") : t("signed-by")}
</div>
<div className="mt-[2px] bg-base-100">
<div className="bg-[#93a3db] rounded-xl mx-1 flex flex-row items-center py-[10px]">
<div className="bg-[#576081] flex w-[30px] h-[30px] rounded-full justify-center items-center mx-1">
<span className="text-[12px] text-center font-bold text-white uppercase">
{getFirstLetter(props.pdfDetails)}
</span>
</div>
<div className="flex flex-col">
<span className="text-[12px] font-bold text-[#424242] w-[100px] whitespace-nowrap overflow-hidden text-ellipsis">
{props.isSelfSign
? (props.pdfDetails?.Signers &&
props.pdfDetails?.Signers[0]?.Name) ||
"User"
: props.pdfDetails.ExtUserPtr.Name || "User"}
</span>
<span className="text-[10px] font-medium text-[#424242] w-[100px] whitespace-nowrap overflow-hidden text-ellipsis">
{props.isSelfSign
? (props.pdfDetails?.Signers &&
props.pdfDetails?.Signers[0]?.Email) ||
""
: props.pdfDetails.ExtUserPtr.Email || ""}
</span>
</div>
</div>
</div>
</div>
);
}
export default Signedby;
@@ -1,55 +0,0 @@
import React from "react";
import { darkenColor, getFirstLetter } from "../../constant/Utils";
function SignerListComponent(props) {
const checkSignerBackColor = (obj) => {
if (obj) {
let data = "";
if (obj?.Id) {
data = props.signerPos.filter((data) => data.Id === obj.Id);
} else {
data = props.signerPos.filter(
(data) => data.signerObjId === obj.objectId
);
}
return data && data.length > 0 && data[0].blockColor;
}
};
const checkUserNameColor = (obj) => {
const getBackColor = checkSignerBackColor(obj);
if (getBackColor) {
const color = darkenColor(getBackColor, 0.4);
return color;
} else {
return "#abd1d0";
}
};
return (
<div
className="rounded-xl mx-1 flex flex-row flex-grow-0 items-center py-[10px] mt-1"
style={{ background: checkSignerBackColor(props.obj) }}
>
<div
style={{ background: checkUserNameColor(props.obj) }}
className="flex flex-shrink-0 w-[30px] h-[30px] rounded-full justify-center items-center mx-1"
>
<span className="text-[12px] text-center font-bold text-black uppercase">
{getFirstLetter(
props.obj?.Name || props.obj?.email || props.obj?.Role
)}
</span>
</div>
<div className="flex flex-grow-0 flex-col overflow-hidden pr-2">
<span className="text-[12px] font-bold truncate whitespace-nowrap">
{props.obj?.Name || props?.obj?.Role}
</span>
<span className="text-[10px] font-medium truncate whitespace-nowrap">
{props.obj?.Email || props.obj?.email}
</span>
</div>
</div>
);
}
export default SignerListComponent;
@@ -1,73 +0,0 @@
import RecipientList from "./RecipientList";
// import { Tooltip } from "react-tooltip";
import { useTranslation } from "react-i18next";
function SignerListPlace(props) {
const { t } = useTranslation();
const handleAddRecipient = () => {
props?.setIsAddSigner(true);
props.setIsTour && props.setIsTour(false);
};
return (
<div>
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
<span className="relative">
{props.title ? props.title : "Recipients"}
<sup onClick={() => props.setIsTour && props.setIsTour(true)}>
<i className="ml-1 cursor-pointer fa-light fa-question rounded-full border-[1px] border-base-content text-[11px] py-[1px] px-[3px]"></i>
</sup>
{/* <span className="absolute text-xs z-[30] mt-1 ml-0.5">
{props?.title === "Roles" && (
<>
<a data-tooltip-id="my-tooltip">
<sup>
<i className="fa-light fa-question rounded-full border-[1px] border-base-content text-[11px] py-[1px] px-[3px]"></i>
</sup>
</a>
<Tooltip id="my-tooltip" className="z-[100]">
<div className="max-w-[450px] 2xl:max-w-[500px] p-[1px]">
<p className="font-bold pb-[1px]">{t("role-help.p1")}</p>
<p>{t("role-help.p2")} </p>
<p className="font-bold">{t("role-help.p3")}</p>
<p>{t("role-help.p4")}</p>
<p className="font-bold">{t("role-help.p5")}</p>
<p>{t("role-help.p6")}</p>
</div>
</Tooltip>
</>
)}
</span> */}
</span>
</div>
<div className="overflow-auto hide-scrollbar max-h-[180px]">
<RecipientList {...props} />
</div>
<div className="mx-1">
{props.handleAddSigner ? (
<div
role="button"
data-tut="reactourAddbtn"
disabled={props?.isMailSend ? true : false}
className="op-btn op-btn-accent op-btn-outline w-full mt-[14px]"
onClick={() => props.handleAddSigner()}
>
<i className="fa-light fa-plus"></i> {t("add-role")}
</div>
) : (
<div
role="button"
data-tut="addRecipient"
className="op-btn op-btn-accent op-btn-outline w-full mt-[14px]"
disabled={props?.isMailSend ? true : false}
onClick={handleAddRecipient}
>
<i className="fa-light fa-plus"></i> {t("add-recipients")}
</div>
)}
</div>
</div>
);
}
export default SignerListPlace;
@@ -1,81 +0,0 @@
import React from "react";
import ModalUi from "../../primitives/ModalUi";
import { fontColorArr, fontsizeArr } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
function TextFontSetting(props) {
const { t } = useTranslation();
return (
<ModalUi
headerColor={"#dc3545"}
isOpen={props.isTextSetting}
reduceWidth={"max-w-[350px]"}
title={t("text-field")}
handleClose={() => props.setIsTextSetting(false)}
>
<div className="h-full p-[20px] text-base-content">
<div className="flex flex-col md:flex-row md:items-center gap-3">
{/* Font Size Selector */}
<div className="flex items-center gap-2">
<span className="whitespace-nowrap">{t("font-size")}:</span>
<select
className="ml-[7px] w-[60%] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={
props.fontSize ||
props.currWidgetsDetails?.options?.fontSize ||
12
}
onChange={(e) => props.setFontSize(parseInt(e.target.value))}
>
{fontsizeArr.map((size, ind) => (
<option key={ind} className="text-[13px]" value={size}>
{size}
</option>
))}
</select>
</div>
{/* Font Color Selector */}
<div className="flex items-center">
<span className="whitespace-nowrap">{t("color")}:</span>
<select
className="ml-[33px] md:ml-4 w-[65%] md:w-[full] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={
props.fontColor ||
props.currWidgetsDetails?.options?.fontColor ||
"black"
}
onChange={(e) => props.setFontColor(e.target.value)}
>
{fontColorArr.map((color, ind) => (
<option key={ind} value={color}>
{t(`color-type.${color}`)}
</option>
))}
</select>
{/* Color Preview Box */}
<span
className="w-5 h-5 ml-2 rounded border border-gray-300"
style={{
backgroundColor:
props.fontColor ||
props.currWidgetsDetails?.options?.fontColor ||
"black"
}}
></span>
</div>
</div>
<div className="h-[1px] bg-[#9f9f9f] w-full mt-[15px] mb-2"></div>
<button
onClick={() => props.handleSaveFontSize()}
type="button"
className="op-btn op-btn-primary mt-2"
>
{t("save")}
</button>
</div>
</ModalUi>
);
}
export default TextFontSetting;
@@ -1,71 +0,0 @@
import React from "react";
import Loader from "../../primitives/Loader";
import { useTranslation } from "react-i18next";
function VerifyEmail(props) {
const { t } = useTranslation();
return (
<dialog className="op-modal op-modal-open absolute z-[1999]">
<div className="md:w-[40%] w-[80%] op-modal-box p-0 overflow-y-auto hide-scrollbar text-sm">
<h3 className="font-bold text-lg pt-[15px] px-[20px] text-base-content">
{t("otp-verification")}
</h3>
{props.isVerifyModal ? (
<form
onSubmit={(e) => {
props.setIsVerifyModal(false);
props.handleVerifyEmail(e);
}}
>
<div className="px-6 py-3 text-base-content">
<label className="mb-2">{t("enter-otp")}</label>
<input
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
type="tel"
pattern="[0-9]{4}"
className="w-full op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content text-xs"
placeholder={t("otp-placeholder")}
value={props.otp}
onChange={(e) => props.setOtp(e.target.value)}
/>
</div>
<div className="px-6 my-3">
<button type="submit" className="op-btn op-btn-primary">
{t("verify")}
</button>
<button
className="op-btn op-btn-secondary ml-2"
onClick={(e) => props.handleResend(e)}
>
{t("resend")}
</button>
</div>
</form>
) : props.otpLoader ? (
<div className="h-[150px] flex items-center justify-center">
<Loader />
</div>
) : (
<div className="px-6 py-3 text-base-content">
<p className="mb-2 text-sm">{t("verify-email")}</p>
<div className="px-0 mt-3">
<button
className="op-btn op-btn-primary"
type="submit"
onClick={() => props.handleVerifyBtn()}
>
{t("send-otp")}
</button>
</div>
</div>
)}
</div>
</dialog>
);
}
export default VerifyEmail;

Some files were not shown because too many files have changed in this diff Show More