@nocobase/client 0.8.1-alpha.4 → 0.9.0-alpha.2
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/es/acl/ACLProvider.d.ts +16 -2
- package/es/acl/ACLProvider.js +271 -100
- package/es/acl/Configuration/ConfigureCenter.d.ts +2 -0
- package/es/acl/Configuration/ConfigureCenter.js +254 -0
- package/es/acl/Configuration/MenuConfigure.js +2 -2
- package/es/acl/Configuration/PermisionProvider.d.ts +4 -0
- package/es/acl/Configuration/PermisionProvider.js +132 -0
- package/es/acl/Configuration/RoleConfigure.js +98 -23
- package/es/acl/Configuration/RoleTable.d.ts +1 -1
- package/es/acl/Configuration/RoleTable.js +6 -3
- package/es/acl/Configuration/RolesResourcesActions.js +2 -2
- package/es/acl/Configuration/index.d.ts +1 -0
- package/es/acl/Configuration/index.js +2 -1
- package/es/acl/Configuration/schemas/roleCollections.js +41 -13
- package/es/acl/Configuration/schemas/roles.js +42 -2
- package/es/acl/Configuration/schemas/scopes.js +2 -0
- package/es/acl/index.d.ts +1 -0
- package/es/acl/index.js +2 -1
- package/es/acl/style.less +10 -0
- package/es/antd-config-provider/index.d.ts +3 -1
- package/es/antd-config-provider/index.js +25 -6
- package/es/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/es/antd-config-provider/loadConstrueLocale.js +293 -0
- package/es/api-client/APIClient.js +5 -0
- package/es/block-provider/FormBlockProvider.js +5 -2
- package/es/block-provider/KanbanBlockProvider.js +3 -3
- package/es/block-provider/SharedFilterProvider.d.ts +1 -0
- package/es/block-provider/SharedFilterProvider.js +22 -6
- package/es/collection-manager/CollectionHistoryProvider.js +14 -2
- package/es/collection-manager/hooks/useCollection.d.ts +1 -0
- package/es/collection-manager/hooks/useCollection.js +10 -0
- package/es/collection-manager/interfaces/index.d.ts +0 -1
- package/es/collection-manager/interfaces/index.js +0 -1
- package/es/collection-manager/interfaces/o2m.js +1 -0
- package/es/collection-manager/interfaces/properties/operators.js +7 -0
- package/es/collection-manager/interfaces/subTable.js +1 -0
- package/es/collection-manager/templates/calendar.js +5 -0
- package/es/formula/Expression.d.ts +2 -0
- package/es/formula/Expression.js +296 -0
- package/es/formula/Result.d.ts +2 -0
- package/es/formula/Result.js +91 -0
- package/es/formula/index.d.ts +6 -0
- package/es/formula/index.js +8 -0
- package/es/i18n/i18n.js +7 -12
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- package/es/locale/en_US.d.ts +108 -28
- package/es/locale/en_US.js +108 -28
- package/es/locale/index.d.ts +201 -4
- package/es/locale/index.js +191 -58
- package/es/locale/ja_JP.d.ts +4 -0
- package/es/locale/ja_JP.js +4 -0
- package/es/locale/zh_CN.d.ts +11 -1
- package/es/locale/zh_CN.js +12 -2
- package/es/plugin-manager/PluginManager.js +19 -13
- package/es/pm/PluginManagerLink.js +38 -43
- package/es/pm/index.d.ts +1 -0
- package/es/pm/index.js +84 -35
- package/es/record-provider/index.d.ts +1 -0
- package/es/record-provider/index.js +7 -4
- package/es/route-switch/antd/admin-layout/index.d.ts +1 -0
- package/es/route-switch/antd/admin-layout/index.js +4 -6
- package/es/schema-component/antd/action/Action.js +19 -16
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +24 -23
- package/es/schema-component/antd/cron/Cron.d.ts +0 -1
- package/es/schema-component/antd/cron/Cron.js +16 -19
- package/es/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/es/schema-component/antd/cron/locale/index.js +6 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +17 -23
- package/es/schema-component/antd/form-item/FormItem.js +5 -4
- package/es/schema-component/antd/index.d.ts +1 -2
- package/es/schema-component/antd/index.js +1 -2
- package/es/schema-component/antd/page/FixedBlock.d.ts +1 -1
- package/es/schema-component/antd/page/FixedBlock.js +70 -21
- package/es/schema-component/antd/page/Page.js +15 -10
- package/es/schema-component/antd/remote-select/RemoteSelect.js +12 -2
- package/es/schema-component/antd/table/Table.Array.js +1 -1
- package/es/schema-component/antd/table-v2/Table.js +13 -6
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +24 -8
- package/es/schema-component/hooks/useDesignable.d.ts +1 -1
- package/es/schema-component/hooks/useDesignable.js +45 -16
- package/es/schema-component/hooks/useFieldTitle.js +3 -1
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
- package/es/schema-initializer/utils.js +6 -9
- package/es/schema-templates/BlockTemplate.js +2 -2
- package/es/schema-templates/SchemaTemplateManagerProvider.js +1 -1
- package/es/system-settings/SystemSettingsShortcut.js +1 -1
- package/lib/acl/ACLProvider.d.ts +16 -2
- package/lib/acl/ACLProvider.js +283 -102
- package/lib/acl/Configuration/ConfigureCenter.d.ts +2 -0
- package/lib/acl/Configuration/ConfigureCenter.js +278 -0
- package/lib/acl/Configuration/MenuConfigure.js +3 -3
- package/lib/acl/Configuration/PermisionProvider.d.ts +4 -0
- package/lib/acl/Configuration/PermisionProvider.js +156 -0
- package/lib/acl/Configuration/RoleConfigure.js +107 -23
- package/lib/acl/Configuration/RoleTable.d.ts +1 -1
- package/lib/acl/Configuration/RoleTable.js +8 -4
- package/lib/acl/Configuration/RolesResourcesActions.js +2 -2
- package/lib/acl/Configuration/index.d.ts +1 -0
- package/lib/acl/Configuration/index.js +15 -1
- package/lib/acl/Configuration/schemas/roleCollections.js +41 -13
- package/lib/acl/Configuration/schemas/roles.js +47 -2
- package/lib/acl/Configuration/schemas/scopes.js +2 -0
- package/lib/acl/index.d.ts +1 -0
- package/lib/acl/index.js +3 -1
- package/lib/acl/style.less +10 -0
- package/lib/antd-config-provider/index.d.ts +3 -1
- package/lib/antd-config-provider/index.js +40 -6
- package/lib/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/lib/antd-config-provider/loadConstrueLocale.js +304 -0
- package/lib/api-client/APIClient.js +5 -0
- package/lib/block-provider/FormBlockProvider.js +9 -3
- package/lib/block-provider/KanbanBlockProvider.js +3 -3
- package/lib/block-provider/SharedFilterProvider.d.ts +1 -0
- package/lib/block-provider/SharedFilterProvider.js +26 -7
- package/lib/collection-manager/CollectionHistoryProvider.js +14 -1
- package/lib/collection-manager/hooks/useCollection.d.ts +1 -0
- package/lib/collection-manager/hooks/useCollection.js +10 -0
- package/lib/collection-manager/interfaces/index.d.ts +0 -1
- package/lib/collection-manager/interfaces/index.js +0 -13
- package/lib/collection-manager/interfaces/o2m.js +1 -0
- package/lib/collection-manager/interfaces/properties/operators.js +7 -0
- package/lib/collection-manager/interfaces/subTable.js +1 -0
- package/lib/collection-manager/templates/calendar.js +5 -0
- package/lib/formula/Expression.d.ts +2 -0
- package/lib/formula/Expression.js +319 -0
- package/lib/formula/Result.d.ts +2 -0
- package/lib/formula/Result.js +114 -0
- package/lib/formula/index.d.ts +6 -0
- package/lib/formula/index.js +22 -0
- package/lib/i18n/i18n.js +7 -14
- package/lib/index.d.ts +2 -1
- package/lib/index.js +26 -13
- package/lib/locale/en_US.d.ts +108 -28
- package/lib/locale/en_US.js +108 -28
- package/lib/locale/index.d.ts +201 -4
- package/lib/locale/index.js +197 -67
- package/lib/locale/ja_JP.d.ts +4 -0
- package/lib/locale/ja_JP.js +4 -0
- package/lib/locale/zh_CN.d.ts +11 -1
- package/lib/locale/zh_CN.js +12 -2
- package/lib/plugin-manager/PluginManager.js +20 -13
- package/lib/pm/PluginManagerLink.js +37 -43
- package/lib/pm/index.d.ts +1 -0
- package/lib/pm/index.js +90 -35
- package/lib/record-provider/index.d.ts +1 -0
- package/lib/record-provider/index.js +7 -4
- package/lib/route-switch/antd/admin-layout/index.d.ts +1 -0
- package/lib/route-switch/antd/admin-layout/index.js +5 -4
- package/lib/schema-component/antd/action/Action.js +19 -16
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +22 -21
- package/lib/schema-component/antd/cron/Cron.d.ts +0 -1
- package/lib/schema-component/antd/cron/Cron.js +19 -24
- package/lib/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/lib/schema-component/antd/cron/locale/index.js +18 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +16 -23
- package/lib/schema-component/antd/form-item/FormItem.js +6 -4
- package/lib/schema-component/antd/index.d.ts +1 -2
- package/lib/schema-component/antd/index.js +8 -21
- package/lib/schema-component/antd/page/FixedBlock.d.ts +1 -1
- package/lib/schema-component/antd/page/FixedBlock.js +71 -21
- package/lib/schema-component/antd/page/Page.js +14 -9
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +18 -3
- package/lib/schema-component/antd/table/Table.Array.js +1 -1
- package/lib/schema-component/antd/table-v2/Table.js +14 -6
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +25 -8
- package/lib/schema-component/hooks/useDesignable.d.ts +1 -1
- package/lib/schema-component/hooks/useDesignable.js +47 -18
- package/lib/schema-component/hooks/useFieldTitle.js +4 -1
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
- package/lib/schema-initializer/utils.js +6 -9
- package/lib/schema-templates/BlockTemplate.js +2 -2
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +1 -1
- package/lib/system-settings/SystemSettingsShortcut.js +1 -1
- package/package.json +6 -11
- package/es/collection-manager/interfaces/formula.d.ts +0 -2
- package/es/collection-manager/interfaces/formula.js +0 -74
- package/es/schema-component/antd/formula-input/Compute.d.ts +0 -3
- package/es/schema-component/antd/formula-input/Compute.js +0 -55
- package/es/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
- package/es/schema-component/antd/formula-input/FormulaInput.js +0 -167
- package/es/schema-component/antd/formula-input/index.d.ts +0 -1
- package/es/schema-component/antd/formula-input/index.js +0 -7
- package/lib/collection-manager/interfaces/formula.d.ts +0 -2
- package/lib/collection-manager/interfaces/formula.js +0 -83
- package/lib/schema-component/antd/formula-input/Compute.d.ts +0 -3
- package/lib/schema-component/antd/formula-input/Compute.js +0 -79
- package/lib/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
- package/lib/schema-component/antd/formula-input/FormulaInput.js +0 -191
- package/lib/schema-component/antd/formula-input/index.d.ts +0 -1
- package/lib/schema-component/antd/formula-input/index.js +0 -18
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.Expression = void 0;
|
|
9
|
+
|
|
10
|
+
var _css = require("@emotion/css");
|
|
11
|
+
|
|
12
|
+
var _core = require("@formily/core");
|
|
13
|
+
|
|
14
|
+
var _react = require("@formily/react");
|
|
15
|
+
|
|
16
|
+
var _antd = require("antd");
|
|
17
|
+
|
|
18
|
+
var _react2 = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _reactI18next = require("react-i18next");
|
|
21
|
+
|
|
22
|
+
var _templateObject;
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
+
|
|
30
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
31
|
+
|
|
32
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
33
|
+
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
36
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
42
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
43
|
+
|
|
44
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
45
|
+
|
|
46
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
47
|
+
|
|
48
|
+
function pasteHtml(html) {
|
|
49
|
+
var selectPastedContent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
50
|
+
var sel, range;
|
|
51
|
+
|
|
52
|
+
if (window.getSelection) {
|
|
53
|
+
// IE9 and non-IE
|
|
54
|
+
sel = window.getSelection();
|
|
55
|
+
|
|
56
|
+
if (sel.getRangeAt && sel.rangeCount) {
|
|
57
|
+
range = sel.getRangeAt(0);
|
|
58
|
+
range.deleteContents(); // Range.createContextualFragment() would be useful here but is
|
|
59
|
+
// only relatively recently standardized and is not supported in
|
|
60
|
+
// some browsers (IE9, for one)
|
|
61
|
+
|
|
62
|
+
var el = document.createElement('div');
|
|
63
|
+
el.innerHTML = html;
|
|
64
|
+
var frag = document.createDocumentFragment(),
|
|
65
|
+
node,
|
|
66
|
+
lastNode;
|
|
67
|
+
|
|
68
|
+
while (node = el.firstChild) {
|
|
69
|
+
lastNode = frag.appendChild(node);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var firstNode = frag.firstChild;
|
|
73
|
+
range.insertNode(frag); // Preserve the selection
|
|
74
|
+
|
|
75
|
+
if (lastNode) {
|
|
76
|
+
range = range.cloneRange();
|
|
77
|
+
range.setStartAfter(lastNode);
|
|
78
|
+
|
|
79
|
+
if (selectPastedContent) {
|
|
80
|
+
range.setStartBefore(firstNode);
|
|
81
|
+
} else {
|
|
82
|
+
range.collapse(true);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
sel.removeAllRanges();
|
|
86
|
+
sel.addRange(range);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
var getValue = function getValue(el) {
|
|
93
|
+
var _values$join;
|
|
94
|
+
|
|
95
|
+
var values = [];
|
|
96
|
+
|
|
97
|
+
var _iterator = _createForOfIteratorHelper(el.childNodes),
|
|
98
|
+
_step;
|
|
99
|
+
|
|
100
|
+
try {
|
|
101
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
102
|
+
var node = _step.value;
|
|
103
|
+
|
|
104
|
+
if (node.nodeName === 'SPAN') {
|
|
105
|
+
values.push("{{".concat(node['dataset']['key'], "}}"));
|
|
106
|
+
} else {
|
|
107
|
+
var _node$textContent, _node$textContent$tri;
|
|
108
|
+
|
|
109
|
+
values.push((_node$textContent = node.textContent) === null || _node$textContent === void 0 ? void 0 : (_node$textContent$tri = _node$textContent.trim) === null || _node$textContent$tri === void 0 ? void 0 : _node$textContent$tri.call(_node$textContent));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} catch (err) {
|
|
113
|
+
_iterator.e(err);
|
|
114
|
+
} finally {
|
|
115
|
+
_iterator.f();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
var text = (_values$join = values.join(' ')) === null || _values$join === void 0 ? void 0 : _values$join.replace(/\s+/g, ' ').trim();
|
|
119
|
+
return " ".concat(text, " ");
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var renderExp = function renderExp(exp) {
|
|
123
|
+
var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
124
|
+
return exp.replace(/{{([^}]+)}}/g, function (_, i) {
|
|
125
|
+
return scope[i.trim()] || '';
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
var Expression = function Expression(props) {
|
|
130
|
+
var evaluate = props.evaluate,
|
|
131
|
+
value = props.value,
|
|
132
|
+
supports = props.supports,
|
|
133
|
+
useCurrentFields = props.useCurrentFields;
|
|
134
|
+
var field = (0, _react.useField)();
|
|
135
|
+
|
|
136
|
+
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
137
|
+
t = _useTranslation.t;
|
|
138
|
+
|
|
139
|
+
var fields = useCurrentFields();
|
|
140
|
+
var inputRef = (0, _react2.useRef)();
|
|
141
|
+
|
|
142
|
+
var _useState = (0, _react2.useState)(false),
|
|
143
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
144
|
+
changed = _useState2[0],
|
|
145
|
+
setChanged = _useState2[1];
|
|
146
|
+
|
|
147
|
+
var onChange = function onChange(value) {
|
|
148
|
+
setChanged(true);
|
|
149
|
+
props.onChange(value);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var numColumns = new Map();
|
|
153
|
+
var scope = {};
|
|
154
|
+
fields.filter(function (field) {
|
|
155
|
+
return supports.includes(field.interface);
|
|
156
|
+
}).forEach(function (field) {
|
|
157
|
+
numColumns.set(field.name, field.uiSchema.title);
|
|
158
|
+
scope[field.name] = 1;
|
|
159
|
+
});
|
|
160
|
+
var keys = Array.from(numColumns.keys());
|
|
161
|
+
|
|
162
|
+
var _useState3 = (0, _react2.useState)(function () {
|
|
163
|
+
var scope = {};
|
|
164
|
+
|
|
165
|
+
var _iterator2 = _createForOfIteratorHelper(keys),
|
|
166
|
+
_step2;
|
|
167
|
+
|
|
168
|
+
try {
|
|
169
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
170
|
+
var key = _step2.value;
|
|
171
|
+
var val = numColumns.get(key);
|
|
172
|
+
scope[key] = " <span class=\"ant-tag\" style=\"margin: 0 3px;\" contentEditable=\"false\" data-key=\"".concat(key, "\">").concat(val, "</span> ");
|
|
173
|
+
}
|
|
174
|
+
} catch (err) {
|
|
175
|
+
_iterator2.e(err);
|
|
176
|
+
} finally {
|
|
177
|
+
_iterator2.f();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return renderExp(value || '', scope);
|
|
181
|
+
}),
|
|
182
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
183
|
+
html = _useState4[0],
|
|
184
|
+
setHtml = _useState4[1];
|
|
185
|
+
|
|
186
|
+
(0, _react2.useEffect)(function () {
|
|
187
|
+
if (changed) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
var scope = {};
|
|
192
|
+
|
|
193
|
+
var _iterator3 = _createForOfIteratorHelper(keys),
|
|
194
|
+
_step3;
|
|
195
|
+
|
|
196
|
+
try {
|
|
197
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
198
|
+
var key = _step3.value;
|
|
199
|
+
|
|
200
|
+
var _val = numColumns.get(key);
|
|
201
|
+
|
|
202
|
+
scope[key] = " <span class=\"ant-tag\" style=\"margin: 0 3px;\" contentEditable=\"false\" data-key=\"".concat(key, "\">").concat(_val, "</span> ");
|
|
203
|
+
}
|
|
204
|
+
} catch (err) {
|
|
205
|
+
_iterator3.e(err);
|
|
206
|
+
} finally {
|
|
207
|
+
_iterator3.f();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
var val = renderExp(value || '', scope);
|
|
211
|
+
setHtml(val);
|
|
212
|
+
}, [value]);
|
|
213
|
+
|
|
214
|
+
var menu = /*#__PURE__*/_react2.default.createElement(_antd.Menu, null, keys.length > 0 ? keys.map(function (key) {
|
|
215
|
+
return /*#__PURE__*/_react2.default.createElement(_antd.Menu.Item, {
|
|
216
|
+
disabled: true,
|
|
217
|
+
key: key
|
|
218
|
+
}, /*#__PURE__*/_react2.default.createElement("button", {
|
|
219
|
+
onClick: function () {
|
|
220
|
+
var _onClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(args) {
|
|
221
|
+
var val, text;
|
|
222
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
223
|
+
while (1) {
|
|
224
|
+
switch (_context.prev = _context.next) {
|
|
225
|
+
case 0:
|
|
226
|
+
inputRef.current.focus();
|
|
227
|
+
val = numColumns.get(key);
|
|
228
|
+
pasteHtml(" <span class=\"ant-tag\" style=\"margin: 0 3px;\" contentEditable=\"false\" data-key=\"".concat(key, "\">").concat(val, "</span> "));
|
|
229
|
+
text = getValue(inputRef.current);
|
|
230
|
+
onChange(text);
|
|
231
|
+
console.log('onChange', text);
|
|
232
|
+
|
|
233
|
+
case 6:
|
|
234
|
+
case "end":
|
|
235
|
+
return _context.stop();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}, _callee);
|
|
239
|
+
}));
|
|
240
|
+
|
|
241
|
+
function onClick(_x) {
|
|
242
|
+
return _onClick.apply(this, arguments);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return onClick;
|
|
246
|
+
}()
|
|
247
|
+
}, numColumns.get(key)));
|
|
248
|
+
}) : /*#__PURE__*/_react2.default.createElement(_antd.Menu.Item, {
|
|
249
|
+
disabled: true,
|
|
250
|
+
key: 0
|
|
251
|
+
}, t('No available fields')));
|
|
252
|
+
|
|
253
|
+
(0, _react.useFormEffects)(function () {
|
|
254
|
+
(0, _core.onFormSubmitValidateStart)(function () {
|
|
255
|
+
try {
|
|
256
|
+
evaluate(field.value, scope);
|
|
257
|
+
field.feedbacks = [];
|
|
258
|
+
} catch (e) {
|
|
259
|
+
console.error(field.value, scope, e.message);
|
|
260
|
+
field.setFeedback({
|
|
261
|
+
type: 'error',
|
|
262
|
+
code: 'FormulaError',
|
|
263
|
+
messages: [t('Formula error.')]
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
return /*#__PURE__*/_react2.default.createElement(_antd.Dropdown, {
|
|
269
|
+
trigger: ['click'],
|
|
270
|
+
overlay: menu,
|
|
271
|
+
overlayClassName: (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-dropdown-menu-item {\n padding: 0;\n }\n button {\n cursor: pointer;\n padding: 5px 12px;\n text-align: left;\n color: rgba(0, 0, 0, 0.85);\n width: 100%;\n line-height: inherit;\n height: auto;\n border: 0px;\n background-color: transparent;\n &:hover {\n background-color: #f5f5f5;\n }\n }\n "])))
|
|
272
|
+
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
273
|
+
onKeyDown: function onKeyDown(e) {
|
|
274
|
+
var text = getValue(e.currentTarget);
|
|
275
|
+
|
|
276
|
+
if (e.key === 'Backspace') {
|
|
277
|
+
if (text && keys.map(function (k) {
|
|
278
|
+
return "{{".concat(k, "}}");
|
|
279
|
+
}).includes(text)) {
|
|
280
|
+
inputRef.current.innerHTML = ' ';
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
onKeyUp: function onKeyUp(e) {
|
|
285
|
+
var text = getValue(e.currentTarget);
|
|
286
|
+
|
|
287
|
+
if (e.key === 'Backspace') {// pasteHtml(' ');
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
onChange(text);
|
|
291
|
+
},
|
|
292
|
+
// onClick={(e) => {
|
|
293
|
+
// const text = getValue(e.currentTarget);
|
|
294
|
+
// onChange(text);
|
|
295
|
+
// console.log('onChange', text);
|
|
296
|
+
// }}
|
|
297
|
+
onBlur: function onBlur(e) {
|
|
298
|
+
var text = getValue(e.currentTarget);
|
|
299
|
+
onChange(text);
|
|
300
|
+
},
|
|
301
|
+
onInput: function onInput(e) {
|
|
302
|
+
var text = getValue(e.currentTarget);
|
|
303
|
+
onChange(text);
|
|
304
|
+
},
|
|
305
|
+
className: 'ant-input',
|
|
306
|
+
style: {
|
|
307
|
+
display: 'block'
|
|
308
|
+
},
|
|
309
|
+
ref: inputRef,
|
|
310
|
+
contentEditable: true,
|
|
311
|
+
dangerouslySetInnerHTML: {
|
|
312
|
+
__html: html
|
|
313
|
+
}
|
|
314
|
+
}));
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
exports.Expression = Expression;
|
|
318
|
+
var _default = Expression;
|
|
319
|
+
exports.default = _default;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.Result = void 0;
|
|
9
|
+
|
|
10
|
+
var _core = require("@formily/core");
|
|
11
|
+
|
|
12
|
+
var _react = require("@formily/react");
|
|
13
|
+
|
|
14
|
+
var _client = require("@nocobase/utils/client");
|
|
15
|
+
|
|
16
|
+
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
17
|
+
|
|
18
|
+
var math = _interopRequireWildcard(require("mathjs"));
|
|
19
|
+
|
|
20
|
+
var _react2 = _interopRequireWildcard(require("react"));
|
|
21
|
+
|
|
22
|
+
var _collectionManager = require("../collection-manager");
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39
|
+
|
|
40
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
|
+
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var ReadPretty = function ReadPretty(props) {
|
|
49
|
+
var _props$options;
|
|
50
|
+
|
|
51
|
+
if ((props === null || props === void 0 ? void 0 : (_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.dataType) !== 'string') {
|
|
52
|
+
return /*#__PURE__*/_react2.default.createElement("div", null, (0, _client.toFixedByStep)(props.value, props.step));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return /*#__PURE__*/_react2.default.createElement("div", null, props.value);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var Input = function Input(props) {
|
|
59
|
+
var evaluate = props.evaluate,
|
|
60
|
+
options = props.options;
|
|
61
|
+
var dataType = options.dataType,
|
|
62
|
+
expression = options.expression;
|
|
63
|
+
var form = (0, _react.useForm)();
|
|
64
|
+
|
|
65
|
+
var val = function val() {
|
|
66
|
+
var scope = (0, _cloneDeep.default)(form.values);
|
|
67
|
+
|
|
68
|
+
try {
|
|
69
|
+
var result = evaluate(expression, scope);
|
|
70
|
+
result = (0, math.isNumber)(result) && Number.isFinite(result) ? math.round(result, 9) : result;
|
|
71
|
+
return result;
|
|
72
|
+
} catch (error) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var _useState = (0, _react2.useState)(function () {
|
|
78
|
+
return val();
|
|
79
|
+
}),
|
|
80
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
81
|
+
value = _useState2[0],
|
|
82
|
+
setVal = _useState2[1];
|
|
83
|
+
|
|
84
|
+
(0, _react.useFormEffects)(function () {
|
|
85
|
+
(0, _core.onFormValuesChange)(function () {
|
|
86
|
+
setVal(val());
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
if (dataType !== 'string') {
|
|
91
|
+
return /*#__PURE__*/_react2.default.createElement("div", null, (0, _client.toFixedByStep)(value, props.step));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return /*#__PURE__*/_react2.default.createElement("div", null, value);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var Result = function Result(props) {
|
|
98
|
+
var field = (0, _react.useField)();
|
|
99
|
+
|
|
100
|
+
var _useCollection = (0, _collectionManager.useCollection)(),
|
|
101
|
+
getField = _useCollection.getField;
|
|
102
|
+
|
|
103
|
+
var fieldSchema = (0, _react.useFieldSchema)();
|
|
104
|
+
var options = getField(fieldSchema.name);
|
|
105
|
+
return field.readPretty ? /*#__PURE__*/_react2.default.createElement(ReadPretty, _objectSpread(_objectSpread({}, props), {}, {
|
|
106
|
+
options: options
|
|
107
|
+
})) : /*#__PURE__*/_react2.default.createElement(Input, _objectSpread(_objectSpread({}, props), {}, {
|
|
108
|
+
options: options
|
|
109
|
+
}));
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
exports.Result = Result;
|
|
113
|
+
var _default = Result;
|
|
114
|
+
exports.default = _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Formula = void 0;
|
|
7
|
+
|
|
8
|
+
var _Expression = _interopRequireDefault(require("./Expression"));
|
|
9
|
+
|
|
10
|
+
var _Result = _interopRequireDefault(require("./Result"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
var Formula = function Formula() {
|
|
15
|
+
return null;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.Formula = Formula;
|
|
19
|
+
Formula.Result = _Result.default;
|
|
20
|
+
Formula.Expression = _Expression.default;
|
|
21
|
+
var _default = Formula;
|
|
22
|
+
exports.default = _default;
|
package/lib/i18n/i18n.js
CHANGED
|
@@ -7,8 +7,6 @@ exports.i18n = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _i18next = _interopRequireDefault(require("i18next"));
|
|
9
9
|
|
|
10
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
11
|
-
|
|
12
10
|
var _reactI18next = require("react-i18next");
|
|
13
11
|
|
|
14
12
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
@@ -24,27 +22,22 @@ var resources = {};
|
|
|
24
22
|
Object.keys(_locale.default).forEach(function (lang) {
|
|
25
23
|
resources[lang] = _locale.default[lang].resources;
|
|
26
24
|
});
|
|
27
|
-
i18n.use(
|
|
25
|
+
i18n // .use(Backend)
|
|
26
|
+
.use(_reactI18next.initReactI18next).init({
|
|
28
27
|
lng: localStorage.getItem('NOCOBASE_LOCALE') || 'en-US',
|
|
29
28
|
// debug: true,
|
|
30
29
|
defaultNS: 'client',
|
|
30
|
+
// backend: {
|
|
31
|
+
// // for all available options read the backend's repository readme file
|
|
32
|
+
// loadPath: '/api/locales/{{lng}}/{{ns}}.json',
|
|
33
|
+
// },
|
|
31
34
|
// parseMissingKeyHandler: (key) => {
|
|
32
35
|
// console.log('parseMissingKeyHandler', `'${key}': '${key}',`);
|
|
33
36
|
// return key;
|
|
34
37
|
// },
|
|
35
38
|
// ns: ['client'],
|
|
36
|
-
resources:
|
|
39
|
+
resources: {}
|
|
37
40
|
});
|
|
38
|
-
|
|
39
|
-
function setMomentLng(language) {
|
|
40
|
-
var lng = _locale.default[language || 'en-US'].moment || 'en';
|
|
41
|
-
log(lng);
|
|
42
|
-
|
|
43
|
-
_moment.default.locale(lng);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
setMomentLng(localStorage.getItem('NOCOBASE_LOCALE'));
|
|
47
41
|
i18n.on('languageChanged', function (lng) {
|
|
48
42
|
localStorage.setItem('NOCOBASE_LOCALE', lng);
|
|
49
|
-
setMomentLng(lng);
|
|
50
43
|
});
|
package/lib/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import './global.less';
|
|
|
3
3
|
export * from './acl';
|
|
4
4
|
export * from './antd-config-provider';
|
|
5
5
|
export * from './api-client';
|
|
6
|
+
export * from './appInfo';
|
|
6
7
|
export * from './application';
|
|
7
8
|
export * from './async-data-provider';
|
|
8
9
|
export * from './block-provider';
|
|
@@ -10,6 +11,7 @@ export * from './board';
|
|
|
10
11
|
export * from './china-region';
|
|
11
12
|
export * from './collection-manager';
|
|
12
13
|
export * from './document-title';
|
|
14
|
+
export * from './formula';
|
|
13
15
|
export * from './i18n';
|
|
14
16
|
export * from './icon';
|
|
15
17
|
export * from './plugin-manager';
|
|
@@ -24,4 +26,3 @@ export * from './schema-templates';
|
|
|
24
26
|
export * from './settings-form';
|
|
25
27
|
export * from './system-settings';
|
|
26
28
|
export * from './user';
|
|
27
|
-
export * from './appInfo';
|
package/lib/index.js
CHANGED
|
@@ -47,6 +47,19 @@ Object.keys(_apiClient).forEach(function (key) {
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
+
var _appInfo = require("./appInfo");
|
|
51
|
+
|
|
52
|
+
Object.keys(_appInfo).forEach(function (key) {
|
|
53
|
+
if (key === "default" || key === "__esModule") return;
|
|
54
|
+
if (key in exports && exports[key] === _appInfo[key]) return;
|
|
55
|
+
Object.defineProperty(exports, key, {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function get() {
|
|
58
|
+
return _appInfo[key];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
50
63
|
var _application = require("./application");
|
|
51
64
|
|
|
52
65
|
Object.keys(_application).forEach(function (key) {
|
|
@@ -138,6 +151,19 @@ Object.keys(_documentTitle).forEach(function (key) {
|
|
|
138
151
|
});
|
|
139
152
|
});
|
|
140
153
|
|
|
154
|
+
var _formula = require("./formula");
|
|
155
|
+
|
|
156
|
+
Object.keys(_formula).forEach(function (key) {
|
|
157
|
+
if (key === "default" || key === "__esModule") return;
|
|
158
|
+
if (key in exports && exports[key] === _formula[key]) return;
|
|
159
|
+
Object.defineProperty(exports, key, {
|
|
160
|
+
enumerable: true,
|
|
161
|
+
get: function get() {
|
|
162
|
+
return _formula[key];
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
|
|
141
167
|
var _i18n = require("./i18n");
|
|
142
168
|
|
|
143
169
|
Object.keys(_i18n).forEach(function (key) {
|
|
@@ -318,17 +344,4 @@ Object.keys(_user).forEach(function (key) {
|
|
|
318
344
|
return _user[key];
|
|
319
345
|
}
|
|
320
346
|
});
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
var _appInfo = require("./appInfo");
|
|
324
|
-
|
|
325
|
-
Object.keys(_appInfo).forEach(function (key) {
|
|
326
|
-
if (key === "default" || key === "__esModule") return;
|
|
327
|
-
if (key in exports && exports[key] === _appInfo[key]) return;
|
|
328
|
-
Object.defineProperty(exports, key, {
|
|
329
|
-
enumerable: true,
|
|
330
|
-
get: function get() {
|
|
331
|
-
return _appInfo[key];
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
347
|
});
|