monkey-front-core 0.0.176 → 0.0.179
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.
- package/esm2020/lib/core/directives/monkeyecx-popover.directive.mjs +43 -82
- package/esm2020/lib/core/interfaces/index.mjs +2 -1
- package/esm2020/lib/core/interfaces/monkeyecx-filter.mjs +2 -0
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +2 -3
- package/esm2020/lib/core/specification-search/monkeyecx-specification-search.mjs +10 -1
- package/fesm2015/monkey-front-core.mjs +53 -83
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +52 -83
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/index.d.ts +1 -0
- package/lib/core/interfaces/monkeyecx-filter.d.ts +24 -0
- package/lib/core/specification-search/monkeyecx-specification-search.d.ts +1 -0
- package/monkey-front-core-0.0.179.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.176.tgz +0 -0
|
@@ -1908,19 +1908,11 @@ class MonkeyEcxPopoverDirective {
|
|
|
1908
1908
|
}
|
|
1909
1909
|
set popover(show) {
|
|
1910
1910
|
this._popover = show;
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
try {
|
|
1914
|
-
if (show) {
|
|
1915
|
-
this.createPopover();
|
|
1916
|
-
}
|
|
1917
|
-
else if (this.overlayRef) {
|
|
1918
|
-
this.overlayRef.dispose();
|
|
1919
|
-
}
|
|
1911
|
+
if (show) {
|
|
1912
|
+
this.createPopover();
|
|
1920
1913
|
}
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
console.log(e);
|
|
1914
|
+
else if (this.overlayRef) {
|
|
1915
|
+
this.overlayRef.dispose();
|
|
1924
1916
|
}
|
|
1925
1917
|
}
|
|
1926
1918
|
get target() {
|
|
@@ -1995,79 +1987,48 @@ class MonkeyEcxPopoverDirective {
|
|
|
1995
1987
|
return [];
|
|
1996
1988
|
}
|
|
1997
1989
|
createPopover(origin, options) {
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
maxHeight: '95%',
|
|
2024
|
-
height: this.height
|
|
2025
|
-
});
|
|
2026
|
-
console.log('5');
|
|
2027
|
-
let resizeObserver;
|
|
2028
|
-
const subs = this.overlayRef.backdropClick().subscribe((e) => {
|
|
2029
|
-
this.popover = false;
|
|
2030
|
-
console.log('6');
|
|
2031
|
-
subs.unsubscribe();
|
|
2032
|
-
console.log('7');
|
|
2033
|
-
resizeObserver?.disconnect();
|
|
2034
|
-
console.log('8');
|
|
2035
|
-
this.zone.run(() => {
|
|
2036
|
-
console.log('9');
|
|
2037
|
-
if (this.closed) {
|
|
2038
|
-
console.log('10');
|
|
2039
|
-
this.closed(e);
|
|
2040
|
-
}
|
|
2041
|
-
});
|
|
2042
|
-
});
|
|
2043
|
-
console.log('11');
|
|
2044
|
-
const attached = this.overlayRef.attach(this.templatePortal);
|
|
2045
|
-
console.log('12');
|
|
2046
|
-
if (this.watch) {
|
|
2047
|
-
console.log('13');
|
|
2048
|
-
try {
|
|
2049
|
-
console.log('14');
|
|
2050
|
-
if ('ResizeObserver' in window) {
|
|
2051
|
-
console.log('16');
|
|
2052
|
-
resizeObserver = new ResizeObserver(([{ contentRect }]) => {
|
|
2053
|
-
console.log('17');
|
|
2054
|
-
this.overlayRef.updatePosition();
|
|
2055
|
-
})
|
|
2056
|
-
.observe(attached.rootNodes[0]);
|
|
2057
|
-
}
|
|
1990
|
+
this.templatePortal = new TemplatePortal(this.tpl, this._viewContainerRef);
|
|
1991
|
+
this.positionStrategy = this.overlayPositionBuilder
|
|
1992
|
+
.flexibleConnectedTo(origin || this.target)
|
|
1993
|
+
.withPush(true)
|
|
1994
|
+
.withGrowAfterOpen(true)
|
|
1995
|
+
.withPositions(this.getDirPositions(options?.dir));
|
|
1996
|
+
this.overlayRef = this.overlay.create({
|
|
1997
|
+
positionStrategy: this.positionStrategy,
|
|
1998
|
+
disposeOnNavigation: true,
|
|
1999
|
+
direction: 'ltr',
|
|
2000
|
+
hasBackdrop: this.backdrop,
|
|
2001
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition({}),
|
|
2002
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
2003
|
+
width: (this.options?.minwidth || this.minwidth) ? (this.target.offsetWidth - 2) : undefined,
|
|
2004
|
+
maxHeight: '95%',
|
|
2005
|
+
height: this.height
|
|
2006
|
+
});
|
|
2007
|
+
let resizeObserver;
|
|
2008
|
+
const subs = this.overlayRef.backdropClick().subscribe((e) => {
|
|
2009
|
+
this.popover = false;
|
|
2010
|
+
subs.unsubscribe();
|
|
2011
|
+
resizeObserver?.disconnect();
|
|
2012
|
+
this.zone.run(() => {
|
|
2013
|
+
if (this.closed) {
|
|
2014
|
+
this.closed(e);
|
|
2058
2015
|
}
|
|
2059
|
-
|
|
2060
|
-
|
|
2016
|
+
});
|
|
2017
|
+
});
|
|
2018
|
+
const attached = this.overlayRef.attach(this.templatePortal);
|
|
2019
|
+
if (this.watch) {
|
|
2020
|
+
try {
|
|
2021
|
+
if ('ResizeObserver' in window) {
|
|
2022
|
+
resizeObserver = new ResizeObserver(([{ contentRect }]) => {
|
|
2023
|
+
this.overlayRef.updatePosition();
|
|
2024
|
+
})
|
|
2025
|
+
.observe(attached.rootNodes[0]);
|
|
2061
2026
|
}
|
|
2062
|
-
console.log('18');
|
|
2063
2027
|
}
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
console.log('error no popover');
|
|
2068
|
-
console.log(e);
|
|
2028
|
+
catch (e) {
|
|
2029
|
+
// not to do
|
|
2030
|
+
}
|
|
2069
2031
|
}
|
|
2070
|
-
console.log('20');
|
|
2071
2032
|
}
|
|
2072
2033
|
ngOnDestroy() {
|
|
2073
2034
|
this.popover = false;
|
|
@@ -2769,10 +2730,9 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
|
|
|
2769
2730
|
EXTERNAL: externali18n
|
|
2770
2731
|
};
|
|
2771
2732
|
}
|
|
2733
|
+
this.translateService.setTranslation('pt-BR', data, true);
|
|
2772
2734
|
this.translateService.setTranslation(lang, data, true);
|
|
2773
2735
|
this.translateService.use(lang);
|
|
2774
|
-
if (change)
|
|
2775
|
-
document.location.reload();
|
|
2776
2736
|
}, (err) => {
|
|
2777
2737
|
console.error(`i18n ${i18n?.lang} not found!`);
|
|
2778
2738
|
monkeyecxErrorConfigService.apply('i18n');
|
|
@@ -4830,6 +4790,15 @@ class MonkeyEcxSpecificationSearch {
|
|
|
4830
4790
|
throw new Error(`MonkeyEcxSpecificationSearch Error ${e}`);
|
|
4831
4791
|
}
|
|
4832
4792
|
}
|
|
4793
|
+
handleFieldSeparatedBy(field, signal = ',', op = OpSearch.EQUAL) {
|
|
4794
|
+
return this[field]?.split(signal)?.map((_) => {
|
|
4795
|
+
return {
|
|
4796
|
+
[field]: {
|
|
4797
|
+
[op]: _
|
|
4798
|
+
}
|
|
4799
|
+
};
|
|
4800
|
+
});
|
|
4801
|
+
}
|
|
4833
4802
|
}
|
|
4834
4803
|
|
|
4835
4804
|
class MonkeyFrontCoreModule {
|