@antscorp/antsomi-ui 1.3.5-beta.7 → 1.3.5-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -78
- package/dist/010d0560a00a032c33da819e3c86596a.js +1 -0
- package/dist/029ed9161a8d24a9c2ba97124020989d.js +1 -0
- package/dist/02d5c4961ca855a88b1cd3e1b7fa7aa2.js +1 -0
- package/dist/03371bf1d5cbb1eab58e3a0130d1e9c2.js +1 -0
- package/dist/03487ba89c7b63069d63c1b3802a472c.js +1 -0
- package/dist/03748243ac7148ca150ba06c2919ff81.js +1 -0
- package/dist/03980cb12dacd26148c22bb61fce440f.js +1 -0
- package/dist/03aae8272914723a7bf85b984385032c.js +1 -0
- package/dist/04770a551c5b6daa744be9b180a8d0fe.js +1 -0
- package/dist/06d958315fc6cdbb28576b03e43203aa.js +1 -0
- package/dist/07101530302fe1d03dcd731992f7a899.js +1 -0
- package/dist/0731d7568a06d2e28351781370bc52bb.js +1 -0
- package/dist/0794fa2b9c882c72fa7d586069b61055.js +1 -0
- package/dist/0872e65446d05c1c443180c6280b015f.js +1 -0
- package/dist/08b9f3e305b5e3e0b81f7848fa7f3b6b.js +1 -0
- package/dist/09563004132aabcfcc186943555a92a1.js +1 -0
- package/dist/0a1d9862d917663419ac2dd2e8193267.js +1 -0
- package/dist/0a858573915ab9b03fe79f98f8c51a04.js +1 -0
- package/dist/0a9cd3d62e7f1cd404606c50d9da86fb.js +1 -0
- package/dist/0b923a43967ff893ec63b92dc4f19017.js +1 -0
- package/dist/0beea7b55cf3b8c9f9b0bd46170bb30e.js +1 -0
- package/dist/0dfb9214dfd945cd7290.png +1 -0
- package/dist/0ec4bf56a876c2bf34ea174c584ce628.js +1 -0
- package/dist/0f418117fac55a859631143ad7d0e833.js +1 -0
- package/dist/10132993df2cf9c9423b53a8a44379ab.js +1 -0
- package/dist/1034e3807d1bcf55cb564491950237ab.js +1 -0
- package/dist/104959bdb953a3792a203e98d2bf530f.js +1 -0
- package/dist/114c58e47951fe3f6d25f683e0cd54e7.js +1 -0
- package/dist/11b2d52156942feeb87b7c608276c49b.js +1 -0
- package/dist/11dc77ef2ea3a04834945a52f7de2072.js +1 -0
- package/dist/12b520593765ef7e714d7fb3764633ed.js +1 -0
- package/dist/130340e2c62b9e858f186dab5f491e55.js +1 -0
- package/dist/1324f89bd8db0bae85b79b7f90f6c119.js +1 -0
- package/dist/13eda3507db9cbfb400f46b9b3ff6553.js +1 -0
- package/dist/1441681e52f3ae9ab33afbc5517359a0.js +1 -0
- package/dist/1533058f0ce13acdaa8d5bdc7d147bef.js +1 -0
- package/dist/1549fe09fd6b44aca96e2b1b7cbd93d0.js +1 -0
- package/dist/15f3800d33b854ba476c9daf1b9e0326.js +1 -0
- package/dist/16563bfaf4741097d38cc6ce3ccc1a2d.js +1 -0
- package/dist/170487867de05784a96608617bdd544d.js +1 -0
- package/dist/179a93d3148b7edb72581279c3787d0c.js +1 -0
- package/dist/17dc98279d24649d3ca77cbce8c44e83.js +1 -0
- package/dist/1850762f1bfaf1a1044765b02b243ed4.js +1 -0
- package/dist/18cfa6de2de3832aa10439fbf963217a.js +1 -0
- package/dist/191feb6103c36b202bc01ba262916cdf.js +1 -0
- package/dist/19e684db1b08c82963634abc8b2c989f.js +1 -0
- package/dist/1abc9efccf77fd4527d1c2fc85d87e04.js +1 -0
- package/dist/1b15b9f88acaf59b96e59c6b5f32da12.js +1 -0
- package/dist/1b64f97eed4a3837a93f8bdd363295fb.js +1 -0
- package/dist/1c02ec6ec024eee3ebb6b34fa8ff316f.js +1 -0
- package/dist/1c57b3481f295105588972ffa1305521.js +1 -0
- package/dist/1cc82820c232a82b5d8b6cb9e4152af3.js +1 -0
- package/dist/1cd3d09b5303cc37fa337225ed6a9132.js +1 -0
- package/dist/1e029a7f1f64457da4f54254d50ac59b.js +1 -0
- package/dist/1e26167b5f75d5b94add34f1f4d8b044.js +1 -0
- package/dist/1e4131e1241a5b81d54c7d9cb66b0e87.js +1 -0
- package/dist/1fe2d583da5f073431d81a6ea13ffc0c.js +1 -0
- package/dist/1fee62e3e043728a265935971fa26200.js +1 -0
- package/dist/211511e7b374f57ad31acaf49dbdccb1.js +1 -0
- package/dist/2183252fe9e1b88fcf2bc454d6fd9273.js +1 -0
- package/dist/222d52530e9db0a0ec565c6306c5db35.js +1 -0
- package/dist/2267d20fd89c81a461e38abecdb8fcdc.js +1 -0
- package/dist/2272c6632c52c3e402ab27b8045ab8f1.js +1 -0
- package/dist/23bb1a9f279e7a732bfd405350aab114.js +1 -0
- package/dist/23da8ba64540ff4aa68a34d3445db680.js +1 -0
- package/dist/243c0c0572ab9866e02e18821558a1c5.js +1 -0
- package/dist/244b1a234ec1728d0268214de601449d.js +1 -0
- package/dist/24a3ff38afde257888d755ece9bfd704.js +1 -0
- package/dist/25718a469574ade47e23567d8c543169.js +1 -0
- package/dist/25894751679e07fd95b21d0d3f6c8c8b.js +1 -0
- package/dist/25c99a71d30112583893bc5277402c46.js +1 -0
- package/dist/25eda4bb98e40a82cfd5b4bf9fbc06ec.js +1 -0
- package/dist/263f7107e9357b1c91997e1a21b59ff5.js +1 -0
- package/dist/26fb247a2e0630e1f435cb4d91ec51fd.js +1 -0
- package/dist/27730a0bdc6f430cc85049a46a73a029.js +1 -0
- package/dist/27ccb71fa24357a0919a861351d5b82d.js +1 -0
- package/dist/28474eb7ee45a125e49cc5cbe69e336f.js +1 -0
- package/dist/28785bea435918d49b290d27bf660baa.js +1 -0
- package/dist/28acb3b48578dfd30dd555fff7c822f7.js +1 -0
- package/dist/291611f874a2bc54dbc291b52d74c512.js +1 -0
- package/dist/2b2fe1a34cdf81c656a47e493ca9d658.js +1 -0
- package/dist/2bcf741e1f2cb07989a722a6ba9c2ea7.js +1 -0
- package/dist/2d2a42eeeeec801ab35f2fff7d900e43.js +1 -0
- package/dist/2dd82c65030101b60dffccedd8741c6e.js +1 -0
- package/dist/2ddd0346681f9f12fd3a191245aa41df.js +1 -0
- package/dist/2f055ac4066041b9008dd6aebf9df34b.js +1 -0
- package/dist/2f5be3e3e9ab852d217168220854ea9b.js +1 -0
- package/dist/2f7c864f08b00c01f04ac22375f7ddd9.js +1 -0
- package/dist/2fc0239242a898632ca8aa451cb930c2.js +1 -0
- package/dist/2ff54aa3c655216f360438bc7f5b181a.js +1 -0
- package/dist/30e80558090a09477e4466af8af4c40e.js +1 -0
- package/dist/34791bf31a4236531bc887b48f872c1c.js +1 -0
- package/dist/34b3249d58303435b894a43d3776a5c3.js +1 -0
- package/dist/3567d1ea443427e944a6f189a0898819.js +1 -0
- package/dist/3646668820dc96864fbed7746f805947.js +1 -0
- package/dist/36474100e81ab63c4ddbc94ab2cc8667.js +1 -0
- package/dist/3656b6632a4b02049b69.ttf +0 -0
- package/dist/365b89ceec577ebec0a39c938c2363f0.js +1 -0
- package/dist/367ad31e6d99d0021d05133b85bb9faf.js +1 -0
- package/dist/37172facd8a534a38f378ca2a9c7c11b.js +1 -0
- package/dist/37afa466cdb7fa8fc2e043164d48f29e.js +1 -0
- package/dist/37ee3b5201ae2e2dc5dc8b1b20ad900e.js +1 -0
- package/dist/38270ad5088729f40c461c4a5a6bad5d.js +1 -0
- package/dist/3b190e5159c72fb7e27271956772bcba.js +1 -0
- package/dist/3b544bb2c5a4e7b225a4b50235a0fd6d.js +1 -0
- package/dist/3b6e7dc98c47eeafd851ca5072db4be6.js +1 -0
- package/dist/3bbf0faa999b08584dc971eab820113a.js +1 -0
- package/dist/3c5b59a666c5d39d9ba9cc054d36a410.js +1 -0
- package/dist/3c71a5c0e85afc5486ee9ac29099843d.js +1 -0
- package/dist/3dcc18a5dee46b57ad7f85c0bee86802.js +1 -0
- package/dist/3df92508d7112d83474f31fe9590e289.js +1 -0
- package/dist/3e277a4ce5486a806a00497aea8ecdd3.js +1 -0
- package/dist/3e3e2243675fa4fb4b320dc57daf2d4f.js +1 -0
- package/dist/3f55ba1c6515db2f98bb996c1a5bc9e3.js +1 -0
- package/dist/3f758ea78954547fed0a8d999691dd7c.js +1 -0
- package/dist/406884d5525e864955e9f5058526aa02.js +1 -0
- package/dist/40dc555a17f1c85020333a41f01dd9ba.js +1 -0
- package/dist/40e6f6cb52a24a747b1046614db3b164.js +1 -0
- package/dist/41d8a58fd52b6a06e8d3fb06cdabf67a.js +1 -0
- package/dist/42b4ce6de00994aa6bf7db7ff2f931a8.js +1 -0
- package/dist/435.index.js +1 -0
- package/dist/43a0e099f8283dc1c1c6bbd39148d98d.js +1 -0
- package/dist/440f4d477b586c7a6ba4c1c966ca79fc.js +1 -0
- package/dist/444ababf8edc26948943fbb45bd06a19.js +1 -0
- package/dist/44701e25bb6f2ab9ff18343f2357d1b0.js +1 -0
- package/dist/44ac2a2398075299754707d4bac7c276.js +1 -0
- package/dist/460c67d8fe31ef229704bd5ab6d1dd26.js +1 -0
- package/dist/4639c30a609d986a255ccc684404527e.js +1 -0
- package/dist/4700af84801dbda8a3880e3469c21130.js +1 -0
- package/dist/4736a562251eeaea46dd06892b489f35.js +1 -0
- package/dist/47541c23870e955fff15de4be490ba74.js +1 -0
- package/dist/47f0fbf038314894ac52f2d67466b5e9.js +1 -0
- package/dist/4860a6a7c59b9ed5c779f7201dc1f591.js +1 -0
- package/dist/48e9351c5623d4da657ce7d5d0267ea6.js +1 -0
- package/dist/4a1dab236c2844d28f73c5c128afe299.js +1 -0
- package/dist/4b425eb8188febc5a89674b89a72d296.js +1 -0
- package/dist/4b61fe945e9e73aba22717e5d6f080df.js +1 -0
- package/dist/4bf3bc1fbdd26ac698fef1bdf26e3ff4.js +1 -0
- package/dist/4c2816c26725f7aae5b490142e31112f.js +1 -0
- package/dist/4ceabd28d8dc751f41002ebf2b6fed88.js +1 -0
- package/dist/4d143a2d103a9e376a9e3b55e680eef7.js +1 -0
- package/dist/4d8cb7033879cb7fcc7a43798e2bde22.js +1 -0
- package/dist/4e389cce6fb8f78845fab249bce43c0b.js +1 -0
- package/dist/4eed3725a00fc2bab78accdb014b7826.js +1 -0
- package/dist/4ef80ee74467e0297eec3cc03092da01.js +1 -0
- package/dist/506d44d8712a22011ce2bec8adbb19b2.js +1 -0
- package/dist/50c073327491a2ed3bfa2ebb466c4204.js +1 -0
- package/dist/51f903c5ce5284a63196247cffb5ca40.js +1 -0
- package/dist/5352ecd8e5f1a2637b48e18cc406edb1.js +1 -0
- package/dist/53e3600928916423671f3388e2d67844.js +1 -0
- package/dist/54560f13b36626237959e93b7771a484.js +1 -0
- package/dist/54b3396acd2c700969248de4b20cbf7c.js +1 -0
- package/dist/55892adefebc0d53993fb108151ed150.js +1 -0
- package/dist/574b7bee0563a9fe9a29.png +1 -0
- package/dist/57f4109bd1f06be4dc2bcb8ff7eaf1e5.js +1 -0
- package/dist/57f9654d8ecdebfb02c636e1889af2e4.js +1 -0
- package/dist/582e24f5ba929e358fadfc7be4c18025.js +1 -0
- package/dist/58598705e7012f4ca1eb1dd21d3c59a5.js +1 -0
- package/dist/5861dfe4f2c7823623e82d0619c5bf06.js +1 -0
- package/dist/58aab872dbdb5e1607076e1935130e03.js +1 -0
- package/dist/58c35e5c73bbc1664bbd67c570342aa0.js +1 -0
- package/dist/595aef8d8b0a2017e2fc27db5703e0d1.js +1 -0
- package/dist/59cc05504a1c823b6d4796bf6b430822.js +1 -0
- package/dist/5a496ae20cc576bef1d35972548207cf.js +1 -0
- package/dist/5a67fdd5293af0a35defd2574c05cd04.js +1 -0
- package/dist/5ada4185d70a1852b578b2063de58e37.js +1 -0
- package/dist/5b6a626249d0bc43e412fffa6a9ee177.js +1 -0
- package/dist/5bad2df0e3bfd8fdc1a332fb6276cb39.js +1 -0
- package/dist/5c53d90bf4029cfd1b6a0945d1cae142.js +1 -0
- package/dist/5c96efcfd419a70a93c96557979bc66d.js +1 -0
- package/dist/5d3314103b00c8ea165c6f9f6757f794.js +1 -0
- package/dist/5d46734b57c7408a41473abcd515b64c.js +1 -0
- package/dist/5da9145440d57c9b84d469253e84898d.js +1 -0
- package/dist/5e37c1ef17a219449c8c6aa37a87a941.js +1 -0
- package/dist/5e3f006db26e9b277b1bdbc130611a14.js +1 -0
- package/dist/5e55b301888460bd06c8e26d1011e01a.js +1 -0
- package/dist/5e6c2744429a8fac6e536b179c1f31d0.js +1 -0
- package/dist/5ebdef8c548fca6c51280e915d6f4c3f.js +1 -0
- package/dist/5ede1aebde9d4e5f5cce2db3044495c7.js +1 -0
- package/dist/5f3ce6efab3c679ec1ad25ab0b3f6b2f.js +1 -0
- package/dist/5fb6059ab5d7abab7a74eb73028a3aeb.js +1 -0
- package/dist/5fc5c77d4df4f5d77f8530f6b23ecd1e.js +1 -0
- package/dist/5fedbf948ed123687f77167fac1faf8b.js +1 -0
- package/dist/60340be8eea1d704a17f399b3c3f9577.js +1 -0
- package/dist/621b99ed1a029c36b4e91ec35f36c344.js +1 -0
- package/dist/6292be0125d3720498496eaa7f541618.js +1 -0
- package/dist/637e363c105dce85c12fb99d7ef2fa7d.js +1 -0
- package/dist/63b15fb6fc8f897b22a4bf72b7e8452a.js +1 -0
- package/dist/64a5f4d62507d032038dcd76d15188e1.js +1 -0
- package/dist/64c45b6610e353ba59a58afc6dd090ca.js +1 -0
- package/dist/64d6924350bd7706850cdc0dcc76ccf6.js +1 -0
- package/dist/6511453710d760c2682567b40ddb3301.js +1 -0
- package/dist/656f53e1b4c6e37a31799737faf6d639.js +1 -0
- package/dist/663234c150f2097f3812c6065491497c.js +1 -0
- package/dist/6903d8ef977a1424c4e2eb22b96feb77.js +1 -0
- package/dist/6a7bf4fb4484f6f48d8e4337f126a61d.js +1 -0
- package/dist/6abb884bd4f1a54529c00b58c14741cc.js +1 -0
- package/dist/6b586356e837581204dc.svg +1 -0
- package/dist/6bb61adbbc13088ee1c32d88b5c7e754.js +1 -0
- package/dist/6c0a75dc5671c3f237a79f6e45b9891c.js +1 -0
- package/dist/6c67587c2093ac3a19da9f2196e040b7.js +1 -0
- package/dist/6d38cef4a006e6cfe54a6117aba7b600.js +1 -0
- package/dist/6f09754fd684f82e6c06ae526d15ac80.js +1 -0
- package/dist/6f64da239140d00b81d8b6c523e86daf.js +1 -0
- package/dist/6faa9e5f2a0122d2333fa450337a09b0.js +1 -0
- package/dist/6fd6a6ddbcbbebe735c9d21e594203ec.js +1 -0
- package/dist/70074e0c785c9a808dea76c7c7d17af3.js +1 -0
- package/dist/70286c33cab463fd576766adecd2d5d9.js +1 -0
- package/dist/707fa1de4d2096da1951c4bc9d21cb6d.js +1 -0
- package/dist/7080d2a1db1608264a6d9d9fbaf2cce8.js +1 -0
- package/dist/716879b6ef8945d579595d88534ae402.js +1 -0
- package/dist/725da29f1643c2263a437c08a1454aea.js +1 -0
- package/dist/73c78b067c792ea8c737746e4671d3e0.js +1 -0
- package/dist/740f4264cd757fcf28331fd30daf295e.js +1 -0
- package/dist/7493f0c3c9bf268d6ad785019d993dd7.js +1 -0
- package/dist/74fa46809aba9625071aa51bc0a71561.js +1 -0
- package/dist/755114145e5b97e5571a160a39e716db.js +1 -0
- package/dist/75bffda9455d77087f34708ac4e85371.js +1 -0
- package/dist/75d2dae20d7bac5ecfa9dafc48ec04eb.js +1 -0
- package/dist/760eb6458a048f3cba7bc3ae52ef2ba4.js +1 -0
- package/dist/7735af777659608bcd8cd6525e3bbe58.js +1 -0
- package/dist/77aaca51c1c32acaf32656d45f4dc017.js +1 -0
- package/dist/788819e459cdd8c4c1ef565fd303f519.js +1 -0
- package/dist/7a9a1dced0e327dc9cb1728bef25641d.js +1 -0
- package/dist/7bd84be066027e61c84c9c2aa9543c2a.js +1 -0
- package/dist/7c1cd1223bd45600763f8c152ad167d5.js +1 -0
- package/dist/7c27341a2599ffb713c8fb7beced7601.js +1 -0
- package/dist/7c317e61789b17749dfe6ea294c89b6b.js +1 -0
- package/dist/7c9c55eb1a1e5c1dfd63631511d9a1f0.js +1 -0
- package/dist/7dead8e2fcacc316bbfa632cd9f1c9bb.js +1 -0
- package/dist/7e4099fc2d04c7c1cf96892b962ba4ec.js +1 -0
- package/dist/7ef082035f74b3d7324f95a7498ea656.js +1 -0
- package/dist/7f12d133c88ce53d0837a6c4c0287a37.js +1 -0
- package/dist/7f407a1006eb830d6f0aaad96c133d26.js +1 -0
- package/dist/805cb6232d7a9fa46025d48a43622ecf.js +1 -0
- package/dist/80a171b7595d1161735e23dec8efddd6.js +1 -0
- package/dist/82fed7ec74be91e0db61c500d9c6d7ee.js +1 -0
- package/dist/83387cb17a7680f59240e7b399e3ac2b.js +1 -0
- package/dist/8361542d34c46713c9aff6c4ce65a9a3.js +1 -0
- package/dist/8423f61a6b43ebee39273fd08e332d47.js +1 -0
- package/dist/85a977f41a907dba8c672f9bf4943da0.js +1 -0
- package/dist/866bf6ca5057dcb24503761af061d486.js +1 -0
- package/dist/870184211838006214be1c23c98672fc.js +1 -0
- package/dist/8707a7b49421dbbb842506674ff87fa3.js +1 -0
- package/dist/875e553a27bee88a73df34a90b3058e4.js +1 -0
- package/dist/8772719d0f76ecabded160e32dc5eb77.js +1 -0
- package/dist/87932c8321c9985ed3b6979e86d2a50e.js +1 -0
- package/dist/87d6bf8becf2d5ebe2f71fda95a313ea.js +1 -0
- package/dist/88bbfb9fdb8730ffc23f546b42d8d620.js +1 -0
- package/dist/88e2feda80ac8cfb28f1dc0ec833b40d.js +1 -0
- package/dist/894720f1519e5eb34e1b4f33fca7a9dd.js +1 -0
- package/dist/894edcaf39c3c95818e3949d737ed459.js +1 -0
- package/dist/89d3c35a5ef97a600927b477a9ba06b4.js +1 -0
- package/dist/8ba6618773c9d8d0b4f6ecb785651e2c.js +1 -0
- package/dist/8bf75743fb14fea7cf02a5da1bda79d4.js +1 -0
- package/dist/8cb83aa3fea85e950c29450b8237fb72.js +1 -0
- package/dist/8d9bb1799d9b98db107e84f10132e17f.js +1 -0
- package/dist/8ed58ed9c7e1cb1ae1f2830d29011ffb.js +1 -0
- package/dist/8f5997c65fc8937aa89d15d9a7237f63.js +1 -0
- package/dist/909adc4a16e0f97d869e3dd16d561430.js +1 -0
- package/dist/90bafd962205e96c3285d27cbf95c55c.js +1 -0
- package/dist/91bd2b106800bd7812e2ab5a5fea985b.js +1 -0
- package/dist/924.index.js +1 -0
- package/dist/92f4aab5c66f6269c7054c8fbcb3de13.js +1 -0
- package/dist/957970f69802c38a9092b9b6264cc1b9.js +1 -0
- package/dist/9600fed6a4508afbbcd2c75923d953c3.js +1 -0
- package/dist/962969a46fefcace3305abd4d6e14a2e.js +1 -0
- package/dist/964646d64dd3196a9c27fe302511414a.js +1 -0
- package/dist/9671c350e11f1569edb5066cbfeb3334.js +1 -0
- package/dist/9696a4229fb787eeb25b26f1274b75ee.js +1 -0
- package/dist/97e72973d750ecb3bc2e75b75bf63c5b.js +1 -0
- package/dist/9807cf1e443a7440371904b6525f37eb.js +1 -0
- package/dist/985d6749688c18f94994794f88492444.js +1 -0
- package/dist/99ade8b6895e3a1c3d6eb70583cb924e.js +1 -0
- package/dist/9b1fd9cf4206cc32e84150c49707d811.js +1 -0
- package/dist/9b8e2282f60f104ff3ace5b905af4d62.js +1 -0
- package/dist/9ff6d4a6592c0cb7d0b939113c3a6b31.js +1 -0
- package/dist/a164d0e40c4dfa485dcf8e6d5258d767.js +1 -0
- package/dist/a1c8660c5bcc6b6a43a7fb3c351174d9.js +1 -0
- package/dist/a2a705f6bc3a6827d6c94c5978aec36d.js +1 -0
- package/dist/a2c0fcb443c396b30a11fc1682a29c13.js +1 -0
- package/dist/a2d3450d9a39c72312a0afa486269a02.js +1 -0
- package/dist/a4306aa43824ec1a4ee422b59a851e6f.js +1 -0
- package/dist/a4bedde07e392f8ebf64341b61f75df2.js +1 -0
- package/dist/a4d638b976f02f35740be031f996e088.js +1 -0
- package/dist/a533e643002830be2da76c9527265860.js +1 -0
- package/dist/a5d364d12a8f7691339c497b2e725bcf.js +1 -0
- package/dist/a7824ec1ab22aeb22bb35ab8bf1ddc4a.js +1 -0
- package/dist/a934b622dd8bdcdcdc1dde985a07ac14.js +1 -0
- package/dist/a98ead014d010899b35ee25c7c225542.js +1 -0
- package/dist/aa0619cbb003e1dd873d027494aa84c4.js +1 -0
- package/dist/aa0eee504d52a12d3a30bbd523afcc34.js +1 -0
- package/dist/aa5623ec68d23fedb9c9c115c7d99063.js +1 -0
- package/dist/aaddd877950d1e3bf1b3ef0fc0ff596e.js +1 -0
- package/dist/aaf5c3a4f1a188fd051577cea7b87209.js +1 -0
- package/dist/ab4b314445b23359319c14cce9a0e321.js +1 -0
- package/dist/abb40a9a6ef0b2fe14c66dcadc9857a2.js +1 -0
- package/dist/ad215d7ba317c941cdcc96ae78e86666.js +1 -0
- package/dist/adc5e81257ed3f8d70d03cf79150eec1.js +1 -0
- package/dist/aedbf3a3ece39aab8c9f3b3a3779e79b.js +1 -0
- package/dist/af959c2a870f08dd8abccae97c9b9bae.js +1 -0
- package/dist/b0071564b0854c39e3de8b99d66e4dfd.js +1 -0
- package/dist/b02d982ccb1011197a5a24800b178a0a.js +1 -0
- package/dist/b0803f33b602bd3b26be70f259e38cee.js +1 -0
- package/dist/b1170472ae4b50e3b0070eb991e502fe.js +1 -0
- package/dist/b1ac30076824f72cdff7ea29ae0b6801.js +1 -0
- package/dist/b1f3f77a9279cdb38846ebe13c3438bc.js +1 -0
- package/dist/b20056c149af6b50c851ecfff90e0ccb.js +1 -0
- package/dist/b20cd9acf45420fcacfd923754185663.js +1 -0
- package/dist/b25188cf2652d63136d5e54c38abf84e.js +1 -0
- package/dist/b2742fab9568b63c2274698af5d381fc.js +1 -0
- package/dist/b2ff96fbe6501ff45c37491b94c96c5f.js +1 -0
- package/dist/b33ef9b4202539d3690251cb8213a034.js +1 -0
- package/dist/b3bb2c8deddd8c2afcf73f6f5d711596.js +1 -0
- package/dist/b402b938ca2da72e0984a1360eda5897.js +1 -0
- package/dist/b460e24d77f9c0d8b21e65d899840adb.js +1 -0
- package/dist/b6a6a4adaab4f09a7835ff64a5096198.js +1 -0
- package/dist/b6df2278bd475169749bab512944b7ec.js +1 -0
- package/dist/b7b7be8216519adf62d75f123f9c6423.js +1 -0
- package/dist/b808fb222140a85b23ebbe0fffa906d9.js +1 -0
- package/dist/b8197742452dd2e77090dde34cb2dc4d.js +1 -0
- package/dist/b881dca9d9a80f61d87374b4bd5a2dd5.js +1 -0
- package/dist/b98206b2175363f1150c074608603942.js +1 -0
- package/dist/ba6b8b3e06cd9d0aee9c69278ee84647.js +1 -0
- package/dist/baa5bf4cfefed057a4657a1b02cfa114.js +1 -0
- package/dist/bb4d542cb170b3f7b27a42c69262975b.js +1 -0
- package/dist/bb5bab7a675544fe31ddb7f4a77dffb9.js +1 -0
- package/dist/bc0551f89df16ee262a67c0431544a9e.js +1 -0
- package/dist/bc6bf11c6f5e6743aa4c.png +1 -0
- package/dist/c0736a7477d7aac4c669bb94ccae25d9.js +1 -0
- package/dist/c0780e66c6b1ade0fa22283ce1f9c402.js +1 -0
- package/dist/c1bc72d79cc6161590fc01c6b139fccd.js +1 -0
- package/dist/c32ec7d45ccd947b98fe458a8ca1405b.js +1 -0
- package/dist/c40023acde0f3d5f4806f5fccbb4284b.js +1 -0
- package/dist/c45445ab45defa960329c6f8e6224e57.js +1 -0
- package/dist/c51840077c684be0e7e13339f85cd4a9.js +1 -0
- package/dist/c530988d2b1966fd10a4d99fa3877e1b.js +1 -0
- package/dist/c631c95d9019218dfd22d028f215e1d1.js +1 -0
- package/dist/c728b4ef87cfd5f561d1601f0867c39d.js +1 -0
- package/dist/c733414555a126e689832ffb55cc203f.js +1 -0
- package/dist/c797511423f91a877e7fdffa74d015cb.js +1 -0
- package/dist/c7ca9dccbac3af7ebc82b271dd2aa570.js +1 -0
- package/dist/c80e89199aef31e48addb2b35ea96365.js +1 -0
- package/dist/cb4175466ea600940f2927fa03a217e8.js +1 -0
- package/dist/cb652f200fc3dd740b2e7f678a9272ea.js +1 -0
- package/dist/cbdbd623038183a8c068dd24ecd90682.js +1 -0
- package/dist/cbdc4ca43a8c940a6c3f59a8b6f17df5.js +1 -0
- package/dist/ccde58de5468dd353dbee74d631ebdf0.js +1 -0
- package/dist/cd358d9acaaa7049d85b15ac766fc314.js +1 -0
- package/dist/cd9a17f94a922c7c88000b1b3cdd67df.js +1 -0
- package/dist/cda6c5c52fa5d595982da0fac9da25a5.js +1 -0
- package/dist/cf188b3f83735389d47bb12fc9f7069a.js +1 -0
- package/dist/cf26dd07f19bcb5b7efbf057a6cfeb8f.js +1 -0
- package/dist/cf3f6b1c74c72cb5d02870022dbc9f94.js +1 -0
- package/dist/cf90a39d245bf7e6c1b41c7a9a28f0a1.js +1 -0
- package/dist/cf9c7cbfc2b609b9ae59daeab82719c4.js +1 -0
- package/dist/d04707d65591e86810ebc56d48b10810.js +1 -0
- package/dist/d1a58542777d072396d7cee5487304f9.js +1 -0
- package/dist/d1efdca26800423a363b769b1834cfcf.js +1 -0
- package/dist/d2a00e1726c71ca10fbaf4b9c4374458.js +1 -0
- package/dist/d2fe7592ff2fdda099b2b6355abe8c06.js +1 -0
- package/dist/d30fa4070abd6929228505790744e180.js +1 -0
- package/dist/d3417d490adac30d16b5.woff +0 -0
- package/dist/d43ad5f9bad9a042b49b2592c7639c28.js +1 -0
- package/dist/d542dda7308361c34af2afb9b70d755a.js +1 -0
- package/dist/d5a6140d581e5c4eb200259ce372f40b.js +1 -0
- package/dist/d5f79987405c2169278f8de37bcc9d05.js +1 -0
- package/dist/d781410d62449757525d.svg +1 -0
- package/dist/d78d3b050ea95b068380d975fd413fd7.js +1 -0
- package/dist/d79b3962938d65fb85c6f844e86d92d9.js +1 -0
- package/dist/d7b57d5ebdcade0ce5e047509e06861a.js +1 -0
- package/dist/d7d616d4aa8fd3f51d681242853dcde9.js +1 -0
- package/dist/d83f2acd25388452582e5a4c727255b0.js +1 -0
- package/dist/da1c1b1569c4d5872c9a18c29f0b5c90.js +1 -0
- package/dist/da55f4fe3daed3f79fc4565668ecf7dd.js +1 -0
- package/dist/db8ca5cfb6fe4aaef215f116f6991784.js +1 -0
- package/dist/dbc87324ecf271d088a2ab0823de9c5d.js +1 -0
- package/dist/dbd05051a3ecf6b10e2f7b8904153f2d.js +1 -0
- package/dist/dc1eb6c1c92d7067c72b82b2833a7d2c.js +1 -0
- package/dist/dcb197c0214e800da9d9436dfc9437d6.js +1 -0
- package/dist/ddbc961769cd2ff4d4a7a136168ebf4c.js +1 -0
- package/dist/de0fd4fd7c2d7a4887cbc99eed91f797.js +1 -0
- package/dist/df37029cdf8359ecac0aebdf4f257d03.js +1 -0
- package/dist/df5710d97a899b672060afaa8c4891c2.js +1 -0
- package/dist/dfb7dd1fab06b2403f76c23f80b15738.js +1 -0
- package/dist/e07a0b284934d3a0e8c02c508edc9df1.js +1 -0
- package/dist/e0adad8a8579bf99f3e22f7c214a5c64.js +1 -0
- package/dist/e0e32c3798e8895695ce5b372a0c989f.js +1 -0
- package/dist/e2b38a8393be2cf23f3894ace3efb1c3.js +1 -0
- package/dist/e32f09119052a55cce3c.png +1 -0
- package/dist/e3851b9384a984c6fdb5.png +1 -0
- package/dist/e3ba4b654313ae98884a6c9044197e09.js +1 -0
- package/dist/e4565878df49fd4ce3edd3f1022c1695.js +1 -0
- package/dist/e4917fa7632b01d28e99304d32d989f7.js +1 -0
- package/dist/e4968d8264b40c14f123f28419eb456d.js +1 -0
- package/dist/e56fe7e8042772742953d0daa47cd621.js +1 -0
- package/dist/e6070e43daf8a9e5f13f515a5a03e66c.js +1 -0
- package/dist/e61779df91186b23e7adf2d1968b2708.js +1 -0
- package/dist/e6ad50b520736b595970c9e07029c3f1.js +1 -0
- package/dist/e6cf8898b285b71e2abe832717ac7060.js +1 -0
- package/dist/e6fae0b04a3000a57f22bb25325c8afe.js +1 -0
- package/dist/e6fb5287a46e030336c006e3f50ade3a.js +1 -0
- package/dist/e7e1a807af3160b342e0a3550cf8f7c5.js +1 -0
- package/dist/e874d975c9128dc6eb9a513d088bed9f.js +1 -0
- package/dist/e8c74d57c63c7fb3be7f.eot +0 -0
- package/dist/e8fa659263d5ca9e0d1be69c048133a8.js +1 -0
- package/dist/e97cfa120fde26da0359ca29afaf3171.js +1 -0
- package/dist/eaa55a522fb2cb2f0287711f42344984.js +1 -0
- package/dist/eba5ee3fb1f3e92af88c69e50b2a8fd1.js +1 -0
- package/dist/ec2d138afc9cc9e81c4c6ef36ed55228.js +1 -0
- package/dist/ec32839f8f3353e66b85450525fa3114.js +1 -0
- package/dist/ecd02712f5a40fcdaa3bfa8190470024.js +1 -0
- package/dist/ecd37b343c4dcc8dac849b1c680dcbef.js +1 -0
- package/dist/ecdb4966f685f3e44b1f28fae46827a3.js +1 -0
- package/dist/ee694c1bcbdc9439e50f816c39fd1023.js +1 -0
- package/dist/efc14cdf19554635e477781704353ec2.js +1 -0
- package/dist/f0548260c0ac6b0e7cdb8909df1a5333.js +1 -0
- package/dist/f0878cc386a608146dbc8fb3b6745c42.js +1 -0
- package/dist/f326f2f263b1498fedbe1d07d7254d10.js +1 -0
- package/dist/f3c7b9d832aa442df3d140f7697b4f62.js +1 -0
- package/dist/f422f99dc05cb0013092.png +1 -0
- package/dist/f42342b39da2c42adc65ebcf52839f90.js +1 -0
- package/dist/f4c53706e1721b08e8b2f650c8bd35c4.js +1 -0
- package/dist/f582d9feb91d31036d3dae4cdaea865f.js +1 -0
- package/dist/f5bea0e1099339b99b21ee2d3c0fc489.js +1 -0
- package/dist/f7186078e00d958aa2b316483dfc7e1c.js +1 -0
- package/dist/f79630d85284a7f6dadc25c1d256af0a.js +1 -0
- package/dist/f80efec9a63094f19edae0480a0f2cd8.js +1 -0
- package/dist/f90003058d7087f15baa27b80bf08c1d.js +1 -0
- package/dist/f980fd09c34c277299e2d3f83aebdba5.js +1 -0
- package/dist/f9891d13237b59ce53f07874ab7a711b.js +1 -0
- package/dist/fb59a7c154104a421146ab9e5bd71540.js +1 -0
- package/dist/fc00657a30e4c8d53e47374ba0b1e8bf.js +1 -0
- package/dist/fd40b62490e412d27bc67e660aacae19.js +1 -0
- package/dist/fd5bc50b18c9f46380cbe5ec1ac2127b.js +1 -0
- package/dist/fd5e2efd3b2d047abe8473f99c650a35.js +1 -0
- package/dist/fdf4d851b44839d8fdfa77b3419bce19.js +1 -0
- package/dist/ffd3b83e8b5878f4785591ff54b1dfff.js +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.LICENSE.txt +144 -0
- package/dist/main.css +4241 -0
- package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
- package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
- package/dist/public/icons/8a549849ed1d12e8a6136d610bde7b5c.svg +365 -0
- package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
- package/dist/public/icons/97210ba7dc321670f4a144c1b40e88d8.png +0 -0
- package/dist/public/icons/bb64e23a1ff390a416d765ee556096ab.svg +87 -0
- package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
- package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
- package/dist/public/icons/iphone-top-bar.png +0 -0
- package/dist/public/icons/iphone.png +0 -0
- package/dist/public/icons/placeholder-image.png +0 -0
- package/dist/public/icons/skeleton-background.png +0 -0
- package/dist/public/icons/stars_slider.png +0 -0
- package/dist/public/icons/transparent.svg +1 -0
- package/es/assets/css/main.scss +4 -4
- package/es/assets/images/feedback.svg +3 -3
- package/es/components/atoms/Alert/Alert.d.ts +4 -4
- package/es/components/atoms/Alert/Alert.js +19 -19
- package/es/components/atoms/Alert/index.d.ts +1 -1
- package/es/components/atoms/Alert/index.js +1 -1
- package/es/components/atoms/Button/Button.d.ts +1 -1
- package/es/components/atoms/Button/Button.js +1 -1
- package/es/components/atoms/Button/index.d.ts +4 -4
- package/es/components/atoms/Button/index.js +2 -2
- package/es/components/atoms/Button/test.d.ts +3 -3
- package/es/components/atoms/Button/test.js +99 -99
- package/es/components/atoms/Checkbox/Checkbox.d.ts +1 -1
- package/es/components/atoms/Checkbox/Checkbox.js +1 -1
- package/es/components/atoms/Checkbox/index.d.ts +1 -1
- package/es/components/atoms/Checkbox/index.js +1 -1
- package/es/components/atoms/Divider/Divider.d.ts +1 -1
- package/es/components/atoms/Divider/Divider.js +1 -1
- package/es/components/atoms/Divider/index.d.ts +1 -1
- package/es/components/atoms/Divider/index.js +1 -1
- package/es/components/atoms/DividerPure/DividerPure.d.ts +10 -10
- package/es/components/atoms/DividerPure/DividerPure.js +27 -27
- package/es/components/atoms/DividerPure/index.d.ts +1 -1
- package/es/components/atoms/DividerPure/index.js +1 -1
- package/es/components/atoms/DividerPure/styled.d.ts +1 -1
- package/es/components/atoms/DividerPure/styled.js +41 -41
- package/es/components/atoms/Empty/Empty.d.ts +6 -6
- package/es/components/atoms/Empty/Empty.js +8 -8
- package/es/components/atoms/Empty/index.d.ts +1 -1
- package/es/components/atoms/Empty/index.js +1 -1
- package/es/components/atoms/Flex/Flex.d.ts +2 -2
- package/es/components/atoms/Flex/Flex.js +1 -1
- package/es/components/atoms/Flex/index.d.ts +1 -1
- package/es/components/atoms/Flex/index.js +1 -1
- package/es/components/atoms/FloatButton/FloatButton.d.ts +1 -1
- package/es/components/atoms/FloatButton/FloatButton.js +1 -1
- package/es/components/atoms/FloatButton/index.d.ts +1 -1
- package/es/components/atoms/FloatButton/index.js +2 -2
- package/es/components/atoms/Grid/Grid.d.ts +3 -3
- package/es/components/atoms/Grid/Grid.js +3 -3
- package/es/components/atoms/Grid/index.d.ts +1 -1
- package/es/components/atoms/Grid/index.js +1 -1
- package/es/components/atoms/Icon/index.d.ts +10 -10
- package/es/components/atoms/Icon/index.js +36 -36
- package/es/components/atoms/Input/Input.d.ts +31 -31
- package/es/components/atoms/Input/Input.js +96 -96
- package/es/components/atoms/Input/index.d.ts +2 -2
- package/es/components/atoms/Input/index.js +1 -1
- package/es/components/atoms/Input/styled.d.ts +11 -11
- package/es/components/atoms/Input/styled.js +109 -109
- package/es/components/atoms/InputDynamic/EditCaretPositioning.d.ts +2 -2
- package/es/components/atoms/InputDynamic/EditCaretPositioning.js +89 -89
- package/es/components/atoms/InputDynamic/InputDynamic.d.ts +10 -10
- package/es/components/atoms/InputDynamic/InputDynamic.js +516 -516
- package/es/components/atoms/InputDynamic/PopupShortLink.d.ts +16 -16
- package/es/components/atoms/InputDynamic/PopupShortLink.js +85 -85
- package/es/components/atoms/InputDynamic/constants.d.ts +71 -71
- package/es/components/atoms/InputDynamic/constants.js +71 -71
- package/es/components/atoms/InputDynamic/index.d.ts +2 -2
- package/es/components/atoms/InputDynamic/index.js +1 -1
- package/es/components/atoms/InputDynamic/styled.d.ts +13 -13
- package/es/components/atoms/InputDynamic/styled.js +293 -293
- package/es/components/atoms/InputDynamic/types.d.ts +116 -116
- package/es/components/atoms/InputDynamic/types.js +1 -1
- package/es/components/atoms/InputDynamic/utils.d.ts +30 -30
- package/es/components/atoms/InputDynamic/utils.js +874 -874
- package/es/components/atoms/InputNumber/InputNumber.d.ts +6 -6
- package/es/components/atoms/InputNumber/InputNumber.js +27 -27
- package/es/components/atoms/InputNumber/index.d.ts +1 -1
- package/es/components/atoms/InputNumber/index.js +1 -1
- package/es/components/atoms/Message/Message.d.ts +1 -1
- package/es/components/atoms/Message/Message.js +1 -1
- package/es/components/atoms/Message/index.d.ts +1 -1
- package/es/components/atoms/Message/index.js +1 -1
- package/es/components/atoms/MobileFrame/MobileFrame.d.ts +4 -4
- package/es/components/atoms/MobileFrame/MobileFrame.js +22 -22
- package/es/components/atoms/MobileFrame/constants.d.ts +4 -4
- package/es/components/atoms/MobileFrame/constants.js +4 -4
- package/es/components/atoms/MobileFrame/index.d.ts +2 -2
- package/es/components/atoms/MobileFrame/index.js +1 -1
- package/es/components/atoms/MobileFrame/styled.d.ts +3 -3
- package/es/components/atoms/MobileFrame/styled.js +33 -33
- package/es/components/atoms/Notification/Notification.d.ts +1 -1
- package/es/components/atoms/Notification/Notification.js +1 -1
- package/es/components/atoms/Notification/index.d.ts +1 -1
- package/es/components/atoms/Notification/index.js +1 -1
- package/es/components/atoms/Pagination/Pagination.d.ts +2 -2
- package/es/components/atoms/Pagination/Pagination.js +2 -2
- package/es/components/atoms/Pagination/index.d.ts +2 -2
- package/es/components/atoms/Pagination/index.js +1 -1
- package/es/components/atoms/Popover/Popover.d.ts +4 -4
- package/es/components/atoms/Popover/Popover.js +2 -2
- package/es/components/atoms/Popover/index.d.ts +1 -1
- package/es/components/atoms/Popover/index.js +1 -1
- package/es/components/atoms/Popover/styled.d.ts +4 -4
- package/es/components/atoms/Popover/styled.js +5 -5
- package/es/components/atoms/PreviewTabs/PreviewTabs.d.ts +7 -7
- package/es/components/atoms/PreviewTabs/PreviewTabs.js +67 -67
- package/es/components/atoms/PreviewTabs/index.d.ts +2 -2
- package/es/components/atoms/PreviewTabs/index.js +1 -1
- package/es/components/atoms/PreviewTabs/styled.d.ts +6 -6
- package/es/components/atoms/PreviewTabs/styled.js +79 -79
- package/es/components/atoms/Progress/Progress.d.ts +2 -2
- package/es/components/atoms/Progress/Progress.js +2 -2
- package/es/components/atoms/Progress/index.d.ts +1 -1
- package/es/components/atoms/Progress/index.js +1 -1
- package/es/components/atoms/Radio/Radio.d.ts +1 -1
- package/es/components/atoms/Radio/Radio.js +1 -1
- package/es/components/atoms/Radio/index.d.ts +7 -7
- package/es/components/atoms/Radio/index.js +25 -25
- package/es/components/atoms/Rate/Rate.d.ts +2 -2
- package/es/components/atoms/Rate/Rate.js +2 -2
- package/es/components/atoms/Rate/index.d.ts +1 -1
- package/es/components/atoms/Rate/index.js +1 -1
- package/es/components/atoms/RateV2/RateV2.d.ts +18 -18
- package/es/components/atoms/RateV2/RateV2.js +73 -73
- package/es/components/atoms/RateV2/index.d.ts +1 -1
- package/es/components/atoms/RateV2/index.js +1 -1
- package/es/components/atoms/RequiredLabel/index.d.ts +8 -8
- package/es/components/atoms/RequiredLabel/index.js +25 -25
- package/es/components/atoms/RequiredLabel/styled.d.ts +2 -2
- package/es/components/atoms/RequiredLabel/styled.js +10 -10
- package/es/components/atoms/ScrollBox/index.d.ts +9 -9
- package/es/components/atoms/ScrollBox/index.js +51 -51
- package/es/components/atoms/Segmented/Segmented.d.ts +2 -2
- package/es/components/atoms/Segmented/Segmented.js +2 -2
- package/es/components/atoms/Segmented/index.d.ts +1 -1
- package/es/components/atoms/Segmented/index.js +1 -1
- package/es/components/atoms/Skeleton/Skeleton.d.ts +8 -8
- package/es/components/atoms/Skeleton/Skeleton.js +2 -2
- package/es/components/atoms/Skeleton/index.d.ts +1 -1
- package/es/components/atoms/Skeleton/index.js +1 -1
- package/es/components/atoms/SlideBar/SlideBar.d.ts +34 -34
- package/es/components/atoms/SlideBar/SlideBar.js +283 -283
- package/es/components/atoms/SlideBar/constants.d.ts +10 -10
- package/es/components/atoms/SlideBar/constants.js +10 -10
- package/es/components/atoms/SlideBar/index.d.ts +1 -1
- package/es/components/atoms/SlideBar/index.js +1 -1
- package/es/components/atoms/SlideBar/styled.d.ts +20 -20
- package/es/components/atoms/SlideBar/styled.js +136 -136
- package/es/components/atoms/Slider/index.d.ts +6 -6
- package/es/components/atoms/Slider/index.js +30 -30
- package/es/components/atoms/Slider/styled.d.ts +7 -7
- package/es/components/atoms/Slider/styled.js +44 -44
- package/es/components/atoms/SliderV2/index.d.ts +6 -6
- package/es/components/atoms/SliderV2/index.js +21 -21
- package/es/components/atoms/Space/Space.d.ts +6 -6
- package/es/components/atoms/Space/Space.js +9 -9
- package/es/components/atoms/Space/index.d.ts +1 -1
- package/es/components/atoms/Space/index.js +1 -1
- package/es/components/atoms/Spin/Spin.d.ts +10 -10
- package/es/components/atoms/Spin/Spin.js +28 -28
- package/es/components/atoms/Spin/index.d.ts +1 -1
- package/es/components/atoms/Spin/index.js +1 -1
- package/es/components/atoms/Spin/styled.d.ts +1 -1
- package/es/components/atoms/Spin/styled.js +7 -7
- package/es/components/atoms/Statistic/Statistic.d.ts +1 -1
- package/es/components/atoms/Statistic/Statistic.js +2 -2
- package/es/components/atoms/Statistic/index.d.ts +1 -1
- package/es/components/atoms/Statistic/index.js +1 -1
- package/es/components/atoms/Steps/Steps.d.ts +4 -4
- package/es/components/atoms/Steps/Steps.js +2 -2
- package/es/components/atoms/Steps/index.d.ts +1 -1
- package/es/components/atoms/Steps/index.js +1 -1
- package/es/components/atoms/Switch/Switch.d.ts +2 -2
- package/es/components/atoms/Switch/Switch.js +2 -2
- package/es/components/atoms/Switch/index.d.ts +1 -1
- package/es/components/atoms/Switch/index.js +1 -1
- package/es/components/atoms/Tag/Tag.d.ts +1 -1
- package/es/components/atoms/Tag/Tag.js +1 -1
- package/es/components/atoms/Tag/index.d.ts +1 -1
- package/es/components/atoms/Tag/index.js +1 -1
- package/es/components/atoms/Text/index.d.ts +10 -10
- package/es/components/atoms/Text/index.js +27 -27
- package/es/components/atoms/Text/styled.d.ts +7 -7
- package/es/components/atoms/Text/styled.js +52 -52
- package/es/components/atoms/Timeline/Timeline.d.ts +4 -4
- package/es/components/atoms/Timeline/Timeline.js +2 -2
- package/es/components/atoms/Timeline/index.d.ts +1 -1
- package/es/components/atoms/Timeline/index.js +1 -1
- package/es/components/atoms/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/atoms/Tooltip/Tooltip.js +1 -1
- package/es/components/atoms/Tooltip/index.d.ts +1 -1
- package/es/components/atoms/Tooltip/index.js +1 -1
- package/es/components/atoms/Typography/Text.d.ts +1 -1
- package/es/components/atoms/Typography/Text.js +1 -1
- package/es/components/atoms/Typography/index.d.ts +1 -1
- package/es/components/atoms/Typography/index.js +1 -1
- package/es/components/atoms/Watermark/Watermark.d.ts +2 -2
- package/es/components/atoms/Watermark/Watermark.js +2 -2
- package/es/components/atoms/Watermark/index.d.ts +1 -1
- package/es/components/atoms/Watermark/index.js +1 -1
- package/es/components/atoms/index.d.ts +42 -42
- package/es/components/atoms/index.js +39 -39
- package/es/components/common/ConfigProvider/ConfigProvider.d.ts +11 -11
- package/es/components/common/ConfigProvider/ConfigProvider.js +54 -54
- package/es/components/common/ConfigProvider/GlobalStyle.d.ts +5 -5
- package/es/components/common/ConfigProvider/GlobalStyle.js +773 -773
- package/es/components/common/ConfigProvider/index.d.ts +1 -1
- package/es/components/common/ConfigProvider/index.js +1 -1
- package/es/components/common/index.d.ts +1 -1
- package/es/components/common/index.js +1 -1
- package/es/components/icons/AccountCircle.d.ts +3 -3
- package/es/components/icons/AccountCircle.js +3 -3
- package/es/components/icons/AddShoppingCart.d.ts +3 -3
- package/es/components/icons/AddShoppingCart.js +3 -3
- package/es/components/icons/ArrowGrowIcon.d.ts +2 -2
- package/es/components/icons/ArrowGrowIcon.js +4 -4
- package/es/components/icons/AssignmentInd.d.ts +3 -3
- package/es/components/icons/AssignmentInd.js +3 -3
- package/es/components/icons/AudioRecordIcon.d.ts +2 -2
- package/es/components/icons/AudioRecordIcon.js +4 -4
- package/es/components/icons/BugIcon.d.ts +2 -2
- package/es/components/icons/BugIcon.js +4 -4
- package/es/components/icons/Call.d.ts +3 -3
- package/es/components/icons/Call.js +3 -3
- package/es/components/icons/CameraIcon.d.ts +2 -2
- package/es/components/icons/CameraIcon.js +4 -4
- package/es/components/icons/CaptureIcon.d.ts +2 -2
- package/es/components/icons/CaptureIcon.js +4 -4
- package/es/components/icons/Category.d.ts +3 -3
- package/es/components/icons/Category.js +5 -5
- package/es/components/icons/ChatBubbleOutline.d.ts +3 -3
- package/es/components/icons/ChatBubbleOutline.js +3 -3
- package/es/components/icons/CheckSlimIcon.d.ts +2 -2
- package/es/components/icons/CheckSlimIcon.js +4 -4
- package/es/components/icons/CircleNotifications.d.ts +3 -3
- package/es/components/icons/CircleNotifications.js +3 -3
- package/es/components/icons/CloseIcon.d.ts +4 -4
- package/es/components/icons/CloseIcon.js +22 -22
- package/es/components/icons/CommentIcon.d.ts +2 -2
- package/es/components/icons/CommentIcon.js +4 -4
- package/es/components/icons/ConfirmationNumber.d.ts +3 -3
- package/es/components/icons/ConfirmationNumber.js +3 -3
- package/es/components/icons/DesktopWindows.d.ts +3 -3
- package/es/components/icons/DesktopWindows.js +3 -3
- package/es/components/icons/EventIcon.d.ts +4 -4
- package/es/components/icons/EventIcon.js +18 -18
- package/es/components/icons/FactCheck.d.ts +3 -3
- package/es/components/icons/FactCheck.js +3 -3
- package/es/components/icons/FreeDrawIcon.d.ts +2 -2
- package/es/components/icons/FreeDrawIcon.js +4 -4
- package/es/components/icons/GPTIcon.d.ts +2 -2
- package/es/components/icons/GPTIcon.js +18 -18
- package/es/components/icons/GPTIconV2.d.ts +2 -2
- package/es/components/icons/GPTIconV2.js +18 -18
- package/es/components/icons/GPTIconV3.d.ts +2 -2
- package/es/components/icons/GPTIconV3.js +5 -5
- package/es/components/icons/HighlightIcon.d.ts +2 -2
- package/es/components/icons/HighlightIcon.js +4 -4
- package/es/components/icons/HightlightAlt.d.ts +3 -3
- package/es/components/icons/HightlightAlt.js +3 -3
- package/es/components/icons/HowToReg.d.ts +3 -3
- package/es/components/icons/HowToReg.js +3 -3
- package/es/components/icons/IdeaIcon.d.ts +2 -2
- package/es/components/icons/IdeaIcon.js +4 -4
- package/es/components/icons/Interactive.d.ts +3 -3
- package/es/components/icons/Interactive.js +3 -3
- package/es/components/icons/InvisibleIcon.d.ts +2 -2
- package/es/components/icons/InvisibleIcon.js +5 -5
- package/es/components/icons/List.d.ts +3 -3
- package/es/components/icons/List.js +3 -3
- package/es/components/icons/LocalMallIcon.d.ts +3 -3
- package/es/components/icons/LocalMallIcon.js +3 -3
- package/es/components/icons/MobileFriendly.d.ts +3 -3
- package/es/components/icons/MobileFriendly.js +3 -3
- package/es/components/icons/MuteIcon.d.ts +2 -2
- package/es/components/icons/MuteIcon.js +4 -4
- package/es/components/icons/NotificationsActive.d.ts +3 -3
- package/es/components/icons/NotificationsActive.js +3 -3
- package/es/components/icons/OpenUrlIcon.d.ts +2 -2
- package/es/components/icons/OpenUrlIcon.js +4 -4
- package/es/components/icons/PauseIcon.d.ts +2 -2
- package/es/components/icons/PauseIcon.js +4 -4
- package/es/components/icons/Payment.d.ts +3 -3
- package/es/components/icons/Payment.js +3 -3
- package/es/components/icons/PersonAddDisabled.d.ts +3 -3
- package/es/components/icons/PersonAddDisabled.js +4 -4
- package/es/components/icons/PhoneCallback.d.ts +3 -3
- package/es/components/icons/PhoneCallback.js +3 -3
- package/es/components/icons/PlaneIcon.d.ts +2 -2
- package/es/components/icons/PlaneIcon.js +8 -8
- package/es/components/icons/Preview.d.ts +3 -3
- package/es/components/icons/Preview.js +3 -3
- package/es/components/icons/Redeem.d.ts +3 -3
- package/es/components/icons/Redeem.js +3 -3
- package/es/components/icons/RemoveRedEye.d.ts +3 -3
- package/es/components/icons/RemoveRedEye.js +3 -3
- package/es/components/icons/RemoveShoppingCart.d.ts +3 -3
- package/es/components/icons/RemoveShoppingCart.js +3 -3
- package/es/components/icons/RequestIcon.d.ts +2 -2
- package/es/components/icons/RequestIcon.js +4 -4
- package/es/components/icons/Search.d.ts +3 -3
- package/es/components/icons/Search.js +3 -3
- package/es/components/icons/ShoppingBag.d.ts +3 -3
- package/es/components/icons/ShoppingBag.js +3 -3
- package/es/components/icons/ShoppingCart.d.ts +3 -3
- package/es/components/icons/ShoppingCart.js +3 -3
- package/es/components/icons/StopRecordIcon.d.ts +2 -2
- package/es/components/icons/StopRecordIcon.js +4 -4
- package/es/components/icons/Store.d.ts +3 -3
- package/es/components/icons/Store.js +3 -3
- package/es/components/icons/UserIcon.d.ts +2 -2
- package/es/components/icons/UserIcon.js +8 -8
- package/es/components/icons/VerticalDotsIcon.d.ts +2 -2
- package/es/components/icons/VerticalDotsIcon.js +4 -4
- package/es/components/icons/WarningIcon.d.ts +2 -2
- package/es/components/icons/WarningIcon.js +4 -4
- package/es/components/icons/Web.d.ts +3 -3
- package/es/components/icons/Web.js +3 -3
- package/es/components/icons/WebAsset.d.ts +3 -3
- package/es/components/icons/WebAsset.js +3 -3
- package/es/components/icons/index.d.ts +54 -54
- package/es/components/icons/index.js +54 -54
- package/es/components/icons/type.d.ts +3 -3
- package/es/components/icons/type.js +1 -1
- package/es/components/index.d.ts +5 -5
- package/es/components/index.js +5 -5
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.d.ts +35 -35
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +1248 -1248
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +12 -12
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.js +25 -25
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.d.ts +3 -3
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.js +3 -3
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.d.ts +19 -19
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.js +100 -100
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.d.ts +1 -1
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.js +1 -1
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.d.ts +52 -52
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.js +132 -132
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.d.ts +1 -1
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.js +1 -1
- package/es/components/molecules/AddDynamicContent/components/index.d.ts +3 -3
- package/es/components/molecules/AddDynamicContent/components/index.js +3 -3
- package/es/components/molecules/AddDynamicContent/constants.d.ts +101 -101
- package/es/components/molecules/AddDynamicContent/constants.js +152 -152
- package/es/components/molecules/AddDynamicContent/currencies.json +1523 -1523
- package/es/components/molecules/AddDynamicContent/index.d.ts +2 -2
- package/es/components/molecules/AddDynamicContent/index.js +2 -2
- package/es/components/molecules/AddDynamicContent/styled.d.ts +12 -12
- package/es/components/molecules/AddDynamicContent/styled.js +30 -30
- package/es/components/molecules/AddDynamicContent/types.d.ts +13 -13
- package/es/components/molecules/AddDynamicContent/types.js +1 -1
- package/es/components/molecules/AddDynamicContent/utils.d.ts +41 -41
- package/es/components/molecules/AddDynamicContent/utils.js +396 -396
- package/es/components/molecules/AlignSetting/index.d.ts +19 -19
- package/es/components/molecules/AlignSetting/index.js +52 -52
- package/es/components/molecules/AlignSetting/styled.d.ts +1 -1
- package/es/components/molecules/AlignSetting/styled.js +7 -7
- package/es/components/molecules/AlignSetting/utils.d.ts +3 -3
- package/es/components/molecules/AlignSetting/utils.js +19 -19
- package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +16 -16
- package/es/components/molecules/CaptureScreen/CaptureScreen.js +834 -834
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +17 -17
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.js +80 -80
- package/es/components/molecules/CaptureScreen/components/CommentBox/index.d.ts +1 -1
- package/es/components/molecules/CaptureScreen/components/CommentBox/index.js +1 -1
- package/es/components/molecules/CaptureScreen/components/CommentBox/styled.d.ts +12 -12
- package/es/components/molecules/CaptureScreen/components/CommentBox/styled.js +136 -136
- package/es/components/molecules/CaptureScreen/components/CommentBox/types.d.ts +15 -15
- package/es/components/molecules/CaptureScreen/components/CommentBox/types.js +1 -1
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +4 -4
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.js +17 -17
- package/es/components/molecules/CaptureScreen/components/Cursor/index.d.ts +1 -1
- package/es/components/molecules/CaptureScreen/components/Cursor/index.js +1 -1
- package/es/components/molecules/CaptureScreen/components/Cursor/styled.d.ts +7 -7
- package/es/components/molecules/CaptureScreen/components/Cursor/styled.js +79 -79
- package/es/components/molecules/CaptureScreen/components/Cursor/types.d.ts +10 -10
- package/es/components/molecules/CaptureScreen/components/Cursor/types.js +1 -1
- package/es/components/molecules/CaptureScreen/constants.d.ts +41 -41
- package/es/components/molecules/CaptureScreen/constants.js +118 -118
- package/es/components/molecules/CaptureScreen/hooks/useImageEditor.d.ts +5 -5
- package/es/components/molecules/CaptureScreen/hooks/useImageEditor.js +103 -103
- package/es/components/molecules/CaptureScreen/index.d.ts +1 -1
- package/es/components/molecules/CaptureScreen/index.js +1 -1
- package/es/components/molecules/CaptureScreen/styled.d.ts +26 -26
- package/es/components/molecules/CaptureScreen/styled.js +255 -255
- package/es/components/molecules/CaptureScreen/themes/black.d.ts +54 -54
- package/es/components/molecules/CaptureScreen/themes/black.js +64 -64
- package/es/components/molecules/CaptureScreen/themes/white.d.ts +54 -54
- package/es/components/molecules/CaptureScreen/themes/white.js +64 -64
- package/es/components/molecules/CaptureScreen/types.d.ts +108 -108
- package/es/components/molecules/CaptureScreen/types.js +1 -1
- package/es/components/molecules/CaptureScreen/utils.d.ts +13 -13
- package/es/components/molecules/CaptureScreen/utils.js +62 -62
- package/es/components/molecules/Card/Card.d.ts +1 -1
- package/es/components/molecules/Card/Card.js +2 -2
- package/es/components/molecules/Card/index.d.ts +1 -1
- package/es/components/molecules/Card/index.js +1 -1
- package/es/components/molecules/Cascader/Cascader.d.ts +1 -1
- package/es/components/molecules/Cascader/Cascader.js +1 -1
- package/es/components/molecules/Cascader/index.d.ts +1 -1
- package/es/components/molecules/Cascader/index.js +1 -1
- package/es/components/molecules/ChatBox/ChatBox.d.ts +3 -3
- package/es/components/molecules/ChatBox/ChatBox.js +188 -188
- package/es/components/molecules/ChatBox/MessageItem.d.ts +5 -5
- package/es/components/molecules/ChatBox/MessageItem.js +66 -66
- package/es/components/molecules/ChatBox/constants.d.ts +6 -6
- package/es/components/molecules/ChatBox/constants.js +51 -51
- package/es/components/molecules/ChatBox/index.d.ts +1 -1
- package/es/components/molecules/ChatBox/index.js +1 -1
- package/es/components/molecules/ChatBox/styled.d.ts +10 -10
- package/es/components/molecules/ChatBox/styled.js +280 -280
- package/es/components/molecules/ChatBox/types.d.ts +32 -32
- package/es/components/molecules/ChatBox/types.js +1 -1
- package/es/components/molecules/Collapse/Collapse.d.ts +4 -4
- package/es/components/molecules/Collapse/Collapse.js +11 -11
- package/es/components/molecules/Collapse/index.d.ts +1 -1
- package/es/components/molecules/Collapse/index.js +1 -1
- package/es/components/molecules/ColorPicker/ChromePicker/index.d.ts +1 -1
- package/es/components/molecules/ColorPicker/ChromePicker/index.js +3 -3
- package/es/components/molecules/ColorPicker/ChromePicker/styled.d.ts +1 -1
- package/es/components/molecules/ColorPicker/ChromePicker/styled.js +15 -15
- package/es/components/molecules/ColorPicker/CustomPicker/index.d.ts +2 -2
- package/es/components/molecules/ColorPicker/CustomPicker/index.js +117 -117
- package/es/components/molecules/ColorPicker/CustomPicker/styled.d.ts +9 -9
- package/es/components/molecules/ColorPicker/CustomPicker/styled.js +104 -104
- package/es/components/molecules/ColorPicker/SketchPicker/index.d.ts +10 -10
- package/es/components/molecules/ColorPicker/SketchPicker/index.js +5 -5
- package/es/components/molecules/ColorPicker/SketchPicker/styled.d.ts +1 -1
- package/es/components/molecules/ColorPicker/SketchPicker/styled.js +10 -10
- package/es/components/molecules/ColorPicker/index.d.ts +13 -13
- package/es/components/molecules/ColorPicker/index.js +95 -95
- package/es/components/molecules/ColorPicker/styled.d.ts +1 -1
- package/es/components/molecules/ColorPicker/styled.js +10 -10
- package/es/components/molecules/ColorSetting/index.d.ts +14 -14
- package/es/components/molecules/ColorSetting/index.js +97 -97
- package/es/components/molecules/ColorSetting/styled.d.ts +7 -7
- package/es/components/molecules/ColorSetting/styled.js +42 -42
- package/es/components/molecules/DatePicker/DatePicker.d.ts +8 -8
- package/es/components/molecules/DatePicker/DatePicker.js +8 -8
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +32 -32
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +439 -439
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +106 -106
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +197 -197
- package/es/components/molecules/DatePicker/components/AdvancedPicker/index.d.ts +3 -3
- package/es/components/molecules/DatePicker/components/AdvancedPicker/index.js +1 -1
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +9 -9
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +100 -100
- package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +36 -36
- package/es/components/molecules/DatePicker/components/AdvancedPicker/types.js +1 -1
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +39 -39
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +211 -211
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +18 -18
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +83 -83
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.d.ts +5 -5
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.js +5 -5
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/index.d.ts +2 -2
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/index.js +1 -1
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/types.d.ts +18 -18
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/types.js +1 -1
- package/es/components/molecules/DatePicker/components/DropdownLabel/DropdownLabel.d.ts +13 -13
- package/es/components/molecules/DatePicker/components/DropdownLabel/DropdownLabel.js +87 -87
- package/es/components/molecules/DatePicker/components/ErrorMessage/ErrorMessage.d.ts +6 -6
- package/es/components/molecules/DatePicker/components/ErrorMessage/ErrorMessage.js +12 -12
- package/es/components/molecules/DatePicker/index.d.ts +3 -3
- package/es/components/molecules/DatePicker/index.js +1 -1
- package/es/components/molecules/Drawer/Drawer.d.ts +5 -5
- package/es/components/molecules/Drawer/Drawer.js +4 -4
- package/es/components/molecules/Drawer/index.d.ts +2 -2
- package/es/components/molecules/Drawer/index.js +1 -1
- package/es/components/molecules/Dropdown/Dropdown.d.ts +1 -1
- package/es/components/molecules/Dropdown/Dropdown.js +1 -1
- package/es/components/molecules/Dropdown/index.d.ts +1 -1
- package/es/components/molecules/Dropdown/index.js +1 -1
- package/es/components/molecules/EdgeSetting/index.d.ts +39 -39
- package/es/components/molecules/EdgeSetting/index.js +192 -192
- package/es/components/molecules/EdgeSetting/styled.d.ts +3 -3
- package/es/components/molecules/EdgeSetting/styled.js +18 -18
- package/es/components/molecules/EditorScript/EditorScript.d.ts +25 -14
- package/es/components/molecules/EditorScript/EditorScript.js +89 -89
- package/es/components/molecules/EditorScript/index.d.ts +1 -1
- package/es/components/molecules/EditorScript/index.js +1 -1
- package/es/components/molecules/EditorScript/styled.d.ts +1 -1
- package/es/components/molecules/EditorScript/styled.js +3 -3
- package/es/components/molecules/FontFamilySelect/constants.d.ts +307 -307
- package/es/components/molecules/FontFamilySelect/constants.js +257 -257
- package/es/components/molecules/FontFamilySelect/index.d.ts +17 -17
- package/es/components/molecules/FontFamilySelect/index.js +53 -53
- package/es/components/molecules/FontSetting/constants.d.ts +3 -3
- package/es/components/molecules/FontSetting/constants.js +22 -22
- package/es/components/molecules/FontSetting/index.d.ts +24 -24
- package/es/components/molecules/FontSetting/index.js +54 -54
- package/es/components/molecules/FontSetting/types.d.ts +22 -22
- package/es/components/molecules/FontSetting/types.js +1 -1
- package/es/components/molecules/FontWeightSelect/constants.d.ts +28 -28
- package/es/components/molecules/FontWeightSelect/constants.js +11 -11
- package/es/components/molecules/FontWeightSelect/index.d.ts +9 -9
- package/es/components/molecules/FontWeightSelect/index.js +39 -39
- package/es/components/molecules/Form/Form.d.ts +1 -1
- package/es/components/molecules/Form/Form.js +1 -1
- package/es/components/molecules/Form/index.d.ts +1 -1
- package/es/components/molecules/Form/index.js +1 -1
- package/es/components/molecules/GradientSetting/index.d.ts +36 -36
- package/es/components/molecules/GradientSetting/index.js +99 -99
- package/es/components/molecules/GradientSetting/styled.d.ts +1 -1
- package/es/components/molecules/GradientSetting/styled.js +59 -59
- package/es/components/molecules/IconSelection/components/Icon/index.d.ts +10 -10
- package/es/components/molecules/IconSelection/components/Icon/index.js +28 -28
- package/es/components/molecules/IconSelection/constants.d.ts +56 -56
- package/es/components/molecules/IconSelection/constants.js +89 -89
- package/es/components/molecules/IconSelection/index.d.ts +3 -3
- package/es/components/molecules/IconSelection/index.js +143 -143
- package/es/components/molecules/IconSelection/styled.d.ts +8 -8
- package/es/components/molecules/IconSelection/styled.js +80 -80
- package/es/components/molecules/IconSelection/types.d.ts +26 -26
- package/es/components/molecules/IconSelection/types.js +2 -2
- package/es/components/molecules/IconSelection/utils.d.ts +4 -4
- package/es/components/molecules/IconSelection/utils.js +13 -13
- package/es/components/molecules/InputNumber/index.d.ts +9 -9
- package/es/components/molecules/InputNumber/index.js +81 -81
- package/es/components/molecules/InputNumberWithUnit/index.d.ts +31 -31
- package/es/components/molecules/InputNumberWithUnit/index.js +37 -37
- package/es/components/molecules/InputNumberWithUnit/styled.d.ts +1 -1
- package/es/components/molecules/InputNumberWithUnit/styled.js +20 -20
- package/es/components/molecules/InputSearch/index.d.ts +7 -7
- package/es/components/molecules/InputSearch/index.js +23 -23
- package/es/components/molecules/InputSearch/styled.d.ts +1 -1
- package/es/components/molecules/InputSearch/styled.js +48 -48
- package/es/components/molecules/Modal/Modal.d.ts +23 -23
- package/es/components/molecules/Modal/Modal.js +26 -26
- package/es/components/molecules/Modal/index.d.ts +2 -2
- package/es/components/molecules/Modal/index.js +1 -1
- package/es/components/molecules/Modal/styled.d.ts +15 -15
- package/es/components/molecules/Modal/styled.js +80 -80
- package/es/components/molecules/ModalV2/ModalV2.d.ts +5 -5
- package/es/components/molecules/ModalV2/ModalV2.js +26 -26
- package/es/components/molecules/ModalV2/index.d.ts +2 -2
- package/es/components/molecules/ModalV2/index.js +1 -1
- package/es/components/molecules/ModalV2/styled.d.ts +7 -7
- package/es/components/molecules/ModalV2/styled.js +22 -22
- package/es/components/molecules/Popconfirm/Popconfirm.d.ts +4 -4
- package/es/components/molecules/Popconfirm/Popconfirm.js +2 -2
- package/es/components/molecules/Popconfirm/index.d.ts +1 -1
- package/es/components/molecules/Popconfirm/index.js +1 -1
- package/es/components/molecules/PopupDraggable/PopupDraggable.d.ts +6 -6
- package/es/components/molecules/PopupDraggable/PopupDraggable.js +52 -52
- package/es/components/molecules/PopupDraggable/index.d.ts +1 -1
- package/es/components/molecules/PopupDraggable/index.js +1 -1
- package/es/components/molecules/PopupDraggable/styled.d.ts +5 -5
- package/es/components/molecules/PopupDraggable/styled.js +52 -52
- package/es/components/molecules/PopupDraggable/types.d.ts +15 -15
- package/es/components/molecules/PopupDraggable/types.js +1 -1
- package/es/components/molecules/PreviewModal/PreviewModal.d.ts +7 -7
- package/es/components/molecules/PreviewModal/PreviewModal.js +30 -30
- package/es/components/molecules/PreviewModal/index.d.ts +2 -2
- package/es/components/molecules/PreviewModal/index.js +1 -1
- package/es/components/molecules/PreviewModal/styled.d.ts +4 -4
- package/es/components/molecules/PreviewModal/styled.js +39 -39
- package/es/components/molecules/RadioGroup/index.d.ts +7 -7
- package/es/components/molecules/RadioGroup/index.js +23 -23
- package/es/components/molecules/RadioGroup/styled.d.ts +3 -3
- package/es/components/molecules/RadioGroup/styled.js +14 -14
- package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -3
- package/es/components/molecules/ResizeGrid/ResizeGrid.js +736 -728
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -3
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +87 -87
- package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -1
- package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -1
- package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -3
- package/es/components/molecules/ResizeGrid/components/Cell/styled.js +80 -80
- package/es/components/molecules/ResizeGrid/constant.d.ts +35 -35
- package/es/components/molecules/ResizeGrid/constant.js +111 -111
- package/es/components/molecules/ResizeGrid/index.d.ts +2 -2
- package/es/components/molecules/ResizeGrid/index.js +1 -1
- package/es/components/molecules/ResizeGrid/styled.d.ts +10 -10
- package/es/components/molecules/ResizeGrid/styled.js +56 -56
- package/es/components/molecules/ResizeGrid/types.d.ts +148 -147
- package/es/components/molecules/ResizeGrid/types.js +1 -1
- package/es/components/molecules/Result/Result.d.ts +1 -1
- package/es/components/molecules/Result/Result.js +2 -2
- package/es/components/molecules/Result/index.d.ts +1 -1
- package/es/components/molecules/Result/index.js +1 -1
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +13 -13
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +53 -53
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.d.ts +18 -18
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +110 -110
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.d.ts +20 -20
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.js +135 -135
- package/es/components/molecules/RichMenu/RichMenuBlock/constants.d.ts +2 -2
- package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +765 -765
- package/es/components/molecules/RichMenu/RichMenuBlock/index.d.ts +3 -3
- package/es/components/molecules/RichMenu/RichMenuBlock/index.js +2 -2
- package/es/components/molecules/RichMenu/RichMenuBlock/styled.d.ts +9 -9
- package/es/components/molecules/RichMenu/RichMenuBlock/styled.js +17 -17
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +10 -10
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +32 -32
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.d.ts +6 -6
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.js +15 -15
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.d.ts +4 -4
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.js +47 -47
- package/es/components/molecules/RichMenu/RichMenuChatBar/index.d.ts +2 -2
- package/es/components/molecules/RichMenu/RichMenuChatBar/index.js +1 -1
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +9 -9
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +37 -37
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +10 -10
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +37 -37
- package/es/components/molecules/RichMenu/RichMenuMobileView/index.d.ts +1 -1
- package/es/components/molecules/RichMenu/RichMenuMobileView/index.js +1 -1
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +6 -6
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +20 -20
- package/es/components/molecules/RichMenu/index.d.ts +3 -3
- package/es/components/molecules/RichMenu/index.js +3 -3
- package/es/components/molecules/Select/Select.d.ts +17 -17
- package/es/components/molecules/Select/Select.js +50 -50
- package/es/components/molecules/Select/Test.d.ts +3 -3
- package/es/components/molecules/Select/Test.js +22 -22
- package/es/components/molecules/Select/index.d.ts +2 -2
- package/es/components/molecules/Select/index.js +1 -1
- package/es/components/molecules/Select/styled.d.ts +4 -4
- package/es/components/molecules/Select/styled.js +41 -41
- package/es/components/molecules/SettingWrapper/index.d.ts +12 -12
- package/es/components/molecules/SettingWrapper/index.js +20 -20
- package/es/components/molecules/SettingWrapper/styled.d.ts +5 -5
- package/es/components/molecules/SettingWrapper/styled.js +17 -17
- package/es/components/molecules/SettingWrapperPopover/index.d.ts +16 -16
- package/es/components/molecules/SettingWrapperPopover/index.js +17 -17
- package/es/components/molecules/ShareAccess/ShareAccess.d.ts +3 -3
- package/es/components/molecules/ShareAccess/ShareAccess.js +23 -23
- package/es/components/molecules/ShareAccess/actions.d.ts +16 -16
- package/es/components/molecules/ShareAccess/actions.js +12 -12
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.d.ts +2 -2
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +78 -78
- package/es/components/molecules/ShareAccess/components/GeneralAccess/index.d.ts +1 -1
- package/es/components/molecules/ShareAccess/components/GeneralAccess/index.js +1 -1
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.d.ts +1 -1
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +57 -57
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.d.ts +3 -3
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +19 -19
- package/es/components/molecules/ShareAccess/components/LayoutContent/index.d.ts +1 -1
- package/es/components/molecules/ShareAccess/components/LayoutContent/index.js +1 -1
- package/es/components/molecules/ShareAccess/components/LayoutContent/styled.d.ts +1 -1
- package/es/components/molecules/ShareAccess/components/LayoutContent/styled.js +7 -7
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.d.ts +2 -2
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.js +43 -43
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.js +1 -1
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +7 -7
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.js +18 -18
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.d.ts +5 -5
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +97 -97
- package/es/components/molecules/ShareAccess/components/PeopleAccess/index.d.ts +1 -1
- package/es/components/molecules/ShareAccess/components/PeopleAccess/index.js +1 -1
- package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.d.ts +1 -1
- package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.js +46 -46
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.d.ts +5 -5
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +73 -73
- package/es/components/molecules/ShareAccess/components/SearchUser/index.d.ts +1 -1
- package/es/components/molecules/ShareAccess/components/SearchUser/index.js +1 -1
- package/es/components/molecules/ShareAccess/components/SearchUser/styled.d.ts +2 -2
- package/es/components/molecules/ShareAccess/components/SearchUser/styled.js +29 -29
- package/es/components/molecules/ShareAccess/components/index.d.ts +1 -1
- package/es/components/molecules/ShareAccess/components/index.js +1 -1
- package/es/components/molecules/ShareAccess/constants.d.ts +67 -67
- package/es/components/molecules/ShareAccess/constants.js +85 -85
- package/es/components/molecules/ShareAccess/context.d.ts +4 -4
- package/es/components/molecules/ShareAccess/context.js +3 -3
- package/es/components/molecules/ShareAccess/hooks/index.d.ts +1 -1
- package/es/components/molecules/ShareAccess/hooks/index.js +1 -1
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +18 -18
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.js +29 -29
- package/es/components/molecules/ShareAccess/index.d.ts +4 -4
- package/es/components/molecules/ShareAccess/index.js +4 -4
- package/es/components/molecules/ShareAccess/reducer.d.ts +2 -2
- package/es/components/molecules/ShareAccess/reducer.js +19 -19
- package/es/components/molecules/ShareAccess/types.d.ts +54 -54
- package/es/components/molecules/ShareAccess/types.js +1 -1
- package/es/components/molecules/ShareAccess/utils.d.ts +38 -38
- package/es/components/molecules/ShareAccess/utils.js +57 -57
- package/es/components/molecules/SliderWithInputNumber/index.d.ts +11 -11
- package/es/components/molecules/SliderWithInputNumber/index.js +62 -62
- package/es/components/molecules/SliderWithInputNumber/styled.d.ts +1 -1
- package/es/components/molecules/SliderWithInputNumber/styled.js +8 -8
- package/es/components/molecules/Tabs/Tabs.d.ts +1 -1
- package/es/components/molecules/Tabs/Tabs.js +1 -1
- package/es/components/molecules/Tabs/index.d.ts +1 -1
- package/es/components/molecules/Tabs/index.js +1 -1
- package/es/components/molecules/TextDecorationSelect/constants.d.ts +19 -19
- package/es/components/molecules/TextDecorationSelect/constants.js +26 -26
- package/es/components/molecules/TextDecorationSelect/index.d.ts +15 -15
- package/es/components/molecules/TextDecorationSelect/index.js +45 -45
- package/es/components/molecules/TextTransformSelect/constants.d.ts +13 -13
- package/es/components/molecules/TextTransformSelect/constants.js +19 -19
- package/es/components/molecules/TextTransformSelect/index.d.ts +9 -9
- package/es/components/molecules/TextTransformSelect/index.js +39 -39
- package/es/components/molecules/ThumbnailCard/ThumbnailCard.d.ts +3 -3
- package/es/components/molecules/ThumbnailCard/ThumbnailCard.js +56 -56
- package/es/components/molecules/ThumbnailCard/constants.d.ts +3 -3
- package/es/components/molecules/ThumbnailCard/constants.js +3 -3
- package/es/components/molecules/ThumbnailCard/index.d.ts +2 -2
- package/es/components/molecules/ThumbnailCard/index.js +2 -2
- package/es/components/molecules/ThumbnailCard/styled.d.ts +1 -1
- package/es/components/molecules/ThumbnailCard/styled.js +88 -88
- package/es/components/molecules/ThumbnailCard/types.d.ts +17 -17
- package/es/components/molecules/ThumbnailCard/types.js +1 -1
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +11 -11
- package/es/components/molecules/TreeSelect/TreeSelect.js +2 -2
- package/es/components/molecules/TreeSelect/index.d.ts +1 -1
- package/es/components/molecules/TreeSelect/index.js +1 -1
- package/es/components/molecules/UploadImage/MediaIcon.d.ts +3 -3
- package/es/components/molecules/UploadImage/MediaIcon.js +8 -8
- package/es/components/molecules/UploadImage/MediaThumb.d.ts +8 -8
- package/es/components/molecules/UploadImage/MediaThumb.js +15 -15
- package/es/components/molecules/UploadImage/VideoThumbnail.d.ts +4 -4
- package/es/components/molecules/UploadImage/VideoThumbnail.js +43 -43
- package/es/components/molecules/UploadImage/index.d.ts +37 -37
- package/es/components/molecules/UploadImage/index.js +386 -386
- package/es/components/molecules/UploadImage/styled.d.ts +13 -13
- package/es/components/molecules/UploadImage/styled.js +130 -130
- package/es/components/molecules/UploadImage/utils.d.ts +3 -3
- package/es/components/molecules/UploadImage/utils.js +24 -24
- package/es/components/molecules/index.d.ts +47 -47
- package/es/components/molecules/index.js +40 -40
- package/es/components/organism/GenerativeInsights/constants.d.ts +1 -1
- package/es/components/organism/GenerativeInsights/constants.js +1 -1
- package/es/components/organism/GenerativeInsights/index.d.ts +11 -11
- package/es/components/organism/GenerativeInsights/index.js +57 -57
- package/es/components/organism/GenerativeInsights/styled.d.ts +12 -12
- package/es/components/organism/GenerativeInsights/styled.js +66 -66
- package/es/components/organism/GenerativeInsights/utils.d.ts +13 -13
- package/es/components/organism/GenerativeInsights/utils.js +50 -50
- package/es/components/organism/Help/Help.d.ts +5 -5
- package/es/components/organism/Help/Help.js +1005 -1005
- package/es/components/organism/Help/constants.d.ts +140 -140
- package/es/components/organism/Help/constants.js +1653 -1653
- package/es/components/organism/Help/index.d.ts +1 -1
- package/es/components/organism/Help/index.js +1 -1
- package/es/components/organism/Help/styled.d.ts +71 -71
- package/es/components/organism/Help/styled.js +264 -264
- package/es/components/organism/Help/types.d.ts +67 -67
- package/es/components/organism/Help/types.js +1 -1
- package/es/components/organism/Help/utils.d.ts +15 -15
- package/es/components/organism/Help/utils.js +82 -82
- package/es/components/organism/PositionSetting/config.d.ts +10 -10
- package/es/components/organism/PositionSetting/config.js +10 -10
- package/es/components/organism/PositionSetting/index.d.ts +15 -15
- package/es/components/organism/PositionSetting/index.js +62 -62
- package/es/components/organism/PositionSetting/styled.d.ts +1 -1
- package/es/components/organism/PositionSetting/styled.js +3 -3
- package/es/components/organism/PositionSetting/types.d.ts +10 -10
- package/es/components/organism/PositionSetting/types.js +1 -1
- package/es/components/organism/Table/CrossTabTable/CrossTabTable.d.ts +18 -18
- package/es/components/organism/Table/CrossTabTable/CrossTabTable.js +305 -305
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/CustomCell.d.ts +11 -11
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/CustomCell.js +22 -22
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/index.d.ts +1 -1
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/index.js +1 -1
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/styled.d.ts +1 -1
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/styled.js +13 -13
- package/es/components/organism/Table/CrossTabTable/constants.d.ts +75 -75
- package/es/components/organism/Table/CrossTabTable/constants.js +1525 -1525
- package/es/components/organism/Table/CrossTabTable/index.d.ts +1 -1
- package/es/components/organism/Table/CrossTabTable/index.js +1 -1
- package/es/components/organism/Table/CrossTabTable/styled.d.ts +1 -1
- package/es/components/organism/Table/CrossTabTable/styled.js +13 -13
- package/es/components/organism/Table/CrossTabTable/types.d.ts +1 -1
- package/es/components/organism/Table/CrossTabTable/types.js +1 -1
- package/es/components/organism/Table/CrossTabTable/utils.d.ts +1 -1
- package/es/components/organism/Table/CrossTabTable/utils.js +1 -1
- package/es/components/organism/Table/ExplorePivotTable/ExplorePivotTable.d.ts +11 -11
- package/es/components/organism/Table/ExplorePivotTable/ExplorePivotTable.js +51 -51
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/CustomCell.d.ts +12 -12
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/CustomCell.js +41 -41
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/index.d.ts +1 -1
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/index.js +1 -1
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/styled.d.ts +3 -3
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/styled.js +21 -21
- package/es/components/organism/Table/ExplorePivotTable/constants.d.ts +4 -4
- package/es/components/organism/Table/ExplorePivotTable/constants.js +84 -84
- package/es/components/organism/Table/ExplorePivotTable/index.d.ts +2 -2
- package/es/components/organism/Table/ExplorePivotTable/index.js +2 -2
- package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +12 -12
- package/es/components/organism/Table/ExplorePivotTable/styled.js +15 -15
- package/es/components/organism/Table/ExplorePivotTable/types.d.ts +17 -17
- package/es/components/organism/Table/ExplorePivotTable/types.js +1 -1
- package/es/components/organism/Table/ExplorePivotTable/utils.d.ts +4 -4
- package/es/components/organism/Table/ExplorePivotTable/utils.js +154 -154
- package/es/components/organism/Table/Table.d.ts +1 -1
- package/es/components/organism/Table/Table.js +1 -1
- package/es/components/organism/Table/index.d.ts +2 -2
- package/es/components/organism/Table/index.js +2 -2
- package/es/components/organism/index.d.ts +4 -4
- package/es/components/organism/index.js +4 -4
- package/es/components/template/TemplateListing/components/BlankTemplate/index.d.ts +3 -3
- package/es/components/template/TemplateListing/components/BlankTemplate/index.js +17 -17
- package/es/components/template/TemplateListing/components/BlankTemplate/styled.d.ts +2 -2
- package/es/components/template/TemplateListing/components/BlankTemplate/styled.js +26 -26
- package/es/components/template/TemplateListing/components/CategoryListing/index.d.ts +3 -3
- package/es/components/template/TemplateListing/components/CategoryListing/index.js +103 -103
- package/es/components/template/TemplateListing/components/CategoryListing/styled.d.ts +5 -5
- package/es/components/template/TemplateListing/components/CategoryListing/styled.js +55 -55
- package/es/components/template/TemplateListing/components/CategoryListing/types.d.ts +11 -11
- package/es/components/template/TemplateListing/components/CategoryListing/types.js +1 -1
- package/es/components/template/TemplateListing/components/index.d.ts +2 -2
- package/es/components/template/TemplateListing/components/index.js +2 -2
- package/es/components/template/TemplateListing/constants/defaultProps.d.ts +10 -10
- package/es/components/template/TemplateListing/constants/defaultProps.js +22 -22
- package/es/components/template/TemplateListing/constants/index.d.ts +2 -2
- package/es/components/template/TemplateListing/constants/index.js +2 -2
- package/es/components/template/TemplateListing/constants/mockData.d.ts +2 -2
- package/es/components/template/TemplateListing/constants/mockData.js +101 -101
- package/es/components/template/TemplateListing/index.d.ts +3 -3
- package/es/components/template/TemplateListing/index.js +23 -23
- package/es/components/template/TemplateListing/styled/index.d.ts +2 -2
- package/es/components/template/TemplateListing/styled/index.js +16 -16
- package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +9 -9
- package/es/components/template/TemplateListing/types/BlankTemplate.js +1 -1
- package/es/components/template/TemplateListing/types/CategoryListing.d.ts +18 -18
- package/es/components/template/TemplateListing/types/CategoryListing.js +1 -1
- package/es/components/template/TemplateListing/types/TemplateListing.d.ts +16 -16
- package/es/components/template/TemplateListing/types/TemplateListing.js +1 -1
- package/es/components/template/TemplateListing/types/index.d.ts +3 -3
- package/es/components/template/TemplateListing/types/index.js +3 -3
- package/es/components/template/index.d.ts +2 -2
- package/es/components/template/index.js +2 -2
- package/es/constants/gradientSetting.d.ts +83 -83
- package/es/constants/gradientSetting.js +86 -86
- package/es/constants/index.d.ts +4 -4
- package/es/constants/index.js +4 -4
- package/es/constants/keyCode.d.ts +387 -387
- package/es/constants/keyCode.js +394 -394
- package/es/constants/queries.d.ts +14 -14
- package/es/constants/queries.js +21 -21
- package/es/constants/richMenu.d.ts +19 -19
- package/es/constants/richMenu.js +19 -19
- package/es/constants/storybook.d.ts +17 -17
- package/es/constants/storybook.js +36 -36
- package/es/constants/theme.d.ts +12 -12
- package/es/constants/theme.js +173 -173
- package/es/hooks/index.d.ts +3 -3
- package/es/hooks/index.js +22 -22
- package/es/hooks/useDebounce.d.ts +3 -3
- package/es/hooks/useDebounce.js +15 -15
- package/es/hooks/useDebounceCallback.d.ts +1 -1
- package/es/hooks/useDebounceCallback.js +5 -5
- package/es/hooks/useDebounceV2.d.ts +1 -1
- package/es/hooks/useDebounceV2.js +11 -11
- package/es/hooks/useDeepCompareEffect.d.ts +1 -1
- package/es/hooks/useDeepCompareEffect.js +21 -21
- package/es/hooks/useDeepCompareMemo.d.ts +2 -2
- package/es/hooks/useDeepCompareMemo.js +21 -21
- package/es/hooks/useOutsideClick.d.ts +4 -4
- package/es/hooks/useOutsideClick.js +18 -18
- package/es/hooks/usePrevious.d.ts +2 -2
- package/es/hooks/usePrevious.js +9 -9
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locales/en/translation.json +232 -232
- package/es/locales/i18n.d.ts +307 -307
- package/es/locales/i18n.js +38 -38
- package/es/locales/translations.d.ts +236 -236
- package/es/locales/translations.js +35 -35
- package/es/locales/types.d.ts +15 -15
- package/es/locales/types.js +1 -1
- package/es/locales/vi/translation.json +67 -67
- package/es/models/BusinessObject.d.ts +116 -116
- package/es/models/BusinessObject.js +113 -113
- package/es/models/Currency.d.ts +9 -9
- package/es/models/Currency.js +10 -10
- package/es/models/CustomFunction.d.ts +19 -19
- package/es/models/CustomFunction.js +25 -25
- package/es/models/DynamicContentAttribute.d.ts +34 -34
- package/es/models/DynamicContentAttribute.js +9 -9
- package/es/models/EventTrackingAttribute.d.ts +11 -11
- package/es/models/EventTrackingAttribute.js +13 -13
- package/es/models/PromotionPool.d.ts +11 -11
- package/es/models/PromotionPool.js +12 -12
- package/es/models/SavedMedia.d.ts +34 -34
- package/es/models/SavedMedia.js +30 -30
- package/es/models/Upload.d.ts +34 -34
- package/es/models/Upload.js +24 -24
- package/es/models/model.d.ts +8 -8
- package/es/models/model.js +5 -5
- package/es/queries/BusinessObject/index.d.ts +6 -6
- package/es/queries/BusinessObject/index.js +6 -6
- package/es/queries/BusinessObject/useGetListAllEvents.d.ts +11 -11
- package/es/queries/BusinessObject/useGetListAllEvents.js +14 -14
- package/es/queries/BusinessObject/useGetListAttributeBO.d.ts +17 -17
- package/es/queries/BusinessObject/useGetListAttributeBO.js +41 -41
- package/es/queries/BusinessObject/useGetListBO.d.ts +6 -6
- package/es/queries/BusinessObject/useGetListBO.js +19 -19
- package/es/queries/BusinessObject/useGetListEventAttr.d.ts +4 -4
- package/es/queries/BusinessObject/useGetListEventAttr.js +15 -15
- package/es/queries/BusinessObject/useGetListPromotionCodeAttr.d.ts +6 -6
- package/es/queries/BusinessObject/useGetListPromotionCodeAttr.js +26 -26
- package/es/queries/BusinessObject/useGetListSourceByEvent.d.ts +13 -13
- package/es/queries/BusinessObject/useGetListSourceByEvent.js +11 -11
- package/es/queries/CustomFunction/index.d.ts +2 -2
- package/es/queries/CustomFunction/index.js +2 -2
- package/es/queries/CustomFunction/useCustomFunction.d.ts +19 -19
- package/es/queries/CustomFunction/useCustomFunction.js +53 -53
- package/es/queries/DynamicContentAttribute/index.d.ts +1 -1
- package/es/queries/DynamicContentAttribute/index.js +1 -1
- package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.d.ts +10 -10
- package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.js +21 -21
- package/es/queries/PromotionPool/index.d.ts +1 -1
- package/es/queries/PromotionPool/index.js +1 -1
- package/es/queries/PromotionPool/useGetListPromotionPool.d.ts +9 -9
- package/es/queries/PromotionPool/useGetListPromotionPool.js +62 -62
- package/es/queries/ThirdParty/index.d.ts +1 -1
- package/es/queries/ThirdParty/index.js +1 -1
- package/es/queries/ThirdParty/useGetEventTrackingAttributes.d.ts +14 -14
- package/es/queries/ThirdParty/useGetEventTrackingAttributes.js +15 -15
- package/es/queries/configs.d.ts +4 -4
- package/es/queries/configs.js +13 -13
- package/es/queries/index.d.ts +6 -6
- package/es/queries/index.js +6 -6
- package/es/services/MediaTemplateDesign/BusinessObject/index.d.ts +8 -8
- package/es/services/MediaTemplateDesign/BusinessObject/index.js +100 -100
- package/es/services/MediaTemplateDesign/CustomFunction/index.d.ts +15 -15
- package/es/services/MediaTemplateDesign/CustomFunction/index.js +135 -135
- package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.d.ts +4 -4
- package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.js +39 -39
- package/es/services/MediaTemplateDesign/ListCurrency/index.d.ts +6 -6
- package/es/services/MediaTemplateDesign/ListCurrency/index.js +34 -34
- package/es/services/MediaTemplateDesign/PromotionPool/index.d.ts +3 -3
- package/es/services/MediaTemplateDesign/PromotionPool/index.js +31 -31
- package/es/services/MediaTemplateDesign/UploadFile/index.d.ts +6 -6
- package/es/services/MediaTemplateDesign/UploadFile/index.js +93 -93
- package/es/services/ThirParty/index.d.ts +8 -8
- package/es/services/ThirParty/index.js +26 -26
- package/es/services/Ticket.d.ts +67 -67
- package/es/services/Ticket.js +73 -73
- package/es/services/constants.d.ts +20 -20
- package/es/services/constants.js +21 -21
- package/es/services/index.d.ts +18 -18
- package/es/services/index.js +108 -108
- package/es/test.d.ts +14 -14
- package/es/test.js +346 -346
- package/es/types/index.d.ts +23 -23
- package/es/types/index.js +2 -2
- package/es/types/richMenu.d.ts +214 -214
- package/es/types/richMenu.js +1 -1
- package/es/types/variables.d.ts +2 -2
- package/es/types/variables.js +1 -1
- package/es/utils/color.d.ts +10 -10
- package/es/utils/color.js +61 -61
- package/es/utils/common.d.ts +57 -57
- package/es/utils/common.js +376 -376
- package/es/utils/handleError.d.ts +32 -32
- package/es/utils/handleError.js +44 -44
- package/es/utils/index.d.ts +3 -3
- package/es/utils/index.js +3 -3
- package/es/utils/loadable.d.ts +7 -7
- package/es/utils/loadable.js +10 -10
- package/es/utils/web.d.ts +10 -10
- package/es/utils/web.js +26 -26
- package/package.json +201 -201
|
@@ -1,1248 +1,1248 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
/* eslint-disable no-case-declarations */
|
|
13
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
14
|
-
// Libraries
|
|
15
|
-
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react';
|
|
16
|
-
import { omit, isEmpty, flatMapDeep, set, get, isNaN } from 'lodash';
|
|
17
|
-
// Hooks
|
|
18
|
-
import { useDeepCompareEffect, useDeepCompareMemo } from '@antscorp/antsomi-ui/es/hooks';
|
|
19
|
-
// Components
|
|
20
|
-
import { TreeNode } from 'rc-tree-select';
|
|
21
|
-
import { Button, Checkbox, Text, Spin } from '../../atoms';
|
|
22
|
-
import { TreeSelect, Form, Select } from 'antd';
|
|
23
|
-
// Locales
|
|
24
|
-
import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
|
|
25
|
-
import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
|
|
26
|
-
// Query
|
|
27
|
-
import { useGetDynamicContentAttr, useGetListPromotionPool, useGetListEventAttr, useGetListPromotionCodeAttr, useGetListBO, useGetListAllEvents, useGetListSourceByEvent, useGetListAttributeBO, useGetCustomFunction, useAddSavedCSFunction, useUpdateCSFunction, } from '@antscorp/antsomi-ui/es/queries';
|
|
28
|
-
import { useGetEventTrackingAttributes } from '@antscorp/antsomi-ui/es/queries/ThirdParty';
|
|
29
|
-
// Queries config
|
|
30
|
-
import { queryClientAntsomiUI } from '@antscorp/antsomi-ui/es/queries/configs';
|
|
31
|
-
import { QUERY_KEYS } from '@antscorp/antsomi-ui/es/constants/queries';
|
|
32
|
-
import { dateExample } from './components/FormatDatetime';
|
|
33
|
-
import DisplayFormat from './components/DisplayFormat';
|
|
34
|
-
// Constants
|
|
35
|
-
import { DYNAMIC_CONTENT_SETTING_KEY, DYNAMIC_CONTENT_TYPE, DYNAMIC_CONTENT_ATTR_DF_TYPE, DATA_TYPE, ATTRIBUTE_TYPE, } from './constants';
|
|
36
|
-
// Utils
|
|
37
|
-
import { handleError } from '@antscorp/antsomi-ui/es/utils';
|
|
38
|
-
import { formatDatetimeDF, formatNumberDF, getAvailableAttrs, getStringFormatDateDF, regexCSType, serilizeBOAttr, serializeCSSelectedString, serilizeDynamicContentAttr, serilizeEventAttr, serilizePromotionPool, buildOptionAttrArchive, checkStatusAttr, serializeLabelToCode, buildMappingFields, CUSTOM_TYPE, } from './utils';
|
|
39
|
-
// Style
|
|
40
|
-
import { InputSuggestion, ModalCustom } from './styled';
|
|
41
|
-
import { EditorScript } from '../EditorScript';
|
|
42
|
-
const getMembers = (member) => {
|
|
43
|
-
if (!member.children || !member.children.length) {
|
|
44
|
-
return member;
|
|
45
|
-
}
|
|
46
|
-
return [member, member.children];
|
|
47
|
-
};
|
|
48
|
-
const PATH = 'src/components/molecules/AddDynamicContent/AddDynamicContent.tsx';
|
|
49
|
-
const initNumberDFSettings = {
|
|
50
|
-
grouping: ',',
|
|
51
|
-
decimal: '.',
|
|
52
|
-
decimalPlaces: 2,
|
|
53
|
-
isCompact: false,
|
|
54
|
-
currencyCode: 'USD',
|
|
55
|
-
prefixType: 'code',
|
|
56
|
-
};
|
|
57
|
-
const initDatetimeDFSettings = {
|
|
58
|
-
hasDateFormat: true,
|
|
59
|
-
hasTimeFormat: true,
|
|
60
|
-
dateParseOption: 'medium',
|
|
61
|
-
timeParseOption: 'medium',
|
|
62
|
-
dateParseFormat: 'MM/DD/YYYY',
|
|
63
|
-
timeParseFormat: '12hour',
|
|
64
|
-
};
|
|
65
|
-
const defaultDynamicTypes = [...Object.values(DYNAMIC_CONTENT_TYPE)]
|
|
66
|
-
.filter((i) => i.value !== 'bo-settings')
|
|
67
|
-
.sort((a, b) => a.index - b.index);
|
|
68
|
-
const optionDataType = [...Object.values(DATA_TYPE)];
|
|
69
|
-
export const AddDynamicContent = props => {
|
|
70
|
-
//* Props
|
|
71
|
-
const { defaultData = {}, defaultDynamicIndex = 1, visible, showDisplayFormat, showIndex, journeySettings, contentSources, APIConfig, isShowCustomFunction = false, modalTitle, } = props;
|
|
72
|
-
const { accountId, userId, token, domain, slug } = APIConfig;
|
|
73
|
-
const infos = { accountId, userId, token };
|
|
74
|
-
const { onCancel, onOk, additionalAttrProperties = [] } = props;
|
|
75
|
-
const url = useMemo(() => `${domain}${slug}`, [domain, slug]);
|
|
76
|
-
// Hook Queries
|
|
77
|
-
const { mutate: addSavedCSFunction } = useAddSavedCSFunction();
|
|
78
|
-
const { data: customFunction } = useGetCustomFunction({ url }, infos);
|
|
79
|
-
const { mutate: updateCSFunction } = useUpdateCSFunction();
|
|
80
|
-
//* Hooks
|
|
81
|
-
const { t, language } = i18nInstance;
|
|
82
|
-
//* Selectors
|
|
83
|
-
const { triggerEvent } = journeySettings;
|
|
84
|
-
const [itemTypeId, setItemTypeId] = useState(null);
|
|
85
|
-
// Form states
|
|
86
|
-
const [form] = Form.useForm();
|
|
87
|
-
const selectedDynamicContentType = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE, form);
|
|
88
|
-
const selectedAttr = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, form);
|
|
89
|
-
const selectedDFType = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE, form);
|
|
90
|
-
const selectedEventSource = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.EVENT, form);
|
|
91
|
-
const selectedSource = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.SOURCE, form);
|
|
92
|
-
const selectedBoIndex = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.INDEX, form);
|
|
93
|
-
const [formSubmitDisabled, setFormSubmitDisabled] = useState(true);
|
|
94
|
-
const [saveAsTemplate, setsaveAsTemplate] = useState(false);
|
|
95
|
-
const [hasError, setHasError] = useState({
|
|
96
|
-
[DYNAMIC_CONTENT_SETTING_KEY.EVENT]: false,
|
|
97
|
-
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: false,
|
|
98
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false,
|
|
99
|
-
[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL]: false,
|
|
100
|
-
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: false,
|
|
101
|
-
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: false,
|
|
102
|
-
[DYNAMIC_CONTENT_SETTING_KEY.PERNAME]: false,
|
|
103
|
-
});
|
|
104
|
-
// Queries
|
|
105
|
-
const { data: listBO } = useGetListBO({ url }, infos);
|
|
106
|
-
// defaultSettings
|
|
107
|
-
const [defaultAttrDFSetings, setDefaultAttrDFSetings] = useState(null);
|
|
108
|
-
// Variables
|
|
109
|
-
const [eventActionId, eventCategoryId] = (selectedEventSource === null || selectedEventSource === void 0 ? void 0 : selectedEventSource.split(':').map(Number)) || [];
|
|
110
|
-
// Selection Options states
|
|
111
|
-
const [listDynamicContentTypes, setListDynamicContentTypes] = useState(defaultDynamicTypes);
|
|
112
|
-
const [listCustomerAttributes, setListCustomerAttributes] = useState([]);
|
|
113
|
-
const [listVisitorAttributes, setListVisitorAttributes] = useState([]);
|
|
114
|
-
const [listCustomTemplates, setlistCustomTemplates] = useState([]);
|
|
115
|
-
const [listCustomTemplatesSearch, setlistCustomTemplatesSearch] = useState([]);
|
|
116
|
-
const [searchValue, setSearchValue] = useState('');
|
|
117
|
-
// Expanded keys in tree select
|
|
118
|
-
const [expandedEventAttributes, setExpandedEventAttributes] = useState([]);
|
|
119
|
-
const [isActionArchive, setActionArchive] = useState(false);
|
|
120
|
-
const [errorMessageAttr, setErrorMessageAttr] = useState();
|
|
121
|
-
// Number Display format
|
|
122
|
-
const [showDetailEditDF, setShowDetailEditDF] = useState(false);
|
|
123
|
-
const [formatedAttr, setFormatedAttr] = useState('');
|
|
124
|
-
const [attrDFSettings, setAttrDFSettings] = useState(undefined);
|
|
125
|
-
const [templateName, setTemplateName] = useState('');
|
|
126
|
-
const [attrDFOptions, setAttrDFOptions] = useState([]);
|
|
127
|
-
// Template Custom
|
|
128
|
-
const [templateId, settemplateId] = useState();
|
|
129
|
-
const { data: listBoAttributes = [], isFetching: isFetchingListBoAttr, isError: isErrorBoAttr, } = useGetListAttributeBO({
|
|
130
|
-
url,
|
|
131
|
-
itemTypeIds: itemTypeId ? [itemTypeId] : [],
|
|
132
|
-
options: {
|
|
133
|
-
onSuccess: (data) => {
|
|
134
|
-
setHasError({
|
|
135
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false,
|
|
136
|
-
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: false,
|
|
137
|
-
});
|
|
138
|
-
if (data.length &&
|
|
139
|
-
selectedDynamicContentType &&
|
|
140
|
-
regexCSType.test(selectedDynamicContentType)) {
|
|
141
|
-
if (form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE) &&
|
|
142
|
-
form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.INDEX))
|
|
143
|
-
return;
|
|
144
|
-
form.setFieldsValue({
|
|
145
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: data[0],
|
|
146
|
-
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: defaultDynamicIndex,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
select: (data) => serilizeBOAttr(data, additionalAttrProperties),
|
|
151
|
-
onError: (error) => {
|
|
152
|
-
setHasError({
|
|
153
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true,
|
|
154
|
-
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: true,
|
|
155
|
-
});
|
|
156
|
-
handleError(error, {
|
|
157
|
-
path: PATH,
|
|
158
|
-
name: 'useGetListAttributeBO',
|
|
159
|
-
args: error === null || error === void 0 ? void 0 : error.message,
|
|
160
|
-
});
|
|
161
|
-
},
|
|
162
|
-
enabled: !!itemTypeId,
|
|
163
|
-
},
|
|
164
|
-
}, infos);
|
|
165
|
-
const { data: dynamicContentAttr, isFetching: isFetchingDynamicContentAttr, isError: isErrorDynamicContentAttr, } = useGetDynamicContentAttr({ url }, infos, {
|
|
166
|
-
onSuccess: () => {
|
|
167
|
-
setHasError({
|
|
168
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false,
|
|
169
|
-
});
|
|
170
|
-
},
|
|
171
|
-
onError: (error) => {
|
|
172
|
-
setHasError({
|
|
173
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true,
|
|
174
|
-
});
|
|
175
|
-
handleError(error, {
|
|
176
|
-
path: PATH,
|
|
177
|
-
name: 'useGetDynamicContentAttr',
|
|
178
|
-
args: error === null || error === void 0 ? void 0 : error.message,
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
});
|
|
182
|
-
const { data: listSources, isFetching: isFetchingSourceBO } = useGetListSourceByEvent({
|
|
183
|
-
apiConfig: {
|
|
184
|
-
url,
|
|
185
|
-
},
|
|
186
|
-
infos,
|
|
187
|
-
eventActionId,
|
|
188
|
-
eventCategoryId,
|
|
189
|
-
options: {
|
|
190
|
-
onSuccess: () => {
|
|
191
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: false });
|
|
192
|
-
},
|
|
193
|
-
select: (data) => {
|
|
194
|
-
const { rows } = data || {};
|
|
195
|
-
return rows.map((row) => ({
|
|
196
|
-
label: row.label,
|
|
197
|
-
value: row.value,
|
|
198
|
-
}));
|
|
199
|
-
},
|
|
200
|
-
onError: (error) => {
|
|
201
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: true });
|
|
202
|
-
handleError(error, {
|
|
203
|
-
path: PATH,
|
|
204
|
-
name: 'useGetListSourceBO',
|
|
205
|
-
args: error === null || error === void 0 ? void 0 : error.message,
|
|
206
|
-
});
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
});
|
|
210
|
-
const { data: listEvents, isFetching: isFetchingEventBySource } = useGetListAllEvents({
|
|
211
|
-
apiConfig: {
|
|
212
|
-
url,
|
|
213
|
-
},
|
|
214
|
-
infos,
|
|
215
|
-
options: {
|
|
216
|
-
onSuccess: (data) => {
|
|
217
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.EVENT]: false });
|
|
218
|
-
if (!isEmpty(data) &&
|
|
219
|
-
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
220
|
-
form.setFieldsValue({
|
|
221
|
-
[DYNAMIC_CONTENT_SETTING_KEY.EVENT]: data[0].value,
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
onError: (error) => {
|
|
226
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.EVENT]: true });
|
|
227
|
-
handleError(error, {
|
|
228
|
-
path: PATH,
|
|
229
|
-
name: 'useGetListEventBySource',
|
|
230
|
-
args: error === null || error === void 0 ? void 0 : error.message,
|
|
231
|
-
});
|
|
232
|
-
},
|
|
233
|
-
select: (data) => {
|
|
234
|
-
const { rows = [] } = data || {};
|
|
235
|
-
return rows.map((event) => ({
|
|
236
|
-
label: event.label,
|
|
237
|
-
value: `${event.eventActionId}:${event.eventCategoryId}`,
|
|
238
|
-
}));
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
});
|
|
242
|
-
const { data: listEventAttributes, isFetching: isFetchingEventAttr, isError: isErrorEventAttr, } = useGetListEventAttr({ url }, infos, selectedEventSource || '', Array.isArray(selectedSource) ? selectedSource.join(',') : selectedSource || '', {
|
|
243
|
-
onSuccess: () => setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false }),
|
|
244
|
-
onError: (error) => {
|
|
245
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true });
|
|
246
|
-
handleError(error, {
|
|
247
|
-
path: PATH,
|
|
248
|
-
name: 'useGetListEventAttr',
|
|
249
|
-
args: error === null || error === void 0 ? void 0 : error.message,
|
|
250
|
-
});
|
|
251
|
-
},
|
|
252
|
-
select: (data) => serilizeEventAttr(data, language, additionalAttrProperties),
|
|
253
|
-
});
|
|
254
|
-
const { data: listPromotionPools, isFetching: isFetchingPromotionPool } = useGetListPromotionPool({ url }, infos, {
|
|
255
|
-
onSuccess: () => {
|
|
256
|
-
setHasError({
|
|
257
|
-
[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL]: false,
|
|
258
|
-
});
|
|
259
|
-
},
|
|
260
|
-
select: (data) => serilizePromotionPool(data, additionalAttrProperties),
|
|
261
|
-
onError: (error) => {
|
|
262
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true });
|
|
263
|
-
handleError(error, {
|
|
264
|
-
path: PATH,
|
|
265
|
-
name: 'useGetListPromotionPool',
|
|
266
|
-
args: error === null || error === void 0 ? void 0 : error.message,
|
|
267
|
-
});
|
|
268
|
-
},
|
|
269
|
-
});
|
|
270
|
-
const { data: listPromotionCodeAttributes, isFetching: isFetchingPromotionCodeAttr, isError: isErrorListPromotionCodeAttr, } = useGetListPromotionCodeAttr({ url }, infos, {
|
|
271
|
-
onSuccess: () => {
|
|
272
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false });
|
|
273
|
-
},
|
|
274
|
-
select: (data) => data
|
|
275
|
-
.filter((attr) => +(attr === null || attr === void 0 ? void 0 : attr.status) === 1)
|
|
276
|
-
.map((attr) => ({
|
|
277
|
-
label: attr.propertyDisplayMultilang[language] ||
|
|
278
|
-
attr.propertyDisplayMultilang[get(attr, "propertyDisplayMultilang['DEFAULT_LANG']", 'EN')],
|
|
279
|
-
value: attr.itemPropertyName,
|
|
280
|
-
dataType: attr.dataType,
|
|
281
|
-
disabled: parseInt(attr.status) === 4,
|
|
282
|
-
status: attr.status,
|
|
283
|
-
})),
|
|
284
|
-
onError: (error) => {
|
|
285
|
-
setHasError({
|
|
286
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true,
|
|
287
|
-
});
|
|
288
|
-
handleError(error, {
|
|
289
|
-
path: PATH,
|
|
290
|
-
name: 'useGetPromotionCodeAttr',
|
|
291
|
-
args: error === null || error === void 0 ? void 0 : error.message,
|
|
292
|
-
});
|
|
293
|
-
},
|
|
294
|
-
});
|
|
295
|
-
const { data: eventTrackingAttributes } = useGetEventTrackingAttributes({
|
|
296
|
-
apiConfig: { url },
|
|
297
|
-
infos,
|
|
298
|
-
eventActionId,
|
|
299
|
-
eventCategoryId,
|
|
300
|
-
});
|
|
301
|
-
// Memo
|
|
302
|
-
const isShowEventIndexField = useDeepCompareMemo(() => {
|
|
303
|
-
if (selectedAttr && selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
304
|
-
if (selectedAttr.itemTypeId) {
|
|
305
|
-
return !!get(selectedAttr, 'eventPropertySyntax', '').includes('items');
|
|
306
|
-
}
|
|
307
|
-
return selectedAttr.type === ATTRIBUTE_TYPE.ITEM;
|
|
308
|
-
}
|
|
309
|
-
return false;
|
|
310
|
-
}, [selectedAttr, selectedDynamicContentType, eventTrackingAttributes === null || eventTrackingAttributes === void 0 ? void 0 : eventTrackingAttributes.mainObjects]);
|
|
311
|
-
const itemTypeName = useMemo(() => {
|
|
312
|
-
var _a;
|
|
313
|
-
let draftItemTypeName = '';
|
|
314
|
-
if (itemTypeId) {
|
|
315
|
-
draftItemTypeName = ((_a = listBO === null || listBO === void 0 ? void 0 : listBO.find((bo) => bo.id === itemTypeId)) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
316
|
-
}
|
|
317
|
-
return draftItemTypeName;
|
|
318
|
-
}, [itemTypeId, listBO]);
|
|
319
|
-
// Add BO settings (if exists) to list Dynamic content Type, or removed from the previous states
|
|
320
|
-
useEffect(() => {
|
|
321
|
-
const temp = [...defaultDynamicTypes];
|
|
322
|
-
contentSources.groups.forEach((g) => {
|
|
323
|
-
if (!g.itemTypeId)
|
|
324
|
-
return;
|
|
325
|
-
temp.push({
|
|
326
|
-
index: temp.length,
|
|
327
|
-
label: `${g.groupName} (${g.itemTypeDisplay})`,
|
|
328
|
-
value: `content-source::${g.groupId}::${g.itemTypeId}`,
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
if (isShowCustomFunction) {
|
|
332
|
-
temp.push(Object.assign(Object.assign({}, CUSTOM_TYPE), { index: temp.length }));
|
|
333
|
-
}
|
|
334
|
-
setListDynamicContentTypes(temp);
|
|
335
|
-
}, [contentSources.groups, isShowCustomFunction]);
|
|
336
|
-
useEffect(() => {
|
|
337
|
-
if (Array.isArray(customFunction) && customFunction.length) {
|
|
338
|
-
const temp = [];
|
|
339
|
-
customFunction.forEach(item => {
|
|
340
|
-
temp.push(Object.assign(Object.assign({}, item), { label: item.template_name, value: item.template_name }));
|
|
341
|
-
});
|
|
342
|
-
setlistCustomTemplates(temp);
|
|
343
|
-
}
|
|
344
|
-
}, [customFunction, visible]);
|
|
345
|
-
useDeepCompareEffect(() => {
|
|
346
|
-
if (dynamicContentAttr) {
|
|
347
|
-
const { customer, visitor } = dynamicContentAttr;
|
|
348
|
-
const dynamicContentType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE);
|
|
349
|
-
const parseCustomers = serilizeDynamicContentAttr(customer, language, additionalAttrProperties);
|
|
350
|
-
const parseVisitors = serilizeDynamicContentAttr(visitor, language, additionalAttrProperties);
|
|
351
|
-
setListCustomerAttributes(parseCustomers);
|
|
352
|
-
setListVisitorAttributes(parseVisitors);
|
|
353
|
-
if (form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE))
|
|
354
|
-
return;
|
|
355
|
-
if (dynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value) {
|
|
356
|
-
form.setFieldsValue({
|
|
357
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(parseVisitors)[0],
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
if (dynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value) {
|
|
361
|
-
form.setFieldsValue({
|
|
362
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(parseCustomers)[0],
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}, [dynamicContentAttr, form, language]);
|
|
367
|
-
useDeepCompareEffect(() => {
|
|
368
|
-
if (listSources && selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
369
|
-
if (!isEmpty(form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.SOURCE)))
|
|
370
|
-
return;
|
|
371
|
-
const defaultValue = listSources[0] ? [listSources[0].value] : [];
|
|
372
|
-
form.setFieldsValue({
|
|
373
|
-
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: defaultValue,
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
}, [selectedEventSource, listSources, form, selectedDynamicContentType]);
|
|
377
|
-
useDeepCompareEffect(() => {
|
|
378
|
-
var _a, _b;
|
|
379
|
-
if (listEventAttributes &&
|
|
380
|
-
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
381
|
-
const initEventAttr = ((_a = listEventAttributes[0]) === null || _a === void 0 ? void 0 : _a.children.length)
|
|
382
|
-
? getAvailableAttrs((_b = listEventAttributes[0]) === null || _b === void 0 ? void 0 : _b.children)[0]
|
|
383
|
-
: listEventAttributes[0];
|
|
384
|
-
if (form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE)) {
|
|
385
|
-
const eventAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
386
|
-
setExpandedEventAttributes([eventAttr.value.split('.')[0]]);
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
form.setFieldsValue({
|
|
390
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: initEventAttr,
|
|
391
|
-
});
|
|
392
|
-
setExpandedEventAttributes([initEventAttr.value.split('.')[0]]);
|
|
393
|
-
}
|
|
394
|
-
}, [selectedSource, selectedEventSource, listEventAttributes, form, selectedDynamicContentType]);
|
|
395
|
-
useDeepCompareEffect(() => {
|
|
396
|
-
if (listPromotionCodeAttributes &&
|
|
397
|
-
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value) {
|
|
398
|
-
if (form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE))
|
|
399
|
-
return;
|
|
400
|
-
form.setFieldsValue({
|
|
401
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(listPromotionCodeAttributes)[0],
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
}, [selectedDynamicContentType, listPromotionCodeAttributes, form]);
|
|
405
|
-
// Update form field data with default data/ or reset it to initial states
|
|
406
|
-
const resetStateAndFormValueDF = useCallback(() => {
|
|
407
|
-
setShowDetailEditDF(false);
|
|
408
|
-
setAttrDFSettings(undefined);
|
|
409
|
-
setAttrDFOptions([]);
|
|
410
|
-
setFormatedAttr('');
|
|
411
|
-
setsaveAsTemplate(false);
|
|
412
|
-
setTemplateName('');
|
|
413
|
-
setSearchValue('');
|
|
414
|
-
form.setFieldsValue({
|
|
415
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: undefined,
|
|
416
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: undefined,
|
|
417
|
-
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: undefined,
|
|
418
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: optionDataType[0].value,
|
|
419
|
-
});
|
|
420
|
-
}, [form]);
|
|
421
|
-
useEffect(() => {
|
|
422
|
-
if (!visible) {
|
|
423
|
-
setTimeout(() => {
|
|
424
|
-
resetStateAndFormValueDF();
|
|
425
|
-
}, 200);
|
|
426
|
-
}
|
|
427
|
-
}, [visible, resetStateAndFormValueDF]);
|
|
428
|
-
useEffect(() => {
|
|
429
|
-
let listTmp = [];
|
|
430
|
-
switch (true) {
|
|
431
|
-
case selectedDynamicContentType && regexCSType.test(selectedDynamicContentType):
|
|
432
|
-
listTmp = [...listBoAttributes];
|
|
433
|
-
break;
|
|
434
|
-
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value:
|
|
435
|
-
listTmp = listPromotionCodeAttributes ? [...listPromotionCodeAttributes] : [];
|
|
436
|
-
break;
|
|
437
|
-
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value:
|
|
438
|
-
listTmp = [...listCustomerAttributes];
|
|
439
|
-
break;
|
|
440
|
-
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value:
|
|
441
|
-
listTmp = [...listVisitorAttributes];
|
|
442
|
-
break;
|
|
443
|
-
default:
|
|
444
|
-
break;
|
|
445
|
-
}
|
|
446
|
-
const { errorMessage, isDisable } = checkStatusAttr({
|
|
447
|
-
listBO: listBO,
|
|
448
|
-
itemTypeId: itemTypeId || 0,
|
|
449
|
-
listAttribute: listTmp,
|
|
450
|
-
field: selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.value,
|
|
451
|
-
});
|
|
452
|
-
setActionArchive(isDisable);
|
|
453
|
-
setErrorMessageAttr(errorMessage);
|
|
454
|
-
}, [selectedAttr]);
|
|
455
|
-
useEffect(() => {
|
|
456
|
-
var _a;
|
|
457
|
-
if (!visible) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
if ((_a = Object.keys(Object.assign({}, defaultData))) === null || _a === void 0 ? void 0 : _a.length) {
|
|
461
|
-
let draftDefaultData = Object.assign({}, defaultData);
|
|
462
|
-
if (draftDefaultData.type !== 'custom') {
|
|
463
|
-
if (triggerEvent === null || triggerEvent === void 0 ? void 0 : triggerEvent.eventActionId) {
|
|
464
|
-
draftDefaultData = omit(draftDefaultData, ['event', 'source']);
|
|
465
|
-
}
|
|
466
|
-
form.setFieldsValue(draftDefaultData);
|
|
467
|
-
const defaultDMType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE);
|
|
468
|
-
const defaultAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
469
|
-
if (defaultDMType && regexCSType.test(defaultDMType)) {
|
|
470
|
-
const { itemTypeId } = serializeCSSelectedString(defaultDMType);
|
|
471
|
-
if (!isNaN(itemTypeId))
|
|
472
|
-
setItemTypeId(itemTypeId);
|
|
473
|
-
}
|
|
474
|
-
if (defaultAttr) {
|
|
475
|
-
const defaultAttr = draftDefaultData[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE];
|
|
476
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
477
|
-
if (!defaultAttr.hasOwnProperty('dataType'))
|
|
478
|
-
return;
|
|
479
|
-
let key = '';
|
|
480
|
-
if (defaultAttr.dataType === 'number') {
|
|
481
|
-
key = DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_NUMBERIC_ATTR_FORMAT_SETTINGS;
|
|
482
|
-
}
|
|
483
|
-
if (defaultAttr.dataType === 'datetime') {
|
|
484
|
-
key = DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_DATETIME_ATTR_FORMAT_SETTINGS;
|
|
485
|
-
}
|
|
486
|
-
if (key && defaultAttr[key]) {
|
|
487
|
-
const _b = defaultAttr[key], { type } = _b, settingValues = __rest(_b, ["type"]);
|
|
488
|
-
form.setFieldsValue({
|
|
489
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: type,
|
|
490
|
-
});
|
|
491
|
-
setDefaultAttrDFSetings({
|
|
492
|
-
itemPropertyName: defaultAttr.value,
|
|
493
|
-
settings: settingValues,
|
|
494
|
-
});
|
|
495
|
-
setAttrDFSettings(settingValues);
|
|
496
|
-
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === defaultAttr.dataType));
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
else {
|
|
501
|
-
const { customFunction } = draftDefaultData;
|
|
502
|
-
const { outputFormat } = customFunction;
|
|
503
|
-
form.setFieldsValue({
|
|
504
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE]: draftDefaultData.type,
|
|
505
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: outputFormat.type,
|
|
506
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: customFunction.outputDataType,
|
|
507
|
-
[DYNAMIC_CONTENT_SETTING_KEY.PERNAME]: customFunction.templateName,
|
|
508
|
-
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: customFunction.customFunction,
|
|
509
|
-
});
|
|
510
|
-
setTemplateName(customFunction.templateName);
|
|
511
|
-
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === customFunction.outputDataType));
|
|
512
|
-
setShowDetailEditDF(true);
|
|
513
|
-
setAttrDFSettings(customFunction.outputDataType === 'string' ? undefined : outputFormat.config);
|
|
514
|
-
}
|
|
515
|
-
// Check if trigger event of journey has event then don's set current event and source
|
|
516
|
-
}
|
|
517
|
-
else {
|
|
518
|
-
// Hard reset to Visitor attr
|
|
519
|
-
if (listVisitorAttributes) {
|
|
520
|
-
form.setFieldsValue({
|
|
521
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE]: DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value,
|
|
522
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: listVisitorAttributes[0],
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
527
|
-
}, [defaultData, visible, form]);
|
|
528
|
-
useDeepCompareEffect(() => {
|
|
529
|
-
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
530
|
-
const { eventActionId, eventCategoryId, insightPropertyIds } = triggerEvent || {};
|
|
531
|
-
if (!!eventActionId && !!eventCategoryId) {
|
|
532
|
-
form.setFieldsValue({
|
|
533
|
-
[DYNAMIC_CONTENT_SETTING_KEY.EVENT]: `${eventActionId}:${eventCategoryId}`,
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
if (Array.isArray(insightPropertyIds) && insightPropertyIds.length) {
|
|
537
|
-
form.setFieldsValue({
|
|
538
|
-
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: insightPropertyIds,
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
}, [triggerEvent, selectedDynamicContentType]);
|
|
543
|
-
// Disable Apply button if there's any error
|
|
544
|
-
useLayoutEffect(() => {
|
|
545
|
-
setFormSubmitDisabled(Object.values(hasError).some(error => error));
|
|
546
|
-
}, [hasError]);
|
|
547
|
-
useLayoutEffect(() => {
|
|
548
|
-
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value ||
|
|
549
|
-
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value) {
|
|
550
|
-
setFormSubmitDisabled(isFetchingDynamicContentAttr);
|
|
551
|
-
}
|
|
552
|
-
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
553
|
-
setFormSubmitDisabled(isFetchingSourceBO || isFetchingEventBySource || isFetchingEventAttr);
|
|
554
|
-
}
|
|
555
|
-
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value) {
|
|
556
|
-
setFormSubmitDisabled(isFetchingPromotionPool || isFetchingPromotionCodeAttr);
|
|
557
|
-
}
|
|
558
|
-
if (selectedDynamicContentType && regexCSType.test(selectedDynamicContentType)) {
|
|
559
|
-
setFormSubmitDisabled(isFetchingListBoAttr);
|
|
560
|
-
}
|
|
561
|
-
}, [
|
|
562
|
-
isFetchingDynamicContentAttr,
|
|
563
|
-
selectedDynamicContentType,
|
|
564
|
-
isFetchingSourceBO,
|
|
565
|
-
isFetchingEventBySource,
|
|
566
|
-
isFetchingEventAttr,
|
|
567
|
-
isFetchingPromotionPool,
|
|
568
|
-
isFetchingPromotionCodeAttr,
|
|
569
|
-
isFetchingListBoAttr,
|
|
570
|
-
]);
|
|
571
|
-
useLayoutEffect(() => {
|
|
572
|
-
let formatedDFValue = '';
|
|
573
|
-
let settings = attrDFSettings;
|
|
574
|
-
const selectedAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
575
|
-
const dataType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE);
|
|
576
|
-
const dynamicType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE);
|
|
577
|
-
if ((Object.keys(defaultData).length > 0 && defaultData.type !== 'custom') ||
|
|
578
|
-
dynamicType !== 'custom') {
|
|
579
|
-
if (selectedAttr &&
|
|
580
|
-
selectedAttr.dataType &&
|
|
581
|
-
['datetime', 'number'].includes(selectedAttr.dataType)) {
|
|
582
|
-
/* when change select if attr selected is previous selected default attr, set settings as default settings */
|
|
583
|
-
if (!settings &&
|
|
584
|
-
(defaultAttrDFSetings === null || defaultAttrDFSetings === void 0 ? void 0 : defaultAttrDFSetings.itemPropertyName) === selectedAttr.value) {
|
|
585
|
-
// Visitor and Customer don't have additional field
|
|
586
|
-
let equalDefaultAttr = true;
|
|
587
|
-
// Event need check additional field source, event by soucre
|
|
588
|
-
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
589
|
-
const source = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.SOURCE);
|
|
590
|
-
const event = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.EVENT);
|
|
591
|
-
if (source !== defaultData[DYNAMIC_CONTENT_SETTING_KEY.SOURCE] ||
|
|
592
|
-
event !== defaultData[DYNAMIC_CONTENT_SETTING_KEY.EVENT])
|
|
593
|
-
equalDefaultAttr = false;
|
|
594
|
-
}
|
|
595
|
-
// Promotion need check additional field promotion pool
|
|
596
|
-
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value) {
|
|
597
|
-
const pool = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL);
|
|
598
|
-
if (pool !== defaultData[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL])
|
|
599
|
-
equalDefaultAttr = false;
|
|
600
|
-
}
|
|
601
|
-
// BO settings need check additional field index
|
|
602
|
-
if (selectedDynamicContentType && regexCSType.test(selectedDynamicContentType)) {
|
|
603
|
-
if (selectedBoIndex !== defaultData[DYNAMIC_CONTENT_SETTING_KEY.INDEX])
|
|
604
|
-
equalDefaultAttr = false;
|
|
605
|
-
}
|
|
606
|
-
if (equalDefaultAttr) {
|
|
607
|
-
settings = defaultAttrDFSetings.settings;
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
// *********** //
|
|
611
|
-
// Numberic Attribute DF
|
|
612
|
-
if ((selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) === 'number') {
|
|
613
|
-
settings = settings !== null && settings !== void 0 ? settings : initNumberDFSettings;
|
|
614
|
-
formatedDFValue = formatNumberDF(1234.56789, selectedDFType, settings);
|
|
615
|
-
}
|
|
616
|
-
// Datatime Attribute DF
|
|
617
|
-
if ((selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) === 'datetime') {
|
|
618
|
-
settings = settings !== null && settings !== void 0 ? settings : Object.assign(Object.assign({}, initDatetimeDFSettings), { language });
|
|
619
|
-
formatedDFValue = formatDatetimeDF(dateExample, settings);
|
|
620
|
-
}
|
|
621
|
-
if (!attrDFOptions.length) {
|
|
622
|
-
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === selectedAttr.dataType));
|
|
623
|
-
}
|
|
624
|
-
setAttrDFSettings(settings);
|
|
625
|
-
setFormatedAttr(formatedDFValue);
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
if (dataType && ['datetime', 'number'].includes(dataType) && dynamicType === 'custom') {
|
|
629
|
-
// Numberic Attribute DF
|
|
630
|
-
if (dataType === 'number') {
|
|
631
|
-
settings = settings !== null && settings !== void 0 ? settings : initNumberDFSettings;
|
|
632
|
-
formatedDFValue = formatNumberDF(1234.56789, selectedDFType, settings);
|
|
633
|
-
}
|
|
634
|
-
// Datatime Attribute DF
|
|
635
|
-
if (dataType === 'datetime') {
|
|
636
|
-
settings = settings !== null && settings !== void 0 ? settings : Object.assign(Object.assign({}, initDatetimeDFSettings), { language });
|
|
637
|
-
formatedDFValue = formatDatetimeDF(dateExample, settings);
|
|
638
|
-
}
|
|
639
|
-
if (!attrDFOptions.length) {
|
|
640
|
-
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === dataType));
|
|
641
|
-
}
|
|
642
|
-
setAttrDFSettings(settings);
|
|
643
|
-
setFormatedAttr(formatedDFValue);
|
|
644
|
-
}
|
|
645
|
-
}, [
|
|
646
|
-
attrDFSettings,
|
|
647
|
-
selectedDFType,
|
|
648
|
-
attrDFOptions.length,
|
|
649
|
-
language,
|
|
650
|
-
defaultAttrDFSetings,
|
|
651
|
-
form,
|
|
652
|
-
selectedAttr,
|
|
653
|
-
defaultData,
|
|
654
|
-
selectedDynamicContentType,
|
|
655
|
-
selectedBoIndex,
|
|
656
|
-
]);
|
|
657
|
-
//* Handlers
|
|
658
|
-
const handleOnCancelModal = () => {
|
|
659
|
-
if (onCancel) {
|
|
660
|
-
onCancel();
|
|
661
|
-
}
|
|
662
|
-
};
|
|
663
|
-
const onChangeDataInput = (value) => {
|
|
664
|
-
setTemplateName(value);
|
|
665
|
-
let tempState = [...listCustomTemplates];
|
|
666
|
-
if (value.length > 0) {
|
|
667
|
-
tempState = tempState.filter(item => item.label.toLowerCase().includes(value.trim().toLowerCase()));
|
|
668
|
-
}
|
|
669
|
-
setlistCustomTemplatesSearch(tempState);
|
|
670
|
-
setSearchValue(value);
|
|
671
|
-
};
|
|
672
|
-
const handleSelect = (data) => {
|
|
673
|
-
const dataTmp = listCustomTemplates.filter(each => each.value === data);
|
|
674
|
-
settemplateId(dataTmp[0].template_id);
|
|
675
|
-
let dataFormat = dataTmp[0].output_format.type.toLowerCase();
|
|
676
|
-
switch (dataTmp[0].output_format.type) {
|
|
677
|
-
case 'DATE_AND_TIME':
|
|
678
|
-
dataFormat = 'date_and_time';
|
|
679
|
-
break;
|
|
680
|
-
case 'RAW_STRING':
|
|
681
|
-
dataFormat = 'raw_string';
|
|
682
|
-
break;
|
|
683
|
-
default:
|
|
684
|
-
break;
|
|
685
|
-
}
|
|
686
|
-
form.setFieldsValue({
|
|
687
|
-
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: dataTmp[0].custom_function,
|
|
688
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: dataTmp[0].output_data_type,
|
|
689
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: dataFormat === 'date_and_time' ? 'datetime' : dataFormat,
|
|
690
|
-
});
|
|
691
|
-
setTemplateName(dataTmp[0].template_name);
|
|
692
|
-
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === dataTmp[0].output_data_type));
|
|
693
|
-
const format = dataTmp[0].output_format.config;
|
|
694
|
-
switch (dataFormat) {
|
|
695
|
-
case 'currency': {
|
|
696
|
-
setAttrDFSettings(Object.assign(Object.assign({}, initNumberDFSettings), { grouping: format.group || ',', decimal: format.decimal, decimalPlaces: format.decimalPlace, isCompact: format.isCompactNumber || false, currencyCode: format.currency || 'USD', prefixType: format.prefixType || 'code' }));
|
|
697
|
-
break;
|
|
698
|
-
}
|
|
699
|
-
case 'number':
|
|
700
|
-
case 'percentage': {
|
|
701
|
-
setAttrDFSettings(Object.assign(Object.assign({}, initNumberDFSettings), { grouping: format.group || ',', decimal: format.decimal, decimalPlaces: format.decimalPlace, isCompact: format.isCompactNumber || false }));
|
|
702
|
-
break;
|
|
703
|
-
}
|
|
704
|
-
case 'date_and_time': {
|
|
705
|
-
setAttrDFSettings(Object.assign(Object.assign({}, initDatetimeDFSettings), { language, hasDateFormat: format.date.check || true, hasTimeFormat: format.time.check || true, dateParseOption: format.date.value || 'medium', timeParseOption: format.time.value || 'medium', dateParseFormat: format.format || 'MM/DD/YYYY', timeParseFormat: `${format.time.timeFormat || 12}hour` }));
|
|
706
|
-
break;
|
|
707
|
-
}
|
|
708
|
-
case 'raw_string': {
|
|
709
|
-
setAttrDFSettings(undefined);
|
|
710
|
-
break;
|
|
711
|
-
}
|
|
712
|
-
default:
|
|
713
|
-
break;
|
|
714
|
-
}
|
|
715
|
-
};
|
|
716
|
-
const handleOnOkModal = () => {
|
|
717
|
-
if (isActionArchive &&
|
|
718
|
-
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
719
|
-
return;
|
|
720
|
-
}
|
|
721
|
-
form.validateFields().then((values) => {
|
|
722
|
-
var _a;
|
|
723
|
-
values = omit(values, 'dfType');
|
|
724
|
-
if (onOk) {
|
|
725
|
-
const type = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE);
|
|
726
|
-
if (type === 'custom') {
|
|
727
|
-
const outputFormat = {};
|
|
728
|
-
const perName = templateName;
|
|
729
|
-
const functionCustom = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.FUNCTION);
|
|
730
|
-
const dataType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE);
|
|
731
|
-
const displayFormat = form.getFieldValue([
|
|
732
|
-
DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE,
|
|
733
|
-
]);
|
|
734
|
-
if (templateId && !saveAsTemplate) {
|
|
735
|
-
try {
|
|
736
|
-
updateCSFunction({
|
|
737
|
-
url,
|
|
738
|
-
infos,
|
|
739
|
-
templateId,
|
|
740
|
-
name: perName,
|
|
741
|
-
dataType,
|
|
742
|
-
functionCustom,
|
|
743
|
-
dataFormat: attrDFSettings,
|
|
744
|
-
displayFormat,
|
|
745
|
-
outputFormat,
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
catch (error) {
|
|
749
|
-
handleError(error, {
|
|
750
|
-
path: PATH,
|
|
751
|
-
name: 'onClickSaveDynamicContent',
|
|
752
|
-
args: {},
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
else if (saveAsTemplate) {
|
|
757
|
-
try {
|
|
758
|
-
addSavedCSFunction({
|
|
759
|
-
url,
|
|
760
|
-
infos,
|
|
761
|
-
name: perName,
|
|
762
|
-
dataType,
|
|
763
|
-
functionCustom,
|
|
764
|
-
dataFormat: attrDFSettings,
|
|
765
|
-
displayFormat,
|
|
766
|
-
outputFormat,
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
catch (error) {
|
|
770
|
-
handleError(error, {
|
|
771
|
-
path: PATH,
|
|
772
|
-
name: 'onClickSaveDynamicContent',
|
|
773
|
-
args: {},
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
if (!showIndex) {
|
|
778
|
-
values = omit(values, 'index');
|
|
779
|
-
}
|
|
780
|
-
const config = Object.assign({}, attrDFSettings);
|
|
781
|
-
if (dataType === 'datetime') {
|
|
782
|
-
config.dateFormatString = getStringFormatDateDF(attrDFSettings);
|
|
783
|
-
}
|
|
784
|
-
onOk(Object.assign(Object.assign({}, values), { customFunction: {
|
|
785
|
-
outputFormat: {
|
|
786
|
-
type: displayFormat,
|
|
787
|
-
config,
|
|
788
|
-
},
|
|
789
|
-
templateCode: serializeLabelToCode(perName),
|
|
790
|
-
templateName: perName,
|
|
791
|
-
templateType: 'custom',
|
|
792
|
-
customFunction: functionCustom,
|
|
793
|
-
outputDataType: dataType,
|
|
794
|
-
}, attribute: {
|
|
795
|
-
label: perName,
|
|
796
|
-
value: serializeLabelToCode(perName),
|
|
797
|
-
}, mappingFields: `#{custom.${serializeLabelToCode(perName)}}` }));
|
|
798
|
-
}
|
|
799
|
-
else {
|
|
800
|
-
let key = '';
|
|
801
|
-
const otherField = {};
|
|
802
|
-
const selectedAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
803
|
-
if ((selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) === 'number') {
|
|
804
|
-
key = DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_NUMBERIC_ATTR_FORMAT_SETTINGS;
|
|
805
|
-
}
|
|
806
|
-
if ((selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) === 'datetime') {
|
|
807
|
-
key = DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_DATETIME_ATTR_FORMAT_SETTINGS;
|
|
808
|
-
otherField.dateFormatString = getStringFormatDateDF(attrDFSettings);
|
|
809
|
-
}
|
|
810
|
-
if (key && showDisplayFormat) {
|
|
811
|
-
values[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE][key] = Object.assign(Object.assign(Object.assign({}, attrDFSettings), otherField), { type: selectedDFType });
|
|
812
|
-
}
|
|
813
|
-
// Handle Merge tag for event attributes
|
|
814
|
-
if (values.type === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
815
|
-
if (values.index != null && !get(values, 'attribute.itemTypeName', null)) {
|
|
816
|
-
const itemTypeName = ((_a = listBO === null || listBO === void 0 ? void 0 : listBO.find(({ id }) => get(eventTrackingAttributes, 'mainObjects', []).some(({ itemTypeId }) => itemTypeId === id))) === null || _a === void 0 ? void 0 : _a.name) || null;
|
|
817
|
-
if (itemTypeName) {
|
|
818
|
-
set(values, 'attribute.itemTypeName', itemTypeName);
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
// Set itemTypeName if Selecting content source
|
|
823
|
-
if (regexCSType.test(values.type) && !!itemTypeName) {
|
|
824
|
-
set(values, 'attribute.itemTypeName', itemTypeName);
|
|
825
|
-
}
|
|
826
|
-
if (!showIndex) {
|
|
827
|
-
values = omit(values, 'index');
|
|
828
|
-
}
|
|
829
|
-
const mappingFields = buildMappingFields(values);
|
|
830
|
-
onOk(Object.assign(Object.assign({}, values), (mappingFields && { mappingFields })));
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
});
|
|
834
|
-
};
|
|
835
|
-
const handleOnClickParentNode = (item) => {
|
|
836
|
-
if (item.children.length) {
|
|
837
|
-
if (expandedEventAttributes.includes(item.value)) {
|
|
838
|
-
// close expand
|
|
839
|
-
const newExpandedKeys = expandedEventAttributes.filter(key => key !== item.value);
|
|
840
|
-
handleTreeExpand(newExpandedKeys);
|
|
841
|
-
}
|
|
842
|
-
else {
|
|
843
|
-
// open expand
|
|
844
|
-
handleTreeExpand((prev) => [...prev, item.value]);
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
};
|
|
848
|
-
const handleTreeExpand = (expandedKeys) => {
|
|
849
|
-
setExpandedEventAttributes(expandedKeys);
|
|
850
|
-
};
|
|
851
|
-
const handleSaveAsTemplate = () => {
|
|
852
|
-
setsaveAsTemplate(!saveAsTemplate);
|
|
853
|
-
};
|
|
854
|
-
const handleFormValuesChanges = (changedValues, _allValues) => {
|
|
855
|
-
var _a;
|
|
856
|
-
const [fieldName, fieldValue] = Object.entries(changedValues)[0];
|
|
857
|
-
switch (fieldName) {
|
|
858
|
-
case DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE:
|
|
859
|
-
resetStateAndFormValueDF();
|
|
860
|
-
switch (true) {
|
|
861
|
-
case fieldValue === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value:
|
|
862
|
-
form.setFieldsValue({
|
|
863
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(listCustomerAttributes)[0],
|
|
864
|
-
});
|
|
865
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorDynamicContentAttr });
|
|
866
|
-
break;
|
|
867
|
-
case fieldValue === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value:
|
|
868
|
-
form.setFieldsValue({
|
|
869
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(listVisitorAttributes)[0],
|
|
870
|
-
});
|
|
871
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorDynamicContentAttr });
|
|
872
|
-
break;
|
|
873
|
-
case fieldValue === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value:
|
|
874
|
-
if (!(listEvents === null || listEvents === void 0 ? void 0 : listEvents.length))
|
|
875
|
-
break;
|
|
876
|
-
form.setFieldsValue({
|
|
877
|
-
[DYNAMIC_CONTENT_SETTING_KEY.EVENT]: listEvents[0].value,
|
|
878
|
-
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: undefined,
|
|
879
|
-
});
|
|
880
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorEventAttr });
|
|
881
|
-
break;
|
|
882
|
-
case fieldValue === CUSTOM_TYPE.value:
|
|
883
|
-
if (!(listEvents === null || listEvents === void 0 ? void 0 : listEvents.length))
|
|
884
|
-
break;
|
|
885
|
-
let formatedDFValue = '';
|
|
886
|
-
let settings = attrDFSettings;
|
|
887
|
-
settings = settings !== null && settings !== void 0 ? settings : initNumberDFSettings;
|
|
888
|
-
formatedDFValue = formatNumberDF(1234.56789, selectedDFType, settings);
|
|
889
|
-
setFormatedAttr(formatedDFValue);
|
|
890
|
-
setAttrDFSettings(settings);
|
|
891
|
-
form.setFieldsValue({
|
|
892
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: optionDataType[0].value,
|
|
893
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: optionDataType[0].value,
|
|
894
|
-
});
|
|
895
|
-
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter(dfType => dfType.dataType === optionDataType[0].value));
|
|
896
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorEventAttr });
|
|
897
|
-
setShowDetailEditDF(true);
|
|
898
|
-
break;
|
|
899
|
-
case fieldValue === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value:
|
|
900
|
-
if (!listPromotionCodeAttributes || !listPromotionPools)
|
|
901
|
-
break;
|
|
902
|
-
form.setFieldsValue({
|
|
903
|
-
[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL]: (_a = listPromotionPools[0]) === null || _a === void 0 ? void 0 : _a.value,
|
|
904
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(listPromotionCodeAttributes)[0],
|
|
905
|
-
});
|
|
906
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorListPromotionCodeAttr });
|
|
907
|
-
break;
|
|
908
|
-
case regexCSType.test(fieldValue): {
|
|
909
|
-
const { itemTypeId: selectedItemTypeId } = serializeCSSelectedString(String(fieldValue));
|
|
910
|
-
if (isNaN(selectedItemTypeId))
|
|
911
|
-
break;
|
|
912
|
-
setItemTypeId(Number(selectedItemTypeId));
|
|
913
|
-
const key = [QUERY_KEYS.GET_EVENT_ATTRIBUTE_BO, [selectedItemTypeId]];
|
|
914
|
-
const listAttBOByItemTypeId = serilizeBOAttr(queryClientAntsomiUI.getQueryData(key));
|
|
915
|
-
if (listAttBOByItemTypeId.length) {
|
|
916
|
-
form.setFieldsValue({
|
|
917
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: listAttBOByItemTypeId[0],
|
|
918
|
-
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: defaultDynamicIndex,
|
|
919
|
-
});
|
|
920
|
-
}
|
|
921
|
-
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorBoAttr });
|
|
922
|
-
break;
|
|
923
|
-
}
|
|
924
|
-
default: {
|
|
925
|
-
break;
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
break;
|
|
929
|
-
case DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE:
|
|
930
|
-
let listAttributes = [];
|
|
931
|
-
switch (true) {
|
|
932
|
-
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value:
|
|
933
|
-
if (!listEventAttributes)
|
|
934
|
-
break;
|
|
935
|
-
let newSelectEventAttr = listEventAttributes.find((row) => {
|
|
936
|
-
if (row === null || row === void 0 ? void 0 : row.children.length) {
|
|
937
|
-
return row.children.find((item) => item.value === fieldValue.value);
|
|
938
|
-
}
|
|
939
|
-
return row.value === fieldValue.value;
|
|
940
|
-
});
|
|
941
|
-
if (newSelectEventAttr === null || newSelectEventAttr === void 0 ? void 0 : newSelectEventAttr.children.length) {
|
|
942
|
-
newSelectEventAttr = newSelectEventAttr.children.find((item) => item.value === fieldValue.value);
|
|
943
|
-
}
|
|
944
|
-
listAttributes = flatMapDeep(listEventAttributes, getMembers);
|
|
945
|
-
form.setFieldsValue({ [DYNAMIC_CONTENT_SETTING_KEY.INDEX]: defaultDynamicIndex });
|
|
946
|
-
break;
|
|
947
|
-
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value:
|
|
948
|
-
listAttributes = listCustomerAttributes;
|
|
949
|
-
break;
|
|
950
|
-
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value:
|
|
951
|
-
listAttributes = listPromotionCodeAttributes !== null && listPromotionCodeAttributes !== void 0 ? listPromotionCodeAttributes : [];
|
|
952
|
-
break;
|
|
953
|
-
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value:
|
|
954
|
-
listAttributes = listVisitorAttributes;
|
|
955
|
-
break;
|
|
956
|
-
case selectedDynamicContentType && regexCSType.test(selectedDynamicContentType):
|
|
957
|
-
form.setFieldsValue({ [DYNAMIC_CONTENT_SETTING_KEY.INDEX]: defaultDynamicIndex });
|
|
958
|
-
if (!listBoAttributes)
|
|
959
|
-
break;
|
|
960
|
-
listAttributes = listBoAttributes;
|
|
961
|
-
break;
|
|
962
|
-
default: {
|
|
963
|
-
break;
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
// add dataType to
|
|
967
|
-
if (listAttributes.length) {
|
|
968
|
-
const attr = listAttributes.find(attr => {
|
|
969
|
-
if (attr.value === fieldValue.value) {
|
|
970
|
-
return attr;
|
|
971
|
-
}
|
|
972
|
-
return null;
|
|
973
|
-
});
|
|
974
|
-
form.setFieldsValue({
|
|
975
|
-
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: attr,
|
|
976
|
-
});
|
|
977
|
-
// set new value for options display format
|
|
978
|
-
if (attr) {
|
|
979
|
-
const newAttrDFOptions = DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === attr.dataType);
|
|
980
|
-
if (newAttrDFOptions.length) {
|
|
981
|
-
form.setFieldsValue({
|
|
982
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: newAttrDFOptions[0].value,
|
|
983
|
-
});
|
|
984
|
-
setAttrDFOptions(newAttrDFOptions);
|
|
985
|
-
}
|
|
986
|
-
// reset detail display format settings
|
|
987
|
-
setAttrDFSettings(undefined);
|
|
988
|
-
setShowDetailEditDF(false);
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
break;
|
|
992
|
-
case DYNAMIC_CONTENT_SETTING_KEY.INDEX:
|
|
993
|
-
break;
|
|
994
|
-
case DYNAMIC_CONTENT_SETTING_KEY.FUNCTION:
|
|
995
|
-
form.setFieldsValue({
|
|
996
|
-
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: fieldValue,
|
|
997
|
-
});
|
|
998
|
-
break;
|
|
999
|
-
case DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE:
|
|
1000
|
-
form.setFieldsValue({
|
|
1001
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: fieldValue,
|
|
1002
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: fieldValue === 'string' ? 'raw_string' : fieldValue,
|
|
1003
|
-
});
|
|
1004
|
-
let settings = attrDFSettings;
|
|
1005
|
-
// Datatime Attribute DF
|
|
1006
|
-
if (fieldValue === 'datetime') {
|
|
1007
|
-
settings = Object.assign(Object.assign({}, initDatetimeDFSettings), { language });
|
|
1008
|
-
}
|
|
1009
|
-
else if (fieldValue === 'string') {
|
|
1010
|
-
settings = undefined;
|
|
1011
|
-
}
|
|
1012
|
-
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === fieldValue));
|
|
1013
|
-
setAttrDFSettings(settings);
|
|
1014
|
-
break;
|
|
1015
|
-
case DYNAMIC_CONTENT_SETTING_KEY.EVENT:
|
|
1016
|
-
form.setFieldsValue({
|
|
1017
|
-
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: undefined,
|
|
1018
|
-
});
|
|
1019
|
-
resetStateAndFormValueDF();
|
|
1020
|
-
break;
|
|
1021
|
-
case DYNAMIC_CONTENT_SETTING_KEY.SOURCE:
|
|
1022
|
-
resetStateAndFormValueDF();
|
|
1023
|
-
break;
|
|
1024
|
-
case DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE:
|
|
1025
|
-
switch (fieldValue) {
|
|
1026
|
-
case 'currency': {
|
|
1027
|
-
setAttrDFSettings(Object.assign(Object.assign({}, initNumberDFSettings), { decimalPlaces: 1 }));
|
|
1028
|
-
break;
|
|
1029
|
-
}
|
|
1030
|
-
case 'number':
|
|
1031
|
-
case 'percentage': {
|
|
1032
|
-
setAttrDFSettings(initNumberDFSettings);
|
|
1033
|
-
break;
|
|
1034
|
-
}
|
|
1035
|
-
case 'datetime': {
|
|
1036
|
-
setAttrDFSettings(Object.assign(Object.assign({}, initDatetimeDFSettings), { language }));
|
|
1037
|
-
break;
|
|
1038
|
-
}
|
|
1039
|
-
case 'raw_string': {
|
|
1040
|
-
setAttrDFSettings(undefined);
|
|
1041
|
-
break;
|
|
1042
|
-
}
|
|
1043
|
-
default: {
|
|
1044
|
-
break;
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
break;
|
|
1048
|
-
default: {
|
|
1049
|
-
break;
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
};
|
|
1053
|
-
//* Render functions
|
|
1054
|
-
const renderBoAttrFields = () => {
|
|
1055
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1056
|
-
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.boAttr)));
|
|
1057
|
-
}
|
|
1058
|
-
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.attribute), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1059
|
-
React.createElement(Select, { loading: isFetchingListBoAttr, style: { height: '28px' }, labelInValue: true, options: buildOptionAttrArchive(listBoAttributes || [], selectedAttr),
|
|
1060
|
-
// errorArchive={errorMessageAttr}
|
|
1061
|
-
disabled: isActionArchive, showSearch: true })));
|
|
1062
|
-
};
|
|
1063
|
-
const renderIndexFields = ({ disabled = false, loading = false }) => {
|
|
1064
|
-
if (!showIndex)
|
|
1065
|
-
return null;
|
|
1066
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1067
|
-
return null;
|
|
1068
|
-
}
|
|
1069
|
-
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.index), name: DYNAMIC_CONTENT_SETTING_KEY.INDEX, required: true },
|
|
1070
|
-
React.createElement(Select, { disabled: disabled, loading: loading, style: { height: '28px' }, options: Array.from({ length: 90 }, (_, i) => ({ value: i + 1, label: i + 1 })), showSearch: true })));
|
|
1071
|
-
};
|
|
1072
|
-
const renderCustomFunctionFields = () => {
|
|
1073
|
-
const dataType = form.getFieldValue([DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]);
|
|
1074
|
-
return (React.createElement(React.Fragment, null,
|
|
1075
|
-
React.createElement(Form.Item, { label: t(translations.dynamicContent.modal.label.personalizationName), name: DYNAMIC_CONTENT_SETTING_KEY.PERNAME, style: { alignItems: 'center' }, required: true },
|
|
1076
|
-
React.createElement(InputSuggestion, { onSelect: handleSelect, placeholder: "Custom function name...", options: searchValue.length > 0 ? listCustomTemplatesSearch : listCustomTemplates, onChange: onChangeDataInput, value: templateName }),
|
|
1077
|
-
hasError[DYNAMIC_CONTENT_SETTING_KEY.PERNAME] && (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.perName)))),
|
|
1078
|
-
React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.function), name: DYNAMIC_CONTENT_SETTING_KEY.FUNCTION, required: true },
|
|
1079
|
-
React.createElement(EditorScript, { mode: "javascript", hideExpand: true })),
|
|
1080
|
-
React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.ouputDataType), name: DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE, required: true },
|
|
1081
|
-
React.createElement(Select, { style: { height: 28 }, options: optionDataType })),
|
|
1082
|
-
React.createElement(Form.Item, { style: { alignItems: 'start' }, required: true, label: t(translations.dynamicContent.modal.label.ouputFormat), name: DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE, extra: React.createElement("div", { style: {
|
|
1083
|
-
display: 'flex',
|
|
1084
|
-
flexWrap: 'wrap',
|
|
1085
|
-
alignItems: 'center',
|
|
1086
|
-
gap: '8px',
|
|
1087
|
-
marginTop: '16px',
|
|
1088
|
-
} },
|
|
1089
|
-
dataType !== 'raw_string' ? (React.createElement(Text, { color: "#555", dangerouslySetInnerHTML: {
|
|
1090
|
-
__html: `${t(translations.dynamicContent.modal.label.displayFormat)}: <bdo dir='ltr'>${formatedAttr}</bdo>`,
|
|
1091
|
-
} })) : null,
|
|
1092
|
-
!showDetailEditDF && (React.createElement(Button, { disabled: isActionArchive &&
|
|
1093
|
-
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, type: "text", style: { display: 'inline-block' }, onClick: () => setShowDetailEditDF(prevShow => !prevShow) }, t(translations.edit.title)))) },
|
|
1094
|
-
React.createElement(Select, { disabled: isActionArchive &&
|
|
1095
|
-
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, style: { height: 28 }, options: attrDFOptions }))));
|
|
1096
|
-
};
|
|
1097
|
-
const renderCustomerAttrFields = () => {
|
|
1098
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1099
|
-
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.customerAttr)));
|
|
1100
|
-
}
|
|
1101
|
-
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, initialValue: listCustomerAttributes[0], label: t(translations.dynamicContent.modal.label.attribute), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1102
|
-
React.createElement(Select, { loading: isFetchingDynamicContentAttr, style: { height: 28 }, labelInValue: true,
|
|
1103
|
-
// errorArchive={errorMessageAttr}
|
|
1104
|
-
disabled: isActionArchive, options: buildOptionAttrArchive(listCustomerAttributes, selectedAttr), showSearch: true })));
|
|
1105
|
-
};
|
|
1106
|
-
const renderEventAttrFields = () => {
|
|
1107
|
-
var _a;
|
|
1108
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1109
|
-
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.eventAttr)));
|
|
1110
|
-
}
|
|
1111
|
-
return (React.createElement(React.Fragment, null,
|
|
1112
|
-
React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.selectEventAttr), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1113
|
-
React.createElement(TreeSelect, { loading: isFetchingEventAttr || !(listEvents === null || listEvents === void 0 ? void 0 : listEvents.length), style: { height: 28 }, labelInValue: true, showSearch: true }, listEventAttributes &&
|
|
1114
|
-
listEventAttributes.map((attr) => {
|
|
1115
|
-
var _a, _b, _c;
|
|
1116
|
-
return (React.createElement(TreeNode, { key: attr.value, value: attr.value, selectable: !((_a = attr === null || attr === void 0 ? void 0 : attr.children) === null || _a === void 0 ? void 0 : _a.length), title: ((_b = attr.children) === null || _b === void 0 ? void 0 : _b.length) ? (React.createElement("div", { onClick: () => handleOnClickParentNode(attr) }, attr.label)) : (attr.label) }, (_c = buildOptionAttrArchive(attr === null || attr === void 0 ? void 0 : attr.children, selectedAttr)) === null || _c === void 0 ? void 0 : _c.map((item) => (React.createElement(TreeNode, { key: item.value, value: item.value, title: item.label })))));
|
|
1117
|
-
}))),
|
|
1118
|
-
form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE) &&
|
|
1119
|
-
((_a = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE)) === null || _a === void 0 ? void 0 : _a.status) !== 1 && (React.createElement(Text, { type: "warning" }, t(translations.dynamicContent.modal.message.selectDisableEventAttr)))));
|
|
1120
|
-
};
|
|
1121
|
-
const renderEventFields = () => {
|
|
1122
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.EVENT]) {
|
|
1123
|
-
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.eventBySource)));
|
|
1124
|
-
}
|
|
1125
|
-
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.selectEvent), name: DYNAMIC_CONTENT_SETTING_KEY.EVENT, required: true, preserve: false },
|
|
1126
|
-
React.createElement(Select, { disabled: !!(triggerEvent === null || triggerEvent === void 0 ? void 0 : triggerEvent.eventActionId) && !!(triggerEvent === null || triggerEvent === void 0 ? void 0 : triggerEvent.eventCategoryId), loading: isFetchingEventBySource, style: { height: 28 }, options: listEvents, showSearch: true })));
|
|
1127
|
-
};
|
|
1128
|
-
const renderSourceFields = () => {
|
|
1129
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]) {
|
|
1130
|
-
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.source)));
|
|
1131
|
-
}
|
|
1132
|
-
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.selectSource), name: DYNAMIC_CONTENT_SETTING_KEY.SOURCE, required: true },
|
|
1133
|
-
React.createElement(Select, { disabled: !isEmpty(triggerEvent === null || triggerEvent === void 0 ? void 0 : triggerEvent.insightPropertyIds), mode: "multiple", loading: isFetchingSourceBO, options: listSources, showSearch: true })));
|
|
1134
|
-
};
|
|
1135
|
-
const renderPromotionCodeAttr = () => {
|
|
1136
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1137
|
-
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.promotionCodeAttr)));
|
|
1138
|
-
}
|
|
1139
|
-
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.promotionCodeAttr), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1140
|
-
React.createElement(Select, { loading: isFetchingPromotionCodeAttr, style: { height: 28 }, labelInValue: true, options: buildOptionAttrArchive(listPromotionCodeAttributes || [], selectedAttr), showSearch: true,
|
|
1141
|
-
// errorArchive={errorMessageAttr}
|
|
1142
|
-
disabled: isActionArchive })));
|
|
1143
|
-
};
|
|
1144
|
-
const renderPromotionPoolFields = () => {
|
|
1145
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL]) {
|
|
1146
|
-
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.promotionPools)));
|
|
1147
|
-
}
|
|
1148
|
-
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.promotionPools), name: DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL, required: true },
|
|
1149
|
-
React.createElement(Select, { loading: isFetchingPromotionPool, style: { height: 28 }, options: listPromotionPools, showSearch: true })));
|
|
1150
|
-
};
|
|
1151
|
-
const renderVisitorAttrFields = () => {
|
|
1152
|
-
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1153
|
-
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.visitorAttr)));
|
|
1154
|
-
}
|
|
1155
|
-
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, initialValue: listVisitorAttributes[0], label: t(translations.dynamicContent.modal.label.attribute), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1156
|
-
React.createElement(Select, { loading: isFetchingDynamicContentAttr, style: { height: 28 }, labelInValue: true, options: buildOptionAttrArchive(listVisitorAttributes, selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.value), showSearch: true,
|
|
1157
|
-
// errorArchive={errorMessageAttr}
|
|
1158
|
-
disabled: isActionArchive })));
|
|
1159
|
-
};
|
|
1160
|
-
const renderDisplayFormat = () => {
|
|
1161
|
-
const selectedAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
1162
|
-
if (formSubmitDisabled ||
|
|
1163
|
-
!attrDFSettings ||
|
|
1164
|
-
isEmpty(attrDFSettings) ||
|
|
1165
|
-
!(selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) ||
|
|
1166
|
-
!attrDFOptions.length)
|
|
1167
|
-
return null;
|
|
1168
|
-
if (selectedAttr.dataType === 'number' || selectedAttr.dataType === 'datetime')
|
|
1169
|
-
return (React.createElement(Form.Item, { initialValue: attrDFOptions[0].value, style: { alignItems: 'start' }, label: t(translations.dynamicContent.modal.label.displayFormat), name: DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE, extra: React.createElement("div", { style: {
|
|
1170
|
-
display: 'flex',
|
|
1171
|
-
flexWrap: 'wrap',
|
|
1172
|
-
alignItems: 'center',
|
|
1173
|
-
gap: '8px',
|
|
1174
|
-
marginTop: '16px',
|
|
1175
|
-
} },
|
|
1176
|
-
React.createElement(Text, { color: "#555", dangerouslySetInnerHTML: {
|
|
1177
|
-
__html: `${t(translations.dynamicContent.modal.label.displayFormat)}: <bdo dir='ltr'>${formatedAttr}</bdo>`,
|
|
1178
|
-
} }),
|
|
1179
|
-
!showDetailEditDF && (React.createElement(Button, { disabled: isActionArchive &&
|
|
1180
|
-
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, type: "text", style: { display: 'inline-block' }, onClick: () => setShowDetailEditDF(prevShow => !prevShow) }, t(translations.edit.title)))) },
|
|
1181
|
-
React.createElement(Select, { disabled: isActionArchive &&
|
|
1182
|
-
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, style: { height: 28 }, options: attrDFOptions })));
|
|
1183
|
-
return null;
|
|
1184
|
-
};
|
|
1185
|
-
const renderDetailDFSettings = () => {
|
|
1186
|
-
if (showDetailEditDF && selectedDFType && attrDFSettings)
|
|
1187
|
-
return (React.createElement("div", { style: {
|
|
1188
|
-
border: '1px solid #9e9e9e',
|
|
1189
|
-
borderRadius: '2px',
|
|
1190
|
-
padding: '8px',
|
|
1191
|
-
marginTop: '8px',
|
|
1192
|
-
display: 'flex',
|
|
1193
|
-
flexDirection: 'column',
|
|
1194
|
-
gap: '8px',
|
|
1195
|
-
} },
|
|
1196
|
-
React.createElement(DisplayFormat, { infos: infos, url: url, displayFormatType: selectedDFType, formatSettings: attrDFSettings, onSettingsChange: (values) => setAttrDFSettings(values), dynamicContentType: form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE) })));
|
|
1197
|
-
};
|
|
1198
|
-
return (React.createElement(ModalCustom, { closable: false, destroyOnClose: true, forceRender: true, mask: true, okButtonProps: { disabled: formSubmitDisabled }, title: modalTitle || t(translations.dynamicContent.modal.title.addDynamicContent), visible: visible, onCancel: handleOnCancelModal, onOk: handleOnOkModal },
|
|
1199
|
-
React.createElement(Spin, { spinning: isFetchingSourceBO ||
|
|
1200
|
-
isFetchingListBoAttr ||
|
|
1201
|
-
isFetchingEventAttr ||
|
|
1202
|
-
isFetchingPromotionPool ||
|
|
1203
|
-
isFetchingPromotionCodeAttr ||
|
|
1204
|
-
isFetchingDynamicContentAttr },
|
|
1205
|
-
React.createElement(Form, { style: { width: '100%' }, form: form, labelAlign: "left", labelCol: { span: 9 }, wrapperCol: { span: 15 }, onValuesChange: handleFormValuesChanges, initialValues: {
|
|
1206
|
-
[DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE]: listDynamicContentTypes[0].value,
|
|
1207
|
-
} },
|
|
1208
|
-
React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.contentSource), name: DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE, required: true },
|
|
1209
|
-
React.createElement(Select, { style: { height: 28 }, options: listDynamicContentTypes })),
|
|
1210
|
-
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value && (React.createElement(React.Fragment, null, renderVisitorAttrFields())),
|
|
1211
|
-
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value && (React.createElement(React.Fragment, null, renderCustomerAttrFields())),
|
|
1212
|
-
selectedDynamicContentType === CUSTOM_TYPE.value && React.createElement(React.Fragment, null, renderCustomFunctionFields()),
|
|
1213
|
-
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value && (React.createElement(React.Fragment, null,
|
|
1214
|
-
renderEventFields(),
|
|
1215
|
-
renderSourceFields(),
|
|
1216
|
-
renderEventAttrFields(),
|
|
1217
|
-
isShowEventIndexField
|
|
1218
|
-
? renderIndexFields({ disabled: false, loading: false })
|
|
1219
|
-
: null)),
|
|
1220
|
-
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value && (React.createElement(React.Fragment, null,
|
|
1221
|
-
renderPromotionPoolFields(),
|
|
1222
|
-
renderPromotionCodeAttr())),
|
|
1223
|
-
selectedDynamicContentType && regexCSType.test(selectedDynamicContentType) && (React.createElement(React.Fragment, null,
|
|
1224
|
-
renderBoAttrFields(),
|
|
1225
|
-
renderIndexFields({ disabled: isActionArchive, loading: isFetchingListBoAttr }))),
|
|
1226
|
-
showDisplayFormat && renderDisplayFormat()),
|
|
1227
|
-
showDisplayFormat && renderDisplayFormat() !== null && renderDetailDFSettings(),
|
|
1228
|
-
isShowCustomFunction && selectedDynamicContentType === CUSTOM_TYPE.value && (React.createElement("div", { style: {
|
|
1229
|
-
display: 'flex',
|
|
1230
|
-
alignItems: 'center',
|
|
1231
|
-
justifyContent: 'start',
|
|
1232
|
-
marginBottom: '8px',
|
|
1233
|
-
marginTop: '10px',
|
|
1234
|
-
} },
|
|
1235
|
-
React.createElement(Checkbox, { onChange: handleSaveAsTemplate, checked: saveAsTemplate },
|
|
1236
|
-
React.createElement("span", { style: { fontSize: '12px' } }, t(translations.dynamicContent.modal.label.saveTemplate))))))));
|
|
1237
|
-
};
|
|
1238
|
-
AddDynamicContent.defaultProps = {
|
|
1239
|
-
showDisplayFormat: true,
|
|
1240
|
-
showIndex: true,
|
|
1241
|
-
APIConfig: {
|
|
1242
|
-
domain: 'https://sandbox-media-template.antsomi.com',
|
|
1243
|
-
slug: '/api/v1',
|
|
1244
|
-
token: '',
|
|
1245
|
-
userId: '',
|
|
1246
|
-
accountId: '',
|
|
1247
|
-
},
|
|
1248
|
-
};
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
/* eslint-disable no-case-declarations */
|
|
13
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
14
|
+
// Libraries
|
|
15
|
+
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react';
|
|
16
|
+
import { omit, isEmpty, flatMapDeep, set, get, isNaN } from 'lodash';
|
|
17
|
+
// Hooks
|
|
18
|
+
import { useDeepCompareEffect, useDeepCompareMemo } from '@antscorp/antsomi-ui/es/hooks';
|
|
19
|
+
// Components
|
|
20
|
+
import { TreeNode } from 'rc-tree-select';
|
|
21
|
+
import { Button, Checkbox, Text, Spin } from '../../atoms';
|
|
22
|
+
import { TreeSelect, Form, Select } from 'antd';
|
|
23
|
+
// Locales
|
|
24
|
+
import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
|
|
25
|
+
import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
|
|
26
|
+
// Query
|
|
27
|
+
import { useGetDynamicContentAttr, useGetListPromotionPool, useGetListEventAttr, useGetListPromotionCodeAttr, useGetListBO, useGetListAllEvents, useGetListSourceByEvent, useGetListAttributeBO, useGetCustomFunction, useAddSavedCSFunction, useUpdateCSFunction, } from '@antscorp/antsomi-ui/es/queries';
|
|
28
|
+
import { useGetEventTrackingAttributes } from '@antscorp/antsomi-ui/es/queries/ThirdParty';
|
|
29
|
+
// Queries config
|
|
30
|
+
import { queryClientAntsomiUI } from '@antscorp/antsomi-ui/es/queries/configs';
|
|
31
|
+
import { QUERY_KEYS } from '@antscorp/antsomi-ui/es/constants/queries';
|
|
32
|
+
import { dateExample } from './components/FormatDatetime';
|
|
33
|
+
import DisplayFormat from './components/DisplayFormat';
|
|
34
|
+
// Constants
|
|
35
|
+
import { DYNAMIC_CONTENT_SETTING_KEY, DYNAMIC_CONTENT_TYPE, DYNAMIC_CONTENT_ATTR_DF_TYPE, DATA_TYPE, ATTRIBUTE_TYPE, } from './constants';
|
|
36
|
+
// Utils
|
|
37
|
+
import { handleError } from '@antscorp/antsomi-ui/es/utils';
|
|
38
|
+
import { formatDatetimeDF, formatNumberDF, getAvailableAttrs, getStringFormatDateDF, regexCSType, serilizeBOAttr, serializeCSSelectedString, serilizeDynamicContentAttr, serilizeEventAttr, serilizePromotionPool, buildOptionAttrArchive, checkStatusAttr, serializeLabelToCode, buildMappingFields, CUSTOM_TYPE, } from './utils';
|
|
39
|
+
// Style
|
|
40
|
+
import { InputSuggestion, ModalCustom } from './styled';
|
|
41
|
+
import { EditorScript } from '../EditorScript';
|
|
42
|
+
const getMembers = (member) => {
|
|
43
|
+
if (!member.children || !member.children.length) {
|
|
44
|
+
return member;
|
|
45
|
+
}
|
|
46
|
+
return [member, member.children];
|
|
47
|
+
};
|
|
48
|
+
const PATH = 'src/components/molecules/AddDynamicContent/AddDynamicContent.tsx';
|
|
49
|
+
const initNumberDFSettings = {
|
|
50
|
+
grouping: ',',
|
|
51
|
+
decimal: '.',
|
|
52
|
+
decimalPlaces: 2,
|
|
53
|
+
isCompact: false,
|
|
54
|
+
currencyCode: 'USD',
|
|
55
|
+
prefixType: 'code',
|
|
56
|
+
};
|
|
57
|
+
const initDatetimeDFSettings = {
|
|
58
|
+
hasDateFormat: true,
|
|
59
|
+
hasTimeFormat: true,
|
|
60
|
+
dateParseOption: 'medium',
|
|
61
|
+
timeParseOption: 'medium',
|
|
62
|
+
dateParseFormat: 'MM/DD/YYYY',
|
|
63
|
+
timeParseFormat: '12hour',
|
|
64
|
+
};
|
|
65
|
+
const defaultDynamicTypes = [...Object.values(DYNAMIC_CONTENT_TYPE)]
|
|
66
|
+
.filter((i) => i.value !== 'bo-settings')
|
|
67
|
+
.sort((a, b) => a.index - b.index);
|
|
68
|
+
const optionDataType = [...Object.values(DATA_TYPE)];
|
|
69
|
+
export const AddDynamicContent = props => {
|
|
70
|
+
//* Props
|
|
71
|
+
const { defaultData = {}, defaultDynamicIndex = 1, visible, showDisplayFormat, showIndex, journeySettings, contentSources, APIConfig, isShowCustomFunction = false, modalTitle, } = props;
|
|
72
|
+
const { accountId, userId, token, domain, slug } = APIConfig;
|
|
73
|
+
const infos = { accountId, userId, token };
|
|
74
|
+
const { onCancel, onOk, additionalAttrProperties = [] } = props;
|
|
75
|
+
const url = useMemo(() => `${domain}${slug}`, [domain, slug]);
|
|
76
|
+
// Hook Queries
|
|
77
|
+
const { mutate: addSavedCSFunction } = useAddSavedCSFunction();
|
|
78
|
+
const { data: customFunction } = useGetCustomFunction({ url }, infos);
|
|
79
|
+
const { mutate: updateCSFunction } = useUpdateCSFunction();
|
|
80
|
+
//* Hooks
|
|
81
|
+
const { t, language } = i18nInstance;
|
|
82
|
+
//* Selectors
|
|
83
|
+
const { triggerEvent } = journeySettings;
|
|
84
|
+
const [itemTypeId, setItemTypeId] = useState(null);
|
|
85
|
+
// Form states
|
|
86
|
+
const [form] = Form.useForm();
|
|
87
|
+
const selectedDynamicContentType = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE, form);
|
|
88
|
+
const selectedAttr = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, form);
|
|
89
|
+
const selectedDFType = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE, form);
|
|
90
|
+
const selectedEventSource = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.EVENT, form);
|
|
91
|
+
const selectedSource = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.SOURCE, form);
|
|
92
|
+
const selectedBoIndex = Form.useWatch(DYNAMIC_CONTENT_SETTING_KEY.INDEX, form);
|
|
93
|
+
const [formSubmitDisabled, setFormSubmitDisabled] = useState(true);
|
|
94
|
+
const [saveAsTemplate, setsaveAsTemplate] = useState(false);
|
|
95
|
+
const [hasError, setHasError] = useState({
|
|
96
|
+
[DYNAMIC_CONTENT_SETTING_KEY.EVENT]: false,
|
|
97
|
+
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: false,
|
|
98
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false,
|
|
99
|
+
[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL]: false,
|
|
100
|
+
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: false,
|
|
101
|
+
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: false,
|
|
102
|
+
[DYNAMIC_CONTENT_SETTING_KEY.PERNAME]: false,
|
|
103
|
+
});
|
|
104
|
+
// Queries
|
|
105
|
+
const { data: listBO } = useGetListBO({ url }, infos);
|
|
106
|
+
// defaultSettings
|
|
107
|
+
const [defaultAttrDFSetings, setDefaultAttrDFSetings] = useState(null);
|
|
108
|
+
// Variables
|
|
109
|
+
const [eventActionId, eventCategoryId] = (selectedEventSource === null || selectedEventSource === void 0 ? void 0 : selectedEventSource.split(':').map(Number)) || [];
|
|
110
|
+
// Selection Options states
|
|
111
|
+
const [listDynamicContentTypes, setListDynamicContentTypes] = useState(defaultDynamicTypes);
|
|
112
|
+
const [listCustomerAttributes, setListCustomerAttributes] = useState([]);
|
|
113
|
+
const [listVisitorAttributes, setListVisitorAttributes] = useState([]);
|
|
114
|
+
const [listCustomTemplates, setlistCustomTemplates] = useState([]);
|
|
115
|
+
const [listCustomTemplatesSearch, setlistCustomTemplatesSearch] = useState([]);
|
|
116
|
+
const [searchValue, setSearchValue] = useState('');
|
|
117
|
+
// Expanded keys in tree select
|
|
118
|
+
const [expandedEventAttributes, setExpandedEventAttributes] = useState([]);
|
|
119
|
+
const [isActionArchive, setActionArchive] = useState(false);
|
|
120
|
+
const [errorMessageAttr, setErrorMessageAttr] = useState();
|
|
121
|
+
// Number Display format
|
|
122
|
+
const [showDetailEditDF, setShowDetailEditDF] = useState(false);
|
|
123
|
+
const [formatedAttr, setFormatedAttr] = useState('');
|
|
124
|
+
const [attrDFSettings, setAttrDFSettings] = useState(undefined);
|
|
125
|
+
const [templateName, setTemplateName] = useState('');
|
|
126
|
+
const [attrDFOptions, setAttrDFOptions] = useState([]);
|
|
127
|
+
// Template Custom
|
|
128
|
+
const [templateId, settemplateId] = useState();
|
|
129
|
+
const { data: listBoAttributes = [], isFetching: isFetchingListBoAttr, isError: isErrorBoAttr, } = useGetListAttributeBO({
|
|
130
|
+
url,
|
|
131
|
+
itemTypeIds: itemTypeId ? [itemTypeId] : [],
|
|
132
|
+
options: {
|
|
133
|
+
onSuccess: (data) => {
|
|
134
|
+
setHasError({
|
|
135
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false,
|
|
136
|
+
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: false,
|
|
137
|
+
});
|
|
138
|
+
if (data.length &&
|
|
139
|
+
selectedDynamicContentType &&
|
|
140
|
+
regexCSType.test(selectedDynamicContentType)) {
|
|
141
|
+
if (form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE) &&
|
|
142
|
+
form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.INDEX))
|
|
143
|
+
return;
|
|
144
|
+
form.setFieldsValue({
|
|
145
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: data[0],
|
|
146
|
+
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: defaultDynamicIndex,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
select: (data) => serilizeBOAttr(data, additionalAttrProperties),
|
|
151
|
+
onError: (error) => {
|
|
152
|
+
setHasError({
|
|
153
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true,
|
|
154
|
+
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: true,
|
|
155
|
+
});
|
|
156
|
+
handleError(error, {
|
|
157
|
+
path: PATH,
|
|
158
|
+
name: 'useGetListAttributeBO',
|
|
159
|
+
args: error === null || error === void 0 ? void 0 : error.message,
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
enabled: !!itemTypeId,
|
|
163
|
+
},
|
|
164
|
+
}, infos);
|
|
165
|
+
const { data: dynamicContentAttr, isFetching: isFetchingDynamicContentAttr, isError: isErrorDynamicContentAttr, } = useGetDynamicContentAttr({ url }, infos, {
|
|
166
|
+
onSuccess: () => {
|
|
167
|
+
setHasError({
|
|
168
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false,
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
onError: (error) => {
|
|
172
|
+
setHasError({
|
|
173
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true,
|
|
174
|
+
});
|
|
175
|
+
handleError(error, {
|
|
176
|
+
path: PATH,
|
|
177
|
+
name: 'useGetDynamicContentAttr',
|
|
178
|
+
args: error === null || error === void 0 ? void 0 : error.message,
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
const { data: listSources, isFetching: isFetchingSourceBO } = useGetListSourceByEvent({
|
|
183
|
+
apiConfig: {
|
|
184
|
+
url,
|
|
185
|
+
},
|
|
186
|
+
infos,
|
|
187
|
+
eventActionId,
|
|
188
|
+
eventCategoryId,
|
|
189
|
+
options: {
|
|
190
|
+
onSuccess: () => {
|
|
191
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: false });
|
|
192
|
+
},
|
|
193
|
+
select: (data) => {
|
|
194
|
+
const { rows } = data || {};
|
|
195
|
+
return rows.map((row) => ({
|
|
196
|
+
label: row.label,
|
|
197
|
+
value: row.value,
|
|
198
|
+
}));
|
|
199
|
+
},
|
|
200
|
+
onError: (error) => {
|
|
201
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: true });
|
|
202
|
+
handleError(error, {
|
|
203
|
+
path: PATH,
|
|
204
|
+
name: 'useGetListSourceBO',
|
|
205
|
+
args: error === null || error === void 0 ? void 0 : error.message,
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
const { data: listEvents, isFetching: isFetchingEventBySource } = useGetListAllEvents({
|
|
211
|
+
apiConfig: {
|
|
212
|
+
url,
|
|
213
|
+
},
|
|
214
|
+
infos,
|
|
215
|
+
options: {
|
|
216
|
+
onSuccess: (data) => {
|
|
217
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.EVENT]: false });
|
|
218
|
+
if (!isEmpty(data) &&
|
|
219
|
+
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
220
|
+
form.setFieldsValue({
|
|
221
|
+
[DYNAMIC_CONTENT_SETTING_KEY.EVENT]: data[0].value,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
onError: (error) => {
|
|
226
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.EVENT]: true });
|
|
227
|
+
handleError(error, {
|
|
228
|
+
path: PATH,
|
|
229
|
+
name: 'useGetListEventBySource',
|
|
230
|
+
args: error === null || error === void 0 ? void 0 : error.message,
|
|
231
|
+
});
|
|
232
|
+
},
|
|
233
|
+
select: (data) => {
|
|
234
|
+
const { rows = [] } = data || {};
|
|
235
|
+
return rows.map((event) => ({
|
|
236
|
+
label: event.label,
|
|
237
|
+
value: `${event.eventActionId}:${event.eventCategoryId}`,
|
|
238
|
+
}));
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
const { data: listEventAttributes, isFetching: isFetchingEventAttr, isError: isErrorEventAttr, } = useGetListEventAttr({ url }, infos, selectedEventSource || '', Array.isArray(selectedSource) ? selectedSource.join(',') : selectedSource || '', {
|
|
243
|
+
onSuccess: () => setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false }),
|
|
244
|
+
onError: (error) => {
|
|
245
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true });
|
|
246
|
+
handleError(error, {
|
|
247
|
+
path: PATH,
|
|
248
|
+
name: 'useGetListEventAttr',
|
|
249
|
+
args: error === null || error === void 0 ? void 0 : error.message,
|
|
250
|
+
});
|
|
251
|
+
},
|
|
252
|
+
select: (data) => serilizeEventAttr(data, language, additionalAttrProperties),
|
|
253
|
+
});
|
|
254
|
+
const { data: listPromotionPools, isFetching: isFetchingPromotionPool } = useGetListPromotionPool({ url }, infos, {
|
|
255
|
+
onSuccess: () => {
|
|
256
|
+
setHasError({
|
|
257
|
+
[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL]: false,
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
select: (data) => serilizePromotionPool(data, additionalAttrProperties),
|
|
261
|
+
onError: (error) => {
|
|
262
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true });
|
|
263
|
+
handleError(error, {
|
|
264
|
+
path: PATH,
|
|
265
|
+
name: 'useGetListPromotionPool',
|
|
266
|
+
args: error === null || error === void 0 ? void 0 : error.message,
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
});
|
|
270
|
+
const { data: listPromotionCodeAttributes, isFetching: isFetchingPromotionCodeAttr, isError: isErrorListPromotionCodeAttr, } = useGetListPromotionCodeAttr({ url }, infos, {
|
|
271
|
+
onSuccess: () => {
|
|
272
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: false });
|
|
273
|
+
},
|
|
274
|
+
select: (data) => data
|
|
275
|
+
.filter((attr) => +(attr === null || attr === void 0 ? void 0 : attr.status) === 1)
|
|
276
|
+
.map((attr) => ({
|
|
277
|
+
label: attr.propertyDisplayMultilang[language] ||
|
|
278
|
+
attr.propertyDisplayMultilang[get(attr, "propertyDisplayMultilang['DEFAULT_LANG']", 'EN')],
|
|
279
|
+
value: attr.itemPropertyName,
|
|
280
|
+
dataType: attr.dataType,
|
|
281
|
+
disabled: parseInt(attr.status) === 4,
|
|
282
|
+
status: attr.status,
|
|
283
|
+
})),
|
|
284
|
+
onError: (error) => {
|
|
285
|
+
setHasError({
|
|
286
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: true,
|
|
287
|
+
});
|
|
288
|
+
handleError(error, {
|
|
289
|
+
path: PATH,
|
|
290
|
+
name: 'useGetPromotionCodeAttr',
|
|
291
|
+
args: error === null || error === void 0 ? void 0 : error.message,
|
|
292
|
+
});
|
|
293
|
+
},
|
|
294
|
+
});
|
|
295
|
+
const { data: eventTrackingAttributes } = useGetEventTrackingAttributes({
|
|
296
|
+
apiConfig: { url },
|
|
297
|
+
infos,
|
|
298
|
+
eventActionId,
|
|
299
|
+
eventCategoryId,
|
|
300
|
+
});
|
|
301
|
+
// Memo
|
|
302
|
+
const isShowEventIndexField = useDeepCompareMemo(() => {
|
|
303
|
+
if (selectedAttr && selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
304
|
+
if (selectedAttr.itemTypeId) {
|
|
305
|
+
return !!get(selectedAttr, 'eventPropertySyntax', '').includes('items');
|
|
306
|
+
}
|
|
307
|
+
return selectedAttr.type === ATTRIBUTE_TYPE.ITEM;
|
|
308
|
+
}
|
|
309
|
+
return false;
|
|
310
|
+
}, [selectedAttr, selectedDynamicContentType, eventTrackingAttributes === null || eventTrackingAttributes === void 0 ? void 0 : eventTrackingAttributes.mainObjects]);
|
|
311
|
+
const itemTypeName = useMemo(() => {
|
|
312
|
+
var _a;
|
|
313
|
+
let draftItemTypeName = '';
|
|
314
|
+
if (itemTypeId) {
|
|
315
|
+
draftItemTypeName = ((_a = listBO === null || listBO === void 0 ? void 0 : listBO.find((bo) => bo.id === itemTypeId)) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
316
|
+
}
|
|
317
|
+
return draftItemTypeName;
|
|
318
|
+
}, [itemTypeId, listBO]);
|
|
319
|
+
// Add BO settings (if exists) to list Dynamic content Type, or removed from the previous states
|
|
320
|
+
useEffect(() => {
|
|
321
|
+
const temp = [...defaultDynamicTypes];
|
|
322
|
+
contentSources.groups.forEach((g) => {
|
|
323
|
+
if (!g.itemTypeId)
|
|
324
|
+
return;
|
|
325
|
+
temp.push({
|
|
326
|
+
index: temp.length,
|
|
327
|
+
label: `${g.groupName} (${g.itemTypeDisplay})`,
|
|
328
|
+
value: `content-source::${g.groupId}::${g.itemTypeId}`,
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
if (isShowCustomFunction) {
|
|
332
|
+
temp.push(Object.assign(Object.assign({}, CUSTOM_TYPE), { index: temp.length }));
|
|
333
|
+
}
|
|
334
|
+
setListDynamicContentTypes(temp);
|
|
335
|
+
}, [contentSources.groups, isShowCustomFunction]);
|
|
336
|
+
useEffect(() => {
|
|
337
|
+
if (Array.isArray(customFunction) && customFunction.length) {
|
|
338
|
+
const temp = [];
|
|
339
|
+
customFunction.forEach(item => {
|
|
340
|
+
temp.push(Object.assign(Object.assign({}, item), { label: item.template_name, value: item.template_name }));
|
|
341
|
+
});
|
|
342
|
+
setlistCustomTemplates(temp);
|
|
343
|
+
}
|
|
344
|
+
}, [customFunction, visible]);
|
|
345
|
+
useDeepCompareEffect(() => {
|
|
346
|
+
if (dynamicContentAttr) {
|
|
347
|
+
const { customer, visitor } = dynamicContentAttr;
|
|
348
|
+
const dynamicContentType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE);
|
|
349
|
+
const parseCustomers = serilizeDynamicContentAttr(customer, language, additionalAttrProperties);
|
|
350
|
+
const parseVisitors = serilizeDynamicContentAttr(visitor, language, additionalAttrProperties);
|
|
351
|
+
setListCustomerAttributes(parseCustomers);
|
|
352
|
+
setListVisitorAttributes(parseVisitors);
|
|
353
|
+
if (form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE))
|
|
354
|
+
return;
|
|
355
|
+
if (dynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value) {
|
|
356
|
+
form.setFieldsValue({
|
|
357
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(parseVisitors)[0],
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
if (dynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value) {
|
|
361
|
+
form.setFieldsValue({
|
|
362
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(parseCustomers)[0],
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}, [dynamicContentAttr, form, language]);
|
|
367
|
+
useDeepCompareEffect(() => {
|
|
368
|
+
if (listSources && selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
369
|
+
if (!isEmpty(form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.SOURCE)))
|
|
370
|
+
return;
|
|
371
|
+
const defaultValue = listSources[0] ? [listSources[0].value] : [];
|
|
372
|
+
form.setFieldsValue({
|
|
373
|
+
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: defaultValue,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}, [selectedEventSource, listSources, form, selectedDynamicContentType]);
|
|
377
|
+
useDeepCompareEffect(() => {
|
|
378
|
+
var _a, _b;
|
|
379
|
+
if (listEventAttributes &&
|
|
380
|
+
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
381
|
+
const initEventAttr = ((_a = listEventAttributes[0]) === null || _a === void 0 ? void 0 : _a.children.length)
|
|
382
|
+
? getAvailableAttrs((_b = listEventAttributes[0]) === null || _b === void 0 ? void 0 : _b.children)[0]
|
|
383
|
+
: listEventAttributes[0];
|
|
384
|
+
if (form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE)) {
|
|
385
|
+
const eventAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
386
|
+
setExpandedEventAttributes([eventAttr.value.split('.')[0]]);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
form.setFieldsValue({
|
|
390
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: initEventAttr,
|
|
391
|
+
});
|
|
392
|
+
setExpandedEventAttributes([initEventAttr.value.split('.')[0]]);
|
|
393
|
+
}
|
|
394
|
+
}, [selectedSource, selectedEventSource, listEventAttributes, form, selectedDynamicContentType]);
|
|
395
|
+
useDeepCompareEffect(() => {
|
|
396
|
+
if (listPromotionCodeAttributes &&
|
|
397
|
+
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value) {
|
|
398
|
+
if (form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE))
|
|
399
|
+
return;
|
|
400
|
+
form.setFieldsValue({
|
|
401
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(listPromotionCodeAttributes)[0],
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
}, [selectedDynamicContentType, listPromotionCodeAttributes, form]);
|
|
405
|
+
// Update form field data with default data/ or reset it to initial states
|
|
406
|
+
const resetStateAndFormValueDF = useCallback(() => {
|
|
407
|
+
setShowDetailEditDF(false);
|
|
408
|
+
setAttrDFSettings(undefined);
|
|
409
|
+
setAttrDFOptions([]);
|
|
410
|
+
setFormatedAttr('');
|
|
411
|
+
setsaveAsTemplate(false);
|
|
412
|
+
setTemplateName('');
|
|
413
|
+
setSearchValue('');
|
|
414
|
+
form.setFieldsValue({
|
|
415
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: undefined,
|
|
416
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: undefined,
|
|
417
|
+
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: undefined,
|
|
418
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: optionDataType[0].value,
|
|
419
|
+
});
|
|
420
|
+
}, [form]);
|
|
421
|
+
useEffect(() => {
|
|
422
|
+
if (!visible) {
|
|
423
|
+
setTimeout(() => {
|
|
424
|
+
resetStateAndFormValueDF();
|
|
425
|
+
}, 200);
|
|
426
|
+
}
|
|
427
|
+
}, [visible, resetStateAndFormValueDF]);
|
|
428
|
+
useEffect(() => {
|
|
429
|
+
let listTmp = [];
|
|
430
|
+
switch (true) {
|
|
431
|
+
case selectedDynamicContentType && regexCSType.test(selectedDynamicContentType):
|
|
432
|
+
listTmp = [...listBoAttributes];
|
|
433
|
+
break;
|
|
434
|
+
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value:
|
|
435
|
+
listTmp = listPromotionCodeAttributes ? [...listPromotionCodeAttributes] : [];
|
|
436
|
+
break;
|
|
437
|
+
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value:
|
|
438
|
+
listTmp = [...listCustomerAttributes];
|
|
439
|
+
break;
|
|
440
|
+
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value:
|
|
441
|
+
listTmp = [...listVisitorAttributes];
|
|
442
|
+
break;
|
|
443
|
+
default:
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
const { errorMessage, isDisable } = checkStatusAttr({
|
|
447
|
+
listBO: listBO,
|
|
448
|
+
itemTypeId: itemTypeId || 0,
|
|
449
|
+
listAttribute: listTmp,
|
|
450
|
+
field: selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.value,
|
|
451
|
+
});
|
|
452
|
+
setActionArchive(isDisable);
|
|
453
|
+
setErrorMessageAttr(errorMessage);
|
|
454
|
+
}, [selectedAttr]);
|
|
455
|
+
useEffect(() => {
|
|
456
|
+
var _a;
|
|
457
|
+
if (!visible) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
if ((_a = Object.keys(Object.assign({}, defaultData))) === null || _a === void 0 ? void 0 : _a.length) {
|
|
461
|
+
let draftDefaultData = Object.assign({}, defaultData);
|
|
462
|
+
if (draftDefaultData.type !== 'custom') {
|
|
463
|
+
if (triggerEvent === null || triggerEvent === void 0 ? void 0 : triggerEvent.eventActionId) {
|
|
464
|
+
draftDefaultData = omit(draftDefaultData, ['event', 'source']);
|
|
465
|
+
}
|
|
466
|
+
form.setFieldsValue(draftDefaultData);
|
|
467
|
+
const defaultDMType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE);
|
|
468
|
+
const defaultAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
469
|
+
if (defaultDMType && regexCSType.test(defaultDMType)) {
|
|
470
|
+
const { itemTypeId } = serializeCSSelectedString(defaultDMType);
|
|
471
|
+
if (!isNaN(itemTypeId))
|
|
472
|
+
setItemTypeId(itemTypeId);
|
|
473
|
+
}
|
|
474
|
+
if (defaultAttr) {
|
|
475
|
+
const defaultAttr = draftDefaultData[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE];
|
|
476
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
477
|
+
if (!defaultAttr.hasOwnProperty('dataType'))
|
|
478
|
+
return;
|
|
479
|
+
let key = '';
|
|
480
|
+
if (defaultAttr.dataType === 'number') {
|
|
481
|
+
key = DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_NUMBERIC_ATTR_FORMAT_SETTINGS;
|
|
482
|
+
}
|
|
483
|
+
if (defaultAttr.dataType === 'datetime') {
|
|
484
|
+
key = DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_DATETIME_ATTR_FORMAT_SETTINGS;
|
|
485
|
+
}
|
|
486
|
+
if (key && defaultAttr[key]) {
|
|
487
|
+
const _b = defaultAttr[key], { type } = _b, settingValues = __rest(_b, ["type"]);
|
|
488
|
+
form.setFieldsValue({
|
|
489
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: type,
|
|
490
|
+
});
|
|
491
|
+
setDefaultAttrDFSetings({
|
|
492
|
+
itemPropertyName: defaultAttr.value,
|
|
493
|
+
settings: settingValues,
|
|
494
|
+
});
|
|
495
|
+
setAttrDFSettings(settingValues);
|
|
496
|
+
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === defaultAttr.dataType));
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
const { customFunction } = draftDefaultData;
|
|
502
|
+
const { outputFormat } = customFunction;
|
|
503
|
+
form.setFieldsValue({
|
|
504
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE]: draftDefaultData.type,
|
|
505
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: outputFormat.type,
|
|
506
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: customFunction.outputDataType,
|
|
507
|
+
[DYNAMIC_CONTENT_SETTING_KEY.PERNAME]: customFunction.templateName,
|
|
508
|
+
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: customFunction.customFunction,
|
|
509
|
+
});
|
|
510
|
+
setTemplateName(customFunction.templateName);
|
|
511
|
+
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === customFunction.outputDataType));
|
|
512
|
+
setShowDetailEditDF(true);
|
|
513
|
+
setAttrDFSettings(customFunction.outputDataType === 'string' ? undefined : outputFormat.config);
|
|
514
|
+
}
|
|
515
|
+
// Check if trigger event of journey has event then don's set current event and source
|
|
516
|
+
}
|
|
517
|
+
else {
|
|
518
|
+
// Hard reset to Visitor attr
|
|
519
|
+
if (listVisitorAttributes) {
|
|
520
|
+
form.setFieldsValue({
|
|
521
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE]: DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value,
|
|
522
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: listVisitorAttributes[0],
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
527
|
+
}, [defaultData, visible, form]);
|
|
528
|
+
useDeepCompareEffect(() => {
|
|
529
|
+
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
530
|
+
const { eventActionId, eventCategoryId, insightPropertyIds } = triggerEvent || {};
|
|
531
|
+
if (!!eventActionId && !!eventCategoryId) {
|
|
532
|
+
form.setFieldsValue({
|
|
533
|
+
[DYNAMIC_CONTENT_SETTING_KEY.EVENT]: `${eventActionId}:${eventCategoryId}`,
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
if (Array.isArray(insightPropertyIds) && insightPropertyIds.length) {
|
|
537
|
+
form.setFieldsValue({
|
|
538
|
+
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: insightPropertyIds,
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}, [triggerEvent, selectedDynamicContentType]);
|
|
543
|
+
// Disable Apply button if there's any error
|
|
544
|
+
useLayoutEffect(() => {
|
|
545
|
+
setFormSubmitDisabled(Object.values(hasError).some(error => error));
|
|
546
|
+
}, [hasError]);
|
|
547
|
+
useLayoutEffect(() => {
|
|
548
|
+
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value ||
|
|
549
|
+
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value) {
|
|
550
|
+
setFormSubmitDisabled(isFetchingDynamicContentAttr);
|
|
551
|
+
}
|
|
552
|
+
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
553
|
+
setFormSubmitDisabled(isFetchingSourceBO || isFetchingEventBySource || isFetchingEventAttr);
|
|
554
|
+
}
|
|
555
|
+
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value) {
|
|
556
|
+
setFormSubmitDisabled(isFetchingPromotionPool || isFetchingPromotionCodeAttr);
|
|
557
|
+
}
|
|
558
|
+
if (selectedDynamicContentType && regexCSType.test(selectedDynamicContentType)) {
|
|
559
|
+
setFormSubmitDisabled(isFetchingListBoAttr);
|
|
560
|
+
}
|
|
561
|
+
}, [
|
|
562
|
+
isFetchingDynamicContentAttr,
|
|
563
|
+
selectedDynamicContentType,
|
|
564
|
+
isFetchingSourceBO,
|
|
565
|
+
isFetchingEventBySource,
|
|
566
|
+
isFetchingEventAttr,
|
|
567
|
+
isFetchingPromotionPool,
|
|
568
|
+
isFetchingPromotionCodeAttr,
|
|
569
|
+
isFetchingListBoAttr,
|
|
570
|
+
]);
|
|
571
|
+
useLayoutEffect(() => {
|
|
572
|
+
let formatedDFValue = '';
|
|
573
|
+
let settings = attrDFSettings;
|
|
574
|
+
const selectedAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
575
|
+
const dataType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE);
|
|
576
|
+
const dynamicType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE);
|
|
577
|
+
if ((Object.keys(defaultData).length > 0 && defaultData.type !== 'custom') ||
|
|
578
|
+
dynamicType !== 'custom') {
|
|
579
|
+
if (selectedAttr &&
|
|
580
|
+
selectedAttr.dataType &&
|
|
581
|
+
['datetime', 'number'].includes(selectedAttr.dataType)) {
|
|
582
|
+
/* when change select if attr selected is previous selected default attr, set settings as default settings */
|
|
583
|
+
if (!settings &&
|
|
584
|
+
(defaultAttrDFSetings === null || defaultAttrDFSetings === void 0 ? void 0 : defaultAttrDFSetings.itemPropertyName) === selectedAttr.value) {
|
|
585
|
+
// Visitor and Customer don't have additional field
|
|
586
|
+
let equalDefaultAttr = true;
|
|
587
|
+
// Event need check additional field source, event by soucre
|
|
588
|
+
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
589
|
+
const source = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.SOURCE);
|
|
590
|
+
const event = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.EVENT);
|
|
591
|
+
if (source !== defaultData[DYNAMIC_CONTENT_SETTING_KEY.SOURCE] ||
|
|
592
|
+
event !== defaultData[DYNAMIC_CONTENT_SETTING_KEY.EVENT])
|
|
593
|
+
equalDefaultAttr = false;
|
|
594
|
+
}
|
|
595
|
+
// Promotion need check additional field promotion pool
|
|
596
|
+
if (selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value) {
|
|
597
|
+
const pool = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL);
|
|
598
|
+
if (pool !== defaultData[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL])
|
|
599
|
+
equalDefaultAttr = false;
|
|
600
|
+
}
|
|
601
|
+
// BO settings need check additional field index
|
|
602
|
+
if (selectedDynamicContentType && regexCSType.test(selectedDynamicContentType)) {
|
|
603
|
+
if (selectedBoIndex !== defaultData[DYNAMIC_CONTENT_SETTING_KEY.INDEX])
|
|
604
|
+
equalDefaultAttr = false;
|
|
605
|
+
}
|
|
606
|
+
if (equalDefaultAttr) {
|
|
607
|
+
settings = defaultAttrDFSetings.settings;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
// *********** //
|
|
611
|
+
// Numberic Attribute DF
|
|
612
|
+
if ((selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) === 'number') {
|
|
613
|
+
settings = settings !== null && settings !== void 0 ? settings : initNumberDFSettings;
|
|
614
|
+
formatedDFValue = formatNumberDF(1234.56789, selectedDFType, settings);
|
|
615
|
+
}
|
|
616
|
+
// Datatime Attribute DF
|
|
617
|
+
if ((selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) === 'datetime') {
|
|
618
|
+
settings = settings !== null && settings !== void 0 ? settings : Object.assign(Object.assign({}, initDatetimeDFSettings), { language });
|
|
619
|
+
formatedDFValue = formatDatetimeDF(dateExample, settings);
|
|
620
|
+
}
|
|
621
|
+
if (!attrDFOptions.length) {
|
|
622
|
+
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === selectedAttr.dataType));
|
|
623
|
+
}
|
|
624
|
+
setAttrDFSettings(settings);
|
|
625
|
+
setFormatedAttr(formatedDFValue);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
if (dataType && ['datetime', 'number'].includes(dataType) && dynamicType === 'custom') {
|
|
629
|
+
// Numberic Attribute DF
|
|
630
|
+
if (dataType === 'number') {
|
|
631
|
+
settings = settings !== null && settings !== void 0 ? settings : initNumberDFSettings;
|
|
632
|
+
formatedDFValue = formatNumberDF(1234.56789, selectedDFType, settings);
|
|
633
|
+
}
|
|
634
|
+
// Datatime Attribute DF
|
|
635
|
+
if (dataType === 'datetime') {
|
|
636
|
+
settings = settings !== null && settings !== void 0 ? settings : Object.assign(Object.assign({}, initDatetimeDFSettings), { language });
|
|
637
|
+
formatedDFValue = formatDatetimeDF(dateExample, settings);
|
|
638
|
+
}
|
|
639
|
+
if (!attrDFOptions.length) {
|
|
640
|
+
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === dataType));
|
|
641
|
+
}
|
|
642
|
+
setAttrDFSettings(settings);
|
|
643
|
+
setFormatedAttr(formatedDFValue);
|
|
644
|
+
}
|
|
645
|
+
}, [
|
|
646
|
+
attrDFSettings,
|
|
647
|
+
selectedDFType,
|
|
648
|
+
attrDFOptions.length,
|
|
649
|
+
language,
|
|
650
|
+
defaultAttrDFSetings,
|
|
651
|
+
form,
|
|
652
|
+
selectedAttr,
|
|
653
|
+
defaultData,
|
|
654
|
+
selectedDynamicContentType,
|
|
655
|
+
selectedBoIndex,
|
|
656
|
+
]);
|
|
657
|
+
//* Handlers
|
|
658
|
+
const handleOnCancelModal = () => {
|
|
659
|
+
if (onCancel) {
|
|
660
|
+
onCancel();
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
const onChangeDataInput = (value) => {
|
|
664
|
+
setTemplateName(value);
|
|
665
|
+
let tempState = [...listCustomTemplates];
|
|
666
|
+
if (value.length > 0) {
|
|
667
|
+
tempState = tempState.filter(item => item.label.toLowerCase().includes(value.trim().toLowerCase()));
|
|
668
|
+
}
|
|
669
|
+
setlistCustomTemplatesSearch(tempState);
|
|
670
|
+
setSearchValue(value);
|
|
671
|
+
};
|
|
672
|
+
const handleSelect = (data) => {
|
|
673
|
+
const dataTmp = listCustomTemplates.filter(each => each.value === data);
|
|
674
|
+
settemplateId(dataTmp[0].template_id);
|
|
675
|
+
let dataFormat = dataTmp[0].output_format.type.toLowerCase();
|
|
676
|
+
switch (dataTmp[0].output_format.type) {
|
|
677
|
+
case 'DATE_AND_TIME':
|
|
678
|
+
dataFormat = 'date_and_time';
|
|
679
|
+
break;
|
|
680
|
+
case 'RAW_STRING':
|
|
681
|
+
dataFormat = 'raw_string';
|
|
682
|
+
break;
|
|
683
|
+
default:
|
|
684
|
+
break;
|
|
685
|
+
}
|
|
686
|
+
form.setFieldsValue({
|
|
687
|
+
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: dataTmp[0].custom_function,
|
|
688
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: dataTmp[0].output_data_type,
|
|
689
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: dataFormat === 'date_and_time' ? 'datetime' : dataFormat,
|
|
690
|
+
});
|
|
691
|
+
setTemplateName(dataTmp[0].template_name);
|
|
692
|
+
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === dataTmp[0].output_data_type));
|
|
693
|
+
const format = dataTmp[0].output_format.config;
|
|
694
|
+
switch (dataFormat) {
|
|
695
|
+
case 'currency': {
|
|
696
|
+
setAttrDFSettings(Object.assign(Object.assign({}, initNumberDFSettings), { grouping: format.group || ',', decimal: format.decimal, decimalPlaces: format.decimalPlace, isCompact: format.isCompactNumber || false, currencyCode: format.currency || 'USD', prefixType: format.prefixType || 'code' }));
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
case 'number':
|
|
700
|
+
case 'percentage': {
|
|
701
|
+
setAttrDFSettings(Object.assign(Object.assign({}, initNumberDFSettings), { grouping: format.group || ',', decimal: format.decimal, decimalPlaces: format.decimalPlace, isCompact: format.isCompactNumber || false }));
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
case 'date_and_time': {
|
|
705
|
+
setAttrDFSettings(Object.assign(Object.assign({}, initDatetimeDFSettings), { language, hasDateFormat: format.date.check || true, hasTimeFormat: format.time.check || true, dateParseOption: format.date.value || 'medium', timeParseOption: format.time.value || 'medium', dateParseFormat: format.format || 'MM/DD/YYYY', timeParseFormat: `${format.time.timeFormat || 12}hour` }));
|
|
706
|
+
break;
|
|
707
|
+
}
|
|
708
|
+
case 'raw_string': {
|
|
709
|
+
setAttrDFSettings(undefined);
|
|
710
|
+
break;
|
|
711
|
+
}
|
|
712
|
+
default:
|
|
713
|
+
break;
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
const handleOnOkModal = () => {
|
|
717
|
+
if (isActionArchive &&
|
|
718
|
+
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
form.validateFields().then((values) => {
|
|
722
|
+
var _a;
|
|
723
|
+
values = omit(values, 'dfType');
|
|
724
|
+
if (onOk) {
|
|
725
|
+
const type = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE);
|
|
726
|
+
if (type === 'custom') {
|
|
727
|
+
const outputFormat = {};
|
|
728
|
+
const perName = templateName;
|
|
729
|
+
const functionCustom = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.FUNCTION);
|
|
730
|
+
const dataType = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE);
|
|
731
|
+
const displayFormat = form.getFieldValue([
|
|
732
|
+
DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE,
|
|
733
|
+
]);
|
|
734
|
+
if (templateId && !saveAsTemplate) {
|
|
735
|
+
try {
|
|
736
|
+
updateCSFunction({
|
|
737
|
+
url,
|
|
738
|
+
infos,
|
|
739
|
+
templateId,
|
|
740
|
+
name: perName,
|
|
741
|
+
dataType,
|
|
742
|
+
functionCustom,
|
|
743
|
+
dataFormat: attrDFSettings,
|
|
744
|
+
displayFormat,
|
|
745
|
+
outputFormat,
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
catch (error) {
|
|
749
|
+
handleError(error, {
|
|
750
|
+
path: PATH,
|
|
751
|
+
name: 'onClickSaveDynamicContent',
|
|
752
|
+
args: {},
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
else if (saveAsTemplate) {
|
|
757
|
+
try {
|
|
758
|
+
addSavedCSFunction({
|
|
759
|
+
url,
|
|
760
|
+
infos,
|
|
761
|
+
name: perName,
|
|
762
|
+
dataType,
|
|
763
|
+
functionCustom,
|
|
764
|
+
dataFormat: attrDFSettings,
|
|
765
|
+
displayFormat,
|
|
766
|
+
outputFormat,
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
catch (error) {
|
|
770
|
+
handleError(error, {
|
|
771
|
+
path: PATH,
|
|
772
|
+
name: 'onClickSaveDynamicContent',
|
|
773
|
+
args: {},
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
if (!showIndex) {
|
|
778
|
+
values = omit(values, 'index');
|
|
779
|
+
}
|
|
780
|
+
const config = Object.assign({}, attrDFSettings);
|
|
781
|
+
if (dataType === 'datetime') {
|
|
782
|
+
config.dateFormatString = getStringFormatDateDF(attrDFSettings);
|
|
783
|
+
}
|
|
784
|
+
onOk(Object.assign(Object.assign({}, values), { customFunction: {
|
|
785
|
+
outputFormat: {
|
|
786
|
+
type: displayFormat,
|
|
787
|
+
config,
|
|
788
|
+
},
|
|
789
|
+
templateCode: serializeLabelToCode(perName),
|
|
790
|
+
templateName: perName,
|
|
791
|
+
templateType: 'custom',
|
|
792
|
+
customFunction: functionCustom,
|
|
793
|
+
outputDataType: dataType,
|
|
794
|
+
}, attribute: {
|
|
795
|
+
label: perName,
|
|
796
|
+
value: serializeLabelToCode(perName),
|
|
797
|
+
}, mappingFields: `#{custom.${serializeLabelToCode(perName)}}` }));
|
|
798
|
+
}
|
|
799
|
+
else {
|
|
800
|
+
let key = '';
|
|
801
|
+
const otherField = {};
|
|
802
|
+
const selectedAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
803
|
+
if ((selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) === 'number') {
|
|
804
|
+
key = DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_NUMBERIC_ATTR_FORMAT_SETTINGS;
|
|
805
|
+
}
|
|
806
|
+
if ((selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) === 'datetime') {
|
|
807
|
+
key = DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_DATETIME_ATTR_FORMAT_SETTINGS;
|
|
808
|
+
otherField.dateFormatString = getStringFormatDateDF(attrDFSettings);
|
|
809
|
+
}
|
|
810
|
+
if (key && showDisplayFormat) {
|
|
811
|
+
values[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE][key] = Object.assign(Object.assign(Object.assign({}, attrDFSettings), otherField), { type: selectedDFType });
|
|
812
|
+
}
|
|
813
|
+
// Handle Merge tag for event attributes
|
|
814
|
+
if (values.type === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value) {
|
|
815
|
+
if (values.index != null && !get(values, 'attribute.itemTypeName', null)) {
|
|
816
|
+
const itemTypeName = ((_a = listBO === null || listBO === void 0 ? void 0 : listBO.find(({ id }) => get(eventTrackingAttributes, 'mainObjects', []).some(({ itemTypeId }) => itemTypeId === id))) === null || _a === void 0 ? void 0 : _a.name) || null;
|
|
817
|
+
if (itemTypeName) {
|
|
818
|
+
set(values, 'attribute.itemTypeName', itemTypeName);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
// Set itemTypeName if Selecting content source
|
|
823
|
+
if (regexCSType.test(values.type) && !!itemTypeName) {
|
|
824
|
+
set(values, 'attribute.itemTypeName', itemTypeName);
|
|
825
|
+
}
|
|
826
|
+
if (!showIndex) {
|
|
827
|
+
values = omit(values, 'index');
|
|
828
|
+
}
|
|
829
|
+
const mappingFields = buildMappingFields(values);
|
|
830
|
+
onOk(Object.assign(Object.assign({}, values), (mappingFields && { mappingFields })));
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
};
|
|
835
|
+
const handleOnClickParentNode = (item) => {
|
|
836
|
+
if (item.children.length) {
|
|
837
|
+
if (expandedEventAttributes.includes(item.value)) {
|
|
838
|
+
// close expand
|
|
839
|
+
const newExpandedKeys = expandedEventAttributes.filter(key => key !== item.value);
|
|
840
|
+
handleTreeExpand(newExpandedKeys);
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
// open expand
|
|
844
|
+
handleTreeExpand((prev) => [...prev, item.value]);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
const handleTreeExpand = (expandedKeys) => {
|
|
849
|
+
setExpandedEventAttributes(expandedKeys);
|
|
850
|
+
};
|
|
851
|
+
const handleSaveAsTemplate = () => {
|
|
852
|
+
setsaveAsTemplate(!saveAsTemplate);
|
|
853
|
+
};
|
|
854
|
+
const handleFormValuesChanges = (changedValues, _allValues) => {
|
|
855
|
+
var _a;
|
|
856
|
+
const [fieldName, fieldValue] = Object.entries(changedValues)[0];
|
|
857
|
+
switch (fieldName) {
|
|
858
|
+
case DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE:
|
|
859
|
+
resetStateAndFormValueDF();
|
|
860
|
+
switch (true) {
|
|
861
|
+
case fieldValue === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value:
|
|
862
|
+
form.setFieldsValue({
|
|
863
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(listCustomerAttributes)[0],
|
|
864
|
+
});
|
|
865
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorDynamicContentAttr });
|
|
866
|
+
break;
|
|
867
|
+
case fieldValue === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value:
|
|
868
|
+
form.setFieldsValue({
|
|
869
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(listVisitorAttributes)[0],
|
|
870
|
+
});
|
|
871
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorDynamicContentAttr });
|
|
872
|
+
break;
|
|
873
|
+
case fieldValue === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value:
|
|
874
|
+
if (!(listEvents === null || listEvents === void 0 ? void 0 : listEvents.length))
|
|
875
|
+
break;
|
|
876
|
+
form.setFieldsValue({
|
|
877
|
+
[DYNAMIC_CONTENT_SETTING_KEY.EVENT]: listEvents[0].value,
|
|
878
|
+
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: undefined,
|
|
879
|
+
});
|
|
880
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorEventAttr });
|
|
881
|
+
break;
|
|
882
|
+
case fieldValue === CUSTOM_TYPE.value:
|
|
883
|
+
if (!(listEvents === null || listEvents === void 0 ? void 0 : listEvents.length))
|
|
884
|
+
break;
|
|
885
|
+
let formatedDFValue = '';
|
|
886
|
+
let settings = attrDFSettings;
|
|
887
|
+
settings = settings !== null && settings !== void 0 ? settings : initNumberDFSettings;
|
|
888
|
+
formatedDFValue = formatNumberDF(1234.56789, selectedDFType, settings);
|
|
889
|
+
setFormatedAttr(formatedDFValue);
|
|
890
|
+
setAttrDFSettings(settings);
|
|
891
|
+
form.setFieldsValue({
|
|
892
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: optionDataType[0].value,
|
|
893
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: optionDataType[0].value,
|
|
894
|
+
});
|
|
895
|
+
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter(dfType => dfType.dataType === optionDataType[0].value));
|
|
896
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorEventAttr });
|
|
897
|
+
setShowDetailEditDF(true);
|
|
898
|
+
break;
|
|
899
|
+
case fieldValue === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value:
|
|
900
|
+
if (!listPromotionCodeAttributes || !listPromotionPools)
|
|
901
|
+
break;
|
|
902
|
+
form.setFieldsValue({
|
|
903
|
+
[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL]: (_a = listPromotionPools[0]) === null || _a === void 0 ? void 0 : _a.value,
|
|
904
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: getAvailableAttrs(listPromotionCodeAttributes)[0],
|
|
905
|
+
});
|
|
906
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorListPromotionCodeAttr });
|
|
907
|
+
break;
|
|
908
|
+
case regexCSType.test(fieldValue): {
|
|
909
|
+
const { itemTypeId: selectedItemTypeId } = serializeCSSelectedString(String(fieldValue));
|
|
910
|
+
if (isNaN(selectedItemTypeId))
|
|
911
|
+
break;
|
|
912
|
+
setItemTypeId(Number(selectedItemTypeId));
|
|
913
|
+
const key = [QUERY_KEYS.GET_EVENT_ATTRIBUTE_BO, [selectedItemTypeId]];
|
|
914
|
+
const listAttBOByItemTypeId = serilizeBOAttr(queryClientAntsomiUI.getQueryData(key));
|
|
915
|
+
if (listAttBOByItemTypeId.length) {
|
|
916
|
+
form.setFieldsValue({
|
|
917
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: listAttBOByItemTypeId[0],
|
|
918
|
+
[DYNAMIC_CONTENT_SETTING_KEY.INDEX]: defaultDynamicIndex,
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
setHasError({ [DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: isErrorBoAttr });
|
|
922
|
+
break;
|
|
923
|
+
}
|
|
924
|
+
default: {
|
|
925
|
+
break;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
break;
|
|
929
|
+
case DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE:
|
|
930
|
+
let listAttributes = [];
|
|
931
|
+
switch (true) {
|
|
932
|
+
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value:
|
|
933
|
+
if (!listEventAttributes)
|
|
934
|
+
break;
|
|
935
|
+
let newSelectEventAttr = listEventAttributes.find((row) => {
|
|
936
|
+
if (row === null || row === void 0 ? void 0 : row.children.length) {
|
|
937
|
+
return row.children.find((item) => item.value === fieldValue.value);
|
|
938
|
+
}
|
|
939
|
+
return row.value === fieldValue.value;
|
|
940
|
+
});
|
|
941
|
+
if (newSelectEventAttr === null || newSelectEventAttr === void 0 ? void 0 : newSelectEventAttr.children.length) {
|
|
942
|
+
newSelectEventAttr = newSelectEventAttr.children.find((item) => item.value === fieldValue.value);
|
|
943
|
+
}
|
|
944
|
+
listAttributes = flatMapDeep(listEventAttributes, getMembers);
|
|
945
|
+
form.setFieldsValue({ [DYNAMIC_CONTENT_SETTING_KEY.INDEX]: defaultDynamicIndex });
|
|
946
|
+
break;
|
|
947
|
+
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value:
|
|
948
|
+
listAttributes = listCustomerAttributes;
|
|
949
|
+
break;
|
|
950
|
+
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value:
|
|
951
|
+
listAttributes = listPromotionCodeAttributes !== null && listPromotionCodeAttributes !== void 0 ? listPromotionCodeAttributes : [];
|
|
952
|
+
break;
|
|
953
|
+
case selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value:
|
|
954
|
+
listAttributes = listVisitorAttributes;
|
|
955
|
+
break;
|
|
956
|
+
case selectedDynamicContentType && regexCSType.test(selectedDynamicContentType):
|
|
957
|
+
form.setFieldsValue({ [DYNAMIC_CONTENT_SETTING_KEY.INDEX]: defaultDynamicIndex });
|
|
958
|
+
if (!listBoAttributes)
|
|
959
|
+
break;
|
|
960
|
+
listAttributes = listBoAttributes;
|
|
961
|
+
break;
|
|
962
|
+
default: {
|
|
963
|
+
break;
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
// add dataType to
|
|
967
|
+
if (listAttributes.length) {
|
|
968
|
+
const attr = listAttributes.find(attr => {
|
|
969
|
+
if (attr.value === fieldValue.value) {
|
|
970
|
+
return attr;
|
|
971
|
+
}
|
|
972
|
+
return null;
|
|
973
|
+
});
|
|
974
|
+
form.setFieldsValue({
|
|
975
|
+
[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]: attr,
|
|
976
|
+
});
|
|
977
|
+
// set new value for options display format
|
|
978
|
+
if (attr) {
|
|
979
|
+
const newAttrDFOptions = DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === attr.dataType);
|
|
980
|
+
if (newAttrDFOptions.length) {
|
|
981
|
+
form.setFieldsValue({
|
|
982
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: newAttrDFOptions[0].value,
|
|
983
|
+
});
|
|
984
|
+
setAttrDFOptions(newAttrDFOptions);
|
|
985
|
+
}
|
|
986
|
+
// reset detail display format settings
|
|
987
|
+
setAttrDFSettings(undefined);
|
|
988
|
+
setShowDetailEditDF(false);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
break;
|
|
992
|
+
case DYNAMIC_CONTENT_SETTING_KEY.INDEX:
|
|
993
|
+
break;
|
|
994
|
+
case DYNAMIC_CONTENT_SETTING_KEY.FUNCTION:
|
|
995
|
+
form.setFieldsValue({
|
|
996
|
+
[DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: fieldValue,
|
|
997
|
+
});
|
|
998
|
+
break;
|
|
999
|
+
case DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE:
|
|
1000
|
+
form.setFieldsValue({
|
|
1001
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: fieldValue,
|
|
1002
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: fieldValue === 'string' ? 'raw_string' : fieldValue,
|
|
1003
|
+
});
|
|
1004
|
+
let settings = attrDFSettings;
|
|
1005
|
+
// Datatime Attribute DF
|
|
1006
|
+
if (fieldValue === 'datetime') {
|
|
1007
|
+
settings = Object.assign(Object.assign({}, initDatetimeDFSettings), { language });
|
|
1008
|
+
}
|
|
1009
|
+
else if (fieldValue === 'string') {
|
|
1010
|
+
settings = undefined;
|
|
1011
|
+
}
|
|
1012
|
+
setAttrDFOptions(DYNAMIC_CONTENT_ATTR_DF_TYPE.filter((dfType) => dfType.dataType === fieldValue));
|
|
1013
|
+
setAttrDFSettings(settings);
|
|
1014
|
+
break;
|
|
1015
|
+
case DYNAMIC_CONTENT_SETTING_KEY.EVENT:
|
|
1016
|
+
form.setFieldsValue({
|
|
1017
|
+
[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]: undefined,
|
|
1018
|
+
});
|
|
1019
|
+
resetStateAndFormValueDF();
|
|
1020
|
+
break;
|
|
1021
|
+
case DYNAMIC_CONTENT_SETTING_KEY.SOURCE:
|
|
1022
|
+
resetStateAndFormValueDF();
|
|
1023
|
+
break;
|
|
1024
|
+
case DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE:
|
|
1025
|
+
switch (fieldValue) {
|
|
1026
|
+
case 'currency': {
|
|
1027
|
+
setAttrDFSettings(Object.assign(Object.assign({}, initNumberDFSettings), { decimalPlaces: 1 }));
|
|
1028
|
+
break;
|
|
1029
|
+
}
|
|
1030
|
+
case 'number':
|
|
1031
|
+
case 'percentage': {
|
|
1032
|
+
setAttrDFSettings(initNumberDFSettings);
|
|
1033
|
+
break;
|
|
1034
|
+
}
|
|
1035
|
+
case 'datetime': {
|
|
1036
|
+
setAttrDFSettings(Object.assign(Object.assign({}, initDatetimeDFSettings), { language }));
|
|
1037
|
+
break;
|
|
1038
|
+
}
|
|
1039
|
+
case 'raw_string': {
|
|
1040
|
+
setAttrDFSettings(undefined);
|
|
1041
|
+
break;
|
|
1042
|
+
}
|
|
1043
|
+
default: {
|
|
1044
|
+
break;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
break;
|
|
1048
|
+
default: {
|
|
1049
|
+
break;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
//* Render functions
|
|
1054
|
+
const renderBoAttrFields = () => {
|
|
1055
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1056
|
+
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.boAttr)));
|
|
1057
|
+
}
|
|
1058
|
+
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.attribute), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1059
|
+
React.createElement(Select, { loading: isFetchingListBoAttr, style: { height: '28px' }, labelInValue: true, options: buildOptionAttrArchive(listBoAttributes || [], selectedAttr),
|
|
1060
|
+
// errorArchive={errorMessageAttr}
|
|
1061
|
+
disabled: isActionArchive, showSearch: true })));
|
|
1062
|
+
};
|
|
1063
|
+
const renderIndexFields = ({ disabled = false, loading = false }) => {
|
|
1064
|
+
if (!showIndex)
|
|
1065
|
+
return null;
|
|
1066
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1067
|
+
return null;
|
|
1068
|
+
}
|
|
1069
|
+
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.index), name: DYNAMIC_CONTENT_SETTING_KEY.INDEX, required: true },
|
|
1070
|
+
React.createElement(Select, { disabled: disabled, loading: loading, style: { height: '28px' }, options: Array.from({ length: 90 }, (_, i) => ({ value: i + 1, label: i + 1 })), showSearch: true })));
|
|
1071
|
+
};
|
|
1072
|
+
const renderCustomFunctionFields = () => {
|
|
1073
|
+
const dataType = form.getFieldValue([DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]);
|
|
1074
|
+
return (React.createElement(React.Fragment, null,
|
|
1075
|
+
React.createElement(Form.Item, { label: t(translations.dynamicContent.modal.label.personalizationName), name: DYNAMIC_CONTENT_SETTING_KEY.PERNAME, style: { alignItems: 'center' }, required: true },
|
|
1076
|
+
React.createElement(InputSuggestion, { onSelect: handleSelect, placeholder: "Custom function name...", options: searchValue.length > 0 ? listCustomTemplatesSearch : listCustomTemplates, onChange: onChangeDataInput, value: templateName }),
|
|
1077
|
+
hasError[DYNAMIC_CONTENT_SETTING_KEY.PERNAME] && (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.perName)))),
|
|
1078
|
+
React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.function), name: DYNAMIC_CONTENT_SETTING_KEY.FUNCTION, required: true },
|
|
1079
|
+
React.createElement(EditorScript, { mode: "javascript", hideExpand: true })),
|
|
1080
|
+
React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.ouputDataType), name: DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE, required: true },
|
|
1081
|
+
React.createElement(Select, { style: { height: 28 }, options: optionDataType })),
|
|
1082
|
+
React.createElement(Form.Item, { style: { alignItems: 'start' }, required: true, label: t(translations.dynamicContent.modal.label.ouputFormat), name: DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE, extra: React.createElement("div", { style: {
|
|
1083
|
+
display: 'flex',
|
|
1084
|
+
flexWrap: 'wrap',
|
|
1085
|
+
alignItems: 'center',
|
|
1086
|
+
gap: '8px',
|
|
1087
|
+
marginTop: '16px',
|
|
1088
|
+
} },
|
|
1089
|
+
dataType !== 'raw_string' ? (React.createElement(Text, { color: "#555", dangerouslySetInnerHTML: {
|
|
1090
|
+
__html: `${t(translations.dynamicContent.modal.label.displayFormat)}: <bdo dir='ltr'>${formatedAttr}</bdo>`,
|
|
1091
|
+
} })) : null,
|
|
1092
|
+
!showDetailEditDF && (React.createElement(Button, { disabled: isActionArchive &&
|
|
1093
|
+
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, type: "text", style: { display: 'inline-block' }, onClick: () => setShowDetailEditDF(prevShow => !prevShow) }, t(translations.edit.title)))) },
|
|
1094
|
+
React.createElement(Select, { disabled: isActionArchive &&
|
|
1095
|
+
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, style: { height: 28 }, options: attrDFOptions }))));
|
|
1096
|
+
};
|
|
1097
|
+
const renderCustomerAttrFields = () => {
|
|
1098
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1099
|
+
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.customerAttr)));
|
|
1100
|
+
}
|
|
1101
|
+
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, initialValue: listCustomerAttributes[0], label: t(translations.dynamicContent.modal.label.attribute), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1102
|
+
React.createElement(Select, { loading: isFetchingDynamicContentAttr, style: { height: 28 }, labelInValue: true,
|
|
1103
|
+
// errorArchive={errorMessageAttr}
|
|
1104
|
+
disabled: isActionArchive, options: buildOptionAttrArchive(listCustomerAttributes, selectedAttr), showSearch: true })));
|
|
1105
|
+
};
|
|
1106
|
+
const renderEventAttrFields = () => {
|
|
1107
|
+
var _a;
|
|
1108
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1109
|
+
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.eventAttr)));
|
|
1110
|
+
}
|
|
1111
|
+
return (React.createElement(React.Fragment, null,
|
|
1112
|
+
React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.selectEventAttr), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1113
|
+
React.createElement(TreeSelect, { loading: isFetchingEventAttr || !(listEvents === null || listEvents === void 0 ? void 0 : listEvents.length), style: { height: 28 }, labelInValue: true, showSearch: true }, listEventAttributes &&
|
|
1114
|
+
listEventAttributes.map((attr) => {
|
|
1115
|
+
var _a, _b, _c;
|
|
1116
|
+
return (React.createElement(TreeNode, { key: attr.value, value: attr.value, selectable: !((_a = attr === null || attr === void 0 ? void 0 : attr.children) === null || _a === void 0 ? void 0 : _a.length), title: ((_b = attr.children) === null || _b === void 0 ? void 0 : _b.length) ? (React.createElement("div", { onClick: () => handleOnClickParentNode(attr) }, attr.label)) : (attr.label) }, (_c = buildOptionAttrArchive(attr === null || attr === void 0 ? void 0 : attr.children, selectedAttr)) === null || _c === void 0 ? void 0 : _c.map((item) => (React.createElement(TreeNode, { key: item.value, value: item.value, title: item.label })))));
|
|
1117
|
+
}))),
|
|
1118
|
+
form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE) &&
|
|
1119
|
+
((_a = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE)) === null || _a === void 0 ? void 0 : _a.status) !== 1 && (React.createElement(Text, { type: "warning" }, t(translations.dynamicContent.modal.message.selectDisableEventAttr)))));
|
|
1120
|
+
};
|
|
1121
|
+
const renderEventFields = () => {
|
|
1122
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.EVENT]) {
|
|
1123
|
+
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.eventBySource)));
|
|
1124
|
+
}
|
|
1125
|
+
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.selectEvent), name: DYNAMIC_CONTENT_SETTING_KEY.EVENT, required: true, preserve: false },
|
|
1126
|
+
React.createElement(Select, { disabled: !!(triggerEvent === null || triggerEvent === void 0 ? void 0 : triggerEvent.eventActionId) && !!(triggerEvent === null || triggerEvent === void 0 ? void 0 : triggerEvent.eventCategoryId), loading: isFetchingEventBySource, style: { height: 28 }, options: listEvents, showSearch: true })));
|
|
1127
|
+
};
|
|
1128
|
+
const renderSourceFields = () => {
|
|
1129
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.SOURCE]) {
|
|
1130
|
+
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.source)));
|
|
1131
|
+
}
|
|
1132
|
+
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.selectSource), name: DYNAMIC_CONTENT_SETTING_KEY.SOURCE, required: true },
|
|
1133
|
+
React.createElement(Select, { disabled: !isEmpty(triggerEvent === null || triggerEvent === void 0 ? void 0 : triggerEvent.insightPropertyIds), mode: "multiple", loading: isFetchingSourceBO, options: listSources, showSearch: true })));
|
|
1134
|
+
};
|
|
1135
|
+
const renderPromotionCodeAttr = () => {
|
|
1136
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1137
|
+
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.promotionCodeAttr)));
|
|
1138
|
+
}
|
|
1139
|
+
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.promotionCodeAttr), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1140
|
+
React.createElement(Select, { loading: isFetchingPromotionCodeAttr, style: { height: 28 }, labelInValue: true, options: buildOptionAttrArchive(listPromotionCodeAttributes || [], selectedAttr), showSearch: true,
|
|
1141
|
+
// errorArchive={errorMessageAttr}
|
|
1142
|
+
disabled: isActionArchive })));
|
|
1143
|
+
};
|
|
1144
|
+
const renderPromotionPoolFields = () => {
|
|
1145
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL]) {
|
|
1146
|
+
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.promotionPools)));
|
|
1147
|
+
}
|
|
1148
|
+
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.promotionPools), name: DYNAMIC_CONTENT_SETTING_KEY.PROMOTION_POOL, required: true },
|
|
1149
|
+
React.createElement(Select, { loading: isFetchingPromotionPool, style: { height: 28 }, options: listPromotionPools, showSearch: true })));
|
|
1150
|
+
};
|
|
1151
|
+
const renderVisitorAttrFields = () => {
|
|
1152
|
+
if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
|
|
1153
|
+
return (React.createElement(Text, { type: "error" }, t(translations.dynamicContent.modal.error.visitorAttr)));
|
|
1154
|
+
}
|
|
1155
|
+
return (React.createElement(Form.Item, { style: { alignItems: 'center' }, initialValue: listVisitorAttributes[0], label: t(translations.dynamicContent.modal.label.attribute), name: DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE, required: true },
|
|
1156
|
+
React.createElement(Select, { loading: isFetchingDynamicContentAttr, style: { height: 28 }, labelInValue: true, options: buildOptionAttrArchive(listVisitorAttributes, selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.value), showSearch: true,
|
|
1157
|
+
// errorArchive={errorMessageAttr}
|
|
1158
|
+
disabled: isActionArchive })));
|
|
1159
|
+
};
|
|
1160
|
+
const renderDisplayFormat = () => {
|
|
1161
|
+
const selectedAttr = form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE);
|
|
1162
|
+
if (formSubmitDisabled ||
|
|
1163
|
+
!attrDFSettings ||
|
|
1164
|
+
isEmpty(attrDFSettings) ||
|
|
1165
|
+
!(selectedAttr === null || selectedAttr === void 0 ? void 0 : selectedAttr.dataType) ||
|
|
1166
|
+
!attrDFOptions.length)
|
|
1167
|
+
return null;
|
|
1168
|
+
if (selectedAttr.dataType === 'number' || selectedAttr.dataType === 'datetime')
|
|
1169
|
+
return (React.createElement(Form.Item, { initialValue: attrDFOptions[0].value, style: { alignItems: 'start' }, label: t(translations.dynamicContent.modal.label.displayFormat), name: DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE, extra: React.createElement("div", { style: {
|
|
1170
|
+
display: 'flex',
|
|
1171
|
+
flexWrap: 'wrap',
|
|
1172
|
+
alignItems: 'center',
|
|
1173
|
+
gap: '8px',
|
|
1174
|
+
marginTop: '16px',
|
|
1175
|
+
} },
|
|
1176
|
+
React.createElement(Text, { color: "#555", dangerouslySetInnerHTML: {
|
|
1177
|
+
__html: `${t(translations.dynamicContent.modal.label.displayFormat)}: <bdo dir='ltr'>${formatedAttr}</bdo>`,
|
|
1178
|
+
} }),
|
|
1179
|
+
!showDetailEditDF && (React.createElement(Button, { disabled: isActionArchive &&
|
|
1180
|
+
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, type: "text", style: { display: 'inline-block' }, onClick: () => setShowDetailEditDF(prevShow => !prevShow) }, t(translations.edit.title)))) },
|
|
1181
|
+
React.createElement(Select, { disabled: isActionArchive &&
|
|
1182
|
+
selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, style: { height: 28 }, options: attrDFOptions })));
|
|
1183
|
+
return null;
|
|
1184
|
+
};
|
|
1185
|
+
const renderDetailDFSettings = () => {
|
|
1186
|
+
if (showDetailEditDF && selectedDFType && attrDFSettings)
|
|
1187
|
+
return (React.createElement("div", { style: {
|
|
1188
|
+
border: '1px solid #9e9e9e',
|
|
1189
|
+
borderRadius: '2px',
|
|
1190
|
+
padding: '8px',
|
|
1191
|
+
marginTop: '8px',
|
|
1192
|
+
display: 'flex',
|
|
1193
|
+
flexDirection: 'column',
|
|
1194
|
+
gap: '8px',
|
|
1195
|
+
} },
|
|
1196
|
+
React.createElement(DisplayFormat, { infos: infos, url: url, displayFormatType: selectedDFType, formatSettings: attrDFSettings, onSettingsChange: (values) => setAttrDFSettings(values), dynamicContentType: form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE) })));
|
|
1197
|
+
};
|
|
1198
|
+
return (React.createElement(ModalCustom, { closable: false, destroyOnClose: true, forceRender: true, mask: true, okButtonProps: { disabled: formSubmitDisabled }, title: modalTitle || t(translations.dynamicContent.modal.title.addDynamicContent), visible: visible, onCancel: handleOnCancelModal, onOk: handleOnOkModal },
|
|
1199
|
+
React.createElement(Spin, { spinning: isFetchingSourceBO ||
|
|
1200
|
+
isFetchingListBoAttr ||
|
|
1201
|
+
isFetchingEventAttr ||
|
|
1202
|
+
isFetchingPromotionPool ||
|
|
1203
|
+
isFetchingPromotionCodeAttr ||
|
|
1204
|
+
isFetchingDynamicContentAttr },
|
|
1205
|
+
React.createElement(Form, { style: { width: '100%' }, form: form, labelAlign: "left", labelCol: { span: 9 }, wrapperCol: { span: 15 }, onValuesChange: handleFormValuesChanges, initialValues: {
|
|
1206
|
+
[DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE]: listDynamicContentTypes[0].value,
|
|
1207
|
+
} },
|
|
1208
|
+
React.createElement(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.contentSource), name: DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE, required: true },
|
|
1209
|
+
React.createElement(Select, { style: { height: 28 }, options: listDynamicContentTypes })),
|
|
1210
|
+
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value && (React.createElement(React.Fragment, null, renderVisitorAttrFields())),
|
|
1211
|
+
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value && (React.createElement(React.Fragment, null, renderCustomerAttrFields())),
|
|
1212
|
+
selectedDynamicContentType === CUSTOM_TYPE.value && React.createElement(React.Fragment, null, renderCustomFunctionFields()),
|
|
1213
|
+
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value && (React.createElement(React.Fragment, null,
|
|
1214
|
+
renderEventFields(),
|
|
1215
|
+
renderSourceFields(),
|
|
1216
|
+
renderEventAttrFields(),
|
|
1217
|
+
isShowEventIndexField
|
|
1218
|
+
? renderIndexFields({ disabled: false, loading: false })
|
|
1219
|
+
: null)),
|
|
1220
|
+
selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value && (React.createElement(React.Fragment, null,
|
|
1221
|
+
renderPromotionPoolFields(),
|
|
1222
|
+
renderPromotionCodeAttr())),
|
|
1223
|
+
selectedDynamicContentType && regexCSType.test(selectedDynamicContentType) && (React.createElement(React.Fragment, null,
|
|
1224
|
+
renderBoAttrFields(),
|
|
1225
|
+
renderIndexFields({ disabled: isActionArchive, loading: isFetchingListBoAttr }))),
|
|
1226
|
+
showDisplayFormat && renderDisplayFormat()),
|
|
1227
|
+
showDisplayFormat && renderDisplayFormat() !== null && renderDetailDFSettings(),
|
|
1228
|
+
isShowCustomFunction && selectedDynamicContentType === CUSTOM_TYPE.value && (React.createElement("div", { style: {
|
|
1229
|
+
display: 'flex',
|
|
1230
|
+
alignItems: 'center',
|
|
1231
|
+
justifyContent: 'start',
|
|
1232
|
+
marginBottom: '8px',
|
|
1233
|
+
marginTop: '10px',
|
|
1234
|
+
} },
|
|
1235
|
+
React.createElement(Checkbox, { onChange: handleSaveAsTemplate, checked: saveAsTemplate },
|
|
1236
|
+
React.createElement("span", { style: { fontSize: '12px' } }, t(translations.dynamicContent.modal.label.saveTemplate))))))));
|
|
1237
|
+
};
|
|
1238
|
+
AddDynamicContent.defaultProps = {
|
|
1239
|
+
showDisplayFormat: true,
|
|
1240
|
+
showIndex: true,
|
|
1241
|
+
APIConfig: {
|
|
1242
|
+
domain: 'https://sandbox-media-template.antsomi.com',
|
|
1243
|
+
slug: '/api/v1',
|
|
1244
|
+
token: '',
|
|
1245
|
+
userId: '',
|
|
1246
|
+
accountId: '',
|
|
1247
|
+
},
|
|
1248
|
+
};
|