@simple-reporting/base 1.0.41 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dev/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@fortawesome/fontawesome-free": "^7.2.0",
28
- "@simple-reporting/base": "^1.0.41",
28
+ "@simple-reporting/base": "^1.0.43",
29
29
  "chalk": "^5.6.2",
30
30
  "exceljs": "^4.4.0",
31
31
  "file-saver": "^2.0.5",
@@ -0,0 +1,32 @@
1
+ @use "srl/system";
2
+ @use "srl/colors";
3
+ @use "srl/spacer";
4
+
5
+ %srl-decoration-line {
6
+ padding-top: spacer.get(200);
7
+ position: relative;
8
+
9
+ &:before {
10
+ content: "";
11
+ display: block;
12
+ background: colors.grey-200();
13
+ position: absolute;
14
+ top: 0;
15
+ left: 0;
16
+ @if system.$build == "pdf" {
17
+ height: system.size-unit(1pt);
18
+ width: system.size-unit(80pt);
19
+ } @else {
20
+ height: system.size-unit(1);
21
+ width: system.size-unit(80);
22
+ }
23
+ }
24
+ }
25
+
26
+ %srl-decoration-line-reset {
27
+ padding-top: 0;
28
+
29
+ &:before {
30
+ display: none;
31
+ }
32
+ }
@@ -66,7 +66,7 @@ const Translate = {
66
66
  localStorage.setItem('user-locale', newLocale)
67
67
  },
68
68
 
69
- routeMiddleware(
69
+ async routeMiddleware(
70
70
  to: RouteLocationNormalized,
71
71
  _from: RouteLocationNormalized,
72
72
  next: NavigationGuardNext
@@ -34,8 +34,31 @@ if (import.meta.env.DEV) {
34
34
 
35
35
  const router = createRouter({
36
36
  history: createWebHistory(import.meta.BASE_URL),
37
- scrollBehavior() {
38
- window.scrollTo(0, 0)
37
+ scrollBehavior(to, from, savedPosition) {
38
+ return new Promise( resolve => {
39
+ setTimeout(() => {
40
+ if (to.hash) {
41
+ resolve({
42
+ el: to.hash,
43
+ behavior: 'smooth'
44
+ })
45
+ }
46
+
47
+ if (savedPosition) {
48
+ resolve({
49
+ top: savedPosition.top,
50
+ left: savedPosition.left,
51
+ behavior: 'smooth'
52
+ })
53
+ }
54
+
55
+ resolve({
56
+ top: 0,
57
+ left: 0,
58
+ behavior: 'instant'
59
+ })
60
+ }, 100)
61
+ })
39
62
  },
40
63
  routes: routes
41
64
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-reporting/base",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "Manage srl templates, build and publish",
5
5
  "repository": {
6
6
  "url": "https://github.com/mmssolutionsio/simple-reporting-library"