@mxtommy/kip 4.0.7 → 4.1.0-beta.1
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/CHANGELOG.md +2 -2
- package/package.json +1 -1
- package/plugin/index.js +59 -8
- package/plugin/openApi.json +1 -1
- package/public/3rdpartylicenses.txt +26 -26
- package/public/assets/help-docs/chartplotter.md +5 -5
- package/public/chunk-2QCDSHYY.js +2 -0
- package/public/chunk-7UI7K4WB.js +52 -0
- package/public/{chunk-KZW5Z46K.js → chunk-ADTF2732.js} +1 -1
- package/public/chunk-AQ66AGUC.js +1 -0
- package/public/chunk-BRLXMYKY.js +3 -0
- package/public/{chunk-QLTN6G6E.js → chunk-CWBDCB4U.js} +1 -1
- package/public/{chunk-QZJKBIMY.js → chunk-D3OVXRDS.js} +1 -1
- package/public/{chunk-IJ22WXFB.js → chunk-GYERRI2M.js} +1 -1
- package/public/chunk-GZCIAVS6.js +2 -0
- package/public/{chunk-35577QTX.js → chunk-JEFO22J2.js} +2 -2
- package/public/chunk-JPSGB24W.js +3 -0
- package/public/{chunk-OQULS6SV.js → chunk-JWT2WFAW.js} +1 -1
- package/public/{chunk-QVCMARCU.js → chunk-KITN4REV.js} +1 -1
- package/public/{chunk-2DBQEP6W.js → chunk-KNBOI7TL.js} +1 -1
- package/public/{chunk-BMDGKBYM.js → chunk-L4NM3HUK.js} +26 -26
- package/public/chunk-LKUCWQH6.js +1 -0
- package/public/{chunk-RYHOAWDD.js → chunk-MHCWCMEF.js} +1 -1
- package/public/chunk-MKKQCG3C.js +2 -0
- package/public/chunk-PR5JLJLD.js +15 -0
- package/public/chunk-QL3G7CWF.js +1 -0
- package/public/chunk-RIZZU7FJ.js +1 -0
- package/public/{chunk-HIADZ4BV.js → chunk-RVSQUIEX.js} +1 -1
- package/public/{chunk-52M2PJJL.js → chunk-TKCKTVDR.js} +1 -1
- package/public/chunk-UDAYIL7R.js +1 -0
- package/public/{chunk-SZ2GUIT5.js → chunk-W4VRE5PG.js} +1 -1
- package/public/chunk-Z6B2WXN3.js +1 -0
- package/public/index.html +1 -1
- package/public/main-PRDRZK7G.js +5 -0
- package/public/{polyfills-HMJGV7SQ.js → polyfills-C5VXBGWL.js} +1 -1
- package/rm-npmjs-beta.sh +50 -0
- package/public/chunk-4NJ3ZL5U.js +0 -1
- package/public/chunk-AB255PKD.js +0 -2
- package/public/chunk-BISZS3TE.js +0 -3
- package/public/chunk-D2CYLQZF.js +0 -1
- package/public/chunk-DADLXEYG.js +0 -1
- package/public/chunk-JCVEDDSQ.js +0 -2
- package/public/chunk-NDOR4O4J.js +0 -1
- package/public/chunk-OB3QLUH6.js +0 -15
- package/public/chunk-PKKBBIJK.js +0 -3
- package/public/chunk-ROD2YZ6L.js +0 -52
- package/public/chunk-TIWUK3AU.js +0 -1
- package/public/chunk-XDPHEQEO.js +0 -2
- package/public/main-NJAW6UFC.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Return to last active dashboard when leaving Options, Settings and Help
|
|
4
4
|
* Reduce minichart dataset storage churn
|
|
5
5
|
## Fixes
|
|
6
|
-
*
|
|
7
|
-
* More Switch Panel toggle control not responding to touch on Android and RPi Chromium
|
|
6
|
+
* Gauge zones not drawn in initial app load
|
|
7
|
+
* More Switch Panel toggle control not responding to touch on Android Chrome and RPi Chromium
|
|
8
8
|
* Widget Racesteer icon rendering is missing colors
|
|
9
9
|
# v 4.0.6
|
|
10
10
|
## Fixes
|
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -39,7 +39,17 @@ const start = (server) => {
|
|
|
39
39
|
const API_PATHS = {
|
|
40
40
|
DISPLAYS: `/displays`,
|
|
41
41
|
INSTANCE: `/displays/:displayId`,
|
|
42
|
-
ACTIVE_SCREEN: `/displays/:displayId/
|
|
42
|
+
ACTIVE_SCREEN: `/displays/:displayId/screenIndex`,
|
|
43
|
+
CHANGE_SCREEN: `/displays/:displayId/activeScreen`
|
|
44
|
+
};
|
|
45
|
+
const CONFIG_SCHEMA = {
|
|
46
|
+
properties: {
|
|
47
|
+
notifications: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
title: 'Remote Control',
|
|
50
|
+
description: 'This plugin requires no configuration.'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
43
53
|
};
|
|
44
54
|
// Helpers
|
|
45
55
|
function getDisplaySelfPath(displayId, suffix) {
|
|
@@ -80,14 +90,9 @@ const start = (server) => {
|
|
|
80
90
|
const msg = 'Stopped.';
|
|
81
91
|
server.setPluginStatus(msg);
|
|
82
92
|
},
|
|
83
|
-
schema: () =>
|
|
84
|
-
return {
|
|
85
|
-
type: "object",
|
|
86
|
-
properties: {}
|
|
87
|
-
};
|
|
88
|
-
},
|
|
93
|
+
schema: () => CONFIG_SCHEMA,
|
|
89
94
|
registerWithRouter(router) {
|
|
90
|
-
server.debug(`Registering plugin routes: ${API_PATHS.DISPLAYS}, ${API_PATHS.INSTANCE}, ${API_PATHS.ACTIVE_SCREEN}`);
|
|
95
|
+
server.debug(`Registering plugin routes: ${API_PATHS.DISPLAYS}, ${API_PATHS.INSTANCE}, ${API_PATHS.ACTIVE_SCREEN}, ${API_PATHS.CHANGE_SCREEN}`);
|
|
91
96
|
// Validate/normalize :displayId where present
|
|
92
97
|
router.param('displayId', (req, res, next, displayId) => {
|
|
93
98
|
if (displayId == null)
|
|
@@ -179,6 +184,32 @@ const start = (server) => {
|
|
|
179
184
|
return sendFail(res, 400, error.message);
|
|
180
185
|
}
|
|
181
186
|
});
|
|
187
|
+
router.put(`${API_PATHS.CHANGE_SCREEN}`, async (req, res) => {
|
|
188
|
+
server.debug(`** PUT ${API_PATHS.CHANGE_SCREEN}. Params: ${JSON.stringify(req.params)} Body: ${JSON.stringify(req.body)}`);
|
|
189
|
+
try {
|
|
190
|
+
const dottedPath = pathToDotNotation(req.path);
|
|
191
|
+
server.debug(`Updating SK path ${dottedPath} with body.screenIdx`);
|
|
192
|
+
server.handleMessage(plugin.id, {
|
|
193
|
+
updates: [
|
|
194
|
+
{
|
|
195
|
+
values: [
|
|
196
|
+
{
|
|
197
|
+
path: dottedPath,
|
|
198
|
+
value: req.body.screenIdx !== undefined ? req.body.screenIdx : null
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}, server_api_1.SKVersion.v1);
|
|
204
|
+
return res.status(200).json({ state: 'SUCCESS', statusCode: 200 });
|
|
205
|
+
}
|
|
206
|
+
catch (error) {
|
|
207
|
+
const msg = `HandleMessage failed with errors!`;
|
|
208
|
+
server.setPluginError(msg);
|
|
209
|
+
server.error(`Error in HandleMessage: ${error}`);
|
|
210
|
+
return sendFail(res, 400, error.message);
|
|
211
|
+
}
|
|
212
|
+
});
|
|
182
213
|
router.get(API_PATHS.DISPLAYS, (req, res) => {
|
|
183
214
|
server.debug(`** GET ${API_PATHS.DISPLAYS}. Params: ${JSON.stringify(req.params)}`);
|
|
184
215
|
try {
|
|
@@ -241,6 +272,26 @@ const start = (server) => {
|
|
|
241
272
|
return sendFail(res, 400, error.message);
|
|
242
273
|
}
|
|
243
274
|
});
|
|
275
|
+
router.get(`${API_PATHS.CHANGE_SCREEN}`, (req, res) => {
|
|
276
|
+
server.debug(`** GET ${API_PATHS.CHANGE_SCREEN}. Params: ${JSON.stringify(req.params)}`);
|
|
277
|
+
try {
|
|
278
|
+
const changeId = req.changeId;
|
|
279
|
+
if (!changeId) {
|
|
280
|
+
return sendFail(res, 400, 'Missing changeId parameter');
|
|
281
|
+
}
|
|
282
|
+
const node = getDisplaySelfPath(changeId, 'activeScreen');
|
|
283
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
284
|
+
const idx = node?.value ?? null;
|
|
285
|
+
if (idx === undefined) {
|
|
286
|
+
return sendFail(res, 404, `Active screen for display ${changeId} not found`);
|
|
287
|
+
}
|
|
288
|
+
return sendOk(res, idx);
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
server.error(`Error reading activeScreen for ${req.params?.changeId}: ${String(error.message || error)}`);
|
|
292
|
+
return sendFail(res, 400, error.message);
|
|
293
|
+
}
|
|
294
|
+
});
|
|
244
295
|
// List all registered routes for debugging
|
|
245
296
|
if (router.stack) {
|
|
246
297
|
router.stack.forEach((layer) => {
|
package/plugin/openApi.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"openapi": "3.0.0",
|
|
3
3
|
"info": {
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"title": "KIP Remote Displays API",
|
|
6
6
|
"description": "API endpoints to list KIP displays and control the active screen for a given KIP instance via Signal K self.displays tree.\n\nUsage:\n- List displays:\n curl -s http://localhost:3000/plugins/kip/displays\n- Read a display's screens:\n curl -s http://localhost:3000/plugins/kip/displays/{displayId}\n- Set a display entry:\n curl -s -X PUT -H 'Content-Type: application/json' -d '{\"displayName\":\"Mast\"}' http://localhost:3000/plugins/kip/displays/{displayId}\n- Get active screen:\n curl -s http://localhost:3000/plugins/kip/displays/{displayId}/activeScreen\n- Set active screen:\n curl -s -X PUT -H 'Content-Type: application/json' -d '{\"screenIdx\":1}' http://localhost:3000/plugins/kip/displays/{displayId}/activeScreen",
|
|
7
7
|
"termsOfService": "http://signalk.org/terms/",
|
|
@@ -478,6 +478,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
478
478
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
479
479
|
SOFTWARE.
|
|
480
480
|
|
|
481
|
+
--------------------------------------------------------------------------------
|
|
482
|
+
Package: @angular/router
|
|
483
|
+
License: "MIT"
|
|
484
|
+
|
|
485
|
+
The MIT License
|
|
486
|
+
|
|
487
|
+
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
|
|
488
|
+
|
|
489
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
490
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
491
|
+
in the Software without restriction, including without limitation the rights
|
|
492
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
493
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
494
|
+
furnished to do so, subject to the following conditions:
|
|
495
|
+
|
|
496
|
+
The above copyright notice and this permission notice shall be included in
|
|
497
|
+
all copies or substantial portions of the Software.
|
|
498
|
+
|
|
499
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
500
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
501
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
502
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
503
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
504
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
505
|
+
THE SOFTWARE.
|
|
506
|
+
|
|
481
507
|
--------------------------------------------------------------------------------
|
|
482
508
|
Package: rxjs
|
|
483
509
|
License: "Apache-2.0"
|
|
@@ -857,32 +883,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
857
883
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
858
884
|
THE SOFTWARE.
|
|
859
885
|
|
|
860
|
-
--------------------------------------------------------------------------------
|
|
861
|
-
Package: @angular/router
|
|
862
|
-
License: "MIT"
|
|
863
|
-
|
|
864
|
-
The MIT License
|
|
865
|
-
|
|
866
|
-
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
|
|
867
|
-
|
|
868
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
869
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
870
|
-
in the Software without restriction, including without limitation the rights
|
|
871
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
872
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
873
|
-
furnished to do so, subject to the following conditions:
|
|
874
|
-
|
|
875
|
-
The above copyright notice and this permission notice shall be included in
|
|
876
|
-
all copies or substantial portions of the Software.
|
|
877
|
-
|
|
878
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
879
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
880
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
881
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
882
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
883
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
884
|
-
THE SOFTWARE.
|
|
885
|
-
|
|
886
886
|
--------------------------------------------------------------------------------
|
|
887
887
|
Package: core-js
|
|
888
888
|
License: "MIT"
|
|
@@ -69,17 +69,17 @@ Change side via Settings → Display → “Freeboard‑SK panel side”. This u
|
|
|
69
69
|
## Chartplotter Mode vs Freeboard‑SK Widget
|
|
70
70
|
| Aspect | Chartplotter Mode | Freeboard‑SK Widget |
|
|
71
71
|
|--------|------------------|---------------------|
|
|
72
|
-
| Persistence across dashboard switches | Yes (never reloads) |
|
|
73
|
-
|
|
|
74
|
-
| Per‑dashboard full
|
|
75
|
-
| Remote dashboard switching continuity | Yes | Yes |
|
|
72
|
+
| Persistence across dashboard switches | Yes (never reloads) | No. (created and destroyed on entering and leaving dashboards containing the widget) |
|
|
73
|
+
| Size and position workflow | Drag split + Save/Cancel | Standard widget positionning and sizing |
|
|
74
|
+
| Per‑dashboard full screen data toggle | Via individal dashboard collapse setting | N/A |
|
|
75
|
+
| Remote dashboard chartplotter switching continuity | Yes | Yes |
|
|
76
76
|
| Memory footprint | Higher baseline (Freeboard-SK always resident) | Lower when dashboard lack the widget |
|
|
77
77
|
| Best for | Continuous nav + multi‑dashboard workflow (MFD) | Occasional chart reference |
|
|
78
78
|
|
|
79
79
|
---
|
|
80
80
|
|
|
81
81
|
## Remote Control Integration
|
|
82
|
-
When another KIP instance changes your active dashboard (Remote Control feature), the chartplotter mode and collapsed dashboard
|
|
82
|
+
When another KIP instance changes your active dashboard (Remote Control feature), the chartplotter mode and collapsed dashboard settings are respected. No special configuration is required.
|
|
83
83
|
|
|
84
84
|
---
|
|
85
85
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as q,i as w,m as tt,o as et,s as it}from"./chunk-W4VRE5PG.js";import{$d as v,Ba as d,Bd as j,Ca as O,Cd as U,Ce as J,Dd as y,Eb as x,Fb as f,Gb as N,Gd as B,Lc as X,Na as c,Ob as k,Qb as u,Rd as $,Td as Z,Wb as V,Xa as E,Xb as Y,Yb as H,Yd as Q,Zc as G,Zd as W,a as h,cb as R,cc as g,fc as z,ga as r,gc as F,hb as A,he as b,ib as M,jb as L,je as T,m as p,oa as C,qa as _,qb as S,rb as m,sa as a,xa as I,ya as P,ze as K}from"./chunk-PR5JLJLD.js";var ht=["tooltip"],nt=20;var at=new _("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let n=a(d);return()=>w(n,{scrollThrottle:nt})}});function dt(n){let rt=a(d);return()=>w(rt,{scrollThrottle:nt})}var ct={provide:at,deps:[],useFactory:dt};function pt(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var _t=new _("mat-tooltip-default-options",{providedIn:"root",factory:pt});var ot="tooltip-panel",st=U({passive:!0}),mt=8,ft=8,ut=24,gt=200,Ft=(()=>{class n{_elementRef=a(c);_ngZone=a(S);_platform=a(j);_ariaDescriber=a(Q);_focusMonitor=a(B);_dir=a(W);_injector=a(d);_viewContainerRef=a(R);_animationsDisabled=b();_defaultOptions=a(_t,{optional:!0});_overlayRef;_tooltipInstance;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=yt;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending;_dirSubscribed=!1;get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=T(t),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(t){let e=T(t);this._disabled!==e&&(this._disabled=e,e?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=y(t)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=y(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(t){let e=this._message;this._message=t!=null?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(e)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_passiveListeners=[];_touchstartTimeout=null;_destroyed=new p;_isDestroyed=!1;constructor(){let t=this._defaultOptions;t&&(this._showDelay=t.showDelay,this._hideDelay=t.hideDelay,t.position&&(this.position=t.position),t.positionAtOrigin&&(this.positionAtOrigin=t.positionAtOrigin),t.touchGestures&&(this.touchGestures=t.touchGestures),t.tooltipClass&&(this.tooltipClass=t.tooltipClass)),this._viewportMargin=mt}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(r(this._destroyed)).subscribe(t=>{t?t==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([e,i])=>{t.removeEventListener(e,i,st)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay,e){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let i=this._createOverlay(e);this._detach(),this._portal=this._portal||new q(this._tooltipComponent,this._viewContainerRef);let o=this._tooltipInstance=i.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(r(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),o.show(t)}hide(t=this.hideDelay){let e=this._tooltipInstance;e&&(e.isVisible()?e.hide(t):(e._cancelPendingAnimations(),this._detach()))}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){let s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&s._origin instanceof c)return this._overlayRef;this._detach()}let e=this._injector.get(K).getAncestorScrollContainers(this._elementRef),i=`${this._cssClassPrefix}-${ot}`,o=tt(this._injector,this.positionAtOrigin?t||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(e);return o.positionChanges.pipe(r(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=et(this._injector,{direction:this._dir,positionStrategy:o,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,i]:i,scrollStrategy:this._injector.get(at)(),disableAnimations:this._animationsDisabled}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(r(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(r(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(r(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&s.keyCode===27&&!Z(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(r(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(t){let e=t.getConfig().positionStrategy,i=this._getOrigin(),o=this._getOverlayPosition();e.withPositions([this._addOffset(h(h({},i.main),o.main)),this._addOffset(h(h({},i.fallback),o.fallback))])}_addOffset(t){let e=ft,i=!this._dir||this._dir.value=="ltr";return t.originY==="top"?t.offsetY=-e:t.originY==="bottom"?t.offsetY=e:t.originX==="start"?t.offsetX=i?-e:e:t.originX==="end"&&(t.offsetX=i?e:-e),t}_getOrigin(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"||e=="below"?i={originX:"center",originY:e=="above"?"top":"bottom"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={originX:"start",originY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={originX:"end",originY:"center"});let{x:o,y:s}=this._invertPosition(i.originX,i.originY);return{main:i,fallback:{originX:o,originY:s}}}_getOverlayPosition(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"?i={overlayX:"center",overlayY:"bottom"}:e=="below"?i={overlayX:"center",overlayY:"top"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={overlayX:"end",overlayY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={overlayX:"start",overlayY:"center"});let{x:o,y:s}=this._invertPosition(i.overlayX,i.overlayY);return{main:i,fallback:{overlayX:o,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),m(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,e){return this.position==="above"||this.position==="below"?e==="top"?e="bottom":e==="bottom"&&(e="top"):t==="end"?t="start":t==="start"&&(t="end"),{x:t,y:e}}_updateCurrentPositionClass(t){let{overlayY:e,originX:i,originY:o}=t,s;if(e==="center"?this._dir&&this._dir.value==="rtl"?s=i==="end"?"left":"right":s=i==="start"?"left":"right":s=e==="bottom"&&o==="top"?"above":"below",s!==this._currentPosition){let l=this._overlayRef;if(l){let D=`${this._cssClassPrefix}-${ot}-`;l.removePanelClass(D+this._currentPosition),l.addPanelClass(D+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",t=>{this._setupPointerExitEventsIfNeeded();let e;t.x!==void 0&&t.y!==void 0&&(e=t),this.show(void 0,e)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",t=>{let e=t.targetTouches?.[0],i=e?{x:e.clientX,y:e.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let o=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,i)},this._defaultOptions?.touchLongPressShowDelay??o)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",e=>{let i=e.relatedTarget;(!i||!this._overlayRef?.overlayElement.contains(i))&&this.hide()}],["wheel",e=>this._wheelListener(e)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let e=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};t.push(["touchend",e],["touchcancel",e])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([e,i])=>{this._elementRef.nativeElement.addEventListener(e,i,st)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(t){if(this._isTooltipVisible()){let e=this._injector.get(O).elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e!==i&&!i.contains(e)&&this.hide()}}_disableNativeGesturesIfNecessary(){let t=this.touchGestures;if(t!=="off"){let e=this._elementRef.nativeElement,i=e.style;(t==="on"||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA")&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),(t==="on"||!e.draggable)&&(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent"}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._isDestroyed||m({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}static \u0275fac=function(e){return new(e||n)};static \u0275dir=L({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(e,i){e&2&&g("mat-mdc-tooltip-disabled",i.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return n})(),yt=(()=>{class n{_changeDetectorRef=a(X);_elementRef=a(c);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=b();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new p;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";constructor(){}show(t){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},t)}hide(t){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},t)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>ut&&t.width>=gt}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(t){t?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(t){let e=this._tooltip.nativeElement,i=this._showAnimation,o=this._hideAnimation;if(e.classList.remove(t?o:i),e.classList.add(t?i:o),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let s=getComputedStyle(e);(s.getPropertyValue("animation-duration")==="0s"||s.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}t&&this._onShow(),this._animationsDisabled&&(e.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(e&1&&V(ht,7),e&2){let o;Y(o=H())&&(i._tooltip=o.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(e,i){e&1&&u("mouseleave",function(s){return i._handleMouseLeave(s)})},decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(e,i){if(e&1){let o=k();f(0,"div",1,0),u("animationend",function(l){return I(o),P(i._handleAnimationEnd(l))}),f(2,"div",2),z(3),N()()}e&2&&(g("mdc-tooltip--multiline",i._isMultiline),x("ngClass",i.tooltipClass),E(3),F(i.message))},dependencies:[G],styles:[`.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mat-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mat-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mat-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mat-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mat-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mat-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel{line-height:normal}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}
|
|
2
|
+
`],encapsulation:2,changeDetection:0})}return n})(),Xt=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=M({type:n});static \u0275inj=C({providers:[ct],imports:[$,it,v,v,J]})}return n})();export{_t as a,Ft as b,Xt as c};
|