barsa-novin-ray-core 2.3.34 → 2.3.36

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.
@@ -4379,6 +4379,7 @@ class FormPanelService extends BaseComponent {
4379
4379
  this._isSearchPanelSource = new BehaviorSubject(false);
4380
4380
  this._isSearcPanelInSideContent = new BehaviorSubject(false);
4381
4381
  this._workflowPanelUiSource = new BehaviorSubject(null);
4382
+ this._infobars$ = new BehaviorSubject([]);
4382
4383
  this._moSource = new BehaviorSubject(null);
4383
4384
  this._viewSource = new BehaviorSubject(null);
4384
4385
  this._sidebarState$ = new BehaviorSubject('close');
@@ -4450,6 +4451,9 @@ class FormPanelService extends BaseComponent {
4450
4451
  this.circleAvatar$ = this.headerLayout$.pipe(map((headerLayout) => getHeaderValue(headerLayout?.CircleAvatar)), takeUntil(this._onDestroy$));
4451
4452
  this.mask$ = this._maskSource.asObservable().pipe(debounceTime(200), takeUntil(this._onDestroy$));
4452
4453
  }
4454
+ get infobars$() {
4455
+ return this._infobars$.asObservable().pipe(distinctUntilChanged());
4456
+ }
4453
4457
  get hideFooter$() {
4454
4458
  return this._hideFooter$.asObservable().pipe(distinctUntilChanged());
4455
4459
  }
@@ -4512,6 +4516,11 @@ class FormPanelService extends BaseComponent {
4512
4516
  changeSidebarState(state) {
4513
4517
  this._sidebarState$.next(state);
4514
4518
  }
4519
+ hideInfoBar(id) {
4520
+ const x = this._infobars$.getValue();
4521
+ const t = x.filter((c) => c.id !== id);
4522
+ this._infobars$.next(t);
4523
+ }
4515
4524
  _initialize(context) {
4516
4525
  this._workflowPanelUiSource.next(context?.WorkflowPanelUi);
4517
4526
  this._isSearchPanelSource.next(context?.Setting?.IsSearchPanel);
@@ -4714,12 +4723,28 @@ class FormPanelService extends BaseComponent {
4714
4723
  DoLayout: this._doLayout.bind(this),
4715
4724
  MaskChanged: this._maskChanged.bind(this),
4716
4725
  ForceClose: this._forceClose.bind(this),
4717
- Refresh: this._refresh.bind(this)
4726
+ Refresh: this._refresh.bind(this),
4727
+ ShowInfoBar: this._showInfobar.bind(this),
4728
+ HideInfoBar: this.hideInfoBar.bind(this)
4718
4729
  });
4719
4730
  context.toolbar.on({
4720
4731
  ToolbarItemsChanged: this._toolbarItemsChanged.bind(this)
4721
4732
  });
4722
4733
  }
4734
+ _showInfobar(id, text, type, buttons, handler, icon) {
4735
+ const x = this._infobars$.getValue();
4736
+ this._infobars$.next([
4737
+ ...x,
4738
+ {
4739
+ id,
4740
+ text,
4741
+ type,
4742
+ buttons,
4743
+ handler,
4744
+ icon: !icon ? `/assets/Images/InfoBar/${type}_24.png` : icon
4745
+ }
4746
+ ]);
4747
+ }
4723
4748
  _refresh() {
4724
4749
  this._initialize(this._context);
4725
4750
  // this._prepareView(this._context.Setting.View);
@@ -6149,6 +6174,7 @@ class UlvMainService {
6149
6174
  this._newInlineEditMoSource = new BehaviorSubject(null);
6150
6175
  this._hideSearchapanelSource = new BehaviorSubject(false);
6151
6176
  this._workflowShareButtons = [];
6177
+ this._prepareMoForNewForm$ = new Subject();
6152
6178
  this.context$ = this._contextSource
6153
6179
  .asObservable()
6154
6180
  .pipe(takeUntil(this._onDestroy$), tap((context) => (this.context = context)), tap((context) => this._initialize(context)), tap((context) => this._addEventListener(context)))
@@ -6212,6 +6238,9 @@ class UlvMainService {
6212
6238
  get hidePaging$() {
6213
6239
  return this._hidePagingSource.asObservable();
6214
6240
  }
6241
+ get prepareMoForNewForm$() {
6242
+ return this._prepareMoForNewForm$.asObservable();
6243
+ }
6215
6244
  get showContextMenu$() {
6216
6245
  return this._showContextMenuSource.asObservable();
6217
6246
  }
@@ -6257,6 +6286,9 @@ class UlvMainService {
6257
6286
  get shortCuts$() {
6258
6287
  return this._shortCutsSource.asObservable();
6259
6288
  }
6289
+ prepareMoForNewForm(mo) {
6290
+ this._prepareMoForNewForm$.next(mo);
6291
+ }
6260
6292
  setShortCuts(shortCuts) {
6261
6293
  this._shortCutsSource.next(shortCuts);
6262
6294
  }
@@ -8376,6 +8408,7 @@ class FormBaseComponent extends BaseComponent {
8376
8408
  this.isSearchPanel = isSearchPanel;
8377
8409
  });
8378
8410
  this.breadCrumbs$ = this._breadcrumbService.breadcrumbs$;
8411
+ this.infobars$ = this._formPanelService.infobars$;
8379
8412
  this.canSend$ = this._formPanelService.canSend$;
8380
8413
  this.hideBreadCrumb$ = this._formPanelService.hideBreadCrumb$;
8381
8414
  this.hideClose$ = this._formPanelService.hideClose$;
@@ -8460,6 +8493,9 @@ class FormBaseComponent extends BaseComponent {
8460
8493
  }
8461
8494
  this._formPanelService.destroy();
8462
8495
  }
8496
+ onDismissInfobar(id) {
8497
+ this._formPanelService.hideInfoBar(id);
8498
+ }
8463
8499
  onClose() {
8464
8500
  this.context.fireEvent('RequestForClose', this.context);
8465
8501
  }
@@ -8662,7 +8698,8 @@ class ReportBaseComponent extends BaseComponent {
8662
8698
  this.context.on({
8663
8699
  scope: this,
8664
8700
  MoDataListChanged: this._moDataListChanged,
8665
- GridSettingChanged: this._gridSettingChanged
8701
+ GridSettingChanged: this._gridSettingChanged,
8702
+ PrepareMoForNewForm: this._prepareMoForNewForm
8666
8703
  });
8667
8704
  // in gheire faal bood chon moshkel eijad mikard
8668
8705
  // va dar ulv event baiad raise shavad
@@ -8716,6 +8753,9 @@ class ReportBaseComponent extends BaseComponent {
8716
8753
  _gridSettingChanged(setting) {
8717
8754
  this.gridSettingSource.next(setting);
8718
8755
  }
8756
+ _prepareMoForNewForm(_context, mo) {
8757
+ mo && this._ulvMainService.prepareMoForNewForm(mo);
8758
+ }
8719
8759
  _moDataListChanged(moDataList) {
8720
8760
  this._ulvMainService.reSetMoDataList(moDataList);
8721
8761
  }
@@ -8807,6 +8847,7 @@ class ReportBaseComponent extends BaseComponent {
8807
8847
  const moDataList = this.moDataList;
8808
8848
  moDataList.forEach((mo) => (mo.$IsChecked = false));
8809
8849
  this._ulvMainService.reSetMoDataList();
8850
+ this.context.fireEvent('rowselect', this.context, -1, null);
8810
8851
  }
8811
8852
  _deselect(mo, index) {
8812
8853
  mo.$IsChecked = false;
@@ -9887,7 +9928,7 @@ class ReportViewBaseComponent extends BaseComponent {
9887
9928
  this.rowIndicator = Number(columns[0].MetaFieldTypeId) === 41;
9888
9929
  }
9889
9930
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ReportViewBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
9890
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: ReportViewBaseComponent, isStandalone: false, selector: "bnrc-report-view-base", inputs: { contextView: "contextView", viewSetting: "viewSetting", allColumns: "allColumns", isCheckList: "isCheckList", simpleInlineEdit: "simpleInlineEdit", inlineEditWithoutSelection: "inlineEditWithoutSelection", hideToolbar: "hideToolbar", hideTitle: "hideTitle", toolbarButtons: "toolbarButtons", allChecked: "allChecked", moDataList: "moDataList", UlvMainCtrlr: "UlvMainCtrlr", access: "access", groupby: "groupby", selectedCount: "selectedCount", conditionalFormats: "conditionalFormats", parentHeight: "parentHeight", deviceName: "deviceName", deviceSize: "deviceSize", contextMenuItems: "contextMenuItems", columns: "columns", allowInlineEdit: "allowInlineEdit", secondaryColumns: "secondaryColumns", popin: "popin", customFieldInfo: "customFieldInfo", hasSummary: "hasSummary", hasSelected: "hasSelected", hideIcon: "hideIcon", columnsCount: "columnsCount", hideOpenIcon: "hideOpenIcon", openOnClick: "openOnClick", typeDefId: "typeDefId", reportId: "reportId", listEditViewId: "listEditViewId", typeViewId: "typeViewId", extraRelation: "extraRelation", relationList: "relationList", disableResponsive: "disableResponsive", rowItem: "rowItem", mobileOrTablet: "mobileOrTablet", inDialog: "inDialog", isMultiSelect: "isMultiSelect", fullscreen: "fullscreen", hideSearchpanel: "hideSearchpanel", newInlineEditMo: "newInlineEditMo", selectedMo: "selectedMo", inlineEditMode: "inlineEditMode", onlyInlineEdit: "onlyInlineEdit", rowHoverable: "rowHoverable", groupSummary: "groupSummary", tlbButtons: "tlbButtons", formSetting: "formSetting", disableOverflowContextMenu: "disableOverflowContextMenu", rowActivable: "rowActivable", contentDensity: "contentDensity", rtl: "rtl", showOkCancelButtons: "showOkCancelButtons", title: "title", hasInlineDeleteButton: "hasInlineDeleteButton", hasInlineEditButton: "hasInlineEditButton", contextSetting: "contextSetting", gridFreeColumnSizing: "gridFreeColumnSizing", navigationArrow: "navigationArrow", cartableTemplates: "cartableTemplates", cartableChildsMo: "cartableChildsMo", pagingSetting: "pagingSetting", containerWidth: "containerWidth" }, outputs: { columnSummary: "columnSummary", escapeKey: "escapeKey", resetWorkflowState: "resetWorkflowState", deselectAll: "deselectAll", editFormPanelCancel: "editFormPanelCancel", editFormPanelSave: "editFormPanelSave", selectNextInlineRecord: "selectNextInlineRecord", editFormPanelValueChange: "editFormPanelValueChange", ulvCommandClick: "ulvCommandClick", sortAscending: "sortAscending", workflowShareButtons: "workflowShareButtons", sortDescending: "sortDescending", filter: "filter", executeToolbarButton: "executeToolbarButton", resetGridSettings: "resetGridSettings", sortSettingsChange: "sortSettingsChange", rowCheck: "rowCheck", rowClick: "rowClick", cartableFormClosed: "cartableFormClosed", createNewMo: "createNewMo", updateMo: "updateMo", expandClick: "expandClick", trackBySelectedFn: "trackBySelectedFn", allCheckbox: "allCheckbox", mandatory: "mandatory", columnResized: "columnResized", hasDetailsInRow: "hasDetailsInRow" }, host: { properties: { "class.report-view": "this._reportView" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9931
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: ReportViewBaseComponent, isStandalone: false, selector: "bnrc-report-view-base", inputs: { contextView: "contextView", viewSetting: "viewSetting", allColumns: "allColumns", isCheckList: "isCheckList", simpleInlineEdit: "simpleInlineEdit", inlineEditWithoutSelection: "inlineEditWithoutSelection", hideToolbar: "hideToolbar", hideTitle: "hideTitle", toolbarButtons: "toolbarButtons", allChecked: "allChecked", moDataList: "moDataList", UlvMainCtrlr: "UlvMainCtrlr", access: "access", groupby: "groupby", selectedCount: "selectedCount", conditionalFormats: "conditionalFormats", parentHeight: "parentHeight", deviceName: "deviceName", deviceSize: "deviceSize", contextMenuItems: "contextMenuItems", columns: "columns", allowInlineEdit: "allowInlineEdit", secondaryColumns: "secondaryColumns", popin: "popin", customFieldInfo: "customFieldInfo", hasSummary: "hasSummary", layoutInfo: "layoutInfo", hasSelected: "hasSelected", hideIcon: "hideIcon", columnsCount: "columnsCount", hideOpenIcon: "hideOpenIcon", openOnClick: "openOnClick", typeDefId: "typeDefId", reportId: "reportId", listEditViewId: "listEditViewId", typeViewId: "typeViewId", extraRelation: "extraRelation", relationList: "relationList", disableResponsive: "disableResponsive", rowItem: "rowItem", mobileOrTablet: "mobileOrTablet", inDialog: "inDialog", isMultiSelect: "isMultiSelect", fullscreen: "fullscreen", hideSearchpanel: "hideSearchpanel", newInlineEditMo: "newInlineEditMo", selectedMo: "selectedMo", inlineEditMode: "inlineEditMode", onlyInlineEdit: "onlyInlineEdit", rowHoverable: "rowHoverable", groupSummary: "groupSummary", tlbButtons: "tlbButtons", formSetting: "formSetting", disableOverflowContextMenu: "disableOverflowContextMenu", rowActivable: "rowActivable", contentDensity: "contentDensity", rtl: "rtl", showOkCancelButtons: "showOkCancelButtons", title: "title", hasInlineDeleteButton: "hasInlineDeleteButton", hasInlineEditButton: "hasInlineEditButton", contextSetting: "contextSetting", gridFreeColumnSizing: "gridFreeColumnSizing", navigationArrow: "navigationArrow", cartableTemplates: "cartableTemplates", cartableChildsMo: "cartableChildsMo", pagingSetting: "pagingSetting", containerWidth: "containerWidth" }, outputs: { columnSummary: "columnSummary", escapeKey: "escapeKey", resetWorkflowState: "resetWorkflowState", deselectAll: "deselectAll", editFormPanelCancel: "editFormPanelCancel", editFormPanelSave: "editFormPanelSave", selectNextInlineRecord: "selectNextInlineRecord", editFormPanelValueChange: "editFormPanelValueChange", ulvCommandClick: "ulvCommandClick", sortAscending: "sortAscending", workflowShareButtons: "workflowShareButtons", sortDescending: "sortDescending", filter: "filter", executeToolbarButton: "executeToolbarButton", resetGridSettings: "resetGridSettings", sortSettingsChange: "sortSettingsChange", rowCheck: "rowCheck", rowClick: "rowClick", cartableFormClosed: "cartableFormClosed", createNewMo: "createNewMo", updateMo: "updateMo", expandClick: "expandClick", trackBySelectedFn: "trackBySelectedFn", allCheckbox: "allCheckbox", mandatory: "mandatory", columnResized: "columnResized", hasDetailsInRow: "hasDetailsInRow" }, host: { properties: { "class.report-view": "this._reportView" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9891
9932
  }
9892
9933
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ReportViewBaseComponent, decorators: [{
9893
9934
  type: Component,
@@ -9952,6 +9993,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
9952
9993
  type: Input
9953
9994
  }], hasSummary: [{
9954
9995
  type: Input
9996
+ }], layoutInfo: [{
9997
+ type: Input
9955
9998
  }], hasSelected: [{
9956
9999
  type: Input
9957
10000
  }], hideIcon: [{
@@ -14933,7 +14976,14 @@ class LeafletLongPressDirective {
14933
14976
  this.longPress = new EventEmitter(); // latlng رو به بیرون می‌ده
14934
14977
  this.sub = new Subscription();
14935
14978
  }
14936
- ngOnInit() {
14979
+ ngOnInit() { }
14980
+ ngOnChanges(changes) {
14981
+ const { map } = changes;
14982
+ if (map && map.currentValue) {
14983
+ this._initMap();
14984
+ }
14985
+ }
14986
+ _initMap() {
14937
14987
  if (!this.map) {
14938
14988
  console.error('LeafletLongPressDirective: No map instance provided.');
14939
14989
  return;
@@ -14947,7 +14997,27 @@ class LeafletLongPressDirective {
14947
14997
  this.sub.add(longPress$.subscribe((startEvent) => {
14948
14998
  const originalEvent = startEvent instanceof MouseEvent ? startEvent : startEvent.touches?.[0] || startEvent;
14949
14999
  const latlng = this.map.mouseEventToLatLng(originalEvent);
14950
- this.longPress.emit(latlng);
15000
+ const point = this.map.mouseEventToContainerPoint(originalEvent);
15001
+ let markerData = null;
15002
+ let targetMarker = null;
15003
+ // پیدا کردن مارکری که این نقطه داخلش باشه
15004
+ this.map.eachLayer((layer) => {
15005
+ if (layer instanceof L.Marker) {
15006
+ const iconEl = layer.getElement();
15007
+ if (iconEl && iconEl.contains(originalEvent.target)) {
15008
+ targetMarker = layer;
15009
+ markerData = layer.options?.data ?? null;
15010
+ }
15011
+ }
15012
+ });
15013
+ this.longPress.emit({
15014
+ latlng, // مختصات جغرافیایی
15015
+ point, // مختصات پیکسلی داخل کانتینر
15016
+ x: point.x,
15017
+ y: point.y,
15018
+ marker: targetMarker || null,
15019
+ data: markerData
15020
+ });
14951
15021
  }));
14952
15022
  // جلوگیری از contextmenu پیش‌فرض موبایل (اختیاری)
14953
15023
  container.addEventListener('contextmenu', (evt) => evt.preventDefault());
@@ -14956,7 +15026,7 @@ class LeafletLongPressDirective {
14956
15026
  this.sub.unsubscribe();
14957
15027
  }
14958
15028
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: LeafletLongPressDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
14959
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: LeafletLongPressDirective, isStandalone: false, selector: "[leafletLongPress]", inputs: { map: ["leafletLongPress", "map"], longPressDuration: "longPressDuration" }, outputs: { longPress: "longPress" }, ngImport: i0 }); }
15029
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: LeafletLongPressDirective, isStandalone: false, selector: "[leafletLongPress]", inputs: { map: ["leafletLongPress", "map"], longPressDuration: "longPressDuration" }, outputs: { longPress: "longPress" }, usesOnChanges: true, ngImport: i0 }); }
14960
15030
  }
14961
15031
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: LeafletLongPressDirective, decorators: [{
14962
15032
  type: Directive,