@heliux-org/design-system-core 0.0.293 → 0.0.294-TableTestBuild
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/01099e901d8d36c4208d.woff +0 -0
- package/dist/014b33f2d67746925624.woff2 +1 -0
- package/dist/01ddb13e174e5dc916e701c7efaa323b.woff2 +1 -0
- package/dist/01ddb76edb91ce0e42b2f4d2b117fe20.woff2 +1 -0
- package/dist/0204dde18eabd48872bc.woff +0 -0
- package/dist/03446f23dd9b11b08a50.woff2 +0 -0
- package/dist/03a843e969c73d167dfe1881bacceb81.woff +1 -0
- package/dist/09ad0d44c84b8ba10b08.woff2 +1 -0
- package/dist/09cce7da915e05bce40f.woff +1 -0
- package/dist/09cfa47ba8e8e7694606.woff +1 -0
- package/dist/0b03efa08247214660c7.woff2 +0 -0
- package/dist/0fbb1058f3361e047fca.woff2 +1 -0
- package/dist/10a7cf76e9c63de3773a.woff2 +0 -0
- package/dist/11d2826e26962217b6c9.woff +0 -0
- package/dist/13289e71e3f82bc351e3.woff +1 -0
- package/dist/136d07570e1fc99faa06.woff +0 -0
- package/dist/1492107708a4234faa12.woff2 +1 -0
- package/dist/16360d4137e1735070eef904fa94e6a8.woff +1 -0
- package/dist/18ad1cf5e2baedef7ba63332351bf412.woff +1 -0
- package/dist/1954637cd7a765c3e565.woff2 +0 -0
- package/dist/19572db4e7a381e7bf2fb83c32666be1.woff2 +1 -0
- package/dist/1a88434be4dcedb1a52f.woff2 +1 -0
- package/dist/1b9ba53f26dcc0beb844.woff2 +0 -0
- package/dist/1f4b4c24e700ed40c15d.woff +1 -0
- package/dist/232301dc2e7000ba9ed6.woff +0 -0
- package/dist/23d8d6b1a5073479abfcb58cf7b586b4.woff2 +1 -0
- package/dist/250c3a2ede6ce02f4a23.woff2 +0 -0
- package/dist/25338105b4de064cde15.woff +0 -0
- package/dist/29531b3b68d076a07707.woff2 +1 -0
- package/dist/2973470e0640c3bdee66.woff2 +0 -0
- package/dist/297ffdb5c554283afbb5.woff +0 -0
- package/dist/2a712138501c20b4d01b.woff2 +1 -0
- package/dist/2aed460e210a5e9fa9d2.woff2 +1 -0
- package/dist/33d1d8a1d63d6ae2f308.woff +1 -0
- package/dist/345cfd636ceea3a1a0f6.woff2 +0 -0
- package/dist/355190d2021a12f1cc6ad0525dd59c38.woff +1 -0
- package/dist/35c15972348798dad1efca7cf236175e.woff2 +1 -0
- package/dist/35fad97547043f76468c232e2bdf5a08.woff +1 -0
- package/dist/372969e7f85a7afdcb2946f68eab626d.woff +1 -0
- package/dist/386a08442f3625ff3fbe.woff2 +0 -0
- package/dist/3936ac0e60ab737d0f74.woff +0 -0
- package/dist/3a370a4e1fa49031c3f6.woff +0 -0
- package/dist/3b26695ac5295e07a0cd63df7ea66b10.woff2 +1 -0
- package/dist/3b99b639b060f6d2e0db5a0fdc495996.woff +1 -0
- package/dist/3c6d84970708c4007cf0159ba4df71c0.woff2 +1 -0
- package/dist/3ed2a6b08cffaa5b9790de3fc53b56f6.woff2 +1 -0
- package/dist/4082afcc8ecc984a4d8d.woff +0 -0
- package/dist/435b0f6f271370b0839f.woff +0 -0
- package/dist/43e7cfe43e0f0cf43319.woff +1 -0
- package/dist/47a0cd12a43866e41e9c.woff +1 -0
- package/dist/47aa3c5bb709255fac99.woff +0 -0
- package/dist/4847a2111cc8855a1e79.woff2 +0 -0
- package/dist/48fea4af52bcd858ce6d.woff +0 -0
- package/dist/49c3eb86c07f2edb67ea9aa6103c3b23.woff +1 -0
- package/dist/4a92609d862ec1ce681b.woff2 +1 -0
- package/dist/4b7978710036d8d520cf.woff +0 -0
- package/dist/4cc8c318e48c129331abd522210a6a3c.woff2 +1 -0
- package/dist/513294968676ce0c1b16.woff2 +1 -0
- package/dist/52204d5fcf3c5b87cd0048b120dd621c.woff +1 -0
- package/dist/5306fc642b7e9bca419c.woff2 +1 -0
- package/dist/537a6a86f72fc03dfb4b.woff2 +1 -0
- package/dist/54668f027d5519ae0290.woff +1 -0
- package/dist/54d4de458f4a7cf1de00.woff +1 -0
- package/dist/5518fbc8e4bc1fd8384e.woff +1 -0
- package/dist/582f881e26bdb790d1ab.woff2 +0 -0
- package/dist/58aa8475a6835b0930c56a994963aa05.woff2 +1 -0
- package/dist/59b92307682bb394d25b.woff2 +0 -0
- package/dist/5c4edf9d8f18059917c8bc1e2fa0ea90.woff2 +1 -0
- package/dist/5c8fa8cd79a6d09061de.woff +0 -0
- package/dist/5d51d5ad082ebe1aacec.woff2 +0 -0
- package/dist/5fdbb1bf3c7a7e0ed412.woff +1 -0
- package/dist/60cb1cbd11af7f89845b.woff2 +1 -0
- package/dist/60e20fa3232b4f90f34b5b3b1740e826.woff +1 -0
- package/dist/62c163261dab4a2f8eda3b31a6434adf.woff +1 -0
- package/dist/65940de5646f05a28592.woff +1 -0
- package/dist/66c62da463c3ce5c494d.woff +0 -0
- package/dist/66ceb65f7020d57d50b9.woff2 +0 -0
- package/dist/67e24d0983d58e847b05.woff +1 -0
- package/dist/691e82d42b380a7fe68f.woff +0 -0
- package/dist/69f2e3adff94869a1d8a.woff2 +0 -0
- package/dist/6aa01e407de54146957c547b30a3b0e6.woff +1 -0
- package/dist/6c601958e90e661de3382a7fe4f78e7f.woff2 +1 -0
- package/dist/6c690e1f6c653e4bf4866c11614f5827.woff2 +1 -0
- package/dist/6cfdc9d232b607d3df66.woff2 +0 -0
- package/dist/6d6421837c766e4d088f.woff +1 -0
- package/dist/6dc1dda9720e775f33dc.woff +0 -0
- package/dist/6dff4ee633b4cd8b6b39.woff +0 -0
- package/dist/6f4a6159caca9ab95587.woff2 +0 -0
- package/dist/70147ef2a77793b48d82.woff2 +1 -0
- package/dist/71e76016cb243cb61f4c.woff2 +0 -0
- package/dist/7251d5be33c6490cfb4986c3a49290e8.woff2 +1 -0
- package/dist/73240af009a904ae7afe.woff2 +1 -0
- package/dist/7472099cf2dd355e97a5.woff +1 -0
- package/dist/766750908073fa0cd7a6.woff +1 -0
- package/dist/774b80d9be696b17960a8deaef05adc0.woff2 +1 -0
- package/dist/77dce4945c4c5f155932.woff +1 -0
- package/dist/78a8b1f924d760497fa051e52fbb7795.woff2 +1 -0
- package/dist/79166d79f03989b8aba7.woff +1 -0
- package/dist/79baff6b2fa906d87852c03f7679eb3f.woff2 +1 -0
- package/dist/7b1d9b469b515b0c4cdd.woff +1 -0
- package/dist/7b57046ebc97a545f2bb.woff +0 -0
- package/dist/7b57de0ce8c95939e6b8.woff2 +1 -0
- package/dist/7c5ebcac4f4a3db1c778.woff2 +1 -0
- package/dist/7c761b0f2c601d1a483c.woff +0 -0
- package/dist/7e1290813e40739a052b.woff +1 -0
- package/dist/7e6a90782fef1d025002ed72b769e600.woff2 +1 -0
- package/dist/8036e0831788488e9ed646936f41fc05.woff +1 -0
- package/dist/81ad8820722a456be666.woff2 +1 -0
- package/dist/83cf4919339de9c1a4c48c9735a21723.woff +1 -0
- package/dist/8458a3bda74267bf5d97.woff2 +0 -0
- package/dist/89d77f5589e8a987ee717abe6d7e8dfd.woff2 +1 -0
- package/dist/8b45276c8d5867ea6b1e.woff2 +0 -0
- package/dist/8f03f0afb95f82422803.woff2 +0 -0
- package/dist/902e557cc62aff17d1b5.woff2 +0 -0
- package/dist/904e8c770706fdbf73a8.woff2 +0 -0
- package/dist/926521dbe259000a453262d6dcd49c7e.woff +1 -0
- package/dist/93368fc6cebb1d93c649.woff +1 -0
- package/dist/94623a4162bdde9850c432dcaf619b59.woff2 +1 -0
- package/dist/95775bff98b1cfdafc34dda5151c8802.woff +1 -0
- package/dist/973c21b55a914d39a309.woff +0 -0
- package/dist/9df6dc5e3cba70111b2be25f0692eb81.woff +1 -0
- package/dist/Table.js +1 -1
- package/dist/Table.js.map +1 -1
- package/dist/a118ebf10dd8a24c62c8.woff2 +1 -0
- package/dist/a3a96b09695f14dbd53a.woff2 +1 -0
- package/dist/a67b864a330c617dc636.woff2 +1 -0
- package/dist/a8e9c3637ef4939ceb079a3f13166bb8.woff2 +1 -0
- package/dist/a95154480606675e4b725f11d38034c2.woff +1 -0
- package/dist/ad100fe76ac13b04765ac92ef1ac9204.woff2 +1 -0
- package/dist/af077451598574c55faf.woff +1 -0
- package/dist/b24430ab47bf89dd9467.woff2 +1 -0
- package/dist/b27cb3871ed771961ef6f0abd49db997.woff2 +1 -0
- package/dist/b41f5a0ee6a4078d2c77.woff2 +1 -0
- package/dist/b5381a007239f959a8ffd87481486d32.woff2 +1 -0
- package/dist/b5fb6bb4bf91a7aaa50c.woff2 +0 -0
- package/dist/b66ab0190dcf7b5da696.woff +0 -0
- package/dist/b7b142be3ffae5c23169bac704b1bb60.woff +1 -0
- package/dist/b9649759f410addb8c032905cceeb97d.woff +1 -0
- package/dist/bd99033c95e6080c75315bbed34e6d59.woff2 +1 -0
- package/dist/bfe989eec14e93f897a73fb317c54aa9.woff2 +1 -0
- package/dist/c1899469e4a717878c96.woff +1 -0
- package/dist/c3776e542750e50906a6.woff2 +0 -0
- package/dist/c39f3347364862a2fcbc658a48ed4bd4.woff +1 -0
- package/dist/c3a7b44953f18240009b2e0ac912e9df.woff2 +1 -0
- package/dist/c431ed0a2362f8d52494.woff2 +0 -0
- package/dist/c577012f754683283865.woff2 +1 -0
- package/dist/c68ed1a8049685920a59dd4354f4aaa9.woff2 +1 -0
- package/dist/c8b0c1f510bf8de7daaf.woff +0 -0
- package/dist/c92cd7a3a5d153f9a0abf57dd804dd2b.woff +1 -0
- package/dist/c9b2b494eb80f7f2103e.woff2 +0 -0
- package/dist/components/Grid/Grid.js +32 -0
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Grid/index.js +18 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/Icon/Icons/components/Lines.js +21 -0
- package/dist/components/Icon/Icons/components/Lines.js.map +1 -0
- package/dist/components/Icon/Icons/components/Notifications.js +21 -0
- package/dist/components/Icon/Icons/components/Notifications.js.map +1 -0
- package/dist/components/Icon/Icons/components/Update.js +21 -0
- package/dist/components/Icon/Icons/components/Update.js.map +1 -0
- package/dist/components/NewTable/Table.js +6 -4
- package/dist/components/NewTable/Table.js.map +1 -1
- package/dist/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js +92 -87
- package/dist/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js.map +1 -1
- package/dist/d04675069ea1d1163d5b.woff +1 -0
- package/dist/d5c9e35869f14956363533d05784d64e.woff +1 -0
- package/dist/d77c896979b205e7f475.woff +1 -0
- package/dist/d819b79b58be33ac004b.woff +1 -0
- package/dist/d8e13db10ac0902e5aa9.woff +0 -0
- package/dist/d9ffac4b1274280a5dc6341396db6fac.woff +1 -0
- package/dist/da40969e6e82c3dc9082.woff2 +1 -0
- package/dist/da4786673aaa2c4b4f8d.woff +0 -0
- package/dist/db0557b7781482567e41.woff2 +0 -0
- package/dist/dbc02abfebdd8b088734.woff +0 -0
- package/dist/dcab3a63294cf260b4a8.woff2 +1 -0
- package/dist/e04ede2afc0ae86eded8.woff +1 -0
- package/dist/e2f1e36b0c624f25532d8f7eea997b81.woff2 +1 -0
- package/dist/e74b51075235ecbcce56ef63f802e2b4.woff +1 -0
- package/dist/e7ebb6275c8bf2c533ac.woff +0 -0
- package/dist/eaa4c684c6cbd502a918.woff2 +0 -0
- package/dist/ec8691527a0ae8f48e13.woff2 +1 -0
- package/dist/esm/components/Grid/Grid.d.ts +16 -0
- package/dist/esm/components/Grid/Grid.d.ts.map +1 -0
- package/dist/esm/components/Grid/index.d.ts +2 -0
- package/dist/esm/components/Grid/index.d.ts.map +1 -0
- package/dist/esm/components/Icon/Icons/components/Lines.d.ts +7 -0
- package/dist/esm/components/Icon/Icons/components/Lines.d.ts.map +1 -0
- package/dist/esm/components/Icon/Icons/components/Notifications.d.ts +7 -0
- package/dist/esm/components/Icon/Icons/components/Notifications.d.ts.map +1 -0
- package/dist/esm/components/Icon/Icons/components/Update.d.ts +7 -0
- package/dist/esm/components/Icon/Icons/components/Update.d.ts.map +1 -0
- package/dist/esm/components/NewTable/Table.d.ts.map +1 -1
- package/dist/esm/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.d.ts.map +1 -1
- package/dist/esm/src/components/Grid/Grid.js +2 -0
- package/dist/esm/src/components/Grid/Grid.js.map +1 -0
- package/dist/esm/src/components/Icon/Icons/components/Lines.js +2 -0
- package/dist/esm/src/components/Icon/Icons/components/Lines.js.map +1 -0
- package/dist/esm/src/components/Icon/Icons/components/Notifications.js +2 -0
- package/dist/esm/src/components/Icon/Icons/components/Notifications.js.map +1 -0
- package/dist/esm/src/components/Icon/Icons/components/Update.js +2 -0
- package/dist/esm/src/components/Icon/Icons/components/Update.js.map +1 -0
- package/dist/esm/src/components/NewTable/Table.js +1 -1
- package/dist/esm/src/components/NewTable/Table.js.map +1 -1
- package/dist/esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js +1 -1
- package/dist/esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js.map +1 -1
- package/dist/f0acd6dd9d2dfb3ee94805c0534aaf5a.woff2 +1 -0
- package/dist/f0ae7cd56c0838373da6.woff2 +1 -0
- package/dist/f127fb3e26067096b39f.woff2 +1 -0
- package/dist/f21524cbececeda8295b7e0da9cf9d33.woff +1 -0
- package/dist/f2798934e74c3cb482ac.woff +0 -0
- package/dist/f358e02809604db8670a4f2d76aab7c3.woff +1 -0
- package/dist/f3f79dee35d5d2e35177.woff2 +1 -0
- package/dist/f445886ca310d5db40df.woff +1 -0
- package/dist/f44bfcba9cd05a5294d6.woff +0 -0
- package/dist/f6f16d45b3baa0c950a8.woff +1 -0
- package/dist/faae70a4933c7cc49e51aaa6bcad28cc.woff +1 -0
- package/dist/faafc5bdf648fa17b73bc05f44cc9668.woff +1 -0
- package/dist/fc39afa9a656eea4bef0.woff +1 -0
- package/dist/fcd095115aef9c8af77c.woff2 +0 -0
- package/dist/fde15f04e1d14415a4e05ee9a8c2cf02.woff +1 -0
- package/dist/fonts/Alliance-Mono.164f4884488954efba9ec76591a73503.woff +1 -0
- package/dist/fonts/Alliance-Mono.4c7ac54a7dfa122f25d7fdd4dfeaa959.woff2 +1 -0
- package/dist/fonts/Alliance-NeueBlack.0bfbc1cb826066552dab836cb7fa0abf.woff +1 -0
- package/dist/fonts/Alliance-NeueBlack.4f4e74a44effbe81b54bf5615d44242c.woff2 +1 -0
- package/dist/fonts/Alliance-NeueBlackItalic.5bdd4e9c7011fd5cbd37de3004a4e2b5.woff2 +1 -0
- package/dist/fonts/Alliance-NeueBlackItalic.bdf77e17cb99795ff12ca52fb07f9509.woff +1 -0
- package/dist/fonts/Alliance-NeueBold.085208854e04300e39e641c5b5302b7a.woff2 +1 -0
- package/dist/fonts/Alliance-NeueBold.26ab7f9dc4625a669bfe6ba311ebab35.woff +1 -0
- package/dist/fonts/Alliance-NeueBoldItalic.07cfe7ca033edf2e2bd3f85af60bf982.woff +1 -0
- package/dist/fonts/Alliance-NeueBoldItalic.ffad1cb45886073ad03536d08e285e86.woff2 +1 -0
- package/dist/fonts/Alliance-NeueExtraBold.500b09c0240bbaab8d2c1c1820920dd7.woff2 +1 -0
- package/dist/fonts/Alliance-NeueExtraBold.66285fbff1ddc389ab8412d0fca73e83.woff +1 -0
- package/dist/fonts/Alliance-NeueExtraBoldtalic.a5a9e565750d9354f4c1477fab933da5.woff +1 -0
- package/dist/fonts/Alliance-NeueExtraBoldtalic.e8c96cad53be70f8daed48cca6544e70.woff2 +1 -0
- package/dist/fonts/Alliance-NeueLight.90627507b283a7c34980f01d535ac461.woff2 +1 -0
- package/dist/fonts/Alliance-NeueLight.96e91b7a125a510c1d45e3bffce258ef.woff +1 -0
- package/dist/fonts/Alliance-NeueLightItalic.4119bbc389ff1fb42a98ef5148878aca.woff +1 -0
- package/dist/fonts/Alliance-NeueLightItalic.e497adce676d88b4a324d72d54d7503b.woff2 +1 -0
- package/dist/fonts/Alliance-NeueMedium.11c212ee6182037495ac44ae96ea373b.woff +1 -0
- package/dist/fonts/Alliance-NeueMedium.ebac6e88e281a6a65f1cd736f0bb1773.woff2 +1 -0
- package/dist/fonts/Alliance-NeueMediumItalic.4e1ef4b1585c0db4a39328a9e3814ac1.woff +1 -0
- package/dist/fonts/Alliance-NeueMediumItalic.b238d352ce63753da0e1b45070f6800c.woff2 +1 -0
- package/dist/fonts/Alliance-NeueRegular.346720b42d66deed0e7864c026ac4db7.woff +1 -0
- package/dist/fonts/Alliance-NeueRegular.9e53ee3bcaa8730f79fd6602e063ba37.woff2 +1 -0
- package/dist/fonts/Alliance-NeueRegularItalic.75006e9967efb398fdabb1b891bd0662.woff +1 -0
- package/dist/fonts/Alliance-NeueRegularItalic.cf4653fd61156cdf12593439702b505b.woff2 +1 -0
- package/dist/fonts/Alliance-NeueSemiBold.23ef58d677dc1a87367b983f2a1615ca.woff +1 -0
- package/dist/fonts/Alliance-NeueSemiBold.e3134caa7f12179d56a7b8cbc366ab53.woff2 +1 -0
- package/dist/fonts/Alliance-NeueSemiBoldItalic.318b318f601637b94a7d47b487583225.woff2 +1 -0
- package/dist/fonts/Alliance-NeueSemiBoldItalic.6d99e64150789fd5e65ac98876564cd7.woff +1 -0
- package/dist/fonts/Alliance-PlattBlack.24515b6b495d6e088eab43b83b5f53da.woff +1 -0
- package/dist/fonts/Alliance-PlattBlack.fedf51c1aa1ec0093d2abe4bf62861c0.woff2 +1 -0
- package/dist/fonts/Alliance-PlattBold.64bf49a72df1e3891a0ad2b3cb4e5474.woff +1 -0
- package/dist/fonts/Alliance-PlattBold.6a2801d9ab5eab9dfd410a9a7d1e090d.woff2 +1 -0
- package/dist/fonts/Alliance-PlattExtraBold.31136655400a915e357400fdf6b078c6.woff2 +1 -0
- package/dist/fonts/Alliance-PlattExtraBold.4a87edc0a690f2cbd1401a63f3dea7ab.woff +1 -0
- package/dist/fonts/Alliance-PlattLight.690858eafc528a06bf5eda5dcc7900d2.woff +1 -0
- package/dist/fonts/Alliance-PlattLight.cf6ec141b53f807d6810e7c498f1d96e.woff2 +1 -0
- package/dist/fonts/Alliance-PlattMedium.7aac8ca74e0acd9be37fc902c5d4babd.woff2 +1 -0
- package/dist/fonts/Alliance-PlattMedium.e4a2d0d129128454af037a833551bb60.woff +1 -0
- package/dist/fonts/Alliance-PlattRegular.6af87dc403719e993c52aec8fa312b71.woff2 +1 -0
- package/dist/fonts/Alliance-PlattRegular.7e45b38b4b11450c7f1a56395dadf926.woff +1 -0
- package/dist/fonts/Alliance-PlattSemiBold.2f85b1819e3c6c2fd2a4f0baef97bede.woff2 +1 -0
- package/dist/fonts/Alliance-PlattSemiBold.610ebffbf604ea718f2441831353bd51.woff +1 -0
- package/dist/fonts/Alliance-TextBlack.90bd88eede54e46a9d811d1b8182d7af.woff +1 -0
- package/dist/fonts/Alliance-TextBlack.c06a65cf54fec9f5cc67d2b7dca82ce2.woff2 +1 -0
- package/dist/fonts/Alliance-TextBlackItalic.599dbb8ec28f6da4deb3ce7913e5f7f9.woff +1 -0
- package/dist/fonts/Alliance-TextBlackItalic.c448c5849f817bcf250a85c15802fd6f.woff2 +1 -0
- package/dist/fonts/Alliance-TextBold.0c6f0bb74d778e30051a983c071583bc.woff +1 -0
- package/dist/fonts/Alliance-TextBold.12d1680f5d22b5e8f1b851695444d31d.woff2 +1 -0
- package/dist/fonts/Alliance-TextBoldItalic.984801af03f8840991ed2932d9a4c2a2.woff2 +1 -0
- package/dist/fonts/Alliance-TextBoldItalic.e28b0f147377a5894123a5271fdc9af9.woff +1 -0
- package/dist/fonts/Alliance-TextExtraBold.6ba126ea38065b576cdd9f399b80643b.woff2 +1 -0
- package/dist/fonts/Alliance-TextExtraBold.8afab8df5a53b6b103afc05695d933c5.woff +1 -0
- package/dist/fonts/Alliance-TextExtraBoldItalic.25a229f8ba1981dfd99434d70019c44d.woff2 +1 -0
- package/dist/fonts/Alliance-TextExtraBoldItalic.f4486f5def1f6005a4276d9f2b859588.woff +1 -0
- package/dist/fonts/Alliance-TextLight.451bf0d6f8387b8e53a937817c7cf43f.woff +1 -0
- package/dist/fonts/Alliance-TextLight.719755f0df1b16bef8098f3aa5e10707.woff2 +1 -0
- package/dist/fonts/Alliance-TextLightItalic.21da52c8f0382e71d9dfde2f2b3a58c1.woff2 +1 -0
- package/dist/fonts/Alliance-TextLightItalic.75d2bff2c904dc017e6c05aeb42f6192.woff +1 -0
- package/dist/icons/Lines.js +3 -0
- package/dist/icons/Lines.js.LICENSE.txt +8 -0
- package/dist/icons/Lines.js.map +1 -0
- package/dist/icons/Notifications.js +3 -0
- package/dist/icons/Notifications.js.LICENSE.txt +8 -0
- package/dist/icons/Notifications.js.map +1 -0
- package/dist/icons/Update.js +3 -0
- package/dist/icons/Update.js.LICENSE.txt +8 -0
- package/dist/icons/Update.js.map +1 -0
- package/dist/images/5cf0119910166fb74bc03b63b0b0ce5e.png +1 -0
- package/dist/images/f983ea46ffaf2444f5381f222fb8b090.png +1 -0
- package/dist/images/faac24eb82dc03336fb46c0cbe81893d.png +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/mocked_classnames_esm/components/Grid/Grid.d.ts +16 -0
- package/dist/mocked_classnames_esm/components/Grid/Grid.d.ts.map +1 -0
- package/dist/mocked_classnames_esm/components/Grid/index.d.ts +2 -0
- package/dist/mocked_classnames_esm/components/Grid/index.d.ts.map +1 -0
- package/dist/mocked_classnames_esm/components/Icon/Icons/components/Lines.d.ts +7 -0
- package/dist/mocked_classnames_esm/components/Icon/Icons/components/Lines.d.ts.map +1 -0
- package/dist/mocked_classnames_esm/components/Icon/Icons/components/Notifications.d.ts +7 -0
- package/dist/mocked_classnames_esm/components/Icon/Icons/components/Notifications.d.ts.map +1 -0
- package/dist/mocked_classnames_esm/components/Icon/Icons/components/Update.d.ts +7 -0
- package/dist/mocked_classnames_esm/components/Icon/Icons/components/Update.d.ts.map +1 -0
- package/dist/mocked_classnames_esm/components/NewTable/Table.d.ts.map +1 -1
- package/dist/mocked_classnames_esm/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.d.ts.map +1 -1
- package/dist/mocked_classnames_esm/src/components/Grid/Grid.js +2 -0
- package/dist/mocked_classnames_esm/src/components/Grid/Grid.js.map +1 -0
- package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Lines.js +2 -0
- package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Lines.js.map +1 -0
- package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Notifications.js +2 -0
- package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Notifications.js.map +1 -0
- package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Update.js +2 -0
- package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Update.js.map +1 -0
- package/dist/mocked_classnames_esm/src/components/NewTable/Table.js +1 -1
- package/dist/mocked_classnames_esm/src/components/NewTable/Table.js.map +1 -1
- package/dist/mocked_classnames_esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js +1 -1
- package/dist/mocked_classnames_esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js.map +1 -1
- package/dist/types/components/Grid/Grid.d.ts +16 -0
- package/dist/types/components/Grid/Grid.d.ts.map +1 -0
- package/dist/types/components/Grid/index.d.ts +2 -0
- package/dist/types/components/Grid/index.d.ts.map +1 -0
- package/dist/types/components/Icon/Icons/components/Lines.d.ts +7 -0
- package/dist/types/components/Icon/Icons/components/Lines.d.ts.map +1 -0
- package/dist/types/components/Icon/Icons/components/Notifications.d.ts +7 -0
- package/dist/types/components/Icon/Icons/components/Notifications.d.ts.map +1 -0
- package/dist/types/components/Icon/Icons/components/Update.d.ts +7 -0
- package/dist/types/components/Icon/Icons/components/Update.d.ts.map +1 -0
- package/dist/types/components/NewTable/Table.d.ts.map +1 -1
- package/dist/types/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/NewTable/Table.tsx +19 -4
- package/src/components/NewTable/__stories__/NewTable.stories.tsx +222 -20
- package/src/components/NewTable/__stories__/newTable.mdx +132 -1
- package/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx +120 -117
@@ -0,0 +1,16 @@
|
|
1
|
+
import React, { ReactNode } from "react";
|
2
|
+
import { IGridContainerProps, IGridRowProps, IGridColProps } from "react-awesome-styled-grid";
|
3
|
+
interface GridContainerProps extends IGridContainerProps {
|
4
|
+
children: ReactNode;
|
5
|
+
}
|
6
|
+
interface GridRowProps extends IGridRowProps {
|
7
|
+
children: ReactNode;
|
8
|
+
}
|
9
|
+
interface GridColProps extends IGridColProps {
|
10
|
+
children: ReactNode;
|
11
|
+
}
|
12
|
+
export declare const GridContainer: React.FC<GridContainerProps>;
|
13
|
+
export declare const GridRow: React.FC<GridRowProps>;
|
14
|
+
export declare const GridCol: React.FC<GridColProps>;
|
15
|
+
export {};
|
16
|
+
//# sourceMappingURL=Grid.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAuB,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEnH,UAAU,kBAAmB,SAAQ,mBAAmB;IACtD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,YAAa,SAAQ,aAAa;IAC1C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,YAAa,SAAQ,aAAa;IAC1C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAE1C,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAE1C,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Lines.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACnE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAK/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
export interface NotificationsProps extends React.SVGAttributes<SVGElement> {
|
3
|
+
size?: string | number;
|
4
|
+
}
|
5
|
+
declare const Notifications: React.FC<NotificationsProps>;
|
6
|
+
export default Notifications;
|
7
|
+
//# sourceMappingURL=Notifications.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Notifications.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Notifications.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IAC3E,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAK/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Update.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAKjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/NewTable/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAUnE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,QAAA,MAAM,KAAK,
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/NewTable/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAUnE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,QAAA,MAAM,KAAK,wFAyGV,CAAC;AAQF,eAAe,KAAK,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useLeafyGreenTable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAgC,MAAM,GAAG,CAAC;AAYlE,QAAA,MAAM,kBAAkB,
|
1
|
+
{"version":3,"file":"useLeafyGreenTable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAgC,MAAM,GAAG,CAAC;AAYlE,QAAA,MAAM,kBAAkB,ogBAwVvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__rest as r}from"../../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import{Container as i,Row as n,Col as t}from"react-awesome-styled-grid";var c=function(n){var t=n.children,c=r(n,["children"]);return e(i,Object.assign({},c,{children:t}))},l=function(i){var t=i.children,c=r(i,["children"]);return e(n,Object.assign({},c,{children:t}))},a=function(i){var n=i.children,c=r(i,["children"]);return e(t,Object.assign({},c,{children:n}))};export{a as GridCol,c as GridContainer,l as GridRow};
|
2
|
+
//# sourceMappingURL=Grid.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Grid.js","sources":["../../../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import React, { ReactNode } from \"react\";\nimport { Container, Row, Col, IGridContainerProps, IGridRowProps, IGridColProps } from \"react-awesome-styled-grid\";\n\ninterface GridContainerProps extends IGridContainerProps {\n children: ReactNode;\n}\n\ninterface GridRowProps extends IGridRowProps {\n children: ReactNode;\n}\n\ninterface GridColProps extends IGridColProps {\n children: ReactNode;\n}\n\nexport const GridContainer: React.FC<GridContainerProps> = ({ children, ...props }) => {\n return <Container {...props}>{children}</Container>;\n};\n\nexport const GridRow: React.FC<GridRowProps> = ({ children, ...props }) => {\n return <Row {...props}>{children}</Row>;\n};\n\nexport const GridCol: React.FC<GridColProps> = ({ children, ...props }) => {\n return <Col {...props}>{children}</Col>;\n};\n"],"names":["GridContainer","_a","children","props","__rest","_jsx","Container","Object","assign","GridRow","Row","GridCol","Col"],"mappings":"yKAeaA,EAA8C,SAACC,GAAA,IAAEC,EAAoBD,EAApBC,SAAaC,EAAKC,EAAAH,EAApB,cAC1D,OAAOI,EAACC,EAASC,OAAAC,OAAA,CAAA,EAAKL,EAAQ,CAAAD,SAAAA,IAChC,EAEaO,EAAkC,SAACR,GAAA,IAAEC,EAAoBD,EAApBC,SAAaC,EAAKC,EAAAH,EAApB,cAC9C,OAAOI,EAACK,EAAGH,OAAAC,OAAA,CAAA,EAAKL,EAAQ,CAAAD,SAAAA,IAC1B,EAEaS,EAAkC,SAACV,GAAA,IAAEC,EAAoBD,EAApBC,SAAaC,EAAKC,EAAAH,EAApB,cAC9C,OAAOI,EAACO,EAAGL,OAAAC,OAAA,CAAA,EAAKL,EAAQ,CAAAD,SAAAA,IAC1B"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__rest as r}from"../../../../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";var t=function(t){var i=t.size,o=r(t,["size"]);return e("svg",Object.assign({viewBox:"0 0 20 20",fill:"currentColor",width:i||"20",height:i||"20"},o,{children:e("path",{d:"M16.8 5H2.79999M16.8 10H2.79999M16.8 15H2.79999",stroke:"currentColor",fill:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))};t.displayName="Lines";export{t as default};
|
2
|
+
//# sourceMappingURL=Lines.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Lines.js","sources":["../../../../../../../src/components/Icon/Icons/components/Lines.tsx"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport * as React from 'react';\nexport interface LinesProps extends React.SVGAttributes<SVGElement> {\nsize?: string | number;\n}\nconst Lines: React.FC<LinesProps> = ({size, ...props}) => (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width={ size || \"20\" } height={ size || \"20\" } {...props}>\n <path d=\"M16.8 5H2.79999M16.8 10H2.79999M16.8 15H2.79999\" stroke=\"currentColor\" fill=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"\n />\n </svg>\n);\nLines.displayName = 'Lines';\nexport default Lines;\n/* tslint:enable */\n/* eslint-enable */\n"],"names":["Lines","_a","size","props","__rest","_jsx","viewBox","fill","width","height","children","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","displayName"],"mappings":"mGAMA,IAAMA,EAA8B,SAACC,GAAA,IAACC,EAAeD,EAAfC,KAASC,EAAKC,EAAAH,EAAf,UAAqB,OACxDI,uBAAKC,QAAQ,YAAYC,KAAK,eAAeC,MAAQN,GAAQ,KAAOO,OAASP,GAAQ,MAAWC,EAC9F,CAAAO,SAAAL,EAAA,OAAA,CAAMM,EAAE,kDAAkDC,OAAO,eAAeL,KAAK,eAAeM,YAAY,MAAMC,cAAc,QAAQC,eAAe,cAI/Jf,EAAMgB,YAAc"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__rest as C}from"../../../../../_virtual/_tslib.js";import{jsx as i}from"react/jsx-runtime";var e=function(e){var r=e.size,t=C(e,["size"]);return i("svg",Object.assign({viewBox:"0 0 20 20",fill:"currentColor",width:r||"20",height:r||"20"},t,{children:i("path",{d:"M10 2.04999C10.4143 2.04999 10.75 2.38577 10.75 2.79999V3.61058C12.0546 3.75821 13.2785 4.34336 14.2159 5.28079C15.309 6.37389 15.9231 7.85644 15.9231 9.4023C15.9231 11.7406 16.1727 13.0548 16.3959 13.758C16.5068 14.1075 16.6088 14.2984 16.6645 14.3868C16.6835 14.4168 16.697 14.435 16.7038 14.4435C16.9179 14.6455 16.9953 14.9565 16.8964 15.2377C16.7908 15.538 16.5072 15.7389 16.1889 15.7389H12.9529C12.9516 15.8038 12.9418 15.8695 12.9226 15.9348C12.7439 16.5449 12.3725 17.0809 11.864 17.4623C11.3554 17.8437 10.7371 18.05 10.1015 18.05C9.46584 18.05 8.84746 17.8437 8.33891 17.4623C7.83037 17.0809 7.45905 16.5449 7.28027 15.9348C7.26115 15.8695 7.2513 15.8038 7.24997 15.7389H4.00001C3.71313 15.7389 3.45138 15.5752 3.32575 15.3173C3.20248 15.0643 3.23145 14.764 3.39963 14.5394C3.40133 14.5369 3.40486 14.5316 3.41004 14.5235C3.42459 14.5005 3.45231 14.4542 3.48918 14.3812C3.56285 14.2352 3.67358 13.9813 3.78854 13.5917C4.01863 12.812 4.26574 11.4886 4.26574 9.4023C4.26574 7.85644 4.87984 6.37389 5.97293 5.28079C6.865 4.38872 8.01646 3.81567 9.25004 3.63507V2.79999C9.25004 2.38577 9.58582 2.04999 10 2.04999ZM8.80705 15.7389C8.90698 15.9443 9.05465 16.1241 9.2389 16.2623C9.488 16.4491 9.79062 16.55 10.1015 16.55C10.4123 16.55 10.7149 16.4491 10.964 16.2623C11.1483 16.1241 11.2959 15.9443 11.3959 15.7389H8.80705ZM7.03359 6.34145C7.84538 5.52967 8.9464 5.07361 10.0944 5.07361C11.2425 5.07361 12.3435 5.52967 13.1553 6.34145C13.9671 7.15324 14.4231 8.25426 14.4231 9.4023C14.4231 11.8353 14.6814 13.3144 14.9661 14.2117L14.9748 14.2389H5.15815C5.18119 14.1682 5.20426 14.0941 5.22721 14.0163C5.50499 13.075 5.76574 11.6052 5.76574 9.4023C5.76574 8.25426 6.2218 7.15324 7.03359 6.34145Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}))};e.displayName="Notifications";export{e as default};
|
2
|
+
//# sourceMappingURL=Notifications.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Notifications.js","sources":["../../../../../../../src/components/Icon/Icons/components/Notifications.tsx"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport * as React from 'react';\nexport interface NotificationsProps extends React.SVGAttributes<SVGElement> {\nsize?: string | number;\n}\nconst Notifications: React.FC<NotificationsProps> = ({size, ...props}) => (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width={ size || \"20\" } height={ size || \"20\" } {...props}>\n <path d=\"M10 2.04999C10.4143 2.04999 10.75 2.38577 10.75 2.79999V3.61058C12.0546 3.75821 13.2785 4.34336 14.2159 5.28079C15.309 6.37389 15.9231 7.85644 15.9231 9.4023C15.9231 11.7406 16.1727 13.0548 16.3959 13.758C16.5068 14.1075 16.6088 14.2984 16.6645 14.3868C16.6835 14.4168 16.697 14.435 16.7038 14.4435C16.9179 14.6455 16.9953 14.9565 16.8964 15.2377C16.7908 15.538 16.5072 15.7389 16.1889 15.7389H12.9529C12.9516 15.8038 12.9418 15.8695 12.9226 15.9348C12.7439 16.5449 12.3725 17.0809 11.864 17.4623C11.3554 17.8437 10.7371 18.05 10.1015 18.05C9.46584 18.05 8.84746 17.8437 8.33891 17.4623C7.83037 17.0809 7.45905 16.5449 7.28027 15.9348C7.26115 15.8695 7.2513 15.8038 7.24997 15.7389H4.00001C3.71313 15.7389 3.45138 15.5752 3.32575 15.3173C3.20248 15.0643 3.23145 14.764 3.39963 14.5394C3.40133 14.5369 3.40486 14.5316 3.41004 14.5235C3.42459 14.5005 3.45231 14.4542 3.48918 14.3812C3.56285 14.2352 3.67358 13.9813 3.78854 13.5917C4.01863 12.812 4.26574 11.4886 4.26574 9.4023C4.26574 7.85644 4.87984 6.37389 5.97293 5.28079C6.865 4.38872 8.01646 3.81567 9.25004 3.63507V2.79999C9.25004 2.38577 9.58582 2.04999 10 2.04999ZM8.80705 15.7389C8.90698 15.9443 9.05465 16.1241 9.2389 16.2623C9.488 16.4491 9.79062 16.55 10.1015 16.55C10.4123 16.55 10.7149 16.4491 10.964 16.2623C11.1483 16.1241 11.2959 15.9443 11.3959 15.7389H8.80705ZM7.03359 6.34145C7.84538 5.52967 8.9464 5.07361 10.0944 5.07361C11.2425 5.07361 12.3435 5.52967 13.1553 6.34145C13.9671 7.15324 14.4231 8.25426 14.4231 9.4023C14.4231 11.8353 14.6814 13.3144 14.9661 14.2117L14.9748 14.2389H5.15815C5.18119 14.1682 5.20426 14.0941 5.22721 14.0163C5.50499 13.075 5.76574 11.6052 5.76574 9.4023C5.76574 8.25426 6.2218 7.15324 7.03359 6.34145Z\"\n fill=\"currentColor\" fillRule=\"evenodd\" clipRule=\"evenodd\" />\n </svg>\n);\nNotifications.displayName = 'Notifications';\nexport default Notifications;\n/* tslint:enable */\n/* eslint-enable */\n"],"names":["Notifications","_a","size","props","__rest","_jsx","Object","assign","viewBox","fill","width","height","children","d","fillRule","clipRule","displayName"],"mappings":"mGAMA,IAAMA,EAA8C,SAACC,GAAA,IAACC,EAAeD,EAAfC,KAASC,EAAKC,EAAAH,EAAf,UAAqB,OACxEI,EAAK,MAAAC,OAAAC,OAAA,CAAAC,QAAQ,YAAYC,KAAK,eAAeC,MAAQR,GAAQ,KAAOS,OAAST,GAAQ,MAAWC,EAAK,CAAAS,SACnGP,UAAMQ,EAAE,sqDACNJ,KAAK,eAAeK,SAAS,UAAUC,SAAS,gBAGtDf,EAAcgB,YAAc"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__rest as C}from"../../../../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";var r=function(r){var i=r.size,t=C(r,["size"]);return e("svg",Object.assign({viewBox:"0 0 20 20",fill:"currentColor",width:i||"20",height:i||"20"},t,{children:e("path",{d:"M10.4339 1.95001C11.5975 1.94802 12.7457 2.2162 13.7881 2.73345C14.8309 3.25087 15.7392 4.0034 16.4416 4.93172C17.1439 5.86004 17.6211 6.93879 17.8354 8.08295C18.0498 9.22712 17.9955 10.4054 17.6769 11.525C17.3582 12.6447 16.7839 13.675 15.9992 14.5348C15.2144 15.3946 14.2408 16.0604 13.1549 16.4798C12.0689 16.8991 10.9005 17.0606 9.74154 16.9514C8.72148 16.8553 7.73334 16.5518 6.83716 16.0612L4.29488 17.2723C3.23215 17.7786 2.12265 16.6693 2.6287 15.6064L3.83941 13.0637C3.26482 12.0144 2.94827 10.8411 2.91892 9.64118C2.88616 8.30174 3.21245 6.97794 3.86393 5.80714C4.51541 4.63635 5.46834 3.66124 6.62383 2.98299C7.77896 2.30495 9.09445 1.9483 10.4339 1.95001ZM10.4339 1.95001C10.4343 1.95001 10.4347 1.95001 10.4351 1.95001L10.434 2.70001L10.4326 1.95001C10.433 1.95001 10.4334 1.95001 10.4339 1.95001ZM13.1214 4.07712C12.2867 3.66294 11.3672 3.44826 10.4354 3.45001L10.4329 3.45001C9.3608 3.44846 8.30778 3.73387 7.38315 4.2766C6.45852 4.81934 5.69598 5.59963 5.17467 6.5365C4.65335 7.47337 4.39226 8.53268 4.41847 9.6045C4.44469 10.6763 4.75726 11.7216 5.32376 12.6319C5.45882 12.8489 5.47405 13.1198 5.36416 13.3506L4.28595 15.6151L6.54996 14.5366C6.78072 14.4266 7.05158 14.4418 7.26863 14.5768C8.05985 15.0689 8.95456 15.3706 9.88225 15.458C10.8099 15.5454 11.7452 15.4162 12.6145 15.0805C13.4837 14.7448 14.2631 14.2119 14.8912 13.5236C15.5194 12.8354 15.9791 12.0106 16.2341 11.1144C16.4892 10.2182 16.5327 9.27504 16.3611 8.35918C16.1895 7.44332 15.8075 6.57983 15.2453 5.83674C14.6831 5.09366 13.9561 4.49129 13.1214 4.07712Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}))};r.displayName="Update";export{r as default};
|
2
|
+
//# sourceMappingURL=Update.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Update.js","sources":["../../../../../../../src/components/Icon/Icons/components/Update.tsx"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport * as React from 'react';\nexport interface UpdateProps extends React.SVGAttributes<SVGElement> {\nsize?: string | number;\n}\nconst Update: React.FC<UpdateProps> = ({size, ...props}) => (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width={ size || \"20\" } height={ size || \"20\" } {...props}>\n <path d=\"M10.4339 1.95001C11.5975 1.94802 12.7457 2.2162 13.7881 2.73345C14.8309 3.25087 15.7392 4.0034 16.4416 4.93172C17.1439 5.86004 17.6211 6.93879 17.8354 8.08295C18.0498 9.22712 17.9955 10.4054 17.6769 11.525C17.3582 12.6447 16.7839 13.675 15.9992 14.5348C15.2144 15.3946 14.2408 16.0604 13.1549 16.4798C12.0689 16.8991 10.9005 17.0606 9.74154 16.9514C8.72148 16.8553 7.73334 16.5518 6.83716 16.0612L4.29488 17.2723C3.23215 17.7786 2.12265 16.6693 2.6287 15.6064L3.83941 13.0637C3.26482 12.0144 2.94827 10.8411 2.91892 9.64118C2.88616 8.30174 3.21245 6.97794 3.86393 5.80714C4.51541 4.63635 5.46834 3.66124 6.62383 2.98299C7.77896 2.30495 9.09445 1.9483 10.4339 1.95001ZM10.4339 1.95001C10.4343 1.95001 10.4347 1.95001 10.4351 1.95001L10.434 2.70001L10.4326 1.95001C10.433 1.95001 10.4334 1.95001 10.4339 1.95001ZM13.1214 4.07712C12.2867 3.66294 11.3672 3.44826 10.4354 3.45001L10.4329 3.45001C9.3608 3.44846 8.30778 3.73387 7.38315 4.2766C6.45852 4.81934 5.69598 5.59963 5.17467 6.5365C4.65335 7.47337 4.39226 8.53268 4.41847 9.6045C4.44469 10.6763 4.75726 11.7216 5.32376 12.6319C5.45882 12.8489 5.47405 13.1198 5.36416 13.3506L4.28595 15.6151L6.54996 14.5366C6.78072 14.4266 7.05158 14.4418 7.26863 14.5768C8.05985 15.0689 8.95456 15.3706 9.88225 15.458C10.8099 15.5454 11.7452 15.4162 12.6145 15.0805C13.4837 14.7448 14.2631 14.2119 14.8912 13.5236C15.5194 12.8354 15.9791 12.0106 16.2341 11.1144C16.4892 10.2182 16.5327 9.27504 16.3611 8.35918C16.1895 7.44332 15.8075 6.57983 15.2453 5.83674C14.6831 5.09366 13.9561 4.49129 13.1214 4.07712Z\"\n fill=\"currentColor\" fillRule=\"evenodd\" clipRule=\"evenodd\" />\n </svg>\n);\nUpdate.displayName = 'Update';\nexport default Update;\n/* tslint:enable */\n/* eslint-enable */\n"],"names":["Update","_a","size","props","__rest","_jsx","Object","assign","viewBox","fill","width","height","children","d","fillRule","clipRule","displayName"],"mappings":"mGAMA,IAAMA,EAAgC,SAACC,GAAA,IAACC,EAAeD,EAAfC,KAASC,EAAKC,EAAAH,EAAf,UAAqB,OAC1DI,EAAK,MAAAC,OAAAC,OAAA,CAAAC,QAAQ,YAAYC,KAAK,eAAeC,MAAQR,GAAQ,KAAOS,OAAST,GAAQ,MAAWC,EAAK,CAAAS,SACnGP,UAAMQ,EAAE,ygDACNJ,KAAK,eAAeK,SAAS,UAAUC,SAAS,gBAGtDf,EAAOgB,YAAc"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__rest as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as o}from"@emotion/react/jsx-runtime";import{forwardRef as
|
1
|
+
import{__rest as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as o}from"@emotion/react/jsx-runtime";import{forwardRef as a}from"react";import n from"prop-types";import r from"classnames";import i from"./components/TableContext/TableContext.js";import l from"./Table.module.scss.js";import s from"./components/newComponents/pagination/Pagination.js";import c from"../Text/Text.js";import d from"../Loader/Loader.js";var m=a((function(a,n){var m=a.children,g=a.className,p=a.shouldAlternateRowColor,b=void 0!==p&&p,h=a.table,u=a.disableAnimations,C=void 0!==u&&u,f=a.header,j=a.withPagination,P=void 0!==j&&j,v=a.emptyTableContent,T=void 0===v?t(c,Object.assign({color:c.colors.SECONDARY,align:c.align.CENTER},{children:"No Data."})):v,w=a.paginationProps,N=e(a,["children","className","shouldAlternateRowColor","baseFontSize","darkMode","table","disableAnimations","header","withPagination","emptyTableContent","paginationProps"]),S=h.getState,y=h.setPageSize,A=h.setPageIndex,O=h.previousPage,x=h.nextPage,R=h.loadedData,I=h.loadMoreTriggerRef,M=h.infiniteScrolling;h.getRowModel();var k=h.getSelectedRowModel().rows.length;return o("div",Object.assign({className:"".concat(l.tableContainerStyles," ").concat(l.tableWrapper)},{children:[f,t("div",Object.assign({ref:n,className:r(l.tableContainerStyles,l.tableContainer,g),tabIndex:0},{children:o(i,Object.assign({shouldAlternateRowColor:b,table:h,disableAnimations:C},{children:[o("table",Object.assign({className:r(l.baseStyles,l.themeLight)},N,{children:[m,0===R.length&&t("tbody",{children:t("tr",{children:t("td",Object.assign({colSpan:h.getAllColumns().length,className:l.emptyTableContent},{children:T}))})})]})),M&&t("div",Object.assign({ref:I,style:{height:"1px"}},{children:t("div",Object.assign({className:r(l.baseStyles,l.loader)},{children:t(d,{size:20,color:d.colors.PRIMARY,className:l.loader})}))}))]}))})),P&&t(s,Object.assign({itemsPerPage:S().pagination.pageSize,onItemsPerPageOptionChange:function(e){return y(Number(e))},numTotalItems:null==w?void 0:w.numTotalItems,currentPage:S().pagination.pageIndex+1,onCurrentPageOptionChange:function(e){return A(Number(e)-1)},onBackArrowClick:function(){return O()},onForwardArrowClick:function(){return x()},numSelectedItems:k},w))]}))}));m.propTypes={darkMode:n.bool,shouldAlternateRowColor:n.bool,emptyTableContent:n.node};export{m as default};
|
2
2
|
//# sourceMappingURL=Table.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../../../../src/components/NewTable/Table.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef, ReactNode } from \"react\";\n\nimport PropTypes from \"prop-types\";\nimport EmptyState from \"../EmptyState/EmptyState\";\nimport cx from \"classnames\";\n\nimport { TableContextProvider } from \"./components/TableContext\";\nimport { LGRowData } from \"./components/useLeafyGreenTable\";\n\nimport styles from \"./Table.module.scss\"; // Import SCSS styles\nimport { TableProps } from \"./Table.types\";\nimport Pagination from \"./components/newComponents/pagination\";\nimport Text from \"../Text/Text\";\nimport Loader from \"../Loader/Loader\";\n\nconst Table = forwardRef<HTMLDivElement, TableProps<any>>(\n <T extends LGRowData>(\n {\n children,\n className,\n shouldAlternateRowColor = false,\n baseFontSize: baseFontSizeProp,\n darkMode: darkModeProp,\n table,\n disableAnimations = false,\n header,\n withPagination = false,\n emptyTableContent = <Text color={Text.colors.SECONDARY} align={Text.align.CENTER}>No Data.</Text>,\n paginationProps,\n ...rest\n }: TableProps<T>,\n containerRef: ForwardedRef<HTMLDivElement>\n ) => {\n const { getState, setPageSize, setPageIndex, previousPage, nextPage } = table;\n const rows = table.getRowModel().rows;\n const numSelectedItems = table.getSelectedRowModel().rows.length;\n\n return (\n <div className={`${styles.tableContainerStyles} ${styles.tableWrapper}`}>\n {header}\n <div\n ref={containerRef}\n className={cx(styles.tableContainerStyles, styles.tableContainer,className)} // Use class from SCSS module\n tabIndex={0} // Allows keyboard interaction\n >\n <TableContextProvider\n shouldAlternateRowColor={shouldAlternateRowColor}\n table={table}\n disableAnimations={disableAnimations}\n >\n <table\n className={cx(\n styles.baseStyles, // Base styles from SCSS module\n styles.themeLight // Conditional theme styles\n )}\n {...rest}\n >\n {children}\n {
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../../../src/components/NewTable/Table.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef, ReactNode } from \"react\";\n\nimport PropTypes from \"prop-types\";\nimport EmptyState from \"../EmptyState/EmptyState\";\nimport cx from \"classnames\";\n\nimport { TableContextProvider } from \"./components/TableContext\";\nimport { LGRowData } from \"./components/useLeafyGreenTable\";\n\nimport styles from \"./Table.module.scss\"; // Import SCSS styles\nimport { TableProps } from \"./Table.types\";\nimport Pagination from \"./components/newComponents/pagination\";\nimport Text from \"../Text/Text\";\nimport Loader from \"../Loader/Loader\";\n\nconst Table = forwardRef<HTMLDivElement, TableProps<any>>(\n <T extends LGRowData>(\n {\n children,\n className,\n shouldAlternateRowColor = false,\n baseFontSize: baseFontSizeProp,\n darkMode: darkModeProp,\n table,\n disableAnimations = false,\n header,\n withPagination = false,\n emptyTableContent = <Text color={Text.colors.SECONDARY} align={Text.align.CENTER}>No Data.</Text>,\n paginationProps,\n ...rest\n }: TableProps<T>,\n containerRef: ForwardedRef<HTMLDivElement>\n ) => {\n //@ts-ignore\n const { getState, setPageSize, setPageIndex, previousPage, nextPage, loadedData, isLoading, loadMoreTriggerRef, infiniteScrolling } = table;\n const rows = table.getRowModel().rows;\n const numSelectedItems = table.getSelectedRowModel().rows.length;\n\n return (\n <div className={`${styles.tableContainerStyles} ${styles.tableWrapper}`}>\n {header}\n <div\n ref={containerRef}\n className={cx(styles.tableContainerStyles, styles.tableContainer,className)} // Use class from SCSS module\n tabIndex={0} // Allows keyboard interaction\n >\n <TableContextProvider\n shouldAlternateRowColor={shouldAlternateRowColor}\n table={table}\n disableAnimations={disableAnimations}\n >\n <table\n className={cx(\n styles.baseStyles, // Base styles from SCSS module\n styles.themeLight // Conditional theme styles\n )}\n {...rest}\n >\n {children}\n {loadedData.length === 0 && (\n <tbody>\n <tr>\n <td\n colSpan={table.getAllColumns().length}\n className={styles.emptyTableContent}\n >\n {emptyTableContent}\n </td>\n </tr>\n </tbody>\n )}\n {/* @ts-ignore */}\n {/* {isLoading && (\n <tr className={styles.loaderRow}>\n <td colSpan={table.getAllColumns().length}>\n <div className={styles.loader}>\n <Loader\n size={20}\n color={Loader.colors.PRIMARY}\n className={styles.loader}\n />\n </div>\n </td>\n </tr>\n )} */}\n </table>\n {infiniteScrolling && (\n <div ref={loadMoreTriggerRef} style={{ height: '1px' }} >\n <div className={cx(\n styles.baseStyles, // Base styles from SCSS module\n styles.loader\n )}>\n <Loader\n size={20}\n color={Loader.colors.PRIMARY}\n className={styles.loader}\n />\n </div>\n </div>\n )}\n </TableContextProvider>\n </div>\n {withPagination && (\n <Pagination\n itemsPerPage={getState().pagination.pageSize}\n onItemsPerPageOptionChange={(value) => setPageSize(Number(value))}\n numTotalItems={paginationProps?.numTotalItems}\n currentPage={getState().pagination.pageIndex + 1}\n onCurrentPageOptionChange={(value) =>\n setPageIndex(Number(value) - 1)\n }\n onBackArrowClick={() => previousPage()}\n onForwardArrowClick={() => nextPage()}\n numSelectedItems={numSelectedItems}\n {...paginationProps}\n />\n )}\n </div>\n );\n }\n);\n\nTable.propTypes = {\n darkMode: PropTypes.bool,\n shouldAlternateRowColor: PropTypes.bool,\n emptyTableContent: PropTypes.node,\n};\n\nexport default Table;\n"],"names":["Table","forwardRef","_a","containerRef","children","className","_a$shouldAlternateRow","shouldAlternateRowColor","table","_a$disableAnimations","disableAnimations","header","_a$withPagination","withPagination","_a$emptyTableContent","emptyTableContent","_jsx","Text","Object","assign","color","colors","SECONDARY","align","CENTER","paginationProps","rest","__rest","getState","setPageSize","setPageIndex","previousPage","nextPage","loadedData","loadMoreTriggerRef","infiniteScrolling","getRowModel","numSelectedItems","getSelectedRowModel","rows","length","_jsxs","concat","styles","tableContainerStyles","tableWrapper","ref","cx","tableContainer","tabIndex","TableContextProvider","baseStyles","themeLight","colSpan","getAllColumns","style","height","loader","Loader","size","PRIMARY","Pagination","itemsPerPage","pagination","pageSize","onItemsPerPageOptionChange","value","Number","numTotalItems","currentPage","pageIndex","onCurrentPageOptionChange","onBackArrowClick","onForwardArrowClick","propTypes","darkMode","PropTypes","bool","node"],"mappings":"2aAeMA,IAAAA,EAAQC,GACZ,SACEC,EAcAC,OAbEC,EAUeF,EAVfE,SACAC,EASeH,EATfG,UAASC,EASMJ,EARfK,wBAAAA,OAA0B,IAAHD,GAAQA,EAG/BE,EAKeN,EALfM,MAAKC,EAKUP,EAJfQ,kBAAAA,OAAoB,IAAHD,GAAQA,EACzBE,EAGeT,EAHfS,OAAMC,EAGSV,EAFfW,eAAAA,OAAiB,IAAHD,GAAQA,EAAAE,EAEPZ,EADfa,kBAAAA,OAAiB,IAAAD,EAAGE,EAACC,EAAIC,OAAAC,OAAA,CAACC,MAAOH,EAAKI,OAAOC,UAAWC,MAAON,EAAKM,MAAMC,QAAuB,CAAApB,SAAA,cAAAU,EACjGW,EAAevB,EAAfuB,gBACGC,EAZLC,EAAAzB,EAAA,CAAA,WAAA,YAAA,0BAAA,eAAA,WAAA,QAAA,oBAAA,SAAA,iBAAA,oBAAA,oBAiBQ0B,EAA8HpB,EAA9HoB,SAAUC,EAAoHrB,EAApHqB,YAAaC,EAAuGtB,EAAvGsB,aAAcC,EAAyFvB,EAAzFuB,aAAcC,EAA2ExB,EAA3EwB,SAAUC,EAAiEzB,EAAjEyB,WAAuBC,EAA0C1B,EAA1C0B,mBAAoBC,EAAsB3B,EAAtB2B,kBACnG3B,EAAM4B,cACnB,IAAMC,EAAmB7B,EAAM8B,sBAAsBC,KAAKC,OAE1D,OACEC,EAAA,MAAAvB,OAAAC,OAAA,CAAKd,UAAS,GAAAqC,OAAKC,EAAOC,qBAAoB,KAAAF,OAAIC,EAAOE,eACtD,CAAAzC,SAAA,CAAAO,EACDK,EAAA,MAAAE,OAAAC,OAAA,CACE2B,IAAK3C,EACLE,UAAW0C,EAAGJ,EAAOC,qBAAsBD,EAAOK,eAAe3C,G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
-
import{slicedToArray as e,toConsumableArray as n}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as t}from"../../../../../_virtual/_tslib.js";import{jsx as o}from"@emotion/react/jsx-runtime";import{useState as i,useRef as
|
1
|
+
import{slicedToArray as e,toConsumableArray as n}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as t}from"../../../../../_virtual/_tslib.js";import{jsx as o}from"@emotion/react/jsx-runtime";import{useState as i,useRef as l,useCallback as r,useEffect as a,useMemo as c}from"react";import{useVirtual as s}from"react-virtual";import{getCoreRowModel as u,getSortedRowModel as d,getPaginationRowModel as g,useReactTable as f}from"@tanstack/react-table";import m from"lodash/omit";import{TableHeaderCheckbox as h}from"./TableHeaderCheckbox.js";import{TableRowCheckbox as v}from"./TableRowCheckbox.js";import w from"../../../Icon/Icons/components/Settings.js";import b from"../../../IconButton/IconButton.js";import R from"../ToggleExpandedIcon/ToggleExpandedIcon.js";import S from"../../../Dialog/Dialog.js";import p from"../../../DialogContentContainer/DialogContentContainer.js";import C from"../../../Checkbox/Checkbox.js";import I from"../../../ListItem/ListItem.js";var j=function(j){var x=j.containerRef,O=j.data,M=j.columns,y=j.hasSelectableRows,z=j.withPagination,T=void 0!==z&&z,k=j.useVirtualScrolling,E=void 0!==k&&k,A=j.allowSelectAll,L=void 0===A||A,P=j.allowSelectSingle,D=void 0!==P&&P,_=j.onSelect,B=j.virtualizerOptions,H=j.initiallySelectedRowIds,V=void 0===H?[]:H,F=j.onRowSelectionChange,U=j.columnManager,K=void 0!==U&&U,X=j.isExpandable,N=void 0!==X&&X,q=j.hoverIcon,G=j.selectCurrentPageOnly,J=void 0!==G&&G,Q=j.onUnselectAll,W=j.initialState,Y=j.initialLoadCount,Z=void 0===Y?20:Y,$=j.loadMoreCount,ee=void 0===$?10:$,ne=j.onLoadMore,te=j.infiniteScrolling,oe=void 0!==te&&te,ie=j.autoResetPageIndex,le=void 0===ie||ie,re=j.selectAllRows,ae=void 0!==re&&re,ce=t(j,["containerRef","data","columns","hasSelectableRows","withPagination","useVirtualScrolling","allowSelectAll","allowSelectSingle","onSelect","virtualizerOptions","initiallySelectedRowIds","onRowSelectionChange","columnManager","isExpandable","hoverIcon","selectCurrentPageOnly","onUnselectAll","initialState","initialLoadCount","loadMoreCount","onLoadMore","infiniteScrolling","autoResetPageIndex","selectAllRows"]),se=i({}),ue=e(se,2),de=ue[0],ge=ue[1],fe=i(null),me=e(fe,2),he=me[0],ve=me[1],we=i(!1),be=e(we,2),Re=be[0],Se=be[1],pe=i([]),Ce=e(pe,2),Ie=Ce[0],je=Ce[1],xe=i(!1),Oe=e(xe,2),Me=Oe[0],ye=Oe[1],ze=i(!1),Te=e(ze,2),ke=Te[0],Ee=Te[1],Ae=l(null),Le=l(!1),Pe=l({}),De=l([]),_e=l(null),Be=l(null),He=r((function(e,n){var t,o;return y&&null!==(o=null===(t=e.id)||void 0===t?void 0:""+t)&&void 0!==o?o:""+n}),[y]);a((function(){!Le.current&&y&&(Pe.current=V.reduce((function(e,n){return e[""+n]=!0,e}),{}),Le.current=!0)}),[V,y]),a((function(){je(oe?O.slice(0,Z):O)}),[O,oe,Z]),a((function(){if(O!==De.current&&y){var e=Object.assign(Object.assign({},Pe.current),de),n={};O.forEach((function(t,o){var i=He(t,o);e[i]&&(n[i]=!0)})),ge(n),De.current=O}}),[O,He,y]);var Ve={id:"select",size:14,header:h,cell:v};a((function(){if(ae&&y){var e=O.reduce((function(e,n,t){return e[He(n,t)]=!0,e}),{});ge(e)}}),[ae,y,O,He]);var Fe=c((function(){return M.some((function(e){return!!e.enableSorting}))}),[M]),Ue=L?Ve:m(Ve,"header"),Ke={id:"expander",size:30,header:function(){return null},cell:function(e){var n=e.row;return n.getCanExpand()?o(R,{isExpanded:n.getIsExpanded(),toggleExpanded:function(){return n.toggleExpanded()},disabled:!1}):null}},Xe={id:"hoverIcon",size:30,sticky:"right",header:function(){return null},cell:function(e){return o("span",Object.assign({style:{display:"block",height:"100%"}},{children:he===e.row.index&&q}))}},Ne=c((function(){var e=M.filter((function(e){return"left"===e.sticky})),t=M.filter((function(e){return"right"===e.sticky})),i=0,l=0;return[].concat(n(y?[Ue]:[]),n(N?[Ke]:[]),n(M.map((function(n,o){var r,a,c,s=Object.assign(Object.assign({},n),{align:null!==(r=n.align)&&void 0!==r?r:"left",enableSorting:null!==(a=n.enableSorting)&&void 0!==a&&a,isResizable:null!==(c=n.isResizable)&&void 0!==c&&c,cell:n.cell||function(e){return(0,e.getValue)()}});return"left"===n.sticky?(s.left=i,i+=n.size,s.isLastStickyLeft=o===e.length-1):"right"===n.sticky&&(s.right=(l+=n.size)-n.size,s.isFirstStickyRight=o===M.length-t.length),s})).map((function(e,n,o){return"right"===e.sticky&&(e.isFirstStickyRight=n===o.length-t.length),e}))),[q?Xe:null],n(K?[{id:"columnManager",size:20,header:function(){var e;return o(S,Object.assign({showTrigger:[S.hideShowTriggers.CLICK],hideTrigger:[S.hideShowTriggers.CLICK_OUTSIDE],position:S.positions.BOTTOM_END,open:ke,content:o(p,{children:tn.getAllLeafColumns().slice(0,-1).map((function(e,n){return o(I,{children:o(C,{checked:e.getIsVisible(),label:e.columnDef.header||e.id,onChange:e.getToggleVisibilityHandler(),"aria-labelledby":"iui-column-".concat(e.id)})},"".concat(e.id,"-").concat(n))}))},"small"),onDialogDidHide:function(){return Ee(!1)}},{children:o(b,{ariaLabel:"Customize",size:null===(e=null==b?void 0:b.sizes)||void 0===e?void 0:e.XXS,icon:w,ref:Ae,onClick:function(){return Ee(!0)}})}))},cell:function(){return null}}]:[])).filter(Boolean)}),[M,y,Ue,K,N,q,ke]),qe=i("onChange"),Ge=e(qe,2),Je=Ge[0],Qe=i("ltr"),We=e(Qe,2),Ye=We[0],Ze=function(e){if(y){var n=Object.assign({},Pe.current),t=J?tn.getPageRows():tn.getPreFilteredRowModel().rows,o=null!=e?e:!tn.getIsAllRowsSelected();t.forEach((function(e){n[e.id]=o})),ge(n)}},$e=function(){y&&(ge({}),Pe.current={},null==Q||Q())},en=r((function(){oe&&!Me&&O.length>Ie.length&&(ye(!0),setTimeout((function(){je((function(e){var t=O.slice(e.length,e.length+ee);return[].concat(n(e),n(t))})),ye(!1),ne&&ne()}),500))}),[oe,Me,O,ee,ne,Ie.length]);a((function(){return oe&&Be.current&&(_e.current=new IntersectionObserver((function(e){e[0].isIntersecting&&en()}),{threshold:.1}),_e.current.observe(Be.current)),function(){_e.current&&_e.current.disconnect()}}),[oe,en]);var nn=Object.assign({data:Ie,columns:Ne,getCoreRowModel:u(),getRowCanExpand:function(e){var n;return!!e.original.renderExpandedContent||!!(null===(n=e.subRows)||void 0===n?void 0:n.length)},enableExpanding:!0,enableSortingRemoval:!!Fe||void 0,getSubRows:function(e){return e.subRows},getSortedRowModel:d(),getPaginationRowModel:T?g():void 0,initialState:W||void 0,columnResizeMode:Je,columnResizeDirection:Ye,autoResetPageIndex:le},ce);y&&(nn.getRowId=He,nn.state={rowSelection:de},nn.onRowSelectionChange=ge);var tn=f(nn);tn.toggleAllRowsSelected=Ze,tn.unselectAllRows=$e;var on=tn.getCoreRowModel().rows,ln=(tn.getPaginationRowModel(),s(Object.assign({parentRef:x,size:on.length,overscan:30},B)));return a((function(){if(F&&y){var e=O.filter((function(e,n){return de[He(e,n)]}));F(e)}}),[de,O,F,He,y]),Object.assign(Object.assign(Object.assign(Object.assign({},tn),{handleRowClick:function(e){if(D){var n=O.find((function(n,t){return He(n,t)===e}));null==_||_(n)}},toggleAllRowsSelected:Ze,unselectAllRows:$e}),E&&{virtualRows:ln.virtualItems,totalSize:ln.totalSize,scrollToIndex:ln.scrollToIndex,scrollToOffset:ln.scrollToOffset,measure:ln.measure}),{hasSelectableRows:y,showColumnManager:Re,setShowColumnManager:Se,columnManagerRef:Ae,setHoveredRow:ve,isLoading:Me,loadedData:Ie,loadMoreTriggerRef:Be,infiniteScrolling:oe,loadMoreRows:en})};export{j as default};
|
2
2
|
//# sourceMappingURL=useLeafyGreenTable.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useLeafyGreenTable.js","sources":["../../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"sourcesContent":["//@ts-nocheck\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState, useCallback } from \"react\";\nimport { useVirtual } from \"react-virtual\";\nimport { useReactTable, ColumnResizeMode, ColumnResizeDirection } from \"@tanstack/react-table\";\nimport { getCoreRowModel, getPaginationRowModel, getSortedRowModel } from \"@tanstack/react-table\";\nimport omit from \"lodash/omit\";\nimport { TableHeaderCheckbox } from \"./TableHeaderCheckbox\";\nimport { TableRowCheckbox } from \"./TableRowCheckbox\";\nimport { LeafyGreenTableOptions, LGRowData } from \"./useLeafyGreenTable.types\";\nimport { LeafyGreenTable, LGColumnDef, LGTableDataType } from \".\";\nimport Settings from \"../../../Icon/Icons/components/Settings\";\nimport IconButton from \"../../../IconButton/IconButton\";\nimport ToggleExpandedIcon from \"../ToggleExpandedIcon\";\nimport Dialog from \"../../../Dialog/Dialog\";\nimport List from \"../../../List/List\";\nimport DialogContentContainer from \"../../../DialogContentContainer/DialogContentContainer\";\nimport Checkbox from \"../../../Checkbox/Checkbox\";\nimport ListItem from \"../../../ListItem/ListItem\";\n\nconst CHECKBOX_WIDTH = 14;\n\nconst useLeafyGreenTable = <T extends LGRowData, V extends unknown = unknown>({\n containerRef,\n data,\n columns: columnsProp,\n hasSelectableRows,\n withPagination = false,\n useVirtualScrolling = false,\n allowSelectAll = true,\n allowSelectSingle = false,\n onSelect,\n virtualizerOptions,\n initiallySelectedRowIds = [],\n onRowSelectionChange,\n columnManager = false,\n isExpandable = false,\n hoverIcon,\n selectCurrentPageOnly = false,\n onUnselectAll,\n initialState,\n initialLoadCount = 20, \n loadMoreCount = 10, \n onLoadMore, \n infiniteScrolling = false,\n autoResetPageIndex = true,\n selectAllRows = false,\n ...rest\n}: LeafyGreenTableOptions<T, V>): LeafyGreenTable<T> => {\n const [rowSelection, setRowSelection] = useState<{ [key: string]: boolean }>({});\n const [hoveredRow, setHoveredRow] = useState<number | null>(null);\n const [showColumnManager, setShowColumnManager] = useState(false);\n const [loadedData, setLoadedData] = useState<T[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [isDialogOpen, setIsDialogOpen] = useState(false);\n\n const columnManagerRef = useRef<HTMLButtonElement>(null);\n const isInitialSetupDone = useRef(false);\n\n useEffect(() => {\n if (loadedData.length === 0) {\n setLoadedData(infiniteScrolling ? data.slice(0, initialLoadCount) : data);\n } else {\n setTimeout(() => {\n setLoadedData(infiniteScrolling ? data.slice(0, loadedData.length) : data);\n }, 0);\n }\n }, [data, initialLoadCount, infiniteScrolling, loadedData.length]);\n\n const baseSelectColumnConfig: LGColumnDef<T, V> = {\n id: \"select\",\n size: CHECKBOX_WIDTH,\n header: TableHeaderCheckbox,\n cell: TableRowCheckbox,\n };\n\n useEffect(() => {\n if (selectAllRows && hasSelectableRows) {\n const allSelected = loadedData.reduce((acc, row, index) => {\n acc[index] = true;\n return acc;\n }, {});\n setRowSelection(allSelected);\n }\n }, [selectAllRows, hasSelectableRows, loadedData]);\n\n const handleRowClick = (rowId: number) => {\n if (allowSelectSingle) {\n const selectedRowData = loadedData.find((d) => d.id === Number(rowId) + 1);\n onSelect?.(selectedRowData);\n }\n };\n\n const hasSortableColumns = useMemo(() => columnsProp.some((propCol) => !!propCol.enableSorting), [columnsProp]);\n\n const selectColumnConfig = allowSelectAll ? baseSelectColumnConfig : omit(baseSelectColumnConfig, \"header\");\n\n const expandColumnConfig: LGColumnDef<T, V> = {\n id: \"expander\",\n size: 30,\n header: () => null,\n cell: ({ row }) => {\n const isExpandable = row.getCanExpand();\n return isExpandable ? (\n <ToggleExpandedIcon\n isExpanded={row.getIsExpanded()}\n toggleExpanded={() => row.toggleExpanded()}\n disabled={false}\n />\n ) : null;\n },\n };\n\n const hoverIconConfig: LGColumnDef<T, V> = {\n id: \"hoverIcon\",\n size: 30,\n sticky: \"right\",\n header: () => null,\n cell: ({ row }) => (\n <span style={{ display: \"block\", height: \"100%\" }}>\n {hoveredRow === row.index && hoverIcon}\n </span>\n ),\n };\n\n const columns = useMemo<Array<LGColumnDef<T, V>>>(() => {\n const stickyLeftColumns = columnsProp.filter((col) => col.sticky === \"left\");\n const stickyRightColumns = columnsProp.filter((col) => col.sticky === \"right\");\n\n let leftOffset = 0;\n let rightOffset = 0;\n\n return [\n ...(hasSelectableRows ? [selectColumnConfig as LGColumnDef<T, V>] : []),\n ...(isExpandable ? [expandColumnConfig] : []),\n ...columnsProp\n .map((propColumn, index) => {\n const newColumn = {\n ...propColumn,\n align: propColumn.align ?? \"left\",\n enableSorting: propColumn.enableSorting ?? false,\n isResizable: propColumn.isResizable ?? false,\n cell: propColumn.cell || (({ getValue }) => getValue()),\n };\n\n if (propColumn.sticky === \"left\") {\n newColumn.left = leftOffset;\n leftOffset += propColumn.size;\n newColumn.isLastStickyLeft = index === stickyLeftColumns.length - 1;\n } else if (propColumn.sticky === \"right\") {\n rightOffset += propColumn.size;\n newColumn.right = rightOffset - propColumn.size;\n newColumn.isFirstStickyRight = index === columnsProp.length - stickyRightColumns.length;\n }\n\n return newColumn;\n })\n .map((column, index, columns) => {\n if (column.sticky === \"right\") {\n column.isFirstStickyRight = index === columns.length - stickyRightColumns.length;\n }\n return column;\n }),\n hoverIcon ? hoverIconConfig : null,\n ...(columnManager\n ? [\n {\n id: \"columnManager\",\n size: 20,\n header: () => (\n <Dialog\n showTrigger={[Dialog.hideShowTriggers.CLICK]}\n hideTrigger={[Dialog.hideShowTriggers.CLICK_OUTSIDE]}\n position={Dialog.positions.BOTTOM_END}\n open={isDialogOpen}\n content={\n <DialogContentContainer key=\"small\">\n {table.getAllLeafColumns().slice(0, -1).map((column, index) => (\n <ListItem key={`${column.id}-${index}`}>\n <Checkbox\n checked={column.getIsVisible()}\n label={column.columnDef.header as string || column.id}\n onChange={column.getToggleVisibilityHandler()}\n aria-labelledby={`iui-column-${column.id}`}\n />\n </ListItem>\n ))}\n </DialogContentContainer> \n }\n onDialogDidHide={() => setIsDialogOpen(false)}\n >\n <IconButton\n ariaLabel=\"Customize\"\n size={IconButton?.sizes?.XXS}\n icon={Settings}\n ref={columnManagerRef}\n onClick={() => setIsDialogOpen(true)}\n />\n </Dialog>\n ),\n cell: () => null,\n },\n ]\n : []),\n ].filter(Boolean);\n }, [columnsProp, hasSelectableRows, selectColumnConfig, columnManager, isExpandable, hoverIcon, isDialogOpen]);\n\n const [columnResizeMode, setColumnResizeMode] = useState<ColumnResizeMode>(\"onChange\");\n const [columnResizeDirection, setColumnResizeDirection] = useState<ColumnResizeDirection>(\"ltr\");\n\n const table = useReactTable<LGTableDataType<T>>({\n data: loadedData,\n columns,\n getCoreRowModel: getCoreRowModel(),\n getRowCanExpand: (row) => !!row.original.renderExpandedContent || !!row.subRows?.length,\n enableExpanding: true,\n enableSortingRemoval: hasSortableColumns ? true : undefined,\n getSubRows: (row) => row.subRows,\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: withPagination ? getPaginationRowModel() : undefined,\n initialState: initialState ? initialState : undefined,\n state: { rowSelection },\n onRowSelectionChange: setRowSelection,\n columnResizeMode,\n columnResizeDirection,\n autoResetPageIndex,\n ...rest,\n });\n\n const { rows } = table.getCoreRowModel();\n const { rows: paginationRows } = table.getPaginationRowModel();\n const _rowVirtualizer = useVirtual({\n parentRef: containerRef,\n size: rows.length,\n overscan: 30,\n ...virtualizerOptions,\n });\n\n const loadMoreRows = useCallback(() => {\n if (!infiniteScrolling || isLoading || loadedData.length >= data.length) return;\n setIsLoading(true);\n setTimeout(() => {\n setLoadedData((prevData) => {\n const nextData = data.slice(prevData.length, prevData.length + loadMoreCount);\n return [...prevData, ...nextData];\n });\n setIsLoading(false);\n }, 1000);\n }, [infiniteScrolling, isLoading, data, loadMoreCount]);\n\n useEffect(() => {\n const handleScroll = () => {\n if (\n infiniteScrolling &&\n containerRef.current &&\n containerRef.current.scrollHeight - containerRef.current.scrollTop ===\n containerRef.current.clientHeight\n ) {\n loadMoreRows();\n }\n };\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener(\"scroll\", handleScroll);\n return () => {\n container.removeEventListener(\"scroll\", handleScroll);\n };\n }\n }, [containerRef, loadMoreRows, infiniteScrolling]);\n\n useEffect(() => {\n const checkContainerHeight = () => {\n if (\n infiniteScrolling &&\n containerRef.current &&\n containerRef.current.scrollHeight <= containerRef.current.clientHeight\n ) {\n loadMoreRows();\n }\n };\n\n const container = containerRef.current;\n if (container) {\n const observer = new MutationObserver(checkContainerHeight);\n observer.observe(container, { childList: true, subtree: true });\n \n checkContainerHeight();\n\n return () => {\n observer.disconnect();\n };\n }\n }, [containerRef, infiniteScrolling, loadMoreRows]);\n\n const toggleAllRowsSelected = () => {\n const isAllRowsSelected = selectCurrentPageOnly\n ? paginationRows.every((row) => rowSelection[row.id])\n : rows.every((row) => rowSelection[row.id]);\n\n const newSelection = {};\n const rowsToSelect = selectCurrentPageOnly ? paginationRows : rows;\n\n rowsToSelect.forEach((row) => {\n newSelection[row.id] = !isAllRowsSelected;\n });\n\n setRowSelection(newSelection);\n };\n\n const unselectAllRows = () => {\n setRowSelection({});\n onUnselectAll?.();\n };\n\n table.toggleAllRowsSelected = toggleAllRowsSelected;\n table.unselectAllRows = unselectAllRows;\n\n useEffect(() => {\n if (onRowSelectionChange) {\n const selectedRows = Object.entries(rowSelection).reduce((selected, [key, value]) => {\n if (value) {\n selected.push(data[parseInt(key)]);\n }\n return selected;\n }, [] as T[]);\n onRowSelectionChange(selectedRows);\n }\n }, [rowSelection, data, onRowSelectionChange]);\n\n useLayoutEffect(() => {\n if (!isInitialSetupDone.current && table.getRowModel().rows.length > 0) {\n const rowIds = table.getRowModel().rows\n .filter((row) => initiallySelectedRowIds.includes(row.original.id))\n .map((row) => row.id);\n const initialRowSelection = rowIds.reduce((acc, id) => {\n acc[id] = true;\n return acc;\n }, {});\n setRowSelection(initialRowSelection);\n isInitialSetupDone.current = true;\n }\n }, [initiallySelectedRowIds, table.getRowModel().rows]);\n\n return {\n ...table,\n handleRowClick,\n toggleAllRowsSelected, \n unselectAllRows, \n ...(useVirtualScrolling && {\n virtualRows: _rowVirtualizer.virtualItems,\n totalSize: _rowVirtualizer.totalSize,\n scrollToIndex: _rowVirtualizer.scrollToIndex,\n scrollToOffset: _rowVirtualizer.scrollToOffset,\n measure: _rowVirtualizer.measure,\n }),\n hasSelectableRows,\n showColumnManager,\n setShowColumnManager,\n columnManagerRef,\n setHoveredRow,\n isLoading,\n } as LeafyGreenTable<T>;\n};\n\nexport default useLeafyGreenTable;\n"],"names":["useLeafyGreenTable","_a","containerRef","data","columnsProp","columns","hasSelectableRows","_a$withPagination","withPagination","_a$useVirtualScrollin","useVirtualScrolling","_a$allowSelectAll","allowSelectAll","_a$allowSelectSingle","allowSelectSingle","onSelect","virtualizerOptions","_a$initiallySelectedR","initiallySelectedRowIds","onRowSelectionChange","_a$columnManager","columnManager","_a$isExpandable","isExpandable","hoverIcon","_a$selectCurrentPageO","selectCurrentPageOnly","onUnselectAll","initialState","_a$initialLoadCount","initialLoadCount","_a$loadMoreCount","loadMoreCount","_a$infiniteScrolling","infiniteScrolling","_a$autoResetPageIndex","autoResetPageIndex","_a$selectAllRows","selectAllRows","rest","__rest","_useState","useState","_useState2","_slicedToArray","rowSelection","setRowSelection","_useState3","_useState4","hoveredRow","setHoveredRow","_useState5","_useState6","showColumnManager","setShowColumnManager","_useState7","_useState8","loadedData","setLoadedData","_useState9","_useState10","isLoading","setIsLoading","_useState11","_useState12","isDialogOpen","setIsDialogOpen","columnManagerRef","useRef","isInitialSetupDone","useEffect","length","slice","setTimeout","baseSelectColumnConfig","id","size","header","TableHeaderCheckbox","cell","TableRowCheckbox","allSelected","reduce","acc","row","index","hasSortableColumns","useMemo","some","propCol","enableSorting","selectColumnConfig","omit","expandColumnConfig","_ref","getCanExpand","_jsx","ToggleExpandedIcon","isExpanded","getIsExpanded","toggleExpanded","disabled","hoverIconConfig","sticky","_ref2","Object","assign","style","display","height","children","stickyLeftColumns","filter","col","stickyRightColumns","leftOffset","rightOffset","concat","_toConsumableArray","map","propColumn","newColumn","align","_b","isResizable","_c","_ref3","getValue","left","isLastStickyLeft","right","isFirstStickyRight","column","Dialog","showTrigger","hideShowTriggers","CLICK","hideTrigger","CLICK_OUTSIDE","position","positions","BOTTOM_END","open","content","DialogContentContainer","table","getAllLeafColumns","ListItem","Checkbox","checked","getIsVisible","label","columnDef","onChange","getToggleVisibilityHandler","onDialogDidHide","IconButton","ariaLabel","sizes","XXS","icon","Settings","ref","onClick","Boolean","_useState13","_useState14","columnResizeMode","_useState15","_useState16","columnResizeDirection","useReactTable","getCoreRowModel","getRowCanExpand","original","renderExpandedContent","subRows","enableExpanding","enableSortingRemoval","undefined","getSubRows","getSortedRowModel","getPaginationRowModel","state","rows","paginationRows","_rowVirtualizer","useVirtual","parentRef","overscan","loadMoreRows","useCallback","prevData","nextData","handleScroll","current","scrollHeight","scrollTop","clientHeight","container","addEventListener","removeEventListener","checkContainerHeight","observer","MutationObserver","observe","childList","subtree","disconnect","toggleAllRowsSelected","isAllRowsSelected","every","newSelection","forEach","unselectAllRows","selectedRows","entries","selected","_ref4","_ref5","push","parseInt","useLayoutEffect","getRowModel","initialRowSelection","includes","handleRowClick","rowId","selectedRowData","find","d","Number","virtualRows","virtualItems","totalSize","scrollToIndex","scrollToOffset","measure"],"mappings":"o/BAmBA,IAEMA,EAAqB,SAAmDC,GAAA,IAC5EC,EAuBqBD,EAvBrBC,aACAC,EAsBqBF,EAtBrBE,KACSC,EAqBYH,EArBrBI,QACAC,EAoBqBL,EApBrBK,kBAAiBC,EAoBIN,EAnBrBO,eAAAA,OAAiB,IAAHD,GAAQA,EAAAE,EAmBDR,EAlBrBS,oBAAAA,OAAsB,IAAHD,GAAQA,EAAAE,EAkBNV,EAjBrBW,eAAAA,OAAiB,IAAHD,GAAOA,EAAAE,EAiBAZ,EAhBrBa,kBAAAA,OAAoB,IAAHD,GAAQA,EACzBE,EAeqBd,EAfrBc,SACAC,EAcqBf,EAdrB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,EAAkB3K,GAAW4K,MAAK,SAACC,GAAC,OAAKA,EAAE3J,KAAO4J,OAAOJ,GAAS,KACxEpN,SAAAA,EAAWqN,EACZ,GAiQDnB,sBAAAA,GACAK,gBAAAA,KACI5M,GAAuB,CACzB8N,YAAa9C,GAAgB+C,aAC7BC,UAAWhD,GAAgBgD,UAC3BC,cAAejD,GAAgBiD,cAC/BC,eAAgBlD,GAAgBkD,eAChCC,QAASnD,GAAgBmD,WAE3BvO,kBAAAA,EACA+C,kBAAAA,GACAC,qBAAAA,GACAa,iBAAAA,GACAjB,cAAAA,GACAW,UAAAA,IAEJ"}
|
1
|
+
{"version":3,"file":"useLeafyGreenTable.js","sources":["../../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"sourcesContent":["//@ts-nocheck\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState, useCallback } from \"react\";\nimport { useVirtual } from \"react-virtual\";\nimport { useReactTable, ColumnResizeMode, ColumnResizeDirection } from \"@tanstack/react-table\";\nimport { getCoreRowModel, getPaginationRowModel, getSortedRowModel } from \"@tanstack/react-table\";\nimport omit from \"lodash/omit\";\nimport { TableHeaderCheckbox } from \"./TableHeaderCheckbox\";\nimport { TableRowCheckbox } from \"./TableRowCheckbox\";\nimport { LeafyGreenTableOptions, LGRowData } from \"./useLeafyGreenTable.types\";\nimport { LeafyGreenTable, LGColumnDef, LGTableDataType } from \".\";\nimport Settings from \"../../../Icon/Icons/components/Settings\";\nimport IconButton from \"../../../IconButton/IconButton\";\nimport ToggleExpandedIcon from \"../ToggleExpandedIcon\";\nimport Dialog from \"../../../Dialog/Dialog\";\nimport List from \"../../../List/List\";\nimport DialogContentContainer from \"../../../DialogContentContainer/DialogContentContainer\";\nimport Checkbox from \"../../../Checkbox/Checkbox\";\nimport ListItem from \"../../../ListItem/ListItem\";\n\nconst CHECKBOX_WIDTH = 14;\n\nconst useLeafyGreenTable = <T extends LGRowData, V extends unknown = unknown>({\n containerRef,\n data,\n columns: columnsProp,\n hasSelectableRows,\n withPagination = false,\n useVirtualScrolling = false,\n allowSelectAll = true,\n allowSelectSingle = false,\n onSelect,\n virtualizerOptions,\n initiallySelectedRowIds = [],\n onRowSelectionChange,\n columnManager = false,\n isExpandable = false,\n hoverIcon,\n selectCurrentPageOnly = false,\n onUnselectAll,\n initialState,\n initialLoadCount = 20, \n loadMoreCount = 10, \n onLoadMore, \n infiniteScrolling = false,\n autoResetPageIndex = true,\n selectAllRows = false,\n ...rest\n}: LeafyGreenTableOptions<T, V>): LeafyGreenTable<T> => {\n const [rowSelection, setRowSelection] = useState<{ [key: string]: boolean }>({});\n const [hoveredRow, setHoveredRow] = useState<number | null>(null);\n const [showColumnManager, setShowColumnManager] = useState(false);\n const [loadedData, setLoadedData] = useState<T[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [isDialogOpen, setIsDialogOpen] = useState(false);\n\n const columnManagerRef = useRef<HTMLButtonElement>(null);\n const isInitialSetupDone = useRef(false);\n const initialSelectionRef = useRef<{ [key: string]: boolean }>({});\n const previousDataRef = useRef<T[]>([]);\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreTriggerRef = useRef<HTMLDivElement | null>(null);\n\n const getRowId = useCallback((row: T, index: number) => {\n if (hasSelectableRows) {\n return row.id?.toString() ?? index.toString();\n }\n return index.toString();\n }, [hasSelectableRows]);\n\n useEffect(() => {\n if (!isInitialSetupDone.current && hasSelectableRows) {\n initialSelectionRef.current = initiallySelectedRowIds.reduce((acc, id) => {\n acc[id.toString()] = true;\n return acc;\n }, {});\n isInitialSetupDone.current = true;\n }\n }, [initiallySelectedRowIds, hasSelectableRows]);\n\n useEffect(() => {\n setLoadedData(infiniteScrolling ? data.slice(0, initialLoadCount) : data);\n }, [data, infiniteScrolling, initialLoadCount]);\n\n useEffect(() => {\n if (data !== previousDataRef.current && hasSelectableRows) {\n const newRowSelection = { ...initialSelectionRef.current, ...rowSelection };\n const filteredSelection = {};\n data.forEach((row, index) => {\n const rowId = getRowId(row, index);\n if (newRowSelection[rowId]) {\n filteredSelection[rowId] = true;\n }\n });\n \n setRowSelection(filteredSelection);\n previousDataRef.current = data;\n }\n }, [data, getRowId, hasSelectableRows]);\n\n const baseSelectColumnConfig: LGColumnDef<T, V> = {\n id: \"select\",\n size: CHECKBOX_WIDTH,\n header: TableHeaderCheckbox,\n cell: TableRowCheckbox,\n };\n\n useEffect(() => {\n if (selectAllRows && hasSelectableRows) {\n const allSelected = data.reduce((acc, row, index) => {\n acc[getRowId(row, index)] = true;\n return acc;\n }, {});\n setRowSelection(allSelected);\n }\n }, [selectAllRows, hasSelectableRows, data, getRowId]);\n\n const handleRowClick = (rowId: string) => {\n if (allowSelectSingle) {\n const selectedRowData = data.find((d, index) => getRowId(d, index) === rowId);\n onSelect?.(selectedRowData);\n }\n };\n\n const hasSortableColumns = useMemo(() => columnsProp.some((propCol) => !!propCol.enableSorting), [columnsProp]);\n\n const selectColumnConfig = allowSelectAll ? baseSelectColumnConfig : omit(baseSelectColumnConfig, \"header\");\n\n const expandColumnConfig: LGColumnDef<T, V> = {\n id: \"expander\",\n size: 30,\n header: () => null,\n cell: ({ row }) => {\n const isExpandable = row.getCanExpand();\n return isExpandable ? (\n <ToggleExpandedIcon\n isExpanded={row.getIsExpanded()}\n toggleExpanded={() => row.toggleExpanded()}\n disabled={false}\n />\n ) : null;\n },\n };\n\n const hoverIconConfig: LGColumnDef<T, V> = {\n id: \"hoverIcon\",\n size: 30,\n sticky: \"right\",\n header: () => null,\n cell: ({ row }) => (\n <span style={{ display: \"block\", height: \"100%\" }}>\n {hoveredRow === row.index && hoverIcon}\n </span>\n ),\n };\n\n const columns = useMemo<Array<LGColumnDef<T, V>>>(() => {\n const stickyLeftColumns = columnsProp.filter((col) => col.sticky === \"left\");\n const stickyRightColumns = columnsProp.filter((col) => col.sticky === \"right\");\n\n let leftOffset = 0;\n let rightOffset = 0;\n\n return [\n ...(hasSelectableRows ? [selectColumnConfig as LGColumnDef<T, V>] : []),\n ...(isExpandable ? [expandColumnConfig] : []),\n ...columnsProp\n .map((propColumn, index) => {\n const newColumn = {\n ...propColumn,\n align: propColumn.align ?? \"left\",\n enableSorting: propColumn.enableSorting ?? false,\n isResizable: propColumn.isResizable ?? false,\n cell: propColumn.cell || (({ getValue }) => getValue()),\n };\n\n if (propColumn.sticky === \"left\") {\n newColumn.left = leftOffset;\n leftOffset += propColumn.size;\n newColumn.isLastStickyLeft = index === stickyLeftColumns.length - 1;\n } else if (propColumn.sticky === \"right\") {\n rightOffset += propColumn.size;\n newColumn.right = rightOffset - propColumn.size;\n newColumn.isFirstStickyRight = index === columnsProp.length - stickyRightColumns.length;\n }\n\n return newColumn;\n })\n .map((column, index, columns) => {\n if (column.sticky === \"right\") {\n column.isFirstStickyRight = index === columns.length - stickyRightColumns.length;\n }\n return column;\n }),\n hoverIcon ? hoverIconConfig : null,\n ...(columnManager\n ? [\n {\n id: \"columnManager\",\n size: 20,\n header: () => (\n <Dialog\n showTrigger={[Dialog.hideShowTriggers.CLICK]}\n hideTrigger={[Dialog.hideShowTriggers.CLICK_OUTSIDE]}\n position={Dialog.positions.BOTTOM_END}\n open={isDialogOpen}\n content={\n <DialogContentContainer key=\"small\">\n {table.getAllLeafColumns().slice(0, -1).map((column, index) => (\n <ListItem key={`${column.id}-${index}`}>\n <Checkbox\n checked={column.getIsVisible()}\n label={column.columnDef.header as string || column.id}\n onChange={column.getToggleVisibilityHandler()}\n aria-labelledby={`iui-column-${column.id}`}\n />\n </ListItem>\n ))}\n </DialogContentContainer> \n }\n onDialogDidHide={() => setIsDialogOpen(false)}\n >\n <IconButton\n ariaLabel=\"Customize\"\n size={IconButton?.sizes?.XXS}\n icon={Settings}\n ref={columnManagerRef}\n onClick={() => setIsDialogOpen(true)}\n />\n </Dialog>\n ),\n cell: () => null,\n },\n ]\n : []),\n ].filter(Boolean);\n }, [columnsProp, hasSelectableRows, selectColumnConfig, columnManager, isExpandable, hoverIcon, isDialogOpen]);\n\n const [columnResizeMode, setColumnResizeMode] = useState<ColumnResizeMode>(\"onChange\");\n const [columnResizeDirection, setColumnResizeDirection] = useState<ColumnResizeDirection>(\"ltr\");\n\n const toggleAllRowsSelected = (value?: boolean) => {\n if (!hasSelectableRows) return;\n\n const newSelection = { ...initialSelectionRef.current };\n const rowsToSelect = selectCurrentPageOnly ? table.getPageRows() : table.getPreFilteredRowModel().rows;\n\n const setTo = value ?? !table.getIsAllRowsSelected();\n rowsToSelect.forEach((row) => {\n newSelection[row.id] = setTo;\n });\n\n setRowSelection(newSelection);\n };\n\n const unselectAllRows = () => {\n if (!hasSelectableRows) return;\n\n setRowSelection({});\n initialSelectionRef.current = {};\n onUnselectAll?.();\n };\n\n const loadMoreRows = useCallback(() => {\n if (!infiniteScrolling || isLoading || loadedData.length >= data.length) return;\n setIsLoading(true);\n setTimeout(() => {\n setLoadedData((prevData) => {\n const nextData = data.slice(prevData.length, prevData.length + loadMoreCount);\n return [...prevData, ...nextData];\n });\n setIsLoading(false);\n if (onLoadMore) {\n onLoadMore();\n }\n }, 500);\n }, [infiniteScrolling, isLoading, data, loadMoreCount, onLoadMore, loadedData.length]);\n\n useEffect(() => {\n if (infiniteScrolling && loadMoreTriggerRef.current) {\n observerRef.current = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting) {\n loadMoreRows();\n }\n },\n { threshold: 0.1 }\n );\n\n observerRef.current.observe(loadMoreTriggerRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [infiniteScrolling, loadMoreRows]);\n\n const tableOptions = {\n data: loadedData,\n columns,\n getCoreRowModel: getCoreRowModel(),\n getRowCanExpand: (row) => !!row.original.renderExpandedContent || !!row.subRows?.length,\n enableExpanding: true,\n enableSortingRemoval: hasSortableColumns ? true : undefined,\n getSubRows: (row) => row.subRows,\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: withPagination ? getPaginationRowModel() : undefined,\n initialState: initialState ? initialState : undefined,\n columnResizeMode,\n columnResizeDirection,\n autoResetPageIndex,\n ...rest,\n };\n\n if (hasSelectableRows) {\n tableOptions.getRowId = getRowId;\n tableOptions.state = { rowSelection };\n tableOptions.onRowSelectionChange = setRowSelection;\n }\n\n const table = useReactTable<LGTableDataType<T>>(tableOptions);\n\n table.toggleAllRowsSelected = toggleAllRowsSelected;\n table.unselectAllRows = unselectAllRows;\n\n const { rows } = table.getCoreRowModel();\n const { rows: paginationRows } = table.getPaginationRowModel();\n const _rowVirtualizer = useVirtual({\n parentRef: containerRef,\n size: rows.length,\n overscan: 30,\n ...virtualizerOptions,\n });\n\n useEffect(() => {\n if (onRowSelectionChange && hasSelectableRows) {\n const selectedRows = data.filter((row, index) => rowSelection[getRowId(row, index)]);\n onRowSelectionChange(selectedRows);\n }\n }, [rowSelection, data, onRowSelectionChange, getRowId, hasSelectableRows]);\n\n return {\n ...table,\n handleRowClick,\n toggleAllRowsSelected, \n unselectAllRows, \n ...(useVirtualScrolling && {\n virtualRows: _rowVirtualizer.virtualItems,\n totalSize: _rowVirtualizer.totalSize,\n scrollToIndex: _rowVirtualizer.scrollToIndex,\n scrollToOffset: _rowVirtualizer.scrollToOffset,\n measure: _rowVirtualizer.measure,\n }),\n hasSelectableRows,\n showColumnManager,\n setShowColumnManager,\n columnManagerRef,\n setHoveredRow,\n isLoading,\n loadedData,\n loadMoreTriggerRef,\n infiniteScrolling,\n loadMoreRows,\n } as LeafyGreenTable<T>;\n};\n\nexport default useLeafyGreenTable;\n"],"names":["useLeafyGreenTable","_a","containerRef","data","columnsProp","columns","hasSelectableRows","_a$withPagination","withPagination","_a$useVirtualScrollin","useVirtualScrolling","_a$allowSelectAll","allowSelectAll","_a$allowSelectSingle","allowSelectSingle","onSelect","virtualizerOptions","_a$initiallySelectedR","initiallySelectedRowIds","onRowSelectionChange","_a$columnManager","columnManager","_a$isExpandable","isExpandable","hoverIcon","_a$selectCurrentPageO","selectCurrentPageOnly","onUnselectAll","initialState","_a$initialLoadCount","initialLoadCount","_a$loadMoreCount","loadMoreCount","onLoadMore","_a$infiniteScrolling","infiniteScrolling","_a$autoResetPageIndex","autoResetPageIndex","_a$selectAllRows","selectAllRows","rest","__rest","_useState","useState","_useState2","_slicedToArray","rowSelection","setRowSelection","_useState3","_useState4","hoveredRow","setHoveredRow","_useState5","_useState6","showColumnManager","setShowColumnManager","_useState7","_useState8","loadedData","setLoadedData","_useState9","_useState10","isLoading","setIsLoading","_useState11","_useState12","isDialogOpen","setIsDialogOpen","columnManagerRef","useRef","isInitialSetupDone","initialSelectionRef","previousDataRef","observerRef","loadMoreTriggerRef","getRowId","useCallback","row","index","_b","id","useEffect","current","reduce","acc","slice","newRowSelection","filteredSelection","forEach","rowId","baseSelectColumnConfig","size","header","TableHeaderCheckbox","cell","TableRowCheckbox","allSelected","hasSortableColumns","useMemo","some","propCol","enableSorting","selectColumnConfig","omit","expandColumnConfig","_ref","getCanExpand","_jsx","ToggleExpandedIcon","isExpanded","getIsExpanded","toggleExpanded","disabled","hoverIconConfig","sticky","_ref2","Object","assign","style","display","height","children","stickyLeftColumns","filter","col","stickyRightColumns","leftOffset","rightOffset","concat","_toConsumableArray","map","propColumn","newColumn","align","isResizable","_c","_ref3","getValue","left","isLastStickyLeft","length","right","isFirstStickyRight","column","Dialog","showTrigger","hideShowTriggers","CLICK","hideTrigger","CLICK_OUTSIDE","position","positions","BOTTOM_END","open","content","DialogContentContainer","table","getAllLeafColumns","ListItem","Checkbox","checked","getIsVisible","label","columnDef","onChange","getToggleVisibilityHandler","onDialogDidHide","IconButton","ariaLabel","sizes","XXS","icon","Settings","ref","onClick","Boolean","_useState13","_useState14","columnResizeMode","_useState15","_useState16","columnResizeDirection","toggleAllRowsSelected","value","newSelection","rowsToSelect","getPageRows","getPreFilteredRowModel","rows","setTo","getIsAllRowsSelected","unselectAllRows","loadMoreRows","setTimeout","prevData","nextData","IntersectionObserver","entries","isIntersecting","threshold","observe","disconnect","tableOptions","getCoreRowModel","getRowCanExpand","original","renderExpandedContent","subRows","enableExpanding","enableSortingRemoval","undefined","getSubRows","getSortedRowModel","getPaginationRowModel","state","useReactTable","_rowVirtualizer","useVirtual","parentRef","overscan","selectedRows","handleRowClick","selectedRowData","find","d","virtualRows","virtualItems","totalSize","scrollToIndex","scrollToOffset","measure"],"mappings":"+9BAmBA,IAEMA,EAAqB,SAAmDC,GAAA,IAC5EC,EAuBqBD,EAvBrBC,aACAC,EAsBqBF,EAtBrBE,KACSC,EAqBYH,EArBrBI,QACAC,EAoBqBL,EApBrBK,kBAAiBC,EAoBIN,EAnBrBO,eAAAA,OAAiB,IAAHD,GAAQA,EAAAE,EAmBDR,EAlBrBS,oBAAAA,OAAsB,IAAHD,GAAQA,EAAAE,EAkBNV,EAjBrBW,eAAAA,OAAiB,IAAHD,GAAOA,EAAAE,EAiBAZ,EAhBrBa,kBAAAA,OAAoB,IAAHD,GAAQA,EACzBE,EAeqBd,EAfrBc,SACAC,EAcqBf,EAdrBe,mBAAkBC,EAcGhB,EAbrBiB,wBAAAA,OAA0B,IAAHD,EAAG,GAAEA,EAC5BE,EAYqBlB,EAZrBkB,qBAAoBC,EAYCnB,EAXrBoB,cAAAA,OAAgB,IAAHD,GAAQA,EAAAE,EAWArB,EAVrBsB,aAAAA,OAAe,IAAHD,GAAQA,EACpBE,EASqBvB,EATrBuB,UAASC,EASYxB,EARrByB,sBAAAA,OAAwB,IAAHD,GAAQA,EAC7BE,EAOqB1B,EAPrB0B,cACAC,EAMqB3B,EANrB2B,aAAYC,EAMS5B,EALrB6B,iBAAAA,OAAmB,IAAHD,EAAG,GAAEA,EAAAE,EAKA9B,EAJrB+B,cAAAA,QAAgB,IAAHD,EAAG,GAAEA,EAClBE,GAGqBhC,EAHrBgC,WAAUC,GAGWjC,EAFrBkC,kBAAAA,QAAoB,IAAHD,IAAQA,GAAAE,GAEJnC,EADrBoC,mBAAAA,QAAqB,IAAHD,IAAOA,GAAAE,GACJrC,EAArBsC,cAAAA,QAAgB,IAAHD,IAAQA,GAClBE,GAAIC,EAAAxC,E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C,gBAAkBA,GAExB,IAAQH,GAAShC,GAAM+C,kBAAff,KAEF4B,IAD2B5D,GAAMyD,wBACfI,EAAUrG,OAAAC,OAAA,CAChCqG,UAAWxN,EACXyF,KAAMiG,GAAKhD,OACX+E,SAAU,IACP3M,KAUL,OAPAiE,GAAU,WACR,GAAI9D,GAAwBb,EAAmB,CAC7C,IAAMsN,EAAezN,EAAKwH,QAAO,SAAC9C,EAAKC,GAAK,OAAKhC,GAAa6B,GAASE,EAAKC,OAC5E3D,EAAqByM,EACtB,CACH,GAAG,CAAC9K,GAAc3C,EAAMgB,EAAsBwD,GAAUrE,IAEjD8G,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACFuC,IAAK,CACRiE,eApOqB,SAACpI,GACtB,GAAI3E,EAAmB,CACrB,IAAMgN,EAAkB3N,EAAK4N,MAAK,SAACC,EAAGlJ,GAAK,OAAKH,GAASqJ,EAAGlJ,KAAWW,KACvE1E,SAAAA,EAAW+M,EACZ,GAiODxC,sBAAAA,GACAS,gBAAAA,KACIrL,GAAuB,CACzBuN,YAAaT,GAAgBU,aAC7BC,UAAWX,GAAgBW,UAC3BC,cAAeZ,GAAgBY,cAC/BC,eAAgBb,GAAgBa,eAChCC,QAASd,GAAgBc,WAE3BhO,kBAAAA,EACAgD,kBAAAA,GACAC,qBAAAA,GACAa,iBAAAA,GACAjB,cAAAA,GACAW,UAAAA,GACAJ,WAAAA,GACAgB,mBAAAA,GACAvC,kBAAAA,GACA6J,aAAAA,IAEJ"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React, { ReactNode } from "react";
|
2
|
+
import { IGridContainerProps, IGridRowProps, IGridColProps } from "react-awesome-styled-grid";
|
3
|
+
interface GridContainerProps extends IGridContainerProps {
|
4
|
+
children: ReactNode;
|
5
|
+
}
|
6
|
+
interface GridRowProps extends IGridRowProps {
|
7
|
+
children: ReactNode;
|
8
|
+
}
|
9
|
+
interface GridColProps extends IGridColProps {
|
10
|
+
children: ReactNode;
|
11
|
+
}
|
12
|
+
export declare const GridContainer: React.FC<GridContainerProps>;
|
13
|
+
export declare const GridRow: React.FC<GridRowProps>;
|
14
|
+
export declare const GridCol: React.FC<GridColProps>;
|
15
|
+
export {};
|
16
|
+
//# sourceMappingURL=Grid.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAuB,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEnH,UAAU,kBAAmB,SAAQ,mBAAmB;IACtD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,YAAa,SAAQ,aAAa;IAC1C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,YAAa,SAAQ,aAAa;IAC1C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAE1C,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAE1C,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Lines.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACnE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAK/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
export interface NotificationsProps extends React.SVGAttributes<SVGElement> {
|
3
|
+
size?: string | number;
|
4
|
+
}
|
5
|
+
declare const Notifications: React.FC<NotificationsProps>;
|
6
|
+
export default Notifications;
|
7
|
+
//# sourceMappingURL=Notifications.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Notifications.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Notifications.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IAC3E,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAK/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Update.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAKjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/NewTable/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAUnE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,QAAA,MAAM,KAAK,
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/NewTable/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAUnE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,QAAA,MAAM,KAAK,wFAyGV,CAAC;AAQF,eAAe,KAAK,CAAC"}
|
package/dist/types/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useLeafyGreenTable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAgC,MAAM,GAAG,CAAC;AAYlE,QAAA,MAAM,kBAAkB,
|
1
|
+
{"version":3,"file":"useLeafyGreenTable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAgC,MAAM,GAAG,CAAC;AAYlE,QAAA,MAAM,kBAAkB,ogBAwVvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@heliux-org/design-system-core",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.294-TableTestBuild",
|
4
4
|
"description": "Official Heliux design system resources for application development in React.js",
|
5
5
|
"main": "./dist/main.js",
|
6
6
|
"types": "./dist/types/index.d.ts",
|
@@ -298,5 +298,5 @@
|
|
298
298
|
"PR: Icon 💎": "New Icons"
|
299
299
|
}
|
300
300
|
},
|
301
|
-
"gitHead": "
|
301
|
+
"gitHead": "548537fda45988de82568c16e68438fc797de5d2"
|
302
302
|
}
|
@@ -31,7 +31,8 @@ const Table = forwardRef<HTMLDivElement, TableProps<any>>(
|
|
31
31
|
}: TableProps<T>,
|
32
32
|
containerRef: ForwardedRef<HTMLDivElement>
|
33
33
|
) => {
|
34
|
-
|
34
|
+
//@ts-ignore
|
35
|
+
const { getState, setPageSize, setPageIndex, previousPage, nextPage, loadedData, isLoading, loadMoreTriggerRef, infiniteScrolling } = table;
|
35
36
|
const rows = table.getRowModel().rows;
|
36
37
|
const numSelectedItems = table.getSelectedRowModel().rows.length;
|
37
38
|
|
@@ -56,7 +57,7 @@ const Table = forwardRef<HTMLDivElement, TableProps<any>>(
|
|
56
57
|
{...rest}
|
57
58
|
>
|
58
59
|
{children}
|
59
|
-
{
|
60
|
+
{loadedData.length === 0 && (
|
60
61
|
<tbody>
|
61
62
|
<tr>
|
62
63
|
<td
|
@@ -69,7 +70,7 @@ const Table = forwardRef<HTMLDivElement, TableProps<any>>(
|
|
69
70
|
</tbody>
|
70
71
|
)}
|
71
72
|
{/* @ts-ignore */}
|
72
|
-
{
|
73
|
+
{/* {isLoading && (
|
73
74
|
<tr className={styles.loaderRow}>
|
74
75
|
<td colSpan={table.getAllColumns().length}>
|
75
76
|
<div className={styles.loader}>
|
@@ -81,8 +82,22 @@ const Table = forwardRef<HTMLDivElement, TableProps<any>>(
|
|
81
82
|
</div>
|
82
83
|
</td>
|
83
84
|
</tr>
|
84
|
-
)}
|
85
|
+
)} */}
|
85
86
|
</table>
|
87
|
+
{infiniteScrolling && (
|
88
|
+
<div ref={loadMoreTriggerRef} style={{ height: '1px' }} >
|
89
|
+
<div className={cx(
|
90
|
+
styles.baseStyles, // Base styles from SCSS module
|
91
|
+
styles.loader
|
92
|
+
)}>
|
93
|
+
<Loader
|
94
|
+
size={20}
|
95
|
+
color={Loader.colors.PRIMARY}
|
96
|
+
className={styles.loader}
|
97
|
+
/>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
)}
|
86
101
|
</TableContextProvider>
|
87
102
|
</div>
|
88
103
|
{withPagination && (
|