@colijnit/sharedcomponents 1.0.3 → 1.0.6

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 (147) hide show
  1. package/.browserslistrc +16 -0
  2. package/.editorconfig +16 -0
  3. package/.vscode/extensions.json +4 -0
  4. package/.vscode/launch.json +20 -0
  5. package/.vscode/tasks.json +42 -0
  6. package/README.md +11 -8
  7. package/Sharedcomponents.iml +11 -0
  8. package/angular.json +133 -0
  9. package/colijnit-sharedcomponents-1.0.6.tgz +0 -0
  10. package/karma.conf.js +44 -0
  11. package/move-assets.js +14 -0
  12. package/package.json +70 -25
  13. package/projects/sharedcomponents/.browserslistrc +16 -0
  14. package/projects/sharedcomponents/README.md +24 -0
  15. package/projects/sharedcomponents/karma.conf.js +44 -0
  16. package/projects/sharedcomponents/ng-package.json +17 -0
  17. package/projects/sharedcomponents/package.json +15 -0
  18. package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +82 -0
  19. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_layout.scss +0 -0
  20. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
  21. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_theme.scss +0 -0
  22. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/material.scss +0 -0
  23. package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +50 -0
  24. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
  25. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
  26. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
  27. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/material.scss +0 -0
  28. package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +252 -0
  29. package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +22 -0
  30. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_layout.scss +0 -0
  31. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_material-definition.scss +0 -0
  32. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_theme.scss +0 -0
  33. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/material.scss +0 -0
  34. package/projects/sharedcomponents/src/lib/components/send-method-dialog/enums/send-option.ts +6 -0
  35. package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.component.ts +215 -0
  36. package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.module.ts +27 -0
  37. package/projects/sharedcomponents/src/lib/components/send-method-dialog/style/_layout.scss +186 -0
  38. package/projects/sharedcomponents/src/lib/components/send-method-dialog/style/_material-definition.scss +1 -0
  39. package/projects/sharedcomponents/src/lib/components/send-method-dialog/style/_theme.scss +7 -0
  40. package/{lib/components/stock → projects/sharedcomponents/src/lib/components/send-method-dialog}/style/material.scss +0 -0
  41. package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +59 -0
  42. package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +278 -0
  43. package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +82 -0
  44. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.ts +4 -0
  45. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +111 -0
  46. package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +78 -0
  47. package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +47 -0
  48. package/projects/sharedcomponents/src/lib/components/stock/style/_layout.scss +206 -0
  49. package/projects/sharedcomponents/src/lib/components/stock/style/_material-definition.scss +20 -0
  50. package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_theme.scss +0 -0
  51. package/{lib/components/stock/stock-transfer → projects/sharedcomponents/src/lib/components/stock}/style/material.scss +1 -1
  52. package/projects/sharedcomponents/src/lib/enum/icon.enum.ts +22 -0
  53. package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +120 -0
  54. package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +113 -0
  55. package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +61 -0
  56. package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +63 -0
  57. package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +41 -0
  58. package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +48 -0
  59. package/projects/sharedcomponents/src/lib/model/business-object.ts +85 -0
  60. package/projects/sharedcomponents/src/lib/model/icon-svg.ts +22 -0
  61. package/projects/sharedcomponents/src/lib/service/icon-cache.service.ts +51 -0
  62. package/projects/sharedcomponents/src/lib/service/ione-connector-adapter.service.ts +113 -0
  63. package/projects/sharedcomponents/src/lib/service/stock.service.ts +35 -0
  64. package/{lib → projects/sharedcomponents/src/lib}/style/_mixin.scss +0 -0
  65. package/{lib → projects/sharedcomponents/src/lib}/style/_variables.scss +0 -0
  66. package/projects/sharedcomponents/src/lib/utils/array-utils.ts +202 -0
  67. package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +4 -0
  68. package/{public-api.d.ts → projects/sharedcomponents/src/public-api.ts} +6 -0
  69. package/projects/sharedcomponents/src/test.ts +27 -0
  70. package/projects/sharedcomponents/tsconfig.lib.json +18 -0
  71. package/projects/sharedcomponents/tsconfig.lib.prod.json +10 -0
  72. package/projects/sharedcomponents/tsconfig.spec.json +17 -0
  73. package/src/app/app.component.scss +8 -0
  74. package/src/app/app.component.spec.ts +31 -0
  75. package/src/app/app.component.ts +97 -0
  76. package/src/app/app.module.ts +24 -0
  77. package/src/assets/.gitkeep +0 -0
  78. package/src/environments/environment.prod.ts +3 -0
  79. package/src/environments/environment.ts +16 -0
  80. package/src/favicon.ico +0 -0
  81. package/src/index.html +13 -0
  82. package/src/main.ts +12 -0
  83. package/src/polyfills.ts +53 -0
  84. package/src/styles.scss +28 -0
  85. package/src/test.ts +26 -0
  86. package/tsconfig.app.json +15 -0
  87. package/tsconfig.json +65 -0
  88. package/tsconfig.spec.json +18 -0
  89. package/bundles/colijnit-sharedcomponents.umd.js +0 -1825
  90. package/bundles/colijnit-sharedcomponents.umd.js.map +0 -1
  91. package/colijnit-sharedcomponents.d.ts +0 -12
  92. package/colijnit-sharedcomponents.metadata.json +0 -1
  93. package/esm2015/colijnit-sharedcomponents.js +0 -13
  94. package/esm2015/lib/components/docsign/component/signature/signature.component.js +0 -75
  95. package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +0 -44
  96. package/esm2015/lib/components/docsign/docsign.component.js +0 -225
  97. package/esm2015/lib/components/docsign/docsign.module.js +0 -23
  98. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +0 -54
  99. package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +0 -255
  100. package/esm2015/lib/components/stock/stock-location/stock-location.component.js +0 -62
  101. package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +0 -71
  102. package/esm2015/lib/components/stock/stock.component.js +0 -61
  103. package/esm2015/lib/components/stock/stock.module.js +0 -42
  104. package/esm2015/lib/factory/business-object-factory.js +0 -120
  105. package/esm2015/lib/factory/decorators/boolean.decorator.js +0 -102
  106. package/esm2015/lib/factory/decorators/complex-array.decorator.js +0 -55
  107. package/esm2015/lib/factory/decorators/complex-field.decorator.js +0 -57
  108. package/esm2015/lib/factory/decorators/date-field.decorator.js +0 -36
  109. package/esm2015/lib/factory/decorators/string-number.decorator.js +0 -43
  110. package/esm2015/lib/model/business-object.js +0 -81
  111. package/esm2015/lib/service/ione-connector-adapter.service.js +0 -47
  112. package/esm2015/lib/service/stock.service.js +0 -40
  113. package/esm2015/lib/utils/array-utils.js +0 -183
  114. package/esm2015/lib/utils/is-nill.function.js +0 -5
  115. package/esm2015/public-api.js +0 -8
  116. package/fesm2015/colijnit-sharedcomponents.js +0 -1649
  117. package/fesm2015/colijnit-sharedcomponents.js.map +0 -1
  118. package/lib/components/docsign/component/signature/signature.component.d.ts +0 -16
  119. package/lib/components/docsign/component/signatures/signatures.component.d.ts +0 -12
  120. package/lib/components/docsign/docsign.component.d.ts +0 -92
  121. package/lib/components/docsign/docsign.module.d.ts +0 -2
  122. package/lib/components/stock/stock-information/stock-information.component.d.ts +0 -7
  123. package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +0 -44
  124. package/lib/components/stock/stock-location/stock-location.component.d.ts +0 -12
  125. package/lib/components/stock/stock-location/style/_layout.scss +0 -11
  126. package/lib/components/stock/stock-location/style/_material-definition.scss +0 -1
  127. package/lib/components/stock/stock-location/style/_theme.scss +0 -18
  128. package/lib/components/stock/stock-location/style/material.scss +0 -4
  129. package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +0 -9
  130. package/lib/components/stock/stock-transfer/style/_layout.scss +0 -31
  131. package/lib/components/stock/stock-transfer/style/_material-definition.scss +0 -1
  132. package/lib/components/stock/stock-transfer/style/_theme.scss +0 -6
  133. package/lib/components/stock/stock.component.d.ts +0 -18
  134. package/lib/components/stock/stock.module.d.ts +0 -2
  135. package/lib/components/stock/style/_layout.scss +0 -146
  136. package/lib/components/stock/style/_material-definition.scss +0 -1
  137. package/lib/factory/business-object-factory.d.ts +0 -23
  138. package/lib/factory/decorators/boolean.decorator.d.ts +0 -43
  139. package/lib/factory/decorators/complex-array.decorator.d.ts +0 -25
  140. package/lib/factory/decorators/complex-field.decorator.d.ts +0 -25
  141. package/lib/factory/decorators/date-field.decorator.d.ts +0 -17
  142. package/lib/factory/decorators/string-number.decorator.d.ts +0 -22
  143. package/lib/model/business-object.d.ts +0 -7
  144. package/lib/service/ione-connector-adapter.service.d.ts +0 -11
  145. package/lib/service/stock.service.d.ts +0 -9
  146. package/lib/utils/array-utils.d.ts +0 -57
  147. package/lib/utils/is-nill.function.d.ts +0 -1
@@ -0,0 +1,111 @@
1
+ import {Component, EventEmitter, Input, Output, ViewEncapsulation} from "@angular/core";
2
+ import {PrintStockStickers} from "@colijnit/articleapi/build/model/print-stock-stickers";
3
+ import {StockService} from "../../../service/stock.service";
4
+ import {CoDropDownListFields} from "./co-drop-down-list-fields.interface";
5
+ import {Printer} from "@colijnit/sharedapi/build/model/printer.bo";
6
+
7
+ @Component({
8
+ selector: "co-stock-transfer",
9
+ template: `
10
+ <div class="stock-transfer">
11
+ <div class="stock-transfer-columns">
12
+ <div *ngIf="article" class="stock-transfer-left-column">
13
+ <co-input-text disabled
14
+ [(model)]="article.standardWareHouse.description"
15
+ [textContent]="article.standardWareHouse.description"
16
+ [placeholder]="'Standaard magazijn'">
17
+ </co-input-text>
18
+ <co-input-text disabled
19
+ [(model)]="article.standardLocation"
20
+ [textContent]="article.standardLocation"
21
+ [placeholder]="'Standaard locatie'">
22
+ </co-input-text>
23
+ <co-input-text disabled
24
+ [(model)]="stockSticker.batch"
25
+ [placeholder]="'Batch'">
26
+ </co-input-text>
27
+ <co-input-text disabled
28
+ [(model)]="stockSticker.serial"
29
+ [placeholder]="'Serie'">
30
+ </co-input-text>
31
+ <co-input-text
32
+ [(model)]="article.amount"
33
+ [placeholder]="'Aantal'">
34
+
35
+ </co-input-text>
36
+ </div>
37
+
38
+ <div class="stock-transfer-right-column">
39
+ <co-drop-down-list [collection]="allWarehouses"
40
+ [fields]="allWarehousesDropdownFields"
41
+ (modelChange)="handleSelectedWarehouse($event)"
42
+ >
43
+ </co-drop-down-list>
44
+ <co-drop-down-list>
45
+
46
+ </co-drop-down-list>
47
+ <co-input-text [placeholder]="'Voorraadstatus'">
48
+
49
+ </co-input-text>
50
+ <co-input-text [placeholder]="'Omschrijving'">
51
+
52
+ </co-input-text>
53
+ </div>
54
+ </div>
55
+
56
+ <div class="ok-cancel-buttons">
57
+ <co-button [textContent]="'Ok'" (click)="handleOkClick()"></co-button>
58
+ <co-button [textContent]="'Annuleren'" (click)="handleCancelClick()"></co-button>
59
+ <co-button [textContent]="'Sticker'" (click)="handleStickerClick()"></co-button>
60
+ </div>
61
+ </div>
62
+ `,
63
+ encapsulation: ViewEncapsulation.None
64
+ })
65
+ export class StockTransferComponent {
66
+
67
+ @Input()
68
+ public stockSticker: PrintStockStickers;
69
+
70
+ @Input()
71
+ public article: any;
72
+
73
+ @Input()
74
+ public articleWarehouse: any[];
75
+
76
+ @Input()
77
+ public allWarehouses: any[];
78
+
79
+ @Output()
80
+ public handleCancelClicked: EventEmitter<any> = new EventEmitter();
81
+
82
+ @Output()
83
+ public handleStickerClicked: EventEmitter<any> = new EventEmitter();
84
+
85
+ public allWarehousesDropdownFields: CoDropDownListFields = {value: "warehouseNo", text: "description"};
86
+
87
+ public showSendMethodDialog: boolean = false;
88
+
89
+ constructor(
90
+ private _stockService: StockService
91
+ ) {
92
+ }
93
+
94
+ public handleOkClick(): void {
95
+
96
+ }
97
+
98
+ public handleCancelClick(): void {
99
+ this.handleCancelClicked.emit();
100
+ }
101
+
102
+ public handleSelectedWarehouse(event): void {
103
+ console.log(event);
104
+ }
105
+
106
+ public async handleStickerClick(): Promise<void> {
107
+ this.handleStickerClicked.emit();
108
+ this.showSendMethodDialog = true;
109
+ }
110
+
111
+ }
@@ -0,0 +1,78 @@
1
+ import {Component, EventEmitter, HostBinding, Input, Output, ViewChild, ViewEncapsulation} from "@angular/core";
2
+ import {StockService} from "../../service/stock.service";
3
+ import {PrintStockStickers} from "@colijnit/articleapi/build/model/print-stock-stickers";
4
+
5
+ @Component({
6
+ selector: "co-stock",
7
+ template: `
8
+ <div class="stock-info-container">
9
+ <co-stock-information [article]="articleExtended"></co-stock-information>
10
+ <hr>
11
+ <co-stock-information-grid *ngIf="showStockInformationGrid" (transferIconClicked)="handleStockTransferClick($event)"></co-stock-information-grid>
12
+ <co-stock-location *ngIf="showStockLocation" (backToStockLines)="backToStockLinesClicked()"></co-stock-location>
13
+ <co-stock-transfer *ngIf="showStockTransfer"
14
+ (handleCancelClicked)="backToStock()"
15
+ [article]="articleExtended"
16
+ [stockSticker]="stockService.stockStickers"
17
+ (handleStickerClicked)="handleStickerClicked.emit($event)"
18
+ [articleWarehouse]="articleWarehouse"
19
+ [allWarehouses]="allWarehouses"
20
+ >
21
+ </co-stock-transfer>
22
+ </div>
23
+ `,
24
+ encapsulation: ViewEncapsulation.None
25
+ })
26
+ export class StockComponent {
27
+
28
+ @ViewChild(StockComponent)
29
+ public stock: StockComponent;
30
+
31
+ @Output()
32
+ public handleStickerClicked: EventEmitter<any> = new EventEmitter();
33
+
34
+ @Input()
35
+ public set options(value: any) {
36
+ this.stockService.connectConnector(value);
37
+ }
38
+
39
+ @Input()
40
+ public articleExtended: any;
41
+
42
+ @Input()
43
+ public articleWarehouse: any[];
44
+
45
+ @Input()
46
+ public allWarehouses: any[];
47
+
48
+ @HostBinding("class.co-stock")
49
+ public showClass() {
50
+ return true;
51
+ }
52
+
53
+ public showStockInformationGrid: boolean = true;
54
+ public showStockLocation: boolean = false;
55
+ public showStockTransfer: boolean = false;
56
+
57
+ constructor(
58
+ public stockService: StockService
59
+ ) {
60
+ }
61
+
62
+ public backToStockLinesClicked(): void {
63
+ this.showStockLocation = false;
64
+ this.showStockInformationGrid = true;
65
+ }
66
+
67
+ public handleStockTransferClick(event): void {
68
+ this.showStockTransfer = !this.showStockTransfer;
69
+ this.showStockInformationGrid = !this.showStockInformationGrid;
70
+ this.stockService.stockStickers = new PrintStockStickers();
71
+ }
72
+
73
+ public backToStock(): void {
74
+ this.showStockTransfer = !this.showStockTransfer;
75
+ this.showStockInformationGrid = !this.showStockInformationGrid;
76
+ }
77
+
78
+ }
@@ -0,0 +1,47 @@
1
+ import {NgModule} from "@angular/core";
2
+ import {StockComponent} from "./stock.component";
3
+ import {
4
+ ButtonModule,
5
+ CoGridModule,
6
+ DropDownModule, ImageModule,
7
+ InputComboBoxModule,
8
+ InputRadioButtonModule, InputTextModule, SimpleGridModule
9
+ } from "@colijnit/corecomponents_v12";
10
+ import {CommonModule} from "@angular/common";
11
+ import {StockInformationComponent} from "./stock-information/stock-information.component";
12
+ import {StockInformationGridComponent} from "./stock-information-grid/stock-information-grid.component";
13
+ import {StockLocationComponent} from "./stock-location/stock-location.component";
14
+ import {StockService} from "../../service/stock.service";
15
+ import {IoneConnectorAdapterService} from "../../service/ione-connector-adapter.service";
16
+ import {StockTransferComponent} from "./stock-transfer/stock-transfer.component";
17
+ import {SendMethodDialogModule} from "../send-method-dialog/send-method-dialog.module";
18
+
19
+ @NgModule({
20
+ imports: [
21
+ InputComboBoxModule,
22
+ CoGridModule,
23
+ ButtonModule,
24
+ CommonModule,
25
+ InputRadioButtonModule,
26
+ DropDownModule,
27
+ SimpleGridModule,
28
+ ImageModule,
29
+ InputTextModule,
30
+ SendMethodDialogModule
31
+ ],
32
+ declarations: [
33
+ StockComponent,
34
+ StockInformationComponent,
35
+ StockInformationGridComponent,
36
+ StockLocationComponent,
37
+ StockTransferComponent
38
+ ],
39
+ exports: [
40
+ StockComponent
41
+ ],
42
+ providers: [
43
+ StockService,
44
+ IoneConnectorAdapterService
45
+ ]
46
+ })
47
+ export class StockModule {}
@@ -0,0 +1,206 @@
1
+ @import "../../../style/mixin";
2
+
3
+ @include export-module('co-stock-layout') {
4
+ .co-stock {
5
+
6
+ .stock-info-container {
7
+ max-width: $sc-stock-info-container-width;
8
+ padding: $sc-stock-info-container-padding;
9
+ }
10
+
11
+ .stock-info {
12
+ margin-top: $sc-stock-info-margin;
13
+ padding: $sc-stock-info-padding;
14
+ display: inline-flex;
15
+ width: 90%;
16
+ justify-content: space-between;
17
+ }
18
+
19
+ .stock-info-row {
20
+ display: inline-flex;
21
+ }
22
+
23
+ .stock-info-row-image {
24
+ display: inline-flex;
25
+ gap: $sc-stock-gap;
26
+ }
27
+
28
+ .stock-image {
29
+ height: $sc-stock-image-height;
30
+ }
31
+
32
+ .stock-good-info {
33
+ display: block;
34
+ }
35
+
36
+ .stock-status {
37
+ display: grid;
38
+ gap: $sc-stock-gap;
39
+ }
40
+
41
+ .stock-info > div:not(:first-child) {
42
+ padding: 0 10px;
43
+ border-left: $sc-stock-border-left;
44
+ }
45
+
46
+ .stock-line {
47
+ font-weight: $sc-stock-line-font-weight;
48
+ margin: $sc-stock-line-margin;
49
+ }
50
+
51
+ .simple-grid-column-header-wrapper {
52
+ font-size: $sc-stock-simple-grid-header-fontsize;
53
+ display: flex;
54
+ flex-direction: row;
55
+ background-color: white;
56
+ border-bottom: $sc-stock-simple-grid-column-header-wrapper-border-bottom;
57
+ }
58
+
59
+ .simple-grid-column-header {
60
+ display: flex;
61
+ flex-direction: row;
62
+ padding-right: 5px;
63
+ flex-basis: 100%;
64
+ }
65
+
66
+ .simple-grid-row {
67
+ font-size: $sc-stock-simple-grid-row-fontsize;
68
+ display: flex;
69
+ flex-direction: row;
70
+ border: $sc-stock-simple-grid-row-border;
71
+ border-bottom: $sc-stock-simple-grid-row-border-bottom;
72
+ }
73
+
74
+ .simple-grid-column-cell {
75
+ display: flex;
76
+ padding: $sc-stock-simple-grid-column-cell-padding;
77
+ flex-basis: 100%;
78
+ }
79
+
80
+ .stock-lines-button {
81
+ margin-bottom: 5%;
82
+ }
83
+
84
+ .tab-link {
85
+ gap: 30px;
86
+ padding: 20px 20px;
87
+ &.hide {
88
+ display: none;
89
+ }
90
+
91
+ &.show {
92
+ display: flex;
93
+ }
94
+ flex-direction: row;
95
+ }
96
+
97
+ .tab-link > div {
98
+ margin: 25px 0;
99
+ padding-right: 10px;
100
+
101
+ &.inactive {
102
+ font-weight: normal;
103
+ }
104
+ }
105
+
106
+ .stock-grid {
107
+ margin: $sc-stock-grid-margin;
108
+ }
109
+
110
+ .buttons-wrapper {
111
+ display: flex;
112
+ }
113
+
114
+ .dropdown-wrapper {
115
+ display: flex;
116
+ float: right;
117
+ max-width: 20%;
118
+ }
119
+
120
+ .stock-location-group {
121
+ margin-bottom: 20px;
122
+ display: flex;
123
+ }
124
+
125
+ .stock-location-left-group {
126
+ float: left;
127
+ display: flex;
128
+ flex: 1;
129
+ justify-content: flex-start;
130
+ }
131
+
132
+ .stock-location-right-group {
133
+ float: right;
134
+ display: flex;
135
+ flex: 1;
136
+ justify-content: flex-end;
137
+ }
138
+
139
+ .stock-button-toolbar {
140
+ display: flex;
141
+ justify-content: space-between;
142
+ margin: 10px;
143
+ }
144
+
145
+ .stock-button-left-group {
146
+ display: flex;
147
+ flex: 1;
148
+ justify-content: flex-start;
149
+
150
+ .co-button {
151
+ margin-right: 10px;
152
+ width: 100px;
153
+ }
154
+ }
155
+ .stock-button-middle-group {
156
+ display: flex;
157
+ flex: 1;
158
+ margin-top: 10px;
159
+ }
160
+
161
+ .stock-transfer-right-column {
162
+ display: flex;
163
+ flex-direction: column;
164
+ width: 25%;
165
+ float: right;
166
+ }
167
+
168
+ .stock-transfer-left-column {
169
+ display: flex;
170
+ flex-direction: column;
171
+ width: 25%;
172
+ float: left;
173
+ }
174
+
175
+ .ok-cancel-buttons {
176
+ display: flex;
177
+ width: 100%;
178
+ justify-content: center;
179
+ padding: 25px;
180
+ }
181
+
182
+ .stock-transfer-columns {
183
+ display: flex;
184
+ width: 100%;
185
+ justify-content: space-around;
186
+ }
187
+
188
+ .tab-link-buttons {
189
+ cursor: $sc-stock-tab-link-buttons-pointer;
190
+ }
191
+
192
+ .active {
193
+ color: $sc-color-action;
194
+ }
195
+
196
+ .stock-button-back {
197
+ color: $sc-color-action;
198
+ cursor: pointer;
199
+ }
200
+
201
+ .drop-list-group {
202
+ height: $sc-stock-grid-height;
203
+ overflow-y: $sc-stock-grid-overflow-y;
204
+ }
205
+ }
206
+ }
@@ -0,0 +1,20 @@
1
+ $sc-stock-info-margin: 10px !default;
2
+ $sc-stock-info-padding: 0 10px !default;
3
+ $sc-stock-gap: 10px !default;
4
+ $sc-stock-border-left: solid 1px lightgray !default;
5
+ $sc-stock-line-margin: 10px 0 20px 0 !default;
6
+ $sc-stock-line-font-weight: bold !default;
7
+ $sc-stock-simple-grid-header-fontsize: 14px !default;
8
+ $sc-stock-simple-grid-row-fontsize: 12px !default;
9
+ $sc-stock-simple-grid-row-border-bottom: 1px solid black !default;
10
+ $sc-stock-simple-grid-row-border: none !default;
11
+ $sc-stock-simple-grid-column-cell-padding: 10px 5px !default;
12
+ $sc-stock-tab-link-buttons-active-color: $sc-color-action !default;
13
+ $sc-stock-tab-link-buttons-pointer: pointer !default;
14
+ $sc-stock-grid-margin: 50px 0 0 0 !default;
15
+ $sc-stock-simple-grid-column-header-wrapper-border-bottom: 1px solid black !default;
16
+ $sc-stock-info-container-width: 100% !default;
17
+ $sc-stock-info-container-padding: 0px !default;
18
+ $sc-stock-image-height: 50px !default;
19
+ $sc-stock-grid-height: 300px !default;
20
+ $sc-stock-grid-overflow-y: auto !default;
@@ -1,4 +1,4 @@
1
- @import "../../../../style/variables";
1
+ @import "../../../style/variables";
2
2
  @import "./material-definition";
3
3
  @import "./layout";
4
4
  @import "./theme";
@@ -0,0 +1,22 @@
1
+ /** AUTO GENERATED FILE. DO NOT CHANGE.. OR YOU WILL SUFFER THE CONSEQUENCES OF YOUR ACTIONS **/
2
+
3
+ export enum Icon {
4
+ ArrowFatRight = "arrow_fat_right",
5
+ ArrowPointDown = "arrow_point_down",
6
+ ArrowPointLeft = "arrow_point_left",
7
+ ArrowPointRight = "arrow_point_right",
8
+ CalendarDay = "calendar_day",
9
+ Cancel = "cancel",
10
+ DeliveryTruck = "delivery_truck",
11
+ EditPencil = "edit_pencil",
12
+ Email = "email",
13
+ Pdf = "pdf",
14
+ PlusRound = "plus_round",
15
+ Print = "print",
16
+ SignatureField = "signature_field",
17
+ Tag = "tag",
18
+ ThickLines = "thick_lines",
19
+ ThinLines = "thin_lines",
20
+ Txt = "txt",
21
+ Xml = "xml"
22
+ }
@@ -0,0 +1,120 @@
1
+ import {ComplexFieldDecorator} from "./decorators/complex-field.decorator";
2
+ import {ComplexArrayDecorator} from "./decorators/complex-array.decorator";
3
+ import {BooleanTextDecorator} from "./decorators/boolean.decorator";
4
+ import {DateFieldFieldDecorator} from "./decorators/date-field.decorator";
5
+ import {StringNumberDecorator} from "./decorators/string-number.decorator";
6
+ import {isNill} from "../utils/is-nill.function";
7
+ import {ArrayUtils} from "../utils/array-utils";
8
+ import {BusinessObject} from "../model/business-object";
9
+
10
+ // Factory service creates businessobjects, using their decorators in the process.
11
+ export class BusinessObjectFactory {
12
+ constructor() {
13
+ }
14
+
15
+ /**
16
+ * Creates and returns a new business data object instance of given class, with all given data properties applied to it in a
17
+ * complex-aware style. That is, all properties on given class that are decorated with @ComplexField(..) or @ComplexArray(..) decorators
18
+ * become strongly typed business objects, with methods that are usable and such.
19
+ *
20
+ * @param modelClass
21
+ * @param {Object} rawData The object with all (possibly raw/flat/not alive) data to be applied to the created model object
22
+ */
23
+ public makeWithRawBackendData(modelClass: any, rawData: Object): BusinessObject {
24
+ if (!modelClass) {
25
+ return undefined;
26
+ }
27
+ if (typeof modelClass !== typeof BusinessObject) {
28
+ return undefined;
29
+ }
30
+
31
+ const model: BusinessObject = new modelClass();
32
+ this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
33
+ return model;
34
+ }
35
+
36
+ // see makeWithRawBackendData, this is a loop-wrapper around that method
37
+ public makeBOArrayFromRawBackendDataArray(modelClass: any, arrayOfRawDatas: Object[]): BusinessObject[] {
38
+ if (!modelClass) {
39
+ return undefined;
40
+ }
41
+
42
+ const trueClientBos: BusinessObject[] = [];
43
+ if (arrayOfRawDatas) {
44
+ for (let i: number = 0, len: number = arrayOfRawDatas.length; i < len; i++) {
45
+ trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
46
+ }
47
+ }
48
+ return trueClientBos;
49
+ }
50
+
51
+ public instantiateNewBo(modelClass: any): BusinessObject {
52
+ return this.makeWithRawBackendData(modelClass, {});
53
+ }
54
+
55
+ /**
56
+ * Applies all properties of given 'source' object to the given 'destination' businessobject, if destination has that property.
57
+ * Works with the @ComplexField(), @ComplexArray, @BooleanText, @CoInject and @DateField annotations of given destination model.
58
+ *
59
+ * @param sourceData Raw data to copy to destination model
60
+ * @param {BusinessObject} destinationModel InOut: The annotated businessobject to apply source properties to
61
+ */
62
+ private _copyAllPropertiesDecoratorProcessedFrom(sourceData: any, destinationModel: BusinessObject): void {
63
+ if (!sourceData || !destinationModel) {
64
+ return;
65
+ }
66
+
67
+ // process all source data into destinationModel
68
+ for (const srcPropKey in sourceData) {
69
+ if (!sourceData.hasOwnProperty(srcPropKey)) {
70
+ continue;
71
+ }
72
+
73
+ const srcPropVal: any = sourceData[srcPropKey];
74
+
75
+ if (ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
76
+ const classOfField: any = ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
77
+ destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
78
+ } else if (ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
79
+ const sourceArray: any[] = srcPropVal;
80
+ if (!sourceArray) {
81
+ continue;
82
+ }
83
+ const classOfArrayItems: any = ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
84
+ const tempArray: any[] = [];
85
+ for (let i: number = 0, len: number = sourceArray.length; i < len; i++) {
86
+ tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
87
+ }
88
+ destinationModel[srcPropKey] = tempArray;
89
+ } else if (BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
90
+ // logical 'true' and 'false' also allowed as incoming values for @BooleanText() properties: then just copy their value
91
+ if (typeof srcPropVal === "boolean") {
92
+ destinationModel[srcPropKey] = srcPropVal;
93
+ // here, it should be a 'J' or 'N' (or 'T' or 'F'): assign the associated boolean value
94
+ } else {
95
+ destinationModel[srcPropKey] = BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
96
+ }
97
+ } else if (DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
98
+ destinationModel[srcPropKey] = DateFieldFieldDecorator.StringAsDate(srcPropVal);
99
+ } else if (StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
100
+ destinationModel[srcPropKey] = StringNumberDecorator.StringAsNumber(srcPropVal);
101
+ }
102
+ // non-decorated prop
103
+ else {
104
+ if (isNill(srcPropVal)) {
105
+ destinationModel[srcPropKey] = undefined;
106
+ } else if (Array.isArray(srcPropVal)) {
107
+ destinationModel[srcPropKey] = ArrayUtils.CloneArray(srcPropVal);
108
+ } else if (typeof srcPropVal === "object") {
109
+ if (srcPropVal instanceof Map) { //just copy the value in case of maps
110
+ destinationModel[srcPropKey] = srcPropVal;
111
+ } else {
112
+ destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
113
+ }
114
+ } else {
115
+ destinationModel[srcPropKey] = srcPropVal;
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }