barsa-novin-ray-core 2.0.112 → 2.0.114
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/esm2022/lib/abstract-classes/models.mjs +1 -1
- package/esm2022/lib/abstract-classes/report-base.mjs +2 -2
- package/esm2022/lib/redirect-home-guard.mjs +10 -10
- package/esm2022/lib/services/form-panel.service.mjs +13 -1
- package/esm2022/lib/services/portal.service.mjs +14 -2
- package/fesm2022/barsa-novin-ray-core.mjs +35 -11
- package/fesm2022/barsa-novin-ray-core.mjs.map +1 -1
- package/lib/abstract-classes/models.d.ts +2 -0
- package/lib/services/form-panel.service.d.ts +4 -0
- package/lib/services/portal.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2579,6 +2579,7 @@ class FormPanelService extends BaseComponent {
|
|
|
2579
2579
|
this._workflowPanelUiSource = new BehaviorSubject(null);
|
|
2580
2580
|
this._moSource = new BehaviorSubject(null);
|
|
2581
2581
|
this._viewSource = new BehaviorSubject(null);
|
|
2582
|
+
this._sidebarState$ = new BehaviorSubject('close');
|
|
2582
2583
|
this._toolbarItemsSource = new BehaviorSubject([]);
|
|
2583
2584
|
this._titleSource = new BehaviorSubject('');
|
|
2584
2585
|
this._maxContentWidthSource = new BehaviorSubject('auto');
|
|
@@ -2639,6 +2640,9 @@ class FormPanelService extends BaseComponent {
|
|
|
2639
2640
|
this.circleAvatar$ = this.headerLayout$.pipe(map((headerLayout) => getHeaderValue(headerLayout?.CircleAvatar)), takeUntil(this._onDestroy$));
|
|
2640
2641
|
this.mask$ = this._maskSource.asObservable().pipe(debounceTime(200), takeUntil(this._onDestroy$));
|
|
2641
2642
|
}
|
|
2643
|
+
get sidebarState$() {
|
|
2644
|
+
return this._sidebarState$.asObservable();
|
|
2645
|
+
}
|
|
2642
2646
|
get hidePin$() {
|
|
2643
2647
|
return this._hidePin$.asObservable();
|
|
2644
2648
|
}
|
|
@@ -2667,6 +2671,7 @@ class FormPanelService extends BaseComponent {
|
|
|
2667
2671
|
if (!this._context) {
|
|
2668
2672
|
return;
|
|
2669
2673
|
}
|
|
2674
|
+
this._context.un('CloseSideNavigator', this._closeSideNavigator);
|
|
2670
2675
|
this._context.un('GroupBRuleChanged', this._groupBRuleChanged);
|
|
2671
2676
|
this._context.un('TitleChanged', this._titleChanged);
|
|
2672
2677
|
this._context.un('WizardNextStep', this._wizardNextStep);
|
|
@@ -2685,6 +2690,9 @@ class FormPanelService extends BaseComponent {
|
|
|
2685
2690
|
wfChoice(btn) {
|
|
2686
2691
|
this._context.WorkflowPanelUi.fireEvent('ChoiceSelect', btn, this._context);
|
|
2687
2692
|
}
|
|
2693
|
+
changeSidebarState(state) {
|
|
2694
|
+
this._sidebarState$.next(state);
|
|
2695
|
+
}
|
|
2688
2696
|
_initialize(context) {
|
|
2689
2697
|
this._workflowPanelUiSource.next(context?.WorkflowPanelUi);
|
|
2690
2698
|
this._isSearchPanelSource.next(context?.Setting?.IsSearchPanel);
|
|
@@ -2879,6 +2887,7 @@ class FormPanelService extends BaseComponent {
|
|
|
2879
2887
|
return;
|
|
2880
2888
|
}
|
|
2881
2889
|
context.on({
|
|
2890
|
+
CloseSideNavigator: this._closeSideNavigator.bind(this),
|
|
2882
2891
|
GroupBRuleChanged: this._groupBRuleChanged.bind(this),
|
|
2883
2892
|
TitleChanged: this._titleChanged.bind(this),
|
|
2884
2893
|
WizardNextStep: this._wizardNextStep.bind(this),
|
|
@@ -2918,6 +2927,9 @@ class FormPanelService extends BaseComponent {
|
|
|
2918
2927
|
const view = context.Setting.View;
|
|
2919
2928
|
this._viewSource.next(view);
|
|
2920
2929
|
}
|
|
2930
|
+
_closeSideNavigator() {
|
|
2931
|
+
this._sidebarState$.next('close');
|
|
2932
|
+
}
|
|
2921
2933
|
_groupBRuleChanged(groupItem) {
|
|
2922
2934
|
this._groupBRuleSource.next(groupItem);
|
|
2923
2935
|
}
|
|
@@ -3350,6 +3362,9 @@ class PortalService {
|
|
|
3350
3362
|
}
|
|
3351
3363
|
_initalizeDeviceSize() {
|
|
3352
3364
|
const _ismobile = getDeviceIsMobile();
|
|
3365
|
+
if (_ismobile) {
|
|
3366
|
+
BarsaApi.Bw.IsMobile = true;
|
|
3367
|
+
}
|
|
3353
3368
|
const _isTablet = getDeviceIsTablet();
|
|
3354
3369
|
let _windoWSize = 's';
|
|
3355
3370
|
if (window.innerWidth <= 600) {
|
|
@@ -3725,7 +3740,7 @@ class PortalService {
|
|
|
3725
3740
|
}
|
|
3726
3741
|
else if (e.ShowFormSetting) {
|
|
3727
3742
|
const { MoId, ViewName } = e.ShowFormSetting;
|
|
3728
|
-
setTimeout(() => BarsaApi.Bw.Form.Show({ MoId, MoContext: { ViewName } }));
|
|
3743
|
+
setTimeout(() => BarsaApi.Bw.Form.Show({ MoId, MoContext: { ViewName } }), 500);
|
|
3729
3744
|
}
|
|
3730
3745
|
},
|
|
3731
3746
|
FailFn: (e) => {
|
|
@@ -3897,6 +3912,14 @@ class PortalService {
|
|
|
3897
3912
|
this._pushAction$.next(pushAction);
|
|
3898
3913
|
}
|
|
3899
3914
|
}
|
|
3915
|
+
_checkLocalStoragePushAction() {
|
|
3916
|
+
const pushActionStr = this._localStorage.getItem('pushAction');
|
|
3917
|
+
if (pushActionStr) {
|
|
3918
|
+
this._localStorage.remove('pushAction');
|
|
3919
|
+
const pushAction = JSON.parse(pushActionStr);
|
|
3920
|
+
this._pushAction$.next(pushAction);
|
|
3921
|
+
}
|
|
3922
|
+
}
|
|
3900
3923
|
_initAfterLoginFormData() {
|
|
3901
3924
|
this.rtlSource.next(BarsaApi.LoginFormData.IsRtl);
|
|
3902
3925
|
this._isAnonumousSource.next(BarsaApi.LoginFormData.IsAnonymous);
|
|
@@ -3925,6 +3948,7 @@ class PortalService {
|
|
|
3925
3948
|
});
|
|
3926
3949
|
}
|
|
3927
3950
|
_initPushActions() {
|
|
3951
|
+
this._checkLocalStoragePushAction();
|
|
3928
3952
|
combineLatest([this.userLoggedIn$, this.pushAction$])
|
|
3929
3953
|
.pipe(
|
|
3930
3954
|
// withLatestFrom(this._portalService.pushAction$),
|
|
@@ -7885,7 +7909,7 @@ class ReportBaseComponent extends BaseComponent {
|
|
|
7885
7909
|
this.updateGridSetting(gridSettings, false, true);
|
|
7886
7910
|
}
|
|
7887
7911
|
_columnSummary(e) {
|
|
7888
|
-
this.context.fireEvent('columnSummary', this.context, e.moArr, e.column, e.summaryFn);
|
|
7912
|
+
this.context.fireEvent('columnSummary', this.context, e.moArr, e.column, e.groupLevel, e.groupName, e.summaryFn);
|
|
7889
7913
|
}
|
|
7890
7914
|
_gridSettingChanged(setting) {
|
|
7891
7915
|
this.gridSettingSource.next(setting);
|
|
@@ -13552,15 +13576,15 @@ class RedirectHomeGuard {
|
|
|
13552
13576
|
notificationTag,
|
|
13553
13577
|
action
|
|
13554
13578
|
};
|
|
13555
|
-
if (notificationTag === '' && action === 'show') {
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
|
|
13562
|
-
|
|
13563
|
-
}
|
|
13579
|
+
// if (notificationTag === '' && action === 'show') {
|
|
13580
|
+
// setTimeout(() => {
|
|
13581
|
+
// BarsaApi.Bw.Form.Show({
|
|
13582
|
+
// MoId: params.moid,
|
|
13583
|
+
// TypeDefId: params.tpid
|
|
13584
|
+
// });
|
|
13585
|
+
// }, 1000);
|
|
13586
|
+
// return;
|
|
13587
|
+
// }
|
|
13564
13588
|
this._portalService.pushActionNext(pushAction);
|
|
13565
13589
|
}
|
|
13566
13590
|
}
|