umwd-components 0.1.827 → 0.1.828

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 (440) hide show
  1. package/dist/cjs/node_modules/object-assign/index.js +2 -2
  2. package/dist/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  3. package/dist/cjs/node_modules/prop-types/index.js +1 -1
  4. package/dist/cjs/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  5. package/dist/cjs/node_modules/safe-buffer/index.js +1 -1
  6. package/dist/cjs/src/components/e-commerce/products/EditReturnStockForm.js +1 -1
  7. package/dist/cjs/src/components/logistics/report/ReportMakingComponent.js +1 -1
  8. package/dist/cjs/src/components/logistics/vendor/EditVendorForm.js +1 -1
  9. package/dist/cjs/src/data/actions/logistics/note/createNoteAction.js +1 -1
  10. package/dist/cjs/src/data/actions/logistics/report/createReportAction.js +1 -1
  11. package/dist/cjs/src/index.js +1 -1
  12. package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
  13. package/dist/esm/_virtual/index2.js +2 -2
  14. package/dist/esm/_virtual/index3.js +2 -2
  15. package/dist/esm/_virtual/index4.js +2 -2
  16. package/dist/esm/node_modules/object-assign/index.js +74 -69
  17. package/dist/esm/node_modules/prop-types/factoryWithTypeCheckers.js +2 -2
  18. package/dist/esm/node_modules/prop-types/index.js +1 -1
  19. package/dist/esm/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  20. package/dist/esm/node_modules/safe-buffer/index.js +1 -1
  21. package/dist/esm/src/components/e-commerce/products/EditReturnStockForm.js +11 -22
  22. package/dist/esm/src/components/logistics/report/ReportMakingComponent.js +0 -1
  23. package/dist/esm/src/components/logistics/vendor/EditVendorForm.js +0 -1
  24. package/dist/esm/src/data/actions/logistics/note/createNoteAction.js +0 -2
  25. package/dist/esm/src/data/actions/logistics/report/createReportAction.js +0 -2
  26. package/dist/esm/src/index.js +0 -1
  27. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  28. package/dist/esm/types/data/actions/e-commerce/lead/contactFormAction.d.ts +1 -0
  29. package/dist/esm/types/index.d.ts +0 -3
  30. package/package.json +1 -1
  31. package/dist/cjs/_virtual/_commonjs-dynamic-modules.js +0 -6
  32. package/dist/cjs/_virtual/aes.js +0 -6
  33. package/dist/cjs/_virtual/b64.js +0 -6
  34. package/dist/cjs/_virtual/blowfish.js +0 -6
  35. package/dist/cjs/_virtual/cipher-core.js +0 -6
  36. package/dist/cjs/_virtual/clone.js +0 -6
  37. package/dist/cjs/_virtual/common.js +0 -6
  38. package/dist/cjs/_virtual/context.js +0 -6
  39. package/dist/cjs/_virtual/core2.js +0 -6
  40. package/dist/cjs/_virtual/decode.js +0 -6
  41. package/dist/cjs/_virtual/deflate.js +0 -6
  42. package/dist/cjs/_virtual/dictionary-browser.js +0 -6
  43. package/dist/cjs/_virtual/dictionary.js +0 -6
  44. package/dist/cjs/_virtual/en-us.js +0 -6
  45. package/dist/cjs/_virtual/enc-base64.js +0 -6
  46. package/dist/cjs/_virtual/enc-base64url.js +0 -6
  47. package/dist/cjs/_virtual/enc-utf16.js +0 -6
  48. package/dist/cjs/_virtual/events.js +0 -6
  49. package/dist/cjs/_virtual/evpkdf.js +0 -6
  50. package/dist/cjs/_virtual/format-hex.js +0 -6
  51. package/dist/cjs/_virtual/hmac.js +0 -6
  52. package/dist/cjs/_virtual/huffman.js +0 -6
  53. package/dist/cjs/_virtual/hyphen.js +0 -6
  54. package/dist/cjs/_virtual/index10.js +0 -6
  55. package/dist/cjs/_virtual/index5.js +0 -6
  56. package/dist/cjs/_virtual/index6.js +0 -6
  57. package/dist/cjs/_virtual/index7.js +0 -6
  58. package/dist/cjs/_virtual/index8.js +0 -6
  59. package/dist/cjs/_virtual/index9.js +0 -6
  60. package/dist/cjs/_virtual/inflate.js +0 -6
  61. package/dist/cjs/_virtual/inherits_browser.js +0 -6
  62. package/dist/cjs/_virtual/lib-typedarrays.js +0 -6
  63. package/dist/cjs/_virtual/md5.js +0 -6
  64. package/dist/cjs/_virtual/mode-cfb.js +0 -6
  65. package/dist/cjs/_virtual/mode-ctr-gladman.js +0 -6
  66. package/dist/cjs/_virtual/mode-ctr.js +0 -6
  67. package/dist/cjs/_virtual/mode-ecb.js +0 -6
  68. package/dist/cjs/_virtual/mode-ofb.js +0 -6
  69. package/dist/cjs/_virtual/pad-ansix923.js +0 -6
  70. package/dist/cjs/_virtual/pad-iso10126.js +0 -6
  71. package/dist/cjs/_virtual/pad-iso97971.js +0 -6
  72. package/dist/cjs/_virtual/pad-nopadding.js +0 -6
  73. package/dist/cjs/_virtual/pad-zeropadding.js +0 -6
  74. package/dist/cjs/_virtual/pbkdf2.js +0 -6
  75. package/dist/cjs/_virtual/prefix.js +0 -6
  76. package/dist/cjs/_virtual/rabbit-legacy.js +0 -6
  77. package/dist/cjs/_virtual/rabbit.js +0 -6
  78. package/dist/cjs/_virtual/rc4.js +0 -6
  79. package/dist/cjs/_virtual/ripemd160.js +0 -6
  80. package/dist/cjs/_virtual/scheduler.development.js +0 -6
  81. package/dist/cjs/_virtual/scheduler.production.js +0 -6
  82. package/dist/cjs/_virtual/sha1.js +0 -6
  83. package/dist/cjs/_virtual/sha224.js +0 -6
  84. package/dist/cjs/_virtual/sha256.js +0 -6
  85. package/dist/cjs/_virtual/sha3.js +0 -6
  86. package/dist/cjs/_virtual/sha384.js +0 -6
  87. package/dist/cjs/_virtual/sha512.js +0 -6
  88. package/dist/cjs/_virtual/streams.js +0 -6
  89. package/dist/cjs/_virtual/transform.js +0 -6
  90. package/dist/cjs/_virtual/trees.js +0 -6
  91. package/dist/cjs/_virtual/tripledes.js +0 -6
  92. package/dist/cjs/_virtual/x64-core.js +0 -6
  93. package/dist/cjs/node_modules/@react-pdf/fns/lib/index.js +0 -6
  94. package/dist/cjs/node_modules/@react-pdf/font/lib/index.browser.js +0 -6
  95. package/dist/cjs/node_modules/@react-pdf/image/lib/index.browser.js +0 -6
  96. package/dist/cjs/node_modules/@react-pdf/layout/lib/index.js +0 -6
  97. package/dist/cjs/node_modules/@react-pdf/pdfkit/lib/pdfkit.browser.js +0 -6
  98. package/dist/cjs/node_modules/@react-pdf/png-js/lib/png-js.browser.js +0 -6
  99. package/dist/cjs/node_modules/@react-pdf/primitives/lib/index.js +0 -6
  100. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/index.js +0 -6
  101. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/reconciler-23.js +0 -14
  102. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/reconciler-31.js +0 -26
  103. package/dist/cjs/node_modules/@react-pdf/render/lib/index.js +0 -6
  104. package/dist/cjs/node_modules/@react-pdf/renderer/lib/react-pdf.browser.js +0 -6
  105. package/dist/cjs/node_modules/@react-pdf/stylesheet/lib/index.js +0 -6
  106. package/dist/cjs/node_modules/@react-pdf/textkit/lib/textkit.js +0 -13
  107. package/dist/cjs/node_modules/@swc/helpers/esm/_define_property.js +0 -6
  108. package/dist/cjs/node_modules/abs-svg-path/index.js +0 -6
  109. package/dist/cjs/node_modules/base64-js/index.js +0 -6
  110. package/dist/cjs/node_modules/bidi-js/dist/bidi.js +0 -6
  111. package/dist/cjs/node_modules/brotli/dec/bit_reader.js +0 -6
  112. package/dist/cjs/node_modules/brotli/dec/context.js +0 -6
  113. package/dist/cjs/node_modules/brotli/dec/decode.js +0 -6
  114. package/dist/cjs/node_modules/brotli/dec/dictionary-browser.js +0 -6
  115. package/dist/cjs/node_modules/brotli/dec/dictionary.bin.js +0 -6
  116. package/dist/cjs/node_modules/brotli/dec/dictionary.js +0 -6
  117. package/dist/cjs/node_modules/brotli/dec/huffman.js +0 -6
  118. package/dist/cjs/node_modules/brotli/dec/prefix.js +0 -6
  119. package/dist/cjs/node_modules/brotli/dec/streams.js +0 -6
  120. package/dist/cjs/node_modules/brotli/dec/transform.js +0 -6
  121. package/dist/cjs/node_modules/brotli/decompress.js +0 -6
  122. package/dist/cjs/node_modules/clone/clone.js +0 -6
  123. package/dist/cjs/node_modules/color-name/index.js +0 -6
  124. package/dist/cjs/node_modules/color-string/index.js +0 -6
  125. package/dist/cjs/node_modules/crypto-js/aes.js +0 -6
  126. package/dist/cjs/node_modules/crypto-js/blowfish.js +0 -6
  127. package/dist/cjs/node_modules/crypto-js/cipher-core.js +0 -6
  128. package/dist/cjs/node_modules/crypto-js/core.js +0 -6
  129. package/dist/cjs/node_modules/crypto-js/enc-base64.js +0 -6
  130. package/dist/cjs/node_modules/crypto-js/enc-base64url.js +0 -6
  131. package/dist/cjs/node_modules/crypto-js/enc-utf16.js +0 -6
  132. package/dist/cjs/node_modules/crypto-js/evpkdf.js +0 -6
  133. package/dist/cjs/node_modules/crypto-js/format-hex.js +0 -6
  134. package/dist/cjs/node_modules/crypto-js/hmac.js +0 -6
  135. package/dist/cjs/node_modules/crypto-js/index.js +0 -6
  136. package/dist/cjs/node_modules/crypto-js/lib-typedarrays.js +0 -6
  137. package/dist/cjs/node_modules/crypto-js/md5.js +0 -6
  138. package/dist/cjs/node_modules/crypto-js/mode-cfb.js +0 -6
  139. package/dist/cjs/node_modules/crypto-js/mode-ctr-gladman.js +0 -12
  140. package/dist/cjs/node_modules/crypto-js/mode-ctr.js +0 -6
  141. package/dist/cjs/node_modules/crypto-js/mode-ecb.js +0 -6
  142. package/dist/cjs/node_modules/crypto-js/mode-ofb.js +0 -6
  143. package/dist/cjs/node_modules/crypto-js/pad-ansix923.js +0 -6
  144. package/dist/cjs/node_modules/crypto-js/pad-iso10126.js +0 -6
  145. package/dist/cjs/node_modules/crypto-js/pad-iso97971.js +0 -6
  146. package/dist/cjs/node_modules/crypto-js/pad-nopadding.js +0 -6
  147. package/dist/cjs/node_modules/crypto-js/pad-zeropadding.js +0 -6
  148. package/dist/cjs/node_modules/crypto-js/pbkdf2.js +0 -6
  149. package/dist/cjs/node_modules/crypto-js/rabbit-legacy.js +0 -6
  150. package/dist/cjs/node_modules/crypto-js/rabbit.js +0 -6
  151. package/dist/cjs/node_modules/crypto-js/rc4.js +0 -6
  152. package/dist/cjs/node_modules/crypto-js/ripemd160.js +0 -17
  153. package/dist/cjs/node_modules/crypto-js/sha1.js +0 -6
  154. package/dist/cjs/node_modules/crypto-js/sha224.js +0 -6
  155. package/dist/cjs/node_modules/crypto-js/sha256.js +0 -6
  156. package/dist/cjs/node_modules/crypto-js/sha3.js +0 -6
  157. package/dist/cjs/node_modules/crypto-js/sha384.js +0 -6
  158. package/dist/cjs/node_modules/crypto-js/sha512.js +0 -6
  159. package/dist/cjs/node_modules/crypto-js/tripledes.js +0 -6
  160. package/dist/cjs/node_modules/crypto-js/x64-core.js +0 -6
  161. package/dist/cjs/node_modules/dfa/index.js +0 -6
  162. package/dist/cjs/node_modules/emoji-regex/index.js +0 -6
  163. package/dist/cjs/node_modules/events/events.js +0 -6
  164. package/dist/cjs/node_modules/fast-deep-equal/index.js +0 -6
  165. package/dist/cjs/node_modules/fontkit/dist/browser-module.js +0 -6
  166. package/dist/cjs/node_modules/hsl-to-hex/index.js +0 -6
  167. package/dist/cjs/node_modules/hsl-to-rgb-for-reals/converter.js +0 -6
  168. package/dist/cjs/node_modules/hyphen/hyphen.js +0 -6
  169. package/dist/cjs/node_modules/hyphen/patterns/en-us.js +0 -6
  170. package/dist/cjs/node_modules/inherits/inherits_browser.js +0 -6
  171. package/dist/cjs/node_modules/jay-peg/src/index.js +0 -6
  172. package/dist/cjs/node_modules/jay-peg/src/markers/dac.js +0 -6
  173. package/dist/cjs/node_modules/jay-peg/src/markers/dht.js +0 -6
  174. package/dist/cjs/node_modules/jay-peg/src/markers/dqt.js +0 -6
  175. package/dist/cjs/node_modules/jay-peg/src/markers/dri.js +0 -6
  176. package/dist/cjs/node_modules/jay-peg/src/markers/eoi.js +0 -6
  177. package/dist/cjs/node_modules/jay-peg/src/markers/exif.js +0 -6
  178. package/dist/cjs/node_modules/jay-peg/src/markers/jfif.js +0 -6
  179. package/dist/cjs/node_modules/jay-peg/src/markers/sof.js +0 -6
  180. package/dist/cjs/node_modules/jay-peg/src/markers/soi.js +0 -6
  181. package/dist/cjs/node_modules/jay-peg/src/markers/sos.js +0 -6
  182. package/dist/cjs/node_modules/jay-peg/src/markers/utils.js +0 -6
  183. package/dist/cjs/node_modules/linebreak/dist/module.js +0 -6
  184. package/dist/cjs/node_modules/linebreak/node_modules/base64-js/lib/b64.js +0 -6
  185. package/dist/cjs/node_modules/media-engine/src/index.js +0 -6
  186. package/dist/cjs/node_modules/media-engine/src/operators.js +0 -6
  187. package/dist/cjs/node_modules/media-engine/src/parser.js +0 -6
  188. package/dist/cjs/node_modules/media-engine/src/queries.js +0 -6
  189. package/dist/cjs/node_modules/normalize-svg-path/index.js +0 -6
  190. package/dist/cjs/node_modules/pako/lib/utils/common.js +0 -6
  191. package/dist/cjs/node_modules/pako/lib/zlib/adler32.js +0 -6
  192. package/dist/cjs/node_modules/pako/lib/zlib/constants.js +0 -6
  193. package/dist/cjs/node_modules/pako/lib/zlib/crc32.js +0 -6
  194. package/dist/cjs/node_modules/pako/lib/zlib/deflate.js +0 -6
  195. package/dist/cjs/node_modules/pako/lib/zlib/inffast.js +0 -6
  196. package/dist/cjs/node_modules/pako/lib/zlib/inflate.js +0 -6
  197. package/dist/cjs/node_modules/pako/lib/zlib/inftrees.js +0 -6
  198. package/dist/cjs/node_modules/pako/lib/zlib/messages.js +0 -6
  199. package/dist/cjs/node_modules/pako/lib/zlib/trees.js +0 -6
  200. package/dist/cjs/node_modules/pako/lib/zlib/zstream.js +0 -6
  201. package/dist/cjs/node_modules/parse-svg-path/index.js +0 -6
  202. package/dist/cjs/node_modules/postcss-value-parser/lib/parse.js +0 -6
  203. package/dist/cjs/node_modules/postcss-value-parser/lib/unit.js +0 -6
  204. package/dist/cjs/node_modules/queue/index.js +0 -6
  205. package/dist/cjs/node_modules/restructure/src/Array.js +0 -6
  206. package/dist/cjs/node_modules/restructure/src/Base.js +0 -6
  207. package/dist/cjs/node_modules/restructure/src/Bitfield.js +0 -6
  208. package/dist/cjs/node_modules/restructure/src/Buffer.js +0 -6
  209. package/dist/cjs/node_modules/restructure/src/DecodeStream.js +0 -6
  210. package/dist/cjs/node_modules/restructure/src/EncodeStream.js +0 -6
  211. package/dist/cjs/node_modules/restructure/src/LazyArray.js +0 -6
  212. package/dist/cjs/node_modules/restructure/src/Number.js +0 -6
  213. package/dist/cjs/node_modules/restructure/src/Optional.js +0 -6
  214. package/dist/cjs/node_modules/restructure/src/Pointer.js +0 -6
  215. package/dist/cjs/node_modules/restructure/src/Reserved.js +0 -6
  216. package/dist/cjs/node_modules/restructure/src/String.js +0 -6
  217. package/dist/cjs/node_modules/restructure/src/Struct.js +0 -6
  218. package/dist/cjs/node_modules/restructure/src/VersionedStruct.js +0 -6
  219. package/dist/cjs/node_modules/restructure/src/utils.js +0 -6
  220. package/dist/cjs/node_modules/scheduler/cjs/scheduler.development.js +0 -15
  221. package/dist/cjs/node_modules/scheduler/cjs/scheduler.production.js +0 -15
  222. package/dist/cjs/node_modules/scheduler/index.js +0 -6
  223. package/dist/cjs/node_modules/simple-swizzle/index.js +0 -6
  224. package/dist/cjs/node_modules/simple-swizzle/node_modules/is-arrayish/index.js +0 -6
  225. package/dist/cjs/node_modules/svg-arc-to-cubic-bezier/modules/index.js +0 -6
  226. package/dist/cjs/node_modules/tiny-inflate/index.js +0 -6
  227. package/dist/cjs/node_modules/tslib/tslib.es6.js +0 -6
  228. package/dist/cjs/node_modules/unicode-properties/dist/module.js +0 -6
  229. package/dist/cjs/node_modules/unicode-trie/index.js +0 -6
  230. package/dist/cjs/node_modules/unicode-trie/swap.js +0 -6
  231. package/dist/cjs/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js +0 -6
  232. package/dist/cjs/node_modules/yoga-layout/dist/src/generated/YGEnums.js +0 -6
  233. package/dist/cjs/node_modules/yoga-layout/dist/src/load.js +0 -6
  234. package/dist/cjs/node_modules/yoga-layout/dist/src/wrapAssembly.js +0 -6
  235. package/dist/cjs/src/components/e-commerce/invoice/InvoicePDF.js +0 -7
  236. package/dist/esm/_virtual/_commonjs-dynamic-modules.js +0 -11
  237. package/dist/esm/_virtual/aes.js +0 -9
  238. package/dist/esm/_virtual/b64.js +0 -9
  239. package/dist/esm/_virtual/blowfish.js +0 -9
  240. package/dist/esm/_virtual/cipher-core.js +0 -9
  241. package/dist/esm/_virtual/clone.js +0 -9
  242. package/dist/esm/_virtual/common.js +0 -9
  243. package/dist/esm/_virtual/context.js +0 -9
  244. package/dist/esm/_virtual/core2.js +0 -9
  245. package/dist/esm/_virtual/decode.js +0 -9
  246. package/dist/esm/_virtual/deflate.js +0 -9
  247. package/dist/esm/_virtual/dictionary-browser.js +0 -9
  248. package/dist/esm/_virtual/dictionary.js +0 -9
  249. package/dist/esm/_virtual/en-us.js +0 -9
  250. package/dist/esm/_virtual/enc-base64.js +0 -9
  251. package/dist/esm/_virtual/enc-base64url.js +0 -9
  252. package/dist/esm/_virtual/enc-utf16.js +0 -9
  253. package/dist/esm/_virtual/events.js +0 -9
  254. package/dist/esm/_virtual/evpkdf.js +0 -9
  255. package/dist/esm/_virtual/format-hex.js +0 -9
  256. package/dist/esm/_virtual/hmac.js +0 -9
  257. package/dist/esm/_virtual/huffman.js +0 -9
  258. package/dist/esm/_virtual/hyphen.js +0 -9
  259. package/dist/esm/_virtual/index10.js +0 -9
  260. package/dist/esm/_virtual/index5.js +0 -9
  261. package/dist/esm/_virtual/index6.js +0 -9
  262. package/dist/esm/_virtual/index7.js +0 -9
  263. package/dist/esm/_virtual/index8.js +0 -9
  264. package/dist/esm/_virtual/index9.js +0 -9
  265. package/dist/esm/_virtual/inflate.js +0 -9
  266. package/dist/esm/_virtual/inherits_browser.js +0 -9
  267. package/dist/esm/_virtual/lib-typedarrays.js +0 -9
  268. package/dist/esm/_virtual/md5.js +0 -9
  269. package/dist/esm/_virtual/mode-cfb.js +0 -9
  270. package/dist/esm/_virtual/mode-ctr-gladman.js +0 -9
  271. package/dist/esm/_virtual/mode-ctr.js +0 -9
  272. package/dist/esm/_virtual/mode-ecb.js +0 -9
  273. package/dist/esm/_virtual/mode-ofb.js +0 -9
  274. package/dist/esm/_virtual/pad-ansix923.js +0 -9
  275. package/dist/esm/_virtual/pad-iso10126.js +0 -9
  276. package/dist/esm/_virtual/pad-iso97971.js +0 -9
  277. package/dist/esm/_virtual/pad-nopadding.js +0 -9
  278. package/dist/esm/_virtual/pad-zeropadding.js +0 -9
  279. package/dist/esm/_virtual/pbkdf2.js +0 -9
  280. package/dist/esm/_virtual/prefix.js +0 -9
  281. package/dist/esm/_virtual/rabbit-legacy.js +0 -9
  282. package/dist/esm/_virtual/rabbit.js +0 -9
  283. package/dist/esm/_virtual/rc4.js +0 -9
  284. package/dist/esm/_virtual/ripemd160.js +0 -9
  285. package/dist/esm/_virtual/scheduler.development.js +0 -9
  286. package/dist/esm/_virtual/scheduler.production.js +0 -9
  287. package/dist/esm/_virtual/sha1.js +0 -9
  288. package/dist/esm/_virtual/sha224.js +0 -9
  289. package/dist/esm/_virtual/sha256.js +0 -9
  290. package/dist/esm/_virtual/sha3.js +0 -9
  291. package/dist/esm/_virtual/sha384.js +0 -9
  292. package/dist/esm/_virtual/sha512.js +0 -9
  293. package/dist/esm/_virtual/streams.js +0 -9
  294. package/dist/esm/_virtual/transform.js +0 -9
  295. package/dist/esm/_virtual/trees.js +0 -9
  296. package/dist/esm/_virtual/tripledes.js +0 -9
  297. package/dist/esm/_virtual/x64-core.js +0 -9
  298. package/dist/esm/node_modules/@react-pdf/fns/lib/index.js +0 -254
  299. package/dist/esm/node_modules/@react-pdf/font/lib/index.browser.js +0 -481
  300. package/dist/esm/node_modules/@react-pdf/image/lib/index.browser.js +0 -2217
  301. package/dist/esm/node_modules/@react-pdf/layout/lib/index.js +0 -2982
  302. package/dist/esm/node_modules/@react-pdf/pdfkit/lib/pdfkit.browser.js +0 -47429
  303. package/dist/esm/node_modules/@react-pdf/png-js/lib/png-js.browser.js +0 -12606
  304. package/dist/esm/node_modules/@react-pdf/primitives/lib/index.js +0 -37
  305. package/dist/esm/node_modules/@react-pdf/reconciler/lib/index.js +0 -16
  306. package/dist/esm/node_modules/@react-pdf/reconciler/lib/reconciler-23.js +0 -22
  307. package/dist/esm/node_modules/@react-pdf/reconciler/lib/reconciler-31.js +0 -30
  308. package/dist/esm/node_modules/@react-pdf/render/lib/index.js +0 -2081
  309. package/dist/esm/node_modules/@react-pdf/renderer/lib/react-pdf.browser.js +0 -472
  310. package/dist/esm/node_modules/@react-pdf/stylesheet/lib/index.js +0 -771
  311. package/dist/esm/node_modules/@react-pdf/textkit/lib/textkit.js +0 -2854
  312. package/dist/esm/node_modules/@swc/helpers/esm/_define_property.js +0 -15
  313. package/dist/esm/node_modules/abs-svg-path/index.js +0 -78
  314. package/dist/esm/node_modules/base64-js/index.js +0 -158
  315. package/dist/esm/node_modules/bidi-js/dist/bidi.js +0 -1008
  316. package/dist/esm/node_modules/brotli/dec/bit_reader.js +0 -132
  317. package/dist/esm/node_modules/brotli/dec/context.js +0 -255
  318. package/dist/esm/node_modules/brotli/dec/decode.js +0 -965
  319. package/dist/esm/node_modules/brotli/dec/dictionary-browser.js +0 -35
  320. package/dist/esm/node_modules/brotli/dec/dictionary.bin.js +0 -17
  321. package/dist/esm/node_modules/brotli/dec/dictionary.js +0 -54
  322. package/dist/esm/node_modules/brotli/dec/huffman.js +0 -133
  323. package/dist/esm/node_modules/brotli/dec/prefix.js +0 -70
  324. package/dist/esm/node_modules/brotli/dec/streams.js +0 -44
  325. package/dist/esm/node_modules/brotli/dec/transform.js +0 -264
  326. package/dist/esm/node_modules/brotli/decompress.js +0 -14
  327. package/dist/esm/node_modules/clone/clone.js +0 -272
  328. package/dist/esm/node_modules/color-name/index.js +0 -158
  329. package/dist/esm/node_modules/color-string/index.js +0 -259
  330. package/dist/esm/node_modules/crypto-js/aes.js +0 -251
  331. package/dist/esm/node_modules/crypto-js/blowfish.js +0 -488
  332. package/dist/esm/node_modules/crypto-js/cipher-core.js +0 -909
  333. package/dist/esm/node_modules/crypto-js/core.js +0 -820
  334. package/dist/esm/node_modules/crypto-js/enc-base64.js +0 -149
  335. package/dist/esm/node_modules/crypto-js/enc-base64url.js +0 -161
  336. package/dist/esm/node_modules/crypto-js/enc-utf16.js +0 -162
  337. package/dist/esm/node_modules/crypto-js/evpkdf.js +0 -149
  338. package/dist/esm/node_modules/crypto-js/format-hex.js +0 -80
  339. package/dist/esm/node_modules/crypto-js/hmac.js +0 -156
  340. package/dist/esm/node_modules/crypto-js/index.js +0 -61
  341. package/dist/esm/node_modules/crypto-js/lib-typedarrays.js +0 -89
  342. package/dist/esm/node_modules/crypto-js/md5.js +0 -277
  343. package/dist/esm/node_modules/crypto-js/mode-cfb.js +0 -94
  344. package/dist/esm/node_modules/crypto-js/mode-ctr-gladman.js +0 -130
  345. package/dist/esm/node_modules/crypto-js/mode-ctr.js +0 -72
  346. package/dist/esm/node_modules/crypto-js/mode-ecb.js +0 -54
  347. package/dist/esm/node_modules/crypto-js/mode-ofb.js +0 -68
  348. package/dist/esm/node_modules/crypto-js/pad-ansix923.js +0 -63
  349. package/dist/esm/node_modules/crypto-js/pad-iso10126.js +0 -58
  350. package/dist/esm/node_modules/crypto-js/pad-iso97971.js +0 -54
  351. package/dist/esm/node_modules/crypto-js/pad-nopadding.js +0 -44
  352. package/dist/esm/node_modules/crypto-js/pad-zeropadding.js +0 -61
  353. package/dist/esm/node_modules/crypto-js/pbkdf2.js +0 -160
  354. package/dist/esm/node_modules/crypto-js/rabbit-legacy.js +0 -207
  355. package/dist/esm/node_modules/crypto-js/rabbit.js +0 -209
  356. package/dist/esm/node_modules/crypto-js/rc4.js +0 -156
  357. package/dist/esm/node_modules/crypto-js/ripemd160.js +0 -280
  358. package/dist/esm/node_modules/crypto-js/sha1.js +0 -163
  359. package/dist/esm/node_modules/crypto-js/sha224.js +0 -94
  360. package/dist/esm/node_modules/crypto-js/sha256.js +0 -212
  361. package/dist/esm/node_modules/crypto-js/sha3.js +0 -340
  362. package/dist/esm/node_modules/crypto-js/sha384.js +0 -98
  363. package/dist/esm/node_modules/crypto-js/sha512.js +0 -340
  364. package/dist/esm/node_modules/crypto-js/tripledes.js +0 -796
  365. package/dist/esm/node_modules/crypto-js/x64-core.js +0 -317
  366. package/dist/esm/node_modules/dfa/index.js +0 -101
  367. package/dist/esm/node_modules/emoji-regex/index.js +0 -12
  368. package/dist/esm/node_modules/events/events.js +0 -485
  369. package/dist/esm/node_modules/fast-deep-equal/index.js +0 -56
  370. package/dist/esm/node_modules/fontkit/dist/browser-module.js +0 -13295
  371. package/dist/esm/node_modules/hsl-to-hex/index.js +0 -72
  372. package/dist/esm/node_modules/hsl-to-rgb-for-reals/converter.js +0 -66
  373. package/dist/esm/node_modules/hyphen/hyphen.js +0 -424
  374. package/dist/esm/node_modules/hyphen/patterns/en-us.js +0 -48
  375. package/dist/esm/node_modules/inherits/inherits_browser.js +0 -39
  376. package/dist/esm/node_modules/jay-peg/src/index.js +0 -68
  377. package/dist/esm/node_modules/jay-peg/src/markers/dac.js +0 -25
  378. package/dist/esm/node_modules/jay-peg/src/markers/dht.js +0 -52
  379. package/dist/esm/node_modules/jay-peg/src/markers/dqt.js +0 -26
  380. package/dist/esm/node_modules/jay-peg/src/markers/dri.js +0 -17
  381. package/dist/esm/node_modules/jay-peg/src/markers/eoi.js +0 -17
  382. package/dist/esm/node_modules/jay-peg/src/markers/exif.js +0 -327
  383. package/dist/esm/node_modules/jay-peg/src/markers/jfif.js +0 -24
  384. package/dist/esm/node_modules/jay-peg/src/markers/sof.js +0 -32
  385. package/dist/esm/node_modules/jay-peg/src/markers/soi.js +0 -11
  386. package/dist/esm/node_modules/jay-peg/src/markers/sos.js +0 -57
  387. package/dist/esm/node_modules/jay-peg/src/markers/utils.js +0 -71
  388. package/dist/esm/node_modules/linebreak/dist/module.js +0 -1340
  389. package/dist/esm/node_modules/linebreak/node_modules/base64-js/lib/b64.js +0 -137
  390. package/dist/esm/node_modules/media-engine/src/index.js +0 -26
  391. package/dist/esm/node_modules/media-engine/src/operators.js +0 -36
  392. package/dist/esm/node_modules/media-engine/src/parser.js +0 -147
  393. package/dist/esm/node_modules/media-engine/src/queries.js +0 -64
  394. package/dist/esm/node_modules/normalize-svg-path/index.js +0 -126
  395. package/dist/esm/node_modules/pako/lib/utils/common.js +0 -114
  396. package/dist/esm/node_modules/pako/lib/zlib/adler32.js +0 -57
  397. package/dist/esm/node_modules/pako/lib/zlib/constants.js +0 -78
  398. package/dist/esm/node_modules/pako/lib/zlib/crc32.js +0 -65
  399. package/dist/esm/node_modules/pako/lib/zlib/deflate.js +0 -1880
  400. package/dist/esm/node_modules/pako/lib/zlib/inffast.js +0 -351
  401. package/dist/esm/node_modules/pako/lib/zlib/inflate.js +0 -1557
  402. package/dist/esm/node_modules/pako/lib/zlib/inftrees.js +0 -352
  403. package/dist/esm/node_modules/pako/lib/zlib/messages.js +0 -38
  404. package/dist/esm/node_modules/pako/lib/zlib/trees.js +0 -1232
  405. package/dist/esm/node_modules/pako/lib/zlib/zstream.js +0 -57
  406. package/dist/esm/node_modules/parse-svg-path/index.js +0 -68
  407. package/dist/esm/node_modules/postcss-value-parser/lib/parse.js +0 -333
  408. package/dist/esm/node_modules/postcss-value-parser/lib/unit.js +0 -132
  409. package/dist/esm/node_modules/queue/index.js +0 -211
  410. package/dist/esm/node_modules/restructure/src/Array.js +0 -112
  411. package/dist/esm/node_modules/restructure/src/Base.js +0 -25
  412. package/dist/esm/node_modules/restructure/src/Bitfield.js +0 -47
  413. package/dist/esm/node_modules/restructure/src/Buffer.js +0 -44
  414. package/dist/esm/node_modules/restructure/src/DecodeStream.js +0 -93
  415. package/dist/esm/node_modules/restructure/src/EncodeStream.js +0 -137
  416. package/dist/esm/node_modules/restructure/src/LazyArray.js +0 -82
  417. package/dist/esm/node_modules/restructure/src/Number.js +0 -80
  418. package/dist/esm/node_modules/restructure/src/Optional.js +0 -52
  419. package/dist/esm/node_modules/restructure/src/Pointer.js +0 -175
  420. package/dist/esm/node_modules/restructure/src/Reserved.js +0 -31
  421. package/dist/esm/node_modules/restructure/src/String.js +0 -161
  422. package/dist/esm/node_modules/restructure/src/Struct.js +0 -121
  423. package/dist/esm/node_modules/restructure/src/VersionedStruct.js +0 -147
  424. package/dist/esm/node_modules/restructure/src/utils.js +0 -42
  425. package/dist/esm/node_modules/scheduler/cjs/scheduler.development.js +0 -382
  426. package/dist/esm/node_modules/scheduler/cjs/scheduler.production.js +0 -359
  427. package/dist/esm/node_modules/scheduler/index.js +0 -21
  428. package/dist/esm/node_modules/simple-swizzle/index.js +0 -40
  429. package/dist/esm/node_modules/simple-swizzle/node_modules/is-arrayish/index.js +0 -17
  430. package/dist/esm/node_modules/svg-arc-to-cubic-bezier/modules/index.js +0 -189
  431. package/dist/esm/node_modules/tiny-inflate/index.js +0 -387
  432. package/dist/esm/node_modules/tslib/tslib.es6.js +0 -36
  433. package/dist/esm/node_modules/unicode-properties/dist/module.js +0 -132
  434. package/dist/esm/node_modules/unicode-trie/index.js +0 -150
  435. package/dist/esm/node_modules/unicode-trie/swap.js +0 -33
  436. package/dist/esm/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js +0 -81
  437. package/dist/esm/node_modules/yoga-layout/dist/src/generated/YGEnums.js +0 -217
  438. package/dist/esm/node_modules/yoga-layout/dist/src/load.js +0 -24
  439. package/dist/esm/node_modules/yoga-layout/dist/src/wrapAssembly.js +0 -130
  440. package/dist/esm/src/components/e-commerce/invoice/InvoicePDF.js +0 -181
@@ -1,217 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- /**
8
- * Copyright (c) Meta Platforms, Inc. and affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- */
13
-
14
- // @generated by enums.py
15
-
16
- let Align = /*#__PURE__*/function (Align) {
17
- Align[Align["Auto"] = 0] = "Auto";
18
- Align[Align["FlexStart"] = 1] = "FlexStart";
19
- Align[Align["Center"] = 2] = "Center";
20
- Align[Align["FlexEnd"] = 3] = "FlexEnd";
21
- Align[Align["Stretch"] = 4] = "Stretch";
22
- Align[Align["Baseline"] = 5] = "Baseline";
23
- Align[Align["SpaceBetween"] = 6] = "SpaceBetween";
24
- Align[Align["SpaceAround"] = 7] = "SpaceAround";
25
- Align[Align["SpaceEvenly"] = 8] = "SpaceEvenly";
26
- return Align;
27
- }({});
28
- let BoxSizing = /*#__PURE__*/function (BoxSizing) {
29
- BoxSizing[BoxSizing["BorderBox"] = 0] = "BorderBox";
30
- BoxSizing[BoxSizing["ContentBox"] = 1] = "ContentBox";
31
- return BoxSizing;
32
- }({});
33
- let Dimension = /*#__PURE__*/function (Dimension) {
34
- Dimension[Dimension["Width"] = 0] = "Width";
35
- Dimension[Dimension["Height"] = 1] = "Height";
36
- return Dimension;
37
- }({});
38
- let Direction = /*#__PURE__*/function (Direction) {
39
- Direction[Direction["Inherit"] = 0] = "Inherit";
40
- Direction[Direction["LTR"] = 1] = "LTR";
41
- Direction[Direction["RTL"] = 2] = "RTL";
42
- return Direction;
43
- }({});
44
- let Display = /*#__PURE__*/function (Display) {
45
- Display[Display["Flex"] = 0] = "Flex";
46
- Display[Display["None"] = 1] = "None";
47
- Display[Display["Contents"] = 2] = "Contents";
48
- return Display;
49
- }({});
50
- let Edge = /*#__PURE__*/function (Edge) {
51
- Edge[Edge["Left"] = 0] = "Left";
52
- Edge[Edge["Top"] = 1] = "Top";
53
- Edge[Edge["Right"] = 2] = "Right";
54
- Edge[Edge["Bottom"] = 3] = "Bottom";
55
- Edge[Edge["Start"] = 4] = "Start";
56
- Edge[Edge["End"] = 5] = "End";
57
- Edge[Edge["Horizontal"] = 6] = "Horizontal";
58
- Edge[Edge["Vertical"] = 7] = "Vertical";
59
- Edge[Edge["All"] = 8] = "All";
60
- return Edge;
61
- }({});
62
- let Errata = /*#__PURE__*/function (Errata) {
63
- Errata[Errata["None"] = 0] = "None";
64
- Errata[Errata["StretchFlexBasis"] = 1] = "StretchFlexBasis";
65
- Errata[Errata["AbsolutePositionWithoutInsetsExcludesPadding"] = 2] = "AbsolutePositionWithoutInsetsExcludesPadding";
66
- Errata[Errata["AbsolutePercentAgainstInnerSize"] = 4] = "AbsolutePercentAgainstInnerSize";
67
- Errata[Errata["All"] = 2147483647] = "All";
68
- Errata[Errata["Classic"] = 2147483646] = "Classic";
69
- return Errata;
70
- }({});
71
- let ExperimentalFeature = /*#__PURE__*/function (ExperimentalFeature) {
72
- ExperimentalFeature[ExperimentalFeature["WebFlexBasis"] = 0] = "WebFlexBasis";
73
- return ExperimentalFeature;
74
- }({});
75
- let FlexDirection = /*#__PURE__*/function (FlexDirection) {
76
- FlexDirection[FlexDirection["Column"] = 0] = "Column";
77
- FlexDirection[FlexDirection["ColumnReverse"] = 1] = "ColumnReverse";
78
- FlexDirection[FlexDirection["Row"] = 2] = "Row";
79
- FlexDirection[FlexDirection["RowReverse"] = 3] = "RowReverse";
80
- return FlexDirection;
81
- }({});
82
- let Gutter = /*#__PURE__*/function (Gutter) {
83
- Gutter[Gutter["Column"] = 0] = "Column";
84
- Gutter[Gutter["Row"] = 1] = "Row";
85
- Gutter[Gutter["All"] = 2] = "All";
86
- return Gutter;
87
- }({});
88
- let Justify = /*#__PURE__*/function (Justify) {
89
- Justify[Justify["FlexStart"] = 0] = "FlexStart";
90
- Justify[Justify["Center"] = 1] = "Center";
91
- Justify[Justify["FlexEnd"] = 2] = "FlexEnd";
92
- Justify[Justify["SpaceBetween"] = 3] = "SpaceBetween";
93
- Justify[Justify["SpaceAround"] = 4] = "SpaceAround";
94
- Justify[Justify["SpaceEvenly"] = 5] = "SpaceEvenly";
95
- return Justify;
96
- }({});
97
- let LogLevel = /*#__PURE__*/function (LogLevel) {
98
- LogLevel[LogLevel["Error"] = 0] = "Error";
99
- LogLevel[LogLevel["Warn"] = 1] = "Warn";
100
- LogLevel[LogLevel["Info"] = 2] = "Info";
101
- LogLevel[LogLevel["Debug"] = 3] = "Debug";
102
- LogLevel[LogLevel["Verbose"] = 4] = "Verbose";
103
- LogLevel[LogLevel["Fatal"] = 5] = "Fatal";
104
- return LogLevel;
105
- }({});
106
- let MeasureMode = /*#__PURE__*/function (MeasureMode) {
107
- MeasureMode[MeasureMode["Undefined"] = 0] = "Undefined";
108
- MeasureMode[MeasureMode["Exactly"] = 1] = "Exactly";
109
- MeasureMode[MeasureMode["AtMost"] = 2] = "AtMost";
110
- return MeasureMode;
111
- }({});
112
- let NodeType = /*#__PURE__*/function (NodeType) {
113
- NodeType[NodeType["Default"] = 0] = "Default";
114
- NodeType[NodeType["Text"] = 1] = "Text";
115
- return NodeType;
116
- }({});
117
- let Overflow = /*#__PURE__*/function (Overflow) {
118
- Overflow[Overflow["Visible"] = 0] = "Visible";
119
- Overflow[Overflow["Hidden"] = 1] = "Hidden";
120
- Overflow[Overflow["Scroll"] = 2] = "Scroll";
121
- return Overflow;
122
- }({});
123
- let PositionType = /*#__PURE__*/function (PositionType) {
124
- PositionType[PositionType["Static"] = 0] = "Static";
125
- PositionType[PositionType["Relative"] = 1] = "Relative";
126
- PositionType[PositionType["Absolute"] = 2] = "Absolute";
127
- return PositionType;
128
- }({});
129
- let Unit = /*#__PURE__*/function (Unit) {
130
- Unit[Unit["Undefined"] = 0] = "Undefined";
131
- Unit[Unit["Point"] = 1] = "Point";
132
- Unit[Unit["Percent"] = 2] = "Percent";
133
- Unit[Unit["Auto"] = 3] = "Auto";
134
- return Unit;
135
- }({});
136
- let Wrap = /*#__PURE__*/function (Wrap) {
137
- Wrap[Wrap["NoWrap"] = 0] = "NoWrap";
138
- Wrap[Wrap["Wrap"] = 1] = "Wrap";
139
- Wrap[Wrap["WrapReverse"] = 2] = "WrapReverse";
140
- return Wrap;
141
- }({});
142
- const constants = {
143
- ALIGN_AUTO: Align.Auto,
144
- ALIGN_FLEX_START: Align.FlexStart,
145
- ALIGN_CENTER: Align.Center,
146
- ALIGN_FLEX_END: Align.FlexEnd,
147
- ALIGN_STRETCH: Align.Stretch,
148
- ALIGN_BASELINE: Align.Baseline,
149
- ALIGN_SPACE_BETWEEN: Align.SpaceBetween,
150
- ALIGN_SPACE_AROUND: Align.SpaceAround,
151
- ALIGN_SPACE_EVENLY: Align.SpaceEvenly,
152
- BOX_SIZING_BORDER_BOX: BoxSizing.BorderBox,
153
- BOX_SIZING_CONTENT_BOX: BoxSizing.ContentBox,
154
- DIMENSION_WIDTH: Dimension.Width,
155
- DIMENSION_HEIGHT: Dimension.Height,
156
- DIRECTION_INHERIT: Direction.Inherit,
157
- DIRECTION_LTR: Direction.LTR,
158
- DIRECTION_RTL: Direction.RTL,
159
- DISPLAY_FLEX: Display.Flex,
160
- DISPLAY_NONE: Display.None,
161
- DISPLAY_CONTENTS: Display.Contents,
162
- EDGE_LEFT: Edge.Left,
163
- EDGE_TOP: Edge.Top,
164
- EDGE_RIGHT: Edge.Right,
165
- EDGE_BOTTOM: Edge.Bottom,
166
- EDGE_START: Edge.Start,
167
- EDGE_END: Edge.End,
168
- EDGE_HORIZONTAL: Edge.Horizontal,
169
- EDGE_VERTICAL: Edge.Vertical,
170
- EDGE_ALL: Edge.All,
171
- ERRATA_NONE: Errata.None,
172
- ERRATA_STRETCH_FLEX_BASIS: Errata.StretchFlexBasis,
173
- ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: Errata.AbsolutePositionWithoutInsetsExcludesPadding,
174
- ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: Errata.AbsolutePercentAgainstInnerSize,
175
- ERRATA_ALL: Errata.All,
176
- ERRATA_CLASSIC: Errata.Classic,
177
- EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: ExperimentalFeature.WebFlexBasis,
178
- FLEX_DIRECTION_COLUMN: FlexDirection.Column,
179
- FLEX_DIRECTION_COLUMN_REVERSE: FlexDirection.ColumnReverse,
180
- FLEX_DIRECTION_ROW: FlexDirection.Row,
181
- FLEX_DIRECTION_ROW_REVERSE: FlexDirection.RowReverse,
182
- GUTTER_COLUMN: Gutter.Column,
183
- GUTTER_ROW: Gutter.Row,
184
- GUTTER_ALL: Gutter.All,
185
- JUSTIFY_FLEX_START: Justify.FlexStart,
186
- JUSTIFY_CENTER: Justify.Center,
187
- JUSTIFY_FLEX_END: Justify.FlexEnd,
188
- JUSTIFY_SPACE_BETWEEN: Justify.SpaceBetween,
189
- JUSTIFY_SPACE_AROUND: Justify.SpaceAround,
190
- JUSTIFY_SPACE_EVENLY: Justify.SpaceEvenly,
191
- LOG_LEVEL_ERROR: LogLevel.Error,
192
- LOG_LEVEL_WARN: LogLevel.Warn,
193
- LOG_LEVEL_INFO: LogLevel.Info,
194
- LOG_LEVEL_DEBUG: LogLevel.Debug,
195
- LOG_LEVEL_VERBOSE: LogLevel.Verbose,
196
- LOG_LEVEL_FATAL: LogLevel.Fatal,
197
- MEASURE_MODE_UNDEFINED: MeasureMode.Undefined,
198
- MEASURE_MODE_EXACTLY: MeasureMode.Exactly,
199
- MEASURE_MODE_AT_MOST: MeasureMode.AtMost,
200
- NODE_TYPE_DEFAULT: NodeType.Default,
201
- NODE_TYPE_TEXT: NodeType.Text,
202
- OVERFLOW_VISIBLE: Overflow.Visible,
203
- OVERFLOW_HIDDEN: Overflow.Hidden,
204
- OVERFLOW_SCROLL: Overflow.Scroll,
205
- POSITION_TYPE_STATIC: PositionType.Static,
206
- POSITION_TYPE_RELATIVE: PositionType.Relative,
207
- POSITION_TYPE_ABSOLUTE: PositionType.Absolute,
208
- UNIT_UNDEFINED: Unit.Undefined,
209
- UNIT_POINT: Unit.Point,
210
- UNIT_PERCENT: Unit.Percent,
211
- UNIT_AUTO: Unit.Auto,
212
- WRAP_NO_WRAP: Wrap.NoWrap,
213
- WRAP_WRAP: Wrap.Wrap,
214
- WRAP_WRAP_REVERSE: Wrap.WrapReverse
215
- };
216
-
217
- export { Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, LogLevel, MeasureMode, NodeType, Overflow, PositionType, Unit, Wrap, constants as default };
@@ -1,24 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import loadYoga$1 from '../binaries/yoga-wasm-base64-esm.js';
8
- import wrapAssembly from './wrapAssembly.js';
9
- export { Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, LogLevel, MeasureMode, NodeType, Overflow, PositionType, Unit, Wrap } from './generated/YGEnums.js';
10
-
11
- /**
12
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- *
17
- * @format
18
- */
19
-
20
- async function loadYoga() {
21
- return wrapAssembly(await loadYoga$1());
22
- }
23
-
24
- export { loadYoga };
@@ -1,130 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import constants, { Unit, Direction } from './generated/YGEnums.js';
8
-
9
- /**
10
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- *
15
- * @format
16
- */
17
-
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
- function wrapAssembly(lib) {
20
- function patch(prototype, name, fn) {
21
- const original = prototype[name];
22
- prototype[name] = function () {
23
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24
- args[_key] = arguments[_key];
25
- }
26
- return fn.call(this, original, ...args);
27
- };
28
- }
29
- for (const fnName of ['setPosition', 'setMargin', 'setFlexBasis', 'setWidth', 'setHeight', 'setMinWidth', 'setMinHeight', 'setMaxWidth', 'setMaxHeight', 'setPadding', 'setGap']) {
30
- const methods = {
31
- [Unit.Point]: lib.Node.prototype[fnName],
32
- [Unit.Percent]: lib.Node.prototype[`${fnName}Percent`],
33
- [Unit.Auto]: lib.Node.prototype[`${fnName}Auto`]
34
- };
35
- patch(lib.Node.prototype, fnName, function (original) {
36
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
37
- args[_key2 - 1] = arguments[_key2];
38
- }
39
- // We patch all these functions to add support for the following calls:
40
- // .setWidth(100) / .setWidth("100%") / .setWidth(.getWidth()) / .setWidth("auto")
41
-
42
- const value = args.pop();
43
- let unit, asNumber;
44
- if (value === 'auto') {
45
- unit = Unit.Auto;
46
- asNumber = undefined;
47
- } else if (typeof value === 'object') {
48
- unit = value.unit;
49
- asNumber = value.valueOf();
50
- } else {
51
- unit = typeof value === 'string' && value.endsWith('%') ? Unit.Percent : Unit.Point;
52
- asNumber = parseFloat(value);
53
- if (value !== undefined && !Number.isNaN(value) && Number.isNaN(asNumber)) {
54
- throw new Error(`Invalid value ${value} for ${fnName}`);
55
- }
56
- }
57
- if (!methods[unit]) throw new Error(`Failed to execute "${fnName}": Unsupported unit '${value}'`);
58
- if (asNumber !== undefined) {
59
- return methods[unit].call(this, ...args, asNumber);
60
- } else {
61
- return methods[unit].call(this, ...args);
62
- }
63
- });
64
- }
65
- function wrapMeasureFunction(measureFunction) {
66
- return lib.MeasureCallback.implement({
67
- measure: function () {
68
- const {
69
- width,
70
- height
71
- } = measureFunction(...arguments);
72
- return {
73
- width: width ?? NaN,
74
- height: height ?? NaN
75
- };
76
- }
77
- });
78
- }
79
- patch(lib.Node.prototype, 'setMeasureFunc', function (original, measureFunc) {
80
- // This patch is just a convenience patch, since it helps write more
81
- // idiomatic source code (such as .setMeasureFunc(null))
82
- if (measureFunc) {
83
- return original.call(this, wrapMeasureFunction(measureFunc));
84
- } else {
85
- return this.unsetMeasureFunc();
86
- }
87
- });
88
- function wrapDirtiedFunc(dirtiedFunction) {
89
- return lib.DirtiedCallback.implement({
90
- dirtied: dirtiedFunction
91
- });
92
- }
93
- patch(lib.Node.prototype, 'setDirtiedFunc', function (original, dirtiedFunc) {
94
- original.call(this, wrapDirtiedFunc(dirtiedFunc));
95
- });
96
- patch(lib.Config.prototype, 'free', function () {
97
- // Since we handle the memory allocation ourselves (via lib.Config.create),
98
- // we also need to handle the deallocation
99
- lib.Config.destroy(this);
100
- });
101
- patch(lib.Node, 'create', (_, config) => {
102
- // We decide the constructor we want to call depending on the parameters
103
- return config ? lib.Node.createWithConfig(config) : lib.Node.createDefault();
104
- });
105
- patch(lib.Node.prototype, 'free', function () {
106
- // Since we handle the memory allocation ourselves (via lib.Node.create),
107
- // we also need to handle the deallocation
108
- lib.Node.destroy(this);
109
- });
110
- patch(lib.Node.prototype, 'freeRecursive', function () {
111
- for (let t = 0, T = this.getChildCount(); t < T; ++t) {
112
- this.getChild(0).freeRecursive();
113
- }
114
- this.free();
115
- });
116
- patch(lib.Node.prototype, 'calculateLayout', function (original) {
117
- let width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NaN;
118
- let height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NaN;
119
- let direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Direction.LTR;
120
- // Just a small patch to add support for the function default parameters
121
- return original.call(this, width, height, direction);
122
- });
123
- return {
124
- Config: lib.Config,
125
- Node: lib.Node,
126
- ...constants
127
- };
128
- }
129
-
130
- export { wrapAssembly as default };
@@ -1,181 +0,0 @@
1
- "use client";
2
- /*
3
- * UMWD-Components
4
- * @copyright Jelle Paulus
5
- * @license MIT
6
- */
7
-
8
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
- import { useState, Fragment as Fragment$1, useEffect } from 'react';
10
- import IconButton from '@mui/material/IconButton';
11
- import Dialog from '@mui/material/Dialog';
12
- import DialogContent from '@mui/material/DialogContent';
13
- import DialogActions from '@mui/material/DialogActions';
14
- import Button from '@mui/material/Button';
15
- import CircularProgress from '@mui/material/CircularProgress';
16
- import PictureAsPdfIcon from '@mui/icons-material/PictureAsPdf';
17
-
18
- // Custom hook for PDF renderer with proper error handling and cleanup
19
- const usePDFRenderer = () => {
20
- const [pdfComponents, setPdfComponents] = useState(null);
21
- const [loading, setLoading] = useState(true);
22
- const [error, setError] = useState(null);
23
- useEffect(() => {
24
- let isMounted = true;
25
- const loadPDFRenderer = async () => {
26
- try {
27
- const renderer = await import('../../../../node_modules/@react-pdf/renderer/lib/react-pdf.browser.js');
28
- if (isMounted) {
29
- setPdfComponents(renderer);
30
- setLoading(false);
31
- }
32
- }
33
- catch (err) {
34
- console.error("Failed to load PDF renderer:", err);
35
- if (isMounted) {
36
- setError("Failed to load PDF components");
37
- setLoading(false);
38
- }
39
- }
40
- };
41
- loadPDFRenderer();
42
- return () => {
43
- isMounted = false;
44
- };
45
- }, []);
46
- return { pdfComponents, loading, error };
47
- };
48
- // Helper function to safely access nested properties
49
- const safeGet = (obj, path, defaultValue = "") => {
50
- return path
51
- .split(".")
52
- .reduce((current, key) => current && current[key] !== undefined ? current[key] : defaultValue, obj);
53
- };
54
- // Styles will be created when PDF renderer is loaded
55
- const createStyles = (StyleSheet) => StyleSheet.create({
56
- page: {
57
- flexDirection: "column",
58
- backgroundColor: "#E4E4E4",
59
- },
60
- header: {
61
- padding: 10,
62
- flexDirection: "row",
63
- alignItems: "center",
64
- },
65
- logo: {
66
- width: 24,
67
- height: 24,
68
- marginRight: 10,
69
- },
70
- section: {
71
- margin: 10,
72
- padding: 10,
73
- fontSize: 12,
74
- },
75
- row: {
76
- flexDirection: "row",
77
- },
78
- rowSection: {
79
- flex: 1,
80
- },
81
- productRowSection: {
82
- flex: 1,
83
- width: 1 / 6,
84
- },
85
- h1: { fontSize: 28 },
86
- h2: { fontSize: 24, fontWeight: "bold" },
87
- h3: { fontSize: 16, fontWeight: "bold" },
88
- });
89
- // Create Document Component
90
- const InvoicePDF = ({ invoice }) => {
91
- const { pdfComponents, loading, error } = usePDFRenderer();
92
- if (loading) {
93
- return jsx(CircularProgress, {});
94
- }
95
- if (error) {
96
- return jsxs("div", { children: ["Error loading PDF components: ", error] });
97
- }
98
- if (!pdfComponents) {
99
- return jsx("div", { children: "PDF components not available" });
100
- }
101
- // Validate invoice data
102
- if (!invoice) {
103
- return jsx("div", { children: "No invoice data provided" });
104
- }
105
- const { Document, Page, View, Text, StyleSheet } = pdfComponents;
106
- const styles = createStyles(StyleSheet);
107
- const { seller_business_credentials, seller_company_address, buyer_company_address, buyer_business_credentials, type, } = invoice;
108
- const renderCreditNote = () => (jsx(Document, { title: `credit_${safeGet(invoice, "invoice_number", "unknown")}`, children: jsxs(Page, { size: "A4", style: styles.page, children: [jsx(View, { style: styles.header, children: jsx(Text, { style: styles.h1, children: safeGet(seller_business_credentials, "company_name") }) }), jsx(View, { style: styles.section, children: jsx(Text, { style: styles.h2, children: "CREDIT NOTE" }) }), jsx(View, { style: styles.section, children: jsxs(View, { style: styles.row, children: [jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: styles.h3, children: "BILLING DETAILS" }), jsx(Text, { children: safeGet(buyer_business_credentials, "company_name") }), jsxs(Text, { children: [safeGet(invoice, "buyer_first_name"), " ", safeGet(invoice, "buyer_last_name")] }), jsxs(Text, { children: [safeGet(buyer_company_address, "street"), " ", safeGet(buyer_company_address, "street_number"), " ", safeGet(buyer_company_address, "street_number_addition")] }), jsxs(Text, { children: [safeGet(buyer_company_address, "postal_code"), " ", safeGet(buyer_company_address, "city")] })] }), jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: styles.h3, children: "FROM" }), jsx(Text, { children: safeGet(seller_business_credentials, "company_name") }), jsxs(Text, { children: [safeGet(seller_company_address, "street"), " ", safeGet(seller_company_address, "street_number"), " ", safeGet(seller_company_address, "street_number_addition")] }), jsxs(Text, { children: [safeGet(seller_company_address, "postal_code"), " ", safeGet(seller_company_address, "city")] }), jsx(Text, { style: { fontWeight: "bold", marginTop: 10 }, children: "CoC Number" }), jsx(Text, { children: safeGet(seller_business_credentials, "coc_number") }), jsx(Text, { style: { fontWeight: "bold", marginTop: 10 }, children: "VAT Number" }), jsx(Text, { children: safeGet(seller_business_credentials, "vat_number") })] })] }) }), jsx(View, { style: styles.section, children: jsxs(View, { style: styles.row, children: [jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Invoice number: " }), jsx(Text, { children: safeGet(invoice, "invoice_number") })] }), safeGet(invoice, "customer_reference") && (jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Your reference: " }), jsx(Text, { children: safeGet(invoice, "customer_reference") })] })), jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Invoice date" }), jsx(Text, { children: safeGet(invoice, "invoice_date") })] })] }) }), jsxs(View, { style: styles.section, children: [jsx(Text, { style: styles.h3, children: "SUMMARY" }), jsxs(View, { style: styles.row, children: [invoice?.admin_items &&
109
- Array.isArray(invoice.admin_items) &&
110
- invoice.admin_items.length > 0 && (jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Line Item Number" }) })), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Title" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Amount" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "VAT rate" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Excl. VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Incl. VAT" }) })] }), invoice?.items &&
111
- Array.isArray(invoice.items) &&
112
- invoice.items.map((item, index) => (jsx(Fragment$1, { children: jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [item && "product_title" in item
113
- ? item.product_title
114
- : "", item && "item_description" in item
115
- ? item.item_description
116
- : ""] }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "quantity") }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [safeGet(item, "vat_rate"), " %"] }) }), jsx(View, { style: styles.productRowSection, children: item?.price_excl_vat && item?.price_incl_vat && (jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC", " ", (item.price_incl_vat - item.price_excl_vat)?.toFixed(2)] })) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price_excl_vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price_incl_vat", 0)?.toFixed(2)] }) })] }) }, `credit-item-${index}`))), invoice?.admin_items &&
117
- Array.isArray(invoice.admin_items) &&
118
- invoice.admin_items.map((item, index) => (jsx(Fragment$1, { children: jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "line_item_number") }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "description") }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "quantity") }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [safeGet(item, "price.vat_rate"), " %"] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.price", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.price_incl_vat", 0)?.toFixed(2)] }) })] }) }, `credit-admin-item-${index}`)))] }), jsxs(View, { style: styles.section, children: [jsx(Text, { style: styles.h3, children: "TOTALS" }), jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "Excl. VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "Incl. VAT" }) })] }), jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "VAT_total", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "total_excl_vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "total_incl_vat", 0)?.toFixed(2)] }) })] })] }), jsx(View, { style: styles.section, children: jsxs(Text, { style: { ...styles.h3, border: "2px solid black", padding: 10 }, children: ["Total: \u20AC ", safeGet(invoice, "total_incl_vat", 0)?.toFixed(2)] }) })] }) }));
119
- if (type === "credit") {
120
- return renderCreditNote();
121
- }
122
- if (type === "proforma") {
123
- return (jsx(Document, { title: `proforma_${safeGet(invoice, "invoice_number", "unknown")}`, children: jsxs(Page, { size: "A4", style: styles.page, children: [jsx(View, { style: styles.header, children: jsx(Text, { style: styles.h1, children: safeGet(seller_business_credentials, "company_name") }) }), jsxs(View, { style: styles.section, children: [jsx(Text, { style: styles.h2, children: "PROFORMA INVOICE" }), jsx(Text, { style: { fontSize: 10, marginTop: 5 }, children: "This is not a final invoice and cannot be used for tax purposes" })] }), jsx(View, { style: styles.section, children: jsxs(View, { style: styles.row, children: [jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: styles.h3, children: "BILLING DETAILS" }), jsx(Text, { children: safeGet(buyer_business_credentials, "company_name") }), jsxs(Text, { children: [safeGet(invoice, "buyer_first_name"), " ", safeGet(invoice, "buyer_last_name")] }), jsxs(Text, { children: [safeGet(buyer_company_address, "street"), " ", safeGet(buyer_company_address, "street_number"), " ", safeGet(buyer_company_address, "street_number_addition")] }), jsxs(Text, { children: [safeGet(buyer_company_address, "postal_code"), " ", safeGet(buyer_company_address, "city")] })] }), jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: styles.h3, children: "FROM" }), jsx(Text, { children: safeGet(seller_business_credentials, "company_name") }), jsxs(Text, { children: [safeGet(seller_company_address, "street"), " ", safeGet(seller_company_address, "street_number"), " ", safeGet(seller_company_address, "street_number_addition")] }), jsxs(Text, { children: [safeGet(seller_company_address, "postal_code"), " ", safeGet(seller_company_address, "city")] }), jsx(Text, { style: { fontWeight: "bold", marginTop: 10 }, children: "CoC Number" }), jsx(Text, { children: safeGet(seller_business_credentials, "coc_number") }), jsx(Text, { style: { fontWeight: "bold", marginTop: 10 }, children: "VAT Number" }), jsx(Text, { children: safeGet(seller_business_credentials, "vat_number") })] })] }) }), jsx(View, { style: styles.section, children: jsxs(View, { style: styles.row, children: [jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Invoice number: " }), jsx(Text, { children: safeGet(invoice, "invoice_number") })] }), safeGet(invoice, "customer_reference") && (jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Your reference: " }), jsx(Text, { children: safeGet(invoice, "customer_reference") })] })), jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Invoice date" }), jsx(Text, { children: safeGet(invoice, "invoice_date") })] })] }) }), jsxs(View, { style: styles.section, children: [jsx(Text, { style: styles.h3, children: "SUMMARY" }), jsxs(View, { style: styles.row, children: [invoice?.admin_items &&
124
- Array.isArray(invoice.admin_items) &&
125
- invoice.admin_items.length > 0 && (jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Line Item Number" }) })), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Title" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Amount" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "VAT rate" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Excl. VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Incl. VAT" }) })] }), invoice?.items &&
126
- Array.isArray(invoice.items) &&
127
- invoice.items.map((item, index) => (jsx(Fragment$1, { children: jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [item && "product_title" in item
128
- ? item.product_title
129
- : "", item && "item_description" in item
130
- ? item.item_description
131
- : ""] }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "quantity") }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [safeGet(item, "vat_rate"), " %"] }) }), jsx(View, { style: styles.productRowSection, children: item?.price_excl_vat && item?.price_incl_vat && (jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC", " ", (item.price_incl_vat - item.price_excl_vat)?.toFixed(2)] })) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price_excl_vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price_incl_vat", 0)?.toFixed(2)] }) })] }) }, `proforma-item-${index}`))), invoice?.admin_items &&
132
- Array.isArray(invoice.admin_items) &&
133
- invoice.admin_items.map((item, index) => (jsx(Fragment$1, { children: jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "line_item_number") }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "description") }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "quantity") }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [safeGet(item, "price.vat_rate"), " %"] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.price", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.price_incl_vat", 0)?.toFixed(2)] }) })] }) }, `proforma-admin-item-${index}`)))] }), jsxs(View, { style: styles.section, children: [jsx(Text, { style: styles.h3, children: "TOTALS" }), jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "Excl. VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "Incl. VAT" }) })] }), jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "VAT_total", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "total_excl_vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "total_incl_vat", 0)?.toFixed(2)] }) })] })] }), jsx(View, { style: styles.section, children: jsxs(Text, { style: { ...styles.h3, border: "2px solid black", padding: 10 }, children: ["Total Due: \u20AC ", safeGet(invoice, "total_incl_vat", 0)?.toFixed(2)] }) })] }) }));
134
- }
135
- // Default invoice
136
- return (jsx(Document, { title: `invoice_${safeGet(invoice, "invoice_number", "unknown")}`, children: jsxs(Page, { size: "A4", style: styles.page, children: [jsx(View, { style: styles.header, children: jsx(Text, { style: styles.h1, children: safeGet(seller_business_credentials, "company_name") }) }), jsx(View, { style: styles.section, children: jsx(Text, { style: styles.h2, children: "INVOICE" }) }), jsx(View, { style: styles.section, children: jsxs(View, { style: styles.row, children: [jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: styles.h3, children: "BILLING DETAILS" }), jsx(Text, { children: safeGet(buyer_business_credentials, "company_name") }), jsxs(Text, { children: [safeGet(invoice, "buyer_first_name"), " ", safeGet(invoice, "buyer_last_name")] }), jsxs(Text, { children: [safeGet(buyer_company_address, "street"), " ", safeGet(buyer_company_address, "street_number"), " ", safeGet(buyer_company_address, "street_number_addition")] }), jsxs(Text, { children: [safeGet(buyer_company_address, "postal_code"), " ", safeGet(buyer_company_address, "city")] })] }), jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: styles.h3, children: "FROM" }), jsx(Text, { children: safeGet(seller_business_credentials, "company_name") }), jsxs(Text, { children: [safeGet(seller_company_address, "street"), " ", safeGet(seller_company_address, "street_number"), " ", safeGet(seller_company_address, "street_number_addition")] }), jsxs(Text, { children: [safeGet(seller_company_address, "postal_code"), " ", safeGet(seller_company_address, "city")] }), jsx(Text, { style: { fontWeight: "bold", marginTop: 10 }, children: "CoC Number" }), jsx(Text, { children: safeGet(seller_business_credentials, "coc_number") }), jsx(Text, { style: { fontWeight: "bold", marginTop: 10 }, children: "VAT Number" }), jsx(Text, { children: safeGet(seller_business_credentials, "vat_number") })] })] }) }), jsx(View, { style: styles.section, children: jsxs(View, { style: styles.row, children: [jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Invoice number: " }), jsx(Text, { children: safeGet(invoice, "invoice_number") })] }), safeGet(invoice, "customer_reference") && (jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Your reference: " }), jsx(Text, { children: safeGet(invoice, "customer_reference") })] })), jsxs(View, { style: styles.rowSection, children: [jsx(Text, { style: { fontWeight: "bold" }, children: "Invoice date" }), jsx(Text, { children: safeGet(invoice, "invoice_date") })] })] }) }), jsxs(View, { style: styles.section, children: [jsx(Text, { style: styles.h3, children: "SUMMARY" }), jsxs(View, { style: styles.row, children: [invoice?.admin_items &&
137
- Array.isArray(invoice.admin_items) &&
138
- invoice.admin_items.length > 0 && (jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Line Item Number" }) })), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Title" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Amount" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "VAT rate" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Excl. VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px", fontWeight: "bold" }, children: "Incl. VAT" }) })] }), invoice?.items &&
139
- Array.isArray(invoice.items) &&
140
- invoice.items.map((item, index) => (jsx(Fragment$1, { children: jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [item && "product_title" in item
141
- ? item.product_title
142
- : "", item && "item_description" in item
143
- ? item.item_description
144
- : ""] }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "quantity") }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [safeGet(item, "vat_rate"), " %"] }) }), jsx(View, { style: styles.productRowSection, children: item?.price_excl_vat && item?.price_incl_vat && (jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC", " ", (item.price_incl_vat - item.price_excl_vat)?.toFixed(2)] })) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price_excl_vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price_incl_vat", 0)?.toFixed(2)] }) })] }) }, `invoice-item-${index}`))), invoice?.admin_items &&
145
- Array.isArray(invoice.admin_items) &&
146
- invoice.admin_items.map((item, index) => (jsx(Fragment$1, { children: jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "line_item_number") }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "description") }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontSize: "10px" }, children: safeGet(item, "quantity") }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: [safeGet(item, "price.vat_rate"), " %"] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.price", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { style: { fontSize: "10px" }, children: ["\u20AC ", safeGet(item, "price.price_incl_vat", 0)?.toFixed(2)] }) })] }) }, `invoice-admin-item-${index}`)))] }), jsxs(View, { style: styles.section, children: [jsx(Text, { style: styles.h3, children: "TOTALS" }), jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "Excl. VAT" }) }), jsx(View, { style: styles.productRowSection, children: jsx(Text, { style: { fontWeight: "bold" }, children: "Incl. VAT" }) })] }), jsxs(View, { style: styles.row, children: [jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "VAT_total", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "total_excl_vat", 0)?.toFixed(2)] }) }), jsx(View, { style: styles.productRowSection, children: jsxs(Text, { children: ["\u20AC ", safeGet(invoice, "total_incl_vat", 0)?.toFixed(2)] }) })] })] }), jsx(View, { style: styles.section, children: jsxs(Text, { style: { ...styles.h3, border: "2px solid black", padding: 10 }, children: ["Total Due: \u20AC ", safeGet(invoice, "total_incl_vat", 0)?.toFixed(2)] }) })] }) }));
147
- };
148
- function InvoiceDownloadLink({ invoice }) {
149
- const { pdfComponents, loading, error } = usePDFRenderer();
150
- if (loading || error || !pdfComponents || !invoice) {
151
- return (jsx(IconButton, { disabled: true, children: jsx(CircularProgress, { size: 20 }) }));
152
- }
153
- const { PDFDownloadLink } = pdfComponents;
154
- // Add error boundary for PDF generation
155
- try {
156
- return (jsx(PDFDownloadLink, { document: jsx(InvoicePDF, { invoice: invoice }), fileName: `invoice_${safeGet(invoice, "invoice_number", "unknown")}`, children: jsx(IconButton, { children: jsx(PictureAsPdfIcon, {}) }) }, Date.now()));
157
- }
158
- catch (err) {
159
- console.error("Error creating PDF download link:", err);
160
- return (jsx(IconButton, { disabled: true, children: jsx(PictureAsPdfIcon, {}) }));
161
- }
162
- }
163
- function InvoicePDFViewer({ invoice }) {
164
- const [open, setOpen] = useState(false);
165
- const [pdfError, setPdfError] = useState(null);
166
- const { pdfComponents, loading, error } = usePDFRenderer();
167
- if (loading || error || !pdfComponents || !invoice) {
168
- return (jsx(IconButton, { disabled: true, children: jsx(CircularProgress, { size: 20 }) }));
169
- }
170
- const { PDFViewer } = pdfComponents;
171
- const handleOpenPDF = () => {
172
- setPdfError(null);
173
- setOpen(true);
174
- };
175
- return (jsxs(Fragment, { children: [jsx(IconButton, { onClick: handleOpenPDF, children: jsx(PictureAsPdfIcon, {}) }), jsxs(Dialog, { open: open, fullWidth: true, maxWidth: "lg", children: [jsx(DialogContent, { children: pdfError ? (jsxs("div", { children: ["Error rendering PDF: ", pdfError] })) : (jsx(PDFViewer, { style: {
176
- width: "100%",
177
- minHeight: "70vh",
178
- }, children: jsx(InvoicePDF, { invoice: invoice }) }, Date.now())) }), jsx(DialogActions, { children: jsx(Button, { variant: "contained", onClick: () => setOpen(false), children: "Close" }) })] })] }));
179
- }
180
-
181
- export { InvoiceDownloadLink, InvoicePDF, InvoicePDFViewer };