raise-common-lib 0.0.215 → 0.0.217
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/README.md +57 -57
- package/bundles/raise-common-lib.umd.js +14 -98
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/common-grid/index.component.js +5 -2
- package/esm2015/lib/dialog/common-dialog/index.component.js +6 -2
- package/esm2015/lib/float-box/index.component.js +6 -97
- package/esm5/lib/common-grid/index.component.js +5 -2
- package/esm5/lib/dialog/common-dialog/index.component.js +6 -2
- package/esm5/lib/float-box/index.component.js +6 -97
- package/fesm2015/raise-common-lib.js +14 -98
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +14 -98
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/common-grid/index.component.d.ts +1 -0
- package/lib/dialog/common-dialog/index.component.d.ts +1 -0
- package/lib/float-box/index.component.d.ts +0 -1
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
- package/src/assets/img/arrow_right.svg +4 -4
- package/src/assets/img/calendar-disabled.svg +6 -6
- package/src/assets/img/calendar.svg +6 -6
- package/src/assets/img/calendar_arrow_left.svg +3 -3
- package/src/assets/img/calendar_arrow_right.svg +3 -3
- package/src/assets/img/checked-vector.svg +3 -3
- package/src/assets/img/dialog-close.svg +4 -4
- package/src/assets/img/dialog-grow.svg +6 -6
- package/src/assets/img/dialog-shrink.svg +6 -6
- package/src/assets/img/plus.svg +4 -4
- package/src/assets/img/search.svg +4 -4
- package/src/assets/img/shrink-icon.svg +6 -6
- package/src/assets/img/time-disabled.svg +4 -4
- package/src/assets/img/time.svg +4 -4
- package/src/assets/img/toolbar-action-addFolder.svg +17 -17
- package/src/assets/img/toolbar-action-calculator.svg +11 -11
- package/src/assets/img/toolbar-action-collapse.svg +7 -7
- package/src/assets/img/toolbar-action-combine.svg +4 -4
- package/src/assets/img/toolbar-action-edit.svg +4 -4
- package/src/assets/img/toolbar-action-expand.svg +7 -7
- package/src/assets/img/toolbar-action-folderMove.svg +8 -8
- package/src/assets/img/toolbar-action-lock.svg +6 -6
- package/src/assets/img/toolbar-action-preview.svg +7 -7
- package/src/assets/img/toolbar-action-publish.svg +5 -5
- package/src/assets/img/toolbar-action-reminders.svg +10 -10
- package/src/assets/img/toolbar-action-rename.svg +7 -7
- package/src/assets/img/toolbar-action-saveSequence.svg +5 -5
- package/src/assets/img/toolbar-action-send-file.svg +5 -5
- package/src/assets/img/toolbar-action-settle.svg +7 -7
- package/src/assets/img/toolbar-action-share.svg +5 -5
- package/src/assets/img/toolbar-action-submitForApproval.svg +4 -4
- package/src/assets/img/toolbar-action-sync.svg +4 -4
- package/src/assets/img/toolbar-action-template.svg +6 -6
- package/src/assets/img/toolbar-action-workflow.svg +9 -9
package/README.md
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
# RaiseCommonLib
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
|
|
4
|
-
|
|
5
|
-
## Build
|
|
6
|
-
|
|
7
|
-
Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
8
|
-
|
|
9
|
-
## Publishing
|
|
10
|
-
|
|
11
|
-
After building your library with `npm run build`, go to the dist folder `cd dist/raise-common-lib` and run `npm publish`.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
- ### Install
|
|
15
|
-
```bash
|
|
16
|
-
$ npm install raise-common-lib
|
|
17
|
-
```
|
|
18
|
-
- ### Set **angular.json**
|
|
19
|
-
```json
|
|
20
|
-
"projects": {
|
|
21
|
-
"lpInvestor": {
|
|
22
|
-
"projectType": "application",
|
|
23
|
-
"architect": {
|
|
24
|
-
"build": {
|
|
25
|
-
"options": {
|
|
26
|
-
...
|
|
27
|
-
"assets": [
|
|
28
|
-
...
|
|
29
|
-
{
|
|
30
|
-
"glob": "**/*",
|
|
31
|
-
"input": "node_modules/raise-common-lib/src/assets/",
|
|
32
|
-
"output": "/assets/"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"styles": [
|
|
36
|
-
...
|
|
37
|
-
"node_modules/raise-common-lib/src/assets/style/styles.scss",
|
|
38
|
-
"src/styles.scss",
|
|
39
|
-
],
|
|
40
|
-
}
|
|
41
|
-
...
|
|
42
|
-
...
|
|
43
|
-
...
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
- ### Import Module
|
|
47
|
-
```tsx
|
|
48
|
-
//app.module.ts
|
|
49
|
-
|
|
50
|
-
import { RaiseCommonLibModule } from "raise-common-lib";
|
|
51
|
-
|
|
52
|
-
@NgModule({
|
|
53
|
-
imports: [
|
|
54
|
-
...
|
|
55
|
-
RaiseCommonLibModule
|
|
56
|
-
],
|
|
57
|
-
```
|
|
1
|
+
# RaiseCommonLib
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
|
|
4
|
+
|
|
5
|
+
## Build
|
|
6
|
+
|
|
7
|
+
Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
8
|
+
|
|
9
|
+
## Publishing
|
|
10
|
+
|
|
11
|
+
After building your library with `npm run build`, go to the dist folder `cd dist/raise-common-lib` and run `npm publish`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
- ### Install
|
|
15
|
+
```bash
|
|
16
|
+
$ npm install raise-common-lib
|
|
17
|
+
```
|
|
18
|
+
- ### Set **angular.json**
|
|
19
|
+
```json
|
|
20
|
+
"projects": {
|
|
21
|
+
"lpInvestor": {
|
|
22
|
+
"projectType": "application",
|
|
23
|
+
"architect": {
|
|
24
|
+
"build": {
|
|
25
|
+
"options": {
|
|
26
|
+
...
|
|
27
|
+
"assets": [
|
|
28
|
+
...
|
|
29
|
+
{
|
|
30
|
+
"glob": "**/*",
|
|
31
|
+
"input": "node_modules/raise-common-lib/src/assets/",
|
|
32
|
+
"output": "/assets/"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"styles": [
|
|
36
|
+
...
|
|
37
|
+
"node_modules/raise-common-lib/src/assets/style/styles.scss",
|
|
38
|
+
"src/styles.scss",
|
|
39
|
+
],
|
|
40
|
+
}
|
|
41
|
+
...
|
|
42
|
+
...
|
|
43
|
+
...
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- ### Import Module
|
|
47
|
+
```tsx
|
|
48
|
+
//app.module.ts
|
|
49
|
+
|
|
50
|
+
import { RaiseCommonLibModule } from "raise-common-lib";
|
|
51
|
+
|
|
52
|
+
@NgModule({
|
|
53
|
+
imports: [
|
|
54
|
+
...
|
|
55
|
+
RaiseCommonLibModule
|
|
56
|
+
],
|
|
57
|
+
```
|
|
@@ -1188,7 +1188,7 @@
|
|
|
1188
1188
|
CommonGridComponent.decorators = [
|
|
1189
1189
|
{ type: core.Component, args: [{
|
|
1190
1190
|
selector: "rs-common-grid",
|
|
1191
|
-
template: "<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"dataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"dataSource && dataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselecting)=\"_rowDeselecting($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (rowDrop)=\"onRowDrop($event)\"\r\n (rowDragStart)=\"_rowDragStart($event)\"\r\n (rowDrag)=\"_rowDrag($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [minWidth]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [showInColumnChooser]=\"\r\n item.showInColumnChooser === undefined ? true : item.showInColumnChooser\r\n \"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer || null\"\r\n [allowResizing]=\"!last\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
|
|
1191
|
+
template: "<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"dataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"dataSource && dataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselecting)=\"_rowDeselecting($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (rowDrop)=\"onRowDrop($event)\"\r\n (rowDragStart)=\"_rowDragStart($event)\"\r\n (rowDrag)=\"_rowDrag($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [minWidth]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [showInColumnChooser]=\"\r\n item.showInColumnChooser === undefined ? true : item.showInColumnChooser\r\n \"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer || null\"\r\n [allowResizing]=\"!last\"\r\n [headerTemplate]=\"item.showHeaderTemplate ? headerTemplate : undefined\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
|
|
1192
1192
|
styles: [""]
|
|
1193
1193
|
}] }
|
|
1194
1194
|
];
|
|
@@ -1220,6 +1220,7 @@
|
|
|
1220
1220
|
childGrid: [{ type: core.Input }],
|
|
1221
1221
|
frozenColumns: [{ type: core.Input }],
|
|
1222
1222
|
columnChooserSettings: [{ type: core.Input }],
|
|
1223
|
+
headerTemplate: [{ type: core.Input }],
|
|
1223
1224
|
contextMenuItems: [{ type: core.Input }],
|
|
1224
1225
|
selectionSettings: [{ type: core.Input }],
|
|
1225
1226
|
alwaysShowCheckbox: [{ type: core.Input }],
|
|
@@ -1292,6 +1293,8 @@
|
|
|
1292
1293
|
CommonGridComponent.prototype.frozenColumns;
|
|
1293
1294
|
/** @type {?} */
|
|
1294
1295
|
CommonGridComponent.prototype.columnChooserSettings;
|
|
1296
|
+
/** @type {?} */
|
|
1297
|
+
CommonGridComponent.prototype.headerTemplate;
|
|
1295
1298
|
/**
|
|
1296
1299
|
* Sample: [
|
|
1297
1300
|
* {
|
|
@@ -1643,57 +1646,10 @@
|
|
|
1643
1646
|
* @return {?}
|
|
1644
1647
|
*/
|
|
1645
1648
|
function () {
|
|
1646
|
-
var _a = this.rootElement.nativeElement.getBoundingClientRect(), y = _a.top, x = _a.left, width = _a.width, height = _a.height;
|
|
1647
|
-
// 临时显示内容以获取尺寸
|
|
1648
|
-
/** @type {?} */
|
|
1649
|
-
var wasVisible = this.contentElement.nativeElement.style.display !== "none";
|
|
1650
|
-
this.contentElement.nativeElement.style.visibility = "hidden";
|
|
1651
|
-
this.contentElement.nativeElement.style.display = "block";
|
|
1652
|
-
/** @type {?} */
|
|
1653
|
-
var contentRect = this.contentElement.nativeElement.getBoundingClientRect();
|
|
1654
|
-
/** @type {?} */
|
|
1655
|
-
var contentWidth = contentRect.width;
|
|
1656
|
-
/** @type {?} */
|
|
1657
|
-
var contentHeight = contentRect.height;
|
|
1658
|
-
// 获取视口尺寸
|
|
1659
|
-
/** @type {?} */
|
|
1660
|
-
var viewportWidth = window.innerWidth;
|
|
1661
|
-
/** @type {?} */
|
|
1662
|
-
var viewportHeight = window.innerHeight;
|
|
1663
|
-
/** @type {?} */
|
|
1664
|
-
var SAFE_MARGIN = 12;
|
|
1665
|
-
// 边界检测:计算最佳 placement
|
|
1666
|
-
/** @type {?} */
|
|
1667
|
-
var finalPlacement = this.placement;
|
|
1668
|
-
if (this.placement === "top" && y < contentHeight + SAFE_MARGIN) {
|
|
1669
|
-
if (viewportHeight - (y + height) >= contentHeight + SAFE_MARGIN) {
|
|
1670
|
-
finalPlacement = "bottom";
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
else if (this.placement === "bottom" && viewportHeight - (y + height) < contentHeight + SAFE_MARGIN) {
|
|
1674
|
-
if (y >= contentHeight + SAFE_MARGIN) {
|
|
1675
|
-
finalPlacement = "top";
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
else if (this.placement === "left" && x < contentWidth + SAFE_MARGIN) {
|
|
1679
|
-
if (viewportWidth - (x + width) >= contentWidth + SAFE_MARGIN) {
|
|
1680
|
-
finalPlacement = "right";
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
else if (this.placement === "right" && viewportWidth - (x + width) < contentWidth + SAFE_MARGIN) {
|
|
1684
|
-
if (x >= contentWidth + SAFE_MARGIN) {
|
|
1685
|
-
finalPlacement = "left";
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
// 保存调整后的 placement
|
|
1689
|
-
this.actualPlacement = finalPlacement;
|
|
1690
|
-
// 对于 fixed="no" 的情况,只更新 data-placement,让 CSS 处理
|
|
1691
1649
|
if (this.fixed === "no") {
|
|
1692
|
-
this.contentElement.nativeElement.style.visibility = "";
|
|
1693
|
-
this.contentElement.nativeElement.style.display = wasVisible ? "" : "none";
|
|
1694
1650
|
return;
|
|
1695
1651
|
}
|
|
1696
|
-
|
|
1652
|
+
var _a = this.rootElement.nativeElement.getBoundingClientRect(), y = _a.top, x = _a.left, width = _a.width, height = _a.height;
|
|
1697
1653
|
/** @type {?} */
|
|
1698
1654
|
var top = "0";
|
|
1699
1655
|
/** @type {?} */
|
|
@@ -1702,7 +1658,7 @@
|
|
|
1702
1658
|
var translateX = "0";
|
|
1703
1659
|
/** @type {?} */
|
|
1704
1660
|
var translateY = "0";
|
|
1705
|
-
switch (
|
|
1661
|
+
switch (this.placement + "_" + this.position) {
|
|
1706
1662
|
case "top_start":
|
|
1707
1663
|
top = y + "px";
|
|
1708
1664
|
left = x - 8 + "px";
|
|
@@ -1766,49 +1722,9 @@
|
|
|
1766
1722
|
translateX = "-100%";
|
|
1767
1723
|
break;
|
|
1768
1724
|
}
|
|
1769
|
-
// 计算实际渲染位置(考虑 transform)进行边界调整
|
|
1770
|
-
/** @type {?} */
|
|
1771
|
-
var actualLeft = parseFloat(left) || 0;
|
|
1772
|
-
/** @type {?} */
|
|
1773
|
-
var actualTop = parseFloat(top) || 0;
|
|
1774
|
-
if (translateX === "-50%") {
|
|
1775
|
-
actualLeft = actualLeft - contentWidth / 2;
|
|
1776
|
-
}
|
|
1777
|
-
else if (translateX === "-100%") {
|
|
1778
|
-
actualLeft = actualLeft - contentWidth;
|
|
1779
|
-
}
|
|
1780
|
-
if (translateY === "-50%") {
|
|
1781
|
-
actualTop = actualTop - contentHeight / 2;
|
|
1782
|
-
}
|
|
1783
|
-
else if (translateY === "-100%") {
|
|
1784
|
-
actualTop = actualTop - contentHeight;
|
|
1785
|
-
}
|
|
1786
|
-
// 水平边界调整
|
|
1787
|
-
if (finalPlacement === "top" || finalPlacement === "bottom") {
|
|
1788
|
-
if (actualLeft < SAFE_MARGIN) {
|
|
1789
|
-
left = (x + SAFE_MARGIN) + "px";
|
|
1790
|
-
translateX = "0";
|
|
1791
|
-
}
|
|
1792
|
-
else if (actualLeft + contentWidth > viewportWidth - SAFE_MARGIN) {
|
|
1793
|
-
left = (viewportWidth - contentWidth - SAFE_MARGIN) + "px";
|
|
1794
|
-
translateX = "0";
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
// 垂直边界调整
|
|
1798
|
-
else {
|
|
1799
|
-
if (actualTop < SAFE_MARGIN) {
|
|
1800
|
-
top = (y + SAFE_MARGIN) + "px";
|
|
1801
|
-
translateY = "0";
|
|
1802
|
-
}
|
|
1803
|
-
else if (actualTop + contentHeight > viewportHeight - SAFE_MARGIN) {
|
|
1804
|
-
top = (viewportHeight - contentHeight - SAFE_MARGIN) + "px";
|
|
1805
|
-
translateY = "0";
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
1725
|
this.contentElement.nativeElement.style.top = top;
|
|
1809
1726
|
this.contentElement.nativeElement.style.left = left;
|
|
1810
1727
|
this.contentElement.nativeElement.style.transform = "translate(" + translateX + ", " + translateY + ")";
|
|
1811
|
-
this.contentElement.nativeElement.style.visibility = "visible";
|
|
1812
1728
|
};
|
|
1813
1729
|
/**
|
|
1814
1730
|
* @return {?}
|
|
@@ -1832,15 +1748,13 @@
|
|
|
1832
1748
|
* @return {?}
|
|
1833
1749
|
*/
|
|
1834
1750
|
function () {
|
|
1835
|
-
if (this.trigger !== "hover") {
|
|
1751
|
+
if (this.fixed === "no" || this.trigger !== "hover") {
|
|
1836
1752
|
return;
|
|
1837
1753
|
}
|
|
1838
1754
|
this.opened = "yes";
|
|
1839
1755
|
this.openChange.emit(true);
|
|
1840
1756
|
this.setFixedContentPosition();
|
|
1841
|
-
|
|
1842
|
-
window.addEventListener("mousemove", this.onMoveOutside);
|
|
1843
|
-
}
|
|
1757
|
+
window.addEventListener("mousemove", this.onMoveOutside);
|
|
1844
1758
|
};
|
|
1845
1759
|
/**
|
|
1846
1760
|
* @return {?}
|
|
@@ -1863,7 +1777,7 @@
|
|
|
1863
1777
|
FloatBoxComponent.decorators = [
|
|
1864
1778
|
{ type: core.Component, args: [{
|
|
1865
1779
|
selector: "rs-float-box",
|
|
1866
|
-
template: "<div\r\n #element\r\n class=\"float-box-container\"\r\n [attr.data-trigger]=\"trigger\"\r\n (click)=\"onClickContainer()\"\r\n (mouseenter)=\"onMouseEnter()\"\r\n>\r\n <ng-content></ng-content>\r\n <div\r\n #content\r\n class=\"float-box-content\"\r\n [attr.data-placement]=\"
|
|
1780
|
+
template: "<div\r\n #element\r\n class=\"float-box-container\"\r\n [attr.data-trigger]=\"trigger\"\r\n (click)=\"onClickContainer()\"\r\n (mouseenter)=\"onMouseEnter()\"\r\n>\r\n <ng-content></ng-content>\r\n <div\r\n #content\r\n class=\"float-box-content\"\r\n [attr.data-placement]=\"placement\"\r\n [attr.data-position]=\"position\"\r\n [attr.data-animation]=\"animation\"\r\n [attr.data-fixed]=\"fixed\"\r\n [attr.data-opened]=\"opened\"\r\n >\r\n <div class=\"float-box-show-content\">\r\n <ng-content select=\"[float-content]\"></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
1867
1781
|
styles: [".float-box-container{position:relative}.float-box-container[data-trigger=click]>.float-box-content[data-opened=no],.float-box-container[data-trigger=hover]:not(:hover)>.float-box-content{display:none}.float-box-container>.float-box-content[data-fixed=no]{padding:8px;--top:0;--left:0;--translate-x:0;--translate-y:0;position:absolute;top:var(--top);left:var(--left);transform:translate(var(--translate-x),var(--translate-y));z-index:10}.float-box-container>.float-box-content[data-fixed=no][data-animation=yes]{-webkit-animation:.25s ease-in-out;animation:.25s ease-in-out}.float-box-container>.float-box-content[data-fixed=no][data-placement=top]{--translate-y:-100%}.float-box-container>.float-box-content[data-fixed=no][data-placement=top][data-animation=true]{-webkit-animation-name:open-from-top;animation-name:open-from-top}.float-box-container>.float-box-content[data-fixed=no][data-placement=left]{--translate-x:-100%}.float-box-container>.float-box-content[data-fixed=no][data-placement=right]{--left:100%}.float-box-container>.float-box-content[data-fixed=no][data-placement=bottom]{--top:100%}.float-box-container>.float-box-content[data-fixed=no][data-placement=bottom][data-animation=yes]{-webkit-animation-name:open-from-bottom;animation-name:open-from-bottom}.float-box-container>.float-box-content[data-fixed=no][data-placement=bottom][data-position=start],.float-box-container>.float-box-content[data-fixed=no][data-placement=top][data-position=start]{--left:-8px}.float-box-container>.float-box-content[data-fixed=no][data-placement=bottom][data-position=center],.float-box-container>.float-box-content[data-fixed=no][data-placement=top][data-position=center]{--left:50%;--translate-x:-50%}.float-box-container>.float-box-content[data-fixed=no][data-placement=bottom][data-position=end],.float-box-container>.float-box-content[data-fixed=no][data-placement=top][data-position=end]{--left:calc(100% + 8px);--translate-x:-100%}.float-box-container>.float-box-content[data-fixed=no][data-placement=left][data-position=start],.float-box-container>.float-box-content[data-fixed=no][data-placement=right][data-position=start]{--top:-8px}.float-box-container>.float-box-content[data-fixed=no][data-placement=left][data-position=start][data-animation=yes],.float-box-container>.float-box-content[data-fixed=no][data-placement=right][data-position=start][data-animation=yes]{-webkit-animation-name:open-from-bottom;animation-name:open-from-bottom}.float-box-container>.float-box-content[data-fixed=no][data-placement=left][data-position=center],.float-box-container>.float-box-content[data-fixed=no][data-placement=right][data-position=center]{--top:50%;--translate-y:-50%}.float-box-container>.float-box-content[data-fixed=no][data-placement=left][data-position=center][data-animation=yes],.float-box-container>.float-box-content[data-fixed=no][data-placement=right][data-position=center][data-animation=yes]{-webkit-animation-name:open-from-bottom;animation-name:open-from-bottom}.float-box-container>.float-box-content[data-fixed=no][data-placement=left][data-position=end],.float-box-container>.float-box-content[data-fixed=no][data-placement=right][data-position=end]{--top:calc(100% + 8px);--translate-y:-100%}.float-box-container>.float-box-content[data-fixed=no][data-placement=left][data-position=end][data-animation=yes],.float-box-container>.float-box-content[data-fixed=no][data-placement=right][data-position=end][data-animation=yes]{-webkit-animation-name:open-from-top;animation-name:open-from-top}@-webkit-keyframes open-from-top{from{margin-top:-8px;opacity:.4}to{margin:0;opacity:1}}@keyframes open-from-top{from{margin-top:-8px;opacity:.4}to{margin:0;opacity:1}}@-webkit-keyframes open-from-bottom{from{margin-top:8px;opacity:.4}to{margin:0;opacity:1}}@keyframes open-from-bottom{from{margin-top:8px;opacity:.4}to{margin:0;opacity:1}}::ng-deep #kt-float-box-fixed-container{width:0;height:0;z-index:100000}::ng-deep #kt-float-box-fixed-container .float-box-content[data-fixed=yes]{padding:8px;position:fixed;z-index:10}::ng-deep #kt-float-box-fixed-container .float-box-content[data-fixed=yes][data-opened=no]{display:none}.float-box-show-content{padding:8px 8px 12px;border-radius:8px;background:#fff;box-shadow:0 0 8px 0 rgba(0,0,0,.25)}"]
|
|
1868
1782
|
}] }
|
|
1869
1783
|
];
|
|
@@ -1895,8 +1809,6 @@
|
|
|
1895
1809
|
/** @type {?} */
|
|
1896
1810
|
FloatBoxComponent.prototype._fixed;
|
|
1897
1811
|
/** @type {?} */
|
|
1898
|
-
FloatBoxComponent.prototype.actualPlacement;
|
|
1899
|
-
/** @type {?} */
|
|
1900
1812
|
FloatBoxComponent.prototype.openChange;
|
|
1901
1813
|
/** @type {?} */
|
|
1902
1814
|
FloatBoxComponent.prototype.rootElement;
|
|
@@ -24007,6 +23919,7 @@
|
|
|
24007
23919
|
this.showErrorIcon = false;
|
|
24008
23920
|
this.showZoomBtn = false;
|
|
24009
23921
|
this.customSave = false;
|
|
23922
|
+
this.customPageTitle = false;
|
|
24010
23923
|
// 显示相关属性
|
|
24011
23924
|
this.dialogStyle = {};
|
|
24012
23925
|
this.size = "";
|
|
@@ -24113,7 +24026,7 @@
|
|
|
24113
24026
|
CommonDialogComponent.decorators = [
|
|
24114
24027
|
{ type: core.Component, args: [{
|
|
24115
24028
|
selector: "rs-common-dialog",
|
|
24116
|
-
template: "<div class=\"dialog\" [ngClass]=\"size\" [ngStyle]=\"dialogStyle\">\r\n <!-- \u5934\u90E8 -->\r\n <div *ngIf=\"!hideHeader\" mat-dialog-title class=\"dialog__header\">\r\n <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n <ng-content select=\"[titleSlot]\"></ng-content>\r\n </div
|
|
24029
|
+
template: "<div class=\"dialog\" [ngClass]=\"size\" [ngStyle]=\"dialogStyle\">\r\n <!-- \u5934\u90E8 -->\r\n <div *ngIf=\"!hideHeader\" mat-dialog-title class=\"dialog__header\">\r\n <ng-container *ngIf=\"customPageTitle; else defaultTitle\">\r\n <ng-content select=\"[titleSlot]\"></ng-content>\r\n </ng-container>\r\n <ng-template #defaultTitle>\r\n <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n </div>\r\n </ng-template>\r\n <!-- <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n <ng-content select=\"[titleSlot]\"></ng-content>\r\n </div> -->\r\n <div class=\"header__actions\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-btn\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div *ngIf=\"!hideCloseIcon\" class=\"header-btn\" (click)=\"onClose()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </div>\r\n <!-- \u5185\u5BB9 -->\r\n <div class=\"dialog__content\" mat-dialog-content>\r\n <ng-content></ng-content>\r\n </div>\r\n <!-- \u5E95\u90E8\u6309\u94AE -->\r\n <div mat-dialog-actions class=\"dialog__footer\">\r\n <ng-content select=\"[footerSlot]\"></ng-content>\r\n <!-- \u9ED8\u8BA4\u5C55\u793A\u4FDD\u5B58/\u5173\u95ED\u6309\u94AE -->\r\n <ng-container *ngIf=\"!customFooter\">\r\n <ng-template [ngTemplateOutlet]=\"defaultTemplate\"></ng-template>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <button *ngIf=\"!hideCloseBtn\" class=\"e-btn\" (click)=\"onClose()\">\r\n {{ cancelBtnLabel }}\r\n </button>\r\n <button *ngIf=\"!hideDiscardBtn\" class=\"e-btn\" (click)=\"onDiscard()\">\r\n {{ discardBtnLabel }}\r\n </button>\r\n <button *ngIf=\"!hideSaveBtn\" class=\"e-btn e-primary\" (click)=\"onSave()\">\r\n {{ saveBtnLabel }}\r\n </button>\r\n </ng-template>\r\n </div>\r\n <!-- loading -->\r\n <div class=\"dialog__loading\" [hidden]=\"!loading\">\r\n <img src=\"../../../assets/img/raise_loading.gif\" alt=\"\" />\r\n </div>\r\n</div>\r\n",
|
|
24117
24030
|
styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:96vw!important;height:88vh!important;max-width:2100px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header-icon{display:block}:host::ng-deep .dialog .dialog__header .header-btn{cursor:pointer;padding:2px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .dialog__loading{height:100%;background:0 0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}:host::ng-deep .dialog .dialog__loading img{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%)}"]
|
|
24118
24031
|
}] }
|
|
24119
24032
|
];
|
|
@@ -24133,6 +24046,7 @@
|
|
|
24133
24046
|
showErrorIcon: [{ type: core.Input }],
|
|
24134
24047
|
showZoomBtn: [{ type: core.Input }],
|
|
24135
24048
|
customSave: [{ type: core.Input }],
|
|
24049
|
+
customPageTitle: [{ type: core.Input }],
|
|
24136
24050
|
onCloseRequest: [{ type: core.Input }],
|
|
24137
24051
|
dialogStyle: [{ type: core.Input }],
|
|
24138
24052
|
size: [{ type: core.Input }],
|
|
@@ -24170,6 +24084,8 @@
|
|
|
24170
24084
|
/** @type {?} */
|
|
24171
24085
|
CommonDialogComponent.prototype.customSave;
|
|
24172
24086
|
/** @type {?} */
|
|
24087
|
+
CommonDialogComponent.prototype.customPageTitle;
|
|
24088
|
+
/** @type {?} */
|
|
24173
24089
|
CommonDialogComponent.prototype.onCloseRequest;
|
|
24174
24090
|
/** @type {?} */
|
|
24175
24091
|
CommonDialogComponent.prototype.dialogStyle;
|