@openmrs/ngx-formentry 17.0.1-pre.472 → 18.0.1-pre.482

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.
@@ -16,6 +16,7 @@ import { CheckBoxQuestion } from '../question-models/models';
16
16
  import { RadioButtonQuestion } from '../question-models/models';
17
17
  import { DiagnosisQuestion } from '../question-models/diagnosis-question';
18
18
  import { WorkspaceLauncherQuestion } from '../question-models';
19
+ import { RemoteSelectQuestion } from '../question-models/remote-select-question';
19
20
  import * as i0 from "@angular/core";
20
21
  export declare class QuestionFactory {
21
22
  dataSources: any;
@@ -49,6 +50,8 @@ export declare class QuestionFactory {
49
50
  toEncounterLocationQuestion(schemaQuestion: any): UiSelectQuestion;
50
51
  toTestOrderQuestion(schemaQuestion: any): TestOrderQuestion;
51
52
  toDiagnosisQuestion(schemaQuestion: any): DiagnosisQuestion;
53
+ toRemoteSelectQuestion(schemaQuestion: any): RemoteSelectQuestion;
54
+ private getDataSourceConfig;
52
55
  toDecimalQuestion(schemaQuestion: any): TextInputQuestion;
53
56
  toWorkspaceLauncher(schemaQuestion: any): WorkspaceLauncherQuestion;
54
57
  getSchemaQuestions(schema: any): any;
@@ -1,10 +1,10 @@
1
1
  import { SelectOption } from './select-option';
2
2
  import { Observable } from 'rxjs';
3
3
  export interface DataSource {
4
- dataSourceOptions?: any;
4
+ dataSourceOptions?: Record<string, unknown>;
5
5
  dataFromSourceChanged?: Observable<SelectOption[]>;
6
6
  resolveSelectedValue(value: any): Observable<SelectOption>;
7
- searchOptions(searchText: any): Observable<SelectOption[]>;
7
+ searchOptions(searchText: any, dataSourceOptions?: Record<string, unknown>): Observable<SelectOption[]>;
8
8
  fileUpload(data: any): Observable<any>;
9
9
  fetchFile(url: string, fileType?: string): Observable<any>;
10
10
  }
@@ -0,0 +1,5 @@
1
+ import { BaseOptions } from '../interfaces/base-options';
2
+ export interface RemoteSelectQuestionOptions extends BaseOptions {
3
+ dataSource: string;
4
+ dataSourceOptions?: Record<string, unknown>;
5
+ }
@@ -27,7 +27,7 @@ export declare class QuestionBase implements BaseOptions {
27
27
  historicalDataValue?: any;
28
28
  extras?: any;
29
29
  dataSource?: string;
30
- dataSourceOptions?: any;
30
+ dataSourceOptions?: Record<string, unknown>;
31
31
  controlType?: AfeControlType;
32
32
  validators?: Array<ValidationModel>;
33
33
  required?: boolean;
@@ -0,0 +1,7 @@
1
+ import { QuestionBase } from './question-base';
2
+ import { RemoteSelectQuestionOptions } from './interfaces/remote-select-question-options';
3
+ export declare class RemoteSelectQuestion extends QuestionBase {
4
+ rendering: string;
5
+ options: any[];
6
+ constructor(options: RemoteSelectQuestionOptions);
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/ngx-formentry",
3
- "version": "17.0.1-pre.472",
3
+ "version": "18.0.1-pre.482",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },