ng-prime-tools 1.0.31 → 1.0.32
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/esm2022/lib/models/button.model.mjs +1 -1
- package/esm2022/lib/pt-advanced-prime-table/pt-advanced-prime-table.component.mjs +37 -52
- package/esm2022/lib/pt-button/pt-button.component.mjs +44 -16
- package/esm2022/lib/pt-dialog/pt-dialog.component.mjs +164 -129
- package/fesm2022/ng-prime-tools.mjs +241 -194
- package/fesm2022/ng-prime-tools.mjs.map +1 -1
- package/lib/models/button.model.d.ts +1 -0
- package/lib/models/button.model.d.ts.map +1 -1
- package/lib/pt-advanced-prime-table/pt-advanced-prime-table.component.d.ts +7 -2
- package/lib/pt-advanced-prime-table/pt-advanced-prime-table.component.d.ts.map +1 -1
- package/lib/pt-button/pt-button.component.d.ts +7 -1
- package/lib/pt-button/pt-button.component.d.ts.map +1 -1
- package/lib/pt-dialog/pt-dialog.component.d.ts +18 -1
- package/lib/pt-dialog/pt-dialog.component.d.ts.map +1 -1
- package/lib/pt-metric-panel/pt-metric-panel.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export class PTButtonComponent {
|
|
|
22
22
|
fontColor: '#000',
|
|
23
23
|
backgroundColor: '#fff',
|
|
24
24
|
borderColor: '#000',
|
|
25
|
+
outlined: false,
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
}
|
|
@@ -35,7 +36,7 @@ export class PTButtonComponent {
|
|
|
35
36
|
JSON.stringify({ ...prev, disabled: undefined }) ===
|
|
36
37
|
JSON.stringify({ ...curr, disabled: undefined });
|
|
37
38
|
if (onlyDisabledChanged) {
|
|
38
|
-
this.updateDisabledStyles(curr.disabled);
|
|
39
|
+
this.updateDisabledStyles(curr.disabled ?? false);
|
|
39
40
|
}
|
|
40
41
|
else {
|
|
41
42
|
this.applyButtonStyles();
|
|
@@ -47,14 +48,6 @@ export class PTButtonComponent {
|
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
updateDisabledStyles(isDisabled) {
|
|
51
|
-
const buttonElement = this.el.nativeElement.querySelector('button.p-element');
|
|
52
|
-
if (buttonElement) {
|
|
53
|
-
this.renderer.setStyle(buttonElement, 'color', isDisabled ? '#999' : this.buttonConfig.fontColor);
|
|
54
|
-
this.renderer.setStyle(buttonElement, 'background-color', isDisabled ? '#e0e0e0' : this.buttonConfig.backgroundColor);
|
|
55
|
-
this.renderer.setStyle(buttonElement, 'border-color', isDisabled ? '#bdbdbd' : this.buttonConfig.borderColor);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
51
|
ngAfterViewInit() {
|
|
59
52
|
this.applyButtonStyles();
|
|
60
53
|
}
|
|
@@ -64,24 +57,59 @@ export class PTButtonComponent {
|
|
|
64
57
|
getType() {
|
|
65
58
|
return this.buttonConfig.type || 'button';
|
|
66
59
|
}
|
|
60
|
+
updateDisabledStyles(isDisabled) {
|
|
61
|
+
const buttonElement = this.el.nativeElement.querySelector('button.p-element');
|
|
62
|
+
if (buttonElement) {
|
|
63
|
+
this.renderer.setStyle(buttonElement, 'color', isDisabled ? '#999' : this.buttonConfig.fontColor);
|
|
64
|
+
this.renderer.setStyle(buttonElement, 'background-color', isDisabled ? '#e0e0e0' : this.buttonConfig.backgroundColor);
|
|
65
|
+
this.renderer.setStyle(buttonElement, 'border-color', isDisabled ? '#bdbdbd' : this.buttonConfig.borderColor);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* We delegate colors to PrimeNG theme when:
|
|
70
|
+
* - outlined = true
|
|
71
|
+
* - and no manual color is provided (no backgroundColor, borderColor, fontColor)
|
|
72
|
+
*/
|
|
73
|
+
shouldUseThemeColors() {
|
|
74
|
+
if (!this.buttonConfig) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
const outlined = !!this.buttonConfig.outlined; // ✅ coerce to boolean
|
|
78
|
+
return (outlined &&
|
|
79
|
+
!this.buttonConfig.backgroundColor &&
|
|
80
|
+
!this.buttonConfig.borderColor &&
|
|
81
|
+
!this.buttonConfig.fontColor);
|
|
82
|
+
}
|
|
67
83
|
applyButtonStyles() {
|
|
68
84
|
const buttonElement = this.el.nativeElement.querySelector('button.p-element');
|
|
69
|
-
if (buttonElement
|
|
70
|
-
|
|
85
|
+
if (!buttonElement || !this.buttonConfig) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const isDisabled = !!this.buttonConfig.disabled;
|
|
89
|
+
const useThemeColors = this.shouldUseThemeColors();
|
|
90
|
+
// Width / height always applied
|
|
91
|
+
this.renderer.setStyle(buttonElement, 'width', this.buttonConfig.width || 'auto');
|
|
92
|
+
this.renderer.setStyle(buttonElement, 'height', this.buttonConfig.height || 'auto');
|
|
93
|
+
// ✅ Only override colors when we are NOT delegating to PrimeNG theme
|
|
94
|
+
if (!useThemeColors) {
|
|
71
95
|
this.renderer.setStyle(buttonElement, 'color', isDisabled ? '#999' : this.buttonConfig.fontColor);
|
|
72
96
|
this.renderer.setStyle(buttonElement, 'background-color', isDisabled ? '#e0e0e0' : this.buttonConfig.backgroundColor);
|
|
73
97
|
this.renderer.setStyle(buttonElement, 'border-color', isDisabled ? '#bdbdbd' : this.buttonConfig.borderColor);
|
|
74
|
-
|
|
75
|
-
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
// If we delegate to theme, clear any inline overrides
|
|
101
|
+
this.renderer.removeStyle(buttonElement, 'color');
|
|
102
|
+
this.renderer.removeStyle(buttonElement, 'background-color');
|
|
103
|
+
this.renderer.removeStyle(buttonElement, 'border-color');
|
|
76
104
|
}
|
|
77
105
|
}
|
|
78
106
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTButtonComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTButtonComponent, selector: "pt-button", inputs: { buttonConfig: "buttonConfig" }, usesOnChanges: true, ngImport: i0, template: "<p-button\n [label]=\"buttonConfig.label\"\n [icon]=\"buttonConfig.icon || ''\"\n [iconPos]=\"getIconPos()\"\n [disabled]=\"buttonConfig.disabled\"\n [loading]=\"buttonConfig.loading\"\n [class]=\"buttonConfig.styleClass || ''\"\n [type]=\"getType()\"\n></p-button>\n", styles: ["::ng-deep p-button{display:block}\n"], dependencies: [{ kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }] }); }
|
|
107
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTButtonComponent, selector: "pt-button", inputs: { buttonConfig: "buttonConfig" }, usesOnChanges: true, ngImport: i0, template: "<p-button\n [label]=\"buttonConfig.label\"\n [icon]=\"buttonConfig.icon || ''\"\n [iconPos]=\"getIconPos()\"\n [disabled]=\"buttonConfig.disabled\"\n [loading]=\"buttonConfig.loading\"\n [class]=\"buttonConfig.styleClass || ''\"\n [type]=\"getType()\"\n [severity]=\"buttonConfig.severity\"\n [outlined]=\"buttonConfig.outlined\"\n></p-button>\n", styles: ["::ng-deep p-button{display:block}\n"], dependencies: [{ kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }] }); }
|
|
80
108
|
}
|
|
81
109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTButtonComponent, decorators: [{
|
|
82
110
|
type: Component,
|
|
83
|
-
args: [{ selector: 'pt-button', template: "<p-button\n [label]=\"buttonConfig.label\"\n [icon]=\"buttonConfig.icon || ''\"\n [iconPos]=\"getIconPos()\"\n [disabled]=\"buttonConfig.disabled\"\n [loading]=\"buttonConfig.loading\"\n [class]=\"buttonConfig.styleClass || ''\"\n [type]=\"getType()\"\n></p-button>\n", styles: ["::ng-deep p-button{display:block}\n"] }]
|
|
111
|
+
args: [{ selector: 'pt-button', template: "<p-button\n [label]=\"buttonConfig.label\"\n [icon]=\"buttonConfig.icon || ''\"\n [iconPos]=\"getIconPos()\"\n [disabled]=\"buttonConfig.disabled\"\n [loading]=\"buttonConfig.loading\"\n [class]=\"buttonConfig.styleClass || ''\"\n [type]=\"getType()\"\n [severity]=\"buttonConfig.severity\"\n [outlined]=\"buttonConfig.outlined\"\n></p-button>\n", styles: ["::ng-deep p-button{display:block}\n"] }]
|
|
84
112
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { buttonConfig: [{
|
|
85
113
|
type: Input
|
|
86
114
|
}] } });
|
|
87
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHQtYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25nLXByaW1lLXRvb2xzL3NyYy9saWIvcHQtYnV0dG9uL3B0LWJ1dHRvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1wcmltZS10b29scy9zcmMvbGliL3B0LWJ1dHRvbi9wdC1idXR0b24uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxLQUFLLEdBT04sTUFBTSxlQUFlLENBQUM7OztBQVF2QixN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GVhbik6IHZvaWQge1xuICAgIGNvbnN0IGJ1dHRvbkVsZW1lbnQgPVxuICAgICAgdGhpcy5lbC5uYXRpdmVFbGVtZW50LnF1ZXJ5U2VsZWN0b3IoJ2J1dHRvbi5wLWVsZW1lbnQnKTtcblxuICAgIGlmIChidXR0b25FbGVtZW50KSB7XG4gICAgICB0aGlzLnJlbmRlcmVyLnNldFN0eWxlKFxuICAgICAgICBidXR0b25FbGVtZW50LFxuICAgICAgICAnY29sb3InLFxuICAgICAgICBpc0Rpc2FibGVkID8gJyM5OTknIDogdGhpcy5idXR0b25Db25maWcuZm9udENvbG9yXG4gICAgICApO1xuICAgICAgdGhpcy5yZW5kZXJlci5zZXRTdHlsZShcbiAgICAgICAgYnV0dG9uRWxlbWVudCxcbiAgICAgICAgJ2JhY2tncm91bmQtY29sb3InLFxuICAgICAgICBpc0Rpc2FibGVkID8gJyNlMGUwZTAnIDogdGhpcy5idXR0b25Db25maWcuYmFja2dyb3VuZENvbG9yXG4gICAgICApO1xuICAgICAgdGhpcy5yZW5kZXJlci5zZXRTdHlsZShcbiAgICAgICAgYnV0dG9uRWxlbWVudCxcbiAgICAgICAgJ2JvcmRlci1jb2xvcicsXG4gICAgICAgIGlzRGlzYWJsZWQgPyAnI2JkYmRiZCcgOiB0aGlzLmJ1dHRvbkNvbmZpZy5ib3JkZXJDb2xvclxuICAgICAgKTtcbiAgICB9XG4gIH1cblxuICAvKipcbiAgICogV2UgZGVsZWdhdGUgY29sb3JzIHRvIFByaW1lTkcgdGhlbWUgd2hlbjpcbiAgICogLSBvdXRsaW5lZCA9IHRydWVcbiAgICogLSBhbmQgbm8gbWFudWFsIGNvbG9yIGlzIHByb3ZpZGVkIChubyBiYWNrZ3JvdW5kQ29sb3IsIGJvcmRlckNvbG9yLCBmb250Q29sb3IpXG4gICAqL1xuICBwcml2YXRlIHNob3VsZFVzZVRoZW1lQ29sb3JzKCk6IGJvb2xlYW4ge1xuICAgIGlmICghdGhpcy5idXR0b25Db25maWc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