@smartbit4all/ng-client 1.1.37 → 1.1.39

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.
Files changed (46) hide show
  1. package/esm2020/lib/smart-client/api/api/api.mjs +4 -0
  2. package/esm2020/lib/smart-client/api/api/default.service.mjs +133 -0
  3. package/esm2020/lib/smart-client/api/api.module.mjs +40 -0
  4. package/esm2020/lib/smart-client/api/configuration.mjs +91 -0
  5. package/esm2020/lib/smart-client/api/encoder.mjs +19 -0
  6. package/esm2020/lib/smart-client/api/index.mjs +7 -0
  7. package/esm2020/lib/smart-client/api/model/componentType.mjs +17 -0
  8. package/esm2020/lib/smart-client/api/model/componentWidgetType.mjs +15 -0
  9. package/esm2020/lib/smart-client/api/model/layoutDirection.mjs +16 -0
  10. package/esm2020/lib/smart-client/api/model/models.mjs +6 -0
  11. package/esm2020/lib/smart-client/api/model/smartComponentLayoutDefinition.mjs +2 -0
  12. package/esm2020/lib/smart-client/api/model/smartComponentWidgetDefinition.mjs +2 -0
  13. package/esm2020/lib/smart-client/api/param.mjs +2 -0
  14. package/esm2020/lib/smart-client/api/variables.mjs +9 -0
  15. package/esm2020/lib/smart-client/smart-component-api-client.mjs +1 -1
  16. package/esm2020/lib/smart-client/smart-component-layout/smart-component-layout.component.mjs +22 -7
  17. package/esm2020/lib/smart-ng-client.module.mjs +6 -2
  18. package/esm2020/projects.mjs +2 -2
  19. package/fesm2015/smartbit4all-ng-client.mjs +380 -42
  20. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  21. package/fesm2020/smartbit4all-ng-client.mjs +372 -39
  22. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  23. package/lib/smart-client/api/api/api.d.ts +3 -0
  24. package/lib/smart-client/api/api/default.service.d.ts +33 -0
  25. package/lib/smart-client/api/api.module.d.ts +11 -0
  26. package/lib/smart-client/api/configuration.d.ts +104 -0
  27. package/lib/smart-client/api/encoder.d.ts +11 -0
  28. package/lib/smart-client/api/index.d.ts +6 -0
  29. package/lib/smart-client/api/model/componentType.d.ts +17 -0
  30. package/lib/smart-client/api/model/componentWidgetType.d.ts +15 -0
  31. package/lib/smart-client/api/model/layoutDirection.d.ts +16 -0
  32. package/lib/smart-client/api/model/models.d.ts +5 -0
  33. package/lib/smart-client/api/model/smartComponentLayoutDefinition.d.ts +29 -0
  34. package/lib/smart-client/api/model/smartComponentWidgetDefinition.d.ts +18 -0
  35. package/lib/smart-client/api/param.d.ts +37 -0
  36. package/lib/smart-client/api/variables.d.ts +8 -0
  37. package/lib/smart-client/smart-component-api-client.d.ts +1 -1
  38. package/lib/smart-client/smart-component-layout/smart-component-layout.component.d.ts +5 -1
  39. package/lib/smart-ng-client.module.d.ts +2 -1
  40. package/package.json +1 -1
  41. package/projects.d.ts +1 -1
  42. package/smartbit4all-ng-client-1.1.39.tgz +0 -0
  43. package/src/lib/smart-client/api/README.md +226 -0
  44. package/esm2020/lib/smart-client/smart-component-layout/smart-component-layout.model.mjs +0 -13
  45. package/lib/smart-client/smart-component-layout/smart-component-layout.model.d.ts +0 -30
  46. package/smartbit4all-ng-client-1.1.37.tgz +0 -0
@@ -0,0 +1,3 @@
1
+ export * from './default.service';
2
+ import { DefaultService } from './default.service';
3
+ export declare const APIS: (typeof DefaultService)[];
@@ -0,0 +1,33 @@
1
+ import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { Configuration } from '../configuration';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DefaultService {
6
+ protected httpClient: HttpClient;
7
+ protected basePath: string;
8
+ defaultHeaders: HttpHeaders;
9
+ configuration: Configuration;
10
+ encoder: HttpParameterCodec;
11
+ constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
12
+ private addToHttpParams;
13
+ private addToHttpParamsRecursive;
14
+ /**
15
+ * Placeholder for generation
16
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
17
+ * @param reportProgress flag to report request and response progress.
18
+ */
19
+ nopePost(observe?: 'body', reportProgress?: boolean, options?: {
20
+ httpHeaderAccept?: undefined;
21
+ context?: HttpContext;
22
+ }): Observable<any>;
23
+ nopePost(observe?: 'response', reportProgress?: boolean, options?: {
24
+ httpHeaderAccept?: undefined;
25
+ context?: HttpContext;
26
+ }): Observable<HttpResponse<any>>;
27
+ nopePost(observe?: 'events', reportProgress?: boolean, options?: {
28
+ httpHeaderAccept?: undefined;
29
+ context?: HttpContext;
30
+ }): Observable<HttpEvent<any>>;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultService, [null, { optional: true; }, { optional: true; }]>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<DefaultService>;
33
+ }
@@ -0,0 +1,11 @@
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { Configuration } from './configuration';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ApiModule {
6
+ static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule>;
7
+ constructor(parentModule: ApiModule, http: HttpClient);
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiModule, [{ optional: true; skipSelf: true; }, { optional: true; }]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ApiModule, never, never, never>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<ApiModule>;
11
+ }
@@ -0,0 +1,104 @@
1
+ import { HttpParameterCodec } from '@angular/common/http';
2
+ import { Param } from './param';
3
+ export interface ConfigurationParameters {
4
+ /**
5
+ * @deprecated Since 5.0. Use credentials instead
6
+ */
7
+ apiKeys?: {
8
+ [key: string]: string;
9
+ };
10
+ username?: string;
11
+ password?: string;
12
+ /**
13
+ * @deprecated Since 5.0. Use credentials instead
14
+ */
15
+ accessToken?: string | (() => string);
16
+ basePath?: string;
17
+ withCredentials?: boolean;
18
+ /**
19
+ * Takes care of encoding query- and form-parameters.
20
+ */
21
+ encoder?: HttpParameterCodec;
22
+ /**
23
+ * Override the default method for encoding path parameters in various
24
+ * <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
25
+ * <p>
26
+ * See {@link README.md} for more details
27
+ * </p>
28
+ */
29
+ encodeParam?: (param: Param) => string;
30
+ /**
31
+ * The keys are the names in the securitySchemes section of the OpenAPI
32
+ * document. They should map to the value used for authentication
33
+ * minus any standard prefixes such as 'Basic' or 'Bearer'.
34
+ */
35
+ credentials?: {
36
+ [key: string]: string | (() => string | undefined);
37
+ };
38
+ }
39
+ export declare class Configuration {
40
+ /**
41
+ * @deprecated Since 5.0. Use credentials instead
42
+ */
43
+ apiKeys?: {
44
+ [key: string]: string;
45
+ };
46
+ username?: string;
47
+ password?: string;
48
+ /**
49
+ * @deprecated Since 5.0. Use credentials instead
50
+ */
51
+ accessToken?: string | (() => string);
52
+ basePath?: string;
53
+ withCredentials?: boolean;
54
+ /**
55
+ * Takes care of encoding query- and form-parameters.
56
+ */
57
+ encoder?: HttpParameterCodec;
58
+ /**
59
+ * Encoding of various path parameter
60
+ * <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
61
+ * <p>
62
+ * See {@link README.md} for more details
63
+ * </p>
64
+ */
65
+ encodeParam: (param: Param) => string;
66
+ /**
67
+ * The keys are the names in the securitySchemes section of the OpenAPI
68
+ * document. They should map to the value used for authentication
69
+ * minus any standard prefixes such as 'Basic' or 'Bearer'.
70
+ */
71
+ credentials: {
72
+ [key: string]: string | (() => string | undefined);
73
+ };
74
+ constructor(configurationParameters?: ConfigurationParameters);
75
+ /**
76
+ * Select the correct content-type to use for a request.
77
+ * Uses {@link Configuration#isJsonMime} to determine the correct content-type.
78
+ * If no content type is found return the first found type if the contentTypes is not empty
79
+ * @param contentTypes - the array of content types that are available for selection
80
+ * @returns the selected content-type or <code>undefined</code> if no selection could be made.
81
+ */
82
+ selectHeaderContentType(contentTypes: string[]): string | undefined;
83
+ /**
84
+ * Select the correct accept content-type to use for a request.
85
+ * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
86
+ * If no content type is found return the first found type if the contentTypes is not empty
87
+ * @param accepts - the array of content types that are available for selection.
88
+ * @returns the selected content-type or <code>undefined</code> if no selection could be made.
89
+ */
90
+ selectHeaderAccept(accepts: string[]): string | undefined;
91
+ /**
92
+ * Check if the given MIME is a JSON MIME.
93
+ * JSON MIME examples:
94
+ * application/json
95
+ * application/json; charset=UTF8
96
+ * APPLICATION/JSON
97
+ * application/vnd.company+json
98
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
99
+ * @return True if the given MIME is JSON, false otherwise.
100
+ */
101
+ isJsonMime(mime: string): boolean;
102
+ lookupCredential(key: string): string | undefined;
103
+ private defaultEncodeParam;
104
+ }
@@ -0,0 +1,11 @@
1
+ import { HttpParameterCodec } from '@angular/common/http';
2
+ /**
3
+ * Custom HttpParameterCodec
4
+ * Workaround for https://github.com/angular/angular/issues/18261
5
+ */
6
+ export declare class CustomHttpParameterCodec implements HttpParameterCodec {
7
+ encodeKey(k: string): string;
8
+ encodeValue(v: string): string;
9
+ decodeKey(k: string): string;
10
+ decodeValue(v: string): string;
11
+ }
@@ -0,0 +1,6 @@
1
+ export * from './api/api';
2
+ export * from './model/models';
3
+ export * from './variables';
4
+ export * from './configuration';
5
+ export * from './api.module';
6
+ export * from './param';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Form layout definition
3
+ * Contains form layout definition objects.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export declare type ComponentType = 'container' | 'form' | 'widget';
13
+ export declare const ComponentType: {
14
+ Container: ComponentType;
15
+ Form: ComponentType;
16
+ Widget: ComponentType;
17
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Form layout definition
3
+ * Contains form layout definition objects.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export declare type ComponentWidgetType = 'grid';
13
+ export declare const ComponentWidgetType: {
14
+ Grid: "grid";
15
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Form layout definition
3
+ * Contains form layout definition objects.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export declare type LayoutDirection = 'horizontal' | 'vertical';
13
+ export declare const LayoutDirection: {
14
+ Horizontal: LayoutDirection;
15
+ Vertical: LayoutDirection;
16
+ };
@@ -0,0 +1,5 @@
1
+ export * from './componentType';
2
+ export * from './componentWidgetType';
3
+ export * from './layoutDirection';
4
+ export * from './smartComponentLayoutDefinition';
5
+ export * from './smartComponentWidgetDefinition';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Form layout definition
3
+ * Contains form layout definition objects.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ComponentType } from './componentType';
13
+ import { LayoutDirection } from './layoutDirection';
14
+ import { SmartComponentWidgetDefinition } from './smartComponentWidgetDefinition';
15
+ export interface SmartComponentLayoutDefinition {
16
+ type: ComponentType;
17
+ expandable?: boolean;
18
+ expandableSectionLabel?: string;
19
+ direction?: LayoutDirection;
20
+ /**
21
+ * This is a placeholder for SmartComponentApiClient. You might want to describe this further.
22
+ */
23
+ parentComponent?: object;
24
+ components?: Array<SmartComponentLayoutDefinition>;
25
+ widget?: SmartComponentWidgetDefinition;
26
+ form?: Array<any>;
27
+ }
28
+ export declare namespace SmartComponentLayoutDefinition {
29
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Form layout definition
3
+ * Contains form layout definition objects.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ComponentWidgetType } from './componentWidgetType';
13
+ export interface SmartComponentWidgetDefinition {
14
+ type: ComponentWidgetType;
15
+ gridIdentifier?: string;
16
+ }
17
+ export declare namespace SmartComponentWidgetDefinition {
18
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Standard parameter styles defined by OpenAPI spec
3
+ */
4
+ export declare type StandardParamStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
5
+ /**
6
+ * The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user.
7
+ */
8
+ export declare type ParamStyle = StandardParamStyle | string;
9
+ /**
10
+ * Standard parameter locations defined by OpenAPI spec
11
+ */
12
+ export declare type ParamLocation = 'query' | 'header' | 'path' | 'cookie';
13
+ /**
14
+ * Standard types as defined in <a href="https://swagger.io/specification/#data-types">OpenAPI Specification: Data Types</a>
15
+ */
16
+ export declare type StandardDataType = "integer" | "number" | "boolean" | "string" | "object" | "array";
17
+ /**
18
+ * Standard {@link DataType}s plus your own types/classes.
19
+ */
20
+ export declare type DataType = StandardDataType | string;
21
+ /**
22
+ * Standard formats as defined in <a href="https://swagger.io/specification/#data-types">OpenAPI Specification: Data Types</a>
23
+ */
24
+ export declare type StandardDataFormat = "int32" | "int64" | "float" | "double" | "byte" | "binary" | "date" | "date-time" | "password";
25
+ export declare type DataFormat = StandardDataFormat | string;
26
+ /**
27
+ * The parameter to encode.
28
+ */
29
+ export interface Param {
30
+ name: string;
31
+ value: unknown;
32
+ in: ParamLocation;
33
+ style: ParamStyle;
34
+ explode: boolean;
35
+ dataType: DataType;
36
+ dataFormat: DataFormat | undefined;
37
+ }
@@ -0,0 +1,8 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const BASE_PATH: InjectionToken<string>;
3
+ export declare const COLLECTION_FORMATS: {
4
+ csv: string;
5
+ tsv: string;
6
+ ssv: string;
7
+ pipes: string;
8
+ };
@@ -5,7 +5,7 @@ import { SmarttreeGenericService } from '@smartbit4all/tree';
5
5
  import { Subject } from 'rxjs';
6
6
  import { ComponentModel, SmartViewContextService, UiAction, UiActionAdditionalParams, UiActionDescriptorService, UiActionModel, UiActionRequest, UiActionService, UiActionSpecificDemandResponse, UseUiAction } from '../view-context/projects';
7
7
  import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
8
- import { SmartComponentLayoutDefinition } from './smart-component-layout/smart-component-layout.model';
8
+ import { SmartComponentLayoutDefinition } from './api';
9
9
  export declare abstract class SmartComponentApiClient<T> implements UseUiAction {
10
10
  protected inject: Injector;
11
11
  protected auth: SmartAuthenticationServiceInterface;
@@ -1,18 +1,22 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
- import { ComponentType, SmartComponentLayoutDefinition } from './smart-component-layout.model';
3
2
  import { SmartForm, SmartformComponent, SmartformLayoutDefinitionService } from '@smartbit4all/form';
4
3
  import { SmartGrid, SmartGridComponent } from '@smartbit4all/grid';
4
+ import { ComponentType, SmartComponentLayoutDefinition } from '../api';
5
+ import { ExpandableSection } from '@smartbit4all/expandable-section';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class SmartComponentLayoutComponent implements OnChanges {
7
8
  private layoutService;
8
9
  smartComponentLayout?: SmartComponentLayoutDefinition;
10
+ uuid?: string;
9
11
  formChild?: SmartformComponent;
10
12
  smartForm?: SmartForm;
11
13
  gridChild?: SmartGridComponent;
12
14
  smartGrid?: SmartGrid;
15
+ expandableSection?: ExpandableSection<SmartComponentLayoutDefinition>;
13
16
  constructor(layoutService: SmartformLayoutDefinitionService);
14
17
  ngOnChanges(changes: SimpleChanges): void;
15
18
  type(): typeof ComponentType;
19
+ constructExpandableSection(): void;
16
20
  constructForm(): void;
17
21
  makeid(length: number): string;
18
22
  constructGrid(): void;
@@ -7,8 +7,9 @@ import * as i5 from "./session/smart-session.module";
7
7
  import * as i6 from "./view-context/smart-view-context.module";
8
8
  import * as i7 from "@smartbit4all/form";
9
9
  import * as i8 from "@smartbit4all/grid";
10
+ import * as i9 from "@smartbit4all/expandable-section";
10
11
  export declare class SmartNgClientModule {
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartNgClientModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<SmartNgClientModule, [typeof i1.SmartFileUploaderComponent, typeof i2.SmartComponentLayoutComponent], [typeof i3.BrowserModule, typeof i4.MatCommonModule, typeof i5.SmartSessionModule, typeof i6.SmartViewContextModule, typeof i7.SmartformModule, typeof i8.SmartGridModule], [typeof i5.SmartSessionModule, typeof i6.SmartViewContextModule, typeof i1.SmartFileUploaderComponent, typeof i2.SmartComponentLayoutComponent]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmartNgClientModule, [typeof i1.SmartFileUploaderComponent, typeof i2.SmartComponentLayoutComponent], [typeof i3.BrowserModule, typeof i4.MatCommonModule, typeof i5.SmartSessionModule, typeof i6.SmartViewContextModule, typeof i7.SmartformModule, typeof i8.SmartGridModule, typeof i9.SmartExpandableSectionModule], [typeof i5.SmartSessionModule, typeof i6.SmartViewContextModule, typeof i1.SmartFileUploaderComponent, typeof i2.SmartComponentLayoutComponent]>;
13
14
  static ɵinj: i0.ɵɵInjectorDeclaration<SmartNgClientModule>;
14
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "1.1.37",
3
+ "version": "1.1.39",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^13.2.0",
package/projects.d.ts CHANGED
@@ -2,7 +2,7 @@ export * from './lib/smart-ng-client.service';
2
2
  export * from './lib/smart-ng-client.module';
3
3
  export * from './lib/smart-client/smart-file-uploader/smart-file-uploader.component';
4
4
  export * from './lib/smart-client/smart-component-layout/smart-component-layout.component';
5
- export * from './lib/smart-client/smart-component-layout/smart-component-layout.model';
5
+ export * from './lib/smart-client/api/model/models';
6
6
  export * from './lib/view-context/projects';
7
7
  export * from './lib/session/projects';
8
8
  export * from './lib/smart-client/projects';
@@ -0,0 +1,226 @@
1
+ ## @
2
+
3
+ ### Building
4
+
5
+ To install the required dependencies and to build the typescript sources run:
6
+ ```
7
+ npm install
8
+ npm run build
9
+ ```
10
+
11
+ ### publishing
12
+
13
+ First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!)
14
+
15
+ ### consuming
16
+
17
+ Navigate to the folder of your consuming project and run one of next commands.
18
+
19
+ _published:_
20
+
21
+ ```
22
+ npm install @ --save
23
+ ```
24
+
25
+ _without publishing (not recommended):_
26
+
27
+ ```
28
+ npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save
29
+ ```
30
+
31
+ _It's important to take the tgz file, otherwise you'll get trouble with links on windows_
32
+
33
+ _using `npm link`:_
34
+
35
+ In PATH_TO_GENERATED_PACKAGE/dist:
36
+ ```
37
+ npm link
38
+ ```
39
+
40
+ In your project:
41
+ ```
42
+ npm link
43
+ ```
44
+
45
+ __Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.
46
+ Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround.
47
+ Published packages are not effected by this issue.
48
+
49
+
50
+ #### General usage
51
+
52
+ In your Angular project:
53
+
54
+
55
+ ```
56
+ // without configuring providers
57
+ import { ApiModule } from '';
58
+ import { HttpClientModule } from '@angular/common/http';
59
+
60
+ @NgModule({
61
+ imports: [
62
+ ApiModule,
63
+ // make sure to import the HttpClientModule in the AppModule only,
64
+ // see https://github.com/angular/angular/issues/20575
65
+ HttpClientModule
66
+ ],
67
+ declarations: [ AppComponent ],
68
+ providers: [],
69
+ bootstrap: [ AppComponent ]
70
+ })
71
+ export class AppModule {}
72
+ ```
73
+
74
+ ```
75
+ // configuring providers
76
+ import { ApiModule, Configuration, ConfigurationParameters } from '';
77
+
78
+ export function apiConfigFactory (): Configuration {
79
+ const params: ConfigurationParameters = {
80
+ // set configuration parameters here.
81
+ }
82
+ return new Configuration(params);
83
+ }
84
+
85
+ @NgModule({
86
+ imports: [ ApiModule.forRoot(apiConfigFactory) ],
87
+ declarations: [ AppComponent ],
88
+ providers: [],
89
+ bootstrap: [ AppComponent ]
90
+ })
91
+ export class AppModule {}
92
+ ```
93
+
94
+ ```
95
+ // configuring providers with an authentication service that manages your access tokens
96
+ import { ApiModule, Configuration } from '';
97
+
98
+ @NgModule({
99
+ imports: [ ApiModule ],
100
+ declarations: [ AppComponent ],
101
+ providers: [
102
+ {
103
+ provide: Configuration,
104
+ useFactory: (authService: AuthService) => new Configuration(
105
+ {
106
+ basePath: environment.apiUrl,
107
+ accessToken: authService.getAccessToken.bind(authService)
108
+ }
109
+ ),
110
+ deps: [AuthService],
111
+ multi: false
112
+ }
113
+ ],
114
+ bootstrap: [ AppComponent ]
115
+ })
116
+ export class AppModule {}
117
+ ```
118
+
119
+ ```
120
+ import { DefaultApi } from '';
121
+
122
+ export class AppComponent {
123
+ constructor(private apiGateway: DefaultApi) { }
124
+ }
125
+ ```
126
+
127
+ Note: The ApiModule is restricted to being instantiated once app wide.
128
+ This is to ensure that all services are treated as singletons.
129
+
130
+ #### Using multiple OpenAPI files / APIs / ApiModules
131
+ In order to use multiple `ApiModules` generated from different OpenAPI files,
132
+ you can create an alias name when importing the modules
133
+ in order to avoid naming conflicts:
134
+ ```
135
+ import { ApiModule } from 'my-api-path';
136
+ import { ApiModule as OtherApiModule } from 'my-other-api-path';
137
+ import { HttpClientModule } from '@angular/common/http';
138
+
139
+ @NgModule({
140
+ imports: [
141
+ ApiModule,
142
+ OtherApiModule,
143
+ // make sure to import the HttpClientModule in the AppModule only,
144
+ // see https://github.com/angular/angular/issues/20575
145
+ HttpClientModule
146
+ ]
147
+ })
148
+ export class AppModule {
149
+
150
+ }
151
+ ```
152
+
153
+
154
+ ### Set service base path
155
+ If different than the generated base path, during app bootstrap, you can provide the base path to your service.
156
+
157
+ ```
158
+ import { BASE_PATH } from '';
159
+
160
+ bootstrap(AppComponent, [
161
+ { provide: BASE_PATH, useValue: 'https://your-web-service.com' },
162
+ ]);
163
+ ```
164
+ or
165
+
166
+ ```
167
+ import { BASE_PATH } from '';
168
+
169
+ @NgModule({
170
+ imports: [],
171
+ declarations: [ AppComponent ],
172
+ providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ],
173
+ bootstrap: [ AppComponent ]
174
+ })
175
+ export class AppModule {}
176
+ ```
177
+
178
+
179
+ #### Using @angular/cli
180
+ First extend your `src/environments/*.ts` files by adding the corresponding base path:
181
+
182
+ ```
183
+ export const environment = {
184
+ production: false,
185
+ API_BASE_PATH: 'http://127.0.0.1:8080'
186
+ };
187
+ ```
188
+
189
+ In the src/app/app.module.ts:
190
+ ```
191
+ import { BASE_PATH } from '';
192
+ import { environment } from '../environments/environment';
193
+
194
+ @NgModule({
195
+ declarations: [
196
+ AppComponent
197
+ ],
198
+ imports: [ ],
199
+ providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }],
200
+ bootstrap: [ AppComponent ]
201
+ })
202
+ export class AppModule { }
203
+ ```
204
+
205
+ ### Customizing path parameter encoding
206
+
207
+ Without further customization, only [path-parameters][parameter-locations-url] of [style][style-values-url] 'simple'
208
+ and Dates for format 'date-time' are encoded correctly.
209
+
210
+ Other styles (e.g. "matrix") are not that easy to encode
211
+ and thus are best delegated to other libraries (e.g.: [@honoluluhenk/http-param-expander]).
212
+
213
+ To implement your own parameter encoding (or call another library),
214
+ pass an arrow-function or method-reference to the `encodeParam` property of the Configuration-object
215
+ (see [General Usage](#general-usage) above).
216
+
217
+ Example value for use in your Configuration-Provider:
218
+ ```typescript
219
+ new Configuration({
220
+ encodeParam: (param: Param) => myFancyParamEncoder(param),
221
+ })
222
+ ```
223
+
224
+ [parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations
225
+ [style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values
226
+ [@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander
@@ -1,13 +0,0 @@
1
- export const LayoutDirection = {
2
- Horizontal: 'horizontal',
3
- Vertical: 'vertical',
4
- };
5
- export const ComponentType = {
6
- Container: 'container',
7
- Form: 'form',
8
- Widget: 'widget',
9
- };
10
- export const ComponentWidgetType = {
11
- Grid: 'grid',
12
- };
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnQtY29tcG9uZW50LWxheW91dC5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NtYXJ0LW5nLWNsaWVudC9zcmMvbGliL3NtYXJ0LWNsaWVudC9zbWFydC1jb21wb25lbnQtbGF5b3V0L3NtYXJ0LWNvbXBvbmVudC1sYXlvdXQubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0JBLE1BQU0sQ0FBQyxNQUFNLGVBQWUsR0FBRztJQUM3QixVQUFVLEVBQUUsWUFBK0I7SUFDM0MsUUFBUSxFQUFFLFVBQTZCO0NBQ3hDLENBQUM7QUFJRixNQUFNLENBQUMsTUFBTSxhQUFhLEdBQUc7SUFDM0IsU0FBUyxFQUFFLFdBQTRCO0lBQ3ZDLElBQUksRUFBRSxNQUF1QjtJQUM3QixNQUFNLEVBQUUsUUFBeUI7Q0FDbEMsQ0FBQztBQUlGLE1BQU0sQ0FBQyxNQUFNLG1CQUFtQixHQUFHO0lBQ2pDLElBQUksRUFBRSxNQUE2QjtDQUNwQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU21hcnRXaWRnZXREZWZpbml0aW9uIH0gZnJvbSAnQHNtYXJ0Yml0NGFsbC9mb3JtJztcbmltcG9ydCB7IFNtYXJ0Q29tcG9uZW50QXBpQ2xpZW50IH0gZnJvbSAnLi4vc21hcnQtY29tcG9uZW50LWFwaS1jbGllbnQnO1xuXG5leHBvcnQgaW50ZXJmYWNlIFNtYXJ0Q29tcG9uZW50TGF5b3V0RGVmaW5pdGlvbiB7XG4gIHR5cGU6IENvbXBvbmVudFR5cGU7XG4gIGV4cGFuZGFibGU/OiBib29sZWFuO1xuICBkaXJlY3Rpb24/OiBMYXlvdXREaXJlY3Rpb247XG4gIHBhcmVudENvbXBvbmVudDogU21hcnRDb21wb25lbnRBcGlDbGllbnQ8YW55PjtcbiAgY29tcG9uZW50cz86IFNtYXJ0Q29tcG9uZW50TGF5b3V0RGVmaW5pdGlvbltdO1xuICB3aWRnZXQ/OiBTbWFydENvbXBvbmVudFdpZGdldERlZmluaXRpb247XG4gIGZvcm0/OiBTbWFydFdpZGdldERlZmluaXRpb25bXTtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBTbWFydENvbXBvbmVudFdpZGdldERlZmluaXRpb24ge1xuICB0eXBlOiBDb21wb25lbnRXaWRnZXRUeXBlO1xuICBncmlkSWRlbnRpZmllcj86IHN0cmluZztcbn1cblxuZXhwb3J0IHR5cGUgTGF5b3V0RGlyZWN0aW9uID0gJ2hvcml6b250YWwnIHwgJ3ZlcnRpY2FsJztcblxuZXhwb3J0IGNvbnN0IExheW91dERpcmVjdGlvbiA9IHtcbiAgSG9yaXpvbnRhbDogJ2hvcml6b250YWwnIGFzIExheW91dERpcmVjdGlvbixcbiAgVmVydGljYWw6ICd2ZXJ0aWNhbCcgYXMgTGF5b3V0RGlyZWN0aW9uLFxufTtcblxuZXhwb3J0IHR5cGUgQ29tcG9uZW50VHlwZSA9ICdjb250YWluZXInIHwgJ2Zvcm0nIHwgJ3dpZGdldCc7XG5cbmV4cG9ydCBjb25zdCBDb21wb25lbnRUeXBlID0ge1xuICBDb250YWluZXI6ICdjb250YWluZXInIGFzIENvbXBvbmVudFR5cGUsXG4gIEZvcm06ICdmb3JtJyBhcyBDb21wb25lbnRUeXBlLFxuICBXaWRnZXQ6ICd3aWRnZXQnIGFzIENvbXBvbmVudFR5cGUsXG59O1xuXG5leHBvcnQgdHlwZSBDb21wb25lbnRXaWRnZXRUeXBlID0gJ2dyaWQnO1xuXG5leHBvcnQgY29uc3QgQ29tcG9uZW50V2lkZ2V0VHlwZSA9IHtcbiAgR3JpZDogJ2dyaWQnIGFzIENvbXBvbmVudFdpZGdldFR5cGUsXG59O1xuIl19