barsa-novin-ray-core 2.3.110 → 2.3.112

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.
@@ -1426,7 +1426,6 @@ function _calcWidthOfTh(column, i, propName, thList) {
1426
1426
  if (fieldTypeId === 6 || fieldTypeId === 5 || isPicture) {
1427
1427
  return isPicture ? '48px' : '32px';
1428
1428
  }
1429
- debugger;
1430
1429
  }
1431
1430
  return column.$IsImageOricon && i < thList.length - 1 ? '42px' : column[propName];
1432
1431
  }
@@ -1686,9 +1685,9 @@ function compareVersions(v1, v2) {
1686
1685
  const score1 = getVersionScore(v1);
1687
1686
  const score2 = getVersionScore(v2);
1688
1687
  // ۳. مقایسه اعداد نهایی
1689
- if (score1 > score2)
1690
- return 1;
1691
1688
  if (score1 < score2)
1689
+ return 1;
1690
+ if (score1 > score2)
1692
1691
  return -1;
1693
1692
  return 0;
1694
1693
  }
@@ -5490,7 +5489,7 @@ class ApplicationCtrlrService {
5490
5489
  // console.error(`system data for systemid ${systemId} not found.`);
5491
5490
  return;
5492
5491
  }
5493
- if (this.deviceSize !== 's' && this.deviceSize !== 'm') {
5492
+ if (this.deviceSize !== 's' && this.deviceSize !== 'm' && this.deviceSize !== 'l') {
5494
5493
  this.sidebarToggled(true);
5495
5494
  }
5496
5495
  this._selectedSystemTitle$.next(systemData.Caption);
@@ -17238,37 +17237,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
17238
17237
  class SplitterComponent extends BaseComponent {
17239
17238
  constructor() {
17240
17239
  super(...arguments);
17240
+ this.emptyClass = true;
17241
+ this.isBig = false;
17241
17242
  this._renderer = inject(Renderer2);
17242
17243
  this._portalService = inject(PortalService);
17243
17244
  }
17244
17245
  ngOnInit() {
17245
17246
  super.ngOnInit();
17247
+ if (this.config) {
17248
+ const { Bounds, MaxSize } = this.config;
17249
+ this.elHeight = Bounds.height;
17250
+ if (this.elHeight > 30) {
17251
+ this.isBig = true;
17252
+ }
17253
+ this.flex = Bounds.width;
17254
+ if (MaxSize.width > 0) {
17255
+ this.elMaxWidth = MaxSize.width;
17256
+ }
17257
+ }
17246
17258
  const mousedown$ = fromEvent(this.el.nativeElement, 'mousedown');
17247
17259
  const mousemove$ = fromEvent(document, 'mousemove');
17248
17260
  const mouseup$ = fromEvent(document, 'mouseup');
17249
17261
  mousedown$
17250
17262
  .pipe(tap$1((event) => {
17251
17263
  event.preventDefault();
17252
- this.toggleResizingState(true);
17264
+ let nextElementSibling = this.el.nativeElement.nextElementSibling;
17265
+ while (nextElementSibling &&
17266
+ nextElementSibling.tagName.toLocaleLowerCase() === 'bnrc-dynamic-layout') {
17267
+ nextElementSibling &&
17268
+ nextElementSibling.nextElementSibling &&
17269
+ (nextElementSibling = nextElementSibling.nextElementSibling);
17270
+ }
17271
+ this.toggleResizingState(true, nextElementSibling);
17253
17272
  }), switchMap(() => {
17254
17273
  // تشخیص جهت در لحظه شروع درگ
17255
17274
  const isRtl = getComputedStyle(this.el.nativeElement).direction === 'rtl';
17256
- let sibling = this.el.nativeElement.previousElementSibling;
17257
- while (sibling.tagName.toLocaleLowerCase() === 'bnrc-dynamic-layout') {
17258
- sibling &&
17259
- sibling.previousElementSibling &&
17260
- (sibling = sibling.previousElementSibling);
17261
- }
17262
- const initialRect = sibling?.getBoundingClientRect();
17275
+ let previousElementSibling = this.el.nativeElement.previousElementSibling;
17276
+ while (previousElementSibling &&
17277
+ previousElementSibling.tagName.toLocaleLowerCase() === 'bnrc-dynamic-layout') {
17278
+ previousElementSibling &&
17279
+ previousElementSibling.previousElementSibling &&
17280
+ (previousElementSibling = previousElementSibling.previousElementSibling);
17281
+ }
17282
+ let nextElementSibling = this.el.nativeElement.nextElementSibling;
17283
+ while (nextElementSibling &&
17284
+ nextElementSibling.tagName.toLocaleLowerCase() === 'bnrc-dynamic-layout') {
17285
+ nextElementSibling &&
17286
+ nextElementSibling.nextElementSibling &&
17287
+ (nextElementSibling = nextElementSibling.nextElementSibling);
17288
+ }
17289
+ const initialRect = previousElementSibling?.getBoundingClientRect();
17263
17290
  return mousemove$.pipe(tap$1((event) => {
17264
- if (sibling && initialRect) {
17265
- this.calculateAndSetWidth(event, sibling, initialRect, isRtl);
17291
+ if (previousElementSibling && initialRect) {
17292
+ this.calculateAndSetWidth(event, previousElementSibling, nextElementSibling, initialRect, isRtl);
17266
17293
  }
17267
- }), takeUntil$1(mouseup$.pipe(tap$1(() => this.toggleResizingState(false)))));
17294
+ }), takeUntil$1(mouseup$.pipe(tap$1(() => this.toggleResizingState(false, nextElementSibling)))));
17268
17295
  }), takeUntil$1(this._onDestroy$))
17269
17296
  .subscribe();
17270
17297
  }
17271
- calculateAndSetWidth(event, sibling, rect, isRtl) {
17298
+ calculateAndSetWidth(event, sibling, nextSibling, rect, isRtl) {
17272
17299
  let newWidth;
17273
17300
  if (isRtl) {
17274
17301
  // در RTL: فاصله لبه راستِ المنت تا موقعیت ماوس
@@ -17279,28 +17306,74 @@ class SplitterComponent extends BaseComponent {
17279
17306
  newWidth = event.clientX - rect.left;
17280
17307
  }
17281
17308
  if ((!this.minWidth || newWidth >= this.minWidth) && (!this.maxWidth || newWidth <= this.maxWidth)) {
17309
+ this._renderer.setStyle(nextSibling, 'overflow', `hidden`);
17282
17310
  this._renderer.setStyle(sibling, 'width', `${newWidth}px`);
17283
17311
  this._renderer.setStyle(sibling, 'flex', 'none');
17284
17312
  }
17285
17313
  }
17286
- toggleResizingState(isResizing) {
17314
+ toggleResizingState(isResizing, nextSibling) {
17287
17315
  const action = isResizing ? 'addClass' : 'removeClass';
17288
17316
  this._renderer[action](document.body, 'resizing-active');
17289
17317
  this._renderer[action](this.el.nativeElement, 'is-resizing');
17290
17318
  if (!isResizing) {
17319
+ this._renderer.removeClass(nextSibling, 'tw-overflow-hidden');
17291
17320
  this._portalService.windowResize();
17292
17321
  }
17322
+ else {
17323
+ this._renderer.addClass(nextSibling, 'tw-overflow-hidden');
17324
+ }
17293
17325
  }
17294
17326
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SplitterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
17295
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: SplitterComponent, isStandalone: false, selector: "bnrc-splitter", inputs: { minWidth: "minWidth", maxWidth: "maxWidth" }, usesInheritance: true, ngImport: i0, template: `<div class="splitter-line"></div>`, isInline: true, styles: [":host{width:8px;cursor:col-resize;z-index:50;display:flex;justify-content:center;-webkit-user-select:none;user-select:none;transition:background-color .2s}:host:hover,.is-resizing{background-color:#3b82f61a}.splitter-line{width:2px;height:100%;background-color:#e2e8f0}:host:hover .splitter-line,.is-resizing .splitter-line{background-color:#3b82f6;width:4px}\n"] }); }
17327
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: SplitterComponent, isStandalone: false, selector: "bnrc-splitter", inputs: { minWidth: "minWidth", maxWidth: "maxWidth", config: "config" }, host: { properties: { "class.empty-space": "this.emptyClass", "class.big": "this.isBig", "style.flex": "this.flex", "style.max-width.px": "this.elMaxWidth", "style.height.px": "this.elHeight" } }, usesInheritance: true, ngImport: i0, template: `<div class="splitter-container">
17328
+ <div class="splitter-line"></div>
17329
+ <div class="grip-handle">
17330
+ <svg viewBox="0 0 24 24" fill="currentColor">
17331
+ <circle cx="9" cy="8" r="1.5" />
17332
+ <circle cx="15" cy="8" r="1.5" />
17333
+ <circle cx="9" cy="12" r="1.5" />
17334
+ <circle cx="15" cy="12" r="1.5" />
17335
+ <circle cx="9" cy="16" r="1.5" />
17336
+ <circle cx="15" cy="16" r="1.5" />
17337
+ </svg>
17338
+ </div>
17339
+ </div>`, isInline: true, styles: [":host{display:flex;align-items:center;justify-content:center;width:12px;cursor:col-resize;z-index:50;-webkit-user-select:none;user-select:none;position:relative}.splitter-container{height:100%;width:100%;display:flex;align-items:center;justify-content:center;position:relative}.splitter-line{width:1px;height:90%;background:linear-gradient(to bottom,transparent 0%,rgba(203,213,225,1) 15%,rgba(203,213,225,1) 85%,transparent 100%);transition:all .2s}.grip-handle{position:absolute;width:24px;height:32px;background:#fff;border:1px solid #e2e8f0;border-radius:6px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px #0000000d;transition:all .2s;color:#94a3b8}.grip-handle svg{width:14px;height:14px}:host:hover .splitter-line,.is-resizing .splitter-line{background:linear-gradient(to bottom,transparent 0%,#3b82f6 15%,#3b82f6 85%,transparent 100%);width:2px}:host:hover .grip-handle,.is-resizing .grip-handle{border-color:#3b82f6;color:#3b82f6;box-shadow:0 4px 6px -1px #3b82f633;transform:scale(1.05)}\n"] }); }
17296
17340
  }
17297
17341
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SplitterComponent, decorators: [{
17298
17342
  type: Component,
17299
- args: [{ selector: 'bnrc-splitter', standalone: false, template: `<div class="splitter-line"></div>`, styles: [":host{width:8px;cursor:col-resize;z-index:50;display:flex;justify-content:center;-webkit-user-select:none;user-select:none;transition:background-color .2s}:host:hover,.is-resizing{background-color:#3b82f61a}.splitter-line{width:2px;height:100%;background-color:#e2e8f0}:host:hover .splitter-line,.is-resizing .splitter-line{background-color:#3b82f6;width:4px}\n"] }]
17300
- }], propDecorators: { minWidth: [{
17343
+ args: [{ selector: 'bnrc-splitter', standalone: false, template: `<div class="splitter-container">
17344
+ <div class="splitter-line"></div>
17345
+ <div class="grip-handle">
17346
+ <svg viewBox="0 0 24 24" fill="currentColor">
17347
+ <circle cx="9" cy="8" r="1.5" />
17348
+ <circle cx="15" cy="8" r="1.5" />
17349
+ <circle cx="9" cy="12" r="1.5" />
17350
+ <circle cx="15" cy="12" r="1.5" />
17351
+ <circle cx="9" cy="16" r="1.5" />
17352
+ <circle cx="15" cy="16" r="1.5" />
17353
+ </svg>
17354
+ </div>
17355
+ </div>`, styles: [":host{display:flex;align-items:center;justify-content:center;width:12px;cursor:col-resize;z-index:50;-webkit-user-select:none;user-select:none;position:relative}.splitter-container{height:100%;width:100%;display:flex;align-items:center;justify-content:center;position:relative}.splitter-line{width:1px;height:90%;background:linear-gradient(to bottom,transparent 0%,rgba(203,213,225,1) 15%,rgba(203,213,225,1) 85%,transparent 100%);transition:all .2s}.grip-handle{position:absolute;width:24px;height:32px;background:#fff;border:1px solid #e2e8f0;border-radius:6px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px #0000000d;transition:all .2s;color:#94a3b8}.grip-handle svg{width:14px;height:14px}:host:hover .splitter-line,.is-resizing .splitter-line{background:linear-gradient(to bottom,transparent 0%,#3b82f6 15%,#3b82f6 85%,transparent 100%);width:2px}:host:hover .grip-handle,.is-resizing .grip-handle{border-color:#3b82f6;color:#3b82f6;box-shadow:0 4px 6px -1px #3b82f633;transform:scale(1.05)}\n"] }]
17356
+ }], propDecorators: { emptyClass: [{
17357
+ type: HostBinding,
17358
+ args: ['class.empty-space']
17359
+ }], isBig: [{
17360
+ type: HostBinding,
17361
+ args: ['class.big']
17362
+ }], flex: [{
17363
+ type: HostBinding,
17364
+ args: ['style.flex']
17365
+ }], elMaxWidth: [{
17366
+ type: HostBinding,
17367
+ args: ['style.max-width.px']
17368
+ }], elHeight: [{
17369
+ type: HostBinding,
17370
+ args: ['style.height.px']
17371
+ }], minWidth: [{
17301
17372
  type: Input
17302
17373
  }], maxWidth: [{
17303
17374
  type: Input
17375
+ }], config: [{
17376
+ type: Input
17304
17377
  }] } });
17305
17378
 
17306
17379
  class BaseUlvSettingComponent extends BaseComponent {