@entur-partner/common 9.3.1 → 9.3.3-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE.md +1 -0
  2. package/dist/ActionBar.d.ts +2 -2
  3. package/dist/AuditInfo.d.ts +3 -3
  4. package/dist/Box.d.ts +15 -14
  5. package/dist/Breadcrumbs.d.ts +2 -2
  6. package/dist/ConfirmModal.d.ts +4 -3
  7. package/dist/Content.d.ts +4 -3
  8. package/dist/EnturPartnerLogo.d.ts +6 -5
  9. package/dist/ErrorBoundary.d.ts +1 -1
  10. package/dist/ExpandableMultiLanguageInput.d.ts +4 -4
  11. package/dist/FeatureToggle.d.ts +1 -1
  12. package/dist/FormatCurrencyAmount.d.ts +4 -3
  13. package/dist/FormatDateTime.d.ts +1 -1
  14. package/dist/LanguageSelect.d.ts +4 -4
  15. package/dist/Link.d.ts +2 -2
  16. package/dist/LinkButton.d.ts +3 -3
  17. package/dist/Menu.d.ts +4 -3
  18. package/dist/MultiLanguageInput.d.ts +5 -5
  19. package/dist/OrganisationDropdown.d.ts +2 -2
  20. package/dist/PageTitle.d.ts +1 -1
  21. package/dist/Pager.d.ts +1 -1
  22. package/dist/PermissionCheck.d.ts +2 -2
  23. package/dist/RouteLeavingGuard.d.ts +3 -3
  24. package/dist/Stack.d.ts +3 -2
  25. package/dist/StatusLabel.d.ts +2 -2
  26. package/dist/Text.d.ts +7 -6
  27. package/dist/Unbutton.d.ts +4 -4
  28. package/dist/UserMenu/components/CookieSettingsMenuItem.d.ts +2 -2
  29. package/dist/UserMenu/components/CustomOverflowMenu.d.ts +3 -3
  30. package/dist/UserMenu/components/CustomOverflowMenuItem.d.ts +2 -2
  31. package/dist/UserMenu/components/LanguageSwitchMenuItem.d.ts +2 -2
  32. package/dist/UserMenu/components/LogOutMenuItem.d.ts +2 -2
  33. package/dist/UserMenu/components/UserMenuItem.d.ts +2 -2
  34. package/dist/UserMenu/components/VersionMenuItem.d.ts +1 -1
  35. package/dist/UserMenu/index.d.ts +3 -3
  36. package/dist/UserMenu/useOutsideClick.d.ts +1 -1
  37. package/dist/common.cjs.development.js +793 -793
  38. package/dist/common.cjs.development.js.map +1 -1
  39. package/dist/common.cjs.production.min.js +1 -1
  40. package/dist/common.cjs.production.min.js.map +1 -1
  41. package/dist/common.esm.js +789 -789
  42. package/dist/common.esm.js.map +1 -1
  43. package/dist/index.d.ts +30 -30
  44. package/dist/styles.css +87 -87
  45. package/dist/useEventListener.d.ts +1 -3
  46. package/package.json +62 -62
  47. package/dist/helpers.d.ts +0 -1
package/dist/styles.css CHANGED
@@ -11,37 +11,6 @@ main .eds-table--sticky-header--active .eds-table__head,
11
11
  top: 1rem;
12
12
  }/* DO NOT CHANGE!*/
13
13
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
14
- button.eps-link-button {
15
- cursor: pointer;
16
- }
17
- button.eps-link-button, button.eps-link-button:hover, button.eps-link-button:focus, button.eps-link-button:active:focus, button.eps-link-button:active:hover, button.eps-link-button:active {
18
- background: none;
19
- background-color: inherit;
20
- border: none;
21
- padding: 0;
22
- }
23
- button.eps-link-button:hover {
24
- color: #aeb7e2;
25
- }/* DO NOT CHANGE!*/
26
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
27
- /* DO NOT CHANGE!*/
28
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
29
- .eps-menu {
30
- position: relative;
31
- width: 100%;
32
- z-index: 30;
33
- }
34
- @media screen and (min-width: 50rem) {
35
- .eps-menu {
36
- left: 0;
37
- top: 0;
38
- position: fixed;
39
- height: 100vh;
40
- width: 20rem;
41
- overflow-y: scroll;
42
- }
43
- }/* DO NOT CHANGE!*/
44
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
45
14
  /* DO NOT CHANGE!*/
46
15
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
47
16
  .eps-action-bar {
@@ -76,37 +45,6 @@ button.eps-link-button:hover {
76
45
  height: 100px;
77
46
  }/* DO NOT CHANGE!*/
78
47
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
79
- .eps-language-select {
80
- color: #181c56;
81
- }
82
- .eps-language-select label {
83
- flex: initial;
84
- }
85
- .eps-language-select .asterisk-margin {
86
- margin-left: 0.125rem;
87
- }/* DO NOT CHANGE!*/
88
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
89
- .eps-logo-wrapper {
90
- display: inline-block;
91
- }
92
- .eps-logo-wrapper .logo {
93
- height: auto;
94
- width: 170px;
95
- }/* DO NOT CHANGE!*/
96
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
97
- /* DO NOT CHANGE!*/
98
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
99
- .eps-content {
100
- margin: 1rem;
101
- }
102
- @media screen and (min-width: 50rem) {
103
- .eps-content {
104
- margin: 1.5rem 1.5rem 1.5rem 22rem;
105
- }
106
- }.multi-language-input:focus {
107
- outline: none;
108
- }/* DO NOT CHANGE!*/
109
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
110
48
  .eps-confirm-modal-content {
111
49
  margin-bottom: 1rem;
112
50
  }/* DO NOT CHANGE!*/
@@ -2370,39 +2308,70 @@ button.eps-link-button:hover {
2370
2308
 
2371
2309
  .eps-bg-lavender {
2372
2310
  background-color: #aeb7e2;
2373
- }.eps-unbutton, .eps-unbutton:hover, .eps-unbutton:focus, .eps-unbutton:active:focus, .eps-unbutton:active:hover, .eps-unbutton:active {
2374
- background: none;
2375
- background-color: inherit;
2376
- color: inherit;
2377
- border: none;
2311
+ }ol.eds-breadcrumbs {
2378
2312
  padding: 0;
2379
- font: inherit;
2380
- outline: inherit;
2381
- height: inherit;
2382
- min-width: inherit;
2383
2313
  }/* DO NOT CHANGE!*/
2384
2314
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2385
- .eps-status-label {
2386
- display: flex;
2387
- align-items: center;
2315
+ /* DO NOT CHANGE!*/
2316
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2317
+ .eps-content {
2318
+ margin: 1rem;
2388
2319
  }
2389
- .eps-status-label.center {
2390
- justify-content: center;
2320
+ @media screen and (min-width: 50rem) {
2321
+ .eps-content {
2322
+ margin: 1.5rem 1.5rem 1.5rem 22rem;
2323
+ }
2324
+ }/* DO NOT CHANGE!*/
2325
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2326
+ .eps-logo-wrapper {
2327
+ display: inline-block;
2391
2328
  }
2392
- .eps-status-label__bullet {
2393
- padding: 5px;
2394
- margin-bottom: 4px;
2395
- border-radius: 50%;
2396
- background: #d1d3d3;
2397
- margin-right: 10px;
2329
+ .eps-logo-wrapper .logo {
2330
+ height: auto;
2331
+ width: 170px;
2332
+ }/* DO NOT CHANGE!*/
2333
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2334
+ .eps-language-select {
2335
+ color: #181c56;
2398
2336
  }
2399
- .eps-status-label__bullet.aggressive {
2400
- background: #ff5959;
2337
+ .eps-language-select label {
2338
+ flex: initial;
2401
2339
  }
2402
- .eps-status-label__bullet.active {
2403
- background: #1a8e60;
2404
- }ol.eds-breadcrumbs {
2340
+ .eps-language-select .asterisk-margin {
2341
+ margin-left: 0.125rem;
2342
+ }/* DO NOT CHANGE!*/
2343
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2344
+ button.eps-link-button {
2345
+ cursor: pointer;
2346
+ }
2347
+ button.eps-link-button, button.eps-link-button:hover, button.eps-link-button:focus, button.eps-link-button:active:focus, button.eps-link-button:active:hover, button.eps-link-button:active {
2348
+ background: none;
2349
+ background-color: inherit;
2350
+ border: none;
2405
2351
  padding: 0;
2352
+ }
2353
+ button.eps-link-button:hover {
2354
+ color: #aeb7e2;
2355
+ }/* DO NOT CHANGE!*/
2356
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2357
+ /* DO NOT CHANGE!*/
2358
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2359
+ .eps-menu {
2360
+ position: relative;
2361
+ width: 100%;
2362
+ z-index: 30;
2363
+ }
2364
+ @media screen and (min-width: 50rem) {
2365
+ .eps-menu {
2366
+ left: 0;
2367
+ top: 0;
2368
+ position: fixed;
2369
+ height: 100vh;
2370
+ width: 20rem;
2371
+ overflow-y: scroll;
2372
+ }
2373
+ }.multi-language-input:focus {
2374
+ outline: none;
2406
2375
  }/* DO NOT CHANGE!*/
2407
2376
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2408
2377
  /* DO NOT CHANGE!*/
@@ -2681,6 +2650,37 @@ button.eps-link-button:hover {
2681
2650
  font-weight: 1rem;
2682
2651
  }/* DO NOT CHANGE!*/
2683
2652
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2653
+ .eps-status-label {
2654
+ display: flex;
2655
+ align-items: center;
2656
+ }
2657
+ .eps-status-label.center {
2658
+ justify-content: center;
2659
+ }
2660
+ .eps-status-label__bullet {
2661
+ padding: 5px;
2662
+ margin-bottom: 4px;
2663
+ border-radius: 50%;
2664
+ background: #d1d3d3;
2665
+ margin-right: 10px;
2666
+ }
2667
+ .eps-status-label__bullet.aggressive {
2668
+ background: #ff5959;
2669
+ }
2670
+ .eps-status-label__bullet.active {
2671
+ background: #1a8e60;
2672
+ }.eps-unbutton, .eps-unbutton:hover, .eps-unbutton:focus, .eps-unbutton:active:focus, .eps-unbutton:active:hover, .eps-unbutton:active {
2673
+ background: none;
2674
+ background-color: inherit;
2675
+ color: inherit;
2676
+ border: none;
2677
+ padding: 0;
2678
+ font: inherit;
2679
+ outline: inherit;
2680
+ height: inherit;
2681
+ min-width: inherit;
2682
+ }/* DO NOT CHANGE!*/
2683
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
2684
2684
  /**
2685
2685
  PS! We use #eps-user-menu to prevent the micro frontends overriding the styles. By using
2686
2686
  an id we have a higher specificity. We should explore a better solution later. Ideally
@@ -1,5 +1,3 @@
1
- interface TypedEventListener<T extends Event> {
2
- (evt: T): void;
3
- }
1
+ type TypedEventListener<T extends Event> = (evt: T) => void;
4
2
  export declare function useEventListener<T extends Event = Event>(eventName: string, handler: TypedEventListener<T>, element?: WindowEventHandlers): void;
5
3
  export {};
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
1
  {
2
- "name": "@entur-partner/common",
3
- "version": "9.3.1",
4
- "license": "EUPL-1.2",
5
- "main": "dist/index.js",
6
- "module": "dist/common.esm.js",
7
- "typings": "dist/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/entur/entur-partner-packages.git",
14
- "directory": "packages/common"
15
- },
16
- "publishConfig": {
17
- "access": "public"
18
- },
19
- "scripts": {
20
- "watch": "dts watch --noClean --verbose --transpileOnly",
21
- "build": "dts build",
22
- "test": "dts test --env=jsdom",
23
- "lint": "dts lint"
24
- },
25
- "peerDependencies": {
26
- "@entur/button": "^2.3.6",
27
- "@entur/dropdown": "^5.0.3",
28
- "@entur/expand": "^3.2.17",
29
- "@entur/form": "^5.0.0",
30
- "@entur/icons": "^7.0.0",
31
- "@entur/menu": "^4.0.0",
32
- "@entur/modal": "^1.3.6",
33
- "@entur/tooltip": "^2.4.7",
34
- "react": ">=16.8.0",
35
- "react-dom": ">=16.8.0",
36
- "react-helmet-async": "^1.3.0",
37
- "react-router-dom": "^6.22.0"
38
- },
39
- "dependencies": {
40
- "@entur-partner/util": "^1.3.1",
41
- "classnames": "^2.2.6"
42
- },
43
- "devDependencies": {
44
- "@entur-partner/permission-client-node": "2.3.2",
45
- "@entur/tokens": "3.17.3",
46
- "identity-obj-proxy": "3.0.0",
47
- "react-helmet-async": "1.3.0",
48
- "react-router-dom": "6.28.0"
49
- },
50
- "jest": {
51
- "moduleNameMapper": {
52
- "\\.(css|less|sass|scss)$": "identity-obj-proxy"
53
- },
54
- "collectCoverageFrom": [
55
- "<rootDir>/src/**/*.{js,jsx,ts,tsx}"
56
- ]
57
- },
58
- "jestSonar": {
59
- "reportPath": "reports/jest/",
60
- "reportFile": "jest-sonar-report.xml",
61
- "indent": 4
62
- },
63
- "gitHead": "efd173747521333774031ca60234e9ef3cce9f0c"
2
+ "name": "@entur-partner/common",
3
+ "version": "9.3.3-alpha.0",
4
+ "license": "EUPL-1.2",
5
+ "main": "dist/index.js",
6
+ "module": "dist/common.esm.js",
7
+ "typings": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/entur/entur-partner-packages.git",
14
+ "directory": "packages/common"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "scripts": {
20
+ "watch": "dts watch --noClean --verbose --transpileOnly",
21
+ "build": "dts build",
22
+ "test": "dts test --env=jsdom",
23
+ "lint": "dts lint"
24
+ },
25
+ "peerDependencies": {
26
+ "@entur/button": ">=2.3.6 <4.0.0",
27
+ "@entur/dropdown": ">=5.0.3 <8.0.0",
28
+ "@entur/expand": "^3.2.17",
29
+ "@entur/form": ">=5.0.0 <9.0.0",
30
+ "@entur/icons": ">=7.0.0 <9.0.0",
31
+ "@entur/menu": ">=4.0.0 <6.0.0",
32
+ "@entur/modal": "^1.3.6",
33
+ "@entur/tooltip": ">=2.4.7 <6.0.0",
34
+ "react": ">=18.0.0",
35
+ "react-dom": ">=18.0.0",
36
+ "react-helmet-async": ">=2.0.0 <3.0.0",
37
+ "react-router-dom": "^6.22.0"
38
+ },
39
+ "dependencies": {
40
+ "@entur-partner/util": "^1.3.2-alpha.0",
41
+ "classnames": "^2.2.6"
42
+ },
43
+ "devDependencies": {
44
+ "@entur-partner/permission-client-node": "2.3.2",
45
+ "@entur/tokens": "3.17.3",
46
+ "identity-obj-proxy": "3.0.0",
47
+ "react-helmet-async": "2.0.5",
48
+ "react-router-dom": "6.28.0"
49
+ },
50
+ "jest": {
51
+ "moduleNameMapper": {
52
+ "\\.(css|less|sass|scss)$": "identity-obj-proxy"
53
+ },
54
+ "collectCoverageFrom": [
55
+ "<rootDir>/src/**/*.{js,jsx,ts,tsx}"
56
+ ]
57
+ },
58
+ "jestSonar": {
59
+ "reportPath": "reports/jest/",
60
+ "reportFile": "jest-sonar-report.xml",
61
+ "indent": 4
62
+ },
63
+ "gitHead": "60e3f8765e47d7496720435932909572544087da"
64
64
  }
package/dist/helpers.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function isFunction<T>(functionToCheck: any): functionToCheck is T;