ronds-metadata 1.2.9 → 1.2.10
Sign up to get free protection for your applications and to get access to all the features.
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Table.d.ts +2 -0
- package/es/comps/FormGenerator/comps/Canvas/core/index.less +23 -23
- package/es/comps/FormGenerator/settings/index.d.ts +652 -86
- package/es/comps/MetadataForm/index.less +1 -1
- package/package.json +1 -1
- package/es/api/index.js +0 -249
- package/es/comps/DynamicPorts/comps/ContextMenu.js +0 -44
- package/es/comps/DynamicPorts/comps/DragNode.js +0 -55
- package/es/comps/DynamicPorts/comps/GraphHandler/index.js +0 -51
- package/es/comps/DynamicPorts/comps/NodeElement.js +0 -30
- package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.js +0 -42
- package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.js +0 -40
- package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.js +0 -55
- package/es/comps/DynamicPorts/comps/shape/connector.js +0 -19
- package/es/comps/DynamicPorts/comps/shape/edge.js +0 -91
- package/es/comps/DynamicPorts/comps/shape/node.js +0 -190
- package/es/comps/DynamicPorts/constant/index.js +0 -19
- package/es/comps/DynamicPorts/graph.js +0 -697
- package/es/comps/DynamicPorts/index.js +0 -143
- package/es/comps/DynamicPorts/interface.js +0 -6
- package/es/comps/DynamicPorts/utils.js +0 -127
- package/es/comps/Editable/DataCell/ButtonCell.js +0 -45
- package/es/comps/Editable/DataCell/ColorPicker.js +0 -33
- package/es/comps/Editable/DataCell/Input.js +0 -54
- package/es/comps/Editable/DataCell/Number.js +0 -44
- package/es/comps/Editable/DataCell/Select.js +0 -48
- package/es/comps/Editable/DataCell/Switch.js +0 -33
- package/es/comps/Editable/comps/EditableAction.js +0 -110
- package/es/comps/Editable/comps/EditableCell.js +0 -108
- package/es/comps/Editable/comps/EditableHeardCell.js +0 -172
- package/es/comps/Editable/comps/EditableRow.js +0 -118
- package/es/comps/Editable/comps/Texty.js +0 -277
- package/es/comps/Editable/index.js +0 -385
- package/es/comps/Editable/interface.js +0 -8
- package/es/comps/Editable/utils.js +0 -46
- package/es/comps/FileView/index.js +0 -198
- package/es/comps/FormGenerator/Provider.js +0 -8
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.js +0 -17
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.js +0 -17
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.js +0 -16
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.js +0 -17
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.js +0 -50
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.js +0 -55
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.js +0 -14
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.js +0 -50
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.js +0 -17
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.js +0 -17
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.js +0 -55
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Switch.js +0 -13
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.js +0 -14
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.js +0 -17
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.js +0 -250
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.js +0 -60
- package/es/comps/FormGenerator/comps/Canvas/core/index.js +0 -313
- package/es/comps/FormGenerator/comps/Canvas/index.js +0 -118
- package/es/comps/FormGenerator/comps/Settings/index.js +0 -150
- package/es/comps/FormGenerator/comps/Sidebar/Elements.js +0 -48
- package/es/comps/FormGenerator/comps/Sidebar/index.js +0 -37
- package/es/comps/FormGenerator/index.js +0 -67
- package/es/comps/FormGenerator/settings/index.js +0 -307
- package/es/comps/FormGenerator/settings/ruleConfig.js +0 -557
- package/es/comps/FormGenerator/transformer.js +0 -223
- package/es/comps/Icons/index.js +0 -23
- package/es/comps/JsonEdit/constant/index.js +0 -87
- package/es/comps/JsonEdit/index.js +0 -221
- package/es/comps/JsonView/index.js +0 -109
- package/es/comps/MdEdit/index.js +0 -41
- package/es/comps/MdNavbar/index.js +0 -180
- package/es/comps/MdNavbar/utils.js +0 -34
- package/es/comps/MdView/index.js +0 -70
- package/es/comps/MetadataEdit/components/MetaFieldsEdit.js +0 -419
- package/es/comps/MetadataEdit/components/MetaPropsEdit.js +0 -368
- package/es/comps/MetadataEdit/constant/index.js +0 -69
- package/es/comps/MetadataEdit/hooks/index.js +0 -43
- package/es/comps/MetadataEdit/index.js +0 -255
- package/es/comps/MetadataEditV2/components/MetaFieldsEdit.js +0 -237
- package/es/comps/MetadataEditV2/components/MetaPropsEdit.js +0 -367
- package/es/comps/MetadataEditV2/constant/index.js +0 -69
- package/es/comps/MetadataEditV2/hooks/index.js +0 -43
- package/es/comps/MetadataEditV2/index.js +0 -298
- package/es/comps/MetadataForm/DataCell/Array.js +0 -147
- package/es/comps/MetadataForm/DataCell/Input.js +0 -199
- package/es/comps/MetadataForm/DataCell/Number.js +0 -130
- package/es/comps/MetadataForm/DataCell/Ref.js +0 -325
- package/es/comps/MetadataForm/DataCell/Select.js +0 -518
- package/es/comps/MetadataForm/DataCell/Switch.js +0 -115
- package/es/comps/MetadataForm/DataCell/layout/TableArray.js +0 -359
- package/es/comps/MetadataForm/HOC/index.js +0 -125
- package/es/comps/MetadataForm/constants.js +0 -11
- package/es/comps/MetadataForm/hooks/index.js +0 -128
- package/es/comps/MetadataForm/index.js +0 -268
- package/es/comps/MetadataForm/interface.js +0 -8
- package/es/comps/MetadataForm/utils.js +0 -112
- package/es/comps/locales/en-US.js +0 -24
- package/es/comps/locales/index.js +0 -8
- package/es/comps/locales/zh-CN.js +0 -24
- package/es/config.js +0 -50
- package/es/framework/graph/index.js +0 -515
- package/es/framework/hooks/use-async-memo.js +0 -32
- package/es/framework/hooks/use-sync-scroll.js +0 -106
- package/es/framework/http/cache.js +0 -137
- package/es/framework/http/cancel.js +0 -44
- package/es/framework/http/index.js +0 -392
- package/es/framework/http/msgpack.js +0 -34
- package/es/framework/http/msgpack5/index.js +0 -84
- package/es/framework/http/msgpack5/lib/codecs/DateCodec.js +0 -71
- package/es/framework/http/msgpack5/lib/decoder.js +0 -287
- package/es/framework/http/msgpack5/lib/encoder.js +0 -252
- package/es/framework/http/msgpack5/lib/helpers.js +0 -23
- package/es/framework/http/msgpack5/lib/streams.js +0 -93
- package/es/framework/http/types.js +0 -1
- package/es/framework/libs/jquery.min.js +0 -4022
- package/es/framework/locale/dil8/di18n.js +0 -132
- package/es/framework/locale/dil8/index.js +0 -3
- package/es/framework/locale/dil8/translate.js +0 -76
- package/es/framework/locale/dil8/util.js +0 -17
- package/es/framework/locale/index.js +0 -26
- package/es/framework/metadata/MetadataService.js +0 -169
- package/es/framework/metadata/index.js +0 -384
- package/es/framework/rxjs-hooks/useMemoSubject.js +0 -16
- package/es/framework/rxjs-hooks/useObservable.js +0 -22
- package/es/framework/rxjs-hooks/useObservableState.js +0 -45
- package/es/index.js +0 -27
- package/es/utils.js +0 -138
@@ -1,132 +0,0 @@
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
5
|
-
import T from './translate';
|
6
|
-
import { addClass } from './util';
|
7
|
-
var CLASS_ATTRIBUTE = 'i18n-class';
|
8
|
-
var IMG_ATTRIBUTE = 'i18n-img';
|
9
|
-
var CONTENT_ATTRIBUTE = 'i18n-content';
|
10
|
-
var PLACEHOLDER_ATTRIBUTE = 'i18n-placeholder';
|
11
|
-
var LOCALE_PATTERN = /\$\{locale}/g;
|
12
|
-
|
13
|
-
var noop = function noop() {};
|
14
|
-
|
15
|
-
export var DI18n = /*#__PURE__*/function (_T) {
|
16
|
-
_inherits(DI18n, _T);
|
17
|
-
|
18
|
-
var _super = _createSuper(DI18n);
|
19
|
-
|
20
|
-
// public locale: string;
|
21
|
-
// public messages: any;
|
22
|
-
function DI18n() {
|
23
|
-
var _this;
|
24
|
-
|
25
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
26
|
-
|
27
|
-
_classCallCheck(this, DI18n);
|
28
|
-
|
29
|
-
_this = _super.call(this, options);
|
30
|
-
_this.isReplace = void 0;
|
31
|
-
_this.currMessage = void 0;
|
32
|
-
_this.doms = void 0;
|
33
|
-
_this.locale = options.locale || 'en';
|
34
|
-
_this.messages = options.messages || {};
|
35
|
-
_this.isReplace = options.isReplace || false;
|
36
|
-
_this.currMessage = _this.messages[_this.locale];
|
37
|
-
_this.doms = {}; // 是否进行DOM内容的替换
|
38
|
-
|
39
|
-
if (_this.isReplace) {
|
40
|
-
_this.getDoms();
|
41
|
-
|
42
|
-
_this.fresh();
|
43
|
-
}
|
44
|
-
|
45
|
-
return _this;
|
46
|
-
}
|
47
|
-
|
48
|
-
_createClass(DI18n, [{
|
49
|
-
key: "getDoms",
|
50
|
-
value: function getDoms() {
|
51
|
-
this.doms = {
|
52
|
-
classDoms: document.querySelectorAll("[".concat(CLASS_ATTRIBUTE, "]")),
|
53
|
-
imgDoms: document.querySelectorAll("[".concat(IMG_ATTRIBUTE, "]")),
|
54
|
-
contentDoms: document.querySelectorAll("[".concat(CONTENT_ATTRIBUTE, "]")),
|
55
|
-
inputDoms: document.querySelectorAll("[".concat(PLACEHOLDER_ATTRIBUTE, "]"))
|
56
|
-
};
|
57
|
-
}
|
58
|
-
}, {
|
59
|
-
key: "handlerClass",
|
60
|
-
value: function handlerClass() {
|
61
|
-
if (this.doms.classDoms && this.doms.classDoms.length) {
|
62
|
-
for (var i = 0, length = this.doms.classDoms.length; i < length; i++) {
|
63
|
-
var dom = this.doms.classDoms[i];
|
64
|
-
addClass(dom, dom.getAttribute(CLASS_ATTRIBUTE));
|
65
|
-
}
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}, {
|
69
|
-
key: "handlerImg",
|
70
|
-
value: function handlerImg() {
|
71
|
-
if (this.doms.imgDoms && this.doms.imgDoms.length) {
|
72
|
-
for (var i = 0, length = this.doms.imgDoms.length; i < length; i++) {
|
73
|
-
var dom = this.doms.imgDoms[i];
|
74
|
-
var src = dom.getAttribute(IMG_ATTRIBUTE).replace(LOCALE_PATTERN, this.locale);
|
75
|
-
dom.src = src;
|
76
|
-
}
|
77
|
-
}
|
78
|
-
}
|
79
|
-
}, {
|
80
|
-
key: "handlerContent",
|
81
|
-
value: function handlerContent() {
|
82
|
-
if (this.doms.contentDoms && this.doms.contentDoms.length) {
|
83
|
-
for (var i = 0, length = this.doms.contentDoms.length; i < length; i++) {
|
84
|
-
var dom = this.doms.contentDoms[i];
|
85
|
-
var content = dom.getAttribute(CONTENT_ATTRIBUTE);
|
86
|
-
dom.innerHTML = this.messages[this.locale][content];
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
90
|
-
}, {
|
91
|
-
key: "handlerInput",
|
92
|
-
value: function handlerInput() {
|
93
|
-
if (this.doms.inputDoms && this.doms.inputDoms.length) {
|
94
|
-
for (var i = 0, length = this.doms.inputDoms.length; i < length; i++) {
|
95
|
-
var dom = this.doms.inputDoms[i];
|
96
|
-
var placeHolderKey = dom.getAttribute(PLACEHOLDER_ATTRIBUTE);
|
97
|
-
dom.setAttribute('placeholder', this.currMessage[placeHolderKey]);
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}, {
|
102
|
-
key: "fresh",
|
103
|
-
value: function fresh() {
|
104
|
-
this.handlerClass();
|
105
|
-
this.handlerImg();
|
106
|
-
this.handlerContent();
|
107
|
-
this.handlerInput();
|
108
|
-
}
|
109
|
-
}, {
|
110
|
-
key: "setLocale",
|
111
|
-
value: function setLocale(locale) {
|
112
|
-
var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
113
|
-
this.locale = locale;
|
114
|
-
this.currMessage = this.messages[this.locale];
|
115
|
-
this.fresh();
|
116
|
-
cb();
|
117
|
-
}
|
118
|
-
}, {
|
119
|
-
key: "getLocale",
|
120
|
-
value: function getLocale() {
|
121
|
-
return this.locale || 'zh-CN';
|
122
|
-
}
|
123
|
-
}, {
|
124
|
-
key: "setMessages",
|
125
|
-
value: function setMessages(obj) {
|
126
|
-
this.messages = obj;
|
127
|
-
}
|
128
|
-
}]);
|
129
|
-
|
130
|
-
return DI18n;
|
131
|
-
}(T);
|
132
|
-
DI18n.Version = void 0;
|
@@ -1,76 +0,0 @@
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
4
|
-
|
5
|
-
var T = /*#__PURE__*/function () {
|
6
|
-
function T(options) {
|
7
|
-
_classCallCheck(this, T);
|
8
|
-
|
9
|
-
this.locale = void 0;
|
10
|
-
this.messages = void 0;
|
11
|
-
this.locale = options.locale || 'zh';
|
12
|
-
this.messages = options.messages || {};
|
13
|
-
}
|
14
|
-
|
15
|
-
_createClass(T, [{
|
16
|
-
key: "$t",
|
17
|
-
value: function $t(key) {
|
18
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
19
|
-
args[_key - 1] = arguments[_key];
|
20
|
-
}
|
21
|
-
|
22
|
-
if (!this.messages || !this.messages[this.locale] || this.messages[this.locale][key] === undefined) {
|
23
|
-
return key;
|
24
|
-
}
|
25
|
-
|
26
|
-
var str = String(this.messages[this.locale][key]);
|
27
|
-
if (str == 'undefined') return key;
|
28
|
-
|
29
|
-
if (args.length === 1 && _typeof(args[0]) === 'object') {
|
30
|
-
args = args[0];
|
31
|
-
} else {
|
32
|
-
args = [];
|
33
|
-
}
|
34
|
-
|
35
|
-
if (!args || !args.hasOwnProperty) {
|
36
|
-
args = [];
|
37
|
-
}
|
38
|
-
|
39
|
-
var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
40
|
-
return str.replace(RE_NARGS, function (match, prefix, i, index) {
|
41
|
-
var result = '';
|
42
|
-
|
43
|
-
if (str[index - 1] === '{' && str[index + match.length] === '}') {
|
44
|
-
return i;
|
45
|
-
} else {
|
46
|
-
result = args.hasOwnProperty(i) ? args[i] : match;
|
47
|
-
|
48
|
-
if (!result) {
|
49
|
-
return '';
|
50
|
-
}
|
51
|
-
|
52
|
-
return result;
|
53
|
-
}
|
54
|
-
});
|
55
|
-
}
|
56
|
-
}, {
|
57
|
-
key: "$html",
|
58
|
-
value: function $html(content) {
|
59
|
-
var _this = this;
|
60
|
-
|
61
|
-
content = String(content);
|
62
|
-
var RE_NARGS = /\$\{locale\}|\$t\(['"]([\s\S]+?)['"]\)/g;
|
63
|
-
return content.replace(RE_NARGS, function (match, prefix, i, index) {
|
64
|
-
if (match === '${locale}') {
|
65
|
-
return _this.locale;
|
66
|
-
} else {
|
67
|
-
return _this.messages[_this.locale][prefix] || prefix;
|
68
|
-
}
|
69
|
-
});
|
70
|
-
}
|
71
|
-
}]);
|
72
|
-
|
73
|
-
return T;
|
74
|
-
}();
|
75
|
-
|
76
|
-
export { T as default };
|
@@ -1,17 +0,0 @@
|
|
1
|
-
export function hasClass(ele, cls) {
|
2
|
-
return new RegExp(cls).test(ele.className || '');
|
3
|
-
}
|
4
|
-
export function addClass(ele, cls) {
|
5
|
-
var _pattern = new RegExp(cls);
|
6
|
-
|
7
|
-
if (!_pattern.test(ele.className)) ele.className += ' ' + cls;
|
8
|
-
return ele;
|
9
|
-
}
|
10
|
-
export function removeClass(ele, cls) {
|
11
|
-
if (!ele || ele.nodeType !== 1) return undefined;
|
12
|
-
|
13
|
-
var _pattern = new RegExp(cls);
|
14
|
-
|
15
|
-
if (_pattern.test(ele.className || '')) ele.className = ele.className.replace(_pattern, '');
|
16
|
-
return ele;
|
17
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import DI18n from './dil8/index';
|
2
|
-
export var localeKey = 'epm_locale';
|
3
|
-
var di18n = new DI18n({
|
4
|
-
locale: window.localStorage.getItem(localeKey) || 'zh-CN',
|
5
|
-
isReplace: false,
|
6
|
-
messages: {}
|
7
|
-
});
|
8
|
-
export function initLocale(messages) {
|
9
|
-
di18n.setMessages(messages);
|
10
|
-
}
|
11
|
-
export function setLocale(l) {
|
12
|
-
window.localStorage.setItem(localeKey, l || '');
|
13
|
-
di18n.setLocale(l);
|
14
|
-
}
|
15
|
-
export function getLocale() {
|
16
|
-
return di18n.getLocale();
|
17
|
-
}
|
18
|
-
export function tr(key) {
|
19
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
20
|
-
args[_key - 1] = arguments[_key];
|
21
|
-
}
|
22
|
-
|
23
|
-
return di18n.$t.apply(di18n, [key].concat(args));
|
24
|
-
} //多语言
|
25
|
-
|
26
|
-
export default di18n;
|
@@ -1,169 +0,0 @@
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
4
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
5
|
-
|
6
|
-
/*
|
7
|
-
* @Author: wangxian
|
8
|
-
* @Date: 2021-09-18 14:15:04
|
9
|
-
* @LastEditTime: 2023-02-09 18:36:47
|
10
|
-
*/
|
11
|
-
import Api from '../../api';
|
12
|
-
var globalAPI = new Api();
|
13
|
-
export var registerMetadataAPI = function registerMetadataAPI(api) {
|
14
|
-
globalAPI = api;
|
15
|
-
};
|
16
|
-
export var MetadataService = /*#__PURE__*/function () {
|
17
|
-
function MetadataService(api) {
|
18
|
-
_classCallCheck(this, MetadataService);
|
19
|
-
|
20
|
-
this.api = void 0;
|
21
|
-
|
22
|
-
if (api) {
|
23
|
-
this.api = api;
|
24
|
-
} else if (globalAPI) {
|
25
|
-
this.api = globalAPI;
|
26
|
-
} else {
|
27
|
-
this.api = new Api();
|
28
|
-
}
|
29
|
-
}
|
30
|
-
/** 获取元数据列表 */
|
31
|
-
|
32
|
-
|
33
|
-
_createClass(MetadataService, [{
|
34
|
-
key: "GetMetadataList",
|
35
|
-
value: function () {
|
36
|
-
var _GetMetadataList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(keyWords) {
|
37
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
38
|
-
while (1) {
|
39
|
-
switch (_context.prev = _context.next) {
|
40
|
-
case 0:
|
41
|
-
return _context.abrupt("return", this.api.GetMetadataList(keyWords));
|
42
|
-
|
43
|
-
case 1:
|
44
|
-
case "end":
|
45
|
-
return _context.stop();
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}, _callee, this);
|
49
|
-
}));
|
50
|
-
|
51
|
-
function GetMetadataList(_x) {
|
52
|
-
return _GetMetadataList.apply(this, arguments);
|
53
|
-
}
|
54
|
-
|
55
|
-
return GetMetadataList;
|
56
|
-
}()
|
57
|
-
/** 通过元数据Id获取元数据详情 */
|
58
|
-
|
59
|
-
}, {
|
60
|
-
key: "GetMetadataDetailById",
|
61
|
-
value: function () {
|
62
|
-
var _GetMetadataDetailById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(metadataId) {
|
63
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
64
|
-
while (1) {
|
65
|
-
switch (_context2.prev = _context2.next) {
|
66
|
-
case 0:
|
67
|
-
return _context2.abrupt("return", this.api.GetMetadataDetailById(metadataId));
|
68
|
-
|
69
|
-
case 1:
|
70
|
-
case "end":
|
71
|
-
return _context2.stop();
|
72
|
-
}
|
73
|
-
}
|
74
|
-
}, _callee2, this);
|
75
|
-
}));
|
76
|
-
|
77
|
-
function GetMetadataDetailById(_x2) {
|
78
|
-
return _GetMetadataDetailById.apply(this, arguments);
|
79
|
-
}
|
80
|
-
|
81
|
-
return GetMetadataDetailById;
|
82
|
-
}()
|
83
|
-
/** 添加元数据 */
|
84
|
-
|
85
|
-
}, {
|
86
|
-
key: "SaveMetadata",
|
87
|
-
value: function () {
|
88
|
-
var _SaveMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, metadataTag) {
|
89
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
90
|
-
while (1) {
|
91
|
-
switch (_context3.prev = _context3.next) {
|
92
|
-
case 0:
|
93
|
-
return _context3.abrupt("return", this.api.SaveMetadata(data, metadataTag));
|
94
|
-
|
95
|
-
case 1:
|
96
|
-
case "end":
|
97
|
-
return _context3.stop();
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}, _callee3, this);
|
101
|
-
}));
|
102
|
-
|
103
|
-
function SaveMetadata(_x3, _x4) {
|
104
|
-
return _SaveMetadata.apply(this, arguments);
|
105
|
-
}
|
106
|
-
|
107
|
-
return SaveMetadata;
|
108
|
-
}()
|
109
|
-
/** 获取元数据的值 */
|
110
|
-
|
111
|
-
}, {
|
112
|
-
key: "GetMetadataObjList",
|
113
|
-
value: function () {
|
114
|
-
var _GetMetadataObjList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data) {
|
115
|
-
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
116
|
-
while (1) {
|
117
|
-
switch (_context4.prev = _context4.next) {
|
118
|
-
case 0:
|
119
|
-
return _context4.abrupt("return", this.api.GetMetadataObjList(data));
|
120
|
-
|
121
|
-
case 1:
|
122
|
-
case "end":
|
123
|
-
return _context4.stop();
|
124
|
-
}
|
125
|
-
}
|
126
|
-
}, _callee4, this);
|
127
|
-
}));
|
128
|
-
|
129
|
-
function GetMetadataObjList(_x5) {
|
130
|
-
return _GetMetadataObjList.apply(this, arguments);
|
131
|
-
}
|
132
|
-
|
133
|
-
return GetMetadataObjList;
|
134
|
-
}()
|
135
|
-
/** 通过扩展规则获取枚举类型的值 */
|
136
|
-
|
137
|
-
}, {
|
138
|
-
key: "GetEnumDataByUrl",
|
139
|
-
value: function () {
|
140
|
-
var _GetEnumDataByUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(url) {
|
141
|
-
var method,
|
142
|
-
body,
|
143
|
-
_args5 = arguments;
|
144
|
-
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
145
|
-
while (1) {
|
146
|
-
switch (_context5.prev = _context5.next) {
|
147
|
-
case 0:
|
148
|
-
method = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : 'get';
|
149
|
-
body = _args5.length > 2 ? _args5[2] : undefined;
|
150
|
-
return _context5.abrupt("return", this.api.GetEnumDataByUrl(url, method, body));
|
151
|
-
|
152
|
-
case 3:
|
153
|
-
case "end":
|
154
|
-
return _context5.stop();
|
155
|
-
}
|
156
|
-
}
|
157
|
-
}, _callee5, this);
|
158
|
-
}));
|
159
|
-
|
160
|
-
function GetEnumDataByUrl(_x6) {
|
161
|
-
return _GetEnumDataByUrl.apply(this, arguments);
|
162
|
-
}
|
163
|
-
|
164
|
-
return GetEnumDataByUrl;
|
165
|
-
}()
|
166
|
-
}]);
|
167
|
-
|
168
|
-
return MetadataService;
|
169
|
-
}();
|