@cloud-app-dev/vidc 2.0.0-alpha.16 → 2.0.0-alpha.17

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.
Files changed (57) hide show
  1. package/es/AppContext/Sync.d.ts +0 -1
  2. package/es/AppRedirect/index.d.ts +0 -1
  3. package/es/AppRoute/index.js +1 -1
  4. package/es/CheckGroupFixed/index.d.ts +0 -1
  5. package/es/DeviceSelect/TreeType.d.ts +0 -1
  6. package/es/DeviceSelect/demo.d.ts +0 -1
  7. package/es/DeviceSelect/index.d.ts +0 -1
  8. package/es/Dict/desc.js +1 -1
  9. package/es/Drawer/Footer.d.ts +0 -1
  10. package/es/Drawer/index.d.ts +0 -1
  11. package/es/Input/index.d.ts +0 -1
  12. package/es/List/CheckExt.d.ts +0 -1
  13. package/es/List/DynamicDeviceList/Demo.d.ts +0 -1
  14. package/es/List/DynamicDeviceList/index.d.ts +0 -1
  15. package/es/List/VList/index.d.ts +0 -1
  16. package/es/List/index.d.ts +0 -1
  17. package/es/LoaderApp/index.js +16 -5
  18. package/es/LoaderApp/utils.d.ts +2 -1
  19. package/es/LoaderApp/utils.js +4 -2
  20. package/es/Modal/index.d.ts +6 -7
  21. package/es/Picture/component/DefaultRects/RectInfo.d.ts +0 -1
  22. package/es/Picture/component/DefaultRects/index.d.ts +0 -1
  23. package/es/Picture/component/DrawRect/index.d.ts +0 -1
  24. package/es/Picture/component/MoveContent/index.js +1 -1
  25. package/es/Picture/component/RectMenu/index.d.ts +0 -1
  26. package/es/Picture/component/WheelScale/index.d.ts +0 -1
  27. package/es/Picture/index.d.ts +0 -1
  28. package/es/Progress/index.d.ts +0 -1
  29. package/es/Tree/BaseTree/demo.d.ts +0 -1
  30. package/es/Tree/demo.d.ts +0 -1
  31. package/es/UserSelect/demo.d.ts +0 -1
  32. package/es/WorkerFlow/Form/Approver.d.ts +0 -1
  33. package/es/WorkerFlow/Form/Condition.d.ts +0 -1
  34. package/es/WorkerFlow/Form/EmptyUserSet.d.ts +0 -1
  35. package/es/WorkerFlow/Form/FormAuth.d.ts +0 -1
  36. package/es/WorkerFlow/Form/GroupList.d.ts +0 -1
  37. package/es/WorkerFlow/Form/GroupSelect.d.ts +0 -1
  38. package/es/WorkerFlow/Form/Handle.d.ts +0 -1
  39. package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +0 -1
  40. package/es/WorkerFlow/Form/Notifier.d.ts +0 -1
  41. package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +0 -1
  42. package/es/WorkerFlow/Form/UserSelect.d.ts +0 -1
  43. package/es/WorkerFlow/Form/UserSet.d.ts +0 -1
  44. package/es/WorkerFlow/Form/UsersHandleType.d.ts +0 -1
  45. package/es/WorkerFlow/Nodes/Add.d.ts +0 -1
  46. package/es/WorkerFlow/Nodes/AddOption.d.ts +0 -1
  47. package/es/WorkerFlow/Nodes/AddOptionList.d.ts +0 -1
  48. package/es/WorkerFlow/Nodes/Approver.d.ts +0 -1
  49. package/es/WorkerFlow/Nodes/Condition.d.ts +0 -1
  50. package/es/WorkerFlow/Nodes/End.d.ts +0 -1
  51. package/es/WorkerFlow/Nodes/Handle.d.ts +0 -1
  52. package/es/WorkerFlow/Nodes/Node.d.ts +0 -1
  53. package/es/WorkerFlow/Nodes/Notifier.d.ts +0 -1
  54. package/es/WorkerFlow/Nodes/Render.d.ts +0 -1
  55. package/es/WorkerFlow/Nodes/Start.d.ts +0 -1
  56. package/es/WorkerFlow/Nodes/TitleElement.d.ts +0 -1
  57. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AppContextInterface } from './interface';
3
2
  interface ISyncProps {
4
3
  stateChange: (options: AppContextInterface) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as H from 'history';
3
2
  import './index.less';
4
3
  interface AppRedirectProps {
@@ -9,7 +9,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
9
9
 
10
10
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
11
11
 
12
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
12
+ 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); }
13
13
 
14
14
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
15
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export interface SourceDictType {
4
3
  value?: string | number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface ITreeTypeProps {
3
2
  mode: string;
4
3
  onChange: (mode: string) => void;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare function App(): JSX.Element;
3
2
  export default App;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DeviceItemType } from '../core';
3
2
  import './index.less';
4
3
  interface IDeviceSelectProps {
package/es/Dict/desc.js CHANGED
@@ -6,7 +6,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
6
6
 
7
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
8
 
9
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ 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); }
10
10
 
11
11
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
12
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IFooterProps } from './interface';
3
2
  import './index.less';
4
3
  declare function Footer({ onClose, cancelText, okText, onOk }: IFooterProps): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DrawerProps } from './interface';
3
2
  import './index.less';
4
3
  declare function ZVDrawer({ style, getContainer, onClose, className, onOk, cancelText, okText, children, ...props }: DrawerProps): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputProps } from 'antd';
3
2
  import './index.less';
4
3
  interface IInputProps extends Omit<InputProps, 'onChange'> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface ICheckExtProps {
3
2
  selectCount: number;
4
3
  count: number;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare function App(): JSX.Element;
3
2
  export default App;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IDynamicDeviceListProps } from './interface';
3
2
  import './index.less';
4
3
  declare function DynamicDeviceList({ onClick, checkedKeys, defaultCheckedIds, onChecked, params, title, onKeywordChange, limit, itemHeight }: IDynamicDeviceListProps): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface IVListProps<T> {
4
3
  data?: Array<T>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CheckListProps } from './interface';
3
2
  import './index.less';
4
3
  declare function List(props: CheckListProps<any>): JSX.Element;
@@ -42,18 +42,29 @@ function LoaderApp(_ref) {
42
42
  var config = getMicroConfig(appConfig, appProps, domRef.current);
43
43
 
44
44
  if (!config) {
45
- console.debug('微应用不存在', 'config ->', appConfig, 'appProps ->', appProps);
45
+ console.error('微应用不存在', 'config ->', appConfig, 'appProps ->', appProps);
46
+ return undefined;
47
+ }
48
+
49
+ if (!domRef.current || !styleRef.current) {
50
+ console.error('LoaderApp组件未正常初始化!', 'config ->', appConfig, 'appProps ->', appProps);
46
51
  return undefined;
47
52
  }
48
53
 
49
54
  var props = Object.assign(Object.assign({}, appProps), {
50
55
  container: domRef.current
51
56
  });
57
+ var routerPrefix = config.routerPrefix;
58
+
59
+ var _appConfig$resource = _slicedToArray(appConfig.resource, 2),
60
+ script = _appConfig$resource[0],
61
+ style = _appConfig$resource[1];
62
+
52
63
  var options = {
53
- script: appConfig.resource[0],
54
- style: appConfig.resource[1],
55
- name: config.name,
56
- prefix: ".".concat(appConfig.name, "-").concat(id),
64
+ script: script,
65
+ style: style,
66
+ name: routerPrefix,
67
+ prefix: ".".concat(routerPrefix, "-").concat(id),
57
68
  styleNode: styleRef.current
58
69
  };
59
70
  LoaderModule(options).then(function (mod) {
@@ -1,6 +1,7 @@
1
1
  import { AppItemType } from '../Config/interface';
2
2
  export declare const getMicroConfig: (appConfig: AppItemType, appProps: any, container: HTMLDivElement) => {
3
- name: string;
3
+ title: string;
4
+ routerPrefix: string;
4
5
  container: HTMLDivElement;
5
6
  props: any;
6
7
  entry: {
@@ -3,14 +3,16 @@ export var getMicroConfig = function getMicroConfig() {
3
3
  var appProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4
4
  var container = arguments.length > 2 ? arguments[2] : undefined;
5
5
  var routerPrefix = appConfig.routerPrefix,
6
- resource = appConfig.resource;
6
+ resource = appConfig.resource,
7
+ name = appConfig.name;
7
8
  var microAppEntry = {
8
9
  scripts: [resource[0]],
9
10
  styles: [resource[1]],
10
11
  html: "<div id=\"".concat(routerPrefix, "\" style=\"height:100%\"></div>")
11
12
  };
12
13
  return {
13
- name: routerPrefix,
14
+ title: name,
15
+ routerPrefix: routerPrefix,
14
16
  container: container,
15
17
  props: appProps,
16
18
  entry: microAppEntry
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ModalProps } from './interface';
3
2
  import './index.less';
4
3
  declare function Modal({ children, className, style, getContainer, ...props }: ModalProps): JSX.Element;
@@ -7,12 +6,12 @@ declare namespace Modal {
7
6
  className: string;
8
7
  getContainer: boolean;
9
8
  };
10
- var info;
11
- var success;
12
- var error;
13
- var warn;
14
- var warning;
15
- var confirm;
9
+ var info: import("antd/lib/modal/confirm").ModalFunc;
10
+ var success: import("antd/lib/modal/confirm").ModalFunc;
11
+ var error: import("antd/lib/modal/confirm").ModalFunc;
12
+ var warn: import("antd/lib/modal/confirm").ModalFunc;
13
+ var warning: import("antd/lib/modal/confirm").ModalFunc;
14
+ var confirm: import("antd/lib/modal/confirm").ModalFunc;
16
15
  var destroyAll: () => void;
17
16
  }
18
17
  export default Modal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RectType } from '../../interface';
3
2
  interface IRectInfoProps {
4
3
  item: RectType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RectType } from '../../interface';
3
2
  import './index.less';
4
3
  interface IDefaultRectsProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuRectType } from '../../interface';
3
2
  import './index.less';
4
3
  interface IDrawRectProps {
@@ -6,7 +6,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
6
6
 
7
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
8
 
9
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ 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); }
10
10
 
11
11
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
12
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { MenuRectType } from 'src/Picture/interface';
4
3
  interface IRectMenuProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface IWheelScaleProps {
3
2
  dom: HTMLElement;
4
3
  setScale: (scale: number) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IPictureProps } from './interface';
3
2
  import './index.less';
4
3
  declare function Picture({ className, width, height, minHeight, disabledDrag, imagePath, rects, isOpenSelect, disabledDrawMenu, menus, hasTool, fullScreenEle, ...props }: IPictureProps): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface IProgressComponentProps {
4
3
  status: 'over' | 'error' | 'loading';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare function App(): JSX.Element;
3
2
  export default App;
package/es/Tree/demo.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare function App(): JSX.Element;
3
2
  export default App;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare function App(): JSX.Element;
3
2
  export default App;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem, WorkerFlowFormType } from '../interface';
3
2
  interface IApproverFormProps {
4
3
  form: WorkerFlowFormType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ConditionItemType, NodeItem, WorkerFlowFormType } from '../interface';
3
2
  interface IConditionFormProps {
4
3
  form: WorkerFlowFormType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeUserType } from '../interface';
3
2
  interface IUserSelectProps {
4
3
  userList: NodeUserType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WorkerFlowFormType } from '../interface';
3
2
  interface IFormAuthProps {
4
3
  form: WorkerFlowFormType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeUserType } from '../interface';
3
2
  interface IGroupListProps {
4
3
  list: [string, NodeUserType[]][];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeUserType } from '../interface';
3
2
  interface IUserSelectProps {
4
3
  userList: NodeUserType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem, WorkerFlowFormType } from '../interface';
3
2
  interface IHandleFormProps {
4
3
  form: WorkerFlowFormType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeUserType } from '../interface';
3
2
  interface ILevelGroupSelectProps {
4
3
  userList: NodeUserType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem } from '../interface';
3
2
  interface INotifierFormProps {
4
3
  item?: NodeItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeUserType } from '../interface';
3
2
  interface IUserSelectProps {
4
3
  userList: NodeUserType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeUserType } from '../interface';
3
2
  interface IUserSelectProps {
4
3
  userList: NodeUserType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MutipleUserHandleType, NodeType, NodeUserType, UserSetType } from '../interface';
3
2
  interface IUserSetProps {
4
3
  userType?: UserSetType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MutipleUserHandleType } from '../interface';
3
2
  declare function UsersHandleType({ usersHandType, onChange }: {
4
3
  usersHandType: MutipleUserHandleType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem } from '../interface';
3
2
  interface IAddNodeProps {
4
3
  node: NodeItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface IAddNodeOptionProps {
3
2
  type: string;
4
3
  onClick: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AddNodeType, NodeType } from '../interface';
3
2
  interface IAddNodeListProps {
4
3
  onOptionClick: (type: NodeType) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem } from '../interface';
3
2
  interface IApproverNodeProps {
4
3
  parentNode: NodeItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem } from '../interface';
3
2
  interface IConditionNodeProps {
4
3
  conditionNodes: NodeItem[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface IEndNodeProps {
3
2
  id: string;
4
3
  nodeName: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem } from '../interface';
3
2
  interface IHandleNodeProps {
4
3
  parentNode: NodeItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem } from '../interface';
3
2
  interface IMatchNodeProps {
4
3
  config: NodeItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem } from '../interface';
3
2
  interface INotifierNodeProps {
4
3
  parentNode: NodeItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem } from '../interface';
3
2
  interface IRenderProps {
4
3
  config: NodeItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NodeItem, NodeUserType } from '../interface';
3
2
  interface IStartNode {
4
3
  node: NodeItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface ITitleElementProps {
3
2
  placeholder: string;
4
3
  nodeName: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "@cloud-app-dev/vidc",
4
4
  "description": "Video Image Data Componennts",
5
- "version": "2.0.0-alpha.16",
5
+ "version": "2.0.0-alpha.17",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",
@@ -43,7 +43,7 @@
43
43
  "@types/add-dom-event-listener": "^1.1.0",
44
44
  "@types/chroma-js": "^2.1.3",
45
45
  "@types/lodash-es": "^4.17.5",
46
- "@types/node": "^12.0.0",
46
+ "@types/node": "^17.0.5",
47
47
  "@umijs/test": "^3.0.5",
48
48
  "antd": "^4.17.0",
49
49
  "babel-plugin-import": "^1.13.3",