@xiriframework/xiri-ng 0.2.42 → 0.2.44
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/fesm2022/xiriframework-xiri-ng.mjs +29 -5
- package/fesm2022/xiriframework-xiri-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/xiri-ng-expert/SKILL.md +4 -0
- package/skills/xiri-ng-expert/references/components.md +12 -0
- package/types/xiriframework-xiri-ng.d.ts +20 -0
- package/types/xiriframework-xiri-ng.d.ts.map +1 -1
|
@@ -2989,6 +2989,8 @@ class XiriButtonComponent {
|
|
|
2989
2989
|
this.dialogRef = undefined;
|
|
2990
2990
|
this.destroyRef = inject(DestroyRef);
|
|
2991
2991
|
this.loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2992
|
+
// Guards the one-shot auto-load trigger (see constructor) so it fires only once.
|
|
2993
|
+
this._autoTriggered = false;
|
|
2992
2994
|
this.polling = signal(null, ...(ngDevMode ? [{ debugName: "polling" }] : /* istanbul ignore next */ []));
|
|
2993
2995
|
this._now = signal(Date.now(), ...(ngDevMode ? [{ debugName: "_now" }] : /* istanbul ignore next */ []));
|
|
2994
2996
|
this.countdown = computed(() => {
|
|
@@ -3026,9 +3028,22 @@ class XiriButtonComponent {
|
|
|
3026
3028
|
return this.url();
|
|
3027
3029
|
return this.displayButton().url;
|
|
3028
3030
|
}, ...(ngDevMode ? [{ debugName: "_url" }] : /* istanbul ignore next */ []));
|
|
3031
|
+
// Auto-load: when the button opts in via autoLoad, run its action once as soon
|
|
3032
|
+
// as it becomes enabled (filter valid/present). Subsequent filter changes do not
|
|
3033
|
+
// re-trigger it — only the initial load is automatic.
|
|
3034
|
+
effect(() => {
|
|
3035
|
+
this.filterData(); // track filter changes so the effect re-evaluates
|
|
3036
|
+
if (this.button().autoLoad && !this._autoTriggered && !this._disabled()) {
|
|
3037
|
+
this._autoTriggered = true;
|
|
3038
|
+
this.runAction();
|
|
3039
|
+
}
|
|
3040
|
+
});
|
|
3029
3041
|
}
|
|
3030
3042
|
clicked(event) {
|
|
3031
3043
|
event.stopPropagation();
|
|
3044
|
+
this.runAction();
|
|
3045
|
+
}
|
|
3046
|
+
runAction() {
|
|
3032
3047
|
if (this._disabled()) {
|
|
3033
3048
|
this.result.emit({
|
|
3034
3049
|
button: this.button(),
|
|
@@ -3241,7 +3256,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
3241
3256
|
MatMenu, MatMenuItem, MatMenuTrigger,
|
|
3242
3257
|
MatIcon, MatIconButton, MatTooltip
|
|
3243
3258
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (button().action) {\n\t@case ('link') {\n\t\t<a [routerLink]=\"_url()\" [href]=\"_url()\" (click)=\"clicked($event)\">\n\t\t\t<xiri-buttonstyle [button]=\"displayButton()\" [disabled]=\"_disabled()\" [loading]=\"loading()\" [countdown]=\"countdown()\" [pollText]=\"pollText()\"></xiri-buttonstyle>\n\t\t</a>\n\t}\n\t@case ('href') {\n\t\t<a [href]=\"_url()\" [target]=\"button().target\" (click)=\"clicked($event)\">\n\t\t\t<xiri-buttonstyle [button]=\"displayButton()\" [disabled]=\"_disabled()\" [loading]=\"loading()\" [countdown]=\"countdown()\" [pollText]=\"pollText()\"></xiri-buttonstyle>\n\t\t</a>\n\t}\n\t@case ('menu') {\n\t\t<button mat-icon-button [matMenuTriggerFor]=\"menuRef\"\n\t\t [class]=\"displayButton().color || 'primary'\"\n\t\t [matTooltip]=\"button().hint\"\n\t\t [matTooltipDisabled]=\"!button().hint\"\n\t\t (click)=\"$event.stopPropagation()\">\n\t\t\t<mat-icon>{{ displayButton().icon }}</mat-icon>\n\t\t</button>\n\t\t<mat-menu #menuRef=\"matMenu\">\n\t\t\t@for (item of button().menuItems; track item) {\n\t\t\t\t@switch (item.action) {\n\t\t\t\t\t@case ('link') {\n\t\t\t\t\t\t<a mat-menu-item [routerLink]=\"item.url\">\n\t\t\t\t\t\t\t@if (item.icon) {\n\t\t\t\t\t\t\t\t<mat-icon [class]=\"item.color || 'primary'\">{{ item.icon }}</mat-icon>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>{{ item.text }}</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t}\n\t\t\t\t\t@case ('href') {\n\t\t\t\t\t\t<a mat-menu-item [href]=\"item.url\" target=\"_blank\">\n\t\t\t\t\t\t\t@if (item.icon) {\n\t\t\t\t\t\t\t\t<mat-icon [class]=\"item.color || 'primary'\">{{ item.icon }}</mat-icon>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>{{ item.text }}</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t}\n\t\t\t\t\t@case ('dialog') {\n\t\t\t\t\t\t<button mat-menu-item (click)=\"openMenuDialog($event, item)\">\n\t\t\t\t\t\t\t@if (item.icon) {\n\t\t\t\t\t\t\t\t<mat-icon [class]=\"item.color || 'primary'\">{{ item.icon }}</mat-icon>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>{{ item.text }}</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t</mat-menu>\n\t}\n\t@default {\n\t\t<xiri-buttonstyle [button]=\"displayButton()\" [disabled]=\"_disabled()\" [loading]=\"loading()\" [countdown]=\"countdown()\" [pollText]=\"pollText()\" (click)=\"clicked($event)\"></xiri-buttonstyle>\n\t}\n}\n" }]
|
|
3244
|
-
}], propDecorators: { button: [{ type: i0.Input, args: [{ isSignal: true, alias: "button", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filterData: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterData", required: false }] }], url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], result: [{ type: i0.Output, args: ["result"] }] } });
|
|
3259
|
+
}], ctorParameters: () => [], propDecorators: { button: [{ type: i0.Input, args: [{ isSignal: true, alias: "button", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filterData: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterData", required: false }] }], url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], result: [{ type: i0.Output, args: ["result"] }] } });
|
|
3245
3260
|
|
|
3246
3261
|
class XiriTableInlineEditService {
|
|
3247
3262
|
constructor() {
|
|
@@ -6183,6 +6198,11 @@ class XiriBarChartComponent {
|
|
|
6183
6198
|
else
|
|
6184
6199
|
this.router.navigateByUrl(url);
|
|
6185
6200
|
}
|
|
6201
|
+
// Rotated x-axis labels (interval: 0 forces all labels — no thinning on narrow bars).
|
|
6202
|
+
xLabelConfig() {
|
|
6203
|
+
const r = this.settings().xLabelRotate;
|
|
6204
|
+
return r != null ? { rotate: r, interval: 0 } : undefined;
|
|
6205
|
+
}
|
|
6186
6206
|
baseGrid() {
|
|
6187
6207
|
// Compact mode: outer card already provides padding — shrink the
|
|
6188
6208
|
// echarts grid so we don't get a "double margin".
|
|
@@ -6213,7 +6233,8 @@ class XiriBarChartComponent {
|
|
|
6213
6233
|
type: 'category',
|
|
6214
6234
|
data: bars.map(b => b.label),
|
|
6215
6235
|
axisLine: { show: false },
|
|
6216
|
-
axisTick: { show: false }
|
|
6236
|
+
axisTick: { show: false },
|
|
6237
|
+
axisLabel: this.xLabelConfig()
|
|
6217
6238
|
},
|
|
6218
6239
|
yAxis: {
|
|
6219
6240
|
type: 'value',
|
|
@@ -6301,7 +6322,8 @@ class XiriBarChartComponent {
|
|
|
6301
6322
|
type: 'category',
|
|
6302
6323
|
data: bars.map(b => b.label),
|
|
6303
6324
|
axisLine: { show: false },
|
|
6304
|
-
axisTick: { show: false }
|
|
6325
|
+
axisTick: { show: false },
|
|
6326
|
+
axisLabel: this.xLabelConfig()
|
|
6305
6327
|
},
|
|
6306
6328
|
yAxis: {
|
|
6307
6329
|
type: 'value',
|
|
@@ -6437,7 +6459,8 @@ class XiriLineChartComponent {
|
|
|
6437
6459
|
data: labels,
|
|
6438
6460
|
boundaryGap: false,
|
|
6439
6461
|
axisLine: { show: false },
|
|
6440
|
-
axisTick: { show: false }
|
|
6462
|
+
axisTick: { show: false },
|
|
6463
|
+
axisLabel: s.xLabelRotate != null ? { rotate: s.xLabelRotate, interval: 0 } : undefined
|
|
6441
6464
|
},
|
|
6442
6465
|
yAxis: {
|
|
6443
6466
|
type: 'value',
|
|
@@ -6662,7 +6685,8 @@ class XiriHeatmapComponent {
|
|
|
6662
6685
|
data: s.xLabels,
|
|
6663
6686
|
splitArea: { show: true },
|
|
6664
6687
|
axisLine: { show: false },
|
|
6665
|
-
axisTick: { show: false }
|
|
6688
|
+
axisTick: { show: false },
|
|
6689
|
+
axisLabel: s.xLabelRotate != null ? { rotate: s.xLabelRotate, interval: 0 } : undefined
|
|
6666
6690
|
},
|
|
6667
6691
|
yAxis: {
|
|
6668
6692
|
type: 'category',
|