From 83c87934c615cb5471607c0deed297e2813273b3 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 11 May 2023 13:53:40 +0300 Subject: [PATCH 01/22] [common] Updated packages Framework7 and Swiper --- build/package-lock.json | 1531 ++++++++++++++++++++++++-- vendor/framework7-react/package.json | 8 +- 2 files changed, 1438 insertions(+), 101 deletions(-) diff --git a/build/package-lock.json b/build/package-lock.json index 3cdbba4900..afd1e77b0b 100644 --- a/build/package-lock.json +++ b/build/package-lock.json @@ -36,7 +36,7 @@ "devDependencies": { "chai": "^4.3.6", "grunt-mocha": "^1.2.0", - "mocha": "^10.0.0" + "mocha": "^9.2.2" } }, "node_modules/@ampproject/remapping": { @@ -434,6 +434,24 @@ "node": ">=6.9.0" } }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -592,6 +610,208 @@ "node": ">= 6" } }, + "node_modules/@resvg/resvg-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js/-/resvg-js-2.4.1.tgz", + "integrity": "sha512-wTOf1zerZX8qYcMmLZw3czR4paI4hXqPjShNwJRh5DeHxvgffUS5KM7XwxtbIheUW6LVYT5fhT2AJiP6mU7U4A==", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@resvg/resvg-js-android-arm-eabi": "2.4.1", + "@resvg/resvg-js-android-arm64": "2.4.1", + "@resvg/resvg-js-darwin-arm64": "2.4.1", + "@resvg/resvg-js-darwin-x64": "2.4.1", + "@resvg/resvg-js-linux-arm-gnueabihf": "2.4.1", + "@resvg/resvg-js-linux-arm64-gnu": "2.4.1", + "@resvg/resvg-js-linux-arm64-musl": "2.4.1", + "@resvg/resvg-js-linux-x64-gnu": "2.4.1", + "@resvg/resvg-js-linux-x64-musl": "2.4.1", + "@resvg/resvg-js-win32-arm64-msvc": "2.4.1", + "@resvg/resvg-js-win32-ia32-msvc": "2.4.1", + "@resvg/resvg-js-win32-x64-msvc": "2.4.1" + } + }, + "node_modules/@resvg/resvg-js-android-arm-eabi": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-android-arm-eabi/-/resvg-js-android-arm-eabi-2.4.1.tgz", + "integrity": "sha512-AA6f7hS0FAPpvQMhBCf6f1oD1LdlqNXKCxAAPpKh6tR11kqV0YIB9zOlIYgITM14mq2YooLFl6XIbbvmY+jwUw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-android-arm64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-android-arm64/-/resvg-js-android-arm64-2.4.1.tgz", + "integrity": "sha512-/QleoRdPfsEuH9jUjilYcDtKK/BkmWcK+1LXM8L2nsnf/CI8EnFyv7ZzCj4xAIvZGAy9dTYr/5NZBcTwxG2HQg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-darwin-arm64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-darwin-arm64/-/resvg-js-darwin-arm64-2.4.1.tgz", + "integrity": "sha512-U1oMNhea+kAXgiEXgzo7EbFGCD1Edq5aSlQoe6LMly6UjHzgx2W3N5kEXCwU/CgN5FiQhZr7PlSJSlcr7mdhfg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-darwin-x64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-darwin-x64/-/resvg-js-darwin-x64-2.4.1.tgz", + "integrity": "sha512-avyVh6DpebBfHHtTQTZYSr6NG1Ur6TEilk1+H0n7V+g4F7x7WPOo8zL00ZhQCeRQ5H4f8WXNWIEKL8fwqcOkYw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-linux-arm-gnueabihf": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-arm-gnueabihf/-/resvg-js-linux-arm-gnueabihf-2.4.1.tgz", + "integrity": "sha512-isY/mdKoBWH4VB5v621co+8l101jxxYjuTkwOLsbW+5RK9EbLciPlCB02M99ThAHzI2MYxIUjXNmNgOW8btXvw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-linux-arm64-gnu": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-arm64-gnu/-/resvg-js-linux-arm64-gnu-2.4.1.tgz", + "integrity": "sha512-uY5voSCrFI8TH95vIYBm5blpkOtltLxLRODyhKJhGfskOI7XkRw5/t1u0sWAGYD8rRSNX+CA+np86otKjubrNg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-linux-arm64-musl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-arm64-musl/-/resvg-js-linux-arm64-musl-2.4.1.tgz", + "integrity": "sha512-6mT0+JBCsermKMdi/O2mMk3m7SqOjwi9TKAwSngRZ/nQoL3Z0Z5zV+572ztgbWr0GODB422uD8e9R9zzz38dRQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-linux-x64-gnu": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-x64-gnu/-/resvg-js-linux-x64-gnu-2.4.1.tgz", + "integrity": "sha512-60KnrscLj6VGhkYOJEmmzPlqqfcw1keDh6U+vMcNDjPhV3B5vRSkpP/D/a8sfokyeh4VEacPSYkWGezvzS2/mg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-linux-x64-musl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-x64-musl/-/resvg-js-linux-x64-musl-2.4.1.tgz", + "integrity": "sha512-0AMyZSICC1D7ge115cOZQW8Pcad6PjWuZkBFF3FJuSxC6Dgok0MQnLTs2MfMdKBlAcwO9dXsf3bv9tJZj8pATA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-win32-arm64-msvc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-win32-arm64-msvc/-/resvg-js-win32-arm64-msvc-2.4.1.tgz", + "integrity": "sha512-76XDFOFSa3d0QotmcNyChh2xHwk+JTFiEQBVxMlHpHMeq7hNrQJ1IpE1zcHSQvrckvkdfLboKRrlGB86B10Qjw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-win32-ia32-msvc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-win32-ia32-msvc/-/resvg-js-win32-ia32-msvc-2.4.1.tgz", + "integrity": "sha512-odyVFGrEWZIzzJ89KdaFtiYWaIJh9hJRW/frcEcG3agJ464VXkN/2oEVF5ulD+5mpGlug9qJg7htzHcKxDN8sg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@resvg/resvg-js-win32-x64-msvc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-win32-x64-msvc/-/resvg-js-win32-x64-msvc-2.4.1.tgz", + "integrity": "sha512-vY4kTLH2S3bP+puU5x7hlAxHv+ulFgcK6Zn3efKSr0M0KnZ9A3qeAjZteIpkowEFfUeMPNg2dvvoFRJA9zqxSw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@sindresorhus/is": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", @@ -601,17 +821,38 @@ "node": ">=4" } }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/@types/q": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==" }, + "node_modules/@types/triple-beam": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.2.tgz", + "integrity": "sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g==" + }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.7.tgz", + "integrity": "sha512-sI1Ly2cODlWStkINzqGrZ8K6n+MTSbAeQnAipGyL+KZCXuHaRlj2gyyy8B/9MvsFFqN7XHryQnB2QwhzvJXovg==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -675,7 +916,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2054,6 +2294,15 @@ "node": ">=0.10.0" } }, + "node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2067,6 +2316,15 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "node_modules/color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -2084,6 +2342,15 @@ "node": ">=0.1.90" } }, + "node_modules/colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "dependencies": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2286,6 +2553,11 @@ "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==" }, + "node_modules/css-selector-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz", + "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==" + }, "node_modules/css-tree": { "version": "1.0.0-alpha.37", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", @@ -2353,6 +2625,11 @@ "node": ">=0.10.0" } }, + "node_modules/cssom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==" + }, "node_modules/currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -2723,6 +3000,31 @@ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" }, + "node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domhandler/node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, "node_modules/domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", @@ -2827,8 +3129,12 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" }, "node_modules/end-of-stream": { "version": "1.4.4", @@ -2949,7 +3255,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -3368,6 +3673,11 @@ "pend": "~1.2.0" } }, + "node_modules/fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" + }, "node_modules/figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", @@ -3630,6 +3940,11 @@ "readable-stream": "^2.3.6" } }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -3846,7 +4161,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -4865,6 +5179,37 @@ "node": ">= 6.0.0" } }, + "node_modules/grunt-svg-sprite": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/grunt-svg-sprite/-/grunt-svg-sprite-2.0.2.tgz", + "integrity": "sha512-BByPBYNPzDASSO5mAD8aHnVXabyalC2lpxB9KKgkbWaTMoJ2nhjcCHJ8NSP9rGHoZhENvqazmu6Wxq3b8/9nZQ==", + "dependencies": { + "figures": "^3.2.0", + "picocolors": "^1.0.0", + "prettysize": "^2.0.0", + "svg-sprite": "^2.0.2" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "grunt": ">=1.0.1" + } + }, + "node_modules/grunt-svg-sprite/node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/grunt-svgmin": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/grunt-svgmin/-/grunt-svgmin-6.0.1.tgz", @@ -5626,7 +5971,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -6393,6 +6737,11 @@ "graceful-fs": "^4.1.9" } }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" + }, "node_modules/layout": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/layout/-/layout-2.2.0.tgz", @@ -6696,12 +7045,32 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash.escape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", + "integrity": "sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw==" + }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/lodash.trim": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trim/-/lodash.trim-4.5.1.tgz", + "integrity": "sha512-nJAlRl/K+eiOehWKDzoBVrSMhK0K3A3YQsUNXHQa5yIrKBAhsZgSu3KoAFoFT+mEgiyBHddZ0pRk1ITpIp90Wg==" + }, + "node_modules/lodash.trimstart": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trimstart/-/lodash.trimstart-4.5.1.tgz", + "integrity": "sha512-b/+D6La8tU76L/61/aN0jULWHkT0EeJCmVstPBn/K9MtD2qBW83AsBNrr63dKuWYwVMO7ucv13QNO/Ek/2RKaQ==" + }, "node_modules/log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", @@ -6770,6 +7139,24 @@ "node": ">=0.10.0" } }, + "node_modules/logform": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.5.1.tgz", + "integrity": "sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==", + "dependencies": { + "@colors/colors": "1.5.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + } + }, + "node_modules/logform/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -7098,40 +7485,42 @@ } }, "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", "dev": true, "dependencies": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", - "debug": "4.3.4", + "debug": "4.3.3", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", "glob": "7.2.0", + "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "5.0.1", + "minimatch": "4.2.1", "ms": "2.1.3", - "nanoid": "3.3.3", + "nanoid": "3.3.1", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "workerpool": "6.2.1", + "which": "2.0.2", + "workerpool": "6.2.0", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" + "mocha": "bin/mocha" }, "engines": { - "node": ">= 14.0.0" + "node": ">= 12.0.0" }, "funding": { "type": "opencollective", @@ -7145,9 +7534,9 @@ "dev": true }, "node_modules/mocha/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -7258,26 +7647,17 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^1.1.7" }, "engines": { "node": ">=10" } }, - "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -7304,10 +7684,18 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "bin": { + "mustache": "bin/mustache" + } + }, "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true, "bin": { "nanoid": "bin/nanoid.cjs" @@ -8017,6 +8405,14 @@ "wrappy": "1" } }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "dependencies": { + "fn.name": "1.x.x" + } + }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", @@ -8479,8 +8875,7 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -8701,6 +9096,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/prettysize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prettysize/-/prettysize-2.0.0.tgz", + "integrity": "sha512-VVtxR7sOh0VsG8o06Ttq5TrI1aiZKmC+ClSn4eBPaNf4SHr5lzbYW+kYGX3HocBL/MfpVrRfFZ9V3vCbLaiplg==" + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -9097,7 +9497,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -9232,6 +9631,14 @@ "ret": "~0.1.10" } }, + "node_modules/safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "engines": { + "node": ">=10" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -9387,6 +9794,19 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "devOptional": true }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, "node_modules/slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -9895,6 +10315,14 @@ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "engines": { + "node": "*" + } + }, "node_modules/stack-utils": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", @@ -10035,7 +10463,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -10073,7 +10500,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -10197,6 +10623,283 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/svg-sprite": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/svg-sprite/-/svg-sprite-2.0.2.tgz", + "integrity": "sha512-vLFP/t4YCu62mvOzUt6g9bqpKrPjYsLuzegw5WsIsv3DkulAI/fRC+k7Atk//rIkUDbvKo572nJ6o4YT+FbKig==", + "dependencies": { + "@resvg/resvg-js": "^2.1.0", + "@xmldom/xmldom": "^0.8.3", + "async": "^3.2.4", + "css-selector-parser": "^1.4.1", + "csso": "^4.2.0", + "cssom": "^0.5.0", + "glob": "^7.2.3", + "js-yaml": "^4.1.0", + "lodash.escape": "^4.0.1", + "lodash.merge": "^4.6.2", + "lodash.trim": "^4.5.1", + "lodash.trimstart": "^4.5.1", + "mustache": "^4.2.0", + "prettysize": "^2.0.0", + "svgo": "^2.8.0", + "vinyl": "^2.2.1", + "winston": "^3.8.2", + "xpath": "^0.0.32", + "yargs": "^17.5.1" + }, + "bin": { + "svg-sprite": "bin/svg-sprite.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/svg-sprite/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/svg-sprite/node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, + "node_modules/svg-sprite/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/svg-sprite/node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/svg-sprite/node_modules/clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==" + }, + "node_modules/svg-sprite/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/svg-sprite/node_modules/css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/svg-sprite/node_modules/css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/svg-sprite/node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/svg-sprite/node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/svg-sprite/node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/svg-sprite/node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/svg-sprite/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/svg-sprite/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/svg-sprite/node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + }, + "node_modules/svg-sprite/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/svg-sprite/node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/svg-sprite/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/svg-sprite/node_modules/svgo": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "dependencies": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/svg-sprite/node_modules/vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "dependencies": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/svg-sprite/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/svg-sprite/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, "node_modules/svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", @@ -12393,6 +13096,11 @@ "node": ">=8" } }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" + }, "node_modules/throttleit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", @@ -12550,6 +13258,11 @@ "node": ">=0.10.0" } }, + "node_modules/triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" + }, "node_modules/trivial-deferred": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", @@ -13098,22 +13811,97 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "node_modules/winston": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.8.2.tgz", + "integrity": "sha512-MsE1gRx1m5jdTTO9Ld/vND4krP2To+lgDoMEHGGa4HIlAUyXJtfc7CxQcGXVyz2IBpw5hbFkj2b/AtUdQwyRew==", + "dependencies": { + "@colors/colors": "1.5.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.4.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.5.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz", + "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==", + "dependencies": { + "logform": "^2.3.2", + "readable-stream": "^3.6.0", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 6.4.0" + } + }, + "node_modules/winston-transport/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/winston/node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, + "node_modules/winston/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/winston/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -13143,6 +13931,14 @@ "typedarray-to-buffer": "^3.1.5" } }, + "node_modules/xpath": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", + "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==", + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -13155,7 +13951,6 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, "engines": { "node": ">=10" } @@ -13293,7 +14088,8 @@ "version": "0.0.1", "integrity": "sha1-JN2XDWx749RJy7SeBD2tLML6nOc=", "dependencies": { - "grunt-spritesmith": "^6.10.0" + "grunt-spritesmith": "^6.10.0", + "grunt-svg-sprite": "^2.0.0" } } }, @@ -13597,6 +14393,21 @@ "to-fast-properties": "^2.0.0" } }, + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==" + }, + "@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "requires": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -13718,23 +14529,129 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" }, + "@resvg/resvg-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js/-/resvg-js-2.4.1.tgz", + "integrity": "sha512-wTOf1zerZX8qYcMmLZw3czR4paI4hXqPjShNwJRh5DeHxvgffUS5KM7XwxtbIheUW6LVYT5fhT2AJiP6mU7U4A==", + "requires": { + "@resvg/resvg-js-android-arm-eabi": "2.4.1", + "@resvg/resvg-js-android-arm64": "2.4.1", + "@resvg/resvg-js-darwin-arm64": "2.4.1", + "@resvg/resvg-js-darwin-x64": "2.4.1", + "@resvg/resvg-js-linux-arm-gnueabihf": "2.4.1", + "@resvg/resvg-js-linux-arm64-gnu": "2.4.1", + "@resvg/resvg-js-linux-arm64-musl": "2.4.1", + "@resvg/resvg-js-linux-x64-gnu": "2.4.1", + "@resvg/resvg-js-linux-x64-musl": "2.4.1", + "@resvg/resvg-js-win32-arm64-msvc": "2.4.1", + "@resvg/resvg-js-win32-ia32-msvc": "2.4.1", + "@resvg/resvg-js-win32-x64-msvc": "2.4.1" + } + }, + "@resvg/resvg-js-android-arm-eabi": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-android-arm-eabi/-/resvg-js-android-arm-eabi-2.4.1.tgz", + "integrity": "sha512-AA6f7hS0FAPpvQMhBCf6f1oD1LdlqNXKCxAAPpKh6tR11kqV0YIB9zOlIYgITM14mq2YooLFl6XIbbvmY+jwUw==", + "optional": true + }, + "@resvg/resvg-js-android-arm64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-android-arm64/-/resvg-js-android-arm64-2.4.1.tgz", + "integrity": "sha512-/QleoRdPfsEuH9jUjilYcDtKK/BkmWcK+1LXM8L2nsnf/CI8EnFyv7ZzCj4xAIvZGAy9dTYr/5NZBcTwxG2HQg==", + "optional": true + }, + "@resvg/resvg-js-darwin-arm64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-darwin-arm64/-/resvg-js-darwin-arm64-2.4.1.tgz", + "integrity": "sha512-U1oMNhea+kAXgiEXgzo7EbFGCD1Edq5aSlQoe6LMly6UjHzgx2W3N5kEXCwU/CgN5FiQhZr7PlSJSlcr7mdhfg==", + "optional": true + }, + "@resvg/resvg-js-darwin-x64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-darwin-x64/-/resvg-js-darwin-x64-2.4.1.tgz", + "integrity": "sha512-avyVh6DpebBfHHtTQTZYSr6NG1Ur6TEilk1+H0n7V+g4F7x7WPOo8zL00ZhQCeRQ5H4f8WXNWIEKL8fwqcOkYw==", + "optional": true + }, + "@resvg/resvg-js-linux-arm-gnueabihf": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-arm-gnueabihf/-/resvg-js-linux-arm-gnueabihf-2.4.1.tgz", + "integrity": "sha512-isY/mdKoBWH4VB5v621co+8l101jxxYjuTkwOLsbW+5RK9EbLciPlCB02M99ThAHzI2MYxIUjXNmNgOW8btXvw==", + "optional": true + }, + "@resvg/resvg-js-linux-arm64-gnu": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-arm64-gnu/-/resvg-js-linux-arm64-gnu-2.4.1.tgz", + "integrity": "sha512-uY5voSCrFI8TH95vIYBm5blpkOtltLxLRODyhKJhGfskOI7XkRw5/t1u0sWAGYD8rRSNX+CA+np86otKjubrNg==", + "optional": true + }, + "@resvg/resvg-js-linux-arm64-musl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-arm64-musl/-/resvg-js-linux-arm64-musl-2.4.1.tgz", + "integrity": "sha512-6mT0+JBCsermKMdi/O2mMk3m7SqOjwi9TKAwSngRZ/nQoL3Z0Z5zV+572ztgbWr0GODB422uD8e9R9zzz38dRQ==", + "optional": true + }, + "@resvg/resvg-js-linux-x64-gnu": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-x64-gnu/-/resvg-js-linux-x64-gnu-2.4.1.tgz", + "integrity": "sha512-60KnrscLj6VGhkYOJEmmzPlqqfcw1keDh6U+vMcNDjPhV3B5vRSkpP/D/a8sfokyeh4VEacPSYkWGezvzS2/mg==", + "optional": true + }, + "@resvg/resvg-js-linux-x64-musl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-linux-x64-musl/-/resvg-js-linux-x64-musl-2.4.1.tgz", + "integrity": "sha512-0AMyZSICC1D7ge115cOZQW8Pcad6PjWuZkBFF3FJuSxC6Dgok0MQnLTs2MfMdKBlAcwO9dXsf3bv9tJZj8pATA==", + "optional": true + }, + "@resvg/resvg-js-win32-arm64-msvc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-win32-arm64-msvc/-/resvg-js-win32-arm64-msvc-2.4.1.tgz", + "integrity": "sha512-76XDFOFSa3d0QotmcNyChh2xHwk+JTFiEQBVxMlHpHMeq7hNrQJ1IpE1zcHSQvrckvkdfLboKRrlGB86B10Qjw==", + "optional": true + }, + "@resvg/resvg-js-win32-ia32-msvc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-win32-ia32-msvc/-/resvg-js-win32-ia32-msvc-2.4.1.tgz", + "integrity": "sha512-odyVFGrEWZIzzJ89KdaFtiYWaIJh9hJRW/frcEcG3agJ464VXkN/2oEVF5ulD+5mpGlug9qJg7htzHcKxDN8sg==", + "optional": true + }, + "@resvg/resvg-js-win32-x64-msvc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@resvg/resvg-js-win32-x64-msvc/-/resvg-js-win32-x64-msvc-2.4.1.tgz", + "integrity": "sha512-vY4kTLH2S3bP+puU5x7hlAxHv+ulFgcK6Zn3efKSr0M0KnZ9A3qeAjZteIpkowEFfUeMPNg2dvvoFRJA9zqxSw==", + "optional": true + }, "@sindresorhus/is": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "optional": true }, + "@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==" + }, "@types/q": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==" }, + "@types/triple-beam": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.2.tgz", + "integrity": "sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g==" + }, "@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "@xmldom/xmldom": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.7.tgz", + "integrity": "sha512-sI1Ly2cODlWStkINzqGrZ8K6n+MTSbAeQnAipGyL+KZCXuHaRlj2gyyy8B/9MvsFFqN7XHryQnB2QwhzvJXovg==" + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -13783,8 +14700,7 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "4.3.0", @@ -14827,6 +15743,15 @@ "object-visit": "^1.0.0" } }, + "color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "requires": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -14840,6 +15765,15 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -14851,6 +15785,15 @@ "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" }, + "colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "requires": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -15032,6 +15975,11 @@ "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==" }, + "css-selector-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz", + "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==" + }, "css-tree": { "version": "1.0.0-alpha.37", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", @@ -15082,6 +16030,11 @@ } } }, + "cssom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==" + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -15372,6 +16325,21 @@ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" }, + "domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "requires": { + "domelementtype": "^2.2.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + } + } + }, "domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", @@ -15463,8 +16431,12 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" }, "end-of-stream": { "version": "1.4.4", @@ -15562,8 +16534,7 @@ "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-string-regexp": { "version": "1.0.5", @@ -15889,6 +16860,11 @@ "pend": "~1.2.0" } }, + "fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" + }, "figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", @@ -16093,6 +17069,11 @@ "readable-stream": "^2.3.6" } }, + "fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -16253,8 +17234,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-func-name": { "version": "2.0.0", @@ -17364,7 +18344,8 @@ "iconsprite": { "version": "file:sprites", "requires": { - "grunt-spritesmith": "^6.10.0" + "grunt-spritesmith": "^6.10.0", + "grunt-svg-sprite": "^2.0.0" } }, "iconv-lite": { @@ -17638,8 +18619,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-gif": { "version": "3.0.0", @@ -18205,6 +19185,11 @@ "graceful-fs": "^4.1.9" } }, + "kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" + }, "layout": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/layout/-/layout-2.2.0.tgz", @@ -18435,12 +19420,32 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "lodash.escape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", + "integrity": "sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw==" + }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "lodash.trim": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trim/-/lodash.trim-4.5.1.tgz", + "integrity": "sha512-nJAlRl/K+eiOehWKDzoBVrSMhK0K3A3YQsUNXHQa5yIrKBAhsZgSu3KoAFoFT+mEgiyBHddZ0pRk1ITpIp90Wg==" + }, + "lodash.trimstart": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trimstart/-/lodash.trimstart-4.5.1.tgz", + "integrity": "sha512-b/+D6La8tU76L/61/aN0jULWHkT0EeJCmVstPBn/K9MtD2qBW83AsBNrr63dKuWYwVMO7ucv13QNO/Ek/2RKaQ==" + }, "log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", @@ -18493,6 +19498,26 @@ "squeak": "^1.0.0" } }, + "logform": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.5.1.tgz", + "integrity": "sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==", + "requires": { + "@colors/colors": "1.5.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -18737,30 +19762,32 @@ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, "mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", - "debug": "4.3.4", + "debug": "4.3.3", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", "glob": "7.2.0", + "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "5.0.1", + "minimatch": "4.2.1", "ms": "2.1.3", - "nanoid": "3.3.3", + "nanoid": "3.3.1", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "workerpool": "6.2.1", + "which": "2.0.2", + "workerpool": "6.2.0", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" @@ -18773,9 +19800,9 @@ "dev": true }, "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -18852,23 +19879,12 @@ } }, "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", "dev": true, "requires": { - "brace-expansion": "^2.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - } + "brace-expansion": "^1.1.7" } }, "ms": { @@ -18893,10 +19909,15 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==" + }, "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true }, "nanomatch": { @@ -19456,6 +20477,14 @@ "wrappy": "1" } }, + "one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "requires": { + "fn.name": "1.x.x" + } + }, "opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", @@ -19798,8 +20827,7 @@ "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "picomatch": { "version": "2.3.1", @@ -19963,6 +20991,11 @@ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==" }, + "prettysize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prettysize/-/prettysize-2.0.0.tgz", + "integrity": "sha512-VVtxR7sOh0VsG8o06Ttq5TrI1aiZKmC+ClSn4eBPaNf4SHr5lzbYW+kYGX3HocBL/MfpVrRfFZ9V3vCbLaiplg==" + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -20287,8 +21320,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", @@ -20374,6 +21406,11 @@ "ret": "~0.1.10" } }, + "safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==" + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -20500,6 +21537,21 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "devOptional": true }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + } + } + }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -20911,6 +21963,11 @@ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==" + }, "stack-utils": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", @@ -21028,7 +22085,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -21057,7 +22113,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -21144,6 +22199,213 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, + "svg-sprite": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/svg-sprite/-/svg-sprite-2.0.2.tgz", + "integrity": "sha512-vLFP/t4YCu62mvOzUt6g9bqpKrPjYsLuzegw5WsIsv3DkulAI/fRC+k7Atk//rIkUDbvKo572nJ6o4YT+FbKig==", + "requires": { + "@resvg/resvg-js": "^2.1.0", + "@xmldom/xmldom": "^0.8.3", + "async": "^3.2.4", + "css-selector-parser": "^1.4.1", + "csso": "^4.2.0", + "cssom": "^0.5.0", + "glob": "^7.2.3", + "js-yaml": "^4.1.0", + "lodash.escape": "^4.0.1", + "lodash.merge": "^4.6.2", + "lodash.trim": "^4.5.1", + "lodash.trimstart": "^4.5.1", + "mustache": "^4.2.0", + "prettysize": "^2.0.0", + "svgo": "^2.8.0", + "vinyl": "^2.2.1", + "winston": "^3.8.2", + "xpath": "^0.0.32", + "yargs": "^17.5.1" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==" + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==" + }, + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" + }, + "css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + } + }, + "css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" + }, + "dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "requires": { + "boolbase": "^1.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "svgo": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "requires": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + } + }, + "vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + } + } + }, "svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", @@ -22610,6 +23872,11 @@ "minimatch": "^3.0.4" } }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" + }, "throttleit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", @@ -22736,6 +24003,11 @@ "escape-string-regexp": "^1.0.2" } }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" + }, "trivial-deferred": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", @@ -23189,22 +24461,83 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "winston": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.8.2.tgz", + "integrity": "sha512-MsE1gRx1m5jdTTO9Ld/vND4krP2To+lgDoMEHGGa4HIlAUyXJtfc7CxQcGXVyz2IBpw5hbFkj2b/AtUdQwyRew==", + "requires": { + "@colors/colors": "1.5.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.4.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.5.0" + }, + "dependencies": { + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "winston-transport": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz", + "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==", + "requires": { + "logform": "^2.3.2", + "readable-stream": "^3.6.0", + "triple-beam": "^1.3.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" }, "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", "dev": true }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -23228,6 +24561,11 @@ "typedarray-to-buffer": "^3.1.5" } }, + "xpath": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", + "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -23236,8 +24574,7 @@ "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, "yallist": { "version": "2.1.2", diff --git a/vendor/framework7-react/package.json b/vendor/framework7-react/package.json index b733ca9276..45481370ce 100644 --- a/vendor/framework7-react/package.json +++ b/vendor/framework7-react/package.json @@ -29,9 +29,9 @@ ], "dependencies": { "dom7": "^3.0.0", - "framework7": "^7.0.8", - "framework7-icons": "^3.0.1", - "framework7-react": "^7.0.8", + "framework7": "^8.0.5", + "framework7-icons": "^5.0.5", + "framework7-react": "^8.0.5", "i18next": "^21.8.9", "i18next-fetch-backend": "^4.1.3", "mobx": "^6.7.0", @@ -42,7 +42,7 @@ "react-dom": "^18.1.0", "react-i18next": "^11.8.5", "react-transition-group": "^4.4.5", - "swiper": "^8.2.4", + "swiper": "^9.3.1", "template7": "^1.4.2", "url": "^0.11.0" }, From 4bb3de42a42c2a348cafb29dca9dd63974c8a779 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Sat, 13 May 2023 17:10:07 +0300 Subject: [PATCH 02/22] [DE PE SSE mobile] Correct imports components --- .../resources/less/common-material.less | 5 ++ apps/common/mobile/resources/less/common.less | 19 ++++--- .../mobile/src/view/edit/EditChart.jsx | 9 ++-- .../mobile/src/view/edit/EditImage.jsx | 6 +-- .../mobile/src/view/edit/EditShape.jsx | 6 +-- .../mobile/src/view/edit/EditTable.jsx | 22 ++++---- .../mobile/src/view/edit/EditText.jsx | 54 +++++++++---------- .../mobile/src/view/edit/EditChart.jsx | 3 +- .../mobile/src/view/edit/EditTable.jsx | 21 ++++---- .../mobile/src/view/edit/EditText.jsx | 19 +++---- .../mobile/src/view/FilterOptions.jsx | 8 +-- .../mobile/src/view/add/AddChart.jsx | 4 +- .../mobile/src/view/add/AddFilter.jsx | 6 +-- .../mobile/src/view/edit/EditCell.jsx | 6 +-- .../mobile/src/view/edit/EditChart.jsx | 3 +- .../mobile/src/view/edit/EditText.jsx | 18 +++---- 16 files changed, 112 insertions(+), 97 deletions(-) diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 61fd561d7b..6e57dc5431 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -293,6 +293,11 @@ padding-top: 0; .row { width: 100%; + --f7-cols-per-row: 1; + align-items: flex-start; + display: flex; + flex-wrap: wrap; + justify-content: space-between; .button { flex: 1; font-size: 17px; diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 7ccb390a19..9c23258a89 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -8,6 +8,18 @@ @red: #f00; @autoColor: @black; +.row { + --f7-cols-per-row: 1; + align-items: flex-start; + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.row + .row { + margin-top: var(--f7-grid-row-gap); +} + .navbar.main-navbar { height: 0; &.navbar-with-logo { @@ -25,13 +37,6 @@ } } -//.navbar { -// .title { -// text-overflow: initial; -// white-space: normal; -// } -//} - .navbar-hidden { transform: translate3d(0, calc(-1 * (var(--f7-navbar-height) + var(--f7-subnavbar-height))), 0); } diff --git a/apps/documenteditor/mobile/src/view/edit/EditChart.jsx b/apps/documenteditor/mobile/src/view/edit/EditChart.jsx index 67f0b73509..20c31d37b6 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditChart.jsx @@ -1,6 +1,7 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {List, ListItem, ListButton, Icon, Row, Page, Navbar, NavRight, BlockTitle, Toggle, Range, Link, Tabs, Tab, Swiper, SwiperSlide} from 'framework7-react'; +import { List, ListItem, ListButton, Icon, Page, Navbar, NavRight, BlockTitle, Toggle, Range, Link } from 'framework7-react'; +import { Swiper, SwiperSlide } from 'swiper/react'; import {f7} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -390,8 +391,8 @@ const PageWrap = props => { {_t.textAlign} - - + + diff --git a/apps/documenteditor/mobile/src/view/edit/EditImage.jsx b/apps/documenteditor/mobile/src/view/edit/EditImage.jsx index 019156676b..189baea818 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditImage.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {List, ListItem, ListInput, ListButton, Icon, Row, Page, Navbar, NavRight, BlockTitle, Toggle, Range, Link} from 'framework7-react'; +import {List, ListItem, ListInput, ListButton, Icon, Page, Navbar, NavRight, BlockTitle, Toggle, Range, Link} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {f7} from 'framework7-react'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -81,7 +81,7 @@ const PageWrap = props => { {_t.textAlign} - + diff --git a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx index 077dd71437..896262720c 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {List, ListItem, Icon, Row, Page, Navbar, NavRight, BlockTitle, Toggle, Range, ListButton, Link, Tabs, Tab} from 'framework7-react'; +import {List, ListItem, Icon, Page, Navbar, NavRight, BlockTitle, Toggle, Range, ListButton, Link, Tabs, Tab} from 'framework7-react'; import { f7 } from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -386,7 +386,7 @@ const PageWrap = props => { {_t.textAlign} - + diff --git a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx index 56b058e627..0436b7f072 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState, useEffect} from 'react'; import {observer, inject} from "mobx-react"; -import {Page, Navbar, NavRight, List, ListItem, ListButton, Row, BlockTitle, SkeletonBlock, Range, Toggle, Icon, Link, Tabs, Tab} from 'framework7-react'; +import {Page, Navbar, NavRight, List, ListItem, ListButton, BlockTitle, SkeletonBlock, Range, Toggle, Icon, Link, Tabs, Tab} from 'framework7-react'; import { f7 } from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -124,7 +124,7 @@ const PageWrap = props => { {_t.textAlign} - + @@ -445,7 +445,7 @@ const TabBorder = inject("storeFocusObjects", "storeTableSettings")(observer(pro > - +
{onBorderType("lrtbcm")}}> @@ -461,10 +461,10 @@ const TabBorder = inject("storeFocusObjects", "storeTableSettings")(observer(pro {onBorderType("l")}}> - +
- +
{onBorderType("c")}}> @@ -480,7 +480,7 @@ const TabBorder = inject("storeFocusObjects", "storeTableSettings")(observer(pro {onBorderType("b")}}> - +
) @@ -548,7 +548,7 @@ const EditTable = props => { - +
{props.onAddColumnLeft()}}> @@ -561,17 +561,17 @@ const EditTable = props => { {props.onAddRowBelow()}}> - +
- + {props.onRemoveTable()}} className='button-red button-fill button-raised'> diff --git a/apps/documenteditor/mobile/src/view/edit/EditText.jsx b/apps/documenteditor/mobile/src/view/edit/EditText.jsx index d9b9020db7..237f929b3a 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditText.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditText.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useEffect, useState } from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Swiper, View, SwiperSlide, List, ListItem, Icon, Row, Button, Page, Navbar, NavRight, Segmented, BlockTitle, Link} from 'framework7-react'; +import {f7, Swiper, View, SwiperSlide, List, ListItem, Icon, Button, Page, Navbar, NavRight, Segmented, BlockTitle, Link} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; @@ -224,14 +224,14 @@ const PageNumbers = observer( props => { return ( - {numberArrays.map( number => ( - { - props.onNumber(number.numberingInfo); - }}> -
-
- ))} + {numberArrays.map( number => ( + { + props.onNumber(number.numberingInfo); + }}> +
+
+ ))}
); @@ -249,19 +249,19 @@ const PageMultiLevel = observer( props => { return( - - {arrayMultiLevel.map((item) => ( - props.onMultiLevelList(item.numberingInfo)}> -
+ + {arrayMultiLevel.map((item) => ( + props.onMultiLevelList(item.numberingInfo)}> +
-
-
- ))} -
+
+
+ ))} +
) @@ -528,12 +528,12 @@ const EditText = props => { changeFontFamily: props.changeFontFamily }}/> - + {
- +
{props.onParagraphAlign('left')}}> @@ -575,11 +575,11 @@ const EditText = props => { {props.onParagraphAlign('just')}}> - +
{!inSmartArtInternal && - + } {!inSmartArt && !inSmartArtInternal && diff --git a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx index a3b620335c..71fd049253 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx @@ -1,10 +1,11 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {List, ListItem, ListButton, Icon, Row, Page, Navbar, BlockTitle, Toggle, Range, Link, Tabs, Tab, NavRight, Swiper, SwiperSlide} from 'framework7-react'; +import {List, ListItem, ListButton, Icon, Row, Page, Navbar, BlockTitle, Toggle, Range, Link, Tabs, Tab, NavRight} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import {CustomColorPicker, ThemeColorPalette} from "../../../../../common/mobile/lib/component/ThemeColorPalette.jsx"; import { f7 } from 'framework7-react'; +import { Swiper, SwiperSlide } from 'swiper/react'; const PageCustomFillColor = props => { const { t } = useTranslation(); diff --git a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx index f2e6bd4516..bc70667302 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState, useEffect} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Page, Navbar, List, ListItem, ListButton, Row, BlockTitle,SkeletonBlock, Range, Toggle, Icon, Link, Tabs, Tab, NavRight} from 'framework7-react'; +import {f7, Page, Navbar, List, ListItem, ListButton, BlockTitle,SkeletonBlock, Range, Toggle, Icon, Link, Tabs, Tab, NavRight} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import {CustomColorPicker, ThemeColorPalette} from "../../../../../common/mobile/lib/component/ThemeColorPalette.jsx"; @@ -25,7 +25,7 @@ const StyleTemplates = inject("storeFocusObjects","storeTableSettings")(observer return (
    - { !styles.length ? + {!styles.length ? Array.from({ length: 34 }).map((item,index) => (
  • @@ -56,6 +56,7 @@ const PageStyleOptions = props => { const tableObject = props.storeFocusObjects.tableObject; let tableLook, isFirstRow, isLastRow, isBandHor, isFirstCol, isLastCol, isBandVer; + if (tableObject) { tableLook = tableObject.get_TableLook(); isFirstRow = tableLook.get_FirstRow(); @@ -291,7 +292,7 @@ const TabBorder = inject("storeFocusObjects", "storeTableSettings")(observer(pro > - +
    {onBorderType("lrtbcm")}}> @@ -307,10 +308,10 @@ const TabBorder = inject("storeFocusObjects", "storeTableSettings")(observer(pro {onBorderType("l")}}> - +
    - +
    {onBorderType("c")}}> @@ -326,7 +327,7 @@ const TabBorder = inject("storeFocusObjects", "storeTableSettings")(observer(pro {onBorderType("b")}}> - +
    ) @@ -487,7 +488,7 @@ const EditTable = props => { - +
    {props.onAddColumnLeft()}}> @@ -500,17 +501,17 @@ const EditTable = props => { {props.onAddRowBelow()}}> - +
    - + {props.onRemoveTable()}} className='button-red button-fill button-raised'> diff --git a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx index 33688c4e1a..823934180f 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx @@ -1,9 +1,10 @@ import React, {Fragment, useState, useEffect} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Swiper, View, SwiperSlide, List, ListItem, ListButton, ListInput, Icon, Row, Button, Page, Navbar, Segmented, BlockTitle, NavRight, Link} from 'framework7-react'; +import {f7, View, List, ListItem, ListButton, ListInput, Icon, Button, Page, Navbar, Segmented, BlockTitle, NavRight, Link} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; +import { Swiper, SwiperSlide } from 'swiper/react'; import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage.mjs'; import HighlightColorPalette from '../../../../../common/mobile/lib/component/HighlightColorPalette.jsx'; @@ -67,12 +68,12 @@ const EditText = props => { changeFontFamily: props.changeFontFamily }}/> - + { - +
    {props.onParagraphAlign('left')}}> @@ -115,10 +116,10 @@ const EditText = props => { {props.onParagraphAlign('just')}}> - +
    - +
    {props.onParagraphValign('top')}}> @@ -128,17 +129,17 @@ const EditText = props => { {props.onParagraphValign('bottom')}}> - +
    - + { - + diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddChart.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddChart.jsx index 41ca9fba1d..89a703556c 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddChart.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddChart.jsx @@ -1,7 +1,7 @@ -import React, {Fragment, useState} from 'react'; +import React from 'react'; import {observer, inject} from "mobx-react"; -import {Swiper, SwiperSlide} from 'framework7-react'; import {Device} from "../../../../../common/mobile/utils/device"; +import { Swiper, SwiperSlide } from 'swiper/react'; const AddChart = props => { const types = props.storeChartSettings.types; diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx index 19d45a651d..8a4503c084 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx @@ -1,5 +1,5 @@ import React, {useState} from 'react'; -import {Page, Navbar, List, ListItem, Icon, Row, Toggle} from 'framework7-react'; +import {Page, Navbar, List, ListItem, Icon, Toggle} from 'framework7-react'; import { useTranslation } from 'react-i18next'; const AddSortAndFilter = props => { @@ -13,14 +13,14 @@ const AddSortAndFilter = props => { - + {!wsLock && diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx index 9b7bbd2abb..ee7fb8228a 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState, useEffect} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, f7router, List, ListItem, Icon, Row, Button, Page, Navbar, Segmented, BlockTitle, NavRight, Link, Toggle, Swiper, SwiperSlide, ListInput, Block} from 'framework7-react'; +import {f7, List, ListItem, Icon, Button, Page, Navbar, Segmented, BlockTitle, NavRight, Link, Toggle, ListInput, Block} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; @@ -48,11 +48,11 @@ const EditCell = props => { <> - + { const { t } = useTranslation(); diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditText.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditText.jsx index 6d4ada5363..21badbea58 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditText.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditText.jsx @@ -1,8 +1,8 @@ -import React, {Fragment, useState, useEffect} from 'react'; +import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, List, ListItem, Icon, Row, Button, Page, Navbar, NavRight, Segmented, BlockTitle, Link} from 'framework7-react'; +import {List, ListItem, Icon, Button, Page, Navbar, NavRight, Segmented, BlockTitle, Link} from 'framework7-react'; import { useTranslation } from 'react-i18next'; -import {Device} from '../../../../../common/mobile/utils/device'; +import { Device } from '../../../../../common/mobile/utils/device'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage.mjs'; @@ -36,11 +36,11 @@ const EditText = props => { changeFontFamily: props.changeFontFamily }}/> - + { - +
    {props.onParagraphAlign('left')}}> @@ -68,10 +68,10 @@ const EditText = props => { {props.onParagraphAlign('justify')}}> - +
    - +
    From 02c2823b83fe10aae9e6df3bd606f6d54d843023 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 25 May 2023 16:13:05 +0300 Subject: [PATCH 03/22] [DE PE SSE mobile] Correct styles and sheets --- .../mobile/lib/view/collaboration/Collaboration.jsx | 2 +- apps/common/mobile/resources/less/common-material.less | 5 +++++ apps/common/mobile/resources/less/common.less | 9 ++++++++- apps/documenteditor/mobile/src/less/app.less | 1 + apps/documenteditor/mobile/src/view/edit/Edit.jsx | 2 +- apps/presentationeditor/mobile/src/view/edit/Edit.jsx | 2 +- apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx | 2 +- 7 files changed, 18 insertions(+), 5 deletions(-) diff --git a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx index 71a42e9671..abb796d1b1 100644 --- a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx @@ -153,7 +153,7 @@ class CollaborationView extends Component { this.props.onclosed()} closeByOutsideClick={false}> : - this.props.onclosed()}> + this.props.onclosed()}> ) diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 6e57dc5431..6ca5cc946f 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -544,4 +544,9 @@ color: @text-normal; } } + + // Popover + .popover-arrow:after { + background: @brandColor; + } } diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 9c23258a89..baa7b2c16e 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -217,8 +217,9 @@ } .popover { - .page .list { + .page .list:first-child:last-child { ul { + border-radius: 0; background-color: var(--f7-list-bg-color); li:first-child, li:last-child { .item-link { @@ -1144,6 +1145,8 @@ input[type="number"]::-webkit-inner-spin-button { // Dialog with password .dialog { + border-radius: 0; + .modal-password { position: relative; @@ -1155,6 +1158,10 @@ input[type="number"]::-webkit-inner-spin-button { } } +.md .item-input:not(.item-input-outline) .item-content::before, .md .item-input:not(.item-input-outline).item-content::before { + background: transparent; +} + diff --git a/apps/documenteditor/mobile/src/less/app.less b/apps/documenteditor/mobile/src/less/app.less index 41f7cfb42d..de3cec24e8 100644 --- a/apps/documenteditor/mobile/src/less/app.less +++ b/apps/documenteditor/mobile/src/less/app.less @@ -357,6 +357,7 @@ z-index: 10000; a { background-color: @background-primary; + border-radius: 50%; &:focus, &:focus-within, &:active, &.active-state { background-color: @background-primary; diff --git a/apps/documenteditor/mobile/src/view/edit/Edit.jsx b/apps/documenteditor/mobile/src/view/edit/Edit.jsx index d28625b468..b0ff61daf3 100644 --- a/apps/documenteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/documenteditor/mobile/src/view/edit/Edit.jsx @@ -378,7 +378,7 @@ const EditView = props => { props.onClosed()}> : - props.onClosed()}> + props.onClosed()}> ) diff --git a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx index b47928a1dc..6dee801b7d 100644 --- a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx @@ -355,7 +355,7 @@ const EditView = props => { props.onClosed()}> : - props.onClosed()}> + props.onClosed()}> ) diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx index f777cfd476..9e4f9af902 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx @@ -450,7 +450,7 @@ const EditView = props => { props.onClosed()}> : - props.onClosed()}> + props.onClosed()}> ) From 03fb51ac0e4cac91f3e5905d30d6fc8a162adb78 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 26 May 2023 18:36:43 +0300 Subject: [PATCH 04/22] [DE PE SSE mobile] Correct transitions and styles --- .../lib/view/collaboration/Collaboration.jsx | 7 +++++++ .../mobile/resources/less/common-material.less | 12 +++++++++--- apps/common/mobile/resources/less/common.less | 4 ++++ apps/documenteditor/mobile/src/view/add/Add.jsx | 7 +++++++ .../mobile/src/view/edit/Edit.jsx | 17 +++++++++++++++-- .../mobile/src/view/settings/Settings.jsx | 6 ++++++ .../mobile/src/view/add/Add.jsx | 7 +++++++ .../mobile/src/view/edit/Edit.jsx | 7 +++++++ .../mobile/src/view/settings/Settings.jsx | 6 ++++++ .../mobile/src/view/add/Add.jsx | 7 +++++++ .../mobile/src/view/edit/Edit.jsx | 7 +++++++ .../mobile/src/view/settings/Settings.jsx | 6 ++++++ 12 files changed, 88 insertions(+), 5 deletions(-) diff --git a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx index abb796d1b1..a80a87f291 100644 --- a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx @@ -87,6 +87,13 @@ const routes = [ } ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); + const PageCollaboration = inject('storeAppOptions', 'users')(observer(props => { const { t } = useTranslation(); const _t = t('Common.Collaboration', {returnObjects: true}); diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 6ca5cc946f..6518b63e25 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -269,10 +269,13 @@ .item-input, .item-link { .item-inner { display: block; + padding-right: 0; + .item-title, .item-label { width: 100%; font-size: 12px; } + .item-input-wrap { margin-left: 0; } @@ -522,6 +525,7 @@ } .item-input, .item-inner { padding: 0; + margin: 0; } } } @@ -545,8 +549,10 @@ } } - // Popover - .popover-arrow:after { - background: @brandColor; + // Popover arrows + .popover.popover__titled { + .popover-arrow:after { + background: @brandColor; + } } } diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index baa7b2c16e..041bf30c91 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -1162,6 +1162,10 @@ input[type="number"]::-webkit-inner-spin-button { background: transparent; } +.md .item-input .item-content, .md .item-input.item-content { + padding-left: 0; +} + diff --git a/apps/documenteditor/mobile/src/view/add/Add.jsx b/apps/documenteditor/mobile/src/view/add/Add.jsx index 05a2bcf35e..748f77f3ad 100644 --- a/apps/documenteditor/mobile/src/view/add/Add.jsx +++ b/apps/documenteditor/mobile/src/view/add/Add.jsx @@ -57,6 +57,13 @@ const routes = [ } ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); + const AddLayoutNavbar = ({ tabs, inPopover, storeTableSettings }) => { const isAndroid = Device.android; const { t } = useTranslation(); diff --git a/apps/documenteditor/mobile/src/view/edit/Edit.jsx b/apps/documenteditor/mobile/src/view/edit/Edit.jsx index b0ff61daf3..b00e0b0d1d 100644 --- a/apps/documenteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/documenteditor/mobile/src/view/edit/Edit.jsx @@ -225,9 +225,22 @@ const routes = [ { path: '/edit-structure-table-contents/', component: PageEditStructureTableContents - } + }, + // { + // path: '(.*)', + // options: { + // transition: 'f7-push', + // }, + // }, ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); + const EmptyEditLayout = () => { const { t } = useTranslation(); const _t = t('Edit', {returnObjects: true}); @@ -354,7 +367,7 @@ const EditTabs = props => { }) } } - + return ( diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index 6f320f606e..60a5db5006 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -95,6 +95,12 @@ const routes = [ } ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); const SettingsList = inject("storeAppOptions", "storeReview", "storeDocumentInfo")(observer(props => { const { t } = useTranslation(); diff --git a/apps/presentationeditor/mobile/src/view/add/Add.jsx b/apps/presentationeditor/mobile/src/view/add/Add.jsx index 0f0f3810cc..0bad99cbe2 100644 --- a/apps/presentationeditor/mobile/src/view/add/Add.jsx +++ b/apps/presentationeditor/mobile/src/view/add/Add.jsx @@ -61,6 +61,13 @@ const routes = [ } ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); + const AddLayoutNavbar = ({ tabs, inPopover }) => { const isAndroid = Device.android; return ( diff --git a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx index 6dee801b7d..2285f446ad 100644 --- a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx @@ -225,6 +225,13 @@ const routes = [ } ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); + const EmptyEditLayout = () => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); diff --git a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx index e79f43ab0a..52e60c7c33 100644 --- a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx @@ -57,6 +57,12 @@ const routes = [ }*/ ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); const SettingsList = inject("storeAppOptions", "storeToolbarSettings")(observer(props => { const { t } = useTranslation(); diff --git a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx index 7807ada673..323fc59100 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx @@ -69,6 +69,13 @@ const routes = [ } ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); + const AddLayoutNavbar = ({ tabs, inPopover }) => { const isAndroid = Device.android; diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx index 9e4f9af902..fba18ba830 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx @@ -299,6 +299,13 @@ const routes = [ } ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); + const EmptyEditLayout = () => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx index f1896581cb..623abdabc2 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx @@ -70,6 +70,12 @@ const routes = [ } ]; +routes.forEach(route => { + route.options = { + ...route.options, + transition: 'f7-push' + }; +}); const SettingsList = inject("storeAppOptions")(observer(props => { const { t } = useTranslation(); From 9acf81c489d5d27c7f7452296f6f89c3e41b62bf Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 1 Jun 2023 00:16:12 +0300 Subject: [PATCH 05/22] [DE PE SSE mobile] Correct styles, text settings --- .../mobile/resources/less/common-ios.less | 27 ++++-- .../resources/less/common-material.less | 89 ++++++++++++++++--- apps/common/mobile/resources/less/common.less | 14 +-- .../mobile/src/controller/edit/EditText.jsx | 4 +- .../mobile/src/less/app-material.less | 6 +- .../mobile/src/view/edit/Edit.jsx | 10 +-- 6 files changed, 110 insertions(+), 40 deletions(-) diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index 2c5456ce85..d64c055f99 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -39,8 +39,9 @@ --f7-searchbar-search-icon-color: @text-tertiary; --f7-searchbar-input-clear-button-color: @text-tertiary; - --f7-toggle-inactive-color: @background-menu-divider; - --f7-toggle-border-color: @background-menu-divider; + --f7-toggle-inactive-border-color: @background-menu-divider; + --f7-toggle-inactive-bg-color: @background-menu-divider; + --f7-actions-button-border-color: @background-menu-divider; --f7-popover-bg-color: @background-primary; --f7-dialog-bg-color-rgb: @background-secondary; @@ -234,6 +235,22 @@ } } + .links-list a:after, .list .item-inner:after, .simple-list li:after { + background-color: var(--f7-list-item-border-color); + bottom: 0; + content: ""; + display: block; + height: 1px; + left: 0; + position: absolute; + right: auto; + top: auto; + transform: scaleY(calc(1/var(--f7-device-pixel-ratio))); + transform-origin: 50% 100%; + width: 100%; + z-index: 15; + } + .tab-buttons { width: 100%; display: flex; @@ -545,9 +562,9 @@ // Toggle Icon - .toggle-icon { - background: transparent; - } + // .toggle-icon { + // background: transparent; + // } // Edit Comment Popup diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 6518b63e25..83862bd762 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -25,7 +25,6 @@ --f7-subnavbar-height: 56px; --f7-radio-active-color: @brandColor; - --f7-toggle-active-color: @brandColor; --f7-range-bar-active-bg-color: @brandColor; --f7-range-knob-color: @brandColor; --f7-range-knob-size: 16px; @@ -52,6 +51,18 @@ --f7-input-text-color: @text-normal; --f7-block-text-color: @text-secondary; + --f7-dialog-border-radius: 0; + --f7-sheet-border-radius: 0; + --f7-popover-border-radius: 4px; + --f7-actions-border-radius: 0; + --f7-box-shadow: 0px 5px 5px -3px rgba(0,0,0,.2),0px 8px 10px 1px rgba(0,0,0,.14),0px 3px 14px 2px rgba(0,0,0,.12); + --f7-popover-box-shadow: var(--f7-box-shadow); + + --f7-toggle-active-bg-color: @brandColor; + --f7-toggle-active-border-color: @brandColor; + + --f7-navbar-title-margin-left: 20px; + --f7-navbar-title-margin-right: 20px; .button { --f7-touch-ripple-color: transparent; @@ -68,6 +79,7 @@ .navbar { --f7-touch-ripple-color: @touchColor; + .sheet-close { width: 56px; height: 56px; @@ -97,8 +109,6 @@ --f7-page-bg-color: @background-tertiary; --f7-list-item-border-color: @background-menu-divider; --f7-list-chevron-icon-color: @text-tertiary; - --f7-toggle-inactive-color: @background-menu-divider; - --f7-toggle-border-color: @background-menu-divider; --f7-actions-button-text-color: @text-normal; --f7-subnavbar-border-color: @background-menu-divider; --f7-list-border-color: @background-menu-divider; @@ -106,10 +116,6 @@ .add-popup { .view { - .block-title { - // margin-bottom: 0; - // margin-top: 8px; - } .add-image, .inputs-list { ul:after { display: none; @@ -263,12 +269,15 @@ height: 3px; } } + // List .list { &.inputs-list { + margin: 0; + .item-input, .item-link { .item-inner { - display: block; + // display: block; padding-right: 0; .item-title, .item-label { @@ -281,7 +290,16 @@ } } } + + .item-input:not(.item-input-outline) .item-content::before, .item-input:not(.item-input-outline).item-content::before { + background: transparent; + } + + .item-input .item-content, .item-input.item-content { + padding-left: 0; + } } + .buttons { box-sizing: border-box; min-height: 48px; @@ -289,11 +307,14 @@ justify-content: space-between; align-items: center; width: 100%; + .item-content { width: 100%; + .item-inner { padding-bottom: 0; padding-top: 0; + .row { width: 100%; --f7-cols-per-row: 1; @@ -301,6 +322,7 @@ display: flex; flex-wrap: wrap; justify-content: space-between; + .button { flex: 1; font-size: 17px; @@ -316,6 +338,7 @@ } } } + .item-content { .color-preview { width: 30px; @@ -331,6 +354,26 @@ } } + .links-list a:after, .list .item-inner:after, .simple-list li:after { + background-color: var(--f7-list-item-border-color); + bottom: 0; + content: ""; + display: block; + height: 1px; + left: 0; + position: absolute; + right: auto; + top: auto; + transform: scaleY(calc(1/var(--f7-device-pixel-ratio))); + transform-origin: 50% 100%; + width: 100%; + z-index: 15; + } + + .media-list:not(.inset):not(.inset-md):not(.menu-list) .item-content, .media-list:not(.inset):not(.inset-md):not(.menu-list) li > .item-link, .list:not(.inset):not(.inset-md):not(.menu-list) .media-item .item-content, .list:not(.inset):not(.inset-md):not(.menu-list) .media-item > .item-link { + border-radius: 0; + } + // Color palette #color-picker { @@ -378,9 +421,15 @@ margin-right: 10px; margin: 4px 0; } - &-inner { + + .navbar-inner { overflow: initial; } + + .title { + margin-left: var(--f7-navbar-title-margin-left); + margin-right: var(--f7-navbar-title-margin-left); + } } .searchbar .input-clear-button { @@ -434,13 +483,17 @@ // height: 100%; .searchbar-inner { height: 100%; + padding: 0; + &__center { flex-direction: column; } + &__right { flex-direction: column-reverse; } } + &.replace { height: 96px; } @@ -549,10 +602,20 @@ } } - // Popover arrows - .popover.popover__titled { - .popover-arrow:after { - background: @brandColor; + // Popover styles + .popover { + box-shadow: var(--f7-box-shadow); + + &.popover__titled { + .popover-arrow:after { + background: @brandColor; + } + } + + &.document-menu, &.popover__functions { + .popover-arrow:after { + background: @background-secondary; + } } } } diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 041bf30c91..8a74a982b5 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -114,9 +114,13 @@ .list { max-width: 100%; + --menu-list-offset: 0px; + ul { width: 100%; + background: var(--f7-list-bg-color); } + li.no-indicator { .item-link { .item-inner{ @@ -1145,8 +1149,6 @@ input[type="number"]::-webkit-inner-spin-button { // Dialog with password .dialog { - border-radius: 0; - .modal-password { position: relative; @@ -1158,14 +1160,6 @@ input[type="number"]::-webkit-inner-spin-button { } } -.md .item-input:not(.item-input-outline) .item-content::before, .md .item-input:not(.item-input-outline).item-content::before { - background: transparent; -} - -.md .item-input .item-content, .md .item-input.item-content { - padding-left: 0; -} - diff --git a/apps/documenteditor/mobile/src/controller/edit/EditText.jsx b/apps/documenteditor/mobile/src/controller/edit/EditText.jsx index 33e9d89fa2..dbca8bc24e 100644 --- a/apps/documenteditor/mobile/src/controller/edit/EditText.jsx +++ b/apps/documenteditor/mobile/src/controller/edit/EditText.jsx @@ -230,12 +230,14 @@ class EditTextController extends Component { const storeTextSettings = this.props.storeTextSettings; let subtype = undefined; let arrayElements = (type===0) ? storeTextSettings.getBulletsList() : (type===1) ? storeTextSettings.getNumbersList() : storeTextSettings.getMultiLevelList(); + for (let i=0; i 0 && api.asc_IsCurrentNumberingPreset(arrayElements[i].numberingInfo, type!==2)) { subtype = arrayElements[i].subtype; break; } } + switch (type) { case 0: storeTextSettings.resetBullets(subtype); diff --git a/apps/documenteditor/mobile/src/less/app-material.less b/apps/documenteditor/mobile/src/less/app-material.less index fd27f8efd2..e829942a22 100644 --- a/apps/documenteditor/mobile/src/less/app-material.less +++ b/apps/documenteditor/mobile/src/less/app-material.less @@ -18,9 +18,9 @@ width: auto; } - .toggle input[type="checkbox"]:checked + .toggle-icon { - background-color: rgba(68,105,149,.5); - } + // .toggle input[type="checkbox"]:checked + .toggle-icon { + // background-color: rgba(68,105,149,.5); + // } // Review .page-review { diff --git a/apps/documenteditor/mobile/src/view/edit/Edit.jsx b/apps/documenteditor/mobile/src/view/edit/Edit.jsx index b00e0b0d1d..863aa20a77 100644 --- a/apps/documenteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/documenteditor/mobile/src/view/edit/Edit.jsx @@ -226,12 +226,6 @@ const routes = [ path: '/edit-structure-table-contents/', component: PageEditStructureTableContents }, - // { - // path: '(.*)', - // options: { - // transition: 'f7-push', - // }, - // }, ]; routes.forEach(route => { @@ -369,7 +363,7 @@ const EditTabs = props => { } return ( - + @@ -391,7 +385,7 @@ const EditView = props => { props.onClosed()}> : - props.onClosed()}> + props.onClosed()}> ) From efd1bf174985438bfe82bc0c85e4a1a78e77ffd8 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 7 Jun 2023 16:43:09 +0300 Subject: [PATCH 06/22] Correct styles and remove unused property --- apps/common/mobile/lib/view/collaboration/Collaboration.jsx | 2 +- apps/common/mobile/resources/less/common-ios.less | 3 +++ apps/common/mobile/resources/less/common.less | 2 +- apps/documenteditor/mobile/src/view/add/Add.jsx | 2 +- apps/documenteditor/mobile/src/view/settings/Settings.jsx | 2 +- apps/presentationeditor/mobile/src/view/add/Add.jsx | 2 +- apps/presentationeditor/mobile/src/view/edit/Edit.jsx | 2 +- apps/presentationeditor/mobile/src/view/settings/Settings.jsx | 2 +- apps/spreadsheeteditor/mobile/src/view/add/Add.jsx | 2 +- apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx | 2 +- apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx | 2 +- 11 files changed, 13 insertions(+), 10 deletions(-) diff --git a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx index a80a87f291..47504c373a 100644 --- a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx @@ -105,7 +105,7 @@ const PageCollaboration = inject('storeAppOptions', 'users')(observer(props => { const isViewer = appOptions.isViewer; return ( - + {Device.phone && diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index d64c055f99..f48959e8e9 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -58,6 +58,9 @@ --f7-block-text-color: @text-secondary; + --f7-theme-color-shade: @background-primary; + --f7-fab-pressed-bg-color: @background-primary; + // Main Toolbar #editor-navbar.navbar .right a + a, #editor-navbar.navbar .left a + a { diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 8a74a982b5..c3009d423f 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -112,7 +112,7 @@ padding: 14px 10px 0 10px; } -.list { +.view .list { max-width: 100%; --menu-list-offset: 0px; diff --git a/apps/documenteditor/mobile/src/view/add/Add.jsx b/apps/documenteditor/mobile/src/view/add/Add.jsx index 748f77f3ad..fd06a58e93 100644 --- a/apps/documenteditor/mobile/src/view/add/Add.jsx +++ b/apps/documenteditor/mobile/src/view/add/Add.jsx @@ -213,7 +213,7 @@ const AddTabs = inject("storeFocusObjects", "storeTableSettings")(observer(({sto // } return ( - + diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index 60a5db5006..bc26e81c94 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -175,7 +175,7 @@ const SettingsList = inject("storeAppOptions", "storeReview", "storeDocumentInfo } return ( - + {navbar} diff --git a/apps/presentationeditor/mobile/src/view/add/Add.jsx b/apps/presentationeditor/mobile/src/view/add/Add.jsx index 0bad99cbe2..b1aecb4f19 100644 --- a/apps/presentationeditor/mobile/src/view/add/Add.jsx +++ b/apps/presentationeditor/mobile/src/view/add/Add.jsx @@ -152,7 +152,7 @@ const AddTabs = props => { // } return ( - + diff --git a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx index 2285f446ad..f57aad6bf1 100644 --- a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx @@ -341,7 +341,7 @@ const EditTabs = props => { } return ( - + diff --git a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx index 52e60c7c33..e89d18fdc3 100644 --- a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx @@ -167,7 +167,7 @@ const SettingsList = inject("storeAppOptions", "storeToolbarSettings")(observer( }; return ( - + {navbar} diff --git a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx index 323fc59100..99149ebb81 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx @@ -184,7 +184,7 @@ const AddTabs = props => { } return ( - + diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx index fba18ba830..33e6832866 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx @@ -435,7 +435,7 @@ const EditTabs = props => { } return ( - + diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx index 623abdabc2..a5f741637b 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx @@ -177,7 +177,7 @@ const SettingsList = inject("storeAppOptions")(observer(props => { }; return ( - + {navbar} From 42928305ace297a3631bcbace816a5fdae701be0 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Sat, 1 Jul 2023 21:22:45 +0300 Subject: [PATCH 07/22] [mobile] fix routes in the 'Settings' popover --- .../src/controller/settings/Protection.jsx | 5 +- .../mobile/src/view/settings/Protection.jsx | 3 +- .../mobile/src/view/settings/Settings.jsx | 201 +++--------------- .../mobile/src/view/settings/SettingsPage.jsx | 170 +++++++++++++++ 4 files changed, 206 insertions(+), 173 deletions(-) create mode 100644 apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx diff --git a/apps/documenteditor/mobile/src/controller/settings/Protection.jsx b/apps/documenteditor/mobile/src/controller/settings/Protection.jsx index 6f46ab3a6a..12e0424511 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Protection.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Protection.jsx @@ -11,6 +11,8 @@ const ProtectionController = props => { const [isSnackbarVisible, setSnackbarVisible] = useState(false); const onProtectClick = () => { + console.log("onProtectClick"); + const api = Common.EditorApi.get(); const appOptions = props.storeAppOptions; const isProtected = appOptions.isProtected; @@ -83,7 +85,8 @@ const ProtectionController = props => { return ( <> - + {/**/} + setSnackbarVisible(false)} /> ); diff --git a/apps/documenteditor/mobile/src/view/settings/Protection.jsx b/apps/documenteditor/mobile/src/view/settings/Protection.jsx index 2c08af3d52..2d15ab2e44 100644 --- a/apps/documenteditor/mobile/src/view/settings/Protection.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Protection.jsx @@ -13,7 +13,8 @@ const ProtectionView = inject("storeAppOptions")(observer(props => { - props.onProtectClick()} link="#"> + {/* props.onProtectClick()} link="#">*/} + diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index bc26e81c94..d5fc5e33c6 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -16,11 +16,12 @@ import SharingSettings from "../../../../../common/mobile/lib/view/SharingSettin import ProtectionDocumentController from '../../controller/settings/DocumentProtection'; import ProtectionController from '../../controller/settings/Protection'; import FileEncryptionController from '../../controller/settings/FileEncryption'; +import SettingsPage from './SettingsPage' const routes = [ { - path: '/', - component: 'TSettingsView' + path: '/settingspage/', + component: SettingsPage }, { path: '/document-settings/', @@ -102,172 +103,6 @@ routes.forEach(route => { }; }); -const SettingsList = inject("storeAppOptions", "storeReview", "storeDocumentInfo")(observer(props => { - const { t } = useTranslation(); - const _t = t('Settings', {returnObjects: true}); - const appOptions = props.storeAppOptions; - const canProtect = appOptions.canProtect; - const storeReview = props.storeReview; - const displayMode = storeReview.displayMode; - const docInfo = props.storeDocumentInfo; - const docTitle = docInfo.dataDoc.title; - const docExt = docInfo.dataDoc ? docInfo.dataDoc.fileType : ''; - const isNotForm = docExt && docExt !== 'oform'; - const navbar = - -
    {docTitle}
    - {!props.inPopover && {_t.textDone}} -
    ; - - const onoptionclick = page => { - if ( props.onOptionClick ) - props.onOptionClick(page) - }; - - const closeModal = () => { - if (Device.phone) { - f7.sheet.close('.settings-popup', false); - } else { - f7.popover.close('#settings-popover', false); - } - }; - - const onOpenCollaboration = () => { - closeModal(); - props.openOptions('coauth'); - } - - const onOpenNavigation = () => { - closeModal(); - props.openOptions('navigation'); - } - - // set mode - const isViewer = appOptions.isViewer; - const isMobileView = appOptions.isMobileView; - - let _isEdit = false, - _canDownload = false, - _canDownloadOrigin = false, - _canAbout = true, - _canHelp = true, - _canPrint = false, - _canFeedback = true; - - if (appOptions.isDisconnected) { - _isEdit = false; - if (!appOptions.enableDownload) - _canPrint = _canDownload = _canDownloadOrigin = false; - } else { - _isEdit = appOptions.isEdit; - _canDownload = appOptions.canDownload; - _canDownloadOrigin = appOptions.canDownloadOrigin; - _canPrint = appOptions.canPrint; - - if (appOptions.customization && appOptions.canBrandingExt) { - _canAbout = appOptions.customization.about !== false; - } - - if (appOptions.customization) { - _canHelp = appOptions.customization.help !== false; - _canFeedback = appOptions.customization.feedback !== false; - } - } - - return ( - - - {navbar} - - {!props.inPopover && - - - - } - {(_isEdit && canProtect) && - - - - } - { - if(Device.phone) { - onOpenNavigation(); - } else { - onoptionclick.bind(this, "/navigation/")(); - }}}> - - - {window.matchMedia("(max-width: 359px)").matches ? - - - - : null} - {Device.sailfish && _isEdit && - {props.onOrthographyCheck()}} className='no-indicator' link="#"> - - - } - {!isViewer && Device.phone && - - - { - closeModal(); - props.onChangeMobileView(); - props.openOptions('snackbar'); - }} /> - - } - {(_isEdit && !isViewer) && - - - - } - {isNotForm && - - - - } - {_canDownload && - - - - } - {_canDownloadOrigin && - - - - } - {_canPrint && - - - - } - - - - {_canHelp && - - - - } - {(_canAbout && isNotForm) && - - - - } - {_canFeedback && - - - - } - - - - ) -})); - class SettingsView extends Component { constructor(props) { super(props) @@ -276,7 +111,7 @@ class SettingsView extends Component { } onoptionclick(page){ - f7.views.current.router.navigate(page); + // f7.views.current.router.navigate(page); } render() { @@ -285,10 +120,34 @@ class SettingsView extends Component { return ( show_popover ? this.props.closeOptions('settings')}> - + + + : this.props.closeOptions('settings')}> - + + + ) } diff --git a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx new file mode 100644 index 0000000000..6314ed3bd2 --- /dev/null +++ b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx @@ -0,0 +1,170 @@ +import React, {Component, useEffect} from 'react'; +import {Page, Navbar, NavRight, Link, Icon, ListItem, List, Toggle} from 'framework7-react'; +import {Device} from "../../../../../common/mobile/utils/device"; +import { observer, inject } from "mobx-react"; +import { useTranslation } from 'react-i18next'; + +const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo")(observer(props => { + const { t } = useTranslation(); + const _t = t('Settings', {returnObjects: true}); + const appOptions = props.storeAppOptions; + const canProtect = appOptions.canProtect; + const storeReview = props.storeReview; + const displayMode = storeReview.displayMode; + const docInfo = props.storeDocumentInfo; + const docTitle = docInfo.dataDoc.title; + const docExt = docInfo.dataDoc ? docInfo.dataDoc.fileType : ''; + const isNotForm = docExt && docExt !== 'oform'; + const navbar = + +
    {docTitle}
    + {!props.inPopover && {_t.textDone}} +
    ; + + const onoptionclick = page => { + // if ( props.onOptionClick ) + // props.onOptionClick(page) + }; + + const closeModal = () => { + if (Device.phone) { + f7.sheet.close('.settings-popup', false); + } else { + f7.popover.close('#settings-popover', false); + } + }; + + const onOpenCollaboration = () => { + closeModal(); + props.openOptions('coauth'); + } + + const onOpenNavigation = () => { + closeModal(); + props.openOptions('navigation'); + } + + // set mode + const isViewer = appOptions.isViewer; + const isMobileView = appOptions.isMobileView; + + let _isEdit = false, + _canDownload = false, + _canDownloadOrigin = false, + _canAbout = true, + _canHelp = true, + _canPrint = false, + _canFeedback = true; + + if (appOptions.isDisconnected) { + _isEdit = false; + if (!appOptions.enableDownload) + _canPrint = _canDownload = _canDownloadOrigin = false; + } else { + _isEdit = appOptions.isEdit; + _canDownload = appOptions.canDownload; + _canDownloadOrigin = appOptions.canDownloadOrigin; + _canPrint = appOptions.canPrint; + + if (appOptions.customization && appOptions.canBrandingExt) { + _canAbout = appOptions.customization.about !== false; + } + + if (appOptions.customization) { + _canHelp = appOptions.customization.help !== false; + _canFeedback = appOptions.customization.feedback !== false; + } + } + + return ( + + {navbar} + + {/*{!props.inPopover &&*/} + {Device.phone && + + + + } + {(_isEdit && canProtect) && + + + + } + { + if(Device.phone) { + onOpenNavigation(); + } else { + onoptionclick.bind(this, "/navigation/")(); + }}}> + + + {window.matchMedia("(max-width: 359px)").matches ? + + + + : null} + {Device.sailfish && _isEdit && + {props.onOrthographyCheck()}} className='no-indicator' link="#"> + + + } + {!isViewer && Device.phone && + + + { + closeModal(); + props.onChangeMobileView(); + props.openOptions('snackbar'); + }} /> + + } + {(_isEdit && !isViewer) && + + + + } + {isNotForm && + + + + } + {_canDownload && + + + + } + {_canDownloadOrigin && + + + + } + {_canPrint && + + + + } + + + + {_canHelp && + + + + } + {(_canAbout && isNotForm) && + + + + } + {_canFeedback && + + + + } + + + ) +})); + +export default SettingsPage; \ No newline at end of file From 8d7b544b3966eb4f6f8541c4f7c6ccd405afdf6a Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 28 Jul 2023 19:01:04 +0300 Subject: [PATCH 08/22] [DE mobile] Change routing in settings --- .../src/controller/settings/Protection.jsx | 5 +- .../src/controller/settings/Settings.jsx | 1 - .../mobile/src/view/Toolbar.jsx | 4 +- apps/documenteditor/mobile/src/view/app.jsx | 5 +- .../mobile/src/view/settings/Protection.jsx | 3 +- .../mobile/src/view/settings/Settings.jsx | 242 +++++++++--------- .../mobile/src/view/settings/SettingsPage.jsx | 194 +++++++------- 7 files changed, 212 insertions(+), 242 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/settings/Protection.jsx b/apps/documenteditor/mobile/src/controller/settings/Protection.jsx index 12e0424511..6f46ab3a6a 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Protection.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Protection.jsx @@ -11,8 +11,6 @@ const ProtectionController = props => { const [isSnackbarVisible, setSnackbarVisible] = useState(false); const onProtectClick = () => { - console.log("onProtectClick"); - const api = Common.EditorApi.get(); const appOptions = props.storeAppOptions; const isProtected = appOptions.isProtected; @@ -85,8 +83,7 @@ const ProtectionController = props => { return ( <> - {/**/} - + setSnackbarVisible(false)} /> ); diff --git a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx index f7f595c3ce..cd152267df 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx @@ -157,7 +157,6 @@ const Settings = props => { return ( { elemTitle.innerText = correctOverflowedText(elemTitle); } }, [docTitle, isViewer]); - + return ( @@ -124,7 +124,7 @@ const ToolbarView = props => { {/*props.displayCollaboration &&*/} {Device.phone ? null : } {window.matchMedia("(min-width: 360px)").matches && docExt !== 'oform' ? props.openOptions('coauth')}> : null} - props.openOptions('settings')}> + props.openOptions('settings')} href={false}> ) diff --git a/apps/documenteditor/mobile/src/view/app.jsx b/apps/documenteditor/mobile/src/view/app.jsx index 57805e0cb0..bdb78386bf 100644 --- a/apps/documenteditor/mobile/src/view/app.jsx +++ b/apps/documenteditor/mobile/src/view/app.jsx @@ -1,7 +1,7 @@ import React from 'react'; -import {App,Panel,Views,View,Popup,Page,Navbar,Toolbar,NavRight,Link,Block,BlockTitle,List,ListItem,ListInput,ListButton,BlockFooter} from 'framework7-react'; -import { f7, f7ready } from 'framework7-react'; +import { App, View } from 'framework7-react'; +import { f7ready } from 'framework7-react'; import '../../../../common/Analytics.js'; @@ -18,7 +18,6 @@ import {Themes} from '../../../../common/mobile/lib/controller/Themes' const f7params = { name: 'Desktop Editor', // App name theme: 'auto', // Automatic theme detection - routes: routes, // App routes }; diff --git a/apps/documenteditor/mobile/src/view/settings/Protection.jsx b/apps/documenteditor/mobile/src/view/settings/Protection.jsx index 2d15ab2e44..2c08af3d52 100644 --- a/apps/documenteditor/mobile/src/view/settings/Protection.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Protection.jsx @@ -13,8 +13,7 @@ const ProtectionView = inject("storeAppOptions")(observer(props => { - {/* props.onProtectClick()} link="#">*/} - + props.onProtectClick()} link="#"> diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index d5fc5e33c6..a7e11d74e5 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -1,9 +1,6 @@ -import React, {Component, useEffect} from 'react'; -import {View, Page, Navbar, NavRight, Link, Popup, Popover, Icon,ListItem, List, Toggle} from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {f7} from 'framework7-react'; -import { observer, inject } from "mobx-react"; -import {Device} from '../../../../../common/mobile/utils/device'; +import React, {useMemo} from 'react'; +import { View, Popup, Popover } from 'framework7-react'; +import { Device } from '../../../../../common/mobile/utils/device'; import DocumentSettingsController from "../../controller/settings/DocumentSettings"; import DocumentInfoController from "../../controller/settings/DocumentInfo"; import { DownloadController } from "../../controller/settings/Download"; @@ -20,79 +17,82 @@ import SettingsPage from './SettingsPage' const routes = [ { - path: '/settingspage/', - component: SettingsPage - }, - { - path: '/document-settings/', - component: DocumentSettingsController, - }, - { - path: '/margins/', - component: DocumentMargins, - }, - { - path: '/document-formats/', - component: DocumentFormats, - }, - { - path: "/document-info/", - component: DocumentInfoController, - }, - { - path: '/application-settings/', - component: ApplicationSettingsController - }, - { - path: '/macros-settings/', - component: MacrosSettings - }, - { - path: '/download/', - component: DownloadController - }, - { - path: '/color-schemes/', - component: DocumentColorSchemes - }, - { - path: '/about/', - component: About - }, - - // Navigation - - { - path: '/navigation/', - component: NavigationController - }, - - // Direction - { - path: '/direction/', - component: Direction - }, - - // Sharing Settings - { - path: '/sharing-settings/', - component: SharingSettings - }, - - // Protection - { - path: '/protection', - component: ProtectionController - }, - { - path: '/protect', - component: ProtectionDocumentController - }, - - // Encryption - { - path: '/encrypt', - component: FileEncryptionController + master: true, + path: '/settings/', + component: SettingsPage, + detailRoutes: [ + { + path: '/document-settings/', + component: DocumentSettingsController, + }, + { + path: '/margins/', + component: DocumentMargins, + }, + { + path: '/document-formats/', + component: DocumentFormats, + }, + { + path: "/document-info/", + component: DocumentInfoController, + }, + { + path: '/application-settings/', + component: ApplicationSettingsController + }, + { + path: '/macros-settings/', + component: MacrosSettings + }, + { + path: '/download/', + component: DownloadController + }, + { + path: '/color-schemes/', + component: DocumentColorSchemes + }, + { + path: '/about/', + component: About + }, + + // Navigation + + { + path: '/navigation', + component: NavigationController + }, + + // Direction + { + path: '/direction/', + component: Direction + }, + + // Sharing Settings + { + path: '/sharing-settings/', + component: SharingSettings + }, + + // Protection + { + path: '/protection', + component: ProtectionController + }, + { + path: '/protect', + component: ProtectionDocumentController + }, + + // Encryption + { + path: '/encrypt', + component: FileEncryptionController + } + ] } ]; @@ -103,54 +103,40 @@ routes.forEach(route => { }; }); -class SettingsView extends Component { - constructor(props) { - super(props) - - this.onoptionclick = this.onoptionclick.bind(this); - } - - onoptionclick(page){ - // f7.views.current.router.navigate(page); - } - - render() { - const show_popover = this.props.usePopover; - - return ( - show_popover ? - this.props.closeOptions('settings')}> - - - - : - this.props.closeOptions('settings')}> - - - - - ) - } -} +const SettingsView = props => { + return ( + !Device.phone ? + props.closeOptions('settings')}> + + + + : + props.closeOptions('settings')}> + + + + + ) +}; export default SettingsView; diff --git a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx index 6314ed3bd2..32c7527022 100644 --- a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx @@ -1,5 +1,5 @@ -import React, {Component, useEffect} from 'react'; -import {Page, Navbar, NavRight, Link, Icon, ListItem, List, Toggle} from 'framework7-react'; +import React from 'react'; +import {Page, Navbar, NavRight, Link, Icon, ListItem, List, Toggle, f7, View, Popup, Popover} from 'framework7-react'; import {Device} from "../../../../../common/mobile/utils/device"; import { observer, inject } from "mobx-react"; import { useTranslation } from 'react-i18next'; @@ -18,14 +18,9 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo const navbar =
    {docTitle}
    - {!props.inPopover && {_t.textDone}} + {Device.phone && {_t.textDone}}
    ; - const onoptionclick = page => { - // if ( props.onOptionClick ) - // props.onOptionClick(page) - }; - const closeModal = () => { if (Device.phone) { f7.sheet.close('.settings-popup', false); @@ -34,20 +29,15 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo } }; - const onOpenCollaboration = () => { + const onOpenOptions = name => { closeModal(); - props.openOptions('coauth'); - } - - const onOpenNavigation = () => { - closeModal(); - props.openOptions('navigation'); + props.openOptions(name); } // set mode const isViewer = appOptions.isViewer; const isMobileView = appOptions.isMobileView; - + let _isEdit = false, _canDownload = false, _canDownloadOrigin = false, @@ -77,94 +67,94 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo } return ( - - {navbar} - - {/*{!props.inPopover &&*/} - {Device.phone && - - - - } - {(_isEdit && canProtect) && - - - - } - { - if(Device.phone) { - onOpenNavigation(); - } else { - onoptionclick.bind(this, "/navigation/")(); - }}}> - + + {navbar} + + {Device.phone && + + - {window.matchMedia("(max-width: 359px)").matches ? - - - - : null} - {Device.sailfish && _isEdit && - {props.onOrthographyCheck()}} className='no-indicator' link="#"> - - - } - {!isViewer && Device.phone && - - - { - closeModal(); - props.onChangeMobileView(); - props.openOptions('snackbar'); - }} /> - - } - {(_isEdit && !isViewer) && - - - - } - {isNotForm && - - - - } - {_canDownload && - - - - } - {_canDownloadOrigin && - - - - } - {_canPrint && - - - - } - - + } + {(_isEdit && canProtect) && + + - {_canHelp && - - - - } - {(_canAbout && isNotForm) && - - - - } - {_canFeedback && - - - - } - - + } + { + if(Device.phone) { + onOpenOptions('navigation'); + } + }}> + + + {window.matchMedia("(max-width: 359px)").matches ? + { + onOpenOptions('coauth'); + }} className='no-indicator'> + + + : null} + {Device.sailfish && _isEdit && + {props.onOrthographyCheck()}} className='no-indicator' link="#"> + + + } + {!isViewer && Device.phone && + + + { + closeModal(); + props.onChangeMobileView(); + props.openOptions('snackbar'); + }} /> + + } + {(_isEdit && !isViewer) && + + + + } + {isNotForm && + + + + } + {_canDownload && + + + + } + {_canDownloadOrigin && + + + + } + {_canPrint && + + + + } + + + + {_canHelp && + + + + } + {(_canAbout && isNotForm) && + + + + } + {_canFeedback && + + + + } + + ) })); -export default SettingsPage; \ No newline at end of file +export default SettingsPage \ No newline at end of file From 5e3146e43fc10e1964154d99bbab9842b3458ef9 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 31 Jul 2023 21:02:08 +0300 Subject: [PATCH 09/22] [DE mobile] Add context instead props --- .../src/controller/settings/Navigation.jsx | 1 - .../src/controller/settings/Settings.jsx | 39 ++-- apps/documenteditor/mobile/src/page/main.jsx | 203 +++++++++--------- .../mobile/src/view/add/Add.jsx | 177 ++------------- .../mobile/src/view/add/AddingPage.jsx | 149 +++++++++++++ .../mobile/src/view/settings/Navigation.jsx | 8 +- .../mobile/src/view/settings/Settings.jsx | 188 ++++++++-------- .../mobile/src/view/settings/SettingsPage.jsx | 31 +-- 8 files changed, 402 insertions(+), 394 deletions(-) create mode 100644 apps/documenteditor/mobile/src/view/add/AddingPage.jsx diff --git a/apps/documenteditor/mobile/src/controller/settings/Navigation.jsx b/apps/documenteditor/mobile/src/controller/settings/Navigation.jsx index 811f6ae8f7..956809985b 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Navigation.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Navigation.jsx @@ -123,7 +123,6 @@ class NavigationController extends Component { onSelectItem={this.onSelectItem} updateNavigation={this.updateNavigation} updateViewerNavigation={this.updateViewerNavigation} - onclosed={this.props.onclosed} /> ); } diff --git a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx index cd152267df..dd2fca9385 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react'; +import React, {createContext, useEffect} from 'react'; import { useTranslation } from 'react-i18next'; import {f7} from 'framework7-react'; import { observer, inject } from "mobx-react"; @@ -6,6 +6,8 @@ import {Device} from '../../../../../common/mobile/utils/device'; import SettingsView from "../../view/settings/Settings"; import {LocalStorage} from "../../../../../common/mobile/utils/LocalStorage.mjs"; +export const SettingsContext = createContext(); + const Settings = props => { const storeDocumentInfo = props.storeDocumentInfo; const { t } = useTranslation(); @@ -155,19 +157,30 @@ const Settings = props => { api.asc_setDocInfo(docInfo); }; - return ( - + // onPrint={onPrint} + // showHelp={showHelp} + // showFeedback={showFeedback} + // onOrthographyCheck={onOrthographyCheck} + // onDownloadOrigin={onDownloadOrigin} + // onChangeMobileView={onChangeMobileView} + // changeTitleHandler={changeTitleHandler} + /> */} + return ( + + + ); }; diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 3fefddf8f4..5498daf9ae 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -1,7 +1,7 @@ -import React, { Component } from 'react'; +import React, { Component, createContext } from 'react'; import { CSSTransition } from 'react-transition-group'; -import { f7, Link, Fab, Icon, FabButtons, FabButton, Page, View, Navbar, Subnavbar } from 'framework7-react'; +import { f7, Fab, Icon, Page, View, Navbar, Subnavbar } from 'framework7-react'; import { observer, inject } from "mobx-react"; import { withTranslation } from 'react-i18next'; import EditOptions from '../view/edit/Edit'; @@ -17,6 +17,8 @@ import { AddLinkController } from '../controller/add/AddLink'; import EditHyperlink from '../controller/edit/EditHyperlink'; import Snackbar from '../components/Snackbar/Snackbar'; +export const MainContext = createContext(); + class MainPage extends Component { constructor(props) { super(props); @@ -156,107 +158,112 @@ class MainPage extends Component { } return ( - - {/* Top Navbar */} - - {!isHideLogo && -
    { - window.open(`${__PUBLISHER_URL__}`, "_blank"); - }}>
    } - - - - -
    + + + {/* Top Navbar */} + + {!isHideLogo && +
    { + window.open(`${__PUBLISHER_URL__}`, "_blank"); + }}> + +
    + } + + + + +
    - {/* Page content */} + {/* Page content */} - - + + - {isShowPlaceholder ? -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    : null - } + {isShowPlaceholder ? +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    : null + } - {/* { - Device.phone ? null : - } */} + {/* { + Device.phone ? null : + } */} - this.handleOptionsViewClosed('snackbar')} - message={isMobileView ? t("Toolbar.textSwitchedMobileView") : t("Toolbar.textSwitchedStandardView")} - /> - - { - !this.state.editOptionsVisible ? null : - - } - { - !this.state.addOptionsVisible ? null : - - } - { - !this.state.addLinkSettingsVisible ? null : - - } - { - !this.state.editLinkSettingsVisible ? null : - - } - { - !this.state.settingsVisible ? null : - - } - { - !this.state.collaborationVisible ? null : - - } - { - !this.state.navigationVisible ? null : - - } - {isFabShow && - - this.turnOffViewerMode()}> - - - - } - {appOptions.isDocReady && } -
    + this.handleOptionsViewClosed('snackbar')} + message={isMobileView ? t("Toolbar.textSwitchedMobileView") : t("Toolbar.textSwitchedStandardView")} + /> + + { + !this.state.editOptionsVisible ? null : + + } + { + !this.state.addOptionsVisible ? null : + + } + { + !this.state.addLinkSettingsVisible ? null : + + } + { + !this.state.editLinkSettingsVisible ? null : + + } + { !this.state.settingsVisible ? null : } + { + !this.state.collaborationVisible ? null : + + } + { !this.state.navigationVisible ? null : } + {isFabShow && + + this.turnOffViewerMode()}> + + + + } + {appOptions.isDocReady && + + } +
    + ) } } diff --git a/apps/documenteditor/mobile/src/view/add/Add.jsx b/apps/documenteditor/mobile/src/view/add/Add.jsx index fd06a58e93..ac15b8d552 100644 --- a/apps/documenteditor/mobile/src/view/add/Add.jsx +++ b/apps/documenteditor/mobile/src/view/add/Add.jsx @@ -15,8 +15,13 @@ import {PageImageLinkSettings} from "../add/AddImage"; import {PageAddNumber, PageAddBreak, PageAddSectionBreak, PageAddFootnote} from "../add/AddOther"; import AddTableContentsController from '../../controller/add/AddTableContents'; import EditHyperlink from '../../controller/edit/EditHyperlink'; +import AddingPage from './AddingPage'; const routes = [ + { + path: '/adding-page/', + component: AddingPage + }, // Image { path: '/add-image-from-url/', @@ -64,182 +69,30 @@ routes.forEach(route => { }; }); -const AddLayoutNavbar = ({ tabs, inPopover, storeTableSettings }) => { - const isAndroid = Device.android; - const { t } = useTranslation(); - const _t = t('Add', {returnObjects: true}); - - const getTableStylesPreviews = () => { - if(!storeTableSettings.arrayStylesDefault.length) { - const api = Common.EditorApi.get(); - setTimeout(() => storeTableSettings.setStyles(api.asc_getTableStylesPreviews(true), 'default'), 1); - } - }; - - return ( - - {tabs.length > 1 ? -
    - {tabs.map((item, index) => - getTableStylesPreviews()} tabLink={"#" + item.id} tabLinkActive={index === 0}> - - )} - {isAndroid && } -
    : - { tabs[0].caption } - } - {!inPopover && } -
    - ) -}; - -const AddLayoutContent = ({ tabs }) => { - return ( - - {tabs.map((item, index) => - - {item.component} - - )} - - ) -}; - -const AddTabs = inject("storeFocusObjects", "storeTableSettings")(observer(({storeFocusObjects, showPanels, storeTableSettings, style, inPopover, onCloseLinkSettings}) => { - const { t } = useTranslation(); - const _t = t('Add', {returnObjects: true}); - const api = Common.EditorApi.get(); - const tabs = []; - const options = storeFocusObjects.settings; - const paragraphObj = storeFocusObjects.paragraphObject; - - let needDisable = false, - canAddTable = true, - canAddImage = true, - paragraphLocked = false, - inFootnote = false, - inControl = false, - controlProps = false, - lockType = false, - controlPlain = false, - contentLocked = false, - richDelLock = false, - richEditLock = false, - plainDelLock = false, - plainEditLock = false; - - if(paragraphObj) { - canAddTable = paragraphObj.get_CanAddTable(); - canAddImage = paragraphObj.get_CanAddImage(); - paragraphLocked = paragraphObj.get_Locked(); - - inFootnote = api.asc_IsCursorInFootnote() || api.asc_IsCursorInEndnote(); - inControl = api.asc_IsContentControl(); - - controlProps = inControl ? api.asc_GetContentControlProperties() : null; - lockType = (inControl && controlProps) ? controlProps.get_Lock() : Asc.c_oAscSdtLockType.Unlocked; - controlPlain = (inControl && controlProps) ? (controlProps.get_ContentControlType() == Asc.c_oAscSdtLevelType.Inline) : false; - contentLocked = lockType == Asc.c_oAscSdtLockType.SdtContentLocked || lockType == Asc.c_oAscSdtLockType.ContentLocked; - - richDelLock = paragraphObj ? !paragraphObj.can_DeleteBlockContentControl() : false; - richEditLock = paragraphObj ? !paragraphObj.can_EditBlockContentControl() : false; - plainDelLock = paragraphObj ? !paragraphObj.can_DeleteInlineContentControl() : false; - plainEditLock = paragraphObj ? !paragraphObj.can_EditInlineContentControl() : false; - } - - if (!showPanels && options.indexOf('text') > -1) { - needDisable = !canAddTable || controlPlain || richEditLock || plainEditLock || richDelLock || plainDelLock; - - if(!needDisable) { - tabs.push({ - caption: _t.textTable, - id: 'add-table', - icon: 'icon-add-table', - component: - }); - } - } - if(!showPanels) { - needDisable = paragraphLocked || controlPlain || contentLocked || inFootnote; - - if(!needDisable) { - tabs.push({ - caption: _t.textShape, - id: 'add-shape', - icon: 'icon-add-shape', - component: - }); - } - } - // if(!showPanels) { - // needDisable = paragraphLocked || paragraphObj && !canAddImage || controlPlain || richDelLock || plainDelLock || contentLocked; - - // if(!needDisable) { - // tabs.push({ - // caption: _t.textImage, - // id: 'add-image', - // icon: 'icon-add-image', - // component: - // }); - // } - // } - - if(!showPanels) { - tabs.push({ - caption: _t.textOther, - id: 'add-other', - icon: 'icon-add-other', - component: - - }); - } - - // if (showPanels && showPanels === 'link') { - // tabs.push({ - // caption: t('Add.textLinkSettings'), - // id: 'add-link', - // component: - // }); - // } - - return ( - - - - - - - ) -})); - class AddView extends Component { constructor(props) { super(props); - this.onoptionclick = this.onoptionclick.bind(this); } + onoptionclick(page){ f7.views.current.router.navigate(page); } + render() { const show_popover = this.props.usePopover; + return ( show_popover ? this.props.onclosed()}> - + + + : this.props.onclosed()}> - + + + ) } @@ -257,11 +110,13 @@ const Add = props => { // component will unmount } }); + const onviewclosed = () => { if ( props.onclosed ) { props.onclosed(); } }; + return }; diff --git a/apps/documenteditor/mobile/src/view/add/AddingPage.jsx b/apps/documenteditor/mobile/src/view/add/AddingPage.jsx new file mode 100644 index 0000000000..d05bca880e --- /dev/null +++ b/apps/documenteditor/mobile/src/view/add/AddingPage.jsx @@ -0,0 +1,149 @@ +import React from 'react'; +import { Page, Navbar, NavRight, NavTitle, Link, Icon, Tabs, Tab } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { observer, inject } from "mobx-react"; +import { Device } from '../../../../../common/mobile/utils/device'; +import { AddTableController } from "../../controller/add/AddTable"; +import AddShapeController from "../../controller/add/AddShape"; +import { AddOtherController } from "../../controller/add/AddOther"; + +const AddLayoutNavbar = ({ tabs, inPopover, storeTableSettings }) => { + const isAndroid = Device.android; + const { t } = useTranslation(); + const _t = t('Add', {returnObjects: true}); + + const getTableStylesPreviews = () => { + if(!storeTableSettings.arrayStylesDefault.length) { + const api = Common.EditorApi.get(); + setTimeout(() => storeTableSettings.setStyles(api.asc_getTableStylesPreviews(true), 'default'), 1); + } + }; + + return ( + + {tabs.length > 1 ? +
    + {tabs.map((item, index) => + getTableStylesPreviews()} tabLink={"#" + item.id} tabLinkActive={index === 0}> + + )} + {isAndroid && } +
    : + { tabs[0].caption } + } + {!inPopover && } +
    + ) +}; + +const AddLayoutContent = ({ tabs }) => { + return ( + + {tabs.map((item, index) => + + {item.component} + + )} + + ) +}; + +const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(({storeFocusObjects, showPanels, storeTableSettings, style, inPopover, onCloseLinkSettings}) => { + const { t } = useTranslation(); + const _t = t('Add', {returnObjects: true}); + const api = Common.EditorApi.get(); + const tabs = []; + const options = storeFocusObjects.settings; + const paragraphObj = storeFocusObjects.paragraphObject; + + let needDisable = false, + canAddTable = true, + canAddImage = true, + paragraphLocked = false, + inFootnote = false, + inControl = false, + controlProps = false, + lockType = false, + controlPlain = false, + contentLocked = false, + richDelLock = false, + richEditLock = false, + plainDelLock = false, + plainEditLock = false; + + if(paragraphObj) { + canAddTable = paragraphObj.get_CanAddTable(); + canAddImage = paragraphObj.get_CanAddImage(); + paragraphLocked = paragraphObj.get_Locked(); + + inFootnote = api.asc_IsCursorInFootnote() || api.asc_IsCursorInEndnote(); + inControl = api.asc_IsContentControl(); + + controlProps = inControl ? api.asc_GetContentControlProperties() : null; + lockType = (inControl && controlProps) ? controlProps.get_Lock() : Asc.c_oAscSdtLockType.Unlocked; + controlPlain = (inControl && controlProps) ? (controlProps.get_ContentControlType() == Asc.c_oAscSdtLevelType.Inline) : false; + contentLocked = lockType == Asc.c_oAscSdtLockType.SdtContentLocked || lockType == Asc.c_oAscSdtLockType.ContentLocked; + + richDelLock = paragraphObj ? !paragraphObj.can_DeleteBlockContentControl() : false; + richEditLock = paragraphObj ? !paragraphObj.can_EditBlockContentControl() : false; + plainDelLock = paragraphObj ? !paragraphObj.can_DeleteInlineContentControl() : false; + plainEditLock = paragraphObj ? !paragraphObj.can_EditInlineContentControl() : false; + } + + if (!showPanels && options.indexOf('text') > -1) { + needDisable = !canAddTable || controlPlain || richEditLock || plainEditLock || richDelLock || plainDelLock; + + if(!needDisable) { + tabs.push({ + caption: _t.textTable, + id: 'add-table', + icon: 'icon-add-table', + component: + }); + } + } + if(!showPanels) { + needDisable = paragraphLocked || controlPlain || contentLocked || inFootnote; + + if(!needDisable) { + tabs.push({ + caption: _t.textShape, + id: 'add-shape', + icon: 'icon-add-shape', + component: + }); + } + } + + if(!showPanels) { + tabs.push({ + caption: _t.textOther, + id: 'add-other', + icon: 'icon-add-other', + component: + + }); + } + + return ( + + + + + ) +})); + + +export default AddingPage; + + diff --git a/apps/documenteditor/mobile/src/view/settings/Navigation.jsx b/apps/documenteditor/mobile/src/view/settings/Navigation.jsx index ab0eebcea4..9d71bcba6c 100644 --- a/apps/documenteditor/mobile/src/view/settings/Navigation.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Navigation.jsx @@ -1,8 +1,9 @@ -import React, { useState, useEffect } from "react"; +import React, { useState, useEffect, useContext } from "react"; import { Device } from '../../../../../common/mobile/utils/device'; -import {f7, View, List, ListItem, Icon, Row, Button, Page, Navbar, NavRight, Segmented, BlockTitle, Link, ListButton, Toggle, Actions, ActionsButton, ActionsGroup, Sheet} from 'framework7-react'; +import {f7, List, ListItem, Icon, Page, Navbar, Sheet} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import { inject, observer } from "mobx-react"; +import { MainContext } from "../../page/main"; const NavigationPopover = inject('storeNavigation')(observer(props => { const { t } = useTranslation(); @@ -46,6 +47,7 @@ const NavigationPopover = inject('storeNavigation')(observer(props => { const NavigationSheet = inject('storeNavigation')(observer(props => { const { t } = useTranslation(); + const mainContext = useContext(MainContext); const api = Common.EditorApi.get(); const storeNavigation = props.storeNavigation; const bookmarks = storeNavigation.bookmarks; @@ -105,7 +107,7 @@ const NavigationSheet = inject('storeNavigation')(observer(props => { }, []); return ( - props.onclosed()} style={{height: `${stateHeight}`, opacity: `${stateOpacity}`}}> + mainContext.closeOptions('navigation')} style={{height: `${stateHeight}`, opacity: `${stateOpacity}`}}>
    diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index a7e11d74e5..26b8669e52 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -1,4 +1,4 @@ -import React, {useMemo} from 'react'; +import React, { useContext } from 'react'; import { View, Popup, Popover } from 'framework7-react'; import { Device } from '../../../../../common/mobile/utils/device'; import DocumentSettingsController from "../../controller/settings/DocumentSettings"; @@ -13,86 +13,84 @@ import SharingSettings from "../../../../../common/mobile/lib/view/SharingSettin import ProtectionDocumentController from '../../controller/settings/DocumentProtection'; import ProtectionController from '../../controller/settings/Protection'; import FileEncryptionController from '../../controller/settings/FileEncryption'; -import SettingsPage from './SettingsPage' +import SettingsPage from './SettingsPage'; +import { MainContext } from '../../page/main'; const routes = [ { - master: true, path: '/settings/', component: SettingsPage, - detailRoutes: [ - { - path: '/document-settings/', - component: DocumentSettingsController, - }, - { - path: '/margins/', - component: DocumentMargins, - }, - { - path: '/document-formats/', - component: DocumentFormats, - }, - { - path: "/document-info/", - component: DocumentInfoController, - }, - { - path: '/application-settings/', - component: ApplicationSettingsController - }, - { - path: '/macros-settings/', - component: MacrosSettings - }, - { - path: '/download/', - component: DownloadController - }, - { - path: '/color-schemes/', - component: DocumentColorSchemes - }, - { - path: '/about/', - component: About - }, - - // Navigation - - { - path: '/navigation', - component: NavigationController - }, - - // Direction - { - path: '/direction/', - component: Direction - }, - - // Sharing Settings - { - path: '/sharing-settings/', - component: SharingSettings - }, - - // Protection - { - path: '/protection', - component: ProtectionController - }, - { - path: '/protect', - component: ProtectionDocumentController - }, - - // Encryption - { - path: '/encrypt', - component: FileEncryptionController - } - ] + }, + { + path: '/document-settings/', + component: DocumentSettingsController, + }, + { + path: '/margins/', + component: DocumentMargins, + }, + { + path: '/document-formats/', + component: DocumentFormats, + }, + { + path: "/document-info/", + component: DocumentInfoController, + }, + { + path: '/application-settings/', + component: ApplicationSettingsController + }, + { + path: '/macros-settings/', + component: MacrosSettings + }, + { + path: '/download/', + component: DownloadController + }, + { + path: '/color-schemes/', + component: DocumentColorSchemes + }, + { + path: '/about/', + component: About + }, + + // Navigation + + { + path: '/navigation', + component: NavigationController + }, + + // Direction + { + path: '/direction/', + component: Direction + }, + + // Sharing Settings + { + path: '/sharing-settings/', + component: SharingSettings + }, + + // Protection + { + path: '/protection', + component: ProtectionController + }, + { + path: '/protect', + component: ProtectionDocumentController + }, + + // Encryption + { + path: '/encrypt', + component: FileEncryptionController } ]; @@ -103,38 +101,20 @@ routes.forEach(route => { }; }); -const SettingsView = props => { +const SettingsView = () => { + const mainContext = useContext(MainContext); + return ( !Device.phone ? - props.closeOptions('settings')}> - - + mainContext.closeOptions('settings')}> + + : - props.closeOptions('settings')}> - - - + mainContext.closeOptions('settings')}> + + + ) }; diff --git a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx index 32c7527022..a999038f2b 100644 --- a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx @@ -1,12 +1,16 @@ -import React from 'react'; -import {Page, Navbar, NavRight, Link, Icon, ListItem, List, Toggle, f7, View, Popup, Popover} from 'framework7-react'; -import {Device} from "../../../../../common/mobile/utils/device"; +import React, { useContext } from 'react'; +import { Page, Navbar, NavRight, Link, Icon, ListItem, List, Toggle, f7 } from 'framework7-react'; +import { Device } from "../../../../../common/mobile/utils/device"; import { observer, inject } from "mobx-react"; import { useTranslation } from 'react-i18next'; +import { SettingsContext } from '../../controller/settings/Settings'; +import { MainContext } from '../../page/main'; const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo")(observer(props => { const { t } = useTranslation(); const _t = t('Settings', {returnObjects: true}); + const settingsContext = useContext(SettingsContext); + const mainContext = useContext(MainContext); const appOptions = props.storeAppOptions; const canProtect = appOptions.canProtect; const storeReview = props.storeReview; @@ -17,7 +21,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo const isNotForm = docExt && docExt !== 'oform'; const navbar = -
    {docTitle}
    +
    {docTitle}
    {Device.phone && {_t.textDone}}
    ; @@ -31,7 +35,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo const onOpenOptions = name => { closeModal(); - props.openOptions(name); + mainContext.openOptions(name); } // set mode @@ -95,7 +99,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo
    : null} {Device.sailfish && _isEdit && - {props.onOrthographyCheck()}} className='no-indicator' link="#"> + {settingsContext.onOrthographyCheck()}} className='no-indicator' link="#"> } @@ -103,9 +107,8 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo { - closeModal(); - props.onChangeMobileView(); - props.openOptions('snackbar'); + settingsContext.onChangeMobileView(); + onOpenOptions('snackbar'); }} /> } @@ -125,12 +128,12 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo } {_canDownloadOrigin && - + } {_canPrint && - + } @@ -138,7 +141,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo {_canHelp && - + } @@ -148,7 +151,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo } {_canFeedback && - + } @@ -157,4 +160,4 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo ) })); -export default SettingsPage \ No newline at end of file +export default SettingsPage; \ No newline at end of file From 8986d7128fa8b3b07405beb9b66b7db3bcbba358 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 2 Aug 2023 14:13:06 +0300 Subject: [PATCH 10/22] =?UTF-8?q?[DE=20mobile]=20=D0=A1hange=20routing=20i?= =?UTF-8?q?n=20add=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/src/controller/add/AddOther.jsx | 4 +- .../src/controller/settings/Settings.jsx | 45 +++------ apps/documenteditor/mobile/src/page/main.jsx | 17 ++-- .../mobile/src/view/add/Add.jsx | 95 +++++++------------ .../mobile/src/view/add/AddOther.jsx | 1 - .../mobile/src/view/add/AddingPage.jsx | 24 +++-- .../mobile/src/view/settings/Settings.jsx | 12 ++- .../mobile/src/view/settings/SettingsPage.jsx | 14 +-- 8 files changed, 80 insertions(+), 132 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/add/AddOther.jsx b/apps/documenteditor/mobile/src/controller/add/AddOther.jsx index 84a2640958..6e4b2436fc 100644 --- a/apps/documenteditor/mobile/src/controller/add/AddOther.jsx +++ b/apps/documenteditor/mobile/src/controller/add/AddOther.jsx @@ -2,7 +2,6 @@ import React, {Component} from 'react'; import { f7 } from 'framework7-react'; import {Device} from '../../../../../common/mobile/utils/device'; import { withTranslation} from 'react-i18next'; - import {AddOther} from '../../view/add/AddOther'; // footnote converting metods @@ -260,8 +259,7 @@ class AddOtherController extends Component { richDelLock={this.props.richDelLock} richEditLock={this.props.richEditLock} plainDelLock={this.props.plainDelLock} - plainEditLock={this.props.plainEditLock} - onCloseLinkSettings={this.props.onCloseLinkSettings} + plainEditLock={this.props.plainEditLock} isNavigate={this.props.isNavigate} /> ) diff --git a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx index dd2fca9385..d946b3f0a9 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx @@ -1,34 +1,22 @@ -import React, {createContext, useEffect} from 'react'; +import React, { createContext } from 'react'; import { useTranslation } from 'react-i18next'; -import {f7} from 'framework7-react'; +import { f7 } from 'framework7-react'; import { observer, inject } from "mobx-react"; -import {Device} from '../../../../../common/mobile/utils/device'; +import { Device } from '../../../../../common/mobile/utils/device'; import SettingsView from "../../view/settings/Settings"; -import {LocalStorage} from "../../../../../common/mobile/utils/LocalStorage.mjs"; +import { LocalStorage } from "../../../../../common/mobile/utils/LocalStorage.mjs"; export const SettingsContext = createContext(); -const Settings = props => { +const SettingsController = props => { const storeDocumentInfo = props.storeDocumentInfo; const { t } = useTranslation(); - useEffect(() => { - if ( Device.phone ) { - f7.popup.open('.settings-popup'); - } else { - f7.popover.open('#settings-popover', '#btn-settings'); - } - - return () => { - // component will unmount - } - }); - const closeModal = () => { - if (Device.phone) { - f7.sheet.close('.settings-popup'); + if(Device.phone) { + f7.sheet.close('.settings-popup', false); } else { - f7.popover.close('#settings-popover'); + f7.popover.close('#settings-popover', false); } }; @@ -157,18 +145,6 @@ const Settings = props => { api.asc_setDocInfo(docInfo); }; - {/* */} return ( { onOrthographyCheck, onDownloadOrigin, onChangeMobileView, - changeTitleHandler + changeTitleHandler, + closeModal }}> ); }; -export default inject("storeAppOptions", "storeDocumentInfo")(observer(Settings)); \ No newline at end of file +export default inject("storeAppOptions", "storeDocumentInfo")(observer(SettingsController)); \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 5498daf9ae..37f4c66027 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -1,4 +1,3 @@ - import React, { Component, createContext } from 'react'; import { CSSTransition } from 'react-transition-group'; import { f7, Fab, Icon, Page, View, Navbar, Subnavbar } from 'framework7-react'; @@ -6,7 +5,7 @@ import { observer, inject } from "mobx-react"; import { withTranslation } from 'react-i18next'; import EditOptions from '../view/edit/Edit'; import AddOptions from '../view/add/Add'; -import Settings from '../controller/settings/Settings'; +import SettingsController from '../controller/settings/Settings'; import { CollaborationDocument } from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx' import { Device } from '../../../../common/mobile/utils/device' import { Search, SearchSettings } from '../controller/Search'; @@ -161,7 +160,8 @@ class MainPage extends Component { {/* Top Navbar */} @@ -223,15 +223,12 @@ class MainPage extends Component { closeCallback={() => this.handleOptionsViewClosed('snackbar')} message={isMobileView ? t("Toolbar.textSwitchedMobileView") : t("Toolbar.textSwitchedStandardView")} /> - + { !this.state.editOptionsVisible ? null : } - { - !this.state.addOptionsVisible ? null : - - } + {!this.state.addOptionsVisible ? null : } { !this.state.addLinkSettingsVisible ? null : @@ -240,12 +237,12 @@ class MainPage extends Component { !this.state.editLinkSettingsVisible ? null : } - { !this.state.settingsVisible ? null : } + {!this.state.settingsVisible ? null : } { !this.state.collaborationVisible ? null : } - { !this.state.navigationVisible ? null : } + {!this.state.navigationVisible ? null : } {isFabShow && { }; }); -class AddView extends Component { - constructor(props) { - super(props); - this.onoptionclick = this.onoptionclick.bind(this); - } +const AddView = () => { + const mainContext = useContext(MainContext); - onoptionclick(page){ - f7.views.current.router.navigate(page); - } + useEffect(() => { + if(Device.phone) { + f7.popup.open('.add-popup'); + } else { + f7.popover.open('#add-popover', '#btn-add'); + } + }, []); - render() { - const show_popover = this.props.usePopover; - - return ( - show_popover ? - this.props.onclosed()}> - - - - : - this.props.onclosed()}> - - - - - ) - } + return ( + !Device.phone ? + mainContext.closeOptions('add')}> + + + + : + mainContext.closeOptions('add')}> + + + + + ) } -const Add = props => { - useEffect(() => { - if ( Device.phone ) - f7.popup.open('.add-popup'); - else f7.popover.open('#add-popover', '#btn-add'); - - f7.tab.show('#add-other', false); - - return () => { - // component will unmount - } - }); - - const onviewclosed = () => { - if ( props.onclosed ) { - props.onclosed(); - } - }; - - return -}; - -export default Add; \ No newline at end of file +export default AddView; \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/view/add/AddOther.jsx b/apps/documenteditor/mobile/src/view/add/AddOther.jsx index f005a0202d..37a2b393bf 100644 --- a/apps/documenteditor/mobile/src/view/add/AddOther.jsx +++ b/apps/documenteditor/mobile/src/view/add/AddOther.jsx @@ -193,7 +193,6 @@ const AddOther = props => { {(isText && !disabledAddLink) && diff --git a/apps/documenteditor/mobile/src/view/add/AddingPage.jsx b/apps/documenteditor/mobile/src/view/add/AddingPage.jsx index d05bca880e..09151c44ef 100644 --- a/apps/documenteditor/mobile/src/view/add/AddingPage.jsx +++ b/apps/documenteditor/mobile/src/view/add/AddingPage.jsx @@ -1,13 +1,14 @@ -import React from 'react'; -import { Page, Navbar, NavRight, NavTitle, Link, Icon, Tabs, Tab } from 'framework7-react'; +import React, { useContext, useEffect } from 'react'; +import { f7, Page, Navbar, NavRight, NavTitle, Link, Icon, Tabs, Tab } from 'framework7-react'; import { useTranslation } from 'react-i18next'; import { observer, inject } from "mobx-react"; import { Device } from '../../../../../common/mobile/utils/device'; import { AddTableController } from "../../controller/add/AddTable"; import AddShapeController from "../../controller/add/AddShape"; import { AddOtherController } from "../../controller/add/AddOther"; +import { MainContext } from '../../page/main'; -const AddLayoutNavbar = ({ tabs, inPopover, storeTableSettings }) => { +const AddLayoutNavbar = ({ tabs, storeTableSettings }) => { const isAndroid = Device.android; const { t } = useTranslation(); const _t = t('Add', {returnObjects: true}); @@ -31,7 +32,7 @@ const AddLayoutNavbar = ({ tabs, inPopover, storeTableSettings }) => {
: { tabs[0].caption } } - {!inPopover && } + {Device.phone && } ) }; @@ -48,7 +49,11 @@ const AddLayoutContent = ({ tabs }) => { ) }; -const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(({storeFocusObjects, showPanels, storeTableSettings, style, inPopover, onCloseLinkSettings}) => { +const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(props => { + const mainContext = useContext(MainContext); + const showPanels = mainContext.showPanels; + const storeFocusObjects = props.storeFocusObjects; + const storeTableSettings = props.storeTableSettings; const { t } = useTranslation(); const _t = t('Add', {returnObjects: true}); const api = Common.EditorApi.get(); @@ -56,6 +61,10 @@ const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(({ const options = storeFocusObjects.settings; const paragraphObj = storeFocusObjects.paragraphObject; + useEffect(() => { + f7.tab.show('#add-other', false); + }, []); + let needDisable = false, canAddTable = true, canAddImage = true, @@ -129,15 +138,14 @@ const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(({ richDelLock={richDelLock} richEditLock={richEditLock} plainDelLock={plainDelLock} - plainEditLock={plainEditLock} - onCloseLinkSettings={onCloseLinkSettings} + plainEditLock={plainEditLock} /> }); } return ( - + ) diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index 26b8669e52..5327c4244f 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -1,5 +1,5 @@ -import React, { useContext } from 'react'; -import { View, Popup, Popover } from 'framework7-react'; +import React, { useContext, useEffect } from 'react'; +import { f7, View, Popup, Popover } from 'framework7-react'; import { Device } from '../../../../../common/mobile/utils/device'; import DocumentSettingsController from "../../controller/settings/DocumentSettings"; import DocumentInfoController from "../../controller/settings/DocumentInfo"; @@ -104,6 +104,14 @@ routes.forEach(route => { const SettingsView = () => { const mainContext = useContext(MainContext); + useEffect(() => { + if(Device.phone) { + f7.popup.open('.settings-popup'); + } else { + f7.popover.open('#settings-popover', '#btn-settings'); + } + }, []); + return ( !Device.phone ? mainContext.closeOptions('settings')}> diff --git a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx index a999038f2b..352570ef2e 100644 --- a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx @@ -1,5 +1,5 @@ import React, { useContext } from 'react'; -import { Page, Navbar, NavRight, Link, Icon, ListItem, List, Toggle, f7 } from 'framework7-react'; +import { Page, Navbar, NavRight, Link, Icon, ListItem, List, Toggle } from 'framework7-react'; import { Device } from "../../../../../common/mobile/utils/device"; import { observer, inject } from "mobx-react"; import { useTranslation } from 'react-i18next'; @@ -25,16 +25,8 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo {Device.phone && {_t.textDone}} ; - const closeModal = () => { - if (Device.phone) { - f7.sheet.close('.settings-popup', false); - } else { - f7.popover.close('#settings-popover', false); - } - }; - const onOpenOptions = name => { - closeModal(); + settingsContext.closeModal(); mainContext.openOptions(name); } @@ -75,7 +67,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo {navbar} {Device.phone && - + } From 2823c439a88bf92443c340c4131b2aef1760205f Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 2 Aug 2023 15:15:43 +0300 Subject: [PATCH 11/22] [common] Change routing in collaboration --- .../mobile/lib/pages/CollaborationPage.jsx | 54 ++++++ apps/common/mobile/lib/pages/UsersPage.jsx | 36 ++++ .../lib/view/collaboration/Collaboration.jsx | 158 ++++-------------- apps/documenteditor/mobile/src/page/main.jsx | 7 +- 4 files changed, 123 insertions(+), 132 deletions(-) create mode 100644 apps/common/mobile/lib/pages/CollaborationPage.jsx create mode 100644 apps/common/mobile/lib/pages/UsersPage.jsx diff --git a/apps/common/mobile/lib/pages/CollaborationPage.jsx b/apps/common/mobile/lib/pages/CollaborationPage.jsx new file mode 100644 index 0000000000..99ad36ee2c --- /dev/null +++ b/apps/common/mobile/lib/pages/CollaborationPage.jsx @@ -0,0 +1,54 @@ +import React from 'react'; +import { observer, inject } from "mobx-react"; +import { List, ListItem, Navbar, NavRight, Page, Icon, Link } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { Device } from "../../utils/device"; + +const CollaborationPage = inject('storeAppOptions', 'users', 'storeDocumentInfo')(observer(props => { + const { t } = useTranslation(); + const _t = t('Common.Collaboration', {returnObjects: true}); + const appOptions = props.storeAppOptions; + const documentInfo = props.storeDocumentInfo; + const dataDoc = documentInfo && documentInfo.dataDoc; + const fileType = dataDoc && dataDoc.fileType; + const sharingSettingsUrl = appOptions.sharingSettingsUrl; + const isViewer = appOptions.isViewer; + + return ( + + + {Device.phone && + + + + + + } + + + {(sharingSettingsUrl && fileType !== 'oform') && + + + + } + {props.users.editUsers.length > 0 && + + + + } + {appOptions.canViewComments && + + + + } + {(window.editorType === 'de' && (appOptions.canReview || appOptions.canViewReview) && !isViewer) && + + + + } + + + ) +})); + +export default CollaborationPage; \ No newline at end of file diff --git a/apps/common/mobile/lib/pages/UsersPage.jsx b/apps/common/mobile/lib/pages/UsersPage.jsx new file mode 100644 index 0000000000..87e9fd9192 --- /dev/null +++ b/apps/common/mobile/lib/pages/UsersPage.jsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { observer, inject } from "mobx-react"; +import { List, ListItem, Navbar, NavRight, Page, Icon, Link } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { Device } from "../../utils/device"; + +const UsersPage = inject("users")(observer(props => { + const { t } = useTranslation(); + const _t = t('Common.Collaboration', {returnObjects: true}); + const storeUsers = props.users; + + return ( + + + {Device.phone && + + + + + + } + + + {storeUsers.editUsers.map((user, i) => ( + 1 ? ` (${user.count})` : '')} key={i}> +
+ {user.initials} +
+
+ ))} +
+
+ ) +})); + +export default UsersPage; \ No newline at end of file diff --git a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx index 47504c373a..1bb4e0d0ce 100644 --- a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx @@ -1,46 +1,22 @@ -import React, { Component, useEffect } from 'react'; -import { observer, inject } from "mobx-react"; -import { Popover, List, ListItem, Navbar, NavRight, Sheet, BlockTitle, Page, View, Icon, Link, f7 } from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {Device} from "../../../utils/device"; -import {ReviewController, ReviewChangeController} from "../../controller/collaboration/Review"; -import {PageDisplayMode} from "./Review"; -import {ViewCommentsController, ViewCommentsSheetsController} from "../../controller/collaboration/Comments"; +import React, { useContext, useEffect } from 'react'; +import { Popover, Sheet, f7, View } from 'framework7-react'; +import { Device } from "../../../utils/device"; +import { ReviewController, ReviewChangeController } from "../../controller/collaboration/Review"; +import { PageDisplayMode } from "./Review"; +import { ViewCommentsController, ViewCommentsSheetsController } from "../../controller/collaboration/Comments"; import SharingSettingsController from "../../controller/SharingSettings"; - -const PageUsers = inject("users")(observer(props => { - const { t } = useTranslation(); - const _t = t('Common.Collaboration', {returnObjects: true}); - const storeUsers = props.users; - - return ( - - - {Device.phone && - - - - - - } - - - {storeUsers.editUsers.map((user, i) => ( - 1 ? ` (${user.count})` : '')} key={i}> -
- {user.initials} -
-
- ))} -
-
- ) -})); +import CollaborationPage from '../../pages/CollaborationPage'; +import { MainContext } from '../../../../../documenteditor/mobile/src/page/main'; +import UsersPage from '../../pages/UsersPage'; const routes = [ + { + path: '/collaboration-page/', + component: CollaborationPage + }, { path: '/users/', - component: PageUsers + component: UsersPage }, { path: '/review/', @@ -94,102 +70,30 @@ routes.forEach(route => { }; }); -const PageCollaboration = inject('storeAppOptions', 'users')(observer(props => { - const { t } = useTranslation(); - const _t = t('Common.Collaboration', {returnObjects: true}); - const appOptions = props.storeAppOptions; - const documentInfo = props.documentInfo; - const dataDoc = documentInfo && documentInfo.dataDoc; - const fileType = dataDoc && dataDoc.fileType; - const sharingSettingsUrl = appOptions.sharingSettingsUrl; - const isViewer = appOptions.isViewer; +const CollaborationView = () => { + const mainContext = useContext(MainContext); - return ( - - - - {Device.phone && - - - - - - } - - - {(sharingSettingsUrl && fileType !== 'oform') && - - - - } - {props.users.editUsers.length > 0 && - - - - } - {appOptions.canViewComments && - - - - } - {(window.editorType === 'de' && (appOptions.canReview || appOptions.canViewReview) && !isViewer) && - - - - } - - - - ) -})); - -class CollaborationView extends Component { - constructor(props) { - super(props); - - this.onoptionclick = this.onoptionclick.bind(this); - } - onoptionclick(page){ - f7.views.current.router.navigate(page); - } - - render() { - const show_popover = this.props.usePopover; - return ( - show_popover ? - this.props.onclosed()} closeByOutsideClick={false}> - - : - this.props.onclosed()}> - - - ) - } -} - -const Collaboration = props => { useEffect(() => { - if ( Device.phone ) { + if(Device.phone) { f7.sheet.open('.coauth__sheet'); } else { f7.popover.open('#coauth-popover', '#btn-coauth'); } - - return () => { - // component will unmount - } - }); - - const onviewclosed = () => { - if ( props.onclosed ) { - props.onclosed(); - } - }; + }, []); return ( - + !Device.phone ? + mainContext.closeOptions('coauth')} closeByOutsideClick={false}> + + + + : + mainContext.closeOptions('coauth')}> + + + + ) -}; +} -const CollaborationDocument = inject('storeDocumentInfo')(observer(Collaboration)); -export {Collaboration, CollaborationDocument}; +export default CollaborationView; diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 37f4c66027..76e54e01ef 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next'; import EditOptions from '../view/edit/Edit'; import AddOptions from '../view/add/Add'; import SettingsController from '../controller/settings/Settings'; -import { CollaborationDocument } from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx' +import CollaborationView from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx' import { Device } from '../../../../common/mobile/utils/device' import { Search, SearchSettings } from '../controller/Search'; import ContextMenu from '../controller/ContextMenu'; @@ -238,10 +238,7 @@ class MainPage extends Component { } {!this.state.settingsVisible ? null : } - { - !this.state.collaborationVisible ? null : - - } + {!this.state.collaborationVisible ? null : } {!this.state.navigationVisible ? null : } {isFabShow && Date: Fri, 4 Aug 2023 20:52:25 +0300 Subject: [PATCH 12/22] [DE mobile] Add editing page and saving active tab --- .../resources/less/common-material.less | 7 +- .../mobile/src/controller/add/AddLink.jsx | 4 +- apps/documenteditor/mobile/src/page/main.jsx | 13 +- .../mobile/src/view/edit/Edit.jsx | 232 +++--------------- .../mobile/src/view/edit/EditingPage.jsx | 156 ++++++++++++ 5 files changed, 201 insertions(+), 211 deletions(-) create mode 100644 apps/documenteditor/mobile/src/view/edit/EditingPage.jsx diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 83862bd762..2570644484 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -277,8 +277,7 @@ .item-input, .item-link { .item-inner { - // display: block; - padding-right: 0; + display: block; .item-title, .item-label { width: 100%; @@ -294,10 +293,6 @@ .item-input:not(.item-input-outline) .item-content::before, .item-input:not(.item-input-outline).item-content::before { background: transparent; } - - .item-input .item-content, .item-input.item-content { - padding-left: 0; - } } .buttons { diff --git a/apps/documenteditor/mobile/src/controller/add/AddLink.jsx b/apps/documenteditor/mobile/src/controller/add/AddLink.jsx index 24991e0867..960897fbeb 100644 --- a/apps/documenteditor/mobile/src/controller/add/AddLink.jsx +++ b/apps/documenteditor/mobile/src/controller/add/AddLink.jsx @@ -81,11 +81,11 @@ class AddLinkController extends Component { return ( !this.props.isNavigate ? Device.phone ? - this.props.onClosed('add-link')}> + this.props.closeOptions('add-link')}> : - this.props.onClosed('add-link')}> + this.props.closeOptions('add-link')}> diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 76e54e01ef..1076f75c5f 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -15,6 +15,7 @@ import NavigationController from '../controller/settings/Navigation'; import { AddLinkController } from '../controller/add/AddLink'; import EditHyperlink from '../controller/edit/EditHyperlink'; import Snackbar from '../components/Snackbar/Snackbar'; +import EditView from '../view/edit/Edit'; export const MainContext = createContext(); @@ -224,14 +225,12 @@ class MainPage extends Component { message={isMobileView ? t("Toolbar.textSwitchedMobileView") : t("Toolbar.textSwitchedStandardView")} /> - { - !this.state.editOptionsVisible ? null : - - } + {!this.state.editOptionsVisible ? null : } {!this.state.addOptionsVisible ? null : } - { - !this.state.addLinkSettingsVisible ? null : - + {!this.state.addLinkSettingsVisible ? null : + } { !this.state.editLinkSettingsVisible ? null : diff --git a/apps/documenteditor/mobile/src/view/edit/Edit.jsx b/apps/documenteditor/mobile/src/view/edit/Edit.jsx index 863aa20a77..b865f3faf4 100644 --- a/apps/documenteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/documenteditor/mobile/src/view/edit/Edit.jsx @@ -1,29 +1,21 @@ -import React, {useState, useEffect} from 'react'; -import {observer, inject} from "mobx-react"; -import { Popover, Sheet, View, Page, Navbar, NavRight, NavLeft, NavTitle, Tabs, Tab, Link } from 'framework7-react'; -import { f7 } from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {Device} from '../../../../../common/mobile/utils/device'; - -import EditTextController from "../../controller/edit/EditText"; -import EditParagraphController from "../../controller/edit/EditParagraph"; -import EditShapeController from "../../controller/edit/EditShape"; -import EditImageController from "../../controller/edit/EditImage"; -import EditTableController from "../../controller/edit/EditTable"; -import EditChartController from "../../controller/edit/EditChart"; -import EditHyperlinkController from "../../controller/edit/EditHyperlink"; -import EditHeaderController from "../../controller/edit/EditHeader"; -import EditTableContentsController from "../../controller/edit/EditTableContents"; - -import {PageTextFonts, PageTextAddFormatting, PageTextBulletsAndNumbers, PageTextLineSpacing, PageTextFontColor, PageTextCustomFontColor, PageTextHighlightColor} from "./EditText"; -import {ParagraphAdvSettings, PageParagraphBackColor, PageParagraphCustomColor, PageParagraphStyle, PageCreateTextStyle, PageChangeNextParagraphStyle} from "./EditParagraph"; -import {PageShapeStyleNoFill, PageShapeStyle, PageShapeCustomFillColor, PageShapeBorderColor, PageShapeCustomBorderColor, PageWrap, PageReorder, PageReplace} from "./EditShape"; -import {PageImageReorder, PageImageReplace, PageImageWrap, PageLinkSettings, PageWrappingStyle} from "./EditImage"; -import {PageTableOptions, PageTableWrap, PageTableStyle, PageTableStyleOptions, PageTableCustomFillColor, PageTableBorderColor, PageTableCustomBorderColor} from "./EditTable"; -import {PageChartDesign, PageChartDesignType, PageChartDesignStyle, PageChartDesignFill, PageChartDesignBorder, PageChartCustomFillColor, PageChartBorderColor, PageChartCustomBorderColor, PageChartWrap, PageChartReorder} from "./EditChart"; +import React, { useContext, useEffect } from 'react'; +import { Popover, Sheet, View, f7 } from 'framework7-react'; +import { Device } from '../../../../../common/mobile/utils/device'; +import { PageTextFonts, PageTextAddFormatting, PageTextBulletsAndNumbers, PageTextLineSpacing, PageTextFontColor, PageTextCustomFontColor, PageTextHighlightColor } from "./EditText"; +import { ParagraphAdvSettings, PageParagraphBackColor, PageParagraphCustomColor, PageParagraphStyle, PageCreateTextStyle, PageChangeNextParagraphStyle } from "./EditParagraph"; +import { PageShapeStyleNoFill, PageShapeStyle, PageShapeCustomFillColor, PageShapeBorderColor, PageShapeCustomBorderColor, PageWrap, PageReorder, PageReplace } from "./EditShape"; +import { PageImageReorder, PageImageReplace, PageImageWrap, PageLinkSettings, PageWrappingStyle } from "./EditImage"; +import { PageTableOptions, PageTableWrap, PageTableStyle, PageTableStyleOptions, PageTableCustomFillColor, PageTableBorderColor, PageTableCustomBorderColor } from "./EditTable"; +import { PageChartDesign, PageChartDesignType, PageChartDesignStyle, PageChartDesignFill, PageChartDesignBorder, PageChartCustomFillColor, PageChartBorderColor, PageChartCustomBorderColor, PageChartWrap, PageChartReorder } from "./EditChart"; import { PageEditLeaderTableContents, PageEditStylesTableContents, PageEditStructureTableContents } from './EditTableContents'; +import EditingPage from './EditingPage'; +import { MainContext } from '../../page/main'; const routes = [ + { + path: '/editing-page/', + component: EditingPage + }, //Edit text { path: '/edit-text-fonts/', @@ -235,182 +227,30 @@ routes.forEach(route => { }; }); -const EmptyEditLayout = () => { - const { t } = useTranslation(); - const _t = t('Edit', {returnObjects: true}); +const EditView = () => { + const mainContext = useContext(MainContext); + + useEffect(() => { + if(Device.phone) { + f7.sheet.open('#edit-sheet'); + } else { + f7.popover.open('#edit-popover', '#btn-edit'); + } + }, []); + return ( - -
-
-

{_t.textSelectObjectToEdit}

-
-
-
- ) -}; - -const EditLayoutNavbar = ({ editors, inPopover }) => { - const isAndroid = Device.android; - const { t } = useTranslation(); - const _t = t('Edit', {returnObjects: true}); - return ( - - { - editors.length > 1 ? -
- {editors.map((item, index) => {item.caption})} - {isAndroid && } -
: - { editors[0].caption } - } - { !inPopover && } -
- ) -}; - -const EditLayoutContent = ({ editors }) => { - if (editors.length > 1) { - return ( - - {editors.map((item, index) => - - {item.component} - - )} - - ) - } else { - return ( - - {editors[0].component} - - ) - } -}; - -const EditTabs = props => { - const { t } = useTranslation(); - const _t = t('Edit', {returnObjects: true}); - const api = Common.EditorApi.get(); - const inToc = api.asc_GetTableOfContentsPr(true); - - const settings = props.storeFocusObjects.settings; - const headerType = props.storeFocusObjects.headerType; - let editors = []; - - if (settings.length < 1) { - editors.push({ - caption: _t.textSettings, - component: - }); - } else { - if(inToc) { - editors.push({ - caption: _t.textTableOfCont, - id: 'edit-table-contents', - component: - }) - } - if (settings.indexOf('image') > -1) { - editors.push({ - caption: _t.textImage, - id: 'edit-image', - component: - }) - } - if (settings.indexOf('shape') > -1) { - editors.push({ - caption: _t.textShape, - id: 'edit-shape', - component: - }) - } - if (settings.indexOf('chart') > -1) { - editors.push({ - caption: _t.textChart, - id: 'edit-chart', - component: - }) - } - if (settings.indexOf('table') > -1) { - editors.push({ - caption: _t.textTable, - id: 'edit-table', - component: - }) - } - if (settings.indexOf('header') > -1) { - editors.push({ - caption: headerType === 2 ? _t.textFooter : _t.textHeader, - id: 'edit-header', - component: - }) - } - if (settings.indexOf('text') > -1) { - editors.push({ - caption: _t.textText, - id: 'edit-text', - component: - }) - } - if (settings.indexOf('paragraph') > -1) { - editors.push({ - caption: _t.textParagraph, - id: 'edit-paragraph', - component: - }) - } - } - - return ( - - - - - - - - ) -}; - -const EditTabsContainer = inject("storeFocusObjects")(observer(EditTabs)); - -const EditView = props => { - const onOptionClick = (page) => { - $f7.views.current.router.navigate(page); - }; - const show_popover = props.usePopover; - return ( - show_popover ? - props.onClosed()}> - + !Device.phone ? + mainContext.closeOptions('edit')}> + + + : - props.onClosed()}> - + mainContext.closeOptions('edit')}> + + + ) }; -const EditOptions = props => { - useEffect(() => { - if ( Device.phone ) - f7.sheet.open('#edit-sheet'); - else f7.popover.open('#edit-popover', '#btn-edit'); - - return () => { - // component will unmount - } - }); - - const onviewclosed = () => { - if ( props.onclosed ) { - props.onclosed(); - } - }; - - return ( - - ) -}; - -export default EditOptions; +export default EditView; diff --git a/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx b/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx new file mode 100644 index 0000000000..14f904f0b6 --- /dev/null +++ b/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx @@ -0,0 +1,156 @@ +import React, { useState, useEffect } from 'react'; +import { observer, inject } from "mobx-react"; +import { Page, Navbar, NavRight, NavTitle, Tabs, Tab, Link } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { Device } from '../../../../../common/mobile/utils/device'; +import EditTextController from "../../controller/edit/EditText"; +import EditParagraphController from "../../controller/edit/EditParagraph"; +import EditShapeController from "../../controller/edit/EditShape"; +import EditImageController from "../../controller/edit/EditImage"; +import EditTableController from "../../controller/edit/EditTable"; +import EditChartController from "../../controller/edit/EditChart"; +import EditHeaderController from "../../controller/edit/EditHeader"; +import EditTableContentsController from "../../controller/edit/EditTableContents"; + +const EmptyEditLayout = () => { + const { t } = useTranslation(); + const _t = t('Edit', {returnObjects: true}); + + return ( + +
+
+

{_t.textSelectObjectToEdit}

+
+
+
+ ) +}; + +const EditLayoutNavbar = ({ editors, idActiveTab, setIdActiveTab }) => { + const isAndroid = Device.android; + const { t } = useTranslation(); + const _t = t('Edit', {returnObjects: true}); + + useEffect(() => { + localStorage.setItem('de-mobile-edit-active-tab', idActiveTab); + }, [idActiveTab]); + + return ( + + {editors.length > 1 ? +
+ {editors.map((item, _) => setIdActiveTab(item.id)} tabLinkActive={item.id === idActiveTab}>{item.caption})} + {isAndroid && } +
: + {editors[0].caption} + } + {Device.phone && } +
+ ) +}; + +const EditLayoutContent = ({ editors, idActiveTab }) => { + if (editors.length > 1) { + return ( + + {editors.map((item, _) => + + {item.component} + + )} + + ) + } else { + return ( + + {editors[0].component} + + ) + } +}; + +const EditingPage = inject('storeFocusObjects')(observer(props => { + const { t } = useTranslation(); + const _t = t('Edit', {returnObjects: true}); + const api = Common.EditorApi.get(); + const inToc = api.asc_GetTableOfContentsPr(true); + const settings = props.storeFocusObjects.settings; + const headerType = props.storeFocusObjects.headerType; + const savedIdTab = localStorage.getItem('de-mobile-edit-active-tab'); + const [idActiveTab, setIdActiveTab] = useState(savedIdTab || 'edit-text'); + let editors = []; + + if (settings.length < 1) { + editors.push({ + caption: _t.textSettings, + component: + }); + } else { + if(inToc) { + editors.push({ + caption: _t.textTableOfCont, + id: 'edit-table-contents', + component: + }) + } + if (settings.indexOf('image') > -1) { + editors.push({ + caption: _t.textImage, + id: 'edit-image', + component: + }) + } + if (settings.indexOf('shape') > -1) { + editors.push({ + caption: _t.textShape, + id: 'edit-shape', + component: + }) + } + if (settings.indexOf('chart') > -1) { + editors.push({ + caption: _t.textChart, + id: 'edit-chart', + component: + }) + } + if (settings.indexOf('table') > -1) { + editors.push({ + caption: _t.textTable, + id: 'edit-table', + component: + }) + } + if (settings.indexOf('header') > -1) { + editors.push({ + caption: headerType === 2 ? _t.textFooter : _t.textHeader, + id: 'edit-header', + component: + }) + } + if (settings.indexOf('text') > -1) { + editors.push({ + caption: _t.textText, + id: 'edit-text', + component: + }) + } + if (settings.indexOf('paragraph') > -1) { + editors.push({ + caption: _t.textParagraph, + id: 'edit-paragraph', + component: + }) + } + } + + return ( + + + + + ) +})); + +export default EditingPage; \ No newline at end of file From 738fd83a2c6901fb7ade93c54a29fa940cfb8496 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Sun, 6 Aug 2023 16:56:27 +0300 Subject: [PATCH 13/22] [DE mobile] Add saving editing and settings page --- apps/documenteditor/mobile/src/page/main.jsx | 1 - .../mobile/src/view/edit/Edit.jsx | 3 ++- .../mobile/src/view/edit/EditingPage.jsx | 20 +++++++------------ .../mobile/src/view/settings/Settings.jsx | 1 + 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 1076f75c5f..adc9a08f30 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -3,7 +3,6 @@ import { CSSTransition } from 'react-transition-group'; import { f7, Fab, Icon, Page, View, Navbar, Subnavbar } from 'framework7-react'; import { observer, inject } from "mobx-react"; import { withTranslation } from 'react-i18next'; -import EditOptions from '../view/edit/Edit'; import AddOptions from '../view/add/Add'; import SettingsController from '../controller/settings/Settings'; import CollaborationView from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx' diff --git a/apps/documenteditor/mobile/src/view/edit/Edit.jsx b/apps/documenteditor/mobile/src/view/edit/Edit.jsx index b865f3faf4..206e268f48 100644 --- a/apps/documenteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/documenteditor/mobile/src/view/edit/Edit.jsx @@ -14,7 +14,8 @@ import { MainContext } from '../../page/main'; const routes = [ { path: '/editing-page/', - component: EditingPage + component: EditingPage, + keepAlive: true }, //Edit text { diff --git a/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx b/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx index 14f904f0b6..80350c643f 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx @@ -27,20 +27,16 @@ const EmptyEditLayout = () => { ) }; -const EditLayoutNavbar = ({ editors, idActiveTab, setIdActiveTab }) => { +const EditLayoutNavbar = ({ editors }) => { const isAndroid = Device.android; const { t } = useTranslation(); const _t = t('Edit', {returnObjects: true}); - useEffect(() => { - localStorage.setItem('de-mobile-edit-active-tab', idActiveTab); - }, [idActiveTab]); - return ( {editors.length > 1 ?
- {editors.map((item, _) => setIdActiveTab(item.id)} tabLinkActive={item.id === idActiveTab}>{item.caption})} + {editors.map((item, index) => {item.caption})} {isAndroid && }
: {editors[0].caption} @@ -50,12 +46,12 @@ const EditLayoutNavbar = ({ editors, idActiveTab, setIdActiveTab }) => { ) }; -const EditLayoutContent = ({ editors, idActiveTab }) => { +const EditLayoutContent = ({ editors }) => { if (editors.length > 1) { return ( - {editors.map((item, _) => - + {editors.map((item, index) => + {item.component} )} @@ -77,8 +73,6 @@ const EditingPage = inject('storeFocusObjects')(observer(props => { const inToc = api.asc_GetTableOfContentsPr(true); const settings = props.storeFocusObjects.settings; const headerType = props.storeFocusObjects.headerType; - const savedIdTab = localStorage.getItem('de-mobile-edit-active-tab'); - const [idActiveTab, setIdActiveTab] = useState(savedIdTab || 'edit-text'); let editors = []; if (settings.length < 1) { @@ -147,8 +141,8 @@ const EditingPage = inject('storeFocusObjects')(observer(props => { return ( - - + + ) })); diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index 5327c4244f..e1a608e9d1 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -20,6 +20,7 @@ const routes = [ { path: '/settings/', component: SettingsPage, + keepAlive: true, }, { path: '/document-settings/', From 4d70957f974c4bcbe9e67a99391a7cc2b957c3dc Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 7 Aug 2023 18:20:35 +0300 Subject: [PATCH 14/22] [common] Correct collaboration --- .../lib/view/collaboration/Collaboration.jsx | 14 ++++++-------- apps/documenteditor/mobile/src/page/main.jsx | 7 +++++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx index 1bb4e0d0ce..5ccab93a53 100644 --- a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect } from 'react'; +import React, { useEffect } from 'react'; import { Popover, Sheet, f7, View } from 'framework7-react'; import { Device } from "../../../utils/device"; import { ReviewController, ReviewChangeController } from "../../controller/collaboration/Review"; @@ -6,13 +6,13 @@ import { PageDisplayMode } from "./Review"; import { ViewCommentsController, ViewCommentsSheetsController } from "../../controller/collaboration/Comments"; import SharingSettingsController from "../../controller/SharingSettings"; import CollaborationPage from '../../pages/CollaborationPage'; -import { MainContext } from '../../../../../documenteditor/mobile/src/page/main'; import UsersPage from '../../pages/UsersPage'; const routes = [ { path: '/collaboration-page/', - component: CollaborationPage + component: CollaborationPage, + keepAlive: true }, { path: '/users/', @@ -70,9 +70,7 @@ routes.forEach(route => { }; }); -const CollaborationView = () => { - const mainContext = useContext(MainContext); - +const CollaborationView = props => { useEffect(() => { if(Device.phone) { f7.sheet.open('.coauth__sheet'); @@ -83,12 +81,12 @@ const CollaborationView = () => { return ( !Device.phone ? - mainContext.closeOptions('coauth')} closeByOutsideClick={false}> + props.closeOptions('coauth')} closeByOutsideClick={false}> : - mainContext.closeOptions('coauth')}> + props.closeOptions('coauth')}> diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index adc9a08f30..d422022ec3 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -161,7 +161,6 @@ class MainPage extends Component { openOptions: this.handleClickToOpenOptions.bind(this), closeOptions: this.handleOptionsViewClosed.bind(this), showPanels: this.state.addShowOptions, - }}> {/* Top Navbar */} @@ -236,7 +235,11 @@ class MainPage extends Component { } {!this.state.settingsVisible ? null : } - {!this.state.collaborationVisible ? null : } + {!this.state.collaborationVisible ? null : + + } {!this.state.navigationVisible ? null : } {isFabShow && Date: Mon, 7 Aug 2023 18:22:11 +0300 Subject: [PATCH 15/22] [PE mobile] Add settings controller, change view --- .../resources/less/common-material.less | 4 + .../src/controller/settings/Settings.jsx | 65 +++++ .../mobile/src/page/main.jsx | 54 ++-- .../mobile/src/view/settings/Settings.jsx | 251 ++---------------- .../mobile/src/view/settings/SettingsPage.jsx | 122 +++++++++ 5 files changed, 252 insertions(+), 244 deletions(-) create mode 100644 apps/presentationeditor/mobile/src/controller/settings/Settings.jsx create mode 100644 apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 2570644484..7d93db9389 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -421,6 +421,10 @@ overflow: initial; } + .left { + margin: 0; + } + .title { margin-left: var(--f7-navbar-title-margin-left); margin-right: var(--f7-navbar-title-margin-left); diff --git a/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx b/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx new file mode 100644 index 0000000000..5e6d9fe8b1 --- /dev/null +++ b/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx @@ -0,0 +1,65 @@ +import React, { createContext } from 'react'; +import { Device } from '../../../../../common/mobile/utils/device'; +import SettingsView from '../../view/settings/Settings'; + +export const SettingsContext = createContext(); + +const SettingsController = () => { + const onPrint = () => { + const api = Common.EditorApi.get(); + + closeModal(); + setTimeout(() => { + api.asc_Print(); + }, 400); + }; + + const showHelp = () => { + // let url = '{{HELP_URL}}'; + let url = __HELP_URL__; + // let url = 'https://helpcenter.onlyoffice.com'; + + if (url.charAt(url.length-1) !== '/') { + url += '/'; + } + + if (Device.sailfish || Device.android) { + url+='mobile-applications/documents/mobile-web-editors/android/index.aspx'; + } + else { + url+='mobile-applications/documents/mobile-web-editors/ios/index.aspx'; + } + + closeModal(); + window.open(url, "_blank"); + }; + + const showFeedback = () => { + let config = props.storeAppOptions.config; + + closeModal(); + if(config && !!config.feedback && !!config.feedback.url) { + window.open(config.feedback.url, "_blank"); + } else window.open(__SUPPORT_URL__, "_blank"); + }; + + const onDownloadOrigin = () => { + closeModal(); + setTimeout(() => { + Common.EditorApi.get().asc_DownloadOrigin(); + }, 0); + }; + + return ( + + + + ); +}; + +export default SettingsController; \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/page/main.jsx b/apps/presentationeditor/mobile/src/page/main.jsx index 9dbcb97581..9a6b2e7cee 100644 --- a/apps/presentationeditor/mobile/src/page/main.jsx +++ b/apps/presentationeditor/mobile/src/page/main.jsx @@ -1,18 +1,19 @@ -import React, { Component, Fragment } from 'react'; -import { f7, Page, View, Navbar, Subnavbar, Icon, Link} from 'framework7-react'; +import React, { Component, createContext } from 'react'; +import { f7, Page, View, Navbar, Subnavbar, Icon } from 'framework7-react'; import { observer, inject } from "mobx-react"; import { Device } from '../../../../common/mobile/utils/device'; - import EditOptions from '../view/edit/Edit'; import AddOptions from '../view/add/Add'; -import Settings from '../view/settings/Settings'; -import { Collaboration } from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx'; +import CollaborationView from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx'; import { Preview } from "../controller/Preview"; import { Search, SearchSettings } from '../controller/Search'; import ContextMenu from '../controller/ContextMenu'; import { Toolbar } from "../controller/Toolbar"; import { AddLinkController } from '../controller/add/AddLink'; import { EditLinkController } from '../controller/edit/EditLink'; +import SettingsController from '../controller/settings/Settings'; + +export const MainContext = createContext(); class MainPage extends Component { constructor(props) { @@ -130,18 +131,27 @@ class MainPage extends Component { } return ( - + {!this.state.previewVisible ? null : } {/* Top Navbar */} - - {!isHideLogo &&
{ - window.open(`${__PUBLISHER_URL__}`, "_blank"); - }}>
} + + {!isHideLogo && +
{ + window.open(`${__PUBLISHER_URL__}`, "_blank"); + }}> + +
+ } - +
@@ -181,17 +191,17 @@ class MainPage extends Component { !this.state.editLinkSettingsVisible ? null : } - { - !this.state.settingsVisible ? null : - + {!this.state.settingsVisible ? null : } + {!this.state.collaborationVisible ? null : + } - { - !this.state.collaborationVisible ? null : - - } - {appOptions.isDocReady && } + {appOptions.isDocReady && + + }
-
+ ) } } diff --git a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx index e89d18fdc3..d89562c27f 100644 --- a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx @@ -1,23 +1,21 @@ -import React, {Component, useEffect} from 'react'; -import {View,Page,Navbar,NavRight,Link,Popup,Popover,Icon,ListItem,List} from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {f7} from 'framework7-react'; -import {Device} from '../../../../../common/mobile/utils/device'; -import { observer, inject } from "mobx-react"; +import React, { useContext, useEffect } from 'react'; +import { View, Popup, Popover, f7 } from 'framework7-react'; +import { Device } from '../../../../../common/mobile/utils/device'; import ApplicationSettingsController from "../../controller/settings/ApplicationSettings"; import { MacrosSettings } from "./ApplicationSettings"; import DownloadController from "../../controller/settings/Download"; import PresentationInfoController from "../../controller/settings/PresentationInfo"; import PresentationSettingsController from "../../controller/settings/PresentationSettings"; import { PresentationColorSchemes } from "./PresentationSettings"; -// import PresentationAboutController from '../../controller/settings/PresentationAbout'; import About from '../../../../../common/mobile/lib/view/About'; -import SharingSettings from "../../../../../common/mobile/lib/view/SharingSettings"; +import SettingsPage from './SettingsPage'; +import { MainContext } from '../../page/main'; const routes = [ { - path: '/', - component: 'TSettingsView' + path: '/settings-page/', + component: SettingsPage, + keepAlive: true }, { path: '/application-settings/', @@ -46,15 +44,7 @@ const routes = [ { path: '/about/', component: About - }, - /*{ - path: '/presentation-settings/', - component: PresentationSettingsController, - }, - { - path: "/presentation-info/", - component: PresentationInfoController, - }*/ + } ]; routes.forEach(route => { @@ -64,213 +54,30 @@ routes.forEach(route => { }; }); -const SettingsList = inject("storeAppOptions", "storeToolbarSettings")(observer(props => { - const { t } = useTranslation(); - const _t = t('View.Settings', {returnObjects: true}); - const storeToolbarSettings = props.storeToolbarSettings; - const disabledPreview = storeToolbarSettings.countPages <= 0; +const SettingsView = () => { + const mainContext = useContext(MainContext); - const navbar = - {!props.inPopover && {_t.textDone}} - ; - - const onoptionclick = page => { - if ( props.onOptionClick ) - props.onOptionClick(page) - }; - - const closeModal = () => { - if (Device.phone) { - f7.sheet.close('.settings-popup', false); - } else { - f7.popover.close('#settings-popover', false); - } - }; - - const onOpenCollaboration = async () => { - await closeModal(); - await props.openOptions('coauth'); - } - - const onPrint = () => { - const api = Common.EditorApi.get(); - - closeModal(); - setTimeout(() => { - api.asc_Print(); - }, 400); - }; - - const showHelp = () => { - // let url = '{{HELP_URL}}'; - let url = __HELP_URL__; - // let url = 'https://helpcenter.onlyoffice.com'; - - if (url.charAt(url.length-1) !== '/') { - url += '/'; - } - - if (Device.sailfish || Device.android) { - url+='mobile-applications/documents/mobile-web-editors/android/index.aspx'; - } - else { - url+='mobile-applications/documents/mobile-web-editors/ios/index.aspx'; - } - - closeModal(); - window.open(url, "_blank"); - }; - - const showFeedback = () => { - let config = props.storeAppOptions.config; - - closeModal(); - if(config && !!config.feedback && !!config.feedback.url) { - window.open(config.feedback.url, "_blank"); - } else window.open(__SUPPORT_URL__, "_blank"); - }; - - const appOptions = props.storeAppOptions; - let _isEdit = false, - _canDownload = false, - _canDownloadOrigin = false, - _canAbout = true, - _canHelp = true, - _canPrint = false, - _canFeedback = true; - - if (appOptions.isDisconnected) { - _isEdit = false; - if (!appOptions.enableDownload) - _canPrint = _canDownload = _canDownloadOrigin = false; - } else { - _isEdit = appOptions.isEdit; - _canDownload = appOptions.canDownload; - _canDownloadOrigin = appOptions.canDownloadOrigin; - _canPrint = appOptions.canPrint; - - if (appOptions.customization && appOptions.canBrandingExt) { - _canAbout = appOptions.customization.about !== false; - } - - if (appOptions.customization) { - _canHelp = appOptions.customization.help !== false; - _canFeedback = appOptions.customization.feedback !== false; - } - } - - const onDownloadOrigin = () => { - closeModal(); - setTimeout(() => { - Common.EditorApi.get().asc_DownloadOrigin(); - }, 0); - }; - - return ( - - - {navbar} - - {!props.inPopover && - - - - } - {window.matchMedia("(max-width: 374px)").matches ? - - - - : null} - {_isEdit && - - - - } - - - - {_canDownload && - - - - } - {_canDownloadOrigin && - - - - } - {_canPrint && - - - - } - - - - {_canHelp && - - - - } - {_canAbout && - - - - } - {_canFeedback && - - - - } - - - - ) -})); - -class SettingsView extends Component { - constructor(props) { - super(props); - - this.onoptionclick = this.onoptionclick.bind(this); - } - - onoptionclick(page){ - f7.views.current.router.navigate(page); - } - - render() { - const show_popover = this.props.usePopover; - - return ( - show_popover ? - this.props.onclosed()}> - - : - this.props.onclosed()}> - - - ) - } -} - -const Settings = props => { useEffect(() => { - if ( Device.phone ) + if(Device.phone) { f7.popup.open('.settings-popup'); - else f7.popover.open('#settings-popover', '#btn-settings'); - - return () => { + } else { + f7.popover.open('#settings-popover', '#btn-settings'); } - }); + }, []); - const onviewclosed = () => { - if (props.onclosed) { - props.onclosed(); - } - }; - - return + return ( + !Device.phone ? + mainContext.closeOptions('settings')}> + + + + : + mainContext.closeOptions('settings')}> + + + + + ) }; -export default Settings; \ No newline at end of file +export default SettingsView; \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx b/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx new file mode 100644 index 0000000000..01a677c5a6 --- /dev/null +++ b/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx @@ -0,0 +1,122 @@ +import React, { useContext } from 'react'; +import { Page, Navbar, NavRight, Link, Icon, ListItem, List, f7 } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { Device } from '../../../../../common/mobile/utils/device'; +import { observer, inject } from "mobx-react"; +import { MainContext } from '../../page/main'; +import { SettingsContext } from '../../controller/settings/Settings'; + +const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings')(observer(props => { + const { t } = useTranslation(); + const _t = t('View.Settings', {returnObjects: true}); + const mainContext = useContext(MainContext); + const settingsContext = useContext(SettingsContext); + const appOptions = props.storeAppOptions; + const storeToolbarSettings = props.storeToolbarSettings; + const disabledPreview = storeToolbarSettings.countPages <= 0; + const navbar = + {Device.phone && {_t.textDone}} + ; + + const closeModal = () => { + if (Device.phone) { + f7.sheet.close('.settings-popup', false); + } else { + f7.popover.close('#settings-popover', false); + } + }; + + const onOpenCollaboration = () => { + closeModal(); + mainContext.openOptions('coauth'); + } + + let _isEdit = false, + _canDownload = false, + _canDownloadOrigin = false, + _canAbout = true, + _canHelp = true, + _canPrint = false, + _canFeedback = true; + + if (appOptions.isDisconnected) { + _isEdit = false; + if (!appOptions.enableDownload) + _canPrint = _canDownload = _canDownloadOrigin = false; + } else { + _isEdit = appOptions.isEdit; + _canDownload = appOptions.canDownload; + _canDownloadOrigin = appOptions.canDownloadOrigin; + _canPrint = appOptions.canPrint; + + if (appOptions.customization && appOptions.canBrandingExt) { + _canAbout = appOptions.customization.about !== false; + } + + if (appOptions.customization) { + _canHelp = appOptions.customization.help !== false; + _canFeedback = appOptions.customization.feedback !== false; + } + } + + return ( + + {navbar} + + {!props.inPopover && + + + + } + {window.matchMedia("(max-width: 374px)").matches ? + + + + : null} + {_isEdit && + + + + } + + + + {_canDownload && + + + + } + {_canDownloadOrigin && + settingsContext.onDownloadOrigin()} className='no-indicator'> + + + } + {_canPrint && + settingsContext.onPrint()}> + + + } + + + + {_canHelp && + settingsContext.showHelp()}> + + + } + {_canAbout && + + + + } + {_canFeedback && + settingsContext.showFeedback()}> + + + } + + + ) +})); + +export default SettingsPage; \ No newline at end of file From db11fa5742bf6fd779d8202eb0257f935a28ee2a Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 10 Aug 2023 00:37:15 +0300 Subject: [PATCH 16/22] [common] Correct connection store in collaboration --- .../mobile/lib/pages/CollaborationPage.jsx | 22 ++++++++++++++++--- .../lib/view/collaboration/Collaboration.jsx | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/apps/common/mobile/lib/pages/CollaborationPage.jsx b/apps/common/mobile/lib/pages/CollaborationPage.jsx index 99ad36ee2c..f20de8608b 100644 --- a/apps/common/mobile/lib/pages/CollaborationPage.jsx +++ b/apps/common/mobile/lib/pages/CollaborationPage.jsx @@ -4,7 +4,7 @@ import { List, ListItem, Navbar, NavRight, Page, Icon, Link } from 'framework7-r import { useTranslation } from 'react-i18next'; import { Device } from "../../utils/device"; -const CollaborationPage = inject('storeAppOptions', 'users', 'storeDocumentInfo')(observer(props => { +const CollaborationPage = props => { const { t } = useTranslation(); const _t = t('Common.Collaboration', {returnObjects: true}); const appOptions = props.storeAppOptions; @@ -49,6 +49,22 @@ const CollaborationPage = inject('storeAppOptions', 'users', 'storeDocumentInfo'
) -})); +}; -export default CollaborationPage; \ No newline at end of file +let storeInfo; + +switch (window.asceditor) { + case 'word': + storeInfo = 'storeDocumentInfo'; + break; + case 'slide': + storeInfo = 'storePresentationInfo'; + break; + case 'cell': + storeInfo = 'storeSpreadsheetInfo'; + break; +} + +const Collaboration = inject('storeAppOptions', 'users', storeInfo)(observer(CollaborationPage)); + +export { Collaboration as CollaborationPage }; \ No newline at end of file diff --git a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx index 5ccab93a53..34b0b5ca10 100644 --- a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx @@ -5,7 +5,7 @@ import { ReviewController, ReviewChangeController } from "../../controller/colla import { PageDisplayMode } from "./Review"; import { ViewCommentsController, ViewCommentsSheetsController } from "../../controller/collaboration/Comments"; import SharingSettingsController from "../../controller/SharingSettings"; -import CollaborationPage from '../../pages/CollaborationPage'; +import { CollaborationPage } from '../../pages/CollaborationPage'; import UsersPage from '../../pages/UsersPage'; const routes = [ From b50002384f3fe281945cd0bf85be96bd815c9585 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 10 Aug 2023 01:06:23 +0300 Subject: [PATCH 17/22] [DE PE mobile] Change routing and props --- .../src/controller/edit/EditHyperlink.jsx | 4 +- apps/documenteditor/mobile/src/page/main.jsx | 7 +- .../mobile/src/view/edit/EditingPage.jsx | 16 +- .../mobile/src/controller/Preview.jsx | 2 +- .../mobile/src/controller/add/AddLink.jsx | 4 +- .../mobile/src/controller/edit/EditLink.jsx | 4 +- .../mobile/src/page/main.jsx | 36 ++-- .../mobile/src/view/add/Add.jsx | 177 +++------------- .../mobile/src/view/add/AddingPage.jsx | 110 ++++++++++ .../mobile/src/view/edit/Edit.jsx | 193 +++--------------- .../mobile/src/view/edit/EditingPage.jsx | 134 ++++++++++++ 11 files changed, 343 insertions(+), 344 deletions(-) create mode 100644 apps/presentationeditor/mobile/src/view/add/AddingPage.jsx create mode 100644 apps/presentationeditor/mobile/src/view/edit/EditingPage.jsx diff --git a/apps/documenteditor/mobile/src/controller/edit/EditHyperlink.jsx b/apps/documenteditor/mobile/src/controller/edit/EditHyperlink.jsx index 63f9b84b1c..c2a80e58c9 100644 --- a/apps/documenteditor/mobile/src/controller/edit/EditHyperlink.jsx +++ b/apps/documenteditor/mobile/src/controller/edit/EditHyperlink.jsx @@ -90,7 +90,7 @@ class EditHyperlinkController extends Component { return ( !this.props.isNavigate ? Device.phone ? - this.props.onClosed('edit-link')}> + this.props.closeOptions('edit-link')}> : - this.props.onClosed('edit-link')}> + this.props.closeOptions('edit-link')}> } - { - !this.state.editLinkSettingsVisible ? null : - + {!this.state.editLinkSettingsVisible ? null : + } {!this.state.settingsVisible ? null : } {!this.state.collaborationVisible ? null : diff --git a/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx b/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx index 80350c643f..3ea6566ac9 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditingPage.jsx @@ -34,14 +34,14 @@ const EditLayoutNavbar = ({ editors }) => { return ( - {editors.length > 1 ? -
- {editors.map((item, index) => {item.caption})} - {isAndroid && } -
: - {editors[0].caption} - } - {Device.phone && } + {editors.length > 1 ? +
+ {editors.map((item, index) => {item.caption})} + {isAndroid && } +
: + {editors[0].caption} + } + {Device.phone && }
) }; diff --git a/apps/presentationeditor/mobile/src/controller/Preview.jsx b/apps/presentationeditor/mobile/src/controller/Preview.jsx index bd9e4fe6fa..f7b2ec0db9 100644 --- a/apps/presentationeditor/mobile/src/controller/Preview.jsx +++ b/apps/presentationeditor/mobile/src/controller/Preview.jsx @@ -86,7 +86,7 @@ const PreviewController = props => { // API Handlers const onEndDemonstration = () => { - props.onclosed(); + props.closeOptions('preview'); }; return ( diff --git a/apps/presentationeditor/mobile/src/controller/add/AddLink.jsx b/apps/presentationeditor/mobile/src/controller/add/AddLink.jsx index 599130ed10..102956adf1 100644 --- a/apps/presentationeditor/mobile/src/controller/add/AddLink.jsx +++ b/apps/presentationeditor/mobile/src/controller/add/AddLink.jsx @@ -138,13 +138,13 @@ class AddLinkController extends Component { return ( !this.props.isNavigate ? Device.phone ? - this.props.onClosed('add-link')}> + this.props.closeOptions('add-link')}> : - this.props.onClosed('add-link')}> + this.props.closeOptions('add-link')}> diff --git a/apps/presentationeditor/mobile/src/controller/edit/EditLink.jsx b/apps/presentationeditor/mobile/src/controller/edit/EditLink.jsx index 32f2aafa0d..124b787b4d 100644 --- a/apps/presentationeditor/mobile/src/controller/edit/EditLink.jsx +++ b/apps/presentationeditor/mobile/src/controller/edit/EditLink.jsx @@ -188,7 +188,7 @@ class EditLinkController extends Component { return ( !this.props.isNavigate ? Device.phone ? - this.props.onClosed('edit-link')}> + this.props.closeOptions('edit-link')}> : - this.props.onClosed('edit-link')}> + this.props.closeOptions('edit-link')}> - {!this.state.previewVisible ? null : } + {!this.state.previewVisible ? null : + + } {/* Top Navbar */} @@ -175,21 +177,17 @@ class MainPage extends Component { - { - !this.state.editOptionsVisible ? null : - + {!this.state.editOptionsVisible ? null : } + {!this.state.addOptionsVisible ? null : } + {!this.state.addLinkSettingsVisible ? null : + } - { - !this.state.addOptionsVisible ? null : - - } - { - !this.state.addLinkSettingsVisible ? null : - - } - { - !this.state.editLinkSettingsVisible ? null : - + {!this.state.editLinkSettingsVisible ? null : + } {!this.state.settingsVisible ? null : } {!this.state.collaborationVisible ? null : @@ -198,7 +196,9 @@ class MainPage extends Component { /> } {appOptions.isDocReady && - + } diff --git a/apps/presentationeditor/mobile/src/view/add/Add.jsx b/apps/presentationeditor/mobile/src/view/add/Add.jsx index b1aecb4f19..6798b68744 100644 --- a/apps/presentationeditor/mobile/src/view/add/Add.jsx +++ b/apps/presentationeditor/mobile/src/view/add/Add.jsx @@ -1,22 +1,21 @@ -import React, {Component, useEffect} from 'react'; -import {View,Page,Navbar,NavRight, NavTitle, Link,Popup,Popover,Icon,Tabs,Tab} from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {f7} from 'framework7-react'; -import { observer, inject } from "mobx-react"; -import {Device} from '../../../../../common/mobile/utils/device'; - -import AddSlideController from "../../controller/add/AddSlide"; -import AddShapeController from "../../controller/add/AddShape"; -import {AddImageController} from "../../controller/add/AddImage"; -import {PageImageLinkSettings} from "./AddImage"; -import {AddOtherController} from "../../controller/add/AddOther"; -import {PageAddTable} from "./AddOther"; -import {AddLinkController} from "../../controller/add/AddLink"; +import React, { useContext, useEffect } from 'react'; +import { View, Popup, Popover, f7 } from 'framework7-react'; +import { Device } from '../../../../../common/mobile/utils/device'; +import { AddImageController } from "../../controller/add/AddImage"; +import { PageImageLinkSettings } from "./AddImage"; +import { PageAddTable } from "./AddOther"; +import { AddLinkController } from "../../controller/add/AddLink"; import { PageTypeLink, PageLinkTo } from "./AddLink"; import { EditLinkController } from '../../controller/edit/EditLink'; import { PageEditTypeLink, PageEditLinkTo } from '../../view/edit/EditLink'; +import AddingPage from './AddingPage'; +import { MainContext } from '../../page/main'; const routes = [ + { + path: '/adding-page/', + component: AddingPage + }, // Image { path: '/add-image-from-url/', @@ -68,138 +67,30 @@ routes.forEach(route => { }; }); -const AddLayoutNavbar = ({ tabs, inPopover }) => { - const isAndroid = Device.android; - return ( - - {tabs.length > 1 ? -
- {tabs.map((item, index) => - - - )} - {isAndroid && } -
: - {tabs[0].caption} - } - { !inPopover && } -
- ) -}; +const AddView = () => { + const mainContext = useContext(MainContext); -const AddLayoutContent = ({ tabs }) => { - return ( - - {tabs.map((item, index) => - - {item.component} - - )} - - ) -}; - -const AddTabs = props => { - const { t } = useTranslation(); - const _t = t('View.Add', {returnObjects: true}); - const api = Common.EditorApi.get(); - const countPages = api.getCountPages(); - const showPanels = props.showPanels; - const tabs = []; - if (!showPanels && countPages) { - tabs.push({ - caption: _t.textSlide, - id: 'add-slide', - icon: 'icon-add-slide', - component: - }); - tabs.push({ - caption: _t.textShape, - id: 'add-shape', - icon: 'icon-add-shape', - component: - }); - - // tabs.push({ - // caption: _t.textImage, - // id: 'add-image', - // icon: 'icon-add-image', - // component: - // }); - - tabs.push({ - caption: _t.textOther, - id: 'add-other', - icon: 'icon-add-other', - component: - }); - } - if(!showPanels && !countPages) { - tabs.push({ - caption: _t.textSlide, - id: 'add-slide', - icon: 'icon-add-slide', - component: - }); - } - - // if (showPanels && showPanels === 'link') { - // tabs.push({ - // caption: _t.textAddLink, - // id: 'add-link', - // component: - // }); - // } + useEffect(() => { + if(Device.phone) { + f7.popup.open('.add-popup'); + } else { + f7.popover.open('#add-popover', '#btn-add'); + } + }, []); return ( - - - - - - + !Device.phone ? + mainContext.closeOptions('add')}> + + + + : + mainContext.closeOptions('add')}> + + + + ) -}; - -class AddView extends Component { - constructor(props) { - super(props); - - this.onoptionclick = this.onoptionclick.bind(this); - } - onoptionclick(page){ - f7.views.current.router.navigate(page); - } - render() { - const show_popover = this.props.usePopover; - return ( - show_popover ? - this.props.onclosed()}> - - : - this.props.onclosed()}> - - - ) - } } -const Add = props => { - useEffect(() => { - if ( Device.phone ) - f7.popup.open('.add-popup'); - else f7.popover.open('#add-popover', '#btn-add'); - - return () => { - // component will unmount - } - }); - const onviewclosed = () => { - if ( props.onclosed ) { - props.onclosed(); - } - }; - return -}; - -export default Add; \ No newline at end of file +export default AddView; \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx b/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx new file mode 100644 index 0000000000..27215a97db --- /dev/null +++ b/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx @@ -0,0 +1,110 @@ +import React, { useContext, useEffect } from 'react'; +import { Page, Navbar, NavRight, NavTitle, Link, Icon, Tabs, Tab, f7 } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { Device } from '../../../../../common/mobile/utils/device'; +import AddSlideController from "../../controller/add/AddSlide"; +import AddShapeController from "../../controller/add/AddShape"; +import { AddOtherController } from "../../controller/add/AddOther"; +import { MainContext } from '../../page/main'; + +const AddLayoutNavbar = ({ tabs }) => { + const isAndroid = Device.android; + + return ( + + {tabs.length > 1 ? +
+ {tabs.map((item, index) => + + + )} + {isAndroid && } +
: + {tabs[0].caption} + } + {Device.phone && } +
+ ) +}; + +const AddLayoutContent = ({ tabs }) => { + return ( + + {tabs.map((item, index) => + + {item.component} + + )} + + ) +}; + +const AddingPage = () => { + const { t } = useTranslation(); + const _t = t('View.Add', {returnObjects: true}); + const api = Common.EditorApi.get(); + const countPages = api.getCountPages(); + const mainContext = useContext(MainContext); + const showPanels = mainContext.showPanels; + const tabs = []; + + useEffect(() => { + f7.tab.show('#add-other', false); + }, []); + + if (!showPanels && countPages) { + tabs.push({ + caption: _t.textSlide, + id: 'add-slide', + icon: 'icon-add-slide', + component: + }); + + tabs.push({ + caption: _t.textShape, + id: 'add-shape', + icon: 'icon-add-shape', + component: + }); + + // tabs.push({ + // caption: _t.textImage, + // id: 'add-image', + // icon: 'icon-add-image', + // component: + // }); + + tabs.push({ + caption: _t.textOther, + id: 'add-other', + icon: 'icon-add-other', + component: + }); + } + + if(!showPanels && !countPages) { + tabs.push({ + caption: _t.textSlide, + id: 'add-slide', + icon: 'icon-add-slide', + component: + }); + } + + // if (showPanels && showPanels === 'link') { + // tabs.push({ + // caption: _t.textAddLink, + // id: 'add-link', + // component: + // }); + // } + + return ( + + + + + ) +}; + +export default AddingPage; \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx index f57aad6bf1..ae3b8acc83 100644 --- a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx @@ -1,29 +1,24 @@ -import React, {useState, useEffect} from 'react'; -import {observer, inject} from "mobx-react"; -import { Popover, Sheet, View, Page, Navbar, NavRight, NavLeft, NavTitle, Tabs, Tab, Link } from 'framework7-react'; -import { f7 } from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {Device} from '../../../../../common/mobile/utils/device'; - -import EditSlideController from "../../controller/edit/EditSlide"; -import EditTextController from "../../controller/edit/EditText"; -import EditShapeController from "../../controller/edit/EditShape"; -import EditImageController from "../../controller/edit/EditImage"; -import EditTableController from "../../controller/edit/EditTable"; -import EditChartController from "../../controller/edit/EditChart"; +import React, { useContext, useEffect } from 'react'; +import { Popover, Sheet, View, f7 } from 'framework7-react'; +import { Device } from '../../../../../common/mobile/utils/device'; import { EditLinkController } from "../../controller/edit/EditLink"; - import { Theme, Layout, Transition, Type, Effect, StyleFillColor, CustomFillColor } from './EditSlide'; import { PageTextFonts, PageTextFontColor, PageTextHighlightColor, PageTextCustomFontColor, PageTextAddFormatting, PageTextBulletsAndNumbers, PageTextLineSpacing, PageTextBulletsLinkSettings } from './EditText'; import { PageShapeStyle, PageShapeStyleNoFill, PageReplaceContainer, PageReorderContainer, PageAlignContainer, PageShapeBorderColor, PageShapeCustomBorderColor, PageShapeCustomFillColor } from './EditShape'; import { PageImageReplace, PageImageReorder, PageImageAlign, PageLinkSettings } from './EditImage'; import { PageTableStyle, PageTableStyleOptions, PageTableCustomFillColor, PageTableBorderColor, PageTableCustomBorderColor, PageTableReorder, PageTableAlign } from './EditTable'; import { PageChartDesign, PageChartDesignType, PageChartDesignStyle, PageChartDesignFill, PageChartDesignBorder, PageChartCustomFillColor, PageChartBorderColor, PageChartCustomBorderColor, PageChartReorder, PageChartAlign } from './EditChart' +import EditingPage from './EditingPage'; +import { MainContext } from '../../page/main'; const routes = [ + { + path: '/editing-page/', + component: EditingPage, + keepAlive: true + }, // Slides - { path: '/layout/', component: Layout @@ -232,162 +227,30 @@ routes.forEach(route => { }; }); -const EmptyEditLayout = () => { - const { t } = useTranslation(); - const _t = t('View.Edit', {returnObjects: true}); - return ( - -
-
-

{_t.textSelectObjectToEdit}

-
-
-
- ) -}; +const EditView = () => { + const mainContext = useContext(MainContext); -const EditLayoutNavbar = ({ editors, inPopover }) => { - const isAndroid = Device.android; - return ( - - { - editors.length > 1 ? -
- {editors.map((item, index) => {item.caption})} - {isAndroid && } -
: - { editors[0].caption } - } - { !inPopover && } -
- ) -}; - -const EditLayoutContent = ({ editors }) => { - if (editors.length > 1) { - return ( - - {editors.map((item, index) => - - {item.component} - - )} - - ) - } else { - return ( - - {editors[0].component} - - ) - } -}; - -const EditTabs = props => { - const { t } = useTranslation(); - const _t = t('View.Edit', {returnObjects: true}); - - const settings = props.storeFocusObjects.settings; - - let editors = []; - if (settings.length < 1) { - editors.push({ - caption: _t.textSettings, - component: - }); - } else { - if (settings.indexOf('image') > -1) { - editors.push({ - caption: _t.textImage, - id: 'edit-image', - component: - }) + useEffect(() => { + if(Device.phone) { + f7.sheet.open('#edit-sheet'); + } else { + f7.popover.open('#edit-popover', '#btn-edit'); } - if (settings.indexOf('shape') > -1) { - editors.push({ - caption: _t.textShape, - id: 'edit-shape', - component: - }) - } - if (settings.indexOf('table') > -1) { - editors.push({ - caption: _t.textTable, - id: 'edit-table', - component: - }) - } - if (settings.indexOf('chart') > -1) { - editors.push({ - caption: _t.textChart, - id: 'edit-chart', - component: - }) - } - if (settings.indexOf('text') > -1) { - editors.push({ - caption: _t.textText, - id: 'edit-text', - component: - }) - } - if (settings.indexOf('slide') > -1) { - editors.push({ - caption: _t.textSlide, - id: 'edit-slide', - component: - }) - } - } + }, []); return ( - - - - - - - ) -}; - -const EditTabsContainer = inject("storeFocusObjects")(observer(EditTabs)); - -const EditView = props => { - const onOptionClick = (page) => { - $f7.views.current.router.navigate(page); - }; - const show_popover = props.usePopover; - return ( - show_popover ? - props.onClosed()}> - + !Device.phone ? + mainContext.closeOptions('edit')}> + + + : - props.onClosed()}> - + mainContext.closeOptions('edit')}> + + + ) }; -const EditOptions = props => { - useEffect(() => { - if ( Device.phone ) - f7.sheet.open('#edit-sheet'); - else f7.popover.open('#edit-popover', '#btn-edit'); - - return () => { - // component will unmount - } - }); - - const onviewclosed = () => { - if ( props.onclosed ) { - props.onclosed(); - } - }; - - return ( - - ) -}; - -export default EditOptions; \ No newline at end of file +export default EditView; \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/view/edit/EditingPage.jsx b/apps/presentationeditor/mobile/src/view/edit/EditingPage.jsx new file mode 100644 index 0000000000..7449624b67 --- /dev/null +++ b/apps/presentationeditor/mobile/src/view/edit/EditingPage.jsx @@ -0,0 +1,134 @@ +import React from 'react'; +import { observer, inject } from "mobx-react"; +import { Page, Navbar, NavRight, NavTitle, Tabs, Tab, Link } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { Device } from '../../../../../common/mobile/utils/device'; +import EditSlideController from "../../controller/edit/EditSlide"; +import EditTextController from "../../controller/edit/EditText"; +import EditShapeController from "../../controller/edit/EditShape"; +import EditImageController from "../../controller/edit/EditImage"; +import EditTableController from "../../controller/edit/EditTable"; +import EditChartController from "../../controller/edit/EditChart"; + +const EmptyEditLayout = () => { + const { t } = useTranslation(); + const _t = t('View.Edit', {returnObjects: true}); + + return ( + +
+
+

{_t.textSelectObjectToEdit}

+
+
+
+ ) +}; + +const EditLayoutNavbar = ({ editors }) => { + const isAndroid = Device.android; + + return ( + + {editors.length > 1 ? +
+ {editors.map((item, index) => {item.caption})} + {isAndroid && } +
: + { editors[0].caption } + } + {Device.phone && } +
+ ) +}; + +const EditLayoutContent = ({ editors }) => { + if (editors.length > 1) { + return ( + + {editors.map((item, index) => + + {item.component} + + )} + + ) + } else { + return ( + + {editors[0].component} + + ) + } +}; + +const EditingPage = inject('storeFocusObjects')(observer(props => { + const { t } = useTranslation(); + const _t = t('View.Edit', {returnObjects: true}); + const settings = props.storeFocusObjects.settings; + let editors = []; + + if (settings.length < 1) { + editors.push({ + caption: _t.textSettings, + component: + }); + } else { + if (settings.indexOf('image') > -1) { + editors.push({ + caption: _t.textImage, + id: 'edit-image', + component: + }) + } + + if (settings.indexOf('shape') > -1) { + editors.push({ + caption: _t.textShape, + id: 'edit-shape', + component: + }) + } + + if (settings.indexOf('table') > -1) { + editors.push({ + caption: _t.textTable, + id: 'edit-table', + component: + }) + } + + if (settings.indexOf('chart') > -1) { + editors.push({ + caption: _t.textChart, + id: 'edit-chart', + component: + }) + } + + if (settings.indexOf('text') > -1) { + editors.push({ + caption: _t.textText, + id: 'edit-text', + component: + }) + } + + if (settings.indexOf('slide') > -1) { + editors.push({ + caption: _t.textSlide, + id: 'edit-slide', + component: + }) + } + } + + return ( + + + + + ) +})); + +export default EditingPage; \ No newline at end of file From 720dc5b4cd8ce368817cbf08f0252585c53d900c Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 10 Aug 2023 17:05:23 +0300 Subject: [PATCH 18/22] [SSE mobile] Change routing and props --- .../mobile/src/controller/add/Add.jsx | 45 ++++ .../mobile/src/controller/add/AddChart.jsx | 3 +- .../mobile/src/controller/add/AddFunction.jsx | 4 +- .../mobile/src/controller/add/AddLink.jsx | 4 +- .../mobile/src/controller/add/AddOther.jsx | 2 - .../mobile/src/controller/add/AddShape.jsx | 3 +- .../mobile/src/controller/edit/EditLink.jsx | 5 +- .../src/controller/settings/Settings.jsx | 76 ++++++ .../mobile/src/page/main.jsx | 150 ++++++----- .../mobile/src/view/add/Add.jsx | 243 +++--------------- .../mobile/src/view/add/AddFunction.jsx | 27 +- .../mobile/src/view/add/AddLink.jsx | 17 +- .../mobile/src/view/add/AddOther.jsx | 7 +- .../mobile/src/view/add/AddingPage.jsx | 130 ++++++++++ .../mobile/src/view/edit/Edit.jsx | 224 +++------------- .../mobile/src/view/edit/EditingPage.jsx | 155 +++++++++++ .../mobile/src/view/settings/Settings.jsx | 242 +++-------------- .../mobile/src/view/settings/SettingsPage.jsx | 112 ++++++++ 18 files changed, 733 insertions(+), 716 deletions(-) create mode 100644 apps/spreadsheeteditor/mobile/src/controller/add/Add.jsx create mode 100644 apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx create mode 100644 apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx create mode 100644 apps/spreadsheeteditor/mobile/src/view/edit/EditingPage.jsx create mode 100644 apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx diff --git a/apps/spreadsheeteditor/mobile/src/controller/add/Add.jsx b/apps/spreadsheeteditor/mobile/src/controller/add/Add.jsx new file mode 100644 index 0000000000..16be3f3661 --- /dev/null +++ b/apps/spreadsheeteditor/mobile/src/controller/add/Add.jsx @@ -0,0 +1,45 @@ +import React, { createContext } from "react"; +import AddView from "../../view/add/Add"; + +export const AddingContext = createContext(); + +const AddingController = props => { + const api = Common.EditorApi.get(); + const cellinfo = api.asc_getCellInfo(); + const seltype = cellinfo.asc_getSelectionType(); + const iscelllocked = cellinfo.asc_getLocked(); + const isAddShapeHyperlink = api.asc_canAddShapeHyperlink(); + let options; + + if(!iscelllocked) { + options = props.showOptions; + + if(!options) { + switch(seltype) { + case Asc.c_oAscSelectionType.RangeCells: + case Asc.c_oAscSelectionType.RangeRow: + case Asc.c_oAscSelectionType.RangeCol: + case Asc.c_oAscSelectionType.RangeMax: break; + case Asc.c_oAscSelectionType.RangeImage: + case Asc.c_oAscSelectionType.RangeShape: + case Asc.c_oAscSelectionType.RangeChart: + case Asc.c_oAscSelectionType.RangeChartText: + case Asc.c_oAscSelectionType.RangeShapeText: + options = {panels: ['image','shape']}; + break; + } + } + } + + return ( + + + + + ) +} + +export default AddingController; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/controller/add/AddChart.jsx b/apps/spreadsheeteditor/mobile/src/controller/add/AddChart.jsx index b560d95199..42b9f4f2d0 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/add/AddChart.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/add/AddChart.jsx @@ -43,8 +43,7 @@ class AddChartController extends Component { render () { return ( - + ) } } diff --git a/apps/spreadsheeteditor/mobile/src/controller/add/AddFunction.jsx b/apps/spreadsheeteditor/mobile/src/controller/add/AddFunction.jsx index a6adeb1dad..7725cf180b 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/add/AddFunction.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/add/AddFunction.jsx @@ -87,9 +87,7 @@ class AddFunctionController extends Component { render () { return ( - + ) } } diff --git a/apps/spreadsheeteditor/mobile/src/controller/add/AddLink.jsx b/apps/spreadsheeteditor/mobile/src/controller/add/AddLink.jsx index 075f113631..08fc94bd05 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/add/AddLink.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/add/AddLink.jsx @@ -141,7 +141,7 @@ class AddLinkController extends Component { return ( !this.props.isNavigate ? Device.phone ? - this.props.onClosed('add-link')}> + this.props.closeOptions('add-link')}> : - this.props.onClosed('add-link')}> + this.props.closeOptions('add-link')}> ) } diff --git a/apps/spreadsheeteditor/mobile/src/controller/add/AddShape.jsx b/apps/spreadsheeteditor/mobile/src/controller/add/AddShape.jsx index 0c7209c530..b36e4dcd3b 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/add/AddShape.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/add/AddShape.jsx @@ -26,8 +26,7 @@ class AddShapeController extends Component { render () { return ( - + ) } } diff --git a/apps/spreadsheeteditor/mobile/src/controller/edit/EditLink.jsx b/apps/spreadsheeteditor/mobile/src/controller/edit/EditLink.jsx index 927a779534..c5642dd207 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/edit/EditLink.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/edit/EditLink.jsx @@ -1,7 +1,6 @@ import React, { Component } from 'react'; import { f7, Popup, Popover, View } from 'framework7-react'; import { Device } from '../../../../../common/mobile/utils/device'; -import {observer, inject} from "mobx-react"; import { withTranslation } from 'react-i18next'; import { EditLink, PageEditTypeLink, PageEditSheet} from '../../view/edit/EditLink'; @@ -149,7 +148,7 @@ class EditLinkController extends Component { return ( !this.props.isNavigate ? Device.phone ? - this.props.onClosed('edit-link')}> + this.props.closeOptions('edit-link')}> : - this.props.onClosed('edit-link')}> + this.props.closeOptions('edit-link')}> { + const closeModal = () => { + if(Device.phone) { + f7.sheet.close('.settings-popup', false); + } else { + f7.popover.close('#settings-popover', false); + } + }; + + const onPrint = () => { + const api = Common.EditorApi.get(); + + closeModal(); + setTimeout(() => { + api.asc_Print(); + }, 400); + }; + + const showHelp = () => { + // let url = '{{HELP_URL}}'; + // let url = 'https://helpcenter.onlyoffice.com'; + let url = __HELP_URL__; + + if (url.charAt(url.length-1) !== '/') { + url += '/'; + } + + if (Device.sailfish || Device.android) { + url+='mobile-applications/documents/mobile-web-editors/android/index.aspx'; + } + else { + url+='mobile-applications/documents/mobile-web-editors/ios/index.aspx'; + } + + closeModal(); + window.open(url, "_blank"); + }; + + const showFeedback = () => { + let config = props.storeAppOptions.config; + + closeModal(); + if(config && !!config.feedback && !!config.feedback.url) { + window.open(config.feedback.url, "_blank"); + } else window.open(__SUPPORT_URL__, "_blank"); + }; + + const onDownloadOrigin = () => { + closeModal(); + setTimeout(() => { + Common.EditorApi.get().asc_DownloadOrigin(); + }, 0); + }; + + return ( + + + + ); +})); + +export default SettingsController; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/page/main.jsx b/apps/spreadsheeteditor/mobile/src/page/main.jsx index 6d0979df3c..5ad60998dc 100644 --- a/apps/spreadsheeteditor/mobile/src/page/main.jsx +++ b/apps/spreadsheeteditor/mobile/src/page/main.jsx @@ -1,23 +1,22 @@ -import React, { Component, Fragment } from 'react'; -import { Page, View, Navbar, Subnavbar, Icon } from 'framework7-react'; +import React, { Component, Fragment, createContext } from 'react'; +import { Page, View, Navbar, Subnavbar, Icon, f7 } from 'framework7-react'; import { observer, inject } from "mobx-react"; import { Device } from '../../../../common/mobile/utils/device'; - -import Settings from '../view/settings/Settings'; -import { Collaboration } from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx' +import CollaborationView from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx' import CellEditor from '../controller/CellEditor'; import { Statusbar } from '../controller/Statusbar'; import FilterOptionsController from '../controller/FilterOptions.jsx' -import AddOptions from "../view/add/Add"; -import EditOptions from "../view/edit/Edit"; import { Search, SearchSettings } from '../controller/Search'; -import { f7, Link } from 'framework7-react'; - -import {FunctionGroups} from "../controller/add/AddFunction"; +import { FunctionGroups } from "../controller/add/AddFunction"; import ContextMenu from '../controller/ContextMenu'; import { Toolbar } from "../controller/Toolbar"; import { AddLinkController } from '../controller/add/AddLink'; import { EditLinkController } from '../controller/edit/EditLink'; +import SettingsController from '../controller/settings/Settings'; +import AddingController from '../controller/add/Add'; +import EditView from '../view/edit/Edit'; + +export const MainContext = createContext(); class MainPage extends Component { constructor(props) { @@ -128,67 +127,78 @@ class MainPage extends Component { } return ( - - {/* Top Navbar */} - - {!isHideLogo &&
{ - window.open(`${__PUBLISHER_URL__}`, "_blank"); - }}>
} - - - - -
- - this.handleClickToOpenOptions('add', {panels: panels, button: button})}/> - {/* Page content */} - - {isShowPlaceholder ? -
-
-
-
: - null - } - - { - !this.state.editOptionsVisible ? null : - - } - { - !this.state.addOptionsVisible ? null : - - } - { - !this.state.addLinkSettingsVisible ? null : - - } - { - !this.state.editLinkSettingsVisible ? null : - - } - { - !this.state.settingsVisible ? null : - - } - { - !this.state.collaborationVisible ? null : - - } - - {appOptions.isDocReady && - - - - - } + + + {/* Top Navbar */} + + {!isHideLogo && +
{ + window.open(`${__PUBLISHER_URL__}`, "_blank"); + }}> + +
+ } + + + + +
- - - {/* hidden component*/} -
+ this.handleClickToOpenOptions('add', {panels: panels, button: button})} /> + {/* Page content */} + + {isShowPlaceholder ? +
+
+
+
: + null + } + + {!this.state.editOptionsVisible ? null : } + {!this.state.addOptionsVisible ? null : + + } + {!this.state.addLinkSettingsVisible ? null : + + } + {!this.state.editLinkSettingsVisible ? null : + + } + {!this.state.settingsVisible ? null : } + {!this.state.collaborationVisible ? null : + + } + {appOptions.isDocReady && + + + + + } + + + {/* hidden component*/} +
+ ) } } diff --git a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx index 99149ebb81..3d506e7578 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx @@ -1,24 +1,23 @@ -import React, {Component, useEffect} from 'react'; -import {View,Page,Navbar,NavTitle,NavRight,Link,Popup,Popover,Icon,Tabs,Tab} from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {f7} from 'framework7-react'; -import { observer, inject } from "mobx-react"; -import {Device} from '../../../../../common/mobile/utils/device'; - -import {AddChartController} from "../../controller/add/AddChart"; -import {AddFunctionController} from "../../controller/add/AddFunction"; -import {PageFunctionGroup, PageFunctionInfo} from "./AddFunction"; -import AddShapeController from "../../controller/add/AddShape"; -import {AddOtherController} from "../../controller/add/AddOther"; -import {AddImageController} from "../../controller/add/AddImage"; -import {PageImageLinkSettings} from "./AddImage"; -import {AddLinkController} from "../../controller/add/AddLink"; -import {EditLinkController} from "../../controller/edit/EditLink"; -import {PageTypeLink, PageSheet} from "./AddLink"; -import {PageEditTypeLink, PageEditSheet} from "../../view/edit/EditLink"; +import React, { useContext, useEffect } from 'react'; +import { View, Popup, Popover, f7 } from 'framework7-react'; +import { Device } from '../../../../../common/mobile/utils/device'; +import { PageFunctionGroup, PageFunctionInfo } from "./AddFunction"; +import { AddImageController } from "../../controller/add/AddImage"; +import { PageImageLinkSettings } from "./AddImage"; +import { AddLinkController } from "../../controller/add/AddLink"; +import { EditLinkController } from "../../controller/edit/EditLink"; +import { PageTypeLink, PageSheet } from "./AddLink"; +import { PageEditTypeLink, PageEditSheet } from "../../view/edit/EditLink"; import AddFilterController from "../../controller/add/AddFilter"; +import AddingPage from './AddingPage'; +import { MainContext } from '../../page/main'; const routes = [ + { + path: '/adding-page/', + component: AddingPage, + keepAlive: true + }, // Functions { path: '/add-function-group/', @@ -76,201 +75,31 @@ routes.forEach(route => { }; }); -const AddLayoutNavbar = ({ tabs, inPopover }) => { - const isAndroid = Device.android; +const AddView = props => { + const mainContext = useContext(MainContext); - if(!tabs.length) return null; - - return ( - - {tabs.length > 1 ? -
- {tabs.map((item, index) => - - - )} - {isAndroid && } -
: {tabs[0].caption} - } - { !inPopover && } -
- ) -}; - -const AddLayoutContent = ({ tabs }) => { - if(!tabs.length) return null; - - return ( - - {tabs.map((item, index) => - - {item.component} - - )} - - ) -}; - -const AddTabs = props => { - const { t } = useTranslation(); - const _t = t('View.Add', {returnObjects: true}); - const wsLock = props.wsLock; - const wsProps = props.wsProps; - const showPanels = props.showPanels; - const tabs = []; - - if(!wsProps.Objects) { - if (!showPanels) { - tabs.push({ - caption: _t.textChart, - id: 'add-chart', - icon: 'icon-add-chart', - component: - }); - } - if (!showPanels || showPanels === 'function') { - tabs.push({ - caption: _t.textFunction, - id: 'add-function', - icon: 'icon-add-formula', - component: - }); - } - if (!showPanels || showPanels.indexOf('shape') > 0) { - tabs.push({ - caption: _t.textShape, - id: 'add-shape', - icon: 'icon-add-shape', - component: - }); - } - - // if (showPanels && showPanels.indexOf('image') !== -1) { - // tabs.push({ - // caption: _t.textImage, - // id: 'add-image', - // icon: 'icon-add-image', - // component: - // }); - // } - } - - if (!showPanels && (!wsProps.InsertHyperlinks || !wsProps.Objects || !wsProps.Sort)) { - tabs.push({ - caption: _t.textOther, - id: 'add-other', - icon: 'icon-add-other', - component: - }); - } - - // if (((showPanels && showPanels === 'hyperlink') || props.isAddShapeHyperlink) && !wsProps.InsertHyperlinks) { - // tabs.push({ - // caption: _t.textAddLink, - // id: 'add-link', - // icon: 'icon-link', - // component: - // }); - // } - - if(!tabs.length) { - if (Device.phone) { - f7.popup.close('.add-popup', false); - } else { - f7.popover.close('#add-popover', false); - } - - return null; - } - - return ( - - - - - - - ) -}; - -class AddView extends Component { - constructor(props) { - super(props); - - this.onoptionclick = this.onoptionclick.bind(this); - } - onoptionclick(page, props){ - f7.views.current.router.navigate(page, props); - } - render() { - const show_popover = this.props.usePopover; - return ( - show_popover ? - this.props.onclosed()}> - - : - this.props.onclosed()}> - - - ) - } -} - -const Add = props => { - const api = Common.EditorApi.get(); - const cellinfo = api.asc_getCellInfo(); - const seltype = cellinfo.asc_getSelectionType(); - const iscelllocked = cellinfo.asc_getLocked(); - const isAddShapeHyperlink = api.asc_canAddShapeHyperlink(); - - let options; - useEffect(() => { - if ( Device.phone ) { + if(Device.phone) { f7.popup.open('.add-popup'); } else { const targetElem = !props.showOptions || !props.showOptions.button ? '#btn-add' : props.showOptions.button; f7.popover.open('#add-popover', targetElem); } + }, []); - return () => { - // component will unmount - } - }); + return ( + !Device.phone ? + mainContext.closeOptions('add')}> + + + + : + mainContext.closeOptions('add')}> + + + + + ) +} - const onviewclosed = () => { - if ( props.onclosed ) { - props.onclosed(); - } - }; - - if ( !iscelllocked ) { - options = props.showOptions; - if ( !options ) { - switch (seltype) { - case Asc.c_oAscSelectionType.RangeCells: - case Asc.c_oAscSelectionType.RangeRow: - case Asc.c_oAscSelectionType.RangeCol: - case Asc.c_oAscSelectionType.RangeMax: break; - case Asc.c_oAscSelectionType.RangeImage: - case Asc.c_oAscSelectionType.RangeShape: - case Asc.c_oAscSelectionType.RangeChart: - case Asc.c_oAscSelectionType.RangeChartText: - case Asc.c_oAscSelectionType.RangeShapeText: - options = {panels: ['image','shape']}; - break; - } - } - } - - return -}; - -export default Add; \ No newline at end of file +export default AddView; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddFunction.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddFunction.jsx index 82cc52a230..fcb8e6c76a 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddFunction.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddFunction.jsx @@ -1,7 +1,7 @@ -import React, {Fragment, useState} from 'react'; -import {observer, inject} from "mobx-react"; +import React, { Fragment } from 'react'; +import { observer, inject } from "mobx-react"; import { useTranslation } from 'react-i18next'; -import {List, ListItem, Page, Navbar, Icon, BlockTitle} from 'framework7-react'; +import { List, ListItem, Page, Navbar, Icon, BlockTitle, f7 } from 'framework7-react'; const PageInfo = props => { const { t } = useTranslation(); @@ -94,6 +94,10 @@ const AddFunction = props => { }) } + const onOptionClick = (page, props) => { + f7.views.current.router.navigate(page, props); + } + return ( @@ -105,15 +109,14 @@ const AddFunction = props => { link='#' onClick={() => {props.onInsertFunction(f.type);}} > -
{ - props.onOptionClick('/add-function-info/', { - props: { - functionInfo: f - } - }); - event.stopPropagation(); - }}> +
{ + onOptionClick('/add-function-info/', { + props: { + functionInfo: f + } + }); + e.stopPropagation(); + }}>
diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx index 63383b80ee..92613a6c8e 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx @@ -117,15 +117,16 @@ const AddLink = props => { }}/> } {typeLink === 'ext' && - { - setLink(event.target.value); + { + setLink(event.target.value); if(stateAutoUpdate && !displayDisabled) setDisplayText(event.target.value); - }} - className={isIos ? 'list-input-right' : ''} + }} /> } {typeLink === 'int' && diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddOther.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddOther.jsx index 23ad2f5533..972dcd2b47 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddOther.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddOther.jsx @@ -1,7 +1,8 @@ -import React from 'react'; +import React, { useContext } from 'react'; import { inject, observer } from 'mobx-react'; import {List, ListItem, Icon} from 'framework7-react'; import { useTranslation } from 'react-i18next'; +import { MainContext } from '../../page/main'; const AddOther = inject("storeFocusObjects", "storeAppOptions")(observer(props => { const { t } = useTranslation(); @@ -11,7 +12,8 @@ const AddOther = inject("storeFocusObjects", "storeAppOptions")(observer(props = const canModifyFilter = storeAppOptions.canModifyFilter; const isHyperLink = storeFocusObjects.selections.indexOf('hyperlink') > -1; const hideAddComment = props.hideAddComment(); - const wsProps = props.wsProps; + const mainContext = useContext(MainContext); + const wsProps = mainContext.wsProps; return ( @@ -28,7 +30,6 @@ const AddOther = inject("storeFocusObjects", "storeAppOptions")(observer(props = diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx new file mode 100644 index 0000000000..f31e2f8811 --- /dev/null +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx @@ -0,0 +1,130 @@ +import React, { useContext } from 'react'; +import { Page, Navbar, NavTitle, NavRight, Link, Icon, Tabs, Tab, f7 } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { AddChartController } from "../../controller/add/AddChart"; +import { AddFunctionController } from "../../controller/add/AddFunction"; +import AddShapeController from "../../controller/add/AddShape"; +import { AddOtherController } from "../../controller/add/AddOther"; +import { Device } from "../../../../../common/mobile/utils/device"; +import { MainContext } from '../../page/main'; +import { AddingContext } from '../../controller/add/Add'; + +const AddLayoutNavbar = ({ tabs }) => { + const isAndroid = Device.android; + if(!tabs.length) return null; + + return ( + + {tabs.length > 1 ? +
+ {tabs.map((item, index) => + + + )} + {isAndroid && } +
: {tabs[0].caption} + } + {Device.phone && } +
+ ) +}; + +const AddLayoutContent = ({ tabs }) => { + if(!tabs.length) return null; + + return ( + + {tabs.map((item, index) => + + {item.component} + + )} + + ) +}; + +const AddingPage = () => { + const { t } = useTranslation(); + const _t = t('View.Add', {returnObjects: true}); + const mainContext = useContext(MainContext); + const addingContext = useContext(AddingContext); + // const wsLock = mainContext.wsLock; + const wsProps = mainContext.wsProps; + const showPanels = addingContext.showPanels; + const tabs = []; + + if(!wsProps.Objects) { + if(!showPanels) { + tabs.push({ + caption: _t.textChart, + id: 'add-chart', + icon: 'icon-add-chart', + component: + }); + } + + if(!showPanels || showPanels === 'function') { + tabs.push({ + caption: _t.textFunction, + id: 'add-function', + icon: 'icon-add-formula', + component: + }); + } + + if(!showPanels || showPanels.indexOf('shape') > 0) { + tabs.push({ + caption: _t.textShape, + id: 'add-shape', + icon: 'icon-add-shape', + component: + }); + } + + // if (showPanels && showPanels.indexOf('image') !== -1) { + // tabs.push({ + // caption: _t.textImage, + // id: 'add-image', + // icon: 'icon-add-image', + // component: + // }); + // } + } + + if (!showPanels && (!wsProps.InsertHyperlinks || !wsProps.Objects || !wsProps.Sort)) { + tabs.push({ + caption: _t.textOther, + id: 'add-other', + icon: 'icon-add-other', + component: + }); + } + + // if (((showPanels && showPanels === 'hyperlink') || props.isAddShapeHyperlink) && !wsProps.InsertHyperlinks) { + // tabs.push({ + // caption: _t.textAddLink, + // id: 'add-link', + // icon: 'icon-link', + // component: + // }); + // } + + if(!tabs.length) { + if (Device.phone) { + f7.popup.close('.add-popup', false); + } else { + f7.popover.close('#add-popover', false); + } + + return null; + } + + return ( + + + + + ) +}; + +export default AddingPage; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx index 33e6832866..b4f4da120c 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx @@ -1,28 +1,24 @@ -import React, {useState, useEffect} from 'react'; -import {observer, inject} from "mobx-react"; -import { Popover, Sheet, View, Page, Navbar, NavRight, NavLeft, NavTitle, Tabs, Tab, Link } from 'framework7-react'; +import React, { useContext, useEffect } from 'react'; +import { Popover, Sheet, View } from 'framework7-react'; import { f7 } from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {Device} from '../../../../../common/mobile/utils/device'; - -import EditCellController from "../../controller/edit/EditCell"; -import EditShapeController from "../../controller/edit/EditShape"; -import EditImageController from "../../controller/edit/EditImage"; -import EditTextController from "../../controller/edit/EditText"; -import EditChartController from "../../controller/edit/EditChart"; +import { Device } from '../../../../../common/mobile/utils/device'; // import { EditLinkController } from "../../controller/edit/EditLink"; - import { PageShapeStyle, PageShapeStyleNoFill, PageReplaceContainer, PageReorderContainer, PageShapeBorderColor, PageShapeCustomBorderColor, PageShapeCustomFillColor } from './EditShape'; import { PageImageReplace, PageImageReorder, PageLinkSettings } from './EditImage'; import { TextColorCell, FillColorCell, CustomTextColorCell, CustomFillColorCell, FontsCell, TextFormatCell, TextOrientationCell, BorderStyleCell, BorderColorCell, CustomBorderColorCell, BorderSizeCell, PageFormatCell, PageAccountingFormatCell, PageCurrencyFormatCell, PageDateFormatCell, PageTimeFormatCell, CellStyle, PageCreationCustomFormat, CustomFormats } from './EditCell'; import { PageTextFonts, PageTextFontColor, PageTextCustomFontColor } from './EditText'; import { PageChartDesign, PageChartDesignType, PageChartDesignStyle, PageChartDesignFill, PageChartDesignBorder, PageChartCustomFillColor, PageChartBorderColor, PageChartCustomBorderColor, PageChartReorder, PageChartLayout, PageLegend, PageChartTitle, PageHorizontalAxisTitle, PageVerticalAxisTitle, PageHorizontalGridlines, PageVerticalGridlines, PageDataLabels, PageChartVerticalAxis, PageVertAxisCrosses, PageDisplayUnits, PageVertMajorType, PageVertMinorType, PageVertLabelPosition, PageChartHorizontalAxis, PageHorAxisCrosses, PageHorAxisPosition, PageHorMajorType, PageHorMinorType, PageHorLabelPosition } from './EditChart'; import { PageEditTypeLink, PageEditSheet } from './EditLink'; +import EditingPage from './EditingPage'; +import { MainContext } from '../../page/main'; const routes = [ - + { + path: '/editing-page/', + component: EditingPage, + keepAlive: true + }, // Shape - { path: '/edit-style-shape/', component: PageShapeStyle @@ -306,188 +302,34 @@ routes.forEach(route => { }; }); -const EmptyEditLayout = () => { - const { t } = useTranslation(); - const _t = t('View.Edit', {returnObjects: true}); - return ( - -
-
-

{_t.textSelectObjectToEdit}

-
-
-
- ) -}; +const EditView = () => { + const mainContext = useContext(MainContext); + // const api = Common.EditorApi.get(); + // const cellinfo = api.asc_getCellInfo(); + // const hyperinfo = cellinfo.asc_getHyperlink(); + // const isAddShapeHyperlink = api.asc_canAddShapeHyperlink(); -const EditLayoutNavbar = ({ editors, inPopover }) => { - const isAndroid = Device.android; - const { t } = useTranslation(); - const _t = t('View.Edit', {returnObjects: true}); - - if(!editors.length) return null; + useEffect(() => { + if(Device.phone) { + f7.sheet.open('#edit-sheet'); + } else { + f7.popover.open('#edit-popover', '#btn-edit'); + } + }, []); return ( - - { - editors.length > 1 ? -
- {editors.map((item, index) => {item.caption})} - {isAndroid && } -
: { editors[0].caption } - } - { !inPopover && } -
- ) -}; - -const EditLayoutContent = ({ editors }) => { - if(!editors.length) return null; - - if (editors.length > 1) { - return ( - - {editors.map((item, index) => - - {item.component} - - )} - - ) - } else { - return ( - - {editors[0].component} - - ) - } -}; - -const EditTabs = props => { - const { t } = useTranslation(); - const _t = t('View.Edit', {returnObjects: true}); - const store = props.storeFocusObjects; - const wsProps = props.wsProps; - const settings = !store.focusOn ? [] : (store.focusOn === 'obj' ? store.objects : store.selections); - let editors = []; - - if (settings.length < 1) { - editors.push({ - caption: _t.textSettings, - component: - }); - } else { - if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) { - editors.push({ - caption: _t.textImage, - id: 'edit-image', - component: - }) - } - if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) { - editors.push({ - caption: _t.textShape, - id: 'edit-shape', - component: - }) - } - if (settings.indexOf('cell') > -1) { - editors.push({ - caption: _t.textCell, - id: 'edit-text', - component: - }) - } - if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) { - editors.push({ - caption: _t.textChart, - id: 'edit-chart', - component: - }) - } - if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) { - editors.push({ - caption: _t.textText, - id: 'edit-text', - component: - }) - } - - // if(!wsProps.Objects) { - // if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) { - // editors.push({ - // caption: _t.textHyperlink, - // id: 'edit-link', - // component: - // }) - // } - // } - } - - if(!editors.length) { - if (Device.phone) { - f7.sheet.close('#edit-sheet', false); - } else { - f7.popover.close('#edit-popover', false); - } - - return null; - } - - return ( - - - - - - - - ) -}; - -const EditTabsContainer = inject("storeFocusObjects")(observer(EditTabs)); - -const EditView = props => { - const onOptionClick = (page) => { - $f7.views.current.router.navigate(page); - }; - const show_popover = props.usePopover; - return ( - show_popover ? - props.onClosed()}> - + !Device.phone ? + mainContext.closeOptions('edit')}> + + + : - props.onClosed()}> - + mainContext.closeOptions('edit')}> + + + ) }; -const EditOptions = props => { - const api = Common.EditorApi.get(); - const cellinfo = api.asc_getCellInfo(); - const hyperinfo = cellinfo.asc_getHyperlink(); - const isAddShapeHyperlink = api.asc_canAddShapeHyperlink(); - - useEffect(() => { - if ( Device.phone ) - f7.sheet.open('#edit-sheet'); - else f7.popover.open('#edit-popover', '#btn-edit'); - - return () => { - // component will unmount - } - }); - - const onviewclosed = () => { - if ( props.onclosed ) { - props.onclosed(); - } - }; - - return ( - - ) -}; - -export default EditOptions; \ No newline at end of file +export default EditView; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditingPage.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditingPage.jsx new file mode 100644 index 0000000000..f4a7c373e9 --- /dev/null +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditingPage.jsx @@ -0,0 +1,155 @@ +import React, { useContext } from 'react'; +import { observer, inject } from "mobx-react"; +import { Page, Navbar, NavRight, NavTitle, Tabs, Tab, Link, f7 } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import EditCellController from "../../controller/edit/EditCell"; +import EditShapeController from "../../controller/edit/EditShape"; +import EditImageController from "../../controller/edit/EditImage"; +import EditTextController from "../../controller/edit/EditText"; +import EditChartController from "../../controller/edit/EditChart"; +import { Device } from "../../../../../common/mobile/utils/device"; +import { MainContext } from '../../page/main'; + +const EmptyEditLayout = () => { + const { t } = useTranslation(); + const _t = t('View.Edit', {returnObjects: true}); + + return ( + +
+
+

{_t.textSelectObjectToEdit}

+
+
+
+ ) +}; + +const EditLayoutNavbar = ({ editors }) => { + const isAndroid = Device.android; + const { t } = useTranslation(); + const _t = t('View.Edit', {returnObjects: true}); + + if(!editors.length) return null; + + return ( + + {editors.length > 1 ? +
+ {editors.map((item, index) => {item.caption})} + {isAndroid && } +
: + {editors[0].caption} + } + {Device.phone && + + + + } +
+ ) +}; + +const EditLayoutContent = ({ editors }) => { + if(!editors.length) return null; + + if (editors.length > 1) { + return ( + + {editors.map((item, index) => + + {item.component} + + )} + + ) + } else { + return ( + + {editors[0].component} + + ) + } +}; + +const EditingPage = inject('storeFocusObjects')(observer(props => { + const { t } = useTranslation(); + const _t = t('View.Edit', {returnObjects: true}); + const mainContext = useContext(MainContext); + const store = props.storeFocusObjects; + const wsProps = mainContext.wsProps; + const settings = !store.focusOn ? [] : (store.focusOn === 'obj' ? store.objects : store.selections); + let editors = []; + + if (settings.length < 1) { + editors.push({ + caption: _t.textSettings, + component: + }); + } else { + if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) { + editors.push({ + caption: _t.textImage, + id: 'edit-image', + component: + }) + } + if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) { + editors.push({ + caption: _t.textShape, + id: 'edit-shape', + component: + }) + } + if (settings.indexOf('cell') > -1) { + editors.push({ + caption: _t.textCell, + id: 'edit-text', + component: + }) + } + if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) { + editors.push({ + caption: _t.textChart, + id: 'edit-chart', + component: + }) + } + if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) { + editors.push({ + caption: _t.textText, + id: 'edit-text', + component: + }) + } + + // if(!wsProps.Objects) { + // if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) { + // editors.push({ + // caption: _t.textHyperlink, + // id: 'edit-link', + // component: + // }) + // } + // } + } + + if(!editors.length) { + if (Device.phone) { + f7.sheet.close('#edit-sheet', false); + } else { + f7.popover.close('#edit-popover', false); + } + + return null; + } + + return ( + + + + + ) +})); + +export default EditingPage; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx index a5f741637b..03ccc6ac38 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx @@ -1,24 +1,24 @@ -import React, {Component, useEffect} from 'react'; -import {View,Page,Navbar,NavRight,Link,Popup,Popover,Icon,ListItem,List} from 'framework7-react'; -import { useTranslation } from 'react-i18next'; -import {f7} from 'framework7-react'; -import {Device} from '../../../../../common/mobile/utils/device'; -import { observer, inject } from "mobx-react"; +import React, { useContext, useEffect } from 'react'; +import { View, Popup, Popover, f7 } from 'framework7-react'; +import { Device } from '../../../../../common/mobile/utils/device'; import SpreadsheetSettingsController from '../../controller/settings/SpreadsheetSettings.jsx'; import ApplicationSettingsController from '../../controller/settings/ApplicationSettings.jsx'; import SpreadsheetInfoController from '../../controller/settings/SpreadsheetInfo.jsx'; -import {DownloadWithTranslation} from '../../controller/settings/Download.jsx'; -import {SpreadsheetColorSchemes, SpreadsheetFormats, SpreadsheetMargins} from './SpreadsheetSettings.jsx'; -import {MacrosSettings, RegionalSettings, FormulaLanguage} from './ApplicationSettings.jsx'; +import { DownloadWithTranslation } from '../../controller/settings/Download.jsx'; +import { SpreadsheetColorSchemes, SpreadsheetFormats, SpreadsheetMargins } from './SpreadsheetSettings.jsx'; +import { MacrosSettings, RegionalSettings, FormulaLanguage } from './ApplicationSettings.jsx'; // import SpreadsheetAbout from './SpreadsheetAbout.jsx'; import About from '../../../../../common/mobile/lib/view/About'; import { Direction } from '../../../../../spreadsheeteditor/mobile/src/view/settings/ApplicationSettings'; -import SharingSettings from "../../../../../common/mobile/lib/view/SharingSettings"; +// import SharingSettings from "../../../../../common/mobile/lib/view/SharingSettings"; +import SettingsPage from './SettingsPage'; +import { MainContext } from '../../page/main'; const routes = [ { - path: '/', - component: 'TSettingsView' + path: '/settings-page/', + component: SettingsPage, + keepAlive: true }, { path: '/spreadsheet-settings/', @@ -77,210 +77,30 @@ routes.forEach(route => { }; }); -const SettingsList = inject("storeAppOptions")(observer(props => { - const { t } = useTranslation(); - const _t = t('View.Settings', {returnObjects: true}); - const navbar = - {!props.inPopover && {_t.textDone}} - ; +const SettingsView = () => { + const mainContext = useContext(MainContext); - const onoptionclick = page => { - if ( props.onOptionClick ) - props.onOptionClick(page) - }; - - const closeModal = () => { - if (Device.phone) { - f7.sheet.close('.settings-popup', false); + useEffect(() => { + if(Device.phone) { + f7.popup.open('.settings-popup'); } else { - f7.popover.close('#settings-popover', false); + f7.popover.open('#settings-popover', '#btn-settings'); } - }; + }, []); - const onOpenCollaboration = async () => { - await closeModal(); - await props.openOptions('coauth'); - } - - const onPrint = () => { - const api = Common.EditorApi.get(); - - closeModal(); - setTimeout(() => { - api.asc_Print(); - }, 400); - }; - - const showHelp = () => { - // let url = '{{HELP_URL}}'; - // let url = 'https://helpcenter.onlyoffice.com'; - let url = __HELP_URL__; - - if (url.charAt(url.length-1) !== '/') { - url += '/'; - } - - if (Device.sailfish || Device.android) { - url+='mobile-applications/documents/mobile-web-editors/android/index.aspx'; - } - else { - url+='mobile-applications/documents/mobile-web-editors/ios/index.aspx'; - } - - closeModal(); - window.open(url, "_blank"); - }; - - const showFeedback = () => { - let config = props.storeAppOptions.config; - - closeModal(); - if(config && !!config.feedback && !!config.feedback.url) { - window.open(config.feedback.url, "_blank"); - } else window.open(__SUPPORT_URL__, "_blank"); - }; - - const appOptions = props.storeAppOptions; - let _isEdit = false, - _canDownload = false, - _canDownloadOrigin = false, - _canAbout = true, - _canHelp = true, - _canPrint = false, - _canFeedback = true; - - if (appOptions.isDisconnected) { - _isEdit = false; - if (!appOptions.enableDownload) - _canPrint = _canDownload = _canDownloadOrigin = false; - } else { - _isEdit = appOptions.isEdit; - _canDownload = appOptions.canDownload; - _canDownloadOrigin = appOptions.canDownloadOrigin; - _canPrint = appOptions.canPrint; - - if (appOptions.customization && appOptions.canBrandingExt) { - _canAbout = appOptions.customization.about !== false; - } - - if (appOptions.customization) { - _canHelp = appOptions.customization.help !== false; - _canFeedback = appOptions.customization.feedback !== false; - } - } - - const onDownloadOrigin = () => { - closeModal(); - setTimeout(() => { - Common.EditorApi.get().asc_DownloadOrigin(); - }, 0); - }; - return ( - - - {navbar} - - {!props.inPopover && - - - - } - {window.matchMedia("(max-width: 359px)").matches ? - - - - : null} - {_isEdit && - - - - } - - - - {_canDownload && - - - - } - {_canDownloadOrigin && - - - - } - {_canPrint && - - - - } - - - - {_canHelp && - - - - } - {_canAbout && - - - - } - {_canFeedback && - - - - } - - - + !Device.phone ? + mainContext.closeOptions('settings')}> + + + + : + mainContext.closeOptions('settings')}> + + + + ) -})); - -class SettingsView extends Component { - constructor(props) { - super(props); - - this.onoptionclick = this.onoptionclick.bind(this); - } - - onoptionclick(page){ - f7.views.current.router.navigate(page); - } - - render() { - const show_popover = this.props.usePopover; - return ( - show_popover ? - this.props.onclosed()}> - - : - this.props.onclosed()}> - - - ) - } } -const Settings = props => { - useEffect(() => { - if ( Device.phone ) - f7.popup.open('.settings-popup'); - else f7.popover.open('#settings-popover', '#btn-settings'); - - return () => { - } - }); - - - const onviewclosed = () => { - if ( props.onclosed ) { - props.onclosed(); - } - }; - - return -}; - -export default Settings; \ No newline at end of file +export default SettingsView; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx new file mode 100644 index 0000000000..cc13fc48e6 --- /dev/null +++ b/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx @@ -0,0 +1,112 @@ +import React, { useContext } from 'react'; +import { Page, Navbar, NavRight, Link, Icon, ListItem, List, f7 } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { Device } from '../../../../../common/mobile/utils/device'; +import { observer, inject } from "mobx-react"; +import { MainContext } from '../../page/main'; +import { SettingsContext } from '../../controller/settings/Settings'; + +const SettingsPage = inject('storeAppOptions')(observer(props => { + const { t } = useTranslation(); + const appOptions = props.storeAppOptions; + const mainContext = useContext(MainContext); + const settingsContext = useContext(SettingsContext); + const _t = t('View.Settings', {returnObjects: true}); + const navbar = + {Device.phone && {_t.textDone}} + ; + + const onOpenOptions = name => { + settingsContext.closeModal(); + mainContext.openOptions(name); + } + + let _isEdit = false, + _canDownload = false, + _canDownloadOrigin = false, + _canAbout = true, + _canHelp = true, + _canPrint = false, + _canFeedback = true; + + if (appOptions.isDisconnected) { + _isEdit = false; + if (!appOptions.enableDownload) + _canPrint = _canDownload = _canDownloadOrigin = false; + } else { + _isEdit = appOptions.isEdit; + _canDownload = appOptions.canDownload; + _canDownloadOrigin = appOptions.canDownloadOrigin; + _canPrint = appOptions.canPrint; + + if (appOptions.customization && appOptions.canBrandingExt) { + _canAbout = appOptions.customization.about !== false; + } + + if (appOptions.customization) { + _canHelp = appOptions.customization.help !== false; + _canFeedback = appOptions.customization.feedback !== false; + } + } + + return ( + + {navbar} + + {!props.inPopover && + + + + } + {window.matchMedia("(max-width: 359px)").matches ? + onOpenOptions('coauth')} className='no-indicator'> + + + : null} + {_isEdit && + + + + } + + + + {_canDownload && + + + + } + {_canDownloadOrigin && + + + + } + {_canPrint && + + + + } + + + + {_canHelp && + + + + } + {_canAbout && + + + + } + {_canFeedback && + + + + } + + + ) +})); + +export default SettingsPage; \ No newline at end of file From cc617035b213c7c755a9b5cd788f23318abf1648 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 10 Aug 2023 17:07:11 +0300 Subject: [PATCH 19/22] [DE PE mobile] Corrected add and app settings --- .../mobile/src/view/add/Add.jsx | 3 ++- .../src/controller/settings/Settings.jsx | 12 ++++++++- .../mobile/src/view/add/Add.jsx | 3 ++- .../mobile/src/view/settings/SettingsPage.jsx | 26 +++++++------------ 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/add/Add.jsx b/apps/documenteditor/mobile/src/view/add/Add.jsx index efba3a347a..5bfdd48011 100644 --- a/apps/documenteditor/mobile/src/view/add/Add.jsx +++ b/apps/documenteditor/mobile/src/view/add/Add.jsx @@ -14,7 +14,8 @@ import { MainContext } from '../../page/main'; const routes = [ { path: '/adding-page/', - component: AddingPage + component: AddingPage, + keepAlive: true }, // Image { diff --git a/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx b/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx index 5e6d9fe8b1..594d3de497 100644 --- a/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx @@ -1,10 +1,19 @@ import React, { createContext } from 'react'; import { Device } from '../../../../../common/mobile/utils/device'; import SettingsView from '../../view/settings/Settings'; +import { f7 } from 'framework7-react'; export const SettingsContext = createContext(); const SettingsController = () => { + const closeModal = () => { + if (Device.phone) { + f7.sheet.close('.settings-popup', false); + } else { + f7.popover.close('#settings-popover', false); + } + }; + const onPrint = () => { const api = Common.EditorApi.get(); @@ -55,7 +64,8 @@ const SettingsController = () => { onPrint, showHelp, showFeedback, - onDownloadOrigin + onDownloadOrigin, + closeModal }}> diff --git a/apps/presentationeditor/mobile/src/view/add/Add.jsx b/apps/presentationeditor/mobile/src/view/add/Add.jsx index 6798b68744..83ae10ac50 100644 --- a/apps/presentationeditor/mobile/src/view/add/Add.jsx +++ b/apps/presentationeditor/mobile/src/view/add/Add.jsx @@ -14,7 +14,8 @@ import { MainContext } from '../../page/main'; const routes = [ { path: '/adding-page/', - component: AddingPage + component: AddingPage, + keepAlive: true }, // Image { diff --git a/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx b/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx index 01a677c5a6..b2e951472d 100644 --- a/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx @@ -18,17 +18,9 @@ const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings')(observer( {Device.phone && {_t.textDone}} ; - const closeModal = () => { - if (Device.phone) { - f7.sheet.close('.settings-popup', false); - } else { - f7.popover.close('#settings-popover', false); - } - }; - - const onOpenCollaboration = () => { - closeModal(); - mainContext.openOptions('coauth'); + const onOpenOptions = name => { + settingsContext.closeModal(); + mainContext.openOptions(name); } let _isEdit = false, @@ -64,12 +56,12 @@ const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings')(observer( {navbar} {!props.inPopover && - + } {window.matchMedia("(max-width: 374px)").matches ? - + onOpenOptions('coauth')} className='no-indicator'> : null} @@ -87,12 +79,12 @@ const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings')(observer( } {_canDownloadOrigin && - settingsContext.onDownloadOrigin()} className='no-indicator'> + } {_canPrint && - settingsContext.onPrint()}> + } @@ -100,7 +92,7 @@ const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings')(observer( {_canHelp && - settingsContext.showHelp()}> + } @@ -110,7 +102,7 @@ const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings')(observer( } {_canFeedback && - settingsContext.showFeedback()}> + } From 25842a6a428c222bc0a4ceab74d24d91151e57d6 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 10 Aug 2023 17:24:40 +0300 Subject: [PATCH 20/22] [common] Correct display inputs --- apps/common/mobile/resources/less/common-material.less | 4 ++++ apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 7d93db9389..393444a869 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -275,6 +275,10 @@ &.inputs-list { margin: 0; + .item-input.item-content { + padding-left: 0; + } + .item-input, .item-link { .item-inner { display: block; diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx index 92613a6c8e..fde568e2ff 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx @@ -122,7 +122,6 @@ const AddLink = props => { type="text" placeholder={_t.textRequired} value={link} - className={isIos ? 'list-input-right' : ''} onChange={(event) => { setLink(event.target.value); if(stateAutoUpdate && !displayDisabled) setDisplayText(event.target.value); @@ -142,7 +141,6 @@ const AddLink = props => { placeholder={_t.textRequired} value={range} onChange={(event) => {setRange(event.target.value)}} - className={isIos ? 'list-input-right' : ''} /> } { setDisplayText(event.target.value); setAutoUpdate(event.target.value == ''); }} - className={isIos ? 'list-input-right' : ''} /> {setScreenTip(event.target.value)}} - className={isIos ? 'list-input-right' : ''} /> From 9fd6060942204b7a5af32ba387c5594e0df085bd Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 10 Aug 2023 19:58:51 +0300 Subject: [PATCH 21/22] [PE SSE mobile] Correct translations --- .../mobile/src/view/settings/SettingsPage.jsx | 2 +- .../spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx b/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx index 18bd843d63..09b35f2cca 100644 --- a/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx @@ -74,7 +74,7 @@ const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings')(observer(
{_isEdit && - { + { if(Device.phone) { onOpenOptions('history'); } diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx index 5cc06337a6..ad0348b468 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx @@ -72,7 +72,7 @@ const SettingsPage = inject('storeAppOptions')(observer(props => { {_isEdit && - { + { if(Device.phone) { onOpenOptions('history'); } From fe03c649158d5c1fc20a0fc6954c8180c611f257 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 10 Aug 2023 20:14:02 +0300 Subject: [PATCH 22/22] [common] Removed push property --- apps/common/mobile/lib/controller/VersionHistory.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/mobile/lib/controller/VersionHistory.jsx b/apps/common/mobile/lib/controller/VersionHistory.jsx index ed2b5b1bbc..48acdca21f 100644 --- a/apps/common/mobile/lib/controller/VersionHistory.jsx +++ b/apps/common/mobile/lib/controller/VersionHistory.jsx @@ -429,7 +429,7 @@ const VersionHistoryController = inject('storeAppOptions', 'storeVersionHistory' : - props.onclosed()}> + props.onclosed()}>