@smartbit4all/ng-client 3.3.198 → 3.3.200

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 (163) hide show
  1. package/esm2020/lib/session/api/api/session.service.mjs +1 -1
  2. package/esm2020/lib/session/api/encoder.mjs +1 -1
  3. package/esm2020/lib/session/api/model/accountInfo.mjs +1 -1
  4. package/esm2020/lib/session/api/model/apiError.mjs +1 -1
  5. package/esm2020/lib/session/api/model/authenticationProviderData.mjs +1 -1
  6. package/esm2020/lib/session/api/model/getAuthenticationProvidersResponse.mjs +1 -1
  7. package/esm2020/lib/session/api/model/models.mjs +1 -1
  8. package/esm2020/lib/session/api/model/refreshSessionRequest.mjs +1 -1
  9. package/esm2020/lib/session/api/model/session.mjs +1 -1
  10. package/esm2020/lib/session/api/model/userActivityLog.mjs +1 -1
  11. package/esm2020/lib/session/api/param.mjs +1 -1
  12. package/esm2020/lib/session/api/variables.mjs +1 -1
  13. package/esm2020/lib/smart-component-layout/api/api/api.mjs +1 -1
  14. package/esm2020/lib/smart-component-layout/api/api/default.service.mjs +1 -1
  15. package/esm2020/lib/smart-component-layout/api/api.module.mjs +1 -1
  16. package/esm2020/lib/smart-component-layout/api/configuration.mjs +1 -1
  17. package/esm2020/lib/smart-component-layout/api/encoder.mjs +1 -1
  18. package/esm2020/lib/smart-component-layout/api/index.mjs +1 -1
  19. package/esm2020/lib/smart-component-layout/api/model/componentType.mjs +1 -1
  20. package/esm2020/lib/smart-component-layout/api/model/componentWidgetType.mjs +1 -1
  21. package/esm2020/lib/smart-component-layout/api/model/layoutDirection.mjs +1 -1
  22. package/esm2020/lib/smart-component-layout/api/model/models.mjs +1 -1
  23. package/esm2020/lib/smart-component-layout/api/model/smartComponentLayoutDefinition.mjs +1 -1
  24. package/esm2020/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.mjs +1 -1
  25. package/esm2020/lib/smart-component-layout/api/param.mjs +1 -1
  26. package/esm2020/lib/smart-component-layout/api/variables.mjs +1 -1
  27. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.mjs +1 -1
  28. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderField.mjs +1 -1
  29. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.mjs +1 -1
  30. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.mjs +1 -1
  31. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionData.mjs +1 -1
  32. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionDataType.mjs +1 -1
  33. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldList.mjs +1 -1
  34. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.mjs +1 -1
  35. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionList.mjs +1 -1
  36. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperandData.mjs +1 -1
  37. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperation.mjs +1 -1
  38. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOrderBy.mjs +1 -1
  39. package/esm2020/lib/smart-filter-editor/api/api/filter.service.mjs +1 -1
  40. package/esm2020/lib/smart-filter-editor/api/configuration.mjs +1 -1
  41. package/esm2020/lib/smart-filter-editor/api/encoder.mjs +1 -1
  42. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBoolOperator.mjs +1 -1
  43. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderApiConfig.mjs +1 -1
  44. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderField.mjs +1 -1
  45. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderGroup.mjs +1 -1
  46. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderModel.mjs +1 -1
  47. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderUiModel.mjs +1 -1
  48. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionData.mjs +1 -1
  49. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionDataType.mjs +1 -1
  50. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldEditor.mjs +1 -1
  51. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldList.mjs +1 -1
  52. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.mjs +1 -1
  53. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionList.mjs +1 -1
  54. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperandData.mjs +1 -1
  55. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperation.mjs +1 -1
  56. package/esm2020/lib/smart-filter-editor/api/model/smartFilterType.mjs +1 -1
  57. package/esm2020/lib/smart-filter-editor/api/param.mjs +1 -1
  58. package/esm2020/lib/smart-filter-editor/api/variables.mjs +1 -1
  59. package/esm2020/lib/smart-form/api/api/api.mjs +1 -1
  60. package/esm2020/lib/smart-form/api/api/default.service.mjs +1 -1
  61. package/esm2020/lib/smart-form/api/api.module.mjs +1 -1
  62. package/esm2020/lib/smart-form/api/configuration.mjs +1 -1
  63. package/esm2020/lib/smart-form/api/encoder.mjs +1 -1
  64. package/esm2020/lib/smart-form/api/index.mjs +1 -1
  65. package/esm2020/lib/smart-form/api/model/models.mjs +1 -1
  66. package/esm2020/lib/smart-form/api/model/propertyMapping.mjs +1 -1
  67. package/esm2020/lib/smart-form/api/model/selectionDefinition.mjs +1 -1
  68. package/esm2020/lib/smart-form/api/model/smartFormWidgetDirection.mjs +1 -1
  69. package/esm2020/lib/smart-form/api/model/smartFormWidgetType.mjs +1 -1
  70. package/esm2020/lib/smart-form/api/model/smartLayoutDefinition.mjs +1 -1
  71. package/esm2020/lib/smart-form/api/model/smartWidgetHint.mjs +1 -1
  72. package/esm2020/lib/smart-form/api/model/valueChangeMode.mjs +1 -1
  73. package/esm2020/lib/smart-form/api/param.mjs +1 -1
  74. package/esm2020/lib/smart-form/api/variables.mjs +1 -1
  75. package/esm2020/lib/smart-grid/api/grid-api/model/gridColumnMeta.mjs +1 -1
  76. package/esm2020/lib/smart-table/components/default-actions-popup/default-actions-popup.component.mjs +20 -15
  77. package/esm2020/lib/smart-table/directives/mat-context-menu-trigger-for.directive.mjs +52 -0
  78. package/esm2020/lib/smart-table/smarttable.module.mjs +5 -2
  79. package/esm2020/lib/smart-table/tables/material-table/material-table.component.mjs +3 -3
  80. package/esm2020/lib/smart-table/tables/mobile-table/mobile-table.component.mjs +3 -3
  81. package/esm2020/lib/smart-table/tables/table.mjs +10 -8
  82. package/esm2020/lib/smart-tree/tree-api/api/tree.service.mjs +1 -1
  83. package/esm2020/lib/smart-tree/tree-api/configuration.mjs +1 -1
  84. package/esm2020/lib/smart-tree/tree-api/encoder.mjs +1 -1
  85. package/esm2020/lib/smart-tree/tree-api/param.mjs +1 -1
  86. package/esm2020/lib/smart-tree/tree-api/variables.mjs +1 -1
  87. package/esm2020/lib/view-context/api/api/api.mjs +1 -1
  88. package/esm2020/lib/view-context/api/api/view.service.mjs +1 -1
  89. package/esm2020/lib/view-context/api/api.module.mjs +1 -1
  90. package/esm2020/lib/view-context/api/configuration.mjs +1 -1
  91. package/esm2020/lib/view-context/api/encoder.mjs +1 -1
  92. package/esm2020/lib/view-context/api/index.mjs +1 -1
  93. package/esm2020/lib/view-context/api/model/closeResult.mjs +1 -1
  94. package/esm2020/lib/view-context/api/model/componentConstraint.mjs +1 -1
  95. package/esm2020/lib/view-context/api/model/componentModel.mjs +1 -1
  96. package/esm2020/lib/view-context/api/model/componentModelChange.mjs +1 -1
  97. package/esm2020/lib/view-context/api/model/dataChange.mjs +1 -1
  98. package/esm2020/lib/view-context/api/model/dataChangeEvent.mjs +1 -1
  99. package/esm2020/lib/view-context/api/model/dataChangeKind.mjs +1 -1
  100. package/esm2020/lib/view-context/api/model/downloadedFile.mjs +1 -1
  101. package/esm2020/lib/view-context/api/model/iconPosition.mjs +1 -1
  102. package/esm2020/lib/view-context/api/model/imageResource.mjs +1 -1
  103. package/esm2020/lib/view-context/api/model/link.mjs +1 -1
  104. package/esm2020/lib/view-context/api/model/messageData.mjs +1 -1
  105. package/esm2020/lib/view-context/api/model/messageOption.mjs +1 -1
  106. package/esm2020/lib/view-context/api/model/messageOptionType.mjs +1 -1
  107. package/esm2020/lib/view-context/api/model/messageResult.mjs +1 -1
  108. package/esm2020/lib/view-context/api/model/messageTextType.mjs +1 -1
  109. package/esm2020/lib/view-context/api/model/messageType.mjs +1 -1
  110. package/esm2020/lib/view-context/api/model/models.mjs +1 -1
  111. package/esm2020/lib/view-context/api/model/openPendingData.mjs +1 -1
  112. package/esm2020/lib/view-context/api/model/serverRequestExecutionStat.mjs +1 -1
  113. package/esm2020/lib/view-context/api/model/serverRequestTrack.mjs +1 -1
  114. package/esm2020/lib/view-context/api/model/serverRequestType.mjs +1 -1
  115. package/esm2020/lib/view-context/api/model/smartLinkData.mjs +1 -1
  116. package/esm2020/lib/view-context/api/model/statisticRecord.mjs +1 -1
  117. package/esm2020/lib/view-context/api/model/style.mjs +1 -1
  118. package/esm2020/lib/view-context/api/model/uiAction.mjs +1 -1
  119. package/esm2020/lib/view-context/api/model/uiActionButtonDescriptor.mjs +1 -1
  120. package/esm2020/lib/view-context/api/model/uiActionButtonType.mjs +1 -1
  121. package/esm2020/lib/view-context/api/model/uiActionConstraint.mjs +1 -1
  122. package/esm2020/lib/view-context/api/model/uiActionDescriptor.mjs +1 -1
  123. package/esm2020/lib/view-context/api/model/uiActionDialogDescriptor.mjs +1 -1
  124. package/esm2020/lib/view-context/api/model/uiActionFeedbackType.mjs +1 -1
  125. package/esm2020/lib/view-context/api/model/uiActionInputType.mjs +1 -1
  126. package/esm2020/lib/view-context/api/model/uiActionRequest.mjs +1 -1
  127. package/esm2020/lib/view-context/api/model/uiActionTooltip.mjs +1 -1
  128. package/esm2020/lib/view-context/api/model/uiActionUploadDescriptor.mjs +1 -1
  129. package/esm2020/lib/view-context/api/model/valueSet.mjs +1 -1
  130. package/esm2020/lib/view-context/api/model/view.mjs +1 -1
  131. package/esm2020/lib/view-context/api/model/viewApiError.mjs +1 -1
  132. package/esm2020/lib/view-context/api/model/viewConstraint.mjs +1 -1
  133. package/esm2020/lib/view-context/api/model/viewContext.mjs +1 -1
  134. package/esm2020/lib/view-context/api/model/viewContextChange.mjs +1 -1
  135. package/esm2020/lib/view-context/api/model/viewContextData.mjs +1 -1
  136. package/esm2020/lib/view-context/api/model/viewContextUpdate.mjs +1 -1
  137. package/esm2020/lib/view-context/api/model/viewData.mjs +1 -1
  138. package/esm2020/lib/view-context/api/model/viewState.mjs +1 -1
  139. package/esm2020/lib/view-context/api/model/viewStateUpdate.mjs +1 -1
  140. package/esm2020/lib/view-context/api/model/viewType.mjs +1 -1
  141. package/esm2020/lib/view-context/api/param.mjs +1 -1
  142. package/esm2020/lib/view-context/api/variables.mjs +1 -1
  143. package/esm2020/lib/view-context/smart-ui-action/ui-action.descriptor.service.mjs +4 -1
  144. package/esm2020/lib/view-context/value-api/model/genericValue.mjs +1 -1
  145. package/esm2020/lib/view-context/value-api/model/models.mjs +1 -1
  146. package/esm2020/lib/view-context/value-api/model/valueSetDefinitionIdentifier.mjs +1 -1
  147. package/fesm2015/smartbit4all-ng-client.mjs +87 -32
  148. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  149. package/fesm2020/smartbit4all-ng-client.mjs +89 -31
  150. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  151. package/lib/smart-table/components/default-actions-popup/default-actions-popup.component.d.ts +10 -6
  152. package/lib/smart-table/directives/mat-context-menu-trigger-for.directive.d.ts +10 -0
  153. package/lib/smart-table/smarttable.module.d.ts +18 -17
  154. package/lib/smart-table/tables/table.d.ts +4 -4
  155. package/package.json +1 -1
  156. package/smartbit4all-ng-client-3.3.200.tgz +0 -0
  157. package/src/lib/session/api/README.md +226 -226
  158. package/src/lib/smart-component-layout/api/README.md +226 -226
  159. package/src/lib/smart-filter-editor/api/README.md +226 -226
  160. package/src/lib/smart-form/api/README.md +226 -226
  161. package/src/lib/smart-tree/tree-api/README.md +226 -226
  162. package/src/lib/view-context/api/README.md +226 -226
  163. package/smartbit4all-ng-client-3.3.198.tgz +0 -0
@@ -1,15 +1,19 @@
1
- import { MatMenuTrigger } from '@angular/material/menu';
2
1
  import { SmartTableButton, SmartTableButtonType } from '../../smarttable.model';
3
2
  import { GridRow } from '../../../smart-grid/api/grid-api/model/models';
3
+ import { UiAction } from '../../../view-context/api/model/models';
4
+ import { MatContextMenuTriggerForDirective } from '../../directives/mat-context-menu-trigger-for.directive';
5
+ import { KeyValue } from '@angular/common';
4
6
  import * as i0 from "@angular/core";
5
7
  export declare class DefaultActionsPopupComponent {
6
- trigger: MatMenuTrigger;
8
+ trigger: MatContextMenuTriggerForDirective;
7
9
  readonly ACTION_SEPERATOR = SmartTableButtonType.SEPARATOR;
8
- buttons: SmartTableButton[];
10
+ buttons: Map<SmartTableButton, UiAction>;
9
11
  row: GridRow;
12
+ colIdx?: number;
13
+ smartTableButtonType: typeof SmartTableButtonType;
10
14
  constructor();
11
- openDefaultActionsMenu(): void;
12
- defaultActionButtonClicked(button: SmartTableButton): void;
15
+ openDefaultActionsMenu(e: MouseEvent): void;
16
+ defaultActionButtonClicked(button: KeyValue<SmartTableButton, UiAction>): void;
13
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DefaultActionsPopupComponent, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<DefaultActionsPopupComponent, "lib-default-actions-popup", never, { "buttons": "buttons"; "row": "row"; }, {}, never, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<DefaultActionsPopupComponent, "lib-default-actions-popup", never, { "buttons": "buttons"; "row": "row"; "colIdx": "colIdx"; }, {}, never, never>;
15
19
  }
@@ -0,0 +1,10 @@
1
+ import { MatMenuPanel, _MatMenuTriggerBase } from '@angular/material/menu';
2
+ import * as i0 from "@angular/core";
3
+ export declare class MatContextMenuTriggerForDirective extends _MatMenuTriggerBase {
4
+ lastMouseEvent: MouseEvent | null;
5
+ get menu_again(): MatMenuPanel;
6
+ set menu_again(menu: MatMenuPanel);
7
+ ngAfterContentInit(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatContextMenuTriggerForDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatContextMenuTriggerForDirective, "[matContextMenuTriggerFor]", ["matContextMenuTriggerDirective"], { "menu_again": "matContextMenuTriggerFor"; }, {}, never>;
10
+ }
@@ -4,24 +4,25 @@ import * as i2 from "./components/loading/loading.component";
4
4
  import * as i3 from "./tables/material-table/material-table.component";
5
5
  import * as i4 from "./tables/mobile-table/mobile-table.component";
6
6
  import * as i5 from "./components/default-actions-popup/default-actions-popup.component";
7
- import * as i6 from "../shared/shared.module";
8
- import * as i7 from "@angular/platform-browser";
9
- import * as i8 from "@angular/material/core";
10
- import * as i9 from "@angular/forms";
11
- import * as i10 from "@angular/material/form-field";
12
- import * as i11 from "@angular/material/checkbox";
13
- import * as i12 from "@angular/material/button";
14
- import * as i13 from "@angular/material/table";
15
- import * as i14 from "@angular/material/icon";
16
- import * as i15 from "@angular/material/menu";
17
- import * as i16 from "@angular/material/progress-spinner";
18
- import * as i17 from "../component-factory-service/component-factory-service.module";
19
- import * as i18 from "../smart-icon/smart-icon.module";
20
- import * as i19 from "@angular/material/divider";
21
- import * as i20 from "@angular/material/tooltip";
22
- import * as i21 from "@angular/common";
7
+ import * as i6 from "./directives/mat-context-menu-trigger-for.directive";
8
+ import * as i7 from "../shared/shared.module";
9
+ import * as i8 from "@angular/platform-browser";
10
+ import * as i9 from "@angular/material/core";
11
+ import * as i10 from "@angular/forms";
12
+ import * as i11 from "@angular/material/form-field";
13
+ import * as i12 from "@angular/material/checkbox";
14
+ import * as i13 from "@angular/material/button";
15
+ import * as i14 from "@angular/material/table";
16
+ import * as i15 from "@angular/material/icon";
17
+ import * as i16 from "@angular/material/menu";
18
+ import * as i17 from "@angular/material/progress-spinner";
19
+ import * as i18 from "../component-factory-service/component-factory-service.module";
20
+ import * as i19 from "../smart-icon/smart-icon.module";
21
+ import * as i20 from "@angular/material/divider";
22
+ import * as i21 from "@angular/material/tooltip";
23
+ import * as i22 from "@angular/common";
23
24
  export declare class SmarttableModule {
24
25
  static ɵfac: i0.ɵɵFactoryDeclaration<SmarttableModule, never>;
25
- static ɵmod: i0.ɵɵNgModuleDeclaration<SmarttableModule, [typeof i1.SmarttableComponent, typeof i2.LoadingComponent, typeof i3.MaterialTableComponent, typeof i4.MobileTableComponent, typeof i5.DefaultActionsPopupComponent], [typeof i6.SharedModule, typeof i7.BrowserModule, typeof i8.MatCommonModule, typeof i9.FormsModule, typeof i9.ReactiveFormsModule, typeof i10.MatFormFieldModule, typeof i11.MatCheckboxModule, typeof i12.MatButtonModule, typeof i13.MatTableModule, typeof i14.MatIconModule, typeof i15.MatMenuModule, typeof i16.MatProgressSpinnerModule, typeof i17.ComponentFactoryServiceModule, typeof i18.SmartIconModule, typeof i19.MatDividerModule, typeof i20.MatTooltipModule, typeof i21.CommonModule, typeof i6.SharedModule], [typeof i1.SmarttableComponent]>;
26
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmarttableModule, [typeof i1.SmarttableComponent, typeof i2.LoadingComponent, typeof i3.MaterialTableComponent, typeof i4.MobileTableComponent, typeof i5.DefaultActionsPopupComponent, typeof i6.MatContextMenuTriggerForDirective], [typeof i7.SharedModule, typeof i8.BrowserModule, typeof i9.MatCommonModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.MatFormFieldModule, typeof i12.MatCheckboxModule, typeof i13.MatButtonModule, typeof i14.MatTableModule, typeof i15.MatIconModule, typeof i16.MatMenuModule, typeof i17.MatProgressSpinnerModule, typeof i18.ComponentFactoryServiceModule, typeof i19.SmartIconModule, typeof i20.MatDividerModule, typeof i21.MatTooltipModule, typeof i22.CommonModule, typeof i7.SharedModule], [typeof i1.SmarttableComponent]>;
26
27
  static ɵinj: i0.ɵɵInjectorDeclaration<SmarttableModule>;
27
28
  }
@@ -4,7 +4,7 @@ import { MatMenuTrigger } from '@angular/material/menu';
4
4
  import { MatTable } from '@angular/material/table';
5
5
  import { Subject } from 'rxjs';
6
6
  import { ComponentFactoryService } from '../../component-factory-service/projects';
7
- import { ImageResource, UiActionTooltip } from '../../view-context/api/model/models';
7
+ import { ImageResource, UiAction, UiActionTooltip } from '../../view-context/api/model/models';
8
8
  import { DefaultActionsPopupComponent } from '../components/default-actions-popup/default-actions-popup.component';
9
9
  import { SmartTable, SmartTableButton, SmartTableButtonType, SmartTableHeader, SmartTableHeaderPropertyType, SmartTableOptionButtonDirection, SmartTableType } from '../smarttable.model';
10
10
  import * as i0 from "@angular/core";
@@ -32,7 +32,7 @@ export declare class Table implements OnInit, OnDestroy {
32
32
  handleOnRowClick(element: any): void;
33
33
  updateSmartTable(smartTable: SmartTable<any>): void;
34
34
  renderRows(): void;
35
- handleOnRowDoubleClick(element: any): void;
35
+ handleOnRowDoubleClick(event: any, element: any): void;
36
36
  type(): typeof SmartTableHeaderPropertyType;
37
37
  sortButtonClicked(event: any, header: SmartTableHeader): void;
38
38
  customButtonClicked(event: any, button: SmartTableButton, element: any, btn?: any, close?: boolean): void;
@@ -78,8 +78,8 @@ export declare class Table implements OnInit, OnDestroy {
78
78
  getImageResourceIcon(element: any, header: string): any;
79
79
  getImageResourceColor(element: any, header: string): any;
80
80
  getImageResourceStyle(resource: ImageResource): any;
81
- openDefaultActionsMenu(row: any): void;
82
- getDefaultActionsForRow(element: any): SmartTableButton[] | undefined;
81
+ openDefaultActionsMenu(event: any, row: any): void;
82
+ getDefaultActionsForRow(element: any): Map<SmartTableButton, UiAction> | undefined;
83
83
  static ɵfac: i0.ɵɵFactoryDeclaration<Table, never>;
84
84
  static ɵcmp: i0.ɵɵComponentDeclaration<Table, "ng-component", never, { "smartTable": "smartTable"; }, {}, never, never>;
85
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "3.3.198",
3
+ "version": "3.3.200",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^13.3.9",
6
6
  "@angular/common": "^13.2.0",
@@ -1,226 +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
+ ## @
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