monkey-front-core 0.0.171 → 0.0.174
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 +49 -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 +56 -46
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +57 -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.174.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-core-0.0.171.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);
|
|
@@ -1987,47 +1987,57 @@ class MonkeyEcxPopoverDirective {
|
|
|
1987
1987
|
return [];
|
|
1988
1988
|
}
|
|
1989
1989
|
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
|
-
resizeObserver?.disconnect();
|
|
2012
|
-
this.zone.run(() => {
|
|
2013
|
-
if (this.closed) {
|
|
2014
|
-
this.closed(e);
|
|
2015
|
-
}
|
|
1990
|
+
try {
|
|
1991
|
+
this.templatePortal = new TemplatePortal(this.tpl, this._viewContainerRef);
|
|
1992
|
+
this.positionStrategy = this.overlayPositionBuilder
|
|
1993
|
+
.flexibleConnectedTo(origin || this.target)
|
|
1994
|
+
.withPush(true)
|
|
1995
|
+
.withGrowAfterOpen(true)
|
|
1996
|
+
.withPositions(this.getDirPositions(options?.dir));
|
|
1997
|
+
let width = 0;
|
|
1998
|
+
if (this.options?.minwidth || this.minwidth) {
|
|
1999
|
+
width = this.target.offsetWidth - 2;
|
|
2000
|
+
}
|
|
2001
|
+
this.overlayRef = this.overlay.create({
|
|
2002
|
+
positionStrategy: this.positionStrategy,
|
|
2003
|
+
disposeOnNavigation: true,
|
|
2004
|
+
direction: 'ltr',
|
|
2005
|
+
hasBackdrop: this.backdrop,
|
|
2006
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition({}),
|
|
2007
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
2008
|
+
width,
|
|
2009
|
+
maxHeight: '95%',
|
|
2010
|
+
height: this.height
|
|
2016
2011
|
});
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2012
|
+
let resizeObserver;
|
|
2013
|
+
const subs = this.overlayRef.backdropClick().subscribe((e) => {
|
|
2014
|
+
this.popover = false;
|
|
2015
|
+
subs.unsubscribe();
|
|
2016
|
+
resizeObserver?.disconnect();
|
|
2017
|
+
this.zone.run(() => {
|
|
2018
|
+
if (this.closed) {
|
|
2019
|
+
this.closed(e);
|
|
2020
|
+
}
|
|
2021
|
+
});
|
|
2022
|
+
});
|
|
2023
|
+
const attached = this.overlayRef.attach(this.templatePortal);
|
|
2024
|
+
if (this.watch) {
|
|
2025
|
+
try {
|
|
2026
|
+
if ('ResizeObserver' in window) {
|
|
2027
|
+
resizeObserver = new ResizeObserver(([{ contentRect }]) => {
|
|
2028
|
+
this.overlayRef.updatePosition();
|
|
2029
|
+
})
|
|
2030
|
+
.observe(attached.rootNodes[0]);
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
catch (e) {
|
|
2034
|
+
// not to do
|
|
2026
2035
|
}
|
|
2027
2036
|
}
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2037
|
+
}
|
|
2038
|
+
catch (e) {
|
|
2039
|
+
console.log('error no popover');
|
|
2040
|
+
console.log(e);
|
|
2031
2041
|
}
|
|
2032
2042
|
}
|
|
2033
2043
|
ngOnDestroy() {
|
|
@@ -2717,7 +2727,7 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
|
|
|
2717
2727
|
i18n = JSON.parse(atob(cookie));
|
|
2718
2728
|
}
|
|
2719
2729
|
else {
|
|
2720
|
-
monkeyecxCookieStorageService.setCookie('monkey-app-locale', btoa(JSON.stringify(i18n)));
|
|
2730
|
+
monkeyecxCookieStorageService.setCookie('monkey-app-locale', btoa(JSON.stringify(i18n)), environment);
|
|
2721
2731
|
if (!cookie)
|
|
2722
2732
|
change = true;
|
|
2723
2733
|
}
|
|
@@ -2727,7 +2737,7 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
|
|
|
2727
2737
|
if (externali18n) {
|
|
2728
2738
|
data = {
|
|
2729
2739
|
...data,
|
|
2730
|
-
EXTERNAL: externali18n
|
|
2740
|
+
EXTERNAL: externali18n
|
|
2731
2741
|
};
|
|
2732
2742
|
}
|
|
2733
2743
|
this.translateService.setTranslation(lang, data, true);
|
|
@@ -2746,17 +2756,17 @@ MonkeyEcxi18nConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12
|
|
|
2746
2756
|
__decorate([
|
|
2747
2757
|
MonkeyEcxCoreService({
|
|
2748
2758
|
httpResponse: {
|
|
2749
|
-
httpCodeIgnore: [404]
|
|
2759
|
+
httpCodeIgnore: [404]
|
|
2750
2760
|
},
|
|
2751
2761
|
requestInProgress: {
|
|
2752
|
-
showProgress: false
|
|
2753
|
-
}
|
|
2762
|
+
showProgress: false
|
|
2763
|
+
}
|
|
2754
2764
|
})
|
|
2755
2765
|
], MonkeyEcxi18nConfigService.prototype, "apply", null);
|
|
2756
2766
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxi18nConfigService, decorators: [{
|
|
2757
2767
|
type: Injectable,
|
|
2758
2768
|
args: [{
|
|
2759
|
-
providedIn: 'root'
|
|
2769
|
+
providedIn: 'root'
|
|
2760
2770
|
}]
|
|
2761
2771
|
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: i1$1.TranslateService }, { type: MonkeyEcxCookieStorageService }, { type: MonkeyEcxErrorConfigService }]; }, propDecorators: { apply: [] } });
|
|
2762
2772
|
|