monkey-front-core 0.0.172 → 0.0.175
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 +72 -39
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +7 -7
- package/esm2020/lib/core/services/storage/monkeyecx-cookie-storage.service.mjs +4 -4
- package/fesm2015/monkey-front-core.mjs +79 -46
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +80 -47
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/storage/monkeyecx-cookie-storage.service.d.ts +1 -1
- package/monkey-front-core-0.0.175.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.172.tgz +0 -0
|
@@ -330,15 +330,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
330
330
|
}]
|
|
331
331
|
}] });
|
|
332
332
|
|
|
333
|
-
/* eslint-disable object-curly-newline */
|
|
334
333
|
class MonkeyEcxCookieStorageService {
|
|
335
334
|
constructor(cookieService) {
|
|
336
335
|
this.cookieService = cookieService;
|
|
337
336
|
// not to do
|
|
338
337
|
}
|
|
339
|
-
setCookie(name, value) {
|
|
338
|
+
setCookie(name, value, environment) {
|
|
340
339
|
this.removeCookie(name);
|
|
341
|
-
|
|
340
|
+
const { urlDomain } = environment;
|
|
341
|
+
this.cookieService.set(name, value, undefined, '/', `.${urlDomain}`, true);
|
|
342
342
|
}
|
|
343
343
|
getCookie(name) {
|
|
344
344
|
return this.cookieService.get(name);
|
|
@@ -1908,6 +1908,8 @@ class MonkeyEcxPopoverDirective {
|
|
|
1908
1908
|
}
|
|
1909
1909
|
set popover(show) {
|
|
1910
1910
|
this._popover = show;
|
|
1911
|
+
console.log('show');
|
|
1912
|
+
console.log(show);
|
|
1911
1913
|
if (show) {
|
|
1912
1914
|
this.createPopover();
|
|
1913
1915
|
}
|
|
@@ -1987,48 +1989,79 @@ class MonkeyEcxPopoverDirective {
|
|
|
1987
1989
|
return [];
|
|
1988
1990
|
}
|
|
1989
1991
|
createPopover(origin, options) {
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
.
|
|
1993
|
-
.
|
|
1994
|
-
.
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
1992
|
+
console.log('1');
|
|
1993
|
+
try {
|
|
1994
|
+
this.templatePortal = new TemplatePortal(this.tpl, this._viewContainerRef);
|
|
1995
|
+
console.log('2');
|
|
1996
|
+
this.positionStrategy = this.overlayPositionBuilder
|
|
1997
|
+
.flexibleConnectedTo(origin || this.target)
|
|
1998
|
+
.withPush(true)
|
|
1999
|
+
.withGrowAfterOpen(true)
|
|
2000
|
+
.withPositions(this.getDirPositions(options?.dir));
|
|
2001
|
+
console.log('3');
|
|
2002
|
+
let width = 0;
|
|
2003
|
+
if (this.options?.minwidth || this.minwidth) {
|
|
2004
|
+
width = this.target.offsetWidth - 2;
|
|
2005
|
+
}
|
|
2006
|
+
console.log('4');
|
|
2007
|
+
console.log('width');
|
|
2008
|
+
console.log(width);
|
|
2009
|
+
this.overlayRef = this.overlay.create({
|
|
2010
|
+
positionStrategy: this.positionStrategy,
|
|
2011
|
+
disposeOnNavigation: true,
|
|
2012
|
+
direction: 'ltr',
|
|
2013
|
+
hasBackdrop: this.backdrop,
|
|
2014
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition({}),
|
|
2015
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
2016
|
+
width,
|
|
2017
|
+
maxHeight: '95%',
|
|
2018
|
+
height: this.height
|
|
2016
2019
|
});
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2020
|
+
console.log('5');
|
|
2021
|
+
let resizeObserver;
|
|
2022
|
+
const subs = this.overlayRef.backdropClick().subscribe((e) => {
|
|
2023
|
+
this.popover = false;
|
|
2024
|
+
console.log('6');
|
|
2025
|
+
subs.unsubscribe();
|
|
2026
|
+
console.log('7');
|
|
2027
|
+
resizeObserver?.disconnect();
|
|
2028
|
+
console.log('8');
|
|
2029
|
+
this.zone.run(() => {
|
|
2030
|
+
console.log('9');
|
|
2031
|
+
if (this.closed) {
|
|
2032
|
+
console.log('10');
|
|
2033
|
+
this.closed(e);
|
|
2034
|
+
}
|
|
2035
|
+
});
|
|
2036
|
+
});
|
|
2037
|
+
console.log('11');
|
|
2038
|
+
const attached = this.overlayRef.attach(this.templatePortal);
|
|
2039
|
+
console.log('12');
|
|
2040
|
+
if (this.watch) {
|
|
2041
|
+
console.log('13');
|
|
2042
|
+
try {
|
|
2043
|
+
console.log('14');
|
|
2044
|
+
if ('ResizeObserver' in window) {
|
|
2045
|
+
console.log('16');
|
|
2046
|
+
resizeObserver = new ResizeObserver(([{ contentRect }]) => {
|
|
2047
|
+
console.log('17');
|
|
2048
|
+
this.overlayRef.updatePosition();
|
|
2049
|
+
})
|
|
2050
|
+
.observe(attached.rootNodes[0]);
|
|
2051
|
+
}
|
|
2026
2052
|
}
|
|
2053
|
+
catch (e) {
|
|
2054
|
+
// not to do
|
|
2055
|
+
}
|
|
2056
|
+
console.log('18');
|
|
2027
2057
|
}
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2058
|
+
console.log('19');
|
|
2059
|
+
}
|
|
2060
|
+
catch (e) {
|
|
2061
|
+
console.log('error no popover');
|
|
2062
|
+
console.log(e);
|
|
2031
2063
|
}
|
|
2064
|
+
console.log('10');
|
|
2032
2065
|
}
|
|
2033
2066
|
ngOnDestroy() {
|
|
2034
2067
|
this.popover = false;
|
|
@@ -2717,7 +2750,7 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
|
|
|
2717
2750
|
i18n = JSON.parse(atob(cookie));
|
|
2718
2751
|
}
|
|
2719
2752
|
else {
|
|
2720
|
-
monkeyecxCookieStorageService.setCookie('monkey-app-locale', btoa(JSON.stringify(i18n)));
|
|
2753
|
+
monkeyecxCookieStorageService.setCookie('monkey-app-locale', btoa(JSON.stringify(i18n)), environment);
|
|
2721
2754
|
if (!cookie)
|
|
2722
2755
|
change = true;
|
|
2723
2756
|
}
|
|
@@ -2727,7 +2760,7 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
|
|
|
2727
2760
|
if (externali18n) {
|
|
2728
2761
|
data = {
|
|
2729
2762
|
...data,
|
|
2730
|
-
EXTERNAL: externali18n
|
|
2763
|
+
EXTERNAL: externali18n
|
|
2731
2764
|
};
|
|
2732
2765
|
}
|
|
2733
2766
|
this.translateService.setTranslation(lang, data, true);
|
|
@@ -2746,17 +2779,17 @@ MonkeyEcxi18nConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12
|
|
|
2746
2779
|
__decorate([
|
|
2747
2780
|
MonkeyEcxCoreService({
|
|
2748
2781
|
httpResponse: {
|
|
2749
|
-
httpCodeIgnore: [404]
|
|
2782
|
+
httpCodeIgnore: [404]
|
|
2750
2783
|
},
|
|
2751
2784
|
requestInProgress: {
|
|
2752
|
-
showProgress: false
|
|
2753
|
-
}
|
|
2785
|
+
showProgress: false
|
|
2786
|
+
}
|
|
2754
2787
|
})
|
|
2755
2788
|
], MonkeyEcxi18nConfigService.prototype, "apply", null);
|
|
2756
2789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxi18nConfigService, decorators: [{
|
|
2757
2790
|
type: Injectable,
|
|
2758
2791
|
args: [{
|
|
2759
|
-
providedIn: 'root'
|
|
2792
|
+
providedIn: 'root'
|
|
2760
2793
|
}]
|
|
2761
2794
|
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: i1$1.TranslateService }, { type: MonkeyEcxCookieStorageService }, { type: MonkeyEcxErrorConfigService }]; }, propDecorators: { apply: [] } });
|
|
2762
2795
|
|