airdcpp-webui 2.12.0-beta.3 → 2.12.0
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/.eslintrc.js +61 -61
- package/dist/index.html +1 -1
- package/dist/js/285.f568d215104be4fb06eb.chunk.js +2 -0
- package/dist/js/285.f568d215104be4fb06eb.chunk.js.gz +0 -0
- package/dist/js/285.f568d215104be4fb06eb.chunk.js.map +1 -0
- package/dist/js/317.54d6dded7430f84fd4a7.chunk.js +2 -0
- package/dist/js/317.54d6dded7430f84fd4a7.chunk.js.gz +0 -0
- package/dist/js/317.54d6dded7430f84fd4a7.chunk.js.map +1 -0
- package/dist/js/424.b9b775d50fbed2ec85ca.chunk.js +2 -0
- package/dist/js/424.b9b775d50fbed2ec85ca.chunk.js.gz +0 -0
- package/dist/js/424.b9b775d50fbed2ec85ca.chunk.js.map +1 -0
- package/dist/js/668.0d2ed46d1147385f6482.chunk.js +2 -0
- package/dist/js/668.0d2ed46d1147385f6482.chunk.js.gz +0 -0
- package/dist/js/668.0d2ed46d1147385f6482.chunk.js.map +1 -0
- package/dist/js/69.00e5adf1f76437e343f2.chunk.js +2 -0
- package/dist/js/69.00e5adf1f76437e343f2.chunk.js.gz +0 -0
- package/dist/js/69.00e5adf1f76437e343f2.chunk.js.map +1 -0
- package/dist/js/{702.2a6693aead40337b625c.chunk.js → 702.87b71d34ebd167d76c3b.chunk.js} +1 -1
- package/dist/js/702.87b71d34ebd167d76c3b.chunk.js.gz +0 -0
- package/dist/js/{702.2a6693aead40337b625c.chunk.js.map → 702.87b71d34ebd167d76c3b.chunk.js.map} +1 -1
- package/dist/js/{760.774900fa62b9e66b5ff7.chunk.js → 760.1679cba4f653d07819f3.chunk.js} +3 -3
- package/dist/js/760.1679cba4f653d07819f3.chunk.js.gz +0 -0
- package/dist/js/760.1679cba4f653d07819f3.chunk.js.map +1 -0
- package/dist/js/favorite-hubs.9c69b40155edc72e69bb.chunk.js +2 -0
- package/dist/js/favorite-hubs.9c69b40155edc72e69bb.chunk.js.gz +0 -0
- package/dist/js/favorite-hubs.9c69b40155edc72e69bb.chunk.js.map +1 -0
- package/dist/js/filelists.799bae07549950c8bdce.chunk.js +2 -0
- package/dist/js/filelists.799bae07549950c8bdce.chunk.js.gz +0 -0
- package/dist/js/filelists.799bae07549950c8bdce.chunk.js.map +1 -0
- package/dist/js/files.c723dabab26e48d06683.chunk.js +2 -0
- package/dist/js/files.c723dabab26e48d06683.chunk.js.gz +0 -0
- package/dist/js/files.c723dabab26e48d06683.chunk.js.map +1 -0
- package/dist/js/home.1bfba76cdbb2fc7194dc.chunk.js +3 -0
- package/dist/js/home.1bfba76cdbb2fc7194dc.chunk.js.gz +0 -0
- package/dist/js/{home.7b6595492d6f4a0507e5.chunk.js.map → home.1bfba76cdbb2fc7194dc.chunk.js.map} +1 -1
- package/dist/js/hubs.99a089268648607f734d.chunk.js +2 -0
- package/dist/js/hubs.99a089268648607f734d.chunk.js.gz +0 -0
- package/dist/js/hubs.99a089268648607f734d.chunk.js.map +1 -0
- package/dist/js/main.560335911ba879ef8877.entry.js +3 -0
- package/dist/js/{main.01d94b76f3ff04c0ccd0.entry.js.LICENSE.txt → main.560335911ba879ef8877.entry.js.LICENSE.txt} +2 -16
- package/dist/js/main.560335911ba879ef8877.entry.js.gz +0 -0
- package/dist/js/main.560335911ba879ef8877.entry.js.map +1 -0
- package/dist/js/messages.1fff9c30585362386309.chunk.js +2 -0
- package/dist/js/messages.1fff9c30585362386309.chunk.js.gz +0 -0
- package/dist/js/messages.1fff9c30585362386309.chunk.js.map +1 -0
- package/dist/js/queue.822b774c6541212741c2.chunk.js +2 -0
- package/dist/js/queue.822b774c6541212741c2.chunk.js.gz +0 -0
- package/dist/js/queue.822b774c6541212741c2.chunk.js.map +1 -0
- package/dist/js/search.6a9813389fd4fec46997.chunk.js +2 -0
- package/dist/js/search.6a9813389fd4fec46997.chunk.js.gz +0 -0
- package/dist/js/search.6a9813389fd4fec46997.chunk.js.map +1 -0
- package/dist/js/settings.809f0f5d0b8ca408ae54.chunk.js +2 -0
- package/dist/js/settings.809f0f5d0b8ca408ae54.chunk.js.gz +0 -0
- package/dist/js/settings.809f0f5d0b8ca408ae54.chunk.js.map +1 -0
- package/dist/js/share.d66035dc828b2f3c8bb0.chunk.js +2 -0
- package/dist/js/share.d66035dc828b2f3c8bb0.chunk.js.gz +0 -0
- package/dist/js/share.d66035dc828b2f3c8bb0.chunk.js.map +1 -0
- package/dist/js/system-log.b6bc274d7fb71714ca24.chunk.js +2 -0
- package/dist/js/system-log.b6bc274d7fb71714ca24.chunk.js.gz +0 -0
- package/dist/js/system-log.b6bc274d7fb71714ca24.chunk.js.map +1 -0
- package/dist/js/transfers.8d1840e604ad0e4c0c15.chunk.js +2 -0
- package/dist/js/transfers.8d1840e604ad0e4c0c15.chunk.js.gz +0 -0
- package/dist/js/transfers.8d1840e604ad0e4c0c15.chunk.js.map +1 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.gz +0 -0
- package/dist/sw.js.map +1 -1
- package/jest.config.js +18 -18
- package/package.json +1 -1
- package/dist/js/285.4cfd5122e0b82af77eb1.chunk.js +0 -2
- package/dist/js/285.4cfd5122e0b82af77eb1.chunk.js.gz +0 -0
- package/dist/js/285.4cfd5122e0b82af77eb1.chunk.js.map +0 -1
- package/dist/js/317.97fabbc4a91be88219d3.chunk.js +0 -2
- package/dist/js/317.97fabbc4a91be88219d3.chunk.js.gz +0 -0
- package/dist/js/317.97fabbc4a91be88219d3.chunk.js.map +0 -1
- package/dist/js/424.5cc8383701bc3226c5ff.chunk.js +0 -2
- package/dist/js/424.5cc8383701bc3226c5ff.chunk.js.gz +0 -0
- package/dist/js/424.5cc8383701bc3226c5ff.chunk.js.map +0 -1
- package/dist/js/668.294ae7e2a9db78b421b0.chunk.js +0 -2
- package/dist/js/668.294ae7e2a9db78b421b0.chunk.js.gz +0 -0
- package/dist/js/668.294ae7e2a9db78b421b0.chunk.js.map +0 -1
- package/dist/js/69.3e693915ecfb45fce6ea.chunk.js +0 -2
- package/dist/js/69.3e693915ecfb45fce6ea.chunk.js.gz +0 -0
- package/dist/js/69.3e693915ecfb45fce6ea.chunk.js.map +0 -1
- package/dist/js/702.2a6693aead40337b625c.chunk.js.gz +0 -0
- package/dist/js/760.774900fa62b9e66b5ff7.chunk.js.gz +0 -0
- package/dist/js/760.774900fa62b9e66b5ff7.chunk.js.map +0 -1
- package/dist/js/favorite-hubs.ddb9d9755d235cae74ad.chunk.js +0 -2
- package/dist/js/favorite-hubs.ddb9d9755d235cae74ad.chunk.js.gz +0 -0
- package/dist/js/favorite-hubs.ddb9d9755d235cae74ad.chunk.js.map +0 -1
- package/dist/js/filelists.938ca2c1834d7e4b5f31.chunk.js +0 -2
- package/dist/js/filelists.938ca2c1834d7e4b5f31.chunk.js.gz +0 -0
- package/dist/js/filelists.938ca2c1834d7e4b5f31.chunk.js.map +0 -1
- package/dist/js/files.c17b77223a4f8de80f1b.chunk.js +0 -2
- package/dist/js/files.c17b77223a4f8de80f1b.chunk.js.gz +0 -0
- package/dist/js/files.c17b77223a4f8de80f1b.chunk.js.map +0 -1
- package/dist/js/home.7b6595492d6f4a0507e5.chunk.js +0 -3
- package/dist/js/home.7b6595492d6f4a0507e5.chunk.js.gz +0 -0
- package/dist/js/hubs.2dbce9b35aa07bab9189.chunk.js +0 -2
- package/dist/js/hubs.2dbce9b35aa07bab9189.chunk.js.gz +0 -0
- package/dist/js/hubs.2dbce9b35aa07bab9189.chunk.js.map +0 -1
- package/dist/js/locales/en-webui-main-missing-json.0a7b6ea1f0a5eeaa5735.chunk.js +0 -1
- package/dist/js/locales/en-webui-main-missing-json.0a7b6ea1f0a5eeaa5735.chunk.js.gz +0 -0
- package/dist/js/main.01d94b76f3ff04c0ccd0.entry.js +0 -3
- package/dist/js/main.01d94b76f3ff04c0ccd0.entry.js.gz +0 -0
- package/dist/js/main.01d94b76f3ff04c0ccd0.entry.js.map +0 -1
- package/dist/js/messages.a761c7b81ebb0be1c6b9.chunk.js +0 -2
- package/dist/js/messages.a761c7b81ebb0be1c6b9.chunk.js.gz +0 -0
- package/dist/js/messages.a761c7b81ebb0be1c6b9.chunk.js.map +0 -1
- package/dist/js/queue.20fe8967cbdac914688a.chunk.js +0 -2
- package/dist/js/queue.20fe8967cbdac914688a.chunk.js.gz +0 -0
- package/dist/js/queue.20fe8967cbdac914688a.chunk.js.map +0 -1
- package/dist/js/search.62d97eef6ffbc4438ca7.chunk.js +0 -2
- package/dist/js/search.62d97eef6ffbc4438ca7.chunk.js.gz +0 -0
- package/dist/js/search.62d97eef6ffbc4438ca7.chunk.js.map +0 -1
- package/dist/js/settings.b9a77fec5bd9bf0f744c.chunk.js +0 -2
- package/dist/js/settings.b9a77fec5bd9bf0f744c.chunk.js.gz +0 -0
- package/dist/js/settings.b9a77fec5bd9bf0f744c.chunk.js.map +0 -1
- package/dist/js/share.3f04c8697ad367c0ecf6.chunk.js +0 -2
- package/dist/js/share.3f04c8697ad367c0ecf6.chunk.js.gz +0 -0
- package/dist/js/share.3f04c8697ad367c0ecf6.chunk.js.map +0 -1
- package/dist/js/system-log.9ccbd9a5982afcb71dfa.chunk.js +0 -2
- package/dist/js/system-log.9ccbd9a5982afcb71dfa.chunk.js.gz +0 -0
- package/dist/js/system-log.9ccbd9a5982afcb71dfa.chunk.js.map +0 -1
- package/dist/js/transfers.5fbe0929649dc0893737.chunk.js +0 -2
- package/dist/js/transfers.5fbe0929649dc0893737.chunk.js.gz +0 -0
- package/dist/js/transfers.5fbe0929649dc0893737.chunk.js.map +0 -1
- package/package - Copy.json +0 -156
- /package/dist/js/{760.774900fa62b9e66b5ff7.chunk.js.LICENSE.txt → 760.1679cba4f653d07819f3.chunk.js.LICENSE.txt} +0 -0
- /package/dist/js/{home.7b6595492d6f4a0507e5.chunk.js.LICENSE.txt → home.1bfba76cdbb2fc7194dc.chunk.js.LICENSE.txt} +0 -0
- /package/dist/js/locales/{ca-webui-main-json.6c149a10d6e263315d7f.chunk.js → ca-webui-main-json.e4a9ae36d6beb98c0057.chunk.js} +0 -0
- /package/dist/js/locales/{ca-webui-main-json.6c149a10d6e263315d7f.chunk.js.gz → ca-webui-main-json.e4a9ae36d6beb98c0057.chunk.js.gz} +0 -0
- /package/dist/js/locales/{da-webui-main-json.0ceb448ebe8d59d24573.chunk.js → da-webui-main-json.a08bb8db90fc33844135.chunk.js} +0 -0
- /package/dist/js/locales/{da-webui-main-json.0ceb448ebe8d59d24573.chunk.js.gz → da-webui-main-json.a08bb8db90fc33844135.chunk.js.gz} +0 -0
- /package/dist/js/locales/{de-webui-main-json.5f98884f26442cd6079a.chunk.js → de-webui-main-json.6763aab78d26033bc160.chunk.js} +0 -0
- /package/dist/js/locales/{de-webui-main-json.5f98884f26442cd6079a.chunk.js.gz → de-webui-main-json.6763aab78d26033bc160.chunk.js.gz} +0 -0
- /package/dist/js/locales/{el-webui-main-json.9b9f976001b216a51d60.chunk.js → el-webui-main-json.33c629aa295c990b6816.chunk.js} +0 -0
- /package/dist/js/locales/{el-webui-main-json.9b9f976001b216a51d60.chunk.js.gz → el-webui-main-json.33c629aa295c990b6816.chunk.js.gz} +0 -0
- /package/dist/js/locales/{en-webui-main-json.d1845c8535d9a1be9ef6.chunk.js → en-webui-main-json.ae2216f8443c16155761.chunk.js} +0 -0
- /package/dist/js/locales/{en-webui-main-json.d1845c8535d9a1be9ef6.chunk.js.gz → en-webui-main-json.ae2216f8443c16155761.chunk.js.gz} +0 -0
- /package/dist/js/locales/{es-webui-main-json.c0a7f4edfd71f660b005.chunk.js → es-webui-main-json.cef003aeaf6a8669aa55.chunk.js} +0 -0
- /package/dist/js/locales/{es-webui-main-json.c0a7f4edfd71f660b005.chunk.js.gz → es-webui-main-json.cef003aeaf6a8669aa55.chunk.js.gz} +0 -0
- /package/dist/js/locales/{eu-webui-main-json.eb0383952c8ab4fb9f36.chunk.js → eu-webui-main-json.f390f35c92cc5e80723e.chunk.js} +0 -0
- /package/dist/js/locales/{eu-webui-main-json.eb0383952c8ab4fb9f36.chunk.js.gz → eu-webui-main-json.f390f35c92cc5e80723e.chunk.js.gz} +0 -0
- /package/dist/js/locales/{fi-webui-main-json.f9ff02a0b28a5fd85a5d.chunk.js → fi-webui-main-json.2c0e54d1e586d6d4cdf4.chunk.js} +0 -0
- /package/dist/js/locales/{fi-webui-main-json.f9ff02a0b28a5fd85a5d.chunk.js.gz → fi-webui-main-json.2c0e54d1e586d6d4cdf4.chunk.js.gz} +0 -0
- /package/dist/js/locales/{fr-webui-main-json.53bc9323af23410d639f.chunk.js → fr-webui-main-json.eb58b9782b184c5bd0e7.chunk.js} +0 -0
- /package/dist/js/locales/{fr-webui-main-json.53bc9323af23410d639f.chunk.js.gz → fr-webui-main-json.eb58b9782b184c5bd0e7.chunk.js.gz} +0 -0
- /package/dist/js/locales/{hu-webui-main-json.c63e9fcc09558b4fe41e.chunk.js → hu-webui-main-json.6a8b4be95cd392319f00.chunk.js} +0 -0
- /package/dist/js/locales/{hu-webui-main-json.c63e9fcc09558b4fe41e.chunk.js.gz → hu-webui-main-json.6a8b4be95cd392319f00.chunk.js.gz} +0 -0
- /package/dist/js/locales/{it-webui-main-json.59aad6c34cdff2085157.chunk.js → it-webui-main-json.ace514cb8dbf846f7bb2.chunk.js} +0 -0
- /package/dist/js/locales/{it-webui-main-json.59aad6c34cdff2085157.chunk.js.gz → it-webui-main-json.ace514cb8dbf846f7bb2.chunk.js.gz} +0 -0
- /package/dist/js/locales/{nl-webui-main-json.f4e1772f9d507c339583.chunk.js → nl-webui-main-json.99f14f67e7f7f523f435.chunk.js} +0 -0
- /package/dist/js/locales/{nl-webui-main-json.f4e1772f9d507c339583.chunk.js.gz → nl-webui-main-json.99f14f67e7f7f523f435.chunk.js.gz} +0 -0
- /package/dist/js/locales/{no-webui-main-json.7637dd19134c84061d14.chunk.js → no-webui-main-json.14d6b98f5aeac4ae328e.chunk.js} +0 -0
- /package/dist/js/locales/{no-webui-main-json.7637dd19134c84061d14.chunk.js.gz → no-webui-main-json.14d6b98f5aeac4ae328e.chunk.js.gz} +0 -0
- /package/dist/js/locales/{pl-webui-main-json.10a0a30720b516cefda5.chunk.js → pl-webui-main-json.df98b2ed00d38e386747.chunk.js} +0 -0
- /package/dist/js/locales/{pl-webui-main-json.10a0a30720b516cefda5.chunk.js.gz → pl-webui-main-json.df98b2ed00d38e386747.chunk.js.gz} +0 -0
- /package/dist/js/locales/{pt-br-webui-main-json.cc946648a521c27b5a79.chunk.js → pt-br-webui-main-json.b06c253e99d8eb8a971d.chunk.js} +0 -0
- /package/dist/js/locales/{pt-br-webui-main-json.cc946648a521c27b5a79.chunk.js.gz → pt-br-webui-main-json.b06c253e99d8eb8a971d.chunk.js.gz} +0 -0
- /package/dist/js/locales/{pt-webui-main-json.5bed5158082678ceb16b.chunk.js → pt-webui-main-json.5278c6a5afa09777b453.chunk.js} +0 -0
- /package/dist/js/locales/{pt-webui-main-json.5bed5158082678ceb16b.chunk.js.gz → pt-webui-main-json.5278c6a5afa09777b453.chunk.js.gz} +0 -0
- /package/dist/js/locales/{ro-webui-main-json.d68cbb01175c7f6e2b53.chunk.js → ro-webui-main-json.24ab9a55725a9fc18299.chunk.js} +0 -0
- /package/dist/js/locales/{ro-webui-main-json.d68cbb01175c7f6e2b53.chunk.js.gz → ro-webui-main-json.24ab9a55725a9fc18299.chunk.js.gz} +0 -0
- /package/dist/js/locales/{ru-webui-main-json.c399c20411213c872e7b.chunk.js → ru-webui-main-json.e9ab289b5a1b70abdccf.chunk.js} +0 -0
- /package/dist/js/locales/{ru-webui-main-json.c399c20411213c872e7b.chunk.js.gz → ru-webui-main-json.e9ab289b5a1b70abdccf.chunk.js.gz} +0 -0
- /package/dist/js/locales/{sv-webui-main-json.bc915cd441a54413b67c.chunk.js → sv-webui-main-json.9ad571819cde0158829a.chunk.js} +0 -0
- /package/dist/js/locales/{sv-webui-main-json.bc915cd441a54413b67c.chunk.js.gz → sv-webui-main-json.9ad571819cde0158829a.chunk.js.gz} +0 -0
- /package/dist/js/locales/{tr-webui-main-json.a8c83f88e88d42ffca40.chunk.js → tr-webui-main-json.68bb926adc13e8952b47.chunk.js} +0 -0
- /package/dist/js/locales/{tr-webui-main-json.a8c83f88e88d42ffca40.chunk.js.gz → tr-webui-main-json.68bb926adc13e8952b47.chunk.js.gz} +0 -0
- /package/dist/js/locales/{uk_UA-webui-main-json.cbc43c57307c9f8134a6.chunk.js → uk_UA-webui-main-json.f4098f3ea96407bf804e.chunk.js} +0 -0
- /package/dist/js/locales/{uk_UA-webui-main-json.cbc43c57307c9f8134a6.chunk.js.gz → uk_UA-webui-main-json.f4098f3ea96407bf804e.chunk.js.gz} +0 -0
- /package/dist/js/locales/{zh_CN-webui-main-json.b963220181e25b6e6fcd.chunk.js → zh_CN-webui-main-json.6250a926eeea9fda0697.chunk.js} +0 -0
- /package/dist/js/locales/{zh_CN-webui-main-json.b963220181e25b6e6fcd.chunk.js.gz → zh_CN-webui-main-json.6250a926eeea9fda0697.chunk.js.gz} +0 -0
package/.eslintrc.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
/*
|
|
2
|
-
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
|
|
3
|
-
https://github.com/typescript-eslint/tslint-to-eslint-config
|
|
4
|
-
|
|
5
|
-
It represents the closest reasonable ESLint configuration to this
|
|
6
|
-
project's original TSLint configuration.
|
|
7
|
-
|
|
8
|
-
We recommend eventually switching this configuration to extend from
|
|
9
|
-
the recommended rulesets in typescript-eslint.
|
|
10
|
-
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
|
|
11
|
-
|
|
12
|
-
Happy linting! 💖
|
|
13
|
-
*/
|
|
14
|
-
module.exports = {
|
|
15
|
-
extends: [
|
|
16
|
-
'eslint:recommended',
|
|
17
|
-
'plugin:react/recommended',
|
|
18
|
-
'plugin:@typescript-eslint/eslint-recommended',
|
|
19
|
-
'plugin:@typescript-eslint/recommended',
|
|
20
|
-
],
|
|
21
|
-
env: {
|
|
22
|
-
browser: true,
|
|
23
|
-
es6: true,
|
|
24
|
-
node: true,
|
|
25
|
-
},
|
|
26
|
-
parserOptions: {
|
|
27
|
-
sourceType: 'module',
|
|
28
|
-
},
|
|
29
|
-
settings: {
|
|
30
|
-
react: {
|
|
31
|
-
version: 'detect', // React version. "detect" automatically picks the version you have installed.
|
|
32
|
-
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
|
|
33
|
-
// It will default to "latest" and warn if missing, and to "detect" in the future
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
rules: {
|
|
37
|
-
'max-len': [
|
|
38
|
-
'error',
|
|
39
|
-
{
|
|
40
|
-
code: 120,
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
'react/no-unescaped-entities': 'off',
|
|
44
|
-
'react/prop-types': 'off',
|
|
45
|
-
'no-extra-boolean-cast': 'off',
|
|
46
|
-
'no-prototype-builtins': 'off',
|
|
47
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
48
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
49
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
50
|
-
'@typescript-eslint/no-this-alias': 'off',
|
|
51
|
-
'@typescript-eslint/no-empty-interface': 'off',
|
|
52
|
-
'react/jsx-uses-react': 'off',
|
|
53
|
-
'react/react-in-jsx-scope': 'off',
|
|
54
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
55
|
-
'@typescript-eslint/no-unused-vars': [
|
|
56
|
-
'error',
|
|
57
|
-
{ args: 'none', ignoreRestSiblings: true },
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
plugins: ['eslint-plugin-react', '@typescript-eslint'],
|
|
61
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
|
|
3
|
+
https://github.com/typescript-eslint/tslint-to-eslint-config
|
|
4
|
+
|
|
5
|
+
It represents the closest reasonable ESLint configuration to this
|
|
6
|
+
project's original TSLint configuration.
|
|
7
|
+
|
|
8
|
+
We recommend eventually switching this configuration to extend from
|
|
9
|
+
the recommended rulesets in typescript-eslint.
|
|
10
|
+
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
|
|
11
|
+
|
|
12
|
+
Happy linting! 💖
|
|
13
|
+
*/
|
|
14
|
+
module.exports = {
|
|
15
|
+
extends: [
|
|
16
|
+
'eslint:recommended',
|
|
17
|
+
'plugin:react/recommended',
|
|
18
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
19
|
+
'plugin:@typescript-eslint/recommended',
|
|
20
|
+
],
|
|
21
|
+
env: {
|
|
22
|
+
browser: true,
|
|
23
|
+
es6: true,
|
|
24
|
+
node: true,
|
|
25
|
+
},
|
|
26
|
+
parserOptions: {
|
|
27
|
+
sourceType: 'module',
|
|
28
|
+
},
|
|
29
|
+
settings: {
|
|
30
|
+
react: {
|
|
31
|
+
version: 'detect', // React version. "detect" automatically picks the version you have installed.
|
|
32
|
+
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
|
|
33
|
+
// It will default to "latest" and warn if missing, and to "detect" in the future
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
rules: {
|
|
37
|
+
'max-len': [
|
|
38
|
+
'error',
|
|
39
|
+
{
|
|
40
|
+
code: 120,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
'react/no-unescaped-entities': 'off',
|
|
44
|
+
'react/prop-types': 'off',
|
|
45
|
+
'no-extra-boolean-cast': 'off',
|
|
46
|
+
'no-prototype-builtins': 'off',
|
|
47
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
48
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
49
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
50
|
+
'@typescript-eslint/no-this-alias': 'off',
|
|
51
|
+
'@typescript-eslint/no-empty-interface': 'off',
|
|
52
|
+
'react/jsx-uses-react': 'off',
|
|
53
|
+
'react/react-in-jsx-scope': 'off',
|
|
54
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
55
|
+
'@typescript-eslint/no-unused-vars': [
|
|
56
|
+
'error',
|
|
57
|
+
{ args: 'none', ignoreRestSiblings: true },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
plugins: ['eslint-plugin-react', '@typescript-eslint'],
|
|
61
|
+
};
|
package/dist/index.html
CHANGED
|
@@ -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.560335911ba879ef8877.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,\r\n.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;;;EAGE,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,\r\n.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(16550),r=a(91072),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:()=>n(e.path)},{children:[e.path,(0,t.jsx)("span",Object.assign({className:"disk-info"},{children:C(e,a)}))]}))}))]})),Z=(0,p.Z)((function({downloadHandler:e,pathInfos:n,t:a}){return(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 B=a(45697),k=a.n(B),D=a(35451);class S extends s.Component{constructor(){super(...arguments),this.formatParent=e=>{const{downloadHandler:n,t:a}=this.props;return(0,t.jsxs)(s.Fragment,{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)}))}}S.propTypes={downloadHandler:k().func.isRequired,groupedPaths:k().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:h.Z.BROWSE})]}),"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 G=({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.BROWSE})]})),(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}))}))]})),F=e=>{const{t:n}=(0,r.$G)(),[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)(_,{groupedPaths:n,downloadHandler:e,t:a})},{name:"Favorites",key:"favorites",list:a,component:({downloadHandler:e,t:n})=>(0,t.jsx)(_,{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.jsx)(b.Z,Object.assign({onClick:()=>a(e.key),active:n===e.key},{children:(0,t.jsxs)(t.Fragment,{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:G;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.$G)(),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)(F,{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(91072),i=a(8717),l=a(32347);const d=e=>e||(0,t.jsx)(r.cC,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.f568d215104be4fb06eb.chunk.js.map
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js/285.f568d215104be4fb06eb.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,kyBAAmyB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,iDAAiD,MAAQ,GAAG,SAAW,qPAAqP,eAAiB,CAAC,myBAAmyB,WAAa,MAEr+D,S,qTCaA,MAAMC,EA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C,8BAAKA,UAAW,IAAWuH,EAAS,UAAYD,EAAY,sBAAoB,WAC9E,8BAAKtH,UAAU,iBAAiBwH,MAAO,CAAEC,SAAU,WAAU,UAC1DxG,SAGHsG,IAAU,8BAAKvH,UAAU,gBAAc,UAAEkH,EAAWC,UAQ7CO,EAAgC,EAAGzG,YAC9C,8BAAKjB,UAAU,UAAQ,WACrB,8BAAKA,UAAU,uBAAqB,WAClC,8BAAKA,UAAU,0BAAwB,UAAEiB,WAUlCqB,EAA6B,I,IAAA,UACxCtC,EAAS,SACTiC,EAAQ,QACR0F,EAAO,UACPC,GAAS,EACNnD,E,yUAAK,GALgC,gDAMpC,OACJ,8BACEzE,UAAW,IACT,UAEA,CAAE,CAAC,GAAG2H,cAAqBA,GAC3B,CAAEC,UAAWA,GACb5H,IAEEyE,EAAK,UAERxC,IAEJ,C,kCC7ED,MAAM4F,EAAa,uBACnB,GACEA,WAAYA,EAEZC,wBAAyBD,EAAa,iBACtCE,gBAAiBF,EAEjBG,oBAAqB,+B,0DCJhB,MAAMC,EAAa,CAAC3B,EAAmBa,IACrC,SAAmB,GAAG,oBAAgCb,IAAa,CACxE4B,OAAQf,G","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,\\r\\n.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;;;EAGE,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,\\r\\n.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\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\ninterface PathItemProps {\r\n pathInfo: API.DiskSpaceInfo;\r\n downloadHandler: PathDownloadHandler;\r\n t: UI.TranslateF;\r\n}\r\n\r\nconst formatFreeSpace = (pathInfo: API.DiskSpaceInfo, t: UI.TranslateF) => {\r\n if (pathInfo.free_space <= 0) {\r\n return pathInfo.path;\r\n }\r\n\r\n return ` (${t(toI18nKey('spaceFree', UI.Modules.COMMON), {\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\nexport const PathListItem: React.FC<PathItemProps> = ({\r\n pathInfo,\r\n downloadHandler,\r\n t,\r\n}) => (\r\n <div className=\"item\">\r\n <Icon icon={IconConstants.FOLDER} />\r\n <div className=\"content\">\r\n <a onClick={() => downloadHandler(pathInfo.path)}>\r\n {pathInfo.path}\r\n <span className=\"disk-info\">{formatFreeSpace(pathInfo, t)}</span>\r\n </a>\r\n </div>\r\n </div>\r\n);\r\n","//import PropTypes from 'prop-types';\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\n\r\nimport { PathDownloadHandler } from '../../types';\r\nimport { PathListItem } from './PathListItem';\r\n\r\ninterface PathListProps {\r\n downloadHandler: PathDownloadHandler;\r\n paths: string[];\r\n t: UI.TranslateF;\r\n}\r\n\r\ninterface PathListDataProps {\r\n pathInfos: API.DiskSpaceInfo[];\r\n}\r\n\r\nconst PathListWithData = DataProviderDecorator<PathListProps, PathListDataProps>(\r\n function PathList({ downloadHandler, pathInfos, t }) {\r\n return (\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 {\r\n urls: {\r\n pathInfos: ({ paths }, socket) =>\r\n 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\nconst PathList: React.FC<PathListProps> = (props) => {\r\n if (props.paths.length === 0) {\r\n return (\r\n <Message title={translate('No paths to display', props.t, UI.Modules.COMMON)} />\r\n );\r\n }\r\n\r\n return <PathListWithData {...props} />;\r\n};\r\n\r\nexport default PathList;\r\n","import PropTypes from 'prop-types';\r\nimport React, { Component } from 'react';\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\ninterface AccordionTargetsProps {\r\n groupedPaths: API.GroupedPath[];\r\n downloadHandler: PathDownloadHandler;\r\n t: UI.TranslateF;\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 <React.Fragment 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 paths={parent.paths} downloadHandler={downloadHandler} t={t} />\r\n </div>\r\n </React.Fragment>\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 <Message title={translate('No paths to display', t, UI.Modules.COMMON)} />;\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;\r\n","import * as React from 'react';\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\nimport IconConstants from 'constants/IconConstants';\r\n\r\nconst appendBrowseItem = (\r\n menuItems: React.ReactNode[],\r\n handleBrowse: BrowseHandler,\r\n t: UI.TranslateF\r\n) => {\r\n if (!handleBrowse) {\r\n return menuItems;\r\n }\r\n\r\n return [\r\n ...menuItems,\r\n <MenuItemLink key=\"browse\" onClick={handleBrowse}>\r\n {translate('Browse', t, UI.Modules.COMMON)}\r\n <Icon icon={IconConstants.BROWSE} />\r\n </MenuItemLink>,\r\n ];\r\n};\r\n\r\nexport const MobileDownloadLayout: React.FC<LayoutProps> = ({\r\n menuItems,\r\n title,\r\n handleBrowse,\r\n t,\r\n children,\r\n}) => (\r\n <div className=\"mobile layout\">\r\n <Dropdown selection={true} caption={title}>\r\n {appendBrowseItem(menuItems, handleBrowse, t)}\r\n </Dropdown>\r\n <div className=\"ui segment main-content\">{children}</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\nexport const NormalDownloadLayout: React.FC<LayoutProps> = ({\r\n menuItems,\r\n title,\r\n handleBrowse,\r\n t,\r\n children,\r\n}) => (\r\n <Grid className=\"normal layout\">\r\n <div className=\"four wide column\">\r\n <div className=\"ui vertical fluid tabular menu\">{menuItems}</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.BROWSE}\r\n />\r\n )}\r\n </div>\r\n <div className=\"twelve wide stretched column\">\r\n <div className=\"ui segment main-content\">{children}</div>\r\n </div>\r\n </Grid>\r\n);\r\n","import { useState } from 'react';\r\nimport * as React from 'react';\r\nimport { useTranslation } from 'react-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\nexport interface DownloadDataProps<\r\n ItemT extends UI.DownloadableItemInfo = UI.DownloadableItemInfo\r\n> {\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 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: UI.TranslateF\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 <>\r\n {t(toI18nKey(section.key, UI.Modules.COMMON), section.name)}\r\n {!!section.list && (\r\n <div className=\"ui small right label\">{section.list.length}</div>\r\n )}\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 const { historyPaths, sharePaths, favoritePaths, itemInfo } = props;\r\n const dupePaths = itemInfo.dupe\r\n ? itemInfo.dupe.paths.map((path) => getParentPath(path))\r\n : [];\r\n\r\n return getDownloadSections({\r\n historyPaths,\r\n sharePaths,\r\n favoritePaths,\r\n dupePaths,\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.map((s) =>\r\n getMenuItem(s, activeSectionKey, setActiveSectionKey, t)\r\n );\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 t={t} downloadHandler={props.downloadHandler} />\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\nimport * as UI from 'types/ui';\r\n\r\nimport { PathDownloadHandler } from '../../types';\r\n\r\nexport interface DownloadSectionChildProps {\r\n t: UI.TranslateF;\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 paths={historyPaths} downloadHandler={downloadHandler} 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 {\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 {\r\n name: 'Dupes',\r\n key: 'dupes',\r\n list: dupePaths,\r\n component: ({ downloadHandler, t }) => (\r\n <PathList paths={dupePaths} downloadHandler={downloadHandler} t={t} />\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 {\r\n default as HistoryConstants,\r\n HistoryStringEnum,\r\n} 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, {\r\n DataProviderDecoratorChildProps,\r\n} from 'decorators/DataProviderDecorator';\r\nimport ModalRouteDecorator, {\r\n ModalRouteDecoratorChildProps,\r\n} 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\ntype DownloadItemIdType = string;\r\n\r\nexport type DownloadDialogProps<\r\n 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<\r\n ItemT extends UI.DownloadableItemInfo = UI.DownloadableItemInfo\r\n> extends DataProviderDecoratorChildProps,\r\n DownloadDataProps<ItemT> {}\r\n\r\ntype Props<ItemT extends UI.DownloadableItemInfo = UI.DownloadableItemInfo> =\r\n DownloadDialogProps<ItemT> & DownloadDialogDataProps<ItemT> & DownloadDialogRouteProps;\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,\r\n itemInfo,\r\n userGetter,\r\n match,\r\n session,\r\n historyPaths,\r\n favoritePaths,\r\n 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(toI18nKey('queueingFailed', UI.Modules.COMMON), {\r\n defaultValue: 'Failed to queue the item {{item.name}}',\r\n replace: {\r\n item: itemInfo,\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) =>\r\n handleDownload(directoryPath, fileName)\r\n }\r\n initialPath={getInitialBrowsePath()}\r\n selectMode={\r\n itemInfo.type.id === 'directory'\r\n ? UI.FileSelectModeEnum.DIRECTORY\r\n : 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<\r\n DownloadDialogProps & DownloadDialogRouteProps,\r\n DownloadDialogDataProps\r\n >(DownloadDialog, {\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 'download/:downloadItemId'\r\n);\r\n","import * 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\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\nconst formatText = (text: React.ReactNode) => {\r\n if (!!text) {\r\n return text;\r\n }\r\n\r\n return <Trans i18nKey={toI18nKey('na', UI.Modules.COMMON)}>N/A</Trans>;\r\n};\r\n\r\nexport const Row: React.FC<RowProps> = ({\r\n title,\r\n text,\r\n className,\r\n titleWidth = 'four',\r\n noText,\r\n}) => (\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 && <div className=\"column value\">{formatText(text)}</div>}\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\">{title}</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> = ({\r\n className,\r\n children,\r\n columns,\r\n stackable,\r\n ...other\r\n}) => (\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","import SocketService from 'services/SocketService';\r\nimport HistoryConstants from 'constants/HistoryConstants';\r\n\r\nexport const addHistory = (historyId: string, text: string) => {\r\n return SocketService.post(`${HistoryConstants.STRINGS_URL}/${historyId}`, {\r\n string: text,\r\n });\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","PathListWithData","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","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([[317],{34378:(e,t,s)=>{s.d(t,{Z:()=>a});var n=s(87537),r=s.n(n),i=s(23645),o=s.n(i)()(r());o.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}\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}\r\n"],sourceRoot:""}]);const a=o},58317:(e,t,s)=>{s.d(t,{Z:()=>se});var n=s(85893),r=s(67294),i=s(94184),o=s.n(i),a=s(54883),l=s(99311),d=s(20867),h=s(45697),c=s.n(h);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},g.apply(this,arguments)}const p=new Map,m=new WeakMap;let u=0;function b(e,t,s={},n=undefined){if(void 0===window.IntersectionObserver&&void 0!==n){const r=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof s.threshold?s.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),()=>{}}const{id:r,observer:i,elements:o}=function(e){let t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(s=e.root,s?(m.has(s)||(u+=1,m.set(s,u.toString())),m.get(s)):"0"):e[t]}`;var s})).toString()}(e),s=p.get(t);if(!s){const n=new Map;let r;const i=new IntersectionObserver((t=>{t.forEach((t=>{var s;const i=t.isIntersecting&&r.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(s=n.get(t.target))||s.forEach((e=>{e(i,t)}))}))}),e);r=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),s={id:t,observer:i,elements:n},p.set(t,s)}return s}(s);let a=o.get(e)||[];return o.has(e)||o.set(e,a),a.push(t),i.observe(e),function(){a.splice(a.indexOf(t),1),0===a.length&&(o.delete(e),i.unobserve(e)),0===o.size&&(i.disconnect(),p.delete(r))}}const f=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function y(e){return"function"!=typeof e.children}class v extends r.Component{constructor(e){super(e),this.node=null,this._unobserveCb=null,this.handleNode=e=>{this.node&&(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()},this.handleChange=(e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),y(this.props)||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)},this.state={inView:!!e.initialInView,entry:void 0}}componentDidUpdate(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())}componentWillUnmount(){this.unobserve(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:s,trackVisibility:n,delay:r,fallbackInView:i}=this.props;this._unobserveCb=b(this.node,this.handleChange,{threshold:e,root:t,rootMargin:s,trackVisibility:n,delay:r},i)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){if(!y(this.props)){const{inView:e,entry:t}=this.state;return this.props.children({inView:e,entry:t,ref:this.handleNode})}const e=this.props,{children:t,as:s}=e,n=function(e,t){if(null==e)return{};var s,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)s=i[n],t.indexOf(s)>=0||(r[s]=e[s]);return r}(e,f);return r.createElement(s||"div",g({ref:this.handleNode},n),t)}}var O=s(84613),j=s(4333),w=s(2445);const x=({time:e})=>(0,n.jsx)("div",Object.assign({className:"time"},{children:(0,w.i$)(e)}));var A=s(94656);const C=e=>{var{emojify:t,message:s,user:r,label:i,highlightMenuProps:o}=e,a=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["emojify","message","user","label","highlightMenuProps"]);return(0,n.jsxs)("div",Object.assign({className:"text"},{children:[!!i&&(0,n.jsx)("span",Object.assign({className:"label"},{children:`${i}: `})),(0,n.jsx)(A.h,Object.assign({emojify:t,text:s.text,highlights:s.highlights,user:r,menuProps:o},a))]}))};const E=({message:e,dropdownContext:t})=>(0,n.jsxs)("div",Object.assign({className:"header author"},{children:[e.third_person&&(0,n.jsx)("span",{children:"*"}),(0,n.jsx)(O.Ie,{contextElement:t,triggerIcon:null,user:e.from,remoteMenuId:j.Z.HUB_USER,entityId:e.from.hub_session_id})]}));class I extends r.Component{shouldComponentUpdate(){return!1}render(){const e=this.props,{message:t,dropdownContext:s,highlightMenuProps:r}=e,i=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["message","dropdownContext","highlightMenuProps"]);return(0,n.jsxs)(v,Object.assign({className:o()("ui item chat",t.from.flags.join(" "))},i,{children:[(0,n.jsx)(x,{time:t.time}),(0,n.jsxs)("div",Object.assign({className:o()("left",t.third_person?"third-person":"normal")},{children:[(0,n.jsx)(E,{message:t,dropdownContext:s}),(0,n.jsx)(C,{message:t,emojify:!0,user:t.from,highlightMenuProps:r})]}))]}))}}I.propTypes={message:c().object.isRequired,dropdownContext:c().string.isRequired};var P=s(35936),M=s(48117),N=s(76249);const _=e=>{switch(e){case N.m4.VERBOSE:return M.Z.VERBOSE;case N.m4.INFO:return M.Z.INFO+" circle";case N.m4.WARNING:return M.Z.WARNING;case N.m4.ERROR:return M.Z.ERROR;default:return""}};class R extends r.Component{shouldComponentUpdate(){return!1}render(){const e=this.props,{message:t,highlightMenuProps:s}=e,r=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["message","highlightMenuProps"]);return(0,n.jsxs)(v,Object.assign({className:o()("ui item status",t.severity,t.type)},r,{children:[(0,n.jsx)(P.Z,{icon:_(t.severity)}),t.time>0&&(0,n.jsx)(x,{time:t.time}),(0,n.jsx)(C,{label:t.label,message:t,emojify:!1,highlightMenuProps:s})]}))}}R.propTypes={message:c().object.isRequired};const k=e=>{var{message:t}=e,s=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["message"]);return t.chat_message?(0,n.jsx)(I,Object.assign({message:t.chat_message,dropdownContext:s.highlightMenuProps.boundary},s)):t.log_message?(0,n.jsx)(R,Object.assign({message:t.log_message},s)):null};var V=s(91072);const S=e=>{const t=e.chat_message?e.chat_message:e.log_message;return t&&new Date(1e3*t.time).getDate()},B=e=>!!e.log_message&&e.log_message.type===N._Z.HISTORY,Z=({time:e})=>{const{t}=(0,V.$G)();return(0,n.jsxs)("div",Object.assign({className:"ui horizontal date divider"},{children:[(0,n.jsx)(P.Z,{icon:M.Z.DATE}),(0,w._s)(e,t)]}),`divider${e}`)},D=({entityId:e,onMessageVisibilityChanged:t,addDownload:s,highlightRemoteMenuId:r},i,o,a,l)=>{if(((e,t)=>{const s=t[e];return 0===e||1===e&&B(t[e-1])?S(s)!==(new Date).getDate()&&!B(s):S(t[e-1])!==S(s)})(a,l)){const e=o.chat_message?o.chat_message:o.log_message;e&&i.push((0,n.jsx)(Z,{time:e.time},`divider${e.id}`))}const h=(0,d.oi)(o);return i.push((0,n.jsx)(k,{id:(0,d.or)(h),onChange:e=>{t(h,e)},threshold:.4,message:o,highlightMenuProps:{addDownload:s,entityId:e,remoteMenuId:r,boundary:".message-section"}},h)),i};var G=s(8717),$=s(62285),T=s(32347),U=s(93379),H=s.n(U),W=s(7795),q=s.n(W),F=s(90569),z=s.n(F),L=s(3565),Y=s.n(L),J=s(19216),K=s.n(J),Q=s(44589),X=s.n(Q),ee=s(34378),te={};te.styleTagTransform=X(),te.setAttributes=Y(),te.insert=z().bind(null,"head"),te.domAPI=q(),te.insertStyleElement=K(),H()(ee.Z,te),ee.Z&&ee.Z.locals&&ee.Z.locals;const se=r.memo((function(e){var{className:t,t:s}=e,i=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["className","t"]);const d=(h=i.session,(0,r.useMemo)((()=>{const e={},t=t=>{const s=e[t];if(!s)throw new Error("Download was not found");return s};return{downloadDialogProps:{downloadHandler:(e,s,n,r)=>t(e.id).downloadHandler(e,s,n,r),userGetter:(e,s)=>{const n=t(e).userGetter;return n?n(e,s):void 0},itemDataGetter:(e,s)=>t(e).itemDataGetter(e,s),session:h},addDownloadItem:(t,s)=>{e[t]=s}}}),[]));var h;const{messageNodes:c,visibleItems:g}=(({highlightRemoteMenuId:e,messages:t,session:s},n)=>{const i=(0,r.useMemo)((()=>new Set),[s]),o=(e,t)=>{t?i.add(e):i.delete(e)};return{messageNodes:(0,r.useMemo)((()=>t?t.reduce(D.bind(null,{highlightRemoteMenuId:e,entityId:s?s.id:void 0,onMessageVisibilityChanged:o,addDownload:n.addDownloadItem}),[]):null),[t]),visibleItems:i}})(i,d),p=(0,l.Hc)(i,g);return(0,n.jsx)("div",Object.assign({ref:p,className:o()("message-section",t)},{children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",Object.assign({className:"ui list message-list"},{children:c})),(0,n.jsx)($.Z,Object.assign({},d.downloadDialogProps))]}):(0,n.jsx)(a.Z,{text:(0,G.Iu)("Loading messages",s,T.jv.COMMON)})}))}),((e,t)=>e.messages===t.messages))}}]);
|
|
2
|
+
//# sourceMappingURL=317.54d6dded7430f84fd4a7.chunk.js.map
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js/317.54d6dded7430f84fd4a7.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,ugBAAwgB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oDAAoD,MAAQ,GAAG,SAAW,wJAAwJ,eAAiB,CAAC,wgBAAwgB,WAAa,MAEr1C,S,uICLA,SAASC,IAeP,OAdAA,EAA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AAAhB,UAAQ,IACtBkB,EAIEA,EAASG,OACdtC,EAAsBuC,KAAK,KAAM,CAC/BpC,wBACA7B,SAAU0C,EAAUA,EAAQnK,QAAK4B,EACjCwH,6BACAC,YAAaa,EAAgBgB,kBAE/B,IAVO,MAYR,CAACI,IAIFD,eACD,EEtFwCM,CAAgB/E,EAAOsD,GAExD0B,GAAgB,QAA2BhF,EAAOyE,GAExD,OACE,8BAAKvF,IAAK8F,EAAevF,UAAW,IAAW,kBAAmBA,IAAU,UACvE+E,GACD,iCACE,8BAAK/E,UAAU,wBAAsB,UAAE+E,MACvC,SAACS,EAAA,EAAc,iBAAK3B,EAAgBQ,0BAGtC,SAACoB,EAAA,EAAM,CAAChF,MAAM,QAAU,mBAAoBoC,EAAG,iBAIvD,IACA,CAACzD,EAAWsG,IACHtG,EAAU6F,WAAaS,EAAUT,U","sources":["webpack://airdcpp-webui/./src/components/messages/messages.css","webpack://airdcpp-webui/./node_modules/react-intersection-observer/react-intersection-observer.modern.mjs","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}\\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}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import * as React 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 _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\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet 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(key => options[key] !== undefined).map(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 let id = optionsToId(options);\n let 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 const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(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 const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @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(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,\n observer,\n 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 = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const 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 () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let 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\nconst _excluded = [\"children\", \"as\", \"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\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = 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 this.observeNode();\n };\n\n this.handleChange = (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,\n 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 }\n\n 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 componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\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({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _state$entry;\n\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined\n }); // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n\n callback.current = onChange;\n React.useEffect(() => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(ref, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n return () => {\n if (unobserve) {\n unobserve();\n }\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, ref, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n const entryTarget = (_state$entry = state.entry) == null ? void 0 : _state$entry.target;\n const previousEntryTarget = React.useRef();\n\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n // If we don't have a node 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 previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: undefined\n });\n }\n\n const 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, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n","import * as React from 'react';\r\n\r\nimport { formatTimestamp } from 'utils/ValueFormat';\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\">{formatTimestamp(time)}</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\ninterface MessageTextProps {\r\n message: API.Message;\r\n emojify: boolean;\r\n user?: API.HubUser;\r\n label?: string;\r\n highlightMenuProps: UI.MessageActionMenuData;\r\n}\r\n\r\nexport const MessageText: React.FC<MessageTextProps> = ({\r\n emojify,\r\n message,\r\n user,\r\n label,\r\n highlightMenuProps,\r\n ...other\r\n}) => (\r\n <div className=\"text\">\r\n {!!label && <span className=\"label\">{`${label}: `}</span>}\r\n <HighlightedText\r\n emojify={emojify}\r\n text={message.text}\r\n highlights={message.highlights}\r\n user={user}\r\n menuProps={highlightMenuProps}\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/action-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\nimport classNames from 'classnames';\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 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 { message, dropdownContext, highlightMenuProps, ...other } = this.props;\r\n\r\n return (\r\n <InView\r\n className={classNames('ui item chat', message.from.flags.join(' '))}\r\n {...other}\r\n >\r\n <TimeStamp time={message.time} />\r\n <div\r\n className={classNames('left', message.third_person ? 'third-person' : 'normal')}\r\n >\r\n <Author message={message} dropdownContext={dropdownContext} />\r\n <MessageText\r\n message={message}\r\n emojify={true}\r\n user={message.from}\r\n highlightMenuProps={highlightMenuProps}\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\n\r\nimport classNames from 'classnames';\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\nconst getSeverityIcon = (severity: API.SeverityEnum) => {\r\n switch (severity) {\r\n case API.SeverityEnum.VERBOSE:\r\n return IconConstants.VERBOSE;\r\n case API.SeverityEnum.INFO:\r\n return IconConstants.INFO + ' circle';\r\n case API.SeverityEnum.WARNING:\r\n return IconConstants.WARNING;\r\n case API.SeverityEnum.ERROR:\r\n return IconConstants.ERROR;\r\n default:\r\n 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, highlightMenuProps, ...other } = this.props;\r\n return (\r\n <InView\r\n className={classNames('ui item status', message.severity, message.type)}\r\n {...other}\r\n >\r\n <Icon icon={getSeverityIcon(message.severity)} />\r\n {message.time > 0 && <TimeStamp time={message.time} />}\r\n <MessageText\r\n label={message.label}\r\n message={message}\r\n emojify={false}\r\n highlightMenuProps={highlightMenuProps}\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\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={other.highlightMenuProps.boundary}\r\n {...other}\r\n />\r\n );\r\n } else if (message.log_message) {\r\n return <StatusMessage message={message.log_message} {...other} />;\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 API from 'types/api';\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\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 if (listItem.log_message) {\r\n return listItem.log_message.type === API.StatusMessageTypeEnum.HISTORY;\r\n }\r\n\r\n return false;\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> = ({\r\n time,\r\n}) => {\r\n const { t } = useTranslation();\r\n return (\r\n <div key={`divider${time}`} className=\"ui horizontal date divider\">\r\n <Icon icon={IconConstants.DATE} />\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\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 {\r\n entityId,\r\n onMessageVisibilityChanged,\r\n addDownload,\r\n highlightRemoteMenuId,\r\n }: 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\r\n ? message.chat_message\r\n : message.log_message;\r\n if (!!messageObj) {\r\n reduced.push(\r\n <MessageListDateDivider key={`divider${messageObj.id}`} time={messageObj.time} />\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 // Highlight menus must use table action menu because the text element has overflow: hidden\r\n // to allow long words to be cut (author action menu can still use the regular dropdown)\r\n highlightMenuProps={{\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<UI.DownloadableItemInfo, Props>\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 if (!messages) {\r\n return null;\r\n }\r\n\r\n return messages.reduce(\r\n reduceMessageListItem.bind(null, {\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 }, [messages]);\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\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\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: UI.TranslateF;\r\n}\r\n\r\nconst MessageView: React.FC<MessageViewProps> = React.memo(\r\n function MessageView({ 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(other, visibleItems);\r\n\r\n return (\r\n <div ref={scrollableRef} className={classNames('message-section', className)}>\r\n {!!messageNodes ? (\r\n <>\r\n <div className=\"ui list message-list\">{messageNodes}</div>\r\n <DownloadDialog {...downloadManager.downloadDialogProps} />\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;\r\n","import { useMemo } from 'react';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nexport interface ItemDownloadManager<\r\n ItemT extends UI.DownloadableItemInfo,\r\n PropsT extends object\r\n> {\r\n addDownloadItem: UI.AddItemDownload<ItemT, PropsT>;\r\n downloadDialogProps: UI.ItemDownloadHandler<ItemT, PropsT>;\r\n}\r\n\r\nexport const useItemDownloadManager = <\r\n ItemT extends UI.DownloadableItemInfo,\r\n PropsT extends object\r\n>(\r\n session: UI.SessionItemBase | undefined\r\n) => {\r\n const downloadManager = useMemo<ItemDownloadManager<ItemT, PropsT>>(() => {\r\n const downloads: { [key in string]: UI.ItemDownloadHandler<ItemT, PropsT> } = {};\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<ItemT, PropsT> = {\r\n downloadDialogProps: {\r\n downloadHandler: (itemInfo, user, downloadData, downloadSession) => {\r\n return getDownloadItem(itemInfo.id).downloadHandler(\r\n itemInfo,\r\n user,\r\n downloadData,\r\n downloadSession\r\n );\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, itemDownloadHandler) => {\r\n downloads[itemId] = itemDownloadHandler;\r\n },\r\n };\r\n\r\n return ret;\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","observerMap","Map","RootIds","WeakMap","rootId","observe","element","callback","options","fallbackInView","unsupportedValue","window","IntersectionObserver","undefined","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","observer","elements","keys","sort","filter","map","root","has","set","toString","get","optionsToId","instance","thresholds","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","splice","indexOf","delete","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","constructor","super","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","render","ref","_this$props","as","excluded","sourceKeys","_objectWithoutPropertiesLoose","TimeStamp","className","MessageText","emojify","message","user","label","highlightMenuProps","other","HighlightedText","text","highlights","menuProps","Author","dropdownContext","third_person","contextElement","triggerIcon","from","remoteMenuId","MenuConstants","entityId","hub_session_id","ChatMessage","shouldComponentUpdate","flags","join","propTypes","getSeverityIcon","severity","IconConstants","StatusMessage","Component","type","Icon","icon","MessageListItem","chat_message","boundary","log_message","getMessageDay","listItem","Date","getDate","isHistoryItem","MessageListDateDivider","t","reduceMessageListItem","onMessageVisibilityChanged","addDownload","highlightRemoteMenuId","reduced","index","messageList","currentMessage","showDateDivider","messageObj","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","reduce","bind","useMessagesNode","scrollableRef","DownloadDialog","Loader","nextProps"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[424],{1624:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(87537),i=r.n(n),o=r(23645),a=r.n(o)()(i());a.push([e.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,\r\n.public_fixedDataTableCell_main a {\r\n color: black;\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/* 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 > .filter > .count-info {\r\n margin-right: 0px;\r\n color: grey;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\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/* Table dropdowns */\r\n.table-container-wrapper .dropdown > .popup.trigger {\r\n max-width: 100%;\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.trigger .caption {\r\n max-width: calc(100% - 20px);\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.trigger .caption > * {\r\n overflow: hidden;\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.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 > .popup.trigger:hover,\r\n.public_fixedDataTableCell_main a:hover {\r\n cursor: pointer;\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.trigger:hover span,\r\n.public_fixedDataTableCell_main a:hover {\r\n text-decoration: underline;\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.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 dropdown popup content */\r\n.popup.dropdown-content {\r\n padding: 5px 15px;\r\n overflow: hidden;\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,eAAe;AACjB;;AAEA;EACE,0CAA0C;AAC5C;;AAEA;EACE,gBAAgB;AAClB;;AAEA;;EAEE,YAAY;AACd;;AAEA,+BAA+B;;AAE/B;EACE,kBAAkB;EAClB,QAAQ;EACR,2BAA2B;EAC3B,gBAAgB;EAChB,YAAY;AACd;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,WAAW;AACb;;AAEA,WAAW;;AAEX;EACE,WAAW;EACX,YAAY;EACZ,yBAAyB;EACzB,wDAAwD;EACxD,gDAAgD;EAChD,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,iBAAiB;EACjB,aAAa;AACf;;AAEA;EACE,iBAAiB;EACjB,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,4BAA4B;EAC5B,6BAA6B;AAC/B;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,UAAU;AACZ;;AAEA,oBAAoB;AACpB;EACE,eAAe;AACjB;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;EACjB,aAAa;EACb,uBAAuB;AACzB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;;EAEE,0BAA0B;AAC5B;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,cAAc;AAChB;;AAEA,iCAAiC;AACjC;EACE,iBAAiB;EACjB,gBAAgB;AAClB;;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,\r\n.public_fixedDataTableCell_main a {\r\n color: black;\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/* 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 > .filter > .count-info {\r\n margin-right: 0px;\r\n color: grey;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\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/* Table dropdowns */\r\n.table-container-wrapper .dropdown > .popup.trigger {\r\n max-width: 100%;\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.trigger .caption {\r\n max-width: calc(100% - 20px);\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.trigger .caption > * {\r\n overflow: hidden;\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.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 > .popup.trigger:hover,\r\n.public_fixedDataTableCell_main a:hover {\r\n cursor: pointer;\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.trigger:hover span,\r\n.public_fixedDataTableCell_main a:hover {\r\n text-decoration: underline;\r\n}\r\n\r\n.table-container-wrapper .dropdown > .popup.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 dropdown popup content */\r\n.popup.dropdown-content {\r\n padding: 5px 15px;\r\n overflow: hidden;\r\n}\r\n\r\n.popup.dropdown-content .ui.dropdown.item {\r\n margin: 0px 0px;\r\n}\r\n"],sourceRoot:""}]);const s=a},11508:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(10293),i=r.n(n),o=r(518),a=r(66883);const s=i().createActions([{setRange:{asyncResult:!0}},{setSort:{asyncResult:!0}},{close:{asyncResult:!0}},{pause:{asyncResult:!0}},{init:{asyncResult:!0}},"clear"]),l=(e,t,r)=>o.Z.post(t+"/settings",e).then((e=>r.completed(t,e))).catch((e=>r.failed(t,e)));s.close.listen((function(e,t){if(t&&a.Z.socketAuthenticated){const t=this;return o.Z.delete(e).then((r=>t.completed(e,r))).catch((t=>this.failed(e,t)))}return Promise.resolve()})),s.setSort.listen((function(e,t,r){l({sort_property:t,sort_ascending:r},e,this)})),s.setRange.listen((function(e,t,r){console.assert(r>0,"Invalid max rows"),l({range_start:t,max_count:r},e,this)})),s.pause.listen((function(e,t){l({paused:t},e,this)})),s.init.listen((function(e,t,r){r&&l({source_filter:r},e,this)}));const c=s},91780:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(85893),i=(r(67294),r(10696),r(94184)),o=r.n(i);const a=({item:e})=>(0,n.jsxs)("div",Object.assign({className:"ip flag"},{children:[(0,n.jsx)("i",{className:o()("ui flag",e.country.toLowerCase())}),e.str]}))},68126:(e,t,r)=>{r.d(t,{$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(84613)),o=r(2445),a=r(99015),s=r(91780),l=r(70516),c=r(89519),d=r(35108),p=r(28553),h=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};const u=e=>"object"==typeof e?Array.isArray(e)?e.length:e.str:0===e?null:e,A=({cellData:e})=>(0,n.jsx)("span",Object.assign({className:"plain text cell"},{children:u(e)})),g=e=>{var{onClick:t,label:r,columnKey:i}=e,o=h(e,["onClick","label","columnKey"]);return(0,n.jsx)(d.Cell,Object.assign({},o,{children:(0,n.jsx)("a",Object.assign({onClick:t},{children:r}))}))},w=e=>{var{cellData:t,rowDataGetter:r,children:o}=e,s=h(e,["cellData","rowDataGetter","children"]);return(0,n.jsx)(i.B2,Object.assign({caption:(0,n.jsx)(a.Z,{typeInfo:r().type,caption:t,className:"icon-caption"}),itemData:r},s))},m=e=>{var{cellData:t,rowDataGetter:r}=e,o=h(e,["cellData","rowDataGetter"]);return(0,n.jsx)(i.B2,Object.assign({caption:t,itemData:r},o))},b=e=>{var{cellData:t,rowDataGetter:r,actions:i,actionId:o}=e,a=h(e,["cellData","rowDataGetter","actions","actionId"]);const s=i.actions[o];return(0,c.OE)(s,r())?(0,n.jsx)(p.h,{children:({onClickAction:e})=>(0,n.jsx)("a",Object.assign({className:"plain link cell",onClick:()=>e({actionId:o,action:s,moduleId:i.moduleId,itemData:r()})},{children:u(t)}))}):(0,n.jsx)(A,Object.assign({cellData:t},a))},f=({cellData:e,t})=>(0,n.jsx)("span",Object.assign({className:"plain size cell"},{children:(0,o.BU)(e,t)})),v=({cellData:e,t})=>(0,n.jsx)("span",Object.assign({className:"plain speed cell"},{children:(0,o.CY)(e,t)})),C=({cellData:e})=>(0,n.jsx)("span",Object.assign({className:"plain duration cell"},{children:(0,o.SY)(e)})),x=({cellData:e})=>(0,n.jsx)("span",Object.assign({className:"plain abbr-duration cell"},{children:(0,o.LO)(e)})),E=({cellData:e})=>(0,n.jsx)(s.Z,{item:e}),y=({cellData:e,t})=>(0,n.jsx)("span",Object.assign({className:"plain connection cell"},{children:(0,o.Nh)(e,t)})),j=({cellData:e})=>(0,n.jsx)("span",Object.assign({className:"plain decimal cell"},{children:(0,o.VG)(e)})),D=e=>{var{cellData:t,rowDataGetter:r,clickHandlerGetter:o,userGetter:s,downloadHandler:l}=e,c=h(e,["cellData","rowDataGetter","clickHandlerGetter","userGetter","downloadHandler"]);return(0,n.jsx)(i.As,Object.assign({caption:(0,n.jsx)(a.Z,{typeInfo:r().type,onClick:o?o(t,r):null,caption:t,className:"icon-caption"}),user:s(r()),linkCaption:!o,itemInfoGetter:r,downloadHandler:l},c))},B=e=>{var{cellData:t,rowDataGetter:r,onChange:i}=e,o=h(e,["cellData","rowDataGetter","onChange"]);return(0,n.jsx)(l.Z,Object.assign({checked:t,onChange:e=>i(e,r())},o))}},78230:(e,t,r)=>{r.d(t,{Z:()=>J});var n=r(85893),i=r(45697),o=r.n(i),a=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(91072);const w=(e,t)=>{const r=(e=>{switch(e){case h.V3.REGEX:return"Regex";case h.V3.WILDCARD:return"Wildcard";case h.V3.EXACT:return"Exact";default:return"Partial"}})(e);return(0,A.Iu)(r,t,"table.filter")},m=(e,t)=>{let r=t("table.filter.filter","Filter");return e!==h.V3.PARTIAL&&(r+=` (${w(e,t).toLowerCase()})`),r+"..."};class b extends a.PureComponent{constructor(){super(...arguments),this.state={value:"",method:h.V3.PARTIAL},this.onFilterUpdated=()=>{const{value:e,method:t}=this.state;this.props.onFilterUpdated(e,t)},this.onTextChanged=e=>{this.setState({value:e.target.value}),clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.onFilterUpdated()}),200)},this.onMethodChanged=e=>{this.setState({method:e}),setTimeout((()=>this.onFilterUpdated())),this.input.focus()},this.getFilterMethod=(e,t)=>{const r=e===this.state.method;return(0,n.jsx)(d.Z,Object.assign({onClick:()=>this.onMethodChanged(e),active:r},{children:w(e,t)}),e)}}componentWillUnmount(){clearTimeout(this.timer)}render(){const{value:e,method:t}=this.state,{autoFocus:r}=this.props;return(0,n.jsx)(g.Wb,{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:e=>this.input=e,placeholder:m(t,i),onChange:this.onTextChanged,value:e,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((e=>isNaN(Number(e)))).map((e=>this.getFilterMethod(h.V3[e],i)))}))}))]}))}))})}}b.defaultProps={autoFocus:!0};const f=(0,p.Z)(b);var v=r(35936),C=r(48117);const x=({store:e})=>{if(e.totalCount<0)return null;let t=e.totalCount;return e.totalCount!==e.rowCount&&(t=e.rowCount+"/"+e.totalCount),(0,n.jsxs)("div",Object.assign({className:"count-info"},{children:[(0,n.jsx)(v.Z,{icon:C.Z.FILTER}),t]}))},E=({store:e,customFilter:t,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:[t?(0,n.jsx)(t,{store:e}):null,(0,n.jsx)(f,Object.assign({store:e},i)),(0,n.jsx)(x,{store:e})]}))]}));var y=r(35108),j=r(88699);class D extends a.Component{constructor(){super(...arguments),this.state={rowData:null},this.loadData=e=>this.props.dataLoader.updateRowData(e,this.onDataLoaded),this.rowDataGetter=()=>this.state.rowData,this.onDataLoaded=e=>{this.setState({rowData:e})}}componentDidMount(){this.loadData(this.props.rowIndex)}UNSAFE_componentWillReceiveProps(e){e.rowIndex!==this.props.rowIndex&&this.props.dataLoader.removePendingRequests(this.props.rowIndex,this.onDataLoaded),this.loadData(e.rowIndex)||this.setState({rowData:null})}componentWillUnmount(){this.props.dataLoader.removePendingRequests(this.props.rowIndex,this.onDataLoaded)}shouldComponentUpdate(e,t){return t.rowData!==this.state.rowData||e.width!==this.props.width}render(){const e=this.props,{columnKey:t,children:r,renderCondition:i,rowClassNameGetter:o}=e,s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["columnKey","children","renderCondition","rowClassNameGetter"]),{rowData:l}=this.state;if(!l)return null;if(i&&!i(l[t],l))return null;let c=t;return o&&(c+=" "+o(l)),(0,n.jsx)("div",Object.assign({className:"cell-wrapper "+c},{children:a.cloneElement(r,Object.assign({cellData:l[t],rowDataGetter:this.rowDataGetter},s))}))}}D.propTypes={rowIndex:o().number,dataLoader:o().object.isRequired,width:o().number};const B=D;var _=r(68126),R=r(32347);const O=(e,t,r,n)=>{const{name:i,columnKey:o}=e.props;let a=n((0,A.GF)(o,[...(0,A.qo)(r),R.W9.TABLE]),i);{const e=t.sortAscending?" ↑":" ↓";a+=t.sortProperty===o?e:""}return a};class I extends a.Component{constructor(){super(...arguments),this.state={width:0,height:0,columnWidths:{},isColumnResizing:void 0},this.getInitialProps=()=>({rowClassNameGetter:null,entityId:null}),this.scrollPosition=0,this.setInitialScrollRow=!0,this.updateRowRange=()=>{const{store:e}=this.props,{height:t}=this.state,r=(n=this.scrollPosition,Math.max(Math.floor(n/50),0));var n;const i=function(e){return Math.ceil(e/50)}(t);e.DEBUG&&console.log(`Settings changed, start: ${r}, end: ${i}, height: ${t}`,e.viewName),console.assert(e.active,"Posting data for an inactive view"),s.Z.setRange(e.viewUrl,r,i)},this.onScrollStart=(e,t)=>{const{store:r}=this.props;r.DEBUG&&console.log(`Scrolling started: ${t}`,r.viewUrl),console.assert(r.active,"Sending pause for an inactive view"),s.Z.pause(r.viewUrl,!0)},this.onScrollEnd=(e,t)=>{const{store:r,viewId:n}=this.props;this.scrollPosition=t,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(t,n),r.DEBUG&&console.log(`Scrolling ended: ${t}`,r.viewUrl)},this.onColumnClicked=e=>{const{store:t}=this.props;let r=!0;e===t.sortProperty&&t.sortAscending&&(r=!1),s.Z.setSort(this.props.store.viewUrl,e,r)},this.onColumnResizeEndCallback=(e,t)=>{this.setState((({columnWidths:r})=>({columnWidths:Object.assign(Object.assign({},r),{[t]:e}),isColumnResizing:!1})),(()=>{this.setState({isColumnResizing:void 0})}))},this.childToColumn=e=>{if(e.props.hideWidth&&e.props.hideWidth>this.state.width)return null;let{flexGrow:t,width:r}=e.props;const{cell:i,columnKey:o,renderCondition:s}=e.props,{store:l,rowClassNameGetter:c,moduleId:d,t:p}=this.props,h=(0,u.wd)();return h||o&&this.state.columnWidths[o]&&(r=this.state.columnWidths[o],t=void 0),a.cloneElement(e,{header:(0,n.jsx)(_.qN,{onClick:this.onColumnClicked.bind(null,o),label:O(e,l,d,p)}),flexGrow:t,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=e=>{if(!e.bounds)return;const{width:t,height:r}=e.entry?e.entry:e.bounds;this.setState({width:t,height:r})}}componentDidUpdate(e,t){t.height!==this.state.height?this.updateRowRange():e.entityId===this.props.entityId&&e.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 e=a.Children.map(this.props.children,this.childToColumn),{width:t,height:r,isColumnResizing:i}=this.state,{store:o,viewId:s}=this.props;return(0,n.jsx)(j.Z,Object.assign({bounds:!0,onResize:this.onResizeView},{children:({measureRef:a})=>(0,n.jsx)("div",Object.assign({ref:a,className:"table-container-wrapper"},{children:(0,n.jsx)(y.Table,Object.assign({width:t,height:r,rowHeight:50,rowsCount:o.rowCount,headerHeight:50,isColumnResizing:i,onColumnResizeEndCallback:this.onColumnResizeEndCallback,touchScrollEnabled:!0,onScrollStart:this.onScrollStart,onScrollEnd:this.onScrollEnd,scrollTop:this.setInitialScrollRow?o.getScrollData(s):void 0},{children:e}))}))}))}}I.propTypes={store:o().object.isRequired,rowClassNameGetter:o().func,entityId:o().any,dataLoader:o().any.isRequired};const S=I;var U=r(518),T=r(7145),k=r.n(T),N=r(18446),G=r.n(N);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($),z=r(19216),V=r.n(z),Y=r(44589),K=r.n(Y),H=r(1624),X={};X.styleTagTransform=K(),X.setAttributes=M(),X.insert=q().bind(null,"head"),X.domAPI=F(),X.insertStyleElement=V(),L()(H.Z,X),H.Z&&H.Z.locals&&H.Z.locals,r(60854);class Q extends a.PureComponent{constructor(){super(...arguments),this.dataLoader=new class{constructor(e,t){this._onDataLoad=t,this._store=e,this._data=[],this._pendingRequest={},this._initialDataReceived=!1}clear(){this._pendingRequest={},this._data=[]}updateItem(e,t,r){let n=this._data[r];return n===t||G()(this._data[r],t)?e:(this._data[r]=n?k()(n,{$merge:t}):k()(n,{$set:t}),e+1)}onItemsUpdated(e,t=0,r){let n=r<this._data.length;if(e&&0!==e.length){this._initialDataReceived=!0;for(let t=0;t<this._data.length;t++)e[t]||delete this._data[t];(e.reduce(this.updateItem.bind(this),0)>0||0!==t)&&(n=!0)}else this.clear(),n=!0,this._initialDataReceived=!1;n&&this._onDataLoad()}get rangeOffset(){const e=this._rangeOffset;return this._rangeOffset=0,e}getRowData(e){return this._data[e]}updateRowData(e,t){const r=this._data[e];return r?(t(r),!0):(this._initialDataReceived&&this._queueRequestFor(e,t),!1)}removePendingRequests(e){delete this._pendingRequest[e]}_queueRequestFor(e,t){const r=e-e%10,n=this._pendingRequest[e];if(n)return void n.push(t);if(this._pendingRequest[e]=[t],e!==r){if(this._pendingRequest[r])return;this._pendingRequest[r]=[]}const i=Math.min(r+10,this._store.rowCount);U.Z.get(this._store.viewUrl+"/items/"+r+"/"+i).then(this.onRowsReceived.bind(this,r)).catch((e=>{console.error("Failed to load data",e);for(let e=r;e<i;e++)this._pendingRequest[e]&&delete this._pendingRequest[e]}))}onRowsReceived(e,t){if(this._pendingRequest[e])for(let r=0;r<t.length;r++){const n=e+r;G()(this._data[n],t[r])||(this._data[n]=t[r],this._pendingRequest[n]&&this._pendingRequest[n].forEach((e=>e(t[r])))),delete this._pendingRequest[n]}}}(this.props.store,(()=>this.forceUpdate())),this.unsubscribe=this.props.store.listen(this.dataLoader.onItemsUpdated.bind(this.dataLoader)),this.moduleExists=e=>!e||!this.props.sessionStore||this.props.sessionStore.getSession(e),this.start=e=>{const{store:t,sourceFilter:r}=this.props;s.Z.init(t.viewUrl,e,r),s.Z.setSort(t.viewUrl,t.sortProperty,t.sortAscending)},this.close=e=>{s.Z.close(this.props.store.viewUrl,this.moduleExists(e))}}componentDidMount(){this.start(this.props.entityId)}componentWillUnmount(){this.close(this.props.entityId),this.unsubscribe()}componentDidUpdate(e){if(e.entityId!==this.props.entityId&&(this.close(e.entityId),this.start(this.props.entityId)),e.viewId!==this.props.viewId){const{store:e}=this.props;e.paused&&s.Z.pause(e.viewUrl,!1),s.Z.clear(e.viewUrl)}}render(){const e=this.props,{store:t,footerData:r,emptyRowsNodeGetter:i,customFilter:o,textFilterProps:a}=e,s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["store","footerData","emptyRowsNodeGetter","customFilter","textFilterProps"]);return i&&-1===t.totalCount?(0,n.jsx)("div",{className:"virtual-table"}):i&&0===t.totalCount?i():(0,n.jsx)("div",Object.assign({className:"virtual-table"},{children:(0,n.jsx)(g.Wb,{children:e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S,Object.assign({},s,{dataLoader:this.dataLoader,store:t,t:e})),(0,n.jsx)(E,{store:t,customFilter:o,footerData:r,textFilterProps:a})]})})}))}}Q.propTypes={footerData:o().node,emptyRowsNodeGetter:o().func,viewId:o().any,sessionStore:o().object,customFilter:o().elementType,sourceFilter:o().object};const J=Q},16630:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(85893),i=r(67294),o=r(42090),a=r(518),s=r(76249);function l(e,t="any"){return(0,o.Z)((r=>(i.useLayoutEffect((()=>()=>{const{store:e,filter:t}=r;e.active&&a.Z.delete(`${e.viewUrl}/filter/${t.id}`).catch((e=>console.error("Failed to delete table filter",e)))}),[]),(0,n.jsx)(e,Object.assign({},r,{onFilterUpdated:(e,n=s.V3.PARTIAL)=>{const i={pattern:e,method:n,property:t},{store:o,filter:l}=r;a.Z.put(`${o.viewUrl}/filter/${l.id}`,i).catch((e=>console.error("Failed to add table filter",e)))}})))),{urls:{filter:({store:e},t)=>t.post(`${e.viewUrl}/filter`)},loaderText:null})}},93836:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(518),i=r(11508),o=r(41143),a=r.n(o);const s=(e,t=!0)=>{let r=!1,o=-1,s=0,l=0,c=[],d=null,p=!1,h=0,u=e,A=t;const g=()=>{c=[],l=0,s=0,o=-1};return{listenables:i.Z,onClose(e){e===this.viewUrl&&(this.DEBUG&&console.log(`Closing view ${this.viewUrl}`),this._removeMessageListener(),g(),r=!1,this.trigger())},onClear(e){e===this.viewUrl&&(g(),this.trigger())},onPause(e,t){e===this.viewUrl&&(p=t)},onInit(e,t){e===this.viewUrl&&(a()(!r,"Trying start an active table view"),d=t,this.addMessageListener(),this.DEBUG&&console.log(`Starting view ${this.viewUrl}`),r=!0)},onSetSort(e,t,r){e===this.viewUrl&&(u=t,A=r)},addMessageListener(){this._removeMessageListener=n.Z.addViewUpdateListener(this._viewName,this._handleUpdate,d)},get items(){return c},get viewUrl(){let e=this._apiUrl+"/";return d&&(e+=d+"/"),e+=this._viewName,e},get viewName(){return this._viewName},get rowCount(){return s},get totalCount(){return o},get active(){return r},get sortProperty(){return u},get sortAscending(){return A},get paused(){return p},setScrollData(e,t){this._sessionStore?this._sessionStore.scroll.setScrollData(e,d,t):(this.DEBUG&&console.log(`Setting scroll position ${e} for view ${this.viewUrl} (view ID ${t})`),h=e)},getScrollData(e){return this._sessionStore?this._sessionStore.scroll.getScrollData(d,e):(this.DEBUG&&console.log(`Getting scroll position ${h} for view ${this.viewUrl} (view ID ${e})`),h)},_handleUpdate(e){(e=>{var t;null!=e.range_start&&(l=e.range_start),null!=e.total_items&&(o=e.total_items),null!=e.matching_items&&(s=e.matching_items),null!=e.items&&(t=e.items,c=t.reduce(((e,t,r)=>{let n=(i=t.id,c.find((e=>!!e&&e.id===i))||{id:t.id});var i;return t.properties?n=Object.assign({},n,t.properties):1===Object.keys(n).length&&console.error("No properties were sent for a new view item",n.id),e[l+r]=n,e}),[]))})(e),this.trigger(c,e.range_offset,s)}}}}}]);
|
|
2
|
+
//# sourceMappingURL=424.b9b775d50fbed2ec85ca.chunk.js.map
|
|
Binary file
|