barsa-novin-ray-core 3.0.1 → 3.0.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/fesm2022/{barsa-novin-ray-core-barsa-novin-ray-core-BneCvL2Z.mjs → barsa-novin-ray-core-barsa-novin-ray-core-CakmZXPX.mjs} +136 -45
- package/fesm2022/barsa-novin-ray-core-barsa-novin-ray-core-CakmZXPX.mjs.map +1 -0
- package/fesm2022/{barsa-novin-ray-core-barsa-report-page.module-CpACJpmQ.mjs → barsa-novin-ray-core-barsa-report-page.module-DFDfT3fn.mjs} +2 -2
- package/fesm2022/{barsa-novin-ray-core-barsa-report-page.module-CpACJpmQ.mjs.map → barsa-novin-ray-core-barsa-report-page.module-DFDfT3fn.mjs.map} +1 -1
- package/fesm2022/barsa-novin-ray-core.mjs +1 -1
- package/package.json +1 -1
- package/types/barsa-novin-ray-core.d.ts +17 -3
- package/fesm2022/barsa-novin-ray-core-barsa-novin-ray-core-BneCvL2Z.mjs.map +0 -1
|
@@ -2690,14 +2690,13 @@ function getTargetRect(target) {
|
|
|
2690
2690
|
}
|
|
2691
2691
|
function getFieldValue(name, mo, caption) {
|
|
2692
2692
|
if (mo.GetFValueByCaption) {
|
|
2693
|
-
let result = mo.GetFValue(name);
|
|
2693
|
+
let result = mo.GetFValue(name) ?? mo.GetFValueByCaption(name);
|
|
2694
2694
|
if (caption) {
|
|
2695
2695
|
result = mo.GetFCaption(name);
|
|
2696
2696
|
}
|
|
2697
2697
|
if (typeof caption === 'undefined' && mo.InheritanceInfo && !(mo.$FieldDict && mo.$FieldDict[name])) {
|
|
2698
2698
|
const { ParentFieldName } = mo.InheritanceInfo;
|
|
2699
2699
|
const moParent = mo.GetFValue(ParentFieldName);
|
|
2700
|
-
let result = moParent.GetFValue(name);
|
|
2701
2700
|
if (caption) {
|
|
2702
2701
|
result = moParent.GetFCaption(name);
|
|
2703
2702
|
}
|
|
@@ -6263,6 +6262,9 @@ function formRoutes(authGuard = false) {
|
|
|
6263
6262
|
return {
|
|
6264
6263
|
path: 'form',
|
|
6265
6264
|
canActivate: authGuard ? [AuthGuard] : [],
|
|
6265
|
+
// pageData را صریحاً null میکنیم تا صفحهی فرم، pageDataِ صفحهی والد را به ارث نبرد و
|
|
6266
|
+
// ماژولهای صفحهی والد داخل فرم رندر نشوند. (همراستا با reportRoutes.)
|
|
6267
|
+
data: { pageData: null },
|
|
6266
6268
|
loadChildren: () => Promise.resolve().then(function () { return barsaSapUiFormPage_module; }).then((m) => m.BarsaSapUiFormPageModule)
|
|
6267
6269
|
};
|
|
6268
6270
|
}
|
|
@@ -6834,7 +6836,11 @@ function reportRoutes(authGuard = false) {
|
|
|
6834
6836
|
return {
|
|
6835
6837
|
path: 'report/:id',
|
|
6836
6838
|
canActivate: authGuard ? [AuthGuard] : [],
|
|
6837
|
-
loadChildren: () => import('./barsa-novin-ray-core-barsa-report-page.module-
|
|
6839
|
+
loadChildren: () => import('./barsa-novin-ray-core-barsa-report-page.module-DFDfT3fn.mjs').then((m) => m.BarsaReportPageModule),
|
|
6840
|
+
// pageData را صریحاً null میکنیم تا صفحهی گزارش، pageDataِ صفحهی والد (مثل home) را
|
|
6841
|
+
// به ارث نبرد؛ در غیر این صورت PageBaseComponent.getData$ ماژولهای صفحهی والد را هم
|
|
6842
|
+
// داخل صفحهی گزارش رندر میکند (مثلاً shellbar). نگاه کن به CustomRouteReuseStrategy.
|
|
6843
|
+
data: { pageData: null },
|
|
6838
6844
|
resolve: {
|
|
6839
6845
|
breadcrumb: ReportBreadcrumbResolver
|
|
6840
6846
|
}
|
|
@@ -13559,6 +13565,9 @@ class BaseColumnPropsComponent extends BaseComponent {
|
|
|
13559
13565
|
// eslint-disable-next-line
|
|
13560
13566
|
this.cancel = new EventEmitter();
|
|
13561
13567
|
this.tab = new EventEmitter();
|
|
13568
|
+
this.enter = new EventEmitter();
|
|
13569
|
+
this.arrowUp = new EventEmitter();
|
|
13570
|
+
this.arrowDown = new EventEmitter();
|
|
13562
13571
|
this.changeToEditMode = new EventEmitter();
|
|
13563
13572
|
this._columnService = inject(ColumnService, { optional: true, self: true });
|
|
13564
13573
|
if (this._columnService) {
|
|
@@ -13574,7 +13583,7 @@ class BaseColumnPropsComponent extends BaseComponent {
|
|
|
13574
13583
|
this.changeToEditMode.emit(this._el.nativeElement);
|
|
13575
13584
|
}
|
|
13576
13585
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BaseColumnPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13577
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: BaseColumnPropsComponent, isStandalone: false, selector: "bnrc-base-column-props", inputs: { allColumns: "allColumns", column: "column", attachmentViewType: "attachmentViewType", mo: "mo", index: "index", editMode: "editMode", isMobile: "isMobile", customRowHeight: "customRowHeight", controlUi: "controlUi", formLayoutShowLabel: "formLayoutShowLabel", isChecked: "isChecked", isdirty: "isdirty", isNewInlineMo: "isNewInlineMo", layout94: "layout94", detailsComponentSetting: "detailsComponentSetting", value: "value", icon: "icon", rtl: "rtl", cellEdit: "cellEdit", deviceName: "deviceName", deviceSize: "deviceSize", customComponent: "customComponent" }, outputs: { save: "save", cancel: "cancel", tab: "tab", changeToEditMode: "changeToEditMode" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13586
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: BaseColumnPropsComponent, isStandalone: false, selector: "bnrc-base-column-props", inputs: { allColumns: "allColumns", column: "column", attachmentViewType: "attachmentViewType", mo: "mo", index: "index", editMode: "editMode", isMobile: "isMobile", customRowHeight: "customRowHeight", controlUi: "controlUi", formLayoutShowLabel: "formLayoutShowLabel", isChecked: "isChecked", isdirty: "isdirty", isNewInlineMo: "isNewInlineMo", layout94: "layout94", detailsComponentSetting: "detailsComponentSetting", value: "value", icon: "icon", rtl: "rtl", cellEdit: "cellEdit", deviceName: "deviceName", deviceSize: "deviceSize", customComponent: "customComponent" }, outputs: { save: "save", cancel: "cancel", tab: "tab", enter: "enter", arrowUp: "arrowUp", arrowDown: "arrowDown", changeToEditMode: "changeToEditMode" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13578
13587
|
}
|
|
13579
13588
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BaseColumnPropsComponent, decorators: [{
|
|
13580
13589
|
type: Component,
|
|
@@ -13590,6 +13599,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
13590
13599
|
type: Output
|
|
13591
13600
|
}], tab: [{
|
|
13592
13601
|
type: Output
|
|
13602
|
+
}], enter: [{
|
|
13603
|
+
type: Output
|
|
13604
|
+
}], arrowUp: [{
|
|
13605
|
+
type: Output
|
|
13606
|
+
}], arrowDown: [{
|
|
13607
|
+
type: Output
|
|
13593
13608
|
}], changeToEditMode: [{
|
|
13594
13609
|
type: Output
|
|
13595
13610
|
}], allColumns: [{
|
|
@@ -14589,7 +14604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
14589
14604
|
|
|
14590
14605
|
class DynamicFormComponent extends BaseDynamicComponent {
|
|
14591
14606
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: DynamicFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
14592
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: DynamicFormComponent, isStandalone: false, selector: "bnrc-dynamic-form-component", inputs: { breadCrumbs: "breadCrumbs", toolbarVisible: "toolbarVisible", toolbarItems: "toolbarItems", layoutActions: "layoutActions", layoutActionsTemplateRef: "layoutActionsTemplateRef", workflowButtons: "workflowButtons", layout94: "layout94", footerDesign: "footerDesign", settings: "settings", workflowPanelUi: "workflowPanelUi", title: "title", subtitle: "subtitle", description: "description", facetList: "facetList", removeHeaderBorder: "removeHeaderBorder", removeContentPadding: "removeContentPadding", isMobile: "isMobile", isModal: "isModal", avatar: "avatar", rtl: "rtl", mask: "mask", mo: "mo", contentDensity: "contentDensity", deviceSize: "deviceSize", dirValue: "dirValue", fieldDict: "fieldDict", modernTabs: "modernTabs" }, usesInheritance: true, ngImport: i0, template: `<ng-container #componentContainer></ng-container>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14607
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: DynamicFormComponent, isStandalone: false, selector: "bnrc-dynamic-form-component", inputs: { breadCrumbs: "breadCrumbs", toolbarVisible: "toolbarVisible", toolbarItems: "toolbarItems", layoutActions: "layoutActions", layoutActionsTemplateRef: "layoutActionsTemplateRef", workflowButtons: "workflowButtons", layout94: "layout94", footerDesign: "footerDesign", settings: "settings", lastUpdateTime: "lastUpdateTime", workflowPanelUi: "workflowPanelUi", title: "title", subtitle: "subtitle", description: "description", facetList: "facetList", removeHeaderBorder: "removeHeaderBorder", removeContentPadding: "removeContentPadding", isMobile: "isMobile", isModal: "isModal", avatar: "avatar", rtl: "rtl", mask: "mask", mo: "mo", contentDensity: "contentDensity", deviceSize: "deviceSize", dirValue: "dirValue", fieldDict: "fieldDict", modernTabs: "modernTabs" }, usesInheritance: true, ngImport: i0, template: `<ng-container #componentContainer></ng-container>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14593
14608
|
}
|
|
14594
14609
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: DynamicFormComponent, decorators: [{
|
|
14595
14610
|
type: Component,
|
|
@@ -14617,6 +14632,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
14617
14632
|
type: Input
|
|
14618
14633
|
}], settings: [{
|
|
14619
14634
|
type: Input
|
|
14635
|
+
}], lastUpdateTime: [{
|
|
14636
|
+
type: Input
|
|
14620
14637
|
}], workflowPanelUi: [{
|
|
14621
14638
|
type: Input
|
|
14622
14639
|
}], title: [{
|
|
@@ -14961,7 +14978,6 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
|
|
|
14961
14978
|
this.actionListClick = new EventEmitter();
|
|
14962
14979
|
this.events = new EventEmitter();
|
|
14963
14980
|
this.hasError = false;
|
|
14964
|
-
this._focusToFirstEidtableColumn = false;
|
|
14965
14981
|
this.inlineEditInReport = true;
|
|
14966
14982
|
this.rewriteLayout = true;
|
|
14967
14983
|
this.hasCartableTemplate = false;
|
|
@@ -14980,15 +14996,16 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
|
|
|
14980
14996
|
this._renderer2 = inject(Renderer2);
|
|
14981
14997
|
this._saveEditedMo$ = new Subject();
|
|
14982
14998
|
this._formpanelValueChanged$ = new Subject();
|
|
14999
|
+
this._inlineNavigation = null;
|
|
14983
15000
|
this._saveEditedMo$
|
|
14984
15001
|
.asObservable()
|
|
14985
15002
|
.pipe(takeUntil$1(this._onDestroy$),
|
|
14986
15003
|
// debounceTime(500),
|
|
14987
15004
|
exhaustMap((reason) => this._inlineEditSaveFormPanel(reason)), catchError((err) => throwError(() => err)))
|
|
14988
15005
|
.subscribe((res) => {
|
|
14989
|
-
if (res.saved) {
|
|
15006
|
+
if (res.saved && res.succeed) {
|
|
14990
15007
|
this.mo.$IsChecked = false;
|
|
14991
|
-
if (this.extraRelation
|
|
15008
|
+
if (!this.extraRelation || this.extraRelation.RelationType !== 'Composition') {
|
|
14992
15009
|
this.mo.$State = 'Unchanged';
|
|
14993
15010
|
}
|
|
14994
15011
|
this.editFormPanelValueChange.emit({ mo: this.mo, fieldDbName: '$InlineMoState' });
|
|
@@ -14998,7 +15015,17 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
|
|
|
14998
15015
|
this.hasError && (this.mo.$InlineMoState = RowState.SaveFailed);
|
|
14999
15016
|
this.editFormPanelValueChange.emit({ mo: this.mo });
|
|
15000
15017
|
}
|
|
15001
|
-
if (res.
|
|
15018
|
+
else if (res.saved) {
|
|
15019
|
+
this.mo.$InlineMoState = RowState.SaveFailed;
|
|
15020
|
+
this.mo.$IsChecked = true;
|
|
15021
|
+
this.editFormPanelValueChange.emit({ mo: this.mo, fieldDbName: '$InlineMoState' });
|
|
15022
|
+
this._cdr.markForCheck();
|
|
15023
|
+
}
|
|
15024
|
+
if (res.succeed && (res.reason === 'TAB' || res.reason === 'CTRL+ENTER')) {
|
|
15025
|
+
if (this._inlineNavigation) {
|
|
15026
|
+
this.mo.$InlineEditNavigation = this._inlineNavigation;
|
|
15027
|
+
this._inlineNavigation = null;
|
|
15028
|
+
}
|
|
15002
15029
|
this.selectNextInlineRecord.emit(this.mo);
|
|
15003
15030
|
}
|
|
15004
15031
|
else if (res.reason === 'ESC') {
|
|
@@ -15109,23 +15136,46 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
|
|
|
15109
15136
|
}
|
|
15110
15137
|
onColumnChangeToEditMode(elDom, index) {
|
|
15111
15138
|
const focusables = elDom.querySelectorAll(getFocusableTagNames());
|
|
15112
|
-
this._lastEditableColumnIndex =
|
|
15113
|
-
|
|
15139
|
+
this._lastEditableColumnIndex = this._getLastEditableColumnIndex();
|
|
15140
|
+
const activeColumn = this.activeColumn();
|
|
15141
|
+
const targetIndex = activeColumn ? this.columns.findIndex((column) => column === activeColumn) : 0;
|
|
15142
|
+
if (!focusables.length || index !== targetIndex) {
|
|
15114
15143
|
return;
|
|
15115
15144
|
}
|
|
15116
|
-
|
|
15117
|
-
const lastFocusable = focusables[0];
|
|
15145
|
+
const firstFocusable = focusables[0];
|
|
15118
15146
|
setTimeout(() => {
|
|
15119
|
-
|
|
15147
|
+
firstFocusable?.focus();
|
|
15120
15148
|
}, 0);
|
|
15121
15149
|
}
|
|
15122
15150
|
onTabKeyDown(e, index) {
|
|
15123
|
-
if (index === this.
|
|
15124
|
-
if (this.index ===
|
|
15151
|
+
if (e.shiftKey && index === this._getFirstEditableColumnIndex()) {
|
|
15152
|
+
if (this.index === 0) {
|
|
15125
15153
|
PreventDefaulEvent(e);
|
|
15154
|
+
return;
|
|
15126
15155
|
}
|
|
15127
|
-
this.
|
|
15156
|
+
this._queueInlineRecordNavigation(e, this._getLastEditableColumnIndex(), 'previous');
|
|
15157
|
+
return;
|
|
15158
|
+
}
|
|
15159
|
+
if (!e.shiftKey && index === this._lastEditableColumnIndex) {
|
|
15160
|
+
this._queueInlineRecordNavigation(e, this._getFirstEditableColumnIndex(), 'next');
|
|
15161
|
+
}
|
|
15162
|
+
}
|
|
15163
|
+
onEnterKeyDown(e, index) {
|
|
15164
|
+
if (e.target?.tagName?.toLowerCase() === 'textarea') {
|
|
15165
|
+
return;
|
|
15128
15166
|
}
|
|
15167
|
+
this._queueInlineRecordNavigation(e, index, 'next');
|
|
15168
|
+
}
|
|
15169
|
+
onVerticalNavigationKeyDown(e, index, direction) {
|
|
15170
|
+
const target = e.target;
|
|
15171
|
+
if (target?.tagName?.toLowerCase() === 'textarea' ||
|
|
15172
|
+
target?.getAttribute('aria-expanded') === 'true' ||
|
|
15173
|
+
(direction === 'previous' && this.index === 0) ||
|
|
15174
|
+
(direction === 'next' && this.last)) {
|
|
15175
|
+
PreventDefaulEvent(e);
|
|
15176
|
+
return;
|
|
15177
|
+
}
|
|
15178
|
+
this._queueInlineRecordNavigation(e, index, direction);
|
|
15129
15179
|
}
|
|
15130
15180
|
onEditFormPanelSave(_) {
|
|
15131
15181
|
this._saveEditedMo$.next('CTRL+ENTER');
|
|
@@ -15253,6 +15303,14 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
|
|
|
15253
15303
|
// this._saveEditedMo$.next('TAB');
|
|
15254
15304
|
// }
|
|
15255
15305
|
}
|
|
15306
|
+
/** آخرین ستونی که در ردیفِ inline واقعاً میتواند مقصد Tab باشد. */
|
|
15307
|
+
_getLastEditableColumnIndex() {
|
|
15308
|
+
return (this.columns ?? []).reduce((lastEditableIndex, column, index) => (!column.Hidden && !column.IsReadonly ? index : lastEditableIndex), -1);
|
|
15309
|
+
}
|
|
15310
|
+
/** نخستین ستونی که مقصد ورود به ردیف بعد با Tab است. */
|
|
15311
|
+
_getFirstEditableColumnIndex() {
|
|
15312
|
+
return (this.columns ?? []).findIndex((column) => !column.Hidden && !column.IsReadonly);
|
|
15313
|
+
}
|
|
15256
15314
|
_rowCheck(onlyCheck) {
|
|
15257
15315
|
this.rowCheck.emit({ mo: this.mo, index: this.index, onlyCheck });
|
|
15258
15316
|
}
|
|
@@ -15277,6 +15335,22 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
|
|
|
15277
15335
|
}
|
|
15278
15336
|
this._formpanelValueChanged$.next(fieldCtrlr?.Setting?.ControlName);
|
|
15279
15337
|
}
|
|
15338
|
+
_handleAfterSave(_formPanelCtrl, _err) {
|
|
15339
|
+
let moForReport = BarsaApi.Common.Util.TryGetValue(_formPanelCtrl, '_afterSaveSetting.Data.MoForReport');
|
|
15340
|
+
const type = BarsaApi.Common.Util.TryGetValue(_formPanelCtrl, '_afterSaveSetting.Data.MoForReport.$Type');
|
|
15341
|
+
if (BarsaApi.Ext.isNotEmpty(type)) {
|
|
15342
|
+
moForReport.xtype = type;
|
|
15343
|
+
const obj = BarsaApi.Ext.create(moForReport);
|
|
15344
|
+
if (obj instanceof BarsaApi.Common.MetaObjectListWeb) {
|
|
15345
|
+
moForReport = obj.GetMoByIndex(0);
|
|
15346
|
+
}
|
|
15347
|
+
else if (obj instanceof BarsaApi.Common.MetaObjectWeb) {
|
|
15348
|
+
moForReport = obj;
|
|
15349
|
+
}
|
|
15350
|
+
this.mo.Id = moForReport.Id;
|
|
15351
|
+
this.mo.$Context = moForReport.$Context;
|
|
15352
|
+
}
|
|
15353
|
+
}
|
|
15280
15354
|
_syncMo() {
|
|
15281
15355
|
const syncWithFormpanelMo = this.mo;
|
|
15282
15356
|
const _isChecked = this.mo.$IsChecked;
|
|
@@ -15323,7 +15397,8 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
|
|
|
15323
15397
|
this.formPanelCtrlr.InlineEditInReport = true;
|
|
15324
15398
|
this.formPanelCtrlr.on({
|
|
15325
15399
|
bruleShowMessageAction: this._handleBruleShowMessageAction.bind(this),
|
|
15326
|
-
valueChange: this._handleValueChange.bind(this)
|
|
15400
|
+
valueChange: this._handleValueChange.bind(this),
|
|
15401
|
+
aftersave: this._handleAfterSave.bind(this)
|
|
15327
15402
|
});
|
|
15328
15403
|
return this.formPanelCtrlr;
|
|
15329
15404
|
}
|
|
@@ -15405,10 +15480,15 @@ class BaseViewItemPropsComponent extends BaseViewPropsComponent {
|
|
|
15405
15480
|
}
|
|
15406
15481
|
this.formPanelCtrlr.SetIsChanged(false);
|
|
15407
15482
|
this._setSavingState(err);
|
|
15408
|
-
resolve({ reason, succeed:
|
|
15483
|
+
resolve({ reason, succeed: !err, saved: true });
|
|
15409
15484
|
});
|
|
15410
15485
|
});
|
|
15411
15486
|
}
|
|
15487
|
+
_queueInlineRecordNavigation(e, columnIndex, direction) {
|
|
15488
|
+
PreventDefaulEvent(e);
|
|
15489
|
+
this._inlineNavigation = { columnIndex, direction, rowIndex: this.index };
|
|
15490
|
+
this._saveEditedMo$.next('TAB');
|
|
15491
|
+
}
|
|
15412
15492
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BaseViewItemPropsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15413
15493
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: BaseViewItemPropsComponent, isStandalone: false, selector: "bnrc-base-view-item-props", inputs: { checkboxComponent: "checkboxComponent", disableEllapsis: "disableEllapsis", isslider: "isslider", attachmentViewType: "attachmentViewType", dirtyColumns: "dirtyColumns", contextMenuOverflowText: "contextMenuOverflowText", detailsComponent: "detailsComponent", detailsColumns: "detailsColumns", detailsText: "detailsText", mo: "mo", moDataListCount: "moDataListCount", index: "index", last: "last", hideHeader: "hideHeader", isdirty: "isdirty", isChecked: "isChecked", hideDetailsText: "hideDetailsText", showViewButton: "showViewButton", isNewInlineMo: "isNewInlineMo", extraRelation: "extraRelation", hideOpenIcon: "hideOpenIcon", inlineEditWithoutSelection: "inlineEditWithoutSelection", inDialog: "inDialog", isMobile: "isMobile", isMultiSelect: "isMultiSelect", rowIndicator: "rowIndicator", groupSummary: "groupSummary", isLastChildGroup: "isLastChildGroup", showRowNumber: "showRowNumber", rowNumber: "rowNumber", alternateRowMode: "alternateRowMode", noSaveInlineEditInServer: "noSaveInlineEditInServer", disableHyperLink: "disableHyperLink", columnsHyperLink: "columnsHyperLink", rowIndicatorColor: "rowIndicatorColor", alternateEditObjectColumn: "alternateEditObjectColumn", maxHeightHeader: "maxHeightHeader", UlvMainCtrlr: "UlvMainCtrlr", fieldDict: "fieldDict", actionList: "actionList", serializedRelatedMo: "serializedRelatedMo", cartableTemplate: "cartableTemplate", cartableMo: "cartableMo", cartableWorkflowData: "cartableWorkflowData" }, outputs: { actionListClick: "actionListClick", events: "events" }, viewQueries: [{ propertyName: "_cartableFormRef", first: true, predicate: ["cartableFormRef"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15414
15494
|
}
|
|
@@ -19952,49 +20032,60 @@ const routeStorage = {};
|
|
|
19952
20032
|
const REUSE_PROPERTY = 'ReuseRoute';
|
|
19953
20033
|
class CustomRouteReuseStrategy {
|
|
19954
20034
|
// تصمیم میگیرد که آیا یک روَت باید Detach و ذخیره شود یا نه.
|
|
19955
|
-
// ما فقط روَتهایی را که در data مشخص شدهاند، Detach میکنیم.
|
|
19956
20035
|
shouldDetach(route) {
|
|
19957
|
-
|
|
19958
|
-
const isReuse = !!BarsaApi.Common.Util.TryGetValue(route, `data.pageData.${REUSE_PROPERTY}`);
|
|
19959
|
-
return isReuse;
|
|
20036
|
+
return this._isReuse(route);
|
|
19960
20037
|
}
|
|
19961
20038
|
// کامپوننت Detach شده را ذخیره میکند.
|
|
19962
20039
|
store(route, handle) {
|
|
19963
|
-
|
|
19964
|
-
|
|
19965
|
-
const keyPath = this._getKeyOfPath(route);
|
|
19966
|
-
routeStorage[keyPath] = handle;
|
|
20040
|
+
if (route.routeConfig && this._isReuse(route)) {
|
|
20041
|
+
routeStorage[this._getKeyOfPath(route)] = handle;
|
|
19967
20042
|
}
|
|
19968
20043
|
}
|
|
19969
20044
|
// تصمیم میگیرد که آیا کامپوننت ذخیره شده باید بازیابی (Attach) شود یا نه.
|
|
19970
20045
|
shouldAttach(route) {
|
|
19971
|
-
|
|
19972
|
-
const keyPath = this._getKeyOfPath(route);
|
|
19973
|
-
return !!route.routeConfig && !!routeStorage[keyPath];
|
|
20046
|
+
return !!route.routeConfig && this._isReuse(route) && !!routeStorage[this._getKeyOfPath(route)];
|
|
19974
20047
|
}
|
|
19975
20048
|
// کامپوننت ذخیره شده را بازیابی میکند.
|
|
19976
20049
|
retrieve(route) {
|
|
19977
|
-
|
|
19978
|
-
if (!route.routeConfig || !isReuse) {
|
|
20050
|
+
if (!route.routeConfig || !this._isReuse(route)) {
|
|
19979
20051
|
return null;
|
|
19980
20052
|
}
|
|
19981
|
-
|
|
19982
|
-
return routeStorage[keyPath] || null;
|
|
20053
|
+
return routeStorage[this._getKeyOfPath(route)] || null;
|
|
19983
20054
|
}
|
|
19984
|
-
//
|
|
19985
|
-
//
|
|
19986
|
-
// اما اگر پارامترها و Query Params یکسان باشند، شاید بخواهید 'true' باشد.
|
|
19987
|
-
// برای حالت شما (نویگیشن بین روَتهای اصلی)، معمولاً 'false' است مگر اینکه روَتها کاملاً یکسان باشند.
|
|
20055
|
+
// اگر از یک روَت به روَت دیگری برویم، این باید 'false' باشد تا بتواند Detach شود؛
|
|
20056
|
+
// در صورت یکسان بودنِ routeConfig، همان ActivatedRoute بازاستفاده میشود.
|
|
19988
20057
|
shouldReuseRoute(future, curr) {
|
|
19989
|
-
// این کار باعث میشود روَتهای خواهر (sibling) به عنوان روَتهای جدید در نظر گرفته شوند
|
|
19990
|
-
// تا بتوانند Detach و Attach شوند.
|
|
19991
20058
|
return future.routeConfig === curr.routeConfig;
|
|
19992
20059
|
}
|
|
20060
|
+
// کلیدِ ذخیرهسازی از pageDataِ «خودِ» روَت ساخته میشود تا برای هر صفحه یکتا باشد و با
|
|
20061
|
+
// فرزندانِ ارثبَرَندهی همان صفحه تداخل نکند.
|
|
19993
20062
|
_getKeyOfPath(route) {
|
|
19994
|
-
const
|
|
19995
|
-
|
|
19996
|
-
|
|
19997
|
-
|
|
20063
|
+
const pageData = this._ownPageData(route) || {};
|
|
20064
|
+
return `${pageData.ParentRoute}${pageData.Route}`;
|
|
20065
|
+
}
|
|
20066
|
+
// pageDataِ «خودِ» این روَت را برمیگرداند — از routeConfig.data، نه از snapshot.data.
|
|
20067
|
+
// نکتهی کلیدی: snapshot.data بهصورت ارثبریشده (merged با والد) است، پس همهی روَتهای
|
|
20068
|
+
// فرزندِ یک صفحهی Reuse (مثل report/:id و form و صفحهی empty) همان pageDataِ والد را
|
|
20069
|
+
// نشان میدهند. اگر بر اساس آن تصمیم بگیریم، کلیدِ ذخیرهسازی برای همهی این روَتها یکسان
|
|
20070
|
+
// میشود و handleِ یک روَت برای روَتِ دیگری Attach میشود → حلقه در درختِ ActivatedRoute و
|
|
20071
|
+
// خطای «Maximum call stack size exceeded» در setRouterState.
|
|
20072
|
+
_ownPageData(route) {
|
|
20073
|
+
return route?.routeConfig?.data?.['pageData'] ?? null;
|
|
20074
|
+
}
|
|
20075
|
+
// آیا این روَت باید Detach/Store/Attach شود؟
|
|
20076
|
+
// فقط روَتهایی که «خودِ» routeConfig-شان ReuseRoute=True دارد. چون از pageDataِ خودِ روَت
|
|
20077
|
+
// (نه snapshot.dataِ ارثبریشده) میخوانیم، روَتهای report/:id و form و صفحهی empty که
|
|
20078
|
+
// pageDataشان null است اینجا false میگیرند و در reuse دخالت نمیکنند.
|
|
20079
|
+
_isReuse(route) {
|
|
20080
|
+
const pageData = this._ownPageData(route);
|
|
20081
|
+
if (!pageData) {
|
|
20082
|
+
return false;
|
|
20083
|
+
}
|
|
20084
|
+
const reuse = pageData[REUSE_PROPERTY];
|
|
20085
|
+
if (reuse !== true && reuse !== 'True') {
|
|
20086
|
+
return false;
|
|
20087
|
+
}
|
|
20088
|
+
return true;
|
|
19998
20089
|
}
|
|
19999
20090
|
}
|
|
20000
20091
|
|
|
@@ -21182,4 +21273,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
21182
21273
|
*/
|
|
21183
21274
|
|
|
21184
21275
|
export { ColSetting as $, APP_VERSION as A, BaseModule as B, BaseFormToolbaritemPropsComponent as C, DynamicComponentService as D, BaseItemContentPropsComponent as E, BaseReportModel as F, BaseSettingsService as G, BaseUlvSettingComponent as H, BaseViewContentPropsComponent as I, BaseViewItemPropsComponent as J, BaseViewPropsComponent as K, BbbTranslatePipe as L, BodyClickDirective as M, BoolControlInfoModel as N, BreadcrumbService as O, ButtonLoadingComponent as P, CalculateControlInfoModel as Q, ReportEmptyPageComponent as R, CalendarSettingsStore as S, CanUploadFilePipe as T, CardBaseItemContentPropsComponent as U, CardDynamicItemComponent as V, CardMediaSizePipe as W, CardViewService as X, ChangeLayoutInfoCustomUi as Y, ChunkArrayPipe as Z, CodeEditorControlInfoModel as _, AbsoluteDivBodyDirective as a, FileControlInfoModel as a$, ColumnCustomComponentPipe as a0, ColumnCustomUiPipe as a1, ColumnIconPipe as a2, ColumnRendererBase as a3, ColumnRendererViewBase as a4, ColumnResizerDirective as a5, ColumnService as a6, ColumnValueDirective as a7, ColumnValueOfParametersPipe as a8, ColumnValuePipe as a9, DynamicCommandDirective as aA, DynamicDarkColorPipe as aB, DynamicFormComponent as aC, DynamicFormToolbaritemComponent as aD, DynamicItemComponent as aE, DynamicLayoutComponent as aF, DynamicRootVariableDirective as aG, DynamicStyleDirective as aH, DynamicUlvPagingComponent as aI, DynamicUlvToolbarComponent as aJ, EllapsisTextDirective as aK, EllipsifyDirective as aL, EmptyPageComponent as aM, EmptyPageWithRouterAndRouterOutletComponent as aN, EntitySettingsStore as aO, EnumCaptionPipe as aP, EnumControlInfoModel as aQ, ExecuteDynamicCommand as aR, ExecuteWorkflowChoiceDef as aS, ExistsColumnsPipe as aT, FORM_DIALOG_COMPONENT as aU, FieldBaseComponent as aV, FieldBaseController as aW, FieldDirective as aX, FieldInfoTypeEnum as aY, FieldUiComponent as aZ, FieldViewBase as a_, ComboRowImagePipe as aa, CommandControlInfoModel as ab, ContainerComponent as ac, ContainerService as ad, ContextMenuPipe as ae, ControlUiPipe as af, ConvertToStylePipe as ag, CopyDirective as ah, CountDownDirective as ai, CustomCommand as aj, CustomInjector as ak, CustomRouteReuseStrategy as al, CustomUiRegistryService as am, DEFAULT_OBJECT_ICON as an, DEFAULT_REPORT_LAYOUT_POLICY as ao, DIALOG_SERVICE as ap, DateHijriService as aq, DateMiladiService as ar, DateRanges as as, DateService as at, DateShamsiService as au, DateTimeControlInfoModel as av, DefaultCommandsAccessValue as aw, DefaultGridSetting as ax, DeviceWidth as ay, DialogParams as az, AddDynamicFormStyles as b, IsImagePipe as b$, FileInfoCountPipe as b0, FilePictureInfoModel as b1, FilesValidationHelper as b2, FillAllLayoutControls as b3, FillEmptySpaceDirective as b4, FilterColumnsByDetailsPipe as b5, FilterInlineActionListPipe as b6, FilterPipe as b7, FilterStringPipe as b8, FilterTabPipe as b9, GetCssVariableValuePipe as bA, GetDefaultMoObjectInfo as bB, GetImgTags as bC, GetViewableExtensions as bD, GetVisibleValue as bE, GridSetting as bF, GroupBy as bG, GroupByPipe as bH, GroupByService as bI, HeaderFacetValuePipe as bJ, HideAcceptCancelButtonsPipe as bK, HideColumnsInmobilePipe as bL, HistoryControlInfoModel as bM, HorizontalLayoutService as bN, HorizontalResponsiveDirective as bO, IconControlInfoModel as bP, IdbService as bQ, ImageLazyDirective as bR, ImageMimeType as bS, ImagetoPrint as bT, InMemoryStorageService as bU, IndexedDbService as bV, InputNumber as bW, IntersectionObserverDirective as bX, IntersectionStatus as bY, IsDarkMode as bZ, IsExpandedNodePipe as b_, FilterToolbarControlPipe as ba, FilterWorkflowInMobilePipe as bb, FindColumnByDbNamePipe as bc, FindColumnsPipe as bd, FindGroup as be, FindLayoutSettingFromLayout94 as bf, FindPreviewColumnPipe as bg, FindToolbarItem as bh, FioriIconPipe as bi, FormBaseComponent as bj, FormCloseDirective as bk, FormComponent as bl, FormFieldReportPageComponent as bm, FormNewComponent as bn, FormPageBaseComponent as bo, FormPageComponent as bp, FormPanelService as bq, FormPropsBaseComponent as br, FormService as bs, FormToolbarBaseComponent as bt, FormToolbarButton as bu, GaugeControlInfoModel as bv, GeneralControlInfoModel as bw, GetAllColumnsSorted as bx, GetAllHorizontalFromLayout94 as by, GetContentType as bz, AffixRespondEvents as c, PrintFilesDirective as c$, ItemsRendererDirective as c0, LabelStarTrimPipe as c1, LabelmandatoryDirective as c2, LayoutItemBaseComponent as c3, LayoutMainContentService as c4, LayoutPanelBaseComponent as c5, LayoutService as c6, LeafletLongPressDirective as c7, LinearListControlInfoModel as c8, LinearListHelper as c9, NOTIFICATAION_POPUP_SERVER as cA, NOTIFICATION_WEBWORKER_FACTORY as cB, NetworkStatusService as cC, NotFoundComponent as cD, NotificationService as cE, NowraptextDirective as cF, NumberBaseComponent as cG, NumberControlInfoModel as cH, NumbersOnlyInputDirective as cI, NumeralPipe as cJ, OverflowTextDirective as cK, PageBaseComponent as cL, PageWithFormHandlerBaseComponent as cM, PdfMimeType as cN, PictureFieldSourcePipe as cO, PictureFileControlInfoModel as cP, PicturesByGroupIdPipe as cQ, PlaceHolderDirective as cR, PortalDynamicPageResolver as cS, PortalFormPageResolver as cT, PortalPageComponent as cU, PortalPageResolver as cV, PortalPageSidebarComponent as cW, PortalReportPageResolver as cX, PortalService as cY, PreventDefaulEvent as cZ, PreventDefaultDirective as c_, ListCountPipe as ca, ListRelationModel as cb, LoadExternalFilesDirective as cc, LocalStorageService as cd, LogService as ce, LoginSettingsResolver as cf, MapToChatMessagePipe as cg, MasterDetailsPageComponent as ch, MeasureFormTitleWidthDirective as ci, MergeFieldsToColumnsPipe as cj, MetaobjectDataModel as ck, MetaobjectRelationModel as cl, MimeTypes as cm, MoForReportModel as cn, MoForReportModelBase as co, MoIconPipe as cp, MoInfoUlvMoListPipe as cq, MoInfoUlvPagingPipe as cr, MoLinkerDirective as cs, MoReportValueConcatPipe as ct, MoReportValuePipe as cu, MoValuePipe as cv, MobileDirective as cw, ModalRootComponent as cx, MultipleGroupByPipe as cy, NATIVE_FEDERATION_RUNTIME as cz, AllFilesMimeType as d, ScrollToSelectedDirective as d$, PrintImage as d0, PromptUpdateService as d1, PushBannerComponent as d2, PushCheckService as d3, PushNotificationService as d4, REPORT_GRID_VIEWPORT_CLASS as d5, REPORT_TYPE_DEFAULT_POLICIES as d6, RUNTIME_NAV_STATE_SCHEMA_V1 as d7, RabetehAkseTakiListiControlInfoModel as d8, ReadableTextColorPipe as d9, ReportViewBaseComponent as dA, ReportViewColumn as dB, ResizableComponent as dC, ResizableDirective as dD, ResizableModule as dE, ResizeHandlerDirective as dF, ResizeObserverDirective as dG, ResponsiveGridColsDirective as dH, ReversePipe as dI, RichStringControlInfoModel as dJ, RootPageComponent as dK, RootPortalComponent as dL, RotateImage as dM, RouteFormChangeDirective as dN, RoutingService as dO, RowDataOption as dP, RowNumberPipe as dQ, RowState as dR, RuntimeNavStateCacheService as dS, SafeBottomDirective as dT, SanitizeTextPipe as dU, SaveImageDirective as dV, SaveImageToFile as dW, SaveScrollPositionService as dX, ScopedCssPipe as dY, ScrollLayoutContextHolder as dZ, ScrollPersistDirective as d_, RedirectHomeGuard as da, RelatedReportControlInfoModel as db, RelationListControlInfoModel as dc, RelativeDatePipe as dd, RelativeTimeService as de, RemoveDynamicFormStyles as df, RemoveNewlinePipe as dg, RenderUlvDirective as dh, RenderUlvPaginDirective as di, RenderUlvViewerDirective as dj, ReplacePipe as dk, ReportActionListPipe as dl, ReportBaseComponent as dm, ReportBaseInfo as dn, ReportBreadcrumbResolver as dp, ReportCalendarModel as dq, ReportContainerComponent as dr, ReportExtraInfo as ds, ReportField as dt, ReportFormModel as du, ReportItemBaseComponent as dv, ReportListModel as dw, ReportModel as dx, ReportNavigatorComponent as dy, ReportTreeModel as dz, AnchorScrollDirective as e, createGridEditorFormPanel as e$, SelectionMode as e0, SeperatorFixPipe as e1, ServiceWorkerCommuncationService as e2, ServiceWorkerNotificationService as e3, ShellbarHeightService as e4, ShortcutHandlerDirective as e5, ShortcutRegisterDirective as e6, SimpleTemplateEngine as e7, SimplebarDirective as e8, SingleRelationControlInfoModel as e9, UlvMainService as eA, UnlimitSessionComponent as eB, UntilInViewDirective as eC, UploadService as eD, VideoMimeType as eE, VideoRecordingService as eF, ViewBase as eG, VisibleValuePipe as eH, WebOtpDirective as eI, WordMimeType as eJ, WorfkflowwChoiceCommandDirective as eK, addCssVariableToRoot as eL, addDynamicVariableTo as eM, availablePrefixes as eN, bodyClick as eO, buildRuntimeNavStateCacheKey as eP, calcContextMenuWidth as eQ, calculateColumnContent as eR, calculateColumnWidth as eS, calculateColumnWidthFitToContainer as eT, calculateFreeColumnSize as eU, calculateMoDataListContentWidthByColumnName as eV, cancelRequestAnimationFrame as eW, checkPermission as eX, compareVersions as eY, contextDefaultsFromEnvironment as eZ, createFormPanelMetaConditions as e_, SortDirection as ea, SortPipe as eb, SortSetting as ec, SplideSliderDirective as ed, SplitPipe as ee, SplitterComponent as ef, StopPropagationDirective as eg, StringControlInfoModel as eh, StringToNumberPipe as ei, SubformControlInfoModel as ej, SystemBaseComponent as ek, TEMPLATE_ENGINE as el, TOAST_SERVICE as em, TableHeaderWidthMode as en, TableResizerDirective as eo, TabpageService as ep, ThImageOrIconePipe as eq, TileGroupBreadcrumResolver as er, TilePropsComponent as es, TlbButtonsPipe as et, ToolbarSettingsPipe as eu, TooltipDirective as ev, TotalSummaryPipe as ew, UiService as ex, UlvCommandDirective as ey, UlvHeightSizeType as ez, formRoutes as f, scrollToElement as f$, easeInOutCubic as f0, elementInViewport2 as f1, enumValueToStringSize as f2, executeUlvCommandHandler as f3, extractLayoutPolicyFromView as f4, fixUnclosedParentheses as f5, flattenTree as f6, forbiddenValidator as f7, formatBytes as f8, fromEntries as f9, getRequestAnimationFrame as fA, getResetGridSettings as fB, getTargetRect as fC, getUniqueId as fD, getValidExtension as fE, hhmmToMs as fF, isFF as fG, isFirefox as fH, isFunction as fI, isIOS as fJ, isImage as fK, isInLocalMode as fL, isSafari as fM, isTargetWindow as fN, isVersionBiggerThan as fO, measureText as fP, measureText2 as fQ, measureTextBy as fR, mobile_regex as fS, multilevelSort as fT, nullOrUndefinedString as fU, number_only as fV, removeDynamicStyle as fW, requestAnimationFramePolyfill as fX, resolveFinalScroll as fY, resolveReportLayoutPolicy as fZ, scrollLayoutModeToContextEnvironment as f_, fromIntersectionObserver as fa, genrateInlineMoId as fb, getAllItemsPerChildren as fc, getColumnValueOfMoDataList as fd, getComponentDefined as fe, getControlList as ff, getControlSizeMode as fg, getDateService as fh, getDeviceIsDesktop as fi, getDeviceIsMobile as fj, getDeviceIsPhone as fk, getDeviceIsTablet as fl, getFieldValue as fm, getFocusableTagNames as fn, getFormSettings as fo, getGridSettings as fp, getHeaderValue as fq, getIcon as fr, getImagePath as fs, getLabelWidth as ft, getLayout94ObjectInfo as fu, getLayoutControl as fv, getNestedValue as fw, getNewMoGridEditor as fx, getParentHeight as fy, getReportTypeDefaultPolicy as fz, ApiService as g, searchEx as g0, setColumnWidthByMaxMoContentWidth as g1, setOneDepthLevel as g2, setTableThWidth as g3, shallowEqual as g4, shouldUseFreeColumnSize as g5, sort as g6, sortEx as g7, stopPropagation as g8, throwIfAlreadyLoaded as g9, toNumber as ga, toRelativeDate as gb, validateAllFormFields as gc, ApplicationBaseComponent as h, ApplicationCtrlrService as i, AttrRtlDirective as j, AudioMimeType as k, AudioRecordingService as l, AuthGuard as m, BarsaApi as n, BarsaDialogService as o, BarsaIconDictPipe as p, BarsaNovinRayCoreModule as q, reportRoutes as r, BarsaReadonlyDirective as s, BarsaSapUiFormPageModule as t, BarsaStorageService as u, BaseColumnPropsComponent as v, BaseComponent as w, BaseController as x, BaseDirective as y, BaseDynamicComponent as z };
|
|
21185
|
-
//# sourceMappingURL=barsa-novin-ray-core-barsa-novin-ray-core-
|
|
21276
|
+
//# sourceMappingURL=barsa-novin-ray-core-barsa-novin-ray-core-CakmZXPX.mjs.map
|