wacom 21.1.2 → 21.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.
@@ -186,10 +186,10 @@ class MetaService {
186
186
  console.warn(`To disable these warnings, set metaConfig.warnMissingGuard: false in your MetaConfig passed to MetaModule.forRoot()`);
187
187
  }
188
188
  }
189
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MetaService, deps: [{ token: CONFIG_TOKEN, optional: true }, { token: i1.Router }, { token: i2.Meta }, { token: i2.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
190
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MetaService, providedIn: 'root' }); }
189
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MetaService, deps: [{ token: CONFIG_TOKEN, optional: true }, { token: i1.Router }, { token: i2.Meta }, { token: i2.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
190
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MetaService, providedIn: 'root' }); }
191
191
  }
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MetaService, decorators: [{
192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MetaService, decorators: [{
193
193
  type: Injectable,
194
194
  args: [{
195
195
  providedIn: 'root',
@@ -249,10 +249,10 @@ class MetaGuard {
249
249
  this.metaService.setTag(key, this._meta.defaults[key]);
250
250
  });
251
251
  }
252
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MetaGuard, deps: [{ token: MetaService }, { token: CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
253
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MetaGuard, providedIn: 'root' }); }
252
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MetaGuard, deps: [{ token: MetaService }, { token: CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
253
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MetaGuard, providedIn: 'root' }); }
254
254
  }
255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MetaGuard, decorators: [{
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MetaGuard, decorators: [{
256
256
  type: Injectable,
257
257
  args: [{ providedIn: 'root' }]
258
258
  }], ctorParameters: () => [{ type: MetaService }, { type: undefined, decorators: [{
@@ -675,10 +675,10 @@ class CoreService {
675
675
  if (sig)
676
676
  sig.update(updater);
677
677
  }
678
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: CoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
679
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: CoreService, providedIn: 'root' }); }
678
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: CoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
679
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: CoreService, providedIn: 'root' }); }
680
680
  }
681
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: CoreService, decorators: [{
681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: CoreService, decorators: [{
682
682
  type: Injectable,
683
683
  args: [{
684
684
  providedIn: 'root',
@@ -702,7 +702,7 @@ class CrudComponent {
702
702
  */
703
703
  constructor(formConfig, formService, crudService, module = '') {
704
704
  /** The array of documents currently loaded and shown */
705
- this.documents = signal([], { ...(ngDevMode ? { debugName: "documents" } : {}) });
705
+ this.documents = signal([], ...(ngDevMode ? [{ debugName: "documents" }] : []));
706
706
  /** Current pagination page */
707
707
  this.page = 1;
708
708
  /** CoreService handles timing and copying helpers */
@@ -790,17 +790,17 @@ class CrudComponent {
790
790
  * In creation mode, adds new documents.
791
791
  * In update mode, syncs changes and deletes removed entries.
792
792
  */
793
- bulkManagement(create = true) {
793
+ bulkManagement(isCreateFlow = true) {
794
794
  return () => {
795
795
  this.__form
796
- .modalDocs(create
796
+ .modalDocs(isCreateFlow
797
797
  ? []
798
798
  : this.documents().map((obj) => Object.fromEntries(this.updatableFields.map((key) => [
799
799
  key,
800
800
  obj()[key],
801
801
  ]))))
802
802
  .then(async (docs) => {
803
- if (create) {
803
+ if (isCreateFlow) {
804
804
  for (const doc of docs) {
805
805
  this.preCreate(doc);
806
806
  await firstValueFrom(this.crudService.create(doc));
@@ -971,10 +971,10 @@ class ClickOutsideDirective {
971
971
  // cleanup
972
972
  this._dref.onDestroy(() => document.removeEventListener('pointerdown', this.handler, true));
973
973
  }
974
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
975
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.1", type: ClickOutsideDirective, isStandalone: true, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, ngImport: i0 }); }
974
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
975
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.3", type: ClickOutsideDirective, isStandalone: true, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, ngImport: i0 }); }
976
976
  }
977
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ClickOutsideDirective, decorators: [{
977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClickOutsideDirective, decorators: [{
978
978
  type: Directive,
979
979
  args: [{
980
980
  selector: '[clickOutside]',
@@ -994,12 +994,12 @@ class ManualDisabledDirective {
994
994
  if (!native)
995
995
  return;
996
996
  native.disabled = !!disabled;
997
- }, { ...(ngDevMode ? { debugName: "syncDisabledEffect" } : {}) });
997
+ }, ...(ngDevMode ? [{ debugName: "syncDisabledEffect" }] : []));
998
998
  }
999
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ManualDisabledDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1000
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: ManualDisabledDirective, isStandalone: true, selector: "input[manualDisabled], textarea[manualDisabled]", inputs: { manualDisabled: { classPropertyName: "manualDisabled", publicName: "manualDisabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
999
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ManualDisabledDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1000
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.3", type: ManualDisabledDirective, isStandalone: true, selector: "input[manualDisabled], textarea[manualDisabled]", inputs: { manualDisabled: { classPropertyName: "manualDisabled", publicName: "manualDisabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1001
1001
  }
1002
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ManualDisabledDirective, decorators: [{
1002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ManualDisabledDirective, decorators: [{
1003
1003
  type: Directive,
1004
1004
  args: [{
1005
1005
  selector: 'input[manualDisabled], textarea[manualDisabled]',
@@ -1021,12 +1021,12 @@ class ManualNameDirective {
1021
1021
  if (native.name !== name) {
1022
1022
  native.name = name;
1023
1023
  }
1024
- }, { ...(ngDevMode ? { debugName: "syncNameEffect" } : {}) });
1024
+ }, ...(ngDevMode ? [{ debugName: "syncNameEffect" }] : []));
1025
1025
  }
1026
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ManualNameDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1027
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: ManualNameDirective, isStandalone: true, selector: "input[manualName], textarea[manualName]", inputs: { manualName: { classPropertyName: "manualName", publicName: "manualName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1026
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ManualNameDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1027
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.3", type: ManualNameDirective, isStandalone: true, selector: "input[manualName], textarea[manualName]", inputs: { manualName: { classPropertyName: "manualName", publicName: "manualName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1028
1028
  }
1029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ManualNameDirective, decorators: [{
1029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ManualNameDirective, decorators: [{
1030
1030
  type: Directive,
1031
1031
  args: [{
1032
1032
  selector: 'input[manualName], textarea[manualName]',
@@ -1046,12 +1046,12 @@ class ManualReadonlyDirective {
1046
1046
  if (!native)
1047
1047
  return;
1048
1048
  native.readOnly = !!readonly;
1049
- }, { ...(ngDevMode ? { debugName: "syncReadonlyEffect" } : {}) });
1049
+ }, ...(ngDevMode ? [{ debugName: "syncReadonlyEffect" }] : []));
1050
1050
  }
1051
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ManualReadonlyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1052
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: ManualReadonlyDirective, isStandalone: true, selector: "input[manualReadonly], textarea[manualReadonly]", inputs: { manualReadonly: { classPropertyName: "manualReadonly", publicName: "manualReadonly", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1051
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ManualReadonlyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1052
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.3", type: ManualReadonlyDirective, isStandalone: true, selector: "input[manualReadonly], textarea[manualReadonly]", inputs: { manualReadonly: { classPropertyName: "manualReadonly", publicName: "manualReadonly", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1053
1053
  }
1054
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ManualReadonlyDirective, decorators: [{
1054
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ManualReadonlyDirective, decorators: [{
1055
1055
  type: Directive,
1056
1056
  args: [{
1057
1057
  selector: 'input[manualReadonly], textarea[manualReadonly]',
@@ -1073,12 +1073,12 @@ class ManualTypeDirective {
1073
1073
  if (native.type !== t) {
1074
1074
  native.type = t;
1075
1075
  }
1076
- }, { ...(ngDevMode ? { debugName: "syncTypeEffect" } : {}) });
1076
+ }, ...(ngDevMode ? [{ debugName: "syncTypeEffect" }] : []));
1077
1077
  }
1078
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ManualTypeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1079
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: ManualTypeDirective, isStandalone: true, selector: "input[manualType], textarea[manualType]", inputs: { manualType: { classPropertyName: "manualType", publicName: "manualType", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1078
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ManualTypeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1079
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.3", type: ManualTypeDirective, isStandalone: true, selector: "input[manualType], textarea[manualType]", inputs: { manualType: { classPropertyName: "manualType", publicName: "manualType", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1080
1080
  }
1081
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ManualTypeDirective, decorators: [{
1081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ManualTypeDirective, decorators: [{
1082
1082
  type: Directive,
1083
1083
  args: [{
1084
1084
  selector: 'input[manualType], textarea[manualType]',
@@ -1117,10 +1117,10 @@ class ArrPipe {
1117
1117
  }
1118
1118
  return arr;
1119
1119
  }
1120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ArrPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1121
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: ArrPipe, isStandalone: true, name: "arr" }); }
1120
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ArrPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1121
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: ArrPipe, isStandalone: true, name: "arr" }); }
1122
1122
  }
1123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: ArrPipe, decorators: [{
1123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ArrPipe, decorators: [{
1124
1124
  type: Pipe,
1125
1125
  args: [{
1126
1126
  name: 'arr',
@@ -1134,10 +1134,10 @@ class MongodatePipe {
1134
1134
  let timestamp = _id.toString().substring(0, 8);
1135
1135
  return new Date(parseInt(timestamp, 16) * 1000);
1136
1136
  }
1137
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MongodatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1138
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: MongodatePipe, isStandalone: true, name: "mongodate" }); }
1137
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MongodatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1138
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: MongodatePipe, isStandalone: true, name: "mongodate" }); }
1139
1139
  }
1140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: MongodatePipe, decorators: [{
1140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MongodatePipe, decorators: [{
1141
1141
  type: Pipe,
1142
1142
  args: [{
1143
1143
  name: 'mongodate',
@@ -1149,10 +1149,10 @@ class NumberPipe {
1149
1149
  const result = Number(value); // Convert value to a number
1150
1150
  return isNaN(result) ? 0 : result; // Return 0 if conversion fails
1151
1151
  }
1152
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1153
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: NumberPipe, isStandalone: true, name: "number" }); }
1152
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: NumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1153
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: NumberPipe, isStandalone: true, name: "number" }); }
1154
1154
  }
1155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NumberPipe, decorators: [{
1155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: NumberPipe, decorators: [{
1156
1156
  type: Pipe,
1157
1157
  args: [{
1158
1158
  name: 'number',
@@ -1180,10 +1180,10 @@ class PaginationPipe {
1180
1180
  }
1181
1181
  return arr.slice((config.page - 1) * config.perPage, config.page * config.perPage);
1182
1182
  }
1183
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: PaginationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1184
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: PaginationPipe, isStandalone: true, name: "page", pure: false }); }
1183
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: PaginationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1184
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: PaginationPipe, isStandalone: true, name: "page", pure: false }); }
1185
1185
  }
1186
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: PaginationPipe, decorators: [{
1186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: PaginationPipe, decorators: [{
1187
1187
  type: Pipe,
1188
1188
  args: [{
1189
1189
  name: 'page',
@@ -1198,10 +1198,10 @@ class SafePipe {
1198
1198
  transform(html) {
1199
1199
  return this._sanitizer.bypassSecurityTrustResourceUrl(html);
1200
1200
  }
1201
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SafePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1202
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: SafePipe, isStandalone: true, name: "safe" }); }
1201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SafePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1202
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: SafePipe, isStandalone: true, name: "safe" }); }
1203
1203
  }
1204
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SafePipe, decorators: [{
1204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SafePipe, decorators: [{
1205
1205
  type: Pipe,
1206
1206
  args: [{
1207
1207
  name: 'safe',
@@ -1268,10 +1268,10 @@ class SearchPipe {
1268
1268
  : Object.entries(items).forEach(([k, v]) => check(v, k));
1269
1269
  return limit ? out.slice(0, limit) : out;
1270
1270
  }
1271
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1272
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: SearchPipe, isStandalone: true, name: "search" }); }
1271
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1272
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: SearchPipe, isStandalone: true, name: "search" }); }
1273
1273
  }
1274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SearchPipe, decorators: [{
1274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SearchPipe, decorators: [{
1275
1275
  type: Pipe,
1276
1276
  args: [{ name: 'search', pure: true }]
1277
1277
  }] });
@@ -1331,10 +1331,10 @@ class SplicePipe {
1331
1331
  }
1332
1332
  return arr;
1333
1333
  }
1334
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SplicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1335
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: SplicePipe, isStandalone: true, name: "splice" }); }
1334
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SplicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1335
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: SplicePipe, isStandalone: true, name: "splice" }); }
1336
1336
  }
1337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SplicePipe, decorators: [{
1337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SplicePipe, decorators: [{
1338
1338
  type: Pipe,
1339
1339
  args: [{
1340
1340
  name: 'splice',
@@ -1346,10 +1346,10 @@ class SplitPipe {
1346
1346
  const arr = value.split(devider);
1347
1347
  return arr.length > index ? arr[index] : '';
1348
1348
  }
1349
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SplitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1350
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: SplitPipe, isStandalone: true, name: "split" }); }
1349
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SplitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1350
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: SplitPipe, isStandalone: true, name: "split" }); }
1351
1351
  }
1352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SplitPipe, decorators: [{
1352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SplitPipe, decorators: [{
1353
1353
  type: Pipe,
1354
1354
  args: [{
1355
1355
  name: 'split',
@@ -1472,10 +1472,10 @@ class EmitterService {
1472
1472
  }
1473
1473
  return source$;
1474
1474
  }
1475
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: EmitterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1476
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: EmitterService, providedIn: 'root' }); }
1475
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EmitterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1476
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EmitterService, providedIn: 'root' }); }
1477
1477
  }
1478
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: EmitterService, decorators: [{
1478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EmitterService, decorators: [{
1479
1479
  type: Injectable,
1480
1480
  args: [{ providedIn: 'root' }]
1481
1481
  }] });
@@ -1801,10 +1801,10 @@ class HttpService {
1801
1801
  }
1802
1802
  return newDoc;
1803
1803
  }
1804
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: HttpService, deps: [{ token: CONFIG_TOKEN, optional: true }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
1805
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: HttpService, providedIn: 'root' }); }
1804
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: HttpService, deps: [{ token: CONFIG_TOKEN, optional: true }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
1805
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: HttpService, providedIn: 'root' }); }
1806
1806
  }
1807
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: HttpService, decorators: [{
1807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: HttpService, decorators: [{
1808
1808
  type: Injectable,
1809
1809
  args: [{
1810
1810
  providedIn: 'root',
@@ -1824,9 +1824,9 @@ class NetworkService {
1824
1824
  */
1825
1825
  constructor(config) {
1826
1826
  /** Internal mutable signals. */
1827
- this._status = signal(navigator.onLine ? 'poor' : 'none', { ...(ngDevMode ? { debugName: "_status" } : {}) });
1828
- this._latencyMs = signal(null, { ...(ngDevMode ? { debugName: "_latencyMs" } : {}) });
1829
- this._isOnline = signal(navigator.onLine, { ...(ngDevMode ? { debugName: "_isOnline" } : {}) });
1827
+ this._status = signal(navigator.onLine ? 'poor' : 'none', ...(ngDevMode ? [{ debugName: "_status" }] : []));
1828
+ this._latencyMs = signal(null, ...(ngDevMode ? [{ debugName: "_latencyMs" }] : []));
1829
+ this._isOnline = signal(navigator.onLine, ...(ngDevMode ? [{ debugName: "_isOnline" }] : []));
1830
1830
  /** Public read-only signals. */
1831
1831
  this.status = this._status.asReadonly();
1832
1832
  this.latencyMs = this._latencyMs.asReadonly();
@@ -1948,10 +1948,10 @@ class NetworkService {
1948
1948
  return { ok: false, latency: null };
1949
1949
  }
1950
1950
  }
1951
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NetworkService, deps: [{ token: CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1952
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NetworkService, providedIn: 'root' }); }
1951
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: NetworkService, deps: [{ token: CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1952
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: NetworkService, providedIn: 'root' }); }
1953
1953
  }
1954
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: NetworkService, decorators: [{
1954
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: NetworkService, decorators: [{
1955
1955
  type: Injectable,
1956
1956
  args: [{ providedIn: 'root' }]
1957
1957
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -2126,10 +2126,10 @@ class StoreService {
2126
2126
  }
2127
2127
  return key;
2128
2128
  }
2129
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: StoreService, deps: [{ token: CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2130
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: StoreService, providedIn: 'root' }); }
2129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: StoreService, deps: [{ token: CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2130
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: StoreService, providedIn: 'root' }); }
2131
2131
  }
2132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: StoreService, decorators: [{
2132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: StoreService, decorators: [{
2133
2133
  type: Injectable,
2134
2134
  args: [{
2135
2135
  providedIn: 'root',
@@ -2154,41 +2154,66 @@ class CrudService {
2154
2154
  constructor(_config) {
2155
2155
  this._config = _config;
2156
2156
  /**
2157
- * URL for the API.
2157
+ * Base URL for the API collection associated with this service.
2158
2158
  */
2159
2159
  this._url = '/api/';
2160
2160
  /**
2161
- * Array of documents managed by this service.
2161
+ * In-memory cache with all documents currently known by the service.
2162
2162
  */
2163
2163
  this._docs = [];
2164
2164
  /**
2165
- * Number of documents per page.
2165
+ * Number of documents per page for paginated `get()` calls.
2166
2166
  */
2167
2167
  this._perPage = 20;
2168
2168
  /**
2169
- * Callbacks for filtering documents.
2169
+ * Registered callbacks that recompute filtered document views.
2170
2170
  */
2171
2171
  this._filteredDocumentsCallbacks = [];
2172
2172
  /**
2173
- * Constructs a CRUD service instance.
2174
- *
2175
- * @param _config - Configuration options for the CRUD service.
2176
- * @param __httpService - Service to handle HTTP requests.
2177
- * @param __storeService - Service to manage local storage of documents.
2178
- * @param __coreService - Core service for utility functions.
2173
+ * HTTP client wrapper used for API communication.
2179
2174
  */
2180
2175
  this.__httpService = inject(HttpService);
2176
+ /**
2177
+ * Key–value storage service used to persist documents locally.
2178
+ */
2181
2179
  this.__storeService = inject(StoreService);
2180
+ /**
2181
+ * Core helper service with utility methods (copy, debounce, toSignal, etc.).
2182
+ */
2182
2183
  this.__coreService = inject(CoreService);
2184
+ /**
2185
+ * Global event bus for cross-service communication.
2186
+ */
2183
2187
  this.__emitterService = inject(EmitterService);
2188
+ /**
2189
+ * Network status service used to queue work while offline.
2190
+ */
2184
2191
  this.__networkService = inject(NetworkService);
2185
2192
  /**
2186
2193
  * Cache of per-document signals indexed by document _id.
2187
2194
  * Prevents creating multiple signals for the same document.
2188
2195
  */
2196
+ this._signal = {};
2197
+ /**
2198
+ * Cache of per (field,value) lists of document signals.
2199
+ * Key format: `${field}_${JSON.stringify(value)}`.
2200
+ */
2189
2201
  this._signals = {};
2202
+ /**
2203
+ * Cache of per-field maps: fieldValue -> array of document signals.
2204
+ */
2205
+ this._fieldSignals = {};
2206
+ /**
2207
+ * Track pending fetch-by-id requests to avoid duplicate calls.
2208
+ */
2190
2209
  this._fetchingId = {};
2210
+ /**
2211
+ * Queue of operations that must be retried when network comes back online.
2212
+ */
2191
2213
  this._onOnline = [];
2214
+ /**
2215
+ * Local counter used to build unique local identifiers together with Date.now().
2216
+ */
2192
2217
  this._randomCount = 0;
2193
2218
  this._config.signalFields = this._config.signalFields || {};
2194
2219
  this._url += this._config.name;
@@ -2219,49 +2244,131 @@ class CrudService {
2219
2244
  * Returns a WritableSignal for a document by _id, creating it if absent.
2220
2245
  * Caches the signal to avoid redundant instances and initializes it
2221
2246
  * with the current snapshot of the document.
2222
- * Work very carefully with this and localId, better avoid such flows
2223
- * @param _id - Document identifier.
2247
+ * Work very carefully with this and localId, better avoid such flows.
2248
+ *
2249
+ * @param _id - Document identifier or a document instance.
2224
2250
  */
2225
2251
  getSignal(_id) {
2226
2252
  if (typeof _id !== 'string') {
2227
2253
  _id = this._id(_id);
2228
2254
  }
2229
2255
  // Reuse existing signal if present
2230
- if (this._signals[_id]) {
2231
- return this._signals[_id];
2256
+ if (this._signal[_id]) {
2257
+ return this._signal[_id];
2232
2258
  }
2233
2259
  // Always base the signal on the current canonical doc()
2234
2260
  const doc = this.doc(_id);
2235
- this._signals[_id] = this.__coreService.toSignal(doc, this._config.signalFields);
2236
- return this._signals[_id];
2261
+ this._signal[_id] = this.__coreService.toSignal(doc, this._config.signalFields);
2262
+ return this._signal[_id];
2263
+ }
2264
+ /**
2265
+ * Returns a signal with an array of document signals that match
2266
+ * a given field/value pair.
2267
+ *
2268
+ * Example:
2269
+ * const activitiesSig = service.getSignals('userId', currentUserId);
2270
+ */
2271
+ getSignals(field, value) {
2272
+ const id = field + '_' + JSON.stringify(value);
2273
+ if (!this._signals[id]) {
2274
+ this._signals[id] = signal(this._getSignals(id));
2275
+ }
2276
+ return this._signals[id];
2277
+ }
2278
+ /**
2279
+ * Builds the array of document signals for a given (field,value) key.
2280
+ * Only documents with a real _id are included.
2281
+ */
2282
+ _getSignals(id) {
2283
+ const sep = id.indexOf('_');
2284
+ if (sep === -1) {
2285
+ return [];
2286
+ }
2287
+ const field = id.slice(0, sep);
2288
+ const valueJson = id.slice(sep + 1);
2289
+ const list = [];
2290
+ for (const doc of this.getDocs()) {
2291
+ if (JSON.stringify(doc[field]) !== valueJson) {
2292
+ continue;
2293
+ }
2294
+ const docId = this._id(doc);
2295
+ if (!docId)
2296
+ continue;
2297
+ list.push(this.getSignal(docId));
2298
+ }
2299
+ return list;
2300
+ }
2301
+ /**
2302
+ * Returns a signal with a map: fieldValue -> array of document signals.
2303
+ *
2304
+ * Example:
2305
+ * const byStatusSig = service.getFieldSignals('status');
2306
+ * byStatusSig() might be { active: [sig1, sig2], draft: [sig3] }.
2307
+ */
2308
+ getFieldSignals(field) {
2309
+ if (!this._fieldSignals[field]) {
2310
+ this._fieldSignals[field] = signal(this._getFieldSignals(field));
2311
+ }
2312
+ return this._fieldSignals[field];
2313
+ }
2314
+ /**
2315
+ * Builds the map for a given field.
2316
+ * Only documents with a real _id are included.
2317
+ */
2318
+ _getFieldSignals(field) {
2319
+ const byFields = {};
2320
+ for (const doc of this.getDocs()) {
2321
+ const docId = this._id(doc);
2322
+ if (!docId)
2323
+ continue;
2324
+ const value = String(doc[field]);
2325
+ if (!byFields[value]) {
2326
+ byFields[value] = [];
2327
+ }
2328
+ byFields[value].push(this.getSignal(docId));
2329
+ }
2330
+ return byFields;
2237
2331
  }
2238
2332
  /**
2239
2333
  * Clears cached document signals except those explicitly preserved.
2240
2334
  * Useful when changing routes or contexts to reduce memory.
2335
+ *
2241
2336
  * @param exceptIds - List of ids whose signals should be kept.
2242
2337
  */
2243
2338
  removeSignals(exceptIds = []) {
2244
- for (const _id in this._signals) {
2339
+ for (const _id in this._signal) {
2245
2340
  if (!exceptIds.includes(_id)) {
2246
- delete this._signals[_id];
2341
+ delete this._signal[_id];
2247
2342
  }
2248
2343
  }
2249
2344
  }
2345
+ /**
2346
+ * Restores documents from local storage (if present) and syncs
2347
+ * all existing signals with the restored data.
2348
+ */
2250
2349
  async restoreDocs() {
2251
2350
  const docs = await this.__storeService.getJson('docs_' + this._config.name);
2252
2351
  if (docs?.length) {
2253
2352
  this._docs.length = 0;
2254
2353
  this._docs.push(...docs);
2255
- // keep all existing signals in sync with new docs
2256
- for (const id in this._signals) {
2257
- const d = this._docs.find((doc) => this._id(doc) === id);
2258
- if (d) {
2259
- this._syncSignalForDoc(d);
2260
- }
2261
- }
2262
2354
  this._filterDocuments();
2263
2355
  for (const doc of this._docs) {
2264
- // ... (rest of your existing restore logic unchanged)
2356
+ if (doc.__deleted) {
2357
+ this.delete(doc, doc.__options?.['delete'] || {});
2358
+ }
2359
+ else if (!doc._id) {
2360
+ this.create(doc, doc.__options?.['create'] || {});
2361
+ }
2362
+ else if (doc.__modified?.length) {
2363
+ for (const id of doc.__modified) {
2364
+ if (id.startsWith('up')) {
2365
+ this.update(doc, doc.__options?.[id] || {});
2366
+ }
2367
+ else {
2368
+ this.unique(doc, doc.__options?.[id] || {});
2369
+ }
2370
+ }
2371
+ }
2265
2372
  }
2266
2373
  this.__emitterService.complete(this._config.name + '_loaded', this._docs);
2267
2374
  }
@@ -2281,13 +2388,23 @@ class CrudService {
2281
2388
  return this._docs.filter(filter);
2282
2389
  }
2283
2390
  /**
2284
- * Clears the current list of documents.
2391
+ * Retrieves the first document that matches the given predicate.
2392
+ *
2393
+ * @param find - Predicate used to locate a specific document.
2394
+ */
2395
+ getDoc(find) {
2396
+ return this._docs.find(find);
2397
+ }
2398
+ /**
2399
+ * Clears the current list of documents, persists the empty state
2400
+ * and recomputes all derived signals.
2285
2401
  *
2286
2402
  * Empties the internal documents array and saves the updated state to local storage.
2287
2403
  */
2288
2404
  clearDocs() {
2289
2405
  this._docs.splice(0, this._docs.length);
2290
2406
  this.setDocs();
2407
+ this._updateSignals();
2291
2408
  }
2292
2409
  /**
2293
2410
  * Adds multiple documents to the service and saves them to local storage.
@@ -2346,8 +2463,8 @@ class CrudService {
2346
2463
  */
2347
2464
  doc(_id) {
2348
2465
  // If we already have a signal for this id, use its current value
2349
- if (this._signals[_id]) {
2350
- return this._signals[_id]();
2466
+ if (this._signal[_id]) {
2467
+ return this._signal[_id]();
2351
2468
  }
2352
2469
  let doc = this._docs.find((d) => this._id(d) === _id ||
2353
2470
  (d._localId && d._localId === Number(_id))) || null;
@@ -2673,7 +2790,7 @@ class CrudService {
2673
2790
  this._docs.splice(idx, 1);
2674
2791
  }
2675
2792
  this.setDocs();
2676
- // We keep signal but mark it deleted
2793
+ // We keep signal but mark it deleted and recompute mappings.
2677
2794
  this._syncSignalForDoc({
2678
2795
  ...doc,
2679
2796
  __deleted: true,
@@ -2699,6 +2816,11 @@ class CrudService {
2699
2816
  });
2700
2817
  return obs;
2701
2818
  }
2819
+ /**
2820
+ * Registers a filtered view of documents and returns the recompute callback.
2821
+ *
2822
+ * The callback is called automatically whenever `_filterDocuments()` runs.
2823
+ */
2702
2824
  filteredDocuments(storeObjectOrArray, config = {}) {
2703
2825
  const callback = () => {
2704
2826
  if (Array.isArray(storeObjectOrArray)) {
@@ -2776,7 +2898,15 @@ class CrudService {
2776
2898
  return callback;
2777
2899
  }
2778
2900
  /**
2779
- * Generates a unique ID for a document.
2901
+ * Generates a unique ID for a document when using local-only identifiers.
2902
+ *
2903
+ * @returns The unique ID as a number.
2904
+ */
2905
+ _localId() {
2906
+ return Number(Date.now() + '' + this._randomCount++);
2907
+ }
2908
+ /**
2909
+ * Returns the configured identity field for the given document as string.
2780
2910
  *
2781
2911
  * @param doc - The document for which to generate the ID.
2782
2912
  * @returns The unique ID as a string.
@@ -2785,7 +2915,8 @@ class CrudService {
2785
2915
  return doc[this._config._id || '_id']?.toString();
2786
2916
  }
2787
2917
  /**
2788
- * Executes all registered filter document callbacks.
2918
+ * Executes all registered filter document callbacks and emits a
2919
+ * `<name>_filtered` event.
2789
2920
  */
2790
2921
  _filterDocuments() {
2791
2922
  for (const callback of this._filteredDocumentsCallbacks) {
@@ -2793,6 +2924,10 @@ class CrudService {
2793
2924
  }
2794
2925
  this.__emitterService.emit(`${this._config.name}_filtered`);
2795
2926
  }
2927
+ /**
2928
+ * Marks a document as modified for a given operation id and
2929
+ * keeps the document in the store until the operation is confirmed.
2930
+ */
2796
2931
  _updateModified(doc, id, options) {
2797
2932
  doc.__modified ||= [];
2798
2933
  doc.__options ||= {};
@@ -2802,6 +2937,10 @@ class CrudService {
2802
2937
  this.addDoc(doc);
2803
2938
  }
2804
2939
  }
2940
+ /**
2941
+ * Removes a modification mark from the document once the
2942
+ * server operation is confirmed.
2943
+ */
2805
2944
  _removeModified(doc, id) {
2806
2945
  doc.__modified ||= [];
2807
2946
  if (doc.__modified.find((m) => m === id)) {
@@ -2809,16 +2948,33 @@ class CrudService {
2809
2948
  this.addDoc(doc);
2810
2949
  }
2811
2950
  }
2812
- _localId() {
2813
- return Number(Date.now() + '' + this._randomCount++);
2814
- }
2951
+ /**
2952
+ * Syncs a single document's signal (if exists) and refreshes all
2953
+ * derived collections (field/value lists and field maps).
2954
+ */
2815
2955
  _syncSignalForDoc(doc) {
2816
2956
  const id = this._id(doc);
2817
- if (!id)
2818
- return;
2819
- const signal = this._signals[id];
2820
- if (signal) {
2821
- signal.set(doc);
2957
+ if (id && this._signal[id]) {
2958
+ this._signal[id].set(doc);
2959
+ }
2960
+ this._updateSignals();
2961
+ }
2962
+ /**
2963
+ * Rebuilds all derived signal collections:
2964
+ * - all per (field,value) lists of document signals
2965
+ * - all per-field maps value -> [signals]
2966
+ *
2967
+ * This keeps `getSignals()` and `getFieldSignals()` in sync after
2968
+ * any mutation that touches `_docs`.
2969
+ */
2970
+ _updateSignals() {
2971
+ // refresh all (field,value) collections
2972
+ for (const key in this._signals) {
2973
+ this._signals[key].set(this._getSignals(key));
2974
+ }
2975
+ // refresh all per-field maps
2976
+ for (const field in this._fieldSignals) {
2977
+ this._fieldSignals[field].set(this._getFieldSignals(field));
2822
2978
  }
2823
2979
  }
2824
2980
  }
@@ -2941,10 +3097,10 @@ class DomService {
2941
3097
  delete this._providedIn[providedIn];
2942
3098
  }
2943
3099
  }
2944
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: DomService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2945
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: DomService, providedIn: 'root' }); }
3100
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DomService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3101
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DomService, providedIn: 'root' }); }
2946
3102
  }
2947
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: DomService, decorators: [{
3103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DomService, decorators: [{
2948
3104
  type: Injectable,
2949
3105
  args: [{
2950
3106
  providedIn: 'root',
@@ -3062,10 +3218,10 @@ class RtcService {
3062
3218
  this.localStream?.getTracks().forEach((track) => track.stop());
3063
3219
  this.localStream = null;
3064
3220
  }
3065
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: RtcService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3066
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: RtcService, providedIn: 'root' }); }
3221
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: RtcService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3222
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: RtcService, providedIn: 'root' }); }
3067
3223
  }
3068
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: RtcService, decorators: [{
3224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: RtcService, decorators: [{
3069
3225
  type: Injectable,
3070
3226
  args: [{ providedIn: 'root' }]
3071
3227
  }] });
@@ -3186,10 +3342,10 @@ class SocketService {
3186
3342
  }
3187
3343
  this._io.emit(to, message, room);
3188
3344
  }
3189
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SocketService, deps: [{ token: CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
3190
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SocketService, providedIn: 'root' }); }
3345
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SocketService, deps: [{ token: CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
3346
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SocketService, providedIn: 'root' }); }
3191
3347
  }
3192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: SocketService, decorators: [{
3348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SocketService, decorators: [{
3193
3349
  type: Injectable,
3194
3350
  args: [{
3195
3351
  providedIn: 'root',
@@ -3631,10 +3787,10 @@ class TimeService {
3631
3787
  }
3632
3788
  return lastWeek - firstWeek + 1;
3633
3789
  }
3634
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: TimeService, deps: [{ token: i1$2.DatePipe }], target: i0.ɵɵFactoryTarget.Injectable }); }
3635
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: TimeService, providedIn: 'root' }); }
3790
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TimeService, deps: [{ token: i1$2.DatePipe }], target: i0.ɵɵFactoryTarget.Injectable }); }
3791
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TimeService, providedIn: 'root' }); }
3636
3792
  }
3637
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: TimeService, decorators: [{
3793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TimeService, decorators: [{
3638
3794
  type: Injectable,
3639
3795
  args: [{
3640
3796
  providedIn: 'root',
@@ -3650,7 +3806,7 @@ class UtilService {
3650
3806
  // --- CSS variables (persisted) ---
3651
3807
  this._storageKey = 'css_variables';
3652
3808
  this._css = {};
3653
- this._cssSig = signal({}, { ...(ngDevMode ? { debugName: "_cssSig" } : {}) });
3809
+ this._cssSig = signal({}, ...(ngDevMode ? [{ debugName: "_cssSig" }] : []));
3654
3810
  // --- Forms store ---
3655
3811
  this._forms = new Map();
3656
3812
  // --- Global bag for design/debug ---
@@ -3876,10 +4032,10 @@ class UtilService {
3876
4032
  }
3877
4033
  catch { }
3878
4034
  }
3879
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UtilService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3880
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UtilService, providedIn: 'root' }); }
4035
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UtilService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4036
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UtilService, providedIn: 'root' }); }
3881
4037
  }
3882
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UtilService, decorators: [{
4038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UtilService, decorators: [{
3883
4039
  type: Injectable,
3884
4040
  args: [{ providedIn: 'root' }]
3885
4041
  }], ctorParameters: () => [] });
@@ -3916,8 +4072,8 @@ class WacomModule {
3916
4072
  ],
3917
4073
  };
3918
4074
  }
3919
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: WacomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3920
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.1", ngImport: i0, type: WacomModule, imports: [CommonModule, FormsModule, ArrPipe,
4075
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WacomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4076
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: WacomModule, imports: [CommonModule, FormsModule, ArrPipe,
3921
4077
  SafePipe,
3922
4078
  SplicePipe,
3923
4079
  SearchPipe,
@@ -3928,12 +4084,12 @@ class WacomModule {
3928
4084
  SearchPipe,
3929
4085
  MongodatePipe,
3930
4086
  PaginationPipe, ClickOutsideDirective] }); }
3931
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: WacomModule, providers: [
4087
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WacomModule, providers: [
3932
4088
  { provide: CONFIG_TOKEN, useValue: DEFAULT_CONFIG },
3933
4089
  provideHttpClient(withInterceptorsFromDi()),
3934
4090
  ], imports: [CommonModule, FormsModule] }); }
3935
4091
  }
3936
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: WacomModule, decorators: [{
4092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WacomModule, decorators: [{
3937
4093
  type: NgModule,
3938
4094
  args: [{
3939
4095
  imports: [CommonModule, FormsModule, ...PIPES, ...DIRECTIVES],