@teamix/pro 1.5.47 → 1.5.48-beta.1
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/dist/pro.js +111 -32
- package/dist/pro.min.js +1 -1
- package/es/form/ProForm/index.d.ts +2 -2
- package/es/form/ProForm/index.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/utils/aspect.d.ts +2 -0
- package/es/utils/aspect.js +63 -0
- package/lib/form/ProForm/index.d.ts +2 -2
- package/lib/form/ProForm/index.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/utils/aspect.d.ts +2 -0
- package/lib/utils/aspect.js +70 -0
- package/package.json +1 -1
package/es/form/ProForm/index.js
CHANGED
|
@@ -24,6 +24,7 @@ import validateLocale from '../locales/validate';
|
|
|
24
24
|
import './index.scss';
|
|
25
25
|
import FormItem2 from '../Components/FormItem2';
|
|
26
26
|
import SelectTable2 from '../Components/SelectTable2';
|
|
27
|
+
import { ProComponentAspect } from '../../utils/aspect';
|
|
27
28
|
registerValidateLocale(validateLocale);
|
|
28
29
|
var formilyComponents = {
|
|
29
30
|
FormLayout: FormLayout,
|
|
@@ -151,4 +152,4 @@ ProForm.defaultProps = {
|
|
|
151
152
|
breakpoints: true,
|
|
152
153
|
labelAlign: 'left'
|
|
153
154
|
};
|
|
154
|
-
export default ProForm;
|
|
155
|
+
export default ProComponentAspect(ProForm, 'ProForm');
|
package/es/index.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export * from './sidebar';
|
|
|
30
30
|
export * from './utils';
|
|
31
31
|
export * from './timeline';
|
|
32
32
|
export * from './image';
|
|
33
|
-
declare const version = "1.5.
|
|
33
|
+
declare const version = "1.5.48-beta.1";
|
|
34
34
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, ProImage, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
12
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
13
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
15
|
+
import React from 'react';
|
|
16
|
+
export function ProComponentAspect(WrapComponent, componentName) {
|
|
17
|
+
return /*#__PURE__*/function (_React$Component) {
|
|
18
|
+
_inherits(ProComponent, _React$Component);
|
|
19
|
+
var _super = _createSuper(ProComponent);
|
|
20
|
+
function ProComponent() {
|
|
21
|
+
var _this;
|
|
22
|
+
_classCallCheck(this, ProComponent);
|
|
23
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
|
+
args[_key] = arguments[_key];
|
|
25
|
+
}
|
|
26
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
27
|
+
_this.state = {
|
|
28
|
+
name: 'alien'
|
|
29
|
+
};
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
_createClass(ProComponent, [{
|
|
33
|
+
key: "componentDidMount",
|
|
34
|
+
value: function componentDidMount() {
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
if (!!window.ProComponentBeforeAspect) {
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
if (window.ProComponentBeforeAspectDebugger) {
|
|
39
|
+
console.log('HOC', componentName);
|
|
40
|
+
console.log('Props', this.props);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
key: "render",
|
|
46
|
+
value: function render() {
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
if (window.ProComponentBeforeAspect) {
|
|
49
|
+
var _window$ProComponentB, _window;
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
var props = (_window$ProComponentB = (_window = window).ProComponentBeforeAspect) === null || _window$ProComponentB === void 0 ? void 0 : _window$ProComponentB.call(_window, componentName, this.props);
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
if (window.ProComponentBeforeAspectDebugger) {
|
|
54
|
+
console.log('NewProps', props);
|
|
55
|
+
}
|
|
56
|
+
return /*#__PURE__*/React.createElement(WrapComponent, _objectSpread({}, props));
|
|
57
|
+
}
|
|
58
|
+
return /*#__PURE__*/React.createElement(WrapComponent, _objectSpread({}, this.props));
|
|
59
|
+
}
|
|
60
|
+
}]);
|
|
61
|
+
return ProComponent;
|
|
62
|
+
}(React.Component);
|
|
63
|
+
}
|
|
@@ -25,6 +25,7 @@ var _validate = _interopRequireDefault(require("../locales/validate"));
|
|
|
25
25
|
require("./index.scss");
|
|
26
26
|
var _FormItem = _interopRequireDefault(require("../Components/FormItem2"));
|
|
27
27
|
var _SelectTable = _interopRequireDefault(require("../Components/SelectTable2"));
|
|
28
|
+
var _aspect = require("../../utils/aspect");
|
|
28
29
|
var _excluded = ["form", "initialValues", "initialRequest", "scope", "context", "components", "onChange", "onChangeType", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst", "schema", "children"];
|
|
29
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
31
|
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); }
|
|
@@ -161,5 +162,5 @@ ProForm.defaultProps = {
|
|
|
161
162
|
breakpoints: true,
|
|
162
163
|
labelAlign: 'left'
|
|
163
164
|
};
|
|
164
|
-
var _default = ProForm;
|
|
165
|
+
var _default = (0, _aspect.ProComponentAspect)(ProForm, 'ProForm');
|
|
165
166
|
exports.default = _default;
|
package/lib/index.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export * from './sidebar';
|
|
|
30
30
|
export * from './utils';
|
|
31
31
|
export * from './timeline';
|
|
32
32
|
export * from './image';
|
|
33
|
-
declare const version = "1.5.
|
|
33
|
+
declare const version = "1.5.48-beta.1";
|
|
34
34
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, ProImage, hooks, nocode, templates, utils, };
|
package/lib/index.js
CHANGED
|
@@ -299,7 +299,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
299
299
|
if (!((_window = window) === null || _window === void 0 ? void 0 : _window.TEAMIXPRO_WITHOUT_ICON)) {
|
|
300
300
|
_icon.default.setConfig(_utils.default.getTeamixIconConfig());
|
|
301
301
|
}
|
|
302
|
-
var version = '1.5.
|
|
302
|
+
var version = '1.5.48-beta.1';
|
|
303
303
|
// By TeamixTest
|
|
304
304
|
exports.version = version;
|
|
305
305
|
window.postMessage({
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ProComponentAspect = ProComponentAspect;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
17
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
18
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
19
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
|
+
function ProComponentAspect(WrapComponent, componentName) {
|
|
24
|
+
return /*#__PURE__*/function (_React$Component) {
|
|
25
|
+
_inherits(ProComponent, _React$Component);
|
|
26
|
+
var _super = _createSuper(ProComponent);
|
|
27
|
+
function ProComponent() {
|
|
28
|
+
var _this;
|
|
29
|
+
_classCallCheck(this, ProComponent);
|
|
30
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
+
args[_key] = arguments[_key];
|
|
32
|
+
}
|
|
33
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
34
|
+
_this.state = {
|
|
35
|
+
name: 'alien'
|
|
36
|
+
};
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
_createClass(ProComponent, [{
|
|
40
|
+
key: "componentDidMount",
|
|
41
|
+
value: function componentDidMount() {
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
if (!!window.ProComponentBeforeAspect) {
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
if (window.ProComponentBeforeAspectDebugger) {
|
|
46
|
+
console.log('HOC', componentName);
|
|
47
|
+
console.log('Props', this.props);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "render",
|
|
53
|
+
value: function render() {
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
if (window.ProComponentBeforeAspect) {
|
|
56
|
+
var _window$ProComponentB, _window;
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
var props = (_window$ProComponentB = (_window = window).ProComponentBeforeAspect) === null || _window$ProComponentB === void 0 ? void 0 : _window$ProComponentB.call(_window, componentName, this.props);
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
if (window.ProComponentBeforeAspectDebugger) {
|
|
61
|
+
console.log('NewProps', props);
|
|
62
|
+
}
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(WrapComponent, _objectSpread({}, props));
|
|
64
|
+
}
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement(WrapComponent, _objectSpread({}, this.props));
|
|
66
|
+
}
|
|
67
|
+
}]);
|
|
68
|
+
return ProComponent;
|
|
69
|
+
}(_react.default.Component);
|
|
70
|
+
}
|