airdcpp-webui 2.11.2-beta.2 → 2.11.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.html +2 -2
- package/dist/js/285.14157e0f1f25fb9aaecd.chunk.js +2 -0
- package/dist/js/285.14157e0f1f25fb9aaecd.chunk.js.gz +0 -0
- package/dist/js/285.14157e0f1f25fb9aaecd.chunk.js.map +1 -0
- package/dist/js/334.dba054251a3e485f3ea9.chunk.js +2 -0
- package/dist/js/334.dba054251a3e485f3ea9.chunk.js.gz +0 -0
- package/dist/js/334.dba054251a3e485f3ea9.chunk.js.map +1 -0
- package/dist/js/424.44413ba27808d4072f7f.chunk.js +2 -0
- package/dist/js/424.44413ba27808d4072f7f.chunk.js.gz +0 -0
- package/dist/js/424.44413ba27808d4072f7f.chunk.js.map +1 -0
- package/dist/js/{668.ca79db34c1e147bd25d0.chunk.js → 668.2579506f7fa8bed8a452.chunk.js} +2 -2
- package/dist/js/668.2579506f7fa8bed8a452.chunk.js.gz +0 -0
- package/dist/js/668.2579506f7fa8bed8a452.chunk.js.map +1 -0
- package/dist/js/69.7b5fa94bd7c4e6f23ed6.chunk.js +2 -0
- package/dist/js/69.7b5fa94bd7c4e6f23ed6.chunk.js.gz +0 -0
- package/dist/js/69.7b5fa94bd7c4e6f23ed6.chunk.js.map +1 -0
- package/dist/js/{702.dd4be667774bce5de14f.chunk.js → 702.d36d38b2be52ab51c0a9.chunk.js} +1 -1
- package/dist/js/702.d36d38b2be52ab51c0a9.chunk.js.gz +0 -0
- package/dist/js/{702.dd4be667774bce5de14f.chunk.js.map → 702.d36d38b2be52ab51c0a9.chunk.js.map} +1 -1
- package/dist/js/760.83634ca054e04ff6c7e2.chunk.js +3 -0
- package/dist/js/{760.5448a03d335f92bedb53.chunk.js.LICENSE.txt → 760.83634ca054e04ff6c7e2.chunk.js.LICENSE.txt} +0 -0
- package/dist/js/760.83634ca054e04ff6c7e2.chunk.js.gz +0 -0
- package/dist/js/760.83634ca054e04ff6c7e2.chunk.js.map +1 -0
- package/dist/js/favorite-hubs.f8dc4d8768878d9cab6a.chunk.js +2 -0
- package/dist/js/favorite-hubs.f8dc4d8768878d9cab6a.chunk.js.gz +0 -0
- package/dist/js/favorite-hubs.f8dc4d8768878d9cab6a.chunk.js.map +1 -0
- package/dist/js/filelists.c550cdaa211edb6f733f.chunk.js +2 -0
- package/dist/js/filelists.c550cdaa211edb6f733f.chunk.js.gz +0 -0
- package/dist/js/filelists.c550cdaa211edb6f733f.chunk.js.map +1 -0
- package/dist/js/files.51c49d6a2825cbc64879.chunk.js +2 -0
- package/dist/js/files.51c49d6a2825cbc64879.chunk.js.gz +0 -0
- package/dist/js/files.51c49d6a2825cbc64879.chunk.js.map +1 -0
- package/dist/js/home.895154334c98dbe0f183.chunk.js +3 -0
- package/dist/js/{home.727a64f6586ed95a66bb.chunk.js.LICENSE.txt → home.895154334c98dbe0f183.chunk.js.LICENSE.txt} +0 -0
- package/dist/js/home.895154334c98dbe0f183.chunk.js.gz +0 -0
- package/dist/js/home.895154334c98dbe0f183.chunk.js.map +1 -0
- package/dist/js/hubs.42526e43270139eb1849.chunk.js +2 -0
- package/dist/js/hubs.42526e43270139eb1849.chunk.js.gz +0 -0
- package/dist/js/hubs.42526e43270139eb1849.chunk.js.map +1 -0
- package/dist/js/locales/{ca.78b3bea781886ff158b4.chunk.js → ca.ed09d3a3d4bcca929ba1.chunk.js} +0 -0
- package/dist/js/locales/{ca.78b3bea781886ff158b4.chunk.js.gz → ca.ed09d3a3d4bcca929ba1.chunk.js.gz} +0 -0
- package/dist/js/locales/{da.6f097ed425797ab32cb3.chunk.js → da.6f60a77e9ef082dd3bf4.chunk.js} +0 -0
- package/dist/js/locales/{da.6f097ed425797ab32cb3.chunk.js.gz → da.6f60a77e9ef082dd3bf4.chunk.js.gz} +0 -0
- package/dist/js/locales/{de.fce9df327aeebd67e9a1.chunk.js → de.3b7d3665460384259e82.chunk.js} +0 -0
- package/dist/js/locales/{de.fce9df327aeebd67e9a1.chunk.js.gz → de.3b7d3665460384259e82.chunk.js.gz} +0 -0
- package/dist/js/locales/{el.c325cc8141993f493ad0.chunk.js → el.598573d2a5ed18804fe0.chunk.js} +0 -0
- package/dist/js/locales/{el.c325cc8141993f493ad0.chunk.js.gz → el.598573d2a5ed18804fe0.chunk.js.gz} +0 -0
- package/dist/js/locales/{en.ebb20d0566fd8e7cb3b8.chunk.js → en.f0fe75dca201449e5e47.chunk.js} +0 -0
- package/dist/js/locales/{en.ebb20d0566fd8e7cb3b8.chunk.js.gz → en.f0fe75dca201449e5e47.chunk.js.gz} +0 -0
- package/dist/js/locales/es.645f0fc5dd1cb8c8c5e6.chunk.js +1 -0
- package/dist/js/locales/es.645f0fc5dd1cb8c8c5e6.chunk.js.gz +0 -0
- package/dist/js/locales/{eu.13252b0f7f7534b39e34.chunk.js → eu.7734fc077f26418d6b32.chunk.js} +0 -0
- package/dist/js/locales/{eu.13252b0f7f7534b39e34.chunk.js.gz → eu.7734fc077f26418d6b32.chunk.js.gz} +0 -0
- package/dist/js/locales/{fi.1641c49d1e7154261df8.chunk.js → fi.d1f8a5f4048236243b0f.chunk.js} +0 -0
- package/dist/js/locales/{fi.1641c49d1e7154261df8.chunk.js.gz → fi.d1f8a5f4048236243b0f.chunk.js.gz} +0 -0
- package/dist/js/locales/fr.f46ce4fb57ed20dea8b5.chunk.js +1 -0
- package/dist/js/locales/fr.f46ce4fb57ed20dea8b5.chunk.js.gz +0 -0
- package/dist/js/locales/{hu.5aa0843ba5ebefad56b2.chunk.js → hu.d0d2c38a03a3b38c2bc5.chunk.js} +0 -0
- package/dist/js/locales/{hu.5aa0843ba5ebefad56b2.chunk.js.gz → hu.d0d2c38a03a3b38c2bc5.chunk.js.gz} +0 -0
- package/dist/js/locales/{it.63acad3d71352720e323.chunk.js → it.0c911d75c50ea83190ad.chunk.js} +0 -0
- package/dist/js/locales/{it.63acad3d71352720e323.chunk.js.gz → it.0c911d75c50ea83190ad.chunk.js.gz} +0 -0
- package/dist/js/locales/{nl.a23ef3d4aff66ca3b215.chunk.js → nl.36d288d75b3d3cbabf11.chunk.js} +0 -0
- package/dist/js/locales/{nl.a23ef3d4aff66ca3b215.chunk.js.gz → nl.36d288d75b3d3cbabf11.chunk.js.gz} +0 -0
- package/dist/js/locales/{no.da135b9c1614a4616b47.chunk.js → no.8f2f465d5f785650175d.chunk.js} +0 -0
- package/dist/js/locales/{no.da135b9c1614a4616b47.chunk.js.gz → no.8f2f465d5f785650175d.chunk.js.gz} +0 -0
- package/dist/js/locales/{pl.36e1b3baf978ef6c184a.chunk.js → pl.06e51d7d7b09ba14714d.chunk.js} +0 -0
- package/dist/js/locales/{pl.36e1b3baf978ef6c184a.chunk.js.gz → pl.06e51d7d7b09ba14714d.chunk.js.gz} +0 -0
- package/dist/js/locales/{pt-br.57dff49b32efd65d6825.chunk.js → pt-br.9d19d92899e8c0917c66.chunk.js} +0 -0
- package/dist/js/locales/{pt-br.57dff49b32efd65d6825.chunk.js.gz → pt-br.9d19d92899e8c0917c66.chunk.js.gz} +0 -0
- package/dist/js/locales/{pt.ab93507031a40179f7c7.chunk.js → pt.4390db3955db29b0e7dd.chunk.js} +0 -0
- package/dist/js/locales/{pt.ab93507031a40179f7c7.chunk.js.gz → pt.4390db3955db29b0e7dd.chunk.js.gz} +0 -0
- package/dist/js/locales/{ro.551cd0a17581b2159112.chunk.js → ro.705fcd327263fcf419bf.chunk.js} +0 -0
- package/dist/js/locales/{ro.551cd0a17581b2159112.chunk.js.gz → ro.705fcd327263fcf419bf.chunk.js.gz} +0 -0
- package/dist/js/locales/{ru.cbf29ad6736a21d83bcb.chunk.js → ru.8ab7e1c0d9eee7aa7afb.chunk.js} +0 -0
- package/dist/js/locales/{ru.cbf29ad6736a21d83bcb.chunk.js.gz → ru.8ab7e1c0d9eee7aa7afb.chunk.js.gz} +0 -0
- package/dist/js/locales/{sv.d33f4b4be982814b6343.chunk.js → sv.be546e605910932db11f.chunk.js} +0 -0
- package/dist/js/locales/{sv.d33f4b4be982814b6343.chunk.js.gz → sv.be546e605910932db11f.chunk.js.gz} +0 -0
- package/dist/js/locales/{tr.88e97bf59131df380c5a.chunk.js → tr.25a0d0f19e007e2febc9.chunk.js} +0 -0
- package/dist/js/locales/{tr.88e97bf59131df380c5a.chunk.js.gz → tr.25a0d0f19e007e2febc9.chunk.js.gz} +0 -0
- package/dist/js/locales/uk_UA.61073eae675491639925.chunk.js +1 -0
- package/dist/js/locales/uk_UA.61073eae675491639925.chunk.js.gz +0 -0
- package/dist/js/locales/{zh_CN.a9edec208d0cfe49d94b.chunk.js → zh_CN.4b75674e4815a965ccea.chunk.js} +0 -0
- package/dist/js/locales/{zh_CN.a9edec208d0cfe49d94b.chunk.js.gz → zh_CN.4b75674e4815a965ccea.chunk.js.gz} +0 -0
- package/dist/js/main.51b1144fdbc0a681eb6c.entry.js +3 -0
- package/dist/js/{main.c01c26460331633a96e2.entry.js.LICENSE.txt → main.51b1144fdbc0a681eb6c.entry.js.LICENSE.txt} +0 -0
- package/dist/js/main.51b1144fdbc0a681eb6c.entry.js.gz +0 -0
- package/dist/js/main.51b1144fdbc0a681eb6c.entry.js.map +1 -0
- package/dist/js/messages.6f74e67a600c48f367ad.chunk.js +2 -0
- package/dist/js/messages.6f74e67a600c48f367ad.chunk.js.gz +0 -0
- package/dist/js/messages.6f74e67a600c48f367ad.chunk.js.map +1 -0
- package/dist/js/queue.82a405ba14b60974cb0f.chunk.js +2 -0
- package/dist/js/queue.82a405ba14b60974cb0f.chunk.js.gz +0 -0
- package/dist/js/queue.82a405ba14b60974cb0f.chunk.js.map +1 -0
- package/dist/js/search.af59b1b20b4d7194457b.chunk.js +2 -0
- package/dist/js/search.af59b1b20b4d7194457b.chunk.js.gz +0 -0
- package/dist/js/search.af59b1b20b4d7194457b.chunk.js.map +1 -0
- package/dist/js/settings.b543eade40a723e95c77.chunk.js +2 -0
- package/dist/js/settings.b543eade40a723e95c77.chunk.js.gz +0 -0
- package/dist/js/settings.b543eade40a723e95c77.chunk.js.map +1 -0
- package/dist/js/share.f06abf75f7f2a6afc1b3.chunk.js +2 -0
- package/dist/js/share.f06abf75f7f2a6afc1b3.chunk.js.gz +0 -0
- package/dist/js/share.f06abf75f7f2a6afc1b3.chunk.js.map +1 -0
- package/dist/js/{system-log.45dba574bcb91efd176c.chunk.js → system-log.b9763d1c0f5cf5966f21.chunk.js} +2 -2
- package/dist/js/system-log.b9763d1c0f5cf5966f21.chunk.js.gz +0 -0
- package/dist/js/system-log.b9763d1c0f5cf5966f21.chunk.js.map +1 -0
- package/dist/js/transfers.22e0a37c676d2a0996a8.chunk.js +2 -0
- package/dist/js/transfers.22e0a37c676d2a0996a8.chunk.js.gz +0 -0
- package/dist/js/transfers.22e0a37c676d2a0996a8.chunk.js.map +1 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.gz +0 -0
- package/package.json +65 -64
- package/dist/js/285.744e520b1611ce9c52a5.chunk.js +0 -2
- package/dist/js/285.744e520b1611ce9c52a5.chunk.js.gz +0 -0
- package/dist/js/285.744e520b1611ce9c52a5.chunk.js.map +0 -1
- package/dist/js/334.27c2467ccb3a5cb23acf.chunk.js +0 -2
- package/dist/js/334.27c2467ccb3a5cb23acf.chunk.js.gz +0 -0
- package/dist/js/334.27c2467ccb3a5cb23acf.chunk.js.map +0 -1
- package/dist/js/424.83f0cedf9d07b9d54fcb.chunk.js +0 -2
- package/dist/js/424.83f0cedf9d07b9d54fcb.chunk.js.gz +0 -0
- package/dist/js/424.83f0cedf9d07b9d54fcb.chunk.js.map +0 -1
- package/dist/js/668.ca79db34c1e147bd25d0.chunk.js.gz +0 -0
- package/dist/js/668.ca79db34c1e147bd25d0.chunk.js.map +0 -1
- package/dist/js/69.779bd39a66fa5ea5248b.chunk.js +0 -2
- package/dist/js/69.779bd39a66fa5ea5248b.chunk.js.gz +0 -0
- package/dist/js/69.779bd39a66fa5ea5248b.chunk.js.map +0 -1
- package/dist/js/702.dd4be667774bce5de14f.chunk.js.gz +0 -0
- package/dist/js/760.5448a03d335f92bedb53.chunk.js +0 -3
- package/dist/js/760.5448a03d335f92bedb53.chunk.js.gz +0 -0
- package/dist/js/760.5448a03d335f92bedb53.chunk.js.map +0 -1
- package/dist/js/favorite-hubs.82de31826d6a7541ec24.chunk.js +0 -2
- package/dist/js/favorite-hubs.82de31826d6a7541ec24.chunk.js.gz +0 -0
- package/dist/js/favorite-hubs.82de31826d6a7541ec24.chunk.js.map +0 -1
- package/dist/js/filelists.7a9e00969dcca088a27c.chunk.js +0 -2
- package/dist/js/filelists.7a9e00969dcca088a27c.chunk.js.gz +0 -0
- package/dist/js/filelists.7a9e00969dcca088a27c.chunk.js.map +0 -1
- package/dist/js/files.bb297a4f890216386a57.chunk.js +0 -2
- package/dist/js/files.bb297a4f890216386a57.chunk.js.gz +0 -0
- package/dist/js/files.bb297a4f890216386a57.chunk.js.map +0 -1
- package/dist/js/home.727a64f6586ed95a66bb.chunk.js +0 -3
- package/dist/js/home.727a64f6586ed95a66bb.chunk.js.gz +0 -0
- package/dist/js/home.727a64f6586ed95a66bb.chunk.js.map +0 -1
- package/dist/js/hubs.8b51f0869cdfed35644e.chunk.js +0 -2
- package/dist/js/hubs.8b51f0869cdfed35644e.chunk.js.gz +0 -0
- package/dist/js/hubs.8b51f0869cdfed35644e.chunk.js.map +0 -1
- package/dist/js/locales/es.784f05fd27d172e4ff10.chunk.js +0 -1
- package/dist/js/locales/es.784f05fd27d172e4ff10.chunk.js.gz +0 -0
- package/dist/js/locales/fr.ede93bff1e1571d56404.chunk.js +0 -1
- package/dist/js/locales/fr.ede93bff1e1571d56404.chunk.js.gz +0 -0
- package/dist/js/locales/uk_UA.2b396266bb670b4b7a59.chunk.js +0 -1
- package/dist/js/locales/uk_UA.2b396266bb670b4b7a59.chunk.js.gz +0 -0
- package/dist/js/main.c01c26460331633a96e2.entry.js +0 -3
- package/dist/js/main.c01c26460331633a96e2.entry.js.gz +0 -0
- package/dist/js/main.c01c26460331633a96e2.entry.js.map +0 -1
- package/dist/js/messages.cfb23ba34e3a288ca289.chunk.js +0 -2
- package/dist/js/messages.cfb23ba34e3a288ca289.chunk.js.gz +0 -0
- package/dist/js/messages.cfb23ba34e3a288ca289.chunk.js.map +0 -1
- package/dist/js/queue.0e532f2a56e464d1626b.chunk.js +0 -2
- package/dist/js/queue.0e532f2a56e464d1626b.chunk.js.gz +0 -0
- package/dist/js/queue.0e532f2a56e464d1626b.chunk.js.map +0 -1
- package/dist/js/search.ef2d64870dc65f549d8c.chunk.js +0 -2
- package/dist/js/search.ef2d64870dc65f549d8c.chunk.js.gz +0 -0
- package/dist/js/search.ef2d64870dc65f549d8c.chunk.js.map +0 -1
- package/dist/js/settings.b3fd7918efe3c8bfae88.chunk.js +0 -2
- package/dist/js/settings.b3fd7918efe3c8bfae88.chunk.js.gz +0 -0
- package/dist/js/settings.b3fd7918efe3c8bfae88.chunk.js.map +0 -1
- package/dist/js/share.c0cdc71a867839f5c8b3.chunk.js +0 -2
- package/dist/js/share.c0cdc71a867839f5c8b3.chunk.js.gz +0 -0
- package/dist/js/share.c0cdc71a867839f5c8b3.chunk.js.map +0 -1
- package/dist/js/system-log.45dba574bcb91efd176c.chunk.js.gz +0 -0
- package/dist/js/system-log.45dba574bcb91efd176c.chunk.js.map +0 -1
- package/dist/js/transfers.4ed15c9e5e62fe968fbc.chunk.js +0 -2
- package/dist/js/transfers.4ed15c9e5e62fe968fbc.chunk.js.gz +0 -0
- package/dist/js/transfers.4ed15c9e5e62fe968fbc.chunk.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 AirDC++ Web UI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html><head><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="format-detection" content="telephone=no"><meta name="mobile-web-app-capable" content="yes"><link rel="manifest" id="manifest-placeholder"><title>AirDC++ Web Client</title></head><body><section class="ui dimmable blurring minimal" id="container-main"></section><div id="modals-node" class="ui dimmer modals-node"></div><div id="confirms-node" class="ui dimmer confirms-node"></div><div id="notifications-node"></div><script>function getBasePath(data) {
|
|
1
|
+
<!doctype html><html><head><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#1b1c1d"><meta name="mobile-web-app-capable" content="yes"><link rel="manifest" id="manifest-placeholder"><title>AirDC++ Web Client</title></head><body><section class="ui dimmable blurring minimal" id="container-main"></section><div id="modals-node" class="ui dimmer modals-node"></div><div id="confirms-node" class="ui dimmer confirms-node"></div><div id="notifications-node"></div><script>function getBasePath(data) {
|
|
2
2
|
const pathTokens = window.location.pathname.split('/');
|
|
3
3
|
|
|
4
4
|
// All basenames must used a fixed prefix because of URL routing
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
{
|
|
13
13
|
// We must inject the main chunk dynamically as well because the final path is not known on compile time
|
|
14
14
|
var script = document.createElement('script');
|
|
15
|
-
script.src = getBasePath() + "js/main.
|
|
15
|
+
script.src = getBasePath() + "js/main.51b1144fdbc0a681eb6c.entry.js";
|
|
16
16
|
document.body.appendChild(script);
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[285],{48878:(e,n,a)=>{a.d(n,{Z:()=>i});var t=a(87537),s=a.n(t),o=a(23645),r=a.n(o)()(s());r.push([e.id,".download-dialog .accordion.download-targets {\r\n overflow-y: auto;\r\n}\r\n\r\n.download-dialog .main-content,\r\n.download-dialog .mobile.layout {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.download-dialog .main-content .list {\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n}\r\n\r\n.download-dialog .content > div, .download-dialog .ui.grid .column, \r\n.download-dialog .main-content {\r\n height: 100%;\r\n}\r\n\r\n.download-dialog .download-handler {\r\n display: flex;\r\n align-items: baseline;\r\n}\r\n\r\n.download-dialog .disk-info {\r\n color: black;\r\n font-size: 90%;\r\n font-style: italic;\r\n}\r\n\r\n.download-dialog .normal.layout .four.wide.column {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n}\r\n","",{version:3,sources:["webpack://./src/components/download/style.css"],names:[],mappings:"AAAA;EACE,gBAAgB;AAClB;;AAEA;;EAEE,aAAa;EACb,sBAAsB;AACxB;;AAEA;EACE,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;;EAEE,YAAY;AACd;;AAEA;EACE,aAAa;EACb,qBAAqB;AACvB;;AAEA;EACE,YAAY;EACZ,cAAc;EACd,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,8BAA8B;AAChC",sourcesContent:[".download-dialog .accordion.download-targets {\r\n overflow-y: auto;\r\n}\r\n\r\n.download-dialog .main-content,\r\n.download-dialog .mobile.layout {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.download-dialog .main-content .list {\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n}\r\n\r\n.download-dialog .content > div, .download-dialog .ui.grid .column, \r\n.download-dialog .main-content {\r\n height: 100%;\r\n}\r\n\r\n.download-dialog .download-handler {\r\n display: flex;\r\n align-items: baseline;\r\n}\r\n\r\n.download-dialog .disk-info {\r\n color: black;\r\n font-size: 90%;\r\n font-style: italic;\r\n}\r\n\r\n.download-dialog .normal.layout .four.wide.column {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n}\r\n"],sourceRoot:""}]);const i=r},62285:(e,n,a)=>{a.d(n,{Z:()=>oe});var t=a(85893),s=a(67294),o=a(5977),r=a(26793),i=a(4047),l=a(15479),d=a(1251),c=a(91894),h=a(48117),u=a(57136),m=a(66883),p=a(42090),j=a(92245),g=a(28427),O=a(72181),w=a(89519),f=a(8717),A=a(3629),v=a(9781),y=a(10606),b=a(98374),x=a(32347),E=a(27695),N=a(35936),P=a(2445);const C=(e,n)=>e.free_space<=0?e.path:` (${n((0,f.zS)("spaceFree",x.jv.COMMON),{defaultValue:"{{freeSpace}} free",replace:{freeSpace:(0,P.BU)(e.free_space,n)}})})`,I=({pathInfo:e,downloadHandler:n,t:a})=>(0,t.jsxs)("div",Object.assign({className:"item"},{children:[(0,t.jsx)(N.Z,{icon:h.Z.FOLDER}),(0,t.jsx)("div",Object.assign({className:"content"},{children:(0,t.jsxs)("a",Object.assign({onClick:a=>n(e.path)},{children:[e.path,(0,t.jsx)("span",Object.assign({className:"disk-info"},{children:C(e,a)}))]}))}))]})),Z=(0,p.Z)((({downloadHandler:e,pathInfos:n,t:a})=>(0,t.jsx)("div",Object.assign({className:"ui relaxed list"},{children:n.map((n=>(0,t.jsx)(I,{pathInfo:n,downloadHandler:e,t:a},n.path)))}))),{urls:{pathInfos:({paths:e},n)=>n.post(c.Z.DISK_INFO_URL,{paths:e})}}),R=e=>0===e.paths.length?(0,t.jsx)(E.Z,{title:(0,f.Iu)("No paths to display",e.t,x.jv.COMMON)}):(0,t.jsx)(Z,Object.assign({},e));var k=a(45697),B=a.n(k),D=a(35451);class _ extends s.Component{constructor(){super(...arguments),this.formatParent=e=>{const{downloadHandler:n,t:a}=this.props;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",Object.assign({className:"title"},{children:[(0,t.jsx)(N.Z,{icon:h.Z.DROPDOWN}),e.name]})),(0,t.jsx)("div",Object.assign({className:"content"},{children:(0,t.jsx)(R,{paths:e.paths,downloadHandler:n,t:a})}))]},e.name)}}render(){const{groupedPaths:e,t:n}=this.props;return 0===e.length?(0,t.jsx)(E.Z,{title:(0,f.Iu)("No paths to display",n,x.jv.COMMON)}):(0,t.jsx)(D.ZP,Object.assign({className:"styled download-targets"},{children:e.map(this.formatParent)}))}}_.propTypes={downloadHandler:B().func.isRequired,groupedPaths:B().array.isRequired};const S=_;var M=a(68662);const H=(e,n,a)=>n?[...e,(0,t.jsxs)(b.Z,Object.assign({onClick:n},{children:[(0,f.Iu)("Browse",a,x.jv.COMMON),(0,t.jsx)(N.Z,{icon:"external"})]}),"browse")]:e,T=({menuItems:e,title:n,handleBrowse:a,t:s,children:o})=>(0,t.jsxs)("div",Object.assign({className:"mobile layout"},{children:[(0,t.jsx)(M.Z,Object.assign({selection:!0,caption:n},{children:H(e,a,s)})),(0,t.jsx)("div",Object.assign({className:"ui segment main-content"},{children:o}))]}));var L=a(84807),U=a(24101);const F=({menuItems:e,title:n,handleBrowse:a,t:s,children:o})=>(0,t.jsxs)(U.rj,Object.assign({className:"normal layout"},{children:[(0,t.jsxs)("div",Object.assign({className:"four wide column"},{children:[(0,t.jsx)("div",Object.assign({className:"ui vertical fluid tabular menu"},{children:e})),!!a&&(0,t.jsx)(L.Z,{className:"fluid basic",caption:(0,f.Iu)("Browse",s,x.jv.COMMON),onClick:a,icon:h.Z.OPEN})]})),(0,t.jsx)("div",Object.assign({className:"twelve wide stretched column"},{children:(0,t.jsx)("div",Object.assign({className:"ui segment main-content"},{children:o}))}))]})),G=e=>{const{t:n}=(0,r.$)(),[a,o]=(0,s.useState)("history"),i=s.useMemo((()=>{const{historyPaths:n,sharePaths:a,favoritePaths:s,itemInfo:o}=e;return(e=>{const{sharePaths:n,favoritePaths:a,historyPaths:s,dupePaths:o}=e;return[{name:"Previous",key:"history",list:s,component:({downloadHandler:e,t:n})=>(0,t.jsx)(R,{paths:s,downloadHandler:e,t:n})},{name:"Shared",key:"shared",list:n,component:({downloadHandler:e,t:a})=>(0,t.jsx)(S,{groupedPaths:n,downloadHandler:e,t:a})},{name:"Favorites",key:"favorites",list:a,component:({downloadHandler:e,t:n})=>(0,t.jsx)(S,{groupedPaths:a,downloadHandler:e,t:n})},{name:"Dupes",key:"dupes",list:o,component:({downloadHandler:e,t:n})=>(0,t.jsx)(R,{paths:o,downloadHandler:e,t:n})}]})({historyPaths:n,sharePaths:a,favoritePaths:s,dupePaths:o.dupe?o.dupe.paths.map((e=>(0,v.Il)(e))):[]})}),[]),l=i.find((e=>e.key===a));if(!l)return null;const d=i.map((e=>((e,n,a,s)=>(0,t.jsxs)(b.Z,Object.assign({onClick:()=>a(e.key),active:n===e.key},{children:[s((0,f.zS)(e.key,x.jv.COMMON),e.name),!!e.list&&(0,t.jsx)("div",Object.assign({className:"ui small right label"},{children:e.list.length}))]}),e.key))(e,a,o,n))),c=(0,y.wd)()?T:F;return(0,t.jsx)(c,Object.assign({menuItems:d,title:l.name,handleBrowse:e.handleBrowse,t:n},{children:(0,t.jsx)(l.component,{t:n,downloadHandler:e.downloadHandler})}),l.key)};var W=a(76249),$=a(93379),q=a.n($),z=a(7795),Y=a.n(z),V=a(90569),K=a.n(V),X=a(3565),J=a.n(X),Q=a(19216),ee=a.n(Q),ne=a(44589),ae=a.n(ne),te=a(48878),se={};se.styleTagTransform=ae(),se.setAttributes=J(),se.insert=K().bind(null,"head"),se.domAPI=Y(),se.insertStyleElement=ee(),q()(te.Z,se),te.Z&&te.Z.locals&&te.Z.locals;const oe=(0,j.ZP)((0,p.Z)((e=>{const{t:n}=(0,r.$)(),a=(0,s.useRef)(null),{downloadHandler:i,itemInfo:d,userGetter:p,match:j,session:v,historyPaths:y,favoritePaths:b,sharePaths:E}=e,N=function(e,n){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(t=Object.getOwnPropertySymbols(e);s<t.length;s++)n.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(a[t[s]]=e[t[s]])}return a}(e,["downloadHandler","itemInfo","userGetter","match","session","historyPaths","favoritePaths","sharePaths"]),P=(t,s)=>{return o=void 0,r=void 0,h=function*(){try{yield i(d,p?p(j.params.downloadItemId,e):void 0,{target_name:s||d.name,target_directory:t,priority:W.gg.DEFAULT},v)}catch(e){u.Z.error({title:n((0,f.zS)("queueingFailed",x.jv.COMMON),{defaultValue:"Failed to queue the item {{item.name}}",replace:{item:d}}),message:e.message})}(0,w.h9)((()=>(0,A.V)(l.n0.DOWNLOAD_DIR,t)),n),a.current&&a.current.hide()},new((c=void 0)||(c=Promise))((function(e,n){function a(e){try{s(h.next(e))}catch(e){n(e)}}function t(e){try{s(h.throw(e))}catch(e){n(e)}}function s(n){var s;n.done?e(n.value):(s=n.value,s instanceof c?s:new c((function(e){e(s)}))).then(a,t)}s((h=h.apply(o,r||[])).next())}));var o,r,c,h},C={subHeader:d.name,title:(0,f.Iu)("Download",n,x.jv.COMMON),icon:h.Z.DOWNLOAD,closable:!1,returnTo:e.returnTo},I=m.Z.hasAccess(W.PS.FILESYSTEM_VIEW);return(0,t.jsxs)(o.rs,{children:[(0,t.jsx)(o.AW,Object.assign({path:`${j.path}/browse`},{children:(0,t.jsx)(O.P,Object.assign({onConfirm:(e,n,a)=>P(n,a),initialPath:(()=>{const e=y.length>0?y[y.length-1]:"";return"directory"===d.type.id?e:e+d.name})(),selectMode:"directory"===d.type.id?x.pC.DIRECTORY:x.pC.FILE,historyId:c.Z.LOCATION_DOWNLOAD,approveCaption:(0,f.Iu)("Download",n,x.jv.COMMON)},C))})),(0,t.jsx)(o.AW,Object.assign({path:j.path,exact:!0},{children:(0,t.jsx)(g.Z,Object.assign({ref:a,className:"download-dialog",fullHeight:!0},C,N,{children:(0,t.jsx)(G,{downloadHandler:P,handleBrowse:I?()=>{const{history:n}=e;n.replace(`${j.url}/browse`)}:void 0,historyPaths:y,favoritePaths:b,sharePaths:E,itemInfo:d})}))}))]})}),{urls:{sharePaths:i.Z.GROUPED_ROOTS_GET_URL,favoritePaths:d.Z.GROUPED_DIRECTORIES_URL,historyPaths:l.ZP.STRINGS_URL+"/"+l.n0.DOWNLOAD_DIR,itemInfo:({match:e,itemDataGetter:n},a)=>n(e.params.downloadItemId,a)}}),"download/:downloadItemId")},24101:(e,n,a)=>{a.d(n,{X2:()=>c,h4:()=>h,rj:()=>u});var t=a(85893),s=(a(67294),a(94184)),o=a.n(s),r=a(85444),i=a(8717),l=a(32347);const d=e=>e||(0,t.jsx)(r.c,Object.assign({i18nKey:(0,i.zS)("na",l.jv.COMMON)},{children:"N/A"})),c=({title:e,text:n,className:a,titleWidth:s="four",noText:r})=>(0,t.jsxs)("div",Object.assign({className:o()("ui row",a)},{children:[(0,t.jsx)("div",Object.assign({className:o()(r?"sixteen":s,"wide column title")},{children:(0,t.jsx)("div",Object.assign({className:"ui tiny header",style:{overflow:"hidden"}},{children:e}))})),!r&&(0,t.jsx)("div",Object.assign({className:"column value"},{children:d(n)}))]})),h=({title:e})=>(0,t.jsx)("div",Object.assign({className:"ui row"},{children:(0,t.jsx)("div",Object.assign({className:"sixteen wide column"},{children:(0,t.jsx)("div",Object.assign({className:"ui blue section header"},{children:e}))}))})),u=e=>{var{className:n,children:a,columns:s,stackable:r}=e,i=function(e,n){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(t=Object.getOwnPropertySymbols(e);s<t.length;s++)n.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(a[t[s]]=e[t[s]])}return a}(e,["className","children","columns","stackable"]);return(0,t.jsx)("div",Object.assign({className:o()("ui grid",{[`${s} column`]:!!s},{stackable:r},n)},i,{children:a}))}},1251:(e,n,a)=>{a.d(n,{Z:()=>s});const t="favorite_directories",s={MODULE_URL:t,GROUPED_DIRECTORIES_URL:t+"/grouped_paths",DIRECTORIES_URL:t,DIRECTORIES_UPDATED:"favorite_directories_updated"}},3629:(e,n,a)=>{a.d(n,{V:()=>o});var t=a(518),s=a(15479);const o=(e,n)=>t.Z.post(`${s.ZP.STRINGS_URL}/${e}`,{string:n})}}]);
|
|
2
|
+
//# sourceMappingURL=285.14157e0f1f25fb9aaecd.chunk.js.map
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js/285.14157e0f1f25fb9aaecd.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,gyBAAiyB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,iDAAiD,MAAQ,GAAG,SAAW,oPAAoP,eAAiB,CAAC,iyBAAiyB,WAAa,MAEh+D,W,kTCeA,MAAMC,EAAkB,CAAC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,eACJC,SAAU,QAAU,KAAM,cAAkB,mBAOrCC,EAA0B,EAAGrG,MAAAA,EAAOmG,KAAAA,EAAMrH,UAAAA,EAAWwH,WAAAA,EAAa,OAAQC,OAAAA,MACrF,+BAAKzH,UAAY,IAAW,SAAUA,IAAU,YAC9C,8BAAKA,UAAY,IAAWyH,EAAS,UAAYD,EAAY,sBAAoB,WAC/E,8BAAKxH,UAAU,iBAAiB0H,MAAO,CAAEC,SAAU,WAAU,UACzDzG,SAGHuG,IACD,8BAAKzH,UAAU,gBAAc,UACzBoH,EAAWC,UAURO,EAAgC,EAAG1G,MAAAA,MAC9C,8BAAKlB,UAAU,UAAQ,WACrB,8BAAKA,UAAU,uBAAqB,WAClC,8BAAKA,UAAU,0BAAwB,UACnCkB,WAWGqB,EAA6B,I,IAAA,UAAEvC,EAAS,SAAEkC,EAAQ,QAAE2F,EAAO,UAAEC,GAAS,EAAKnD,E,yUAAK,GAAnD,gDAA0D,OAClG,8BACE3E,UAAY,IACV,UAEA,CAAE,CAAC,GAAG6H,cAAqBA,GAC3B,CAAEC,UAAWA,GACb9H,IAEG2E,EAAK,UAERzC,O,gCC/EN,MAAM6F,EAAa,uBACnB,GACEA,WAAYA,EAEZC,wBAAyBD,EAAa,iBACtCE,gBAAiBF,EAEjBG,oBAAqB,iC,wDCHhB,MAAMC,EAAa,CACxB3B,EACAa,IAEO,SAAmB,GAAG,oBAAgCb,IAAa,CACxE4B,OAAQf","sources":["webpack://airdcpp-webui/./src/components/download/style.css","webpack://airdcpp-webui/./src/components/download/layout/sections/PathListItem.tsx","webpack://airdcpp-webui/./src/components/download/layout/sections/PathList.tsx","webpack://airdcpp-webui/./src/components/download/layout/sections/AccordionTargets.tsx","webpack://airdcpp-webui/./src/components/download/layout/MobileDownloadLayout.tsx","webpack://airdcpp-webui/./src/components/download/layout/NormalDownloadLayout.tsx","webpack://airdcpp-webui/./src/components/download/layout/DownloadLayout.tsx","webpack://airdcpp-webui/./src/components/download/layout/sections/sections.tsx","webpack://airdcpp-webui/./src/components/download/style.css?6643","webpack://airdcpp-webui/./src/components/download/DownloadDialog.tsx","webpack://airdcpp-webui/./src/components/semantic/Grid.tsx","webpack://airdcpp-webui/./src/constants/FavoriteDirectoryConstants.ts","webpack://airdcpp-webui/./src/services/api/HistoryApi.ts"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".download-dialog .accordion.download-targets {\\r\\n overflow-y: auto;\\r\\n}\\r\\n\\r\\n.download-dialog .main-content,\\r\\n.download-dialog .mobile.layout {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n}\\r\\n\\r\\n.download-dialog .main-content .list {\\r\\n overflow-y: auto;\\r\\n overflow-x: hidden;\\r\\n}\\r\\n\\r\\n.download-dialog .content > div, .download-dialog .ui.grid .column, \\r\\n.download-dialog .main-content {\\r\\n height: 100%;\\r\\n}\\r\\n\\r\\n.download-dialog .download-handler {\\r\\n display: flex;\\r\\n align-items: baseline;\\r\\n}\\r\\n\\r\\n.download-dialog .disk-info {\\r\\n color: black;\\r\\n font-size: 90%;\\r\\n font-style: italic;\\r\\n}\\r\\n\\r\\n.download-dialog .normal.layout .four.wide.column {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n justify-content: space-between;\\r\\n}\\r\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/download/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,gBAAgB;AAClB;;AAEA;;EAEE,aAAa;EACb,sBAAsB;AACxB;;AAEA;EACE,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;;EAEE,YAAY;AACd;;AAEA;EACE,aAAa;EACb,qBAAqB;AACvB;;AAEA;EACE,YAAY;EACZ,cAAc;EACd,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,8BAA8B;AAChC\",\"sourcesContent\":[\".download-dialog .accordion.download-targets {\\r\\n overflow-y: auto;\\r\\n}\\r\\n\\r\\n.download-dialog .main-content,\\r\\n.download-dialog .mobile.layout {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n}\\r\\n\\r\\n.download-dialog .main-content .list {\\r\\n overflow-y: auto;\\r\\n overflow-x: hidden;\\r\\n}\\r\\n\\r\\n.download-dialog .content > div, .download-dialog .ui.grid .column, \\r\\n.download-dialog .main-content {\\r\\n height: 100%;\\r\\n}\\r\\n\\r\\n.download-dialog .download-handler {\\r\\n display: flex;\\r\\n align-items: baseline;\\r\\n}\\r\\n\\r\\n.download-dialog .disk-info {\\r\\n color: black;\\r\\n font-size: 90%;\\r\\n font-style: italic;\\r\\n}\\r\\n\\r\\n.download-dialog .normal.layout .four.wide.column {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n justify-content: space-between;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","//import PropTypes from 'prop-types';\r\nimport * as React from 'react';\r\nimport { TFunction } from 'i18next';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport Icon from 'components/semantic/Icon';\r\n\r\nimport { toI18nKey } from 'utils/TranslationUtils';\r\nimport { formatSize } from 'utils/ValueFormat';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport { PathDownloadHandler } from '../../types';\r\n\r\n\r\ninterface PathItemProps {\r\n pathInfo: API.DiskSpaceInfo;\r\n downloadHandler: PathDownloadHandler;\r\n t: TFunction;\r\n}\r\n\r\nconst formatFreeSpace = (pathInfo: API.DiskSpaceInfo, t: TFunction) => {\r\n if (pathInfo.free_space <= 0) {\r\n return pathInfo.path;\r\n }\r\n\r\n return ` (${t(\r\n toI18nKey('spaceFree', UI.Modules.COMMON),\r\n {\r\n defaultValue: '{{freeSpace}} free',\r\n replace: {\r\n freeSpace: formatSize(pathInfo.free_space, t)\r\n }\r\n }\r\n )})`;\r\n};\r\n\r\nexport const PathListItem: React.FC<PathItemProps> = ({ pathInfo, downloadHandler, t }) => (\r\n <div className=\"item\">\r\n <Icon icon={ IconConstants.FOLDER }/>\r\n <div className=\"content\">\r\n <a onClick={ evt => downloadHandler(pathInfo.path) }>\r\n { pathInfo.path }\r\n <span className=\"disk-info\">\r\n { formatFreeSpace(pathInfo, t) }\r\n </span>\r\n </a>\r\n </div>\r\n </div>\r\n);\r\n","//import PropTypes from 'prop-types';\r\nimport { TFunction } from 'i18next';\r\n\r\nimport FilesystemConstants from 'constants/FilesystemConstants';\r\n\r\nimport DataProviderDecorator from 'decorators/DataProviderDecorator';\r\n\r\nimport Message from 'components/semantic/Message';\r\n\r\nimport { translate } from 'utils/TranslationUtils';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport { PathDownloadHandler } from '../../types';\r\nimport { PathListItem } from './PathListItem';\r\n\r\n\r\ninterface PathListProps {\r\n downloadHandler: PathDownloadHandler;\r\n paths: string[];\r\n t: TFunction;\r\n}\r\n\r\ninterface PathListDataProps {\r\n pathInfos: API.DiskSpaceInfo[];\r\n}\r\n\r\nconst PathList = DataProviderDecorator<PathListProps, PathListDataProps>(\r\n ({ downloadHandler, pathInfos, t }) => (\r\n <div className=\"ui relaxed list\">\r\n { pathInfos.map(pathInfo => (\r\n <PathListItem \r\n key={ pathInfo.path } \r\n pathInfo={ pathInfo } \r\n downloadHandler={ downloadHandler }\r\n t={ t }\r\n />\r\n )) }\r\n </div>\r\n ), \r\n {\r\n urls: {\r\n pathInfos: ({ paths }, socket) => socket.post(FilesystemConstants.DISK_INFO_URL, { paths }),\r\n },\r\n }\r\n);\r\n\r\n//PathList.PropTypes = {\r\n// Function handling the path selection. Receives the selected path as argument.\r\n//downloadHandler: PropTypes.func.isRequired,\r\n\r\n// Array of paths to list\r\n//paths: PropTypes.array.isRequired,\r\n//};\r\n\r\nexport default (props: PathListProps) => {\r\n if (props.paths.length === 0) {\r\n return (\r\n <Message\r\n title={ translate('No paths to display', props.t, UI.Modules.COMMON) }\r\n />\r\n );\r\n }\r\n\r\n return <PathList { ...props }/>;\r\n};","import PropTypes from 'prop-types';\r\nimport { Component } from 'react';\r\nimport { TFunction } from 'i18next';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport Accordion from 'components/semantic/Accordion';\r\nimport Icon from 'components/semantic/Icon';\r\nimport Message from 'components/semantic/Message';\r\n\r\nimport { translate } from 'utils/TranslationUtils';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport { PathDownloadHandler } from '../../types';\r\n\r\nimport PathList from './PathList';\r\n\r\n\r\ninterface AccordionTargetsProps {\r\n groupedPaths: API.GroupedPath[];\r\n downloadHandler: PathDownloadHandler;\r\n t: TFunction;\r\n}\r\n\r\nclass AccordionTargets extends Component<AccordionTargetsProps> {\r\n static propTypes = {\r\n // Function handling the path selection. Receives the selected path as argument.\r\n downloadHandler: PropTypes.func.isRequired,\r\n\r\n // Grouped paths to list\r\n groupedPaths: PropTypes.array.isRequired,\r\n };\r\n\r\n formatParent = (parent: API.GroupedPath) => {\r\n const { downloadHandler, t } = this.props;\r\n return (\r\n <div key={ parent.name }>\r\n <div className=\"title\">\r\n <Icon icon={ IconConstants.DROPDOWN }/>\r\n { parent.name }\r\n </div>\r\n\r\n <div className=\"content\">\r\n <PathList \r\n paths={ parent.paths } \r\n downloadHandler={ downloadHandler }\r\n t={ t }\r\n />\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n render() {\r\n const { groupedPaths, t } = this.props;\r\n if (groupedPaths.length === 0) {\r\n return (\r\n <Message\r\n title={ translate('No paths to display', t, UI.Modules.COMMON) }\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <Accordion className=\"styled download-targets\">\r\n { groupedPaths.map(this.formatParent) }\r\n </Accordion>\r\n );\r\n }\r\n}\r\n\r\nexport default AccordionTargets;","import * as React from 'react';\r\nimport { TFunction } from 'i18next';\r\n\r\nimport { translate } from 'utils/TranslationUtils';\r\n\r\nimport Dropdown from 'components/semantic/Dropdown';\r\nimport MenuItemLink from 'components/semantic/MenuItemLink';\r\n\r\nimport * as UI from 'types/ui';\r\n\r\nimport Icon from 'components/semantic/Icon';\r\nimport { BrowseHandler, LayoutProps } from '../types';\r\n\r\n\r\nconst appendBrowseItem = (menuItems: React.ReactNode[], handleBrowse: BrowseHandler, t: TFunction) => {\r\n if (!handleBrowse) {\r\n return menuItems;\r\n }\r\n\r\n return [\r\n ...menuItems,\r\n (\r\n <MenuItemLink \r\n key=\"browse\"\r\n onClick={ handleBrowse }\r\n >\r\n { translate('Browse', t, UI.Modules.COMMON) }\r\n <Icon icon=\"external\"/>\r\n </MenuItemLink>\r\n )\r\n ];\r\n};\r\n\r\nexport const MobileDownloadLayout: React.FC<LayoutProps> = (\r\n { menuItems, title, handleBrowse, t, children }\r\n) => (\r\n <div className=\"mobile layout\">\r\n <Dropdown \r\n selection={ true }\r\n caption={ title }\r\n >\r\n { appendBrowseItem(menuItems, handleBrowse, t) }\r\n </Dropdown>\r\n <div className=\"ui segment main-content\">\r\n { children }\r\n </div>\r\n </div>\r\n);\r\n","import * as React from 'react';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport { translate } from 'utils/TranslationUtils';\r\n\r\nimport Button from 'components/semantic/Button';\r\nimport { Grid } from 'components/semantic/Grid';\r\n\r\nimport * as UI from 'types/ui';\r\nimport { LayoutProps } from '../types';\r\n\r\n\r\nexport const NormalDownloadLayout: React.FC<LayoutProps> = ({ menuItems, title, handleBrowse, t, children }) => (\r\n <Grid className=\"normal layout\">\r\n <div className=\"four wide column\">\r\n <div className=\"ui vertical fluid tabular menu\">\r\n { menuItems }\r\n </div>\r\n { !!handleBrowse && (\r\n <Button\r\n className=\"fluid basic\"\r\n caption={ translate('Browse', t, UI.Modules.COMMON) }\r\n onClick={ handleBrowse }\r\n icon={ IconConstants.OPEN }\r\n />\r\n ) }\r\n </div>\r\n <div className=\"twelve wide stretched column\">\r\n <div className=\"ui segment main-content\">\r\n { children }\r\n </div>\r\n </div>\r\n </Grid>\r\n);","import { useState } from 'react';\r\nimport * as React from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { TFunction } from 'i18next';\r\n\r\nimport { getParentPath } from 'utils/FileUtils';\r\nimport { useMobileLayout } from 'utils/BrowserUtils';\r\nimport { toI18nKey } from 'utils/TranslationUtils';\r\n\r\nimport MenuItemLink from 'components/semantic/MenuItemLink';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { getDownloadSections, DownloadSection } from './sections';\r\nimport { BrowseHandler, PathDownloadHandler } from '../types';\r\n\r\nimport { MobileDownloadLayout } from './MobileDownloadLayout';\r\nimport { NormalDownloadLayout } from './NormalDownloadLayout';\r\n\r\n\r\nexport interface DownloadDataProps<ItemT extends UI.DownloadableItemInfo = UI.DownloadableItemInfo> {\r\n sharePaths: API.GroupedPath[];\r\n favoritePaths: API.GroupedPath[];\r\n historyPaths: string[];\r\n itemInfo: ItemT;\r\n}\r\n\r\nexport interface DownloadLayoutProps<\r\n ItemT extends UI.DownloadableItemInfo = UI.DownloadableItemInfo\r\n> extends DownloadDataProps<ItemT> {\r\n\r\n downloadHandler: PathDownloadHandler;\r\n handleBrowse: BrowseHandler;\r\n}\r\n\r\nconst getMenuItem = (\r\n section: DownloadSection, \r\n activeSection: string, \r\n onClick: (key: string) => void, \r\n t: TFunction\r\n) => (\r\n <MenuItemLink \r\n key={ section.key }\r\n onClick={ () => onClick(section.key) } \r\n active={ activeSection === section.key }\r\n >\r\n { t(toI18nKey(section.key, UI.Modules.COMMON), section.name) }\r\n { !!section.list && (\r\n <div className=\"ui small right label\"> \r\n { section.list.length }\r\n </div>\r\n ) }\r\n </MenuItemLink>\r\n);\r\n\r\nexport const DownloadLayout: React.FC<DownloadLayoutProps> = props => {\r\n const { t } = useTranslation();\r\n const [ activeSectionKey, setActiveSectionKey ] = useState('history');\r\n\r\n const sections = React.useMemo(\r\n () => {\r\n const { historyPaths, sharePaths, favoritePaths, itemInfo } = props;\r\n const dupePaths = itemInfo.dupe ? itemInfo.dupe.paths.map(path => getParentPath(path)) : [];\r\n \r\n return getDownloadSections({\r\n historyPaths, sharePaths, favoritePaths, dupePaths\r\n });\r\n },\r\n []\r\n );\r\n\r\n const activeSection = sections.find(s => s.key === activeSectionKey);\r\n if (!activeSection) {\r\n return null;\r\n }\r\n\r\n const menuItems = sections\r\n .map(s => getMenuItem(s, activeSectionKey, setActiveSectionKey, t));\r\n\r\n const Component = useMobileLayout() ? MobileDownloadLayout : NormalDownloadLayout;\r\n return (\r\n <Component\r\n key={ activeSection.key } // Ensure that section-specific data is refetched\r\n menuItems={ menuItems }\r\n title={ activeSection.name }\r\n handleBrowse={ props.handleBrowse }\r\n t={ t }\r\n >\r\n <activeSection.component\r\n t={ t }\r\n downloadHandler={ props.downloadHandler }\r\n />\r\n </Component>\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nimport PathList from './PathList';\r\nimport AccordionTargets from './AccordionTargets';\r\n\r\nimport * as API from 'types/api';\r\n\r\nimport { TFunction } from 'i18next';\r\nimport { PathDownloadHandler } from '../../types';\r\n\r\n\r\nexport interface DownloadSectionChildProps {\r\n t: TFunction;\r\n downloadHandler: PathDownloadHandler;\r\n}\r\n\r\nexport interface DownloadSection {\r\n name: string;\r\n key: string;\r\n list?: string[] | API.GroupedPath[];\r\n component: React.ComponentType<DownloadSectionChildProps>;\r\n}\r\n\r\ninterface PathInfo {\r\n sharePaths: API.GroupedPath[];\r\n favoritePaths: API.GroupedPath[];\r\n historyPaths: string[];\r\n dupePaths: string[];\r\n}\r\n\r\nexport const getDownloadSections = (pathInfo: PathInfo) => {\r\n const { sharePaths, favoritePaths, historyPaths, dupePaths } = pathInfo;\r\n\r\n const sections: DownloadSection[] = [\r\n {\r\n name: 'Previous',\r\n key: 'history',\r\n list: historyPaths,\r\n component: ({ downloadHandler, t }) => (\r\n <PathList \r\n paths={ historyPaths } \r\n downloadHandler={ downloadHandler }\r\n t={ t }\r\n />\r\n )\r\n }, {\r\n name: 'Shared',\r\n key: 'shared',\r\n list: sharePaths,\r\n component: ({ downloadHandler, t }) => (\r\n <AccordionTargets \r\n groupedPaths={ sharePaths } \r\n downloadHandler={ downloadHandler }\r\n t={ t }\r\n />\r\n )\r\n }, {\r\n name: 'Favorites',\r\n key: 'favorites',\r\n list: favoritePaths,\r\n component: ({ downloadHandler, t }) => (\r\n <AccordionTargets \r\n groupedPaths={ favoritePaths } \r\n downloadHandler={ downloadHandler }\r\n t={ t }\r\n />\r\n )\r\n }, {\r\n name: 'Dupes',\r\n key: 'dupes',\r\n list: dupePaths,\r\n component: ({ downloadHandler, t }) => (\r\n <PathList \r\n paths={ dupePaths } \r\n downloadHandler={ downloadHandler }\r\n t={ t }\r\n />\r\n )\r\n }\r\n ];\r\n\r\n return sections;\r\n};\r\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","//import PropTypes from 'prop-types';\r\nimport { useRef } from 'react';\r\n\r\nimport * as React from 'react';\r\nimport { Route, Switch } from 'react-router';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport ShareConstants from 'constants/ShareConstants';\r\nimport { default as HistoryConstants, HistoryStringEnum } from 'constants/HistoryConstants';\r\nimport FavoriteDirectoryConstants from 'constants/FavoriteDirectoryConstants';\r\nimport FilesystemConstants from 'constants/FilesystemConstants';\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport NotificationActions from 'actions/NotificationActions';\r\nimport LoginStore from 'stores/LoginStore';\r\n\r\nimport DataProviderDecorator, { DataProviderDecoratorChildProps } from 'decorators/DataProviderDecorator';\r\nimport ModalRouteDecorator, { ModalRouteDecoratorChildProps } from 'decorators/ModalRouteDecorator';\r\n\r\nimport Modal, { ModalProps } from 'components/semantic/Modal';\r\nimport { FileBrowserDialog } from 'components/filebrowser';\r\n\r\nimport { runBackgroundSocketAction } from 'utils/ActionUtils';\r\nimport { toI18nKey, translate } from 'utils/TranslationUtils';\r\nimport { addHistory } from 'services/api/HistoryApi';\r\n\r\nimport { DownloadLayout, DownloadDataProps } from './layout';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport { PathDownloadHandler } from './types';\r\n\r\nimport './style.css';\r\n\r\n\r\ntype DownloadItemIdType = string;\r\n\r\nexport type DownloadDialogProps<ItemT extends UI.DownloadableItemInfo = UI.DownloadableItemInfo> = \r\n UI.ItemDownloadHandler<ItemT, Props<ItemT>>;\r\n\r\ninterface RouteProps { \r\n downloadItemId: DownloadItemIdType; \r\n}\r\n\r\ntype DownloadDialogRouteProps = ModalRouteDecoratorChildProps<RouteProps>;\r\n\r\ninterface DownloadDialogDataProps<ItemT extends UI.DownloadableItemInfo = UI.DownloadableItemInfo> \r\n extends DataProviderDecoratorChildProps, DownloadDataProps<ItemT> {\r\n\r\n\r\n}\r\n\r\n\r\ntype Props<ItemT extends UI.DownloadableItemInfo = UI.DownloadableItemInfo> = DownloadDialogProps<ItemT> & \r\n DownloadDialogDataProps<ItemT> & \r\n DownloadDialogRouteProps;\r\n\r\n\r\nconst DownloadDialog: React.FC<Props> = props => {\r\n const { t } = useTranslation();\r\n const modalRef = useRef<Modal>(null);\r\n\r\n const { \r\n downloadHandler, itemInfo, userGetter, match, \r\n session, historyPaths, favoritePaths, sharePaths, \r\n ...other \r\n } = props;\r\n\r\n const handleDownload: PathDownloadHandler = async (targetPath, targetFilename) => {\r\n try {\r\n await downloadHandler(\r\n itemInfo, \r\n !!userGetter ? userGetter(match.params.downloadItemId, props) : undefined, \r\n {\r\n target_name: !!targetFilename ? targetFilename : itemInfo.name,\r\n target_directory: targetPath,\r\n priority: API.QueuePriorityEnum.DEFAULT,\r\n },\r\n session\r\n );\r\n } catch (e) {\r\n NotificationActions.error({\r\n title: t(\r\n toI18nKey('queueingFailed', UI.Modules.COMMON),\r\n {\r\n defaultValue: 'Failed to queue the item {{item.name}}',\r\n replace: {\r\n item: itemInfo\r\n }\r\n }\r\n ),\r\n message: e.message\r\n });\r\n }\r\n\r\n runBackgroundSocketAction(\r\n () => addHistory(HistoryStringEnum.DOWNLOAD_DIR, targetPath),\r\n t\r\n );\r\n\r\n if (!!modalRef.current) {\r\n modalRef.current.hide();\r\n }\r\n };\r\n\r\n const getInitialBrowsePath = () => {\r\n const path = historyPaths.length > 0 ? historyPaths[historyPaths.length - 1] : '';\r\n return itemInfo.type.id === 'directory' ? path : path + itemInfo.name;\r\n };\r\n\r\n const handleBrowse = () => {\r\n const { history } = props;\r\n history.replace(`${match.url}/browse`);\r\n };\r\n\r\n const commonDialogProps: ModalProps = {\r\n subHeader: itemInfo.name,\r\n title: translate('Download', t, UI.Modules.COMMON),\r\n icon: IconConstants.DOWNLOAD,\r\n closable: false,\r\n returnTo: props.returnTo,\r\n };\r\n\r\n const hasFileBrowserAccess = LoginStore.hasAccess(API.AccessEnum.FILESYSTEM_VIEW);\r\n return (\r\n <Switch>\r\n <Route path={ `${match.path}/browse` }>\r\n <FileBrowserDialog\r\n onConfirm={ (path, directoryPath, fileName) => handleDownload(directoryPath, fileName) }\r\n initialPath={ getInitialBrowsePath() }\r\n selectMode={ \r\n itemInfo.type.id === 'directory' ? UI.FileSelectModeEnum.DIRECTORY : UI.FileSelectModeEnum.FILE \r\n }\r\n historyId={ FilesystemConstants.LOCATION_DOWNLOAD }\r\n approveCaption={ translate('Download', t, UI.Modules.COMMON) }\r\n { ...commonDialogProps }\r\n />\r\n </Route>\r\n <Route path={ match.path } exact>\r\n <Modal \r\n ref={ modalRef }\r\n className=\"download-dialog\" \r\n fullHeight={ true }\r\n { ...commonDialogProps }\r\n { ...other }\r\n >\r\n <DownloadLayout\r\n downloadHandler={ handleDownload }\r\n handleBrowse={ hasFileBrowserAccess ? handleBrowse : undefined }\r\n historyPaths={ historyPaths }\r\n favoritePaths={ favoritePaths }\r\n sharePaths={ sharePaths }\r\n itemInfo={ itemInfo }\r\n />\r\n </Modal>\r\n </Route>\r\n </Switch>\r\n );\r\n};\r\n\r\nexport default ModalRouteDecorator<DownloadDialogProps, RouteProps>(\r\n DataProviderDecorator<DownloadDialogProps & DownloadDialogRouteProps, DownloadDialogDataProps>(\r\n DownloadDialog, \r\n {\r\n urls: {\r\n sharePaths: ShareConstants.GROUPED_ROOTS_GET_URL,\r\n favoritePaths: FavoriteDirectoryConstants.GROUPED_DIRECTORIES_URL,\r\n historyPaths: HistoryConstants.STRINGS_URL + '/' + HistoryStringEnum.DOWNLOAD_DIR,\r\n itemInfo: ({ match, itemDataGetter }, socket) => {\r\n return itemDataGetter(match.params.downloadItemId, socket);\r\n }\r\n },\r\n }\r\n ),\r\n 'download/:downloadItemId'\r\n);","\r\nimport * as React from 'react';\r\nimport classNames from 'classnames';\r\n\r\nimport { Trans } from 'react-i18next';\r\nimport { toI18nKey } from 'utils/TranslationUtils';\r\n\r\nimport * as UI from 'types/ui';\r\n\r\n\r\nexport interface RowProps {\r\n title: React.ReactNode;\r\n text?: React.ReactNode;\r\n titleWidth?: string;\r\n className?: string;\r\n noText?: boolean;\r\n}\r\n\r\n\r\n\r\nconst formatText = (text: React.ReactNode) => {\r\n if (!!text) {\r\n return text;\r\n }\r\n \r\n return (\r\n <Trans \r\n i18nKey={ toI18nKey('na', UI.Modules.COMMON) }\r\n >\r\n N/A\r\n </Trans>\r\n );\r\n};\r\n\r\nexport const Row: React.FC<RowProps> = ({ title, text, className, titleWidth = 'four', noText }) => (\r\n <div className={ classNames('ui row', className) }>\r\n <div className={ classNames(noText ? 'sixteen' : titleWidth, 'wide column title') }>\r\n <div className=\"ui tiny header\" style={{ overflow: 'hidden' }}>\r\n { title }\r\n </div>\r\n </div>\r\n { !noText && (\r\n <div className=\"column value\">\r\n { formatText(text) }\r\n </div> \r\n ) }\r\n </div>\r\n);\r\n\r\nexport interface HeaderProps {\r\n title: React.ReactNode;\r\n}\r\n\r\nexport const Header: React.FC<HeaderProps> = ({ title }) => (\r\n <div className=\"ui row\">\r\n <div className=\"sixteen wide column\">\r\n <div className=\"ui blue section header\">\r\n { title }\r\n </div>\r\n </div>\r\n </div>\r\n);\r\n\r\nexport interface GridProps extends React.HTMLAttributes<HTMLDivElement> {\r\n columns?: string;\r\n stackable?: boolean;\r\n}\r\n\r\nexport const Grid: React.FC<GridProps> = ({ className, children, columns, stackable, ...other }) => (\r\n <div \r\n className={ classNames(\r\n 'ui grid', \r\n //`${columns} column`, \r\n { [`${columns} column`]: !!columns },\r\n { stackable: stackable },\r\n className\r\n ) }\r\n { ...other }\r\n >\r\n { children }\r\n </div>\r\n);\r\n","const MODULE_URL = 'favorite_directories';\r\nexport default {\r\n MODULE_URL: MODULE_URL,\r\n\r\n GROUPED_DIRECTORIES_URL: MODULE_URL + '/grouped_paths',\r\n DIRECTORIES_URL: MODULE_URL,\r\n\r\n DIRECTORIES_UPDATED: 'favorite_directories_updated',\r\n}\r\n;\r\n","import SocketService from 'services/SocketService';\r\nimport HistoryConstants from 'constants/HistoryConstants';\r\n\r\n\r\nexport const addHistory = (\r\n historyId: string, \r\n text: string\r\n) => {\r\n return SocketService.post(`${HistoryConstants.STRINGS_URL}/${historyId}`, { \r\n string: text,\r\n });\r\n};"],"names":["___CSS_LOADER_EXPORT___","push","module","id","formatFreeSpace","pathInfo","t","free_space","path","defaultValue","replace","freeSpace","PathListItem","downloadHandler","className","Icon","icon","IconConstants","onClick","evt","PathList","DataProviderDecorator","pathInfos","map","urls","paths","socket","post","FilesystemConstants","props","length","Message","title","AccordionTargets","Component","formatParent","parent","this","name","render","groupedPaths","Accordion","propTypes","appendBrowseItem","menuItems","handleBrowse","MenuItemLink","MobileDownloadLayout","children","Dropdown","selection","caption","NormalDownloadLayout","Grid","Button","DownloadLayout","useTranslation","activeSectionKey","setActiveSectionKey","useState","sections","historyPaths","sharePaths","favoritePaths","itemInfo","dupePaths","key","list","component","getDownloadSections","dupe","activeSection","find","s","section","active","getMenuItem","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","ModalRouteDecorator","modalRef","useRef","userGetter","match","session","other","handleDownload","targetPath","targetFilename","params","downloadItemId","undefined","target_name","target_directory","priority","e","NotificationActions","item","message","current","hide","commonDialogProps","subHeader","closable","returnTo","hasFileBrowserAccess","LoginStore","onConfirm","directoryPath","fileName","initialPath","type","getInitialBrowsePath","selectMode","historyId","approveCaption","exact","Modal","ref","fullHeight","history","url","ShareConstants","FavoriteDirectoryConstants","HistoryConstants","itemDataGetter","formatText","text","i18nKey","Row","titleWidth","noText","style","overflow","Header","columns","stackable","MODULE_URL","GROUPED_DIRECTORIES_URL","DIRECTORIES_URL","DIRECTORIES_UPDATED","addHistory","string"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[334],{34378:(e,t,n)=>{n.d(t,{Z:()=>a});var s=n(87537),r=n.n(s),o=n(23645),i=n.n(o)()(r());i.push([e.id,".message-section {\r\n flex: 1;\r\n overflow-y: auto;\r\n}\r\n\r\n.message-list .date.divider i {\r\n margin-right: 5px;\r\n}\r\n\r\n.message-list .item .text .highlight.link {\r\n color: #4183c4;\r\n}\r\n\r\n.message-list .item .text .highlight.bold {\r\n font-weight: bold;\r\n}\r\n\r\n.message-list .item .text .table.dropdown,\r\n.message-list .item .text .table.dropdown .popup.trigger {\r\n max-width: 100%;\r\n}\r\n\r\n.message-list .item .text .table.dropdown .caption {\r\n overflow: hidden;\r\n}","",{version:3,sources:["webpack://./src/components/messages/messages.css"],names:[],mappings:"AAAA;EACE,OAAO;EACP,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,gBAAgB;AAClB",sourcesContent:[".message-section {\r\n flex: 1;\r\n overflow-y: auto;\r\n}\r\n\r\n.message-list .date.divider i {\r\n margin-right: 5px;\r\n}\r\n\r\n.message-list .item .text .highlight.link {\r\n color: #4183c4;\r\n}\r\n\r\n.message-list .item .text .highlight.bold {\r\n font-weight: bold;\r\n}\r\n\r\n.message-list .item .text .table.dropdown,\r\n.message-list .item .text .table.dropdown .popup.trigger {\r\n max-width: 100%;\r\n}\r\n\r\n.message-list .item .text .table.dropdown .caption {\r\n overflow: hidden;\r\n}"],sourceRoot:""}]);const a=i},25334:(e,t,n)=>{n.d(t,{Z:()=>se});var s=n(85893),r=n(67294),o=n(94184),i=n.n(o),a=n(54883),l=n(99311),c=n(20867),d=n(45697),p=n.n(d);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=new Map,h=new WeakMap,b=0;function f(e,t,n,s){if(void 0===n&&(n={}),void 0===s&&(s=undefined),void 0===window.IntersectionObserver&&void 0!==s){var r=e.getBoundingClientRect();return t(s,{isIntersecting:s,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var o=function(e){var t=function(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(h.has(n)||(b+=1,h.set(n,b.toString())),h.get(n)):"0":e[t]);var n})).toString()}(e),n=m.get(t);if(!n){var s,r=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var n,o=t.isIntersecting&&s.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach((function(e){e(o,t)}))}))}),e);s=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},m.set(t,n)}return n}(n),i=o.id,a=o.observer,l=o.elements,c=l.get(e)||[];return l.has(e)||l.set(e,c),c.push(t),a.observe(e),function(){c.splice(c.indexOf(t),1),0===c.length&&(l.delete(e),a.unobserve(e)),0===l.size&&(a.disconnect(),m.delete(i))}}var v=["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function y(e){return"function"!=typeof e.children}var O=function(e){var t,n;function s(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),y(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var o=s.prototype;return o.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},o.componentWillUnmount=function(){this.unobserve(),this.node=null},o.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,s=e.rootMargin,r=e.trackVisibility,o=e.delay,i=e.fallbackInView;this._unobserveCb=f(this.node,this.handleChange,{threshold:t,root:n,rootMargin:s,trackVisibility:r,delay:o},i)}},o.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},o.render=function(){if(!y(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var s=this.props,o=s.children,i=s.as,a=s.tag,l=function(e,t){if(null==e)return{};var n,s,r={},o=Object.keys(e);for(s=0;s<o.length;s++)n=o[s],t.indexOf(n)>=0||(r[n]=e[n]);return r}(s,v);return r.createElement(i||a||"div",u({ref:this.handleNode},l),o)},s}(r.Component);O.displayName="InView",O.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};var w=n(47021),j=n(4333),x=n(2445);const A=({time:e})=>(0,s.jsx)("div",Object.assign({className:"time"},{children:(0,x.i$)(e)}));var C=n(94656);const I=e=>{var{emojify:t,message:n,user:r,label:o}=e,i=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}(e,["emojify","message","user","label"]);return(0,s.jsxs)("div",Object.assign({className:"text"},{children:[!!o&&(0,s.jsx)("span",Object.assign({className:"label"},{children:`${o}: `})),(0,s.jsx)(C.h,Object.assign({emojify:t,text:n.text,highlights:n.highlights,user:r},i))]}))};const E=({message:e,dropdownContext:t})=>(0,s.jsxs)("div",Object.assign({className:"header author"},{children:[e.third_person&&(0,s.jsx)("span",{children:"*"}),(0,s.jsx)(w.Ie,{contextElement:t,triggerIcon:null,user:e.from,direction:"downward",remoteMenuId:j.Z.HUB_USER,entityId:e.from.hub_session_id})]}));class _ extends r.Component{shouldComponentUpdate(){return!1}render(){const e=this.props,{message:t,dropdownContext:n,menuProps:r}=e,o=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}(e,["message","dropdownContext","menuProps"]);return(0,s.jsxs)(O,Object.assign({className:"ui item chat "+t.from.flags.join(" ")},o,{children:[(0,s.jsx)(A,{time:t.time}),(0,s.jsxs)("div",Object.assign({className:"left "+(t.third_person?"third-person":"normal")},{children:[(0,s.jsx)(E,{message:t,dropdownContext:n}),(0,s.jsx)(I,{message:t,emojify:!0,user:t.from,menuProps:r})]}))]}))}}_.propTypes={message:p().object.isRequired,dropdownContext:p().string.isRequired};var P=n(35936),N=n(48117),k=n(76249);const V=e=>{switch(e){case k.m4.INFO:return N.Z.INFO+" circle";case k.m4.WARNING:return N.Z.WARNING;case k.m4.ERROR:return N.Z.ERROR;default:return""}};class R extends r.Component{shouldComponentUpdate(){return!1}render(){const e=this.props,{message:t,menuProps:n}=e,r=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}(e,["message","menuProps"]);return(0,s.jsxs)(O,Object.assign({className:"ui item status "+t.severity},r,{children:[(0,s.jsx)(P.Z,{icon:V(t.severity)}),t.time>0&&(0,s.jsx)(A,{time:t.time}),(0,s.jsx)(I,{label:t.label,message:t,emojify:!1,menuProps:n})]}))}}R.propTypes={message:p().object.isRequired};const M=e=>{var{message:t}=e,n=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}(e,["message"]);return t.chat_message?(0,s.jsx)(_,Object.assign({message:t.chat_message,dropdownContext:".chat.session"},n)):t.log_message?(0,s.jsx)(R,Object.assign({message:t.log_message},n)):null};var B=n(26793);const S=e=>{const t=e.chat_message?e.chat_message:e.log_message;return t&&new Date(1e3*t.time).getDate()},D=e=>{const t=e.chat_message?e.chat_message:e.log_message;return t&&0===t.time},Z=({time:e})=>{const{t}=(0,B.$)();return(0,s.jsxs)("div",Object.assign({className:"ui horizontal date divider"},{children:[(0,s.jsx)(P.Z,{icon:N.Z.DATE}),(0,x._s)(e,t)]}),`divider${e}`)},G=({entityId:e,onMessageVisibilityChanged:t,addDownload:n,highlightRemoteMenuId:r},o,i,a,l)=>{if(((e,t)=>{const n=t[e];return 0===e||1===e&&D(t[e-1])?S(n)!==(new Date).getDate()&&!D(n):S(t[e-1])!==S(n)})(a,l)){const e=i.chat_message?i.chat_message:i.log_message;e&&o.push((0,s.jsx)(Z,{time:e.time},`divider${e.id}`))}const d=(0,c.oi)(i);return o.push((0,s.jsx)(M,{id:(0,c.or)(d),onChange:e=>{t(d,e)},threshold:.4,message:i,menuProps:{addDownload:n,entityId:e,remoteMenuId:r,boundary:".message-section"}},d)),o};var U=n(8717),T=n(62285),$=n(32347),H=n(93379),W=n.n(H),q=n(7795),F=n.n(q),z=n(90569),L=n.n(z),J=n(3565),K=n.n(J),Q=n(19216),X=n.n(Q),Y=n(44589),ee=n.n(Y),te=n(34378),ne={};ne.styleTagTransform=ee(),ne.setAttributes=K(),ne.insert=L().bind(null,"head"),ne.domAPI=F(),ne.insertStyleElement=X(),W()(te.Z,ne),te.Z&&te.Z.locals&&te.Z.locals;const se=r.memo((e=>{var{className:t,t:n}=e,o=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}(e,["className","t"]);const c=(d=o.session,(0,r.useMemo)((()=>{const e={},t=t=>{const n=e[t];if(!n)throw new Error("Download was not found");return n};return{downloadDialogProps:{downloadHandler:(e,n,s,r)=>t(e.id).downloadHandler(e,n,s,r),userGetter:(e,n)=>{const s=t(e).userGetter;return s?s(e,n):void 0},itemDataGetter:(e,n)=>t(e).itemDataGetter(e,n),session:d},addDownloadItem:(t,n)=>{e[t]=n}}}),[]));var d;const{messageNodes:p,visibleItems:u}=(({highlightRemoteMenuId:e,messages:t,session:n},s)=>{const o=(0,r.useMemo)((()=>new Set),[n]),i=(e,t)=>{t?o.add(e):o.delete(e)};return{messageNodes:(0,r.useMemo)((()=>t?t.reduce(G.bind(null,{highlightRemoteMenuId:e,entityId:n?n.id:void 0,onMessageVisibilityChanged:i,addDownload:s.addDownloadItem}),[]):null),[t]),visibleItems:o}})(o,c),g=(0,l.Hc)(o,u);return(0,s.jsx)("div",Object.assign({ref:g,className:i()("message-section",t)},{children:p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",Object.assign({className:"ui list message-list"},{children:p})),(0,s.jsx)(T.Z,Object.assign({},c.downloadDialogProps))]}):(0,s.jsx)(a.Z,{text:(0,U.Iu)("Loading messages",n,$.jv.COMMON)})}))}),((e,t)=>e.messages===t.messages))}}]);
|
|
2
|
+
//# sourceMappingURL=334.dba054251a3e485f3ea9.chunk.js.map
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js/334.dba054251a3e485f3ea9.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,mgBAAogB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oDAAoD,MAAQ,GAAG,SAAW,wJAAwJ,eAAiB,CAAC,ogBAAogB,WAAa,MAE70C,W,qICJA,SAASC,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,IAK3B,OAAOL,IAGOS,MAAMC,KAAMR,WAU9B,SAASS,EAAgBC,EAAGC,GAM1B,OALAF,EAAkBb,OAAOgB,gBAAkB,SAAyBF,EAAGC,GAErE,OADAD,EAAEG,UAAYF,EACPD,IAGcA,EAAGC,GAkB5B,IAAIG,EAAc,IAAIC,IAClBC,EAAU,IAAIC,QACdC,EAAS,EA0Fb,SAASC,EAAQC,EAASC,EAAUC,EAASC,GAS3C,QARgB,IAAZD,IACFA,EAAU,SAGW,IAAnBC,IACFA,EA/FmBC,gBAkGsB,IAAhCC,OAAOC,2BAA2DF,IAAnBD,EAA8B,CACtF,IAAII,EAASP,EAAQQ,wBAUrB,OATAP,EAASE,EAAgB,CACvBM,eAAgBN,EAChBzB,OAAQsB,EACRU,kBAAgD,iBAAtBR,EAAQS,UAAyBT,EAAQS,UAAY,EAC/EC,KAAM,EACNC,mBAAoBN,EACpBO,iBAAk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ACA7B,SAAU2C,EAAUA,EAAQjL,QAAK8B,EACjCmI,2BAAAA,EACAC,YAAac,EAAgBgB,kBAGjC,IAbO,MAgBX,CAAEI,IAKFD,aAAAA,IEpFuCO,CAAgBjF,EAAOuD,GAExD2B,GAAgB,QACpBlF,EACA0E,GAGF,OACE,8BACE1F,IAAMkG,EACNxF,UAAY,IAAW,kBAAmBA,IAAU,UAEhD+E,GACF,iCACE,8BAAK/E,UAAU,wBAAsB,UACjC+E,MAEJ,SAACU,EAAA,EAAc,iBACR5B,EAAgBQ,0BAIzB,SAACqB,EAAA,EAAM,CAAClF,MAAO,QAAU,mBAAoBoC,EAAG,qBAKxD,CAAC7D,EAAW4G,IACH5G,EAAUkG,WAAaU,EAAUV","sources":["webpack://airdcpp-webui/./src/components/messages/messages.css","webpack://airdcpp-webui/./node_modules/react-intersection-observer/react-intersection-observer.m.js","webpack://airdcpp-webui/./src/components/messages/message/Timestamp.tsx","webpack://airdcpp-webui/./src/components/messages/message/MessageText.tsx","webpack://airdcpp-webui/./src/components/messages/message/ChatMessage.tsx","webpack://airdcpp-webui/./src/components/messages/message/StatusMessage.tsx","webpack://airdcpp-webui/./src/components/messages/list/MessageListItem.tsx","webpack://airdcpp-webui/./src/components/messages/list/MessageListDateDivider.tsx","webpack://airdcpp-webui/./src/components/messages/effects/MessageNodeManager.tsx","webpack://airdcpp-webui/./src/components/messages/messages.css?1e0d","webpack://airdcpp-webui/./src/components/messages/MessageView.tsx","webpack://airdcpp-webui/./src/effects/ItemDownloadManager.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".message-section {\\r\\n flex: 1;\\r\\n overflow-y: auto;\\r\\n}\\r\\n\\r\\n.message-list .date.divider i {\\r\\n margin-right: 5px;\\r\\n}\\r\\n\\r\\n.message-list .item .text .highlight.link {\\r\\n color: #4183c4;\\r\\n}\\r\\n\\r\\n.message-list .item .text .highlight.bold {\\r\\n font-weight: bold;\\r\\n}\\r\\n\\r\\n.message-list .item .text .table.dropdown,\\r\\n.message-list .item .text .table.dropdown .popup.trigger {\\r\\n max-width: 100%;\\r\\n}\\r\\n\\r\\n.message-list .item .text .table.dropdown .caption {\\r\\n overflow: hidden;\\r\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/messages/messages.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,OAAO;EACP,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,gBAAgB;AAClB\",\"sourcesContent\":[\".message-section {\\r\\n flex: 1;\\r\\n overflow-y: auto;\\r\\n}\\r\\n\\r\\n.message-list .date.divider i {\\r\\n margin-right: 5px;\\r\\n}\\r\\n\\r\\n.message-list .item .text .highlight.link {\\r\\n color: #4183c4;\\r\\n}\\r\\n\\r\\n.message-list .item .text .highlight.bold {\\r\\n font-weight: bold;\\r\\n}\\r\\n\\r\\n.message-list .item .text .table.dropdown,\\r\\n.message-list .item .text .table.dropdown .popup.trigger {\\r\\n max-width: 100%;\\r\\n}\\r\\n\\r\\n.message-list .item .text .table.dropdown .caption {\\r\\n overflow: hidden;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import * as React from 'react';\nimport { useEffect } from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar observerMap = new Map();\nvar RootIds = new WeakMap();\nvar rootId = 0;\nvar unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(function (key) {\n return options[key] !== undefined;\n }).map(function (key) {\n return key + \"_\" + (key === 'root' ? getRootId(options.root) : options[key]);\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n var id = optionsToId(options);\n var instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n var elements = new Map();\n var thresholds;\n var observer = new IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n var inView = entry.isIntersecting && thresholds.some(function (threshold) {\n return entry.intersectionRatio >= threshold;\n }); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(function (callback) {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id: id,\n observer: observer,\n elements: elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options, fallbackInView) {\n if (options === void 0) {\n options = {};\n }\n\n if (fallbackInView === void 0) {\n fallbackInView = unsupportedValue;\n }\n\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n var bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return function () {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n var _createObserver = createObserver(options),\n id = _createObserver.id,\n observer = _createObserver.observer,\n elements = _createObserver.elements; // Register the callback listener for this element\n\n\n var callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements[\"delete\"](element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap[\"delete\"](id);\n }\n };\n}\n\nvar _excluded = [\"children\", \"as\", \"tag\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nvar InView = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(InView, _React$Component);\n\n function InView(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.node = null;\n _this._unobserveCb = null;\n\n _this.handleNode = function (node) {\n if (_this.node) {\n // Clear the old observer, before we start observing a new element\n _this.unobserve();\n\n if (!node && !_this.props.triggerOnce && !_this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n _this.setState({\n inView: !!_this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n _this.node = node ? node : null;\n\n _this.observeNode();\n };\n\n _this.handleChange = function (inView, entry) {\n if (inView && _this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n _this.unobserve();\n }\n\n if (!isPlainChildren(_this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n _this.setState({\n inView: inView,\n entry: entry\n });\n }\n\n if (_this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n _this.props.onChange(inView, entry);\n }\n };\n\n _this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n return _this;\n }\n\n var _proto = InView.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.unobserve();\n this.node = null;\n };\n\n _proto.observeNode = function observeNode() {\n if (!this.node || this.props.skip) return;\n var _this$props = this.props,\n threshold = _this$props.threshold,\n root = _this$props.root,\n rootMargin = _this$props.rootMargin,\n trackVisibility = _this$props.trackVisibility,\n delay = _this$props.delay,\n fallbackInView = _this$props.fallbackInView;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold: threshold,\n root: root,\n rootMargin: rootMargin,\n // @ts-ignore\n trackVisibility: trackVisibility,\n // @ts-ignore\n delay: delay\n }, fallbackInView);\n };\n\n _proto.unobserve = function unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n };\n\n _proto.render = function render() {\n if (!isPlainChildren(this.props)) {\n var _this$state = this.state,\n inView = _this$state.inView,\n entry = _this$state.entry;\n return this.props.children({\n inView: inView,\n entry: entry,\n ref: this.handleNode\n });\n }\n\n var _this$props2 = this.props,\n children = _this$props2.children,\n as = _this$props2.as,\n tag = _this$props2.tag,\n props = _objectWithoutPropertiesLoose(_this$props2, _excluded);\n\n return /*#__PURE__*/React.createElement(as || tag || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n };\n\n return InView;\n}(React.Component);\nInView.displayName = 'InView';\nInView.defaultProps = {\n threshold: 0,\n triggerOnce: false,\n initialInView: false\n};\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n threshold = _ref.threshold,\n delay = _ref.delay,\n trackVisibility = _ref.trackVisibility,\n rootMargin = _ref.rootMargin,\n root = _ref.root,\n triggerOnce = _ref.triggerOnce,\n skip = _ref.skip,\n initialInView = _ref.initialInView,\n fallbackInView = _ref.fallbackInView;\n\n var unobserve = React.useRef();\n\n var _React$useState = React.useState({\n inView: !!initialInView\n }),\n state = _React$useState[0],\n setState = _React$useState[1];\n\n var setRef = React.useCallback(function (node) {\n if (unobserve.current !== undefined) {\n unobserve.current();\n unobserve.current = undefined;\n } // Skip creating the observer\n\n\n if (skip) return;\n\n if (node) {\n unobserve.current = observe(node, function (inView, entry) {\n setState({\n inView: inView,\n entry: entry\n });\n\n if (entry.isIntersecting && triggerOnce && unobserve.current) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve.current();\n unobserve.current = undefined;\n }\n }, {\n root: root,\n rootMargin: rootMargin,\n threshold: threshold,\n // @ts-ignore\n trackVisibility: trackVisibility,\n // @ts-ignore\n delay: delay\n }, fallbackInView);\n }\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n /* eslint-disable-next-line */\n\n useEffect(function () {\n if (!unobserve.current && state.entry && !triggerOnce && !skip) {\n // If we don't have a ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n setState({\n inView: !!initialInView\n });\n }\n });\n var result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, InView as default, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.m.js.map\n","import * as React from 'react';\r\n\r\nimport { formatTimestamp } from 'utils/ValueFormat';\r\n\r\n\r\ninterface TimeStampProps {\r\n time: number;\r\n}\r\n\r\nexport const TimeStamp: React.FC<TimeStampProps> = ({ time }) => (\r\n <div className=\"time\">\r\n { formatTimestamp(time) }\r\n </div>\r\n);\r\n","import * as React from 'react';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { HighlightedText } from '../../text/HighlightedText';\r\n\r\n\r\ninterface MessageTextProps {\r\n message: API.Message; \r\n emojify: boolean;\r\n user?: API.HubUser;\r\n label?: string;\r\n menuProps: UI.MessageActionMenuData;\r\n}\r\n\r\nexport const MessageText: React.FC<MessageTextProps> = ({ emojify, message, user, label, ...other }) => (\r\n <div className=\"text\">\r\n { !!label && (\r\n <span className=\"label\">\r\n { `${label}: ` }\r\n </span>\r\n ) }\r\n <HighlightedText\r\n emojify={ emojify }\r\n text={ message.text }\r\n highlights={ message.highlights }\r\n user={ user }\r\n { ...other }\r\n />\r\n </div>\r\n);\r\n","import PropTypes from 'prop-types';\r\nimport * as React from 'react';\r\nimport { InView } from 'react-intersection-observer';\r\n\r\nimport { UserMenu } from 'components/menu';\r\n\r\nimport * as API from 'types/api';\r\n\r\nimport MenuConstants from 'constants/MenuConstants';\r\nimport { CommonMessageProps } from '../types';\r\nimport { TimeStamp } from './Timestamp';\r\nimport { MessageText } from './MessageText';\r\n\r\n\r\ninterface AuthorProps {\r\n message: API.ChatMessage; \r\n dropdownContext: string;\r\n}\r\n\r\n// Message sections\r\nconst Author: React.FC<AuthorProps> = ({ message, dropdownContext }) => (\r\n <div className=\"header author\">\r\n { message.third_person && <span>*</span> }\r\n <UserMenu \r\n contextElement={ dropdownContext } \r\n triggerIcon={ null }\r\n user={ message.from }\r\n direction=\"downward\"\r\n remoteMenuId={ MenuConstants.HUB_USER }\r\n entityId={ message.from.hub_session_id }\r\n />\r\n </div>\r\n);\r\n\r\n/*Author.propTypes = {\r\n message: PropTypes.object.isRequired,\r\n dropdownContext: PropTypes.string.isRequired,\r\n};*/\r\n\r\ninterface ChatMessageProps extends CommonMessageProps {\r\n message: API.ChatMessage;\r\n dropdownContext: string;\r\n}\r\n\r\n// Main message types\r\nclass ChatMessage extends React.Component<ChatMessageProps> {\r\n static propTypes = {\r\n message: PropTypes.object.isRequired,\r\n dropdownContext: PropTypes.string.isRequired,\r\n };\r\n\r\n shouldComponentUpdate() {\r\n return false;\r\n }\r\n\r\n render() {\r\n const { \r\n message, dropdownContext, menuProps,\r\n ...other \r\n } = this.props;\r\n\r\n return (\r\n <InView \r\n className={ 'ui item chat ' + message.from.flags.join(' ')}\r\n { ...other }\r\n >\r\n <TimeStamp\r\n time={ message.time }\r\n />\r\n <div className={ 'left ' + (message.third_person ? 'third-person' : 'normal') }>\r\n <Author \r\n message={ message } \r\n dropdownContext={ dropdownContext }\r\n />\r\n <MessageText \r\n message={ message }\r\n emojify={ true }\r\n user={ message.from }\r\n menuProps={ menuProps }\r\n />\r\n </div>\r\n </InView>\r\n );\r\n }\r\n}\r\n\r\nexport { ChatMessage };\r\n","import PropTypes from 'prop-types';\r\nimport { Component } from 'react';\r\nimport { InView } from 'react-intersection-observer';\r\n\r\nimport Icon from 'components/semantic/Icon';\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\n\r\nimport { CommonMessageProps } from '../types';\r\nimport { MessageText } from './MessageText';\r\nimport { TimeStamp } from './Timestamp';\r\n\r\n\r\nconst getSeverityIcon = (severity: API.SeverityEnum) => {\r\n switch (severity) {\r\n case API.SeverityEnum.INFO: return IconConstants.INFO + ' circle';\r\n case API.SeverityEnum.WARNING: return IconConstants.WARNING;\r\n case API.SeverityEnum.ERROR: return IconConstants.ERROR;\r\n default: return '';\r\n }\r\n};\r\n\r\ninterface StatusMessageProps extends CommonMessageProps {\r\n message: API.StatusMessage;\r\n}\r\n\r\nclass StatusMessage extends Component<StatusMessageProps> {\r\n static propTypes = {\r\n message: PropTypes.object.isRequired,\r\n };\r\n\r\n shouldComponentUpdate() {\r\n return false;\r\n }\r\n\r\n render() {\r\n const { message, menuProps, ...other } = this.props;\r\n return (\r\n <InView\r\n className={ 'ui item status ' + message.severity }\r\n { ...other }\r\n >\r\n <Icon icon={ getSeverityIcon(message.severity) }/>\r\n { message.time > 0 && (\r\n <TimeStamp \r\n time={ message.time }\r\n />\r\n ) }\r\n <MessageText\r\n label={ message.label }\r\n message={ message }\r\n emojify={ false }\r\n menuProps={ menuProps }\r\n />\r\n </InView>\r\n );\r\n }\r\n}\r\n\r\nexport { StatusMessage };\r\n","import * as React from 'react';\r\n\r\nimport { ChatMessage, StatusMessage } from '../message';\r\n\r\nimport * as UI from 'types/ui';\r\nimport { CommonMessageProps } from '../types';\r\n\r\n\r\ninterface MessageListItemProps extends CommonMessageProps {\r\n id: string;\r\n message: UI.MessageListItem;\r\n}\r\n\r\nexport const MessageListItem: React.FC<MessageListItemProps> = ({\r\n message,\r\n ...other\r\n}) => {\r\n if (message.chat_message) {\r\n return (\r\n <ChatMessage\r\n message={ message.chat_message }\r\n dropdownContext=\".chat.session\"\r\n { ...other }\r\n />\r\n );\r\n } else if (message.log_message) {\r\n return (\r\n <StatusMessage\r\n message={ message.log_message }\r\n { ...other }\r\n />\r\n );\r\n }\r\n\r\n return null;\r\n};\r\n","//import PropTypes from 'prop-types';\r\nimport * as React from 'react';\r\n\r\nimport { formatCalendarTime } from 'utils/ValueFormat';\r\n\r\nimport * as UI from 'types/ui';\r\n\r\nimport Icon from 'components/semantic/Icon';\r\nimport IconConstants from 'constants/IconConstants';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\n\r\nconst getMessageDay = (listItem: UI.MessageListItem) => {\r\n const message = !!listItem.chat_message ? listItem.chat_message : listItem.log_message;\r\n return message && new Date(message.time * 1000).getDate();\r\n};\r\n\r\nconst isToday = (message: UI.MessageListItem) => {\r\n return getMessageDay(message) === new Date().getDate();\r\n};\r\n\r\nconst isHistoryItem = (listItem: UI.MessageListItem) => {\r\n const message = !!listItem.chat_message ? listItem.chat_message : listItem.log_message;\r\n return message && message.time === 0; \r\n};\r\n\r\nexport const showDateDivider = (index: number, messageList: UI.MessageListItem[]) => {\r\n const currentMessage = messageList[index];\r\n\r\n // First message? History log won't count\r\n if (index === 0 || (index === 1 && isHistoryItem(messageList[index - 1]))) {\r\n // Don't show for message that were received today\r\n if (!isToday(currentMessage) && !isHistoryItem(currentMessage)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n return getMessageDay(messageList[index - 1]) !== getMessageDay(currentMessage);\r\n};\r\n\r\ninterface MessageListDateDividerProps {\r\n time: number;\r\n}\r\n\r\nexport const MessageListDateDivider: React.FC<MessageListDateDividerProps> = ({ time }) => {\r\n const { t } = useTranslation();\r\n return (\r\n <div \r\n key={ `divider${time}` }\r\n className=\"ui horizontal date divider\"\r\n >\r\n <Icon \r\n icon={ IconConstants.DATE }\r\n />\r\n { formatCalendarTime(time, t) }\r\n </div>\r\n );\r\n};\r\n","import { useMemo } from 'react';\r\nimport * as React from 'react';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { getListMessageId, getListMessageIdString } from 'utils/MessageUtils';\r\n\r\nimport { MessageListItem } from '../list/MessageListItem';\r\nimport { MessageListDateDivider, showDateDivider } from '../list/MessageListDateDivider';\r\n\r\nimport { ItemDownloadManager } from '../../../effects/ItemDownloadManager';\r\n\r\n\r\ninterface MessageItemData {\r\n entityId: API.IdType | undefined;\r\n onMessageVisibilityChanged: (id: number, inView: boolean) => void;\r\n addDownload: UI.AddItemDownload;\r\n highlightRemoteMenuId: string | undefined;\r\n}\r\n\r\nconst reduceMessageListItem = (\r\n { entityId, onMessageVisibilityChanged, addDownload, highlightRemoteMenuId }: MessageItemData,\r\n reduced: React.ReactNode[], \r\n message: UI.MessageListItem, \r\n index: number, \r\n messageList: UI.MessageListItem[],\r\n) => {\r\n // Push a divider when the date was changed\r\n if (showDateDivider(index, messageList)) {\r\n const messageObj = !!message.chat_message ? message.chat_message : message.log_message;\r\n if (!!messageObj) {\r\n reduced.push(\r\n <MessageListDateDivider\r\n key={ `divider${messageObj.id}` }\r\n time={ messageObj.time }\r\n />\r\n );\r\n }\r\n }\r\n\r\n // Push message\r\n const id = getListMessageId(message)!;\r\n reduced.push(\r\n <MessageListItem\r\n key={ id }\r\n id={ getListMessageIdString(id) }\r\n onChange={(inView) => {\r\n onMessageVisibilityChanged(id, inView);\r\n }}\r\n threshold={ 0.4 }\r\n message={ message }\r\n menuProps={{\r\n addDownload,\r\n entityId,\r\n remoteMenuId: highlightRemoteMenuId,\r\n boundary: '.message-section',\r\n // Determining the position is somewhat complex since the number of remote menu items isn't known at this point\r\n // Only use the boundary for now, could be improved later...\r\n // position: index < 4 ? 'bottom left' : 'top left',\r\n }}\r\n />\r\n );\r\n\r\n return reduced;\r\n};\r\n\r\ninterface Props {\r\n messages: UI.MessageListItem[] | null;\r\n session?: UI.SessionItemBase;\r\n highlightRemoteMenuId?: string;\r\n}\r\n\r\nexport const useMessagesNode = (\r\n { highlightRemoteMenuId, messages, session }: Props, \r\n downloadManager: ItemDownloadManager,\r\n) => {\r\n const visibleItems = useMemo(() => new Set<number>(), [session]);\r\n\r\n const onMessageVisibilityChanged = (id: number, inView: boolean) => {\r\n if (!inView) {\r\n // console.log(`Remove view item ${id}`);\r\n visibleItems.delete(id);\r\n } else {\r\n // console.log(`Add view item ${id}`);\r\n visibleItems.add(id);\r\n }\r\n\r\n // console.log(`Visible items ${Array.from(visibleItems)}`);\r\n };\r\n\r\n const messageNodes = useMemo(\r\n () => {\r\n if (!messages) {\r\n return null;\r\n }\r\n\r\n return messages.reduce(\r\n reduceMessageListItem.bind(\r\n null, \r\n {\r\n highlightRemoteMenuId,\r\n entityId: session ? session.id : undefined, \r\n onMessageVisibilityChanged,\r\n addDownload: downloadManager.addDownloadItem,\r\n }\r\n ), \r\n []\r\n );\r\n },\r\n [ messages ]\r\n );\r\n\r\n return {\r\n messageNodes,\r\n visibleItems,\r\n };\r\n};\r\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./messages.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./messages.css\";\n export default content && content.locals ? content.locals : undefined;\n","//import PropTypes from 'prop-types';\r\nimport * as React from 'react';\r\nimport classNames from 'classnames';\r\nimport { TFunction } from 'i18next';\r\n\r\nimport Loader from 'components/semantic/Loader';\r\n\r\nimport { useMessageViewScrollEffect } from 'effects';\r\nimport { useMessagesNode } from './effects/MessageNodeManager';\r\nimport { useItemDownloadManager } from '../../effects/ItemDownloadManager';\r\nimport { translate } from 'utils/TranslationUtils';\r\n\r\nimport DownloadDialog from 'components/download/DownloadDialog';\r\n\r\nimport * as UI from 'types/ui';\r\n\r\nimport './messages.css';\r\n\r\n\r\ninterface MessageViewProps {\r\n messages: UI.MessageListItem[] | null;\r\n session?: UI.SessionItemBase;\r\n className?: string;\r\n scrollPositionHandler: UI.ScrollPositionHandler;\r\n highlightRemoteMenuId?: string;\r\n t: TFunction;\r\n}\r\n\r\nconst MessageView: React.FC<MessageViewProps> = React.memo(\r\n ({ className, t, ...other }) => {\r\n const downloadManager = useItemDownloadManager(other.session);\r\n const { messageNodes, visibleItems } = useMessagesNode(other, downloadManager);\r\n\r\n const scrollableRef = useMessageViewScrollEffect(\r\n other,\r\n visibleItems\r\n );\r\n\r\n return (\r\n <div \r\n ref={ scrollableRef }\r\n className={ classNames('message-section', className) }\r\n >\r\n { !!messageNodes ? (\r\n <>\r\n <div className=\"ui list message-list\">\r\n { messageNodes }\r\n </div>\r\n <DownloadDialog\r\n { ...downloadManager.downloadDialogProps }\r\n />\r\n </>\r\n ) : (\r\n <Loader text={ translate('Loading messages', t, UI.Modules.COMMON) }/>\r\n ) }\r\n </div>\r\n );\r\n },\r\n (prevProps, nextProps) => {\r\n return prevProps.messages === nextProps.messages;\r\n }\r\n);\r\n\r\nexport default MessageView;","import { useMemo } from 'react';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\nexport interface ItemDownloadManager {\r\n addDownloadItem: UI.AddItemDownload;\r\n downloadDialogProps: UI.ItemDownloadHandler;\r\n}\r\n\r\nexport const useItemDownloadManager = (session: UI.SessionItemBase | undefined) => {\r\n const downloadManager = useMemo<ItemDownloadManager>(\r\n () => {\r\n const downloads: { [key in string]: UI.ItemDownloadHandler } = {};\r\n\r\n const getDownloadItem = (itemId: API.IdType) => {\r\n const item = downloads[itemId];\r\n if (!item) {\r\n throw new Error('Download was not found');\r\n }\r\n\r\n return item;\r\n };\r\n\r\n const ret: ItemDownloadManager = {\r\n downloadDialogProps: {\r\n downloadHandler: (itemInfo, user, downloadData, downloadSession) => {\r\n return getDownloadItem(itemInfo.id).downloadHandler(itemInfo, user, downloadData, downloadSession);\r\n },\r\n userGetter: (itemId, props) => {\r\n const userGetter = getDownloadItem(itemId).userGetter;\r\n return !!userGetter ? userGetter(itemId, props) : undefined;\r\n },\r\n itemDataGetter: (itemId, socket) => {\r\n return getDownloadItem(itemId).itemDataGetter(itemId, socket);\r\n },\r\n session\r\n },\r\n addDownloadItem: (itemId: string, itemDownloadHandler: UI.ItemDownloadHandler) => {\r\n downloads[itemId] = itemDownloadHandler;\r\n },\r\n };\r\n\r\n return ret;\r\n },\r\n []\r\n );\r\n\r\n return downloadManager;\r\n};\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_setPrototypeOf","o","p","setPrototypeOf","__proto__","observerMap","Map","RootIds","WeakMap","rootId","observe","element","callback","options","fallbackInView","undefined","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","_createObserver","keys","sort","filter","map","root","has","set","toString","get","optionsToId","instance","thresholds","elements","observer","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","splice","indexOf","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","_React$Component","subClass","superClass","_this","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","create","constructor","_proto","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","_this$props","render","_this$state","ref","_this$props2","as","tag","excluded","sourceKeys","_objectWithoutPropertiesLoose","displayName","defaultProps","TimeStamp","className","MessageText","emojify","message","user","label","other","HighlightedText","text","highlights","Author","dropdownContext","third_person","contextElement","triggerIcon","from","direction","remoteMenuId","MenuConstants","entityId","hub_session_id","ChatMessage","shouldComponentUpdate","menuProps","flags","join","propTypes","getSeverityIcon","severity","IconConstants","StatusMessage","Component","Icon","icon","MessageListItem","chat_message","log_message","getMessageDay","listItem","Date","getDate","isHistoryItem","MessageListDateDivider","useTranslation","t","reduceMessageListItem","onMessageVisibilityChanged","addDownload","highlightRemoteMenuId","reduced","index","messageList","currentMessage","showDateDivider","messageObj","boundary","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","downloadManager","session","useMemo","downloads","getDownloadItem","itemId","item","Error","downloadDialogProps","downloadHandler","itemInfo","downloadData","downloadSession","userGetter","itemDataGetter","socket","addDownloadItem","itemDownloadHandler","messageNodes","visibleItems","messages","Set","add","delete","reduce","bind","useMessagesNode","scrollableRef","DownloadDialog","Loader","nextProps"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[424],{1624:(t,e,r)=>{r.d(e,{Z:()=>s});var n=r(87537),i=r.n(n),a=r(23645),o=r.n(a)()(i());o.push([t.id,"/* Generic table styles */\r\n.virtual-table {\r\n height: 100%;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n overflow: hidden;\r\n}\r\n\r\n.virtual-table .table-container-wrapper {\r\n width: 100%;\r\n flex: 1 1 auto;\r\n\r\n /* The table won't shrink properly without this */\r\n height: calc(100% - 50px);\r\n}\r\n\r\n.virtual-table .public_fixedDataTable_bodyRow a i:hover {\r\n cursor:pointer;\r\n}\r\n\r\n.virtual-table .fixedDataTableLayout_main {\r\n background-color: rgba(250, 250, 250, 0.8);\r\n}\r\n\r\n.virtual-table .fixedDataTableLayout_main:focus {\r\n outline: inherit;\r\n}\r\n\r\n.virtual-table .public_fixedDataTable_header a, .public_fixedDataTableCell_main a {\r\n color: black;\r\n}\r\n\r\n\r\n\r\n/* Common cell content styles */\r\n\r\n.virtual-table .cell-wrapper {\r\n position: relative;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n max-height: 50px;\r\n padding: 5px;\r\n}\r\n\r\n.virtual-table .cell-wrapper .plain.cell,\r\n.virtual-table .cell-wrapper .empty.dropdown {\r\n margin: 0px 3px;\r\n}\r\n\r\n.virtual-table .cell-wrapper .ui.progress .bar {\r\n height: 5px;\r\n}\r\n\r\n\r\n/* Footer */\r\n\r\n.table-footer {\r\n width: 100%;\r\n padding: 5px;\r\n background-color: #f6f7f8;\r\n background-image: -webkit-linear-gradient(#fff, #efefef);\r\n background-image: linear-gradient(#fff, #efefef);\r\n display:flex;\r\n align-items: center;\r\n}\r\n\r\n.table-footer .filter {\r\n margin-left: auto;\r\n display: flex;\r\n}\r\n\r\n.table-footer .count-info {\r\n margin-right: 0px;\r\n color: grey;\r\n}\r\n\r\n.table-footer .filter > div:last-child {\r\n margin-left: 10px;\r\n}\r\n\r\n.table-footer .filter .filter-method.dropdown.button {\r\n padding-left: 0px !important;\r\n padding-right: 0px !important;\r\n}\r\n\r\n.table-footer .filter .dropdown .trigger.icon {\r\n margin-right: 0px;\r\n}\r\n\r\n.table-footer .filter input {\r\n width: 90%;\r\n}\r\n\r\n\r\n\r\n/* Table dropdowns */\r\n.table-container-wrapper .dropdown .trigger {\r\n line-height: 21px;\r\n display: flex;\r\n align-items: flex-start;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger:hover, .public_fixedDataTableCell_main a:hover {\r\n cursor:pointer;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger:hover span, .public_fixedDataTableCell_main a:hover {\r\n text-decoration:underline;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger i.angle.icon {\r\n margin: 0px;\r\n}\r\n\r\n.table-container-wrapper .dropdown .icon-caption .icon {\r\n width: inherit !important;\r\n}\r\n\r\n.table-container-wrapper .empty.dropdown.filtered:not(.no-access) > div {\r\n padding-left: 22px;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger i {\r\n flex-shrink: 0;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger span {\r\n flex: 1;\r\n}\r\n\r\n\r\n\r\n/* Table dropdown popup content */\r\n.popup.dropdown-content {\r\n padding: 5px 15px;\r\n}\r\n\r\n.popup.dropdown-content .ui.dropdown.item {\r\n margin: 0px 0px;\r\n}\r\n","",{version:3,sources:["webpack://./src/components/table/style.css"],names:[],mappings:"AAAA,yBAAyB;AACzB;EACE,YAAY;EACZ,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,WAAW;EACX,cAAc;;EAEd,iDAAiD;EACjD,yBAAyB;AAC3B;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,0CAA0C;AAC5C;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;;;AAIA,+BAA+B;;AAE/B;EACE,kBAAkB;EAClB,QAAQ;EACR,2BAA2B;EAC3B,gBAAgB;EAChB,YAAY;AACd;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,WAAW;AACb;;;AAGA,WAAW;;AAEX;EACE,WAAW;EACX,YAAY;EACZ,yBAAyB;EACzB,wDAAwD;EACxD,gDAAgD;EAChD,YAAY;EACZ,mBAAmB;AACrB;;AAEA;EACE,iBAAiB;EACjB,aAAa;AACf;;AAEA;EACE,iBAAiB;EACjB,WAAW;AACb;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,4BAA4B;EAC5B,6BAA6B;AAC/B;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,UAAU;AACZ;;;;AAIA,oBAAoB;AACpB;EACE,iBAAiB;EACjB,aAAa;EACb,uBAAuB;AACzB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,OAAO;AACT;;;;AAIA,iCAAiC;AACjC;EACE,iBAAiB;AACnB;;AAEA;EACE,eAAe;AACjB",sourcesContent:["/* Generic table styles */\r\n.virtual-table {\r\n height: 100%;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n overflow: hidden;\r\n}\r\n\r\n.virtual-table .table-container-wrapper {\r\n width: 100%;\r\n flex: 1 1 auto;\r\n\r\n /* The table won't shrink properly without this */\r\n height: calc(100% - 50px);\r\n}\r\n\r\n.virtual-table .public_fixedDataTable_bodyRow a i:hover {\r\n cursor:pointer;\r\n}\r\n\r\n.virtual-table .fixedDataTableLayout_main {\r\n background-color: rgba(250, 250, 250, 0.8);\r\n}\r\n\r\n.virtual-table .fixedDataTableLayout_main:focus {\r\n outline: inherit;\r\n}\r\n\r\n.virtual-table .public_fixedDataTable_header a, .public_fixedDataTableCell_main a {\r\n color: black;\r\n}\r\n\r\n\r\n\r\n/* Common cell content styles */\r\n\r\n.virtual-table .cell-wrapper {\r\n position: relative;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n max-height: 50px;\r\n padding: 5px;\r\n}\r\n\r\n.virtual-table .cell-wrapper .plain.cell,\r\n.virtual-table .cell-wrapper .empty.dropdown {\r\n margin: 0px 3px;\r\n}\r\n\r\n.virtual-table .cell-wrapper .ui.progress .bar {\r\n height: 5px;\r\n}\r\n\r\n\r\n/* Footer */\r\n\r\n.table-footer {\r\n width: 100%;\r\n padding: 5px;\r\n background-color: #f6f7f8;\r\n background-image: -webkit-linear-gradient(#fff, #efefef);\r\n background-image: linear-gradient(#fff, #efefef);\r\n display:flex;\r\n align-items: center;\r\n}\r\n\r\n.table-footer .filter {\r\n margin-left: auto;\r\n display: flex;\r\n}\r\n\r\n.table-footer .count-info {\r\n margin-right: 0px;\r\n color: grey;\r\n}\r\n\r\n.table-footer .filter > div:last-child {\r\n margin-left: 10px;\r\n}\r\n\r\n.table-footer .filter .filter-method.dropdown.button {\r\n padding-left: 0px !important;\r\n padding-right: 0px !important;\r\n}\r\n\r\n.table-footer .filter .dropdown .trigger.icon {\r\n margin-right: 0px;\r\n}\r\n\r\n.table-footer .filter input {\r\n width: 90%;\r\n}\r\n\r\n\r\n\r\n/* Table dropdowns */\r\n.table-container-wrapper .dropdown .trigger {\r\n line-height: 21px;\r\n display: flex;\r\n align-items: flex-start;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger:hover, .public_fixedDataTableCell_main a:hover {\r\n cursor:pointer;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger:hover span, .public_fixedDataTableCell_main a:hover {\r\n text-decoration:underline;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger i.angle.icon {\r\n margin: 0px;\r\n}\r\n\r\n.table-container-wrapper .dropdown .icon-caption .icon {\r\n width: inherit !important;\r\n}\r\n\r\n.table-container-wrapper .empty.dropdown.filtered:not(.no-access) > div {\r\n padding-left: 22px;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger i {\r\n flex-shrink: 0;\r\n}\r\n\r\n.table-container-wrapper .dropdown .trigger span {\r\n flex: 1;\r\n}\r\n\r\n\r\n\r\n/* Table dropdown popup content */\r\n.popup.dropdown-content {\r\n padding: 5px 15px;\r\n}\r\n\r\n.popup.dropdown-content .ui.dropdown.item {\r\n margin: 0px 0px;\r\n}\r\n"],sourceRoot:""}]);const s=o},11508:(t,e,r)=>{r.d(e,{Z:()=>c});var n=r(10293),i=r.n(n),a=r(518),o=r(66883);const s=i().createActions([{setRange:{asyncResult:!0}},{setSort:{asyncResult:!0}},{close:{asyncResult:!0}},{pause:{asyncResult:!0}},{init:{asyncResult:!0}},"clear"]),l=(t,e,r)=>a.Z.post(e+"/settings",t).then((t=>r.completed(e,t))).catch((t=>r.failed(e,t)));s.close.listen((function(t,e){if(e&&o.Z.socketAuthenticated){let e=this;return a.Z.delete(t).then((r=>e.completed(t,r))).catch((e=>this.failed(t,e)))}return Promise.resolve()})),s.setSort.listen((function(t,e,r){l({sort_property:e,sort_ascending:r},t,this)})),s.setRange.listen((function(t,e,r){console.assert(r>0,"Invalid max rows"),l({range_start:e,max_count:r},t,this)})),s.pause.listen((function(t,e){l({paused:e},t,this)})),s.init.listen((function(t,e,r){r&&l({source_filter:r},t,this)}));const c=s},91780:(t,e,r)=>{r.d(e,{Z:()=>i});var n=r(85893);r(67294),r(10696);const i=({item:t})=>(0,n.jsxs)("div",Object.assign({className:"ip flag"},{children:[(0,n.jsx)("i",{className:"ui flag "+t.country.toLowerCase()}),t.str]}))},68126:(t,e,r)=>{r.d(e,{$A:()=>y,CW:()=>m,DS:()=>b,Eh:()=>f,Ks:()=>C,LV:()=>v,M4:()=>A,Nq:()=>w,VL:()=>x,fI:()=>E,iK:()=>D,qN:()=>g,uL:()=>j,wn:()=>B});var n=r(85893),i=(r(67294),r(47021)),a=r(2445),o=r(99015),s=r(91780),l=r(70516),c=r(89519),d=r(35108),p=r(28553),h=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r};const u=t=>"object"==typeof t?Array.isArray(t)?t.length:t.str:0===t?null:t,A=({cellData:t})=>(0,n.jsx)("span",Object.assign({className:"plain text cell"},{children:u(t)})),g=t=>{var{onClick:e,label:r,columnKey:i}=t,a=h(t,["onClick","label","columnKey"]);return(0,n.jsx)(d.Cell,Object.assign({},a,{children:(0,n.jsx)("a",Object.assign({onClick:e},{children:r}))}))},w=t=>{var{cellData:e,rowDataGetter:r}=t,a=h(t,["cellData","rowDataGetter"]);return(0,n.jsx)(i.B2,Object.assign({caption:(0,n.jsx)(o.Z,{typeInfo:r().type,caption:e}),itemData:r},a))},m=t=>{var{cellData:e,rowDataGetter:r}=t,a=h(t,["cellData","rowDataGetter"]);return(0,n.jsx)(i.B2,Object.assign({caption:e,itemData:r},a))},b=t=>{var{cellData:e,rowDataGetter:r,actions:i,actionId:a}=t,o=h(t,["cellData","rowDataGetter","actions","actionId"]);const s=i.actions[a];return(0,c.OE)(s,r())?(0,n.jsx)(p.h,{children:({onClickAction:t})=>(0,n.jsx)("a",Object.assign({className:"plain link cell",onClick:()=>t({actionId:a,action:s,moduleId:i.moduleId,itemData:r()})},{children:u(e)}))}):(0,n.jsx)(A,Object.assign({cellData:e},o))},f=({cellData:t,t:e})=>(0,n.jsx)("span",Object.assign({className:"plain size cell"},{children:(0,a.BU)(t,e)})),v=({cellData:t,t:e})=>(0,n.jsx)("span",Object.assign({className:"plain speed cell"},{children:(0,a.CY)(t,e)})),C=({cellData:t})=>(0,n.jsx)("span",Object.assign({className:"plain duration cell"},{children:(0,a.SY)(t)})),x=({cellData:t})=>(0,n.jsx)("span",Object.assign({className:"plain abbr-duration cell"},{children:(0,a.LO)(t)})),E=({cellData:t})=>(0,n.jsx)(s.Z,{item:t}),y=({cellData:t,t:e})=>(0,n.jsx)("span",Object.assign({className:"plain connection cell"},{children:(0,a.Nh)(t,e)})),j=({cellData:t})=>(0,n.jsx)("span",Object.assign({className:"plain decimal cell"},{children:(0,a.VG)(t)})),D=t=>{var{cellData:e,rowDataGetter:r,clickHandlerGetter:a,userGetter:s,downloadHandler:l}=t,c=h(t,["cellData","rowDataGetter","clickHandlerGetter","userGetter","downloadHandler"]);return(0,n.jsx)(i.As,Object.assign({caption:(0,n.jsx)(o.Z,{typeInfo:r().type,onClick:a?a(e,r):null,caption:e}),user:s(r()),linkCaption:!a,itemInfoGetter:r,downloadHandler:l},c))},B=t=>{var{cellData:e,rowDataGetter:r,onChange:i}=t,a=h(t,["cellData","rowDataGetter","onChange"]);return(0,n.jsx)(l.Z,Object.assign({checked:e,onChange:t=>i(t,r())},a))}},78230:(t,e,r)=>{r.d(e,{Z:()=>J});var n=r(85893),i=r(45697),a=r.n(i),o=r(67294),s=r(11508),l=r(1059),c=r(99005),d=r(98374),p=r(16630),h=r(76249),u=r(10606),A=r(8717),g=r(69222);const w=(t,e)=>{const r=(t=>{switch(t){case h.V3.REGEX:return"Regex";case h.V3.WILDCARD:return"Wildcard";case h.V3.EXACT:return"Exact";default:return"Partial"}})(t);return(0,A.Iu)(r,e,"table.filter")},m=(t,e)=>{let r=e("table.filter.filter","Filter");return t!==h.V3.PARTIAL&&(r+=` (${w(t,e).toLowerCase()})`),r+"..."};class b extends o.PureComponent{constructor(){super(...arguments),this.state={value:"",method:h.V3.PARTIAL},this.onFilterUpdated=()=>{const{value:t,method:e}=this.state;this.props.onFilterUpdated(t,e)},this.onTextChanged=t=>{this.setState({value:t.target.value}),clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.onFilterUpdated()}),200)},this.onMethodChanged=t=>{this.setState({method:t}),setTimeout((()=>this.onFilterUpdated())),this.input.focus()},this.getFilterMethod=(t,e)=>{const r=t===this.state.method;return(0,n.jsx)(d.Z,Object.assign({onClick:()=>this.onMethodChanged(t),active:r},{children:w(t,e)}),t)}}componentWillUnmount(){clearTimeout(this.timer)}render(){const{value:t,method:e}=this.state,{autoFocus:r}=this.props;return(0,n.jsx)(g.W,{children:i=>(0,n.jsx)("div",Object.assign({className:"text-filter"},{children:(0,n.jsxs)("div",Object.assign({className:"ui action input"},{children:[(0,n.jsx)("input",{ref:t=>this.input=t,placeholder:m(e,i),onChange:this.onTextChanged,value:t,type:"text",autoFocus:!(0,u.wd)()&&r}),(0,n.jsx)(l.Z,Object.assign({className:"filter-method right top pointing",button:!0,direction:"upward"},{children:(0,n.jsx)(c.Z,Object.assign({caption:(0,A.Iu)("Match type",i,"table.filter")},{children:Object.keys(h.V3).filter((t=>isNaN(Number(t)))).map((t=>this.getFilterMethod(h.V3[t],i)))}))}))]}))}))})}}b.defaultProps={autoFocus:!0};const f=(0,p.Z)(b);var v=r(35936),C=r(48117);const x=({store:t})=>{if(t.totalCount<0)return null;let e=t.totalCount;return t.totalCount!==t.rowCount&&(e=t.rowCount+"/"+t.totalCount),(0,n.jsxs)("div",Object.assign({className:"count-info"},{children:[(0,n.jsx)(v.Z,{icon:C.Z.FILTER}),e]}))},E=({store:t,customFilter:e,footerData:r,textFilterProps:i})=>(0,n.jsxs)("div",Object.assign({className:"table-footer"},{children:[r,(0,n.jsxs)("div",Object.assign({className:"filter item"},{children:[e?(0,n.jsx)(e,{viewUrl:t.viewUrl}):null,(0,n.jsx)(f,Object.assign({viewUrl:t.viewUrl},i)),(0,n.jsx)(x,{store:t})]}))]}));var y=r(35108),j=r(88699);class D extends o.Component{constructor(){super(...arguments),this.state={rowData:null},this.loadData=t=>this.props.dataLoader.updateRowData(t,this.onDataLoaded),this.rowDataGetter=()=>this.state.rowData,this.onDataLoaded=t=>{this.setState({rowData:t})}}componentDidMount(){this.loadData(this.props.rowIndex)}UNSAFE_componentWillReceiveProps(t){t.rowIndex!==this.props.rowIndex&&this.props.dataLoader.removePendingRequests(this.props.rowIndex,this.onDataLoaded),this.loadData(t.rowIndex)||this.setState({rowData:null})}componentWillUnmount(){this.props.dataLoader.removePendingRequests(this.props.rowIndex,this.onDataLoaded)}shouldComponentUpdate(t,e){return e.rowData!==this.state.rowData||t.width!==this.props.width}render(){const t=this.props,{columnKey:e,children:r,renderCondition:i,rowClassNameGetter:a}=t,s=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}(t,["columnKey","children","renderCondition","rowClassNameGetter"]),{rowData:l}=this.state;if(!l)return null;if(i&&!i(l[e],l))return null;let c=e;return a&&(c+=" "+a(l)),(0,n.jsx)("div",Object.assign({className:"cell-wrapper "+c},{children:o.cloneElement(r,Object.assign({cellData:l[e],rowDataGetter:this.rowDataGetter},s))}))}}D.propTypes={rowIndex:a().number,dataLoader:a().object.isRequired,width:a().number};const B=D;var _=r(68126),R=r(32347);const O=(t,e,r,n)=>{const{name:i,columnKey:a}=t.props;let o=n((0,A.GF)(a,[...(0,A.qo)(r),R.W9.TABLE]),i);{const t=e.sortAscending?" ↑":" ↓";o+=e.sortProperty===a?t:""}return o};class I extends o.Component{constructor(){super(...arguments),this.state={width:0,height:0,columnWidths:{}},this.getInitialProps=()=>({rowClassNameGetter:null,entityId:null}),this.scrollPosition=0,this.setInitialScrollRow=!0,this.updateRowRange=()=>{const{store:t}=this.props,{height:e}=this.state,r=(n=this.scrollPosition,Math.max(Math.floor(n/50),0));var n;const i=function(t){return Math.ceil(t/50)}(e);t.DEBUG&&console.log(`Settings changed, start: ${r}, end: ${i}, height: ${e}`,t.viewName),console.assert(t.active,"Posting data for an inactive view"),s.Z.setRange(t.viewUrl,r,i)},this.onScrollStart=(t,e)=>{const{store:r}=this.props;r.DEBUG&&console.log(`Scrolling started: ${e}`,r.viewUrl),console.assert(r.active,"Sending pause for an inactive view"),s.Z.pause(r.viewUrl,!0)},this.onScrollEnd=(t,e)=>{const{store:r,viewId:n}=this.props;this.scrollPosition=e,console.assert(r.active,"Sending pause for an inactive view"),s.Z.pause(r.viewUrl,!1),clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(this.updateRowRange,500),this.setInitialScrollRow&&(this.setInitialScrollRow=!1,r.DEBUG&&console.log(`Disabling initial scroll (view ${n})`)),r.setScrollData(e,n),r.DEBUG&&console.log(`Scrolling ended: ${e}`,r.viewUrl)},this.onColumnClicked=t=>{const{store:e}=this.props;let r=!0;t===e.sortProperty&&e.sortAscending&&(r=!1),s.Z.setSort(this.props.store.viewUrl,t,r)},this.onColumnResizeEndCallback=(t,e)=>{this.setState((({columnWidths:r})=>({columnWidths:Object.assign(Object.assign({},r),{[e]:t})})))},this.childToColumn=t=>{if(t.props.hideWidth&&t.props.hideWidth>this.state.width)return null;let{flexGrow:e,width:r,cell:i,columnKey:a,renderCondition:s}=t.props;const{store:l,rowClassNameGetter:c,moduleId:d,t:p}=this.props,h=(0,u.wd)();return h||a&&this.state.columnWidths[a]&&(r=this.state.columnWidths[a],e=void 0),o.cloneElement(t,{header:(0,n.jsx)(_.qN,{onClick:this.onColumnClicked.bind(null,a),label:O(t,l,d,p)}),flexGrow:e,width:r,isResizable:!h,allowCellsRecycling:!0,cell:(0,n.jsx)(B,Object.assign({dataLoader:this.props.dataLoader,renderCondition:s,rowClassNameGetter:c,t:p},{children:i||(0,n.jsx)(_.M4,{})}))})},this.onResizeView=t=>{if(!t.bounds)return;const{width:e,height:r}=t.entry?t.entry:t.bounds;this.setState({width:e,height:r})}}componentDidUpdate(t,e){e.height!==this.state.height?this.updateRowRange():t.entityId===this.props.entityId&&t.viewId===this.props.viewId||(this.props.store.DEBUG&&console.log(`Enabling initial scroll, entity/viewId changed (view ${this.props.viewId})`),this.setInitialScrollRow=!0,this.updateRowRange())}componentWillUnmount(){clearTimeout(this.scrollTimer)}render(){const t=o.Children.map(this.props.children,this.childToColumn),{store:e,viewId:r}=this.props;return(0,n.jsx)(j.Z,Object.assign({bounds:!0,onResize:this.onResizeView},{children:({measureRef:i})=>(0,n.jsx)("div",Object.assign({ref:i,className:"table-container-wrapper"},{children:(0,n.jsx)(y.Table,Object.assign({width:this.state.width,height:this.state.height,rowHeight:50,rowsCount:e.rowCount,headerHeight:50,isColumnResizing:!1,onColumnResizeEndCallback:this.onColumnResizeEndCallback,touchScrollEnabled:!0,onScrollStart:this.onScrollStart,onScrollEnd:this.onScrollEnd,scrollTop:this.setInitialScrollRow?e.getScrollData(r):void 0},{children:t}))}))}))}}I.propTypes={store:a().object.isRequired,rowClassNameGetter:a().func,entityId:a().any,dataLoader:a().any.isRequired};const U=I;var S=r(518),T=r(7145),k=r.n(T),G=r(18446),N=r.n(G);var Z=r(93379),L=r.n(Z),P=r(7795),F=r.n(P),W=r(90569),q=r.n(W),$=r(3565),M=r.n($),V=r(19216),Y=r.n(V),z=r(44589),K=r.n(z),H=r(1624),X={};X.styleTagTransform=K(),X.setAttributes=M(),X.insert=q().bind(null,"head"),X.domAPI=F(),X.insertStyleElement=Y(),L()(H.Z,X),H.Z&&H.Z.locals&&H.Z.locals,r(60854);class Q extends o.PureComponent{constructor(){super(...arguments),this.dataLoader=new class{constructor(t,e){this._onDataLoad=e,this._store=t,this._data=[],this._pendingRequest={},this._initialDataReceived=!1}clear(){this._pendingRequest={},this._data=[]}updateItem(t,e,r){let n=this._data[r];return n===e||N()(this._data[r],e)?t:(this._data[r]=n?k()(n,{$merge:e}):k()(n,{$set:e}),t+1)}onItemsUpdated(t,e=0,r){let n=r<this._data.length;if(t&&0!==t.length){this._initialDataReceived=!0;for(let e=0;e<this._data.length;e++)t[e]||delete this._data[e];(t.reduce(this.updateItem.bind(this),0)>0||0!==e)&&(n=!0)}else this.clear(),n=!0,this._initialDataReceived=!1;n&&this._onDataLoad()}get rangeOffset(){const t=this._rangeOffset;return this._rangeOffset=0,t}getRowData(t){return this._data[t]}updateRowData(t,e){const r=this._data[t];return r?(e(r),!0):(this._initialDataReceived&&this._queueRequestFor(t,e),!1)}removePendingRequests(t,e){delete this._pendingRequest[t]}_queueRequestFor(t,e){const r=t-t%10,n=this._pendingRequest[t];if(n)return void n.push(e);if(this._pendingRequest[t]=[e],t!==r){if(this._pendingRequest[r])return;this._pendingRequest[r]=[]}const i=Math.min(r+10,this._store.rowCount);S.Z.get(this._store.viewUrl+"/items/"+r+"/"+i).then(this.onRowsReceived.bind(this,r)).catch((t=>{console.error("Failed to load data",t);for(let t=r;t<i;t++)this._pendingRequest[t]&&delete this._pendingRequest[t]}))}onRowsReceived(t,e){if(this._pendingRequest[t])for(let r=0;r<e.length;r++){const n=t+r;N()(this._data[n],e[r])||(this._data[n]=e[r],this._pendingRequest[n]&&this._pendingRequest[n].forEach((t=>t(e[r])))),delete this._pendingRequest[n]}}}(this.props.store,(()=>this.forceUpdate())),this.unsubscribe=this.props.store.listen(this.dataLoader.onItemsUpdated.bind(this.dataLoader)),this.moduleExists=t=>!t||!this.props.sessionStore||this.props.sessionStore.getSession(t),this.start=t=>{const{store:e,sourceFilter:r}=this.props;s.Z.init(e.viewUrl,t,r),s.Z.setSort(e.viewUrl,e.sortProperty,e.sortAscending)},this.close=t=>{s.Z.close(this.props.store.viewUrl,this.moduleExists(t))}}componentDidMount(){this.start(this.props.entityId)}componentWillUnmount(){this.close(this.props.entityId),this.unsubscribe()}componentDidUpdate(t){if(t.entityId!==this.props.entityId&&(this.close(t.entityId),this.start(this.props.entityId)),t.viewId!==this.props.viewId){const{store:t}=this.props;t.paused&&s.Z.pause(t.viewUrl,!1),s.Z.clear(t.viewUrl)}}render(){const t=this.props,{store:e,footerData:r,emptyRowsNodeGetter:i,customFilter:a,textFilterProps:o}=t,s=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}(t,["store","footerData","emptyRowsNodeGetter","customFilter","textFilterProps"]);return i&&-1===e.totalCount?(0,n.jsx)("div",{className:"virtual-table"}):i&&0===e.totalCount?i():(0,n.jsx)("div",Object.assign({className:"virtual-table"},{children:(0,n.jsx)(g.W,{children:t=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(U,Object.assign({},s,{dataLoader:this.dataLoader,store:e,t})),(0,n.jsx)(E,{store:e,customFilter:a,footerData:r,textFilterProps:o})]})})}))}}Q.propTypes={footerData:a().node,emptyRowsNodeGetter:a().func,viewId:a().any,sessionStore:a().object,customFilter:a().node,sourceFilter:a().object};const J=Q},16630:(t,e,r)=>{r.d(e,{Z:()=>l});var n=r(85893),i=r(67294),a=r(42090),o=r(518),s=r(76249);function l(t,e="any"){class r extends i.PureComponent{constructor(){super(...arguments),this.onFilterUpdated=(t,r=s.V3.PARTIAL)=>{const n={pattern:t,method:r,property:e},{viewUrl:i,filter:a}=this.props;o.Z.put(i+"/filter/"+a.id,n).catch((t=>console.error("Failed to add table filter")))}}render(){return(0,n.jsx)(t,Object.assign({},this.props,{onFilterUpdated:this.onFilterUpdated}))}}return(0,a.Z)(r,{urls:{filter:({viewUrl:t},e)=>e.post(`${t}/filter`)},loaderText:null})}},93836:(t,e,r)=>{r.d(e,{Z:()=>s});var n=r(518),i=r(11508),a=r(41143),o=r.n(a);const s=(t,e=!0)=>{let r=!1,a=-1,s=0,l=0,c=[],d=null,p=!1,h=0,u=t,A=e;const g=()=>{c=[],l=0,s=0,a=-1};return{listenables:i.Z,onClose(t){t===this.viewUrl&&(this.DEBUG&&console.log(`Closing view ${this.viewUrl}`),this._removeMessageListener(),g(),r=!1,this.trigger())},onClear(t){t===this.viewUrl&&(g(),this.trigger())},onPause(t,e){t===this.viewUrl&&(p=e)},onInit(t,e){t===this.viewUrl&&(o()(!r,"Trying start an active table view"),d=e,this.addMessageListener(),this.DEBUG&&console.log(`Starting view ${this.viewUrl}`),r=!0)},onSetSort(t,e,r){t===this.viewUrl&&(u=e,A=r)},addMessageListener(){this._removeMessageListener=n.Z.addViewUpdateListener(this._viewName,this._handleUpdate,d)},get items(){return c},get viewUrl(){let t=this._apiUrl+"/";return d&&(t+=d+"/"),t+=this._viewName,t},get viewName(){return viewName},get rowCount(){return s},get totalCount(){return a},get active(){return r},get sortProperty(){return u},get sortAscending(){return A},get paused(){return p},setScrollData(t,e){this._sessionStore?this._sessionStore.scroll.setScrollData(t,d,e):(this.DEBUG&&console.log(`Setting scroll position ${t} for view ${this.viewUrl} (view ID ${e})`),h=t)},getScrollData(t){return this._sessionStore?this._sessionStore.scroll.getScrollData(d,t):(this.DEBUG&&console.log(`Getting scroll position ${h} for view ${this.viewUrl} (view ID ${t})`),h)},_handleUpdate(t){(t=>{var e;null!=t.range_start&&(l=t.range_start),null!=t.total_items&&(a=t.total_items),null!=t.matching_items&&(s=t.matching_items),null!=t.items&&(e=t.items,c=e.reduce(((t,e,r)=>{let n=(i=e.id,c.find((t=>!!t&&t.id===i))||{id:e.id});var i;return e.properties?n=Object.assign({},n,e.properties):1===Object.keys(n).length&&console.error("No properties were sent for a new view item",n.id),t[l+r]=n,t}),[]))})(t),this.trigger(c,t.range_offset,s)}}}}}]);
|
|
2
|
+
//# sourceMappingURL=424.44413ba27808d4072f7f.chunk.js.map
|
|
Binary file
|