Browse Source

Pull request #1113: KERNEL-6541 引用类型规范化

Merge in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:release/10.0 to research/10.0

* commit '3d86a52d5c360b3394428902ba7dfbba922f0482':
  build: KERNEL-6541 引用类型规范化
research/10.0
alan 4 years ago
parent
commit
a95ae75744
  1. 2
      config/jest.environment.js
  2. 8
      index.html
  3. 5
      package.json
  4. 2
      src/less/background.less
  5. 2
      src/less/font.less
  6. 4
      src/less/index.less
  7. 2
      src/less/lib/font.less
  8. 4
      src/modules/components/collapse/collapse.ts
  9. 17
      src/modules/components/link_button/link.ts
  10. 17
      src/modules/components/test_status/test_status.ts
  11. 4
      src/modules/components/test_status/tip_icon/tip_fail.ts
  12. 4
      src/modules/components/test_status/tip_icon/tip_icon.ts
  13. 12
      src/modules/components/text_checker/text_checker.ts
  14. 6
      src/modules/pages/connection/components/form_item/form_item.ts
  15. 11
      src/modules/pages/connection/connection.ts
  16. 4
      src/modules/pages/connection/connection_jndi/connection_jndi.ts
  17. 4
      src/modules/pages/connection/list/list.ts
  18. 23
      src/modules/pages/connection/list/list_item/list_item.ts
  19. 13
      src/modules/pages/connection_pool/connection_pool.ts
  20. 4
      src/modules/pages/connection_pool/list_item/list_item.ts
  21. 43
      src/modules/pages/connection_pool/pool/pool.ts
  22. 8
      src/modules/pages/database/database.ts
  23. 4
      src/modules/pages/database/database_type/database_type.ts
  24. 3
      src/modules/pages/database/filter/filter.ts
  25. 4
      src/modules/pages/maintain/components/form_item/form_item.ts
  26. 14
      src/modules/pages/maintain/forms/components/form.jdbc.ts
  27. 6
      src/modules/pages/maintain/forms/components/form.jndi.ts
  28. 7
      src/modules/pages/maintain/maintain.ts
  29. 11
      src/ui/fineui.ts
  30. 1
      tsconfig.json
  31. 2
      types/globals.d.ts
  32. 2
      webpack/webpack.common.js
  33. 5
      webpack/webpack.dev.js
  34. 2275
      yarn.lock

2
config/jest.environment.js

@ -11,7 +11,7 @@ class FineUiEnvironment extends JsdomEnvironment {
document.createElement('body');
[
'../node_modules/fineui/dist/fineui.js',
'../node_modules/@fui/core/dist/fineui.js',
'../node_modules/@fui/materials/docs/materials.js',
'../config/fineui.prepare.js',
'./fineui.setup.js',

8
index.html

@ -5,15 +5,15 @@
<meta charset="UTF-8" />
<title>Fine Report</title>
<!--核心css文件-->
<link rel="preload" href="./node_modules/fineui/dist/font/iconfont.woff" as="font" type="font/woff" crossorigin="" />
<link rel="stylesheet" type="text/css" href="./node_modules/fineui/dist/fineui.css" />
<link rel="preload" href="./node_modules/@fui/core/dist/font/iconfont.woff" as="font" type="font/woff" crossorigin="" />
<link rel="stylesheet" type="text/css" href="./node_modules/@fui/core/dist/fineui.css" />
<link rel="stylesheet" type="text/css" href="./node_modules/@fui/materials/docs/materials.css" />
</head>
<body id="body">
<div id="wrapper"></div>
<script src="./node_modules/fineui/dist/fineui.js"></script>
<script src="./node_modules/fineui/dist/utils.js"></script>
<script src="./node_modules/@fui/core/dist/fineui.js"></script>
<script src="./node_modules/@fui/core/dist/utils.js"></script>
<script src="./node_modules/@fui/materials/docs/materials.js"></script>
<script src="./assets/scripts/dec.js"></script>
<script src="./redis.js"></script>

5
package.json

@ -16,6 +16,7 @@
"nprogress": "0.2.0"
},
"devDependencies": {
"@fui/babel-preset-fineui": "^1.0.0",
"@types/jest": "24.0.11",
"@typescript-eslint/eslint-plugin": "1.7.0",
"@typescript-eslint/parser": "1.7.0",
@ -51,10 +52,10 @@
"webpack-cli": "3.3.5",
"webpack-dev-server": "3.7.2",
"webpack-merge": "4.2.1",
"@fui/babel-preset-fineui": "^1.0.0"
"fork-ts-checker-webpack-plugin": "1.4.3"
},
"optionalDependencies": {
"fineui": "^2.0.0",
"@fui/core": "^2.0.0",
"@fui/materials": "10.0.0-release - 10.0.0-release.99999999999999"
},
"scripts": {

2
src/less/background.less

@ -1,4 +1,4 @@
@import "../../node_modules/fineui/src/less/image.less";
@import "../../node_modules/@fui/core/src/less/image.less";
@import "./lib/background.less";
@import "var";

2
src/less/font.less

@ -1,4 +1,4 @@
@import "../../node_modules/fineui/src/less/image.less";
@import "../../node_modules/@fui/core/src/less/image.less";
@import "./lib/font.less";
.addFontRes();
.font(dcm-link-font, @font-link);

4
src/less/index.less

@ -1,5 +1,5 @@
@import "../../node_modules/fineui/src/less/lib/colors.less";
@import '../../node_modules/fineui/src/less/visual.less';
@import "../../node_modules/@fui/core/src/less/lib/colors.less";
@import '../../node_modules/@fui/core/src/less/visual.less';
@import "background.less";
@import "font.less";
@import "var.less";

2
src/less/lib/font.less

@ -1,4 +1,4 @@
@import '../../../node_modules/fineui/src/less/lib/font.less';
@import '../../../node_modules/@fui/core/src/less/lib/font.less';
@font-link: "e759";
@font-link-test: "e763";

4
src/modules/components/collapse/collapse.ts

@ -1,4 +1,4 @@
import { IconLabel, Left, Label } from 'ui';
import { IconLabel, Left } from 'ui';
import { shortcut, store } from '@core/core';
import { CollapseModel, CollapseModelXtype } from './collapse.model';
@ -52,7 +52,7 @@ export class Collapse extends BI.BasicButton {
invisible: this.model.isCollapse,
},
{
type: Label,
type: BI.Label.xtype,
lgap: 2,
text: this.options.name,
},

17
src/modules/components/link_button/link.ts

@ -1,25 +1,36 @@
import { CenterAdapt, Label } from 'ui';
import { CenterAdapt } from 'ui';
import { shortcut } from '@core/core';
import { Label } from '@fui/core';
export const LinkXtype = 'dec.dcm.components.link.button';
const DEFAULT_LINK = '/';
@shortcut(LinkXtype)
export class LinkButton extends BI.BasicButton {
props = {
props: {
text: string;
cls: string;
$testId: string;
link?: Function | string;
} = {
text: '',
cls: 'cursor-pointer',
$testId: 'dec-dcm-link-button',
}
private text: Label;
render() {
return {
type: CenterAdapt,
cls: 'bi-high-light',
items: [
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-high-light-border-bottom',
text: this.options.text,
ref: (_ref: Label) => {
this.text = _ref;
},
},
],
};

17
src/modules/components/test_status/test_status.ts

@ -1,9 +1,10 @@
import { shortcut, store } from '@core/core';
import { TestStatusModelXtype, TestStatusModel } from './test_status.model';
import { CenterAdapt, Tab, Vertical, Label, TextButton, Left } from 'ui';
import { CenterAdapt, Tab, Vertical, Left } from 'ui';
import { TEST_STATUS } from '@constants/constant';
import { TipIconXtype } from './tip_icon/tip_icon';
import { TipFailXtype, EVENT_CLOSE, EVENT_RELOAD, EVENT_DETAIL } from './tip_icon/tip_fail';
import { Label } from '@fui/core';
export const TestStatusXtype = 'dec.dcm.components.test_status';
export {
EVENT_CLOSE,
@ -26,8 +27,8 @@ export class TestStatus extends BI.Widget {
store: TestStatusModel['store'];
tab: any;
failMessage: any;
failDriverMessage: any;
failMessage: Label;
failDriverMessage: Label;
driverLink: any;
detail: any;
@ -118,20 +119,20 @@ export class TestStatus extends BI.Widget {
height: 75,
items: [
{
type: Label,
type: BI.Label.xtype,
whiteSpace: 'normal',
width: 400,
textAlign: 'left',
text: '',
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.failMessage = _ref;
},
},
{
type: Label,
type: BI.Label.xtype,
textAlign: 'left',
invisible: true,
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.failDriverMessage = _ref;
},
},
@ -140,7 +141,7 @@ export class TestStatus extends BI.Widget {
invisible: true,
items: [
{
type: TextButton,
type: BI.TextButton.xtype,
cls: 'bi-high-light bi-high-light-border-bottom',
text: BI.i18nText('Dec-Dcm_Connection_Download_Driver'),
handler: () => {

4
src/modules/components/test_status/tip_icon/tip_fail.ts

@ -1,5 +1,5 @@
import { shortcut, store } from '@core/core';
import { Vertical, HorizotalAuto, CenterAdapt, Label, VerticalAdapt, Button } from 'ui';
import { Vertical, HorizotalAuto, CenterAdapt, VerticalAdapt, Button } from 'ui';
import { TipFailModel, TipFailModelXtype } from './tip_fail.model';
export const TipFailXtype = 'dec.dcm.components.test_status.tip_fail';
export const EVENT_CLOSE = 'EVENT_CLOSE';
@ -46,7 +46,7 @@ export class TipFail extends BI.Widget {
height: 60,
}],
}, {
type: Label,
type: BI.Label.xtype,
height: 14,
bgap: 10,
text: tipText,

4
src/modules/components/test_status/tip_icon/tip_icon.ts

@ -1,5 +1,5 @@
import { shortcut } from '@core/core';
import { Vertical, HorizotalAuto, CenterAdapt, Label } from 'ui';
import { Vertical, HorizotalAuto, CenterAdapt } from 'ui';
export const TipIconXtype = 'dec.dcm.components.test_status.tip_icon';
@shortcut(TipIconXtype)
export class TipIcon extends BI.Widget {
@ -26,7 +26,7 @@ export class TipIcon extends BI.Widget {
height: 60,
}],
}, {
type: Label,
type: BI.Label.xtype,
height: 14,
text: tipText,
},

12
src/modules/components/text_checker/text_checker.ts

@ -1,5 +1,6 @@
import { shortcut } from '@core/core';
import { TextEditor, Absolute, Label } from 'ui';
import { Label } from '@fui/core';
import { TextEditor, Absolute } from 'ui';
export const TextCheckerXtype = 'dec.dcm.components.text_checker';
@shortcut(TextCheckerXtype)
export class TextChecker extends BI.Widget {
@ -13,11 +14,12 @@ export class TextChecker extends BI.Widget {
checker: (value: string) => boolean;
autoFix?: boolean;
}[],
$value: '',
}
textEditor: any;
errorLabel: any;
private isError;
errorLabel: Label;
private isError: boolean;
private value: string;
private errorChecker: {
errorText: string;
@ -73,9 +75,9 @@ export class TextChecker extends BI.Widget {
},
}, {
el: {
type: Label,
type: BI.Label.xtype,
cls: 'bi-error',
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.errorLabel = _ref;
},
},

6
src/modules/pages/connection/components/form_item/form_item.ts

@ -1,5 +1,5 @@
import { shortcut } from '@core/core';
import { Label, Htape, Vertical } from 'ui';
import { Htape, Vertical } from 'ui';
export const FormItemXtype = 'dec.dcm.connection_form_item';
@shortcut(FormItemXtype)
export class FormItem extends BI.Widget {
@ -21,7 +21,7 @@ export class FormItem extends BI.Widget {
items: [
{
el: {
type: Label,
type: BI.Label.xtype,
cls: this.options.isBold ? 'bi-font-bold' : '',
textAlign: 'left',
text: this.options.name,
@ -32,7 +32,7 @@ export class FormItem extends BI.Widget {
type: Vertical,
items: [
{
type: Label,
type: BI.Label.xtype,
text: unit ? `${value} ${unit}` : value,
textAlign: 'left',
title: value,

11
src/modules/pages/connection/connection.ts

@ -1,4 +1,4 @@
import { Button, Htape, Vtape, Label, VerticalAdapt, ListView, CenterAdapt, Layout } from 'ui';
import { Button, Htape, Vtape, VerticalAdapt, ListView, CenterAdapt, Layout } from 'ui';
import { shortcut, store } from '@core/core';
import { ConnectionModel, ConnectionModelXtype } from './connection.model';
import { PAGE_INDEX } from '@constants/constant';
@ -9,6 +9,7 @@ import { ConnectionPluginXtype } from './connection_plugin/connection_plugin';
import { connectionType } from '@constants/env';
import { getAllDatabaseTypes, connectionCanEdit, getJdbcDatabaseType, getTextByDatabaseType } from '../../app.service';
import { ConnectionJDBC } from '../../crud/crud.typings';
import { Label } from '@fui/core';
export const ConnectionXtype = 'dec.dcm.connection';
@shortcut(ConnectionXtype)
@ -17,7 +18,7 @@ export class Connection extends BI.Widget {
store: ConnectionModel['store'];
model: ConnectionModel['model'];
connectionTitleWidget: any;
connectionTitleWidget: Label;
connectionEditWidget: any;
listView: any;
title: any;
@ -91,9 +92,9 @@ export class Connection extends BI.Widget {
cls: 'bi-border-bottom',
items: [
{
type: Label,
type: BI.Label.xtype,
textAlign: 'left',
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.connectionTitleWidget = _ref;
},
},
@ -174,7 +175,7 @@ export class Connection extends BI.Widget {
height: 130,
},
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-tips',
text: BI.i18nText('Dec-Dcm_Connection_Np_Registered'),
},

4
src/modules/pages/connection/connection_jndi/connection_jndi.ts

@ -1,5 +1,5 @@
import { shortcut, store } from '@core/core';
import { Vertical, Htape, Label, Left } from 'ui';
import { Vertical, Htape, Left } from 'ui';
import { FormItemXtype } from '../components/form_item/form_item';
import { ConnectionJndiModelXtype, ConnectionJndiModel } from './connection_jndi.model';
import { ConnectionJNDI } from 'src/modules/crud/crud.typings';
@ -40,7 +40,7 @@ export class ConnectionJdbc extends BI.Widget {
type: Left,
items: [
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-font-bold',
textAlign: 'left',
text: BI.i18nText('Dec-Dcm_Connection_JNDI_Form_Connection'),

4
src/modules/pages/connection/list/list.ts

@ -1,5 +1,5 @@
import { shortcut, store } from '@core/core';
import { CenterAdapt, Label, Layout, Vtape, Loader, Tab } from 'ui';
import { CenterAdapt, Layout, Vtape, Loader, Tab } from 'ui';
import { ListItemXtype } from './list_item/list_item';
import { ConnectionListModel, ConnectionListModelXtype } from './list.model';
import { getDatabaseType } from './list.service';
@ -56,7 +56,7 @@ export class ConnectionList extends BI.LoadingPane {
height: 130,
},
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-tips',
text: BI.i18nText('Dec-Dcm_Connection_None'),
},

23
src/modules/pages/connection/list/list_item/list_item.ts

@ -1,11 +1,12 @@
import { shortcut, store } from '@core/core';
import { Label, IconLabel, IconButton, DownListCombo, SignEditor, Layout, Htape, Vertical } from 'ui';
import { IconLabel, Layout, Htape, Vertical } from 'ui';
import './list_item.less';
import { ListItemModel, ListItemModelXtype } from './list_item.model';
import { PAGE_INDEX } from '@constants/constant';
import { hasRegistered } from '../list.service';
import { connectionCanEdit, getTextByDatabaseType, getChartLength } from '../../../../app.service';
import { testConnection } from '../../../maintain/forms/form.server';
import { DownListCombo, Label, SignEditor } from '@fui/core';
export const ListItemXtype = 'dec.dcm.connection.list_item';
@shortcut(ListItemXtype)
@ -24,9 +25,9 @@ export class ListItem extends BI.BasicButton {
model: ListItemModel['model'];
comboWidget: any;
nameLabel: any;
nameEditor: any;
downListCombo: any;
nameLabel: Label;
nameEditor: SignEditor;
downListCombo: DownListCombo;
watch = {
isEdit: (isEdit: boolean) => {
@ -55,21 +56,21 @@ export class ListItem extends BI.BasicButton {
type: Vertical,
items: [
{
type: Label,
type: BI.Label.xtype,
text: name,
textAlign: 'left',
height: 25,
title: name,
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.nameLabel = _ref;
},
},
{
type: SignEditor,
type: BI.SignEditor.xtype,
$value: 'connection-name',
value: name,
invisible: !this.model.isEdit,
ref: (_ref: any) => {
ref: (_ref: SignEditor) => {
this.nameEditor = _ref;
},
listeners: [{
@ -104,17 +105,17 @@ export class ListItem extends BI.BasicButton {
],
}, {
el: databaseType ? {
type: DownListCombo,
type: BI.DownListCombo.xtype,
cls: 'link-item-icon',
stopPropagation: true,
hgap: 8,
el: {
type: IconButton,
type: BI.IconButton.xtype,
$value: 'other-edit',
cls: 'dcm-link-other-font icon-size-16',
},
items: this.renderDownList(),
ref: (_ref: any) => {
ref: (_ref: DownListCombo) => {
this.downListCombo = _ref;
},
listeners: [{

13
src/modules/pages/connection_pool/connection_pool.ts

@ -1,14 +1,15 @@
import { shortcut, store } from '@core/core';
import { Htape, Vtape, Label, Layout, CenterAdapt, Loader } from 'ui';
import { Htape, Vtape, Layout, CenterAdapt, Loader } from 'ui';
import { ConnectionPoolModel, ConnectionPoolModelXtype } from './connection_pool.model';
import { ListItemXtype } from './list_item/list_item';
import { PoolXtype } from './pool/pool';
import { PAGE_SIZE } from '@constants/constant';
import { Label } from '@fui/core';
export const ConnectionPoolXtype = 'dec.dcm.connection_pool';
@shortcut(ConnectionPoolXtype)
@store(ConnectionPoolModelXtype)
export class ConnectionPool extends BI.Widget {
title: any;
title: Label;
model: ConnectionPoolModel['model'];
store: ConnectionPoolModel['store'];
@ -39,7 +40,7 @@ export class ConnectionPool extends BI.Widget {
items: [
{
el: {
type: Label,
type: BI.Label.xtype,
cls: 'bi-border-bottom',
textAlign: 'left',
text: BI.i18nText('Dec-Dcm_Data_Connections'),
@ -69,11 +70,11 @@ export class ConnectionPool extends BI.Widget {
items: [
{
el: {
type: Label,
type: BI.Label.xtype,
cls: 'bi-border-bottom',
textAlign: 'left',
lgap: 10,
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.title = _ref;
},
},
@ -103,7 +104,7 @@ export class ConnectionPool extends BI.Widget {
height: 130,
},
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-tips',
text: BI.i18nText('Dec-Dcm_Connection_NO_Connection_Pool'),
},

4
src/modules/pages/connection_pool/list_item/list_item.ts

@ -1,5 +1,5 @@
import { shortcut, store } from '@core/core';
import { VerticalAdapt, Label } from 'ui';
import { VerticalAdapt } from 'ui';
import { ListItemModel, ListItemModelXtype } from './list_item.model';
export const ListItemXtype = 'dec.dcm.connection_pool.list_item';
@shortcut(ListItemXtype)
@ -20,7 +20,7 @@ export class ListItem extends BI.BasicButton {
lgap: 5,
items: [
{
type: Label,
type: BI.Label.xtype,
text: this.options.name,
title: this.options.name,
width: 250,

43
src/modules/pages/connection_pool/pool/pool.ts

@ -1,8 +1,9 @@
import { shortcut, store } from '@core/core';
import { PoolModel, PoolModelXtype } from './pool.model';
import { FloatCenter, Vertical, CenterAdapt, Label, VerticalAdapt } from 'ui';
import { FloatCenter, Vertical, CenterAdapt, VerticalAdapt } from 'ui';
import './pool.less';
import { ConnectionPoolType } from '../../../crud/crud.typings';
import { Label } from '@fui/core';
export const PoolXtype = 'dec.dcm.connection_pool.pool';
@shortcut(PoolXtype)
@ -14,17 +15,17 @@ export class Pool extends BI.Widget {
}
model: PoolModel['model'];
maxActive: any;
maxIdle: any;
numActive: any;
numIdle: any;
maxActive: Label;
maxIdle: Label;
numActive: Label;
numIdle: Label;
watch = {
pool: (pool: ConnectionPoolType) => {
this.maxActive.setText(pool.maxActive);
this.maxIdle.setText(pool.maxIdle);
this.numActive.setText(pool.numActive);
this.numIdle.setText(pool.numIdle);
this.maxActive.setText(`${pool.maxActive}`);
this.maxIdle.setText(`${pool.maxIdle}`);
this.numActive.setText(`${pool.numActive}`);
this.numIdle.setText(`${pool.numIdle}`);
},
}
@ -54,23 +55,23 @@ export class Pool extends BI.Widget {
type: VerticalAdapt,
items: [
{
type: Label,
type: BI.Label.xtype,
$testId: 'dec-dcm-pool-status-number',
$value: 'active',
cls: 'bi-high-light card-font-heighlight',
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.numActive = _ref;
},
},
{
type: Label,
type: BI.Label.xtype,
text: '/',
},
{
type: Label,
type: BI.Label.xtype,
$testId: 'dec-dcm-pool-status-max',
$value: 'active',
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.maxActive = _ref;
},
},
@ -79,7 +80,7 @@ export class Pool extends BI.Widget {
],
},
{
type: Label,
type: BI.Label.xtype,
text: BI.i18nText('Dec-Dcm_Active_Connections_Number'),
},
],
@ -102,23 +103,23 @@ export class Pool extends BI.Widget {
type: VerticalAdapt,
items: [
{
type: Label,
type: BI.Label.xtype,
$testId: 'dec-dcm-pool-status-number',
$value: 'idle',
cls: 'bi-high-light card-font-heighlight',
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.numIdle = _ref;
},
},
{
type: Label,
type: BI.Label.xtype,
text: '/',
},
{
type: Label,
type: BI.Label.xtype,
$testId: 'dec-dcm-pool-status-max',
$value: 'idle',
ref: (_ref: any) => {
ref: (_ref: Label) => {
this.maxIdle = _ref;
},
},
@ -127,7 +128,7 @@ export class Pool extends BI.Widget {
],
},
{
type: Label,
type: BI.Label.xtype,
text: BI.i18nText('Dec-Dcm_Leisure_Connections_Number'),
},
],

8
src/modules/pages/database/database.ts

@ -1,4 +1,4 @@
import { SearchEditor, Vtape, Right, Htape, Vertical, ButtonGroup, Left, Label, MultiSelectItem, CenterAdapt } from 'ui';
import { SearchEditor, Vtape, Right, Htape, Vertical, ButtonGroup, Left, MultiSelectItem, CenterAdapt } from 'ui';
import { shortcut, store } from '@core/core';
import { FilterXtype } from './filter/filter';
import { DatebaseModel, DatebaseModelXtype } from './database.model';
@ -146,7 +146,7 @@ export class Datebase extends BI.Widget {
invisible: true,
items: [
{
type: Label,
type: BI.Label.xtype,
width: 70,
textAlign: 'left',
text: BI.i18nText('Dec-Dcm_Connection_Type_Filter'),
@ -179,7 +179,7 @@ export class Datebase extends BI.Widget {
},
},
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-tips',
textAlign: 'left',
text: BI.i18nText('Dec-Dcm_Connection_Filter_Tip'),
@ -236,7 +236,7 @@ export class Datebase extends BI.Widget {
height: '100%',
width: '100%',
items: [{
type: Label,
type: BI.Label.xtype,
cls: 'bi-tips',
text: BI.i18nText('Dec-Dcm_Connection_No_Search_Result'),
}],

4
src/modules/pages/database/database_type/database_type.ts

@ -1,5 +1,5 @@
import { shortcut, store } from '@core/core';
import { Vtape, Label, Absolute, Img } from 'ui';
import { Vtape, Absolute, Img } from 'ui';
import { DatebaseTypeModel, DatebaseTypeModelXtype } from './database_type.model';
import { ImgPrefix, PluginImgPrefix } from '@constants/env';
import './database_type.less';
@ -48,7 +48,7 @@ export class DatebaseType extends BI.BasicButton {
height: 90,
},
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-header-background',
text,
title: text,

3
src/modules/pages/database/filter/filter.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { Label } from 'ui';
import { FilterModel, FilterModelXtype } from './filter.model';
export const FilterXtype = 'dec.dcm.datebase.filter';
@ -18,7 +17,7 @@ export class Filter extends BI.BasicButton {
const { text } = this.options;
return {
type: Label,
type: BI.Label.xtype,
textAlign: 'left',
height: 25,
lgap: 10,

4
src/modules/pages/maintain/components/form_item/form_item.ts

@ -1,5 +1,5 @@
import { shortcut } from '@core/core';
import { Label, Left } from 'ui';
import { Left } from 'ui';
import { CONNECTION_LAYOUT } from '@constants/constant';
export const FormItemXtype = 'dec.dcm.Maintain_form_item';
@shortcut(FormItemXtype)
@ -17,7 +17,7 @@ export class FormItem extends BI.Widget {
type: Left,
items: [
{
type: Label,
type: BI.Label.xtype,
cls: this.options.isBold ? 'bi-font-bold' : '',
width: this.options.nameWidth,
textAlign: 'left',

14
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -1,5 +1,5 @@
import { shortcut } from '@core/core';
import { Vertical, TextEditor, TextValueCombo, Label, TextAreaEditor, Editor, EdirotIconCheckCombo, Left, TextButton, Layout } from 'ui';
import { Vertical, TextEditor, TextValueCombo, TextAreaEditor, Editor, EdirotIconCheckCombo, Left, Layout } from 'ui';
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse';
import { FormItemXtype } from '../../components/form_item/form_item';
import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings';
@ -308,7 +308,7 @@ export class FormJdbc extends BI.Widget {
}],
},
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-tips',
textAlign: 'left',
invisible: true,
@ -341,14 +341,14 @@ export class FormJdbc extends BI.Widget {
items: [{
type: Left,
items: [{
type: TextButton,
type: BI.TextButton.xtype,
cls: 'bi-high-light',
text: BI.i18nText('Dec-Dcm_Connection_Click_Connect_Database'),
handler: () => {
this.fireEvent('EVENT_TEST_CONNECTION');
},
}, {
type: Label,
type: BI.Label.xtype,
cls: 'bi-tips',
lgap: 3,
text: BI.i18nText('Dec-Dcm_Connection_Read_Mode_List'),
@ -521,7 +521,7 @@ export class FormJdbc extends BI.Widget {
},
},
{
type: Label,
type: BI.Label.xtype,
lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
text: BI.i18nText('Dec-Dcm_Millisecond'),
@ -614,7 +614,7 @@ export class FormJdbc extends BI.Widget {
},
},
{
type: Label,
type: BI.Label.xtype,
lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
text: BI.i18nText('Dec-Dcm_Millisecond'),
@ -662,7 +662,7 @@ export class FormJdbc extends BI.Widget {
},
},
{
type: Label,
type: BI.Label.xtype,
lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
text: BI.i18nText('BI-Basic_Seconds'),

6
src/modules/pages/maintain/forms/components/form.jndi.ts

@ -1,5 +1,5 @@
import { shortcut } from '@core/core';
import { Vertical, TextEditor, Htape, Left, Label, TextValueCombo, EdirotIconCheckCombo } from 'ui';
import { Vertical, TextEditor, Htape, Left, TextValueCombo, EdirotIconCheckCombo } from 'ui';
import { FormItemXtype } from '../../components/form_item/form_item';
import { ConnectionJNDI, Connection, ContextHashtable } from 'src/modules/crud/crud.typings';
import { CONNECT_CHARSET, CONNECTION_LAYOUT, JNDI_FACTORYS } from '@constants/constant';
@ -83,7 +83,7 @@ export class FormJndi extends BI.Widget {
type: Left,
items: [
{
type: Label,
type: BI.Label.xtype,
cls: 'bi-font-bold',
textAlign: 'left',
text: BI.i18nText('Dec-Dcm_Connection_JNDI_Form_Connection'),
@ -176,7 +176,7 @@ export class FormJndi extends BI.Widget {
}],
},
{
type: Label,
type: BI.Label.xtype,
bgap: -15,
cls: 'bi-tips',
textAlign: 'left',

7
src/modules/pages/maintain/maintain.ts

@ -1,4 +1,4 @@
import { Vtape, Label, VerticalAdapt, ListView, IconButton } from 'ui';
import { Vtape, VerticalAdapt, ListView } from 'ui';
import { shortcut, store } from '@core/core';
import { MaintainModel, MaintainModelXtype } from './maintain.model';
import { MaintainFormXtype } from './forms/form';
@ -19,6 +19,7 @@ export class Maintain extends BI.Widget {
store: MaintainModel['store'];
listView: any;
socketTip: any;
render() {
const { isEdit, databaseType } = this.getEditConnection();
@ -35,7 +36,7 @@ export class Maintain extends BI.Widget {
hgap: 5,
items: [
{
type: IconButton,
type: BI.IconButton.xtype,
$value: 'back-databases',
cls: 'dcm-back-font',
height: 15,
@ -45,7 +46,7 @@ export class Maintain extends BI.Widget {
},
},
{
type: Label,
type: BI.Label.xtype,
text: titleText,
height: 15,
},

11
src/ui/fineui.ts

@ -1,14 +1,3 @@
export const Icon = 'bi.icon';
export const IconTextItem = 'bi.icon_text_item';
export const IconTextIconItem = 'bi.icon_text_icon_item';
export const IconButton = 'bi.icon_button';
export const IconChangeButton = 'bi.icon_change_button';
export const TextButton = 'bi.text_button';
export const DownListCombo = 'bi.down_list_combo';
export const Label = 'bi.label';
export const SmallTextEditor = 'bi.small_text_editor';
export const MultiFileEditor = 'bi.multifile_editor';
export const SignEditor = 'bi.sign_editor';
export const Button = 'bi.button';
export const TextEditor = 'bi.text_editor';
export const MultiSelectInsertCombo = 'bi.multi_select_insert_combo';

1
tsconfig.json

@ -19,6 +19,7 @@
// "noUnusedParameters": true,
// "noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"paths": {
"ui": ["./src/ui"],
"ReportCst": ["./private/constants"],

2
types/globals.d.ts vendored

@ -2,7 +2,7 @@ interface Obj {
[key: string]: any;
}
declare let BI: Obj & import('fineui')._BI;
declare let BI: Obj & import('@fui/core').BI & import('@fui/materials').BI;
declare const Fix: Obj;
declare const DecCst: Obj;
declare const Dec: {

2
webpack/webpack.common.js

@ -49,7 +49,7 @@ module.exports = {
options: {
plugins: [vars({
variables: {
fontUrl: '../node_modules/fineui/dist/font/',
fontUrl: '../node_modules/@fui/core/dist/font/',
imageUrl: '/webroot/decision/resources?path=/com/fr/web/resources/dist/images/1x',
image2xUrl: '/webroot/decision/resources?path=/com/fr/web/resources/dist/images/2x',
}

5
webpack/webpack.dev.js

@ -6,7 +6,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const chokidar = require('chokidar');
const { execSync } = require('child_process');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const dirs = require('./dirs');
const common = require('./webpack.common.js');
@ -65,6 +65,9 @@ module.exports = merge(common, {
new HtmlWebpackPlugin({
template: path.resolve(__dirname, '../index.html'),
}),
new ForkTsCheckerWebpackPlugin({
watch: ['./src'],
}),
new OptimizeCssAssetsPlugin({
assetNameRegExp: /\.css$/g,
cssProcessor: require('cssnano'),

2275
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save