diff --git a/package-lock.json b/package-lock.json index f1ba0a4033..d81313149b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -699,7 +699,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -720,12 +721,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -740,17 +743,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -867,7 +873,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -879,6 +886,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -893,6 +901,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -900,12 +909,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -924,6 +935,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1004,7 +1016,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1016,6 +1029,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -1101,7 +1115,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -1137,6 +1152,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1156,6 +1172,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -1199,12 +1216,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -1639,29 +1658,24 @@ "dev": true }, "@nebular/auth": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@nebular/auth/-/auth-4.1.0.tgz", - "integrity": "sha512-ClKY922f9sJGkJ0+66A/fYglHcHzSr9bgnBwz8EV8as83nuxYwXo7lIi4kHcE0VdY4bRAywqneSg/KusjD4+Og==" - }, - "@nebular/bootstrap": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@nebular/bootstrap/-/bootstrap-4.1.0.tgz", - "integrity": "sha512-zAwjKhZ8/s3nMmA/JEGpfU4X37hR+UARSK64bbqRpfkOowuKO2LXAweK2sw0y6fAXAUq5K977rBOzczZjqmS+g==" + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@nebular/auth/-/auth-4.1.2.tgz", + "integrity": "sha512-fLCZgQwHgI3B8Zh4+y8R6n4WP+vyrrkDH9PkrNbAWU2eMUjOh4xobkGrFZRtu/XxMS/Apq5BKV2OxrLcEh4nEQ==" }, "@nebular/eva-icons": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@nebular/eva-icons/-/eva-icons-4.1.0.tgz", - "integrity": "sha512-ZN/vBjn6fZ//aQkj8nntZMRhyC6OzxES1MK8t64fQJmG0gNb9gUrgbQEJh9o3X1ZUYd6LZgerbZ5yLGCue8+wg==" + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@nebular/eva-icons/-/eva-icons-4.1.2.tgz", + "integrity": "sha512-awIRdhtncfdJVsn1JqaZfDYM0OSeIl3PH+MQKDJ4sAw1ARAiAkfm9ia53XI/rDayhQS8rm4mK28xuXGXc/9DHw==" }, "@nebular/security": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@nebular/security/-/security-4.1.0.tgz", - "integrity": "sha512-S4u037/cmzMJo6faZE51B+cGlXimzM4irYSfMmkCr8yeuDt394urhBzTUDE7/dhW9AYo9jRAWW4i+V+wrnhOqw==" + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@nebular/security/-/security-4.1.2.tgz", + "integrity": "sha512-MdG6UkCyeiKTyzdk8gOWn8tNuZhIQPW01142l/DowSeNKiu/+Zmj8FbkM+0c1IobhLKrS/TdoUP/3SODWP9S4g==" }, "@nebular/theme": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@nebular/theme/-/theme-4.1.0.tgz", - "integrity": "sha512-pfYR7vrqcsJ0TBLXzQhk2FQbC9FXeQ5RR/timCkByswY/W87IhN10onSlLgm/DPlVvZq0T0vDBrl50/sjtU2xQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@nebular/theme/-/theme-4.1.2.tgz", + "integrity": "sha512-6V3Fk3dQTm9yJNe3wDh20ljZen8C9Btvmtuk/nQHdLOyWG7/Znkean1fgmjfEm/98rfgj01a6RksEVXYnfLcVQ==", "requires": { "intersection-observer": "0.5.0" } @@ -2164,6 +2178,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -7026,7 +7041,8 @@ "version": "2.1.1", "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -7050,13 +7066,15 @@ "version": "1.0.0", "resolved": false, "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7073,19 +7091,22 @@ "version": "1.1.0", "resolved": false, "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "resolved": false, "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": false, "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -7216,7 +7237,8 @@ "version": "2.0.3", "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -7230,6 +7252,7 @@ "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7246,6 +7269,7 @@ "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7254,13 +7278,15 @@ "version": "0.0.8", "resolved": false, "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "resolved": false, "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -7281,6 +7307,7 @@ "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -7369,7 +7396,8 @@ "version": "1.0.1", "resolved": false, "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -7383,6 +7411,7 @@ "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -7478,7 +7507,8 @@ "version": "5.1.1", "resolved": false, "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -7520,6 +7550,7 @@ "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7541,6 +7572,7 @@ "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7589,13 +7621,15 @@ "version": "1.0.2", "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "resolved": false, "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true + "dev": true, + "optional": true } } }, @@ -10396,13 +10430,15 @@ "version": "1.40.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", - "dev": true + "dev": true, + "optional": true }, "mime-types": { "version": "2.1.24", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", "dev": true, + "optional": true, "requires": { "mime-db": "1.40.0" } @@ -10955,7 +10991,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -14586,7 +14623,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -14607,12 +14645,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -14627,17 +14667,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -14754,7 +14797,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -14766,6 +14810,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -14780,6 +14825,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -14787,12 +14833,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -14811,6 +14859,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -14891,7 +14940,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -14903,6 +14953,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -14988,7 +15039,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -15024,6 +15076,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -15043,6 +15096,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -15086,12 +15140,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -18202,7 +18258,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -18223,12 +18280,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -18243,17 +18302,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -18370,7 +18432,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -18382,6 +18445,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -18396,6 +18460,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -18403,12 +18468,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -18427,6 +18494,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -18507,7 +18575,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -18519,6 +18588,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -18604,7 +18674,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -18640,6 +18711,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -18659,6 +18731,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -18702,12 +18775,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -19615,7 +19690,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -19636,12 +19712,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -19656,17 +19734,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -19783,7 +19864,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -19795,6 +19877,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -19809,6 +19892,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -19816,12 +19900,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -19840,6 +19926,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -19920,7 +20007,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -19932,6 +20020,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -20017,7 +20106,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -20053,6 +20143,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -20072,6 +20163,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -20115,12 +20207,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/package.json b/package.json index 90200b870b..eaa8ab31a2 100644 --- a/package.json +++ b/package.json @@ -40,11 +40,10 @@ "@angular/platform-browser-dynamic": "^8.0.0", "@angular/router": "^8.0.0", "@asymmetrik/ngx-leaflet": "3.0.1", - "@nebular/auth": "4.1.0", - "@nebular/bootstrap": "4.1.0", - "@nebular/eva-icons": "4.1.0", - "@nebular/security": "4.1.0", - "@nebular/theme": "4.1.0", + "@nebular/auth": "4.1.2", + "@nebular/eva-icons": "4.1.2", + "@nebular/security": "4.1.2", + "@nebular/theme": "4.1.2", "@swimlane/ngx-charts": "^10.0.0", "angular-tree-component": "7.2.0", "angular2-chartjs": "0.4.1", diff --git a/src/app/@theme/layouts/one-column/one-column.layout.ts b/src/app/@theme/layouts/one-column/one-column.layout.ts index eb8bc88e83..cc0b789a59 100644 --- a/src/app/@theme/layouts/one-column/one-column.layout.ts +++ b/src/app/@theme/layouts/one-column/one-column.layout.ts @@ -1,8 +1,4 @@ -import { AfterViewInit, Component, Inject, PLATFORM_ID, ViewChild } from '@angular/core'; -import { isPlatformBrowser } from '@angular/common'; -import { NbLayoutComponent } from '@nebular/theme'; - -import { WindowModeBlockScrollService } from '../../services/window-mode-block-scroll.service'; +import { Component } from '@angular/core'; @Component({ selector: 'ngx-one-column-layout', @@ -27,18 +23,4 @@ import { WindowModeBlockScrollService } from '../../services/window-mode-block-s `, }) -export class OneColumnLayoutComponent implements AfterViewInit { - - @ViewChild(NbLayoutComponent, { static: false }) layout: NbLayoutComponent; - - constructor( - @Inject(PLATFORM_ID) private platformId, - private windowModeBlockScrollService: WindowModeBlockScrollService, - ) {} - - ngAfterViewInit() { - if (isPlatformBrowser(this.platformId)) { - this.windowModeBlockScrollService.register(this.layout); - } - } -} +export class OneColumnLayoutComponent {} diff --git a/src/app/@theme/services/window-mode-block-scroll.service.ts b/src/app/@theme/services/window-mode-block-scroll.service.ts deleted file mode 100644 index 74fc6a4cfb..0000000000 --- a/src/app/@theme/services/window-mode-block-scroll.service.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Inject, Injectable, OnDestroy } from '@angular/core'; -import { coerceCssPixelValue } from '@angular/cdk/coercion'; -import { - NB_WINDOW, - NbLayoutComponent, - NbLayoutDimensions, - NbLayoutRulerService, - NbLayoutScrollService, - NbViewportRulerAdapter, -} from '@nebular/theme'; -import { filter, map, take, takeUntil } from 'rxjs/operators'; -import { fromEvent as observableFromEvent, merge, Subject } from 'rxjs'; - -@Injectable() -export class WindowModeBlockScrollService implements OnDestroy { - - private destroy$ = new Subject(); - - private blockEnabled = false; - private unblock$ = new Subject(); - - private container: HTMLElement; - private content: HTMLElement; - - private previousScrollPosition: { top: number, left: number }; - private previousContainerStyles: { overflowY: string }; - private previousContentStyles: { left: string, top: string, width: string, overflow: string, position: string }; - - constructor( - private scrollService: NbLayoutScrollService, - private viewportRuler: NbViewportRulerAdapter, - private layout: NbLayoutRulerService, - @Inject(NB_WINDOW) private window, - ) {} - - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - this.unblock$.complete(); - } - - register(layout: NbLayoutComponent) { - this.container = layout.scrollableContainerRef.nativeElement; - this.content = this.container.children[0] as HTMLElement; - - this.scrollService.onScrollableChange() - .pipe( - filter(() => layout.withScrollValue), - map((scrollable: boolean) => !scrollable), - takeUntil(this.destroy$), - ) - .subscribe((shouldBlock: boolean) => { - if (shouldBlock) { - this.blockScroll(); - } else { - this.unblockScroll(); - } - }); - } - - blockScroll() { - if (!this.canBeBlocked()) { - return; - } - - this.previousScrollPosition = this.viewportRuler.getViewportScrollPosition(); - this.backupStyles(); - - this.container.style.overflowY = 'scroll'; - this.content.style.overflow = 'hidden'; - this.content.style.position = 'fixed'; - this.updateContentSizeAndPosition(); - - observableFromEvent(this.window, 'resize') - .pipe( - takeUntil(merge(this.destroy$, this.unblock$).pipe(take(1))), - ) - .subscribe(() => this.updateContentSizeAndPosition()); - - this.blockEnabled = true; - } - - unblockScroll() { - if (this.blockEnabled) { - this.restoreStyles(); - this.scrollService.scrollTo(this.previousScrollPosition.left, this.previousScrollPosition.top); - this.unblock$.next(); - this.blockEnabled = false; - } - } - - private canBeBlocked(): boolean { - if (this.blockEnabled) { - return false; - } - - const { height: containerHeight } = this.viewportRuler.getViewportSize(); - return this.content.scrollHeight > containerHeight; - } - - private updateContentSizeAndPosition() { - const { top, left } = this.container.getBoundingClientRect(); - this.content.style.left = coerceCssPixelValue(-this.previousScrollPosition.left + left); - this.content.style.top = coerceCssPixelValue(-this.previousScrollPosition.top + top); - this.layout.getDimensions() - .pipe( - map(({ clientWidth }: NbLayoutDimensions) => coerceCssPixelValue(clientWidth)), - take(1), - ) - .subscribe((clientWidth: string) => this.content.style.width = clientWidth); - } - - private backupStyles() { - this.previousContainerStyles = { overflowY: this.container.style.overflowY }; - this.previousContentStyles = { - overflow: this.content.style.overflow, - position: this.content.style.position, - left: this.content.style.left, - top: this.content.style.top, - width: this.content.style.width, - }; - } - - private restoreStyles() { - this.container.style.overflowY = this.previousContainerStyles.overflowY; - this.content.style.overflow = this.previousContentStyles.overflow; - this.content.style.position = this.previousContentStyles.position; - this.content.style.left = this.previousContentStyles.left; - this.content.style.top = this.previousContentStyles.top; - this.content.style.width = this.previousContentStyles.width; - } -} diff --git a/src/app/@theme/styles/_layout.scss b/src/app/@theme/styles/_layout.scss new file mode 100644 index 0000000000..8326303360 --- /dev/null +++ b/src/app/@theme/styles/_layout.scss @@ -0,0 +1,8 @@ +@mixin ngx-layout() { + @include media-breakpoint-down(is) { + .row { + margin-left: -10px; + margin-right: -10px; + } + } +} diff --git a/src/app/@theme/styles/_overrides.scss b/src/app/@theme/styles/_overrides.scss index e28846d97b..acf7d8ac1d 100644 --- a/src/app/@theme/styles/_overrides.scss +++ b/src/app/@theme/styles/_overrides.scss @@ -1,15 +1,6 @@ @import './themes'; @mixin nb-overrides() { - // overrides bootstrap svg style - nb-icon svg { - vertical-align: top; - } - - nb-auth-block .links nb-icon { - font-size: 2.5rem; - } - nb-select.size-medium button { padding: 0.4375rem 2.2rem 0.4375rem 1.125rem !important; @@ -17,52 +8,4 @@ right: 0.41rem !important; } } - - nb-flip-card { - .front-container { - -webkit-backface-visibility: visible; - } - .back-container { - -webkit-backface-visibility: hidden; - } - - .flipped { - .front-container { - -webkit-backface-visibility: hidden; - } - .back-container { - -webkit-backface-visibility: visible; - } - } - } - - nb-layout .layout .layout-container nb-sidebar { - &, - .main-container-fixed { - top: nb-theme(header-height); - } - } - - @media screen and (min-width: nb-theme(layout-window-mode-max-width) + 20px) { - @include f-window-mode(nb-theme(layout-window-mode-padding-top) / 4); - } - - @media screen and (min-width: nb-theme(layout-window-mode-max-width) + 150px) { - @include f-window-mode(nb-theme(layout-window-mode-padding-top) / 2); - } - - @media screen and (min-width: nb-theme(layout-window-mode-max-width) + 300px) { - @include f-window-mode(nb-theme(layout-window-mode-padding-top)); - } -} - -@mixin f-window-mode ($padding-top) { - nb-layout.window-mode nb-layout-header.fixed { - top: $padding-top; - } - - nb-sidebar .main-container-fixed { - height: calc(100vh - #{nb-theme(header-height)} - #{$padding-top}) !important; - top: calc(#{nb-theme(header-height)} + #{$padding-top}) !important; - } } diff --git a/src/app/@theme/styles/styles.scss b/src/app/@theme/styles/styles.scss index 14612c594e..8cc1d9dfac 100644 --- a/src/app/@theme/styles/styles.scss +++ b/src/app/@theme/styles/styles.scss @@ -6,12 +6,16 @@ // framework component themes (styles tied to theme variables) @import '~@nebular/theme/styles/globals'; @import '~@nebular/auth/styles/all'; -@import '~@nebular/bootstrap/styles/globals'; +@import '~bootstrap/scss/functions'; +@import '~bootstrap/scss/variables'; +@import '~bootstrap/scss/mixins'; +@import '~bootstrap/scss/grid'; // loading progress bar theme @import './pace.theme'; +@import './layout'; @import './overrides'; // install the framework and custom global styles @@ -20,8 +24,8 @@ // framework global styles @include nb-theme-global(); @include nb-auth-global(); - @include nb-bootstrap-global(); + @include ngx-layout(); // loading progress bar @include ngx-pace-theme(); diff --git a/src/app/@theme/styles/theme.corporate.ts b/src/app/@theme/styles/theme.corporate.ts index a0592eee0d..ea360a1e33 100644 --- a/src/app/@theme/styles/theme.corporate.ts +++ b/src/app/@theme/styles/theme.corporate.ts @@ -1,106 +1,64 @@ -import { NbJSThemeOptions } from '@nebular/theme'; - -const palette = { - primary: '#73a1ff', - success: '#5dcfe3', - info: '#ba7fec', - warning: '#ffa36b', - danger: '#ff6b83', -}; - -const theme = { - fontMain: 'Open Sans, sans-serif', - fontSecondary: 'Raleway, sans-serif', - - bg: '#ffffff', - bg2: '#f7f9fc', - bg3: '#edf1f7', - bg4: '#e4e9f2', - - border: '#ffffff', - border2: '#f7f9fc', - border3: '#edf1f7', - border4: '#e4e9f2', - border5: '#c5cee0', - - fg: '#8f9bb3', - fgHeading: '#1a2138', - fgText: '#1a2138', - fgHighlight: palette.primary, - layoutBg: '#f7f9fc', - separator: '#edf1f7', - - primary: palette.primary, - success: palette.success, - info: palette.info, - warning: palette.warning, - danger: palette.danger, - - primaryLight: '#598bff', - successLight: '#2ce69b', - infoLight: '#42aaff', - warningLight: '#ffc94d', - dangerLight: '#ff708d', -}; +import { NbJSThemeOptions, CORPORATE_THEME as baseTheme } from '@nebular/theme'; + +const baseThemeVariables = baseTheme.variables; export const CORPORATE_THEME = { name: 'corporate', + base: 'corporate', variables: { - ...theme, - temperature: { arcFill: [ '#ffa36b', '#ffa36b', '#ff9e7a', '#ff9888', '#ff8ea0' ], - arcEmpty: theme.bg2, - thumbBg: theme.bg2, + arcEmpty: baseThemeVariables.bg2, + thumbBg: baseThemeVariables.bg2, thumbBorder: '#ffa36b', }, solar: { - gradientLeft: theme.primary, - gradientRight: theme.primary, + gradientLeft: baseThemeVariables.primary, + gradientRight: baseThemeVariables.primary, shadowColor: 'rgba(0, 0, 0, 0)', - secondSeriesFill: theme.bg2, + secondSeriesFill: baseThemeVariables.bg2, radius: ['80%', '90%'], }, traffic: { - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', yAxisSplitLine: 'rgba(0, 0, 0, 0)', - lineBg: theme.primary, + lineBg: baseThemeVariables.primary, lineShadowBlur: '0', - itemColor: theme.border4, - itemBorderColor: theme.border4, - itemEmphasisBorderColor: theme.primaryLight, + itemColor: baseThemeVariables.border4, + itemBorderColor: baseThemeVariables.border4, + itemEmphasisBorderColor: baseThemeVariables.primaryLight, shadowLineDarkBg: 'rgba(0, 0, 0, 0)', shadowLineShadow: 'rgba(0, 0, 0, 0)', - gradFrom: theme.bg, - gradTo: theme.bg, + gradFrom: baseThemeVariables.bg, + gradTo: baseThemeVariables.bg, }, electricity: { - tooltipBg: theme.bg, - tooltipLineColor: theme.fgText, + tooltipBg: baseThemeVariables.bg, + tooltipLineColor: baseThemeVariables.fgText, tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', - axisLineColor: theme.border3, - xAxisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisLineColor: baseThemeVariables.border3, + xAxisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'solid', lineWidth: '4', - lineGradFrom: theme.primary, - lineGradTo: theme.primary, + lineGradFrom: baseThemeVariables.primary, + lineGradTo: baseThemeVariables.primary, lineShadow: 'rgba(0, 0, 0, 0)', areaGradFrom: 'rgba(0, 0, 0, 0)', @@ -109,118 +67,118 @@ export const CORPORATE_THEME = { }, bubbleMap: { - titleColor: theme.fgText, - areaColor: theme.bg4, - areaHoverColor: theme.fgHighlight, - areaBorderColor: theme.border5, + titleColor: baseThemeVariables.fgText, + areaColor: baseThemeVariables.bg4, + areaHoverColor: baseThemeVariables.fgHighlight, + areaBorderColor: baseThemeVariables.border5, }, profitBarAnimationEchart: { - textColor: theme.fgText, + textColor: baseThemeVariables.fgText, - firstAnimationBarColor: theme.primary, - secondAnimationBarColor: theme.success, + firstAnimationBarColor: baseThemeVariables.primary, + secondAnimationBarColor: baseThemeVariables.success, splitLineStyleOpacity: '1', splitLineStyleWidth: '1', - splitLineStyleColor: theme.separator, + splitLineStyleColor: baseThemeVariables.separator, - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '16', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipBorderWidth: '1', tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', }, trafficBarEchart: { - gradientFrom: theme.warningLight, - gradientTo: theme.warning, - shadow: theme.warningLight, + gradientFrom: baseThemeVariables.warningLight, + gradientTo: baseThemeVariables.warning, + shadow: baseThemeVariables.warningLight, shadowBlur: '0', - axisTextColor: theme.fgText, + axisTextColor: baseThemeVariables.fgText, axisFontSize: '12', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', }, countryOrders: { - countryBorderColor: theme.border4, - countryFillColor: theme.bg4, + countryBorderColor: baseThemeVariables.border4, + countryFillColor: baseThemeVariables.bg4, countryBorderWidth: '1', - hoveredCountryBorderColor: theme.primary, - hoveredCountryFillColor: theme.primaryLight, + hoveredCountryBorderColor: baseThemeVariables.primary, + hoveredCountryFillColor: baseThemeVariables.primaryLight, hoveredCountryBorderWidth: '1', - chartAxisLineColor: theme.border4, - chartAxisTextColor: theme.fg, + chartAxisLineColor: baseThemeVariables.border4, + chartAxisTextColor: baseThemeVariables.fg, chartAxisFontSize: '16', - chartGradientTo: theme.primary, - chartGradientFrom: theme.primaryLight, - chartAxisSplitLine: theme.separator, - chartShadowLineColor: theme.primaryLight, + chartGradientTo: baseThemeVariables.primary, + chartGradientFrom: baseThemeVariables.primaryLight, + chartAxisSplitLine: baseThemeVariables.separator, + chartShadowLineColor: baseThemeVariables.primaryLight, - chartLineBottomShadowColor: theme.primary, + chartLineBottomShadowColor: baseThemeVariables.primary, - chartInnerLineColor: theme.bg2, + chartInnerLineColor: baseThemeVariables.bg2, }, echarts: { - bg: theme.bg, - textColor: theme.fgText, - axisLineColor: theme.fgText, - splitLineColor: theme.separator, + bg: baseThemeVariables.bg, + textColor: baseThemeVariables.fgText, + axisLineColor: baseThemeVariables.fgText, + splitLineColor: baseThemeVariables.separator, itemHoverShadowColor: 'rgba(0, 0, 0, 0.5)', - tooltipBackgroundColor: theme.primary, + tooltipBackgroundColor: baseThemeVariables.primary, areaOpacity: '0.7', }, chartjs: { - axisLineColor: theme.separator, - textColor: theme.fgText, + axisLineColor: baseThemeVariables.separator, + textColor: baseThemeVariables.fgText, }, orders: { - tooltipBg: theme.bg, + tooltipBg: baseThemeVariables.bg, tooltipLineColor: 'rgba(0, 0, 0, 0)', tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '20', - axisLineColor: theme.border4, + axisLineColor: baseThemeVariables.border4, axisFontSize: '16', - axisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'solid', lineWidth: '4', // first line - firstAreaGradFrom: theme.bg3, - firstAreaGradTo: theme.bg3, + firstAreaGradFrom: baseThemeVariables.bg3, + firstAreaGradTo: baseThemeVariables.bg3, firstShadowLineDarkBg: 'rgba(0, 0, 0, 0)', // second line - secondLineGradFrom: theme.primary, - secondLineGradTo: theme.primary, + secondLineGradFrom: baseThemeVariables.primary, + secondLineGradTo: baseThemeVariables.primary, secondAreaGradFrom: 'rgba(0, 0, 0, 0)', secondAreaGradTo: 'rgba(0, 0, 0, 0)', secondShadowLineDarkBg: 'rgba(0, 0, 0, 0)', // third line - thirdLineGradFrom: theme.success, - thirdLineGradTo: theme.successLight, + thirdLineGradFrom: baseThemeVariables.success, + thirdLineGradTo: baseThemeVariables.successLight, thirdAreaGradFrom: 'rgba(0, 0, 0, 0)', thirdAreaGradTo: 'rgba(0, 0, 0, 0)', @@ -228,82 +186,82 @@ export const CORPORATE_THEME = { }, profit: { - bg: theme.bg, - textColor: theme.fgText, - axisLineColor: theme.border4, - splitLineColor: theme.separator, + bg: baseThemeVariables.bg, + textColor: baseThemeVariables.fgText, + axisLineColor: baseThemeVariables.border4, + splitLineColor: baseThemeVariables.separator, areaOpacity: '1', axisFontSize: '16', - axisTextColor: theme.fg, + axisTextColor: baseThemeVariables.fg, // first bar - firstLineGradFrom: theme.bg3, - firstLineGradTo: theme.bg3, + firstLineGradFrom: baseThemeVariables.bg3, + firstLineGradTo: baseThemeVariables.bg3, firstLineShadow: 'rgba(0, 0, 0, 0)', // second bar - secondLineGradFrom: theme.primary, - secondLineGradTo: theme.primary, + secondLineGradFrom: baseThemeVariables.primary, + secondLineGradTo: baseThemeVariables.primary, secondLineShadow: 'rgba(0, 0, 0, 0)', // third bar - thirdLineGradFrom: theme.success, - thirdLineGradTo: theme.success, + thirdLineGradFrom: baseThemeVariables.success, + thirdLineGradTo: baseThemeVariables.success, thirdLineShadow: 'rgba(0, 0, 0, 0)', }, orderProfitLegend: { - firstItem: theme.success, - secondItem: theme.primary, - thirdItem: theme.bg3, + firstItem: baseThemeVariables.success, + secondItem: baseThemeVariables.primary, + thirdItem: baseThemeVariables.bg3, }, visitors: { - tooltipBg: theme.bg, + tooltipBg: baseThemeVariables.bg, tooltipLineColor: 'rgba(0, 0, 0, 0)', tooltipLineWidth: '1', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '20', - axisLineColor: theme.border4, + axisLineColor: baseThemeVariables.border4, axisFontSize: '16', - axisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'dotted', lineWidth: '6', lineGradFrom: '#ffffff', lineGradTo: '#ffffff', lineShadow: 'rgba(0, 0, 0, 0)', - areaGradFrom: theme.primary, - areaGradTo: theme.primaryLight, + areaGradFrom: baseThemeVariables.primary, + areaGradTo: baseThemeVariables.primaryLight, innerLineStyle: 'solid', innerLineWidth: '1', - innerAreaGradFrom: theme.success, - innerAreaGradTo: theme.success, + innerAreaGradFrom: baseThemeVariables.success, + innerAreaGradTo: baseThemeVariables.success, }, visitorsLegend: { - firstIcon: theme.success, - secondIcon: theme.primary, + firstIcon: baseThemeVariables.success, + secondIcon: baseThemeVariables.primary, }, visitorsPie: { - firstPieGradientLeft: theme.success, - firstPieGradientRight: theme.success, + firstPieGradientLeft: baseThemeVariables.success, + firstPieGradientRight: baseThemeVariables.success, firstPieShadowColor: 'rgba(0, 0, 0, 0)', firstPieRadius: ['65%', '90%'], - secondPieGradientLeft: theme.warning, - secondPieGradientRight: theme.warningLight, + secondPieGradientLeft: baseThemeVariables.warning, + secondPieGradientRight: baseThemeVariables.warningLight, secondPieShadowColor: 'rgba(0, 0, 0, 0)', secondPieRadius: ['63%', '92%'], shadowOffsetX: '-4', @@ -311,8 +269,8 @@ export const CORPORATE_THEME = { }, visitorsPieLegend: { - firstSection: theme.warning, - secondSection: theme.success, + firstSection: baseThemeVariables.warning, + secondSection: baseThemeVariables.success, }, earningPie: { @@ -321,28 +279,28 @@ export const CORPORATE_THEME = { fontSize: '22', - firstPieGradientLeft: theme.success, - firstPieGradientRight: theme.success, + firstPieGradientLeft: baseThemeVariables.success, + firstPieGradientRight: baseThemeVariables.success, firstPieShadowColor: 'rgba(0, 0, 0, 0)', - secondPieGradientLeft: theme.primary, - secondPieGradientRight: theme.primary, + secondPieGradientLeft: baseThemeVariables.primary, + secondPieGradientRight: baseThemeVariables.primary, secondPieShadowColor: 'rgba(0, 0, 0, 0)', - thirdPieGradientLeft: theme.warning, - thirdPieGradientRight: theme.warning, + thirdPieGradientLeft: baseThemeVariables.warning, + thirdPieGradientRight: baseThemeVariables.warning, thirdPieShadowColor: 'rgba(0, 0, 0, 0)', }, earningLine: { - gradFrom: theme.primary, - gradTo: theme.primary, + gradFrom: baseThemeVariables.primary, + gradTo: baseThemeVariables.primary, - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '16', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipBorderWidth: '1', tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', }, diff --git a/src/app/@theme/styles/theme.cosmic.ts b/src/app/@theme/styles/theme.cosmic.ts index ca3360c36e..0add1e2da6 100644 --- a/src/app/@theme/styles/theme.cosmic.ts +++ b/src/app/@theme/styles/theme.cosmic.ts @@ -1,309 +1,267 @@ -import { NbJSThemeOptions } from '@nebular/theme'; - -const palette = { - primary: '#a16eff', - success: '#00d68f', - info: '#0095ff', - warning: '#ffaa00', - danger: '#ff3d71', -}; - -const theme = { - fontMain: 'Open Sans, sans-serif', - fontSecondary: 'Raleway, sans-serif', - - bg: '#323259', - bg2: '#252547', - bg3: '#1b1b38', - bg4: '#13132b', - - border: '#323259', - border2: '#252547', - border3: '#1b1b38', - border4: '#13132b', - border5: '#13132b', - - fg: '#b4b4db', - fgHeading: '#ffffff', - fgText: '#ffffff', - fgHighlight: palette.primary, - layoutBg: '#151a30', - separator: '#151a30', - - primary: palette.primary, - success: palette.success, - info: palette.info, - warning: palette.warning, - danger: palette.danger, - - primaryLight: '#b18aff', - successLight: '#2ce69b', - infoLight: '#42aaff', - warningLight: '#ffc94d', - dangerLight: '#ff708d', -}; +import { NbJSThemeOptions, COSMIC_THEME as baseTheme } from '@nebular/theme'; + +const baseThemeVariables = baseTheme.variables; export const COSMIC_THEME = { name: 'cosmic', + base: 'cosmic', variables: { - ...theme, - temperature: { arcFill: [ '#2ec7fe', '#31ffad', '#7bff24', '#fff024', '#f7bd59' ], - arcEmpty: theme.bg2, + arcEmpty: baseThemeVariables.bg2, thumbBg: '#ffffff', thumbBorder: '#ffffff', }, solar: { - gradientLeft: theme.primary, - gradientRight: theme.primary, + gradientLeft: baseThemeVariables.primary, + gradientRight: baseThemeVariables.primary, shadowColor: 'rgba(0, 0, 0, 0)', - secondSeriesFill: theme.bg2, + secondSeriesFill: baseThemeVariables.bg2, radius: ['70%', '90%'], }, traffic: { - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'box-shadow: 0px 2px 46px 0 rgba(50, 50, 89); border-radius: 10px; padding: 4px 16px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', - yAxisSplitLine: theme.separator, + yAxisSplitLine: baseThemeVariables.separator, - lineBg: theme.border2, + lineBg: baseThemeVariables.border2, lineShadowBlur: '14', - itemColor: theme.border2, - itemBorderColor: theme.border2, - itemEmphasisBorderColor: theme.primary, - shadowLineDarkBg: theme.border3, - shadowLineShadow: theme.border3, - gradFrom: theme.bg, - gradTo: theme.bg2, + itemColor: baseThemeVariables.border2, + itemBorderColor: baseThemeVariables.border2, + itemEmphasisBorderColor: baseThemeVariables.primary, + shadowLineDarkBg: baseThemeVariables.border3, + shadowLineShadow: baseThemeVariables.border3, + gradFrom: baseThemeVariables.bg, + gradTo: baseThemeVariables.bg2, }, electricity: { - tooltipBg: theme.bg, - tooltipLineColor: theme.fgText, + tooltipBg: baseThemeVariables.bg, + tooltipLineColor: baseThemeVariables.fgText, tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'box-shadow: 0px 2px 46px 0 rgba(0, 255, 170, 0.35); border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', - axisLineColor: theme.border3, - xAxisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisLineColor: baseThemeVariables.border3, + xAxisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.border2, + itemBorderColor: baseThemeVariables.border2, lineStyle: 'dotted', lineWidth: '6', - lineGradFrom: theme.success, - lineGradTo: theme.warning, - lineShadow: theme.bg4, + lineGradFrom: baseThemeVariables.success, + lineGradTo: baseThemeVariables.warning, + lineShadow: baseThemeVariables.bg4, - areaGradFrom: theme.bg2, - areaGradTo: theme.bg3, - shadowLineDarkBg: theme.bg3, + areaGradFrom: baseThemeVariables.bg2, + areaGradTo: baseThemeVariables.bg3, + shadowLineDarkBg: baseThemeVariables.bg3, }, bubbleMap: { - titleColor: theme.fgText, - areaColor: theme.bg4, - areaHoverColor: theme.fgHighlight, - areaBorderColor: theme.border5, + titleColor: baseThemeVariables.fgText, + areaColor: baseThemeVariables.bg4, + areaHoverColor: baseThemeVariables.fgHighlight, + areaBorderColor: baseThemeVariables.border5, }, profitBarAnimationEchart: { - textColor: theme.fgText, + textColor: baseThemeVariables.fgText, - firstAnimationBarColor: theme.primary, - secondAnimationBarColor: theme.success, + firstAnimationBarColor: baseThemeVariables.primary, + secondAnimationBarColor: baseThemeVariables.success, splitLineStyleOpacity: '1', splitLineStyleWidth: '1', - splitLineStyleColor: theme.border2, + splitLineStyleColor: baseThemeVariables.border2, - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '16', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipBorderWidth: '1', tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', }, trafficBarEchart: { - gradientFrom: theme.warningLight, - gradientTo: theme.warning, - shadow: theme.warningLight, + gradientFrom: baseThemeVariables.warningLight, + gradientTo: baseThemeVariables.warning, + shadow: baseThemeVariables.warningLight, shadowBlur: '5', - axisTextColor: theme.fgText, + axisTextColor: baseThemeVariables.fgText, axisFontSize: '12', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', }, countryOrders: { - countryBorderColor: theme.border4, - countryFillColor: theme.bg3, + countryBorderColor: baseThemeVariables.border4, + countryFillColor: baseThemeVariables.bg3, countryBorderWidth: '1', - hoveredCountryBorderColor: theme.primary, - hoveredCountryFillColor: theme.primaryLight, + hoveredCountryBorderColor: baseThemeVariables.primary, + hoveredCountryFillColor: baseThemeVariables.primaryLight, hoveredCountryBorderWidth: '1', - chartAxisLineColor: theme.border4, - chartAxisTextColor: theme.fg, + chartAxisLineColor: baseThemeVariables.border4, + chartAxisTextColor: baseThemeVariables.fg, chartAxisFontSize: '16', - chartGradientTo: theme.primary, - chartGradientFrom: theme.primaryLight, - chartAxisSplitLine: theme.separator, - chartShadowLineColor: theme.primaryLight, + chartGradientTo: baseThemeVariables.primary, + chartGradientFrom: baseThemeVariables.primaryLight, + chartAxisSplitLine: baseThemeVariables.separator, + chartShadowLineColor: baseThemeVariables.primaryLight, - chartLineBottomShadowColor: theme.primary, + chartLineBottomShadowColor: baseThemeVariables.primary, - chartInnerLineColor: theme.bg2, + chartInnerLineColor: baseThemeVariables.bg2, }, echarts: { - bg: theme.bg, - textColor: theme.fgText, - axisLineColor: theme.fgText, - splitLineColor: theme.separator, + bg: baseThemeVariables.bg, + textColor: baseThemeVariables.fgText, + axisLineColor: baseThemeVariables.fgText, + splitLineColor: baseThemeVariables.separator, itemHoverShadowColor: 'rgba(0, 0, 0, 0.5)', - tooltipBackgroundColor: theme.primary, + tooltipBackgroundColor: baseThemeVariables.primary, areaOpacity: '1', }, chartjs: { - axisLineColor: theme.separator, - textColor: theme.fgText, + axisLineColor: baseThemeVariables.separator, + textColor: baseThemeVariables.fgText, }, orders: { - tooltipBg: theme.bg, + tooltipBg: baseThemeVariables.bg, tooltipLineColor: 'rgba(0, 0, 0, 0)', tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '20', - axisLineColor: theme.border4, + axisLineColor: baseThemeVariables.border4, axisFontSize: '16', - axisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'solid', lineWidth: '4', // first line - firstAreaGradFrom: theme.bg2, - firstAreaGradTo: theme.bg2, - firstShadowLineDarkBg: theme.bg2, + firstAreaGradFrom: baseThemeVariables.bg2, + firstAreaGradTo: baseThemeVariables.bg2, + firstShadowLineDarkBg: baseThemeVariables.bg2, // second line - secondLineGradFrom: theme.primary, - secondLineGradTo: theme.primary, + secondLineGradFrom: baseThemeVariables.primary, + secondLineGradTo: baseThemeVariables.primary, secondAreaGradFrom: 'rgba(161, 110, 255, 0.8)', secondAreaGradTo: 'rgba(161, 110, 255, 0.5)', - secondShadowLineDarkBg: theme.primary, + secondShadowLineDarkBg: baseThemeVariables.primary, // third line - thirdLineGradFrom: theme.success, - thirdLineGradTo: theme.successLight, + thirdLineGradFrom: baseThemeVariables.success, + thirdLineGradTo: baseThemeVariables.successLight, thirdAreaGradFrom: 'rgba(0, 214, 143, 0.7)', thirdAreaGradTo: 'rgba(0, 214, 143, 0.4)', - thirdShadowLineDarkBg: theme.success, + thirdShadowLineDarkBg: baseThemeVariables.success, }, profit: { - bg: theme.bg, - textColor: theme.fgText, - axisLineColor: theme.border4, - splitLineColor: theme.separator, + bg: baseThemeVariables.bg, + textColor: baseThemeVariables.fgText, + axisLineColor: baseThemeVariables.border4, + splitLineColor: baseThemeVariables.separator, areaOpacity: '1', axisFontSize: '16', - axisTextColor: theme.fg, + axisTextColor: baseThemeVariables.fg, // first bar - firstLineGradFrom: theme.bg2, - firstLineGradTo: theme.bg2, + firstLineGradFrom: baseThemeVariables.bg2, + firstLineGradTo: baseThemeVariables.bg2, firstLineShadow: 'rgba(0, 0, 0, 0)', // second bar - secondLineGradFrom: theme.primary, - secondLineGradTo: theme.primary, + secondLineGradFrom: baseThemeVariables.primary, + secondLineGradTo: baseThemeVariables.primary, secondLineShadow: 'rgba(0, 0, 0, 0)', // third bar - thirdLineGradFrom: theme.success, - thirdLineGradTo: theme.successLight, + thirdLineGradFrom: baseThemeVariables.success, + thirdLineGradTo: baseThemeVariables.successLight, thirdLineShadow: 'rgba(0, 0, 0, 0)', }, orderProfitLegend: { - firstItem: theme.success, - secondItem: theme.primary, - thirdItem: theme.bg2, + firstItem: baseThemeVariables.success, + secondItem: baseThemeVariables.primary, + thirdItem: baseThemeVariables.bg2, }, visitors: { - tooltipBg: theme.bg, + tooltipBg: baseThemeVariables.bg, tooltipLineColor: 'rgba(0, 0, 0, 0)', tooltipLineWidth: '1', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '20', - axisLineColor: theme.border4, + axisLineColor: baseThemeVariables.border4, axisFontSize: '16', - axisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'dotted', lineWidth: '6', lineGradFrom: '#ffffff', lineGradTo: '#ffffff', lineShadow: 'rgba(0, 0, 0, 0)', - areaGradFrom: theme.primary, - areaGradTo: theme.primaryLight, + areaGradFrom: baseThemeVariables.primary, + areaGradTo: baseThemeVariables.primaryLight, innerLineStyle: 'solid', innerLineWidth: '1', - innerAreaGradFrom: theme.success, - innerAreaGradTo: theme.success, + innerAreaGradFrom: baseThemeVariables.success, + innerAreaGradTo: baseThemeVariables.success, }, visitorsLegend: { - firstIcon: theme.success, - secondIcon: theme.primary, + firstIcon: baseThemeVariables.success, + secondIcon: baseThemeVariables.primary, }, visitorsPie: { - firstPieGradientLeft: theme.success, - firstPieGradientRight: theme.successLight, + firstPieGradientLeft: baseThemeVariables.success, + firstPieGradientRight: baseThemeVariables.successLight, firstPieShadowColor: 'rgba(0, 0, 0, 0)', firstPieRadius: ['70%', '90%'], - secondPieGradientLeft: theme.warning, - secondPieGradientRight: theme.warningLight, + secondPieGradientLeft: baseThemeVariables.warning, + secondPieGradientRight: baseThemeVariables.warningLight, secondPieShadowColor: 'rgba(0, 0, 0, 0)', secondPieRadius: ['60%', '95%'], shadowOffsetX: '0', @@ -311,8 +269,8 @@ export const COSMIC_THEME = { }, visitorsPieLegend: { - firstSection: theme.warning, - secondSection: theme.success, + firstSection: baseThemeVariables.warning, + secondSection: baseThemeVariables.success, }, earningPie: { @@ -321,28 +279,28 @@ export const COSMIC_THEME = { fontSize: '22', - firstPieGradientLeft: theme.success, - firstPieGradientRight: theme.success, + firstPieGradientLeft: baseThemeVariables.success, + firstPieGradientRight: baseThemeVariables.success, firstPieShadowColor: 'rgba(0, 0, 0, 0)', - secondPieGradientLeft: theme.primary, - secondPieGradientRight: theme.primary, + secondPieGradientLeft: baseThemeVariables.primary, + secondPieGradientRight: baseThemeVariables.primary, secondPieShadowColor: 'rgba(0, 0, 0, 0)', - thirdPieGradientLeft: theme.warning, - thirdPieGradientRight: theme.warning, + thirdPieGradientLeft: baseThemeVariables.warning, + thirdPieGradientRight: baseThemeVariables.warning, thirdPieShadowColor: 'rgba(0, 0, 0, 0)', }, earningLine: { - gradFrom: theme.primary, - gradTo: theme.primary, + gradFrom: baseThemeVariables.primary, + gradTo: baseThemeVariables.primary, - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '16', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipBorderWidth: '1', tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', }, diff --git a/src/app/@theme/styles/theme.dark.ts b/src/app/@theme/styles/theme.dark.ts index f42cd8bee1..8280791ed0 100644 --- a/src/app/@theme/styles/theme.dark.ts +++ b/src/app/@theme/styles/theme.dark.ts @@ -1,226 +1,190 @@ -import { NbJSThemeOptions } from '@nebular/theme'; - -const palette = { - primary: '#3366ff', - success: '#00d68f', - info: '#0095ff', - warning: '#ffaa00', - danger: '#ff3d71', -}; - -const theme = { - fontMain: 'Open Sans, sans-serif', - fontSecondary: 'Raleway, sans-serif', - - bg: '#222b45', - bg2: '#1a2138', - bg3: '#151a30', - bg4: '#101426', - - border: '#222b45', - border2: '#1a2138', - border3: '#151a30', - border4: '#101426', - border5: '#101426', - - fg: '#8f9bb3', - fgHeading: '#ffffff', - fgText: '#ffffff', - fgHighlight: palette.primary, - layoutBg: '#1b1b38', - separator: '#1b1b38', - - primary: palette.primary, - success: palette.success, - info: palette.info, - warning: palette.warning, - danger: palette.danger, - - primaryLight: '#598bff', - successLight: '#2ce69b', - infoLight: '#42aaff', - warningLight: '#ffc94d', - dangerLight: '#ff708d', -}; +import { NbJSThemeOptions, DARK_THEME as baseTheme } from '@nebular/theme'; + +const baseThemeVariables = baseTheme.variables; export const DARK_THEME = { name: 'dark', + base: 'dark', variables: { - ...theme, - temperature: { - arcFill: [ theme.primary, theme.primary, theme.primary, theme.primary, theme.primary ], - arcEmpty: theme.bg2, - thumbBg: theme.bg2, - thumbBorder: theme.primary, + arcFill: [ + baseThemeVariables.primary, + baseThemeVariables.primary, + baseThemeVariables.primary, + baseThemeVariables.primary, + baseThemeVariables.primary, + ], + arcEmpty: baseThemeVariables.bg2, + thumbBg: baseThemeVariables.bg2, + thumbBorder: baseThemeVariables.primary, }, solar: { - gradientLeft: theme.primary, - gradientRight: theme.primary, + gradientLeft: baseThemeVariables.primary, + gradientRight: baseThemeVariables.primary, shadowColor: 'rgba(0, 0, 0, 0)', - secondSeriesFill: theme.bg2, + secondSeriesFill: baseThemeVariables.bg2, radius: ['80%', '90%'], }, traffic: { - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', - yAxisSplitLine: theme.separator, + yAxisSplitLine: baseThemeVariables.separator, - lineBg: theme.border4, + lineBg: baseThemeVariables.border4, lineShadowBlur: '1', - itemColor: theme.border4, - itemBorderColor: theme.border4, - itemEmphasisBorderColor: theme.primary, + itemColor: baseThemeVariables.border4, + itemBorderColor: baseThemeVariables.border4, + itemEmphasisBorderColor: baseThemeVariables.primary, shadowLineDarkBg: 'rgba(0, 0, 0, 0)', shadowLineShadow: 'rgba(0, 0, 0, 0)', - gradFrom: theme.bg2, - gradTo: theme.bg2, + gradFrom: baseThemeVariables.bg2, + gradTo: baseThemeVariables.bg2, }, electricity: { - tooltipBg: theme.bg, - tooltipLineColor: theme.fgText, + tooltipBg: baseThemeVariables.bg, + tooltipLineColor: baseThemeVariables.fgText, tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', - axisLineColor: theme.border3, - xAxisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisLineColor: baseThemeVariables.border3, + xAxisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'solid', lineWidth: '4', - lineGradFrom: theme.primary, - lineGradTo: theme.primary, + lineGradFrom: baseThemeVariables.primary, + lineGradTo: baseThemeVariables.primary, lineShadow: 'rgba(0, 0, 0, 0)', - areaGradFrom: theme.bg2, - areaGradTo: theme.bg2, + areaGradFrom: baseThemeVariables.bg2, + areaGradTo: baseThemeVariables.bg2, shadowLineDarkBg: 'rgba(0, 0, 0, 0)', }, bubbleMap: { - titleColor: theme.fgText, - areaColor: theme.bg4, - areaHoverColor: theme.fgHighlight, - areaBorderColor: theme.border5, + titleColor: baseThemeVariables.fgText, + areaColor: baseThemeVariables.bg4, + areaHoverColor: baseThemeVariables.fgHighlight, + areaBorderColor: baseThemeVariables.border5, }, profitBarAnimationEchart: { - textColor: theme.fgText, + textColor: baseThemeVariables.fgText, - firstAnimationBarColor: theme.primary, - secondAnimationBarColor: theme.success, + firstAnimationBarColor: baseThemeVariables.primary, + secondAnimationBarColor: baseThemeVariables.success, splitLineStyleOpacity: '1', splitLineStyleWidth: '1', - splitLineStyleColor: theme.separator, + splitLineStyleColor: baseThemeVariables.separator, - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '16', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipBorderWidth: '1', tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', }, trafficBarEchart: { - gradientFrom: theme.warningLight, - gradientTo: theme.warning, - shadow: theme.warningLight, + gradientFrom: baseThemeVariables.warningLight, + gradientTo: baseThemeVariables.warning, + shadow: baseThemeVariables.warningLight, shadowBlur: '0', - axisTextColor: theme.fgText, + axisTextColor: baseThemeVariables.fgText, axisFontSize: '12', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', }, countryOrders: { - countryBorderColor: theme.border4, - countryFillColor: theme.bg3, + countryBorderColor: baseThemeVariables.border4, + countryFillColor: baseThemeVariables.bg3, countryBorderWidth: '1', - hoveredCountryBorderColor: theme.primary, - hoveredCountryFillColor: theme.primaryLight, + hoveredCountryBorderColor: baseThemeVariables.primary, + hoveredCountryFillColor: baseThemeVariables.primaryLight, hoveredCountryBorderWidth: '1', - chartAxisLineColor: theme.border4, - chartAxisTextColor: theme.fg, + chartAxisLineColor: baseThemeVariables.border4, + chartAxisTextColor: baseThemeVariables.fg, chartAxisFontSize: '16', - chartGradientTo: theme.primary, - chartGradientFrom: theme.primaryLight, - chartAxisSplitLine: theme.separator, - chartShadowLineColor: theme.primaryLight, + chartGradientTo: baseThemeVariables.primary, + chartGradientFrom: baseThemeVariables.primaryLight, + chartAxisSplitLine: baseThemeVariables.separator, + chartShadowLineColor: baseThemeVariables.primaryLight, - chartLineBottomShadowColor: theme.primary, + chartLineBottomShadowColor: baseThemeVariables.primary, - chartInnerLineColor: theme.bg2, + chartInnerLineColor: baseThemeVariables.bg2, }, echarts: { - bg: theme.bg, - textColor: theme.fgText, - axisLineColor: theme.fgText, - splitLineColor: theme.separator, + bg: baseThemeVariables.bg, + textColor: baseThemeVariables.fgText, + axisLineColor: baseThemeVariables.fgText, + splitLineColor: baseThemeVariables.separator, itemHoverShadowColor: 'rgba(0, 0, 0, 0.5)', - tooltipBackgroundColor: theme.primary, + tooltipBackgroundColor: baseThemeVariables.primary, areaOpacity: '0.7', }, chartjs: { - axisLineColor: theme.separator, - textColor: theme.fgText, + axisLineColor: baseThemeVariables.separator, + textColor: baseThemeVariables.fgText, }, orders: { - tooltipBg: theme.bg, + tooltipBg: baseThemeVariables.bg, tooltipLineColor: 'rgba(0, 0, 0, 0)', tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '20', - axisLineColor: theme.border4, + axisLineColor: baseThemeVariables.border4, axisFontSize: '16', - axisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'solid', lineWidth: '4', // first line - firstAreaGradFrom: theme.bg3, - firstAreaGradTo: theme.bg3, + firstAreaGradFrom: baseThemeVariables.bg3, + firstAreaGradTo: baseThemeVariables.bg3, firstShadowLineDarkBg: 'rgba(0, 0, 0, 0)', // second line - secondLineGradFrom: theme.primary, - secondLineGradTo: theme.primary, + secondLineGradFrom: baseThemeVariables.primary, + secondLineGradTo: baseThemeVariables.primary, secondAreaGradFrom: 'rgba(51, 102, 255, 0.2)', secondAreaGradTo: 'rgba(51, 102, 255, 0)', secondShadowLineDarkBg: 'rgba(0, 0, 0, 0)', // third line - thirdLineGradFrom: theme.success, - thirdLineGradTo: theme.successLight, + thirdLineGradFrom: baseThemeVariables.success, + thirdLineGradTo: baseThemeVariables.successLight, thirdAreaGradFrom: 'rgba(0, 214, 143, 0.2)', thirdAreaGradTo: 'rgba(0, 214, 143, 0)', @@ -228,82 +192,82 @@ export const DARK_THEME = { }, profit: { - bg: theme.bg, - textColor: theme.fgText, - axisLineColor: theme.border4, - splitLineColor: theme.separator, + bg: baseThemeVariables.bg, + textColor: baseThemeVariables.fgText, + axisLineColor: baseThemeVariables.border4, + splitLineColor: baseThemeVariables.separator, areaOpacity: '1', axisFontSize: '16', - axisTextColor: theme.fg, + axisTextColor: baseThemeVariables.fg, // first bar - firstLineGradFrom: theme.bg3, - firstLineGradTo: theme.bg3, + firstLineGradFrom: baseThemeVariables.bg3, + firstLineGradTo: baseThemeVariables.bg3, firstLineShadow: 'rgba(0, 0, 0, 0)', // second bar - secondLineGradFrom: theme.primary, - secondLineGradTo: theme.primary, + secondLineGradFrom: baseThemeVariables.primary, + secondLineGradTo: baseThemeVariables.primary, secondLineShadow: 'rgba(0, 0, 0, 0)', // third bar - thirdLineGradFrom: theme.success, - thirdLineGradTo: theme.successLight, + thirdLineGradFrom: baseThemeVariables.success, + thirdLineGradTo: baseThemeVariables.successLight, thirdLineShadow: 'rgba(0, 0, 0, 0)', }, orderProfitLegend: { - firstItem: theme.success, - secondItem: theme.primary, - thirdItem: theme.bg3, + firstItem: baseThemeVariables.success, + secondItem: baseThemeVariables.primary, + thirdItem: baseThemeVariables.bg3, }, visitors: { - tooltipBg: theme.bg, + tooltipBg: baseThemeVariables.bg, tooltipLineColor: 'rgba(0, 0, 0, 0)', tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '20', - axisLineColor: theme.border4, + axisLineColor: baseThemeVariables.border4, axisFontSize: '16', - axisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'dotted', lineWidth: '6', lineGradFrom: '#ffffff', lineGradTo: '#ffffff', lineShadow: 'rgba(0, 0, 0, 0)', - areaGradFrom: theme.primary, - areaGradTo: theme.primaryLight, + areaGradFrom: baseThemeVariables.primary, + areaGradTo: baseThemeVariables.primaryLight, innerLineStyle: 'solid', innerLineWidth: '1', - innerAreaGradFrom: theme.success, - innerAreaGradTo: theme.success, + innerAreaGradFrom: baseThemeVariables.success, + innerAreaGradTo: baseThemeVariables.success, }, visitorsLegend: { - firstIcon: theme.success, - secondIcon: theme.primary, + firstIcon: baseThemeVariables.success, + secondIcon: baseThemeVariables.primary, }, visitorsPie: { - firstPieGradientLeft: theme.success, - firstPieGradientRight: theme.success, + firstPieGradientLeft: baseThemeVariables.success, + firstPieGradientRight: baseThemeVariables.success, firstPieShadowColor: 'rgba(0, 0, 0, 0)', firstPieRadius: ['70%', '90%'], - secondPieGradientLeft: theme.warning, - secondPieGradientRight: theme.warningLight, + secondPieGradientLeft: baseThemeVariables.warning, + secondPieGradientRight: baseThemeVariables.warningLight, secondPieShadowColor: 'rgba(0, 0, 0, 0)', secondPieRadius: ['60%', '97%'], shadowOffsetX: '0', @@ -311,8 +275,8 @@ export const DARK_THEME = { }, visitorsPieLegend: { - firstSection: theme.warning, - secondSection: theme.success, + firstSection: baseThemeVariables.warning, + secondSection: baseThemeVariables.success, }, earningPie: { @@ -321,28 +285,28 @@ export const DARK_THEME = { fontSize: '22', - firstPieGradientLeft: theme.success, - firstPieGradientRight: theme.success, + firstPieGradientLeft: baseThemeVariables.success, + firstPieGradientRight: baseThemeVariables.success, firstPieShadowColor: 'rgba(0, 0, 0, 0)', - secondPieGradientLeft: theme.primary, - secondPieGradientRight: theme.primary, + secondPieGradientLeft: baseThemeVariables.primary, + secondPieGradientRight: baseThemeVariables.primary, secondPieShadowColor: 'rgba(0, 0, 0, 0)', - thirdPieGradientLeft: theme.warning, - thirdPieGradientRight: theme.warning, + thirdPieGradientLeft: baseThemeVariables.warning, + thirdPieGradientRight: baseThemeVariables.warning, thirdPieShadowColor: 'rgba(0, 0, 0, 0)', }, earningLine: { - gradFrom: theme.primary, - gradTo: theme.primary, + gradFrom: baseThemeVariables.primary, + gradTo: baseThemeVariables.primary, - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '16', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipBorderWidth: '1', tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', }, diff --git a/src/app/@theme/styles/theme.default.ts b/src/app/@theme/styles/theme.default.ts index 6e25e7d71c..30e5d9e5ed 100644 --- a/src/app/@theme/styles/theme.default.ts +++ b/src/app/@theme/styles/theme.default.ts @@ -1,226 +1,190 @@ -import { NbJSThemeOptions } from '@nebular/theme'; - -const palette = { - primary: '#3366ff', - success: '#00d68f', - info: '#0095ff', - warning: '#ffaa00', - danger: '#ff3d71', -}; - -const theme = { - fontMain: 'Open Sans, sans-serif', - fontSecondary: 'Raleway, sans-serif', - - bg: '#ffffff', - bg2: '#f7f9fc', - bg3: '#edf1f7', - bg4: '#e4e9f2', - - border: '#ffffff', - border2: '#f7f9fc', - border3: '#edf1f7', - border4: '#e4e9f2', - border5: '#c5cee0', - - fg: '#8f9bb3', - fgHeading: '#1a2138', - fgText: '#1a2138', - fgHighlight: palette.primary, - layoutBg: '#f7f9fc', - separator: '#edf1f7', - - primary: palette.primary, - success: palette.success, - info: palette.info, - warning: palette.warning, - danger: palette.danger, - - primaryLight: '#598bff', - successLight: '#2ce69b', - infoLight: '#42aaff', - warningLight: '#ffc94d', - dangerLight: '#ff708d', -}; +import { NbJSThemeOptions, DEFAULT_THEME as baseTheme } from '@nebular/theme'; + +const baseThemeVariables = baseTheme.variables; export const DEFAULT_THEME = { name: 'default', + base: 'default', variables: { - ...theme, - temperature: { - arcFill: [ theme.primary, theme.primary, theme.primary, theme.primary, theme.primary ], - arcEmpty: theme.bg2, - thumbBg: theme.bg2, - thumbBorder: theme.primary, + arcFill: [ + baseThemeVariables.primary, + baseThemeVariables.primary, + baseThemeVariables.primary, + baseThemeVariables.primary, + baseThemeVariables.primary, + ], + arcEmpty: baseThemeVariables.bg2, + thumbBg: baseThemeVariables.bg2, + thumbBorder: baseThemeVariables.primary, }, solar: { - gradientLeft: theme.primary, - gradientRight: theme.primary, + gradientLeft: baseThemeVariables.primary, + gradientRight: baseThemeVariables.primary, shadowColor: 'rgba(0, 0, 0, 0)', - secondSeriesFill: theme.bg2, + secondSeriesFill: baseThemeVariables.bg2, radius: ['80%', '90%'], }, traffic: { - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', - yAxisSplitLine: theme.separator, + yAxisSplitLine: baseThemeVariables.separator, - lineBg: theme.border4, + lineBg: baseThemeVariables.border4, lineShadowBlur: '1', - itemColor: theme.border4, - itemBorderColor: theme.border4, - itemEmphasisBorderColor: theme.primary, + itemColor: baseThemeVariables.border4, + itemBorderColor: baseThemeVariables.border4, + itemEmphasisBorderColor: baseThemeVariables.primary, shadowLineDarkBg: 'rgba(0, 0, 0, 0)', shadowLineShadow: 'rgba(0, 0, 0, 0)', - gradFrom: theme.bg2, - gradTo: theme.bg2, + gradFrom: baseThemeVariables.bg2, + gradTo: baseThemeVariables.bg2, }, electricity: { - tooltipBg: theme.bg, - tooltipLineColor: theme.fgText, + tooltipBg: baseThemeVariables.bg, + tooltipLineColor: baseThemeVariables.fgText, tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', - axisLineColor: theme.border3, - xAxisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisLineColor: baseThemeVariables.border3, + xAxisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'solid', lineWidth: '4', - lineGradFrom: theme.primary, - lineGradTo: theme.primary, + lineGradFrom: baseThemeVariables.primary, + lineGradTo: baseThemeVariables.primary, lineShadow: 'rgba(0, 0, 0, 0)', - areaGradFrom: theme.bg2, - areaGradTo: theme.bg2, + areaGradFrom: baseThemeVariables.bg2, + areaGradTo: baseThemeVariables.bg2, shadowLineDarkBg: 'rgba(0, 0, 0, 0)', }, bubbleMap: { - titleColor: theme.fgText, - areaColor: theme.bg4, - areaHoverColor: theme.fgHighlight, - areaBorderColor: theme.border5, + titleColor: baseThemeVariables.fgText, + areaColor: baseThemeVariables.bg4, + areaHoverColor: baseThemeVariables.fgHighlight, + areaBorderColor: baseThemeVariables.border5, }, profitBarAnimationEchart: { - textColor: theme.fgText, + textColor: baseThemeVariables.fgText, - firstAnimationBarColor: theme.primary, - secondAnimationBarColor: theme.success, + firstAnimationBarColor: baseThemeVariables.primary, + secondAnimationBarColor: baseThemeVariables.success, splitLineStyleOpacity: '1', splitLineStyleWidth: '1', - splitLineStyleColor: theme.separator, + splitLineStyleColor: baseThemeVariables.separator, - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '16', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipBorderWidth: '1', tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', }, trafficBarEchart: { - gradientFrom: theme.warningLight, - gradientTo: theme.warning, - shadow: theme.warningLight, + gradientFrom: baseThemeVariables.warningLight, + gradientTo: baseThemeVariables.warning, + shadow: baseThemeVariables.warningLight, shadowBlur: '0', - axisTextColor: theme.fgText, + axisTextColor: baseThemeVariables.fgText, axisFontSize: '12', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', }, countryOrders: { - countryBorderColor: theme.border4, - countryFillColor: theme.bg3, + countryBorderColor: baseThemeVariables.border4, + countryFillColor: baseThemeVariables.bg3, countryBorderWidth: '1', - hoveredCountryBorderColor: theme.primary, - hoveredCountryFillColor: theme.primaryLight, + hoveredCountryBorderColor: baseThemeVariables.primary, + hoveredCountryFillColor: baseThemeVariables.primaryLight, hoveredCountryBorderWidth: '1', - chartAxisLineColor: theme.border4, - chartAxisTextColor: theme.fg, + chartAxisLineColor: baseThemeVariables.border4, + chartAxisTextColor: baseThemeVariables.fg, chartAxisFontSize: '16', - chartGradientTo: theme.primary, - chartGradientFrom: theme.primaryLight, - chartAxisSplitLine: theme.separator, - chartShadowLineColor: theme.primaryLight, + chartGradientTo: baseThemeVariables.primary, + chartGradientFrom: baseThemeVariables.primaryLight, + chartAxisSplitLine: baseThemeVariables.separator, + chartShadowLineColor: baseThemeVariables.primaryLight, - chartLineBottomShadowColor: theme.primary, + chartLineBottomShadowColor: baseThemeVariables.primary, - chartInnerLineColor: theme.bg2, + chartInnerLineColor: baseThemeVariables.bg2, }, echarts: { - bg: theme.bg, - textColor: theme.fgText, - axisLineColor: theme.fgText, - splitLineColor: theme.separator, + bg: baseThemeVariables.bg, + textColor: baseThemeVariables.fgText, + axisLineColor: baseThemeVariables.fgText, + splitLineColor: baseThemeVariables.separator, itemHoverShadowColor: 'rgba(0, 0, 0, 0.5)', - tooltipBackgroundColor: theme.primary, + tooltipBackgroundColor: baseThemeVariables.primary, areaOpacity: '0.7', }, chartjs: { - axisLineColor: theme.separator, - textColor: theme.fgText, + axisLineColor: baseThemeVariables.separator, + textColor: baseThemeVariables.fgText, }, orders: { - tooltipBg: theme.bg, + tooltipBg: baseThemeVariables.bg, tooltipLineColor: 'rgba(0, 0, 0, 0)', tooltipLineWidth: '0', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '20', - axisLineColor: theme.border4, + axisLineColor: baseThemeVariables.border4, axisFontSize: '16', - axisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'solid', lineWidth: '4', // first line - firstAreaGradFrom: theme.bg3, - firstAreaGradTo: theme.bg3, + firstAreaGradFrom: baseThemeVariables.bg3, + firstAreaGradTo: baseThemeVariables.bg3, firstShadowLineDarkBg: 'rgba(0, 0, 0, 0)', // second line - secondLineGradFrom: theme.primary, - secondLineGradTo: theme.primary, + secondLineGradFrom: baseThemeVariables.primary, + secondLineGradTo: baseThemeVariables.primary, secondAreaGradFrom: 'rgba(51, 102, 255, 0.2)', secondAreaGradTo: 'rgba(51, 102, 255, 0)', secondShadowLineDarkBg: 'rgba(0, 0, 0, 0)', // third line - thirdLineGradFrom: theme.success, - thirdLineGradTo: theme.successLight, + thirdLineGradFrom: baseThemeVariables.success, + thirdLineGradTo: baseThemeVariables.successLight, thirdAreaGradFrom: 'rgba(0, 214, 143, 0.2)', thirdAreaGradTo: 'rgba(0, 214, 143, 0)', @@ -228,82 +192,82 @@ export const DEFAULT_THEME = { }, profit: { - bg: theme.bg, - textColor: theme.fgText, - axisLineColor: theme.border4, - splitLineColor: theme.separator, + bg: baseThemeVariables.bg, + textColor: baseThemeVariables.fgText, + axisLineColor: baseThemeVariables.border4, + splitLineColor: baseThemeVariables.separator, areaOpacity: '1', axisFontSize: '16', - axisTextColor: theme.fg, + axisTextColor: baseThemeVariables.fg, // first bar - firstLineGradFrom: theme.bg3, - firstLineGradTo: theme.bg3, + firstLineGradFrom: baseThemeVariables.bg3, + firstLineGradTo: baseThemeVariables.bg3, firstLineShadow: 'rgba(0, 0, 0, 0)', // second bar - secondLineGradFrom: theme.primary, - secondLineGradTo: theme.primary, + secondLineGradFrom: baseThemeVariables.primary, + secondLineGradTo: baseThemeVariables.primary, secondLineShadow: 'rgba(0, 0, 0, 0)', // third bar - thirdLineGradFrom: theme.success, - thirdLineGradTo: theme.successLight, + thirdLineGradFrom: baseThemeVariables.success, + thirdLineGradTo: baseThemeVariables.successLight, thirdLineShadow: 'rgba(0, 0, 0, 0)', }, orderProfitLegend: { - firstItem: theme.success, - secondItem: theme.primary, - thirdItem: theme.bg3, + firstItem: baseThemeVariables.success, + secondItem: baseThemeVariables.primary, + thirdItem: baseThemeVariables.bg3, }, visitors: { - tooltipBg: theme.bg, + tooltipBg: baseThemeVariables.bg, tooltipLineColor: 'rgba(0, 0, 0, 0)', tooltipLineWidth: '1', - tooltipBorderColor: theme.border2, + tooltipBorderColor: baseThemeVariables.border2, tooltipExtraCss: 'border-radius: 10px; padding: 8px 24px;', - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '20', - axisLineColor: theme.border4, + axisLineColor: baseThemeVariables.border4, axisFontSize: '16', - axisTextColor: theme.fg, - yAxisSplitLine: theme.separator, + axisTextColor: baseThemeVariables.fg, + yAxisSplitLine: baseThemeVariables.separator, - itemBorderColor: theme.primary, + itemBorderColor: baseThemeVariables.primary, lineStyle: 'dotted', lineWidth: '6', lineGradFrom: '#ffffff', lineGradTo: '#ffffff', lineShadow: 'rgba(0, 0, 0, 0)', - areaGradFrom: theme.primary, - areaGradTo: theme.primaryLight, + areaGradFrom: baseThemeVariables.primary, + areaGradTo: baseThemeVariables.primaryLight, innerLineStyle: 'solid', innerLineWidth: '1', - innerAreaGradFrom: theme.success, - innerAreaGradTo: theme.success, + innerAreaGradFrom: baseThemeVariables.success, + innerAreaGradTo: baseThemeVariables.success, }, visitorsLegend: { - firstIcon: theme.success, - secondIcon: theme.primary, + firstIcon: baseThemeVariables.success, + secondIcon: baseThemeVariables.primary, }, visitorsPie: { - firstPieGradientLeft: theme.success, - firstPieGradientRight: theme.success, + firstPieGradientLeft: baseThemeVariables.success, + firstPieGradientRight: baseThemeVariables.success, firstPieShadowColor: 'rgba(0, 0, 0, 0)', firstPieRadius: ['70%', '90%'], - secondPieGradientLeft: theme.warning, - secondPieGradientRight: theme.warningLight, + secondPieGradientLeft: baseThemeVariables.warning, + secondPieGradientRight: baseThemeVariables.warningLight, secondPieShadowColor: 'rgba(0, 0, 0, 0)', secondPieRadius: ['60%', '97%'], shadowOffsetX: '0', @@ -311,8 +275,8 @@ export const DEFAULT_THEME = { }, visitorsPieLegend: { - firstSection: theme.warning, - secondSection: theme.success, + firstSection: baseThemeVariables.warning, + secondSection: baseThemeVariables.success, }, earningPie: { @@ -321,28 +285,28 @@ export const DEFAULT_THEME = { fontSize: '22', - firstPieGradientLeft: theme.success, - firstPieGradientRight: theme.success, + firstPieGradientLeft: baseThemeVariables.success, + firstPieGradientRight: baseThemeVariables.success, firstPieShadowColor: 'rgba(0, 0, 0, 0)', - secondPieGradientLeft: theme.primary, - secondPieGradientRight: theme.primary, + secondPieGradientLeft: baseThemeVariables.primary, + secondPieGradientRight: baseThemeVariables.primary, secondPieShadowColor: 'rgba(0, 0, 0, 0)', - thirdPieGradientLeft: theme.warning, - thirdPieGradientRight: theme.warning, + thirdPieGradientLeft: baseThemeVariables.warning, + thirdPieGradientRight: baseThemeVariables.warning, thirdPieShadowColor: 'rgba(0, 0, 0, 0)', }, earningLine: { - gradFrom: theme.primary, - gradTo: theme.primary, + gradFrom: baseThemeVariables.primary, + gradTo: baseThemeVariables.primary, - tooltipTextColor: theme.fgText, + tooltipTextColor: baseThemeVariables.fgText, tooltipFontWeight: 'normal', tooltipFontSize: '16', - tooltipBg: theme.bg, - tooltipBorderColor: theme.border2, + tooltipBg: baseThemeVariables.bg, + tooltipBorderColor: baseThemeVariables.border2, tooltipBorderWidth: '1', tooltipExtraCss: 'border-radius: 10px; padding: 4px 16px;', }, diff --git a/src/app/@theme/styles/themes.scss b/src/app/@theme/styles/themes.scss index 4a6051c51f..c5d5aa8d5d 100644 --- a/src/app/@theme/styles/themes.scss +++ b/src/app/@theme/styles/themes.scss @@ -4,9 +4,7 @@ @import '~@nebular/theme/styles/themes'; $nb-themes: nb-register-theme(( - font-family-secondary: font-family-primary, layout-padding-top: 2.25rem, - layout-window-mode-padding-top: 0, menu-item-icon-margin: 0 0.5rem 0 0, @@ -24,16 +22,10 @@ $nb-themes: nb-register-theme(( slide-out-background: #f7f9fc, slide-out-shadow-color: 0 4px 14px 0 #8f9bb3, slide-out-shadow-color-rtl: 0 4px 14px 0 #8f9bb3, - - smart-table-bg-even: background-basic-color-2, - smart-table-bg-active: background-basic-color-3, - smart-table-paging-hover: transparent, ), default, default); $nb-themes: nb-register-theme(( - font-family-secondary: font-family-primary, layout-padding-top: 2.25rem, - layout-window-mode-padding-top: 0, menu-item-icon-margin: 0 0.5rem 0 0, @@ -51,16 +43,10 @@ $nb-themes: nb-register-theme(( slide-out-background: #252547, slide-out-shadow-color: 2px 0 3px #29157a, slide-out-shadow-color-rtl: -2px 0 3px #29157a, - - smart-table-bg-even: background-basic-color-2, - smart-table-bg-active: background-basic-color-3, - smart-table-paging-hover: transparent, ), cosmic, cosmic); $nb-themes: nb-register-theme(( - font-family-secondary: font-family-primary, layout-padding-top: 2.25rem, - layout-window-mode-padding-top: 0, menu-item-icon-margin: 0 0.5rem 0 0, @@ -78,16 +64,10 @@ $nb-themes: nb-register-theme(( slide-out-background: linear-gradient(270deg, #edf1f7 0%, #e4e9f2 100%), slide-out-shadow-color: 0 4px 14px 0 #8f9bb3, slide-out-shadow-color-rtl: 0 4px 14px 0 #8f9bb3, - - smart-table-bg-even: background-basic-color-2, - smart-table-bg-active: background-basic-color-3, - smart-table-paging-hover: transparent, ), corporate, corporate); $nb-themes: nb-register-theme(( - font-family-secondary: font-family-primary, layout-padding-top: 2.25rem, - layout-window-mode-padding-top: 0, menu-item-icon-margin: 0 0.5rem 0 0, @@ -105,8 +85,4 @@ $nb-themes: nb-register-theme(( slide-out-background: linear-gradient(270deg, #222b45 0%, #151a30 100%), slide-out-shadow-color: 0 4px 14px 0 #8f9bb3, slide-out-shadow-color-rtl: 0 4px 14px 0 #8f9bb3, - - smart-table-bg-even: background-basic-color-2, - smart-table-bg-active: background-basic-color-3, - smart-table-paging-hover: transparent, ), dark, dark); diff --git a/src/app/@theme/theme.module.ts b/src/app/@theme/theme.module.ts index ec66139a92..5ae45d8c95 100644 --- a/src/app/@theme/theme.module.ts +++ b/src/app/@theme/theme.module.ts @@ -34,7 +34,6 @@ import { ThreeColumnsLayoutComponent, TwoColumnsLayoutComponent, } from './layouts'; -import { WindowModeBlockScrollService } from './services/window-mode-block-scroll.service'; import { DEFAULT_THEME } from './styles/theme.default'; import { COSMIC_THEME } from './styles/theme.cosmic'; import { CORPORATE_THEME } from './styles/theme.corporate'; @@ -87,7 +86,6 @@ export class ThemeModule { }, [ DEFAULT_THEME, COSMIC_THEME, CORPORATE_THEME, DARK_THEME ], ).providers, - WindowModeBlockScrollService, ], }; } diff --git a/src/app/pages/dashboard/rooms/player/player.component.scss b/src/app/pages/dashboard/rooms/player/player.component.scss index d708330447..bbe30efded 100644 --- a/src/app/pages/dashboard/rooms/player/player.component.scss +++ b/src/app/pages/dashboard/rooms/player/player.component.scss @@ -12,13 +12,6 @@ height: 100%; } - .subtitle { - font-family: nb-theme(text-subtitle-font-family); - font-size: nb-theme(text-subtitle-font-size); - font-weight: nb-theme(text-subtitle-font-weight); - line-height: nb-theme(text-subtitle-line-height); - } - .body { display: flex; flex-direction: column; diff --git a/src/app/pages/dashboard/rooms/room-selector/room-selector.component.ts b/src/app/pages/dashboard/rooms/room-selector/room-selector.component.ts index 0fee56fc12..7e0639a78c 100644 --- a/src/app/pages/dashboard/rooms/room-selector/room-selector.component.ts +++ b/src/app/pages/dashboard/rooms/room-selector/room-selector.component.ts @@ -114,11 +114,8 @@ export class RoomSelectorComponent implements OnInit, OnDestroy { } getUrlPath(id: string) { - let baseHref = this.locationStrategy.getBaseHref(); - if (baseHref.endsWith('')) { - baseHref = baseHref.slice(0, -1); - } - const path = this.location.path(); + const baseHref = this.locationStrategy.getBaseHref().replace(/\/$/, ''); + const path = this.location.path().replace(/\/$/, ''); return `url(${baseHref}${path}${id})`; } diff --git a/src/app/pages/dashboard/solar/solar.component.scss b/src/app/pages/dashboard/solar/solar.component.scss index 6b64c825ff..ff36cdf6f1 100644 --- a/src/app/pages/dashboard/solar/solar.component.scss +++ b/src/app/pages/dashboard/solar/solar.component.scss @@ -26,9 +26,5 @@ .details { color: nb-theme(text-hint-color); - font-family: nb-theme(text-subtitle-2-font-family); - font-size: nb-theme(text-subtitle-2-font-size); - font-weight: nb-theme(text-subtitle-2-font-weight); - line-height: nb-theme(text-subtitle-2-line-height); } } diff --git a/src/app/pages/dashboard/solar/solar.component.ts b/src/app/pages/dashboard/solar/solar.component.ts index a60e3ebd69..07754dd650 100644 --- a/src/app/pages/dashboard/solar/solar.component.ts +++ b/src/app/pages/dashboard/solar/solar.component.ts @@ -15,7 +15,7 @@ declare const echarts: any;
6.421 kWh
-
out of 8.421 kWh
+
out of 8.421 kWh
diff --git a/src/app/pages/dashboard/status-card/status-card.component.scss b/src/app/pages/dashboard/status-card/status-card.component.scss index 4e524ee3ee..03be02f59f 100644 --- a/src/app/pages/dashboard/status-card/status-card.component.scss +++ b/src/app/pages/dashboard/status-card/status-card.component.scss @@ -44,6 +44,7 @@ &.off { color: nb-theme(text-hint-color); + .status, .title, .icon { color: nb-theme(text-hint-color); @@ -73,10 +74,6 @@ .status { text-transform: uppercase; - font-family: nb-theme(text-paragraph-2-font-family); - font-size: nb-theme(text-paragraph-2-font-size); - font-weight: nb-theme(text-paragraph-2-font-weight); - line-height: nb-theme(text-paragraph-2-line-height); } } } diff --git a/src/app/pages/dashboard/status-card/status-card.component.ts b/src/app/pages/dashboard/status-card/status-card.component.ts index cabec2f049..1627640857 100644 --- a/src/app/pages/dashboard/status-card/status-card.component.ts +++ b/src/app/pages/dashboard/status-card/status-card.component.ts @@ -13,7 +13,7 @@ import { Component, Input } from '@angular/core';
{{ title }}
-
{{ on ? 'ON' : 'OFF' }}
+
{{ on ? 'ON' : 'OFF' }}
`, diff --git a/src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts b/src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts index a820ad303b..a5853019ab 100644 --- a/src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts +++ b/src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts @@ -130,11 +130,8 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges { } getUrlPath(id: string) { - let baseHref = this.locationStrategy.getBaseHref(); - if (baseHref.endsWith('')) { - baseHref = baseHref.slice(0, -1); - } - const path = this.location.path(); + const baseHref = this.locationStrategy.getBaseHref().replace(/\/$/, ''); + const path = this.location.path().replace(/\/$/, ''); return `url(${baseHref}${path}${id}${this.svgControlId})`; } diff --git a/src/app/pages/e-commerce/progress-section/progress-section.component.html b/src/app/pages/e-commerce/progress-section/progress-section.component.html index 137ef06caa..d7b7a368af 100644 --- a/src/app/pages/e-commerce/progress-section/progress-section.component.html +++ b/src/app/pages/e-commerce/progress-section/progress-section.component.html @@ -1,7 +1,7 @@
-
{{ item.title }}
+
{{ item.title }}
{{ item.value | ngxNumberWithCommas }}
diff --git a/src/app/pages/e-commerce/progress-section/progress-section.component.scss b/src/app/pages/e-commerce/progress-section/progress-section.component.scss index 5ea320bee8..769aef6b97 100644 --- a/src/app/pages/e-commerce/progress-section/progress-section.component.scss +++ b/src/app/pages/e-commerce/progress-section/progress-section.component.scss @@ -14,13 +14,6 @@ $shadow-green: #00977e; } } - .title { - font-family: nb-theme(text-subtitle-font-family); - font-size: nb-theme(text-subtitle-font-size); - font-weight: nb-theme(text-subtitle-font-weight); - line-height: nb-theme(text-subtitle-line-height); - } - .description { margin-top: 0.5rem; } diff --git a/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.html b/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.html index 509220fa34..10a0daed4f 100644 --- a/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.html +++ b/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.html @@ -1,7 +1,7 @@

Visitors Analytics

-
Consumption
+
Consumption
diff --git a/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.scss b/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.scss index db3e54ba99..b8af1e7bb4 100644 --- a/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.scss +++ b/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.scss @@ -15,12 +15,8 @@ border-bottom: none; } - .sub-title { + .subtitle { color: nb-theme(text-hint-color); - font-family: nb-theme(text-subtitle-font-family); - font-size: nb-theme(text-subtitle-font-size); - font-weight: nb-theme(text-subtitle-font-weight); - line-height: nb-theme(text-subtitle-line-height); } .container { diff --git a/src/app/pages/extra-components/calendar/calendar.component.scss b/src/app/pages/extra-components/calendar/calendar.component.scss index 2e3e1e5627..3212c52d0e 100644 --- a/src/app/pages/extra-components/calendar/calendar.component.scss +++ b/src/app/pages/extra-components/calendar/calendar.component.scss @@ -16,10 +16,6 @@ .subtitle { display: block; - font-family: nb-theme(text-subtitle-font-family); - font-size: nb-theme(text-subtitle-font-size); - font-weight: nb-theme(text-subtitle-font-weight); - line-height: nb-theme(text-subtitle-line-height); margin-bottom: 0.5rem; } diff --git a/src/app/pages/miscellaneous/miscellaneous.module.ts b/src/app/pages/miscellaneous/miscellaneous.module.ts index f6748ba500..baae2a141e 100644 --- a/src/app/pages/miscellaneous/miscellaneous.module.ts +++ b/src/app/pages/miscellaneous/miscellaneous.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { NbCardModule } from '@nebular/theme'; +import { NbButtonModule, NbCardModule } from '@nebular/theme'; import { ThemeModule } from '../../@theme/theme.module'; import { MiscellaneousRoutingModule } from './miscellaneous-routing.module'; @@ -10,6 +10,7 @@ import { NotFoundComponent } from './not-found/not-found.component'; imports: [ ThemeModule, NbCardModule, + NbButtonModule, MiscellaneousRoutingModule, ], declarations: [ diff --git a/src/app/pages/miscellaneous/not-found/not-found.component.html b/src/app/pages/miscellaneous/not-found/not-found.component.html index a5fc67a7fa..9eb129fa3d 100644 --- a/src/app/pages/miscellaneous/not-found/not-found.component.html +++ b/src/app/pages/miscellaneous/not-found/not-found.component.html @@ -5,11 +5,11 @@

404 Page Not Found

The page you were looking for doesn't exist -
-
\ No newline at end of file +
diff --git a/src/app/pages/miscellaneous/not-found/not-found.component.scss b/src/app/pages/miscellaneous/not-found/not-found.component.scss index 63ddef40ce..6cb149cdc5 100644 --- a/src/app/pages/miscellaneous/not-found/not-found.component.scss +++ b/src/app/pages/miscellaneous/not-found/not-found.component.scss @@ -15,6 +15,6 @@ nb-card-body { margin-bottom: 3rem; } -.btn { +.home-button { margin-bottom: 2rem; } diff --git a/src/app/pages/tables/smart-table/smart-table.component.scss b/src/app/pages/tables/smart-table/smart-table.component.scss index 6c585cf454..cdfde5b54b 100644 --- a/src/app/pages/tables/smart-table/smart-table.component.scss +++ b/src/app/pages/tables/smart-table/smart-table.component.scss @@ -4,52 +4,4 @@ nb-card { transform: translate3d(0, 0, 0); } - - ng2-smart-table ::ng-deep { - .ng2-smart-action-add-add { - background-color: nb-theme(button-filled-primary-background-color); - border-color: nb-theme(button-filled-primary-border-color); - color: nb-theme(button-filled-primary-text-color); - - &:focus { - border-color: nb-theme(button-filled-primary-focus-border-color); - } - - &:hover { - background-color: nb-theme(button-filled-primary-hover-background-color); - border-color: nb-theme(button-filled-primary-hover-border-color); - } - - &:active { - background-color: nb-theme(button-filled-primary-active-background-color); - border-color: nb-theme(button-filled-primary-active-border-color); - } - } - - nav.ng2-smart-pagination-nav .pagination li { - a, > span { - background-color: transparent; - color: nb-theme(button-outline-primary-text-color); - - &:focus { - border-color: nb-theme(button-outline-primary-focus-border-color); - color: nb-theme(button-outline-primary-focus-text-color); - } - - &:hover { - border-color: nb-theme(button-outline-primary-hover-border-color); - color: nb-theme(button-outline-primary-hover-text-color); - } - } - } - - .ng2-smart-pagination .page-item.disabled { - .page-link, - .page-link:focus, - .page-link:hover { - background-color: transparent; - color: nb-theme(button-outline-primary-disabled-text-color); - } - } - } } diff --git a/src/app/pages/ui-features/typography/typography.component.html b/src/app/pages/ui-features/typography/typography.component.html index 30a956c8ac..7642d09376 100644 --- a/src/app/pages/ui-features/typography/typography.component.html +++ b/src/app/pages/ui-features/typography/typography.component.html @@ -144,38 +144,38 @@ Far far away, behind the your awesomeness. -
+
-
Primary Text
+
Primary Text
Far far away, behind the your awesomeness.
-
+
-
Success Text
+
Success Text
Far far away, behind the your awesomeness.
-
+
-
Info Text
+
Info Text
Far far away, behind the your awesomeness.
-
+
-
Warning Text
+
Warning Text
Far far away, behind the your awesomeness.
-
+
-
Danger Text
+
Danger Text
Far far away, behind the your awesomeness.
diff --git a/src/app/pages/ui-features/typography/typography.component.scss b/src/app/pages/ui-features/typography/typography.component.scss index b58ad29a8c..18f3a73fa8 100644 --- a/src/app/pages/ui-features/typography/typography.component.scss +++ b/src/app/pages/ui-features/typography/typography.component.scss @@ -100,10 +100,6 @@ } } - .text-basic { - color: nb-theme(text-basic-color); - } - .text-link { color: nb-theme(link-text-color); } @@ -124,24 +120,13 @@ background: nb-theme(text-hint-color); } - .text-hint { - color: nb-theme(text-hint-color); - } - .bg-link { background: nb-theme(link-text-color); } - .text-link { - color: nb-theme(link-text-color); - } - @each $status in nb-get-statuses() { .bg-status-#{$status} { background: nb-theme(text-#{$status}-color); } - .text-status-#{$status} { - color: nb-theme(text-#{$status}-color); - } } }