barsa-user-workspace 2.3.102 → 2.3.104

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.
@@ -54,7 +54,7 @@ function cloneLayoutItem(layoutItem) {
54
54
  y: layoutItem.y,
55
55
  id: layoutItem.id,
56
56
  moved: !!layoutItem.moved,
57
- static: !!layoutItem.static,
57
+ static: !!layoutItem.static
58
58
  };
59
59
  if (layoutItem.minW !== undefined) {
60
60
  clonedLayoutItem.minW = layoutItem.minW;
@@ -138,7 +138,7 @@ function resolveCompactionCollision(layout, item, moveToCoord, axis) {
138
138
  const sizeProp = heightWidth[axis];
139
139
  item[axis] += 1;
140
140
  const itemIndex = layout
141
- .map(layoutItem => {
141
+ .map((layoutItem) => {
142
142
  return layoutItem.id;
143
143
  })
144
144
  .indexOf(item.id);
@@ -270,7 +270,7 @@ function getFirstCollision(layout, layoutItem) {
270
270
  return null;
271
271
  }
272
272
  function getAllCollisions(layout, layoutItem) {
273
- return layout.filter(l => collides(l, layoutItem));
273
+ return layout.filter((l) => collides(l, layoutItem));
274
274
  }
275
275
  /**
276
276
  * Get all static elements.
@@ -278,7 +278,7 @@ function getAllCollisions(layout, layoutItem) {
278
278
  * @return {Array} Array of static layout items..
279
279
  */
280
280
  function getStatics(layout) {
281
- return layout.filter(l => l.static);
281
+ return layout.filter((l) => l.static);
282
282
  }
283
283
  /**
284
284
  * Move an element. Responsible for doing cascading movements of other elements.
@@ -370,15 +370,11 @@ function moveElementAwayFromCollision(layout, collidesWith, itemToMove, isUserAc
370
370
  isUserAction = false;
371
371
  // Make a mock item so we don't modify the item here, only modify in moveElement.
372
372
  const fakeItem = {
373
- x: compactH
374
- ? Math.max(collidesWith.x - itemToMove.w, 0)
375
- : itemToMove.x,
376
- y: compactV
377
- ? Math.max(collidesWith.y - itemToMove.h, 0)
378
- : itemToMove.y,
373
+ x: compactH ? Math.max(collidesWith.x - itemToMove.w, 0) : itemToMove.x,
374
+ y: compactV ? Math.max(collidesWith.y - itemToMove.h, 0) : itemToMove.y,
379
375
  w: itemToMove.w,
380
376
  h: itemToMove.h,
381
- id: '-1',
377
+ id: '-1'
382
378
  };
383
379
  // No collision? If so, we can go up there; otherwise, we'll end up moving down as normal
384
380
  if (!getFirstCollision(layout, fakeItem)) {
@@ -408,7 +404,7 @@ function setTransform({ top, left, width, height }) {
408
404
  OTransform: translate,
409
405
  width: `${width}px`,
410
406
  height: `${height}px`,
411
- position: 'absolute',
407
+ position: 'absolute'
412
408
  };
413
409
  }
414
410
  function setTopLeft({ top, left, width, height }) {
@@ -417,7 +413,7 @@ function setTopLeft({ top, left, width, height }) {
417
413
  left: `${left}px`,
418
414
  width: `${width}px`,
419
415
  height: `${height}px`,
420
- position: 'absolute',
416
+ position: 'absolute'
421
417
  };
422
418
  }
423
419
  /**
@@ -470,34 +466,20 @@ function validateLayout(layout, contextName = 'Layout') {
470
466
  const item = layout[i];
471
467
  for (let j = 0; j < subProps.length; j++) {
472
468
  if (typeof item[subProps[j]] !== 'number') {
473
- throw new Error('ReactGridLayout: ' +
474
- contextName +
475
- '[' +
476
- i +
477
- '].' +
478
- subProps[j] +
479
- ' must be a number!');
469
+ throw new Error('ReactGridLayout: ' + contextName + '[' + i + '].' + subProps[j] + ' must be a number!');
480
470
  }
481
471
  }
482
472
  if (item.id && typeof item.id !== 'string') {
483
- throw new Error('ReactGridLayout: ' +
484
- contextName +
485
- '[' +
486
- i +
487
- '].i must be a string!');
473
+ throw new Error('ReactGridLayout: ' + contextName + '[' + i + '].i must be a string!');
488
474
  }
489
475
  if (item.static !== undefined && typeof item.static !== 'boolean') {
490
- throw new Error('ReactGridLayout: ' +
491
- contextName +
492
- '[' +
493
- i +
494
- '].static must be a boolean!');
476
+ throw new Error('ReactGridLayout: ' + contextName + '[' + i + '].static must be a boolean!');
495
477
  }
496
478
  }
497
479
  }
498
480
  // Flow can't really figure this out, so we just use Object
499
481
  function autoBindHandlers(el, fns) {
500
- fns.forEach(key => (el[key] = el[key].bind(el)));
482
+ fns.forEach((key) => (el[key] = el[key].bind(el)));
501
483
  }
502
484
  function log(...args) {
503
485
  if (!DEBUG) {
@@ -2117,7 +2099,6 @@ class NavContainerComponent extends BaseComponent {
2117
2099
  this._router = inject(Router);
2118
2100
  }
2119
2101
  onTabSelect(e) {
2120
- console.log(e);
2121
2102
  if (e.label === 'صفحه اصلی') {
2122
2103
  this._router.navigate(['/home']);
2123
2104
  }
@@ -2226,7 +2207,6 @@ class LayoutContainerComponent extends BaseComponent {
2226
2207
  this.isResizing = false;
2227
2208
  }
2228
2209
  onLayoutUpdated(layout) {
2229
- console.log('on layout updated', layout);
2230
2210
  this.layout = layout;
2231
2211
  }
2232
2212
  onAutoScrollChange(checked) {
@@ -2279,7 +2259,6 @@ class LayoutContainerComponent extends BaseComponent {
2279
2259
  });
2280
2260
  }
2281
2261
  this.layout = ktdGridCompact(layout, this.compactType, this.cols);
2282
- console.log('generateLayout', this.layout);
2283
2262
  }
2284
2263
  /** Adds a grid item to the layout */
2285
2264
  addItemToLayout() {
@@ -2326,7 +2305,7 @@ class LayoutContainerComponent extends BaseComponent {
2326
2305
  return this.gridBackgroundConfig?.show ?? 'never';
2327
2306
  }
2328
2307
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: LayoutContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2329
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: LayoutContainerComponent, isStandalone: false, selector: "buw-layout-container", inputs: { layout: "layout", moDataList: "moDataList" }, providers: [], viewQueries: [{ propertyName: "grid", first: true, predicate: KtdGridComponent, descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div style=\"position: relative\" dir=\"ltr\" fillEmptySpace [setMinHeight]=\"true\">\r\n <buw-grid\r\n [cols]=\"cols\"\r\n [backgroundConfig]=\"gridBackgroundConfig\"\r\n [height]=\"rowHeightFit && gridHeight ? gridHeight : null\"\r\n [rowHeight]=\"rowHeightFit ? 'fit' : rowHeight\"\r\n [layout]=\"layout\"\r\n [compactType]=\"compactType\"\r\n [preventCollision]=\"preventCollision\"\r\n [scrollableParent]=\"autoScroll ? document : null\"\r\n [gap]=\"gap\"\r\n [scrollSpeed]=\"4\"\r\n (dragStarted)=\"onDragStarted($event)\"\r\n (resizeStarted)=\"onResizeStarted($event)\"\r\n (dragEnded)=\"onDragEnded($event)\"\r\n (resizeEnded)=\"onResizeEnded($event)\"\r\n (layoutUpdated)=\"onLayoutUpdated($event)\"\r\n >\r\n <buw-grid-item\r\n *ngFor=\"let item of layout; trackBy: trackById; let i = index\"\r\n [id]=\"item.id\"\r\n [transition]=\"currentTransition\"\r\n [dragStartThreshold]=\"dragStartThreshold\"\r\n [draggable]=\"!disableDrag\"\r\n [resizable]=\"!disableResize\"\r\n >\r\n <div class=\"grid-item-content\">\r\n @if(moDataList?.length && moDataList[i]?.EjrayOlgo ){\r\n <bnrc-dynamic-item-component [component]=\"moDataList[i].EjrayOlgo\"> </bnrc-dynamic-item-component>\r\n }\r\n \r\n </div>\r\n <div\r\n class=\"grid-item-remove-handle\"\r\n *ngIf=\"!disableRemove\"\r\n (mousedown)=\"stopEventPropagation($event)\"\r\n (click)=\"removeItem(item.id)\"\r\n ></div>\r\n <ng-template *ngIf=\"currentPlaceholder !== 'Default'\" buwGridItemPlaceholder>\r\n <div\r\n *ngIf=\"currentPlaceholder === 'Custom 1'\"\r\n class=\"grid-item-content custom-placeholder custom-placeholder-1\"\r\n >\r\n {{ item.id }}\r\n </div>\r\n <div\r\n *ngIf=\"currentPlaceholder === 'Custom 2'\"\r\n class=\"grid-item-content custom-placeholder custom-placeholder-2\"\r\n >\r\n {{ item.id }}\r\n </div>\r\n <div\r\n *ngIf=\"currentPlaceholder === 'Custom 3'\"\r\n class=\"grid-item-content custom-placeholder custom-placeholder-3\"\r\n >\r\n {{ item.id }}\r\n </div>\r\n </ng-template>\r\n </buw-grid-item>\r\n </buw-grid>\r\n</div>\r\n", styles: [":host{display:block}:host ::ng-deep .grid-item-content{box-sizing:border-box;background:#ccc;border:1px solid;width:100%;height:100%;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}:host ::ng-deep .grid-item-remove-handle{position:absolute;cursor:pointer;display:flex;justify-content:center;width:20px;height:20px;top:0;right:0}:host ::ng-deep .grid-item-remove-handle:after{content:\"x\";color:#121212;font-size:16px;font-weight:300;font-family:Arial,sans-serif}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.DynamicItemComponent, selector: "bnrc-dynamic-item-component", inputs: ["mo", "allColumns", "moDataList", "columns", "column", "index", "last", "hideOpenIcon", "deviceName", "deviceSize", "rtl", "editMode", "setting", "parameters", "contextMenuItems", "canView", "showRowNumber", "rowNumber", "formSetting", "conditionalFormats", "disableOverflowContextMenu", "navigationArrow", "isCheckList", "fields", "isChecked", "layout94$", "inlineEditMode", "isNewInlineMo", "allowInlineEdit", "typeDefId", "rowIndicator", "rowIndicatorColor", "UlvMainCtrlr"] }, { kind: "directive", type: i2.FillEmptySpaceDirective, selector: "[fillEmptySpace]", inputs: ["containerDom", "decrement", "disable", "height", "dontUseTopBound", "setMinHeight"], outputs: ["heightChanged"], exportAs: ["fillEmptySpace"] }, { kind: "component", type: KtdGridComponent, selector: "buw-grid", inputs: ["scrollableParent", "compactOnPropsChange", "preventCollision", "scrollSpeed", "compactType", "rowHeight", "cols", "layout", "gap", "height", "backgroundConfig"], outputs: ["layoutUpdated", "dragStarted", "resizeStarted", "dragEnded", "resizeEnded", "gridItemResize"] }, { kind: "component", type: KtdGridItemComponent, selector: "buw-grid-item", inputs: ["minW", "minH", "maxW", "maxH", "transition", "id", "dragStartThreshold", "draggable", "resizable"] }, { kind: "directive", type: KtdGridItemPlaceholder, selector: "ng-template[buwGridItemPlaceholder]", inputs: ["data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2308
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: LayoutContainerComponent, isStandalone: false, selector: "buw-layout-container", inputs: { layout: "layout", moDataList: "moDataList" }, providers: [], viewQueries: [{ propertyName: "grid", first: true, predicate: KtdGridComponent, descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div style=\"position: relative\" dir=\"ltr\" fillEmptySpace [setMinHeight]=\"true\">\r\n <buw-grid\r\n [cols]=\"cols\"\r\n [backgroundConfig]=\"gridBackgroundConfig\"\r\n [height]=\"rowHeightFit && gridHeight ? gridHeight : null\"\r\n [rowHeight]=\"rowHeightFit ? 'fit' : rowHeight\"\r\n [layout]=\"layout\"\r\n [compactType]=\"compactType\"\r\n [preventCollision]=\"preventCollision\"\r\n [scrollableParent]=\"autoScroll ? document : null\"\r\n [gap]=\"gap\"\r\n [scrollSpeed]=\"4\"\r\n (dragStarted)=\"onDragStarted($event)\"\r\n (resizeStarted)=\"onResizeStarted($event)\"\r\n (dragEnded)=\"onDragEnded($event)\"\r\n (resizeEnded)=\"onResizeEnded($event)\"\r\n (layoutUpdated)=\"onLayoutUpdated($event)\"\r\n >\r\n <buw-grid-item\r\n *ngFor=\"let item of layout; trackBy: trackById; let i = index\"\r\n [id]=\"item.id\"\r\n [transition]=\"currentTransition\"\r\n [dragStartThreshold]=\"dragStartThreshold\"\r\n [draggable]=\"!disableDrag\"\r\n [resizable]=\"!disableResize\"\r\n >\r\n <div class=\"grid-item-content\">\r\n @if(moDataList?.length && moDataList[i]?.EjrayOlgo ){\r\n <bnrc-dynamic-item-component [component]=\"moDataList[i].EjrayOlgo\"> </bnrc-dynamic-item-component>\r\n }\r\n \r\n </div>\r\n <div\r\n class=\"grid-item-remove-handle\"\r\n *ngIf=\"!disableRemove\"\r\n (mousedown)=\"stopEventPropagation($event)\"\r\n (click)=\"removeItem(item.id)\"\r\n ></div>\r\n <ng-template *ngIf=\"currentPlaceholder !== 'Default'\" buwGridItemPlaceholder>\r\n <div\r\n *ngIf=\"currentPlaceholder === 'Custom 1'\"\r\n class=\"grid-item-content custom-placeholder custom-placeholder-1\"\r\n >\r\n {{ item.id }}\r\n </div>\r\n <div\r\n *ngIf=\"currentPlaceholder === 'Custom 2'\"\r\n class=\"grid-item-content custom-placeholder custom-placeholder-2\"\r\n >\r\n {{ item.id }}\r\n </div>\r\n <div\r\n *ngIf=\"currentPlaceholder === 'Custom 3'\"\r\n class=\"grid-item-content custom-placeholder custom-placeholder-3\"\r\n >\r\n {{ item.id }}\r\n </div>\r\n </ng-template>\r\n </buw-grid-item>\r\n </buw-grid>\r\n</div>\r\n", styles: [":host{display:block}:host ::ng-deep .grid-item-content{box-sizing:border-box;background:#ccc;border:1px solid;width:100%;height:100%;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}:host ::ng-deep .grid-item-remove-handle{position:absolute;cursor:pointer;display:flex;justify-content:center;width:20px;height:20px;top:0;right:0}:host ::ng-deep .grid-item-remove-handle:after{content:\"x\";color:#121212;font-size:16px;font-weight:300;font-family:Arial,sans-serif}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.DynamicItemComponent, selector: "bnrc-dynamic-item-component", inputs: ["mo", "allColumns", "moDataList", "columns", "column", "index", "last", "hideOpenIcon", "deviceName", "deviceSize", "rtl", "editMode", "setting", "parameters", "contextMenuItems", "canView", "showRowNumber", "rowNumber", "formSetting", "conditionalFormats", "disableOverflowContextMenu", "navigationArrow", "isCheckList", "maxHeightHeader", "fields", "isChecked", "layout94$", "inlineEditMode", "isNewInlineMo", "allowInlineEdit", "typeDefId", "rowIndicator", "rowIndicatorColor", "UlvMainCtrlr"] }, { kind: "directive", type: i2.FillEmptySpaceDirective, selector: "[fillEmptySpace]", inputs: ["containerDom", "decrement", "disable", "height", "dontUseTopBound", "setMinHeight"], outputs: ["heightChanged"], exportAs: ["fillEmptySpace"] }, { kind: "component", type: KtdGridComponent, selector: "buw-grid", inputs: ["scrollableParent", "compactOnPropsChange", "preventCollision", "scrollSpeed", "compactType", "rowHeight", "cols", "layout", "gap", "height", "backgroundConfig"], outputs: ["layoutUpdated", "dragStarted", "resizeStarted", "dragEnded", "resizeEnded", "gridItemResize"] }, { kind: "component", type: KtdGridItemComponent, selector: "buw-grid-item", inputs: ["minW", "minH", "maxW", "maxH", "transition", "id", "dragStartThreshold", "draggable", "resizable"] }, { kind: "directive", type: KtdGridItemPlaceholder, selector: "ng-template[buwGridItemPlaceholder]", inputs: ["data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2330
2309
  }
2331
2310
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: LayoutContainerComponent, decorators: [{
2332
2311
  type: Component,