@solcre-org/core-ui 2.18.5 → 2.19.0
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.
|
@@ -4296,14 +4296,34 @@ class ServerSelectFieldComponent extends BaseFieldComponent {
|
|
|
4296
4296
|
this.updateItemsWithValue(value);
|
|
4297
4297
|
}
|
|
4298
4298
|
});
|
|
4299
|
-
this.searchInput$.pipe(debounceTime$1(300), distinctUntilChanged$1(), tap(() => {
|
|
4299
|
+
this.searchInput$.pipe(debounceTime$1(300), distinctUntilChanged$1(), tap((term) => {
|
|
4300
4300
|
this.isLoadingSignal.set(true);
|
|
4301
|
-
|
|
4301
|
+
if (term) {
|
|
4302
|
+
this.hasSearchedSignal.set(true);
|
|
4303
|
+
}
|
|
4302
4304
|
}), switchMap(term => {
|
|
4303
4305
|
const endpointConfig = this.field().endpoint;
|
|
4304
4306
|
const endpoint = typeof endpointConfig === 'function' ? endpointConfig(this.getCurrentRowData()) : endpointConfig;
|
|
4305
4307
|
const minSearchLength = this.field().minSearchLength ?? 2;
|
|
4306
|
-
if (!
|
|
4308
|
+
if (!term) {
|
|
4309
|
+
this.hasSearchedSignal.set(false);
|
|
4310
|
+
this.isLoadingSignal.set(false);
|
|
4311
|
+
this.lastSearchResultsSignal.set([]);
|
|
4312
|
+
let baseItems = [];
|
|
4313
|
+
const field = this.field();
|
|
4314
|
+
if (field.options && field.options.length > 0) {
|
|
4315
|
+
baseItems = field.options.map(option => ({
|
|
4316
|
+
[field.bindValue ?? 'id']: option.value,
|
|
4317
|
+
[field.bindLabel ?? 'name']: option.label,
|
|
4318
|
+
...option
|
|
4319
|
+
}));
|
|
4320
|
+
}
|
|
4321
|
+
else if (field.preloadedOptions && field.preloadedOptions.length > 0) {
|
|
4322
|
+
baseItems = field.preloadedOptions;
|
|
4323
|
+
}
|
|
4324
|
+
return of(baseItems);
|
|
4325
|
+
}
|
|
4326
|
+
if (!endpoint) {
|
|
4307
4327
|
this.isLoadingSignal.set(false);
|
|
4308
4328
|
return of([]);
|
|
4309
4329
|
}
|
|
@@ -4589,16 +4609,23 @@ class ServerSelectFieldComponent extends BaseFieldComponent {
|
|
|
4589
4609
|
onSearch(event) {
|
|
4590
4610
|
const minSearchLength = this.field().minSearchLength ?? 2;
|
|
4591
4611
|
if (!event.term) {
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4612
|
+
this.lastSearchResultsSignal.set([]);
|
|
4613
|
+
this.hasSearchedSignal.set(false);
|
|
4614
|
+
this.isLoadingSignal.set(false);
|
|
4615
|
+
let baseItems = [];
|
|
4616
|
+
const field = this.field();
|
|
4617
|
+
if (field.options && field.options.length > 0) {
|
|
4618
|
+
baseItems = field.options.map(option => ({
|
|
4619
|
+
[field.bindValue ?? 'id']: option.value,
|
|
4620
|
+
[field.bindLabel ?? 'name']: option.label,
|
|
4621
|
+
...option
|
|
4622
|
+
}));
|
|
4596
4623
|
}
|
|
4597
|
-
else {
|
|
4598
|
-
|
|
4599
|
-
this.itemsSignal.set(selectedItems);
|
|
4600
|
-
this.hasSearchedSignal.set(false);
|
|
4624
|
+
else if (field.preloadedOptions && field.preloadedOptions.length > 0) {
|
|
4625
|
+
baseItems = field.preloadedOptions;
|
|
4601
4626
|
}
|
|
4627
|
+
const mergedItems = this.mergeWithSelectedItems(baseItems);
|
|
4628
|
+
this.itemsSignal.set(mergedItems);
|
|
4602
4629
|
return;
|
|
4603
4630
|
}
|
|
4604
4631
|
if (event.term.length < minSearchLength) {
|
|
@@ -16886,11 +16913,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
16886
16913
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
16887
16914
|
// No edites manualmente este archivo
|
|
16888
16915
|
const VERSION = {
|
|
16889
|
-
full: '2.
|
|
16916
|
+
full: '2.19.0',
|
|
16890
16917
|
major: 2,
|
|
16891
|
-
minor:
|
|
16892
|
-
patch:
|
|
16893
|
-
timestamp: '2026-01-
|
|
16918
|
+
minor: 19,
|
|
16919
|
+
patch: 0,
|
|
16920
|
+
timestamp: '2026-01-13T14:55:37.050Z',
|
|
16894
16921
|
buildDate: '13/1/2026'
|
|
16895
16922
|
};
|
|
16896
16923
|
|