ngx-core-components 0.3.28 → 0.3.29
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/ai/ai-chat/ai-chat.component.d.ts +9 -1
- package/ai/ai-chat-widget/ai-chat-widget.component.d.ts +3 -1
- package/ai/ai-prompt-editor/ai-prompt-editor.component.d.ts +14 -1
- package/ai/ai-rag-inspector/ai-rag-inspector.component.d.ts +6 -0
- package/charts/gauge-chart/gauge-chart.component.d.ts +18 -2
- package/fesm2022/ngx-core-components-ai.mjs +633 -258
- package/fesm2022/ngx-core-components-ai.mjs.map +1 -1
- package/fesm2022/ngx-core-components-charts.mjs +273 -35
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-grid.mjs +3635 -892
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-inputs.mjs +56 -14
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-views.mjs +306 -117
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/grid/data-grid/components/grid-filter-builder/grid-filter-builder.component.d.ts +70 -0
- package/grid/data-grid/components/grid-status-bar/grid-status-bar.component.d.ts +25 -0
- package/grid/data-grid/data-grid.component.d.ts +18 -1
- package/grid/data-grid/models.d.ts +65 -0
- package/grid/data-grid/services/grid-clipboard.service.d.ts +40 -0
- package/grid/data-grid/services/grid-edit.service.d.ts +48 -0
- package/grid/data-grid/services/grid-export-xlsx.service.d.ts +67 -0
- package/grid/data-grid/services/grid-keyboard.service.d.ts +70 -0
- package/grid/data-grid/services/grid-selection.service.d.ts +36 -0
- package/grid/data-grid/services/grid-state.service.d.ts +41 -0
- package/grid/data-grid/services/grid-virtualization.service.d.ts +81 -0
- package/grid/data-grid/utils/grid-aggregate.util.d.ts +13 -0
- package/grid/data-grid/utils/grid-filter.util.d.ts +11 -0
- package/grid/data-grid/utils/grid-sort.util.d.ts +17 -0
- package/grid/pivot-grid/pivot-grid.component.d.ts +15 -2
- package/grid/public-api.d.ts +17 -1
- package/inputs/segmented-control/segmented-control.component.d.ts +12 -3
- package/package.json +1 -1
- package/views/tree-view/tree-view.component.d.ts +20 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, signal, computed, forwardRef, ChangeDetectionStrategy, Component, inject, ElementRef, HostListener, model, effect, viewChild, ViewChild } from '@angular/core';
|
|
2
|
+
import { input, output, signal, computed, forwardRef, ChangeDetectionStrategy, Component, inject, ElementRef, HostListener, model, effect, viewChildren, viewChild, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
5
|
import { NGX_CORE_I18N } from 'ngx-core-components/i18n';
|
|
@@ -4070,49 +4070,85 @@ class SegmentedControlComponent {
|
|
|
4070
4070
|
disabled = input(false);
|
|
4071
4071
|
theme = input('light');
|
|
4072
4072
|
variant = input('default');
|
|
4073
|
+
equalWidth = input(true);
|
|
4073
4074
|
id = input('ngx-segmented-' + Math.random().toString(36).substring(2, 9));
|
|
4074
4075
|
// Outputs
|
|
4075
4076
|
valueChange = output();
|
|
4077
|
+
// Sliding Indicator State Signals
|
|
4078
|
+
indicatorWidth = signal(0);
|
|
4079
|
+
indicatorLeft = signal(0);
|
|
4080
|
+
// View Children query to access button native elements
|
|
4081
|
+
optionElements = viewChildren('optionBtn');
|
|
4076
4082
|
// Computeds
|
|
4077
4083
|
selectedIndex = computed(() => {
|
|
4078
4084
|
const val = this.value();
|
|
4079
4085
|
return this.options().findIndex(opt => opt.value === val);
|
|
4080
4086
|
});
|
|
4081
4087
|
variantClass = computed(() => {
|
|
4082
|
-
|
|
4088
|
+
let classes = '';
|
|
4089
|
+
if (this.variant() !== 'default') {
|
|
4090
|
+
classes += ' ngx-segmented-control-variant-active';
|
|
4091
|
+
}
|
|
4092
|
+
return classes;
|
|
4083
4093
|
});
|
|
4094
|
+
constructor() {
|
|
4095
|
+
// Reactively update indicator coordinates when option query or selection shifts
|
|
4096
|
+
effect(() => {
|
|
4097
|
+
this.updateIndicator();
|
|
4098
|
+
});
|
|
4099
|
+
}
|
|
4100
|
+
ngOnInit() {
|
|
4101
|
+
// Initial update trigger
|
|
4102
|
+
setTimeout(() => this.updateIndicator(), 50);
|
|
4103
|
+
}
|
|
4104
|
+
onResize() {
|
|
4105
|
+
this.updateIndicator();
|
|
4106
|
+
}
|
|
4107
|
+
updateIndicator() {
|
|
4108
|
+
const idx = this.selectedIndex();
|
|
4109
|
+
const buttons = this.optionElements();
|
|
4110
|
+
if (idx >= 0 && buttons && buttons[idx]) {
|
|
4111
|
+
const btnEl = buttons[idx].nativeElement;
|
|
4112
|
+
this.indicatorWidth.set(btnEl.offsetWidth);
|
|
4113
|
+
this.indicatorLeft.set(btnEl.offsetLeft);
|
|
4114
|
+
}
|
|
4115
|
+
}
|
|
4084
4116
|
selectOption(val) {
|
|
4085
4117
|
if (this.disabled())
|
|
4086
4118
|
return;
|
|
4087
4119
|
this.value.set(val);
|
|
4088
4120
|
this.valueChange.emit(val);
|
|
4121
|
+
setTimeout(() => this.updateIndicator(), 0);
|
|
4089
4122
|
}
|
|
4090
4123
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4091
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: SegmentedControlComponent, isStandalone: true, selector: "ngx-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChange: "valueChange" }, ngImport: i0, template: `
|
|
4124
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: SegmentedControlComponent, isStandalone: true, selector: "ngx-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, equalWidth: { classPropertyName: "equalWidth", publicName: "equalWidth", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChange: "valueChange" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "optionElements", predicate: ["optionBtn"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
4092
4125
|
<div
|
|
4093
4126
|
class="ngx-segmented-control"
|
|
4094
4127
|
[class.dark]="theme() === 'dark'"
|
|
4095
4128
|
[class.disabled]="disabled()"
|
|
4129
|
+
[class.auto-width]="!equalWidth()"
|
|
4130
|
+
[class]="variantClass()"
|
|
4096
4131
|
[attr.id]="id()"
|
|
4097
4132
|
>
|
|
4098
4133
|
<!-- Sliding Highlight Backdrop indicator -->
|
|
4099
4134
|
@if (selectedIndex() >= 0) {
|
|
4100
4135
|
<div
|
|
4101
4136
|
class="ngx-segmented-control__indicator"
|
|
4102
|
-
[style.width
|
|
4103
|
-
[style.transform]="'translateX(' + (
|
|
4104
|
-
[class]="
|
|
4137
|
+
[style.width.px]="indicatorWidth()"
|
|
4138
|
+
[style.transform]="'translateX(' + indicatorLeft() + 'px)'"
|
|
4139
|
+
[class]="variant()"
|
|
4105
4140
|
></div>
|
|
4106
4141
|
}
|
|
4107
4142
|
|
|
4108
4143
|
<!-- Option buttons -->
|
|
4109
4144
|
@for (opt of options(); track opt.value; let idx = $index) {
|
|
4110
4145
|
<button
|
|
4146
|
+
#optionBtn
|
|
4111
4147
|
class="ngx-segmented-control__option"
|
|
4112
4148
|
[class.selected]="idx === selectedIndex()"
|
|
4113
4149
|
(click)="selectOption(opt.value)"
|
|
4114
4150
|
[disabled]="disabled()"
|
|
4115
|
-
[style.
|
|
4151
|
+
[style.flex]="equalWidth() ? '1 1 0%' : '0 0 auto'"
|
|
4116
4152
|
type="button"
|
|
4117
4153
|
>
|
|
4118
4154
|
<span class="ngx-segmented-control__label-text">{{ opt.label }}</span>
|
|
@@ -4122,7 +4158,7 @@ class SegmentedControlComponent {
|
|
|
4122
4158
|
</button>
|
|
4123
4159
|
}
|
|
4124
4160
|
</div>
|
|
4125
|
-
`, isInline: true, styles: [":host{display:inline-block;min-width:
|
|
4161
|
+
`, isInline: true, styles: [":host{display:inline-block;min-width:200px}.ngx-segmented-control{position:relative;display:inline-flex;width:100%;background:#0f172a0d;padding:3px;border-radius:12px;box-sizing:border-box;-webkit-user-select:none;user-select:none;font-family:var(--ngx-font-family, system-ui, sans-serif);border:1px solid rgba(15,23,42,.04);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.ngx-segmented-control.dark{background:#1e293b99;border-color:#ffffff0d}.ngx-segmented-control.disabled{opacity:.5;pointer-events:none}.ngx-segmented-control__indicator{position:absolute;top:3px;left:0;bottom:3px;background:#fff;border-radius:9px;box-shadow:0 2px 4px #0f172a0a,0 4px 10px #0f172a14;transition:transform .28s cubic-bezier(.25,.8,.25,1),width .28s cubic-bezier(.25,.8,.25,1);z-index:1}.ngx-segmented-control.dark .ngx-segmented-control__indicator.default{background:#ffffff14;border:1px solid rgba(255,255,255,.05);box-shadow:none}.ngx-segmented-control__option{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 16px;font-size:13px;font-weight:600;color:#64748b;background:transparent;border:none;cursor:pointer;z-index:2;transition:color .2s ease,transform .1s ease;outline:none;height:32px;box-sizing:border-box}.ngx-segmented-control__option:hover:not([disabled]){color:#0f172a}.ngx-segmented-control__option:active:not([disabled]){transform:scale(.97)}.ngx-segmented-control__option.selected{color:#0f172a}.ngx-segmented-control.dark .ngx-segmented-control__option{color:#94a3b8}.ngx-segmented-control.dark .ngx-segmented-control__option:hover:not([disabled]){color:#cbd5e1}.ngx-segmented-control.dark .ngx-segmented-control__option.selected{color:#fff}.ngx-segmented-control__badge{font-size:9px;padding:1px 6px;border-radius:99px;background:#0f172a14;color:#475569;font-weight:750;transition:all .2s ease}.ngx-segmented-control__option.selected .ngx-segmented-control__badge{background:#0f172a1f;color:#0f172a}.ngx-segmented-control.dark .ngx-segmented-control__badge{background:#ffffff14;color:#cbd5e1}.ngx-segmented-control.dark .ngx-segmented-control__option.selected .ngx-segmented-control__badge{background:#ffffff29;color:#fff}.ngx-segmented-control__indicator.primary{background:linear-gradient(135deg,#6366f1,#4f46e5)}.ngx-segmented-control__indicator.success{background:linear-gradient(135deg,#34d399,#10b981)}.ngx-segmented-control__indicator.danger{background:linear-gradient(135deg,#f87171,#ef4444)}.ngx-segmented-control__indicator.warning{background:linear-gradient(135deg,#fbbf24,#d97706)}.ngx-segmented-control__indicator.info{background:linear-gradient(135deg,#38bdf8,#0284c7)}.ngx-segmented-control__indicator.primary,.ngx-segmented-control__indicator.success,.ngx-segmented-control__indicator.danger,.ngx-segmented-control__indicator.warning,.ngx-segmented-control__indicator.info{box-shadow:0 4px 12px #4f46e526;border:none}.ngx-segmented-control-variant-active .ngx-segmented-control__option.selected{color:#fff!important}.ngx-segmented-control-variant-active .ngx-segmented-control__option.selected .ngx-segmented-control__badge{background:#fff3!important;color:#fff!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4126
4162
|
}
|
|
4127
4163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SegmentedControlComponent, decorators: [{
|
|
4128
4164
|
type: Component,
|
|
@@ -4131,26 +4167,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4131
4167
|
class="ngx-segmented-control"
|
|
4132
4168
|
[class.dark]="theme() === 'dark'"
|
|
4133
4169
|
[class.disabled]="disabled()"
|
|
4170
|
+
[class.auto-width]="!equalWidth()"
|
|
4171
|
+
[class]="variantClass()"
|
|
4134
4172
|
[attr.id]="id()"
|
|
4135
4173
|
>
|
|
4136
4174
|
<!-- Sliding Highlight Backdrop indicator -->
|
|
4137
4175
|
@if (selectedIndex() >= 0) {
|
|
4138
4176
|
<div
|
|
4139
4177
|
class="ngx-segmented-control__indicator"
|
|
4140
|
-
[style.width
|
|
4141
|
-
[style.transform]="'translateX(' + (
|
|
4142
|
-
[class]="
|
|
4178
|
+
[style.width.px]="indicatorWidth()"
|
|
4179
|
+
[style.transform]="'translateX(' + indicatorLeft() + 'px)'"
|
|
4180
|
+
[class]="variant()"
|
|
4143
4181
|
></div>
|
|
4144
4182
|
}
|
|
4145
4183
|
|
|
4146
4184
|
<!-- Option buttons -->
|
|
4147
4185
|
@for (opt of options(); track opt.value; let idx = $index) {
|
|
4148
4186
|
<button
|
|
4187
|
+
#optionBtn
|
|
4149
4188
|
class="ngx-segmented-control__option"
|
|
4150
4189
|
[class.selected]="idx === selectedIndex()"
|
|
4151
4190
|
(click)="selectOption(opt.value)"
|
|
4152
4191
|
[disabled]="disabled()"
|
|
4153
|
-
[style.
|
|
4192
|
+
[style.flex]="equalWidth() ? '1 1 0%' : '0 0 auto'"
|
|
4154
4193
|
type="button"
|
|
4155
4194
|
>
|
|
4156
4195
|
<span class="ngx-segmented-control__label-text">{{ opt.label }}</span>
|
|
@@ -4160,8 +4199,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4160
4199
|
</button>
|
|
4161
4200
|
}
|
|
4162
4201
|
</div>
|
|
4163
|
-
`, styles: [":host{display:inline-block;min-width:
|
|
4164
|
-
}]
|
|
4202
|
+
`, styles: [":host{display:inline-block;min-width:200px}.ngx-segmented-control{position:relative;display:inline-flex;width:100%;background:#0f172a0d;padding:3px;border-radius:12px;box-sizing:border-box;-webkit-user-select:none;user-select:none;font-family:var(--ngx-font-family, system-ui, sans-serif);border:1px solid rgba(15,23,42,.04);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.ngx-segmented-control.dark{background:#1e293b99;border-color:#ffffff0d}.ngx-segmented-control.disabled{opacity:.5;pointer-events:none}.ngx-segmented-control__indicator{position:absolute;top:3px;left:0;bottom:3px;background:#fff;border-radius:9px;box-shadow:0 2px 4px #0f172a0a,0 4px 10px #0f172a14;transition:transform .28s cubic-bezier(.25,.8,.25,1),width .28s cubic-bezier(.25,.8,.25,1);z-index:1}.ngx-segmented-control.dark .ngx-segmented-control__indicator.default{background:#ffffff14;border:1px solid rgba(255,255,255,.05);box-shadow:none}.ngx-segmented-control__option{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 16px;font-size:13px;font-weight:600;color:#64748b;background:transparent;border:none;cursor:pointer;z-index:2;transition:color .2s ease,transform .1s ease;outline:none;height:32px;box-sizing:border-box}.ngx-segmented-control__option:hover:not([disabled]){color:#0f172a}.ngx-segmented-control__option:active:not([disabled]){transform:scale(.97)}.ngx-segmented-control__option.selected{color:#0f172a}.ngx-segmented-control.dark .ngx-segmented-control__option{color:#94a3b8}.ngx-segmented-control.dark .ngx-segmented-control__option:hover:not([disabled]){color:#cbd5e1}.ngx-segmented-control.dark .ngx-segmented-control__option.selected{color:#fff}.ngx-segmented-control__badge{font-size:9px;padding:1px 6px;border-radius:99px;background:#0f172a14;color:#475569;font-weight:750;transition:all .2s ease}.ngx-segmented-control__option.selected .ngx-segmented-control__badge{background:#0f172a1f;color:#0f172a}.ngx-segmented-control.dark .ngx-segmented-control__badge{background:#ffffff14;color:#cbd5e1}.ngx-segmented-control.dark .ngx-segmented-control__option.selected .ngx-segmented-control__badge{background:#ffffff29;color:#fff}.ngx-segmented-control__indicator.primary{background:linear-gradient(135deg,#6366f1,#4f46e5)}.ngx-segmented-control__indicator.success{background:linear-gradient(135deg,#34d399,#10b981)}.ngx-segmented-control__indicator.danger{background:linear-gradient(135deg,#f87171,#ef4444)}.ngx-segmented-control__indicator.warning{background:linear-gradient(135deg,#fbbf24,#d97706)}.ngx-segmented-control__indicator.info{background:linear-gradient(135deg,#38bdf8,#0284c7)}.ngx-segmented-control__indicator.primary,.ngx-segmented-control__indicator.success,.ngx-segmented-control__indicator.danger,.ngx-segmented-control__indicator.warning,.ngx-segmented-control__indicator.info{box-shadow:0 4px 12px #4f46e526;border:none}.ngx-segmented-control-variant-active .ngx-segmented-control__option.selected{color:#fff!important}.ngx-segmented-control-variant-active .ngx-segmented-control__option.selected .ngx-segmented-control__badge{background:#fff3!important;color:#fff!important}\n"] }]
|
|
4203
|
+
}], ctorParameters: () => [], propDecorators: { onResize: [{
|
|
4204
|
+
type: HostListener,
|
|
4205
|
+
args: ['window:resize']
|
|
4206
|
+
}] } });
|
|
4165
4207
|
|
|
4166
4208
|
class FormBuilderComponent {
|
|
4167
4209
|
/**
|