@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
@@ -1,1825 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/animations'), require('pdf-lib'), require('pdfjs-dist/legacy/build/pdf'), require('pdfjs-dist/build/pdf.worker.entry'), require('@angular/common'), require('signature_pad'), require('@colijnit/articleapi/build/articles'), require('@colijnit/articleapi/build/utils/function/not-nill.function'), require('@colijnit/articleapi/build/utils/object-utils'), require('@colijnit/articleapi/build/enum/yes-no-db-type.enum'), require('@colijnit/articleapi/build/enum/true-false-db-type.enum'), require('@colijnit/articleapi/build/enum/one-zero-bool-db-type.enum'), require('@colijnit/articleapi/build/enum/db-boolean-value-type.enum'), require('@colijnit/articleapi/build/utils/date-utils'), require('@colijnit/articleapi/build/utils/number-utils'), require('@colijnit/articleapi/build/utils/function/is-nill.function'), require('@colijnit/articleapi/build/factory/decorators/map-property.decorator'), require('@colijnit/articleapi/build/factory/decorators/boolean.decorator'), require('@colijnit/articleapi/build/factory/decorators/json.decorator'), require('@colijnit/articleapi/build/factory/decorators/complex-array.decorator'), require('@colijnit/corecomponents_v12')) :
3
- typeof define === 'function' && define.amd ? define('@colijnit/sharedcomponents', ['exports', '@angular/core', '@angular/animations', 'pdf-lib', 'pdfjs-dist/legacy/build/pdf', 'pdfjs-dist/build/pdf.worker.entry', '@angular/common', 'signature_pad', '@colijnit/articleapi/build/articles', '@colijnit/articleapi/build/utils/function/not-nill.function', '@colijnit/articleapi/build/utils/object-utils', '@colijnit/articleapi/build/enum/yes-no-db-type.enum', '@colijnit/articleapi/build/enum/true-false-db-type.enum', '@colijnit/articleapi/build/enum/one-zero-bool-db-type.enum', '@colijnit/articleapi/build/enum/db-boolean-value-type.enum', '@colijnit/articleapi/build/utils/date-utils', '@colijnit/articleapi/build/utils/number-utils', '@colijnit/articleapi/build/utils/function/is-nill.function', '@colijnit/articleapi/build/factory/decorators/map-property.decorator', '@colijnit/articleapi/build/factory/decorators/boolean.decorator', '@colijnit/articleapi/build/factory/decorators/json.decorator', '@colijnit/articleapi/build/factory/decorators/complex-array.decorator', '@colijnit/corecomponents_v12'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.sharedcomponents = {}), global.ng.core, global.ng.animations, global.pdfLib, global.PDFJS, global.pdfjsWorker, global.ng.common, global.SignaturePad, global.articles, global.notNill_function, global.objectUtils, global.yesNoDbType_enum, global.trueFalseDbType_enum, global.oneZeroBoolDbType_enum, global.dbBooleanValueType_enum, global.dateUtils, global.numberUtils, global.isNill_function, global.mapProperty_decorator, global.boolean_decorator, global.json_decorator, global.complexArray_decorator, global.corecomponents_v12));
5
- })(this, (function (exports, i0, animations, pdfLib, PDFJS, pdfjsWorker, common, SignaturePad, articles, notNill_function, objectUtils, yesNoDbType_enum, trueFalseDbType_enum, oneZeroBoolDbType_enum, dbBooleanValueType_enum, dateUtils, numberUtils, isNill_function, mapProperty_decorator, boolean_decorator, json_decorator, complexArray_decorator, corecomponents_v12) { 'use strict';
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n["default"] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var PDFJS__namespace = /*#__PURE__*/_interopNamespace(PDFJS);
29
- var pdfjsWorker__default = /*#__PURE__*/_interopDefaultLegacy(pdfjsWorker);
30
- var SignaturePad__default = /*#__PURE__*/_interopDefaultLegacy(SignaturePad);
31
-
32
- /*! *****************************************************************************
33
- Copyright (c) Microsoft Corporation.
34
-
35
- Permission to use, copy, modify, and/or distribute this software for any
36
- purpose with or without fee is hereby granted.
37
-
38
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
39
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
40
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
41
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
42
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
- PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
46
- /* global Reflect, Promise */
47
- var extendStatics = function (d, b) {
48
- extendStatics = Object.setPrototypeOf ||
49
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50
- function (d, b) { for (var p in b)
51
- if (Object.prototype.hasOwnProperty.call(b, p))
52
- d[p] = b[p]; };
53
- return extendStatics(d, b);
54
- };
55
- function __extends(d, b) {
56
- if (typeof b !== "function" && b !== null)
57
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
58
- extendStatics(d, b);
59
- function __() { this.constructor = d; }
60
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61
- }
62
- var __assign = function () {
63
- __assign = Object.assign || function __assign(t) {
64
- for (var s, i = 1, n = arguments.length; i < n; i++) {
65
- s = arguments[i];
66
- for (var p in s)
67
- if (Object.prototype.hasOwnProperty.call(s, p))
68
- t[p] = s[p];
69
- }
70
- return t;
71
- };
72
- return __assign.apply(this, arguments);
73
- };
74
- function __rest(s, e) {
75
- var t = {};
76
- for (var p in s)
77
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
78
- t[p] = s[p];
79
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
80
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
81
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
82
- t[p[i]] = s[p[i]];
83
- }
84
- return t;
85
- }
86
- function __decorate(decorators, target, key, desc) {
87
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
88
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
89
- r = Reflect.decorate(decorators, target, key, desc);
90
- else
91
- for (var i = decorators.length - 1; i >= 0; i--)
92
- if (d = decorators[i])
93
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
94
- return c > 3 && r && Object.defineProperty(target, key, r), r;
95
- }
96
- function __param(paramIndex, decorator) {
97
- return function (target, key) { decorator(target, key, paramIndex); };
98
- }
99
- function __metadata(metadataKey, metadataValue) {
100
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
101
- return Reflect.metadata(metadataKey, metadataValue);
102
- }
103
- function __awaiter(thisArg, _arguments, P, generator) {
104
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
105
- return new (P || (P = Promise))(function (resolve, reject) {
106
- function fulfilled(value) { try {
107
- step(generator.next(value));
108
- }
109
- catch (e) {
110
- reject(e);
111
- } }
112
- function rejected(value) { try {
113
- step(generator["throw"](value));
114
- }
115
- catch (e) {
116
- reject(e);
117
- } }
118
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
119
- step((generator = generator.apply(thisArg, _arguments || [])).next());
120
- });
121
- }
122
- function __generator(thisArg, body) {
123
- var _ = { label: 0, sent: function () { if (t[0] & 1)
124
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
125
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
126
- function verb(n) { return function (v) { return step([n, v]); }; }
127
- function step(op) {
128
- if (f)
129
- throw new TypeError("Generator is already executing.");
130
- while (_)
131
- try {
132
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
133
- return t;
134
- if (y = 0, t)
135
- op = [op[0] & 2, t.value];
136
- switch (op[0]) {
137
- case 0:
138
- case 1:
139
- t = op;
140
- break;
141
- case 4:
142
- _.label++;
143
- return { value: op[1], done: false };
144
- case 5:
145
- _.label++;
146
- y = op[1];
147
- op = [0];
148
- continue;
149
- case 7:
150
- op = _.ops.pop();
151
- _.trys.pop();
152
- continue;
153
- default:
154
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
155
- _ = 0;
156
- continue;
157
- }
158
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
159
- _.label = op[1];
160
- break;
161
- }
162
- if (op[0] === 6 && _.label < t[1]) {
163
- _.label = t[1];
164
- t = op;
165
- break;
166
- }
167
- if (t && _.label < t[2]) {
168
- _.label = t[2];
169
- _.ops.push(op);
170
- break;
171
- }
172
- if (t[2])
173
- _.ops.pop();
174
- _.trys.pop();
175
- continue;
176
- }
177
- op = body.call(thisArg, _);
178
- }
179
- catch (e) {
180
- op = [6, e];
181
- y = 0;
182
- }
183
- finally {
184
- f = t = 0;
185
- }
186
- if (op[0] & 5)
187
- throw op[1];
188
- return { value: op[0] ? op[1] : void 0, done: true };
189
- }
190
- }
191
- var __createBinding = Object.create ? (function (o, m, k, k2) {
192
- if (k2 === undefined)
193
- k2 = k;
194
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
195
- }) : (function (o, m, k, k2) {
196
- if (k2 === undefined)
197
- k2 = k;
198
- o[k2] = m[k];
199
- });
200
- function __exportStar(m, o) {
201
- for (var p in m)
202
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
203
- __createBinding(o, m, p);
204
- }
205
- function __values(o) {
206
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
207
- if (m)
208
- return m.call(o);
209
- if (o && typeof o.length === "number")
210
- return {
211
- next: function () {
212
- if (o && i >= o.length)
213
- o = void 0;
214
- return { value: o && o[i++], done: !o };
215
- }
216
- };
217
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
218
- }
219
- function __read(o, n) {
220
- var m = typeof Symbol === "function" && o[Symbol.iterator];
221
- if (!m)
222
- return o;
223
- var i = m.call(o), r, ar = [], e;
224
- try {
225
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
226
- ar.push(r.value);
227
- }
228
- catch (error) {
229
- e = { error: error };
230
- }
231
- finally {
232
- try {
233
- if (r && !r.done && (m = i["return"]))
234
- m.call(i);
235
- }
236
- finally {
237
- if (e)
238
- throw e.error;
239
- }
240
- }
241
- return ar;
242
- }
243
- /** @deprecated */
244
- function __spread() {
245
- for (var ar = [], i = 0; i < arguments.length; i++)
246
- ar = ar.concat(__read(arguments[i]));
247
- return ar;
248
- }
249
- /** @deprecated */
250
- function __spreadArrays() {
251
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
252
- s += arguments[i].length;
253
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
254
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
255
- r[k] = a[j];
256
- return r;
257
- }
258
- function __spreadArray(to, from, pack) {
259
- if (pack || arguments.length === 2)
260
- for (var i = 0, l = from.length, ar; i < l; i++) {
261
- if (ar || !(i in from)) {
262
- if (!ar)
263
- ar = Array.prototype.slice.call(from, 0, i);
264
- ar[i] = from[i];
265
- }
266
- }
267
- return to.concat(ar || Array.prototype.slice.call(from));
268
- }
269
- function __await(v) {
270
- return this instanceof __await ? (this.v = v, this) : new __await(v);
271
- }
272
- function __asyncGenerator(thisArg, _arguments, generator) {
273
- if (!Symbol.asyncIterator)
274
- throw new TypeError("Symbol.asyncIterator is not defined.");
275
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
276
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
277
- function verb(n) { if (g[n])
278
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
279
- function resume(n, v) { try {
280
- step(g[n](v));
281
- }
282
- catch (e) {
283
- settle(q[0][3], e);
284
- } }
285
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
286
- function fulfill(value) { resume("next", value); }
287
- function reject(value) { resume("throw", value); }
288
- function settle(f, v) { if (f(v), q.shift(), q.length)
289
- resume(q[0][0], q[0][1]); }
290
- }
291
- function __asyncDelegator(o) {
292
- var i, p;
293
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
294
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
295
- }
296
- function __asyncValues(o) {
297
- if (!Symbol.asyncIterator)
298
- throw new TypeError("Symbol.asyncIterator is not defined.");
299
- var m = o[Symbol.asyncIterator], i;
300
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
301
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
302
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
303
- }
304
- function __makeTemplateObject(cooked, raw) {
305
- if (Object.defineProperty) {
306
- Object.defineProperty(cooked, "raw", { value: raw });
307
- }
308
- else {
309
- cooked.raw = raw;
310
- }
311
- return cooked;
312
- }
313
- ;
314
- var __setModuleDefault = Object.create ? (function (o, v) {
315
- Object.defineProperty(o, "default", { enumerable: true, value: v });
316
- }) : function (o, v) {
317
- o["default"] = v;
318
- };
319
- function __importStar(mod) {
320
- if (mod && mod.__esModule)
321
- return mod;
322
- var result = {};
323
- if (mod != null)
324
- for (var k in mod)
325
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
326
- __createBinding(result, mod, k);
327
- __setModuleDefault(result, mod);
328
- return result;
329
- }
330
- function __importDefault(mod) {
331
- return (mod && mod.__esModule) ? mod : { default: mod };
332
- }
333
- function __classPrivateFieldGet(receiver, state, kind, f) {
334
- if (kind === "a" && !f)
335
- throw new TypeError("Private accessor was defined without a getter");
336
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
337
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
338
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
339
- }
340
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
341
- if (kind === "m")
342
- throw new TypeError("Private method is not writable");
343
- if (kind === "a" && !f)
344
- throw new TypeError("Private accessor was defined without a setter");
345
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
346
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
347
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
348
- }
349
-
350
- var DocsignComponent = /** @class */ (function () {
351
- function DocsignComponent() {
352
- this.saveButtonLabel = 'SAVE';
353
- this.clearButtonLabel = 'CLEAR';
354
- this.signDocumentButtonLabel = 'SIGN_DOCUMENT';
355
- this.cancelButtonLabel = 'CANCEL';
356
- this.pdfSaved = new i0.EventEmitter();
357
- this.cancelClick = new i0.EventEmitter();
358
- this.showSignaturePopup = false;
359
- this.showSigBuyer = false;
360
- this.showSigSeller = false;
361
- this.showSignatures = false;
362
- }
363
- Object.defineProperty(DocsignComponent.prototype, "pdf", {
364
- get: function () {
365
- return this._pdf;
366
- },
367
- /**
368
- * Load an existing [[PDFDocument]]. The input data can be provided in
369
- * multiple formats:
370
- *
371
- * | Type | Contents |
372
- * | ------------- | ------------------------------------------------------ |
373
- * | `string` | A base64 encoded string (or data URI) containing a PDF |
374
- * | `Uint8Array` | The raw bytes of a PDF |
375
- * | `ArrayBuffer` | The raw bytes of a PDF |
376
- *
377
- * For example:
378
- * ```js
379
- * import { PDFDocument } from 'pdf-lib'
380
- *
381
- * // pdf=string
382
- * const base64 =
383
- * 'JVBERi0xLjcKJYGBgYEKCjUgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbm' +
384
- * 'd0aCAxMDQKPj4Kc3RyZWFtCniccwrhMlAAwaJ0Ln2P1Jyy1JLM5ERdc0MjCwUjE4WQNC4Q' +
385
- * '6cNlCFZkqGCqYGSqEJLLZWNuYGZiZmbkYuZsZmlmZGRgZmluDCQNzc3NTM2NzdzMXMxMjQ' +
386
- * 'ztFEKyuEK0uFxDuAAOERdVCmVuZHN0cmVhbQplbmRvYmoKCjYgMCBvYmoKPDwKL0ZpbHRl' +
387
- * 'ciAvRmxhdGVEZWNvZGUKL1R5cGUgL09ialN0bQovTiA0Ci9GaXJzdCAyMAovTGVuZ3RoID' +
388
- * 'IxNQo+PgpzdHJlYW0KeJxVj9GqwjAMhu/zFHkBzTo3nCCCiiKIHPEICuJF3cKoSCu2E8/b' +
389
- * '20wPIr1p8v9/8kVhgilmGfawX2CGaVrgcAi0/bsy0lrX7IGWpvJ4iJYEN3gEmrrGBlQwGs' +
390
- * 'HHO9VBX1wNrxAqMX87RBD5xpJuddqwd82tjAHxzV1U5LPgy52DKXWnr1Lheg+j/c/pzGVr' +
391
- * 'iqV0VlwZPXGPCJjElw/ybkwUmeoWgxesDXGhHJC/D/iikp1Av80ptKU0FdBEe25pPihAM1' +
392
- * 'u6ytgaaWfs2Hrz35CJT1+EWmAKZW5kc3RyZWFtCmVuZG9iagoKNyAwIG9iago8PAovU2l6' +
393
- * 'ZSA4Ci9Sb290IDIgMCBSCi9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9UeXBlIC9YUmVmCi9MZW' +
394
- * '5ndGggMzgKL1cgWyAxIDIgMiBdCi9JbmRleCBbIDAgOCBdCj4+CnN0cmVhbQp4nBXEwREA' +
395
- * 'EBAEsCwz3vrvRmOOyyOoGhZdutHN2MT55fIAVocD+AplbmRzdHJlYW0KZW5kb2JqCgpzdG' +
396
- * 'FydHhyZWYKNTEwCiUlRU9G'
397
- *
398
- * const dataUri = 'data:application/pdf;base64,' + base64
399
- *
400
- * const pdfDoc1 = await PDFDocument.load(base64)
401
- * const pdfDoc2 = await PDFDocument.load(dataUri)
402
- *
403
- * // pdf=Uint8Array
404
- * import fs from 'fs'
405
- * const uint8Array = fs.readFileSync('with_update_sections.pdf')
406
- * const pdfDoc3 = await PDFDocument.load(uint8Array)
407
- *
408
- * // pdf=ArrayBuffer
409
- * const url = 'https://pdf-lib.js.org/assets/with_update_sections.pdf'
410
- * const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())
411
- * const pdfDoc4 = await PDFDocument.load(arrayBuffer)
412
- *
413
- * ```
414
- *
415
- * @param pdf The input data containing a PDF document.
416
- * @param options The options to be used when loading the document.
417
- * @returns Resolves with a document loaded from the input.
418
- */
419
- set: function (value) {
420
- if (value) {
421
- this._pdf = value;
422
- this._openPDF();
423
- }
424
- },
425
- enumerable: false,
426
- configurable: true
427
- });
428
- DocsignComponent.prototype.showClass = function () {
429
- return true;
430
- };
431
- DocsignComponent.prototype.saveFirstSignature = function (sig) {
432
- this._saveSignature(sig, this.sigBuyerPosition);
433
- this.showSigBuyer = false;
434
- this._savePdf();
435
- };
436
- DocsignComponent.prototype.saveSecondSignature = function (sig) {
437
- this._saveSignature(sig, this.sigSellerPosition);
438
- this.showSigSeller = false;
439
- this._savePdf();
440
- };
441
- DocsignComponent.prototype._openPDF = function () {
442
- return __awaiter(this, void 0, void 0, function () {
443
- var _a, pdfDataUri;
444
- return __generator(this, function (_b) {
445
- switch (_b.label) {
446
- case 0:
447
- // first create reader to check signatures
448
- this._checkSignatures();
449
- _a = this;
450
- return [4 /*yield*/, pdfLib.PDFDocument.load(this._pdf, {
451
- updateMetadata: false
452
- })];
453
- case 1:
454
- _a.pdfDoc = _b.sent();
455
- return [4 /*yield*/, this.pdfDoc.saveAsBase64({ dataUri: true })];
456
- case 2:
457
- pdfDataUri = _b.sent();
458
- this.iframe.nativeElement.src = pdfDataUri;
459
- return [2 /*return*/];
460
- }
461
- });
462
- });
463
- };
464
- DocsignComponent.prototype._savePdf = function () {
465
- return __awaiter(this, void 0, void 0, function () {
466
- var result;
467
- return __generator(this, function (_a) {
468
- switch (_a.label) {
469
- case 0:
470
- if (!(!this.showSigBuyer && !this.showSigSeller)) return [3 /*break*/, 2];
471
- return [4 /*yield*/, this.pdfDoc.saveAsBase64()];
472
- case 1:
473
- result = _a.sent();
474
- this.pdfSaved.next(result);
475
- _a.label = 2;
476
- case 2: return [2 /*return*/];
477
- }
478
- });
479
- });
480
- };
481
- DocsignComponent.prototype._checkSignatures = function () {
482
- return __awaiter(this, void 0, void 0, function () {
483
- var pdfWorkerSrc, pdfReader, numPages, i, page, text;
484
- return __generator(this, function (_a) {
485
- switch (_a.label) {
486
- case 0:
487
- if (window.hasOwnProperty('pdfWorkerSrc') &&
488
- typeof window.pdfWorkerSrc === 'string' &&
489
- window.pdfWorkerSrc) {
490
- pdfWorkerSrc = window.pdfWorkerSrc;
491
- }
492
- else {
493
- pdfWorkerSrc = pdfjsWorker__default["default"];
494
- }
495
- PDFJS__namespace.GlobalWorkerOptions.workerSrc = pdfWorkerSrc;
496
- return [4 /*yield*/, PDFJS__namespace.getDocument(this._pdf).promise];
497
- case 1:
498
- pdfReader = _a.sent();
499
- numPages = pdfReader.numPages;
500
- i = 0;
501
- _a.label = 2;
502
- case 2:
503
- if (!(i < numPages)) return [3 /*break*/, 6];
504
- return [4 /*yield*/, pdfReader.getPage(1)];
505
- case 3:
506
- page = _a.sent();
507
- return [4 /*yield*/, page.getTextContent()];
508
- case 4:
509
- text = _a.sent();
510
- page.cleanup();
511
- if (this.firstSignatureField) {
512
- this.sigBuyerPosition = this._getPositionSignature(text, this.firstSignatureField);
513
- if (this.sigBuyerPosition.width > 0 && this.sigBuyerPosition.height > 0) {
514
- this.sigBuyerPosition.page = i;
515
- this.showSigBuyer = true;
516
- }
517
- }
518
- if (this.secondSignatureField) {
519
- this.sigSellerPosition = this._getPositionSignature(text, this.secondSignatureField);
520
- if (this.sigSellerPosition.width > 0 && this.sigSellerPosition.height > 0) {
521
- this.sigSellerPosition.page = i;
522
- this.showSigSeller = true;
523
- }
524
- }
525
- _a.label = 5;
526
- case 5:
527
- i++;
528
- return [3 /*break*/, 2];
529
- case 6: return [2 /*return*/];
530
- }
531
- });
532
- });
533
- };
534
- DocsignComponent.prototype._getPositionSignature = function (textItem, signatureField) {
535
- var sigItem = textItem.items.find(function (i) { return i.str.toLowerCase() === signatureField.toLowerCase(); });
536
- if (sigItem) {
537
- textItem.items.slice(textItem.items.indexOf(sigItem), 1);
538
- return {
539
- x: sigItem.transform[4],
540
- y: sigItem.transform[5],
541
- width: sigItem.width,
542
- height: sigItem.height,
543
- page: 0
544
- };
545
- }
546
- return { x: 0, y: 0, width: 0, height: 0, page: 0 };
547
- };
548
- DocsignComponent.prototype._saveSignature = function (sig, dimensions) {
549
- return __awaiter(this, void 0, void 0, function () {
550
- var jpgImage, page;
551
- return __generator(this, function (_a) {
552
- switch (_a.label) {
553
- case 0: return [4 /*yield*/, this.pdfDoc.embedPng(sig)];
554
- case 1:
555
- jpgImage = _a.sent();
556
- return [4 /*yield*/, this.pdfDoc.getPage(dimensions.page)];
557
- case 2:
558
- page = _a.sent();
559
- page.drawImage(jpgImage, {
560
- x: ((dimensions.x + (dimensions.width / 2)) - (200 / 2)),
561
- y: ((dimensions.y + (dimensions.height / 2)) - (100 / 2)),
562
- width: 200,
563
- height: 100
564
- });
565
- return [2 /*return*/];
566
- }
567
- });
568
- });
569
- };
570
- return DocsignComponent;
571
- }());
572
- DocsignComponent.decorators = [
573
- { type: i0.Component, args: [{
574
- selector: "ione-docsign",
575
- template: "\n <iframe #iframe></iframe>\n <ione-signatures *ngIf=\"showSignatures\" @showHideSignature\n [showFirstSignature]=\"showSigBuyer\"\n [firstSignatureTitle]=\"firstSignatureLabel\"\n [showSecondSignature]=\"showSigSeller\"\n [secondSignatureTitle]=\"secondSignatureLabel\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (saveFirstSignature)=\"saveFirstSignature($event)\"\n (saveSecondSignature)=\"saveSecondSignature($event)\"\n ></ione-signatures>\n <input type=\"button\" *ngIf=\"(showSigBuyer || showSigSeller) && !showSignatures\" class=\"button button-sign-document\"\n [value]=\"signDocumentButtonLabel\"\n (click)=\"showSignatures = true\"\n />\n <input type=\"button\" class=\"button button-cancel\"\n [value]=\"cancelButtonLabel\"\n (click)=\"cancelClick.emit($event)\"\n />\n ",
576
- animations: [
577
- animations.trigger("showHideSignature", [
578
- animations.state("void", animations.style({ transform: "translate(-50%, -50%) scale(0)" })),
579
- animations.state("*", animations.style({ transform: "translate(-50%, -50%) scale(1)" })),
580
- animations.transition("void <=> *", animations.animate("200ms ease-in-out")),
581
- ])
582
- ],
583
- encapsulation: i0.ViewEncapsulation.None
584
- },] }
585
- ];
586
- DocsignComponent.propDecorators = {
587
- iframe: [{ type: i0.ViewChild, args: ["iframe", { read: i0.ElementRef },] }],
588
- pdf: [{ type: i0.Input }],
589
- firstSignatureLabel: [{ type: i0.Input }],
590
- firstSignatureField: [{ type: i0.Input }],
591
- secondSignatureLabel: [{ type: i0.Input }],
592
- secondSignatureField: [{ type: i0.Input }],
593
- saveButtonLabel: [{ type: i0.Input }],
594
- clearButtonLabel: [{ type: i0.Input }],
595
- signDocumentButtonLabel: [{ type: i0.Input }],
596
- cancelButtonLabel: [{ type: i0.Input }],
597
- pdfSaved: [{ type: i0.Output }],
598
- cancelClick: [{ type: i0.Output }],
599
- showClass: [{ type: i0.HostBinding, args: ['class.ione-docsign',] }]
600
- };
601
-
602
- var SignatureComponent = /** @class */ (function () {
603
- function SignatureComponent() {
604
- this.saveButtonLabel = 'SAVE';
605
- this.clearButtonLabel = 'CLEAR';
606
- this.save = new i0.EventEmitter();
607
- }
608
- Object.defineProperty(SignatureComponent.prototype, "content", {
609
- set: function (content) {
610
- if (content) {
611
- this.signatureCanvas = content;
612
- this._initCanvas();
613
- }
614
- },
615
- enumerable: false,
616
- configurable: true
617
- });
618
- SignatureComponent.prototype.showClass = function () {
619
- return true;
620
- };
621
- SignatureComponent.prototype.handleSave = function (event) {
622
- // save canvas as svg
623
- // const sig: string = this.signature.toDataURL("image/svg+xml");
624
- var sig = this.signature.toDataURL("image/png");
625
- // emit signature string
626
- this.save.next(sig);
627
- };
628
- SignatureComponent.prototype.handleClear = function (event) {
629
- if (this.signature) {
630
- this.signature.clear();
631
- }
632
- };
633
- SignatureComponent.prototype._initCanvas = function () {
634
- var _this = this;
635
- if (this.signatureCanvas && this.signatureCanvas.nativeElement) {
636
- this.signature = new SignaturePad__default["default"](this.signatureCanvas.nativeElement);
637
- setTimeout(function () {
638
- _this._resizeSignatureCanvas(_this.signature, _this.signatureCanvas);
639
- });
640
- }
641
- };
642
- SignatureComponent.prototype._resizeSignatureCanvas = function (signature, signatureCanvas) {
643
- var imageBeforeResize = signature.toDataURL();
644
- var ratio = Math.max(window.devicePixelRatio || 1, 1);
645
- signatureCanvas.nativeElement.width = signatureCanvas.nativeElement.offsetWidth * ratio;
646
- signatureCanvas.nativeElement.height = signatureCanvas.nativeElement.offsetHeight * ratio;
647
- signatureCanvas.nativeElement.getContext("2d").scale(ratio, ratio);
648
- signature.fromDataURL(imageBeforeResize);
649
- };
650
- return SignatureComponent;
651
- }());
652
- SignatureComponent.decorators = [
653
- { type: i0.Component, args: [{
654
- selector: "ione-signature",
655
- template: "\n <div class=\"signature-wrapper\">\n <div class=\"signature-header\">\n <span *ngIf=\"title\" class=\"title\" [textContent]=\"title\"></span>\n <div class=\"button-wrapper\">\n <input type=\"button\" (click)=\"handleSave($event)\" [value]=\"saveButtonLabel\"/>\n <input type=\"button\" (click)=\"handleClear($event)\" [value]=\"clearButtonLabel\">\n </div>\n </div>\n <div class=\"canvas\">\n <canvas #signature></canvas>\n </div>\n </div>\n ",
656
- encapsulation: i0.ViewEncapsulation.None
657
- },] }
658
- ];
659
- SignatureComponent.propDecorators = {
660
- content: [{ type: i0.ViewChild, args: ["signature", { read: i0.ElementRef },] }],
661
- title: [{ type: i0.Input }],
662
- saveButtonLabel: [{ type: i0.Input }],
663
- clearButtonLabel: [{ type: i0.Input }],
664
- save: [{ type: i0.Output }],
665
- showClass: [{ type: i0.HostBinding, args: ["class.ione-signature",] }]
666
- };
667
-
668
- var SignaturesComponent = /** @class */ (function () {
669
- function SignaturesComponent() {
670
- this.showFirstSignature = false;
671
- this.showSecondSignature = false;
672
- this.saveButtonLabel = 'SAVE';
673
- this.clearButtonLabel = 'CLEAR';
674
- this.saveFirstSignature = new i0.EventEmitter();
675
- this.saveSecondSignature = new i0.EventEmitter();
676
- }
677
- SignaturesComponent.prototype.showClass = function () {
678
- return true;
679
- };
680
- return SignaturesComponent;
681
- }());
682
- SignaturesComponent.decorators = [
683
- { type: i0.Component, args: [{
684
- selector: "ione-signatures",
685
- template: "\n <ione-signature *ngIf=\"showFirstSignature\"\n [title]=\"firstSignatureTitle\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (save)=\"saveFirstSignature.emit($event)\"></ione-signature>\n <ione-signature *ngIf=\"showSecondSignature\"\n [title]=\"secondSignatureTitle\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (save)=\"saveSecondSignature.emit($event)\"></ione-signature>\n ",
686
- encapsulation: i0.ViewEncapsulation.None
687
- },] }
688
- ];
689
- SignaturesComponent.propDecorators = {
690
- showFirstSignature: [{ type: i0.Input }],
691
- firstSignatureTitle: [{ type: i0.Input }],
692
- showSecondSignature: [{ type: i0.Input }],
693
- secondSignatureTitle: [{ type: i0.Input }],
694
- saveButtonLabel: [{ type: i0.Input }],
695
- clearButtonLabel: [{ type: i0.Input }],
696
- saveFirstSignature: [{ type: i0.Output }],
697
- saveSecondSignature: [{ type: i0.Output }],
698
- showClass: [{ type: i0.HostBinding, args: ["class.ione-signatures",] }]
699
- };
700
-
701
- var DocsignModule = /** @class */ (function () {
702
- function DocsignModule() {
703
- }
704
- return DocsignModule;
705
- }());
706
- DocsignModule.decorators = [
707
- { type: i0.NgModule, args: [{
708
- imports: [
709
- common.CommonModule
710
- ],
711
- declarations: [
712
- DocsignComponent,
713
- SignatureComponent,
714
- SignaturesComponent
715
- ],
716
- exports: [
717
- DocsignComponent
718
- ]
719
- },] }
720
- ];
721
-
722
- var PROP_META_KEY$3 = "complexField";
723
- /**
724
- * !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
725
- */
726
- /**
727
- * Property decorator for properties of businessobject classes that are other strongly typed businessobjects.
728
- * Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
729
- * to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
730
- *
731
- * Usage:
732
- *
733
- * @ComplexField(Transaction)
734
- * public transaction: Transaction
735
- *
736
- * Also keeps track of a "complexFieldProps" metadata on the class-level, as a reflect-metadata workaround to be able to
737
- * retrieve all properties that have the @ComplexField(..) decorator (impossible with current Reflect API).
738
- */
739
- function ComplexField(type) {
740
- return function (target, propertyKey) {
741
- if (!target || !propertyKey) {
742
- return;
743
- }
744
- // warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
745
- // to be immediately processed when a class is first imported
746
- if (!type) {
747
- // eslint-disable-next-line no-console
748
- console.warn("@ComplexField(type): type was UNDEFINED. Called on prop (" + objectUtils.ObjectUtils.GetClassName(target) + ", " + propertyKey + "). " +
749
- "Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS " +
750
- "where both classes and their dependencies are used, e.g. factory, repository or models..");
751
- return;
752
- }
753
- Reflect.defineMetadata(PROP_META_KEY$3, type, target, propertyKey);
754
- };
755
- }
756
- // Utility function holder of the ComplexFieldDecorator decorator.
757
- var ComplexFieldDecorator = /** @class */ (function () {
758
- function ComplexFieldDecorator() {
759
- }
760
- /**
761
- * Returns whether given property (as a string) on given object is a complex field. A complex field is a field that is decorated
762
- * with the @ComplexField decorator.
763
- */
764
- ComplexFieldDecorator.IsComplexField = function (target, propertyKey) {
765
- if (!target || !propertyKey || typeof target !== "object") {
766
- return false;
767
- }
768
- return (notNill_function.notNill(Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey)));
769
- };
770
- // Returns the VALUE of the @ComplexField(VALUE) property decorator on the given propertyKey on the given modelObject.
771
- ComplexFieldDecorator.GetComplexFieldType = function (target, propertyKey) {
772
- if (!target || !propertyKey || typeof target !== "object") {
773
- return undefined;
774
- }
775
- return Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey);
776
- };
777
- return ComplexFieldDecorator;
778
- }());
779
-
780
- var PROP_META_KEY$2 = "complexArray";
781
- /**
782
- * !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
783
- */
784
- /**
785
- * Property decorator for properties of businessobject classes that are an array of other strongly typed businessobjects.
786
- * Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
787
- * to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
788
- *
789
- * Usage:
790
- *
791
- * @ComplexArray(TransactionLine)
792
- * public transactionLines: TransactionLine[]
793
- */
794
- function ComplexArray(type) {
795
- return function (target, propertyKey) {
796
- if (!target || !propertyKey || typeof target !== "object") {
797
- return;
798
- }
799
- // warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
800
- // to be immediately processed when a class is first imported
801
- if (!type) {
802
- console.warn("@ComplexArray(type): type was UNDEFINED. Called on prop (" + objectUtils.ObjectUtils.GetClassName(target) + ", " + propertyKey + "). " +
803
- "Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS " +
804
- "where both classes and their dependencies are used, e.g. factory, repository or models..");
805
- return;
806
- }
807
- Reflect.defineMetadata(PROP_META_KEY$2, type, target, propertyKey);
808
- };
809
- }
810
- // Utility function holder of the ComplexArrayDecorator decorator.
811
- var ComplexArrayDecorator = /** @class */ (function () {
812
- function ComplexArrayDecorator() {
813
- }
814
- /**
815
- * Returns whether given property (as a string) on given object is a complex array. A complex array is an array field that is decorated
816
- * with the @ComplexArray decorator.
817
- */
818
- ComplexArrayDecorator.IsComplexArray = function (target, propertyKey) {
819
- if (!target || !propertyKey || typeof target !== "object") {
820
- return false;
821
- }
822
- return (notNill_function.notNill(Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey)));
823
- };
824
- /**
825
- * Returns the VALUE of the @ComplexArray(VALUE) property decorator on the given propertyKey on the given modelobject.
826
- */
827
- ComplexArrayDecorator.GetComplexArrayType = function (target, propertyKey) {
828
- if (!target || !propertyKey || typeof target !== "object") {
829
- return undefined;
830
- }
831
- return Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey);
832
- };
833
- return ComplexArrayDecorator;
834
- }());
835
-
836
- var PROP_META_KEY_JN = "booleanTextJN";
837
- var PROP_META_KEY_TF = "booleanTextTF";
838
- var PROP_META_KEY_10 = "booleanText10";
839
- /**
840
- * There are 'J', 'T', 'N', 'F', 0 and 1 'boolean values' in the database. These should be translated to true and false boolean values in
841
- * our client application.
842
- *
843
- * The values 'J' and 'N' seem to be most commonly used. This is the default setting when using this decorator.
844
- * You can pass 'T' or 1 for the other variants as follows:
845
- *
846
- * Usage:
847
- *
848
- * @BooleanText() or @BooleanText("J") (the default, uses YesNoDbType char values)
849
- * public foo: boolean // 'J' and 'N' become true and false after BusinessObjectFactoryService and -SerializerService processing
850
- *
851
- * @BooleanText('T') (uses TrueFalseDbType char values)
852
- * public bar: boolean // 'T' and 'F' become true and false after BusinessObjectFactoryService and -SerializerService processing
853
- *
854
- * @BooleanText(1)
855
- * public baz: boolean // 1 and 0 become true and false after BusinessObjectFactoryService and -SerializerService processing
856
- */
857
- function BooleanText(type) {
858
- return function (target, propertyKey) {
859
- if (!target || !propertyKey) {
860
- return;
861
- }
862
- // by default, it's a J N boolean text
863
- if (!type || type === "J") {
864
- Reflect.defineMetadata(PROP_META_KEY_JN, true, target, propertyKey);
865
- }
866
- else if (type === "T") {
867
- Reflect.defineMetadata(PROP_META_KEY_TF, true, target, propertyKey);
868
- }
869
- else if (type === 1) {
870
- Reflect.defineMetadata(PROP_META_KEY_10, true, target, propertyKey);
871
- }
872
- };
873
- }
874
- // Utility function holder of the BooleanTextDecorator decorator.
875
- var BooleanTextDecorator = /** @class */ (function () {
876
- function BooleanTextDecorator() {
877
- }
878
- /**
879
- * Returns whether given property (as a string) on given object is a boolean text field. That is, it's a field that is decorated
880
- * with the @BooleanText decorator.
881
- */
882
- BooleanTextDecorator.IsBooleanTextField = function (target, propertyKey) {
883
- if (!target || !propertyKey || typeof target !== "object") {
884
- return false;
885
- }
886
- return (Reflect.getMetadata(PROP_META_KEY_JN, target, propertyKey) === true
887
- ||
888
- Reflect.getMetadata(PROP_META_KEY_TF, target, propertyKey) === true
889
- ||
890
- Reflect.getMetadata(PROP_META_KEY_10, target, propertyKey) === true);
891
- };
892
- /**
893
- * Returns the logical true or false value of given character ('J', 'N', 'T' or 'F') or number (0 or 1).
894
- * Returns UNDEFINED if given boolChar was not recognised as a boolean text.
895
- */
896
- BooleanTextDecorator.GetLogicalBooleanValue = function (dbBoolChar) {
897
- return dbBooleanValueType_enum.GetLogicalBooleanValue(dbBoolChar);
898
- };
899
- /**
900
- * Returns the boolean character / number of given logical bool property on target object. Uses its @BooleanText() annotation to decide
901
- * what character / number to return.
902
- * Used in BusinessObjectSerializerServiceService to convert logical bools to their original boolean character.
903
- * @returns {string|number} The original, reverse-engineered boolean character (or number) of given object property, or undefined.
904
- */
905
- BooleanTextDecorator.GetDbBooleanValue = function (target, propertyKey) {
906
- if (!target || !propertyKey || typeof target !== "object") {
907
- return undefined;
908
- }
909
- var dbBoolVal = undefined;
910
- var curBoolVal = target[propertyKey];
911
- if (BooleanTextDecorator._IsJaNeeProp(target, propertyKey)) {
912
- dbBoolVal = yesNoDbType_enum.GetYesNoDbBooleanValue(curBoolVal);
913
- }
914
- else if (BooleanTextDecorator._IsTrueFalseProp(target, propertyKey)) {
915
- dbBoolVal = trueFalseDbType_enum.GetTrueFalseDbBooleanValue(curBoolVal);
916
- }
917
- else if (BooleanTextDecorator._IsZeroOneProp(target, propertyKey)) {
918
- dbBoolVal = oneZeroBoolDbType_enum.GetOneZeroDbBooleanValue(curBoolVal);
919
- }
920
- return dbBoolVal;
921
- };
922
- BooleanTextDecorator._IsJaNeeProp = function (target, propertyKey) {
923
- return BooleanTextDecorator._IsProp(PROP_META_KEY_JN, target, propertyKey);
924
- };
925
- BooleanTextDecorator._IsTrueFalseProp = function (target, propertyKey) {
926
- return BooleanTextDecorator._IsProp(PROP_META_KEY_TF, target, propertyKey);
927
- };
928
- BooleanTextDecorator._IsZeroOneProp = function (target, propertyKey) {
929
- return BooleanTextDecorator._IsProp(PROP_META_KEY_10, target, propertyKey);
930
- };
931
- BooleanTextDecorator._IsProp = function (prop, target, propertyKey) {
932
- return !!target && !!propertyKey && typeof target === "object" && Reflect.hasMetadata(prop, target, propertyKey);
933
- };
934
- return BooleanTextDecorator;
935
- }());
936
-
937
- var PROP_META_KEY$1 = "dateField";
938
- /**
939
- * !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
940
- */
941
- /**
942
- * Property decorator for properties of businessobject classes that are of type Date, but are sent to us as strings.
943
- * Ensures that the BusinessObjectFactory makes proper JavaScript Date objects from incoming strings for @DateField() decorated properties.
944
- *
945
- * Usage:
946
- *
947
- * @DateField()
948
- * public expectedDeliveryDate: Date
949
- */
950
- function DateField() {
951
- return function (target, propertyKey) {
952
- if (!target || !propertyKey) {
953
- return;
954
- }
955
- Reflect.defineMetadata(PROP_META_KEY$1, undefined, target, propertyKey);
956
- };
957
- }
958
- // Utility function holder of the @DateField() decorator.
959
- var DateFieldFieldDecorator = /** @class */ (function () {
960
- function DateFieldFieldDecorator() {
961
- }
962
- // Returns whether given property (as a string) on given object is decorated with @DateField().
963
- DateFieldFieldDecorator.IsDateField = function (target, propertyKey) {
964
- if (!target || !propertyKey || typeof target !== "object") {
965
- return false;
966
- }
967
- return Reflect.hasMetadata(PROP_META_KEY$1, target, propertyKey);
968
- };
969
- DateFieldFieldDecorator.StringAsDate = function (str) {
970
- return dateUtils.DateUtils.StringAsDate(str);
971
- };
972
- return DateFieldFieldDecorator;
973
- }());
974
-
975
- var PROP_META_KEY = "stringNumber";
976
- /**
977
- * !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
978
- */
979
- /**
980
- * Decorator for properties of businessobjects that are sent to us as strings from the database, but which we want to use as a number in the client.
981
- *
982
- * Can be handy for incongruent backend api cases, where id data types are communicated wrongly via strings instead of numbers
983
- * (e.g. on EmployeeFullObject.district, points to a District which has a number id, but in employee it's a string representation of that number...)
984
- *
985
- * Used by business object factory and -serializer.
986
- *
987
- * Usage:
988
- *
989
- * @StringNumber()
990
- * public rights: UserRightType
991
- */
992
- function StringNumber() {
993
- return function (target, propertyKey) {
994
- if (!target || !propertyKey) {
995
- return;
996
- }
997
- Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
998
- };
999
- }
1000
- // Utility function holder of the @StringNumber() decorator.
1001
- var StringNumberDecorator = /** @class */ (function () {
1002
- function StringNumberDecorator() {
1003
- }
1004
- // Returns whether given property (as a string) on given object is decorated with @StringNumber().
1005
- StringNumberDecorator.IsStringNumber = function (target, propertyKey) {
1006
- if (!target || !propertyKey || typeof target !== "object") {
1007
- return false;
1008
- }
1009
- return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
1010
- };
1011
- StringNumberDecorator.StringAsNumber = function (str) {
1012
- return numberUtils.NumberUtils.ParseFloatKeepPrecision(str);
1013
- };
1014
- StringNumberDecorator.NumberAsString = function (nr) {
1015
- return "" + nr;
1016
- };
1017
- return StringNumberDecorator;
1018
- }());
1019
-
1020
- // @returns true iff given value equals null or equals undefined
1021
- function isNill(value) {
1022
- return value === null || value === undefined;
1023
- }
1024
-
1025
- var ArrayUtils = /** @class */ (function () {
1026
- function ArrayUtils() {
1027
- }
1028
- /**
1029
- * Returns whether at least one element in given array could be found by given finder function.
1030
- *
1031
- * @param {T[]} array
1032
- * @param {(element: T) => boolean} finder A finder function that takes an element of the array and returns a boolean that represents
1033
- * the 'found status' for that element; whether it should have been found or not.
1034
- */
1035
- ArrayUtils.ContainsAnElementFoundBy = function (array, finder) {
1036
- if (!array || !finder) {
1037
- return false;
1038
- }
1039
- return notNill_function.notNill(this.Find(array, finder));
1040
- };
1041
- /**
1042
- * Cross-browser Array.find() function. Returns the first item in given array for which the foundBy function returns true. Returns
1043
- * undefined when none was found.
1044
- *
1045
- * Example usage:
1046
- * const foundItem: BusinessObject = ArrayUtils.Find<BusinessObject>(modelArray, (modelItem: BusinessObject) => <br>
1047
- * (return modelItem.getId() === '1')
1048
- * * });
1049
- *
1050
- * @param array The array with items to search in.
1051
- * @param foundBy The finder function applied on each items of the array, when that returns true, the item is considered found.
1052
- */
1053
- ArrayUtils.Find = function (array, foundBy) {
1054
- if (!array || !foundBy) {
1055
- return undefined;
1056
- }
1057
- for (var i = 0, len = array.length; i < len; i++) {
1058
- var itemCur = array[i];
1059
- if (foundBy(itemCur)) {
1060
- return itemCur;
1061
- }
1062
- }
1063
- return undefined;
1064
- };
1065
- // @returns empty array when nothing found, otherwise array with found items
1066
- ArrayUtils.FindAll = function (array, foundBy) {
1067
- var answer = [];
1068
- if (!array || !foundBy) {
1069
- return answer;
1070
- }
1071
- for (var i = 0, len = array.length; i < len; i++) {
1072
- var itemCur = array[i];
1073
- if (foundBy(itemCur)) {
1074
- answer.push(itemCur);
1075
- }
1076
- }
1077
- return answer;
1078
- };
1079
- // returns a simple clone of given array, using array.slice(0)
1080
- ArrayUtils.CloneArray = function (array) {
1081
- var answer = [];
1082
- if (array) {
1083
- answer = array.slice(0);
1084
- }
1085
- return answer;
1086
- };
1087
- /**
1088
- * Returns a 'semi deep clone' of given array. Its first-level members are object-shallow-cloned (optionally with a strongly typed constructor),
1089
- * or just as plain object (see param arrayItemsClass).
1090
- * @param array
1091
- * @param arrayItemsClass If provided, the cloned array's first-level items will be strongly typed to / constructed as this class. Otherwise
1092
- * it'll be a plain object.
1093
- * @param deepClone Set to true if array items contain FUNCTIONS that need to be cloned..
1094
- * @returns {Array} semi-deep clone of given array
1095
- */
1096
- ArrayUtils.CloneArrayAndItsItems = function (array, arrayItemsClass, deepClone) {
1097
- if (deepClone === void 0) { deepClone = false; }
1098
- var cloneArray = [];
1099
- if (array) {
1100
- for (var i = 0, len = array.length; i < len; i++) {
1101
- if (deepClone) {
1102
- cloneArray.push(objectUtils.ObjectUtils.GetDeepClone(array[i]));
1103
- }
1104
- else {
1105
- cloneArray.push(objectUtils.ObjectUtils.GetShallowClone(array[i], arrayItemsClass));
1106
- }
1107
- }
1108
- }
1109
- else {
1110
- return [];
1111
- }
1112
- return cloneArray;
1113
- };
1114
- /**
1115
- * Removes element at given index from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really
1116
- * removes the element using splice().
1117
- *
1118
- * @param {number} index
1119
- * @param {any[]} array in-out
1120
- * @returns {boolean} True if and only if the element on given index is succesfully removed from given array.
1121
- */
1122
- ArrayUtils.RemoveElementAtIndex = function (index, array) {
1123
- if (numberUtils.NumberUtils.IsNaN(index) || index < 0 || !Array.isArray(array) || array.length === 0) {
1124
- return false;
1125
- }
1126
- if (index in array) {
1127
- array.splice(index, 1);
1128
- return true;
1129
- }
1130
- else {
1131
- return false;
1132
- }
1133
- };
1134
- /**
1135
- * Removes given element from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really removes the
1136
- * element using splice(). Also works on associative arrays.
1137
- *
1138
- * @param {T} element The element to remove.
1139
- * @param {T[]} array The array to remove the element from.
1140
- * @returns {boolean} True iff given element was truly successfully removed from given array.
1141
- */
1142
- ArrayUtils.RemoveElement = function (element, array) {
1143
- if (!Array.isArray(array)) {
1144
- return false;
1145
- }
1146
- var index = array.indexOf(element);
1147
- return ArrayUtils.RemoveElementAtIndex(index, array);
1148
- };
1149
- // Checks if given array is defined, and is an array, and has length > 0, and, optionally checks that the first element is of type given clazz.
1150
- ArrayUtils.IsArrayWithElements = function (arrayToCheck, classItemsMustBeInstanceOf) {
1151
- if (isNill_function.isNill(arrayToCheck)) {
1152
- return false;
1153
- }
1154
- if (Array.isArray(arrayToCheck) && arrayToCheck.length > 0) {
1155
- if (classItemsMustBeInstanceOf) {
1156
- return arrayToCheck[0] instanceof classItemsMustBeInstanceOf;
1157
- }
1158
- else {
1159
- return true;
1160
- }
1161
- }
1162
- else {
1163
- return false;
1164
- }
1165
- };
1166
- // Removes all elements from given array for which given filter function holds true. Returns true if at least one removed, else false.
1167
- ArrayUtils.RemoveElementsByFilter = function (array, filterFunction) {
1168
- if (!ArrayUtils.IsArrayWithElements(array) || !filterFunction) {
1169
- return false;
1170
- }
1171
- var atLeastOneRemoved = false;
1172
- var len = array.length;
1173
- for (var i = len - 1; i >= 0; i--) {
1174
- var item = array[i];
1175
- if (filterFunction.call(this, item) === true) {
1176
- array.splice(i, 1);
1177
- atLeastOneRemoved = true;
1178
- }
1179
- }
1180
- return atLeastOneRemoved;
1181
- };
1182
- ArrayUtils.MoveElement = function (element, toIndex, array) {
1183
- if (!Array.isArray(array) || isNill_function.isNill(toIndex)) {
1184
- return false;
1185
- }
1186
- var fromIndex = array.indexOf(element);
1187
- var toIndexCorrected = numberUtils.NumberUtils.GetNearestNumberWithinBounds(toIndex, 0, array.length - 1);
1188
- if (fromIndex === -1 || array[toIndexCorrected] === element) {
1189
- // element did not exist in given array, or already existed on given toIndex
1190
- return false;
1191
- }
1192
- array.splice(toIndexCorrected, 0, array.splice(fromIndex, 1)[0]);
1193
- return true;
1194
- };
1195
- // PRE: elements exists in given array. POST: given elementToPlace has a lower index than given afterThisElement. Array is in-out manipulated.
1196
- ArrayUtils.PlaceElementAfterOther = function (array, elementToPlace, afterThisElement) {
1197
- if (array) {
1198
- var afterThisElIdx = array.indexOf(afterThisElement);
1199
- var elToPlaceIdx = array.indexOf(elementToPlace);
1200
- if (afterThisElIdx >= elToPlaceIdx) {
1201
- ArrayUtils.MoveElement(elementToPlace, afterThisElIdx + 1, array);
1202
- }
1203
- }
1204
- };
1205
- return ArrayUtils;
1206
- }());
1207
-
1208
- /**
1209
- * This type represents the concept of a business object ID type. ID's of business objects can be a primary number, a simple string or a
1210
- * object for a composite key.
1211
- *
1212
- * Simply to prevent type declarations of 'number | string | Object' for BO ID data all over the application.
1213
- */
1214
- var BusinessObject = /** @class */ (function () {
1215
- function BusinessObject() {
1216
- }
1217
- // Overridable. Returns the ID of the model. Concrete model classes often override this method to provide their specific ID getter.
1218
- BusinessObject.prototype.getId = function () {
1219
- return this.id;
1220
- };
1221
- BusinessObject.prototype.setOwnMappedPropsFromRawData = function (rawData) {
1222
- var _this = this;
1223
- if (rawData === void 0) { rawData = {}; }
1224
- if (!rawData) {
1225
- return;
1226
- }
1227
- Object.keys(this).forEach(function (key) {
1228
- // check if property needs to be mapped
1229
- if (mapProperty_decorator.MapPropertyDecorator.IsMapProperty(_this, key)) {
1230
- var mapKeys = mapProperty_decorator.MapPropertyDecorator.GetMapProperty(_this, key).split(",");
1231
- var len = mapKeys.length;
1232
- for (var i = 0; i < len; i++) {
1233
- // eslint-disable-next-line
1234
- var mapKey = mapKeys[i].trim();
1235
- var objProp = rawData[mapKey];
1236
- var decorated = false;
1237
- if (rawData.hasOwnProperty(mapKey)) {
1238
- if (boolean_decorator.BooleanTextDecorator.IsBooleanTextField(_this, key)) {
1239
- _this[key] = boolean_decorator.BooleanTextDecorator.GetLogicalBooleanValue(objProp);
1240
- decorated = true;
1241
- }
1242
- if (json_decorator.JsonFieldFieldDecorator.IsJsonField(_this, key)) {
1243
- _this[key] = json_decorator.JsonFieldFieldDecorator.StringAsJson(objProp);
1244
- decorated = true;
1245
- }
1246
- if (complexArray_decorator.ComplexArrayDecorator.IsComplexArray(_this, key)) {
1247
- var arrayClass = complexArray_decorator.ComplexArrayDecorator.GetComplexArrayType(_this, key);
1248
- // eslint-disable-next-line
1249
- var origArray = _this[key];
1250
- // eslint-disable-next-line
1251
- var newArray = [];
1252
- // eslint-disable-next-line @typescript-eslint/prefer-for-of
1253
- for (var j = 0; j < origArray.length; j++) {
1254
- // eslint-disable-next-line
1255
- var item = new arrayClass(origArray[j]);
1256
- newArray.push(item);
1257
- }
1258
- _this[key] = newArray;
1259
- }
1260
- else {
1261
- if (!decorated) {
1262
- _this[key] = objProp;
1263
- }
1264
- }
1265
- break;
1266
- }
1267
- }
1268
- }
1269
- else {
1270
- if (rawData.hasOwnProperty(key)) {
1271
- var objProp = rawData[key];
1272
- if (boolean_decorator.BooleanTextDecorator.IsBooleanTextField(_this, key)) {
1273
- _this[key] = boolean_decorator.BooleanTextDecorator.GetLogicalBooleanValue(objProp);
1274
- }
1275
- else if (json_decorator.JsonFieldFieldDecorator.IsJsonField(_this, key)) {
1276
- _this[key] = json_decorator.JsonFieldFieldDecorator.StringAsJson(objProp);
1277
- }
1278
- else {
1279
- _this[key] = objProp;
1280
- }
1281
- }
1282
- }
1283
- });
1284
- };
1285
- return BusinessObject;
1286
- }());
1287
-
1288
- // Factory service creates businessobjects, using their decorators in the process.
1289
- var BusinessObjectFactory = /** @class */ (function () {
1290
- function BusinessObjectFactory() {
1291
- }
1292
- /**
1293
- * Creates and returns a new business data object instance of given class, with all given data properties applied to it in a
1294
- * complex-aware style. That is, all properties on given class that are decorated with @ComplexField(..) or @ComplexArray(..) decorators
1295
- * become strongly typed business objects, with methods that are usable and such.
1296
- *
1297
- * @param modelClass
1298
- * @param {Object} rawData The object with all (possibly raw/flat/not alive) data to be applied to the created model object
1299
- */
1300
- BusinessObjectFactory.prototype.makeWithRawBackendData = function (modelClass, rawData) {
1301
- if (!modelClass) {
1302
- return undefined;
1303
- }
1304
- if (typeof modelClass !== typeof BusinessObject) {
1305
- return undefined;
1306
- }
1307
- var model = new modelClass();
1308
- this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
1309
- return model;
1310
- };
1311
- // see makeWithRawBackendData, this is a loop-wrapper around that method
1312
- BusinessObjectFactory.prototype.makeBOArrayFromRawBackendDataArray = function (modelClass, arrayOfRawDatas) {
1313
- if (!modelClass) {
1314
- return undefined;
1315
- }
1316
- var trueClientBos = [];
1317
- if (arrayOfRawDatas) {
1318
- for (var i = 0, len = arrayOfRawDatas.length; i < len; i++) {
1319
- trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
1320
- }
1321
- }
1322
- return trueClientBos;
1323
- };
1324
- BusinessObjectFactory.prototype.instantiateNewBo = function (modelClass) {
1325
- return this.makeWithRawBackendData(modelClass, {});
1326
- };
1327
- /**
1328
- * Applies all properties of given 'source' object to the given 'destination' businessobject, if destination has that property.
1329
- * Works with the @ComplexField(), @ComplexArray, @BooleanText, @CoInject and @DateField annotations of given destination model.
1330
- *
1331
- * @param sourceData Raw data to copy to destination model
1332
- * @param {BusinessObject} destinationModel InOut: The annotated businessobject to apply source properties to
1333
- */
1334
- BusinessObjectFactory.prototype._copyAllPropertiesDecoratorProcessedFrom = function (sourceData, destinationModel) {
1335
- if (!sourceData || !destinationModel) {
1336
- return;
1337
- }
1338
- // process all source data into destinationModel
1339
- for (var srcPropKey in sourceData) {
1340
- if (!sourceData.hasOwnProperty(srcPropKey)) {
1341
- continue;
1342
- }
1343
- var srcPropVal = sourceData[srcPropKey];
1344
- if (ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
1345
- var classOfField = ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
1346
- destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
1347
- }
1348
- else if (ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
1349
- var sourceArray = srcPropVal;
1350
- if (!sourceArray) {
1351
- continue;
1352
- }
1353
- var classOfArrayItems = ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
1354
- var tempArray = [];
1355
- for (var i = 0, len = sourceArray.length; i < len; i++) {
1356
- tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
1357
- }
1358
- destinationModel[srcPropKey] = tempArray;
1359
- }
1360
- else if (BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
1361
- // logical 'true' and 'false' also allowed as incoming values for @BooleanText() properties: then just copy their value
1362
- if (typeof srcPropVal === "boolean") {
1363
- destinationModel[srcPropKey] = srcPropVal;
1364
- // here, it should be a 'J' or 'N' (or 'T' or 'F'): assign the associated boolean value
1365
- }
1366
- else {
1367
- destinationModel[srcPropKey] = BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
1368
- }
1369
- }
1370
- else if (DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
1371
- destinationModel[srcPropKey] = DateFieldFieldDecorator.StringAsDate(srcPropVal);
1372
- }
1373
- else if (StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
1374
- destinationModel[srcPropKey] = StringNumberDecorator.StringAsNumber(srcPropVal);
1375
- }
1376
- // non-decorated prop
1377
- else {
1378
- if (isNill(srcPropVal)) {
1379
- destinationModel[srcPropKey] = undefined;
1380
- }
1381
- else if (Array.isArray(srcPropVal)) {
1382
- destinationModel[srcPropKey] = ArrayUtils.CloneArray(srcPropVal);
1383
- }
1384
- else if (typeof srcPropVal === "object") {
1385
- if (srcPropVal instanceof Map) { //just copy the value in case of maps
1386
- destinationModel[srcPropKey] = srcPropVal;
1387
- }
1388
- else {
1389
- destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
1390
- }
1391
- }
1392
- else {
1393
- destinationModel[srcPropKey] = srcPropVal;
1394
- }
1395
- }
1396
- }
1397
- };
1398
- return BusinessObjectFactory;
1399
- }());
1400
-
1401
- var IoneConnectorAdapterService = /** @class */ (function () {
1402
- function IoneConnectorAdapterService() {
1403
- this._boFactory = new BusinessObjectFactory();
1404
- }
1405
- IoneConnectorAdapterService.prototype.connect = function (options) {
1406
- return __awaiter(this, void 0, void 0, function () {
1407
- return __generator(this, function (_a) {
1408
- if (this.options === undefined) {
1409
- this.options = options;
1410
- this.connector = new articles.Articles(options);
1411
- this.options.session = this.connector.session;
1412
- }
1413
- return [2 /*return*/];
1414
- });
1415
- });
1416
- };
1417
- IoneConnectorAdapterService.prototype.disconnect = function () {
1418
- return __awaiter(this, void 0, void 0, function () {
1419
- return __generator(this, function (_a) {
1420
- this.options = undefined;
1421
- return [2 /*return*/];
1422
- });
1423
- });
1424
- };
1425
- IoneConnectorAdapterService.prototype.getArticleFullObject = function (goodId) {
1426
- return __awaiter(this, void 0, void 0, function () {
1427
- var _this = this;
1428
- return __generator(this, function (_a) {
1429
- return [2 /*return*/, new Promise(function (resolve, reject) {
1430
- return _this.connector.getArticleFullObject(goodId).then(function (result) {
1431
- // if (result.validationResult && result.validationResult.success) {
1432
- // if (result.resultObject) {
1433
- // resolve(this._boFactory.makeWithRawBackendData(ArticleExtended, result.resultObject));
1434
- // }
1435
- // } else {
1436
- // reject(result.validationMessagesAsString);
1437
- // }
1438
- });
1439
- })];
1440
- });
1441
- });
1442
- };
1443
- return IoneConnectorAdapterService;
1444
- }());
1445
- IoneConnectorAdapterService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IoneConnectorAdapterService_Factory() { return new IoneConnectorAdapterService(); }, token: IoneConnectorAdapterService, providedIn: "root" });
1446
- IoneConnectorAdapterService.decorators = [
1447
- { type: i0.Injectable, args: [{
1448
- providedIn: "root"
1449
- },] }
1450
- ];
1451
- IoneConnectorAdapterService.ctorParameters = function () { return []; };
1452
-
1453
- var StockService = /** @class */ (function () {
1454
- function StockService(_connector) {
1455
- this._connector = _connector;
1456
- }
1457
- StockService.prototype.connectConnector = function (options) {
1458
- this._connector.connect(options);
1459
- };
1460
- // public async getStock(goodId: number): Promise<ArticleFullObject> {
1461
- // return await this._connector.getArticleFullObject(goodId);
1462
- // }
1463
- // public async getStockHistory(): Promise<GetStockHistoryRequest> {
1464
- //
1465
- // }
1466
- // public async getStockWarehouses(goodId: number): Promise<getWarehouses>
1467
- StockService.prototype.loadStockLocations = function (goodId) {
1468
- return __awaiter(this, void 0, void 0, function () {
1469
- return __generator(this, function (_a) {
1470
- return [2 /*return*/];
1471
- });
1472
- });
1473
- };
1474
- StockService.prototype._loadInOrders = function () {
1475
- return __awaiter(this, void 0, void 0, function () {
1476
- return __generator(this, function (_a) {
1477
- return [2 /*return*/];
1478
- });
1479
- });
1480
- };
1481
- StockService.prototype._loadStockOrders = function () {
1482
- return __awaiter(this, void 0, void 0, function () {
1483
- return __generator(this, function (_a) {
1484
- return [2 /*return*/];
1485
- });
1486
- });
1487
- };
1488
- return StockService;
1489
- }());
1490
- StockService.decorators = [
1491
- { type: i0.Injectable }
1492
- ];
1493
- StockService.ctorParameters = function () { return [
1494
- { type: IoneConnectorAdapterService }
1495
- ]; };
1496
-
1497
- var StockComponent = /** @class */ (function () {
1498
- function StockComponent(_stockService) {
1499
- this._stockService = _stockService;
1500
- this.handleStickerClicked = new i0.EventEmitter();
1501
- this.showStockInformationGrid = true;
1502
- this.showStockLocation = false;
1503
- this.showStockTransfer = false;
1504
- }
1505
- Object.defineProperty(StockComponent.prototype, "options", {
1506
- set: function (value) {
1507
- this._stockService.connectConnector(value);
1508
- },
1509
- enumerable: false,
1510
- configurable: true
1511
- });
1512
- StockComponent.prototype.showClass = function () {
1513
- return true;
1514
- };
1515
- StockComponent.prototype.backToStockLinesClicked = function () {
1516
- this.showStockLocation = false;
1517
- this.showStockInformationGrid = true;
1518
- };
1519
- StockComponent.prototype.handleStockTransferClick = function (event) {
1520
- this.showStockTransfer = !this.showStockTransfer;
1521
- this.showStockInformationGrid = !this.showStockInformationGrid;
1522
- };
1523
- StockComponent.prototype.handleStockLocationClick = function () {
1524
- return __awaiter(this, void 0, void 0, function () {
1525
- return __generator(this, function (_a) {
1526
- switch (_a.label) {
1527
- case 0: return [4 /*yield*/, this._stockService.loadStockLocations(10)];
1528
- case 1:
1529
- _a.sent();
1530
- return [2 /*return*/];
1531
- }
1532
- });
1533
- });
1534
- };
1535
- StockComponent.prototype.backToStock = function () {
1536
- this.showStockTransfer = !this.showStockTransfer;
1537
- this.showStockInformationGrid = !this.showStockInformationGrid;
1538
- };
1539
- return StockComponent;
1540
- }());
1541
- StockComponent.decorators = [
1542
- { type: i0.Component, args: [{
1543
- selector: "co-stock",
1544
- template: "\n <div class=\"stock-info-container\">\n <co-stock-information></co-stock-information>\n <hr>\n <co-stock-information-grid *ngIf=\"showStockInformationGrid\" (transferIconClicked)=\"handleStockTransferClick($event)\"></co-stock-information-grid>\n <co-stock-location *ngIf=\"showStockLocation\" (backToStockLines)=\"backToStockLinesClicked()\"></co-stock-location>\n <co-stock-transfer *ngIf=\"showStockTransfer\" (handleCancelClicked)=\"backToStock()\" (handleStickerClicked)=\"handleStickerClicked.emit($event)\"></co-stock-transfer>\n </div>\n ",
1545
- encapsulation: i0.ViewEncapsulation.None
1546
- },] }
1547
- ];
1548
- StockComponent.ctorParameters = function () { return [
1549
- { type: StockService }
1550
- ]; };
1551
- StockComponent.propDecorators = {
1552
- stock: [{ type: i0.ViewChild, args: [StockComponent,] }],
1553
- handleStickerClicked: [{ type: i0.Output }],
1554
- options: [{ type: i0.Input }],
1555
- goodId: [{ type: i0.Input }],
1556
- showClass: [{ type: i0.HostBinding, args: ["class.co-stock",] }]
1557
- };
1558
-
1559
- var StockInformationComponent = /** @class */ (function () {
1560
- function StockInformationComponent() {
1561
- this.stockStatus = "medium";
1562
- this.show = false;
1563
- this.hideOrShowLocationTab = false;
1564
- }
1565
- return StockInformationComponent;
1566
- }());
1567
- StockInformationComponent.decorators = [
1568
- { type: i0.Component, args: [{
1569
- selector: "co-stock-information",
1570
- template: "\n <div class=\"stock-info\">\n <div class=\"stock-info-row\">\n <div class=\"stock-info-row-image\">\n <div class=\"stock-image\">\n <co-image></co-image>\n </div>\n </div>\n <div class=\"stock-good-info\">\n <div>\n <span [textContent]=\"\"></span>\n </div>\n <div>\n <span [textContent]=\"\"></span>\n </div>\n </div>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'STATE'\"></label>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'STOCK'\"></label>\n <span></span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'AVAILABLE_STOCK'\"></label>\n <span>totalAmountAvailable</span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'ECONOMICAL_STOCK'\"></label>\n <span></span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'PHYSICAL_STOCK'\"></label>\n <span></span>\n </div>\n </div>\n ",
1571
- encapsulation: i0.ViewEncapsulation.None
1572
- },] }
1573
- ];
1574
- StockInformationComponent.ctorParameters = function () { return []; };
1575
-
1576
- var StockInformationGridComponent = /** @class */ (function () {
1577
- function StockInformationGridComponent(_stockService) {
1578
- this._stockService = _stockService;
1579
- this.locationLineClicked = new i0.EventEmitter();
1580
- this.transferIconClicked = new i0.EventEmitter();
1581
- this.MAX_GRID_ROWS = 10;
1582
- this.stockStatus = "medium";
1583
- this.show = false;
1584
- this.hideOrShowLocationTab = false;
1585
- this.showStockHistory = false;
1586
- this.data = [
1587
- { test: "test" }
1588
- ];
1589
- this.stockInformation = [
1590
- { warehouseNumber: "1", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "test" },
1591
- { warehouseNumber: "2", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "Test nummer 2" },
1592
- { warehouseNumber: "3", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "Amundsenweg" },
1593
- ];
1594
- this.stockLocationInformation = [
1595
- { location: "title 1", batch: "1", serialNo: "1", amountInStock: "1", allocated: "1", amountAvailable: "1" },
1596
- { location: "title 2", amountInStock: "2" },
1597
- { location: "title 3", amountInStock: "3" },
1598
- { location: "title 4", amountInStock: "4" },
1599
- { location: "title 5", amountInStock: "5" },
1600
- ];
1601
- this.inOrderInformation = [
1602
- { inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
1603
- { inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
1604
- { inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
1605
- { inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
1606
- { inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
1607
- ];
1608
- this.stockHistoryInformation = [];
1609
- this.orderInformation = [];
1610
- this.stockColumns = [];
1611
- this.stockLocationColumns = [];
1612
- this.inOrderColumns = [];
1613
- this.orderColumns = [];
1614
- this.hideOrShowTabs = "show";
1615
- this.hideOrShowStockLocation = "hide";
1616
- this.dataWareHouseCode = 0;
1617
- this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNumber" };
1618
- this.tabs = [
1619
- "STOCK",
1620
- "IN_ORDER2",
1621
- "ORDERS1"
1622
- ];
1623
- this.activeTab = this.tabs[0];
1624
- }
1625
- Object.defineProperty(StockInformationGridComponent.prototype, "activeTabText", {
1626
- get: function () {
1627
- switch (this.activeTab) {
1628
- case this.tabs[0]:
1629
- return "Voorraadregels";
1630
- case this.tabs[1]:
1631
- return "Gevonden in order(s)";
1632
- case this.tabs[2]:
1633
- return "Gevonden in bestellingen";
1634
- default:
1635
- return "Voorraadlocatie regels";
1636
- }
1637
- },
1638
- enumerable: false,
1639
- configurable: true
1640
- });
1641
- StockInformationGridComponent.prototype.handleTabClick = function (tabData) {
1642
- this.activeTab = tabData;
1643
- };
1644
- StockInformationGridComponent.prototype.onLocationClick = function (event) {
1645
- // this.locationLineClicked.emit(event[0].location);
1646
- this.activeTab = "";
1647
- this.hideOrShowLocationTab = true;
1648
- };
1649
- StockInformationGridComponent.prototype.onRowClick = function (args) {
1650
- };
1651
- StockInformationGridComponent.prototype.onPopupClose = function () {
1652
- this.show = false;
1653
- };
1654
- StockInformationGridComponent.prototype.handleHistoryClick = function () {
1655
- this.showStockHistory = true;
1656
- };
1657
- StockInformationGridComponent.prototype.handleCloseClick = function () {
1658
- this.onPopupClose();
1659
- };
1660
- StockInformationGridComponent.prototype.handleStockTransferClick = function (event) {
1661
- this.transferIconClicked.emit(event);
1662
- };
1663
- StockInformationGridComponent.prototype.handleBackToStockClick = function () {
1664
- return __awaiter(this, void 0, void 0, function () {
1665
- return __generator(this, function (_a) {
1666
- this.activeTab = this.tabs[0];
1667
- this.hideOrShowTabs = "show";
1668
- this.hideOrShowStockLocation = "hide";
1669
- this.hideOrShowLocationTab = false;
1670
- return [2 /*return*/];
1671
- });
1672
- });
1673
- };
1674
- StockInformationGridComponent.prototype.handleStickerClick = function () {
1675
- };
1676
- StockInformationGridComponent.prototype.handleTransferClick = function () {
1677
- };
1678
- StockInformationGridComponent.prototype.onOkClick = function () {
1679
- };
1680
- StockInformationGridComponent.prototype.onCancelClick = function () {
1681
- };
1682
- return StockInformationGridComponent;
1683
- }());
1684
- StockInformationGridComponent.decorators = [
1685
- { type: i0.Component, args: [{
1686
- selector: "co-stock-information-grid",
1687
- template: "\n <div class=\"tab-link\" [ngClass]=\"hideOrShowTabs\">\n <co-input-radio-button *ngFor=\"let tab of tabs\"\n (click)=\"handleTabClick(tab)\"\n [textContent]=\"tab\"\n ></co-input-radio-button>\n </div>\n\n <div class=\"stock-line\">\n <div [textContent]=\"activeTabText\"></div>\n\n </div>\n\n <div class=\"stock-grid\">\n <co-simple-grid *ngIf=\"activeTab === tabs[0] && hideOrShowTabs === 'show'\"\n [data]=\"stockInformation\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseNumber'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'warehouseDescription'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'amountAvailable'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ECONOMICAL_STOCK'\" [field]=\"'amountLaterAvailable'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'location'\">\n <ng-template let-row=\"row\">\n <a [textContent]=\"'bekijken'\" (click)=\"onLocationClick($event)\"></a>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[1]\"\n [data]=\"inOrderInformation\"\n >\n <co-simple-grid-column [headerText]=\"'IN_ORDER2'\" [field]=\"'inOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'CUSTOMER'\" [field]=\"'customer'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\" [field]=\"'orderDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'orderAmount'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseNumber'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'warehouseDescription'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'COMMISSION2'\" [field]=\"'commission'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template let-row=\"row\">\n\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template let-row=\"row\">\n\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[2]\"\n [data]=\"orderInformation\"\n >\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER_NR'\" [field]=\"'purchaseOrderNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\" [field]=\"'orderDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'orderAmount'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVED'\" [field]=\"'reserved'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'FREE_STOCK'\" [field]=\"'freeStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DELIVERY_DATE1'\" [field]=\"'deliveryDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVE'\" [field]=\"'reservation'\"></co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-grid\" *ngIf=\"hideOrShowLocationTab\">\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <co-button class=\"stock-lines-button\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></co-button>\n </div>\n <div class=\"stock-location-right-group\">\n <co-input-combo-box [(model)]=\"dataWareHouseCode\"\n [source]=\"\"\n [fields]=\"dataWareHouseFields\"\n [placeholder]=\"'WAREHOUSE'\"\n [required]=\"true\"\n ></co-input-combo-box>\n </div>\n </div>\n\n <co-simple-grid [data]=\"stockLocationInformation\"\n >\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <co-button class=\"stock-lines-button\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></co-button>\n </div>\n </div>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'location'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'BATCH'\" [field]=\"'batch'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SERIAL_NO'\" [field]=\"'serialNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ALLOCATED'\" [field]=\"'allocated'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'amountAvailable'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template let-row=\"row\">\n <span [textContent]=\"'Transfer'\" (click)=\"handleStockTransferClick($event)\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template let-row=\"row\">\n\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-grid\" *ngIf=\"showStockHistory\">\n <co-simple-grid [data]=\"stockHistoryInformation\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'location'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'BATCH'\" [field]=\"'batch'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SERIAL_NO'\" [field]=\"'serialNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ALLOCATED'\" [field]=\"'allocated'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'amountAvailable'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template let-row=\"row\">\n\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-button-toolbar\">\n <div class=\"stock-button-left-group\">\n <co-button [label]=\"'HISTORY'\" (click)=\"handleHistoryClick()\"></co-button>\n </div>\n <div class=\"stock-button-middle-group\">\n <div class=\"button-left\">\n <co-button [textContent]=\"'Ok'\" (click)=\"onOkClick()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button [textContent]=\"'Annuleren'\" (click)=\"onCancelClick()\"></co-button>\n </div>\n </div>\n </div>\n ",
1688
- encapsulation: i0.ViewEncapsulation.None
1689
- },] }
1690
- ];
1691
- StockInformationGridComponent.ctorParameters = function () { return [
1692
- { type: StockService }
1693
- ]; };
1694
- StockInformationGridComponent.propDecorators = {
1695
- stock: [{ type: i0.ViewChild, args: [StockInformationGridComponent,] }],
1696
- locationLineClicked: [{ type: i0.Output }],
1697
- transferIconClicked: [{ type: i0.Output }]
1698
- };
1699
-
1700
- var StockLocationComponent = /** @class */ (function () {
1701
- function StockLocationComponent() {
1702
- this.backToStockLines = new i0.EventEmitter();
1703
- this.MAX_GRID_ROWS = 10;
1704
- this.stockLocationColumns = [];
1705
- this.stockLocation = [
1706
- { location: "title 1", batch: "1", serieNo: "1", amountInStock: "1", allocated: "1", amountAvailable: "1" },
1707
- { location: "title 2", amountInStock: "2" },
1708
- { location: "title 3", amountInStock: "3" },
1709
- { location: "title 4", amountInStock: "4" },
1710
- { location: "title 5", amountInStock: "5" },
1711
- ];
1712
- this.stockLocationColumns.push({ field: "location", headerText: "WAREHOUSE", editType: "none" }, { field: "batch", headerText: "BATCH" }, { field: "serieNo", headerText: "SERIAL_NO" }, { field: "amountInStock", headerText: "STOCK", textAlign: "Right", editType: "numericEdit" }, { field: "allocated", headerText: "ALLOCATED", textAlign: "Right" }, { field: "amountAvailable", headerText: "AVAILABLE_STOCK", textAlign: "Right" }, { field: "PhysicalStock", headerText: "PHYSICAL_STOCK", textAlign: "Right" }, { field: "Valuta", headerText: "VALUTA", textAlign: "Right" }, { field: "PurchasePrice", headerText: "PURSCHASE_PRICE", textAlign: "Right" }, { field: "SupplierNo", headerText: "SUPPLIER_NO", textAlign: "Right" }, { field: "Transfer", headerText: "TRANSFER" }, { field: "sticker", headerText: "STICKER" });
1713
- }
1714
- StockLocationComponent.prototype.backToStockInformation = function () {
1715
- this.backToStockLines.emit();
1716
- };
1717
- StockLocationComponent.prototype.onStickerClick = function (event) {
1718
- console.log('test');
1719
- };
1720
- StockLocationComponent.prototype.onOkClick = function () {
1721
- };
1722
- StockLocationComponent.prototype.onCancelClick = function () {
1723
- };
1724
- return StockLocationComponent;
1725
- }());
1726
- StockLocationComponent.decorators = [
1727
- { type: i0.Component, args: [{
1728
- selector: "co-stock-location",
1729
- template: "\n <div class=\"stock-location-wrapper\">\n <div class=\"buttons-wrapper\">\n <div class=\"stock-button-left-group\">\n <co-button [textContent]=\"'BACK_TO_STOCK_LINES'\" (onClick)=\"backToStockInformation()\"></co-button>\n </div>\n <div class=\"dropdown-wrapper\">\n <co-drop-down-list></co-drop-down-list>\n </div>\n </div>\n\n <div class=\"stock-grid\">\n\n </div>\n <div class=\"button-wrapper\">\n <div class=\"button-left\">\n <co-button (click)=\"onOkClick()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button (click)=\"onCancelClick()\"></co-button>\n </div>\n </div>\n </div>\n\n ",
1730
- encapsulation: i0.ViewEncapsulation.None
1731
- },] }
1732
- ];
1733
- StockLocationComponent.ctorParameters = function () { return []; };
1734
- StockLocationComponent.propDecorators = {
1735
- backToStockLines: [{ type: i0.Output }]
1736
- };
1737
-
1738
- var StockTransferComponent = /** @class */ (function () {
1739
- function StockTransferComponent() {
1740
- this.handleCancelClicked = new i0.EventEmitter();
1741
- this.handleStickerClicked = new i0.EventEmitter();
1742
- }
1743
- StockTransferComponent.prototype.handleOkClick = function () {
1744
- };
1745
- StockTransferComponent.prototype.handleCancelClick = function () {
1746
- this.handleCancelClicked.emit();
1747
- };
1748
- StockTransferComponent.prototype.handleStickerClick = function () {
1749
- this.handleStickerClicked.emit();
1750
- };
1751
- return StockTransferComponent;
1752
- }());
1753
- StockTransferComponent.decorators = [
1754
- { type: i0.Component, args: [{
1755
- selector: "co-stock-transfer",
1756
- template: "\n <div class=\"stock-transfer\">\n <div class=\"stock-transfer-columns\">\n <div class=\"stock-transfer-left-column\">\n <co-input-text disabled [placeholder]=\"'Standaard magazijn'\">\n\n </co-input-text>\n <co-input-text disabled [placeholder]=\"'Standaard locatie'\">\n\n </co-input-text>\n <co-input-text disabled [placeholder]=\"'Batch'\">\n\n </co-input-text>\n <co-input-text disabled [placeholder]=\"'Serie'\">\n\n </co-input-text>\n <co-input-text [placeholder]=\"'Aantal'\">\n\n </co-input-text>\n </div>\n\n <div class=\"stock-transfer-right-column\">\n <co-input-text [placeholder]=\"'Standaard magazijn'\">\n\n </co-input-text>\n <co-input-text [placeholder]=\"'Standaard locatie'\">\n\n </co-input-text>\n <co-input-text [placeholder]=\"'Voorraadstatus'\">\n\n </co-input-text>\n <co-input-text [placeholder]=\"'Omschrijving'\">\n\n </co-input-text>\n </div>\n </div>\n\n <div class=\"ok-cancel-buttons\">\n <co-button [textContent]=\"'Ok'\" (click)=\"handleOkClick()\"></co-button>\n <co-button [textContent]=\"'Annuleren'\" (click)=\"handleCancelClick()\"></co-button>\n <co-button [textContent]=\"'Sticker'\" (click)=\"handleStickerClick()\"></co-button>\n </div>\n </div>\n ",
1757
- encapsulation: i0.ViewEncapsulation.None
1758
- },] }
1759
- ];
1760
- StockTransferComponent.ctorParameters = function () { return []; };
1761
- StockTransferComponent.propDecorators = {
1762
- handleCancelClicked: [{ type: i0.Output }],
1763
- handleStickerClicked: [{ type: i0.Output }]
1764
- };
1765
-
1766
- var StockModule = /** @class */ (function () {
1767
- function StockModule() {
1768
- }
1769
- return StockModule;
1770
- }());
1771
- StockModule.decorators = [
1772
- { type: i0.NgModule, args: [{
1773
- imports: [
1774
- corecomponents_v12.InputComboBoxModule,
1775
- corecomponents_v12.CoGridModule,
1776
- corecomponents_v12.ButtonModule,
1777
- common.CommonModule,
1778
- corecomponents_v12.InputRadioButtonModule,
1779
- corecomponents_v12.DropDownModule,
1780
- corecomponents_v12.SimpleGridModule,
1781
- corecomponents_v12.ImageModule,
1782
- corecomponents_v12.InputTextModule
1783
- ],
1784
- declarations: [
1785
- StockComponent,
1786
- StockInformationComponent,
1787
- StockInformationGridComponent,
1788
- StockLocationComponent,
1789
- StockTransferComponent
1790
- ],
1791
- exports: [
1792
- StockComponent
1793
- ],
1794
- providers: [
1795
- StockService,
1796
- IoneConnectorAdapterService
1797
- ]
1798
- },] }
1799
- ];
1800
-
1801
- /*
1802
- * Public API Surface of sharedcomponents
1803
- */
1804
-
1805
- /**
1806
- * Generated bundle index. Do not edit.
1807
- */
1808
-
1809
- exports.DocsignComponent = DocsignComponent;
1810
- exports.DocsignModule = DocsignModule;
1811
- exports.StockComponent = StockComponent;
1812
- exports.StockModule = StockModule;
1813
- exports["ɵa"] = SignatureComponent;
1814
- exports["ɵb"] = SignaturesComponent;
1815
- exports["ɵc"] = StockService;
1816
- exports["ɵd"] = IoneConnectorAdapterService;
1817
- exports["ɵe"] = StockInformationComponent;
1818
- exports["ɵf"] = StockInformationGridComponent;
1819
- exports["ɵg"] = StockLocationComponent;
1820
- exports["ɵh"] = StockTransferComponent;
1821
-
1822
- Object.defineProperty(exports, '__esModule', { value: true });
1823
-
1824
- }));
1825
- //# sourceMappingURL=colijnit-sharedcomponents.umd.js.map