@lucca-front/ng 15.2.0 → 15.2.2
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/modal/lib/modal-ref.model.mjs +1 -1
- package/esm2020/modal/lib/modal.service.mjs +9 -5
- package/esm2020/modal/lib/modal.token.mjs +2 -8
- package/esm2020/popup/lib/popup.service.mjs +1 -1
- package/esm2020/popup/lib/popup.token.mjs +2 -8
- package/esm2020/sidepanel/lib/sidepanel.model.mjs +7 -2
- package/esm2020/sidepanel/lib/sidepanel.service.mjs +1 -1
- package/fesm2015/lucca-front-ng-modal.mjs +10 -11
- package/fesm2015/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2015/lucca-front-ng-popup.mjs +1 -7
- package/fesm2015/lucca-front-ng-popup.mjs.map +1 -1
- package/fesm2015/lucca-front-ng-sidepanel.mjs +1 -0
- package/fesm2015/lucca-front-ng-sidepanel.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-modal.mjs +10 -11
- package/fesm2020/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-popup.mjs +1 -7
- package/fesm2020/lucca-front-ng-popup.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-sidepanel.mjs +1 -0
- package/fesm2020/lucca-front-ng-sidepanel.mjs.map +1 -1
- package/modal/lib/modal-ref.model.d.ts +4 -0
- package/modal/lib/modal.service.d.ts +9 -6
- package/modal/lib/modal.token.d.ts +2 -2
- package/package.json +3 -3
- package/popup/lib/popup.service.d.ts +5 -5
- package/sidepanel/lib/sidepanel.model.d.ts +6 -1
- package/sidepanel/lib/sidepanel.service.d.ts +7 -8
|
@@ -8,4 +8,4 @@ export class ALuModalRef extends ALuPopupRef {
|
|
|
8
8
|
return luModalClasses[this.mode];
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI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dfQ==
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { LuPopup } from '@lucca-front/ng/popup';
|
|
3
2
|
import { LU_MODAL_CONFIG, LU_MODAL_REF_FACTORY } from './modal.token';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
export class LuModal
|
|
4
|
+
export class LuModal {
|
|
6
5
|
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
6
|
this._factory = inject(LU_MODAL_REF_FACTORY);
|
|
9
7
|
this._config = inject(LU_MODAL_CONFIG);
|
|
10
8
|
}
|
|
9
|
+
open(component, data = undefined, config = {}) {
|
|
10
|
+
const extendedConfig = { ...this._config, ...config };
|
|
11
|
+
const ref = this._factory.forge(component, extendedConfig);
|
|
12
|
+
ref.open(data);
|
|
13
|
+
return ref;
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
|
-
LuModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, deps:
|
|
16
|
+
LuModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13
17
|
LuModal.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal });
|
|
14
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, decorators: [{
|
|
15
19
|
type: Injectable
|
|
16
20
|
}] });
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL25nL21vZGFsL3NyYy9saW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SAnLi9tb2RhbC1yZWYubW9kZWwnO1xyXG5pbXBvcnQgeyBJTHVNb2RhbENvbnRlbnQgfSBmcm9tICcuL21vZGFsLm1vZGVsJztcclxuaW1wb3J0IHsgTFVfTU9EQUxfQ09ORklHLCBMVV9NT0RBTF9SRUZfRkFDVE9SWSB9IGZyb20gJy4vbW9kYWwudG9rZW4nO1xyXG5cclxuQEluamVjdGFibGUoKVxyXG5leHBvcnQgY2xhc3MgTHVNb2RhbCB7XHJcblx0cHJvdGVjdGVkIF9mYWN0b3J5ID0gaW5qZWN0KExVX01PREFMX1JFRl9GQUNUT1JZKTtcclxuXHRwcm90ZWN0ZWQgX2NvbmZpZyA9IGluamVjdChMVV9NT0RBTF9DT05GSUcpO1xyXG5cclxuXHRvcGVuPFQgZXh0ZW5kcyBJTHVNb2RhbENvbnRlbnQ8Uj4sIEQsIFI+KGNvbXBvbmVudDogQ29tcG9uZW50VHlwZTxUPiwgZGF0YTogRCA9IHVuZGVmaW5lZCwgY29uZmlnOiBQYXJ0aWFsPEx1TW9kYWxDb25maWc+ID0ge30pOiBJTHVNb2RhbFJlZjxULCBELCBSPiB7XHJcblx0XHRjb25zdCBleHRlbmRlZENvbmZpZyA9IHsgLi4udGhpcy5fY29uZmlnLCAuLi5jb25maWcgfSBhcyBMdU1vZGFsQ29uZmlnO1xyXG5cdFx0Y29uc3QgcmVmID0gdGhpcy5fZmFjdG9yeS5mb3JnZTxULCBMdU1vZGFsQ29uZmlnLCBELCBUIGV4dGVuZHMgSUx1TW9kYWxDb250ZW50PGluZmVyIFI+ID8gUiA6IHVua25vd24+KGNvbXBvbmVudCwgZXh0ZW5kZWRDb25maWcpO1xyXG5cdFx0cmVmLm9wZW4oZGF0YSk7XHJcblx0XHRyZXR1cm4gcmVmO1xyXG5cdH1cclxufVxyXG4iXX0=
|
|
@@ -5,11 +5,5 @@ export const LU_MODAL_DATA = new InjectionToken('LuModalData');
|
|
|
5
5
|
export const LU_MODAL_CONFIG = new InjectionToken('LuModalDefaultConfig', {
|
|
6
6
|
factory: () => luDefaultModalConfig,
|
|
7
7
|
});
|
|
8
|
-
export const LU_MODAL_REF_FACTORY = new InjectionToken('LuModalRefFactory'
|
|
9
|
-
|
|
10
|
-
forge() {
|
|
11
|
-
throw new Error('[LuModalRefFactory] Cannot call forge, LuModalRefFactory needs to be overriden.');
|
|
12
|
-
},
|
|
13
|
-
}),
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwudG9rZW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9uZy9tb2RhbC9zcmMvbGliL21vZGFsLnRva2VuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFL0MsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFHOUQsMEZBQTBGO0FBQzFGLE1BQU0sQ0FBQyxNQUFNLGFBQWEsR0FBRyxJQUFJLGNBQWMsQ0FBVSxhQUFhLENBQUMsQ0FBQztBQUN4RSxNQUFNLENBQUMsTUFBTSxlQUFlLEdBQUcsSUFBSSxjQUFjLENBQWdCLHNCQUFzQixFQUFFO0lBQ3hGLE9BQU8sRUFBRSxHQUFHLEVBQUUsQ0FBQyxvQkFBb0I7Q0FDbkMsQ0FBQyxDQUFDO0FBQ0gsTUFBTSxDQUFDLE1BQU0sb0JBQW9CLEdBQUcsSUFBSSxjQUFjLENBQXFCLG1CQUFtQixFQUFFO0lBQy9GLE9BQU8sRUFBRSxHQUFHLEVBQUUsQ0FBQyxDQUFDO1FBQ2YsS0FBSztZQUNKLE1BQU0sSUFBSSxLQUFLLENBQUMsaUZBQWlGLENBQUMsQ0FBQztRQUNwRyxDQUFDO0tBQ0QsQ0FBQztDQUNGLENBQU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G5pbXBvcnQgeyBJTW9kYWxSZWZGYWN0b3J5IH0gZnJvbSAnLi9tb2RhbC1yZWYubW9kZWwnO1xyXG5cclxuLyoqIEluamVjdGlvbiB0b2tlbiB0aGF0IGNhbiBiZSB1c2VkIHRvIGFjY2VzcyB0aGUgZGF0YSB0aGF0IHdhcyBwYXNzZWQgaW4gdG8gYSBkaWFsb2cuICovXHJcbmV4cG9ydCBjb25zdCBMVV9NT0RBTF9EQVRBID0gbmV3IEluamVjdGlvblRva2VuPHVua25vd24+KCdMdU1vZGFsRGF0YScpO1xyXG5leHBvcnQgY29uc3QgTFVfTU9EQUxfQ09ORklHID0gbmV3IEluamVjdGlvblRva2VuPEx1TW9kYWxDb25maWc+KCdMdU1vZGFsRGVmYXVsdENvbmZpZycsIHtcclxuXHRmYWN0b3J5OiAoKSA9PiBsdURlZmF1bHRNb2RhbENvbmZpZyxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBMVV9NT0RBTF9SRUZfRkFDVE9SWSA9IG5ldyBJbmplY3Rpb25Ub2tlbjxJTW9kYWxSZWZGYWN0b3J5PignTHVNb2RhbFJlZkZhY3RvcnknKTtcclxuIl19
|
|
@@ -18,4 +18,4 @@ LuPopup.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15
|
|
|
18
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuPopup, decorators: [{
|
|
19
19
|
type: Injectable
|
|
20
20
|
}] });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wdXAuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL25nL3BvcHVwL3NyYy9saWIvcG9wdXAuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjo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9QT1BVUF9DT05GSUcsIExVX1BPUFVQX1JFRl9GQUNUT1JZIH0gZnJvbSAnLi9wb3B1cC50b2tlbic7XHJcblxyXG5ASW5qZWN0YWJsZSgpXHJcbmV4cG9ydCBjbGFzcyBMdVBvcHVwIHtcclxuXHRwcm90ZWN0ZWQgX2ZhY3RvcnkgPSBpbmplY3QoTFVfUE9QVVBfUkVGX0ZBQ1RPUlkpO1xyXG5cdHByb3RlY3RlZCBfY29uZmlnID0gaW5qZWN0KExVX1BPUFVQX0NPTkZJRyk7XHJcblxyXG5cdG9wZW48VCwgRCwgUj4oY29tcG9uZW50OiBDb21wb25lbnRUeXBlPFQ+LCBkYXRhOiBEID0gdW5kZWZpbmVkLCBjb25maWc6IFBhcnRpYWw8SUx1UG9wdXBDb25maWc+ID0ge30pOiBJTHVQb3B1cFJlZjxULCBELCBSPiB7XHJcblx0XHRjb25zdCBleHRlbmRlZENvbmZpZyA9IHsgLi4udGhpcy5fY29uZmlnLCAuLi5jb25maWcgfTtcclxuXHRcdGNvbnN0IHJlZiA9IHRoaXMuX2ZhY3RvcnkuZm9yZ2U8VCwgSUx1UG9wdXBDb25maWcsIEQsIFI+KGNvbXBvbmVudCwgZXh0ZW5kZWRDb25maWcpO1xyXG5cdFx0cmVmLm9wZW4oZGF0YSk7XHJcblx0XHRyZXR1cm4gcmVmO1xyXG5cdH1cclxufVxyXG4iXX0=
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export const LU_POPUP_REF_FACTORY = new InjectionToken('LuPopupRefFactory'
|
|
3
|
-
factory: () => ({
|
|
4
|
-
forge() {
|
|
5
|
-
throw new Error('[LuPopupRefFactory] Cannot call forge, LuPopupRefFactory needs to be overriden.');
|
|
6
|
-
},
|
|
7
|
-
}),
|
|
8
|
-
});
|
|
2
|
+
export const LU_POPUP_REF_FACTORY = new InjectionToken('LuPopupRefFactory');
|
|
9
3
|
/** Injection token that can be used to access the data that was passed in to a dialog. */
|
|
10
4
|
export const LU_POPUP_DATA = new InjectionToken('LuPopupData');
|
|
11
5
|
export const LU_POPUP_CONFIG = new InjectionToken('LuPopupDefaultConfig', {
|
|
12
6
|
factory: () => ({}),
|
|
13
7
|
});
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wdXAudG9rZW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9uZy9wb3B1cC9zcmMvbGliL3BvcHVwLnRva2VuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFJL0MsTUFBTSxDQUFDLE1BQU0sb0JBQW9CLEdBQUcsSUFBSSxjQUFjLENBQXFCLG1CQUFtQixDQUFDLENBQUM7QUFFaEcsMEZBQTBGO0FBQzFGLE1BQU0sQ0FBQyxNQUFNLGFBQWEsR0FBRyxJQUFJLGNBQWMsQ0FBVSxhQUFhLENBQUMsQ0FBQztBQUN4RSxNQUFNLENBQUMsTUFBTSxlQUFlLEdBQUcsSUFBSSxjQUFjLENBQWlCLHNCQUFzQixFQUFFO0lBQ3pGLE9BQU8sRUFBRSxHQUFHLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQztDQUNuQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3Rpb25Ub2tlbiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBJTHVQb3B1cENvbmZpZyB9IGZyb20gJy4vcG9wdXAtY29uZmlnLm1vZGVsJztcclxuaW1wb3J0IHsgSUx1UG9wdXBSZWZGYWN0b3J5IH0gZnJvbSAnLi9wb3B1cC1yZWYubW9kZWwnO1xyXG5cclxuZXhwb3J0IGNvbnN0IExVX1BPUFVQX1JFRl9GQUNUT1JZID0gbmV3IEluamVjdGlvblRva2VuPElMdVBvcHVwUmVmRmFjdG9yeT4oJ0x1UG9wdXBSZWZGYWN0b3J5Jyk7XHJcblxyXG4vKiogSW5qZWN0aW9uIHRva2VuIHRoYXQgY2FuIGJlIHVzZWQgdG8gYWNjZXNzIHRoZSBkYXRhIHRoYXQgd2FzIHBhc3NlZCBpbiB0byBhIGRpYWxvZy4gKi9cclxuZXhwb3J0IGNvbnN0IExVX1BPUFVQX0RBVEEgPSBuZXcgSW5qZWN0aW9uVG9rZW48dW5rbm93bj4oJ0x1UG9wdXBEYXRhJyk7XHJcbmV4cG9ydCBjb25zdCBMVV9QT1BVUF9DT05GSUcgPSBuZXcgSW5qZWN0aW9uVG9rZW48SUx1UG9wdXBDb25maWc+KCdMdVBvcHVwRGVmYXVsdENvbmZpZycsIHtcclxuXHRmYWN0b3J5OiAoKSA9PiAoe30pLFxyXG59KTtcclxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { luDefaultSidepanelConfig, luModalTranslations, LU_MODAL_DATA } from '@lucca-front/ng/modal';
|
|
2
|
+
import { ALuModalRef as ALuSidepanelRef, luDefaultSidepanelConfig, luModalTranslations, LU_MODAL_DATA } from '@lucca-front/ng/modal';
|
|
3
3
|
/**
|
|
4
4
|
* For backward compatibility, we re-export modal tokens as sidepanel tokens.
|
|
5
5
|
* We should remove all sidepanel related files in the next major version (16+).
|
|
@@ -24,4 +24,9 @@ export const LU_SIDEPANEL_TRANSLATIONS = new InjectionToken('LuSidepanelTranslat
|
|
|
24
24
|
* @deprecated Use luModalTranslations from @lucca-front/ng/modal instead.
|
|
25
25
|
*/
|
|
26
26
|
export const luSidepanelTranslations = luModalTranslations;
|
|
27
|
-
|
|
27
|
+
export {
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use ALuModalRef from @lucca-front/ng/modal instead.
|
|
30
|
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yBmcm9tIEBsdWNjYS1mcm9udC9uZy9tb2RhbCBpbnN0ZWFkLlxyXG4gKi9cclxuZXhwb3J0IHR5cGUgSUx1U2lkZXBhbmVsQ29uZmlnID0gTHVNb2RhbENvbmZpZztcclxuXHJcbi8qKlxyXG4gKiBAZGVwcmVjYXRlZCBVc2UgSUx1TW9kYWxDb250ZW50IGZyb20gQGx1Y2NhLWZyb250L25nL21vZGFsIGluc3RlYWQuXHJcbiAqL1xyXG5leHBvcnQgdHlwZSBJTHVTaWRlcGFuZWxDb250ZW50PFQgPSB1bmtub3duPiA9IElMdU1vZGFsQ29udGVudDxUPjtcclxuXHJcbi8qKlxyXG4gKiBAZGVwcmVjYXRlZCBVc2UgSUx1TW9kYWxSZWYgZnJvbSBAbHVjY2EtZnJvbnQvbmcvbW9kYWwgaW5zdGVhZC5cclxuICovXHJcbmV4cG9ydCB0eXBlIElMdVNpZGVwYW5lbFJlZjxUIGV4dGVuZHMgSUx1U2lkZXBhbmVsQ29udGVudCA9IElMdVNpZGVwYW5lbENvbnRlbnQsIEQgPSB1bmtub3duLCBSID0gdW5rbm93bj4gPSBJTHVNb2RhbFJlZjxULCBELCBSPjtcclxuXHJcbmV4cG9ydCB7XHJcblx0LyoqXHJcblx0ICogQGRlcHJlY2F0ZWQgVXNlIEFMdU1vZGFsUmVmIGZyb20gQGx1Y2NhLWZyb250L25nL21vZGFsIGluc3RlYWQuXHJcblx0ICovXHJcblx0QUx1U2lkZXBhbmVsUmVmLFxyXG59O1xyXG4iXX0=
|
|
@@ -22,4 +22,4 @@ LuSidepanel.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version:
|
|
|
22
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuSidepanel, decorators: [{
|
|
23
23
|
type: Injectable
|
|
24
24
|
}] });
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ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SUx1U2lkZXBhbmVsUmVmLCBMdVNpZGVwYW5lbENvbmZpZywgTFVfU0lERVBBTkVMX0NPTkZJRyB9IGZyb20gJy4vc2lkZXBhbmVsLm1vZGVsJztcclxuXHJcbi8qKlxyXG4gKiBAZGVwcmVjYXRlZCBVc2UgTHVNb2RhbCB3aXRoIGBtb2RhbC5vcGVuKGNvbXBvbmVudCwgZGF0YSwgeyBtb2RlOiAnc2lkZXBhbmVsJyB9KWAgaW5zdGVhZC5cclxuICovXHJcbkBJbmplY3RhYmxlKClcclxuZXhwb3J0IGNsYXNzIEx1U2lkZXBhbmVsIGV4dGVuZHMgTHVNb2RhbCB7XHJcblx0cHJvdGVjdGVkIG92ZXJyaWRlIF9jb25maWcgPSBpbmplY3QoTFVfU0lERVBBTkVMX0NPTkZJRyk7XHJcblxyXG5cdC8qKlxyXG5cdCAqIEBkZXByZWNhdGVkIFVzZSBMdU1vZGFsIHdpdGggYG1vZGFsLm9wZW4oY29tcG9uZW50LCBkYXRhLCB7IG1vZGU6ICdzaWRlcGFuZWwnIH0pYCBpbnN0ZWFkLlxyXG5cdCAqL1xyXG5cdG92ZXJyaWRlIG9wZW48VCBleHRlbmRzIElMdU1vZGFsQ29udGVudDxSPiwgRCwgUj4oY29tcG9uZW50OiBDb21wb25lbnRUeXBlPFQ+LCBkYXRhOiBEID0gdW5kZWZpbmVkLCBjb25maWc6IFBhcnRpYWw8THVTaWRlcGFuZWxDb25maWc+ID0ge30pOiBJTHVTaWRlcGFuZWxSZWY8VCwgRCwgUj4ge1xyXG5cdFx0cmV0dXJuIHN1cGVyLm9wZW4oY29tcG9uZW50LCBkYXRhLCBjb25maWcpO1xyXG5cdH1cclxufVxyXG4iXX0=
|
|
@@ -8,7 +8,7 @@ import * as i3 from '@lucca-front/ng/tooltip';
|
|
|
8
8
|
import { LuTooltipModule } from '@lucca-front/ng/tooltip';
|
|
9
9
|
import { ReplaySubject, Subject, Subscription, Observable, timer, isObservable, of } from 'rxjs';
|
|
10
10
|
import { map, tap, delay, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
|
11
|
-
import { ALuPopupRef
|
|
11
|
+
import { ALuPopupRef } from '@lucca-front/ng/popup';
|
|
12
12
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
13
13
|
import * as i1 from '@angular/cdk/overlay';
|
|
14
14
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
@@ -176,13 +176,7 @@ const LU_MODAL_DATA = new InjectionToken('LuModalData');
|
|
|
176
176
|
const LU_MODAL_CONFIG = new InjectionToken('LuModalDefaultConfig', {
|
|
177
177
|
factory: () => luDefaultModalConfig,
|
|
178
178
|
});
|
|
179
|
-
const LU_MODAL_REF_FACTORY = new InjectionToken('LuModalRefFactory'
|
|
180
|
-
factory: () => ({
|
|
181
|
-
forge() {
|
|
182
|
-
throw new Error('[LuModalRefFactory] Cannot call forge, LuModalRefFactory needs to be overriden.');
|
|
183
|
-
},
|
|
184
|
-
}),
|
|
185
|
-
});
|
|
179
|
+
const LU_MODAL_REF_FACTORY = new InjectionToken('LuModalRefFactory');
|
|
186
180
|
|
|
187
181
|
function setAriaHiddenOnApplicationRoot(applicationRef, hidden) {
|
|
188
182
|
for (const component of applicationRef.components) {
|
|
@@ -245,14 +239,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImpor
|
|
|
245
239
|
type: Injectable
|
|
246
240
|
}], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.Injector }]; } });
|
|
247
241
|
|
|
248
|
-
class LuModal
|
|
242
|
+
class LuModal {
|
|
249
243
|
constructor() {
|
|
250
|
-
super(...arguments);
|
|
251
244
|
this._factory = inject(LU_MODAL_REF_FACTORY);
|
|
252
245
|
this._config = inject(LU_MODAL_CONFIG);
|
|
253
246
|
}
|
|
247
|
+
open(component, data = undefined, config = {}) {
|
|
248
|
+
const extendedConfig = Object.assign(Object.assign({}, this._config), config);
|
|
249
|
+
const ref = this._factory.forge(component, extendedConfig);
|
|
250
|
+
ref.open(data);
|
|
251
|
+
return ref;
|
|
252
|
+
}
|
|
254
253
|
}
|
|
255
|
-
LuModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, deps:
|
|
254
|
+
LuModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
256
255
|
LuModal.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal });
|
|
257
256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, decorators: [{
|
|
258
257
|
type: Injectable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-modal.mjs","sources":["../../../packages/ng/modal/src/lib/modal-config.default.ts","../../../packages/ng/modal/src/lib/modal-config.model.ts","../../../packages/ng/modal/src/lib/modal.translate.ts","../../../packages/ng/modal/src/lib/modal-ref.model.ts","../../../packages/ng/modal/src/lib/modal-panel.component.ts","../../../packages/ng/modal/src/lib/modal-panel.component.html","../../../packages/ng/modal/src/lib/modal.token.ts","../../../packages/ng/modal/src/lib/modal.utils.ts","../../../packages/ng/modal/src/lib/modal-ref.factory.ts","../../../packages/ng/modal/src/lib/modal.service.ts","../../../packages/ng/modal/src/lib/modal.module.ts","../../../packages/ng/modal/src/public-api.ts","../../../packages/ng/modal/src/lucca-front-ng-modal.ts"],"sourcesContent":["import { ChangeDetectionStrategy } from '@angular/core';\r\nimport { LuModalConfig } from './modal-config.model';\r\n\r\nexport const luDefaultModalConfig: LuModalConfig = {\r\n\tmode: 'modal',\r\n\tposition: 'center',\r\n\tnoBackdrop: false,\r\n\tundismissable: false,\r\n\tbackdropClass: ['cdk-overlay-dark-backdrop', 'lu-popup-backdrop'],\r\n\tpanelClass: 'lu-popup-panel',\r\n\tsize: 'M',\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n};\r\n\r\nexport const luDefaultSidepanelConfig: LuModalConfig = {\r\n\t...luDefaultModalConfig,\r\n\tmode: 'sidepanel',\r\n\tposition: 'right',\r\n};\r\n","import { ChangeDetectionStrategy } from '@angular/core';\r\nimport { ILuPopupConfig } from '@lucca-front/ng/popup';\r\n\r\nexport type LuModalMode = 'modal' | 'sidepanel';\r\n\r\nexport interface LuModalClasses {\r\n\tpanel: string;\r\n\tpanelContainer: string;\r\n\tpanelInner: string;\r\n\toverlayPane?: string;\r\n}\r\n\r\nexport const luModalClasses: Record<LuModalMode, LuModalClasses> = {\r\n\tmodal: { panel: 'lu-modal-panel', panelInner: 'lu-modal-panel-inner', panelContainer: 'lu-modal-container' },\r\n\tsidepanel: { panel: 'lu-sidepanel-panel', panelInner: 'lu-sidepanel-panel-inner', overlayPane: 'mod-sidepanel', panelContainer: 'lu-sidepanel-container' },\r\n};\r\n\r\ntype LuModalModeWithPosition = { mode?: 'modal'; position: undefined | 'center' } | { mode: 'sidepanel'; position: 'left' | 'right' };\r\n\r\nexport type LuModalConfig = ILuPopupConfig &\r\n\tLuModalModeWithPosition & {\r\n\t\tchangeDetection: ChangeDetectionStrategy;\r\n\t};\r\n\r\n/**\r\n * @deprecated Use LuModalConfig instead.\r\n */\r\nexport type ILuModalConfig = LuModalConfig;\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuTranslation } from '@lucca-front/ng/core';\r\n\r\nexport const LU_MODAL_TRANSLATIONS = new InjectionToken('LuModalTranslations', {\r\n\tfactory: () => luModalTranslations,\r\n});\r\n\r\nexport interface ILuModalLabel {\r\n\tsubmit: string;\r\n\tcancel: string;\r\n\tclose: string;\r\n}\r\n\r\nexport const luModalTranslations: ILuTranslation<ILuModalLabel> = {\r\n\ten: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Cancel',\r\n\t\tclose: 'Close',\r\n\t},\r\n\tfr: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Annuler',\r\n\t\tclose: 'Fermer',\r\n\t},\r\n\tes: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Cancelar',\r\n\t\tclose: 'Cerrar',\r\n\t},\r\n};\r\n","import { ALuPopupRef, ILuPopupRef } from '@lucca-front/ng/popup';\r\nimport { LuModalClasses, luModalClasses, LuModalConfig, LuModalMode } from './modal-config.model';\r\nimport { ILuModalContent } from './modal.model';\r\n\r\nexport interface ILuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown> extends ILuPopupRef<T, D, R> {\r\n\tmode: LuModalMode;\r\n\tmodalClasses: LuModalClasses;\r\n}\r\nexport abstract class ALuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig>\r\n\textends ALuPopupRef<T, D, R, C>\r\n\timplements ILuModalRef<T, D, R>\r\n{\r\n\tpublic get mode(): LuModalMode {\r\n\t\treturn this._config.mode || 'modal';\r\n\t}\r\n\r\n\tpublic get modalClasses(): LuModalClasses {\r\n\t\treturn luModalClasses[this.mode];\r\n\t}\r\n}\r\n","import { A11yModule } from '@angular/cdk/a11y';\r\nimport { AsyncPipe, NgClass, NgIf } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, Directive, DoCheck, ElementRef, HostBinding, Injector, OnDestroy, Renderer2, Type, ViewChild, ViewContainerRef } from '@angular/core';\r\nimport { getIntl } from '@lucca-front/ng/core';\r\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\r\nimport { isObservable, Observable, of, ReplaySubject, Subject, Subscription, timer } from 'rxjs';\r\nimport { delay, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';\r\nimport { LuModalClasses } from './modal-config.model';\r\nimport { ALuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_TRANSLATIONS } from './modal.translate';\r\n\r\nlet modalId = 0;\r\n\r\n@Directive()\r\nexport abstract class ALuModalPanelComponent<T extends ILuModalContent> implements OnDestroy, DoCheck {\r\n\t@ViewChild('container', { read: ViewContainerRef, static: true })\r\n\tprotected _containerRef: ViewContainerRef;\r\n\tprotected _componentInstance: ILuModalContent;\r\n\tprotected doCheck$ = new ReplaySubject<void>(1);\r\n\r\n\tpublic intl = getIntl(LU_MODAL_TRANSLATIONS);\r\n\tprotected title$ = this.listenComponentValue(() => this._componentInstance.title);\r\n\tprotected submitLabel$ = this.listenComponentValue(() => this._componentInstance.submitLabel || this.intl.submit);\r\n\tprotected cancelLabel$ = this.listenComponentValue(() => this._componentInstance.cancelLabel || this.intl.cancel);\r\n\tprotected submitCounter$ = this.listenComponentValue(() => this._componentInstance.submitCounter);\r\n\tprotected submitDisabled$ = this.listenComponentValue(() => this._componentInstance.submitDisabled);\r\n\tprotected hasSubmitCounter$ = this.submitCounter$.pipe(map(Boolean));\r\n\r\n\tprotected closeLabel = this.intl.close;\r\n\r\n\tget isSubmitHidden() {\r\n\t\treturn !this._componentInstance.submitAction;\r\n\t}\r\n\tget submitPalette() {\r\n\t\treturn this._componentInstance.submitPalette || 'primary';\r\n\t}\r\n\r\n\tsubmitClass$ = new Subject();\r\n\terror$ = new Subject();\r\n\r\n\tpublic readonly modalId = modalId++;\r\n\r\n\tprivate _subs = new Subscription();\r\n\tpublic modalClasses: LuModalClasses;\r\n\r\n\tconstructor(protected _ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tthis.modalClasses = _ref.modalClasses;\r\n\t\t_renderer.addClass(_elementRef.nativeElement, this.modalClasses.panel);\r\n\t}\r\n\tngDoCheck(): void {\r\n\t\tthis.doCheck$.next();\r\n\t}\r\n\tattachInnerComponent(componentType: Type<T>, injector: Injector) {\r\n\t\tconst ref = this._containerRef.createComponent(componentType, { injector });\r\n\t\tthis._componentInstance = ref.instance;\r\n\t\treturn ref;\r\n\t}\r\n\tngOnDestroy() {\r\n\t\tthis.doCheck$.complete();\r\n\t\tthis._subs.unsubscribe();\r\n\t}\r\n\tdismiss() {\r\n\t\tthis._ref.dismiss();\r\n\t}\r\n\tsubmit() {\r\n\t\tthis.error$.next(undefined);\r\n\t\tthis.submitClass$.next('is-loading');\r\n\t\tconst result$ = this._componentInstance.submitAction();\r\n\t\tif (result$ instanceof Observable) {\r\n\t\t\tthis._subs.add(\r\n\t\t\t\tresult$\r\n\t\t\t\t\t.pipe(\r\n\t\t\t\t\t\ttap((_) => this.submitClass$.next('is-success')),\r\n\t\t\t\t\t\tdelay(500),\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.subscribe({\r\n\t\t\t\t\t\tnext: (result) => this._ref.close(result),\r\n\t\t\t\t\t\terror: (err) => {\r\n\t\t\t\t\t\t\tthis.submitClass$.next('is-error');\r\n\t\t\t\t\t\t\tthis.error$.next(err);\r\n\t\t\t\t\t\t\ttimer(2000).subscribe((_) => {\r\n\t\t\t\t\t\t\t\tthis.submitClass$.next('');\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\t\tthis.submitClass$.next('');\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}),\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis._ref.close(result$);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate listenComponentValue<TValue>(selector: () => TValue | Observable<TValue>): Observable<TValue> {\r\n\t\treturn this.doCheck$.pipe(\r\n\t\t\tmap(selector),\r\n\t\t\tdistinctUntilChanged(),\r\n\t\t\tswitchMap((value) => (isObservable(value) ? value : of(value))),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nconst panelImports = [A11yModule, AsyncPipe, LuTooltipModule, NgClass, NgIf];\r\n\r\n@Component({\r\n\tselector: 'lu-modal-panel',\r\n\tstandalone: true,\r\n\timports: panelImports,\r\n\ttemplateUrl: './modal-panel.component.html',\r\n\tstyleUrls: ['./modal-panel.component.scss'],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class LuModalPanelComponent<T extends ILuModalContent = ILuModalContent> extends ALuModalPanelComponent<T> {\r\n\t@HostBinding('class.lu-modal-panel') class = true;\r\n\tconstructor(_ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tsuper(_ref, _elementRef, _renderer);\r\n\t}\r\n}\r\n@Component({\r\n\tselector: 'lu-modal-panel-default',\r\n\tstandalone: true,\r\n\timports: panelImports,\r\n\ttemplateUrl: './modal-panel.component.html',\r\n\tstyleUrls: ['./modal-panel.component.scss'],\r\n\tchangeDetection: ChangeDetectionStrategy.Default,\r\n})\r\n// eslint-disable-next-line @angular-eslint/component-class-suffix\r\nexport class LuModalPanelComponentDefaultCD<T extends ILuModalContent = ILuModalContent> extends ALuModalPanelComponent<T> {\r\n\t@HostBinding('class.lu-modal-panel') class = true;\r\n\tconstructor(_ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tsuper(_ref, _elementRef, _renderer);\r\n\t}\r\n}\r\n","<div\r\n\tcdkTrapFocus=\"true\"\r\n\tcdkTrapFocusAutoCapture=\"true\"\r\n\trole=\"dialog\"\r\n\taria-modal=\"true\"\r\n\t[attr.aria-labelledby]=\"'luModalTitle' + modalId\"\r\n\t[ngClass]=\"modalClasses.panelInner\"\r\n>\r\n\t<div [ngClass]=\"modalClasses.panelContainer\" role=\"document\">\r\n\t\t<div class=\"lu-modal-header\" tabindex=\"-1\" cdkFocusInitial>\r\n\t\t\t<button type=\"button\" class=\"actionIcon lu-modal-header-close\" (click)=\"dismiss()\" [luTooltip]=\"closeLabel\">\r\n\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-cross\"></span>\r\n\t\t\t\t<span class=\"u-mask\">{{ closeLabel }}</span>\r\n\t\t\t</button>\r\n\t\t\t<h1 [attr.id]=\"'luModalTitle' + modalId\" class=\"lu-modal-header-title\">{{ title$ | async }}</h1>\r\n\t\t</div>\r\n\t\t<div class=\"lu-modal-content\">\r\n\t\t\t<ng-container #container></ng-container>\r\n\t\t</div>\r\n\t\t<div class=\"lu-modal-footer\">\r\n\t\t\t<button\r\n\t\t\t\ttype=\"button\"\r\n\t\t\t\t*ngIf=\"!isSubmitHidden\"\r\n\t\t\t\tclass=\"button palette-{{ submitPalette }}\"\r\n\t\t\t\t[disabled]=\"submitDisabled$ | async\"\r\n\t\t\t\t[class.mod-counter]=\"hasSubmitCounter$ | async\"\r\n\t\t\t\t[ngClass]=\"submitClass$ | async\"\r\n\t\t\t\t(click)=\"submit()\"\r\n\t\t\t>\r\n\t\t\t\t{{ submitLabel$ | async }}\r\n\t\t\t\t<label class=\"button-counter\" *ngIf=\"hasSubmitCounter$ | async\">{{ submitCounter$ | async }}</label>\r\n\t\t\t</button>\r\n\t\t\t<button type=\"button\" class=\"button mod-text\" (click)=\"dismiss()\">{{ cancelLabel$ | async }}</button>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuPopupRefFactory } from '@lucca-front/ng/popup';\r\nimport { luDefaultModalConfig } from './modal-config.default';\r\nimport { LuModalConfig } from './modal-config.model';\r\n\r\n/** Injection token that can be used to access the data that was passed in to a dialog. */\r\nexport const LU_MODAL_DATA = new InjectionToken<unknown>('LuModalData');\r\nexport const LU_MODAL_CONFIG = new InjectionToken<LuModalConfig>('LuModalDefaultConfig', {\r\n\tfactory: () => luDefaultModalConfig,\r\n});\r\nexport const LU_MODAL_REF_FACTORY = new InjectionToken<ILuPopupRefFactory>('LuModalRefFactory', {\r\n\tfactory: () => ({\r\n\t\tforge() {\r\n\t\t\tthrow new Error('[LuModalRefFactory] Cannot call forge, LuModalRefFactory needs to be overriden.');\r\n\t\t},\r\n\t}),\r\n});\r\n","import { ApplicationRef } from '@angular/core';\r\n\r\nexport function setAriaHiddenOnApplicationRoot(applicationRef: ApplicationRef, hidden: boolean): void {\r\n\tfor (const component of applicationRef.components) {\r\n\t\tconst nativeElement = component.location.nativeElement as unknown;\r\n\r\n\t\tif (nativeElement instanceof HTMLElement) {\r\n\t\t\tnativeElement.ariaHidden = hidden ? 'true' : undefined;\r\n\t\t}\r\n\t}\r\n}\r\n","import { ComponentType, Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { ApplicationRef, ChangeDetectionStrategy, ComponentRef, inject, Injectable, Injector } from '@angular/core';\r\nimport { ILuPopupRefFactory } from '@lucca-front/ng/popup';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { ALuModalPanelComponent, LuModalPanelComponent, LuModalPanelComponentDefaultCD } from './modal-panel.component';\r\nimport { ALuModalRef, ILuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_DATA } from './modal.token';\r\nimport { setAriaHiddenOnApplicationRoot } from './modal.utils';\r\n\r\nclass LuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig> extends ALuModalRef<T, D, R, C> implements ILuModalRef<T, D, R> {\r\n\tprotected _containerRef: ComponentRef<ALuModalPanelComponent<T>>;\r\n\tconstructor(\r\n\t\tprotected override _overlay: Overlay,\r\n\t\tprotected override _injector: Injector,\r\n\t\tprotected override _component: ComponentType<T>,\r\n\t\tprotected override _config: C,\r\n\t\tprotected _applicationRef: ApplicationRef,\r\n\t) {\r\n\t\tsuper(_overlay, _injector, _component, _config);\r\n\t}\r\n\tprotected override _openPopup(data?: D) {\r\n\t\tconst injector = Injector.create({\r\n\t\t\tproviders: [\r\n\t\t\t\t{ provide: ALuModalRef, useValue: this },\r\n\t\t\t\t{ provide: LU_MODAL_DATA, useValue: data },\r\n\t\t\t],\r\n\t\t\tparent: this._injector,\r\n\t\t});\r\n\r\n\t\tconst containerPortal = new ComponentPortal<ALuModalPanelComponent<T>>(\r\n\t\t\tthis._config.changeDetection === ChangeDetectionStrategy.OnPush ? LuModalPanelComponent : LuModalPanelComponentDefaultCD,\r\n\t\t\tundefined,\r\n\t\t\tinjector,\r\n\t\t);\r\n\t\tthis._containerRef = this._overlayRef.attach<ALuModalPanelComponent<T>>(containerPortal);\r\n\t\tconst panel = this._containerRef.instance;\r\n\t\tthis._componentRef = panel.attachInnerComponent(this._component, injector);\r\n\t\tsetAriaHiddenOnApplicationRoot(this._applicationRef, true);\r\n\t}\r\n\tprotected override _closePopup() {\r\n\t\tthis._componentRef.destroy();\r\n\t\tthis._containerRef.destroy();\r\n\t\tsetAriaHiddenOnApplicationRoot(this._applicationRef, false);\r\n\t}\r\n\r\n\tprotected override _getOverlayPanelClasses(): string[] {\r\n\t\tconst classes = super._getOverlayPanelClasses();\r\n\r\n\t\tif (this.modalClasses.overlayPane) {\r\n\t\t\tclasses.push(this.modalClasses.overlayPane);\r\n\t\t}\r\n\r\n\t\treturn classes;\r\n\t}\r\n}\r\n\r\n@Injectable()\r\nexport class LuModalRefFactory implements ILuPopupRefFactory<ILuModalContent, LuModalConfig> {\r\n\tprotected _applicationRef = inject(ApplicationRef);\r\n\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector) {}\r\n\tforge<T extends ILuModalContent, C extends LuModalConfig, D, R>(component: ComponentType<T>, config: C) {\r\n\t\treturn new LuModalRef<T, D, R>(this._overlay, this._injector, component, config, this._applicationRef);\r\n\t}\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { LuPopup } from '@lucca-front/ng/popup';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { LU_MODAL_CONFIG, LU_MODAL_REF_FACTORY } from './modal.token';\r\n\r\n@Injectable()\r\nexport class LuModal<C extends LuModalConfig = LuModalConfig> extends LuPopup<C> {\r\n\tprotected override _factory = inject(LU_MODAL_REF_FACTORY);\r\n\tprotected override _config = inject<C>(LU_MODAL_CONFIG);\r\n}\r\n","import { OverlayModule } from '@angular/cdk/overlay';\r\nimport { NgModule, Provider } from '@angular/core';\r\nimport { LuModalRefFactory } from './modal-ref.factory';\r\nimport { LuModal } from './modal.service';\r\nimport { LU_MODAL_REF_FACTORY } from './modal.token';\r\n\r\n/**\r\n * Provide LuModal.\r\n * Note that OverlayModule should be imported in one of the EnvironmentInjectors (AppModule, lazy-loaded route) using `providers: [importProvidersFrom(OverlayModule)]`.\r\n */\r\nexport function provideLuModal(): Provider[] {\r\n\treturn [LuModal, { provide: LU_MODAL_REF_FACTORY, useClass: LuModalRefFactory }];\r\n}\r\n\r\n@NgModule({\r\n\timports: [OverlayModule],\r\n\tproviders: [provideLuModal()],\r\n})\r\nexport class LuModalModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ALuModalRef"],"mappings":";;;;;;;;;;;;;;;AAGa,MAAA,oBAAoB,GAAkB;AAClD,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,aAAa,EAAE,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;AACjE,IAAA,UAAU,EAAE,gBAAgB;AAC5B,IAAA,IAAI,EAAE,GAAG;IACT,eAAe,EAAE,uBAAuB,CAAC,MAAM;EAC9C;AAEK,MAAM,wBAAwB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACjC,oBAAoB,CACvB,EAAA,EAAA,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,OAAO;;ACLL,MAAA,cAAc,GAAwC;AAClE,IAAA,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,sBAAsB,EAAE,cAAc,EAAE,oBAAoB,EAAE;AAC5G,IAAA,SAAS,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,0BAA0B,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,wBA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AE,CAAC,aAAa,CAAC;AACxB,oBAAA,SAAS,EAAE,CAAC,cAAc,EAAE,CAAC;iBAC7B,CAAA;;;ACjBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-modal.mjs","sources":["../../../packages/ng/modal/src/lib/modal-config.default.ts","../../../packages/ng/modal/src/lib/modal-config.model.ts","../../../packages/ng/modal/src/lib/modal.translate.ts","../../../packages/ng/modal/src/lib/modal-ref.model.ts","../../../packages/ng/modal/src/lib/modal-panel.component.ts","../../../packages/ng/modal/src/lib/modal-panel.component.html","../../../packages/ng/modal/src/lib/modal.token.ts","../../../packages/ng/modal/src/lib/modal.utils.ts","../../../packages/ng/modal/src/lib/modal-ref.factory.ts","../../../packages/ng/modal/src/lib/modal.service.ts","../../../packages/ng/modal/src/lib/modal.module.ts","../../../packages/ng/modal/src/public-api.ts","../../../packages/ng/modal/src/lucca-front-ng-modal.ts"],"sourcesContent":["import { ChangeDetectionStrategy } from '@angular/core';\r\nimport { LuModalConfig } from './modal-config.model';\r\n\r\nexport const luDefaultModalConfig: LuModalConfig = {\r\n\tmode: 'modal',\r\n\tposition: 'center',\r\n\tnoBackdrop: false,\r\n\tundismissable: false,\r\n\tbackdropClass: ['cdk-overlay-dark-backdrop', 'lu-popup-backdrop'],\r\n\tpanelClass: 'lu-popup-panel',\r\n\tsize: 'M',\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n};\r\n\r\nexport const luDefaultSidepanelConfig: LuModalConfig = {\r\n\t...luDefaultModalConfig,\r\n\tmode: 'sidepanel',\r\n\tposition: 'right',\r\n};\r\n","import { ChangeDetectionStrategy } from '@angular/core';\r\nimport { ILuPopupConfig } from '@lucca-front/ng/popup';\r\n\r\nexport type LuModalMode = 'modal' | 'sidepanel';\r\n\r\nexport interface LuModalClasses {\r\n\tpanel: string;\r\n\tpanelContainer: string;\r\n\tpanelInner: string;\r\n\toverlayPane?: string;\r\n}\r\n\r\nexport const luModalClasses: Record<LuModalMode, LuModalClasses> = {\r\n\tmodal: { panel: 'lu-modal-panel', panelInner: 'lu-modal-panel-inner', panelContainer: 'lu-modal-container' },\r\n\tsidepanel: { panel: 'lu-sidepanel-panel', panelInner: 'lu-sidepanel-panel-inner', overlayPane: 'mod-sidepanel', panelContainer: 'lu-sidepanel-container' },\r\n};\r\n\r\ntype LuModalModeWithPosition = { mode?: 'modal'; position: undefined | 'center' } | { mode: 'sidepanel'; position: 'left' | 'right' };\r\n\r\nexport type LuModalConfig = ILuPopupConfig &\r\n\tLuModalModeWithPosition & {\r\n\t\tchangeDetection: ChangeDetectionStrategy;\r\n\t};\r\n\r\n/**\r\n * @deprecated Use LuModalConfig instead.\r\n */\r\nexport type ILuModalConfig = LuModalConfig;\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuTranslation } from '@lucca-front/ng/core';\r\n\r\nexport const LU_MODAL_TRANSLATIONS = new InjectionToken('LuModalTranslations', {\r\n\tfactory: () => luModalTranslations,\r\n});\r\n\r\nexport interface ILuModalLabel {\r\n\tsubmit: string;\r\n\tcancel: string;\r\n\tclose: string;\r\n}\r\n\r\nexport const luModalTranslations: ILuTranslation<ILuModalLabel> = {\r\n\ten: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Cancel',\r\n\t\tclose: 'Close',\r\n\t},\r\n\tfr: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Annuler',\r\n\t\tclose: 'Fermer',\r\n\t},\r\n\tes: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Cancelar',\r\n\t\tclose: 'Cerrar',\r\n\t},\r\n};\r\n","import { ComponentType } from '@angular/cdk/portal';\r\nimport { ALuPopupRef, ILuPopupRef } from '@lucca-front/ng/popup';\r\nimport { LuModalClasses, luModalClasses, LuModalConfig, LuModalMode } from './modal-config.model';\r\nimport { ILuModalContent } from './modal.model';\r\n\r\nexport interface ILuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown> extends ILuPopupRef<T, D, R> {\r\n\tmode: LuModalMode;\r\n\tmodalClasses: LuModalClasses;\r\n}\r\n\r\nexport interface IModalRefFactory<TComponent extends ILuModalContent = ILuModalContent, TConfig extends LuModalConfig = LuModalConfig> {\r\n\tforge<T extends TComponent, C extends TConfig, D, R>(component: ComponentType<T>, config: C): ILuModalRef<T, D, R>;\r\n}\r\n\r\nexport abstract class ALuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig>\r\n\textends ALuPopupRef<T, D, R, C>\r\n\timplements ILuModalRef<T, D, R>\r\n{\r\n\tpublic get mode(): LuModalMode {\r\n\t\treturn this._config.mode || 'modal';\r\n\t}\r\n\r\n\tpublic get modalClasses(): LuModalClasses {\r\n\t\treturn luModalClasses[this.mode];\r\n\t}\r\n}\r\n","import { A11yModule } from '@angular/cdk/a11y';\r\nimport { AsyncPipe, NgClass, NgIf } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, Directive, DoCheck, ElementRef, HostBinding, Injector, OnDestroy, Renderer2, Type, ViewChild, ViewContainerRef } from '@angular/core';\r\nimport { getIntl } from '@lucca-front/ng/core';\r\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\r\nimport { isObservable, Observable, of, ReplaySubject, Subject, Subscription, timer } from 'rxjs';\r\nimport { delay, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';\r\nimport { LuModalClasses } from './modal-config.model';\r\nimport { ALuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_TRANSLATIONS } from './modal.translate';\r\n\r\nlet modalId = 0;\r\n\r\n@Directive()\r\nexport abstract class ALuModalPanelComponent<T extends ILuModalContent> implements OnDestroy, DoCheck {\r\n\t@ViewChild('container', { read: ViewContainerRef, static: true })\r\n\tprotected _containerRef: ViewContainerRef;\r\n\tprotected _componentInstance: ILuModalContent;\r\n\tprotected doCheck$ = new ReplaySubject<void>(1);\r\n\r\n\tpublic intl = getIntl(LU_MODAL_TRANSLATIONS);\r\n\tprotected title$ = this.listenComponentValue(() => this._componentInstance.title);\r\n\tprotected submitLabel$ = this.listenComponentValue(() => this._componentInstance.submitLabel || this.intl.submit);\r\n\tprotected cancelLabel$ = this.listenComponentValue(() => this._componentInstance.cancelLabel || this.intl.cancel);\r\n\tprotected submitCounter$ = this.listenComponentValue(() => this._componentInstance.submitCounter);\r\n\tprotected submitDisabled$ = this.listenComponentValue(() => this._componentInstance.submitDisabled);\r\n\tprotected hasSubmitCounter$ = this.submitCounter$.pipe(map(Boolean));\r\n\r\n\tprotected closeLabel = this.intl.close;\r\n\r\n\tget isSubmitHidden() {\r\n\t\treturn !this._componentInstance.submitAction;\r\n\t}\r\n\tget submitPalette() {\r\n\t\treturn this._componentInstance.submitPalette || 'primary';\r\n\t}\r\n\r\n\tsubmitClass$ = new Subject();\r\n\terror$ = new Subject();\r\n\r\n\tpublic readonly modalId = modalId++;\r\n\r\n\tprivate _subs = new Subscription();\r\n\tpublic modalClasses: LuModalClasses;\r\n\r\n\tconstructor(protected _ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tthis.modalClasses = _ref.modalClasses;\r\n\t\t_renderer.addClass(_elementRef.nativeElement, this.modalClasses.panel);\r\n\t}\r\n\tngDoCheck(): void {\r\n\t\tthis.doCheck$.next();\r\n\t}\r\n\tattachInnerComponent(componentType: Type<T>, injector: Injector) {\r\n\t\tconst ref = this._containerRef.createComponent(componentType, { injector });\r\n\t\tthis._componentInstance = ref.instance;\r\n\t\treturn ref;\r\n\t}\r\n\tngOnDestroy() {\r\n\t\tthis.doCheck$.complete();\r\n\t\tthis._subs.unsubscribe();\r\n\t}\r\n\tdismiss() {\r\n\t\tthis._ref.dismiss();\r\n\t}\r\n\tsubmit() {\r\n\t\tthis.error$.next(undefined);\r\n\t\tthis.submitClass$.next('is-loading');\r\n\t\tconst result$ = this._componentInstance.submitAction();\r\n\t\tif (result$ instanceof Observable) {\r\n\t\t\tthis._subs.add(\r\n\t\t\t\tresult$\r\n\t\t\t\t\t.pipe(\r\n\t\t\t\t\t\ttap((_) => this.submitClass$.next('is-success')),\r\n\t\t\t\t\t\tdelay(500),\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.subscribe({\r\n\t\t\t\t\t\tnext: (result) => this._ref.close(result),\r\n\t\t\t\t\t\terror: (err) => {\r\n\t\t\t\t\t\t\tthis.submitClass$.next('is-error');\r\n\t\t\t\t\t\t\tthis.error$.next(err);\r\n\t\t\t\t\t\t\ttimer(2000).subscribe((_) => {\r\n\t\t\t\t\t\t\t\tthis.submitClass$.next('');\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\t\tthis.submitClass$.next('');\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}),\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis._ref.close(result$);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate listenComponentValue<TValue>(selector: () => TValue | Observable<TValue>): Observable<TValue> {\r\n\t\treturn this.doCheck$.pipe(\r\n\t\t\tmap(selector),\r\n\t\t\tdistinctUntilChanged(),\r\n\t\t\tswitchMap((value) => (isObservable(value) ? value : of(value))),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nconst panelImports = [A11yModule, AsyncPipe, LuTooltipModule, NgClass, NgIf];\r\n\r\n@Component({\r\n\tselector: 'lu-modal-panel',\r\n\tstandalone: true,\r\n\timports: panelImports,\r\n\ttemplateUrl: './modal-panel.component.html',\r\n\tstyleUrls: ['./modal-panel.component.scss'],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class LuModalPanelComponent<T extends ILuModalContent = ILuModalContent> extends ALuModalPanelComponent<T> {\r\n\t@HostBinding('class.lu-modal-panel') class = true;\r\n\tconstructor(_ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tsuper(_ref, _elementRef, _renderer);\r\n\t}\r\n}\r\n@Component({\r\n\tselector: 'lu-modal-panel-default',\r\n\tstandalone: true,\r\n\timports: panelImports,\r\n\ttemplateUrl: './modal-panel.component.html',\r\n\tstyleUrls: ['./modal-panel.component.scss'],\r\n\tchangeDetection: ChangeDetectionStrategy.Default,\r\n})\r\n// eslint-disable-next-line @angular-eslint/component-class-suffix\r\nexport class LuModalPanelComponentDefaultCD<T extends ILuModalContent = ILuModalContent> extends ALuModalPanelComponent<T> {\r\n\t@HostBinding('class.lu-modal-panel') class = true;\r\n\tconstructor(_ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tsuper(_ref, _elementRef, _renderer);\r\n\t}\r\n}\r\n","<div\r\n\tcdkTrapFocus=\"true\"\r\n\tcdkTrapFocusAutoCapture=\"true\"\r\n\trole=\"dialog\"\r\n\taria-modal=\"true\"\r\n\t[attr.aria-labelledby]=\"'luModalTitle' + modalId\"\r\n\t[ngClass]=\"modalClasses.panelInner\"\r\n>\r\n\t<div [ngClass]=\"modalClasses.panelContainer\" role=\"document\">\r\n\t\t<div class=\"lu-modal-header\" tabindex=\"-1\" cdkFocusInitial>\r\n\t\t\t<button type=\"button\" class=\"actionIcon lu-modal-header-close\" (click)=\"dismiss()\" [luTooltip]=\"closeLabel\">\r\n\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-cross\"></span>\r\n\t\t\t\t<span class=\"u-mask\">{{ closeLabel }}</span>\r\n\t\t\t</button>\r\n\t\t\t<h1 [attr.id]=\"'luModalTitle' + modalId\" class=\"lu-modal-header-title\">{{ title$ | async }}</h1>\r\n\t\t</div>\r\n\t\t<div class=\"lu-modal-content\">\r\n\t\t\t<ng-container #container></ng-container>\r\n\t\t</div>\r\n\t\t<div class=\"lu-modal-footer\">\r\n\t\t\t<button\r\n\t\t\t\ttype=\"button\"\r\n\t\t\t\t*ngIf=\"!isSubmitHidden\"\r\n\t\t\t\tclass=\"button palette-{{ submitPalette }}\"\r\n\t\t\t\t[disabled]=\"submitDisabled$ | async\"\r\n\t\t\t\t[class.mod-counter]=\"hasSubmitCounter$ | async\"\r\n\t\t\t\t[ngClass]=\"submitClass$ | async\"\r\n\t\t\t\t(click)=\"submit()\"\r\n\t\t\t>\r\n\t\t\t\t{{ submitLabel$ | async }}\r\n\t\t\t\t<label class=\"button-counter\" *ngIf=\"hasSubmitCounter$ | async\">{{ submitCounter$ | async }}</label>\r\n\t\t\t</button>\r\n\t\t\t<button type=\"button\" class=\"button mod-text\" (click)=\"dismiss()\">{{ cancelLabel$ | async }}</button>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n","import { InjectionToken } from '@angular/core';\r\nimport { luDefaultModalConfig } from './modal-config.default';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { IModalRefFactory } from './modal-ref.model';\r\n\r\n/** Injection token that can be used to access the data that was passed in to a dialog. */\r\nexport const LU_MODAL_DATA = new InjectionToken<unknown>('LuModalData');\r\nexport const LU_MODAL_CONFIG = new InjectionToken<LuModalConfig>('LuModalDefaultConfig', {\r\n\tfactory: () => luDefaultModalConfig,\r\n});\r\nexport const LU_MODAL_REF_FACTORY = new InjectionToken<IModalRefFactory>('LuModalRefFactory');\r\n","import { ApplicationRef } from '@angular/core';\r\n\r\nexport function setAriaHiddenOnApplicationRoot(applicationRef: ApplicationRef, hidden: boolean): void {\r\n\tfor (const component of applicationRef.components) {\r\n\t\tconst nativeElement = component.location.nativeElement as unknown;\r\n\r\n\t\tif (nativeElement instanceof HTMLElement) {\r\n\t\t\tnativeElement.ariaHidden = hidden ? 'true' : undefined;\r\n\t\t}\r\n\t}\r\n}\r\n","import { ComponentType, Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { ApplicationRef, ChangeDetectionStrategy, ComponentRef, inject, Injectable, Injector } from '@angular/core';\r\nimport { ILuPopupRefFactory } from '@lucca-front/ng/popup';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { ALuModalPanelComponent, LuModalPanelComponent, LuModalPanelComponentDefaultCD } from './modal-panel.component';\r\nimport { ALuModalRef, ILuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_DATA } from './modal.token';\r\nimport { setAriaHiddenOnApplicationRoot } from './modal.utils';\r\n\r\nclass LuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig> extends ALuModalRef<T, D, R, C> implements ILuModalRef<T, D, R> {\r\n\tprotected _containerRef: ComponentRef<ALuModalPanelComponent<T>>;\r\n\tconstructor(\r\n\t\tprotected override _overlay: Overlay,\r\n\t\tprotected override _injector: Injector,\r\n\t\tprotected override _component: ComponentType<T>,\r\n\t\tprotected override _config: C,\r\n\t\tprotected _applicationRef: ApplicationRef,\r\n\t) {\r\n\t\tsuper(_overlay, _injector, _component, _config);\r\n\t}\r\n\tprotected override _openPopup(data?: D) {\r\n\t\tconst injector = Injector.create({\r\n\t\t\tproviders: [\r\n\t\t\t\t{ provide: ALuModalRef, useValue: this },\r\n\t\t\t\t{ provide: LU_MODAL_DATA, useValue: data },\r\n\t\t\t],\r\n\t\t\tparent: this._injector,\r\n\t\t});\r\n\r\n\t\tconst containerPortal = new ComponentPortal<ALuModalPanelComponent<T>>(\r\n\t\t\tthis._config.changeDetection === ChangeDetectionStrategy.OnPush ? LuModalPanelComponent : LuModalPanelComponentDefaultCD,\r\n\t\t\tundefined,\r\n\t\t\tinjector,\r\n\t\t);\r\n\t\tthis._containerRef = this._overlayRef.attach<ALuModalPanelComponent<T>>(containerPortal);\r\n\t\tconst panel = this._containerRef.instance;\r\n\t\tthis._componentRef = panel.attachInnerComponent(this._component, injector);\r\n\t\tsetAriaHiddenOnApplicationRoot(this._applicationRef, true);\r\n\t}\r\n\tprotected override _closePopup() {\r\n\t\tthis._componentRef.destroy();\r\n\t\tthis._containerRef.destroy();\r\n\t\tsetAriaHiddenOnApplicationRoot(this._applicationRef, false);\r\n\t}\r\n\r\n\tprotected override _getOverlayPanelClasses(): string[] {\r\n\t\tconst classes = super._getOverlayPanelClasses();\r\n\r\n\t\tif (this.modalClasses.overlayPane) {\r\n\t\t\tclasses.push(this.modalClasses.overlayPane);\r\n\t\t}\r\n\r\n\t\treturn classes;\r\n\t}\r\n}\r\n\r\n@Injectable()\r\nexport class LuModalRefFactory implements ILuPopupRefFactory<ILuModalContent, LuModalConfig> {\r\n\tprotected _applicationRef = inject(ApplicationRef);\r\n\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector) {}\r\n\tforge<T extends ILuModalContent, C extends LuModalConfig, D, R>(component: ComponentType<T>, config: C) {\r\n\t\treturn new LuModalRef<T, D, R>(this._overlay, this._injector, component, config, this._applicationRef);\r\n\t}\r\n}\r\n","import { ComponentType } from '@angular/cdk/portal';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { ILuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_CONFIG, LU_MODAL_REF_FACTORY } from './modal.token';\r\n\r\n@Injectable()\r\nexport class LuModal {\r\n\tprotected _factory = inject(LU_MODAL_REF_FACTORY);\r\n\tprotected _config = inject(LU_MODAL_CONFIG);\r\n\r\n\topen<T extends ILuModalContent<R>, D, R>(component: ComponentType<T>, data: D = undefined, config: Partial<LuModalConfig> = {}): ILuModalRef<T, D, R> {\r\n\t\tconst extendedConfig = { ...this._config, ...config } as LuModalConfig;\r\n\t\tconst ref = this._factory.forge<T, LuModalConfig, D, T extends ILuModalContent<infer R> ? R : unknown>(component, extendedConfig);\r\n\t\tref.open(data);\r\n\t\treturn ref;\r\n\t}\r\n}\r\n","import { OverlayModule } from '@angular/cdk/overlay';\r\nimport { NgModule, Provider } from '@angular/core';\r\nimport { LuModalRefFactory } from './modal-ref.factory';\r\nimport { LuModal } from './modal.service';\r\nimport { LU_MODAL_REF_FACTORY } from './modal.token';\r\n\r\n/**\r\n * Provide LuModal.\r\n * Note that OverlayModule should be imported in one of the EnvironmentInjectors (AppModule, lazy-loaded route) using `providers: [importProvidersFrom(OverlayModule)]`.\r\n */\r\nexport function provideLuModal(): Provider[] {\r\n\treturn [LuModal, { provide: LU_MODAL_REF_FACTORY, useClass: LuModalRefFactory }];\r\n}\r\n\r\n@NgModule({\r\n\timports: [OverlayModule],\r\n\tproviders: [provideLuModal()],\r\n})\r\nexport class LuModalModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ALuModalRef"],"mappings":";;;;;;;;;;;;;;;AAGa,MAAA,oBAAoB,GAAkB;AAClD,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,aAAa,EAAE,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;AACjE,IAAA,UAAU,EAAE,gBAAgB;AAC5B,IAAA,IAAI,EAAE,GAAG;IACT,eAAe,EAAE,uBAAuB,CAAC,MAAM;EAC9C;AAEK,MAAM,wBAAwB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACjC,oBAAoB,CACvB,EAAA,EAAA,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,OAAO;;ACLL,MAAA,cAAc,GAAwC;AAClE,IAAA,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,sBAAsB,EAAE,cAAc,EAAE,oBAAoB,EAAE;AAC5G,IAAA,SAAS,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,0BAA0B,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,wBAAwB,EAAE;;;MCX9I,qBAAqB,GAAG,IAAI,cAAc,CA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,CAAA,EAAA,CAAA,CAAA;2FAGX,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,SAAS,EAAE,CAAC,cAAc,EAAE,CAAC;iBAC7B,CAAA;;;ACjBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -15,13 +15,7 @@ const luDefaultPopupConfig = {
|
|
|
15
15
|
size: 'M',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const LU_POPUP_REF_FACTORY = new InjectionToken('LuPopupRefFactory'
|
|
19
|
-
factory: () => ({
|
|
20
|
-
forge() {
|
|
21
|
-
throw new Error('[LuPopupRefFactory] Cannot call forge, LuPopupRefFactory needs to be overriden.');
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
});
|
|
18
|
+
const LU_POPUP_REF_FACTORY = new InjectionToken('LuPopupRefFactory');
|
|
25
19
|
/** Injection token that can be used to access the data that was passed in to a dialog. */
|
|
26
20
|
const LU_POPUP_DATA = new InjectionToken('LuPopupData');
|
|
27
21
|
const LU_POPUP_CONFIG = new InjectionToken('LuPopupDefaultConfig', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-popup.mjs","sources":["../../../packages/ng/popup/src/lib/popup-config.default.ts","../../../packages/ng/popup/src/lib/popup.token.ts","../../../packages/ng/popup/src/lib/popup-ref.model.ts","../../../packages/ng/popup/src/lib/popup-ref.factory.ts","../../../packages/ng/popup/src/lib/popup.service.ts","../../../packages/ng/popup/src/lib/popup.module.ts","../../../packages/ng/popup/src/public-api.ts","../../../packages/ng/popup/src/lucca-front-ng-popup.ts"],"sourcesContent":["import { ILuPopupConfig } from './popup-config.model';\r\n\r\nexport const luDefaultPopupConfig: ILuPopupConfig = {\r\n\tposition: 'center',\r\n\tnoBackdrop: false,\r\n\tundismissable: false,\r\n\tbackdropClass: ['cdk-overlay-dark-backdrop', 'lu-popup-backdrop'],\r\n\tpanelClass: 'lu-popup-panel',\r\n\tsize: 'M',\r\n};\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ILuPopupRefFactory } from './popup-ref.model';\r\n\r\nexport const LU_POPUP_REF_FACTORY = new InjectionToken<ILuPopupRefFactory>('LuPopupRefFactory', {\r\n\tfactory: () => ({\r\n\t\tforge() {\r\n\t\t\tthrow new Error('[LuPopupRefFactory] Cannot call forge, LuPopupRefFactory needs to be overriden.');\r\n\t\t},\r\n\t}),\r\n});\r\n\r\n/** Injection token that can be used to access the data that was passed in to a dialog. */\r\nexport const LU_POPUP_DATA = new InjectionToken<unknown>('LuPopupData');\r\nexport const LU_POPUP_CONFIG = new InjectionToken<ILuPopupConfig>('LuPopupDefaultConfig', {\r\n\tfactory: () => ({}),\r\n});\r\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { ComponentPortal, ComponentType } from '@angular/cdk/portal';\r\nimport { ComponentRef, Injector } from '@angular/core';\r\nimport { Observable, Subject, Subscription } from 'rxjs';\r\nimport { filter } from 'rxjs/operators';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { LU_POPUP_DATA } from './popup.token';\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nexport interface ILuPopupRef<T = unknown, D = unknown, R = unknown> {\r\n\tonOpen: Observable<D>;\r\n\tonClose: Observable<R>;\r\n\tonDismiss: Observable<void>;\r\n\tonBackdropClick: Observable<void>;\r\n\topen(data: D): void;\r\n\tclose(result: R): void;\r\n\tdismiss(): void;\r\n}\r\nexport interface ILuPopupRefFactory<TComponent = unknown, TConfig extends ILuPopupConfig = ILuPopupConfig> {\r\n\tforge<T extends TComponent, C extends TConfig, D, R>(component: ComponentType<T>, config: C): ILuPopupRef<T, D, R>;\r\n}\r\n\r\nexport abstract class ALuPopupRef<T = unknown, D = unknown, R = unknown, C extends ILuPopupConfig = ILuPopupConfig> implements ILuPopupRef<T, D, R> {\r\n\tonOpen = new Subject<D>();\r\n\tonClose = new Subject<R>();\r\n\tonDismiss = new Subject<void>();\r\n\tonBackdropClick = new Subject<void>();\r\n\r\n\tprotected _overlayRef: OverlayRef;\r\n\tprotected _componentRef: ComponentRef<T>;\r\n\r\n\tprotected _subs = new Subscription();\r\n\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector, protected _component: ComponentType<T>, protected _config: C) {}\r\n\r\n\topen(data?: D) {\r\n\t\tthis._createOverlay();\r\n\t\tthis._openPopup(data);\r\n\r\n\t\tthis._subToCloseEvents();\r\n\r\n\t\tthis.onOpen.next(data);\r\n\t\tthis.onOpen.complete();\r\n\t}\r\n\tclose(result?: R) {\r\n\t\tthis.onClose.next(result);\r\n\t\tthis._destroy();\r\n\t}\r\n\tdismiss() {\r\n\t\tthis.onDismiss.next();\r\n\t\tthis._destroy();\r\n\t}\r\n\t/**\r\n\t * This method creates the overlay from the provided popover's template and saves its\r\n\t * OverlayRef so that it can be attached to the DOM when openPopover is called.\r\n\t */\r\n\tprotected _createOverlay() {\r\n\t\tif (!this._overlayRef) {\r\n\t\t\tconst overlayConfig = this._getOverlayConfig();\r\n\t\t\tthis._overlayRef = this._overlay.create(overlayConfig);\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * This method builds the configuration object needed to create the overlay, the OverlayConfig.\r\n\t * @returns OverlayConfig\r\n\t */\r\n\tprotected _getOverlayConfig(): OverlayConfig {\r\n\t\tconst overlayConfig = new OverlayConfig();\r\n\t\tswitch (this._config.position) {\r\n\t\t\tcase 'top':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().top('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'bottom':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().bottom('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'left':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerVertically().left('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'right':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerVertically().right('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'center':\r\n\t\t\tdefault:\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().centerVertically();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\toverlayConfig.hasBackdrop = !this._config.noBackdrop;\r\n\t\toverlayConfig.backdropClass = this._config.backdropClass;\r\n\t\toverlayConfig.panelClass = this._getOverlayPanelClasses();\r\n\t\toverlayConfig.scrollStrategy = this._overlay.scrollStrategies.block();\r\n\t\treturn overlayConfig;\r\n\t}\r\n\tprotected _openPopup(data?: D) {\r\n\t\tconst injector = Injector.create({\r\n\t\t\tproviders: [\r\n\t\t\t\t{ provide: ALuPopupRef, useValue: this },\r\n\t\t\t\t{ provide: LU_POPUP_DATA, useValue: data },\r\n\t\t\t],\r\n\t\t\tparent: this._injector,\r\n\t\t});\r\n\t\tconst portal = new ComponentPortal(this._component, undefined, injector);\r\n\t\tthis._componentRef = this._overlayRef.attach<T>(portal);\r\n\t}\r\n\tprotected _getOverlayPanelClasses(): string[] {\r\n\t\tconst panelClasses: string[] = [];\r\n\t\tif (Array.isArray(this._config.panelClass)) {\r\n\t\t\tpanelClasses.push(...this._config.panelClass);\r\n\t\t} else {\r\n\t\t\tpanelClasses.push(this._config.panelClass);\r\n\t\t}\r\n\t\tpanelClasses.push(`mod-${this._config.size}`);\r\n\t\treturn panelClasses;\r\n\t}\r\n\tprotected _destroy() {\r\n\t\tthis._cleanSubscription();\r\n\t\tthis._closePopup();\r\n\t\tthis._destroyOverlay();\r\n\t\tthis._completeSubjects();\r\n\t}\r\n\tprotected _completeSubjects() {\r\n\t\tthis.onClose.complete();\r\n\t\tthis.onOpen.complete();\r\n\t\tthis.onDismiss.complete();\r\n\t\tthis.onBackdropClick.complete();\r\n\t}\r\n\tprotected _destroyOverlay() {\r\n\t\tthis._overlayRef.detachBackdrop();\r\n\t\tthis._overlayRef.detach();\r\n\t}\r\n\tprotected _closePopup() {\r\n\t\tthis._componentRef.destroy();\r\n\t}\r\n\tprotected _subToCloseEvents() {\r\n\t\tif (!this._config.undismissable) {\r\n\t\t\tthis._subToEscapeKeydownEvent();\r\n\t\t}\r\n\t\tthis._subToBackdropClickEvent();\r\n\t}\r\n\tprotected _subToEscapeKeydownEvent() {\r\n\t\tconst escPressed$ = this._overlayRef.keydownEvents().pipe(filter(({ key }) => key === 'Escape'));\r\n\t\tthis._subs.add(escPressed$.subscribe((_e) => this.dismiss()));\r\n\t}\r\n\tprotected _subToBackdropClickEvent() {\r\n\t\tconst bdClicked$ = this._overlayRef.backdropClick();\r\n\t\tconst bdClickedSub = bdClicked$.subscribe((_e) => {\r\n\t\t\tthis.onBackdropClick.next();\r\n\t\t\tif (!this._config.undismissable) {\r\n\t\t\t\tthis.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis._subs.add(bdClickedSub);\r\n\t}\r\n\tprotected _cleanSubscription() {\r\n\t\tthis._subs.unsubscribe();\r\n\t}\r\n}\r\n","import { ComponentType, Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ALuPopupRef, ILuPopupRefFactory } from './popup-ref.model';\r\n\r\nexport class LuPopupRef<T = unknown, D = unknown, R = unknown> extends ALuPopupRef<T, D, R> {\r\n\tconstructor(protected override _overlay: Overlay, protected override _injector: Injector, protected override _component: ComponentType<T>, protected override _config: ILuPopupConfig) {\r\n\t\tsuper(_overlay, _injector, _component, _config);\r\n\t}\r\n}\r\n\r\n@Injectable()\r\nexport class LuPopupRefFactory implements ILuPopupRefFactory {\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector) {}\r\n\tforge<T, D, R>(component: ComponentType<T>, config: ILuPopupConfig) {\r\n\t\treturn new LuPopupRef<T, D, R>(this._overlay, this._injector, component, config);\r\n\t}\r\n}\r\n","import { ComponentType } from '@angular/cdk/overlay';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ILuPopupRef } from './popup-ref.model';\r\nimport { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';\r\n\r\n@Injectable()\r\nexport class LuPopup<C extends ILuPopupConfig = ILuPopupConfig> {\r\n\tprotected _factory = inject(LU_POPUP_REF_FACTORY);\r\n\tprotected _config = inject<C>(LU_POPUP_CONFIG);\r\n\r\n\topen<T, D, R>(component: ComponentType<T>, data: D = undefined, config: Partial<C> = {}): ILuPopupRef<T, D, R> {\r\n\t\tconst extendedConfig = { ...this._config, ...config };\r\n\t\tconst ref = this._factory.forge<T, C, D, R>(component, extendedConfig);\r\n\t\tref.open(data);\r\n\t\treturn ref;\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { LuPopup } from './popup.service';\r\nimport { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';\r\nimport { luDefaultPopupConfig } from './popup-config.default';\r\nimport { LuPopupRefFactory } from './popup-ref.factory';\r\n\r\n@NgModule({\r\n\timports: [OverlayModule],\r\n\texports: [],\r\n\tproviders: [LuPopup, { provide: LU_POPUP_CONFIG, useValue: luDefaultPopupConfig }, { provide: LU_POPUP_REF_FACTORY, useClass: LuPopupRefFactory }],\r\n})\r\nexport class LuPopupModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAEa,MAAA,oBAAoB,GAAmB;AACnD,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,aAAa,EAAE,CAAC,2BAA2B,EAAE,m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../packages/ng/popup/src/lib/popup-ref.model.ts","../../../packages/ng/popup/src/lib/popup-ref.factory.ts","../../../packages/ng/popup/src/lib/popup.service.ts","../../../packages/ng/popup/src/lib/popup.module.ts","../../../packages/ng/popup/src/public-api.ts","../../../packages/ng/popup/src/lucca-front-ng-popup.ts"],"sourcesContent":["import { ILuPopupConfig } from './popup-config.model';\r\n\r\nexport const luDefaultPopupConfig: ILuPopupConfig = {\r\n\tposition: 'center',\r\n\tnoBackdrop: false,\r\n\tundismissable: false,\r\n\tbackdropClass: ['cdk-overlay-dark-backdrop', 'lu-popup-backdrop'],\r\n\tpanelClass: 'lu-popup-panel',\r\n\tsize: 'M',\r\n};\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ILuPopupRefFactory } from './popup-ref.model';\r\n\r\nexport const LU_POPUP_REF_FACTORY = new InjectionToken<ILuPopupRefFactory>('LuPopupRefFactory');\r\n\r\n/** Injection token that can be used to access the data that was passed in to a dialog. */\r\nexport const LU_POPUP_DATA = new InjectionToken<unknown>('LuPopupData');\r\nexport const LU_POPUP_CONFIG = new InjectionToken<ILuPopupConfig>('LuPopupDefaultConfig', {\r\n\tfactory: () => ({}),\r\n});\r\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { ComponentPortal, ComponentType } from '@angular/cdk/portal';\r\nimport { ComponentRef, Injector } from '@angular/core';\r\nimport { Observable, Subject, Subscription } from 'rxjs';\r\nimport { filter } from 'rxjs/operators';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { LU_POPUP_DATA } from './popup.token';\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nexport interface ILuPopupRef<T = unknown, D = unknown, R = unknown> {\r\n\tonOpen: Observable<D>;\r\n\tonClose: Observable<R>;\r\n\tonDismiss: Observable<void>;\r\n\tonBackdropClick: Observable<void>;\r\n\topen(data: D): void;\r\n\tclose(result: R): void;\r\n\tdismiss(): void;\r\n}\r\nexport interface ILuPopupRefFactory<TComponent = unknown, TConfig extends ILuPopupConfig = ILuPopupConfig> {\r\n\tforge<T extends TComponent, C extends TConfig, D, R>(component: ComponentType<T>, config: C): ILuPopupRef<T, D, R>;\r\n}\r\n\r\nexport abstract class ALuPopupRef<T = unknown, D = unknown, R = unknown, C extends ILuPopupConfig = ILuPopupConfig> implements ILuPopupRef<T, D, R> {\r\n\tonOpen = new Subject<D>();\r\n\tonClose = new Subject<R>();\r\n\tonDismiss = new Subject<void>();\r\n\tonBackdropClick = new Subject<void>();\r\n\r\n\tprotected _overlayRef: OverlayRef;\r\n\tprotected _componentRef: ComponentRef<T>;\r\n\r\n\tprotected _subs = new Subscription();\r\n\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector, protected _component: ComponentType<T>, protected _config: C) {}\r\n\r\n\topen(data?: D) {\r\n\t\tthis._createOverlay();\r\n\t\tthis._openPopup(data);\r\n\r\n\t\tthis._subToCloseEvents();\r\n\r\n\t\tthis.onOpen.next(data);\r\n\t\tthis.onOpen.complete();\r\n\t}\r\n\tclose(result?: R) {\r\n\t\tthis.onClose.next(result);\r\n\t\tthis._destroy();\r\n\t}\r\n\tdismiss() {\r\n\t\tthis.onDismiss.next();\r\n\t\tthis._destroy();\r\n\t}\r\n\t/**\r\n\t * This method creates the overlay from the provided popover's template and saves its\r\n\t * OverlayRef so that it can be attached to the DOM when openPopover is called.\r\n\t */\r\n\tprotected _createOverlay() {\r\n\t\tif (!this._overlayRef) {\r\n\t\t\tconst overlayConfig = this._getOverlayConfig();\r\n\t\t\tthis._overlayRef = this._overlay.create(overlayConfig);\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * This method builds the configuration object needed to create the overlay, the OverlayConfig.\r\n\t * @returns OverlayConfig\r\n\t */\r\n\tprotected _getOverlayConfig(): OverlayConfig {\r\n\t\tconst overlayConfig = new OverlayConfig();\r\n\t\tswitch (this._config.position) {\r\n\t\t\tcase 'top':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().top('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'bottom':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().bottom('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'left':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerVertically().left('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'right':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerVertically().right('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'center':\r\n\t\t\tdefault:\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().centerVertically();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\toverlayConfig.hasBackdrop = !this._config.noBackdrop;\r\n\t\toverlayConfig.backdropClass = this._config.backdropClass;\r\n\t\toverlayConfig.panelClass = this._getOverlayPanelClasses();\r\n\t\toverlayConfig.scrollStrategy = this._overlay.scrollStrategies.block();\r\n\t\treturn overlayConfig;\r\n\t}\r\n\tprotected _openPopup(data?: D) {\r\n\t\tconst injector = Injector.create({\r\n\t\t\tproviders: [\r\n\t\t\t\t{ provide: ALuPopupRef, useValue: this },\r\n\t\t\t\t{ provide: LU_POPUP_DATA, useValue: data },\r\n\t\t\t],\r\n\t\t\tparent: this._injector,\r\n\t\t});\r\n\t\tconst portal = new ComponentPortal(this._component, undefined, injector);\r\n\t\tthis._componentRef = this._overlayRef.attach<T>(portal);\r\n\t}\r\n\tprotected _getOverlayPanelClasses(): string[] {\r\n\t\tconst panelClasses: string[] = [];\r\n\t\tif (Array.isArray(this._config.panelClass)) {\r\n\t\t\tpanelClasses.push(...this._config.panelClass);\r\n\t\t} else {\r\n\t\t\tpanelClasses.push(this._config.panelClass);\r\n\t\t}\r\n\t\tpanelClasses.push(`mod-${this._config.size}`);\r\n\t\treturn panelClasses;\r\n\t}\r\n\tprotected _destroy() {\r\n\t\tthis._cleanSubscription();\r\n\t\tthis._closePopup();\r\n\t\tthis._destroyOverlay();\r\n\t\tthis._completeSubjects();\r\n\t}\r\n\tprotected _completeSubjects() {\r\n\t\tthis.onClose.complete();\r\n\t\tthis.onOpen.complete();\r\n\t\tthis.onDismiss.complete();\r\n\t\tthis.onBackdropClick.complete();\r\n\t}\r\n\tprotected _destroyOverlay() {\r\n\t\tthis._overlayRef.detachBackdrop();\r\n\t\tthis._overlayRef.detach();\r\n\t}\r\n\tprotected _closePopup() {\r\n\t\tthis._componentRef.destroy();\r\n\t}\r\n\tprotected _subToCloseEvents() {\r\n\t\tif (!this._config.undismissable) {\r\n\t\t\tthis._subToEscapeKeydownEvent();\r\n\t\t}\r\n\t\tthis._subToBackdropClickEvent();\r\n\t}\r\n\tprotected _subToEscapeKeydownEvent() {\r\n\t\tconst escPressed$ = this._overlayRef.keydownEvents().pipe(filter(({ key }) => key === 'Escape'));\r\n\t\tthis._subs.add(escPressed$.subscribe((_e) => this.dismiss()));\r\n\t}\r\n\tprotected _subToBackdropClickEvent() {\r\n\t\tconst bdClicked$ = this._overlayRef.backdropClick();\r\n\t\tconst bdClickedSub = bdClicked$.subscribe((_e) => {\r\n\t\t\tthis.onBackdropClick.next();\r\n\t\t\tif (!this._config.undismissable) {\r\n\t\t\t\tthis.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis._subs.add(bdClickedSub);\r\n\t}\r\n\tprotected _cleanSubscription() {\r\n\t\tthis._subs.unsubscribe();\r\n\t}\r\n}\r\n","import { ComponentType, Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ALuPopupRef, ILuPopupRefFactory } from './popup-ref.model';\r\n\r\nexport class LuPopupRef<T = unknown, D = unknown, R = unknown> extends ALuPopupRef<T, D, R> {\r\n\tconstructor(protected override _overlay: Overlay, protected override _injector: Injector, protected override _component: ComponentType<T>, protected override _config: ILuPopupConfig) {\r\n\t\tsuper(_overlay, _injector, _component, _config);\r\n\t}\r\n}\r\n\r\n@Injectable()\r\nexport class LuPopupRefFactory implements ILuPopupRefFactory {\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector) {}\r\n\tforge<T, D, R>(component: ComponentType<T>, config: ILuPopupConfig) {\r\n\t\treturn new LuPopupRef<T, D, R>(this._overlay, this._injector, component, config);\r\n\t}\r\n}\r\n","import { ComponentType } from '@angular/cdk/overlay';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ILuPopupRef } from './popup-ref.model';\r\nimport { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';\r\n\r\n@Injectable()\r\nexport class LuPopup {\r\n\tprotected _factory = inject(LU_POPUP_REF_FACTORY);\r\n\tprotected _config = inject(LU_POPUP_CONFIG);\r\n\r\n\topen<T, D, R>(component: ComponentType<T>, data: D = undefined, config: Partial<ILuPopupConfig> = {}): ILuPopupRef<T, D, R> {\r\n\t\tconst extendedConfig = { ...this._config, ...config };\r\n\t\tconst ref = this._factory.forge<T, ILuPopupConfig, D, R>(component, extendedConfig);\r\n\t\tref.open(data);\r\n\t\treturn ref;\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { LuPopup } from './popup.service';\r\nimport { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';\r\nimport { luDefaultPopupConfig } from './popup-config.default';\r\nimport { LuPopupRefFactory } from './popup-ref.factory';\r\n\r\n@NgModule({\r\n\timports: [OverlayModule],\r\n\texports: [],\r\n\tproviders: [LuPopup, { provide: LU_POPUP_CONFIG, useValue: luDefaultPopupConfig }, { provide: LU_POPUP_REF_FACTORY, useClass: LuPopupRefFactory }],\r\n})\r\nexport class LuPopupModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\n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from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, NgModule } from '@angular/core';
|
|
3
3
|
import { luDefaultSidepanelConfig, LU_MODAL_DATA, luModalTranslations, LuModal, LuModalModule } from '@lucca-front/ng/modal';
|
|
4
|
+
export { ALuModalRef as ALuSidepanelRef } from '@lucca-front/ng/modal';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* For backward compatibility, we re-export modal tokens as sidepanel tokens.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-sidepanel.mjs","sources":["../../../packages/ng/sidepanel/src/lib/sidepanel.model.ts","../../../packages/ng/sidepanel/src/lib/sidepanel.service.ts","../../../packages/ng/sidepanel/src/lib/sidepanel.module.ts","../../../packages/ng/sidepanel/src/public-api.ts","../../../packages/ng/sidepanel/src/lucca-front-ng-sidepanel.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nimport { ILuTranslation } from '@lucca-front/ng/core';\r\nimport { ILuModalContent, ILuModalLabel, ILuModalRef, luDefaultSidepanelConfig, LuModalConfig, luModalTranslations, LU_MODAL_DATA } from '@lucca-front/ng/modal';\r\n\r\n/**\r\n * For backward compatibility, we re-export modal tokens as sidepanel tokens.\r\n * We should remove all sidepanel related files in the next major version (16+).\r\n */\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_CONFIG from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_CONFIG = new InjectionToken<LuSidepanelConfig>('LuSidepanelDefaultConfig', {\r\n\tfactory: () => luDefaultSidepanelConfig,\r\n});\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_DATA from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_DATA = LU_MODAL_DATA;\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_TRANSLATIONS from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_TRANSLATIONS = new InjectionToken('LuSidepanelTranslations', {\r\n\tfactory: () => luSidepanelTranslations,\r\n});\r\n\r\n/**\r\n * @deprecated Use ILuModalLabel from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelLabel = ILuModalLabel;\r\n\r\n/**\r\n * @deprecated Use luModalTranslations from @lucca-front/ng/modal instead.\r\n */\r\nexport const luSidepanelTranslations: ILuTranslation<ILuSidepanelLabel> = luModalTranslations;\r\n\r\n/**\r\n * @deprecated Use LuModalConfig from @lucca-front/ng/modal instead.\r\n */\r\nexport type LuSidepanelConfig = LuModalConfig;\r\n\r\n/**\r\n * @deprecated Use LuModalConfig from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelConfig = LuModalConfig;\r\n\r\n/**\r\n * @deprecated Use ILuModalContent from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelContent<T = unknown> = ILuModalContent<T>;\r\n\r\n/**\r\n * @deprecated Use ILuModalRef from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelRef<T extends ILuSidepanelContent = ILuSidepanelContent, D = unknown, R = unknown> = ILuModalRef<T, D, R>;\r\n","import { ComponentType } from '@angular/cdk/overlay';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { LuModal } from '@lucca-front/ng/modal';\r\nimport {
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-sidepanel.mjs","sources":["../../../packages/ng/sidepanel/src/lib/sidepanel.model.ts","../../../packages/ng/sidepanel/src/lib/sidepanel.service.ts","../../../packages/ng/sidepanel/src/lib/sidepanel.module.ts","../../../packages/ng/sidepanel/src/public-api.ts","../../../packages/ng/sidepanel/src/lucca-front-ng-sidepanel.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nimport { ILuTranslation } from '@lucca-front/ng/core';\r\nimport { ALuModalRef as ALuSidepanelRef, ILuModalContent, ILuModalLabel, ILuModalRef, luDefaultSidepanelConfig, LuModalConfig, luModalTranslations, LU_MODAL_DATA } from '@lucca-front/ng/modal';\r\n\r\n/**\r\n * For backward compatibility, we re-export modal tokens as sidepanel tokens.\r\n * We should remove all sidepanel related files in the next major version (16+).\r\n */\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_CONFIG from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_CONFIG = new InjectionToken<LuSidepanelConfig>('LuSidepanelDefaultConfig', {\r\n\tfactory: () => luDefaultSidepanelConfig,\r\n});\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_DATA from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_DATA = LU_MODAL_DATA;\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_TRANSLATIONS from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_TRANSLATIONS = new InjectionToken('LuSidepanelTranslations', {\r\n\tfactory: () => luSidepanelTranslations,\r\n});\r\n\r\n/**\r\n * @deprecated Use ILuModalLabel from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelLabel = ILuModalLabel;\r\n\r\n/**\r\n * @deprecated Use luModalTranslations from @lucca-front/ng/modal instead.\r\n */\r\nexport const luSidepanelTranslations: ILuTranslation<ILuSidepanelLabel> = luModalTranslations;\r\n\r\n/**\r\n * @deprecated Use LuModalConfig from @lucca-front/ng/modal instead.\r\n */\r\nexport type LuSidepanelConfig = LuModalConfig;\r\n\r\n/**\r\n * @deprecated Use LuModalConfig from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelConfig = LuModalConfig;\r\n\r\n/**\r\n * @deprecated Use ILuModalContent from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelContent<T = unknown> = ILuModalContent<T>;\r\n\r\n/**\r\n * @deprecated Use ILuModalRef from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelRef<T extends ILuSidepanelContent = ILuSidepanelContent, D = unknown, R = unknown> = ILuModalRef<T, D, R>;\r\n\r\nexport {\r\n\t/**\r\n\t * @deprecated Use ALuModalRef from @lucca-front/ng/modal instead.\r\n\t */\r\n\tALuSidepanelRef,\r\n};\r\n","import { ComponentType } from '@angular/cdk/overlay';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { ILuModalContent, LuModal } from '@lucca-front/ng/modal';\r\nimport { ILuSidepanelRef, LuSidepanelConfig, LU_SIDEPANEL_CONFIG } from './sidepanel.model';\r\n\r\n/**\r\n * @deprecated Use LuModal with `modal.open(component, data, { mode: 'sidepanel' })` instead.\r\n */\r\n@Injectable()\r\nexport class LuSidepanel extends LuModal {\r\n\tprotected override _config = inject(LU_SIDEPANEL_CONFIG);\r\n\r\n\t/**\r\n\t * @deprecated Use LuModal with `modal.open(component, data, { mode: 'sidepanel' })` instead.\r\n\t */\r\n\toverride open<T extends ILuModalContent<R>, D, R>(component: ComponentType<T>, data: D = undefined, config: Partial<LuSidepanelConfig> = {}): ILuSidepanelRef<T, D, R> {\r\n\t\treturn super.open(component, data, config);\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { LuModalModule } from '@lucca-front/ng/modal';\r\nimport { LuSidepanel } from './sidepanel.service';\r\n\r\n/**\r\n * @deprecated Use LuModal with `modal.open(component, data, { mode: 'sidepanel' })` instead.\r\n */\r\n@NgModule({\r\n\timports: [LuModalModule],\r\n\tproviders: [LuSidepanel],\r\n})\r\nexport class LuSidepanelModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAIA;;;AAGG;AAEH;;AAEG;MACU,mBAAmB,GAAG,IAAI,cAAc,CAAoB,0BAA0B,EAAE;AACpG,IAAA,OAAO,EAAE,MAAM,wBAAwB;AACvC,CAAA,EAAE;AAEH;;AAEG;AACI,MAAM,iBAAiB,GAAG,cAAc;AAE/C;;AAEG;MACU,yBAAyB,GAAG,IAAI,cAAc,CAAC,yBAAyB,EAAE;AACtF,IAAA,OAAO,EAAE,MAAM,uBAAuB;AACtC,CAAA,EAAE;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AAC;oBACxB,SAAS,EAAE,CAAC,WAAW,CAAC;iBACxB,CAAA;;;ACVD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -8,7 +8,7 @@ import * as i3 from '@lucca-front/ng/tooltip';
|
|
|
8
8
|
import { LuTooltipModule } from '@lucca-front/ng/tooltip';
|
|
9
9
|
import { ReplaySubject, Subject, Subscription, Observable, timer, isObservable, of } from 'rxjs';
|
|
10
10
|
import { map, tap, delay, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
|
11
|
-
import { ALuPopupRef
|
|
11
|
+
import { ALuPopupRef } from '@lucca-front/ng/popup';
|
|
12
12
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
13
13
|
import * as i1 from '@angular/cdk/overlay';
|
|
14
14
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
@@ -180,13 +180,7 @@ const LU_MODAL_DATA = new InjectionToken('LuModalData');
|
|
|
180
180
|
const LU_MODAL_CONFIG = new InjectionToken('LuModalDefaultConfig', {
|
|
181
181
|
factory: () => luDefaultModalConfig,
|
|
182
182
|
});
|
|
183
|
-
const LU_MODAL_REF_FACTORY = new InjectionToken('LuModalRefFactory'
|
|
184
|
-
factory: () => ({
|
|
185
|
-
forge() {
|
|
186
|
-
throw new Error('[LuModalRefFactory] Cannot call forge, LuModalRefFactory needs to be overriden.');
|
|
187
|
-
},
|
|
188
|
-
}),
|
|
189
|
-
});
|
|
183
|
+
const LU_MODAL_REF_FACTORY = new InjectionToken('LuModalRefFactory');
|
|
190
184
|
|
|
191
185
|
function setAriaHiddenOnApplicationRoot(applicationRef, hidden) {
|
|
192
186
|
for (const component of applicationRef.components) {
|
|
@@ -249,14 +243,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImpor
|
|
|
249
243
|
type: Injectable
|
|
250
244
|
}], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.Injector }]; } });
|
|
251
245
|
|
|
252
|
-
class LuModal
|
|
246
|
+
class LuModal {
|
|
253
247
|
constructor() {
|
|
254
|
-
super(...arguments);
|
|
255
248
|
this._factory = inject(LU_MODAL_REF_FACTORY);
|
|
256
249
|
this._config = inject(LU_MODAL_CONFIG);
|
|
257
250
|
}
|
|
251
|
+
open(component, data = undefined, config = {}) {
|
|
252
|
+
const extendedConfig = { ...this._config, ...config };
|
|
253
|
+
const ref = this._factory.forge(component, extendedConfig);
|
|
254
|
+
ref.open(data);
|
|
255
|
+
return ref;
|
|
256
|
+
}
|
|
258
257
|
}
|
|
259
|
-
LuModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, deps:
|
|
258
|
+
LuModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
260
259
|
LuModal.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal });
|
|
261
260
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: LuModal, decorators: [{
|
|
262
261
|
type: Injectable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-modal.mjs","sources":["../../../packages/ng/modal/src/lib/modal-config.default.ts","../../../packages/ng/modal/src/lib/modal-config.model.ts","../../../packages/ng/modal/src/lib/modal.translate.ts","../../../packages/ng/modal/src/lib/modal-ref.model.ts","../../../packages/ng/modal/src/lib/modal-panel.component.ts","../../../packages/ng/modal/src/lib/modal-panel.component.html","../../../packages/ng/modal/src/lib/modal.token.ts","../../../packages/ng/modal/src/lib/modal.utils.ts","../../../packages/ng/modal/src/lib/modal-ref.factory.ts","../../../packages/ng/modal/src/lib/modal.service.ts","../../../packages/ng/modal/src/lib/modal.module.ts","../../../packages/ng/modal/src/public-api.ts","../../../packages/ng/modal/src/lucca-front-ng-modal.ts"],"sourcesContent":["import { ChangeDetectionStrategy } from '@angular/core';\r\nimport { LuModalConfig } from './modal-config.model';\r\n\r\nexport const luDefaultModalConfig: LuModalConfig = {\r\n\tmode: 'modal',\r\n\tposition: 'center',\r\n\tnoBackdrop: false,\r\n\tundismissable: false,\r\n\tbackdropClass: ['cdk-overlay-dark-backdrop', 'lu-popup-backdrop'],\r\n\tpanelClass: 'lu-popup-panel',\r\n\tsize: 'M',\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n};\r\n\r\nexport const luDefaultSidepanelConfig: LuModalConfig = {\r\n\t...luDefaultModalConfig,\r\n\tmode: 'sidepanel',\r\n\tposition: 'right',\r\n};\r\n","import { ChangeDetectionStrategy } from '@angular/core';\r\nimport { ILuPopupConfig } from '@lucca-front/ng/popup';\r\n\r\nexport type LuModalMode = 'modal' | 'sidepanel';\r\n\r\nexport interface LuModalClasses {\r\n\tpanel: string;\r\n\tpanelContainer: string;\r\n\tpanelInner: string;\r\n\toverlayPane?: string;\r\n}\r\n\r\nexport const luModalClasses: Record<LuModalMode, LuModalClasses> = {\r\n\tmodal: { panel: 'lu-modal-panel', panelInner: 'lu-modal-panel-inner', panelContainer: 'lu-modal-container' },\r\n\tsidepanel: { panel: 'lu-sidepanel-panel', panelInner: 'lu-sidepanel-panel-inner', overlayPane: 'mod-sidepanel', panelContainer: 'lu-sidepanel-container' },\r\n};\r\n\r\ntype LuModalModeWithPosition = { mode?: 'modal'; position: undefined | 'center' } | { mode: 'sidepanel'; position: 'left' | 'right' };\r\n\r\nexport type LuModalConfig = ILuPopupConfig &\r\n\tLuModalModeWithPosition & {\r\n\t\tchangeDetection: ChangeDetectionStrategy;\r\n\t};\r\n\r\n/**\r\n * @deprecated Use LuModalConfig instead.\r\n */\r\nexport type ILuModalConfig = LuModalConfig;\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuTranslation } from '@lucca-front/ng/core';\r\n\r\nexport const LU_MODAL_TRANSLATIONS = new InjectionToken('LuModalTranslations', {\r\n\tfactory: () => luModalTranslations,\r\n});\r\n\r\nexport interface ILuModalLabel {\r\n\tsubmit: string;\r\n\tcancel: string;\r\n\tclose: string;\r\n}\r\n\r\nexport const luModalTranslations: ILuTranslation<ILuModalLabel> = {\r\n\ten: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Cancel',\r\n\t\tclose: 'Close',\r\n\t},\r\n\tfr: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Annuler',\r\n\t\tclose: 'Fermer',\r\n\t},\r\n\tes: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Cancelar',\r\n\t\tclose: 'Cerrar',\r\n\t},\r\n};\r\n","import { ALuPopupRef, ILuPopupRef } from '@lucca-front/ng/popup';\r\nimport { LuModalClasses, luModalClasses, LuModalConfig, LuModalMode } from './modal-config.model';\r\nimport { ILuModalContent } from './modal.model';\r\n\r\nexport interface ILuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown> extends ILuPopupRef<T, D, R> {\r\n\tmode: LuModalMode;\r\n\tmodalClasses: LuModalClasses;\r\n}\r\nexport abstract class ALuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig>\r\n\textends ALuPopupRef<T, D, R, C>\r\n\timplements ILuModalRef<T, D, R>\r\n{\r\n\tpublic get mode(): LuModalMode {\r\n\t\treturn this._config.mode || 'modal';\r\n\t}\r\n\r\n\tpublic get modalClasses(): LuModalClasses {\r\n\t\treturn luModalClasses[this.mode];\r\n\t}\r\n}\r\n","import { A11yModule } from '@angular/cdk/a11y';\r\nimport { AsyncPipe, NgClass, NgIf } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, Directive, DoCheck, ElementRef, HostBinding, Injector, OnDestroy, Renderer2, Type, ViewChild, ViewContainerRef } from '@angular/core';\r\nimport { getIntl } from '@lucca-front/ng/core';\r\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\r\nimport { isObservable, Observable, of, ReplaySubject, Subject, Subscription, timer } from 'rxjs';\r\nimport { delay, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';\r\nimport { LuModalClasses } from './modal-config.model';\r\nimport { ALuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_TRANSLATIONS } from './modal.translate';\r\n\r\nlet modalId = 0;\r\n\r\n@Directive()\r\nexport abstract class ALuModalPanelComponent<T extends ILuModalContent> implements OnDestroy, DoCheck {\r\n\t@ViewChild('container', { read: ViewContainerRef, static: true })\r\n\tprotected _containerRef: ViewContainerRef;\r\n\tprotected _componentInstance: ILuModalContent;\r\n\tprotected doCheck$ = new ReplaySubject<void>(1);\r\n\r\n\tpublic intl = getIntl(LU_MODAL_TRANSLATIONS);\r\n\tprotected title$ = this.listenComponentValue(() => this._componentInstance.title);\r\n\tprotected submitLabel$ = this.listenComponentValue(() => this._componentInstance.submitLabel || this.intl.submit);\r\n\tprotected cancelLabel$ = this.listenComponentValue(() => this._componentInstance.cancelLabel || this.intl.cancel);\r\n\tprotected submitCounter$ = this.listenComponentValue(() => this._componentInstance.submitCounter);\r\n\tprotected submitDisabled$ = this.listenComponentValue(() => this._componentInstance.submitDisabled);\r\n\tprotected hasSubmitCounter$ = this.submitCounter$.pipe(map(Boolean));\r\n\r\n\tprotected closeLabel = this.intl.close;\r\n\r\n\tget isSubmitHidden() {\r\n\t\treturn !this._componentInstance.submitAction;\r\n\t}\r\n\tget submitPalette() {\r\n\t\treturn this._componentInstance.submitPalette || 'primary';\r\n\t}\r\n\r\n\tsubmitClass$ = new Subject();\r\n\terror$ = new Subject();\r\n\r\n\tpublic readonly modalId = modalId++;\r\n\r\n\tprivate _subs = new Subscription();\r\n\tpublic modalClasses: LuModalClasses;\r\n\r\n\tconstructor(protected _ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tthis.modalClasses = _ref.modalClasses;\r\n\t\t_renderer.addClass(_elementRef.nativeElement, this.modalClasses.panel);\r\n\t}\r\n\tngDoCheck(): void {\r\n\t\tthis.doCheck$.next();\r\n\t}\r\n\tattachInnerComponent(componentType: Type<T>, injector: Injector) {\r\n\t\tconst ref = this._containerRef.createComponent(componentType, { injector });\r\n\t\tthis._componentInstance = ref.instance;\r\n\t\treturn ref;\r\n\t}\r\n\tngOnDestroy() {\r\n\t\tthis.doCheck$.complete();\r\n\t\tthis._subs.unsubscribe();\r\n\t}\r\n\tdismiss() {\r\n\t\tthis._ref.dismiss();\r\n\t}\r\n\tsubmit() {\r\n\t\tthis.error$.next(undefined);\r\n\t\tthis.submitClass$.next('is-loading');\r\n\t\tconst result$ = this._componentInstance.submitAction();\r\n\t\tif (result$ instanceof Observable) {\r\n\t\t\tthis._subs.add(\r\n\t\t\t\tresult$\r\n\t\t\t\t\t.pipe(\r\n\t\t\t\t\t\ttap((_) => this.submitClass$.next('is-success')),\r\n\t\t\t\t\t\tdelay(500),\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.subscribe({\r\n\t\t\t\t\t\tnext: (result) => this._ref.close(result),\r\n\t\t\t\t\t\terror: (err) => {\r\n\t\t\t\t\t\t\tthis.submitClass$.next('is-error');\r\n\t\t\t\t\t\t\tthis.error$.next(err);\r\n\t\t\t\t\t\t\ttimer(2000).subscribe((_) => {\r\n\t\t\t\t\t\t\t\tthis.submitClass$.next('');\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\t\tthis.submitClass$.next('');\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}),\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis._ref.close(result$);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate listenComponentValue<TValue>(selector: () => TValue | Observable<TValue>): Observable<TValue> {\r\n\t\treturn this.doCheck$.pipe(\r\n\t\t\tmap(selector),\r\n\t\t\tdistinctUntilChanged(),\r\n\t\t\tswitchMap((value) => (isObservable(value) ? value : of(value))),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nconst panelImports = [A11yModule, AsyncPipe, LuTooltipModule, NgClass, NgIf];\r\n\r\n@Component({\r\n\tselector: 'lu-modal-panel',\r\n\tstandalone: true,\r\n\timports: panelImports,\r\n\ttemplateUrl: './modal-panel.component.html',\r\n\tstyleUrls: ['./modal-panel.component.scss'],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class LuModalPanelComponent<T extends ILuModalContent = ILuModalContent> extends ALuModalPanelComponent<T> {\r\n\t@HostBinding('class.lu-modal-panel') class = true;\r\n\tconstructor(_ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tsuper(_ref, _elementRef, _renderer);\r\n\t}\r\n}\r\n@Component({\r\n\tselector: 'lu-modal-panel-default',\r\n\tstandalone: true,\r\n\timports: panelImports,\r\n\ttemplateUrl: './modal-panel.component.html',\r\n\tstyleUrls: ['./modal-panel.component.scss'],\r\n\tchangeDetection: ChangeDetectionStrategy.Default,\r\n})\r\n// eslint-disable-next-line @angular-eslint/component-class-suffix\r\nexport class LuModalPanelComponentDefaultCD<T extends ILuModalContent = ILuModalContent> extends ALuModalPanelComponent<T> {\r\n\t@HostBinding('class.lu-modal-panel') class = true;\r\n\tconstructor(_ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tsuper(_ref, _elementRef, _renderer);\r\n\t}\r\n}\r\n","<div\r\n\tcdkTrapFocus=\"true\"\r\n\tcdkTrapFocusAutoCapture=\"true\"\r\n\trole=\"dialog\"\r\n\taria-modal=\"true\"\r\n\t[attr.aria-labelledby]=\"'luModalTitle' + modalId\"\r\n\t[ngClass]=\"modalClasses.panelInner\"\r\n>\r\n\t<div [ngClass]=\"modalClasses.panelContainer\" role=\"document\">\r\n\t\t<div class=\"lu-modal-header\" tabindex=\"-1\" cdkFocusInitial>\r\n\t\t\t<button type=\"button\" class=\"actionIcon lu-modal-header-close\" (click)=\"dismiss()\" [luTooltip]=\"closeLabel\">\r\n\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-cross\"></span>\r\n\t\t\t\t<span class=\"u-mask\">{{ closeLabel }}</span>\r\n\t\t\t</button>\r\n\t\t\t<h1 [attr.id]=\"'luModalTitle' + modalId\" class=\"lu-modal-header-title\">{{ title$ | async }}</h1>\r\n\t\t</div>\r\n\t\t<div class=\"lu-modal-content\">\r\n\t\t\t<ng-container #container></ng-container>\r\n\t\t</div>\r\n\t\t<div class=\"lu-modal-footer\">\r\n\t\t\t<button\r\n\t\t\t\ttype=\"button\"\r\n\t\t\t\t*ngIf=\"!isSubmitHidden\"\r\n\t\t\t\tclass=\"button palette-{{ submitPalette }}\"\r\n\t\t\t\t[disabled]=\"submitDisabled$ | async\"\r\n\t\t\t\t[class.mod-counter]=\"hasSubmitCounter$ | async\"\r\n\t\t\t\t[ngClass]=\"submitClass$ | async\"\r\n\t\t\t\t(click)=\"submit()\"\r\n\t\t\t>\r\n\t\t\t\t{{ submitLabel$ | async }}\r\n\t\t\t\t<label class=\"button-counter\" *ngIf=\"hasSubmitCounter$ | async\">{{ submitCounter$ | async }}</label>\r\n\t\t\t</button>\r\n\t\t\t<button type=\"button\" class=\"button mod-text\" (click)=\"dismiss()\">{{ cancelLabel$ | async }}</button>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuPopupRefFactory } from '@lucca-front/ng/popup';\r\nimport { luDefaultModalConfig } from './modal-config.default';\r\nimport { LuModalConfig } from './modal-config.model';\r\n\r\n/** Injection token that can be used to access the data that was passed in to a dialog. */\r\nexport const LU_MODAL_DATA = new InjectionToken<unknown>('LuModalData');\r\nexport const LU_MODAL_CONFIG = new InjectionToken<LuModalConfig>('LuModalDefaultConfig', {\r\n\tfactory: () => luDefaultModalConfig,\r\n});\r\nexport const LU_MODAL_REF_FACTORY = new InjectionToken<ILuPopupRefFactory>('LuModalRefFactory', {\r\n\tfactory: () => ({\r\n\t\tforge() {\r\n\t\t\tthrow new Error('[LuModalRefFactory] Cannot call forge, LuModalRefFactory needs to be overriden.');\r\n\t\t},\r\n\t}),\r\n});\r\n","import { ApplicationRef } from '@angular/core';\r\n\r\nexport function setAriaHiddenOnApplicationRoot(applicationRef: ApplicationRef, hidden: boolean): void {\r\n\tfor (const component of applicationRef.components) {\r\n\t\tconst nativeElement = component.location.nativeElement as unknown;\r\n\r\n\t\tif (nativeElement instanceof HTMLElement) {\r\n\t\t\tnativeElement.ariaHidden = hidden ? 'true' : undefined;\r\n\t\t}\r\n\t}\r\n}\r\n","import { ComponentType, Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { ApplicationRef, ChangeDetectionStrategy, ComponentRef, inject, Injectable, Injector } from '@angular/core';\r\nimport { ILuPopupRefFactory } from '@lucca-front/ng/popup';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { ALuModalPanelComponent, LuModalPanelComponent, LuModalPanelComponentDefaultCD } from './modal-panel.component';\r\nimport { ALuModalRef, ILuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_DATA } from './modal.token';\r\nimport { setAriaHiddenOnApplicationRoot } from './modal.utils';\r\n\r\nclass LuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig> extends ALuModalRef<T, D, R, C> implements ILuModalRef<T, D, R> {\r\n\tprotected _containerRef: ComponentRef<ALuModalPanelComponent<T>>;\r\n\tconstructor(\r\n\t\tprotected override _overlay: Overlay,\r\n\t\tprotected override _injector: Injector,\r\n\t\tprotected override _component: ComponentType<T>,\r\n\t\tprotected override _config: C,\r\n\t\tprotected _applicationRef: ApplicationRef,\r\n\t) {\r\n\t\tsuper(_overlay, _injector, _component, _config);\r\n\t}\r\n\tprotected override _openPopup(data?: D) {\r\n\t\tconst injector = Injector.create({\r\n\t\t\tproviders: [\r\n\t\t\t\t{ provide: ALuModalRef, useValue: this },\r\n\t\t\t\t{ provide: LU_MODAL_DATA, useValue: data },\r\n\t\t\t],\r\n\t\t\tparent: this._injector,\r\n\t\t});\r\n\r\n\t\tconst containerPortal = new ComponentPortal<ALuModalPanelComponent<T>>(\r\n\t\t\tthis._config.changeDetection === ChangeDetectionStrategy.OnPush ? LuModalPanelComponent : LuModalPanelComponentDefaultCD,\r\n\t\t\tundefined,\r\n\t\t\tinjector,\r\n\t\t);\r\n\t\tthis._containerRef = this._overlayRef.attach<ALuModalPanelComponent<T>>(containerPortal);\r\n\t\tconst panel = this._containerRef.instance;\r\n\t\tthis._componentRef = panel.attachInnerComponent(this._component, injector);\r\n\t\tsetAriaHiddenOnApplicationRoot(this._applicationRef, true);\r\n\t}\r\n\tprotected override _closePopup() {\r\n\t\tthis._componentRef.destroy();\r\n\t\tthis._containerRef.destroy();\r\n\t\tsetAriaHiddenOnApplicationRoot(this._applicationRef, false);\r\n\t}\r\n\r\n\tprotected override _getOverlayPanelClasses(): string[] {\r\n\t\tconst classes = super._getOverlayPanelClasses();\r\n\r\n\t\tif (this.modalClasses.overlayPane) {\r\n\t\t\tclasses.push(this.modalClasses.overlayPane);\r\n\t\t}\r\n\r\n\t\treturn classes;\r\n\t}\r\n}\r\n\r\n@Injectable()\r\nexport class LuModalRefFactory implements ILuPopupRefFactory<ILuModalContent, LuModalConfig> {\r\n\tprotected _applicationRef = inject(ApplicationRef);\r\n\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector) {}\r\n\tforge<T extends ILuModalContent, C extends LuModalConfig, D, R>(component: ComponentType<T>, config: C) {\r\n\t\treturn new LuModalRef<T, D, R>(this._overlay, this._injector, component, config, this._applicationRef);\r\n\t}\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { LuPopup } from '@lucca-front/ng/popup';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { LU_MODAL_CONFIG, LU_MODAL_REF_FACTORY } from './modal.token';\r\n\r\n@Injectable()\r\nexport class LuModal<C extends LuModalConfig = LuModalConfig> extends LuPopup<C> {\r\n\tprotected override _factory = inject(LU_MODAL_REF_FACTORY);\r\n\tprotected override _config = inject<C>(LU_MODAL_CONFIG);\r\n}\r\n","import { OverlayModule } from '@angular/cdk/overlay';\r\nimport { NgModule, Provider } from '@angular/core';\r\nimport { LuModalRefFactory } from './modal-ref.factory';\r\nimport { LuModal } from './modal.service';\r\nimport { LU_MODAL_REF_FACTORY } from './modal.token';\r\n\r\n/**\r\n * Provide LuModal.\r\n * Note that OverlayModule should be imported in one of the EnvironmentInjectors (AppModule, lazy-loaded route) using `providers: [importProvidersFrom(OverlayModule)]`.\r\n */\r\nexport function provideLuModal(): Provider[] {\r\n\treturn [LuModal, { provide: LU_MODAL_REF_FACTORY, useClass: LuModalRefFactory }];\r\n}\r\n\r\n@NgModule({\r\n\timports: [OverlayModule],\r\n\tproviders: [provideLuModal()],\r\n})\r\nexport class LuModalModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ALuModalRef"],"mappings":";;;;;;;;;;;;;;;AAGa,MAAA,oBAAoB,GAAkB;AAClD,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,aAAa,EAAE,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;AACjE,IAAA,UAAU,EAAE,gBAAgB;AAC5B,IAAA,IAAI,EAAE,GAAG;IACT,eAAe,EAAE,uBAAuB,CAAC,MAAM;EAC9C;AAEW,MAAA,wBAAwB,GAAkB;AACtD,IAAA,GAAG,oBAAoB;AACvB,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,QAAQ,EAAE,OAAO;;;ACLL,MAAA,cAAc,GAAwC;AAClE,IAAA,KAA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EAAA,IAAA,EAAA,aAAa,aAFd,CAAC,cAAc,EAAE,CAAC,YADnB,aAAa,CAAA,EAAA,CAAA,CAAA;2FAGX,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,SAAS,EAAE,CAAC,cAAc,EAAE,CAAC;AAC7B,iBAAA,CAAA;;;ACjBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-modal.mjs","sources":["../../../packages/ng/modal/src/lib/modal-config.default.ts","../../../packages/ng/modal/src/lib/modal-config.model.ts","../../../packages/ng/modal/src/lib/modal.translate.ts","../../../packages/ng/modal/src/lib/modal-ref.model.ts","../../../packages/ng/modal/src/lib/modal-panel.component.ts","../../../packages/ng/modal/src/lib/modal-panel.component.html","../../../packages/ng/modal/src/lib/modal.token.ts","../../../packages/ng/modal/src/lib/modal.utils.ts","../../../packages/ng/modal/src/lib/modal-ref.factory.ts","../../../packages/ng/modal/src/lib/modal.service.ts","../../../packages/ng/modal/src/lib/modal.module.ts","../../../packages/ng/modal/src/public-api.ts","../../../packages/ng/modal/src/lucca-front-ng-modal.ts"],"sourcesContent":["import { ChangeDetectionStrategy } from '@angular/core';\r\nimport { LuModalConfig } from './modal-config.model';\r\n\r\nexport const luDefaultModalConfig: LuModalConfig = {\r\n\tmode: 'modal',\r\n\tposition: 'center',\r\n\tnoBackdrop: false,\r\n\tundismissable: false,\r\n\tbackdropClass: ['cdk-overlay-dark-backdrop', 'lu-popup-backdrop'],\r\n\tpanelClass: 'lu-popup-panel',\r\n\tsize: 'M',\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n};\r\n\r\nexport const luDefaultSidepanelConfig: LuModalConfig = {\r\n\t...luDefaultModalConfig,\r\n\tmode: 'sidepanel',\r\n\tposition: 'right',\r\n};\r\n","import { ChangeDetectionStrategy } from '@angular/core';\r\nimport { ILuPopupConfig } from '@lucca-front/ng/popup';\r\n\r\nexport type LuModalMode = 'modal' | 'sidepanel';\r\n\r\nexport interface LuModalClasses {\r\n\tpanel: string;\r\n\tpanelContainer: string;\r\n\tpanelInner: string;\r\n\toverlayPane?: string;\r\n}\r\n\r\nexport const luModalClasses: Record<LuModalMode, LuModalClasses> = {\r\n\tmodal: { panel: 'lu-modal-panel', panelInner: 'lu-modal-panel-inner', panelContainer: 'lu-modal-container' },\r\n\tsidepanel: { panel: 'lu-sidepanel-panel', panelInner: 'lu-sidepanel-panel-inner', overlayPane: 'mod-sidepanel', panelContainer: 'lu-sidepanel-container' },\r\n};\r\n\r\ntype LuModalModeWithPosition = { mode?: 'modal'; position: undefined | 'center' } | { mode: 'sidepanel'; position: 'left' | 'right' };\r\n\r\nexport type LuModalConfig = ILuPopupConfig &\r\n\tLuModalModeWithPosition & {\r\n\t\tchangeDetection: ChangeDetectionStrategy;\r\n\t};\r\n\r\n/**\r\n * @deprecated Use LuModalConfig instead.\r\n */\r\nexport type ILuModalConfig = LuModalConfig;\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuTranslation } from '@lucca-front/ng/core';\r\n\r\nexport const LU_MODAL_TRANSLATIONS = new InjectionToken('LuModalTranslations', {\r\n\tfactory: () => luModalTranslations,\r\n});\r\n\r\nexport interface ILuModalLabel {\r\n\tsubmit: string;\r\n\tcancel: string;\r\n\tclose: string;\r\n}\r\n\r\nexport const luModalTranslations: ILuTranslation<ILuModalLabel> = {\r\n\ten: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Cancel',\r\n\t\tclose: 'Close',\r\n\t},\r\n\tfr: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Annuler',\r\n\t\tclose: 'Fermer',\r\n\t},\r\n\tes: {\r\n\t\tsubmit: 'Ok',\r\n\t\tcancel: 'Cancelar',\r\n\t\tclose: 'Cerrar',\r\n\t},\r\n};\r\n","import { ComponentType } from '@angular/cdk/portal';\r\nimport { ALuPopupRef, ILuPopupRef } from '@lucca-front/ng/popup';\r\nimport { LuModalClasses, luModalClasses, LuModalConfig, LuModalMode } from './modal-config.model';\r\nimport { ILuModalContent } from './modal.model';\r\n\r\nexport interface ILuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown> extends ILuPopupRef<T, D, R> {\r\n\tmode: LuModalMode;\r\n\tmodalClasses: LuModalClasses;\r\n}\r\n\r\nexport interface IModalRefFactory<TComponent extends ILuModalContent = ILuModalContent, TConfig extends LuModalConfig = LuModalConfig> {\r\n\tforge<T extends TComponent, C extends TConfig, D, R>(component: ComponentType<T>, config: C): ILuModalRef<T, D, R>;\r\n}\r\n\r\nexport abstract class ALuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig>\r\n\textends ALuPopupRef<T, D, R, C>\r\n\timplements ILuModalRef<T, D, R>\r\n{\r\n\tpublic get mode(): LuModalMode {\r\n\t\treturn this._config.mode || 'modal';\r\n\t}\r\n\r\n\tpublic get modalClasses(): LuModalClasses {\r\n\t\treturn luModalClasses[this.mode];\r\n\t}\r\n}\r\n","import { A11yModule } from '@angular/cdk/a11y';\r\nimport { AsyncPipe, NgClass, NgIf } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, Directive, DoCheck, ElementRef, HostBinding, Injector, OnDestroy, Renderer2, Type, ViewChild, ViewContainerRef } from '@angular/core';\r\nimport { getIntl } from '@lucca-front/ng/core';\r\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\r\nimport { isObservable, Observable, of, ReplaySubject, Subject, Subscription, timer } from 'rxjs';\r\nimport { delay, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';\r\nimport { LuModalClasses } from './modal-config.model';\r\nimport { ALuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_TRANSLATIONS } from './modal.translate';\r\n\r\nlet modalId = 0;\r\n\r\n@Directive()\r\nexport abstract class ALuModalPanelComponent<T extends ILuModalContent> implements OnDestroy, DoCheck {\r\n\t@ViewChild('container', { read: ViewContainerRef, static: true })\r\n\tprotected _containerRef: ViewContainerRef;\r\n\tprotected _componentInstance: ILuModalContent;\r\n\tprotected doCheck$ = new ReplaySubject<void>(1);\r\n\r\n\tpublic intl = getIntl(LU_MODAL_TRANSLATIONS);\r\n\tprotected title$ = this.listenComponentValue(() => this._componentInstance.title);\r\n\tprotected submitLabel$ = this.listenComponentValue(() => this._componentInstance.submitLabel || this.intl.submit);\r\n\tprotected cancelLabel$ = this.listenComponentValue(() => this._componentInstance.cancelLabel || this.intl.cancel);\r\n\tprotected submitCounter$ = this.listenComponentValue(() => this._componentInstance.submitCounter);\r\n\tprotected submitDisabled$ = this.listenComponentValue(() => this._componentInstance.submitDisabled);\r\n\tprotected hasSubmitCounter$ = this.submitCounter$.pipe(map(Boolean));\r\n\r\n\tprotected closeLabel = this.intl.close;\r\n\r\n\tget isSubmitHidden() {\r\n\t\treturn !this._componentInstance.submitAction;\r\n\t}\r\n\tget submitPalette() {\r\n\t\treturn this._componentInstance.submitPalette || 'primary';\r\n\t}\r\n\r\n\tsubmitClass$ = new Subject();\r\n\terror$ = new Subject();\r\n\r\n\tpublic readonly modalId = modalId++;\r\n\r\n\tprivate _subs = new Subscription();\r\n\tpublic modalClasses: LuModalClasses;\r\n\r\n\tconstructor(protected _ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tthis.modalClasses = _ref.modalClasses;\r\n\t\t_renderer.addClass(_elementRef.nativeElement, this.modalClasses.panel);\r\n\t}\r\n\tngDoCheck(): void {\r\n\t\tthis.doCheck$.next();\r\n\t}\r\n\tattachInnerComponent(componentType: Type<T>, injector: Injector) {\r\n\t\tconst ref = this._containerRef.createComponent(componentType, { injector });\r\n\t\tthis._componentInstance = ref.instance;\r\n\t\treturn ref;\r\n\t}\r\n\tngOnDestroy() {\r\n\t\tthis.doCheck$.complete();\r\n\t\tthis._subs.unsubscribe();\r\n\t}\r\n\tdismiss() {\r\n\t\tthis._ref.dismiss();\r\n\t}\r\n\tsubmit() {\r\n\t\tthis.error$.next(undefined);\r\n\t\tthis.submitClass$.next('is-loading');\r\n\t\tconst result$ = this._componentInstance.submitAction();\r\n\t\tif (result$ instanceof Observable) {\r\n\t\t\tthis._subs.add(\r\n\t\t\t\tresult$\r\n\t\t\t\t\t.pipe(\r\n\t\t\t\t\t\ttap((_) => this.submitClass$.next('is-success')),\r\n\t\t\t\t\t\tdelay(500),\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.subscribe({\r\n\t\t\t\t\t\tnext: (result) => this._ref.close(result),\r\n\t\t\t\t\t\terror: (err) => {\r\n\t\t\t\t\t\t\tthis.submitClass$.next('is-error');\r\n\t\t\t\t\t\t\tthis.error$.next(err);\r\n\t\t\t\t\t\t\ttimer(2000).subscribe((_) => {\r\n\t\t\t\t\t\t\t\tthis.submitClass$.next('');\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\t\tthis.submitClass$.next('');\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}),\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis._ref.close(result$);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate listenComponentValue<TValue>(selector: () => TValue | Observable<TValue>): Observable<TValue> {\r\n\t\treturn this.doCheck$.pipe(\r\n\t\t\tmap(selector),\r\n\t\t\tdistinctUntilChanged(),\r\n\t\t\tswitchMap((value) => (isObservable(value) ? value : of(value))),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nconst panelImports = [A11yModule, AsyncPipe, LuTooltipModule, NgClass, NgIf];\r\n\r\n@Component({\r\n\tselector: 'lu-modal-panel',\r\n\tstandalone: true,\r\n\timports: panelImports,\r\n\ttemplateUrl: './modal-panel.component.html',\r\n\tstyleUrls: ['./modal-panel.component.scss'],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class LuModalPanelComponent<T extends ILuModalContent = ILuModalContent> extends ALuModalPanelComponent<T> {\r\n\t@HostBinding('class.lu-modal-panel') class = true;\r\n\tconstructor(_ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tsuper(_ref, _elementRef, _renderer);\r\n\t}\r\n}\r\n@Component({\r\n\tselector: 'lu-modal-panel-default',\r\n\tstandalone: true,\r\n\timports: panelImports,\r\n\ttemplateUrl: './modal-panel.component.html',\r\n\tstyleUrls: ['./modal-panel.component.scss'],\r\n\tchangeDetection: ChangeDetectionStrategy.Default,\r\n})\r\n// eslint-disable-next-line @angular-eslint/component-class-suffix\r\nexport class LuModalPanelComponentDefaultCD<T extends ILuModalContent = ILuModalContent> extends ALuModalPanelComponent<T> {\r\n\t@HostBinding('class.lu-modal-panel') class = true;\r\n\tconstructor(_ref: ALuModalRef<T>, _elementRef: ElementRef<HTMLElement>, _renderer: Renderer2) {\r\n\t\tsuper(_ref, _elementRef, _renderer);\r\n\t}\r\n}\r\n","<div\r\n\tcdkTrapFocus=\"true\"\r\n\tcdkTrapFocusAutoCapture=\"true\"\r\n\trole=\"dialog\"\r\n\taria-modal=\"true\"\r\n\t[attr.aria-labelledby]=\"'luModalTitle' + modalId\"\r\n\t[ngClass]=\"modalClasses.panelInner\"\r\n>\r\n\t<div [ngClass]=\"modalClasses.panelContainer\" role=\"document\">\r\n\t\t<div class=\"lu-modal-header\" tabindex=\"-1\" cdkFocusInitial>\r\n\t\t\t<button type=\"button\" class=\"actionIcon lu-modal-header-close\" (click)=\"dismiss()\" [luTooltip]=\"closeLabel\">\r\n\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-cross\"></span>\r\n\t\t\t\t<span class=\"u-mask\">{{ closeLabel }}</span>\r\n\t\t\t</button>\r\n\t\t\t<h1 [attr.id]=\"'luModalTitle' + modalId\" class=\"lu-modal-header-title\">{{ title$ | async }}</h1>\r\n\t\t</div>\r\n\t\t<div class=\"lu-modal-content\">\r\n\t\t\t<ng-container #container></ng-container>\r\n\t\t</div>\r\n\t\t<div class=\"lu-modal-footer\">\r\n\t\t\t<button\r\n\t\t\t\ttype=\"button\"\r\n\t\t\t\t*ngIf=\"!isSubmitHidden\"\r\n\t\t\t\tclass=\"button palette-{{ submitPalette }}\"\r\n\t\t\t\t[disabled]=\"submitDisabled$ | async\"\r\n\t\t\t\t[class.mod-counter]=\"hasSubmitCounter$ | async\"\r\n\t\t\t\t[ngClass]=\"submitClass$ | async\"\r\n\t\t\t\t(click)=\"submit()\"\r\n\t\t\t>\r\n\t\t\t\t{{ submitLabel$ | async }}\r\n\t\t\t\t<label class=\"button-counter\" *ngIf=\"hasSubmitCounter$ | async\">{{ submitCounter$ | async }}</label>\r\n\t\t\t</button>\r\n\t\t\t<button type=\"button\" class=\"button mod-text\" (click)=\"dismiss()\">{{ cancelLabel$ | async }}</button>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n","import { InjectionToken } from '@angular/core';\r\nimport { luDefaultModalConfig } from './modal-config.default';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { IModalRefFactory } from './modal-ref.model';\r\n\r\n/** Injection token that can be used to access the data that was passed in to a dialog. */\r\nexport const LU_MODAL_DATA = new InjectionToken<unknown>('LuModalData');\r\nexport const LU_MODAL_CONFIG = new InjectionToken<LuModalConfig>('LuModalDefaultConfig', {\r\n\tfactory: () => luDefaultModalConfig,\r\n});\r\nexport const LU_MODAL_REF_FACTORY = new InjectionToken<IModalRefFactory>('LuModalRefFactory');\r\n","import { ApplicationRef } from '@angular/core';\r\n\r\nexport function setAriaHiddenOnApplicationRoot(applicationRef: ApplicationRef, hidden: boolean): void {\r\n\tfor (const component of applicationRef.components) {\r\n\t\tconst nativeElement = component.location.nativeElement as unknown;\r\n\r\n\t\tif (nativeElement instanceof HTMLElement) {\r\n\t\t\tnativeElement.ariaHidden = hidden ? 'true' : undefined;\r\n\t\t}\r\n\t}\r\n}\r\n","import { ComponentType, Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { ApplicationRef, ChangeDetectionStrategy, ComponentRef, inject, Injectable, Injector } from '@angular/core';\r\nimport { ILuPopupRefFactory } from '@lucca-front/ng/popup';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { ALuModalPanelComponent, LuModalPanelComponent, LuModalPanelComponentDefaultCD } from './modal-panel.component';\r\nimport { ALuModalRef, ILuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_DATA } from './modal.token';\r\nimport { setAriaHiddenOnApplicationRoot } from './modal.utils';\r\n\r\nclass LuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig> extends ALuModalRef<T, D, R, C> implements ILuModalRef<T, D, R> {\r\n\tprotected _containerRef: ComponentRef<ALuModalPanelComponent<T>>;\r\n\tconstructor(\r\n\t\tprotected override _overlay: Overlay,\r\n\t\tprotected override _injector: Injector,\r\n\t\tprotected override _component: ComponentType<T>,\r\n\t\tprotected override _config: C,\r\n\t\tprotected _applicationRef: ApplicationRef,\r\n\t) {\r\n\t\tsuper(_overlay, _injector, _component, _config);\r\n\t}\r\n\tprotected override _openPopup(data?: D) {\r\n\t\tconst injector = Injector.create({\r\n\t\t\tproviders: [\r\n\t\t\t\t{ provide: ALuModalRef, useValue: this },\r\n\t\t\t\t{ provide: LU_MODAL_DATA, useValue: data },\r\n\t\t\t],\r\n\t\t\tparent: this._injector,\r\n\t\t});\r\n\r\n\t\tconst containerPortal = new ComponentPortal<ALuModalPanelComponent<T>>(\r\n\t\t\tthis._config.changeDetection === ChangeDetectionStrategy.OnPush ? LuModalPanelComponent : LuModalPanelComponentDefaultCD,\r\n\t\t\tundefined,\r\n\t\t\tinjector,\r\n\t\t);\r\n\t\tthis._containerRef = this._overlayRef.attach<ALuModalPanelComponent<T>>(containerPortal);\r\n\t\tconst panel = this._containerRef.instance;\r\n\t\tthis._componentRef = panel.attachInnerComponent(this._component, injector);\r\n\t\tsetAriaHiddenOnApplicationRoot(this._applicationRef, true);\r\n\t}\r\n\tprotected override _closePopup() {\r\n\t\tthis._componentRef.destroy();\r\n\t\tthis._containerRef.destroy();\r\n\t\tsetAriaHiddenOnApplicationRoot(this._applicationRef, false);\r\n\t}\r\n\r\n\tprotected override _getOverlayPanelClasses(): string[] {\r\n\t\tconst classes = super._getOverlayPanelClasses();\r\n\r\n\t\tif (this.modalClasses.overlayPane) {\r\n\t\t\tclasses.push(this.modalClasses.overlayPane);\r\n\t\t}\r\n\r\n\t\treturn classes;\r\n\t}\r\n}\r\n\r\n@Injectable()\r\nexport class LuModalRefFactory implements ILuPopupRefFactory<ILuModalContent, LuModalConfig> {\r\n\tprotected _applicationRef = inject(ApplicationRef);\r\n\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector) {}\r\n\tforge<T extends ILuModalContent, C extends LuModalConfig, D, R>(component: ComponentType<T>, config: C) {\r\n\t\treturn new LuModalRef<T, D, R>(this._overlay, this._injector, component, config, this._applicationRef);\r\n\t}\r\n}\r\n","import { ComponentType } from '@angular/cdk/portal';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { LuModalConfig } from './modal-config.model';\r\nimport { ILuModalRef } from './modal-ref.model';\r\nimport { ILuModalContent } from './modal.model';\r\nimport { LU_MODAL_CONFIG, LU_MODAL_REF_FACTORY } from './modal.token';\r\n\r\n@Injectable()\r\nexport class LuModal {\r\n\tprotected _factory = inject(LU_MODAL_REF_FACTORY);\r\n\tprotected _config = inject(LU_MODAL_CONFIG);\r\n\r\n\topen<T extends ILuModalContent<R>, D, R>(component: ComponentType<T>, data: D = undefined, config: Partial<LuModalConfig> = {}): ILuModalRef<T, D, R> {\r\n\t\tconst extendedConfig = { ...this._config, ...config } as LuModalConfig;\r\n\t\tconst ref = this._factory.forge<T, LuModalConfig, D, T extends ILuModalContent<infer R> ? R : unknown>(component, extendedConfig);\r\n\t\tref.open(data);\r\n\t\treturn ref;\r\n\t}\r\n}\r\n","import { OverlayModule } from '@angular/cdk/overlay';\r\nimport { NgModule, Provider } from '@angular/core';\r\nimport { LuModalRefFactory } from './modal-ref.factory';\r\nimport { LuModal } from './modal.service';\r\nimport { LU_MODAL_REF_FACTORY } from './modal.token';\r\n\r\n/**\r\n * Provide LuModal.\r\n * Note that OverlayModule should be imported in one of the EnvironmentInjectors (AppModule, lazy-loaded route) using `providers: [importProvidersFrom(OverlayModule)]`.\r\n */\r\nexport function provideLuModal(): Provider[] {\r\n\treturn [LuModal, { provide: LU_MODAL_REF_FACTORY, useClass: LuModalRefFactory }];\r\n}\r\n\r\n@NgModule({\r\n\timports: [OverlayModule],\r\n\tproviders: [provideLuModal()],\r\n})\r\nexport class LuModalModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ALuModalRef"],"mappings":";;;;;;;;;;;;;;;AAGa,MAAA,oBAAoB,GAAkB;AAClD,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,aAAa,EAAE,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;AACjE,IAAA,UAAU,EAAE,gBAAgB;AAC5B,IAAA,IAAI,EAAE,GAAG;IACT,eAAe,EAAE,uBAAuB,CAAC,MAAM;EAC9C;AAEW,MAAA,wBAAwB,GAAkB;AACtD,IAAA,GAAG,oBAAoB;AACvB,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,QAAQ,EAAE,OAAO;;;ACLL,MAAA,cAAc,GAAwC;AAClE,IAAA,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,sBAAsB,EAAE,cAAc,EAAE,oBAAoB,EAAE;AAC5G,IAAA,SAAS,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A,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,aAFd,CAAC,cAAc,EAAE,CAAC,YADnB,aAAa,CAAA,EAAA,CAAA,CAAA;2FAGX,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,SAAS,EAAE,CAAC,cAAc,EAAE,CAAC;AAC7B,iBAAA,CAAA;;;ACjBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -15,13 +15,7 @@ const luDefaultPopupConfig = {
|
|
|
15
15
|
size: 'M',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const LU_POPUP_REF_FACTORY = new InjectionToken('LuPopupRefFactory'
|
|
19
|
-
factory: () => ({
|
|
20
|
-
forge() {
|
|
21
|
-
throw new Error('[LuPopupRefFactory] Cannot call forge, LuPopupRefFactory needs to be overriden.');
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
});
|
|
18
|
+
const LU_POPUP_REF_FACTORY = new InjectionToken('LuPopupRefFactory');
|
|
25
19
|
/** Injection token that can be used to access the data that was passed in to a dialog. */
|
|
26
20
|
const LU_POPUP_DATA = new InjectionToken('LuPopupData');
|
|
27
21
|
const LU_POPUP_CONFIG = new InjectionToken('LuPopupDefaultConfig', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-popup.mjs","sources":["../../../packages/ng/popup/src/lib/popup-config.default.ts","../../../packages/ng/popup/src/lib/popup.token.ts","../../../packages/ng/popup/src/lib/popup-ref.model.ts","../../../packages/ng/popup/src/lib/popup-ref.factory.ts","../../../packages/ng/popup/src/lib/popup.service.ts","../../../packages/ng/popup/src/lib/popup.module.ts","../../../packages/ng/popup/src/public-api.ts","../../../packages/ng/popup/src/lucca-front-ng-popup.ts"],"sourcesContent":["import { ILuPopupConfig } from './popup-config.model';\r\n\r\nexport const luDefaultPopupConfig: ILuPopupConfig = {\r\n\tposition: 'center',\r\n\tnoBackdrop: false,\r\n\tundismissable: false,\r\n\tbackdropClass: ['cdk-overlay-dark-backdrop', 'lu-popup-backdrop'],\r\n\tpanelClass: 'lu-popup-panel',\r\n\tsize: 'M',\r\n};\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ILuPopupRefFactory } from './popup-ref.model';\r\n\r\nexport const LU_POPUP_REF_FACTORY = new InjectionToken<ILuPopupRefFactory>('LuPopupRefFactory', {\r\n\tfactory: () => ({\r\n\t\tforge() {\r\n\t\t\tthrow new Error('[LuPopupRefFactory] Cannot call forge, LuPopupRefFactory needs to be overriden.');\r\n\t\t},\r\n\t}),\r\n});\r\n\r\n/** Injection token that can be used to access the data that was passed in to a dialog. */\r\nexport const LU_POPUP_DATA = new InjectionToken<unknown>('LuPopupData');\r\nexport const LU_POPUP_CONFIG = new InjectionToken<ILuPopupConfig>('LuPopupDefaultConfig', {\r\n\tfactory: () => ({}),\r\n});\r\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { ComponentPortal, ComponentType } from '@angular/cdk/portal';\r\nimport { ComponentRef, Injector } from '@angular/core';\r\nimport { Observable, Subject, Subscription } from 'rxjs';\r\nimport { filter } from 'rxjs/operators';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { LU_POPUP_DATA } from './popup.token';\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nexport interface ILuPopupRef<T = unknown, D = unknown, R = unknown> {\r\n\tonOpen: Observable<D>;\r\n\tonClose: Observable<R>;\r\n\tonDismiss: Observable<void>;\r\n\tonBackdropClick: Observable<void>;\r\n\topen(data: D): void;\r\n\tclose(result: R): void;\r\n\tdismiss(): void;\r\n}\r\nexport interface ILuPopupRefFactory<TComponent = unknown, TConfig extends ILuPopupConfig = ILuPopupConfig> {\r\n\tforge<T extends TComponent, C extends TConfig, D, R>(component: ComponentType<T>, config: C): ILuPopupRef<T, D, R>;\r\n}\r\n\r\nexport abstract class ALuPopupRef<T = unknown, D = unknown, R = unknown, C extends ILuPopupConfig = ILuPopupConfig> implements ILuPopupRef<T, D, R> {\r\n\tonOpen = new Subject<D>();\r\n\tonClose = new Subject<R>();\r\n\tonDismiss = new Subject<void>();\r\n\tonBackdropClick = new Subject<void>();\r\n\r\n\tprotected _overlayRef: OverlayRef;\r\n\tprotected _componentRef: ComponentRef<T>;\r\n\r\n\tprotected _subs = new Subscription();\r\n\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector, protected _component: ComponentType<T>, protected _config: C) {}\r\n\r\n\topen(data?: D) {\r\n\t\tthis._createOverlay();\r\n\t\tthis._openPopup(data);\r\n\r\n\t\tthis._subToCloseEvents();\r\n\r\n\t\tthis.onOpen.next(data);\r\n\t\tthis.onOpen.complete();\r\n\t}\r\n\tclose(result?: R) {\r\n\t\tthis.onClose.next(result);\r\n\t\tthis._destroy();\r\n\t}\r\n\tdismiss() {\r\n\t\tthis.onDismiss.next();\r\n\t\tthis._destroy();\r\n\t}\r\n\t/**\r\n\t * This method creates the overlay from the provided popover's template and saves its\r\n\t * OverlayRef so that it can be attached to the DOM when openPopover is called.\r\n\t */\r\n\tprotected _createOverlay() {\r\n\t\tif (!this._overlayRef) {\r\n\t\t\tconst overlayConfig = this._getOverlayConfig();\r\n\t\t\tthis._overlayRef = this._overlay.create(overlayConfig);\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * This method builds the configuration object needed to create the overlay, the OverlayConfig.\r\n\t * @returns OverlayConfig\r\n\t */\r\n\tprotected _getOverlayConfig(): OverlayConfig {\r\n\t\tconst overlayConfig = new OverlayConfig();\r\n\t\tswitch (this._config.position) {\r\n\t\t\tcase 'top':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().top('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'bottom':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().bottom('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'left':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerVertically().left('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'right':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerVertically().right('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'center':\r\n\t\t\tdefault:\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().centerVertically();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\toverlayConfig.hasBackdrop = !this._config.noBackdrop;\r\n\t\toverlayConfig.backdropClass = this._config.backdropClass;\r\n\t\toverlayConfig.panelClass = this._getOverlayPanelClasses();\r\n\t\toverlayConfig.scrollStrategy = this._overlay.scrollStrategies.block();\r\n\t\treturn overlayConfig;\r\n\t}\r\n\tprotected _openPopup(data?: D) {\r\n\t\tconst injector = Injector.create({\r\n\t\t\tproviders: [\r\n\t\t\t\t{ provide: ALuPopupRef, useValue: this },\r\n\t\t\t\t{ provide: LU_POPUP_DATA, useValue: data },\r\n\t\t\t],\r\n\t\t\tparent: this._injector,\r\n\t\t});\r\n\t\tconst portal = new ComponentPortal(this._component, undefined, injector);\r\n\t\tthis._componentRef = this._overlayRef.attach<T>(portal);\r\n\t}\r\n\tprotected _getOverlayPanelClasses(): string[] {\r\n\t\tconst panelClasses: string[] = [];\r\n\t\tif (Array.isArray(this._config.panelClass)) {\r\n\t\t\tpanelClasses.push(...this._config.panelClass);\r\n\t\t} else {\r\n\t\t\tpanelClasses.push(this._config.panelClass);\r\n\t\t}\r\n\t\tpanelClasses.push(`mod-${this._config.size}`);\r\n\t\treturn panelClasses;\r\n\t}\r\n\tprotected _destroy() {\r\n\t\tthis._cleanSubscription();\r\n\t\tthis._closePopup();\r\n\t\tthis._destroyOverlay();\r\n\t\tthis._completeSubjects();\r\n\t}\r\n\tprotected _completeSubjects() {\r\n\t\tthis.onClose.complete();\r\n\t\tthis.onOpen.complete();\r\n\t\tthis.onDismiss.complete();\r\n\t\tthis.onBackdropClick.complete();\r\n\t}\r\n\tprotected _destroyOverlay() {\r\n\t\tthis._overlayRef.detachBackdrop();\r\n\t\tthis._overlayRef.detach();\r\n\t}\r\n\tprotected _closePopup() {\r\n\t\tthis._componentRef.destroy();\r\n\t}\r\n\tprotected _subToCloseEvents() {\r\n\t\tif (!this._config.undismissable) {\r\n\t\t\tthis._subToEscapeKeydownEvent();\r\n\t\t}\r\n\t\tthis._subToBackdropClickEvent();\r\n\t}\r\n\tprotected _subToEscapeKeydownEvent() {\r\n\t\tconst escPressed$ = this._overlayRef.keydownEvents().pipe(filter(({ key }) => key === 'Escape'));\r\n\t\tthis._subs.add(escPressed$.subscribe((_e) => this.dismiss()));\r\n\t}\r\n\tprotected _subToBackdropClickEvent() {\r\n\t\tconst bdClicked$ = this._overlayRef.backdropClick();\r\n\t\tconst bdClickedSub = bdClicked$.subscribe((_e) => {\r\n\t\t\tthis.onBackdropClick.next();\r\n\t\t\tif (!this._config.undismissable) {\r\n\t\t\t\tthis.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis._subs.add(bdClickedSub);\r\n\t}\r\n\tprotected _cleanSubscription() {\r\n\t\tthis._subs.unsubscribe();\r\n\t}\r\n}\r\n","import { ComponentType, Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ALuPopupRef, ILuPopupRefFactory } from './popup-ref.model';\r\n\r\nexport class LuPopupRef<T = unknown, D = unknown, R = unknown> extends ALuPopupRef<T, D, R> {\r\n\tconstructor(protected override _overlay: Overlay, protected override _injector: Injector, protected override _component: ComponentType<T>, protected override _config: ILuPopupConfig) {\r\n\t\tsuper(_overlay, _injector, _component, _config);\r\n\t}\r\n}\r\n\r\n@Injectable()\r\nexport class LuPopupRefFactory implements ILuPopupRefFactory {\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector) {}\r\n\tforge<T, D, R>(component: ComponentType<T>, config: ILuPopupConfig) {\r\n\t\treturn new LuPopupRef<T, D, R>(this._overlay, this._injector, component, config);\r\n\t}\r\n}\r\n","import { ComponentType } from '@angular/cdk/overlay';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ILuPopupRef } from './popup-ref.model';\r\nimport { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';\r\n\r\n@Injectable()\r\nexport class LuPopup<C extends ILuPopupConfig = ILuPopupConfig> {\r\n\tprotected _factory = inject(LU_POPUP_REF_FACTORY);\r\n\tprotected _config = inject<C>(LU_POPUP_CONFIG);\r\n\r\n\topen<T, D, R>(component: ComponentType<T>, data: D = undefined, config: Partial<C> = {}): ILuPopupRef<T, D, R> {\r\n\t\tconst extendedConfig = { ...this._config, ...config };\r\n\t\tconst ref = this._factory.forge<T, C, D, R>(component, extendedConfig);\r\n\t\tref.open(data);\r\n\t\treturn ref;\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { LuPopup } from './popup.service';\r\nimport { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';\r\nimport { luDefaultPopupConfig } from './popup-config.default';\r\nimport { LuPopupRefFactory } from './popup-ref.factory';\r\n\r\n@NgModule({\r\n\timports: [OverlayModule],\r\n\texports: [],\r\n\tproviders: [LuPopup, { provide: LU_POPUP_CONFIG, useValue: luDefaultPopupConfig }, { provide: LU_POPUP_REF_FACTORY, useClass: LuPopupRefFactory }],\r\n})\r\nexport class LuPopupModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAEa,MAAA,oBAAoB,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|
|
1
|
+
{"version":3,"file":"lucca-front-ng-popup.mjs","sources":["../../../packages/ng/popup/src/lib/popup-config.default.ts","../../../packages/ng/popup/src/lib/popup.token.ts","../../../packages/ng/popup/src/lib/popup-ref.model.ts","../../../packages/ng/popup/src/lib/popup-ref.factory.ts","../../../packages/ng/popup/src/lib/popup.service.ts","../../../packages/ng/popup/src/lib/popup.module.ts","../../../packages/ng/popup/src/public-api.ts","../../../packages/ng/popup/src/lucca-front-ng-popup.ts"],"sourcesContent":["import { ILuPopupConfig } from './popup-config.model';\r\n\r\nexport const luDefaultPopupConfig: ILuPopupConfig = {\r\n\tposition: 'center',\r\n\tnoBackdrop: false,\r\n\tundismissable: false,\r\n\tbackdropClass: ['cdk-overlay-dark-backdrop', 'lu-popup-backdrop'],\r\n\tpanelClass: 'lu-popup-panel',\r\n\tsize: 'M',\r\n};\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ILuPopupRefFactory } from './popup-ref.model';\r\n\r\nexport const LU_POPUP_REF_FACTORY = new InjectionToken<ILuPopupRefFactory>('LuPopupRefFactory');\r\n\r\n/** Injection token that can be used to access the data that was passed in to a dialog. */\r\nexport const LU_POPUP_DATA = new InjectionToken<unknown>('LuPopupData');\r\nexport const LU_POPUP_CONFIG = new InjectionToken<ILuPopupConfig>('LuPopupDefaultConfig', {\r\n\tfactory: () => ({}),\r\n});\r\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { ComponentPortal, ComponentType } from '@angular/cdk/portal';\r\nimport { ComponentRef, Injector } from '@angular/core';\r\nimport { Observable, Subject, Subscription } from 'rxjs';\r\nimport { filter } from 'rxjs/operators';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { LU_POPUP_DATA } from './popup.token';\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nexport interface ILuPopupRef<T = unknown, D = unknown, R = unknown> {\r\n\tonOpen: Observable<D>;\r\n\tonClose: Observable<R>;\r\n\tonDismiss: Observable<void>;\r\n\tonBackdropClick: Observable<void>;\r\n\topen(data: D): void;\r\n\tclose(result: R): void;\r\n\tdismiss(): void;\r\n}\r\nexport interface ILuPopupRefFactory<TComponent = unknown, TConfig extends ILuPopupConfig = ILuPopupConfig> {\r\n\tforge<T extends TComponent, C extends TConfig, D, R>(component: ComponentType<T>, config: C): ILuPopupRef<T, D, R>;\r\n}\r\n\r\nexport abstract class ALuPopupRef<T = unknown, D = unknown, R = unknown, C extends ILuPopupConfig = ILuPopupConfig> implements ILuPopupRef<T, D, R> {\r\n\tonOpen = new Subject<D>();\r\n\tonClose = new Subject<R>();\r\n\tonDismiss = new Subject<void>();\r\n\tonBackdropClick = new Subject<void>();\r\n\r\n\tprotected _overlayRef: OverlayRef;\r\n\tprotected _componentRef: ComponentRef<T>;\r\n\r\n\tprotected _subs = new Subscription();\r\n\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector, protected _component: ComponentType<T>, protected _config: C) {}\r\n\r\n\topen(data?: D) {\r\n\t\tthis._createOverlay();\r\n\t\tthis._openPopup(data);\r\n\r\n\t\tthis._subToCloseEvents();\r\n\r\n\t\tthis.onOpen.next(data);\r\n\t\tthis.onOpen.complete();\r\n\t}\r\n\tclose(result?: R) {\r\n\t\tthis.onClose.next(result);\r\n\t\tthis._destroy();\r\n\t}\r\n\tdismiss() {\r\n\t\tthis.onDismiss.next();\r\n\t\tthis._destroy();\r\n\t}\r\n\t/**\r\n\t * This method creates the overlay from the provided popover's template and saves its\r\n\t * OverlayRef so that it can be attached to the DOM when openPopover is called.\r\n\t */\r\n\tprotected _createOverlay() {\r\n\t\tif (!this._overlayRef) {\r\n\t\t\tconst overlayConfig = this._getOverlayConfig();\r\n\t\t\tthis._overlayRef = this._overlay.create(overlayConfig);\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t * This method builds the configuration object needed to create the overlay, the OverlayConfig.\r\n\t * @returns OverlayConfig\r\n\t */\r\n\tprotected _getOverlayConfig(): OverlayConfig {\r\n\t\tconst overlayConfig = new OverlayConfig();\r\n\t\tswitch (this._config.position) {\r\n\t\t\tcase 'top':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().top('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'bottom':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().bottom('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'left':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerVertically().left('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'right':\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerVertically().right('0');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'center':\r\n\t\t\tdefault:\r\n\t\t\t\toverlayConfig.positionStrategy = this._overlay.position().global().centerHorizontally().centerVertically();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\toverlayConfig.hasBackdrop = !this._config.noBackdrop;\r\n\t\toverlayConfig.backdropClass = this._config.backdropClass;\r\n\t\toverlayConfig.panelClass = this._getOverlayPanelClasses();\r\n\t\toverlayConfig.scrollStrategy = this._overlay.scrollStrategies.block();\r\n\t\treturn overlayConfig;\r\n\t}\r\n\tprotected _openPopup(data?: D) {\r\n\t\tconst injector = Injector.create({\r\n\t\t\tproviders: [\r\n\t\t\t\t{ provide: ALuPopupRef, useValue: this },\r\n\t\t\t\t{ provide: LU_POPUP_DATA, useValue: data },\r\n\t\t\t],\r\n\t\t\tparent: this._injector,\r\n\t\t});\r\n\t\tconst portal = new ComponentPortal(this._component, undefined, injector);\r\n\t\tthis._componentRef = this._overlayRef.attach<T>(portal);\r\n\t}\r\n\tprotected _getOverlayPanelClasses(): string[] {\r\n\t\tconst panelClasses: string[] = [];\r\n\t\tif (Array.isArray(this._config.panelClass)) {\r\n\t\t\tpanelClasses.push(...this._config.panelClass);\r\n\t\t} else {\r\n\t\t\tpanelClasses.push(this._config.panelClass);\r\n\t\t}\r\n\t\tpanelClasses.push(`mod-${this._config.size}`);\r\n\t\treturn panelClasses;\r\n\t}\r\n\tprotected _destroy() {\r\n\t\tthis._cleanSubscription();\r\n\t\tthis._closePopup();\r\n\t\tthis._destroyOverlay();\r\n\t\tthis._completeSubjects();\r\n\t}\r\n\tprotected _completeSubjects() {\r\n\t\tthis.onClose.complete();\r\n\t\tthis.onOpen.complete();\r\n\t\tthis.onDismiss.complete();\r\n\t\tthis.onBackdropClick.complete();\r\n\t}\r\n\tprotected _destroyOverlay() {\r\n\t\tthis._overlayRef.detachBackdrop();\r\n\t\tthis._overlayRef.detach();\r\n\t}\r\n\tprotected _closePopup() {\r\n\t\tthis._componentRef.destroy();\r\n\t}\r\n\tprotected _subToCloseEvents() {\r\n\t\tif (!this._config.undismissable) {\r\n\t\t\tthis._subToEscapeKeydownEvent();\r\n\t\t}\r\n\t\tthis._subToBackdropClickEvent();\r\n\t}\r\n\tprotected _subToEscapeKeydownEvent() {\r\n\t\tconst escPressed$ = this._overlayRef.keydownEvents().pipe(filter(({ key }) => key === 'Escape'));\r\n\t\tthis._subs.add(escPressed$.subscribe((_e) => this.dismiss()));\r\n\t}\r\n\tprotected _subToBackdropClickEvent() {\r\n\t\tconst bdClicked$ = this._overlayRef.backdropClick();\r\n\t\tconst bdClickedSub = bdClicked$.subscribe((_e) => {\r\n\t\t\tthis.onBackdropClick.next();\r\n\t\t\tif (!this._config.undismissable) {\r\n\t\t\t\tthis.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis._subs.add(bdClickedSub);\r\n\t}\r\n\tprotected _cleanSubscription() {\r\n\t\tthis._subs.unsubscribe();\r\n\t}\r\n}\r\n","import { ComponentType, Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ALuPopupRef, ILuPopupRefFactory } from './popup-ref.model';\r\n\r\nexport class LuPopupRef<T = unknown, D = unknown, R = unknown> extends ALuPopupRef<T, D, R> {\r\n\tconstructor(protected override _overlay: Overlay, protected override _injector: Injector, protected override _component: ComponentType<T>, protected override _config: ILuPopupConfig) {\r\n\t\tsuper(_overlay, _injector, _component, _config);\r\n\t}\r\n}\r\n\r\n@Injectable()\r\nexport class LuPopupRefFactory implements ILuPopupRefFactory {\r\n\tconstructor(protected _overlay: Overlay, protected _injector: Injector) {}\r\n\tforge<T, D, R>(component: ComponentType<T>, config: ILuPopupConfig) {\r\n\t\treturn new LuPopupRef<T, D, R>(this._overlay, this._injector, component, config);\r\n\t}\r\n}\r\n","import { ComponentType } from '@angular/cdk/overlay';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { ILuPopupConfig } from './popup-config.model';\r\nimport { ILuPopupRef } from './popup-ref.model';\r\nimport { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';\r\n\r\n@Injectable()\r\nexport class LuPopup {\r\n\tprotected _factory = inject(LU_POPUP_REF_FACTORY);\r\n\tprotected _config = inject(LU_POPUP_CONFIG);\r\n\r\n\topen<T, D, R>(component: ComponentType<T>, data: D = undefined, config: Partial<ILuPopupConfig> = {}): ILuPopupRef<T, D, R> {\r\n\t\tconst extendedConfig = { ...this._config, ...config };\r\n\t\tconst ref = this._factory.forge<T, ILuPopupConfig, D, R>(component, extendedConfig);\r\n\t\tref.open(data);\r\n\t\treturn ref;\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { LuPopup } from './popup.service';\r\nimport { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';\r\nimport { luDefaultPopupConfig } from './popup-config.default';\r\nimport { LuPopupRefFactory } from './popup-ref.factory';\r\n\r\n@NgModule({\r\n\timports: [OverlayModule],\r\n\texports: [],\r\n\tproviders: [LuPopup, { provide: LU_POPUP_CONFIG, useValue: luDefaultPopupConfig }, { provide: LU_POPUP_REF_FACTORY, useClass: LuPopupRefFactory }],\r\n})\r\nexport class LuPopupModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAEa,MAAA,oBAAoB,GAAmB;AACnD,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,aAAa,EAAE,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;AACjE,IAAA,UAAU,EAAE,gBAAgB;AAC5B,IAAA,IAAI,EAAE,GAAG;;;MCJG,oBAAoB,GAAG,IAAI,cAAc,CAAqB,mBAAmB,EAAE;AAEhG;MACa,aAAa,GAAG,IAAI,cAAc,CAAU,aAAa,EAAE;MAC3D,eAAe,GAAG,IAAI,cAAc,CAAiB,sBAAsB,EAAE;AACzF,IAAA,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,CAAA;;MCYqB,WAAW,CAAA;AAWhC,IAAA,WAAA,CAAsB,QAAiB,EAAY,SAAmB,EAAY,UAA4B,EAAY,OAAU,EAAA;QAA9G,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;QAAY,IAAS,CAAA,SAAA,GAAT,SAAS,CAAU;QAAY,IAAU,CAAA,UAAA,GAAV,UAAU,CAAkB;QAAY,IAAO,CAAA,OAAA,GAAP,OAAO,CAAG;AAVpI,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;AAC1B,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,OAAO,EAAK,CAAC;AAC3B,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAQ,CAAC;AAChC,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,OAAO,EAAQ,CAAC;AAK5B,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;KAEmG;AAExI,IAAA,IAAI,CAAC,IAAQ,EA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ACXD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, NgModule } from '@angular/core';
|
|
3
3
|
import { luDefaultSidepanelConfig, LU_MODAL_DATA, luModalTranslations, LuModal, LuModalModule } from '@lucca-front/ng/modal';
|
|
4
|
+
export { ALuModalRef as ALuSidepanelRef } from '@lucca-front/ng/modal';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* For backward compatibility, we re-export modal tokens as sidepanel tokens.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-sidepanel.mjs","sources":["../../../packages/ng/sidepanel/src/lib/sidepanel.model.ts","../../../packages/ng/sidepanel/src/lib/sidepanel.service.ts","../../../packages/ng/sidepanel/src/lib/sidepanel.module.ts","../../../packages/ng/sidepanel/src/public-api.ts","../../../packages/ng/sidepanel/src/lucca-front-ng-sidepanel.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nimport { ILuTranslation } from '@lucca-front/ng/core';\r\nimport { ILuModalContent, ILuModalLabel, ILuModalRef, luDefaultSidepanelConfig, LuModalConfig, luModalTranslations, LU_MODAL_DATA } from '@lucca-front/ng/modal';\r\n\r\n/**\r\n * For backward compatibility, we re-export modal tokens as sidepanel tokens.\r\n * We should remove all sidepanel related files in the next major version (16+).\r\n */\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_CONFIG from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_CONFIG = new InjectionToken<LuSidepanelConfig>('LuSidepanelDefaultConfig', {\r\n\tfactory: () => luDefaultSidepanelConfig,\r\n});\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_DATA from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_DATA = LU_MODAL_DATA;\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_TRANSLATIONS from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_TRANSLATIONS = new InjectionToken('LuSidepanelTranslations', {\r\n\tfactory: () => luSidepanelTranslations,\r\n});\r\n\r\n/**\r\n * @deprecated Use ILuModalLabel from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelLabel = ILuModalLabel;\r\n\r\n/**\r\n * @deprecated Use luModalTranslations from @lucca-front/ng/modal instead.\r\n */\r\nexport const luSidepanelTranslations: ILuTranslation<ILuSidepanelLabel> = luModalTranslations;\r\n\r\n/**\r\n * @deprecated Use LuModalConfig from @lucca-front/ng/modal instead.\r\n */\r\nexport type LuSidepanelConfig = LuModalConfig;\r\n\r\n/**\r\n * @deprecated Use LuModalConfig from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelConfig = LuModalConfig;\r\n\r\n/**\r\n * @deprecated Use ILuModalContent from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelContent<T = unknown> = ILuModalContent<T>;\r\n\r\n/**\r\n * @deprecated Use ILuModalRef from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelRef<T extends ILuSidepanelContent = ILuSidepanelContent, D = unknown, R = unknown> = ILuModalRef<T, D, R>;\r\n","import { ComponentType } from '@angular/cdk/overlay';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { LuModal } from '@lucca-front/ng/modal';\r\nimport {
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-sidepanel.mjs","sources":["../../../packages/ng/sidepanel/src/lib/sidepanel.model.ts","../../../packages/ng/sidepanel/src/lib/sidepanel.service.ts","../../../packages/ng/sidepanel/src/lib/sidepanel.module.ts","../../../packages/ng/sidepanel/src/public-api.ts","../../../packages/ng/sidepanel/src/lucca-front-ng-sidepanel.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nimport { ILuTranslation } from '@lucca-front/ng/core';\r\nimport { ALuModalRef as ALuSidepanelRef, ILuModalContent, ILuModalLabel, ILuModalRef, luDefaultSidepanelConfig, LuModalConfig, luModalTranslations, LU_MODAL_DATA } from '@lucca-front/ng/modal';\r\n\r\n/**\r\n * For backward compatibility, we re-export modal tokens as sidepanel tokens.\r\n * We should remove all sidepanel related files in the next major version (16+).\r\n */\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_CONFIG from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_CONFIG = new InjectionToken<LuSidepanelConfig>('LuSidepanelDefaultConfig', {\r\n\tfactory: () => luDefaultSidepanelConfig,\r\n});\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_DATA from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_DATA = LU_MODAL_DATA;\r\n\r\n/**\r\n * @deprecated Use LU_MODAL_TRANSLATIONS from @lucca-front/ng/modal instead.\r\n */\r\nexport const LU_SIDEPANEL_TRANSLATIONS = new InjectionToken('LuSidepanelTranslations', {\r\n\tfactory: () => luSidepanelTranslations,\r\n});\r\n\r\n/**\r\n * @deprecated Use ILuModalLabel from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelLabel = ILuModalLabel;\r\n\r\n/**\r\n * @deprecated Use luModalTranslations from @lucca-front/ng/modal instead.\r\n */\r\nexport const luSidepanelTranslations: ILuTranslation<ILuSidepanelLabel> = luModalTranslations;\r\n\r\n/**\r\n * @deprecated Use LuModalConfig from @lucca-front/ng/modal instead.\r\n */\r\nexport type LuSidepanelConfig = LuModalConfig;\r\n\r\n/**\r\n * @deprecated Use LuModalConfig from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelConfig = LuModalConfig;\r\n\r\n/**\r\n * @deprecated Use ILuModalContent from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelContent<T = unknown> = ILuModalContent<T>;\r\n\r\n/**\r\n * @deprecated Use ILuModalRef from @lucca-front/ng/modal instead.\r\n */\r\nexport type ILuSidepanelRef<T extends ILuSidepanelContent = ILuSidepanelContent, D = unknown, R = unknown> = ILuModalRef<T, D, R>;\r\n\r\nexport {\r\n\t/**\r\n\t * @deprecated Use ALuModalRef from @lucca-front/ng/modal instead.\r\n\t */\r\n\tALuSidepanelRef,\r\n};\r\n","import { ComponentType } from '@angular/cdk/overlay';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { ILuModalContent, LuModal } from '@lucca-front/ng/modal';\r\nimport { ILuSidepanelRef, LuSidepanelConfig, LU_SIDEPANEL_CONFIG } from './sidepanel.model';\r\n\r\n/**\r\n * @deprecated Use LuModal with `modal.open(component, data, { mode: 'sidepanel' })` instead.\r\n */\r\n@Injectable()\r\nexport class LuSidepanel extends LuModal {\r\n\tprotected override _config = inject(LU_SIDEPANEL_CONFIG);\r\n\r\n\t/**\r\n\t * @deprecated Use LuModal with `modal.open(component, data, { mode: 'sidepanel' })` instead.\r\n\t */\r\n\toverride open<T extends ILuModalContent<R>, D, R>(component: ComponentType<T>, data: D = undefined, config: Partial<LuSidepanelConfig> = {}): ILuSidepanelRef<T, D, R> {\r\n\t\treturn super.open(component, data, config);\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { LuModalModule } from '@lucca-front/ng/modal';\r\nimport { LuSidepanel } from './sidepanel.service';\r\n\r\n/**\r\n * @deprecated Use LuModal with `modal.open(component, data, { mode: 'sidepanel' })` instead.\r\n */\r\n@NgModule({\r\n\timports: [LuModalModule],\r\n\tproviders: [LuSidepanel],\r\n})\r\nexport class LuSidepanelModule {}\r\n","/*\r\n * Public API Surface of safe-content\r\n */\r\n\r\nexport * from './lib/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAIA;;;AAGG;AAEH;;AAEG;MACU,mBAAmB,GAAG,IAAI,cAAc,CAAoB,0BAA0B,EAAE;AACpG,IAAA,OAAO,EAAE,MAAM,wBAAwB;AACvC,CAAA,EAAE;AAEH;;AAEG;AACI,MAAM,iBAAiB,GAAG,cAAc;AAE/C;;AAEG;MACU,yBAAyB,GAAG,IAAI,cA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A,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE,CAAC,WAAW,CAAC;AACxB,iBAAA,CAAA;;;ACVD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentType } from '@angular/cdk/portal';
|
|
1
2
|
import { ALuPopupRef, ILuPopupRef } from '@lucca-front/ng/popup';
|
|
2
3
|
import { LuModalClasses, LuModalConfig, LuModalMode } from './modal-config.model';
|
|
3
4
|
import { ILuModalContent } from './modal.model';
|
|
@@ -5,6 +6,9 @@ export interface ILuModalRef<T extends ILuModalContent = ILuModalContent, D = un
|
|
|
5
6
|
mode: LuModalMode;
|
|
6
7
|
modalClasses: LuModalClasses;
|
|
7
8
|
}
|
|
9
|
+
export interface IModalRefFactory<TComponent extends ILuModalContent = ILuModalContent, TConfig extends LuModalConfig = LuModalConfig> {
|
|
10
|
+
forge<T extends TComponent, C extends TConfig, D, R>(component: ComponentType<T>, config: C): ILuModalRef<T, D, R>;
|
|
11
|
+
}
|
|
8
12
|
export declare abstract class ALuModalRef<T extends ILuModalContent = ILuModalContent, D = unknown, R = unknown, C extends LuModalConfig = LuModalConfig> extends ALuPopupRef<T, D, R, C> implements ILuModalRef<T, D, R> {
|
|
9
13
|
get mode(): LuModalMode;
|
|
10
14
|
get modalClasses(): LuModalClasses;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentType } from '@angular/cdk/portal';
|
|
2
2
|
import { LuModalConfig } from './modal-config.model';
|
|
3
|
+
import { ILuModalRef } from './modal-ref.model';
|
|
4
|
+
import { ILuModalContent } from './modal.model';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class LuModal
|
|
5
|
-
protected _factory: import("
|
|
6
|
-
protected _config:
|
|
7
|
-
|
|
8
|
-
static
|
|
6
|
+
export declare class LuModal {
|
|
7
|
+
protected _factory: import("./modal-ref.model").IModalRefFactory<ILuModalContent<unknown>, LuModalConfig>;
|
|
8
|
+
protected _config: LuModalConfig;
|
|
9
|
+
open<T extends ILuModalContent<R>, D, R>(component: ComponentType<T>, data?: D, config?: Partial<LuModalConfig>): ILuModalRef<T, D, R>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuModal, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LuModal>;
|
|
9
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { ILuPopupRefFactory } from '@lucca-front/ng/popup';
|
|
3
2
|
import { LuModalConfig } from './modal-config.model';
|
|
3
|
+
import { IModalRefFactory } from './modal-ref.model';
|
|
4
4
|
/** Injection token that can be used to access the data that was passed in to a dialog. */
|
|
5
5
|
export declare const LU_MODAL_DATA: InjectionToken<unknown>;
|
|
6
6
|
export declare const LU_MODAL_CONFIG: InjectionToken<LuModalConfig>;
|
|
7
|
-
export declare const LU_MODAL_REF_FACTORY: InjectionToken<
|
|
7
|
+
export declare const LU_MODAL_REF_FACTORY: InjectionToken<IModalRefFactory<import("@lucca-front/ng/modal").ILuModalContent<unknown>, LuModalConfig>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucca-front/ng",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.2",
|
|
4
4
|
"description": "A library of icons made by the team @Lucca",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@angular/common": "^15.0.0",
|
|
30
30
|
"@angular/core": "^15.0.0",
|
|
31
31
|
"@angular/cdk": "^15.0.0",
|
|
32
|
-
"@lucca-front/icons": "v15.2.
|
|
33
|
-
"@lucca-front/scss": "v15.2.
|
|
32
|
+
"@lucca-front/icons": "v15.2.2",
|
|
33
|
+
"@lucca-front/scss": "v15.2.2",
|
|
34
34
|
"@types/dompurify": "^2.3.0",
|
|
35
35
|
"dompurify": "^2.3.0",
|
|
36
36
|
"rxjs": "^6.0.0 || ^7.0.0"
|
|
@@ -2,10 +2,10 @@ import { ComponentType } from '@angular/cdk/overlay';
|
|
|
2
2
|
import { ILuPopupConfig } from './popup-config.model';
|
|
3
3
|
import { ILuPopupRef } from './popup-ref.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class LuPopup
|
|
5
|
+
export declare class LuPopup {
|
|
6
6
|
protected _factory: import("./popup-ref.model").ILuPopupRefFactory<unknown, ILuPopupConfig>;
|
|
7
|
-
protected _config:
|
|
8
|
-
open<T, D, R>(component: ComponentType<T>, data?: D, config?: Partial<
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LuPopup
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LuPopup
|
|
7
|
+
protected _config: ILuPopupConfig;
|
|
8
|
+
open<T, D, R>(component: ComponentType<T>, data?: D, config?: Partial<ILuPopupConfig>): ILuPopupRef<T, D, R>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuPopup, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LuPopup>;
|
|
11
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { ILuTranslation } from '@lucca-front/ng/core';
|
|
3
|
-
import { ILuModalContent, ILuModalLabel, ILuModalRef, LuModalConfig } from '@lucca-front/ng/modal';
|
|
3
|
+
import { ALuModalRef as ALuSidepanelRef, ILuModalContent, ILuModalLabel, ILuModalRef, LuModalConfig } from '@lucca-front/ng/modal';
|
|
4
4
|
/**
|
|
5
5
|
* For backward compatibility, we re-export modal tokens as sidepanel tokens.
|
|
6
6
|
* We should remove all sidepanel related files in the next major version (16+).
|
|
@@ -41,3 +41,8 @@ export declare type ILuSidepanelContent<T = unknown> = ILuModalContent<T>;
|
|
|
41
41
|
* @deprecated Use ILuModalRef from @lucca-front/ng/modal instead.
|
|
42
42
|
*/
|
|
43
43
|
export declare type ILuSidepanelRef<T extends ILuSidepanelContent = ILuSidepanelContent, D = unknown, R = unknown> = ILuModalRef<T, D, R>;
|
|
44
|
+
export {
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use ALuModalRef from @lucca-front/ng/modal instead.
|
|
47
|
+
*/
|
|
48
|
+
ALuSidepanelRef, };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { ComponentType } from '@angular/cdk/overlay';
|
|
2
|
-
import { LuModal } from '@lucca-front/ng/modal';
|
|
3
|
-
import {
|
|
4
|
-
import { LuSidepanelConfig } from './sidepanel.model';
|
|
2
|
+
import { ILuModalContent, LuModal } from '@lucca-front/ng/modal';
|
|
3
|
+
import { ILuSidepanelRef, LuSidepanelConfig } from './sidepanel.model';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
/**
|
|
7
6
|
* @deprecated Use LuModal with `modal.open(component, data, { mode: 'sidepanel' })` instead.
|
|
8
7
|
*/
|
|
9
|
-
export declare class LuSidepanel
|
|
10
|
-
protected _config:
|
|
8
|
+
export declare class LuSidepanel extends LuModal {
|
|
9
|
+
protected _config: import("@lucca-front/ng/modal").LuModalConfig;
|
|
11
10
|
/**
|
|
12
11
|
* @deprecated Use LuModal with `modal.open(component, data, { mode: 'sidepanel' })` instead.
|
|
13
12
|
*/
|
|
14
|
-
open<T
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LuSidepanel
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LuSidepanel
|
|
13
|
+
open<T extends ILuModalContent<R>, D, R>(component: ComponentType<T>, data?: D, config?: Partial<LuSidepanelConfig>): ILuSidepanelRef<T, D, R>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuSidepanel, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LuSidepanel>;
|
|
17
16
|
}
|