@dragonworks/ngx-dashboard-widgets 20.1.2 → 20.1.4
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/index.d.ts
CHANGED
|
@@ -93,84 +93,6 @@ declare class RadialGaugeWidgetComponent implements Widget {
|
|
|
93
93
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RadialGaugeWidgetComponent, "ngx-dashboard-radial-gauge-widget", never, {}, {}, never, never, true, never>;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
/**
|
|
97
|
-
* Directive that automatically adjusts font size to fit text within its parent container.
|
|
98
|
-
* Uses canvas-based measurement for performance and DOM verification for accuracy.
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
* <div class="container">
|
|
102
|
-
* <span responsiveText [minFontSize]="12" [maxFontSize]="72">Dynamic text here</span>
|
|
103
|
-
* </div>
|
|
104
|
-
*/
|
|
105
|
-
declare class ResponsiveTextDirective implements AfterViewInit {
|
|
106
|
-
/** Minimum font-size in pixels (accessibility floor) */
|
|
107
|
-
minFontSize: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
108
|
-
/** Maximum font-size in pixels (layout ceiling) */
|
|
109
|
-
maxFontSize: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
110
|
-
/**
|
|
111
|
-
* Line-height: pass a multiplier (e.g. 1.1) or absolute px value.
|
|
112
|
-
* For single-line text a multiplier < 10 is treated as unitless.
|
|
113
|
-
*/
|
|
114
|
-
lineHeight: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
115
|
-
/** Whether to observe text mutations after first render */
|
|
116
|
-
observeMutations: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
117
|
-
/** Debounce delay in ms for resize/mutation callbacks */
|
|
118
|
-
debounceMs: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
119
|
-
private readonly el;
|
|
120
|
-
private readonly zone;
|
|
121
|
-
private readonly platformId;
|
|
122
|
-
private readonly destroyRef;
|
|
123
|
-
private _ctx?;
|
|
124
|
-
private get ctx();
|
|
125
|
-
private ro?;
|
|
126
|
-
private mo?;
|
|
127
|
-
private fitTimeout?;
|
|
128
|
-
private lastText;
|
|
129
|
-
private lastMaxW;
|
|
130
|
-
private lastMaxH;
|
|
131
|
-
private lastFontSize;
|
|
132
|
-
constructor();
|
|
133
|
-
ngAfterViewInit(): void;
|
|
134
|
-
/**
|
|
135
|
-
* Debounced fit handler to prevent excessive recalculations
|
|
136
|
-
*/
|
|
137
|
-
private requestFit;
|
|
138
|
-
/**
|
|
139
|
-
* Recalculate & apply the ideal font-size
|
|
140
|
-
*/
|
|
141
|
-
private fit;
|
|
142
|
-
/**
|
|
143
|
-
* Calculate available space accounting for padding and borders
|
|
144
|
-
*/
|
|
145
|
-
private getAvailableSpace;
|
|
146
|
-
/**
|
|
147
|
-
* DOM-based verification to handle sub-pixel discrepancies
|
|
148
|
-
*/
|
|
149
|
-
private verifyFit;
|
|
150
|
-
/**
|
|
151
|
-
* Binary search for optimal font size using canvas measurements
|
|
152
|
-
*/
|
|
153
|
-
private calcFit;
|
|
154
|
-
/**
|
|
155
|
-
* Calculate text height from metrics
|
|
156
|
-
*/
|
|
157
|
-
private calculateTextHeight;
|
|
158
|
-
/**
|
|
159
|
-
* Observe parent container resizes
|
|
160
|
-
*/
|
|
161
|
-
private observeResize;
|
|
162
|
-
/**
|
|
163
|
-
* Observe text content changes
|
|
164
|
-
*/
|
|
165
|
-
private observeText;
|
|
166
|
-
/**
|
|
167
|
-
* Cleanup resources
|
|
168
|
-
*/
|
|
169
|
-
private cleanup;
|
|
170
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResponsiveTextDirective, never>;
|
|
171
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ResponsiveTextDirective, "[libResponsiveText]", never, { "minFontSize": { "alias": "minFontSize"; "required": false; "isSignal": true; }; "maxFontSize": { "alias": "maxFontSize"; "required": false; "isSignal": true; }; "lineHeight": { "alias": "lineHeight"; "required": false; "isSignal": true; }; "observeMutations": { "alias": "observeMutations"; "required": false; "isSignal": true; }; "debounceMs": { "alias": "debounceMs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
96
|
interface RadialGaugeSegment {
|
|
175
97
|
from: number;
|
|
176
98
|
to: number;
|
|
@@ -528,5 +450,83 @@ declare class RadialGaugeComponent {
|
|
|
528
450
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RadialGaugeComponent, "ngx-radial-gauge", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "segments": { "alias": "segments"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "segmentGapPx": { "alias": "segmentGapPx"; "required": false; "isSignal": true; }; "hasBackground": { "alias": "hasBackground"; "required": false; "isSignal": true; }; "showValueLabel": { "alias": "showValueLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fitToContainer": { "alias": "fitToContainer"; "required": false; "isSignal": true; }; "containerPadding": { "alias": "containerPadding"; "required": false; "isSignal": true; }; "responsiveMode": { "alias": "responsiveMode"; "required": false; "isSignal": true; }; "sizeToThicknessRatio": { "alias": "sizeToThicknessRatio"; "required": false; "isSignal": true; }; "responsiveProportions": { "alias": "responsiveProportions"; "required": false; "isSignal": true; }; "outerThickness": { "alias": "outerThickness"; "required": false; "isSignal": true; }; "innerThickness": { "alias": "innerThickness"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "labelReference": { "alias": "labelReference"; "required": false; "isSignal": true; }; "referenceGlyph": { "alias": "referenceGlyph"; "required": false; "isSignal": true; }; "labelPadding": { "alias": "labelPadding"; "required": false; "isSignal": true; }; "baselineSafety": { "alias": "baselineSafety"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
529
451
|
}
|
|
530
452
|
|
|
453
|
+
/**
|
|
454
|
+
* Directive that automatically adjusts font size to fit text within its parent container.
|
|
455
|
+
* Uses canvas-based measurement for performance and DOM verification for accuracy.
|
|
456
|
+
*
|
|
457
|
+
* @example
|
|
458
|
+
* <div class="container">
|
|
459
|
+
* <span responsiveText [minFontSize]="12" [maxFontSize]="72">Dynamic text here</span>
|
|
460
|
+
* </div>
|
|
461
|
+
*/
|
|
462
|
+
declare class ResponsiveTextDirective implements AfterViewInit {
|
|
463
|
+
/** Minimum font-size in pixels (accessibility floor) */
|
|
464
|
+
minFontSize: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
465
|
+
/** Maximum font-size in pixels (layout ceiling) */
|
|
466
|
+
maxFontSize: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
467
|
+
/**
|
|
468
|
+
* Line-height: pass a multiplier (e.g. 1.1) or absolute px value.
|
|
469
|
+
* For single-line text a multiplier < 10 is treated as unitless.
|
|
470
|
+
*/
|
|
471
|
+
lineHeight: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
472
|
+
/** Whether to observe text mutations after first render */
|
|
473
|
+
observeMutations: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
474
|
+
/** Debounce delay in ms for resize/mutation callbacks */
|
|
475
|
+
debounceMs: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
476
|
+
private readonly el;
|
|
477
|
+
private readonly zone;
|
|
478
|
+
private readonly platformId;
|
|
479
|
+
private readonly destroyRef;
|
|
480
|
+
private _ctx?;
|
|
481
|
+
private get ctx();
|
|
482
|
+
private ro?;
|
|
483
|
+
private mo?;
|
|
484
|
+
private fitTimeout?;
|
|
485
|
+
private lastText;
|
|
486
|
+
private lastMaxW;
|
|
487
|
+
private lastMaxH;
|
|
488
|
+
private lastFontSize;
|
|
489
|
+
constructor();
|
|
490
|
+
ngAfterViewInit(): void;
|
|
491
|
+
/**
|
|
492
|
+
* Debounced fit handler to prevent excessive recalculations
|
|
493
|
+
*/
|
|
494
|
+
private requestFit;
|
|
495
|
+
/**
|
|
496
|
+
* Recalculate & apply the ideal font-size
|
|
497
|
+
*/
|
|
498
|
+
private fit;
|
|
499
|
+
/**
|
|
500
|
+
* Calculate available space accounting for padding and borders
|
|
501
|
+
*/
|
|
502
|
+
private getAvailableSpace;
|
|
503
|
+
/**
|
|
504
|
+
* DOM-based verification to handle sub-pixel discrepancies
|
|
505
|
+
*/
|
|
506
|
+
private verifyFit;
|
|
507
|
+
/**
|
|
508
|
+
* Binary search for optimal font size using canvas measurements
|
|
509
|
+
*/
|
|
510
|
+
private calcFit;
|
|
511
|
+
/**
|
|
512
|
+
* Calculate text height from metrics
|
|
513
|
+
*/
|
|
514
|
+
private calculateTextHeight;
|
|
515
|
+
/**
|
|
516
|
+
* Observe parent container resizes
|
|
517
|
+
*/
|
|
518
|
+
private observeResize;
|
|
519
|
+
/**
|
|
520
|
+
* Observe text content changes
|
|
521
|
+
*/
|
|
522
|
+
private observeText;
|
|
523
|
+
/**
|
|
524
|
+
* Cleanup resources
|
|
525
|
+
*/
|
|
526
|
+
private cleanup;
|
|
527
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResponsiveTextDirective, never>;
|
|
528
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ResponsiveTextDirective, "[libResponsiveText]", never, { "minFontSize": { "alias": "minFontSize"; "required": false; "isSignal": true; }; "maxFontSize": { "alias": "maxFontSize"; "required": false; "isSignal": true; }; "lineHeight": { "alias": "lineHeight"; "required": false; "isSignal": true; }; "observeMutations": { "alias": "observeMutations"; "required": false; "isSignal": true; }; "debounceMs": { "alias": "debounceMs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
531
|
export { ArrowWidgetComponent, ClockWidgetComponent, LabelWidgetComponent, RadialGaugeComponent, RadialGaugeWidgetComponent, ResponsiveTextDirective };
|
|
532
|
-
export type {
|
|
532
|
+
export type { RadialGaugeSegment };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dragonworks/ngx-dashboard-widgets",
|
|
3
|
-
"version": "20.1.
|
|
3
|
+
"version": "20.1.4",
|
|
4
4
|
"description": "Widget collection for ngx-dashboard with Material Design 3 compliance including arrow, label, clock widgets and responsive text directive",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.2.0",
|