speechrecorderng 3.8.0 → 3.9.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.
@@ -4829,6 +4829,7 @@ class SpeechRecorderConfig {
4829
4829
  constructor() {
4830
4830
  this.apiEndPoint = null;
4831
4831
  this.apiType = null;
4832
+ this.apiVersion = 1;
4832
4833
  this.withCredentials = false;
4833
4834
  this.enableDownloadRecordings = false;
4834
4835
  this.enableUploadRecordings = true;
@@ -8014,35 +8015,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
8014
8015
  type: Directive
8015
8016
  }], ctorParameters: () => [{ type: i1$2.BreakpointObserver }] });
8016
8017
 
8017
- class ScrollIntoViewDirective {
8018
+ class IntersectionObserverDirective {
8019
+ //private intersectionObserver:IntersectionObserver|null=null;
8018
8020
  constructor(elRef) {
8019
8021
  this.elRef = elRef;
8022
+ const ne = this.elRef.nativeElement;
8023
+ //ne.style.backgroundColor = 'yellow';
8020
8024
  }
8021
- set scrollIntoViewToBottom(siv) {
8022
- if (siv) {
8023
- this.elRef.nativeElement.scrollIntoView(false);
8025
+ set updateObservation(elIntersection) {
8026
+ //console.debug("visi: "+elIntersection.selected);
8027
+ if (elIntersection.observe) {
8028
+ //this.elRef.nativeElement.scrollIntoView(false);
8029
+ elIntersection.observer.observe(this.elRef.nativeElement);
8030
+ }
8031
+ else {
8032
+ elIntersection.observer.unobserve(this.elRef.nativeElement);
8024
8033
  }
8025
8034
  }
8026
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: ScrollIntoViewDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
8027
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.6", type: ScrollIntoViewDirective, selector: "[scrollIntoViewToBottom]", inputs: { scrollIntoViewToBottom: "scrollIntoViewToBottom" }, ngImport: i0 }); }
8035
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: IntersectionObserverDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
8036
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.6", type: IntersectionObserverDirective, isStandalone: true, selector: "[updateObservation]", inputs: { updateObservation: "updateObservation" }, ngImport: i0 }); }
8028
8037
  }
8029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: ScrollIntoViewDirective, decorators: [{
8038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: IntersectionObserverDirective, decorators: [{
8030
8039
  type: Directive,
8031
8040
  args: [{
8032
- selector: "[scrollIntoViewToBottom]"
8041
+ selector: '[updateObservation]',
8042
+ standalone: true,
8033
8043
  }]
8034
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { scrollIntoViewToBottom: [{
8044
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { updateObservation: [{
8035
8045
  type: Input
8036
8046
  }] } });
8037
8047
 
8038
8048
  class Progress {
8039
- constructor() {
8049
+ constructor(elRef) {
8050
+ this.elRef = elRef;
8040
8051
  this.items = undefined;
8041
8052
  this.selectedItemIdx = 0;
8042
8053
  this.enableDownload = false;
8043
8054
  this.onRowSelect = new EventEmitter();
8044
8055
  this.onShowDoneAction = new EventEmitter();
8045
8056
  this.onDownloadDoneAction = new EventEmitter();
8057
+ this.isObs = new IntersectionObserver(ise => {
8058
+ //console.debug("Intersection changed: ");
8059
+ ise.forEach((isee) => {
8060
+ //console.debug("Intersection: "+isee.isIntersecting+' '+isee.intersectionRatio);
8061
+ if (isee.intersectionRatio < 1) {
8062
+ isee.target.scrollIntoView(false);
8063
+ this.isObs.unobserve(isee.target);
8064
+ }
8065
+ });
8066
+ }, { root: this.elRef.nativeElement });
8046
8067
  }
8047
8068
  set rowSelect(rowIdx) {
8048
8069
  this.onRowSelect.emit(rowIdx);
@@ -8072,7 +8093,7 @@ class Progress {
8072
8093
  }
8073
8094
  return cached;
8074
8095
  }
8075
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: Progress, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8096
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: Progress, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
8076
8097
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: Progress, selector: "app-sprprogress", inputs: { items: "items", selectedItemIdx: "selectedItemIdx", enableDownload: "enableDownload" }, outputs: { onRowSelect: "onRowSelect", rowSelect: "rowSelect", onShowDoneAction: "onShowDoneAction", clickDone: "clickDone", onDownloadDoneAction: "onDownloadDoneAction", clickDownloadDone: "clickDownloadDone" }, ngImport: i0, template: `
8077
8098
 
8078
8099
  <table class="mat-typography">
@@ -8088,7 +8109,7 @@ class Progress {
8088
8109
 
8089
8110
  <tr *ngFor="let item of items; let itIdx=index;"
8090
8111
  (click)="rowSelect=itIdx" [class.selRow]="itIdx===selectedItemIdx"
8091
- [scrollIntoViewToBottom]="itIdx===selectedItemIdx">
8112
+ [updateObservation]="{observer:isObs,observe:(itIdx===selectedItemIdx)}">
8092
8113
  <td>{{itIdx}}</td>
8093
8114
  <td class="promptDescriptor">{{item.promptAsString}}</td>
8094
8115
  <td>
@@ -8101,7 +8122,7 @@ class Progress {
8101
8122
 
8102
8123
  </tbody>
8103
8124
  </table>
8104
- `, isInline: true, styles: [":host{overflow-x:hidden;overflow-y:scroll;padding:10pt;flex:.1 0 content;background:white;min-height:1px}\n", "table{min-height:1px;border-collapse:collapse}table,th,td{border:1px solid lightgrey;padding:.5em}\n", ".selRow{background:lightblue}\n", ".promptDescriptor{max-width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: ScrollIntoViewDirective, selector: "[scrollIntoViewToBottom]", inputs: ["scrollIntoViewToBottom"] }] }); }
8125
+ `, isInline: true, styles: [":host{overflow-x:hidden;overflow-y:scroll;padding:10pt;flex:.1 0 content;background:white;min-height:1px}\n", "table{min-height:1px;border-collapse:collapse}table,th,td{border:1px solid lightgrey;padding:.5em}\n", ".selRow{background:lightblue}\n", ".promptDescriptor{max-width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: IntersectionObserverDirective, selector: "[updateObservation]", inputs: ["updateObservation"] }] }); }
8105
8126
  }
8106
8127
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: Progress, decorators: [{
8107
8128
  type: Component,
@@ -8120,7 +8141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
8120
8141
 
8121
8142
  <tr *ngFor="let item of items; let itIdx=index;"
8122
8143
  (click)="rowSelect=itIdx" [class.selRow]="itIdx===selectedItemIdx"
8123
- [scrollIntoViewToBottom]="itIdx===selectedItemIdx">
8144
+ [updateObservation]="{observer:isObs,observe:(itIdx===selectedItemIdx)}">
8124
8145
  <td>{{itIdx}}</td>
8125
8146
  <td class="promptDescriptor">{{item.promptAsString}}</td>
8126
8147
  <td>
@@ -8134,7 +8155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
8134
8155
  </tbody>
8135
8156
  </table>
8136
8157
  `, styles: [":host{overflow-x:hidden;overflow-y:scroll;padding:10pt;flex:.1 0 content;background:white;min-height:1px}\n", "table{min-height:1px;border-collapse:collapse}table,th,td{border:1px solid lightgrey;padding:.5em}\n", ".selRow{background:lightblue}\n", ".promptDescriptor{max-width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}\n"] }]
8137
- }], propDecorators: { items: [{
8158
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { items: [{
8138
8159
  type: Input
8139
8160
  }], selectedItemIdx: [{
8140
8161
  type: Input
@@ -9127,7 +9148,7 @@ let BasicRecordingService = class BasicRecordingService {
9127
9148
  constructor(http, config) {
9128
9149
  this.http = http;
9129
9150
  this.config = config;
9130
- this._maxAutoNetMemStoreSamples = BasicRecordingService_1.DEFAULT_MAX_NET_AUTO_MEM_STORE_SAMPLES;
9151
+ this._maxAutoNetMemStoreSamples = Number.MAX_SAFE_INTEGER;
9131
9152
  this.withCredentials = false;
9132
9153
  this.apiEndPoint = '';
9133
9154
  if (config && config.apiEndPoint) {
@@ -9139,6 +9160,9 @@ let BasicRecordingService = class BasicRecordingService {
9139
9160
  if (config != null && config.withCredentials != null) {
9140
9161
  this.withCredentials = config.withCredentials;
9141
9162
  }
9163
+ if (config && config.apiVersion > 1) {
9164
+ this._maxAutoNetMemStoreSamples = BasicRecordingService_1.DEFAULT_MAX_NET_AUTO_MEM_STORE_SAMPLES;
9165
+ }
9142
9166
  }
9143
9167
  audioRequestByURL(audioBaseUrl, audioURLSearchParams) {
9144
9168
  let audioUrl = audioBaseUrl;
@@ -14907,6 +14931,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
14907
14931
  args: [SessionManager, { static: true }]
14908
14932
  }] } });
14909
14933
 
14934
+ class ScrollIntoViewDirective {
14935
+ constructor(elRef) {
14936
+ this.elRef = elRef;
14937
+ }
14938
+ set scrollIntoViewToBottom(siv) {
14939
+ if (siv) {
14940
+ this.elRef.nativeElement.scrollIntoView(false);
14941
+ }
14942
+ }
14943
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: ScrollIntoViewDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
14944
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.6", type: ScrollIntoViewDirective, selector: "[scrollIntoViewToBottom]", inputs: { scrollIntoViewToBottom: "scrollIntoViewToBottom" }, ngImport: i0 }); }
14945
+ }
14946
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: ScrollIntoViewDirective, decorators: [{
14947
+ type: Directive,
14948
+ args: [{
14949
+ selector: "[scrollIntoViewToBottom]"
14950
+ }]
14951
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { scrollIntoViewToBottom: [{
14952
+ type: Input
14953
+ }] } });
14954
+
14910
14955
  class ScrollPaneHorizontal {
14911
14956
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: ScrollPaneHorizontal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14912
14957
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: ScrollPaneHorizontal, selector: "scroll-pane-horizontal", ngImport: i0, template: '', isInline: true, styles: [":host{width:100%;background:darkgray;box-sizing:border-box;height:100%;position:relative;overflow-x:scroll;overflow-y:auto}\n"] }); }
@@ -17686,7 +17731,7 @@ class SpeechrecorderngModule {
17686
17731
  }
17687
17732
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: SpeechrecorderngModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
17688
17733
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.6", ngImport: i0, type: SpeechrecorderngModule, declarations: [AudioSignal, Sonagram, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, Progress, SimpleTrafficLight, Recinstructions, Prompter, PromptContainer, PromptingContainer, Prompting, StatusDisplay,
17689
- ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, WakeLockIndicator, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, AudioRecorderComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder], imports: [i4$2.RouterModule, CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule, MatMenuModule], exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, AudioRecorder] }); }
17734
+ ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, WakeLockIndicator, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, AudioRecorderComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder], imports: [i4$2.RouterModule, CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule, MatMenuModule, IntersectionObserverDirective], exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, AudioRecorder] }); }
17690
17735
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: SpeechrecorderngModule, providers: [SessionService, ProjectService, ScriptService, RecordingService, RecordingFileService, SpeechRecorderUploader], imports: [RouterModule.forChild(SPR_ROUTES), CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule, MatMenuModule] }); }
17691
17736
  }
17692
17737
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: SpeechrecorderngModule, decorators: [{
@@ -17695,12 +17740,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
17695
17740
  declarations: [AudioSignal, Sonagram, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, Progress, SimpleTrafficLight, Recinstructions, Prompter, PromptContainer, PromptingContainer, Prompting, StatusDisplay,
17696
17741
  ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, WakeLockIndicator, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, AudioRecorderComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder],
17697
17742
  exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, AudioRecorder],
17698
- imports: [RouterModule.forChild(SPR_ROUTES), CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule, MatMenuModule],
17743
+ imports: [RouterModule.forChild(SPR_ROUTES), CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule, MatMenuModule, IntersectionObserverDirective],
17699
17744
  providers: [SessionService, ProjectService, ScriptService, RecordingService, RecordingFileService, SpeechRecorderUploader]
17700
17745
  }]
17701
17746
  }] });
17702
17747
 
17703
- const VERSION = '3.8.0';
17748
+ const VERSION = '3.9.0';
17749
+
17750
+ const SPEECHRECORDER_ENVIRONMENT_DEFAULTS = {
17751
+ production: false,
17752
+ apiType: 'files',
17753
+ apiEndPoint: 'test',
17754
+ apiVersion: 1,
17755
+ enableDownloadRecordings: true,
17756
+ enableUploadRecordings: false
17757
+ };
17704
17758
 
17705
17759
  /*
17706
17760
  * Public API Surface of speechrecorderng
@@ -17710,5 +17764,5 @@ const VERSION = '3.8.0';
17710
17764
  * Generated bundle index. Do not edit.
17711
17765
  */
17712
17766
 
17713
- export { Action, ApiType, AudioClip, AudioClipUIContainer, AudioContextProvider, AudioDisplay, AudioDisplayControl, AudioDisplayPlayer, AudioDisplayScrollPane, AudioPlayer, AudioPlayerEvent, AudioRecorder, AudioRecorderComponent, EventType, LevelBar, MessageDialog, ProjectService, RecorderComponent, RecordingFileService, RecordingFileUI, RecordingFileViewComponent, RecordingService, ResponsiveComponent, SPEECHRECORDER_CONFIG, ScriptService, ScrollPaneHorizontal, Selection, SessionService, SpeechRecorderConfig, SpeechrecorderngComponent, SpeechrecorderngModule, SprRecordingFile, UUID, VERSION, WavWriter };
17767
+ export { Action, ApiType, AudioClip, AudioClipUIContainer, AudioContextProvider, AudioDisplay, AudioDisplayControl, AudioDisplayPlayer, AudioDisplayScrollPane, AudioPlayer, AudioPlayerEvent, AudioRecorder, AudioRecorderComponent, EventType, LevelBar, MessageDialog, ProjectService, RecorderComponent, RecordingFileService, RecordingFileUI, RecordingFileViewComponent, RecordingService, ResponsiveComponent, SPEECHRECORDER_CONFIG, SPEECHRECORDER_ENVIRONMENT_DEFAULTS, ScriptService, ScrollPaneHorizontal, Selection, SessionService, SpeechRecorderConfig, SpeechrecorderngComponent, SpeechrecorderngModule, SprRecordingFile, UUID, VERSION, WavWriter };
17714
17768
  //# sourceMappingURL=speechrecorderng.mjs.map