@colijnit/sharedcomponents 1.0.21 → 1.0.23

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 (47) hide show
  1. package/bundles/colijnit-sharedcomponents.umd.js +433 -119
  2. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  3. package/colijnit-sharedcomponents-1.0.23.tgz +0 -0
  4. package/colijnit-sharedcomponents.d.ts +3 -3
  5. package/colijnit-sharedcomponents.metadata.json +1 -1
  6. package/esm2015/colijnit-sharedcomponents.js +4 -4
  7. package/esm2015/lib/components/circular-gauge/co-circular-gauge.component.js +125 -0
  8. package/esm2015/lib/components/circular-gauge/co-circular-gauge.module.js +21 -0
  9. package/esm2015/lib/components/linear-gauge/co-linear-gauge.component.js +55 -0
  10. package/esm2015/lib/components/linear-gauge/co-linear-gauge.module.js +19 -0
  11. package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +1 -18
  12. package/esm2015/lib/components/statusbar/statusbar.component.js +81 -0
  13. package/esm2015/lib/components/statusbar/statusbar.module.js +23 -0
  14. package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +7 -2
  15. package/esm2015/lib/components/stock/stock.component.js +33 -18
  16. package/esm2015/lib/components/stock/stock.module.js +2 -4
  17. package/esm2015/lib/service/shared-connector.service.js +13 -14
  18. package/esm2015/lib/service/stock.service.js +24 -22
  19. package/esm2015/public-api.js +7 -1
  20. package/fesm2015/colijnit-sharedcomponents.js +404 -92
  21. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  22. package/lib/components/circular-gauge/co-circular-gauge.component.d.ts +20 -0
  23. package/lib/components/circular-gauge/co-circular-gauge.module.d.ts +2 -0
  24. package/lib/components/circular-gauge/style/_layout.scss +24 -0
  25. package/lib/components/circular-gauge/style/_material-definition.scss +8 -0
  26. package/lib/components/circular-gauge/style/_theme.scss +9 -0
  27. package/lib/components/circular-gauge/style/material.scss +5 -0
  28. package/lib/components/linear-gauge/co-linear-gauge.component.d.ts +16 -0
  29. package/lib/components/linear-gauge/co-linear-gauge.module.d.ts +2 -0
  30. package/lib/components/linear-gauge/style/_layout.scss +22 -0
  31. package/lib/components/linear-gauge/style/_material-definition.scss +8 -0
  32. package/lib/components/linear-gauge/style/_theme.scss +6 -0
  33. package/lib/components/linear-gauge/style/material.scss +5 -0
  34. package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +0 -4
  35. package/lib/components/statusbar/statusbar.component.d.ts +23 -0
  36. package/lib/components/statusbar/statusbar.module.d.ts +2 -0
  37. package/lib/components/statusbar/style/_layout.scss +61 -0
  38. package/lib/components/statusbar/style/_material-definition.scss +23 -0
  39. package/lib/components/statusbar/style/_theme.scss +16 -0
  40. package/lib/components/statusbar/style/material.scss +6 -0
  41. package/lib/components/stock/stock.component.d.ts +10 -6
  42. package/lib/components/stock/style/_layout.scss +1 -2
  43. package/lib/components/stock/style/_material-definition.scss +1 -1
  44. package/lib/service/shared-connector.service.d.ts +1 -1
  45. package/lib/service/stock.service.d.ts +4 -2
  46. package/package.json +1 -1
  47. package/public-api.d.ts +6 -0
@@ -8,6 +8,7 @@ import pdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry';
8
8
  import { CommonModule } from '@angular/common';
9
9
  import SignaturePad from 'signature_pad';
10
10
  import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
11
+ import { PrintPriceStickers } from '@colijnit/sharedapi/build/model/print-price-stickers.bo';
11
12
  import { Articles } from '@colijnit/articleapi/build/articles';
12
13
  import { Sharedapi } from '@colijnit/sharedapi/build/sharedapi';
13
14
  import { Printer } from '@colijnit/sharedapi/build/model/report/printer.bo';
@@ -33,7 +34,6 @@ import { StockManagementWarehouses } from '@colijnit/articleapi/build/model/stoc
33
34
  import { StockLocation } from '@colijnit/articleapi/build/model/stock-location.bo';
34
35
  import { ArticleTransaction } from '@colijnit/articleapi/build/model/article-transaction.bo';
35
36
  import { BehaviorSubject } from 'rxjs';
36
- import { PrintPriceStickers } from '@colijnit/sharedapi/build/model/print-price-stickers.bo';
37
37
  import { GetStockHistoryRequest } from '@colijnit/articleapi/build/model/get-stock-history-request';
38
38
  import { ArticleStock as ArticleStock$1 } from '@colijnit/articleapi/build/model/article-stock';
39
39
  import { CoDialogPromptModule, InputCheckboxModule, InputComboBoxModule, IconModule, InputNumberPickerModule, CoDialogWizardModule, ButtonModule, CoGridModule, InputRadioButtonModule, DropDownModule, SimpleGridModule, ImageModule, InputTextModule, InputTextareaModule } from '@colijnit/corecomponents_v12';
@@ -41,6 +41,7 @@ import * as i1 from '@angular/platform-browser';
41
41
  import { DomSanitizer } from '@angular/platform-browser';
42
42
  import { ArticleStockManagement } from '@colijnit/articleapi/build/model/article-stock-management';
43
43
  import { ArticleTransaction as ArticleTransaction$1 } from '@colijnit/articleapi/build/model/article-transaction';
44
+ import { CircularGaugeModule } from '@syncfusion/ej2-angular-circulargauge';
44
45
 
45
46
  class DocsignComponent {
46
47
  constructor() {
@@ -1276,9 +1277,8 @@ class SharedConnectorService {
1276
1277
  }
1277
1278
  connect() {
1278
1279
  return __awaiter(this, void 0, void 0, function* () {
1279
- this.connector = new Articles(this._optionsService.options);
1280
+ this.articleConnector = new Articles(this._optionsService.options);
1280
1281
  this.sharedConnector = new Sharedapi(this._optionsService.options);
1281
- this._optionsService.options.session = this.connector.session && this.sharedConnector.session;
1282
1282
  });
1283
1283
  }
1284
1284
  getAllPrinters(showAll = true) {
@@ -1345,7 +1345,7 @@ class SharedConnectorService {
1345
1345
  getArticleFullObject(goodId) {
1346
1346
  return __awaiter(this, void 0, void 0, function* () {
1347
1347
  return new Promise((resolve, reject) => {
1348
- return this.connector.getArticleFullObject(goodId).then((result) => {
1348
+ return this.articleConnector.getArticleFullObject(goodId).then((result) => {
1349
1349
  // if (result.validationResult && result.validationResult.success) {
1350
1350
  // if (result.resultObject) {
1351
1351
  // resolve(this._boFactory.makeWithRawBackendData(ArticleExtended, result.resultObject));
@@ -1360,7 +1360,7 @@ class SharedConnectorService {
1360
1360
  getStockHistory(request) {
1361
1361
  return __awaiter(this, void 0, void 0, function* () {
1362
1362
  return new Promise((resolve, reject) => {
1363
- return this.connector.getStockHistory(request).then((result) => {
1363
+ return this.articleConnector.getStockHistory(request).then((result) => {
1364
1364
  if (result.validationResult && result.validationResult.success) {
1365
1365
  if (result.resultObject && result.resultObject.hasOwnProperty("stockHistory")) {
1366
1366
  resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockHistoryBo, result.resultObject.stockHistory));
@@ -1376,7 +1376,7 @@ class SharedConnectorService {
1376
1376
  getStockInformation(data) {
1377
1377
  return __awaiter(this, void 0, void 0, function* () {
1378
1378
  return new Promise((resolve, reject) => {
1379
- return this.connector.getStockInformation(data).then((result) => {
1379
+ return this.articleConnector.getStockInformation(data).then((result) => {
1380
1380
  if (result.validationResult && result.validationResult.success) {
1381
1381
  if (result.resultObjects) {
1382
1382
  resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleStock, result.resultObjects));
@@ -1392,7 +1392,7 @@ class SharedConnectorService {
1392
1392
  getStockManagementWarehouses() {
1393
1393
  return __awaiter(this, void 0, void 0, function* () {
1394
1394
  return new Promise((resolve, reject) => {
1395
- return this.connector.getStockManagementWarehouses().then((result) => {
1395
+ return this.articleConnector.getStockManagementWarehouses().then((result) => {
1396
1396
  if (result.validationResult && result.validationResult.success) {
1397
1397
  if (result.resultObjects) {
1398
1398
  resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockManagementWarehouses, result.resultObjects));
@@ -1408,7 +1408,7 @@ class SharedConnectorService {
1408
1408
  getStockManagementLocations(warehouseNo) {
1409
1409
  return __awaiter(this, void 0, void 0, function* () {
1410
1410
  return new Promise((resolve, reject) => {
1411
- return this.connector.getStockManagementLocations(warehouseNo).then((result) => {
1411
+ return this.articleConnector.getStockManagementLocations(warehouseNo).then((result) => {
1412
1412
  if (result.validationResult && result.validationResult.success) {
1413
1413
  if (result.resultObjects) {
1414
1414
  resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockLocation, result.resultObjects));
@@ -1424,7 +1424,7 @@ class SharedConnectorService {
1424
1424
  getArticleDetails(data) {
1425
1425
  return __awaiter(this, void 0, void 0, function* () {
1426
1426
  return new Promise((resolve, reject) => {
1427
- return this.connector.getArticleDetails(data).then((result) => {
1427
+ return this.articleConnector.getArticleDetails(data).then((result) => {
1428
1428
  if (result.validationResult && result.validationResult.success) {
1429
1429
  if (result.resultObjects) {
1430
1430
  resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleDetailsBo, result.resultObjects));
@@ -1440,7 +1440,7 @@ class SharedConnectorService {
1440
1440
  updateArticleDetails(data) {
1441
1441
  return __awaiter(this, void 0, void 0, function* () {
1442
1442
  return new Promise((resolve, reject) => {
1443
- return this.connector.updateArticleDetails(data).then((result) => __awaiter(this, void 0, void 0, function* () {
1443
+ return this.articleConnector.updateArticleDetails(data).then((result) => __awaiter(this, void 0, void 0, function* () {
1444
1444
  if (result.validationResult && result.validationResult.success) {
1445
1445
  yield this.commit();
1446
1446
  resolve(true);
@@ -1455,7 +1455,7 @@ class SharedConnectorService {
1455
1455
  lockArticleDetails(data) {
1456
1456
  return __awaiter(this, void 0, void 0, function* () {
1457
1457
  return new Promise((resolve, reject) => {
1458
- return this.connector.lockArticleDetails(data).then((result) => __awaiter(this, void 0, void 0, function* () {
1458
+ return this.articleConnector.lockArticleDetails(data).then((result) => __awaiter(this, void 0, void 0, function* () {
1459
1459
  if (result.validationResult && result.validationResult.success) {
1460
1460
  yield this.commit();
1461
1461
  resolve(true);
@@ -1470,7 +1470,7 @@ class SharedConnectorService {
1470
1470
  getStockStatus() {
1471
1471
  return __awaiter(this, void 0, void 0, function* () {
1472
1472
  return new Promise((resolve, reject) => {
1473
- return this.connector.getStockState().then((result) => {
1473
+ return this.articleConnector.getStockState().then((result) => {
1474
1474
  if (result.validationResult && result.validationResult.success) {
1475
1475
  if (result.resultObjects) {
1476
1476
  resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockStatus, result.resultObjects));
@@ -1502,7 +1502,7 @@ class SharedConnectorService {
1502
1502
  getArticleTransaction(data) {
1503
1503
  return __awaiter(this, void 0, void 0, function* () {
1504
1504
  return new Promise((resolve, reject) => {
1505
- return this.connector.getArticleTransaction(data).then((result) => {
1505
+ return this.articleConnector.getArticleTransaction(data).then((result) => {
1506
1506
  if (result.validationResult && result.validationResult.success) {
1507
1507
  if (result.resultObjects) {
1508
1508
  resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleTransaction, result.resultObjects));
@@ -1516,7 +1516,7 @@ class SharedConnectorService {
1516
1516
  });
1517
1517
  }
1518
1518
  commit() {
1519
- return this.connector.commit();
1519
+ return this.articleConnector.commit();
1520
1520
  }
1521
1521
  }
1522
1522
  SharedConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedConnectorService_Factory() { return new SharedConnectorService(i0.ɵɵinject(OptionsService)); }, token: SharedConnectorService, providedIn: "root" });
@@ -1529,58 +1529,35 @@ SharedConnectorService.ctorParameters = () => [
1529
1529
  { type: OptionsService }
1530
1530
  ];
1531
1531
 
1532
- class SharedService {
1533
- constructor(options, connector) {
1534
- this.options = options;
1535
- this.connector = connector;
1536
- }
1537
- init(options) {
1538
- return __awaiter(this, void 0, void 0, function* () {
1539
- yield this.options.initialize(options);
1540
- this.connector.connect();
1541
- });
1542
- }
1543
- }
1544
- SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
1545
- SharedService.decorators = [
1546
- { type: Injectable, args: [{
1547
- providedIn: "root"
1548
- },] }
1549
- ];
1550
- SharedService.ctorParameters = () => [
1551
- { type: OptionsService },
1552
- { type: SharedConnectorService }
1553
- ];
1554
-
1555
- class StockService extends SharedService {
1556
- constructor() {
1557
- super(...arguments);
1532
+ class StockService {
1533
+ constructor(_sharedService) {
1534
+ this._sharedService = _sharedService;
1558
1535
  this.printSticker = new PrintStockStickers();
1559
1536
  this.printPriceSticker = new PrintPriceStickers();
1560
1537
  }
1561
1538
  getPrintStockStickers(data) {
1562
1539
  return __awaiter(this, void 0, void 0, function* () {
1563
- yield this.connector.getPrintStockStickers(data);
1540
+ yield this._sharedService.getPrintStockStickers(data);
1564
1541
  });
1565
1542
  }
1566
1543
  getPrintPriceStickers(data) {
1567
1544
  return __awaiter(this, void 0, void 0, function* () {
1568
- yield this.connector.getPrintPriceStickers(data);
1545
+ yield this._sharedService.getPrintPriceStickers(data);
1569
1546
  });
1570
1547
  }
1571
1548
  getAllPrinters(showAll = true) {
1572
1549
  return __awaiter(this, void 0, void 0, function* () {
1573
- return yield this.connector.getAllPrinters(showAll);
1550
+ return yield this._sharedService.getAllPrinters(showAll);
1574
1551
  });
1575
1552
  }
1576
1553
  getStockHistory(data) {
1577
1554
  return __awaiter(this, void 0, void 0, function* () {
1578
- return yield this.connector.getStockHistory(data);
1555
+ return yield this._sharedService.getStockHistory(data);
1579
1556
  });
1580
1557
  }
1581
1558
  getStockInformation(data) {
1582
1559
  return __awaiter(this, void 0, void 0, function* () {
1583
- return yield this.connector.getStockInformation(data);
1560
+ return yield this._sharedService.getStockInformation(data);
1584
1561
  });
1585
1562
  }
1586
1563
  // public async getStockStickerPrintLayouts(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
@@ -1588,78 +1565,72 @@ class StockService extends SharedService {
1588
1565
  // }
1589
1566
  getArticleDetails(data) {
1590
1567
  return __awaiter(this, void 0, void 0, function* () {
1591
- return yield this.connector.getArticleDetails(data);
1568
+ return yield this._sharedService.getArticleDetails(data);
1592
1569
  });
1593
1570
  }
1594
1571
  updateArticleDetails(data) {
1595
1572
  return __awaiter(this, void 0, void 0, function* () {
1596
- return yield this.connector.updateArticleDetails(data);
1573
+ return yield this._sharedService.updateArticleDetails(data);
1597
1574
  });
1598
1575
  }
1599
1576
  getStockState() {
1600
1577
  return __awaiter(this, void 0, void 0, function* () {
1601
- return yield this.connector.getStockStatus();
1578
+ return yield this._sharedService.getStockStatus();
1602
1579
  });
1603
1580
  }
1604
1581
  getStockStickerTemplates(data) {
1605
1582
  return __awaiter(this, void 0, void 0, function* () {
1606
- return yield this.connector.getStockStickerTemplates(data);
1583
+ return yield this._sharedService.getStockStickerTemplates(data);
1607
1584
  });
1608
1585
  }
1609
1586
  getStockManagementWarehouses() {
1610
1587
  return __awaiter(this, void 0, void 0, function* () {
1611
- return yield this.connector.getStockManagementWarehouses();
1588
+ return yield this._sharedService.getStockManagementWarehouses();
1612
1589
  });
1613
1590
  }
1614
1591
  getStockManagementLocations(warehouseNo) {
1615
1592
  return __awaiter(this, void 0, void 0, function* () {
1616
- return yield this.connector.getStockManagementLocations(warehouseNo);
1593
+ return yield this._sharedService.getStockManagementLocations(warehouseNo);
1617
1594
  });
1618
1595
  }
1619
1596
  getArticleTransaction(data) {
1620
1597
  return __awaiter(this, void 0, void 0, function* () {
1621
- return yield this.connector.getArticleTransaction(data);
1598
+ return yield this._sharedService.getArticleTransaction(data);
1622
1599
  });
1623
1600
  }
1624
1601
  lockArticleDetails(data) {
1625
1602
  return __awaiter(this, void 0, void 0, function* () {
1626
- return yield this.connector.lockArticleDetails(data);
1603
+ return yield this._sharedService.lockArticleDetails(data);
1627
1604
  });
1628
1605
  }
1629
1606
  commit() {
1630
- return this.connector.commit();
1607
+ return this._sharedService.commit();
1631
1608
  }
1632
1609
  }
1633
- StockService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StockService_Factory() { return new StockService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: StockService, providedIn: "root" });
1610
+ StockService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StockService_Factory() { return new StockService(i0.ɵɵinject(SharedConnectorService)); }, token: StockService, providedIn: "root" });
1634
1611
  StockService.decorators = [
1635
1612
  { type: Injectable, args: [{
1636
1613
  providedIn: 'root',
1637
1614
  },] }
1615
+ ];
1616
+ StockService.ctorParameters = () => [
1617
+ { type: SharedConnectorService }
1638
1618
  ];
1639
1619
 
1640
1620
  class StockComponent {
1641
- constructor(stockService, _optionsService) {
1621
+ constructor(stockService, _optionsService, _dictionary, _changeDetector) {
1642
1622
  this.stockService = stockService;
1643
1623
  this._optionsService = _optionsService;
1624
+ this._dictionary = _dictionary;
1625
+ this._changeDetector = _changeDetector;
1644
1626
  this.handleStickerClicked = new EventEmitter();
1645
1627
  this.showStockInformationGrid = true;
1646
1628
  this.showStockLocation = false;
1647
1629
  this.showStockTransfer = false;
1648
1630
  this.allAvailableStock = 0;
1649
1631
  this.allTechnicalStock = 0;
1650
- this._publicOptions = true;
1651
- }
1652
- set options(value) {
1653
- if (value) {
1654
- if (typeof value === "string") {
1655
- this._options = JSON.parse(value);
1656
- }
1657
- else {
1658
- this._options = value;
1659
- }
1660
- this._publicOptions = true;
1661
- this._optionsService.initialize(this._options).then();
1662
- }
1632
+ this._subscriptions = [];
1633
+ this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)));
1663
1634
  }
1664
1635
  set article(article) {
1665
1636
  this.articleExtended = article;
@@ -1669,6 +1640,9 @@ class StockComponent {
1669
1640
  showClass() {
1670
1641
  return true;
1671
1642
  }
1643
+ ngOnDestroy() {
1644
+ this._subscriptions.forEach(subscription => subscription.unsubscribe());
1645
+ }
1672
1646
  backToStockLinesClicked() {
1673
1647
  this.showStockLocation = false;
1674
1648
  this.showStockInformationGrid = true;
@@ -1701,6 +1675,25 @@ class StockComponent {
1701
1675
  this.stockInformation.forEach((articleStock) => this.allTechnicalStock += articleStock.technicalStock);
1702
1676
  });
1703
1677
  }
1678
+ _handleSettingsLoaded(loaded) {
1679
+ return __awaiter(this, void 0, void 0, function* () {
1680
+ if (loaded) {
1681
+ yield this._initConnection().then();
1682
+ }
1683
+ });
1684
+ }
1685
+ _initConnection() {
1686
+ return __awaiter(this, void 0, void 0, function* () {
1687
+ // await this._connector.connect(this._optionsService.options);
1688
+ if (this._optionsService.options.url) {
1689
+ this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
1690
+ }
1691
+ yield this._dictionary.setDictionary(this._optionsService.options.languageCode);
1692
+ setTimeout(() => {
1693
+ this._changeDetector.detectChanges();
1694
+ });
1695
+ });
1696
+ }
1704
1697
  }
1705
1698
  StockComponent.decorators = [
1706
1699
  { type: Component, args: [{
@@ -1743,12 +1736,13 @@ StockComponent.decorators = [
1743
1736
  ];
1744
1737
  StockComponent.ctorParameters = () => [
1745
1738
  { type: StockService },
1746
- { type: OptionsService }
1739
+ { type: OptionsService },
1740
+ { type: DictionaryService },
1741
+ { type: ChangeDetectorRef }
1747
1742
  ];
1748
1743
  StockComponent.propDecorators = {
1749
1744
  stock: [{ type: ViewChild, args: [StockComponent,] }],
1750
1745
  handleStickerClicked: [{ type: Output }],
1751
- options: [{ type: Input }],
1752
1746
  article: [{ type: Input }],
1753
1747
  articleWarehouse: [{ type: Input }],
1754
1748
  allWarehouses: [{ type: Input }],
@@ -2050,6 +2044,7 @@ StockInformationGridComponent.decorators = [
2050
2044
  [showToolbar]="true"
2051
2045
  (addRow)="addNewRow()"
2052
2046
  [inlineEdit]="true"
2047
+ [rowsPerPage]="20"
2053
2048
  >
2054
2049
  <co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'warehouseNo'" [order]="10"></co-simple-grid-column>
2055
2050
  <co-simple-grid-column [headerText]="'DESCRIPTION'" [field]="'warehouseName'" [order]="11"></co-simple-grid-column>
@@ -2066,6 +2061,7 @@ StockInformationGridComponent.decorators = [
2066
2061
  <co-simple-grid *ngIf="activeTab === tabs[1]"
2067
2062
  [data]="inOrderInformation"
2068
2063
  class="simple-grid"
2064
+ [rowsPerPage]="20"
2069
2065
  >
2070
2066
  <co-simple-grid-column [headerText]="'IN_ORDER2'" [field]="'transactionNr'"></co-simple-grid-column>
2071
2067
  <co-simple-grid-column [headerText]="'CUSTOMER'" [field]="'user'"></co-simple-grid-column>
@@ -2089,6 +2085,7 @@ StockInformationGridComponent.decorators = [
2089
2085
  <co-simple-grid *ngIf="activeTab === tabs[2]"
2090
2086
  [data]="orderInformation"
2091
2087
  class="simple-grid"
2088
+ [rowsPerPage]="20"
2092
2089
  >
2093
2090
  <co-simple-grid-column [headerText]="'PURCHASE_ORDER_NR'" [field]="'transactionNr'"></co-simple-grid-column>
2094
2091
  <co-simple-grid-column [headerText]="'DATE'" [field]="'transactionDate'"></co-simple-grid-column>
@@ -2119,6 +2116,7 @@ StockInformationGridComponent.decorators = [
2119
2116
  <!-- TODO move to own component stock-location-->
2120
2117
  <co-simple-grid [data]="articleDetails"
2121
2118
  class="simple-grid"
2119
+ [rowsPerPage]="20"
2122
2120
  >
2123
2121
  <div class="stock-location-group">
2124
2122
  <div class="stock-location-left-group">
@@ -2166,6 +2164,7 @@ StockInformationGridComponent.decorators = [
2166
2164
  </div>
2167
2165
  <co-simple-grid [data]="stockHistoryInformation"
2168
2166
  class="simple-grid"
2167
+ [rowsPerPage]="20"
2169
2168
  >
2170
2169
  <co-simple-grid-column [headerText]="'MUTATION_DATE'" [field]="'mutationDate'"></co-simple-grid-column>
2171
2170
  <co-simple-grid-column [headerText]="'MUTATION_TIME'" [field]="'mutationTime'"></co-simple-grid-column>
@@ -2191,7 +2190,7 @@ StockInformationGridComponent.decorators = [
2191
2190
 
2192
2191
  <div class="stock-button-toolbar">
2193
2192
  <div class="stock-button-left-group">
2194
- <co-button [label]="'HISTORY'" (click)="handleHistoryClick()"></co-button>
2193
+ <co-button *ngIf="activeTab === tabs[0]" [label]="'HISTORY'" (click)="handleHistoryClick()"></co-button>
2195
2194
  </div>
2196
2195
  <div class="stock-button-middle-group">
2197
2196
  <div class="button-left">
@@ -2462,24 +2461,8 @@ class SendMethodDialogComponent {
2462
2461
  this.startSignatureClicked = new EventEmitter();
2463
2462
  this.printButtonClicked = new EventEmitter();
2464
2463
  this._subscriptions = [];
2465
- this._publicOptions = true;
2466
2464
  this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)));
2467
2465
  }
2468
- set options(value) {
2469
- if (value) {
2470
- if (typeof value === "string") {
2471
- this._options = JSON.parse(value);
2472
- }
2473
- else {
2474
- this._options = value;
2475
- }
2476
- this._publicOptions = true;
2477
- this._optionsService.initialize(this._options).then();
2478
- }
2479
- }
2480
- get options() {
2481
- return this._options;
2482
- }
2483
2466
  set articleData(data) {
2484
2467
  this.stockService.printSticker.goodId = data.goodId;
2485
2468
  this.stockService.printSticker.warehouse = data.warehouseNo;
@@ -2725,7 +2708,6 @@ SendMethodDialogComponent.propDecorators = {
2725
2708
  showPrintPriceStickers: [{ type: Input }],
2726
2709
  showPrintStockStickers: [{ type: Input }],
2727
2710
  priceListCodeData: [{ type: Input }],
2728
- options: [{ type: Input }],
2729
2711
  showDialog: [{ type: Input }],
2730
2712
  headerTitle: [{ type: Input }],
2731
2713
  printerList: [{ type: Input }],
@@ -2858,8 +2840,7 @@ StockModule.decorators = [
2858
2840
  StockComponent
2859
2841
  ],
2860
2842
  providers: [
2861
- StockService,
2862
- SharedConnectorService
2843
+ StockService
2863
2844
  ]
2864
2845
  },] }
2865
2846
  ];
@@ -3187,6 +3168,337 @@ LayoutSwitcherModule.decorators = [
3187
3168
  },] }
3188
3169
  ];
3189
3170
 
3171
+ var GaugeColor$1;
3172
+ (function (GaugeColor) {
3173
+ GaugeColor["Low"] = "#E0E0E0";
3174
+ GaugeColor["Medium"] = "#F88952";
3175
+ GaugeColor["High"] = "#5FDCB3";
3176
+ })(GaugeColor$1 || (GaugeColor$1 = {}));
3177
+ class CoCircularGaugeComponent {
3178
+ constructor() {
3179
+ this._color = GaugeColor$1.Low;
3180
+ this.majorTicks = {
3181
+ height: 0,
3182
+ };
3183
+ this.minorTicks = {
3184
+ height: 0
3185
+ };
3186
+ this.labelStyle = {
3187
+ position: 'Inside', useRangeColor: true,
3188
+ font: { size: '0px', fontFamily: 'inherit' }
3189
+ };
3190
+ this.lineStyle = {
3191
+ width: 0
3192
+ };
3193
+ this.ranges = [
3194
+ {
3195
+ start: 1, end: 100,
3196
+ radius: '13px',
3197
+ startWidth: 3, endWidth: 3,
3198
+ color: '#E0E0E0',
3199
+ roundedCornerRadius: 0
3200
+ },
3201
+ ];
3202
+ }
3203
+ set value(value) {
3204
+ this._value = value;
3205
+ this._setColor();
3206
+ }
3207
+ get value() {
3208
+ return this._value;
3209
+ }
3210
+ get color() {
3211
+ return this._color;
3212
+ }
3213
+ showClass() {
3214
+ return true;
3215
+ }
3216
+ getAxes() {
3217
+ return [{
3218
+ minimum: 0,
3219
+ maximum: 100,
3220
+ radius: '15px',
3221
+ startAngle: 1,
3222
+ endAngle: 360,
3223
+ majorTicks: this.majorTicks,
3224
+ minorTicks: this.minorTicks,
3225
+ labelStyle: this.labelStyle,
3226
+ lineStyle: this.lineStyle,
3227
+ ranges: this.ranges,
3228
+ pointers: this.getPointers(),
3229
+ annotations: this.getAnnotations(),
3230
+ }];
3231
+ }
3232
+ getPointers() {
3233
+ if (this.value) {
3234
+ return [{
3235
+ roundedCornerRadius: 0,
3236
+ value: this.value,
3237
+ type: 'RangeBar',
3238
+ radius: '13px',
3239
+ color: this.color,
3240
+ border: {
3241
+ width: 0
3242
+ },
3243
+ animation: {
3244
+ enable: false
3245
+ },
3246
+ pointerWidth: 3
3247
+ }];
3248
+ }
3249
+ }
3250
+ ;
3251
+ getAnnotations() {
3252
+ if (this.value) {
3253
+ return [{
3254
+ content: '<div class="annotation">' +
3255
+ this.value + '%</div>',
3256
+ angle: 90,
3257
+ radius: '50%',
3258
+ zIndex: '10',
3259
+ }];
3260
+ }
3261
+ }
3262
+ _setColor() {
3263
+ if (this.value == 0) {
3264
+ this._color = GaugeColor$1.Low;
3265
+ }
3266
+ else if (this.value >= 0 && this.value < 100) {
3267
+ this._color = GaugeColor$1.Medium;
3268
+ }
3269
+ else if (this.value == 100) {
3270
+ this._color = GaugeColor$1.High;
3271
+ }
3272
+ }
3273
+ }
3274
+ CoCircularGaugeComponent.decorators = [
3275
+ { type: Component, args: [{
3276
+ selector: "co-circular-gauge",
3277
+ template: `
3278
+ <div class="circular-gauge-wrapper">
3279
+ <ejs-circulargauge
3280
+ class="circular-gauge"
3281
+ [width]="'100%'"
3282
+ [axes]="getAxes()">
3283
+ </ejs-circulargauge>
3284
+ </div>
3285
+ `,
3286
+ encapsulation: ViewEncapsulation.None
3287
+ },] }
3288
+ ];
3289
+ CoCircularGaugeComponent.propDecorators = {
3290
+ circulargauge: [{ type: ViewChild, args: ['circulargauge',] }],
3291
+ value: [{ type: Input }],
3292
+ showClass: [{ type: HostBinding, args: ["class.co-circular-gauge",] }]
3293
+ };
3294
+
3295
+ class CoCircularGaugeModule {
3296
+ }
3297
+ CoCircularGaugeModule.decorators = [
3298
+ { type: NgModule, args: [{
3299
+ imports: [
3300
+ CommonModule,
3301
+ CircularGaugeModule
3302
+ ],
3303
+ declarations: [
3304
+ CoCircularGaugeComponent
3305
+ ],
3306
+ exports: [
3307
+ CoCircularGaugeComponent
3308
+ ]
3309
+ },] }
3310
+ ];
3311
+
3312
+ var GaugeColor;
3313
+ (function (GaugeColor) {
3314
+ GaugeColor["Low"] = "#E0E0E0";
3315
+ GaugeColor["Medium"] = "#F88952";
3316
+ GaugeColor["High"] = "#5FDCB3";
3317
+ })(GaugeColor || (GaugeColor = {}));
3318
+ class CoLinearGaugeComponent {
3319
+ constructor() {
3320
+ this.color = GaugeColor.Low;
3321
+ }
3322
+ set value(value) {
3323
+ this._value = value;
3324
+ this._setColor();
3325
+ }
3326
+ get value() {
3327
+ return this._value;
3328
+ }
3329
+ showClass() {
3330
+ return true;
3331
+ }
3332
+ getStyle() {
3333
+ return `linear-gradient(90deg, ${this.color} 0 ${this.value}%, white ${this.value}% 100%`;
3334
+ }
3335
+ _setColor() {
3336
+ if (this.value == 0) {
3337
+ this.color = GaugeColor.Low;
3338
+ }
3339
+ else if (this.value >= 0 && this.value < 100) {
3340
+ this.color = GaugeColor.Medium;
3341
+ }
3342
+ else if (this.value == 100) {
3343
+ this.color = GaugeColor.High;
3344
+ }
3345
+ }
3346
+ }
3347
+ CoLinearGaugeComponent.decorators = [
3348
+ { type: Component, args: [{
3349
+ selector: "co-linear-gauge",
3350
+ template: `
3351
+ <div class="linear-gauge"
3352
+ [style.background]="getStyle()"
3353
+ [style.border-color]="color"
3354
+ [textContent]="count ? count : ''"
3355
+ ></div>
3356
+ `,
3357
+ encapsulation: ViewEncapsulation.None
3358
+ },] }
3359
+ ];
3360
+ CoLinearGaugeComponent.propDecorators = {
3361
+ value: [{ type: Input }],
3362
+ count: [{ type: Input }],
3363
+ showClass: [{ type: HostBinding, args: ["class.co-linear-gauge",] }]
3364
+ };
3365
+
3366
+ class CoLinearGaugeModule {
3367
+ }
3368
+ CoLinearGaugeModule.decorators = [
3369
+ { type: NgModule, args: [{
3370
+ imports: [
3371
+ CommonModule,
3372
+ ],
3373
+ declarations: [
3374
+ CoLinearGaugeComponent
3375
+ ],
3376
+ exports: [
3377
+ CoLinearGaugeComponent
3378
+ ]
3379
+ },] }
3380
+ ];
3381
+
3382
+ class StatusbarComponent {
3383
+ constructor() {
3384
+ this.statusbarClick = new EventEmitter();
3385
+ this.showPopup = false;
3386
+ this.popupClass = 'dropdown';
3387
+ }
3388
+ set statusbarData(value) {
3389
+ this._statusbarData = value;
3390
+ }
3391
+ get statusbarData() {
3392
+ return this._statusbarData;
3393
+ }
3394
+ showClass() {
3395
+ return true;
3396
+ }
3397
+ onHover(event) {
3398
+ this.showPopup = true;
3399
+ this._mouseY = event.screenY;
3400
+ this._windowHeight = window.innerHeight;
3401
+ this.setPopupClass();
3402
+ }
3403
+ onLeave() {
3404
+ this.showPopup = false;
3405
+ }
3406
+ onStatusbarClick() {
3407
+ this.statusbarClick.emit();
3408
+ }
3409
+ setPopupClass() {
3410
+ const popupHeight = this.statusbarData.length * 30;
3411
+ let dropdownInScreen = (this._mouseY + popupHeight) <= this._windowHeight;
3412
+ if (dropdownInScreen) {
3413
+ this.popupClass = 'dropdown';
3414
+ }
3415
+ else {
3416
+ this.popupClass = 'dropup';
3417
+ }
3418
+ }
3419
+ }
3420
+ StatusbarComponent.decorators = [
3421
+ { type: Component, args: [{
3422
+ selector: "co-statusbar",
3423
+ template: `
3424
+ <div class="co-statusbar-wrapper"
3425
+ *ngIf="statusbarData"
3426
+ (mouseover)="onHover($event)"
3427
+ (mouseleave)="onLeave()"
3428
+ (click)="onStatusbarClick()">
3429
+ <div class="statuses">
3430
+ <div *ngFor="let data of statusbarData; let index = index" class="status">
3431
+ <co-linear-gauge [value]="data.percentage" [count]="data.count ? data.count : undefined"></co-linear-gauge>
3432
+ </div>
3433
+ </div>
3434
+ <div class=status-description-popup *ngIf="showPopup" @showHidePopup [ngClass]="popupClass">
3435
+ <div class="status-descriptions">
3436
+ <div *ngFor="let data of statusbarData; let index = index" class="status-description">
3437
+ <co-circular-gauge [value]="data.percentage"></co-circular-gauge>
3438
+ <span [textContent]="data.label"></span>
3439
+ </div>
3440
+ </div>
3441
+ </div>
3442
+ </div>
3443
+ `,
3444
+ animations: [
3445
+ trigger("showHidePopup", [
3446
+ state("void", style({ opacity: 0 })),
3447
+ state("*", style({ opacity: 1 })),
3448
+ transition("void <=> *", animate("250ms ease-in-out")),
3449
+ ])
3450
+ ],
3451
+ encapsulation: ViewEncapsulation.None
3452
+ },] }
3453
+ ];
3454
+ StatusbarComponent.ctorParameters = () => [];
3455
+ StatusbarComponent.propDecorators = {
3456
+ statusbarData: [{ type: Input }],
3457
+ statusbarClick: [{ type: Output }],
3458
+ showClass: [{ type: HostBinding, args: ["class.co-statusbar",] }]
3459
+ };
3460
+
3461
+ class StatusbarModule {
3462
+ }
3463
+ StatusbarModule.decorators = [
3464
+ { type: NgModule, args: [{
3465
+ imports: [
3466
+ CommonModule,
3467
+ CoCircularGaugeModule,
3468
+ CoLinearGaugeModule
3469
+ ],
3470
+ declarations: [
3471
+ StatusbarComponent
3472
+ ],
3473
+ exports: [
3474
+ StatusbarComponent
3475
+ ]
3476
+ },] }
3477
+ ];
3478
+
3479
+ class SharedService {
3480
+ constructor(options, connector) {
3481
+ this.options = options;
3482
+ this.connector = connector;
3483
+ }
3484
+ init(options) {
3485
+ return __awaiter(this, void 0, void 0, function* () {
3486
+ yield this.options.initialize(options);
3487
+ this.connector.connect();
3488
+ });
3489
+ }
3490
+ }
3491
+ SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
3492
+ SharedService.decorators = [
3493
+ { type: Injectable, args: [{
3494
+ providedIn: "root"
3495
+ },] }
3496
+ ];
3497
+ SharedService.ctorParameters = () => [
3498
+ { type: OptionsService },
3499
+ { type: SharedConnectorService }
3500
+ ];
3501
+
3190
3502
  /*
3191
3503
  * Public API Surface of sharedcomponents
3192
3504
  */
@@ -3195,5 +3507,5 @@ LayoutSwitcherModule.decorators = [
3195
3507
  * Generated bundle index. Do not edit.
3196
3508
  */
3197
3509
 
3198
- export { DocsignComponent, DocsignModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, StockComponent, StockModule, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockService as ɵc, OptionsService as ɵd, DictionaryService as ɵe, SharedConnectorService as ɵf, IconCacheService as ɵg, StockInformationComponent as ɵh, StockInformationGridComponent as ɵi, StockLocationComponent as ɵj, StockTransferComponent as ɵk, StockChangeAmountComponent as ɵl };
3510
+ export { CoCircularGaugeComponent, CoCircularGaugeModule, CoLinearGaugeComponent, CoLinearGaugeModule, DocsignComponent, DocsignModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, StatusbarComponent, StatusbarModule, StockComponent, StockModule, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockService as ɵc, SharedConnectorService as ɵd, OptionsService as ɵe, DictionaryService as ɵf, IconCacheService as ɵg, StockInformationComponent as ɵh, StockInformationGridComponent as ɵi, StockLocationComponent as ɵj, StockTransferComponent as ɵk, StockChangeAmountComponent as ɵl };
3199
3511
  //# sourceMappingURL=colijnit-sharedcomponents.js.map