@ti-engine/web-framework 1.19.0 → 1.20.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 (52) hide show
  1. package/.env +4 -4
  2. package/CHANGELOG.md +384 -353
  3. package/README.md +73 -73
  4. package/bin/build/post-install.js +18 -18
  5. package/bin/localization/web-server-labels.json +27 -27
  6. package/bin/static/.well-known/appspecific/com.chrome.devtools.json +5 -5
  7. package/bin/static/fragments/components/component-notification-bar.html +21 -21
  8. package/bin/static/fragments/components/component-sidebar.html +33 -33
  9. package/bin/static/fragments/components/component-tooltip.html +10 -10
  10. package/bin/static/fragments/components/component-topbar.html +5 -5
  11. package/bin/static/fragments/frame-administration.html +2 -2
  12. package/bin/static/fragments/frame-application.html +18 -18
  13. package/bin/static/fragments/frame-dashboard.html +2 -2
  14. package/bin/static/fragments/frame-login.html +119 -119
  15. package/bin/static/fragments/frame-not-found.html +2 -2
  16. package/bin/static/fragments/frame-profile.html +2 -2
  17. package/bin/static/index.html +22 -22
  18. package/bin/static/scripts/ti-charts.js +1591 -1591
  19. package/bin/static/scripts/ti-framework.css +3194 -3194
  20. package/bin/static/scripts/ti-framework.js +1427 -1427
  21. package/bin/static/scripts/ti-theme-black-glass.css +216 -216
  22. package/bin/static/scripts/ti-theme-daylight.css +87 -87
  23. package/bin/web-app-manager.js +660 -663
  24. package/bin/web-server.js +936 -937
  25. package/bin/web-server.json +48 -48
  26. package/components/admin-config-handlers.js +95 -92
  27. package/components/auth-manager.js +438 -442
  28. package/components/authorization.js +135 -135
  29. package/components/config-change-notifier.js +98 -98
  30. package/components/config-registry.js +257 -260
  31. package/components/config-service.js +363 -360
  32. package/components/config-store.js +244 -246
  33. package/components/definitions.types.js +28 -26
  34. package/components/session-store.js +113 -110
  35. package/components/user.js +134 -132
  36. package/components/web-config-env.js +85 -85
  37. package/components/web-handlers.js +803 -800
  38. package/package.json +139 -67
  39. package/types/bin/web-app-manager.d.ts +194 -0
  40. package/types/bin/web-server.d.ts +373 -0
  41. package/types/components/admin-config-handlers.d.ts +11 -0
  42. package/types/components/auth-manager.d.ts +125 -0
  43. package/types/components/authorization.d.ts +54 -0
  44. package/types/components/config-change-notifier.d.ts +73 -0
  45. package/types/components/config-registry.d.ts +149 -0
  46. package/types/components/config-service.d.ts +218 -0
  47. package/types/components/config-store.d.ts +128 -0
  48. package/types/components/definitions.types.d.ts +31 -0
  49. package/types/components/session-store.d.ts +56 -0
  50. package/types/components/user.d.ts +83 -0
  51. package/types/components/web-config-env.d.ts +17 -0
  52. package/types/components/web-handlers.d.ts +23 -0
@@ -1,120 +1,120 @@
1
- <div id="ti-login" x-data="tiLoginTestUserPanel">
2
- <div class="ti-login-container">
3
- <!-- Brand mark -->
4
- <div class="ti-login-brand">
5
- <div class="ti-login-brand-mark">T</div>
6
- <div class="ti-login-brand-text">
7
- <div class="ti-login-brand-title">Welcome back</div>
8
- <div class="ti-login-brand-sub">Sign in to continue</div>
9
- </div>
10
- </div>
11
-
12
- <!-- Login card -->
13
- <div class="ti-login-card">
14
- <!-- Error message -->
15
- <div id="ti-error" class="ti-login-error"></div>
16
-
17
- <!--ti-auth-method:local-->
18
- <!-- Local auth form -->
19
- <form id="ti-login-form" action="/login/local" method="post" class="ti-login-form">
20
- <input type="hidden" name="_csrf" value='{ti-csrf-placeholder}'>
21
- <div>
22
- <label class="ti-field-label" x-text-label="interface.default.login.username" for="ti-username">Username</label>
23
- <input id="ti-username"
24
- name="username"
25
- autocomplete="username"
26
- autocapitalize="none"
27
- spellcheck="false"
28
- required class="ti-input"
29
- placeholder="Enter your username"/>
30
- </div>
31
- <div>
32
- <label class="ti-field-label" x-text-label="interface.default.login.password" for="ti-password">Password</label>
33
- <input id="ti-password"
34
- name="password"
35
- type="password"
36
- autocomplete="current-password"
37
- enterkeyhint="go"
38
- required class="ti-input"
39
- placeholder="Enter your password"/>
40
- </div>
41
- <button type="submit" class="ti-btn primary lg full ti-login-submit">
42
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
43
- stroke-linejoin="round" aria-hidden="true">
44
- <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M15 12H3"/>
45
- </svg>
46
- <span x-text-label="interface.default.login.sign-in">Sign In</span>
47
- </button>
48
- </form>
49
- <!--/ti-auth-method-->
50
-
51
- <!--ti-auth-divider-->
52
- <!-- Divider -->
53
- <div class="ti-login-divider">
54
- <div class="ti-login-divider-line"></div>
55
- <span class="ti-login-divider-label">or continue with</span>
56
- <div class="ti-login-divider-line"></div>
57
- </div>
58
- <!--/ti-auth-divider-->
59
-
60
- <!--ti-auth-social-->
61
- <!-- Social auth -->
62
- <div class="ti-login-social">
63
- <!--ti-auth-method:openid-google-->
64
- <a href="/login/openid-google" class="ti-btn full">
65
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true">
66
- <path d="M21.6 12.23c0-.68-.06-1.33-.17-1.96H12v3.71h5.39a4.6 4.6 0 0 1-2 3.02v2.51h3.23c1.9-1.74 2.98-4.31 2.98-7.28Z" fill="#4285F4"/>
67
- <path d="M12 22c2.7 0 4.97-.9 6.62-2.42l-3.23-2.51c-.9.6-2.04.96-3.39.96-2.6 0-4.81-1.76-5.6-4.12H3.07v2.6A10 10 0 0 0 12 22Z"
68
- fill="#34A853"/>
69
- <path d="M6.4 13.91A6.01 6.01 0 0 1 6.4 12c0-.66.11-1.3.31-1.91V7.49H3.07A10 10 0 0 0 2 12c0 1.61.39 3.14 1.07 4.51l3.33-2.6Z"
70
- fill="#FBBC05"/>
71
- <path d="M12 5.97c1.47 0 2.79.5 3.83 1.5l2.87-2.87C16.96 2.99 14.7 2 12 2A10 10 0 0 0 3.07 7.49l3.33 2.6C7.19 7.73 9.4 5.97 12 5.97Z"
72
- fill="#EA4335"/>
73
- </svg>
74
- <span x-text-label="interface.default.login.sign-in-google">Sign in with Google</span>
75
- </a>
76
- <!--/ti-auth-method-->
77
- <!--ti-auth-method:openid-azure-->
78
- <a href="/login/openid-azure" class="ti-btn full">
79
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true">
80
- <path d="M11.5 2L4 8.5l4 1-4 6.5h8l-2-4 4-1-2.5 8H20L14 2h-2.5Z" fill="#0078D4"/>
81
- </svg>
82
- <span x-text-label="interface.default.login.sign-in-azure">Sign in with Azure</span>
83
- </a>
84
- <!--/ti-auth-method-->
85
- </div>
86
- <!--/ti-auth-social-->
87
-
88
- <!--ti-auth-none-->
89
- <!-- Shown only when no authentication method is enabled/configured. -->
90
- <div class="ti-login-empty">No sign-in method is configured. Please contact your administrator.</div>
91
- <!--/ti-auth-none-->
92
- </div>
93
-
94
- <!-- TEMPORARY: Test user selector for augmentSession() experimentation. Remove once AD-driven identity is wired up. -->
95
- <div class="ti-login-test-panel" role="group" aria-label="Test user selector">
96
- <div class="ti-login-test-panel-title">Test user</div>
97
- <div class="ti-login-test-panel-sub">Pick an identity to inject on login. Roles are derived from the org chart unless you override them.</div>
98
- <div class="ti-login-test-panel-pills">
99
- <template x-for="profile in profiles" :key="profile.employeeID">
100
- <button type="button"
101
- class="ti-login-test-pill"
102
- x-bind:class="{ selected: isSelected(profile) }"
103
- x-bind:aria-pressed="isSelected(profile)"
104
- x-on:click="select(profile)">
105
- <span class="ti-login-test-pill-id" x-text="'#' + profile.employeeID"></span>
106
- <span class="ti-login-test-pill-roles" x-text="'roles ' + profile.roles.join(', ')"></span>
107
- </button>
108
- </template>
109
- <button type="button"
110
- class="ti-login-test-pill ghost"
111
- x-show="selected"
112
- x-on:click="clear()">Clear</button>
113
- </div>
114
- <label class="ti-login-test-panel-override">
115
- <input type="checkbox" x-model="overrideRoles" x-on:change="onOverrideChanged()"/>
116
- <span>Override roles (dev) — inject this profile's role list instead of deriving</span>
117
- </label>
118
- </div>
119
- </div>
1
+ <div id="ti-login" x-data="tiLoginTestUserPanel">
2
+ <div class="ti-login-container">
3
+ <!-- Brand mark -->
4
+ <div class="ti-login-brand">
5
+ <div class="ti-login-brand-mark">T</div>
6
+ <div class="ti-login-brand-text">
7
+ <div class="ti-login-brand-title">Welcome back</div>
8
+ <div class="ti-login-brand-sub">Sign in to continue</div>
9
+ </div>
10
+ </div>
11
+
12
+ <!-- Login card -->
13
+ <div class="ti-login-card">
14
+ <!-- Error message -->
15
+ <div id="ti-error" class="ti-login-error"></div>
16
+
17
+ <!--ti-auth-method:local-->
18
+ <!-- Local auth form -->
19
+ <form id="ti-login-form" action="/login/local" method="post" class="ti-login-form">
20
+ <input type="hidden" name="_csrf" value='{ti-csrf-placeholder}'>
21
+ <div>
22
+ <label class="ti-field-label" x-text-label="interface.default.login.username" for="ti-username">Username</label>
23
+ <input id="ti-username"
24
+ name="username"
25
+ autocomplete="username"
26
+ autocapitalize="none"
27
+ spellcheck="false"
28
+ required class="ti-input"
29
+ placeholder="Enter your username"/>
30
+ </div>
31
+ <div>
32
+ <label class="ti-field-label" x-text-label="interface.default.login.password" for="ti-password">Password</label>
33
+ <input id="ti-password"
34
+ name="password"
35
+ type="password"
36
+ autocomplete="current-password"
37
+ enterkeyhint="go"
38
+ required class="ti-input"
39
+ placeholder="Enter your password"/>
40
+ </div>
41
+ <button type="submit" class="ti-btn primary lg full ti-login-submit">
42
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
43
+ stroke-linejoin="round" aria-hidden="true">
44
+ <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M15 12H3"/>
45
+ </svg>
46
+ <span x-text-label="interface.default.login.sign-in">Sign In</span>
47
+ </button>
48
+ </form>
49
+ <!--/ti-auth-method-->
50
+
51
+ <!--ti-auth-divider-->
52
+ <!-- Divider -->
53
+ <div class="ti-login-divider">
54
+ <div class="ti-login-divider-line"></div>
55
+ <span class="ti-login-divider-label">or continue with</span>
56
+ <div class="ti-login-divider-line"></div>
57
+ </div>
58
+ <!--/ti-auth-divider-->
59
+
60
+ <!--ti-auth-social-->
61
+ <!-- Social auth -->
62
+ <div class="ti-login-social">
63
+ <!--ti-auth-method:openid-google-->
64
+ <a href="/login/openid-google" class="ti-btn full">
65
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true">
66
+ <path d="M21.6 12.23c0-.68-.06-1.33-.17-1.96H12v3.71h5.39a4.6 4.6 0 0 1-2 3.02v2.51h3.23c1.9-1.74 2.98-4.31 2.98-7.28Z" fill="#4285F4"/>
67
+ <path d="M12 22c2.7 0 4.97-.9 6.62-2.42l-3.23-2.51c-.9.6-2.04.96-3.39.96-2.6 0-4.81-1.76-5.6-4.12H3.07v2.6A10 10 0 0 0 12 22Z"
68
+ fill="#34A853"/>
69
+ <path d="M6.4 13.91A6.01 6.01 0 0 1 6.4 12c0-.66.11-1.3.31-1.91V7.49H3.07A10 10 0 0 0 2 12c0 1.61.39 3.14 1.07 4.51l3.33-2.6Z"
70
+ fill="#FBBC05"/>
71
+ <path d="M12 5.97c1.47 0 2.79.5 3.83 1.5l2.87-2.87C16.96 2.99 14.7 2 12 2A10 10 0 0 0 3.07 7.49l3.33 2.6C7.19 7.73 9.4 5.97 12 5.97Z"
72
+ fill="#EA4335"/>
73
+ </svg>
74
+ <span x-text-label="interface.default.login.sign-in-google">Sign in with Google</span>
75
+ </a>
76
+ <!--/ti-auth-method-->
77
+ <!--ti-auth-method:openid-azure-->
78
+ <a href="/login/openid-azure" class="ti-btn full">
79
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true">
80
+ <path d="M11.5 2L4 8.5l4 1-4 6.5h8l-2-4 4-1-2.5 8H20L14 2h-2.5Z" fill="#0078D4"/>
81
+ </svg>
82
+ <span x-text-label="interface.default.login.sign-in-azure">Sign in with Azure</span>
83
+ </a>
84
+ <!--/ti-auth-method-->
85
+ </div>
86
+ <!--/ti-auth-social-->
87
+
88
+ <!--ti-auth-none-->
89
+ <!-- Shown only when no authentication method is enabled/configured. -->
90
+ <div class="ti-login-empty">No sign-in method is configured. Please contact your administrator.</div>
91
+ <!--/ti-auth-none-->
92
+ </div>
93
+
94
+ <!-- TEMPORARY: Test user selector for augmentSession() experimentation. Remove once AD-driven identity is wired up. -->
95
+ <div class="ti-login-test-panel" role="group" aria-label="Test user selector">
96
+ <div class="ti-login-test-panel-title">Test user</div>
97
+ <div class="ti-login-test-panel-sub">Pick an identity to inject on login. Roles are derived from the org chart unless you override them.</div>
98
+ <div class="ti-login-test-panel-pills">
99
+ <template x-for="profile in profiles" :key="profile.employeeID">
100
+ <button type="button"
101
+ class="ti-login-test-pill"
102
+ x-bind:class="{ selected: isSelected(profile) }"
103
+ x-bind:aria-pressed="isSelected(profile)"
104
+ x-on:click="select(profile)">
105
+ <span class="ti-login-test-pill-id" x-text="'#' + profile.employeeID"></span>
106
+ <span class="ti-login-test-pill-roles" x-text="'roles ' + profile.roles.join(', ')"></span>
107
+ </button>
108
+ </template>
109
+ <button type="button"
110
+ class="ti-login-test-pill ghost"
111
+ x-show="selected"
112
+ x-on:click="clear()">Clear</button>
113
+ </div>
114
+ <label class="ti-login-test-panel-override">
115
+ <input type="checkbox" x-model="overrideRoles" x-on:change="onOverrideChanged()"/>
116
+ <span>Override roles (dev) — inject this profile's role list instead of deriving</span>
117
+ </label>
118
+ </div>
119
+ </div>
120
120
  </div>
@@ -1,3 +1,3 @@
1
- <div id="ti-not-found" class="ti-content">
2
- <span>Not found</span>
1
+ <div id="ti-not-found" class="ti-content">
2
+ <span>Not found</span>
3
3
  </div>
@@ -1,3 +1,3 @@
1
- <div>
2
- <span>Profile</span>
1
+ <div>
2
+ <span>Profile</span>
3
3
  </div>
@@ -1,23 +1,23 @@
1
- <!DOCTYPE html>
2
- <html lang="en" data-theme="daylight">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
- <meta name="htmx-config" content='{ti-htmx-config-placeholder}'/>
7
- <title id="ti-page-title">Main Page</title>
8
- <link rel="icon" href="/static/favicon.ico" type="image/ico">
9
- <script defer src="/static/scripts/ti-framework.js" nonce='{ti-nonce-placeholder}'></script>
10
- <script defer src="/static/scripts/ti-charts.js" nonce='{ti-nonce-placeholder}'></script>
11
- <script defer src="/static/scripts/lib/alpinejs-csp.min.js" nonce='{ti-nonce-placeholder}'></script>
12
- <script defer src="/static/scripts/lib/htmx.min.js" nonce='{ti-nonce-placeholder}'></script>
13
- <script defer src="/static/scripts/lib/safe-nonce.min.js" nonce='{ti-nonce-placeholder}'></script>
14
- <link rel="stylesheet" type="text/css" href="/static/scripts/ti-framework.css"/>
15
- <link rel="stylesheet" type="text/css" href="/static/scripts/ti-theme-daylight.css"/>
16
- <link rel="stylesheet" type="text/css" href="/static/scripts/ti-theme-black-glass.css"/>
17
- </head>
18
- <body hx-ext="safe-nonce">
19
- <div id="ti-main" class="ti-main">
20
- <ti-nested-frame-placeholder hx-get="/app/enter" hx-trigger="load" hx-target="this" hx-swap="outerHTML"></ti-nested-frame-placeholder>
21
- </div>
22
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="daylight">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
+ <meta name="htmx-config" content='{ti-htmx-config-placeholder}'/>
7
+ <title id="ti-page-title">Main Page</title>
8
+ <link rel="icon" href="/static/favicon.ico" type="image/ico">
9
+ <script defer src="/static/scripts/ti-framework.js" nonce='{ti-nonce-placeholder}'></script>
10
+ <script defer src="/static/scripts/ti-charts.js" nonce='{ti-nonce-placeholder}'></script>
11
+ <script defer src="/static/scripts/lib/alpinejs-csp.min.js" nonce='{ti-nonce-placeholder}'></script>
12
+ <script defer src="/static/scripts/lib/htmx.min.js" nonce='{ti-nonce-placeholder}'></script>
13
+ <script defer src="/static/scripts/lib/safe-nonce.min.js" nonce='{ti-nonce-placeholder}'></script>
14
+ <link rel="stylesheet" type="text/css" href="/static/scripts/ti-framework.css"/>
15
+ <link rel="stylesheet" type="text/css" href="/static/scripts/ti-theme-daylight.css"/>
16
+ <link rel="stylesheet" type="text/css" href="/static/scripts/ti-theme-black-glass.css"/>
17
+ </head>
18
+ <body hx-ext="safe-nonce">
19
+ <div id="ti-main" class="ti-main">
20
+ <ti-nested-frame-placeholder hx-get="/app/enter" hx-trigger="load" hx-target="this" hx-swap="outerHTML"></ti-nested-frame-placeholder>
21
+ </div>
22
+ </body>
23
23
  </html>