@voplus/morpho-workspace 1.3.1 → 1.3.3

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 (129) hide show
  1. package/es/data/notification/interfaces.d.ts +2 -1
  2. package/es/data/work/WorkStore.d.ts +12 -0
  3. package/es/data/work/WorkStore.js +21 -0
  4. package/es/data/work/WorkStore.js.map +1 -1
  5. package/es/data/work/interfaces.d.ts +17 -1
  6. package/es/data/workerror/types.d.ts +4 -0
  7. package/es/data/worktype/WorkTypeStore.d.ts +6 -0
  8. package/es/data/worktype/WorkTypeStore.js +22 -0
  9. package/es/data/worktype/WorkTypeStore.js.map +1 -1
  10. package/es/data/worktype/worktype-events/index.d.ts +3 -0
  11. package/es/data/worktype/worktype-events/index.js +4 -0
  12. package/es/data/worktype/worktype-events/index.js.map +1 -0
  13. package/es/data/worktype/worktype-events/useAutoUpdateListData.d.ts +4 -0
  14. package/es/data/worktype/worktype-events/useAutoUpdateListData.js +15 -0
  15. package/es/data/worktype/worktype-events/useAutoUpdateListData.js.map +1 -0
  16. package/es/data/worktype/worktype-events/useOnDeleteWorkType.d.ts +4 -0
  17. package/es/data/worktype/worktype-events/useOnDeleteWorkType.js +16 -0
  18. package/es/data/worktype/worktype-events/useOnDeleteWorkType.js.map +1 -0
  19. package/es/data/worktype/worktype-events/useOnNewWorkType.d.ts +4 -0
  20. package/es/data/worktype/worktype-events/useOnNewWorkType.js +17 -0
  21. package/es/data/worktype/worktype-events/useOnNewWorkType.js.map +1 -0
  22. package/es/modules/notification/components/{MentionNotificationCard → DocumentNotificationCard}/index.d.ts +2 -2
  23. package/es/modules/notification/components/{MentionNotificationCard → DocumentNotificationCard}/index.js +3 -3
  24. package/es/modules/notification/components/DocumentNotificationCard/index.js.map +1 -0
  25. package/es/modules/notification/components/NotificationList/index.js +2 -2
  26. package/es/modules/notification/components/NotificationList/index.js.map +1 -1
  27. package/es/modules/work/components/NewWorkForm/index.d.ts +10 -0
  28. package/es/modules/work/components/NewWorkForm/index.js +60 -0
  29. package/es/modules/work/components/NewWorkForm/index.js.map +1 -0
  30. package/es/modules/work/components/NewWorkForm/index.less +17 -0
  31. package/es/modules/work/components/SubWorkList/index.d.ts +4 -0
  32. package/es/modules/work/components/SubWorkList/index.js +42 -0
  33. package/es/modules/work/components/SubWorkList/index.js.map +1 -0
  34. package/es/modules/work/components/SubWorkList/index.less +7 -0
  35. package/es/modules/work/components/WorkErrorList/index.js +0 -1
  36. package/es/modules/work/components/WorkErrorList/index.js.map +1 -1
  37. package/es/modules/work/components/WorkItem/index.d.ts +1 -3
  38. package/es/modules/work/components/WorkItem/index.js +20 -4
  39. package/es/modules/work/components/WorkItem/index.js.map +1 -1
  40. package/es/modules/work/components/WorkItem/index.less +11 -0
  41. package/es/modules/work/components/WorkList/index.d.ts +3 -1
  42. package/es/modules/work/components/WorkList/index.js +35 -11
  43. package/es/modules/work/components/WorkList/index.js.map +1 -1
  44. package/es/modules/work/components/WorkPropertiesView/index.js +8 -2
  45. package/es/modules/work/components/WorkPropertiesView/index.js.map +1 -1
  46. package/es/modules/work/components/WorkTabs/index.js +10 -1
  47. package/es/modules/work/components/WorkTabs/index.js.map +1 -1
  48. package/es/modules/work/components/WorksProperties/index.js +4 -2
  49. package/es/modules/work/components/WorksProperties/index.js.map +1 -1
  50. package/es/modules/work/controls/WorkMenu/Accept.d.ts +8 -0
  51. package/es/modules/work/controls/WorkMenu/Accept.js +31 -0
  52. package/es/modules/work/controls/WorkMenu/Accept.js.map +1 -0
  53. package/es/modules/work/controls/WorkMenu/Reject.d.ts +8 -0
  54. package/es/modules/work/controls/WorkMenu/Reject.js +31 -0
  55. package/es/modules/work/controls/WorkMenu/Reject.js.map +1 -0
  56. package/es/modules/work/controls/WorkMenu/Send.d.ts +8 -0
  57. package/es/modules/work/controls/WorkMenu/Send.js +31 -0
  58. package/es/modules/work/controls/WorkMenu/Send.js.map +1 -0
  59. package/es/modules/work/controls/WorkMenu/index.d.ts +7 -0
  60. package/es/modules/work/controls/WorkMenu/index.js +27 -0
  61. package/es/modules/work/controls/WorkMenu/index.js.map +1 -0
  62. package/es/modules/work/pages/WorkDefaultView/index.less +1 -2
  63. package/es/modules/workspace/components/WorkspaceCardList/index.js +0 -1
  64. package/es/modules/workspace/components/WorkspaceCardList/index.js.map +1 -1
  65. package/es/modules/workspace/components/WorkspacePropertiesView/index.js +11 -5
  66. package/es/modules/workspace/components/WorkspacePropertiesView/index.js.map +1 -1
  67. package/es/modules/workspace/components/WorkspaceTabs/index.d.ts +5 -0
  68. package/es/modules/workspace/components/WorkspaceTabs/index.js +26 -0
  69. package/es/modules/workspace/components/WorkspaceTabs/index.js.map +1 -0
  70. package/es/modules/workspace/pages/WorkspaceDefaultView/index.js +1 -1
  71. package/es/modules/workspace/pages/WorkspaceDefaultView/index.js.map +1 -1
  72. package/es/modules/workspace/pages/WorkspacePage/index.js +1 -1
  73. package/es/modules/workspace/pages/WorkspacePage/index.js.map +1 -1
  74. package/es/modules/worktype/components/NewTypeForm/index.d.ts +10 -0
  75. package/es/modules/worktype/components/NewTypeForm/index.js +44 -0
  76. package/es/modules/worktype/components/NewTypeForm/index.js.map +1 -0
  77. package/es/modules/worktype/components/NewTypeForm/index.less +5 -0
  78. package/es/modules/worktype/components/NewTypeForm/state.d.ts +11 -0
  79. package/es/modules/worktype/components/NewTypeForm/state.js +41 -0
  80. package/es/modules/worktype/components/NewTypeForm/state.js.map +1 -0
  81. package/es/modules/worktype/components/WorkTypeCardList/index.d.ts +4 -11
  82. package/es/modules/worktype/components/WorkTypeCardList/index.js +3 -17
  83. package/es/modules/worktype/components/WorkTypeCardList/index.js.map +1 -1
  84. package/es/modules/worktype/components/WorkTypeCardList/index.less +7 -9
  85. package/es/modules/worktype/components/WorkTypeItem/index.d.ts +1 -1
  86. package/es/modules/worktype/components/WorkTypeItem/index.js +14 -2
  87. package/es/modules/worktype/components/WorkTypeItem/index.js.map +1 -1
  88. package/es/modules/worktype/components/WorkTypeItem/index.less +13 -0
  89. package/es/modules/worktype/components/WorkTypeList/index.d.ts +9 -0
  90. package/es/modules/worktype/components/WorkTypeList/index.js +44 -0
  91. package/es/modules/worktype/components/WorkTypeList/index.js.map +1 -0
  92. package/es/modules/worktype/components/WorkTypeProperties/index.js +19 -20
  93. package/es/modules/worktype/components/WorkTypeProperties/index.js.map +1 -1
  94. package/es/modules/worktype/components/WorkTypeProperties/state.d.ts +2 -3
  95. package/es/modules/worktype/components/WorkTypeProperties/state.js +7 -15
  96. package/es/modules/worktype/components/WorkTypeProperties/state.js.map +1 -1
  97. package/es/modules/worktype/components/WorkTypePropertiesView/index.js +13 -8
  98. package/es/modules/worktype/components/WorkTypePropertiesView/index.js.map +1 -1
  99. package/es/modules/worktype/components/WorkTypeQA/index.js +37 -36
  100. package/es/modules/worktype/components/WorkTypeQA/index.js.map +1 -1
  101. package/es/modules/worktype/components/WorkTypeQA/index.less +8 -1
  102. package/es/modules/worktype/components/WorkTypeTabs/index.js +1 -1
  103. package/es/modules/worktype/components/WorkTypeTabs/index.js.map +1 -1
  104. package/es/modules/worktype/controls/ToolBar/index.d.ts +10 -0
  105. package/es/modules/worktype/controls/ToolBar/index.js +20 -0
  106. package/es/modules/worktype/controls/ToolBar/index.js.map +1 -0
  107. package/es/modules/worktype/controls/ToolBar/index.less +55 -0
  108. package/es/modules/worktype/controls/ToolBar/state.d.ts +36 -0
  109. package/es/modules/worktype/controls/ToolBar/state.js +57 -0
  110. package/es/modules/worktype/controls/ToolBar/state.js.map +1 -0
  111. package/es/modules/worktype/controls/WorkTypeMenu/index.d.ts +14 -0
  112. package/es/modules/worktype/controls/WorkTypeMenu/index.js +26 -0
  113. package/es/modules/worktype/controls/WorkTypeMenu/index.js.map +1 -0
  114. package/es/modules/worktype/controls/WorkTypeMenu/index.less +0 -0
  115. package/es/modules/worktype/pages/WorkTypeDefaultView/index.less +4 -3
  116. package/es/pages/Space/components/Tasks/index.d.ts +2 -2
  117. package/es/pages/Space/components/Tasks/index.js +50 -11
  118. package/es/pages/Space/components/Tasks/index.js.map +1 -1
  119. package/es/pages/Space/components/Works/index.d.ts +2 -2
  120. package/es/pages/Space/components/Works/index.js +13 -37
  121. package/es/pages/Space/components/Works/index.js.map +1 -1
  122. package/es/pages/Space/pages/MySpace/index.js +43 -12
  123. package/es/pages/Space/pages/MySpace/index.js.map +1 -1
  124. package/es/pages/Space/pages/MySpace/state.d.ts +27 -6
  125. package/es/pages/Space/pages/MySpace/state.js +114 -24
  126. package/es/pages/Space/pages/MySpace/state.js.map +1 -1
  127. package/package.json +1 -1
  128. package/es/modules/notification/components/MentionNotificationCard/index.js.map +0 -1
  129. /package/es/modules/notification/components/{MentionNotificationCard → DocumentNotificationCard}/index.less +0 -0
@@ -8,18 +8,13 @@ export class State {
8
8
  writable: true,
9
9
  value: store
10
10
  });
11
- Object.defineProperty(this, "contact", {
11
+ Object.defineProperty(this, "worktype", {
12
12
  enumerable: true,
13
13
  configurable: true,
14
14
  writable: true,
15
15
  value: void 0
16
16
  });
17
- Object.defineProperty(this, "defaultdueEdit", {
18
- enumerable: true,
19
- configurable: true,
20
- writable: true,
21
- value: false
22
- });
17
+ // @observable public defaultdueEdit = false;
23
18
  Object.defineProperty(this, "folderEdit", {
24
19
  enumerable: true,
25
20
  configurable: true,
@@ -34,22 +29,19 @@ export class State {
34
29
  });
35
30
  makeObservable(this);
36
31
  }
37
- update(contact) {
38
- this.contact = contact;
32
+ update(worktype) {
33
+ this.worktype = worktype;
39
34
  }
40
35
  /** edit save */
41
36
  save(v, name, params) {
42
- if ((v === null || v === void 0 ? void 0 : v.trim()) === name)
37
+ if ((v === null || v === void 0 ? void 0 : v.trim()) === name || (v === null || v === void 0 ? void 0 : v.trim()) === "")
43
38
  return;
44
- this.store.edit(this.contact.id, { data: params, error: "message" });
39
+ this.store.edit(this.worktype.id, { data: params, error: "message" });
45
40
  }
46
41
  }
47
42
  __decorate([
48
43
  observable
49
- ], State.prototype, "contact", void 0);
50
- __decorate([
51
- observable
52
- ], State.prototype, "defaultdueEdit", void 0);
44
+ ], State.prototype, "worktype", void 0);
53
45
  __decorate([
54
46
  observable
55
47
  ], State.prototype, "folderEdit", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeProperties/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,MAAM,OAAO,KAAK;IAMjB,YAAoB,KAAoB;;;;;mBAApB;;QALR;;;;;WAA0B;QAC1B;;;;mBAAwB,KAAK;WAAC;QAC9B;;;;mBAAoB,KAAK;WAAC;QAC1B;;;;mBAA2B,KAAK;WAAC;QAG5C,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAEc,MAAM,CAAC,OAAkB;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IAED,gBAAgB;IAET,IAAI,CAAC,CAAM,EAAE,IAAS,EAAE,MAA+B;QAC7D,IAAI,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,EAAE,MAAK,IAAI;YAAE,OAAO;QAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACtE,CAAC;CACD;AAnBY;IAAX,UAAU;sCAA2B;AAC1B;IAAX,UAAU;6CAA+B;AAC9B;IAAX,UAAU;yCAA2B;AAC1B;IAAX,UAAU;gDAAkC;AAMrC;IAAP,MAAM;mCAEN;AAID;IADC,MAAM;iCAIN"}
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeProperties/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,MAAM,OAAO,KAAK;IAMjB,YAAoB,KAAoB;;;;;mBAApB;;QALR;;;;;WAA2B;QACvC,6CAA6C;QACjC;;;;mBAAoB,KAAK;WAAC;QAC1B;;;;mBAA2B,KAAK;WAAC;QAG5C,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAEc,MAAM,CAAC,QAAmB;QACxC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,CAAC;IAED,gBAAgB;IAET,IAAI,CAAC,CAAM,EAAE,IAAS,EAAE,MAA+B;QAC7D,IAAI,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,EAAE,MAAK,IAAI,IAAI,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,EAAE,MAAK,EAAE;YAAE,OAAO;QACnD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACvE,CAAC;CACD;AAnBY;IAAX,UAAU;uCAA4B;AAE3B;IAAX,UAAU;yCAA2B;AAC1B;IAAX,UAAU;gDAAkC;AAMrC;IAAP,MAAM;mCAEN;AAID;IADC,MAAM;iCAIN"}
@@ -1,14 +1,16 @@
1
- import React, { useEffect, useState } from "react";
2
- import { useDocumentStore } from "@voplus/morpho-document-core";
3
- import { useApplicationContext } from "@voplus/morpho-data";
4
- import { runInAction } from "mobx";
1
+ import "./index.less";
5
2
  import { InlineEdit, observe } from "@voplus/morpho-ui";
3
+ import React, { useEffect, useState } from "react";
6
4
  import { useWorkType, useWorkTypeStore } from "../../../../data/worktype";
5
+ import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
7
6
  import { State } from "./state";
8
- import WorkspaceMenu from "../../../workspace/controls/WorkspaceMenu";
9
- import WorktypeCompleteWorksChart from "../../controls/WorktypeCompleteWorksChart";
7
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
8
+ import WorkTypeMenu from "../../controls/WorkTypeMenu";
10
9
  import WorkTypePropertiesTabs from '../WorkTypePropertiesTabs';
11
- import "./index.less";
10
+ import WorktypeCompleteWorksChart from "../../controls/WorktypeCompleteWorksChart";
11
+ import { runInAction } from "mobx";
12
+ import { useApplicationContext } from "@voplus/morpho-data";
13
+ import { useDocumentStore } from "@voplus/morpho-document-core";
12
14
  const WorkTypePropertiesView = (props) => {
13
15
  const id = props.id;
14
16
  const store = useWorkTypeStore();
@@ -26,7 +28,10 @@ const WorkTypePropertiesView = (props) => {
26
28
  React.createElement("div", { className: "worktype-header" },
27
29
  React.createElement("div", { className: "worktype-name" },
28
30
  React.createElement(InlineEdit, { defaultValue: worktype.name, content: (v) => React.createElement("div", null, worktype.name), onSave: (value) => state.save(value, worktype.name, { Name: value }) }),
29
- React.createElement(WorkspaceMenu, { id: id, closeAside: true }))),
31
+ React.createElement("div", { className: "tools-bar" },
32
+ React.createElement(ToolBar, { id: id, showMenu: false },
33
+ React.createElement(Open, { url: `/workType/${id}` }),
34
+ React.createElement(WorkTypeMenu, { id: id, closeAside: true }))))),
30
35
  React.createElement(WorktypeCompleteWorksChart, { id: props.id }),
31
36
  React.createElement(WorkTypePropertiesTabs, { id: id }))))));
32
37
  // async function onChange(ids: string[], members: IUnit[]) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;A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,QAAQ,CAAC,IAAI,EAC3B,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,QAAQ,CAAC,IAAI,CAAO,EAC1C,MAAM,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GACxE;gBACF,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,GAAI,CACtC,CAOD;QACN,oBAAC,0BAA0B,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,GAAI;QAC5C,oBAAC,sBAAsB,IAAC,EAAE,EAAE,EAAE,GAAI,CAClB,CACjB,CACI,CACN,CAAC,CAAC;IAEH,6DAA6D;IAC7D,4EAA4E;IAC5E,qDAAqD;IACrD,IAAI;AACL,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAI1E,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,sBAAsB,MAAM,2BAA2B,CAAA;AAC9D,OAAO,0BAA0B,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAA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,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GACxE;gBACF,6BAAK,SAAS,EAAC,WAAW;oBACzB,oBAAC,OAAO,IACP,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,KAAK;wBAEf,oBAAC,IAAI,IAAC,GAAG,EAAE,aAAa,EAAE,EAAE,GAAI;wBAChC,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,GAAI,CACjC,CACL,CACD,CAOD;QACN,oBAAC,0BAA0B,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,GAAI;QAC5C,oBAAC,sBAAsB,IAAC,EAAE,EAAE,EAAE,GAAI,CAClB,CACjB,CACI,CACN,CAAC,CAAC;IAEH,6DAA6D;IAC7D,4EAA4E;IAC5E,qDAAqD;IACrD,IAAI;AACL,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -1,15 +1,16 @@
1
- import "./index.less";
2
- import { Form, InputNumber } from "@voplus/antd";
3
1
  import React, { useState } from "react";
2
+ import { Form, InputNumber } from "@voplus/antd";
3
+ import { Scrollbars } from "react-custom-scrollbars";
4
+ import { State } from "./state";
4
5
  import { useWorkType, useWorkTypeStore } from "../../../../data/worktype";
6
+ import { observe } from "@voplus/morpho-ui";
7
+ import { runInAction } from "mobx";
8
+ import { useApplicationContext } from "@voplus/morpho-data";
5
9
  import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
6
10
  import AvatarList from "@voplus/morpho-document/es/components/AvatarList";
7
11
  import CheckList from "@voplus/morpho-ui/es/controls/CheckList";
8
- import { State } from "./state";
9
12
  import TaskQuickViewDialog from "../../../tasks/components/TaskQuickViewDialog";
10
- import { observe } from "@voplus/morpho-ui";
11
- import { runInAction } from "mobx";
12
- import { useApplicationContext } from "@voplus/morpho-data";
13
+ import "./index.less";
13
14
  const WorkTypeQA = (props) => {
14
15
  const { id } = props;
15
16
  const [form] = Form.useForm();
@@ -23,37 +24,37 @@ const WorkTypeQA = (props) => {
23
24
  return observe(() => {
24
25
  var _a, _b, _c, _d, _e, _f;
25
26
  return (React.createElement(AsideContent, { context: asideContext },
26
- React.createElement("div", null,
27
+ React.createElement("div", { className: "work-type-qa" },
27
28
  React.createElement("div", { className: "work-type-qa-head" }, "Quality Assurance Setting"),
28
- React.createElement(Form, { className: "work-type-qa-content", form: form, labelAlign: "left", labelCol: { span: 10 }, scrollToFirstError: true },
29
- React.createElement(Form.Item, { label: "Reviewer" },
30
- React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", list: state.worktype.reviewers, onChange: (ids) => {
31
- state.save({ ReviewerIds: ids });
32
- } })),
33
- React.createElement(Form.Item, { label: "Auditor" },
34
- React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", list: (_a = state.worktype.audit) === null || _a === void 0 ? void 0 : _a.auditors, onChange: (ids) => {
35
- state.save({ AuditorIds: ids });
36
- } })),
37
- ((_c = (_b = state.worktype
38
- .audit) === null || _b === void 0 ? void 0 : _b.auditors) === null || _c === void 0 ? void 0 : _c.length) && (React.createElement(React.Fragment, null,
39
- React.createElement(Form.Item, { label: "Audit Rate" }, state.auditRateEdit ? (React.createElement(InputNumber, { defaultValue: ((_d = state.worktype.audit) === null || _d === void 0 ? void 0 : _d.auditRate) || 0, min: 0, max: 100, formatter: (value) => `${value}%`, parser: (value) => value.replace("%", ""), onChange: (value) => {
40
- state.save({ AuditRate: value });
41
- }, onBlur: () => runInAction(() => (state.auditRateEdit = false)) })) : (React.createElement("div", { onClick: () => runInAction(() => (state.auditRateEdit = true)) }, ((_e = state.worktype.audit) === null || _e === void 0 ? void 0 : _e.auditRate)
42
- ? `${(_f = state.worktype.audit) === null || _f === void 0 ? void 0 : _f.auditRate}%`
43
- : "Add Audit Rate"))),
44
- React.createElement(Form.Item, { label: "Audit Task" },
45
- React.createElement("div", { className: "open-btn", onClick: () => setVisible(true) }, "Open")))),
46
- React.createElement(Form.Item, null,
47
- React.createElement(CheckList, { headerProps: {
48
- viewTitle: "Reject Reasons",
49
- visible: true
50
- }, allowAdd: true, list: state.rejectReasons, onChange: (item) => state.onChangeRejectReasons(item), onCreate: (item) => state.onCreateRejectReasons(item), onDelete: (item) => state.onDeleteRejectReasons(item) })),
51
- React.createElement(Form.Item, null,
52
- React.createElement(CheckList, { headerProps: {
53
- viewTitle: "Error Types",
54
- visible: true
55
- }, allowAdd: true, list: state.errorTypes, onChange: (item) => state.onChangeErrorTypes(item), onCreate: (item) => state.onCreateErrorTypes(item), onDelete: (item) => state.onDeleteErrorTypes(item) }))),
56
- React.createElement(TaskQuickViewDialog, { id: props.id, visible: visible, onCancel: () => setVisible(false) }))));
29
+ React.createElement(Scrollbars, { autoHide: true },
30
+ React.createElement(Form, { className: "work-type-qa-content", form: form, labelAlign: "left", labelCol: { span: 10 }, scrollToFirstError: true },
31
+ React.createElement(Form.Item, { label: "Reviewer" },
32
+ React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", list: state.worktype.reviewers, onChange: (ids) => {
33
+ state.save({ ReviewerIds: ids });
34
+ } })),
35
+ React.createElement(Form.Item, { label: "Auditor" },
36
+ React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", list: (_a = state.worktype.audit) === null || _a === void 0 ? void 0 : _a.auditors, onChange: (ids) => {
37
+ state.save({ AuditorIds: ids });
38
+ } })),
39
+ ((_c = (_b = state.worktype.audit) === null || _b === void 0 ? void 0 : _b.auditors) === null || _c === void 0 ? void 0 : _c.length) && (React.createElement(React.Fragment, null,
40
+ React.createElement(Form.Item, { label: "Audit Rate" }, state.auditRateEdit ? (React.createElement(InputNumber, { defaultValue: ((_d = state.worktype.audit) === null || _d === void 0 ? void 0 : _d.auditRate) || 0, min: 0, max: 100, formatter: (value) => `${value}%`, parser: (value) => value.replace("%", ""), onChange: (value) => {
41
+ state.save({ AuditRate: value });
42
+ }, onBlur: () => runInAction(() => (state.auditRateEdit = false)) })) : (React.createElement("div", { onClick: () => runInAction(() => (state.auditRateEdit = true)) }, ((_e = state.worktype.audit) === null || _e === void 0 ? void 0 : _e.auditRate)
43
+ ? `${(_f = state.worktype.audit) === null || _f === void 0 ? void 0 : _f.auditRate}%`
44
+ : "Add Audit Rate"))),
45
+ React.createElement(Form.Item, { label: "Audit Task" },
46
+ React.createElement("div", { className: "open-btn", onClick: () => setVisible(true) }, "Open")))),
47
+ React.createElement(Form.Item, { label: "Reject Reasons" },
48
+ React.createElement(CheckList, { headerProps: {
49
+ viewTitle: " ",
50
+ visible: true,
51
+ }, allowAdd: true, list: state.rejectReasons, onChange: (item) => state.onChangeRejectReasons(item), onCreate: (item) => state.onCreateRejectReasons(item), onDelete: (item) => state.onDeleteRejectReasons(item) })),
52
+ React.createElement(Form.Item, { label: "Error Types" },
53
+ React.createElement(CheckList, { headerProps: {
54
+ viewTitle: " ",
55
+ visible: true,
56
+ }, allowAdd: true, list: state.errorTypes, onChange: (item) => state.onChangeErrorTypes(item), onCreate: (item) => state.onCreateErrorTypes(item), onDelete: (item) => state.onDeleteErrorTypes(item) }))),
57
+ React.createElement(TaskQuickViewDialog, { id: props.id, visible: visible, onCancel: () => setVisible(false) })))));
57
58
  });
58
59
  };
59
60
  export default WorkTypeQA;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeQA/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE1E,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO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ACb,EACD,QAAQ,QACR,IAAI,EAAE,KAAK,CAAC,UAAU,EACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,GACjD,CACS,CACN;oBACP,oBAAC,mBAAmB,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,CAC9E,CACR,CACQ,CACf,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,4 +1,11 @@
1
1
  :global {
2
+ .work-type-qa{
3
+ width: 100%;
4
+ height: 100%;
5
+ // overflow: hidden;
6
+ display: flex;
7
+ flex-direction: column;
8
+ }
2
9
  .work-type-qa-head {
3
10
  padding: 10px 20px;
4
11
  background: #fff;
@@ -17,7 +24,7 @@
17
24
  }
18
25
  }
19
26
  .check-item {
20
- padding: 10px 20px;
27
+ padding: 10px 0;
21
28
  font-size: 14px;
22
29
  font-weight: normal;
23
30
  }
@@ -22,7 +22,7 @@ const WorkTypeTabs = (props) => {
22
22
  React.createElement(Badge, { count: 6, className: "site-badge-count" })), key: "TaskList" }, activeKey === "TaskList" && (React.createElement(WorkTaskList, { Title: "Task", parentId: id, onClickItem: onClickItem }))),
23
23
  React.createElement(Tabs.TabPane, { tab: React.createElement(React.Fragment, null,
24
24
  "Documents",
25
- React.createElement(Badge, { count: 3, className: "site-badge-count" })), key: "Document" }, activeKey === "Document" && React.createElement(DocumentList, { id: id, multiple: true })),
25
+ React.createElement(Badge, { count: 3, className: "site-badge-count" })), key: "Document" }, activeKey === "Document" && React.createElement(DocumentList, { id: id, multiple: true, exclude: ["Task"] })),
26
26
  React.createElement(Tabs.TabPane, { tab: "QA Setting", key: "QA Setting" }, activeKey === "QA Setting" && React.createElement(WorkTypeQA, { id: id })))));
27
27
  /**切换面板的回调*/
28
28
  function onChange(activeKey) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/components/WorkTypeTabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,kBAAkB,MAAM,8CAA8C,CAAC;AAC9E,OAAO,YAAY,MAAM,uCAAuC,CAAC;AACjE,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,cAAc,CAAC;AAEtB,MAAM,YAAY,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC9C,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,2BAA2B;IAC3B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAE9C,SAAS,CAAC,GAAG,EAAE;QACd,YAAY,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAEf,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,IAAI,IAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAC,gBAAgB,EAAC,QAAQ,EAAE,QAAQ;QACxE,oBAAC,I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,kBAAkB,IAAC,EAAE,EAAE,EAAE,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;SACtE;IACF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { ToolBarProps } from "./state";
3
+ import "./index.less";
4
+ declare const Toolbar: {
5
+ (props: ToolBarProps): JSX.Element;
6
+ defaultProps: {
7
+ showMenu: boolean;
8
+ };
9
+ };
10
+ export default Toolbar;
@@ -0,0 +1,20 @@
1
+ import React, { useState } from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import { More } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
4
+ import { ToolBarContext, ToolBarState } from "./state";
5
+ import { useWorkTypeStore } from "../../../../data/worktype";
6
+ import "./index.less";
7
+ const Toolbar = (props) => {
8
+ const { children, visible, showMenu, moreProps: dropDownMenuProps } = props;
9
+ const store = useWorkTypeStore();
10
+ const [state] = useState(new ToolBarState(store));
11
+ state.props = props;
12
+ return observe(() => (React.createElement(ToolBarContext.Provider, { value: state }, visible !== false ? (React.createElement("span", { className: "tool-bar" },
13
+ children,
14
+ showMenu && React.createElement(More, { ...dropDownMenuProps }))) : (React.createElement(React.Fragment, null)))));
15
+ };
16
+ Toolbar.defaultProps = {
17
+ showMenu: true,
18
+ };
19
+ export default Toolbar;
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/controls/ToolBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAgB,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,cAAc,CAAC;AAEtB,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IAC5E,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IAEpB,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IACnC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CACpB,8BAAM,SAAS,EAAC,UAAU;QACxB,QAAQ;QACR,QAAQ,IAAI,oBAAC,IAAI,OAAK,iBAAiB,GAAI,CACtC,CACP,CAAC,CAAC,CAAC,CACH,yCAAK,CACL,CACwB,CAC1B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,YAAY,GAAG;IACtB,QAAQ,EAAE,IAAI;CACd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,55 @@
1
+ :global {
2
+ .tool-bar {
3
+ .ant-btn + .ant-btn {
4
+ margin-left: 5px;
5
+ }
6
+ .ant-tooltip-disabled-compatible-wrapper {
7
+ margin: 0 5px;
8
+ & + .ant-tooltip-disabled-compatible-wrapper {
9
+ margin-left: 0;
10
+ }
11
+ }
12
+ .archive-btn {
13
+ background: #fff;
14
+ border-color: #faad14;
15
+ color: #faad14;
16
+ }
17
+ .archive-btn:active,
18
+ .archive-btn.active,
19
+ .archive-btn:hover {
20
+ background-color: #faad14;
21
+ color: #fff;
22
+ }
23
+ }
24
+ .tool-bar-menu {
25
+ padding: 4px 0;
26
+ list-style-type: none;
27
+ background-color: #fff;
28
+ background-clip: padding-box;
29
+ border-radius: 2px;
30
+ outline: none;
31
+ box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
32
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05);
33
+
34
+ .ant-btn {
35
+ display: block;
36
+ width: 100%;
37
+ padding: 0 12px;
38
+ height: 34px;
39
+ color: #666;
40
+ text-align: left;
41
+ &[disabled] {
42
+ color: rgba(0, 0, 0, 0.25);
43
+ }
44
+ &:hover {
45
+ background-color: #f5f5f5;
46
+ }
47
+ > span {
48
+ margin-left: 10px;
49
+ }
50
+ }
51
+ .delete {
52
+ color: #f5222d;
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,36 @@
1
+ import { ReactNode } from "react";
2
+ import { MoreButtonProps } from "@voplus/morpho-document/es/controls/ToolBar/buttons/More";
3
+ import { WorkTypeStore } from "../../../../data/worktype";
4
+ export declare type ToolBarProps = {
5
+ /** id of document */
6
+ id?: string;
7
+ children?: ReactNode;
8
+ /** show toolbar */
9
+ visible?: boolean;
10
+ /** show drop down menu */
11
+ showMenu?: boolean;
12
+ /** Props for dropd */
13
+ moreProps?: MoreButtonProps;
14
+ };
15
+ export interface IToolBarState {
16
+ disabled?: boolean;
17
+ }
18
+ export declare class ToolBarState {
19
+ store: WorkTypeStore;
20
+ /** Current tools states. */
21
+ private states;
22
+ props: ToolBarProps;
23
+ constructor(store: WorkTypeStore);
24
+ /** Try to get an existing icons state or create a new one if it's not already exists.
25
+ * @param key - Key of the icons state.
26
+ * @param factory - factor to create a new option state.
27
+ */
28
+ getState<T extends IToolBarState>(key: string, factory: () => T): T;
29
+ /** id */
30
+ get id(): string;
31
+ collapsed: boolean;
32
+ }
33
+ /** React context for ToolBarState. */
34
+ export declare const ToolBarContext: import("react").Context<ToolBarState>;
35
+ /** React hook to retrieve the nearest ToolBarContext. */
36
+ export declare const useToolBarContext: () => ToolBarState;
@@ -0,0 +1,57 @@
1
+ import { __decorate } from "tslib";
2
+ import { createContext, useContext } from "react";
3
+ import { computed, makeObservable, observable } from "mobx";
4
+ export class ToolBarState {
5
+ constructor(store) {
6
+ Object.defineProperty(this, "store", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: store
11
+ });
12
+ /** Current tools states. */
13
+ Object.defineProperty(this, "states", {
14
+ enumerable: true,
15
+ configurable: true,
16
+ writable: true,
17
+ value: new Map()
18
+ });
19
+ Object.defineProperty(this, "props", {
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true,
23
+ value: void 0
24
+ });
25
+ Object.defineProperty(this, "collapsed", {
26
+ enumerable: true,
27
+ configurable: true,
28
+ writable: true,
29
+ value: false
30
+ });
31
+ makeObservable(this);
32
+ }
33
+ /** Try to get an existing icons state or create a new one if it's not already exists.
34
+ * @param key - Key of the icons state.
35
+ * @param factory - factor to create a new option state.
36
+ */
37
+ getState(key, factory) {
38
+ if (!this.states.has(key))
39
+ this.states.set(key, factory());
40
+ return this.states.get(key);
41
+ }
42
+ /** id */
43
+ get id() {
44
+ return (this.props && this.props.id) || "";
45
+ }
46
+ }
47
+ __decorate([
48
+ computed
49
+ ], ToolBarState.prototype, "id", null);
50
+ __decorate([
51
+ observable
52
+ ], ToolBarState.prototype, "collapsed", void 0);
53
+ /** React context for ToolBarState. */
54
+ export const ToolBarContext = createContext(null);
55
+ /** React hook to retrieve the nearest ToolBarContext. */
56
+ export const useToolBarContext = () => useContext(ToolBarContext);
57
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/controls/ToolBar/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAqB5D,MAAM,OAAO,YAAY;IAMxB,YAA0B,KAAoB;;;;;mBAApB;;QAL1B,4BAA4B;QAC5B;;;;mBAA6C,IAAI,GAAG,EAAE;WAAC;QAEvD;;;;;WAA2B;QAqBf;;;;mBAAmB,KAAK;WAAC;QAlBpC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAA0B,GAAW,EAAE,OAAgB;QACrE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAM,CAAC;IAClC,CAAC;IAED,SAAS;IAET,IAAW,EAAE;QACZ,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IAC5C,CAAC;CAGD;AALA;IADC,QAAQ;sCAGR;AAEW;IAAX,UAAU;+CAA0B;AAGtC,sCAAsC;AACtC,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAe,IAAW,CAAC,CAAC;AAEvE,yDAAyD;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const WorkTypeMenu: {
4
+ (props: {
5
+ id: string;
6
+ className?: string;
7
+ closeAside?: boolean;
8
+ size: "small" | "middle" | "large" | undefined;
9
+ }): JSX.Element;
10
+ defaultProps: {
11
+ size: string;
12
+ };
13
+ };
14
+ export default WorkTypeMenu;
@@ -0,0 +1,26 @@
1
+ import "./index.less";
2
+ import { Button, Dropdown } from "@voplus/antd";
3
+ import { DocumentMenuContext, DocumentMenuState } from "@voplus/morpho-document-core";
4
+ import React, { useMemo } from "react";
5
+ import { useAsideContentContext } from "@voplus/morpho-ui";
6
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
7
+ import { MoreOutlined } from "@ant-design/icons";
8
+ import { faTrashAlt } from "@fortawesome/pro-light-svg-icons";
9
+ import { useWorkTypeStore } from "../../.../../../../data/worktype";
10
+ const WorkTypeMenu = (props) => {
11
+ const context = useMemo(() => new DocumentMenuState(props.id), [props.id]);
12
+ const store = useWorkTypeStore();
13
+ const asideContext = useAsideContentContext();
14
+ return (React.createElement(Dropdown, { placement: "bottomRight", overlay: React.createElement("div", { className: "workspace-menu" },
15
+ React.createElement(DocumentMenuContext.Provider, { value: context },
16
+ React.createElement(Button, { type: "link" },
17
+ React.createElement(FAIcon, { icon: faTrashAlt, color: "#f5222d" }),
18
+ React.createElement("span", { className: "delete" }, "Delete")))) },
19
+ React.createElement(Button, { size: props.size, shape: "circle" },
20
+ React.createElement(MoreOutlined, null))));
21
+ };
22
+ WorkTypeMenu.defaultProps = {
23
+ size: "small"
24
+ };
25
+ export default WorkTypeMenu;
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/worktype/controls/WorkTypeMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAetB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAS,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAe,MAAM,8BAA8B,CAAC;AACnG,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAW,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,YAAY,GAAG,CAAC,KAKrB,EAAE,EAAE;IACJ,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAC9C,OAAO,CACN,oBAAC,QAAQ,IACR,SAAS,EAAC,aAAa,EACvB,OAAO,EACN,6BAAK,SAAS,EAAC,gBAAgB;YAC9B,oBAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO;gBAE3C,oBAAC,MAAM,IAAC,IAAI,EAAC,MAAM;oBAClB,oBAAC,MAAM,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAC,SAAS,GAAG;oBAC5C,8BAAM,SAAS,EAAC,QAAQ,aAAc,CAC9B,CACqB,CAC1B;QAGP,oBAAC,MAAM,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAC,QAAQ;YACvC,oBAAC,YAAY,OAAG,CACR,CACC,CACX,CAAC;AACH,CAAC,CAAC;AAEF,YAAY,CAAC,YAAY,GAAG;IAC3B,IAAI,EAAE,OAAO;CACb,CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -1,9 +1,10 @@
1
1
  :global {
2
2
  .work-type-default-view {
3
3
  .main-content-nav {
4
- width: 310px;
5
- box-shadow: 6px 0 16px -8px rgb(0 0 0 / 8%), 9px 0 28px 0 rgb(0 0 0 / 5%),
6
- 12px 0 48px 16px rgb(0 0 0 / 3%) !important;
4
+ width: 300px;
5
+ // box-shadow: 6px 0 16px -8px rgb(0 0 0 / 8%), 9px 0 28px 0 rgb(0 0 0 / 5%),
6
+ // 12px 0 48px 16px rgb(0 0 0 / 3%) !important;
7
+ box-shadow: 1px 0 3px 0px rgba(0, 0, 0, 0.15) !important;
7
8
  }
8
9
 
9
10
  .work-type-context {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import "./index.less";
3
- import { FilterOption } from "@voplus/morpho-data";
3
+ import { State } from "../../pages/MySpace/state";
4
4
  declare const TaskList: (props: {
5
- filters?: FilterOption[];
5
+ state: State;
6
6
  }) => JSX.Element;
7
7
  export default TaskList;