monkey-front-components 0.0.440 → 0.0.442

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.
@@ -1367,19 +1367,12 @@ class MECXFilterSelectedItemDateWithActionComponent {
1367
1367
  }
1368
1368
  }
1369
1369
  ngOnChanges(changes) {
1370
- try {
1371
- if (changes.option) {
1372
- const { currentValue } = changes.option;
1373
- if (currentValue && JSON.stringify(currentValue) !== '{}') {
1374
- this.onHandleSelectedValue(currentValue);
1375
- }
1370
+ if (changes.option) {
1371
+ const { currentValue } = changes.option;
1372
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
1373
+ this.onHandleSelectedValue(currentValue);
1376
1374
  }
1377
1375
  }
1378
- catch (e) {
1379
- console.log('=======12');
1380
- console.log(e);
1381
- console.log(changes);
1382
- }
1383
1376
  }
1384
1377
  }
1385
1378
  MECXFilterSelectedItemDateWithActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXFilterSelectedItemDateWithActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1413,19 +1406,12 @@ class MECXFilterSelectedItemDateRangeComponent {
1413
1406
  }
1414
1407
  }
1415
1408
  ngOnChanges(changes) {
1416
- try {
1417
- if (changes.option) {
1418
- const { currentValue } = changes.option;
1419
- if (currentValue && JSON.stringify(currentValue) !== '{}') {
1420
- this.onHandleSelectedValue(currentValue);
1421
- }
1409
+ if (changes.option) {
1410
+ const { currentValue } = changes.option;
1411
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
1412
+ this.onHandleSelectedValue(currentValue);
1422
1413
  }
1423
1414
  }
1424
- catch (e) {
1425
- console.log('=======12');
1426
- console.log(e);
1427
- console.log(changes);
1428
- }
1429
1415
  }
1430
1416
  }
1431
1417
  MECXFilterSelectedItemDateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXFilterSelectedItemDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1495,19 +1481,12 @@ class MECXFilterSelectedItemCurrencyComponent {
1495
1481
  this._value = value;
1496
1482
  }
1497
1483
  ngOnChanges(changes) {
1498
- try {
1499
- if (changes.option) {
1500
- const { currentValue } = changes.option;
1501
- if (currentValue && JSON.stringify(currentValue) !== '{}') {
1502
- this.onHandleSelectedValue(currentValue);
1503
- }
1484
+ if (changes.option) {
1485
+ const { currentValue } = changes.option;
1486
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
1487
+ this.onHandleSelectedValue(currentValue);
1504
1488
  }
1505
1489
  }
1506
- catch (e) {
1507
- console.log('=======13');
1508
- console.log(e);
1509
- console.log(changes);
1510
- }
1511
1490
  }
1512
1491
  }
1513
1492
  MECXFilterSelectedItemCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXFilterSelectedItemCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1528,18 +1507,12 @@ class MECXFilterSelectedItemInputComponent {
1528
1507
  this._value = value;
1529
1508
  }
1530
1509
  ngOnChanges(changes) {
1531
- try {
1532
- if (changes.option) {
1533
- const { currentValue } = changes.option;
1534
- if (currentValue && JSON.stringify(currentValue) !== '{}') {
1535
- this.onHandleSelectedValue(currentValue);
1536
- }
1510
+ if (changes.option) {
1511
+ const { currentValue } = changes.option;
1512
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
1513
+ this.onHandleSelectedValue(currentValue);
1537
1514
  }
1538
1515
  }
1539
- catch (e) {
1540
- console.log('=======11');
1541
- console.log(e);
1542
- }
1543
1516
  }
1544
1517
  }
1545
1518
  MECXFilterSelectedItemInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXFilterSelectedItemInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1568,19 +1541,12 @@ class MECXFilterSelectedItemStatusComponent {
1568
1541
  this._labelMoreValues = '';
1569
1542
  }
1570
1543
  ngOnChanges(changes) {
1571
- try {
1572
- if (changes.option) {
1573
- const { currentValue } = changes.option;
1574
- if (currentValue && JSON.stringify(currentValue) !== '{}') {
1575
- this.onHandleSelectedValue(currentValue);
1576
- }
1544
+ if (changes.option) {
1545
+ const { currentValue } = changes.option;
1546
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
1547
+ this.onHandleSelectedValue(currentValue);
1577
1548
  }
1578
1549
  }
1579
- catch (e) {
1580
- console.log('=======10');
1581
- console.log(e);
1582
- console.log(changes);
1583
- }
1584
1550
  }
1585
1551
  }
1586
1552
  MECXFilterSelectedItemStatusComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXFilterSelectedItemStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1613,20 +1579,13 @@ class MECXFilterOptionsChildrenComponent {
1613
1579
  }
1614
1580
  onHandleChildrenAction(child) {
1615
1581
  const { field, type, action } = child;
1616
- try {
1617
- if (type === 'with-action') {
1618
- this.eventHandle.next(JSON.stringify({
1619
- [field]: action()
1620
- }));
1621
- }
1622
- else {
1623
- this.onShow.next(child);
1624
- }
1582
+ if (type === 'with-action') {
1583
+ this.eventHandle.next(JSON.stringify({
1584
+ [field]: action()
1585
+ }));
1625
1586
  }
1626
- catch (e) {
1627
- console.log('=====7');
1628
- console.log(e);
1629
- console.log(action);
1587
+ else {
1588
+ this.onShow.next(child);
1630
1589
  }
1631
1590
  }
1632
1591
  onHandleValidateSelected({ field, getValue }) {
@@ -1669,19 +1628,12 @@ class MECXFilterOptionsStatusComponent {
1669
1628
  this.eventSubscription.unsubscribe();
1670
1629
  }
1671
1630
  ngOnChanges(changes) {
1672
- try {
1673
- if (changes.option) {
1674
- const { currentValue } = changes.option;
1675
- if (currentValue && JSON.stringify(currentValue) !== '{}') {
1676
- this._value = currentValue?.value;
1677
- }
1631
+ if (changes.option) {
1632
+ const { currentValue } = changes.option;
1633
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
1634
+ this._value = currentValue?.value;
1678
1635
  }
1679
1636
  }
1680
- catch (e) {
1681
- console.log('=====2');
1682
- console.log(e);
1683
- console.log(changes?.option?.currentValue);
1684
- }
1685
1637
  }
1686
1638
  onHandleChecked(cmp) {
1687
1639
  const { _value } = this;
@@ -1703,10 +1655,10 @@ class MECXFilterOptionsStatusComponent {
1703
1655
  }
1704
1656
  }
1705
1657
  MECXFilterOptionsStatusComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXFilterOptionsStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1706
- MECXFilterOptionsStatusComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: MECXFilterOptionsStatusComponent, selector: "mecx-filter-options-status", inputs: { option: "option" }, outputs: { onSubmit: "onSubmit" }, usesOnChanges: true, ngImport: i0, template: "<monkey-checkbox type=\"multiple\" *ngFor=\"let op of option?.values\"\r\n [description]=\"op?.description | translate\" [value]=\"onHandleChecked(op?.value)\"\r\n (click)=\"onChangeFilter($event, op?.value)\">\r\n</monkey-checkbox>", styles: [":host{display:flex;flex-direction:column;max-width:232px;min-width:180px;max-height:500px;padding:12px 12px 8px;color:#72717e;overflow:auto}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox{padding:0!important}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox .mecx-check-container{height:unset!important}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox .mecx-check-container .mecx-check-mark{top:50%;transform:translateY(-50%)}:host ::ng-deep monkey-checkbox{margin:6px 0!important}\n"], components: [{ type: i1$2.MonkeyCheckboxComponent, selector: "monkey-checkbox", inputs: ["label", "type", "helperMessage", "infoMessage", "errorMessage", "description", "value"], outputs: ["onChange"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1$3.TranslatePipe } });
1658
+ MECXFilterOptionsStatusComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: MECXFilterOptionsStatusComponent, selector: "mecx-filter-options-status", inputs: { option: "option" }, outputs: { onSubmit: "onSubmit" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngFor=\"let op of option?.values\">\r\n <div class=\"content-status d-flex flex-column\">\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <monkey-checkbox type=\"multiple\"\r\n [description]=\"op?.description | translate\" [value]=\"onHandleChecked(op?.value)\"\r\n (click)=\"onChangeFilter($event, op?.value)\">\r\n </monkey-checkbox>\r\n <span class=\"helper\" *ngIf=\"op?.helper\">{{ op?.helper }}</span>\r\n </div>\r\n </div>\r\n</ng-container>", styles: [":host{display:flex;flex-direction:column;max-width:232px;min-width:180px;max-height:500px;padding:12px 12px 8px;color:#72717e;overflow:auto}:host .content-status{margin:6px 0}:host .content-status .helper{margin-bottom:4px;font-size:16px;margin-left:12}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox{padding:0!important}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox .mecx-check-container{height:unset!important}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox .mecx-check-container .mecx-check-mark{top:50%;transform:translateY(-50%)}:host ::ng-deep monkey-checkbox{margin:6px 0!important}\n"], components: [{ type: i1$2.MonkeyCheckboxComponent, selector: "monkey-checkbox", inputs: ["label", "type", "helperMessage", "infoMessage", "errorMessage", "description", "value"], outputs: ["onChange"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$3.TranslatePipe } });
1707
1659
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXFilterOptionsStatusComponent, decorators: [{
1708
1660
  type: Component,
1709
- args: [{ selector: 'mecx-filter-options-status', template: "<monkey-checkbox type=\"multiple\" *ngFor=\"let op of option?.values\"\r\n [description]=\"op?.description | translate\" [value]=\"onHandleChecked(op?.value)\"\r\n (click)=\"onChangeFilter($event, op?.value)\">\r\n</monkey-checkbox>", styles: [":host{display:flex;flex-direction:column;max-width:232px;min-width:180px;max-height:500px;padding:12px 12px 8px;color:#72717e;overflow:auto}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox{padding:0!important}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox .mecx-check-container{height:unset!important}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox .mecx-check-container .mecx-check-mark{top:50%;transform:translateY(-50%)}:host ::ng-deep monkey-checkbox{margin:6px 0!important}\n"] }]
1661
+ args: [{ selector: 'mecx-filter-options-status', template: "<ng-container *ngFor=\"let op of option?.values\">\r\n <div class=\"content-status d-flex flex-column\">\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <monkey-checkbox type=\"multiple\"\r\n [description]=\"op?.description | translate\" [value]=\"onHandleChecked(op?.value)\"\r\n (click)=\"onChangeFilter($event, op?.value)\">\r\n </monkey-checkbox>\r\n <span class=\"helper\" *ngIf=\"op?.helper\">{{ op?.helper }}</span>\r\n </div>\r\n </div>\r\n</ng-container>", styles: [":host{display:flex;flex-direction:column;max-width:232px;min-width:180px;max-height:500px;padding:12px 12px 8px;color:#72717e;overflow:auto}:host .content-status{margin:6px 0}:host .content-status .helper{margin-bottom:4px;font-size:16px;margin-left:12}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox{padding:0!important}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox .mecx-check-container{height:unset!important}:host ::ng-deep mecx-form-field mecx-form-field-body.checkbox .mecx-check-container .mecx-check-mark{top:50%;transform:translateY(-50%)}:host ::ng-deep monkey-checkbox{margin:6px 0!important}\n"] }]
1710
1662
  }], ctorParameters: function () { return []; }, propDecorators: { option: [{
1711
1663
  type: Input
1712
1664
  }], onSubmit: [{
@@ -1871,17 +1823,15 @@ class MECXFilterOptionsComponent extends BaseComponent {
1871
1823
  this.closeMenu = () => {
1872
1824
  this._showMenu = false;
1873
1825
  };
1874
- console.log('veio no options do filtro do batman');
1875
1826
  }
1876
1827
  onHandleLoading(loading = false) {
1877
1828
  this._isLoading = loading;
1878
1829
  }
1879
1830
  onHandleLoadValues(first = false) {
1880
- const { values } = this.option;
1881
- if (!values?.length && first) {
1831
+ if (first) {
1882
1832
  this.option?.loadValues?.();
1883
1833
  }
1884
- else if (!first) {
1834
+ else {
1885
1835
  this.option?.loadMoreValues?.();
1886
1836
  }
1887
1837
  }
@@ -1981,24 +1931,18 @@ class MECXFilterSelectedItemComponent {
1981
1931
  this.onSubmit.next({ [field]: null });
1982
1932
  }
1983
1933
  onHandleShowFromChildren(event) {
1984
- try {
1985
- const { _option } = this;
1986
- const { label } = _option;
1987
- this.onHandleShowMenu();
1988
- this.onHandleSubmit = (event) => {
1989
- this.onSubmit.next({
1990
- [_option.field]: JSON.stringify(event)
1991
- });
1992
- };
1993
- this._option = {
1994
- ...event,
1995
- label
1996
- };
1997
- }
1998
- catch (e) {
1999
- console.log('=====9');
2000
- console.log(e);
2001
- }
1934
+ const { _option } = this;
1935
+ const { label } = _option;
1936
+ this.onHandleShowMenu();
1937
+ this.onHandleSubmit = (event) => {
1938
+ this.onSubmit.next({
1939
+ [_option.field]: JSON.stringify(event)
1940
+ });
1941
+ };
1942
+ this._option = {
1943
+ ...event,
1944
+ label
1945
+ };
2002
1946
  }
2003
1947
  }
2004
1948
  MECXFilterSelectedItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXFilterSelectedItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -2035,9 +1979,6 @@ class MECXFilterSelectedComponent {
2035
1979
  }
2036
1980
  catch (e) {
2037
1981
  // not to do
2038
- console.log('=====8');
2039
- console.log(e);
2040
- console.log(value);
2041
1982
  }
2042
1983
  return false;
2043
1984
  }
@@ -2063,19 +2004,12 @@ class MECXFilterSelectedComponent {
2063
2004
  });
2064
2005
  }
2065
2006
  ngOnChanges(changes) {
2066
- try {
2067
- if (changes.model) {
2068
- const { currentValue } = changes.model;
2069
- if (currentValue && JSON.stringify(currentValue) !== '{}') {
2070
- this.onHandleSelectedValue(currentValue);
2071
- }
2007
+ if (changes.model) {
2008
+ const { currentValue } = changes.model;
2009
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
2010
+ this.onHandleSelectedValue(currentValue);
2072
2011
  }
2073
2012
  }
2074
- catch (e) {
2075
- console.log('=====9');
2076
- console.log(e);
2077
- console.log(changes);
2078
- }
2079
2013
  }
2080
2014
  onHandleClose() {
2081
2015
  this.onClose.next();
@@ -2125,9 +2059,6 @@ class MECXFilterMenuComponent {
2125
2059
  }
2126
2060
  catch (e) {
2127
2061
  // not to do
2128
- console.log('=====3');
2129
- console.log(e);
2130
- console.log(value);
2131
2062
  }
2132
2063
  return false;
2133
2064
  }
@@ -2164,44 +2095,30 @@ class MECXFilterMenuComponent {
2164
2095
  });
2165
2096
  }
2166
2097
  ngOnChanges(changes) {
2167
- try {
2168
- if (changes.model) {
2169
- const { currentValue } = changes.model;
2170
- if (currentValue && JSON.stringify(currentValue) !== '{}') {
2171
- this.onHandleMenus(currentValue);
2172
- }
2098
+ if (changes.model) {
2099
+ const { currentValue } = changes.model;
2100
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
2101
+ this.onHandleMenus(currentValue);
2173
2102
  }
2174
2103
  }
2175
- catch (e) {
2176
- console.log('=====4');
2177
- console.log(e);
2178
- console.log(changes?.model?.currentValue);
2179
- }
2180
2104
  }
2181
2105
  onHandleChildrenAction(option, child) {
2182
- try {
2183
- const { field, type, action } = child;
2184
- if (type === 'with-action') {
2106
+ const { field, type, action } = child;
2107
+ if (type === 'with-action') {
2108
+ this.onHandleSubmitValue({
2109
+ [option.field]: JSON.stringify({
2110
+ [field]: action()
2111
+ })
2112
+ });
2113
+ }
2114
+ else {
2115
+ this._showMenu = true;
2116
+ this._menuOption = child;
2117
+ this.onHandleSubmit = (event) => {
2185
2118
  this.onHandleSubmitValue({
2186
- [option.field]: JSON.stringify({
2187
- [field]: action()
2188
- })
2119
+ [option.field]: JSON.stringify(event)
2189
2120
  });
2190
- }
2191
- else {
2192
- this._showMenu = true;
2193
- this._menuOption = child;
2194
- this.onHandleSubmit = (event) => {
2195
- this.onHandleSubmitValue({
2196
- [option.field]: JSON.stringify(event)
2197
- });
2198
- };
2199
- }
2200
- }
2201
- catch (e) {
2202
- console.log('=====5');
2203
- console.log(e);
2204
- console.log(child);
2121
+ };
2205
2122
  }
2206
2123
  }
2207
2124
  onHandleShowMenu(option) {
@@ -2255,7 +2172,6 @@ class MECXFilterComponent {
2255
2172
  this._showOrder = false;
2256
2173
  };
2257
2174
  // not to do
2258
- console.log('veio aqui no filtro do batman');
2259
2175
  }
2260
2176
  set search(value) {
2261
2177
  this._search = value;
@@ -2278,9 +2194,6 @@ class MECXFilterComponent {
2278
2194
  }
2279
2195
  catch (e) {
2280
2196
  // not to do
2281
- console.log('=====6');
2282
- console.log(e);
2283
- console.log(value);
2284
2197
  }
2285
2198
  return false;
2286
2199
  }