@plone/volto 16.0.0-alpha.43 → 16.0.0-alpha.45
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/CHANGELOG.md +29 -0
- package/README.md +10 -1
- package/cache/razzle-babel-loader/063039a6cbf552530015f71759b7d6a7.json +1 -0
- package/cache/razzle-babel-loader/06717bc54bc7e4f58c260f52b851d841.json +1 -0
- package/cache/razzle-babel-loader/08651da3c2473d5a1024244c47839916.json +1 -0
- package/cache/razzle-babel-loader/096edfa420194dabb725dde10453b72c.json +1 -0
- package/cache/razzle-babel-loader/0a28dc2beb935be7ff7532fc8d57cf49.json +1 -0
- package/cache/razzle-babel-loader/0a4dfa3e73c0dc745176d61fcc4b1f92.json +1 -0
- package/cache/razzle-babel-loader/0c9c6d49e980615a9b6caae5b5143f4e.json +1 -0
- package/cache/razzle-babel-loader/0ca24db683f4feb2a22452fa005ab7de.json +1 -0
- package/cache/razzle-babel-loader/0d406f7fd97b4f20bc7da64abee0d9cd.json +1 -0
- package/cache/razzle-babel-loader/152c64bdaba005212c6f8ea0de57f043.json +1 -0
- package/cache/razzle-babel-loader/16a0bef6c85a5727dcf88feb0c618af7.json +1 -0
- package/cache/razzle-babel-loader/1c9819023df74db86c6c33e927d83c2b.json +1 -0
- package/cache/razzle-babel-loader/1ce52f0281721318293e87bf72c76e1e.json +1 -0
- package/cache/razzle-babel-loader/1da84da445a330af550e03812e1f5fb8.json +1 -0
- package/cache/razzle-babel-loader/1e51666c784302f8acce2b72f11e58c4.json +1 -0
- package/cache/razzle-babel-loader/1eb70638593cdad4949199ea2b3f5b4b.json +1 -0
- package/cache/razzle-babel-loader/1f160853e4e81ea9851581f7e5e7d7c9.json +1 -0
- package/cache/razzle-babel-loader/20879cda6fa48f4c81a85c47b12be8eb.json +1 -0
- package/cache/razzle-babel-loader/2114efde960d268fc74b417067254345.json +1 -0
- package/cache/razzle-babel-loader/237e8c60e9bf2b6b61c9b6c8c08c77a3.json +1 -0
- package/cache/razzle-babel-loader/2428fe55b88416b47559f1743e7a6a7f.json +1 -0
- package/cache/razzle-babel-loader/265d1454606187355996717f0ed3d5fa.json +1 -0
- package/cache/razzle-babel-loader/275fbbb69f75d083c7973821c1af609a.json +1 -0
- package/cache/razzle-babel-loader/27dcd8363d85a7c48ac3cbd784489411.json +1 -0
- package/cache/razzle-babel-loader/28fe67011d4658643b21e4bd850cf583.json +1 -0
- package/cache/razzle-babel-loader/2961a768d1f193bbf92a0c9def600c4d.json +1 -0
- package/cache/razzle-babel-loader/29c0fb6d5e5ba03969a05b19fb764550.json +1 -0
- package/cache/razzle-babel-loader/2a3855d1778d3bda1ffbea7a39cd7b69.json +1 -0
- package/cache/razzle-babel-loader/2c341e6ee783afb9fb45a29b70a54712.json +1 -0
- package/cache/razzle-babel-loader/2dc12e6159d60b534434295f32fe4f86.json +1 -0
- package/cache/razzle-babel-loader/2f133aa279e961477e4270ef09e154cf.json +1 -0
- package/cache/razzle-babel-loader/2fd9d07983bd2ebbadd2c9cefd084328.json +1 -0
- package/cache/razzle-babel-loader/316e20552df5e576ee92a021f4fb0836.json +1 -0
- package/cache/razzle-babel-loader/331498dabfa6254b4c3a5e7b373eec0f.json +1 -0
- package/cache/razzle-babel-loader/34dbc1b1793c6c47cf54fa4aa974e2b9.json +1 -0
- package/cache/razzle-babel-loader/3585980fb2aea00083c146be96effdb7.json +1 -0
- package/cache/razzle-babel-loader/36eef02d36549d328762794daf368111.json +1 -0
- package/cache/razzle-babel-loader/390301e2b30fc817db00618e27a68e7f.json +1 -0
- package/cache/razzle-babel-loader/3c0b117f54d3607d903e8dcf71cd0610.json +1 -0
- package/cache/razzle-babel-loader/3cef7af3cbca7b5a73cf488ddd27874c.json +1 -0
- package/cache/razzle-babel-loader/3d5aa99eff60a438c5e0a28c27f98367.json +1 -0
- package/cache/razzle-babel-loader/3eaf4f50d49dd1abd7114a691a0d363c.json +1 -0
- package/cache/razzle-babel-loader/3ffb62dc6a16b5323e4bf18e4d911cfd.json +1 -0
- package/cache/razzle-babel-loader/403a6ea5d48ae6eddc23734800d06efe.json +1 -0
- package/cache/razzle-babel-loader/40591e708211fcbc5392cc97bde0f72f.json +1 -0
- package/cache/razzle-babel-loader/40f93f6610b6dd0f490d959558ff3f4c.json +1 -0
- package/cache/razzle-babel-loader/41013af09cccf882fcc2c9026c5f43a3.json +1 -0
- package/cache/razzle-babel-loader/4430513dad56dc8aa0f9e49d89301ac6.json +1 -0
- package/cache/razzle-babel-loader/44692f2ebd1c8d4cc8bb6f385713d6a3.json +1 -0
- package/cache/razzle-babel-loader/44f5a94031adaba45630dfd332a8d02d.json +1 -0
- package/cache/razzle-babel-loader/48277431c201f8031ab4e354abebae7f.json +1 -0
- package/cache/razzle-babel-loader/4933f2182a0031d2e363bfe6e4ed891f.json +1 -0
- package/cache/razzle-babel-loader/4b6cb41ede01bb197ebb65e1b31e022d.json +1 -0
- package/cache/razzle-babel-loader/4b869539c192c05732b0c0c577e57761.json +1 -0
- package/cache/razzle-babel-loader/4c5931371175fb7f0eed8d502030c15d.json +1 -0
- package/cache/razzle-babel-loader/5157a7ec128f2ec7b36f70d11fbae934.json +1 -0
- package/cache/razzle-babel-loader/51a3947e6fb2f7ee2a1c0a9f07746299.json +1 -0
- package/cache/razzle-babel-loader/52093c858da623813aeb7331e96c9de1.json +1 -0
- package/cache/razzle-babel-loader/5231eaafcfc4b64fa482e0d9f1a637ac.json +1 -0
- package/cache/razzle-babel-loader/52506bc83b4c459527b580a6452ca396.json +1 -0
- package/cache/razzle-babel-loader/52edd80ee140b2726ee357447e91b519.json +1 -0
- package/cache/razzle-babel-loader/542e5ecd7b9921a02387ef37b844ca79.json +1 -0
- package/cache/razzle-babel-loader/54fb0c68bf63300ba8d4368705b60cee.json +1 -0
- package/cache/razzle-babel-loader/560a7f8d3caf1f75bbc565ad8bcdfea0.json +1 -0
- package/cache/razzle-babel-loader/564e186b878bd81e74dd12202aef76b8.json +1 -0
- package/cache/razzle-babel-loader/5736d0f63b83ccc6fef7a6af1aaeb94a.json +1 -0
- package/cache/razzle-babel-loader/574b724917ec7ca48bb6bbb1f6f13701.json +1 -0
- package/cache/razzle-babel-loader/594b66f84693e65556ead0970f0f9433.json +1 -0
- package/cache/razzle-babel-loader/5aaeed79c7e8ed33aed92b96f05c5d7c.json +1 -0
- package/cache/razzle-babel-loader/5b1f7532cf1790d011c2516d00070120.json +1 -0
- package/cache/razzle-babel-loader/5be44472526e16ff86ccbe4d764b1855.json +1 -0
- package/cache/razzle-babel-loader/5d88cd9090104a14280979c8f9676b0d.json +1 -0
- package/cache/razzle-babel-loader/5f0458f770f6ae9008fd9bc1a9f5ecb1.json +1 -0
- package/cache/razzle-babel-loader/5fa52c25676a5a49f7eb28f4941d6c34.json +1 -0
- package/cache/razzle-babel-loader/5fc6178a5893f6d61126b1968e1cbb1d.json +1 -0
- package/cache/razzle-babel-loader/62482a8c1e6e230c138a36062d7ee627.json +1 -0
- package/cache/razzle-babel-loader/6408d577be75c328333faa38412e05ee.json +1 -0
- package/cache/razzle-babel-loader/6850ab2199903b4365702c82b162ed56.json +1 -0
- package/cache/razzle-babel-loader/693aa7af63777a5f8fb011e503966cd8.json +1 -0
- package/cache/razzle-babel-loader/69421f7e2a6fdd373b18f4c66330ea12.json +1 -0
- package/cache/razzle-babel-loader/6a6476169cede8b79168048628e8f07e.json +1 -0
- package/cache/razzle-babel-loader/6aa2f7b9c6c9997febbe0f7b41d15ccf.json +1 -0
- package/cache/razzle-babel-loader/6c6341a47af56ee190ef1f05fe2d4c2e.json +1 -0
- package/cache/razzle-babel-loader/6dce45e59404be93542399eba4a5d8de.json +1 -0
- package/cache/razzle-babel-loader/6dd55e854e438b0cd52a2a8386db63c0.json +1 -0
- package/cache/razzle-babel-loader/6ed772c2046641fd298c2f2d84d57eb1.json +1 -0
- package/cache/razzle-babel-loader/6fb6c7defd5b2c3d7924bc584c5f606a.json +1 -0
- package/cache/razzle-babel-loader/6ff52f6ef9737a101da5d34876e580c2.json +1 -0
- package/cache/razzle-babel-loader/727acc431250db5634192885027cbf99.json +1 -0
- package/cache/razzle-babel-loader/72a3189a338a7bdb48e0d2a999ecc0a4.json +1 -0
- package/cache/razzle-babel-loader/72b46a9c734cc0fc970599e67fc506d2.json +1 -0
- package/cache/razzle-babel-loader/738f72a988a33d8baa893d3f73933730.json +1 -0
- package/cache/razzle-babel-loader/7a3b30be31fe9da708e45cc536aaa132.json +1 -0
- package/cache/razzle-babel-loader/7b73c88b92cef72432a2c8f4dac9b9c2.json +1 -0
- package/cache/razzle-babel-loader/7c08d50adc66689fb676f1ca53b47719.json +1 -0
- package/cache/razzle-babel-loader/7dca0adccf8c3897c0b6f5c8d7aaf7b1.json +1 -0
- package/cache/razzle-babel-loader/7de8721374456d7b17eb9009c47a0569.json +1 -0
- package/cache/razzle-babel-loader/7df914f873913202e7fd513123ad840a.json +1 -0
- package/cache/razzle-babel-loader/80e70d8f0ed5c4c16177f49e3b4285f6.json +1 -0
- package/cache/razzle-babel-loader/8165c9acc618fa947910e4a5521ce179.json +1 -0
- package/cache/razzle-babel-loader/849a53fb4e53acba29fe5e547823a57d.json +1 -0
- package/cache/razzle-babel-loader/84eca0a0da8ccf6a508069231c18aa8d.json +1 -0
- package/cache/razzle-babel-loader/8568a18452b26e39d6be387c19b71054.json +1 -0
- package/cache/razzle-babel-loader/85ab45d18a353985d77cd71fd39a9a31.json +1 -0
- package/cache/razzle-babel-loader/85e3e1b925c4de7deba450a81b471474.json +1 -0
- package/cache/razzle-babel-loader/871066daabdde05941122d9f27595f30.json +1 -0
- package/cache/razzle-babel-loader/88ba945aa5f976f7af63b158818f8228.json +1 -0
- package/cache/razzle-babel-loader/88ce318021bfdec0624388b33a2bc736.json +1 -0
- package/cache/razzle-babel-loader/89d3c48448b3b8025a5ae08e250c7a77.json +1 -0
- package/cache/razzle-babel-loader/8a0af838d5d251a96098bab94335d343.json +1 -0
- package/cache/razzle-babel-loader/8e14fa0372c0b095fe2ace45b1533451.json +1 -0
- package/cache/razzle-babel-loader/8fd102bb6b30d88172b9459f7c12a46d.json +1 -0
- package/cache/razzle-babel-loader/9002759341e01b889736b2f72f49923c.json +1 -0
- package/cache/razzle-babel-loader/91cf921790509699da86c9c5612af932.json +1 -0
- package/cache/razzle-babel-loader/9236725de5cb008c45c5cdd59cf320fe.json +1 -0
- package/cache/razzle-babel-loader/923a9d85e08bca66ee1ad78d7fe1297a.json +1 -0
- package/cache/razzle-babel-loader/92f4c6a67e320ae18b4b6c4aeef87428.json +1 -0
- package/cache/razzle-babel-loader/9344a1f402cc627be9c42e6319bb0bd4.json +1 -0
- package/cache/razzle-babel-loader/942aa4123c4d3c8c5eefd85b8c3e8129.json +1 -0
- package/cache/razzle-babel-loader/94f0f50afeb161d9008857ad7925720c.json +1 -0
- package/cache/razzle-babel-loader/9758e7cdcf9b2f32d2b27dcb5c821c5b.json +1 -0
- package/cache/razzle-babel-loader/97da1f0e2f7b549f56b957da8cf935d9.json +1 -0
- package/cache/razzle-babel-loader/97ef4c34583c8b5ab5cafc25981cf04c.json +1 -0
- package/cache/razzle-babel-loader/982a57957287eff9e34ac451053a65b9.json +1 -0
- package/cache/razzle-babel-loader/98a3f95f96eb40429808a77bda3c09eb.json +1 -0
- package/cache/razzle-babel-loader/99898797313556845e4dd9f594eafdce.json +1 -0
- package/cache/razzle-babel-loader/99f28bed9120570ca87f3fea34a2b40b.json +1 -0
- package/cache/razzle-babel-loader/9a52164e2bfddc81ec9712fc713277f9.json +1 -0
- package/cache/razzle-babel-loader/9b0a7890f75bb3aceedcea078a11e813.json +1 -0
- package/cache/razzle-babel-loader/9b8cd6a631680f64ee0f1c0978e68e13.json +1 -0
- package/cache/razzle-babel-loader/9d1b107e1b597231611b34321983441f.json +1 -0
- package/cache/razzle-babel-loader/a15fd98325fd36a47641a8c40743806b.json +1 -0
- package/cache/razzle-babel-loader/a39767c563a72b10c976a5bde4f5441f.json +1 -0
- package/cache/razzle-babel-loader/a598840a9eb4eba269dfa78d0e2c63c5.json +1 -0
- package/cache/razzle-babel-loader/a599dac01482435967c69ed2f013c49b.json +1 -0
- package/cache/razzle-babel-loader/a685486d35b5f43ea503e8c0c121e860.json +1 -0
- package/cache/razzle-babel-loader/a698e5d719d83cb11f61b9f0b7a88025.json +1 -0
- package/cache/razzle-babel-loader/a8314a8f68c096b75236f1157fb0bc0e.json +1 -0
- package/cache/razzle-babel-loader/a94177b7d11c25bf29c3afb21af4f64d.json +1 -0
- package/cache/razzle-babel-loader/a997bc3606e5ce3c6482b58fed663b81.json +1 -0
- package/cache/razzle-babel-loader/a9cffaf94d8b071af343fb5d8f9f2172.json +1 -0
- package/cache/razzle-babel-loader/a9e0769846bf72deda5b6356dd414663.json +1 -0
- package/cache/razzle-babel-loader/aa22cf6f917ba572eeb5d2a6512428f2.json +1 -0
- package/cache/razzle-babel-loader/aa4b8a733887b8bee5d96986a6378971.json +1 -0
- package/cache/razzle-babel-loader/b15c94c41265975c633c8c288ec27413.json +1 -0
- package/cache/razzle-babel-loader/b37abb9f47e0a1fb979b0289d354e34b.json +1 -0
- package/cache/razzle-babel-loader/b721c5024df32fed2c647df8e83bb646.json +1 -0
- package/cache/razzle-babel-loader/b99747320dc9381a063d8328cd11ca18.json +1 -0
- package/cache/razzle-babel-loader/bc33a93fef20765ccf60858808a0203f.json +1 -0
- package/cache/razzle-babel-loader/bc3ca56dc8a5d31a779f17669cd36619.json +1 -0
- package/cache/razzle-babel-loader/bf4e69825b0727ea011828f1f7c5d95c.json +1 -0
- package/cache/razzle-babel-loader/bf5c62da9f608863d78805e99c0431b0.json +1 -0
- package/cache/razzle-babel-loader/bf6bc0d370967757a0cc673891301381.json +1 -0
- package/cache/razzle-babel-loader/c190a9f0b15e56dcb526b4862aaace8d.json +1 -0
- package/cache/razzle-babel-loader/c224563bc57182411dacd847e57e6959.json +1 -0
- package/cache/razzle-babel-loader/c22c4e48417c7ebf63b1e1ef90bcac33.json +1 -0
- package/cache/razzle-babel-loader/c3bd7ab4efe1da3343eb184796abf33b.json +1 -0
- package/cache/razzle-babel-loader/c5151b5c30df83b675c2f7bb8b217438.json +1 -0
- package/cache/razzle-babel-loader/c738561617baee4d81736f20bd369056.json +1 -0
- package/cache/razzle-babel-loader/c76399f88029887d510e306aeb10c073.json +1 -0
- package/cache/razzle-babel-loader/c7b358bf32bb66ac83eedb339fa1fc80.json +1 -0
- package/cache/razzle-babel-loader/c926df633a9e11084c8f6b12078b0663.json +1 -0
- package/cache/razzle-babel-loader/cabdc1b4454cca955517adb90a7500a9.json +1 -0
- package/cache/razzle-babel-loader/cbfd50c85f66ae7037d070a8755f5035.json +1 -0
- package/cache/razzle-babel-loader/cdc6658ddbaf76bf5e404f2149b5cb23.json +1 -0
- package/cache/razzle-babel-loader/d05218a68a49be07777ab12d660e5344.json +1 -0
- package/cache/razzle-babel-loader/d31e305eb6025af9f7b4425eba2d4bfb.json +1 -0
- package/cache/razzle-babel-loader/d4524071cd0bda816641372085282caa.json +1 -0
- package/cache/razzle-babel-loader/d7885e614398199694f09953ce0ae525.json +1 -0
- package/cache/razzle-babel-loader/d7edfff9e8c3b36ccc07766312cfa59f.json +1 -0
- package/cache/razzle-babel-loader/d8971574d6411d97373976015b6163e4.json +1 -0
- package/cache/razzle-babel-loader/d8a54b9dc44072b6ca7cb7739283e7cb.json +1 -0
- package/cache/razzle-babel-loader/d90920545d59eff4059b55ff58c4fec9.json +1 -0
- package/cache/razzle-babel-loader/da222637f56056dd79a44725c81c7dca.json +1 -0
- package/cache/razzle-babel-loader/da5143e1dbfb094c7b63b43ffe57d00d.json +1 -0
- package/cache/razzle-babel-loader/daf5b795941f6cfa24eddb8014aa8957.json +1 -0
- package/cache/razzle-babel-loader/db544549edd8e873875c97722650ed9e.json +1 -0
- package/cache/razzle-babel-loader/dc729548987fae5ca4ad6b80b50db68f.json +1 -0
- package/cache/razzle-babel-loader/de102611b73463cd0079d6c82f6e86b0.json +1 -0
- package/cache/razzle-babel-loader/de55f9b6e20cc97be595b36f2dc8e67d.json +1 -0
- package/cache/razzle-babel-loader/e00d07c615daac786d4615eb520e6c83.json +1 -0
- package/cache/razzle-babel-loader/e292b7b1cc12a281bd499861c937e9c0.json +1 -0
- package/cache/razzle-babel-loader/e295f54d21c6e4462175b3f4f4dc7e6f.json +1 -0
- package/cache/razzle-babel-loader/e31017d266c2dd672cc9652b479205e9.json +1 -0
- package/cache/razzle-babel-loader/e314662fbd080476ba9b44bc30e43417.json +1 -0
- package/cache/razzle-babel-loader/e75760717b3bc4bd23f63d5dcc10c0d9.json +1 -0
- package/cache/razzle-babel-loader/e7855cafa620c2d3de40c7d243c779bb.json +1 -0
- package/cache/razzle-babel-loader/e7f0c53cecb5f8256573be9fce7695d4.json +1 -0
- package/cache/razzle-babel-loader/e9ad5ba7273e883ae32ee4ec83da658d.json +1 -0
- package/cache/razzle-babel-loader/e9d0d50b7b8bd987de33c605478bb96d.json +1 -0
- package/cache/razzle-babel-loader/ea099182241bb18d5fe984eed725a89b.json +1 -0
- package/cache/razzle-babel-loader/eaf1b1c2f7837eb75fc38500d7b0fc43.json +1 -0
- package/cache/razzle-babel-loader/eb233d90eaa4740fb39492b54ce8a9d4.json +1 -0
- package/cache/razzle-babel-loader/ed01b34b914bc35f56b92e6ffba3bd9a.json +1 -0
- package/cache/razzle-babel-loader/ed392e47047f22459b0e402befb38106.json +1 -0
- package/cache/razzle-babel-loader/ed72f9e9c1341722f499532c7374a7e6.json +1 -0
- package/cache/razzle-babel-loader/ee8e81cf7e76c5028c0a78f4c26219a6.json +1 -0
- package/cache/razzle-babel-loader/ef5d74089030a71f8e38cb3cf2f64fa6.json +1 -0
- package/cache/razzle-babel-loader/f5647ec00725fd13d9de5db37ff133d3.json +1 -0
- package/cache/razzle-babel-loader/f5d2a1eda08a847ad2abf7c8a4414c2b.json +1 -0
- package/cache/razzle-babel-loader/f74b413ebd39518b4ec44e1e9bea60ae.json +1 -0
- package/cache/razzle-babel-loader/f8095900e86ad53f9f6f7824c3a22b57.json +1 -0
- package/cache/razzle-babel-loader/f88b40d5f3328e04ab2e297cfa9fdef3.json +1 -0
- package/cache/razzle-babel-loader/fa6cf7cba11d37133dfcb9a60c46725e.json +1 -0
- package/cache/razzle-babel-loader/fb682645dd54bf7a74c272304ac36bd4.json +1 -0
- package/cache/razzle-babel-loader/fc0046290d38565e5bfece875a69032e.json +1 -0
- package/cache/razzle-babel-loader/fd5cbc7263cb56bb99fba7699a3aa1e2.json +1 -0
- package/cache/razzle-babel-loader/fe3b70c74c0a2dec27943a09ec81fca7.json +1 -0
- package/locales/ca/LC_MESSAGES/volto.po +347 -0
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +347 -0
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +347 -0
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +347 -0
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +347 -0
- package/locales/eu.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +348 -1
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +347 -0
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +347 -0
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +347 -0
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +347 -0
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +347 -0
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +347 -0
- package/locales/ro.json +1 -1
- package/locales/volto.pot +348 -1
- package/package.json +2 -1
- package/src/actions/content/content.js +12 -0
- package/src/actions/index.js +26 -0
- package/src/actions/rules/rules.js +427 -0
- package/src/components/index.js +6 -1
- package/src/components/manage/Blocks/Listing/DefaultTemplate.jsx +2 -2
- package/src/components/manage/Contents/Contents.jsx +91 -0
- package/src/components/manage/Contents/ContentsItem.jsx +5 -1
- package/src/components/manage/Controlpanels/Controlpanels.jsx +9 -0
- package/src/components/manage/Controlpanels/Rules/AddRule.jsx +374 -0
- package/src/components/manage/Controlpanels/Rules/AddRule.test.jsx +32 -0
- package/src/components/manage/Controlpanels/Rules/ConfigureRule.jsx +894 -0
- package/src/components/manage/Controlpanels/Rules/ConfigureRule.test.jsx +34 -0
- package/src/components/manage/Controlpanels/Rules/EditRule.jsx +403 -0
- package/src/components/manage/Controlpanels/Rules/EditRule.test.jsx +32 -0
- package/src/components/manage/Controlpanels/Rules/Rules.jsx +463 -0
- package/src/components/manage/Controlpanels/Rules/Rules.test.jsx +75 -0
- package/src/components/manage/Controlpanels/Rules/components/VariableModal.jsx +440 -0
- package/src/components/manage/Controlpanels/Rules/components/VariableModal.test.jsx +32 -0
- package/src/components/manage/Form/ModalForm.jsx +6 -1
- package/src/components/manage/ReactVirtualized/DynamicRowHeightList.jsx +1 -1
- package/src/components/manage/Rules/Rules.jsx +531 -0
- package/src/components/manage/Rules/Rules.test.jsx +76 -0
- package/src/components/manage/TextLineEdit/TextLineEdit.jsx +214 -0
- package/src/components/manage/TextLineEdit/TextLineEdit.stories.jsx +132 -0
- package/src/components/manage/TextLineEdit/TextLineEdit.test.jsx +118 -0
- package/src/components/manage/Toolbar/More.jsx +18 -0
- package/src/components/manage/Toolbar/More.test.jsx +5 -0
- package/src/components/manage/Widgets/ArrayWidget.jsx +2 -0
- package/src/components/manage/Widgets/InternalUrlWidget.jsx +180 -0
- package/src/components/manage/Widgets/SelectAutoComplete.jsx +2 -0
- package/src/components/manage/Widgets/SelectStyling.jsx +15 -0
- package/src/components/manage/Widgets/SelectUtils.js +1 -0
- package/src/components/manage/Widgets/SelectWidget.jsx +2 -0
- package/src/components/manage/Widgets/TokenWidget.jsx +7 -1
- package/src/components/theme/Search/SearchTags.jsx +10 -10
- package/src/components/theme/Search/SearchTags.test.jsx +1 -1
- package/src/config/Blocks.jsx +2 -2
- package/src/config/ControlPanels.js +2 -0
- package/src/config/NonContentRoutes.jsx +1 -0
- package/src/config/Widgets.jsx +3 -0
- package/src/constants/ActionTypes.js +31 -0
- package/src/helpers/Utils/usePrevious.js +1 -1
- package/src/helpers/Utils/usePrevious.test.js +24 -0
- package/src/reducers/contentRulesEvents/contentRulesEvents.js +62 -0
- package/src/reducers/controlPanelRule/controlPanelRule.js +206 -0
- package/src/reducers/controlPanelRules/controlPanelRules.js +81 -0
- package/src/reducers/history/history.js +1 -0
- package/src/reducers/index.js +8 -0
- package/src/reducers/rules/rules.js +126 -0
- package/src/routes.js +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 16.0.0-alpha.45 (2022-10-24)
|
|
4
|
+
|
|
5
|
+
### Feature
|
|
6
|
+
|
|
7
|
+
- Added link integrity potential breakage warning message when deleting a referenced page @danielamormocea
|
|
8
|
+
- Added new components & interfaces for content-rules `Rules` control in Volto. Rules management in both controlpanel and object view. @andreiggr
|
|
9
|
+
- Introduce `TextLineEdit` component @sneridagh
|
|
10
|
+
- Add a popup tooltip for tokenized options in Select widget values @sneridagh
|
|
11
|
+
|
|
12
|
+
### Bugfix
|
|
13
|
+
|
|
14
|
+
- Make sure that the store is reset on history reducer `PENDING` state @sneridagh
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
- Update supported Python versions. @stevepiercy
|
|
19
|
+
|
|
20
|
+
## 16.0.0-alpha.44 (2022-10-20)
|
|
21
|
+
|
|
22
|
+
### Breaking
|
|
23
|
+
|
|
24
|
+
- The listing block icon has been improved to avoid confusions with the normal text list @sneridagh
|
|
25
|
+
|
|
26
|
+
### Bugfix
|
|
27
|
+
|
|
28
|
+
- SearchTags uses invalid vocabulary API @silviubogan
|
|
29
|
+
- Fix autocomplete widget with an empty search result @reebalazs
|
|
30
|
+
|
|
3
31
|
## 16.0.0-alpha.43 (2022-10-17)
|
|
4
32
|
|
|
5
33
|
### Feature
|
|
@@ -90,6 +118,7 @@
|
|
|
90
118
|
- Fixed the `description` field not appearing in control panel fieldsets @JeffersonBledsoe #3696
|
|
91
119
|
- Fixed "more" always show root contents @MdSahil-oss #3365
|
|
92
120
|
- Add missing `--noninteractive` in the `build` script in package.json @sneridagh
|
|
121
|
+
- Fix replace `<a>` anchor element with the `UniversalLink` component in `DefaultTemplate.jsx` @Dnouv
|
|
93
122
|
|
|
94
123
|
### Internal
|
|
95
124
|
|
package/README.md
CHANGED
|
@@ -54,9 +54,18 @@ First get all the requirements installed on your system.
|
|
|
54
54
|
### Prerequisites
|
|
55
55
|
|
|
56
56
|
- [Node.js LTS (16.x)](https://nodejs.org/)
|
|
57
|
-
- [Python
|
|
57
|
+
- [Python](https://python.org/) - See below for specific versions.
|
|
58
58
|
- [Docker](https://www.docker.com/get-started) (if using the Plone docker images)
|
|
59
59
|
|
|
60
|
+
The versions of Python that are supported in Volto depend on the version of Plone that you use.
|
|
61
|
+
|
|
62
|
+
| Plone | Python | Volto |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| 5.2 | 2.7, 3.6-3.8 | 15.0 |
|
|
65
|
+
| 6.0 (beta) | 3.8-3.10 | 16.0 (alpha) |
|
|
66
|
+
|
|
67
|
+
At the time of this writing, Volto 16 is still in alpha status, and Plone 6 is in beta status.
|
|
68
|
+
|
|
60
69
|
### Create a Volto project using the generator
|
|
61
70
|
|
|
62
71
|
Create a new Volto project by using the `@plone/generator-volto` utility.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _extends from \"/Users/sneridagh/Development/plone/volto/node_modules/@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"/Users/sneridagh/Development/plone/volto/node_modules/@babel/runtime/helpers/esm/objectSpread2\";\n\nvar _jsxFileName = \"/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx\",\n _s = $RefreshSig$();\n\nvar __jsx = React.createElement;\nimport React from 'react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\nimport { usePopper } from 'react-popper';\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\nexport const MenuList = _ref => {\n let {\n children\n } = _ref;\n return __jsx(DynamicHeightList, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15,\n columnNumber: 10\n }\n }, children);\n};\n_c = MenuList;\nexport const SortableMultiValue = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValue\n } = props.reactSelect.components;\n const {\n SortableElement\n } = props.reactSortableHOC; // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n\n const onMouseDown = e => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const innerProps = _objectSpread(_objectSpread({}, props.innerProps), {}, {\n onMouseDown\n });\n\n const SortableComponent = SortableElement(MultiValue);\n return __jsx(SortableComponent, _extends({}, props, {\n innerProps: innerProps,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 10\n }\n }));\n});\nexport const SortableMultiValueLabel = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValueLabel\n } = props.reactSelect.components;\n const {\n SortableHandle\n } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return __jsx(SortableComponent, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 10\n }\n }));\n});\nexport const Option = injectLazyLibs('reactSelect')(props => {\n const {\n Option\n } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon = props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n return __jsx(Option, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 5\n }\n }), __jsx(\"div\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 7\n }\n }, props.label), __jsx(Icon, {\n name: svgIcon,\n size: \"20px\",\n color: color,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 7\n }\n }));\n});\nexport const DropdownIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n DropdownIndicator\n } = props.reactSelect.components;\n return __jsx(DropdownIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 5\n }\n }), props.selectProps.menuIsOpen ? __jsx(Icon, {\n name: upSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 9\n }\n }) : __jsx(Icon, {\n name: downSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 9\n }\n }));\n});\nexport const ClearIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n ClearIndicator\n } = props.reactSelect.components;\n return __jsx(ClearIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 5\n }\n }), __jsx(Icon, {\n name: clearSVG,\n size: \"18px\",\n color: \"#e40166\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 7\n }\n }));\n});\nexport const Group = injectLazyLibs('reactSelect')(props => {\n const {\n Group\n } = props.reactSelect.components;\n return __jsx(Group, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 85,\n columnNumber: 10\n }\n }));\n});\nexport const MultiValueContainer = injectLazyLibs('reactSelect')(_s((props, werr) => {\n _s();\n\n const {\n MultiValueContainer\n } = props.reactSelect.components;\n const [referenceElement, setReferenceElement] = React.useState(null);\n const [popperElement, setPopperElement] = React.useState(null);\n const {\n styles,\n attributes\n } = usePopper(referenceElement, popperElement);\n console.log(props);\n return __jsx(React.Fragment, null, __jsx(MultiValueContainer, _extends({\n innerRef: setReferenceElement\n }, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97,\n columnNumber: 9\n }\n })), __jsx(\"div\", _extends({\n ref: setPopperElement,\n style: styles.popper\n }, attributes.popper, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 101,\n columnNumber: 9\n }\n }), \"Popper element\"));\n}, \"BafwJkTZSuuJ1S+5pLUclCmUUTs=\", false, function () {\n return [usePopper];\n}));\nexport const selectTheme = theme => _objectSpread(_objectSpread({}, theme), {}, {\n borderRadius: 0,\n colors: _objectSpread(_objectSpread({}, theme.colors), {}, {\n primary25: 'hotpink',\n primary: '#b8c6c8'\n })\n});\nexport const customSelectStyles = {\n control: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px'\n }),\n menu: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2\n }),\n indicatorSeparator: styles => _objectSpread(_objectSpread({}, styles), {}, {\n width: null\n }),\n valueContainer: styles => _objectSpread(_objectSpread({}, styles), {}, {\n paddingLeft: 0\n }),\n dropdownIndicator: styles => ({\n paddingRight: 0\n }),\n clearIndicator: styles => ({\n color: '#e40166'\n }),\n option: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected ? '#007bc1' : state.isDisabled ? '#b5b5b5' : state.isFocused ? '#4a4a4a' : 'inherit',\n ':active': {\n backgroundColor: null\n },\n svg: {\n flex: '0 0 auto'\n }\n })\n};\n\nvar _c;\n\n$RefreshReg$(_c, \"MenuList\");","map":{"version":3,"names":["React","injectLazyLibs","Icon","DynamicHeightList","usePopper","downSVG","upSVG","checkSVG","checkBlankSVG","clearSVG","MenuList","children","SortableMultiValue","props","MultiValue","reactSelect","components","SortableElement","reactSortableHOC","onMouseDown","e","preventDefault","stopPropagation","innerProps","SortableComponent","SortableMultiValueLabel","MultiValueLabel","SortableHandle","Option","color","isFocused","isSelected","svgIcon","label","DropdownIndicator","selectProps","menuIsOpen","ClearIndicator","Group","MultiValueContainer","werr","referenceElement","setReferenceElement","useState","popperElement","setPopperElement","styles","attributes","console","log","popper","selectTheme","theme","borderRadius","colors","primary25","primary","customSelectStyles","control","state","border","borderBottom","boxShadow","borderBottomStyle","minHeight","menu","top","marginTop","zIndex","indicatorSeparator","width","valueContainer","paddingLeft","dropdownIndicator","paddingRight","clearIndicator","option","backgroundColor","display","justifyContent","alignItems","padding","isDisabled","svg","flex"],"sources":["/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx"],"sourcesContent":["import React from 'react';\nimport { Popup } from 'semantic-ui-react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\nimport { usePopper } from 'react-popper';\n\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\n\nexport const MenuList = ({ children }) => {\n return <DynamicHeightList>{children}</DynamicHeightList>;\n};\n\nexport const SortableMultiValue = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValue } = props.reactSelect.components;\n const { SortableElement } = props.reactSortableHOC;\n // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n const onMouseDown = (e) => {\n e.preventDefault();\n e.stopPropagation();\n };\n const innerProps = { ...props.innerProps, onMouseDown };\n const SortableComponent = SortableElement(MultiValue);\n return <SortableComponent {...props} innerProps={innerProps} />;\n});\n\nexport const SortableMultiValueLabel = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValueLabel } = props.reactSelect.components;\n const { SortableHandle } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return <SortableComponent {...props} />;\n});\n\nexport const Option = injectLazyLibs('reactSelect')((props) => {\n const { Option } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon =\n props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n\n return (\n <Option {...props}>\n <div>{props.label}</div>\n <Icon name={svgIcon} size=\"20px\" color={color} />\n </Option>\n );\n});\n\nexport const DropdownIndicator = injectLazyLibs('reactSelect')((props) => {\n const { DropdownIndicator } = props.reactSelect.components;\n return (\n <DropdownIndicator {...props}>\n {props.selectProps.menuIsOpen ? (\n <Icon name={upSVG} size=\"24px\" color=\"#007bc1\" />\n ) : (\n <Icon name={downSVG} size=\"24px\" color=\"#007bc1\" />\n )}\n </DropdownIndicator>\n );\n});\n\nexport const ClearIndicator = injectLazyLibs('reactSelect')((props) => {\n const { ClearIndicator } = props.reactSelect.components;\n return (\n <ClearIndicator {...props}>\n <Icon name={clearSVG} size=\"18px\" color=\"#e40166\" />\n </ClearIndicator>\n );\n});\n\nexport const Group = injectLazyLibs('reactSelect')((props) => {\n const { Group } = props.reactSelect.components;\n return <Group {...props}></Group>;\n});\n\nexport const MultiValueContainer = injectLazyLibs('reactSelect')(\n (props, werr) => {\n const { MultiValueContainer } = props.reactSelect.components;\n const [referenceElement, setReferenceElement] = React.useState(null);\n const [popperElement, setPopperElement] = React.useState(null);\n const { styles, attributes } = usePopper(referenceElement, popperElement);\n console.log(props);\n return (\n <>\n <MultiValueContainer\n innerRef={setReferenceElement}\n {...props}\n ></MultiValueContainer>\n <div\n ref={setPopperElement}\n style={styles.popper}\n {...attributes.popper}\n >\n Popper element\n </div>\n </>\n );\n },\n);\n\nexport const selectTheme = (theme) => ({\n ...theme,\n borderRadius: 0,\n colors: {\n ...theme.colors,\n primary25: 'hotpink',\n primary: '#b8c6c8',\n },\n});\n\nexport const customSelectStyles = {\n control: (styles, state) => ({\n ...styles,\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px',\n }),\n menu: (styles, state) => ({\n ...styles,\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2,\n }),\n indicatorSeparator: (styles) => ({\n ...styles,\n width: null,\n }),\n valueContainer: (styles) => ({\n ...styles,\n paddingLeft: 0,\n }),\n dropdownIndicator: (styles) => ({\n paddingRight: 0,\n }),\n clearIndicator: (styles) => ({\n color: '#e40166',\n }),\n option: (styles, state) => ({\n ...styles,\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected\n ? '#007bc1'\n : state.isDisabled\n ? '#b5b5b5'\n : state.isFocused\n ? '#4a4a4a'\n : 'inherit',\n ':active': {\n backgroundColor: null,\n },\n svg: {\n flex: '0 0 auto',\n },\n }),\n};\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,cAAT,QAA+B,wCAA/B;AACA,SAASC,IAAT,QAAqB,yBAArB;AACA,OAAOC,iBAAP,MAA8B,sEAA9B;AAC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,MAAD,KAAa;IAC9B4B,YAAY,EAAE;EADgB,CAAb,CAzBa;EA4BhCC,cAAc,EAAG7B,MAAD,KAAa;IAC3BjB,KAAK,EAAE;EADoB,CAAb,CA5BgB;EA+BhC+C,MAAM,EAAE,CAAC9B,MAAD,EAASa,KAAT,qCACHb,MADG;IAEN+B,eAAe,EAAE,IAFX;IAGNb,SAAS,EAAE,MAHL;IAINc,OAAO,EAAE,MAJH;IAKNC,cAAc,EAAE,eALV;IAMNC,UAAU,EAAE,QANN;IAONC,OAAO,EAAE,WAPH;IAQNpD,KAAK,EAAE8B,KAAK,CAAC5B,UAAN,GACH,SADG,GAEH4B,KAAK,CAACuB,UAAN,GACA,SADA,GAEAvB,KAAK,CAAC7B,SAAN,GACA,SADA,GAEA,SAdE;IAeN,WAAW;MACT+C,eAAe,EAAE;IADR,CAfL;IAkBNM,GAAG,EAAE;MACHC,IAAI,EAAE;IADH;EAlBC;AA/BwB,CAA3B"},"metadata":{"react-intl":{"messages":[]}},"sourceType":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _extends from \"/Users/sneridagh/Development/plone/volto/node_modules/@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"/Users/sneridagh/Development/plone/volto/node_modules/@babel/runtime/helpers/esm/objectSpread2\";\nvar _jsxFileName = \"/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx\";\nvar __jsx = React.createElement;\nimport React from 'react';\nimport { Popup } from 'semantic-ui-react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\nexport const MenuList = _ref => {\n let {\n children\n } = _ref;\n return __jsx(DynamicHeightList, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14,\n columnNumber: 10\n }\n }, children);\n};\n_c = MenuList;\nexport const SortableMultiValue = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValue\n } = props.reactSelect.components;\n const {\n SortableElement\n } = props.reactSortableHOC; // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n\n const onMouseDown = e => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const innerProps = _objectSpread(_objectSpread({}, props.innerProps), {}, {\n onMouseDown\n });\n\n const SortableComponent = SortableElement(MultiValue);\n return __jsx(SortableComponent, _extends({}, props, {\n innerProps: innerProps,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 10\n }\n }));\n});\nexport const SortableMultiValueLabel = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValueLabel\n } = props.reactSelect.components;\n const {\n SortableHandle\n } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return __jsx(SortableComponent, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 10\n }\n }));\n});\nexport const Option = injectLazyLibs('reactSelect')(props => {\n const {\n Option\n } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon = props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n return __jsx(Option, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 5\n }\n }), __jsx(\"div\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 7\n }\n }, props.label), __jsx(Icon, {\n name: svgIcon,\n size: \"20px\",\n color: color,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 7\n }\n }));\n});\nexport const DropdownIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n DropdownIndicator\n } = props.reactSelect.components;\n return __jsx(DropdownIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 5\n }\n }), props.selectProps.menuIsOpen ? __jsx(Icon, {\n name: upSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 9\n }\n }) : __jsx(Icon, {\n name: downSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 9\n }\n }));\n});\nexport const ClearIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n ClearIndicator\n } = props.reactSelect.components;\n return __jsx(ClearIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 5\n }\n }), __jsx(Icon, {\n name: clearSVG,\n size: \"18px\",\n color: \"#e40166\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 7\n }\n }));\n});\nexport const Group = injectLazyLibs('reactSelect')(props => {\n const {\n Group\n } = props.reactSelect.components;\n return __jsx(Group, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 84,\n columnNumber: 10\n }\n }));\n});\nexport const MultiValueContainer = injectLazyLibs('reactSelect')(props => {\n const {\n MultiValueContainer\n } = props.reactSelect.components;\n return __jsx(React.Fragment, null, __jsx(Popup, {\n content: __jsx(\"div\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92,\n columnNumber: 18\n }\n }, \"Hello\"),\n trigger: __jsx(MultiValueContainer, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93,\n columnNumber: 18\n }\n })),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91,\n columnNumber: 7\n }\n }), __jsx(MultiValueContainer, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95,\n columnNumber: 7\n }\n })));\n});\nexport const selectTheme = theme => _objectSpread(_objectSpread({}, theme), {}, {\n borderRadius: 0,\n colors: _objectSpread(_objectSpread({}, theme.colors), {}, {\n primary25: 'hotpink',\n primary: '#b8c6c8'\n })\n});\nexport const customSelectStyles = {\n control: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px'\n }),\n menu: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2\n }),\n indicatorSeparator: styles => _objectSpread(_objectSpread({}, styles), {}, {\n width: null\n }),\n valueContainer: styles => _objectSpread(_objectSpread({}, styles), {}, {\n paddingLeft: 0\n }),\n dropdownIndicator: styles => ({\n paddingRight: 0\n }),\n clearIndicator: styles => ({\n color: '#e40166'\n }),\n option: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected ? '#007bc1' : state.isDisabled ? '#b5b5b5' : state.isFocused ? '#4a4a4a' : 'inherit',\n ':active': {\n backgroundColor: null\n },\n svg: {\n flex: '0 0 auto'\n }\n })\n};\n\nvar _c;\n\n$RefreshReg$(_c, \"MenuList\");","map":{"version":3,"names":["React","Popup","injectLazyLibs","Icon","DynamicHeightList","downSVG","upSVG","checkSVG","checkBlankSVG","clearSVG","MenuList","children","SortableMultiValue","props","MultiValue","reactSelect","components","SortableElement","reactSortableHOC","onMouseDown","e","preventDefault","stopPropagation","innerProps","SortableComponent","SortableMultiValueLabel","MultiValueLabel","SortableHandle","Option","color","isFocused","isSelected","svgIcon","label","DropdownIndicator","selectProps","menuIsOpen","ClearIndicator","Group","MultiValueContainer","selectTheme","theme","borderRadius","colors","primary25","primary","customSelectStyles","control","styles","state","border","borderBottom","boxShadow","borderBottomStyle","minHeight","menu","top","marginTop","zIndex","indicatorSeparator","width","valueContainer","paddingLeft","dropdownIndicator","paddingRight","clearIndicator","option","backgroundColor","display","justifyContent","alignItems","padding","isDisabled","svg","flex"],"sources":["/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx"],"sourcesContent":["import React from 'react';\nimport { Popup } from 'semantic-ui-react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\n\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\n\nexport const MenuList = ({ children }) => {\n return <DynamicHeightList>{children}</DynamicHeightList>;\n};\n\nexport const SortableMultiValue = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValue } = props.reactSelect.components;\n const { SortableElement } = props.reactSortableHOC;\n // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n const onMouseDown = (e) => {\n e.preventDefault();\n e.stopPropagation();\n };\n const innerProps = { ...props.innerProps, onMouseDown };\n const SortableComponent = SortableElement(MultiValue);\n return <SortableComponent {...props} innerProps={innerProps} />;\n});\n\nexport const SortableMultiValueLabel = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValueLabel } = props.reactSelect.components;\n const { SortableHandle } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return <SortableComponent {...props} />;\n});\n\nexport const Option = injectLazyLibs('reactSelect')((props) => {\n const { Option } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon =\n props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n\n return (\n <Option {...props}>\n <div>{props.label}</div>\n <Icon name={svgIcon} size=\"20px\" color={color} />\n </Option>\n );\n});\n\nexport const DropdownIndicator = injectLazyLibs('reactSelect')((props) => {\n const { DropdownIndicator } = props.reactSelect.components;\n return (\n <DropdownIndicator {...props}>\n {props.selectProps.menuIsOpen ? (\n <Icon name={upSVG} size=\"24px\" color=\"#007bc1\" />\n ) : (\n <Icon name={downSVG} size=\"24px\" color=\"#007bc1\" />\n )}\n </DropdownIndicator>\n );\n});\n\nexport const ClearIndicator = injectLazyLibs('reactSelect')((props) => {\n const { ClearIndicator } = props.reactSelect.components;\n return (\n <ClearIndicator {...props}>\n <Icon name={clearSVG} size=\"18px\" color=\"#e40166\" />\n </ClearIndicator>\n );\n});\n\nexport const Group = injectLazyLibs('reactSelect')((props) => {\n const { Group } = props.reactSelect.components;\n return <Group {...props}></Group>;\n});\n\nexport const MultiValueContainer = injectLazyLibs('reactSelect')((props) => {\n const { MultiValueContainer } = props.reactSelect.components;\n return (\n <>\n <Popup\n content={<div>Hello</div>}\n trigger={<MultiValueContainer {...props}></MultiValueContainer>}\n />\n <MultiValueContainer {...props}></MultiValueContainer>\n </>\n );\n});\n\nexport const selectTheme = (theme) => ({\n ...theme,\n borderRadius: 0,\n colors: {\n ...theme.colors,\n primary25: 'hotpink',\n primary: '#b8c6c8',\n },\n});\n\nexport const customSelectStyles = {\n control: (styles, state) => ({\n ...styles,\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px',\n }),\n menu: (styles, state) => ({\n ...styles,\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2,\n }),\n indicatorSeparator: (styles) => ({\n ...styles,\n width: null,\n }),\n valueContainer: (styles) => ({\n ...styles,\n paddingLeft: 0,\n }),\n dropdownIndicator: (styles) => ({\n paddingRight: 0,\n }),\n clearIndicator: (styles) => ({\n color: '#e40166',\n }),\n option: (styles, state) => ({\n ...styles,\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected\n ? '#007bc1'\n : state.isDisabled\n ? '#b5b5b5'\n : state.isFocused\n ? '#4a4a4a'\n : 'inherit',\n ':active': {\n backgroundColor: null,\n },\n svg: {\n flex: '0 0 auto',\n },\n }),\n};\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,KAAT,QAAsB,mBAAtB;AACA,SAASC,cAAT,QAA+B,wCAA/B;AACA,SAASC,IAAT,QAAqB,yBAArB;AACA,OAAOC,iBAAP,MAA8B,sEAA9B;AAEA,OAAOC,OAAP,MAAoB,iCAApB;AACA,OAAOC,KAAP,MAAkB,+BAAlB;AACA,OAAOC,QAAP,MAAqB,8BAArB;AACA,OAAOC,aAAP,MAA0B,oCAA1B;AACA,OAAOC,QAAP,MAAqB,8BAArB;AAEA,OAAO,MAAMC,QAAQ,GAAG,QAAkB;EAAA,IAAjB;IAAEC;EAAF,CAAiB;EACxC,OAAO,MAAC,iBAAD;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GAAoBA,QAApB,CAAP;AACD,CAFM;KAAMD,Q;AAIb,OAAO,MAAME,kBAAkB,GAAGV,cAAc,CAAC,CAC/C,aAD+C,EAE/C,kBAF+C,CAAD,CAAd,CAG9BW,KAAD,IAAW;EACZ,MAAM;IAAEC;EAAF,IAAiBD,KAAK,CAACE,WAAN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E;EANJ,EADuB;EAShCC,IAAI,EAAE,CAACP,MAAD,EAASC,KAAT,qCACDD,MADC;IAEJQ,GAAG,EAAE,IAFD;IAGJC,SAAS,EAAE,CAHP;IAIJL,SAAS,EAAE,MAJP;IAKJD,YAAY,EAAE,mBALV;IAMJO,MAAM,EAAE;EANJ,EAT0B;EAiBhCC,kBAAkB,EAAGX,MAAD,oCACfA,MADe;IAElBY,KAAK,EAAE;EAFW,EAjBY;EAqBhCC,cAAc,EAAGb,MAAD,oCACXA,MADW;IAEdc,WAAW,EAAE;EAFC,EArBgB;EAyBhCC,iBAAiB,EAAGf,MAAD,KAAa;IAC9BgB,YAAY,EAAE;EADgB,CAAb,CAzBa;EA4BhCC,cAAc,EAAGjB,MAAD,KAAa;IAC3BnB,KAAK,EAAE;EADoB,CAAb,CA5BgB;EA+BhCqC,MAAM,EAAE,CAAClB,MAAD,EAASC,KAAT,qCACHD,MADG;IAENmB,eAAe,EAAE,IAFX;IAGNb,SAAS,EAAE,MAHL;IAINc,OAAO,EAAE,MAJH;IAKNC,cAAc,EAAE,eALV;IAMNC,UAAU,EAAE,QANN;IAONC,OAAO,EAAE,WAPH;IAQN1C,KAAK,EAAEoB,KAAK,CAAClB,UAAN,GACH,SADG,GAEHkB,KAAK,CAACuB,UAAN,GACA,SADA,GAEAvB,KAAK,CAACnB,SAAN,GACA,SADA,GAEA,SAdE;IAeN,WAAW;MACTqC,eAAe,EAAE;IADR,CAfL;IAkBNM,GAAG,EAAE;MACHC,IAAI,EAAE;IADH;EAlBC;AA/BwB,CAA3B"},"metadata":{"react-intl":{"messages":[]}},"sourceType":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _extends from \"/Users/sneridagh/Development/plone/volto/node_modules/@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"/Users/sneridagh/Development/plone/volto/node_modules/@babel/runtime/helpers/esm/objectSpread2\";\n\nvar _jsxFileName = \"/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx\",\n _s = $RefreshSig$();\n\nvar __jsx = React.createElement;\nimport React from 'react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\nimport { usePopper } from 'react-popper';\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\nexport const MenuList = _ref => {\n let {\n children\n } = _ref;\n return __jsx(DynamicHeightList, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15,\n columnNumber: 10\n }\n }, children);\n};\n_c = MenuList;\nexport const SortableMultiValue = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValue\n } = props.reactSelect.components;\n const {\n SortableElement\n } = props.reactSortableHOC; // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n\n const onMouseDown = e => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const innerProps = _objectSpread(_objectSpread({}, props.innerProps), {}, {\n onMouseDown\n });\n\n const SortableComponent = SortableElement(MultiValue);\n return __jsx(SortableComponent, _extends({}, props, {\n innerProps: innerProps,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 10\n }\n }));\n});\nexport const SortableMultiValueLabel = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValueLabel\n } = props.reactSelect.components;\n const {\n SortableHandle\n } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return __jsx(SortableComponent, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 10\n }\n }));\n});\nexport const Option = injectLazyLibs('reactSelect')(props => {\n const {\n Option\n } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon = props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n return __jsx(Option, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 5\n }\n }), __jsx(\"div\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 7\n }\n }, props.label), __jsx(Icon, {\n name: svgIcon,\n size: \"20px\",\n color: color,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 7\n }\n }));\n});\nexport const DropdownIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n DropdownIndicator\n } = props.reactSelect.components;\n return __jsx(DropdownIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 5\n }\n }), props.selectProps.menuIsOpen ? __jsx(Icon, {\n name: upSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 9\n }\n }) : __jsx(Icon, {\n name: downSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 9\n }\n }));\n});\nexport const ClearIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n ClearIndicator\n } = props.reactSelect.components;\n return __jsx(ClearIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 5\n }\n }), __jsx(Icon, {\n name: clearSVG,\n size: \"18px\",\n color: \"#e40166\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 7\n }\n }));\n});\nexport const Group = injectLazyLibs('reactSelect')(props => {\n const {\n Group\n } = props.reactSelect.components;\n return __jsx(Group, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 85,\n columnNumber: 10\n }\n }));\n});\nexport const MultiValueContainer = injectLazyLibs('reactSelect')(_s((innerRef, props) => {\n _s();\n\n const {\n MultiValueContainer\n } = props.reactSelect.components;\n const [referenceElement, setReferenceElement] = React.useState(null);\n const [popperElement, setPopperElement] = React.useState(null);\n const {\n styles,\n attributes\n } = usePopper(referenceElement, popperElement);\n console.log(innerRef);\n return __jsx(React.Fragment, null, __jsx(MultiValueContainer, _extends({\n innerRef: setReferenceElement\n }, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97,\n columnNumber: 9\n }\n })), __jsx(\"div\", _extends({\n ref: setPopperElement,\n style: styles.popper\n }, attributes.popper, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 101,\n columnNumber: 9\n }\n }), \"Popper element\"));\n}, \"BafwJkTZSuuJ1S+5pLUclCmUUTs=\", false, function () {\n return [usePopper];\n}));\nexport const selectTheme = theme => _objectSpread(_objectSpread({}, theme), {}, {\n borderRadius: 0,\n colors: _objectSpread(_objectSpread({}, theme.colors), {}, {\n primary25: 'hotpink',\n primary: '#b8c6c8'\n })\n});\nexport const customSelectStyles = {\n control: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px'\n }),\n menu: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2\n }),\n indicatorSeparator: styles => _objectSpread(_objectSpread({}, styles), {}, {\n width: null\n }),\n valueContainer: styles => _objectSpread(_objectSpread({}, styles), {}, {\n paddingLeft: 0\n }),\n dropdownIndicator: styles => ({\n paddingRight: 0\n }),\n clearIndicator: styles => ({\n color: '#e40166'\n }),\n option: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected ? '#007bc1' : state.isDisabled ? '#b5b5b5' : state.isFocused ? '#4a4a4a' : 'inherit',\n ':active': {\n backgroundColor: null\n },\n svg: {\n flex: '0 0 auto'\n }\n })\n};\n\nvar _c;\n\n$RefreshReg$(_c, \"MenuList\");","map":{"version":3,"names":["React","injectLazyLibs","Icon","DynamicHeightList","usePopper","downSVG","upSVG","checkSVG","checkBlankSVG","clearSVG","MenuList","children","SortableMultiValue","props","MultiValue","reactSelect","components","SortableElement","reactSortableHOC","onMouseDown","e","preventDefault","stopPropagation","innerProps","SortableComponent","SortableMultiValueLabel","MultiValueLabel","SortableHandle","Option","color","isFocused","isSelected","svgIcon","label","DropdownIndicator","selectProps","menuIsOpen","ClearIndicator","Group","MultiValueContainer","innerRef","referenceElement","setReferenceElement","useState","popperElement","setPopperElement","styles","attributes","console","log","popper","selectTheme","theme","borderRadius","colors","primary25","primary","customSelectStyles","control","state","border","borderBottom","boxShadow","borderBottomStyle","minHeight","menu","top","marginTop","zIndex","indicatorSeparator","width","valueContainer","paddingLeft","dropdownIndicator","paddingRight","clearIndicator","option","backgroundColor","display","justifyContent","alignItems","padding","isDisabled","svg","flex"],"sources":["/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx"],"sourcesContent":["import React from 'react';\nimport { Popup } from 'semantic-ui-react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\nimport { usePopper } from 'react-popper';\n\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\n\nexport const MenuList = ({ children }) => {\n return <DynamicHeightList>{children}</DynamicHeightList>;\n};\n\nexport const SortableMultiValue = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValue } = props.reactSelect.components;\n const { SortableElement } = props.reactSortableHOC;\n // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n const onMouseDown = (e) => {\n e.preventDefault();\n e.stopPropagation();\n };\n const innerProps = { ...props.innerProps, onMouseDown };\n const SortableComponent = SortableElement(MultiValue);\n return <SortableComponent {...props} innerProps={innerProps} />;\n});\n\nexport const SortableMultiValueLabel = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValueLabel } = props.reactSelect.components;\n const { SortableHandle } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return <SortableComponent {...props} />;\n});\n\nexport const Option = injectLazyLibs('reactSelect')((props) => {\n const { Option } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon =\n props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n\n return (\n <Option {...props}>\n <div>{props.label}</div>\n <Icon name={svgIcon} size=\"20px\" color={color} />\n </Option>\n );\n});\n\nexport const DropdownIndicator = injectLazyLibs('reactSelect')((props) => {\n const { DropdownIndicator } = props.reactSelect.components;\n return (\n <DropdownIndicator {...props}>\n {props.selectProps.menuIsOpen ? (\n <Icon name={upSVG} size=\"24px\" color=\"#007bc1\" />\n ) : (\n <Icon name={downSVG} size=\"24px\" color=\"#007bc1\" />\n )}\n </DropdownIndicator>\n );\n});\n\nexport const ClearIndicator = injectLazyLibs('reactSelect')((props) => {\n const { ClearIndicator } = props.reactSelect.components;\n return (\n <ClearIndicator {...props}>\n <Icon name={clearSVG} size=\"18px\" color=\"#e40166\" />\n </ClearIndicator>\n );\n});\n\nexport const Group = injectLazyLibs('reactSelect')((props) => {\n const { Group } = props.reactSelect.components;\n return <Group {...props}></Group>;\n});\n\nexport const MultiValueContainer = injectLazyLibs('reactSelect')(\n (innerRef, props) => {\n const { MultiValueContainer } = props.reactSelect.components;\n const [referenceElement, setReferenceElement] = React.useState(null);\n const [popperElement, setPopperElement] = React.useState(null);\n const { styles, attributes } = usePopper(referenceElement, popperElement);\n console.log(innerRef);\n return (\n <>\n <MultiValueContainer\n innerRef={setReferenceElement}\n {...props}\n ></MultiValueContainer>\n <div\n ref={setPopperElement}\n style={styles.popper}\n {...attributes.popper}\n >\n Popper element\n </div>\n </>\n );\n },\n);\n\nexport const selectTheme = (theme) => ({\n ...theme,\n borderRadius: 0,\n colors: {\n ...theme.colors,\n primary25: 'hotpink',\n primary: '#b8c6c8',\n },\n});\n\nexport const customSelectStyles = {\n control: (styles, state) => ({\n ...styles,\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px',\n }),\n menu: (styles, state) => ({\n ...styles,\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2,\n }),\n indicatorSeparator: (styles) => ({\n ...styles,\n width: null,\n }),\n valueContainer: (styles) => ({\n ...styles,\n paddingLeft: 0,\n }),\n dropdownIndicator: (styles) => ({\n paddingRight: 0,\n }),\n clearIndicator: (styles) => ({\n color: '#e40166',\n }),\n option: (styles, state) => ({\n ...styles,\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected\n ? '#007bc1'\n : state.isDisabled\n ? '#b5b5b5'\n : state.isFocused\n ? '#4a4a4a'\n : 'inherit',\n ':active': {\n backgroundColor: null,\n },\n svg: {\n flex: '0 0 auto',\n },\n }),\n};\n"],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AAD,oCACfA,MADe;IAElBwB,KAAK,EAAE;EAFW,EAjBY;EAqBhCC,cAAc,EAAGzB,MAAD,oCACXA,MADW;IAEd0B,WAAW,EAAE;EAFC,EArBgB;EAyBhCC,iBAAiB,EAAG3B,MAAD,KAAa;IAC9B4B,YAAY,EAAE;EADgB,CAAb,CAzBa;EA4BhCC,cAAc,EAAG7B,MAAD,KAAa;IAC3BjB,KAAK,EAAE;EADoB,CAAb,CA5BgB;EA+BhC+C,MAAM,EAAE,CAAC9B,MAAD,EAASa,KAAT,qCACHb,MADG;IAEN+B,eAAe,EAAE,IAFX;IAGNb,SAAS,EAAE,MAHL;IAINc,OAAO,EAAE,MAJH;IAKNC,cAAc,EAAE,eALV;IAMNC,UAAU,EAAE,QANN;IAONC,OAAO,EAAE,WAPH;IAQNpD,KAAK,EAAE8B,KAAK,CAAC5B,UAAN,GACH,SADG,GAEH4B,KAAK,CAACuB,UAAN,GACA,SADA,GAEAvB,KAAK,CAAC7B,SAAN,GACA,SADA,GAEA,SAdE;IAeN,WAAW;MACT+C,eAAe,EAAE;IADR,CAfL;IAkBNM,GAAG,EAAE;MACHC,IAAI,EAAE;IADH;EAlBC;AA/BwB,CAA3B"},"metadata":{"react-intl":{"messages":[]}},"sourceType":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _isString from \"lodash/isString\";\nimport _isObject from \"lodash/isObject\";\nimport _isBoolean from \"lodash/isBoolean\";\nimport { getBoolean } from '@plone/volto/helpers';\nimport { defineMessages } from 'react-intl';\nconst messages = defineMessages({\n no_value: {\n \"id\": \"No value\",\n \"defaultMessage\": \"No value\"\n }\n});\n/**\n * Prepares a vocab endpoint query for tokens based on passed value.\n *\n * This can be used to facilitate querying a vocabulary endpoint for labels,\n * given some token values. This assumes that the value has already been\n * normalized by normalizeValue.\n */\n\nexport function convertValueToVocabQuery(value) {\n var _value$value;\n\n if (_isString(value) || _isBoolean(value)) return {\n token: value.toString()\n };\n if (!value) return {};\n\n if (Array.isArray(value)) {\n return {\n tokens: value.map(v => {\n var _v$value;\n\n return _isObject(v) ? (_v$value = v.value) !== null && _v$value !== void 0 ? _v$value : v.token : _isString(v) || _isBoolean(v) ? v : null;\n }).filter(f => f !== null)\n };\n }\n\n const token = (_value$value = value.value) !== null && _value$value !== void 0 ? _value$value : value.token;\n return _isString(token) ? {\n token\n } : {};\n}\n/**\n * Normalizes provided value to a \"best representation\" value, as accepted by\n * react-select. In this case, it is an object of shape `{ label, value }`\n */\n\nexport function normalizeSingleSelectOption(value, intl) {\n var _ref, _value$token, _ref2, _ref3, _ref4;\n\n if (!value) return value;\n\n if (Array.isArray(value)) {\n // assuming [token, title] pair.\n if (value.length === 2) return {\n value: value[0],\n label: value[1] || value[0]\n };\n throw new Error(`Unknown value type of select widget: ${value}`);\n }\n\n const token = (_ref = (_value$token = value.token) !== null && _value$token !== void 0 ? _value$token : value.value) !== null && _ref !== void 0 ? _ref : 'no-value';\n const label = (_ref2 = (_ref3 = (_ref4 = value.title && value.title !== 'None' ? value.title : undefined) !== null && _ref4 !== void 0 ? _ref4 : value.label) !== null && _ref3 !== void 0 ? _ref3 : value.token) !== null && _ref2 !== void 0 ? _ref2 : intl.formatMessage(messages.no_value);\n return {\n value: token,\n label\n };\n}\nexport const normalizeChoices = (items, intl) => items.map(item => normalizeSingleSelectOption(item, intl));\n/**\n * Given the value from the API, it normalizes to a value valid to use in react-select.\n * This is necessary because of the inconsistencies in p.restapi vocabularies implementations as\n * they need to adapt to react-select public interface.\n * @function normalizeValue\n * @param {array} choices The choices\n * @param {string|object|boolean|array} value The value\n * @returns {Object} An object of shape {label: \"\", value: \"\"} (or an array)\n */\n\nexport function normalizeValue(choices, value, intl) {\n choices = normalizeChoices(choices || [], intl);\n const choiceMap = Object.assign({}, ...choices.map(({\n label,\n value\n }) => ({\n [value]: label\n })));\n\n if (!_isObject(value) && _isBoolean(value)) {\n // We have a boolean value, which means we need to provide a \"No value\"\n // option\n const label = choiceMap[getBoolean(value)];\n return label ? {\n label,\n value\n } : {};\n }\n\n if (value === 'no-value') {\n return {\n label: intl.formatMessage(messages.no_value),\n value: 'no-value'\n };\n }\n\n if (value === undefined || !value || value.length === 0) return null;\n\n if (Array.isArray(value)) {\n // a list of values, like ['foo', 'bar'];\n return value.map(v => normalizeValue(choices, v));\n }\n\n if (_isObject(value)) {\n // an object like `{label, value}` or `{ title, value }`\n return normalizeSingleSelectOption(value, intl);\n } // fallback: treat value as a token and look it up in choices\n\n\n return Object.keys(choiceMap).includes(value) ? {\n label: choiceMap[value],\n value\n } : {\n label: value,\n value\n };\n}","map":{"version":3,"names":["getBoolean","defineMessages","messages","no_value","convertValueToVocabQuery","value","token","toString","Array","isArray","tokens","map","v","filter","f","normalizeSingleSelectOption","intl","length","label","Error","title","undefined","formatMessage","normalizeChoices","items","item","normalizeValue","choices","choiceMap","Object","assign","keys","includes"],"sources":["/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectUtils.js"],"sourcesContent":["import { isBoolean, isObject, isString } from 'lodash';\nimport { getBoolean } from '@plone/volto/helpers';\nimport { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n no_value: {\n id: 'No value',\n defaultMessage: 'No value',\n },\n});\n\n/**\n * Prepares a vocab endpoint query for tokens based on passed value.\n *\n * This can be used to facilitate querying a vocabulary endpoint for labels,\n * given some token values. This assumes that the value has already been\n * normalized by normalizeValue.\n */\nexport function convertValueToVocabQuery(value) {\n if (isString(value) || isBoolean(value)) return { token: value.toString() };\n\n if (!value) return {};\n\n if (Array.isArray(value)) {\n return {\n tokens: value\n .map((v) =>\n isObject(v)\n ? v.value ?? v.token\n : isString(v) || isBoolean(v)\n ? v\n : null,\n )\n .filter((f) => f !== null),\n };\n }\n\n const token = value.value ?? value.token;\n return isString(token) ? { token } : {};\n}\n\n/**\n * Normalizes provided value to a \"best representation\" value, as accepted by\n * react-select. In this case, it is an object of shape `{ label, value }`\n */\nexport function normalizeSingleSelectOption(value, intl) {\n if (!value) return value;\n\n if (Array.isArray(value)) {\n // assuming [token, title] pair.\n if (value.length === 2)\n return { value: value[0], label: value[1] || value[0] };\n\n throw new Error(`Unknown value type of select widget: ${value}`);\n }\n\n const token = value.token ?? value.value ?? 'no-value';\n const label =\n (value.title && value.title !== 'None' ? value.title : undefined) ??\n value.label ??\n value.token ??\n intl.formatMessage(messages.no_value);\n\n return {\n value: token,\n label,\n };\n}\n\nexport const normalizeChoices = (items, intl) =>\n items.map((item) => normalizeSingleSelectOption(item, intl));\n\n/**\n * Given the value from the API, it normalizes to a value valid to use in react-select.\n * This is necessary because of the inconsistencies in p.restapi vocabularies implementations as\n * they need to adapt to react-select public interface.\n * @function normalizeValue\n * @param {array} choices The choices\n * @param {string|object|boolean|array} value The value\n * @returns {Object} An object of shape {label: \"\", value: \"\"} (or an array)\n */\nexport function normalizeValue(choices, value, intl) {\n choices = normalizeChoices(choices || [], intl);\n const choiceMap = Object.assign(\n {},\n ...choices.map(({ label, value }) => ({\n [value]: label,\n })),\n );\n\n if (!isObject(value) && isBoolean(value)) {\n // We have a boolean value, which means we need to provide a \"No value\"\n // option\n const label = choiceMap[getBoolean(value)];\n return label\n ? {\n label,\n value,\n }\n : {};\n }\n\n if (value === 'no-value') {\n return {\n label: intl.formatMessage(messages.no_value),\n value: 'no-value',\n };\n }\n\n if (value === undefined || !value || value.length === 0) return null;\n\n if (Array.isArray(value)) {\n // a list of values, like ['foo', 'bar'];\n return value.map((v) => normalizeValue(choices, v));\n }\n\n if (isObject(value)) {\n // an object like `{label, value}` or `{ title, value }`\n return normalizeSingleSelectOption(value, intl);\n }\n\n // fallback: treat value as a token and look it up in choices\n return Object.keys(choiceMap).includes(value)\n ? { label: choiceMap[value], value }\n : { label: value, value };\n}\n"],"mappings":";;;AACA,SAASA,UAAT,QAA2B,sBAA3B;AACA,SAASC,cAAT,QAA+B,YAA/B;AAEA,MAAMC,QAAQ,GAAGD,cAAc,CAAC;EAC9BE,QAAQ;IAAA;IAAA;EAAA;AADsB,CA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AQ,CAACC,QAA5B,CADF;MAELE,KAAK,EAAE;IAFF,CAAP;EAID;;EAED,IAAIA,KAAK,KAAKgB,SAAV,IAAuB,CAAChB,KAAxB,IAAiCA,KAAK,CAACY,MAAN,KAAiB,CAAtD,EAAyD,OAAO,IAAP;;EAEzD,IAAIT,KAAK,CAACC,OAAN,CAAcJ,KAAd,CAAJ,EAA0B;IACxB;IACA,OAAOA,KAAK,CAACM,GAAN,CAAWC,CAAD,IAAOc,cAAc,CAACC,OAAD,EAAUf,CAAV,CAA/B,CAAP;EACD;;EAED,IAAI,UAASP,KAAT,CAAJ,EAAqB;IACnB;IACA,OAAOU,2BAA2B,CAACV,KAAD,EAAQW,IAAR,CAAlC;EACD,CAtCkD,CAwCnD;;;EACA,OAAOa,MAAM,CAACE,IAAP,CAAYH,SAAZ,EAAuBI,QAAvB,CAAgC3B,KAAhC,IACH;IAAEa,KAAK,EAAEU,SAAS,CAACvB,KAAD,CAAlB;IAA2BA;EAA3B,CADG,GAEH;IAAEa,KAAK,EAAEb,KAAT;IAAgBA;EAAhB,CAFJ;AAGD"},"metadata":{"react-intl":{"messages":[{"id":"No value","defaultMessage":"No value"}]}},"sourceType":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"var _jsxFileName = \"/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx\";\nvar __jsx = React.createElement;\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport React from 'react';\nimport { Popup } from 'semantic-ui-react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\nexport const MenuList = ({\n children\n}) => {\n return __jsx(DynamicHeightList, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14,\n columnNumber: 10\n }\n }, children);\n};\nexport const SortableMultiValue = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValue\n } = props.reactSelect.components;\n const {\n SortableElement\n } = props.reactSortableHOC; // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n\n const onMouseDown = e => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const innerProps = _objectSpread(_objectSpread({}, props.innerProps), {}, {\n onMouseDown\n });\n\n const SortableComponent = SortableElement(MultiValue);\n return __jsx(SortableComponent, _extends({}, props, {\n innerProps: innerProps,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 10\n }\n }));\n});\nexport const SortableMultiValueLabel = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValueLabel\n } = props.reactSelect.components;\n const {\n SortableHandle\n } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return __jsx(SortableComponent, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 10\n }\n }));\n});\nexport const Option = injectLazyLibs('reactSelect')(props => {\n const {\n Option\n } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon = props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n return __jsx(Option, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 5\n }\n }), __jsx(\"div\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 7\n }\n }, props.label), __jsx(Icon, {\n name: svgIcon,\n size: \"20px\",\n color: color,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 7\n }\n }));\n});\nexport const DropdownIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n DropdownIndicator\n } = props.reactSelect.components;\n return __jsx(DropdownIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 5\n }\n }), props.selectProps.menuIsOpen ? __jsx(Icon, {\n name: upSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 9\n }\n }) : __jsx(Icon, {\n name: downSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 9\n }\n }));\n});\nexport const ClearIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n ClearIndicator\n } = props.reactSelect.components;\n return __jsx(ClearIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 5\n }\n }), __jsx(Icon, {\n name: clearSVG,\n size: \"18px\",\n color: \"#e40166\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 7\n }\n }));\n});\nexport const Group = injectLazyLibs('reactSelect')(props => {\n const {\n Group\n } = props.reactSelect.components;\n return __jsx(Group, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 84,\n columnNumber: 10\n }\n }));\n});\nexport const MultiValueContainer = injectLazyLibs('reactSelect')(props => {\n const {\n MultiValueContainer\n } = props.reactSelect.components;\n return __jsx(React.Fragment, null, __jsx(Popup, {\n content: __jsx(\"div\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92,\n columnNumber: 18\n }\n }, \"Hello\"),\n trigger: __jsx(MultiValueContainer, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93,\n columnNumber: 18\n }\n })),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91,\n columnNumber: 7\n }\n }), __jsx(MultiValueContainer, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95,\n columnNumber: 7\n }\n })));\n});\nexport const selectTheme = theme => _objectSpread(_objectSpread({}, theme), {}, {\n borderRadius: 0,\n colors: _objectSpread(_objectSpread({}, theme.colors), {}, {\n primary25: 'hotpink',\n primary: '#b8c6c8'\n })\n});\nexport const customSelectStyles = {\n control: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px'\n }),\n menu: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2\n }),\n indicatorSeparator: styles => _objectSpread(_objectSpread({}, styles), {}, {\n width: null\n }),\n valueContainer: styles => _objectSpread(_objectSpread({}, styles), {}, {\n paddingLeft: 0\n }),\n dropdownIndicator: styles => ({\n paddingRight: 0\n }),\n clearIndicator: styles => ({\n color: '#e40166'\n }),\n option: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected ? '#007bc1' : state.isDisabled ? '#b5b5b5' : state.isFocused ? '#4a4a4a' : 'inherit',\n ':active': {\n backgroundColor: null\n },\n svg: {\n flex: '0 0 auto'\n }\n })\n};","map":{"version":3,"names":["React","Popup","injectLazyLibs","Icon","DynamicHeightList","downSVG","upSVG","checkSVG","checkBlankSVG","clearSVG","MenuList","children","SortableMultiValue","props","MultiValue","reactSelect","components","SortableElement","reactSortableHOC","onMouseDown","e","preventDefault","stopPropagation","innerProps","SortableComponent","SortableMultiValueLabel","MultiValueLabel","SortableHandle","Option","color","isFocused","isSelected","svgIcon","label","DropdownIndicator","selectProps","menuIsOpen","ClearIndicator","Group","MultiValueContainer","selectTheme","theme","borderRadius","colors","primary25","primary","customSelectStyles","control","styles","state","border","borderBottom","boxShadow","borderBottomStyle","minHeight","menu","top","marginTop","zIndex","indicatorSeparator","width","valueContainer","paddingLeft","dropdownIndicator","paddingRight","clearIndicator","option","backgroundColor","display","justifyContent","alignItems","padding","isDisabled","svg","flex"],"sources":["/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx"],"sourcesContent":["import React from 'react';\nimport { Popup } from 'semantic-ui-react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\n\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\n\nexport const MenuList = ({ children }) => {\n return <DynamicHeightList>{children}</DynamicHeightList>;\n};\n\nexport const SortableMultiValue = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValue } = props.reactSelect.components;\n const { SortableElement } = props.reactSortableHOC;\n // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n const onMouseDown = (e) => {\n e.preventDefault();\n e.stopPropagation();\n };\n const innerProps = { ...props.innerProps, onMouseDown };\n const SortableComponent = SortableElement(MultiValue);\n return <SortableComponent {...props} innerProps={innerProps} />;\n});\n\nexport const SortableMultiValueLabel = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValueLabel } = props.reactSelect.components;\n const { SortableHandle } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return <SortableComponent {...props} />;\n});\n\nexport const Option = injectLazyLibs('reactSelect')((props) => {\n const { Option } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon =\n props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n\n return (\n <Option {...props}>\n <div>{props.label}</div>\n <Icon name={svgIcon} size=\"20px\" color={color} />\n </Option>\n );\n});\n\nexport const DropdownIndicator = injectLazyLibs('reactSelect')((props) => {\n const { DropdownIndicator } = props.reactSelect.components;\n return (\n <DropdownIndicator {...props}>\n {props.selectProps.menuIsOpen ? (\n <Icon name={upSVG} size=\"24px\" color=\"#007bc1\" />\n ) : (\n <Icon name={downSVG} size=\"24px\" color=\"#007bc1\" />\n )}\n </DropdownIndicator>\n );\n});\n\nexport const ClearIndicator = injectLazyLibs('reactSelect')((props) => {\n const { ClearIndicator } = props.reactSelect.components;\n return (\n <ClearIndicator {...props}>\n <Icon name={clearSVG} size=\"18px\" color=\"#e40166\" />\n </ClearIndicator>\n );\n});\n\nexport const Group = injectLazyLibs('reactSelect')((props) => {\n const { Group } = props.reactSelect.components;\n return <Group {...props}></Group>;\n});\n\nexport const MultiValueContainer = injectLazyLibs('reactSelect')((props) => {\n const { MultiValueContainer } = props.reactSelect.components;\n return (\n <>\n <Popup\n content={<div>Hello</div>}\n trigger={<MultiValueContainer {...props}></MultiValueContainer>}\n />\n <MultiValueContainer {...props}></MultiValueContainer>\n </>\n );\n});\n\nexport const selectTheme = (theme) => ({\n ...theme,\n borderRadius: 0,\n colors: {\n ...theme.colors,\n primary25: 'hotpink',\n primary: '#b8c6c8',\n },\n});\n\nexport const customSelectStyles = {\n control: (styles, state) => ({\n ...styles,\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px',\n }),\n menu: (styles, state) => ({\n ...styles,\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2,\n }),\n indicatorSeparator: (styles) => ({\n ...styles,\n width: null,\n }),\n valueContainer: (styles) => ({\n ...styles,\n paddingLeft: 0,\n }),\n dropdownIndicator: (styles) => ({\n paddingRight: 0,\n }),\n clearIndicator: (styles) => ({\n color: '#e40166',\n }),\n option: (styles, state) => ({\n ...styles,\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected\n ? '#007bc1'\n : state.isDisabled\n ? '#b5b5b5'\n : state.isFocused\n ? '#4a4a4a'\n : 'inherit',\n ':active': {\n backgroundColor: null,\n },\n svg: {\n flex: '0 0 auto',\n },\n }),\n};\n"],"mappings":";;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA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MAHL;IAINc,OAAO,EAAE,MAJH;IAKNC,cAAc,EAAE,eALV;IAMNC,UAAU,EAAE,QANN;IAONC,OAAO,EAAE,WAPH;IAQN1C,KAAK,EAAEoB,KAAK,CAAClB,UAAN,GACH,SADG,GAEHkB,KAAK,CAACuB,UAAN,GACA,SADA,GAEAvB,KAAK,CAACnB,SAAN,GACA,SADA,GAEA,SAdE;IAeN,WAAW;MACTqC,eAAe,EAAE;IADR,CAfL;IAkBNM,GAAG,EAAE;MACHC,IAAI,EAAE;IADH;EAlBC;AA/BwB,CAA3B"},"metadata":{"react-intl":{"messages":[]}},"sourceType":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"var _jsxFileName = \"/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx\";\nvar __jsx = React.createElement;\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport React from 'react';\nimport { Popup } from 'semantic-ui-react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\nexport const MenuList = ({\n children\n}) => {\n return __jsx(DynamicHeightList, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14,\n columnNumber: 10\n }\n }, children);\n};\nexport const SortableMultiValue = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValue\n } = props.reactSelect.components;\n const {\n SortableElement\n } = props.reactSortableHOC; // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n\n const onMouseDown = e => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const innerProps = _objectSpread(_objectSpread({}, props.innerProps), {}, {\n onMouseDown\n });\n\n const SortableComponent = SortableElement(MultiValue);\n return __jsx(SortableComponent, _extends({}, props, {\n innerProps: innerProps,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 10\n }\n }));\n});\nexport const SortableMultiValueLabel = injectLazyLibs(['reactSelect', 'reactSortableHOC'])(props => {\n const {\n MultiValueLabel\n } = props.reactSelect.components;\n const {\n SortableHandle\n } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return __jsx(SortableComponent, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 10\n }\n }));\n});\nexport const MultiValueContainer = injectLazyLibs('reactSelect')(props => {\n const {\n MultiValueContainer\n } = props.reactSelect.components;\n return __jsx(Popup, {\n content: props.data.label,\n trigger: __jsx(\"div\", _extends({}, props.innerProps, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 9\n }\n }), __jsx(MultiValueContainer, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 11\n }\n }))),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 5\n }\n });\n});\nexport const Option = injectLazyLibs('reactSelect')(props => {\n const {\n Option\n } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon = props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n return __jsx(Option, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 5\n }\n }), __jsx(\"div\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 7\n }\n }, props.label), __jsx(Icon, {\n name: svgIcon,\n size: \"20px\",\n color: color,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 7\n }\n }));\n});\nexport const DropdownIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n DropdownIndicator\n } = props.reactSelect.components;\n return __jsx(DropdownIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 5\n }\n }), props.selectProps.menuIsOpen ? __jsx(Icon, {\n name: upSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79,\n columnNumber: 9\n }\n }) : __jsx(Icon, {\n name: downSVG,\n size: \"24px\",\n color: \"#007bc1\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81,\n columnNumber: 9\n }\n }));\n});\nexport const ClearIndicator = injectLazyLibs('reactSelect')(props => {\n const {\n ClearIndicator\n } = props.reactSelect.components;\n return __jsx(ClearIndicator, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90,\n columnNumber: 5\n }\n }), __jsx(Icon, {\n name: clearSVG,\n size: \"18px\",\n color: \"#e40166\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91,\n columnNumber: 7\n }\n }));\n});\nexport const Group = injectLazyLibs('reactSelect')(props => {\n const {\n Group\n } = props.reactSelect.components;\n return __jsx(Group, _extends({}, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 98,\n columnNumber: 10\n }\n }));\n});\nexport const selectTheme = theme => _objectSpread(_objectSpread({}, theme), {}, {\n borderRadius: 0,\n colors: _objectSpread(_objectSpread({}, theme.colors), {}, {\n primary25: 'hotpink',\n primary: '#b8c6c8'\n })\n});\nexport const customSelectStyles = {\n control: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px'\n }),\n menu: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2\n }),\n indicatorSeparator: styles => _objectSpread(_objectSpread({}, styles), {}, {\n width: null\n }),\n valueContainer: styles => _objectSpread(_objectSpread({}, styles), {}, {\n paddingLeft: 0\n }),\n dropdownIndicator: styles => ({\n paddingRight: 0\n }),\n clearIndicator: styles => ({\n color: '#e40166'\n }),\n option: (styles, state) => _objectSpread(_objectSpread({}, styles), {}, {\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected ? '#007bc1' : state.isDisabled ? '#b5b5b5' : state.isFocused ? '#4a4a4a' : 'inherit',\n ':active': {\n backgroundColor: null\n },\n svg: {\n flex: '0 0 auto'\n }\n })\n};","map":{"version":3,"names":["React","Popup","injectLazyLibs","Icon","DynamicHeightList","downSVG","upSVG","checkSVG","checkBlankSVG","clearSVG","MenuList","children","SortableMultiValue","props","MultiValue","reactSelect","components","SortableElement","reactSortableHOC","onMouseDown","e","preventDefault","stopPropagation","innerProps","SortableComponent","SortableMultiValueLabel","MultiValueLabel","SortableHandle","MultiValueContainer","data","label","Option","color","isFocused","isSelected","svgIcon","DropdownIndicator","selectProps","menuIsOpen","ClearIndicator","Group","selectTheme","theme","borderRadius","colors","primary25","primary","customSelectStyles","control","styles","state","border","borderBottom","boxShadow","borderBottomStyle","minHeight","menu","top","marginTop","zIndex","indicatorSeparator","width","valueContainer","paddingLeft","dropdownIndicator","paddingRight","clearIndicator","option","backgroundColor","display","justifyContent","alignItems","padding","isDisabled","svg","flex"],"sources":["/Users/sneridagh/Development/plone/volto/src/components/manage/Widgets/SelectStyling.jsx"],"sourcesContent":["import React from 'react';\nimport { Popup } from 'semantic-ui-react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\nimport { Icon } from '@plone/volto/components';\nimport DynamicHeightList from '@plone/volto/components/manage/ReactVirtualized/DynamicRowHeightList';\n\nimport downSVG from '@plone/volto/icons/down-key.svg';\nimport upSVG from '@plone/volto/icons/up-key.svg';\nimport checkSVG from '@plone/volto/icons/check.svg';\nimport checkBlankSVG from '@plone/volto/icons/check-blank.svg';\nimport clearSVG from '@plone/volto/icons/clear.svg';\n\nexport const MenuList = ({ children }) => {\n return <DynamicHeightList>{children}</DynamicHeightList>;\n};\n\nexport const SortableMultiValue = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValue } = props.reactSelect.components;\n const { SortableElement } = props.reactSortableHOC;\n // this prevents the menu from being opened/closed when the user clicks\n // on a value to begin dragging it. ideally, detecting a click (instead of\n // a drag) would still focus the control and toggle the menu, but that\n // requires some magic with refs that are out of scope for this example\n const onMouseDown = (e) => {\n e.preventDefault();\n e.stopPropagation();\n };\n const innerProps = { ...props.innerProps, onMouseDown };\n const SortableComponent = SortableElement(MultiValue);\n return <SortableComponent {...props} innerProps={innerProps} />;\n});\n\nexport const SortableMultiValueLabel = injectLazyLibs([\n 'reactSelect',\n 'reactSortableHOC',\n])((props) => {\n const { MultiValueLabel } = props.reactSelect.components;\n const { SortableHandle } = props.reactSortableHOC;\n const SortableComponent = SortableHandle(MultiValueLabel);\n return <SortableComponent {...props} />;\n});\n\nexport const MultiValueContainer = injectLazyLibs('reactSelect')((props) => {\n const { MultiValueContainer } = props.reactSelect.components;\n return (\n <Popup\n content={props.data.label}\n trigger={\n <div {...props.innerProps}>\n <MultiValueContainer {...props} />\n </div>\n }\n />\n );\n});\n\nexport const Option = injectLazyLibs('reactSelect')((props) => {\n const { Option } = props.reactSelect.components;\n const color = props.isFocused && !props.isSelected ? '#b8c6c8' : '#007bc1';\n const svgIcon =\n props.isFocused || props.isSelected ? checkSVG : checkBlankSVG;\n\n return (\n <Option {...props}>\n <div>{props.label}</div>\n <Icon name={svgIcon} size=\"20px\" color={color} />\n </Option>\n );\n});\n\nexport const DropdownIndicator = injectLazyLibs('reactSelect')((props) => {\n const { DropdownIndicator } = props.reactSelect.components;\n return (\n <DropdownIndicator {...props}>\n {props.selectProps.menuIsOpen ? (\n <Icon name={upSVG} size=\"24px\" color=\"#007bc1\" />\n ) : (\n <Icon name={downSVG} size=\"24px\" color=\"#007bc1\" />\n )}\n </DropdownIndicator>\n );\n});\n\nexport const ClearIndicator = injectLazyLibs('reactSelect')((props) => {\n const { ClearIndicator } = props.reactSelect.components;\n return (\n <ClearIndicator {...props}>\n <Icon name={clearSVG} size=\"18px\" color=\"#e40166\" />\n </ClearIndicator>\n );\n});\n\nexport const Group = injectLazyLibs('reactSelect')((props) => {\n const { Group } = props.reactSelect.components;\n return <Group {...props}></Group>;\n});\n\nexport const selectTheme = (theme) => ({\n ...theme,\n borderRadius: 0,\n colors: {\n ...theme.colors,\n primary25: 'hotpink',\n primary: '#b8c6c8',\n },\n});\n\nexport const customSelectStyles = {\n control: (styles, state) => ({\n ...styles,\n border: 'none',\n borderBottom: '1px solid #c7d5d8',\n boxShadow: 'none',\n borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',\n minHeight: '60px',\n }),\n menu: (styles, state) => ({\n ...styles,\n top: null,\n marginTop: 0,\n boxShadow: 'none',\n borderBottom: '1px solid #c7d5d8',\n zIndex: 2,\n }),\n indicatorSeparator: (styles) => ({\n ...styles,\n width: null,\n }),\n valueContainer: (styles) => ({\n ...styles,\n paddingLeft: 0,\n }),\n dropdownIndicator: (styles) => ({\n paddingRight: 0,\n }),\n clearIndicator: (styles) => ({\n color: '#e40166',\n }),\n option: (styles, state) => ({\n ...styles,\n backgroundColor: null,\n minHeight: '50px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '12px 12px',\n color: state.isSelected\n ? '#007bc1'\n : state.isDisabled\n ? '#b5b5b5'\n : state.isFocused\n ? '#4a4a4a'\n : 'inherit',\n ':active': {\n backgroundColor: null,\n },\n svg: {\n flex: '0 0 auto',\n },\n }),\n};\n"],"mappings":";;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,KAAT,QAAsB,mBAAtB;AACA,SAASC,cAAT,QAA+B,wCAA/B;AACA,SAASC,IAAT,QAAqB,yBAArB;AACA,OAAOC,iBAAP,MAA8B,sEAA9B;AAEA,OAAOC,OAAP,MAAoB,iCAApB;AACA,OAAOC,KAAP,MAAkB,+BAAlB;AACA,OAAOC,QAAP,MAAqB,8BAArB;AACA,OAAOC,aAAP,MAA0B,oCAA1B;AACA,OAAOC,QAAP,MAAqB,8BAArB;AAEA,OAAO,MAAMC,QAAQ,GAAG,CAAC;EAAEC;AAAF,CAAD,KAAkB;EACxC,OAAO,MAAC,iBAAD;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GAAoBA,QAApB,CAAP;AACD,CAFM;AAIP,OAAO,MA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BAHP;IAIPC,SAAS,EAAE,MAJJ;IAKPC,iBAAiB,EAAEJ,KAAK,CAACZ,UAAN,GAAmB,QAAnB,GAA8B,OAL1C;IAMPiB,SAAS,EAAE;EANJ,EADuB;EAShCC,IAAI,EAAE,CAACP,MAAD,EAASC,KAAT,qCACDD,MADC;IAEJQ,GAAG,EAAE,IAFD;IAGJC,SAAS,EAAE,CAHP;IAIJL,SAAS,EAAE,MAJP;IAKJD,YAAY,EAAE,mBALV;IAMJO,MAAM,EAAE;EANJ,EAT0B;EAiBhCC,kBAAkB,EAAGX,MAAD,oCACfA,MADe;IAElBY,KAAK,EAAE;EAFW,EAjBY;EAqBhCC,cAAc,EAAGb,MAAD,oCACXA,MADW;IAEdc,WAAW,EAAE;EAFC,EArBgB;EAyBhCC,iBAAiB,EAAGf,MAAD,KAAa;IAC9BgB,YAAY,EAAE;EADgB,CAAb,CAzBa;EA4BhCC,cAAc,EAAGjB,MAAD,KAAa;IAC3BjB,KAAK,EAAE;EADoB,CAAb,CA5BgB;EA+BhCmC,MAAM,EAAE,CAAClB,MAAD,EAASC,KAAT,qCACHD,MADG;IAENmB,eAAe,EAAE,IAFX;IAGNb,SAAS,EAAE,MAHL;IAINc,OAAO,EAAE,MAJH;IAKNC,cAAc,EAAE,eALV;IAMNC,UAAU,EAAE,QANN;IAONC,OAAO,EAAE,WAPH;IAQNxC,KAAK,EAAEkB,KAAK,CAAChB,UAAN,GACH,SADG,GAEHgB,KAAK,CAACuB,UAAN,GACA,SADA,GAEAvB,KAAK,CAACjB,SAAN,GACA,SADA,GAEA,SAdE;IAeN,WAAW;MACTmC,eAAe,EAAE;IADR,CAfL;IAkBNM,GAAG,EAAE;MACHC,IAAI,EAAE;IADH;EAlBC;AA/BwB,CAA3B"},"metadata":{"react-intl":{"messages":[]}},"sourceType":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _defineProperty from \"/Users/sneridagh/Development/plone/volto/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nvar _jsxFileName = \"/Users/sneridagh/Development/plone/volto/src/components/manage/Controlpanels/Rules/Rules.jsx\";\nvar __jsx = React.createElement;\n\n/**\n * Moderate content rules component.\n * @module components/manage/Controlpanels/Rules/Rules\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { compose } from 'redux';\nimport { Link } from 'react-router-dom';\nimport { getBaseUrl, getParentUrl, Helmet } from '@plone/volto/helpers';\nimport { Portal } from 'react-portal';\nimport { Button, Checkbox, Container, Form, Header, Segment, Table } from 'semantic-ui-react';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\nimport { Icon, Toolbar } from '@plone/volto/components';\nimport { toast } from 'react-toastify';\nimport { Toast } from '@plone/volto/components';\nimport { getControlPanelRules, deleteControlPanelRule, getContentRulesEvents, editRule } from '@plone/volto/actions';\nimport backSVG from '@plone/volto/icons/back.svg';\nconst messages = defineMessages({\n back: {\n \"id\": \"Back\",\n \"defaultMessage\": \"Back\"\n },\n rules: {\n \"id\": \"Content Rules\",\n \"defaultMessage\": \"Content Rules\"\n },\n success: {\n \"id\": \"Success\",\n \"defaultMessage\": \"Success\"\n },\n delete: {\n \"id\": \"Deleted\",\n \"defaultMessage\": \"Deleted\"\n },\n enable: {\n \"id\": \"Rule enable changed\",\n \"defaultMessage\": \"Rule enable changed\"\n }\n});\n/**\n * Rules class.\n * @class Rules\n * @extends Component\n */\n\nclass Rules extends Component {\n /**\n * Property types.\n * @property {Object} propTypes Property types.\n * @static\n */\n\n /**\n * Constructor\n * @method constructor\n * @param {Object} props Component properties\n * @constructs Rules\n */\n constructor(props) {\n super(props);\n this.state = {\n isClient: false,\n selectedFilters: [],\n selectedRules: []\n };\n }\n /**\n * Component did mount\n * @method componentDidMount\n * @returns {undefined}\n */\n\n\n componentDidMount() {\n this.props.getControlPanelRules(getBaseUrl(this.props.pathname));\n this.props.getContentRulesEvents(getBaseUrl(this.props.pathname));\n this.setState({\n isClient: true\n });\n }\n /**\n * Component did mount\n * @method componentDidUpdate\n * @returns {undefined}\n */\n\n\n componentDidUpdate(prevProps, prevState) {\n if (prevProps.rules !== this.props.rules && this.props.rules.items) {\n this.setState({\n selectedRules: this.props.rules.items\n });\n }\n\n if (prevState.selectedFilters !== this.state.selectedFilters && this.props.rules.items) {\n if (this.state.selectedFilters.length > 0) {\n let filteredRules = this.props.rules.items.filter(rule => this.state.selectedFilters.includes(rule.trigger));\n this.setState({\n selectedRules: filteredRules\n });\n } else {\n this.setState({\n selectedRules: this.props.rules.items\n });\n }\n }\n }\n /**\n * Component will receive props\n * @method componentWillReceiveProps\n * @param {Object} nextProps Next properties\n * @returns {undefined}\n */\n\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.props.indivRule.edit.loading && nextProps.indivRule.edit.loaded) {\n toast.success(__jsx(Toast, {\n success: true,\n title: this.props.intl.formatMessage(messages.success),\n content: this.props.intl.formatMessage(messages.enable),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139,\n columnNumber: 9\n }\n }));\n this.props.getControlPanelRules(getBaseUrl(this.props.pathname));\n }\n\n if (this.props.indivRule.delete.loading && nextProps.indivRule.delete.loaded) {\n this.props.getControlPanelRules(getBaseUrl(this.props.pathname));\n toast.success(__jsx(Toast, {\n success: true,\n title: this.props.intl.formatMessage(messages.success),\n content: this.props.intl.formatMessage(messages.delete),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 154,\n columnNumber: 9\n }\n }));\n }\n }\n /**\n * Back/Cancel handler\n * @method onCancel\n * @returns {undefined}\n */\n\n\n onCancel() {\n this.props.history.push(getParentUrl(this.props.pathname));\n }\n /**\n * Select filter type handler\n * @method handleSelectFilterType\n * @returns {undefined}\n */\n\n\n handleSelectFilterType(type) {\n this.setState({\n filterType: type\n });\n }\n /**\n * Add Rule handler\n * @method handleAddRule\n * @returns {undefined}\n */\n\n\n handleAddRule() {\n this.props.history.push(`${this.props.pathname}/add`);\n }\n /**\n * Configure Rule handler\n * @method handleConfigure\n * @returns {undefined}\n */\n\n\n handleConfigure(ruleId) {\n this.props.history.push(`${this.props.pathname}/${ruleId}/configure`);\n }\n /**\n * Edit Rule handler\n * @method handleEdit\n * @returns {undefined}\n */\n\n\n handleEdit(ruleId) {\n this.props.history.push(`${this.props.pathname}/${ruleId}/edit`);\n }\n /**\n * Delete Rule handler\n * @method handleDelete\n * @returns {undefined}\n */\n\n\n handleDelete(ruleId) {\n this.props.deleteControlPanelRule(getBaseUrl(this.props.pathname), ruleId);\n }\n /**\n * Set filter handler\n * @method handleSetFilters\n * @returns {undefined}\n */\n\n\n handleSetFilters(value) {\n if (!this.state.selectedFilters.includes(value)) {\n this.setState({\n selectedFilters: [...this.state.selectedFilters, value]\n });\n } else {\n this.setState({\n selectedFilters: this.state.selectedFilters.filter(f => f !== value)\n });\n }\n }\n /**\n *Enable rule handler\n * @method handleEnableRule\n * @returns {undefined}\n */\n\n\n handleEnableRule(rule) {\n const {\n id,\n cascading,\n description,\n enabled,\n event,\n stop,\n title\n } = rule;\n this.props.editRule(getBaseUrl(this.props.pathname), {\n id,\n cascading,\n description,\n enabled: !enabled,\n event,\n stop,\n title\n }, id);\n }\n /**\n * Render method.\n * @method render\n * @returns {string} Markup for the component.\n */\n\n\n render() {\n return __jsx(\"div\", {\n id: \"page-rules\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 255,\n columnNumber: 7\n }\n }, __jsx(Helmet, {\n title: this.props.intl.formatMessage(messages.rules),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 256,\n columnNumber: 9\n }\n }), __jsx(Container, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 257,\n columnNumber: 9\n }\n }, __jsx(\"article\", {\n id: \"content\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 258,\n columnNumber: 11\n }\n }, __jsx(Segment.Group, {\n raised: true,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 259,\n columnNumber: 13\n }\n }, __jsx(Segment, {\n className: \"primary\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 260,\n columnNumber: 15\n }\n }, __jsx(FormattedMessage, {\n id: \"Content Rules\",\n defaultMessage: \"Content Rules\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 261,\n columnNumber: 17\n }\n })), __jsx(Segment, {\n className: \"secondary\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 266,\n columnNumber: 15\n }\n }, __jsx(FormattedMessage, {\n id: \"Use the form below to define, change or remove content rules. Rules will automatically perform actions on content when certain triggers take place. After defining rules, you may want to go to a folder to assign them, using the 'rules' item in the actions menu.\",\n defaultMessage: \"Use the form below to define, change or remove content rules. Rules will automatically perform actions on content when certain triggers take place. After defining rules, you may want to go to a folder to assign them, using the 'rules' item in the actions menu.\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 267,\n columnNumber: 17\n }\n })), __jsx(Segment, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 286,\n columnNumber: 15\n }\n }, __jsx(Header, {\n size: \"small\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 287,\n columnNumber: 17\n }\n }, __jsx(FormattedMessage, {\n id: \"Filter Rules:\",\n defaultMessage: \"Filter Rules:\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 288,\n columnNumber: 19\n }\n })), __jsx(Form, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 293,\n columnNumber: 17\n }\n }, __jsx(\"div\", {\n style: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 294,\n columnNumber: 19\n }\n }, this.props.events && this.props.events.items && this.props.events.items.length > 0 && this.props.events.items.map(event => {\n return {\n label: event.title,\n value: event.title\n };\n }).map((o, i) => __jsx(Form.Field, {\n style: {\n marginRight: '15px'\n },\n key: i,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 308,\n columnNumber: 27\n }\n }, __jsx(Checkbox, {\n onChange: (e, _ref) => {\n let {\n value\n } = _ref;\n return this.handleSetFilters(value);\n },\n checked: this.state.selectedFilters.includes[o.value],\n value: o.value,\n label: o.label,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 309,\n columnNumber: 29\n }\n }))))), __jsx(Table, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 323,\n columnNumber: 17\n }\n }, __jsx(Table.Body, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 324,\n columnNumber: 19\n }\n }, __jsx(Table.Row, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 325,\n columnNumber: 21\n }\n }, __jsx(Table.HeaderCell, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 326,\n columnNumber: 23\n }\n }, __jsx(FormattedMessage, {\n id: \"Content Rule\",\n defaultMessage: \"Content Rule\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 327,\n columnNumber: 25\n }\n })), __jsx(Table.HeaderCell, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 332,\n columnNumber: 23\n }\n }, __jsx(FormattedMessage, {\n id: \"Event\",\n defaultMessage: \"Event\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 333,\n columnNumber: 25\n }\n })), __jsx(Table.HeaderCell, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 335,\n columnNumber: 23\n }\n }, __jsx(FormattedMessage, {\n id: \"Status\",\n defaultMessage: \"Status\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 336,\n columnNumber: 25\n }\n })), __jsx(Table.HeaderCell, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 338,\n columnNumber: 23\n }\n }, __jsx(FormattedMessage, {\n id: \"Actions\",\n defaultMessage: \"Actions\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 339,\n columnNumber: 25\n }\n }))), this.state.selectedRules && this.state.selectedRules.length > 0 && this.state.selectedRules.map((rule, i) => __jsx(Table.Row, {\n key: i,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 348,\n columnNumber: 25\n }\n }, __jsx(Table.Cell, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 349,\n columnNumber: 27\n }\n }, __jsx(\"p\", {\n style: {\n fontSize: '16px'\n },\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 350,\n columnNumber: 29\n }\n }, rule.title), __jsx(\"p\", {\n style: {\n fontSize: '14px'\n },\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 351,\n columnNumber: 29\n }\n }, rule.description)), __jsx(Table.Cell, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 355,\n columnNumber: 27\n }\n }, __jsx(\"p\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 356,\n columnNumber: 29\n }\n }, rule.trigger)), __jsx(Table.Cell, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 358,\n columnNumber: 27\n }\n }, __jsx(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'center'\n },\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 359,\n columnNumber: 29\n }\n }, __jsx(Checkbox, {\n onChange: (e, o) => this.handleEnableRule(rule),\n checked: rule.enabled,\n value: rule.enabled,\n label: \"enabled\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 362,\n columnNumber: 31\n }\n }), !rule.assigned && __jsx(\"p\", {\n style: {\n marginLeft: '5px',\n padding: '3px',\n backgroundColor: '#ffc106',\n borderRadius: '5px',\n fontSize: '10px',\n fontWeight: 'bold'\n },\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 369,\n columnNumber: 33\n }\n }, \"not assigned\"))), __jsx(Table.Cell, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 384,\n columnNumber: 27\n }\n }, __jsx(\"div\", {\n style: {\n display: 'flex'\n },\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 385,\n columnNumber: 29\n }\n }, __jsx(Button, {\n size: \"mini\",\n primary: true,\n onClick: () => this.handleConfigure(rule.id),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 386,\n columnNumber: 31\n }\n }, \"Configure\"), __jsx(Button, {\n size: \"mini\",\n secondary: true,\n onClick: () => this.handleEdit(rule.id),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 393,\n columnNumber: 31\n }\n }, \"Edit\"), __jsx(Button, {\n size: \"mini\",\n color: \"youtube\",\n onClick: () => this.handleDelete(rule.id),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 400,\n columnNumber: 31\n }\n }, \"Delete\"))))))), __jsx(Button, {\n onClick: () => this.handleAddRule(),\n primary: true,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 413,\n columnNumber: 17\n }\n }, __jsx(FormattedMessage, {\n id: \"Add content rule\",\n defaultMessage: \"Add content rule\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 414,\n columnNumber: 19\n }\n })))))), this.state.isClient && __jsx(Portal, {\n node: document.getElementById('toolbar'),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 424,\n columnNumber: 11\n }\n }, __jsx(Toolbar, {\n pathname: this.props.pathname,\n hideDefaultViewButtons: true,\n inner: __jsx(Link, {\n className: \"item\",\n to: \"#\",\n onClick: () => this.onCancel(),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 429,\n columnNumber: 17\n }\n }, __jsx(Icon, {\n name: backSVG,\n className: \"contents circled\",\n size: \"30px\",\n title: this.props.intl.formatMessage(messages.back),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 430,\n columnNumber: 19\n }\n })),\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 425,\n columnNumber: 13\n }\n })));\n }\n\n}\n\n_defineProperty(Rules, \"propTypes\", {\n getControlPanelRules: PropTypes.func.isRequired,\n deleteControlPanelRule: PropTypes.func.isRequired,\n getContentRulesEvents: PropTypes.func.isRequired,\n editRule: PropTypes.func.isRequired\n});\n\nexport default compose(injectIntl, connect((state, props) => ({\n indivRule: state.controlpanelrule,\n rules: state.controlpanelrules,\n events: state.contentrulesevents,\n pathname: props.location.pathname\n}), {\n getControlPanelRules,\n deleteControlPanelRule,\n getContentRulesEvents,\n editRule\n}))(Rules);","map":{"version":3,"names":["React","Component","PropTypes","connect","compose","Link","getBaseUrl","getParentUrl","Helmet","Portal","Button","Checkbox","Container","Form","Header","Segment","Table","FormattedMessage","defineMessages","injectIntl","Icon","Toolbar","toast","Toast","getControlPanelRules","deleteControlPanelRule","getContentRulesEvents","editRule","backSVG","messages","back","rules","success","delete","enable","Rules","constructor","props","state","isClient","selectedFilters","selectedRules","componentDidMount","pathname","setState","componentDidUpdate","prevProps","prevState","items","length","filteredRules","filter","rule","includes","trigger","UNSAFE_componentWillReceiveProps","nextProps","indivRule","edit","loading","loaded","intl","formatMessage","onCancel","history","push","handleSelectFilterType","type","filterType","handleAddRule","handleConfigure","ruleId","handleEdit","handleDelete","handleSetFilters","value","f","handleEnableRule","id","cascading","description","enabled","event","stop","title","render","display","flexWrap","events","map","label","o","i","marginRight","e","fontSize","alignItems","assigned","marginLeft","padding","backgroundColor","borderRadius","fontWeight","document","getElementById","func","isRequired","controlpanelrule","controlpanelrules","contentrulesevents","location"],"sources":["/Users/sneridagh/Development/plone/volto/src/components/manage/Controlpanels/Rules/Rules.jsx"],"sourcesContent":["/**\n * Moderate content rules component.\n * @module components/manage/Controlpanels/Rules/Rules\n */\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { compose } from 'redux';\nimport { Link } from 'react-router-dom';\nimport { getBaseUrl, getParentUrl, Helmet } from '@plone/volto/helpers';\nimport { Portal } from 'react-portal';\nimport {\n Button,\n Checkbox,\n Container,\n Form,\n Header,\n Segment,\n Table,\n} from 'semantic-ui-react';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\nimport { Icon, Toolbar } from '@plone/volto/components';\nimport { toast } from 'react-toastify';\nimport { Toast } from '@plone/volto/components';\n\nimport {\n getControlPanelRules,\n deleteControlPanelRule,\n getContentRulesEvents,\n editRule,\n} from '@plone/volto/actions';\n\nimport backSVG from '@plone/volto/icons/back.svg';\n\nconst messages = defineMessages({\n back: {\n id: 'Back',\n defaultMessage: 'Back',\n },\n rules: {\n id: 'Content Rules',\n defaultMessage: 'Content Rules',\n },\n success: {\n id: 'Success',\n defaultMessage: 'Success',\n },\n delete: {\n id: 'Deleted',\n defaultMessage: 'Deleted',\n },\n enable: {\n id: 'Rule enable changed',\n defaultMessage: 'Rule enable changed',\n },\n});\n\n/**\n * Rules class.\n * @class Rules\n * @extends Component\n */\nclass Rules extends Component {\n /**\n * Property types.\n * @property {Object} propTypes Property types.\n * @static\n */\n static propTypes = {\n getControlPanelRules: PropTypes.func.isRequired,\n deleteControlPanelRule: PropTypes.func.isRequired,\n getContentRulesEvents: PropTypes.func.isRequired,\n editRule: PropTypes.func.isRequired,\n };\n\n /**\n * Constructor\n * @method constructor\n * @param {Object} props Component properties\n * @constructs Rules\n */\n constructor(props) {\n super(props);\n this.state = {\n isClient: false,\n selectedFilters: [],\n selectedRules: [],\n };\n }\n\n /**\n * Component did mount\n * @method componentDidMount\n * @returns {undefined}\n */\n componentDidMount() {\n this.props.getControlPanelRules(getBaseUrl(this.props.pathname));\n this.props.getContentRulesEvents(getBaseUrl(this.props.pathname));\n\n this.setState({ isClient: true });\n }\n\n /**\n * Component did mount\n * @method componentDidUpdate\n * @returns {undefined}\n */\n componentDidUpdate(prevProps, prevState) {\n if (prevProps.rules !== this.props.rules && this.props.rules.items) {\n this.setState({ selectedRules: this.props.rules.items });\n }\n if (\n prevState.selectedFilters !== this.state.selectedFilters &&\n this.props.rules.items\n ) {\n if (this.state.selectedFilters.length > 0) {\n let filteredRules = this.props.rules.items.filter((rule) =>\n this.state.selectedFilters.includes(rule.trigger),\n );\n this.setState({\n selectedRules: filteredRules,\n });\n } else {\n this.setState({ selectedRules: this.props.rules.items });\n }\n }\n }\n\n /**\n * Component will receive props\n * @method componentWillReceiveProps\n * @param {Object} nextProps Next properties\n * @returns {undefined}\n */\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.props.indivRule.edit.loading && nextProps.indivRule.edit.loaded) {\n toast.success(\n <Toast\n success\n title={this.props.intl.formatMessage(messages.success)}\n content={this.props.intl.formatMessage(messages.enable)}\n />,\n );\n this.props.getControlPanelRules(getBaseUrl(this.props.pathname));\n }\n if (\n this.props.indivRule.delete.loading &&\n nextProps.indivRule.delete.loaded\n ) {\n this.props.getControlPanelRules(getBaseUrl(this.props.pathname));\n\n toast.success(\n <Toast\n success\n title={this.props.intl.formatMessage(messages.success)}\n content={this.props.intl.formatMessage(messages.delete)}\n />,\n );\n }\n }\n\n /**\n * Back/Cancel handler\n * @method onCancel\n * @returns {undefined}\n */\n onCancel() {\n this.props.history.push(getParentUrl(this.props.pathname));\n }\n\n /**\n * Select filter type handler\n * @method handleSelectFilterType\n * @returns {undefined}\n */\n handleSelectFilterType(type) {\n this.setState({ filterType: type });\n }\n\n /**\n * Add Rule handler\n * @method handleAddRule\n * @returns {undefined}\n */\n handleAddRule() {\n this.props.history.push(`${this.props.pathname}/add`);\n }\n\n /**\n * Configure Rule handler\n * @method handleConfigure\n * @returns {undefined}\n */\n handleConfigure(ruleId) {\n this.props.history.push(`${this.props.pathname}/${ruleId}/configure`);\n }\n\n /**\n * Edit Rule handler\n * @method handleEdit\n * @returns {undefined}\n */\n handleEdit(ruleId) {\n this.props.history.push(`${this.props.pathname}/${ruleId}/edit`);\n }\n\n /**\n * Delete Rule handler\n * @method handleDelete\n * @returns {undefined}\n */\n handleDelete(ruleId) {\n this.props.deleteControlPanelRule(getBaseUrl(this.props.pathname), ruleId);\n }\n\n /**\n * Set filter handler\n * @method handleSetFilters\n * @returns {undefined}\n */\n handleSetFilters(value) {\n if (!this.state.selectedFilters.includes(value)) {\n this.setState({\n selectedFilters: [...this.state.selectedFilters, value],\n });\n } else {\n this.setState({\n selectedFilters: this.state.selectedFilters.filter((f) => f !== value),\n });\n }\n }\n\n /**\n *Enable rule handler\n * @method handleEnableRule\n * @returns {undefined}\n */\n handleEnableRule(rule) {\n const { id, cascading, description, enabled, event, stop, title } = rule;\n this.props.editRule(\n getBaseUrl(this.props.pathname),\n { id, cascading, description, enabled: !enabled, event, stop, title },\n id,\n );\n }\n\n /**\n * Render method.\n * @method render\n * @returns {string} Markup for the component.\n */\n render() {\n return (\n <div id=\"page-rules\">\n <Helmet title={this.props.intl.formatMessage(messages.rules)} />\n <Container>\n <article id=\"content\">\n <Segment.Group raised>\n <Segment className=\"primary\">\n <FormattedMessage\n id=\"Content Rules\"\n defaultMessage=\"Content Rules\"\n />\n </Segment>\n <Segment className=\"secondary\">\n <FormattedMessage\n id=\"Use the form below to define, change or remove content rules. Rules will automatically perform actions on content when certain triggers take place. After defining rules, you may want to go to a folder to assign them, using the 'rules' item in the actions menu.\"\n defaultMessage=\"Use the form below to define, change or remove content rules. Rules will automatically perform actions on content when certain triggers take place. After defining rules, you may want to go to a folder to assign them, using the 'rules' item in the actions menu.\"\n />\n </Segment>\n {/* <Segment>\n <Checkbox\n // onChange={(e, { value }) => console.log(value)}\n //checked={}\n value={'disable-globally'}\n label=\"Disable globally\"\n />\n </Segment> */}\n {/* <Segment className=\"secondary\">\n <FormattedMessage\n id=\"Whether or not content rules should be disabled globally. If this is selected, no rules will be executed anywhere in the portal.\"\n defaultMessage=\"Whether or not content rules should be disabled globally. If this is selected, no rules will be executed anywhere in the portal.\"\n />\n </Segment> */}\n <Segment>\n <Header size=\"small\">\n <FormattedMessage\n id=\"Filter Rules:\"\n defaultMessage=\"Filter Rules:\"\n />\n </Header>\n <Form>\n <div\n style={{\n display: 'flex',\n flexWrap: 'wrap',\n }}\n >\n {this.props.events &&\n this.props.events.items &&\n this.props.events.items.length > 0 &&\n this.props.events.items\n .map((event) => {\n return { label: event.title, value: event.title };\n })\n .map((o, i) => (\n <Form.Field style={{ marginRight: '15px' }} key={i}>\n <Checkbox\n onChange={(e, { value }) =>\n this.handleSetFilters(value)\n }\n checked={\n this.state.selectedFilters.includes[o.value]\n }\n value={o.value}\n label={o.label}\n />\n </Form.Field>\n ))}\n </div>\n </Form>\n <Table>\n <Table.Body>\n <Table.Row>\n <Table.HeaderCell>\n <FormattedMessage\n id=\"Content Rule\"\n defaultMessage=\"Content Rule\"\n />\n </Table.HeaderCell>\n <Table.HeaderCell>\n <FormattedMessage id=\"Event\" defaultMessage=\"Event\" />\n </Table.HeaderCell>\n <Table.HeaderCell>\n <FormattedMessage id=\"Status\" defaultMessage=\"Status\" />\n </Table.HeaderCell>\n <Table.HeaderCell>\n <FormattedMessage\n id=\"Actions\"\n defaultMessage=\"Actions\"\n />\n </Table.HeaderCell>\n </Table.Row>\n {this.state.selectedRules &&\n this.state.selectedRules.length > 0 &&\n this.state.selectedRules.map((rule, i) => (\n <Table.Row key={i}>\n <Table.Cell>\n <p style={{ fontSize: '16px' }}>{rule.title}</p>\n <p style={{ fontSize: '14px' }}>\n {rule.description}\n </p>\n </Table.Cell>\n <Table.Cell>\n <p>{rule.trigger}</p>\n </Table.Cell>\n <Table.Cell>\n <div\n style={{ display: 'flex', alignItems: 'center' }}\n >\n <Checkbox\n onChange={(e, o) => this.handleEnableRule(rule)}\n checked={rule.enabled}\n value={rule.enabled}\n label=\"enabled\"\n />\n {!rule.assigned && (\n <p\n style={{\n marginLeft: '5px',\n padding: '3px',\n backgroundColor: '#ffc106',\n borderRadius: '5px',\n fontSize: '10px',\n fontWeight: 'bold',\n }}\n >\n not assigned\n </p>\n )}\n </div>\n </Table.Cell>\n <Table.Cell>\n <div style={{ display: 'flex' }}>\n <Button\n size=\"mini\"\n primary\n onClick={() => this.handleConfigure(rule.id)}\n >\n Configure\n </Button>\n <Button\n size=\"mini\"\n secondary\n onClick={() => this.handleEdit(rule.id)}\n >\n Edit\n </Button>\n <Button\n size=\"mini\"\n color=\"youtube\"\n onClick={() => this.handleDelete(rule.id)}\n >\n Delete\n </Button>\n </div>\n </Table.Cell>\n </Table.Row>\n ))}\n </Table.Body>\n </Table>\n <Button onClick={() => this.handleAddRule()} primary>\n <FormattedMessage\n id=\"Add content rule\"\n defaultMessage=\"Add content rule\"\n />\n </Button>\n </Segment>\n </Segment.Group>\n </article>\n </Container>\n {this.state.isClient && (\n <Portal node={document.getElementById('toolbar')}>\n <Toolbar\n pathname={this.props.pathname}\n hideDefaultViewButtons\n inner={\n <Link className=\"item\" to=\"#\" onClick={() => this.onCancel()}>\n <Icon\n name={backSVG}\n className=\"contents circled\"\n size=\"30px\"\n title={this.props.intl.formatMessage(messages.back)}\n />\n </Link>\n }\n />\n </Portal>\n )}\n </div>\n );\n }\n}\n\nexport default compose(\n injectIntl,\n connect(\n (state, props) => ({\n indivRule: state.controlpanelrule,\n rules: state.controlpanelrules,\n events: state.contentrulesevents,\n\n pathname: props.location.pathname,\n }),\n {\n getControlPanelRules,\n deleteControlPanelRule,\n getContentRulesEvents,\n editRule,\n },\n ),\n)(Rules);\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AAEA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,OAAT,QAAwB,aAAxB;AACA,SAASC,OAAT,QAAwB,OAAxB;AACA,SAASC,IAAT,QAAqB,kBAArB;AACA,SAASC,UAAT,EAAqBC,YAArB,EAAmCC,MAAnC,QAAiD,sBAAjD;AACA,SAASC,MAAT,QAAuB,cAAvB;AACA,SACEC,MADF,EAEEC,QAFF,EAGEC,SAHF,EAIEC,IAJF,EAKEC,MALF,EAMEC,OANF,EAOEC,KA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C;QAAA;QAAA;UAAA;UAAA;UAAA;QAAA;MAAA,GACE,MAAC,IAAD;QACE,IAAI,EAAEnC,OADR;QAEE,SAAS,EAAC,kBAFZ;QAGE,IAAI,EAAC,MAHP;QAIE,KAAK,EAAE,KAAKS,KAAL,CAAWwB,IAAX,CAAgBC,aAAhB,CAA8BjC,QAAQ,CAACC,IAAvC,CAJT;QAAA;QAAA;UAAA;UAAA;UAAA;QAAA;MAAA,EADF,CAJJ;MAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA,EADF,CAzKJ,CADF;EA6LD;;AA3X2B;;gBAAxBK,K,eAMe;EACjBX,oBAAoB,EAAEtB,SAAS,CAACuG,IAAV,CAAeC,UADpB;EAEjBjF,sBAAsB,EAAEvB,SAAS,CAACuG,IAAV,CAAeC,UAFtB;EAGjBhF,qBAAqB,EAAExB,SAAS,CAACuG,IAAV,CAAeC,UAHrB;EAIjB/E,QAAQ,EAAEzB,SAAS,CAACuG,IAAV,CAAeC;AAJR,C;;AAwXrB,eAAetG,OAAO,CACpBe,UADoB,EAEpBhB,OAAO,CACL,CAACmC,KAAD,EAAQD,KAAR,MAAmB;EACjBoB,SAAS,EAAEnB,KAAK,CAACqE,gBADA;EAEjB5E,KAAK,EAAEO,KAAK,CAACsE,iBAFI;EAGjBpB,MAAM,EAAElD,KAAK,CAACuE,kBAHG;EAKjBlE,QAAQ,EAAEN,KAAK,CAACyE,QAAN,CAAenE;AALR,CAAnB,CADK,EAQL;EACEnB,oBADF;EAEEC,sBAFF;EAGEC,qBAHF;EAIEC;AAJF,CARK,CAFa,CAAP,CAiBbQ,KAjBa,CAAf"},"metadata":{"react-intl":{"messages":[{"id":"Back","defaultMessage":"Back"},{"id":"Content Rules","defaultMessage":"Content Rules"},{"id":"Success","defaultMessage":"Success"},{"id":"Deleted","defaultMessage":"Deleted"},{"id":"Rule enable changed","defaultMessage":"Rule enable changed"},{"id":"Use the form below to define, change or remove content rules. Rules will automatically perform actions on content when certain triggers take place. After defining rules, you may want to go to a folder to assign them, using the 'rules' item in the actions menu.","defaultMessage":"Use the form below to define, change or remove content rules. Rules will automatically perform actions on content when certain triggers take place. After defining rules, you may want to go to a folder to assign them, using the 'rules' item in the actions menu."},{"id":"Filter Rules:","defaultMessage":"Filter Rules:"},{"id":"Content Rule","defaultMessage":"Content Rule"},{"id":"Event","defaultMessage":"Event"},{"id":"Status","defaultMessage":"Status"},{"id":"Actions","defaultMessage":"Actions"},{"id":"Add content rule","defaultMessage":"Add content rule"}]}},"sourceType":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"var _window, _window$env, _SENTRY__;\n\nvar __jsx = React.createElement;\nimport '@plone/volto/config'; // This is the bootstrap for the global config - client side\n\nimport '@root/theme';\nimport React from 'react';\nimport { hydrate } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { IntlProvider } from 'react-intl-redux';\nimport { ConnectedRouter } from 'connected-react-router';\nimport { createBrowserHistory } from 'history';\nimport { ReduxAsyncConnect } from '@plone/volto/helpers/AsyncConnect';\nimport loadable, { loadableReady } from '@loadable/component';\nimport { CookiesProvider } from 'react-cookie';\nimport debug from 'debug';\nimport routes from '@root/routes';\nimport config from '@plone/volto/registry';\nimport configureStore from '@plone/volto/store';\nimport { Api, persistAuthToken, ScrollToTop } from '@plone/volto/helpers';\nimport initSentry from '@plone/volto/sentry';\nexport const history = createBrowserHistory();\nconst sentryLibraries = {\n Sentry: loadable.lib({\n resolved: {},\n\n chunkName() {\n return \"s_entry-browser\";\n },\n\n isReady(props) {\n const key = this.resolve(props);\n\n if (this.resolved[key] !== true) {\n return false;\n }\n\n if (typeof __webpack_modules__ !== 'undefined') {\n return !!__webpack_modules__[key];\n }\n\n return false;\n },\n\n importAsync: () => import(\n /* webpackChunkName: \"s_entry-browser\" */\n '@sentry/browser'),\n\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n\n requireSync(props) {\n const id = this.resolve(props);\n\n if (typeof __webpack_require__ !== 'undefined') {\n return __webpack_require__(id);\n }\n\n return eval('module.require')(id);\n },\n\n resolve() {\n if (require.resolveWeak) {\n return require.resolveWeak(\"@sentry/browser\");\n }\n\n return eval('require.resolve')(\"@sentry/browser\");\n }\n\n }),\n SentryIntegrations: loadable.lib({\n resolved: {},\n\n chunkName() {\n return \"sentry-integrations\";\n },\n\n isReady(props) {\n const key = this.resolve(props);\n\n if (this.resolved[key] !== true) {\n return false;\n }\n\n if (typeof __webpack_modules__ !== 'undefined') {\n return !!__webpack_modules__[key];\n }\n\n return false;\n },\n\n importAsync: () => import(\n /* webpackChunkName: \"sentry-integrations\" */\n '@sentry/integrations'),\n\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n\n requireSync(props) {\n const id = this.resolve(props);\n\n if (typeof __webpack_require__ !== 'undefined') {\n return __webpack_require__(id);\n }\n\n return eval('module.require')(id);\n },\n\n resolve() {\n if (require.resolveWeak) {\n return require.resolveWeak(\"@sentry/integrations\");\n }\n\n return eval('require.resolve')(\"@sentry/integrations\");\n }\n\n })\n};\n\nconst loadSentry = () => {\n const loaders = Object.entries(sentryLibraries).map(_ref => {\n let [name, Lib] = _ref;\n return new Promise(resolve => Lib.load().then(mod => resolve([name, mod])));\n });\n Promise.all(loaders).then(libs => {\n const libraries = Object.assign({}, ...libs.map(_ref2 => {\n let [name, lib] = _ref2;\n return {\n [name]: lib\n };\n }));\n initSentry(libraries);\n });\n};\n\nif (__CLIENT__ && (_window = window) !== null && _window !== void 0 && (_window$env = _window.env) !== null && _window$env !== void 0 && _window$env.RAZZLE_SENTRY_DSN || (_SENTRY__ = __SENTRY__) !== null && _SENTRY__ !== void 0 && _SENTRY__.SENTRY_DSN) loadSentry();\n\nfunction reactIntlErrorHandler(error) {\n debug('i18n')(error);\n}\n\nexport default (() => {\n const api = new Api();\n const store = configureStore(window.__data, history, api);\n persistAuthToken(store); // On Cypress we expose the history, the store and the settings\n // so we can access from Cypress and manipulate them\n\n if (window.Cypress) {\n window.appHistory = history;\n window.store = store;\n window.settings = config.settings;\n } // Setup the client registry from the SSR response values, presents in the `window.env`\n // variable. This is key for the Seamless mode to work.\n\n\n if (window.env.apiPath) {\n config.settings.apiPath = window.env.apiPath;\n }\n\n if (window.env.publicURL) {\n config.settings.publicURL = window.env.publicURL;\n } // There are some cases that the client needs to know the internal server URL\n // too, as some helpers (isInternalURL and flattenToAppURL) need to be aware of it.\n // This is specially important when the hydration of the store coming from the first SSR\n // request happens, since there all the server URLs might be the internalApiPath ones,\n // and the client should be able to take care of them properly.\n\n\n if (window.env.RAZZLE_INTERNAL_API_PATH) {\n config.settings.internalApiPath = window.env.RAZZLE_INTERNAL_API_PATH;\n } // TODO: To be removed when the use of the legacy traverse is deprecated.\n\n\n if (window.env.RAZZLE_LEGACY_TRAVERSE) {\n config.settings.legacyTraverse = true;\n }\n\n loadableReady(() => {\n hydrate(__jsx(CookiesProvider, null, __jsx(Provider, {\n store: store\n }, __jsx(IntlProvider, {\n onError: reactIntlErrorHandler\n }, __jsx(ConnectedRouter, {\n history: history\n }, __jsx(ScrollToTop, null, __jsx(ReduxAsyncConnect, {\n routes: routes,\n helpers: api\n })))))), document.getElementById('main'));\n });\n});","map":{"version":3,"names":["React","hydrate","Provider","IntlProvider","ConnectedRouter","createBrowserHistory","ReduxAsyncConnect","loadable","loadableReady","CookiesProvider","debug","routes","config","configureStore","Api","persistAuthToken","ScrollToTop","initSentry","history","sentryLibraries","Sentry","lib","SentryIntegrations","loadSentry","loaders","Object","entries","map","name","Lib","Promise","resolve","load","then","mod","all","libs","libraries","assign","__CLIENT__","window","env","RAZZLE_SENTRY_DSN","__SENTRY__","SENTRY_DSN","reactIntlErrorHandler","error","api","store","__data","Cypress","appHistory","settings","apiPath","publicURL","RAZZLE_INTERNAL_API_PATH","internalApiPath","RAZZLE_LEGACY_TRAVERSE","legacyTraverse","document","getElementById"],"sources":["/Users/sneridagh/Development/plone/volto/src/start-client.jsx"],"sourcesContent":["import '@plone/volto/config'; // This is the bootstrap for the global config - client side\nimport '@root/theme';\nimport React from 'react';\nimport { hydrate } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { IntlProvider } from 'react-intl-redux';\nimport { ConnectedRouter } from 'connected-react-router';\nimport { createBrowserHistory } from 'history';\nimport { ReduxAsyncConnect } from '@plone/volto/helpers/AsyncConnect';\nimport loadable, { loadableReady } from '@loadable/component';\nimport { CookiesProvider } from 'react-cookie';\nimport debug from 'debug';\nimport routes from '@root/routes';\nimport config from '@plone/volto/registry';\n\nimport configureStore from '@plone/volto/store';\nimport { Api, persistAuthToken, ScrollToTop } from '@plone/volto/helpers';\nimport initSentry from '@plone/volto/sentry';\n\nexport const history = createBrowserHistory();\n\nconst sentryLibraries = {\n Sentry: loadable.lib(() =>\n import(/* webpackChunkName: \"s_entry-browser\" */ '@sentry/browser'),\n ),\n SentryIntegrations: loadable.lib(() => import('@sentry/integrations')),\n};\n\nconst loadSentry = () => {\n const loaders = Object.entries(sentryLibraries).map(\n ([name, Lib]) =>\n new Promise((resolve) => Lib.load().then((mod) => resolve([name, mod]))),\n );\n Promise.all(loaders).then((libs) => {\n const libraries = Object.assign(\n {},\n ...libs.map(([name, lib]) => ({ [name]: lib })),\n );\n initSentry(libraries);\n });\n};\n\nif ((__CLIENT__ && window?.env?.RAZZLE_SENTRY_DSN) || __SENTRY__?.SENTRY_DSN)\n loadSentry();\n\nfunction reactIntlErrorHandler(error) {\n debug('i18n')(error);\n}\n\nexport default () => {\n const api = new Api();\n\n const store = configureStore(window.__data, history, api);\n persistAuthToken(store);\n\n // On Cypress we expose the history, the store and the settings\n // so we can access from Cypress and manipulate them\n if (window.Cypress) {\n window.appHistory = history;\n window.store = store;\n window.settings = config.settings;\n }\n\n // Setup the client registry from the SSR response values, presents in the `window.env`\n // variable. This is key for the Seamless mode to work.\n if (window.env.apiPath) {\n config.settings.apiPath = window.env.apiPath;\n }\n if (window.env.publicURL) {\n config.settings.publicURL = window.env.publicURL;\n }\n // There are some cases that the client needs to know the internal server URL\n // too, as some helpers (isInternalURL and flattenToAppURL) need to be aware of it.\n // This is specially important when the hydration of the store coming from the first SSR\n // request happens, since there all the server URLs might be the internalApiPath ones,\n // and the client should be able to take care of them properly.\n if (window.env.RAZZLE_INTERNAL_API_PATH) {\n config.settings.internalApiPath = window.env.RAZZLE_INTERNAL_API_PATH;\n }\n // TODO: To be removed when the use of the legacy traverse is deprecated.\n if (window.env.RAZZLE_LEGACY_TRAVERSE) {\n config.settings.legacyTraverse = true;\n }\n\n loadableReady(() => {\n hydrate(\n <CookiesProvider>\n <Provider store={store}>\n <IntlProvider onError={reactIntlErrorHandler}>\n <ConnectedRouter history={history}>\n <ScrollToTop>\n <ReduxAsyncConnect routes={routes} helpers={api} />\n </ScrollToTop>\n </ConnectedRouter>\n </IntlProvider>\n </Provider>\n </CookiesProvider>,\n document.getElementById('main'),\n );\n });\n};\n"],"mappings":";;;AAAA,OAAO,qBAAP,C,CAA8B;;AAC9B,OAAO,aAAP;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,QAAT,QAAyB,aAAzB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,eAAT,QAAgC,wBAAhC;AACA,SAASC,oBAAT,QAAqC,SAArC;AACA,SAASC,iBAAT,QAAkC,mCAAlC;AACA,OAAOC,QAAP,IAAmBC,aAAnB,QAAwC,qBAAxC;AACA,SAASC,eAAT,QAAgC,cAAhC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,MAAP,MAAmB,uBAAnB;AAEA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,SAASC,GAAT,EAAcC,gBAAd,EAAgCC,WAAhC,QAAmD,sBAAnD;AACA,OAAOC,UAAP,MAAu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AAP,CAAgBI,eAAhB,GAAkChB,MAAM,CAACC,GAAP,CAAWc,wBAA7C;EACD,CA7BkB,CA8BnB;;;EACA,IAAIf,MAAM,CAACC,GAAP,CAAWgB,sBAAf,EAAuC;IACrC7C,MAAM,CAACwC,QAAP,CAAgBM,cAAhB,GAAiC,IAAjC;EACD;;EAEDlD,aAAa,CAAC,MAAM;IAClBP,OAAO,CACL,MAAC,eAAD,QACE,MAAC,QAAD;MAAU,KAAK,EAAE+C;IAAjB,GACE,MAAC,YAAD;MAAc,OAAO,EAAEH;IAAvB,GACE,MAAC,eAAD;MAAiB,OAAO,EAAE3B;IAA1B,GACE,MAAC,WAAD,QACE,MAAC,iBAAD;MAAmB,MAAM,EAAEP,MAA3B;MAAmC,OAAO,EAAEoC;IAA5C,EADF,CADF,CADF,CADF,CADF,CADK,EAYLY,QAAQ,CAACC,cAAT,CAAwB,MAAxB,CAZK,CAAP;EAcD,CAfY,CAAb;AAgBD,CAnDD"},"metadata":{"react-intl":{"messages":[]}},"sourceType":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"/**\n * Root reducer.\n * @module reducers/root\n */\nimport { intlReducer } from 'react-intl-redux';\nimport actions from '@plone/volto/reducers/actions/actions';\nimport addons from '@plone/volto/reducers/addons/addons';\nimport apierror from '@plone/volto/reducers/apierror/apierror';\nimport aliases from '@plone/volto/reducers/aliases/aliases';\nimport breadcrumbs from '@plone/volto/reducers/breadcrumbs/breadcrumbs';\nimport browserdetect from '@plone/volto/reducers/browserdetect/browserdetect';\nimport comments from '@plone/volto/reducers/comments/comments';\nimport content from '@plone/volto/reducers/content/content';\nimport controlpanels from '@plone/volto/reducers/controlpanels/controlpanels';\nimport clipboard from '@plone/volto/reducers/clipboard/clipboard';\nimport diff from '@plone/volto/reducers/diff/diff';\nimport emailNotification from '@plone/volto/reducers/emailNotification/emailNotification';\nimport emailSend from '@plone/volto/reducers/emailSend/emailSend';\nimport form from '@plone/volto/reducers/form/form';\nimport history from '@plone/volto/reducers/history/history';\nimport groups from '@plone/volto/reducers/groups/groups';\nimport messages from '@plone/volto/reducers/messages/messages';\nimport navigation from '@plone/volto/reducers/navigation/navigation';\nimport querystring from '@plone/volto/reducers/querystring/querystring';\nimport querystringsearch from '@plone/volto/reducers/querystringsearch/querystringsearch';\nimport roles from '@plone/volto/reducers/roles/roles';\nimport rules from '@plone/volto/reducers/rules/rules';\nimport controlpanelrule from '@plone/volto/reducers/controlPanelRule/controlPanelRule';\nimport controlpanelrules from '@plone/volto/reducers/controlPanelRules/controlPanelRules';\nimport contentrulesevents from '@plone/volto/reducers/contentRulesEvents/contentRulesEvents';\nimport schema from '@plone/volto/reducers/schema/schema';\nimport search from '@plone/volto/reducers/search/search';\nimport sharing from '@plone/volto/reducers/sharing/sharing';\nimport sidebar from '@plone/volto/reducers/sidebar/sidebar';\nimport types from '@plone/volto/reducers/types/types';\nimport users from '@plone/volto/reducers/users/users';\nimport authRole from '@plone/volto/reducers/authRole/authRole';\nimport userSession from '@plone/volto/reducers/userSession/userSession';\nimport vocabularies from '@plone/volto/reducers/vocabularies/vocabularies';\nimport workflow from '@plone/volto/reducers/workflow/workflow';\nimport toolbar from '@plone/volto/reducers/toolbar/toolbar';\nimport blocksClipboard from '@plone/volto/reducers/blocksClipboard/blocksClipboard';\nimport lazyLibraries from '@plone/volto/reducers/lazyLibraries/lazyLibraries';\nimport contextNavigation from '@plone/volto/reducers/contextNavigation/contextNavigation';\nimport reduxAsyncConnect from './asyncConnect/asyncConnect';\nimport workingCopy from './workingcopy/workingcopy';\nimport transactions from './transactions/transactions';\nimport userschema from './userschema/userschema';\n/**\n * Root reducer.\n * @function\n * @param {Object} state Current state.\n * @param {Object} action Action to be handled.\n * @returns {Object} New state.\n */\n\nconst reducers = {\n intl: intlReducer,\n reduxAsyncConnect,\n actions,\n addons,\n apierror,\n aliases,\n breadcrumbs,\n browserdetect,\n comments,\n content,\n controlpanels,\n clipboard,\n diff,\n emailNotification,\n emailSend,\n form,\n groups,\n history,\n messages,\n navigation,\n querystring,\n querystringsearch,\n roles,\n rules,\n controlpanelrule,\n controlpanelrules,\n contentrulesevents,\n schema,\n search,\n sharing,\n sidebar,\n types,\n users,\n authRole,\n userSession,\n vocabularies,\n workflow,\n toolbar,\n blocksClipboard,\n lazyLibraries,\n contextNavigation,\n workingCopy,\n transactions,\n userschema\n};\nexport default reducers;","map":{"version":3,"names":["intlReducer","actions","addons","apierror","aliases","breadcrumbs","browserdetect","comments","content","controlpanels","clipboard","diff","emailNotification","emailSend","form","history","groups","messages","navigation","querystring","querystringsearch","roles","rules","controlpanelrule","controlpanelrules","contentrulesevents","schema","search","sharing","sidebar","types","users","authRole","userSession","vocabularies","workflow","toolbar","blocksClipboard","lazyLibraries","contextNavigation","reduxAsyncConnect","workingCopy","transactions","userschema","reducers","intl"],"sources":["/Users/sneridagh/Development/plone/volto/src/reducers/index.js"],"sourcesContent":["/**\n * Root reducer.\n * @module reducers/root\n */\n\nimport { intlReducer } from 'react-intl-redux';\n\nimport actions from '@plone/volto/reducers/actions/actions';\nimport addons from '@plone/volto/reducers/addons/addons';\nimport apierror from '@plone/volto/reducers/apierror/apierror';\nimport aliases from '@plone/volto/reducers/aliases/aliases';\nimport breadcrumbs from '@plone/volto/reducers/breadcrumbs/breadcrumbs';\nimport browserdetect from '@plone/volto/reducers/browserdetect/browserdetect';\nimport comments from '@plone/volto/reducers/comments/comments';\nimport content from '@plone/volto/reducers/content/content';\nimport controlpanels from '@plone/volto/reducers/controlpanels/controlpanels';\nimport clipboard from '@plone/volto/reducers/clipboard/clipboard';\nimport diff from '@plone/volto/reducers/diff/diff';\nimport emailNotification from '@plone/volto/reducers/emailNotification/emailNotification';\nimport emailSend from '@plone/volto/reducers/emailSend/emailSend';\nimport form from '@plone/volto/reducers/form/form';\nimport history from '@plone/volto/reducers/history/history';\nimport groups from '@plone/volto/reducers/groups/groups';\nimport messages from '@plone/volto/reducers/messages/messages';\nimport navigation from '@plone/volto/reducers/navigation/navigation';\nimport querystring from '@plone/volto/reducers/querystring/querystring';\nimport querystringsearch from '@plone/volto/reducers/querystringsearch/querystringsearch';\nimport roles from '@plone/volto/reducers/roles/roles';\nimport rules from '@plone/volto/reducers/rules/rules';\nimport controlpanelrule from '@plone/volto/reducers/controlPanelRule/controlPanelRule';\nimport controlpanelrules from '@plone/volto/reducers/controlPanelRules/controlPanelRules';\nimport contentrulesevents from '@plone/volto/reducers/contentRulesEvents/contentRulesEvents';\nimport schema from '@plone/volto/reducers/schema/schema';\nimport search from '@plone/volto/reducers/search/search';\nimport sharing from '@plone/volto/reducers/sharing/sharing';\nimport sidebar from '@plone/volto/reducers/sidebar/sidebar';\nimport types from '@plone/volto/reducers/types/types';\nimport users from '@plone/volto/reducers/users/users';\nimport authRole from '@plone/volto/reducers/authRole/authRole';\nimport userSession from '@plone/volto/reducers/userSession/userSession';\nimport vocabularies from '@plone/volto/reducers/vocabularies/vocabularies';\nimport workflow from '@plone/volto/reducers/workflow/workflow';\nimport toolbar from '@plone/volto/reducers/toolbar/toolbar';\nimport blocksClipboard from '@plone/volto/reducers/blocksClipboard/blocksClipboard';\nimport lazyLibraries from '@plone/volto/reducers/lazyLibraries/lazyLibraries';\nimport contextNavigation from '@plone/volto/reducers/contextNavigation/contextNavigation';\nimport reduxAsyncConnect from './asyncConnect/asyncConnect';\nimport workingCopy from './workingcopy/workingcopy';\nimport transactions from './transactions/transactions';\nimport userschema from './userschema/userschema';\n\n/**\n * Root reducer.\n * @function\n * @param {Object} state Current state.\n * @param {Object} action Action to be handled.\n * @returns {Object} New state.\n */\nconst reducers = {\n intl: intlReducer,\n reduxAsyncConnect,\n actions,\n addons,\n apierror,\n aliases,\n breadcrumbs,\n browserdetect,\n comments,\n content,\n controlpanels,\n clipboard,\n diff,\n emailNotification,\n emailSend,\n form,\n groups,\n history,\n messages,\n navigation,\n querystring,\n querystringsearch,\n roles,\n rules,\n controlpanelrule,\n controlpanelrules,\n contentrulesevents,\n schema,\n search,\n sharing,\n sidebar,\n types,\n users,\n authRole,\n userSession,\n vocabularies,\n workflow,\n toolbar,\n blocksClipboard,\n lazyLibraries,\n contextNavigation,\n workingCopy,\n transactions,\n userschema,\n};\n\nexport default reducers;\n"],"mappings":"AAAA;AACA;AACA;AACA;AAEA,SAASA,WAAT,QAA4B,kBAA5B;AAEA,OAAOC,OAAP,MAAoB,uCAApB;AACA,OAAOC,MAAP,MAAmB,qCAAnB;AACA,OAAOC,QAAP,MAAqB,yCAArB;AACA,OAAOC,OAAP,MAAoB,uCAApB;AACA,OAAOC,WAAP,MAAwB,+CAAxB;AACA,OAAOC,aAAP,MAA0B,mDAA1B;AACA,OAAOC,QAAP,MAAqB,yCAArB;AACA,OAAOC,OAAP,MAAoB,uCAApB;AACA,OAAOC,aAAP,MAA0B,mDAA1B;AACA,OAAOC,SAAP,MAAsB,2CAAtB;AACA,OAAOC,IAAP,MAAiB,iCAAjB;AACA,OAAOC,iBAAP,MAA8B,2DAA9B;AACA,OAAOC,SAAP,MAAsB,2CAAtB;AACA,OAAOC,IAAP,MAAiB,iCAAjB;AACA,OAAOC,OAAP,MAAoB,uCAApB;AACA,OAAOC,MAAP,MAAmB,qCAAnB;AACA,OAAOC,QAAP,MAAqB,yCAArB;AACA,OAAOC,UAAP,MAAuB,6CAAvB;AACA,OAAOC,WAAP,MAAwB,+CAAxB;AACA,OAAOC,iBAAP,MAA8B,2DAA9B;AACA,OAAOC,KAAP,MAAkB,mCAAlB;AACA,OAAOC,KAAP,MAAkB,mCAAlB;AACA,OAAOC,gBAAP,MAA6B,yDAA7B;AACA,OAAOC,iBAAP,MAA8B,2DAA9B;AACA,OAAOC,kBAAP,MAA+B,6DAA/B;AACA,OAAOC,MAAP,MAAmB,qCAAnB;AACA,OAAOC,MAAP,MAAmB,qCAAnB;AACA,OAAOC,OAAP,MAAoB,uCAApB;AACA,OAAOC,OAAP,MAAoB,uCAApB;AACA,OAAOC,KAAP,MAAkB,mCAAlB;AACA,OAAOC,KAAP,MAAkB,mCA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|
+
{"ast":null,"code":"import _extends from \"/Users/sneridagh/Development/plone/volto/node_modules/@babel/runtime/helpers/esm/extends\";\nvar __jsx = React.createElement;\nimport React from 'react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\n\nclass DynamicHeightList extends React.PureComponent {\n // As per `react-virtualized` docs, one should use a PureComponent\n // to avoid performance issues\n // We could have used a React.memo + functional component instead,\n // but relied on the class-based implementation for simplicity\n constructor(props) {\n super(props);\n this._cache = new props.reactVirtualized.CellMeasurerCache({\n fixedWidth: true,\n minHeight: 50\n });\n this._rowRenderer = this._rowRenderer.bind(this);\n }\n\n _rowRenderer(_ref) {\n let {\n index,\n key,\n parent,\n style\n } = _ref;\n const CellMeasurer = this.props.reactVirtualized.CellMeasurer;\n return __jsx(CellMeasurer, {\n cache: this._cache,\n columnIndex: 0,\n key: key,\n rowIndex: index,\n parent: parent\n }, _ref2 => {\n let {\n measure\n } = _ref2;\n return __jsx(\"div\", {\n style: style\n }, this.props.children[index]);\n });\n }\n\n render() {\n var _this$props$children;\n\n const List = this.props.reactVirtualized.List;\n return __jsx(List, _extends({}, this.props, {\n ref: element => {\n this._list = element;\n },\n deferredMeasurementCache: this._cache,\n overscanRowCount: 0,\n rowCount: ((_this$props$children = this.props.children) === null || _this$props$children === void 0 ? void 0 : _this$props$children.length) || 0,\n rowHeight: this._cache.rowHeight,\n rowRenderer: this._rowRenderer,\n width: 200,\n height: 500\n }));\n }\n\n}\n\nexport default injectLazyLibs('reactVirtualized')(DynamicHeightList);","map":{"version":3,"names":["React","injectLazyLibs","DynamicHeightList","PureComponent","constructor","props","_cache","reactVirtualized","CellMeasurerCache","fixedWidth","minHeight","_rowRenderer","bind","index","key","parent","style","CellMeasurer","measure","children","render","List","element","_list","length","rowHeight"],"sources":["/Users/sneridagh/Development/plone/volto/src/components/manage/ReactVirtualized/DynamicRowHeightList.jsx"],"sourcesContent":["import React from 'react';\nimport { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';\n\nclass DynamicHeightList extends React.PureComponent {\n // As per `react-virtualized` docs, one should use a PureComponent\n // to avoid performance issues\n // We could have used a React.memo + functional component instead,\n // but relied on the class-based implementation for simplicity\n constructor(props) {\n super(props);\n\n this._cache = new props.reactVirtualized.CellMeasurerCache({\n fixedWidth: true,\n minHeight: 50,\n });\n\n this._rowRenderer = this._rowRenderer.bind(this);\n }\n\n _rowRenderer({ index, key, parent, style }) {\n const CellMeasurer = this.props.reactVirtualized.CellMeasurer;\n return (\n <CellMeasurer\n cache={this._cache}\n columnIndex={0}\n key={key}\n rowIndex={index}\n parent={parent}\n >\n {({ measure }) => <div style={style}>{this.props.children[index]}</div>}\n </CellMeasurer>\n );\n }\n\n render() {\n const List = this.props.reactVirtualized.List;\n\n return (\n <List\n {...this.props}\n ref={(element) => {\n this._list = element;\n }}\n deferredMeasurementCache={this._cache}\n overscanRowCount={0}\n rowCount={this.props.children?.length || 0}\n rowHeight={this._cache.rowHeight}\n rowRenderer={this._rowRenderer}\n width={200}\n height={500}\n />\n );\n }\n}\n\nexport default injectLazyLibs('reactVirtualized')(DynamicHeightList);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,cAAT,QAA+B,wCAA/B;;AAEA,MAAMC,iBAAN,SAAgCF,KAAK,CAACG,aAAtC,CAAoD;EAClD;EACA;EACA;EACA;EACAC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IAEA,KAAKC,MAAL,GAAc,IAAID,KAAK,CAACE,gBAAN,CAAuBC,iBAA3B,CAA6C;MACzDC,UAAU,EAAE,IAD6C;MAEzDC,SAAS,EAAE;IAF8C,CAA7C,CAAd;IAKA,KAAKC,YAAL,GAAoB,KAAKA,YAAL,CAAkBC,IAAlB,CAAuB,IAAvB,CAApB;EACD;;EAEDD,YAAY,OAAgC;IAAA,IAA/B;MAAEE,KAAF;MAASC,GAAT;MAAcC,MAAd;MAAsBC;IAAtB,CAA+B;IAC1C,MAAMC,YAAY,G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