amis 1.9.0-beta.10 → 1.9.0-beta.12
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/lib/actions/LinkAction.d.ts +8 -1
- package/lib/actions/LinkAction.js +9 -12
- package/lib/actions/LinkAction.js.map +2 -2
- package/lib/actions/ToastAction.js +2 -1
- package/lib/actions/ToastAction.js.map +2 -2
- package/lib/components/Tree.d.ts +170 -84
- package/lib/components/Tree.js +25 -23
- package/lib/components/Tree.js.map +2 -2
- package/lib/index.js +1 -1
- package/lib/renderers/Action.js +1 -1
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/CRUD.d.ts +1 -0
- package/lib/renderers/CRUD.js +2 -2
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Dialog.js +2 -2
- package/lib/renderers/Dialog.js.map +2 -2
- package/lib/renderers/Drawer.js +2 -2
- package/lib/renderers/Drawer.js.map +2 -2
- package/lib/renderers/Form/InputFile.d.ts +4 -0
- package/lib/renderers/Form/InputFile.js +47 -21
- package/lib/renderers/Form/InputFile.js.map +2 -2
- package/lib/renderers/Form/InputTree.d.ts +9 -1
- package/lib/renderers/Form/InputTree.js +2 -2
- package/lib/renderers/Form/InputTree.js.map +2 -2
- package/lib/renderers/Form/Picker.d.ts +2 -1
- package/lib/renderers/Form/Picker.js +8 -2
- package/lib/renderers/Form/Picker.js.map +2 -2
- package/lib/renderers/Form/index.js +6 -3
- package/lib/renderers/Form/index.js.map +2 -2
- package/lib/renderers/Service.d.ts +2 -0
- package/lib/renderers/Service.js +23 -3
- package/lib/renderers/Service.js.map +2 -2
- package/lib/renderers/Wizard.js +5 -8
- package/lib/renderers/Wizard.js.map +2 -2
- package/lib/themes/ang-ie11.css +27 -15
- package/lib/themes/ang.css +39 -25
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +27 -15
- package/lib/themes/antd.css +39 -25
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +42 -30
- package/lib/themes/cxd.css +44 -26
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +27 -15
- package/lib/themes/dark.css +39 -25
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default-ie11.css +42 -30
- package/lib/themes/default.css +44 -26
- package/lib/themes/default.css.map +1 -1
- package/package.json +2 -3
- package/schema.json +174 -235
- package/scss/_properties.scss +2 -0
- package/scss/components/form/_tree.scss +41 -46
- package/scss/themes/_cxd-variables.scss +7 -2
- package/sdk/ang-ie11.css +33 -20
- package/sdk/ang.css +45 -30
- package/sdk/antd-ie11.css +33 -20
- package/sdk/antd.css +45 -30
- package/sdk/barcode.js +51 -51
- package/sdk/charts.js +15 -15
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +48 -35
- package/sdk/cxd.css +50 -31
- package/sdk/dark-ie11.css +33 -20
- package/sdk/dark.css +45 -30
- package/sdk/exceljs.js +1 -1
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +16 -16
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +48 -35
- package/sdk/sdk.css +50 -31
- package/sdk/sdk.js +1265 -1293
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/actions/LinkAction.ts +21 -14
- package/src/actions/ToastAction.ts +6 -1
- package/src/components/Tree.tsx +36 -36
- package/src/renderers/Action.tsx +1 -4
- package/src/renderers/CRUD.tsx +4 -6
- package/src/renderers/Dialog.tsx +2 -2
- package/src/renderers/Drawer.tsx +2 -2
- package/src/renderers/Form/InputFile.tsx +27 -15
- package/src/renderers/Form/InputTree.tsx +12 -1
- package/src/renderers/Form/Picker.tsx +13 -3
- package/src/renderers/Form/index.tsx +6 -6
- package/src/renderers/Service.tsx +40 -5
- package/src/renderers/Wizard.tsx +4 -7
@@ -2,7 +2,14 @@ import { RendererEvent } from '../utils/renderer-event';
|
|
2
2
|
import { Action, ListenerAction, ListenerContext } from './Action';
|
3
3
|
export interface ILinkAction extends ListenerAction {
|
4
4
|
link: string;
|
5
|
+
url?: never;
|
6
|
+
params?: {
|
7
|
+
[key: string]: string;
|
8
|
+
};
|
9
|
+
}
|
10
|
+
export interface IUrlAction extends ListenerAction {
|
5
11
|
url: string;
|
12
|
+
link?: never;
|
6
13
|
params?: {
|
7
14
|
[key: string]: string;
|
8
15
|
};
|
@@ -15,5 +22,5 @@ export interface ILinkAction extends ListenerAction {
|
|
15
22
|
* @implements {Action}
|
16
23
|
*/
|
17
24
|
export declare class LinkAction implements Action {
|
18
|
-
run(action: ILinkAction, renderer: ListenerContext, event: RendererEvent<any>): Promise<void>;
|
25
|
+
run(action: ILinkAction | IUrlAction, renderer: ListenerContext, event: RendererEvent<any>): Promise<void>;
|
19
26
|
}
|
@@ -2,8 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.LinkAction = void 0;
|
4
4
|
var tslib_1 = require("tslib");
|
5
|
-
var
|
6
|
-
var tpl_1 = require("../utils/tpl");
|
5
|
+
var api_1 = require("../utils/api");
|
7
6
|
var Action_1 = require("./Action");
|
8
7
|
/**
|
9
8
|
* 打开页面动作
|
@@ -18,20 +17,18 @@ var LinkAction = /** @class */ (function () {
|
|
18
17
|
LinkAction.prototype.run = function (action, renderer, event) {
|
19
18
|
var _a;
|
20
19
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
21
|
-
var
|
20
|
+
var urlObj;
|
22
21
|
return (0, tslib_1.__generator)(this, function (_b) {
|
23
22
|
if (!((_a = renderer.props.env) === null || _a === void 0 ? void 0 : _a.jumpTo)) {
|
24
23
|
throw new Error('env.jumpTo is required!');
|
25
24
|
}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
}
|
34
|
-
renderer.props.env.jumpTo((0, tpl_1.filter)(url, action.args, '| raw'), action, action.args);
|
25
|
+
urlObj = (0, api_1.buildApi)({
|
26
|
+
url: (action.url || action.link),
|
27
|
+
method: 'get'
|
28
|
+
}, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, action.params), action.args), {
|
29
|
+
autoAppend: true
|
30
|
+
});
|
31
|
+
renderer.props.env.jumpTo(urlObj.url, action, action.args);
|
35
32
|
return [2 /*return*/];
|
36
33
|
});
|
37
34
|
});
|
@@ -6,8 +6,8 @@
|
|
6
6
|
"/src/actions/LinkAction.ts"
|
7
7
|
],
|
8
8
|
"names": [],
|
9
|
-
"mappings": ";;;;AAAA,
|
9
|
+
"mappings": ";;;;AAAA,oCAAsC;AAItC,mCAKkB;AAkBlB;;;;;;GAMG;AACH;IAAA;IAwBA,CAAC;IAvBO,wBAAG,GAAT,UACE,MAAgC,EAChC,QAAyB,EACzB,KAAyB;;;;;gBAEzB,IAAI,CAAC,CAAA,MAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,0CAAE,MAAM,CAAA,EAAE;oBAC/B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;iBAC5C;gBAGG,MAAM,GAAG,IAAA,cAAQ,EACnB;oBACE,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,CAAW;oBAC1C,MAAM,EAAE,KAAK;iBACd,kDACG,MAAM,CAAC,MAAM,GAAK,MAAM,CAAC,IAAI,GACjC;oBACE,UAAU,EAAE,IAAI;iBACjB,CACF,CAAC;gBAEF,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;;;;KAC5D;IACH,iBAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBY,gCAAU;AA0BvB,IAAA,uBAAc,EAAC,UAAU,EAAE,IAAI,UAAU,EAAE,CAAC,CAAC",
|
10
10
|
"sourcesContent": [
|
11
|
-
"import {isEmpty, isObject, qsstringify} from '../utils/helper';\nimport {RendererEvent} from '../utils/renderer-event';\nimport {filter} from '../utils/tpl';\nimport {\n Action,\n ListenerAction,\n ListenerContext,\n registerAction\n} from './Action';\n\nexport interface ILinkAction extends ListenerAction {\n link: string;\n url: string;\n params?: {\n [key: string]: string;\n };\n}\n\n/**\n * 打开页面动作\n *\n * @export\n * @class LinkAction\n * @implements {Action}\n */\nexport class LinkAction implements Action {\n async run(\n action: ILinkAction,\n renderer: ListenerContext,\n event: RendererEvent<any>\n ) {\n if (!renderer.props.env?.jumpTo) {\n throw new Error('env.jumpTo is required!');\n }\n\n
|
11
|
+
"import {buildApi} from '../utils/api';\nimport {isEmpty, isObject, qsstringify} from '../utils/helper';\nimport {RendererEvent} from '../utils/renderer-event';\nimport {filter} from '../utils/tpl';\nimport {\n Action,\n ListenerAction,\n ListenerContext,\n registerAction\n} from './Action';\n\nexport interface ILinkAction extends ListenerAction {\n link: string;\n url?: never;\n params?: {\n [key: string]: string;\n };\n}\n\nexport interface IUrlAction extends ListenerAction {\n url: string;\n link?: never;\n params?: {\n [key: string]: string;\n };\n}\n\n/**\n * 打开页面动作\n *\n * @export\n * @class LinkAction\n * @implements {Action}\n */\nexport class LinkAction implements Action {\n async run(\n action: ILinkAction | IUrlAction,\n renderer: ListenerContext,\n event: RendererEvent<any>\n ) {\n if (!renderer.props.env?.jumpTo) {\n throw new Error('env.jumpTo is required!');\n }\n\n // 通过buildApi兼容较复杂的url情况\n let urlObj = buildApi(\n {\n url: (action.url || action.link) as string,\n method: 'get'\n },\n {...action.params, ...action.args},\n {\n autoAppend: true\n }\n );\n\n renderer.props.env.jumpTo(urlObj.url, action, action.args);\n }\n}\n\nregisterAction('openlink', new LinkAction());\n"
|
12
12
|
]
|
13
13
|
}
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ToastAction = void 0;
|
4
4
|
var tslib_1 = require("tslib");
|
5
5
|
var Action_1 = require("./Action");
|
6
|
+
var tpl_builtin_1 = require("../utils/tpl-builtin");
|
6
7
|
/**
|
7
8
|
* 全局toast
|
8
9
|
*/
|
@@ -13,7 +14,7 @@ var ToastAction = /** @class */ (function () {
|
|
13
14
|
var _a, _b;
|
14
15
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
15
16
|
return (0, tslib_1.__generator)(this, function (_c) {
|
16
|
-
(_b = (_a = event.context.env).notify) === null || _b === void 0 ? void 0 : _b.call(_a, action.msgType || 'info', action.msg, action);
|
17
|
+
(_b = (_a = event.context.env).notify) === null || _b === void 0 ? void 0 : _b.call(_a, action.msgType || 'info', (0, tpl_builtin_1.resolveVariableAndFilter)(action.msg, event === null || event === void 0 ? void 0 : event.data, '| raw'), action);
|
17
18
|
return [2 /*return*/];
|
18
19
|
});
|
19
20
|
});
|
@@ -6,8 +6,8 @@
|
|
6
6
|
"/src/actions/ToastAction.ts"
|
7
7
|
],
|
8
8
|
"names": [],
|
9
|
-
"mappings": ";;;;AACA,mCAKkB;
|
9
|
+
"mappings": ";;;;AACA,mCAKkB;AAClB,oDAA8D;AAkB9D;;GAEG;AACH;IAAA;IAYA,CAAC;IAXO,yBAAG,GAAT,UACE,MAAoB,EACpB,QAAyB,EACzB,KAAyB;;;;gBAEzB,MAAA,MAAA,KAAK,CAAC,OAAO,CAAC,GAAG,EAAC,MAAM,mDACtB,MAAM,CAAC,OAAO,IAAI,MAAM,EACxB,IAAA,sCAAwB,EAAC,MAAM,CAAC,GAAG,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,OAAO,CAAC,EAC1D,MAAM,CACP,CAAC;;;;KACH;IACH,kBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,kCAAW;AAcxB,IAAA,uBAAc,EAAC,OAAO,EAAE,IAAI,WAAW,EAAE,CAAC,CAAC",
|
10
10
|
"sourcesContent": [
|
11
|
-
"import {RendererEvent} from '../utils/renderer-event';\nimport {\n Action,\n ListenerAction,\n ListenerContext,\n registerAction\n} from './Action';\n\nexport interface IToastAction extends ListenerAction {\n msg: string;\n msgType?: string;\n position?:\n | 'top-right'\n | 'top-center'\n | 'top-left'\n | 'bottom-center'\n | 'bottom-left'\n | 'bottom-right'\n | 'center';\n closeButton?: boolean;\n showIcon?: boolean;\n timeout?: number;\n}\n\n/**\n * 全局toast\n */\nexport class ToastAction implements Action {\n async run(\n action: IToastAction,\n renderer: ListenerContext,\n event: RendererEvent<any>\n ) {\n event.context.env.notify?.(action.msgType || 'info'
|
11
|
+
"import {RendererEvent} from '../utils/renderer-event';\nimport {\n Action,\n ListenerAction,\n ListenerContext,\n registerAction\n} from './Action';\nimport {resolveVariableAndFilter} from '../utils/tpl-builtin';\n\nexport interface IToastAction extends ListenerAction {\n msg: string;\n msgType?: string;\n position?:\n | 'top-right'\n | 'top-center'\n | 'top-left'\n | 'bottom-center'\n | 'bottom-left'\n | 'bottom-right'\n | 'center';\n closeButton?: boolean;\n showIcon?: boolean;\n timeout?: number;\n}\n\n/**\n * 全局toast\n */\nexport class ToastAction implements Action {\n async run(\n action: IToastAction,\n renderer: ListenerContext,\n event: RendererEvent<any>\n ) {\n event.context.env.notify?.(\n action.msgType || 'info',\n resolveVariableAndFilter(action.msg, event?.data, '| raw'),\n action\n );\n }\n}\n\nregisterAction('toast', new ToastAction());\n"
|
12
12
|
]
|
13
13
|
}
|