@voyant-travel/legal-react 0.119.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +66 -0
  3. package/dist/admin/contract-detail-host.d.ts +21 -0
  4. package/dist/admin/contract-detail-host.d.ts.map +1 -0
  5. package/dist/admin/contract-detail-host.js +118 -0
  6. package/dist/admin/contract-dialog-fields.d.ts +79 -0
  7. package/dist/admin/contract-dialog-fields.d.ts.map +1 -0
  8. package/dist/admin/contract-dialog-fields.js +178 -0
  9. package/dist/admin/contract-dialog.d.ts +4 -0
  10. package/dist/admin/contract-dialog.d.ts.map +1 -0
  11. package/dist/admin/contract-dialog.js +479 -0
  12. package/dist/admin/contract-upload-field.d.ts +12 -0
  13. package/dist/admin/contract-upload-field.d.ts.map +1 -0
  14. package/dist/admin/contract-upload-field.js +31 -0
  15. package/dist/admin/contracts-host.d.ts +10 -0
  16. package/dist/admin/contracts-host.d.ts.map +1 -0
  17. package/dist/admin/contracts-host.js +32 -0
  18. package/dist/admin/index.d.ts +78 -0
  19. package/dist/admin/index.d.ts.map +1 -0
  20. package/dist/admin/index.js +193 -0
  21. package/dist/admin/legal-admin-shared.d.ts +31 -0
  22. package/dist/admin/legal-admin-shared.d.ts.map +1 -0
  23. package/dist/admin/legal-admin-shared.js +48 -0
  24. package/dist/admin/number-series-dialog.d.ts +11 -0
  25. package/dist/admin/number-series-dialog.d.ts.map +1 -0
  26. package/dist/admin/number-series-dialog.js +110 -0
  27. package/dist/admin/number-series-host.d.ts +7 -0
  28. package/dist/admin/number-series-host.d.ts.map +1 -0
  29. package/dist/admin/number-series-host.js +12 -0
  30. package/dist/admin/pages/contract-detail-page.d.ts +7 -0
  31. package/dist/admin/pages/contract-detail-page.d.ts.map +1 -0
  32. package/dist/admin/pages/contract-detail-page.js +9 -0
  33. package/dist/admin/pages/policy-detail-page.d.ts +7 -0
  34. package/dist/admin/pages/policy-detail-page.d.ts.map +1 -0
  35. package/dist/admin/pages/policy-detail-page.js +9 -0
  36. package/dist/admin/pages/template-detail-page.d.ts +7 -0
  37. package/dist/admin/pages/template-detail-page.d.ts.map +1 -0
  38. package/dist/admin/pages/template-detail-page.js +9 -0
  39. package/dist/admin/policies-host.d.ts +9 -0
  40. package/dist/admin/policies-host.d.ts.map +1 -0
  41. package/dist/admin/policies-host.js +16 -0
  42. package/dist/admin/policy-assignment-dialog.d.ts +11 -0
  43. package/dist/admin/policy-assignment-dialog.d.ts.map +1 -0
  44. package/dist/admin/policy-assignment-dialog.js +234 -0
  45. package/dist/admin/policy-detail-host.d.ts +12 -0
  46. package/dist/admin/policy-detail-host.d.ts.map +1 -0
  47. package/dist/admin/policy-detail-host.js +17 -0
  48. package/dist/admin/policy-dialog.d.ts +10 -0
  49. package/dist/admin/policy-dialog.d.ts.map +1 -0
  50. package/dist/admin/policy-dialog.js +81 -0
  51. package/dist/admin/template-detail-host.d.ts +11 -0
  52. package/dist/admin/template-detail-host.d.ts.map +1 -0
  53. package/dist/admin/template-detail-host.js +20 -0
  54. package/dist/admin/template-dialog.d.ts +10 -0
  55. package/dist/admin/template-dialog.d.ts.map +1 -0
  56. package/dist/admin/template-dialog.js +117 -0
  57. package/dist/admin/template-version-dialog.d.ts +9 -0
  58. package/dist/admin/template-version-dialog.d.ts.map +1 -0
  59. package/dist/admin/template-version-dialog.js +67 -0
  60. package/dist/admin/templates-host.d.ts +9 -0
  61. package/dist/admin/templates-host.d.ts.map +1 -0
  62. package/dist/admin/templates-host.js +20 -0
  63. package/dist/client.d.ts +14 -0
  64. package/dist/client.d.ts.map +1 -0
  65. package/dist/client.js +69 -0
  66. package/dist/components/attachment-dialog.d.ts +11 -0
  67. package/dist/components/attachment-dialog.d.ts.map +1 -0
  68. package/dist/components/attachment-dialog.js +154 -0
  69. package/dist/components/booking-contract-card.d.ts +37 -0
  70. package/dist/components/booking-contract-card.d.ts.map +1 -0
  71. package/dist/components/booking-contract-card.js +101 -0
  72. package/dist/components/contract-detail-page.d.ts +36 -0
  73. package/dist/components/contract-detail-page.d.ts.map +1 -0
  74. package/dist/components/contract-detail-page.js +156 -0
  75. package/dist/components/contract-dialog-fields.d.ts +114 -0
  76. package/dist/components/contract-dialog-fields.d.ts.map +1 -0
  77. package/dist/components/contract-dialog-fields.js +233 -0
  78. package/dist/components/contract-dialog.d.ts +5 -0
  79. package/dist/components/contract-dialog.d.ts.map +1 -0
  80. package/dist/components/contract-dialog.js +345 -0
  81. package/dist/components/contract-send-dialog.d.ts +37 -0
  82. package/dist/components/contract-send-dialog.d.ts.map +1 -0
  83. package/dist/components/contract-send-dialog.js +56 -0
  84. package/dist/components/contracts-page.d.ts +30 -0
  85. package/dist/components/contracts-page.d.ts.map +1 -0
  86. package/dist/components/contracts-page.js +192 -0
  87. package/dist/components/number-series-page.d.ts +13 -0
  88. package/dist/components/number-series-page.d.ts.map +1 -0
  89. package/dist/components/number-series-page.js +37 -0
  90. package/dist/components/policies-page.d.ts +13 -0
  91. package/dist/components/policies-page.d.ts.map +1 -0
  92. package/dist/components/policies-page.js +70 -0
  93. package/dist/components/policy-detail-page.d.ts +23 -0
  94. package/dist/components/policy-detail-page.d.ts.map +1 -0
  95. package/dist/components/policy-detail-page.js +171 -0
  96. package/dist/components/policy-rule-dialog.d.ts +12 -0
  97. package/dist/components/policy-rule-dialog.d.ts.map +1 -0
  98. package/dist/components/policy-rule-dialog.js +101 -0
  99. package/dist/components/policy-version-dialog.d.ts +11 -0
  100. package/dist/components/policy-version-dialog.d.ts.map +1 -0
  101. package/dist/components/policy-version-dialog.js +62 -0
  102. package/dist/components/signature-dialog.d.ts +9 -0
  103. package/dist/components/signature-dialog.d.ts.map +1 -0
  104. package/dist/components/signature-dialog.js +64 -0
  105. package/dist/components/template-detail-page.d.ts +10 -0
  106. package/dist/components/template-detail-page.d.ts.map +1 -0
  107. package/dist/components/template-detail-page.js +84 -0
  108. package/dist/components/templates-page.d.ts +27 -0
  109. package/dist/components/templates-page.d.ts.map +1 -0
  110. package/dist/components/templates-page.js +65 -0
  111. package/dist/hooks/index.d.ts +31 -0
  112. package/dist/hooks/index.d.ts.map +1 -0
  113. package/dist/hooks/index.js +30 -0
  114. package/dist/hooks/use-contract-attachment-mutation.d.ts +119 -0
  115. package/dist/hooks/use-contract-attachment-mutation.d.ts.map +1 -0
  116. package/dist/hooks/use-contract-attachment-mutation.js +72 -0
  117. package/dist/hooks/use-contract-attachments.d.ts +23 -0
  118. package/dist/hooks/use-contract-attachments.d.ts.map +1 -0
  119. package/dist/hooks/use-contract-attachments.js +12 -0
  120. package/dist/hooks/use-contract-mutation.d.ts +427 -0
  121. package/dist/hooks/use-contract-mutation.d.ts.map +1 -0
  122. package/dist/hooks/use-contract-mutation.js +151 -0
  123. package/dist/hooks/use-contract-signature-mutation.d.ts +35 -0
  124. package/dist/hooks/use-contract-signature-mutation.d.ts.map +1 -0
  125. package/dist/hooks/use-contract-signature-mutation.js +23 -0
  126. package/dist/hooks/use-contract-signatures.d.ts +28 -0
  127. package/dist/hooks/use-contract-signatures.d.ts.map +1 -0
  128. package/dist/hooks/use-contract-signatures.js +12 -0
  129. package/dist/hooks/use-contract-template-authoring.d.ts +5 -0
  130. package/dist/hooks/use-contract-template-authoring.d.ts.map +1 -0
  131. package/dist/hooks/use-contract-template-authoring.js +7 -0
  132. package/dist/hooks/use-contract-template-mutation.d.ts +56 -0
  133. package/dist/hooks/use-contract-template-mutation.d.ts.map +1 -0
  134. package/dist/hooks/use-contract-template-mutation.js +39 -0
  135. package/dist/hooks/use-contract-template-version-mutation.d.ts +22 -0
  136. package/dist/hooks/use-contract-template-version-mutation.d.ts.map +1 -0
  137. package/dist/hooks/use-contract-template-version-mutation.js +22 -0
  138. package/dist/hooks/use-contract-template-versions.d.ts +15 -0
  139. package/dist/hooks/use-contract-template-versions.d.ts.map +1 -0
  140. package/dist/hooks/use-contract-template-versions.js +12 -0
  141. package/dist/hooks/use-contract-template.d.ts +20 -0
  142. package/dist/hooks/use-contract-template.d.ts.map +1 -0
  143. package/dist/hooks/use-contract-template.js +12 -0
  144. package/dist/hooks/use-contract-templates.d.ts +26 -0
  145. package/dist/hooks/use-contract-templates.d.ts.map +1 -0
  146. package/dist/hooks/use-contract-templates.js +12 -0
  147. package/dist/hooks/use-contract.d.ts +47 -0
  148. package/dist/hooks/use-contract.d.ts.map +1 -0
  149. package/dist/hooks/use-contract.js +12 -0
  150. package/dist/hooks/use-contracts.d.ts +53 -0
  151. package/dist/hooks/use-contracts.d.ts.map +1 -0
  152. package/dist/hooks/use-contracts.js +12 -0
  153. package/dist/hooks/use-default-contract-template.d.ts +21 -0
  154. package/dist/hooks/use-default-contract-template.d.ts.map +1 -0
  155. package/dist/hooks/use-default-contract-template.js +12 -0
  156. package/dist/hooks/use-evaluate-cancellation.d.ts +46 -0
  157. package/dist/hooks/use-evaluate-cancellation.d.ts.map +1 -0
  158. package/dist/hooks/use-evaluate-cancellation.js +43 -0
  159. package/dist/hooks/use-number-series-mutation.d.ts +58 -0
  160. package/dist/hooks/use-number-series-mutation.d.ts.map +1 -0
  161. package/dist/hooks/use-number-series-mutation.js +38 -0
  162. package/dist/hooks/use-number-series.d.ts +24 -0
  163. package/dist/hooks/use-number-series.d.ts.map +1 -0
  164. package/dist/hooks/use-number-series.js +12 -0
  165. package/dist/hooks/use-policies.d.ts +22 -0
  166. package/dist/hooks/use-policies.d.ts.map +1 -0
  167. package/dist/hooks/use-policies.js +12 -0
  168. package/dist/hooks/use-policy-acceptances.d.ts +26 -0
  169. package/dist/hooks/use-policy-acceptances.d.ts.map +1 -0
  170. package/dist/hooks/use-policy-acceptances.js +12 -0
  171. package/dist/hooks/use-policy-assignment-mutation.d.ts +63 -0
  172. package/dist/hooks/use-policy-assignment-mutation.d.ts.map +1 -0
  173. package/dist/hooks/use-policy-assignment-mutation.js +41 -0
  174. package/dist/hooks/use-policy-assignments.d.ts +23 -0
  175. package/dist/hooks/use-policy-assignments.d.ts.map +1 -0
  176. package/dist/hooks/use-policy-assignments.js +12 -0
  177. package/dist/hooks/use-policy-mutation.d.ts +44 -0
  178. package/dist/hooks/use-policy-mutation.d.ts.map +1 -0
  179. package/dist/hooks/use-policy-mutation.js +40 -0
  180. package/dist/hooks/use-policy-rule-mutation.d.ts +56 -0
  181. package/dist/hooks/use-policy-rule-mutation.d.ts.map +1 -0
  182. package/dist/hooks/use-policy-rule-mutation.js +39 -0
  183. package/dist/hooks/use-policy-rules.d.ts +22 -0
  184. package/dist/hooks/use-policy-rules.d.ts.map +1 -0
  185. package/dist/hooks/use-policy-rules.js +12 -0
  186. package/dist/hooks/use-policy-version-mutation.d.ts +69 -0
  187. package/dist/hooks/use-policy-version-mutation.d.ts.map +1 -0
  188. package/dist/hooks/use-policy-version-mutation.js +50 -0
  189. package/dist/hooks/use-policy-versions.d.ts +19 -0
  190. package/dist/hooks/use-policy-versions.d.ts.map +1 -0
  191. package/dist/hooks/use-policy-versions.js +12 -0
  192. package/dist/hooks/use-policy.d.ts +16 -0
  193. package/dist/hooks/use-policy.d.ts.map +1 -0
  194. package/dist/hooks/use-policy.js +12 -0
  195. package/dist/hooks/use-resolve-policy.d.ts +72 -0
  196. package/dist/hooks/use-resolve-policy.d.ts.map +1 -0
  197. package/dist/hooks/use-resolve-policy.js +16 -0
  198. package/dist/hooks/use-term.d.ts +27 -0
  199. package/dist/hooks/use-term.d.ts.map +1 -0
  200. package/dist/hooks/use-term.js +12 -0
  201. package/dist/hooks/use-terms.d.ts +33 -0
  202. package/dist/hooks/use-terms.d.ts.map +1 -0
  203. package/dist/hooks/use-terms.js +12 -0
  204. package/dist/i18n/en.d.ts +548 -0
  205. package/dist/i18n/en.d.ts.map +1 -0
  206. package/dist/i18n/en.js +547 -0
  207. package/dist/i18n/index.d.ts +6 -0
  208. package/dist/i18n/index.d.ts.map +1 -0
  209. package/dist/i18n/index.js +4 -0
  210. package/dist/i18n/messages.d.ts +504 -0
  211. package/dist/i18n/messages.d.ts.map +1 -0
  212. package/dist/i18n/messages.js +29 -0
  213. package/dist/i18n/provider.d.ts +1118 -0
  214. package/dist/i18n/provider.d.ts.map +1 -0
  215. package/dist/i18n/provider.js +44 -0
  216. package/dist/i18n/ro.d.ts +548 -0
  217. package/dist/i18n/ro.d.ts.map +1 -0
  218. package/dist/i18n/ro.js +547 -0
  219. package/dist/index.d.ts +7 -0
  220. package/dist/index.d.ts.map +1 -0
  221. package/dist/index.js +6 -0
  222. package/dist/provider.d.ts +2 -0
  223. package/dist/provider.d.ts.map +1 -0
  224. package/dist/provider.js +1 -0
  225. package/dist/query-keys.d.ts +120 -0
  226. package/dist/query-keys.d.ts.map +1 -0
  227. package/dist/query-keys.js +27 -0
  228. package/dist/query-options.d.ts +1929 -0
  229. package/dist/query-options.d.ts.map +1 -0
  230. package/dist/query-options.js +183 -0
  231. package/dist/schemas.d.ts +1547 -0
  232. package/dist/schemas.d.ts.map +1 -0
  233. package/dist/schemas.js +269 -0
  234. package/dist/ui.d.ts +16 -0
  235. package/dist/ui.d.ts.map +1 -0
  236. package/dist/ui.js +15 -0
  237. package/package.json +159 -0
  238. package/src/styles.css +11 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may accept and charge a
167
+ fee for, the acceptance of support, warranty, indemnity, or
168
+ other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 PixelMakers Studio SRL
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # @voyant-travel/legal-react
2
+
3
+ The legal client tier: headless data hooks/clients plus the styled UI
4
+ components and page-level compositions (formerly `@voyant-travel/legal-ui`).
5
+
6
+ Headless consumers (storefronts, portals) import from the root, `./hooks`,
7
+ `./client`, or `./query-keys` — these pull no styling peers. Styled surfaces
8
+ live under `./ui`, `./components/*`, `./admin`, `./i18n`, and `./styles.css`,
9
+ whose heavier peers (`@voyant-travel/ui`, `@voyant-travel/admin`, `react-hook-form`, and
10
+ the other modules' `*-react`/`*-ui` packages) are optional and only needed
11
+ when you import those subpaths.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ pnpm add @voyant-travel/legal-react @voyant-travel/ui @tanstack/react-query react react-dom
17
+ ```
18
+
19
+ `@voyant-travel/ui` provides the design-system primitives for the styled subpaths.
20
+ The data-layer hooks ship from this package's root.
21
+
22
+ All components accept a `className` prop and merge it with `cn()`. Wrap or compose to extend; use the registry copy-paste path (`npx shadcn add @voyant/...`) for components you want to fork outright.
23
+
24
+ ## Detail Tab Replacement Slots
25
+
26
+ `ContractDetailPage` exposes `slots` for replacing built-in tab content while
27
+ keeping the default tab navigation. Use `detailsContent`, `partiesContent`,
28
+ `signaturesContent`, or `documentsContent` when an app needs custom inline
29
+ management controls instead of the shipped read-only table.
30
+
31
+ ## Contract Dialog
32
+
33
+ `ContractDialog` provides the default create/edit form for `ContractsPage` and
34
+ `ContractDetailPage`. It owns contract setup, template and version selection,
35
+ number series, expiry, template variables, additional variables, metadata, and
36
+ submit wiring. Linked record pickers stay optional render props so apps can
37
+ wire CRM, supplier, or distribution selectors without the styled tier taking
38
+ those runtime dependencies.
39
+
40
+ ```tsx
41
+ import { ContractDialog, ContractsPage } from "@voyant-travel/legal-react/ui"
42
+
43
+ <ContractsPage
44
+ renderContractDialog={(props) => (
45
+ <ContractDialog
46
+ {...props}
47
+ renderPersonPicker={(pickerProps) => <PersonPicker {...pickerProps} />}
48
+ renderOrganizationPicker={(pickerProps) => <OrganizationPicker {...pickerProps} />}
49
+ />
50
+ )}
51
+ />
52
+ ```
53
+
54
+ ## I18n
55
+
56
+ Components render English by default. To localize them, wrap your UI in
57
+ `LegalUiMessagesProvider` and import only the locales your app supports.
58
+
59
+ ```tsx
60
+ import { LegalUiMessagesProvider } from "@voyant-travel/legal-react/ui"
61
+ import { legalUiEn } from "@voyant-travel/legal-react/i18n/en"
62
+ import { legalUiRo } from "@voyant-travel/legal-react/i18n/ro"
63
+ ```
64
+
65
+ English-only apps should import only `./i18n/en`. Bilingual apps can import
66
+ `./i18n/en` and `./i18n/ro`.
@@ -0,0 +1,21 @@
1
+ export interface ContractDetailHostProps {
2
+ id: string;
3
+ }
4
+ /**
5
+ * Packaged admin host for the operator-grade contract detail page
6
+ * (packaged-admin RFC Phase 3). Owns everything package-clean:
7
+ *
8
+ * - Data access through `@voyant-travel/legal-react` / `@voyant-travel/relationships-react` /
9
+ * `@voyant-travel/bookings-react` hooks (shared Voyant provider context — no
10
+ * app RPC client).
11
+ * - Admin chrome breadcrumbs (`Legal › Contracts › <number-or-title>`)
12
+ * with hrefs resolved through the `legal.home` / `contract.list`
13
+ * semantic destinations.
14
+ * - Reference cells (person, booking, template version, number series)
15
+ * resolve operator-friendly labels; person/booking link through the
16
+ * `person.detail` / `booking.detail` destinations.
17
+ * - The attachment download href is built from the shared legal provider
18
+ * context's `baseUrl` instead of a host env helper.
19
+ */
20
+ export declare function ContractDetailHost({ id }: ContractDetailHostProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=contract-detail-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-detail-host.d.ts","sourceRoot":"","sources":["../../src/admin/contract-detail-host.tsx"],"names":[],"mappings":"AAuBA,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;CACX;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,EAAE,EAAE,uBAAuB,2CAqCjE"}
@@ -0,0 +1,118 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useAdminBreadcrumbs, useAdminHref, useAdminNavigate, useOperatorAdminMessages, } from "@voyant-travel/admin";
4
+ import { useBooking } from "@voyant-travel/bookings-react";
5
+ import { usePerson } from "@voyant-travel/relationships-react";
6
+ import { ContractDetailPage, } from "../components/contract-detail-page.js";
7
+ import { useLegalContract, useLegalContractNumberSeries, useLegalContractTemplates, useVoyantLegalContext, } from "../index.js";
8
+ import { ContractDialog } from "./contract-dialog.js";
9
+ /**
10
+ * Packaged admin host for the operator-grade contract detail page
11
+ * (packaged-admin RFC Phase 3). Owns everything package-clean:
12
+ *
13
+ * - Data access through `@voyant-travel/legal-react` / `@voyant-travel/relationships-react` /
14
+ * `@voyant-travel/bookings-react` hooks (shared Voyant provider context — no
15
+ * app RPC client).
16
+ * - Admin chrome breadcrumbs (`Legal › Contracts › <number-or-title>`)
17
+ * with hrefs resolved through the `legal.home` / `contract.list`
18
+ * semantic destinations.
19
+ * - Reference cells (person, booking, template version, number series)
20
+ * resolve operator-friendly labels; person/booking link through the
21
+ * `person.detail` / `booking.detail` destinations.
22
+ * - The attachment download href is built from the shared legal provider
23
+ * context's `baseUrl` instead of a host env helper.
24
+ */
25
+ export function ContractDetailHost({ id }) {
26
+ const messages = useOperatorAdminMessages();
27
+ const resolveHref = useAdminHref();
28
+ const { baseUrl } = useVoyantLegalContext();
29
+ // Hook into the admin breadcrumb chain so the contract detail page
30
+ // shows `Legal › Contracts › <number-or-title>` instead of just
31
+ // "Contracts". The contract is already in the query cache thanks to
32
+ // the route loader so this is a free read.
33
+ const { data: contract } = useLegalContract(id);
34
+ const trailLabel = contract?.contractNumber ?? contract?.title ?? `Contract ${id.slice(-8)}`;
35
+ useAdminBreadcrumbs([
36
+ { label: messages.nav.legal, href: resolveHref("legal.home", {}) },
37
+ { label: messages.nav.contracts, href: resolveHref("contract.list", {}) },
38
+ { label: trailLabel },
39
+ ]);
40
+ // Resolve the customer's email so the Send-contract dialog can
41
+ // prefill the recipient. The contract's linked person is the
42
+ // canonical billing contact; we read the hydrated `email` column
43
+ // (sourced from `identity_contact_points` via the person_directory
44
+ // view) rather than walking identity directly.
45
+ const { data: person } = usePerson(contract?.personId ?? undefined, {
46
+ enabled: Boolean(contract?.personId),
47
+ });
48
+ return (_jsx(ContractDetailPage, { id: id, renderContractDialog: (props) => _jsx(ContractDialog, { ...props }), getAttachmentDownloadHref: (attachment) => `${baseUrl}/v1/admin/legal/contracts/attachments/${attachment.id}/download`, resolveSendRecipientEmail: () => person?.email ?? null, renderReference: (props) => _jsx(ContractReferenceCell, { ...props }) }));
49
+ }
50
+ /**
51
+ * Resolve a contract's reference ids (person, booking, template
52
+ * version, series, …) into operator-friendly labels — names + links
53
+ * where it makes sense. The links resolve through semantic destinations
54
+ * (RFC §4.7), keeping this host free of any app route-tree import.
55
+ */
56
+ function ContractReferenceCell({ kind, id }) {
57
+ switch (kind) {
58
+ case "person":
59
+ return _jsx(PersonReference, { personId: id });
60
+ case "booking":
61
+ return _jsx(BookingReference, { bookingId: id });
62
+ case "templateVersion":
63
+ return _jsx(TemplateVersionReference, { templateVersionId: id });
64
+ case "series":
65
+ return _jsx(SeriesReference, { seriesId: id });
66
+ default:
67
+ // Org / supplier / channel / order — no dedicated resolver yet,
68
+ // so fall through to the raw id. Wiring those when their detail
69
+ // pages land in the operator starter.
70
+ return _jsx("span", { className: "font-mono text-xs", children: id });
71
+ }
72
+ }
73
+ /** SPA-friendly destination link: real href for a11y, router navigate on click. */
74
+ function DestinationLink({ href, onNavigate, children, }) {
75
+ const handleClick = (event) => {
76
+ if (event.defaultPrevented || event.metaKey || event.ctrlKey || event.shiftKey)
77
+ return;
78
+ event.preventDefault();
79
+ onNavigate();
80
+ };
81
+ return (_jsx("a", { href: href, onClick: handleClick, className: "text-primary hover:underline", children: children }));
82
+ }
83
+ function PersonReference({ personId }) {
84
+ const resolveHref = useAdminHref();
85
+ const navigateTo = useAdminNavigate();
86
+ const { data } = usePerson(personId);
87
+ const label = data && (data.firstName || data.lastName)
88
+ ? [data.firstName, data.lastName].filter(Boolean).join(" ").trim()
89
+ : (data?.email ?? personId);
90
+ return (_jsx(DestinationLink, { href: resolveHref("person.detail", { personId }), onNavigate: () => navigateTo("person.detail", { personId }), children: label }));
91
+ }
92
+ function BookingReference({ bookingId }) {
93
+ const resolveHref = useAdminHref();
94
+ const navigateTo = useAdminNavigate();
95
+ const { data } = useBooking(bookingId);
96
+ const label = data?.data?.bookingNumber ?? bookingId;
97
+ return (_jsx(DestinationLink, { href: resolveHref("booking.detail", { bookingId }), onNavigate: () => navigateTo("booking.detail", { bookingId }), children: label }));
98
+ }
99
+ function TemplateVersionReference({ templateVersionId }) {
100
+ // Match the version id against each template's `currentVersionId`.
101
+ // It's the common path (auto-gen + storefront both stamp the current
102
+ // pointer); for archived versions there's no admin endpoint that
103
+ // takes a version id directly today, so we fall back to the raw id.
104
+ const { data } = useLegalContractTemplates({ limit: 50 });
105
+ const match = data?.data?.find((t) => t.currentVersionId === templateVersionId);
106
+ if (!match) {
107
+ return _jsx("span", { className: "font-mono text-xs", children: templateVersionId });
108
+ }
109
+ return _jsx("span", { children: match.name });
110
+ }
111
+ function SeriesReference({ seriesId }) {
112
+ const { data } = useLegalContractNumberSeries({ limit: 50 });
113
+ const match = data?.data?.find((s) => s.id === seriesId);
114
+ if (!match) {
115
+ return _jsx("span", { className: "font-mono text-xs", children: seriesId });
116
+ }
117
+ return (_jsxs("span", { children: [match.name, match.prefix ? (_jsxs("span", { className: "ml-1.5 text-muted-foreground text-xs", children: ["(", match.prefix, ")"] })) : null] }));
118
+ }
@@ -0,0 +1,79 @@
1
+ import type { useOperatorAdminMessages } from "@voyant-travel/admin";
2
+ import type { UseFormSetValue, UseFormWatch } from "react-hook-form";
3
+ import { z } from "zod/v4";
4
+ import type { LegalContractRecord } from "../index.js";
5
+ import type { ComboboxOption } from "./legal-admin-shared.js";
6
+ type ContractDialogMessages = ReturnType<typeof useOperatorAdminMessages>["legal"]["contractDialog"];
7
+ export declare const contractFormSchema: z.ZodObject<{
8
+ scope: z.ZodEnum<{
9
+ customer: "customer";
10
+ partner: "partner";
11
+ supplier: "supplier";
12
+ other: "other";
13
+ channel: "channel";
14
+ }>;
15
+ title: z.ZodString;
16
+ contractNumber: z.ZodOptional<z.ZodString>;
17
+ language: z.ZodOptional<z.ZodString>;
18
+ templateVersionId: z.ZodOptional<z.ZodString>;
19
+ seriesId: z.ZodOptional<z.ZodString>;
20
+ personId: z.ZodOptional<z.ZodString>;
21
+ organizationId: z.ZodOptional<z.ZodString>;
22
+ supplierId: z.ZodOptional<z.ZodString>;
23
+ channelId: z.ZodOptional<z.ZodString>;
24
+ expiresAt: z.ZodOptional<z.ZodString>;
25
+ templateVariables: z.ZodArray<z.ZodObject<{
26
+ key: z.ZodString;
27
+ label: z.ZodString;
28
+ type: z.ZodString;
29
+ description: z.ZodOptional<z.ZodString>;
30
+ example: z.ZodOptional<z.ZodString>;
31
+ required: z.ZodDefault<z.ZodBoolean>;
32
+ value: z.ZodOptional<z.ZodString>;
33
+ booleanValue: z.ZodDefault<z.ZodBoolean>;
34
+ }, z.core.$strip>>;
35
+ additionalVariables: z.ZodArray<z.ZodObject<{
36
+ key: z.ZodOptional<z.ZodString>;
37
+ value: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>>;
39
+ metadataEntries: z.ZodArray<z.ZodObject<{
40
+ key: z.ZodOptional<z.ZodString>;
41
+ value: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strip>>;
43
+ }, z.core.$strip>;
44
+ export type FormValues = z.input<typeof contractFormSchema>;
45
+ export type FormOutput = z.output<typeof contractFormSchema>;
46
+ export interface ContractDialogProps {
47
+ open: boolean;
48
+ onOpenChange: (open: boolean) => void;
49
+ contract?: LegalContractRecord;
50
+ onSuccess: () => void;
51
+ }
52
+ export type TemplateVariableRow = FormValues["templateVariables"][number];
53
+ export declare const SCOPE_VALUES: readonly ["customer", "supplier", "partner", "channel", "other"];
54
+ export type ContractScopeKey = (typeof SCOPE_VALUES)[number];
55
+ export declare const languageOptions: ComboboxOption[];
56
+ export declare function objectToEntries(record: Record<string, unknown> | null | undefined): {
57
+ key: string;
58
+ value: string;
59
+ }[];
60
+ export declare function parseLooseValue(value: string): any;
61
+ export declare function buildRecordFromPairs(entries: Array<{
62
+ key?: string;
63
+ value?: string;
64
+ }>): Record<string, unknown> | undefined;
65
+ export declare function buildVariablesPayload(rows: TemplateVariableRow[], additional: Array<{
66
+ key?: string;
67
+ value?: string;
68
+ }>): Record<string, unknown> | undefined;
69
+ export declare function formatUploadSize(bytes: number): string;
70
+ export declare function inferTemplateVariableKeys(body: string | null | undefined, requiredKeys: string[]): Set<string>;
71
+ export declare function VariableValueField({ row, index, setValue, watch, messages, }: {
72
+ row: TemplateVariableRow;
73
+ index: number;
74
+ setValue: UseFormSetValue<FormValues>;
75
+ watch: UseFormWatch<FormValues>;
76
+ messages: ContractDialogMessages;
77
+ }): import("react/jsx-runtime").JSX.Element;
78
+ export {};
79
+ //# sourceMappingURL=contract-dialog-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-dialog-fields.d.ts","sourceRoot":"","sources":["../../src/admin/contract-dialog-fields.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAIpE,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAAA;AAEpG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoC7B,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAC3D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE5D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzE,eAAO,MAAM,YAAY,kEAAmE,CAAA;AAC5F,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAI5D,eAAO,MAAM,eAAe,EAAE,cAAc,EAmBvC,CAAA;AAEL,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS;;;IAUjF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,OAiB5C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,KAAK,CAAC;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,uCAUpF;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,mBAAmB,EAAE,EAC3B,UAAU,EAAE,KAAK,CAAC;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,uCAuBpD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,eAUhG;AAED,wBAAgB,kBAAkB,CAAC,EACjC,GAAG,EACH,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,GACT,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,KAAK,EAAE,YAAY,CAAC,UAAU,CAAC,CAAA;IAC/B,QAAQ,EAAE,sBAAsB,CAAA;CACjC,2CAgFA"}