@voplus/morpho-document 6.0.45 → 6.0.47

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 (123) hide show
  1. package/es/controls/PDFViewer/index.js +2 -20
  2. package/es/controls/PDFViewer/index.js.map +1 -1
  3. package/es/data/tenant-service/TenantServiceStore.d.ts +23 -0
  4. package/es/data/tenant-service/TenantServiceStore.js +69 -0
  5. package/es/data/tenant-service/TenantServiceStore.js.map +1 -0
  6. package/es/data/tenant-service/hooks.d.ts +10 -0
  7. package/es/data/tenant-service/hooks.js +19 -0
  8. package/es/data/tenant-service/hooks.js.map +1 -0
  9. package/es/data/tenant-service/index.d.ts +4 -0
  10. package/es/data/tenant-service/index.js +5 -0
  11. package/es/data/tenant-service/index.js.map +1 -0
  12. package/es/data/tenant-service/interfaces.d.ts +21 -0
  13. package/es/data/tenant-service/interfaces.js +2 -0
  14. package/es/data/tenant-service/interfaces.js.map +1 -0
  15. package/es/data/tenant-service/types.d.ts +16 -0
  16. package/es/data/tenant-service/types.js +2 -0
  17. package/es/data/tenant-service/types.js.map +1 -0
  18. package/es/data/tenant-service-execution/TenantServiceExecutionStore.d.ts +21 -0
  19. package/es/data/tenant-service-execution/TenantServiceExecutionStore.js +61 -0
  20. package/es/data/tenant-service-execution/TenantServiceExecutionStore.js.map +1 -0
  21. package/es/data/tenant-service-execution/hooks.d.ts +10 -0
  22. package/es/data/tenant-service-execution/hooks.js +19 -0
  23. package/es/data/tenant-service-execution/hooks.js.map +1 -0
  24. package/es/data/tenant-service-execution/index.d.ts +4 -0
  25. package/es/data/tenant-service-execution/index.js +5 -0
  26. package/es/data/tenant-service-execution/index.js.map +1 -0
  27. package/es/data/tenant-service-execution/interfaces.d.ts +24 -0
  28. package/es/data/tenant-service-execution/interfaces.js +2 -0
  29. package/es/data/tenant-service-execution/interfaces.js.map +1 -0
  30. package/es/data/tenant-service-execution/types.d.ts +7 -0
  31. package/es/data/tenant-service-execution/types.js +2 -0
  32. package/es/data/tenant-service-execution/types.js.map +1 -0
  33. package/es/modules/tenant-service/components/TenantServiceHeader/index.d.ts +6 -0
  34. package/es/modules/tenant-service/components/TenantServiceHeader/index.js +19 -0
  35. package/es/modules/tenant-service/components/TenantServiceHeader/index.js.map +1 -0
  36. package/es/modules/tenant-service/components/TenantServiceHeader/index.less +12 -0
  37. package/es/modules/tenant-service/components/TenantServiceInterval/index.d.ts +5 -0
  38. package/es/modules/tenant-service/components/TenantServiceInterval/index.js +36 -0
  39. package/es/modules/tenant-service/components/TenantServiceInterval/index.js.map +1 -0
  40. package/es/modules/tenant-service/components/TenantServiceInterval/index.less +32 -0
  41. package/es/modules/tenant-service/components/TenantServiceInterval/state.d.ts +28 -0
  42. package/es/modules/tenant-service/components/TenantServiceInterval/state.js +177 -0
  43. package/es/modules/tenant-service/components/TenantServiceInterval/state.js.map +1 -0
  44. package/es/modules/tenant-service/components/TenantServiceItem/index.d.ts +5 -0
  45. package/es/modules/tenant-service/components/TenantServiceItem/index.js +33 -0
  46. package/es/modules/tenant-service/components/TenantServiceItem/index.js.map +1 -0
  47. package/es/modules/tenant-service/components/TenantServiceItem/index.less +36 -0
  48. package/es/modules/tenant-service/components/TenantServiceList/index.d.ts +15 -0
  49. package/es/modules/tenant-service/components/TenantServiceList/index.js +52 -0
  50. package/es/modules/tenant-service/components/TenantServiceList/index.js.map +1 -0
  51. package/es/modules/tenant-service/components/TenantServiceList/index.less +12 -0
  52. package/es/modules/tenant-service/components/TenantServiceProperties/index.d.ts +20 -0
  53. package/es/modules/tenant-service/components/TenantServiceProperties/index.js +53 -0
  54. package/es/modules/tenant-service/components/TenantServiceProperties/index.js.map +1 -0
  55. package/es/modules/tenant-service/components/TenantServicePropertiesView/index.d.ts +6 -0
  56. package/es/modules/tenant-service/components/TenantServicePropertiesView/index.js +16 -0
  57. package/es/modules/tenant-service/components/TenantServicePropertiesView/index.js.map +1 -0
  58. package/es/modules/tenant-service/components/TenantServicePropertiesView/index.less +4 -0
  59. package/es/modules/tenant-service/components/TenantServiceQuickViewDialog/index.d.ts +8 -0
  60. package/es/modules/tenant-service/components/TenantServiceQuickViewDialog/index.js +22 -0
  61. package/es/modules/tenant-service/components/TenantServiceQuickViewDialog/index.js.map +1 -0
  62. package/es/modules/tenant-service/components/TenantServiceQuickViewDialog/index.less +7 -0
  63. package/es/modules/tenant-service/components/TenantServiceReference/index.d.ts +5 -0
  64. package/es/modules/tenant-service/components/TenantServiceReference/index.js +14 -0
  65. package/es/modules/tenant-service/components/TenantServiceReference/index.js.map +1 -0
  66. package/es/modules/tenant-service/components/TenantServiceTabs/index.d.ts +8 -0
  67. package/es/modules/tenant-service/components/TenantServiceTabs/index.js +34 -0
  68. package/es/modules/tenant-service/components/TenantServiceTabs/index.js.map +1 -0
  69. package/es/modules/tenant-service/controls/TenantServiceMenu/index.d.ts +6 -0
  70. package/es/modules/tenant-service/controls/TenantServiceMenu/index.js +9 -0
  71. package/es/modules/tenant-service/controls/TenantServiceMenu/index.js.map +1 -0
  72. package/es/modules/tenant-service/pages/TenantServiceDefaultView/index.d.ts +3 -0
  73. package/es/modules/tenant-service/pages/TenantServiceDefaultView/index.js +30 -0
  74. package/es/modules/tenant-service/pages/TenantServiceDefaultView/index.js.map +1 -0
  75. package/es/modules/tenant-service/pages/TenantServiceDefaultView/index.less +17 -0
  76. package/es/modules/tenant-service-execution/components/TenantServiceExecutionHeader/index.d.ts +6 -0
  77. package/es/modules/tenant-service-execution/components/TenantServiceExecutionHeader/index.js +19 -0
  78. package/es/modules/tenant-service-execution/components/TenantServiceExecutionHeader/index.js.map +1 -0
  79. package/es/modules/tenant-service-execution/components/TenantServiceExecutionHeader/index.less +12 -0
  80. package/es/modules/tenant-service-execution/components/TenantServiceExecutionItem/index.d.ts +5 -0
  81. package/es/modules/tenant-service-execution/components/TenantServiceExecutionItem/index.js +34 -0
  82. package/es/modules/tenant-service-execution/components/TenantServiceExecutionItem/index.js.map +1 -0
  83. package/es/modules/tenant-service-execution/components/TenantServiceExecutionItem/index.less +29 -0
  84. package/es/modules/tenant-service-execution/components/TenantServiceExecutionList/index.d.ts +16 -0
  85. package/es/modules/tenant-service-execution/components/TenantServiceExecutionList/index.js +52 -0
  86. package/es/modules/tenant-service-execution/components/TenantServiceExecutionList/index.js.map +1 -0
  87. package/es/modules/tenant-service-execution/components/TenantServiceExecutionList/index.less +12 -0
  88. package/es/modules/tenant-service-execution/components/TenantServiceExecutionMessagesList/index.d.ts +7 -0
  89. package/es/modules/tenant-service-execution/components/TenantServiceExecutionMessagesList/index.js +24 -0
  90. package/es/modules/tenant-service-execution/components/TenantServiceExecutionMessagesList/index.js.map +1 -0
  91. package/es/modules/tenant-service-execution/components/TenantServiceExecutionMessagesList/index.less +27 -0
  92. package/es/modules/tenant-service-execution/components/TenantServiceExecutionProperties/index.d.ts +20 -0
  93. package/es/modules/tenant-service-execution/components/TenantServiceExecutionProperties/index.js +46 -0
  94. package/es/modules/tenant-service-execution/components/TenantServiceExecutionProperties/index.js.map +1 -0
  95. package/es/modules/tenant-service-execution/components/TenantServiceExecutionPropertiesView/index.d.ts +9 -0
  96. package/es/modules/tenant-service-execution/components/TenantServiceExecutionPropertiesView/index.js +16 -0
  97. package/es/modules/tenant-service-execution/components/TenantServiceExecutionPropertiesView/index.js.map +1 -0
  98. package/es/modules/tenant-service-execution/components/TenantServiceExecutionPropertiesView/index.less +4 -0
  99. package/es/modules/tenant-service-execution/components/TenantServiceExecutionQuickViewDialog/index.d.ts +8 -0
  100. package/es/modules/tenant-service-execution/components/TenantServiceExecutionQuickViewDialog/index.js +22 -0
  101. package/es/modules/tenant-service-execution/components/TenantServiceExecutionQuickViewDialog/index.js.map +1 -0
  102. package/es/modules/tenant-service-execution/components/TenantServiceExecutionQuickViewDialog/index.less +7 -0
  103. package/es/modules/tenant-service-execution/components/TenantServiceExecutionTabs/index.d.ts +6 -0
  104. package/es/modules/tenant-service-execution/components/TenantServiceExecutionTabs/index.js +24 -0
  105. package/es/modules/tenant-service-execution/components/TenantServiceExecutionTabs/index.js.map +1 -0
  106. package/es/modules/tenant-service-execution/controls/TenantServiceExecutionMenu/index.d.ts +6 -0
  107. package/es/modules/tenant-service-execution/controls/TenantServiceExecutionMenu/index.js +9 -0
  108. package/es/modules/tenant-service-execution/controls/TenantServiceExecutionMenu/index.js.map +1 -0
  109. package/es/modules/tenant-service-execution/pages/TenantServiceExecutionDefaultView/index.d.ts +3 -0
  110. package/es/modules/tenant-service-execution/pages/TenantServiceExecutionDefaultView/index.js +30 -0
  111. package/es/modules/tenant-service-execution/pages/TenantServiceExecutionDefaultView/index.js.map +1 -0
  112. package/es/modules/tenant-service-execution/pages/TenantServiceExecutionDefaultView/index.less +17 -0
  113. package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.js +42 -12
  114. package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.js.map +1 -1
  115. package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.less +77 -15
  116. package/es/pages/Signature/Envelope/EnvelopeRecipientView/state.d.ts +1 -0
  117. package/es/pages/Signature/Envelope/EnvelopeRecipientView/state.js +9 -0
  118. package/es/pages/Signature/Envelope/EnvelopeRecipientView/state.js.map +1 -1
  119. package/es/pages/Signature/Letter/LetterViewer/index.less +1 -1
  120. package/es/routes.d.ts +18 -0
  121. package/es/routes.js +40 -1
  122. package/es/routes.js.map +1 -1
  123. package/package.json +1 -1
@@ -0,0 +1,177 @@
1
+ import { __decorate } from "tslib";
2
+ import { action, makeObservable, observable } from "mobx";
3
+ import dayjs from "dayjs";
4
+ export class State {
5
+ constructor(store) {
6
+ Object.defineProperty(this, "store", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: store
11
+ });
12
+ Object.defineProperty(this, "tenantService", {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value: void 0
17
+ });
18
+ Object.defineProperty(this, "days", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: 0
23
+ });
24
+ Object.defineProperty(this, "hours", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: 0
29
+ });
30
+ Object.defineProperty(this, "minutes", {
31
+ enumerable: true,
32
+ configurable: true,
33
+ writable: true,
34
+ value: 0
35
+ });
36
+ /** loading of save */
37
+ Object.defineProperty(this, "loading", {
38
+ enumerable: true,
39
+ configurable: true,
40
+ writable: true,
41
+ value: false
42
+ });
43
+ /** visible of interval edit dialog */
44
+ Object.defineProperty(this, "visible", {
45
+ enumerable: true,
46
+ configurable: true,
47
+ writable: true,
48
+ value: false
49
+ });
50
+ /** save StartDate && DueDate or EstimatedHours*/
51
+ Object.defineProperty(this, "onSave", {
52
+ enumerable: true,
53
+ configurable: true,
54
+ writable: true,
55
+ value: async () => {
56
+ var _a;
57
+ this.loading = true;
58
+ const totalMinutes = this.convertToMinutes(this.days, this.hours, this.minutes);
59
+ console.log("---save");
60
+ await this.store.edit(this.tenantService.id, { data: { Interval: totalMinutes } });
61
+ /** 更新days,hours,minutes */
62
+ this.formatMinutes((_a = this.tenantService.interval) !== null && _a !== void 0 ? _a : 0);
63
+ this.loading = false;
64
+ this.visible = false;
65
+ }
66
+ });
67
+ Object.defineProperty(this, "onChangeDays", {
68
+ enumerable: true,
69
+ configurable: true,
70
+ writable: true,
71
+ value: (value) => {
72
+ this.days = value !== null && value !== void 0 ? value : 0;
73
+ }
74
+ });
75
+ Object.defineProperty(this, "onChangeHours", {
76
+ enumerable: true,
77
+ configurable: true,
78
+ writable: true,
79
+ value: (value) => {
80
+ this.hours = value !== null && value !== void 0 ? value : 0;
81
+ }
82
+ });
83
+ Object.defineProperty(this, "onChangeMinutes", {
84
+ enumerable: true,
85
+ configurable: true,
86
+ writable: true,
87
+ value: (value) => {
88
+ this.minutes = value !== null && value !== void 0 ? value : 0;
89
+ }
90
+ });
91
+ Object.defineProperty(this, "onVisibleChange", {
92
+ enumerable: true,
93
+ configurable: true,
94
+ writable: true,
95
+ value: (visible) => {
96
+ this.visible = visible;
97
+ }
98
+ });
99
+ /** convertToMinutes 接受天、小时和分钟作为参数,并使用dayjs的duration功能将它们转换为总分钟数 */
100
+ Object.defineProperty(this, "convertToMinutes", {
101
+ enumerable: true,
102
+ configurable: true,
103
+ writable: true,
104
+ value: (days, hours, minutes) => {
105
+ const totalDuration = dayjs.duration({ days, hours, minutes });
106
+ return totalDuration.asMinutes();
107
+ }
108
+ });
109
+ /** 将总分钟数转换为天、小时、分钟的格式 */
110
+ Object.defineProperty(this, "formatMinutes", {
111
+ enumerable: true,
112
+ configurable: true,
113
+ writable: true,
114
+ value: (totalMinutes) => {
115
+ // 获取天、小时、分钟
116
+ const days = Number(dayjs.duration({ minutes: totalMinutes }).as("days").toFixed());
117
+ const dayMinutes = dayjs.duration({ days: days }).as("minutes");
118
+ const ms1 = totalMinutes - dayMinutes;
119
+ const hours = Number(dayjs.duration({ minutes: ms1 }).as("hours").toFixed());
120
+ const hourMinutes = dayjs.duration({ hours: hours }).as("minutes");
121
+ const minutes = ms1 - hourMinutes;
122
+ this.days = days;
123
+ this.hours = hours;
124
+ this.minutes = minutes;
125
+ }
126
+ });
127
+ makeObservable(this);
128
+ }
129
+ update(data) {
130
+ var _a;
131
+ this.tenantService = data;
132
+ this.formatMinutes((_a = this.tenantService.interval) !== null && _a !== void 0 ? _a : 0);
133
+ }
134
+ }
135
+ __decorate([
136
+ observable
137
+ ], State.prototype, "tenantService", void 0);
138
+ __decorate([
139
+ observable
140
+ ], State.prototype, "days", void 0);
141
+ __decorate([
142
+ observable
143
+ ], State.prototype, "hours", void 0);
144
+ __decorate([
145
+ observable
146
+ ], State.prototype, "minutes", void 0);
147
+ __decorate([
148
+ observable
149
+ ], State.prototype, "loading", void 0);
150
+ __decorate([
151
+ observable
152
+ ], State.prototype, "visible", void 0);
153
+ __decorate([
154
+ action
155
+ ], State.prototype, "update", null);
156
+ __decorate([
157
+ action
158
+ ], State.prototype, "onSave", void 0);
159
+ __decorate([
160
+ action
161
+ ], State.prototype, "onChangeDays", void 0);
162
+ __decorate([
163
+ action
164
+ ], State.prototype, "onChangeHours", void 0);
165
+ __decorate([
166
+ action
167
+ ], State.prototype, "onChangeMinutes", void 0);
168
+ __decorate([
169
+ action
170
+ ], State.prototype, "onVisibleChange", void 0);
171
+ __decorate([
172
+ action
173
+ ], State.prototype, "convertToMinutes", void 0);
174
+ __decorate([
175
+ action
176
+ ], State.prototype, "formatMinutes", void 0);
177
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServiceInterval/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,OAAO,KAAK;IAUjB,YAA2B,KAAyB;QAAjC;;;;mBAAQ,KAAK;WAAoB;QATjC;;;;;WAA8B;QAC9B;;;;mBAAO,CAAC;WAAC;QACT;;;;mBAAQ,CAAC;WAAC;QACV;;;;mBAAU,CAAC;WAAC;QAC/B,uBAAuB;QACJ;;;;mBAAU,KAAK;WAAC;QACnC,wCAAwC;QACrB;;;;mBAAU,KAAK;WAAC;QAWnC,kDAAkD;QAE3C;;;;mBAAS,KAAK,IAAI,EAAE;;gBAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;gBACpB,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;gBAChF,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACvB,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;gBACnF,2BAA2B;gBAC3B,IAAI,CAAC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React from "react";
2
+ declare const TenantServiceItem: (props: {
3
+ id: string;
4
+ }) => React.JSX.Element;
5
+ export default TenantServiceItem;
@@ -0,0 +1,33 @@
1
+ import ToolBar from "../../../../controls/ToolBar/ToolBar2";
2
+ import { Open } from "../../../../controls/ToolBar/buttons";
3
+ import ItemFunction from "@voplus/morpho-org/es/controls/ItemFunction";
4
+ import { observe } from "@voplus/morpho-ui";
5
+ import { ColumnItem, ColumnItemCol } from "@voplus/morpho-ui/es/controls/ColumnItem";
6
+ import { Skeleton, Badge } from "antd";
7
+ import classnames from "classnames";
8
+ import React, { useState } from "react";
9
+ import { useTenantService } from "../../../../data/tenant-service";
10
+ import Routes from "../../../../routes";
11
+ import TenantServiceMenu from "../../controls/TenantServiceMenu";
12
+ import PropertiesView from "../TenantServicePropertiesView";
13
+ import TenantServiceQuickViewDialog from "../TenantServiceQuickViewDialog";
14
+ import styles from "./index.less";
15
+ const TenantServiceItem = (props) => {
16
+ const { id } = props;
17
+ const tenantService = useTenantService(id);
18
+ const [hover, setHover] = useState(false);
19
+ return observe(() => (React.createElement(Skeleton, { active: true, loading: tenantService.loading },
20
+ React.createElement(ItemFunction, { className: styles["tenant-service-item"], onMouseOver: () => setHover(true), onMouseLeave: () => setHover(false), propertiesView: React.createElement(PropertiesView, { id: id }), quickViewDialog: (onCancel) => (React.createElement(TenantServiceQuickViewDialog, { id: id, visible: true, onCancel: onCancel })) },
21
+ React.createElement(ColumnItem, { className: "tenant-service-column-item" },
22
+ React.createElement(ColumnItemCol, { span: 18 },
23
+ React.createElement("div", { className: "tenant-service-item-name" }, `${tenantService.name}`),
24
+ React.createElement("div", { className: "text-gray-400 text-xs" }, tenantService.description)),
25
+ React.createElement(ColumnItemCol, { span: 6, align: "flex-end" },
26
+ React.createElement("div", { className: classnames("tenant-service-running", { hide: hover }) }, tenantService.isRunning ? React.createElement(Badge, { color: "green", text: "Running" }) : null),
27
+ React.createElement("div", { className: classnames("tenant-service-item-tool", { show: hover }) },
28
+ React.createElement(ToolBar, { showMenu: false },
29
+ React.createElement(Open, { url: Routes.TenantService.getUrl(id) }),
30
+ React.createElement(TenantServiceMenu, { id: id, closeAside: true })))))))));
31
+ };
32
+ export default TenantServiceItem;
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServiceItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,YAAY,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAC5D,OAAO,4BAA4B,MAAM,iCAAiC,CAAC;AAC3E,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,iBAAiB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACnD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,QAAQ,IAAC,MAAM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IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,GAAI,CACtC,CACL,CACS,CACJ,CACC,CACL,CACX,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,36 @@
1
+ @import "~@voplus/morpho-theme/styles/index.less";
2
+
3
+ .tenant-service-item {
4
+ cursor: pointer;
5
+
6
+ &:hover {
7
+ background-color: #f5f8fd;
8
+ }
9
+
10
+ :global {
11
+ .tenant-service-item-name {
12
+ line-height: 24px;
13
+ color: #575757;
14
+ font-weight: 500;
15
+ word-break: break-all;
16
+ }
17
+
18
+ .tenant-service-running {
19
+ &.hide {
20
+ display: none;
21
+ }
22
+ }
23
+
24
+ .tenant-service-item-tool {
25
+ display: none;
26
+
27
+ &.show {
28
+ display: block;
29
+ }
30
+ }
31
+
32
+ .tenant-service-column-item {
33
+ padding: 10px 20px;
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { ITenantService } from "../../../../data/tenant-service";
3
+ declare const TenantServiceList: (props: {
4
+ /** title */
5
+ viewTitle?: React.ReactNode;
6
+ /** 是否显示 total */
7
+ total?: boolean | undefined;
8
+ /** 是否允在 listView 内部打开 aside */
9
+ asideable?: boolean | undefined;
10
+ /** Call back when received total number of tenant-service. */
11
+ onTotal?: ((total: number) => void) | undefined;
12
+ /** Call back when an item has been clicked on the list. */
13
+ onClickItem?: ((item: ITenantService) => void) | undefined;
14
+ }) => React.JSX.Element;
15
+ export default TenantServiceList;
@@ -0,0 +1,52 @@
1
+ import { observe, useRenderOnChange } from "@voplus/morpho-ui";
2
+ import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
3
+ import React, { useState } from "react";
4
+ import { useTenantServiceListEffect } from "../../../../data/tenant-service";
5
+ import { Badge } from "antd";
6
+ import DocumentItemFrame from "../../../../controls/DocumentItemFrame";
7
+ import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
8
+ import TenantServiceItem from "../TenantServiceItem";
9
+ import styles from "./index.less";
10
+ const TenantServiceList = (props) => {
11
+ const { viewTitle, total, asideable } = props;
12
+ const [activeId, setActiveId] = useState("");
13
+ const [tenantServiceTotal, setTenantServiceTotal] = useState(0);
14
+ const list = useCreateListDataState({
15
+ filterDefaults: {
16
+ filters: [],
17
+ },
18
+ }, []);
19
+ useRenderOnChange(() => list.filters.options);
20
+ /** 把ListDataState传给useTenantServiceListEffect,使之可以自動更新loading, hasmore. */
21
+ useTenantServiceListEffect(list, (result, total) => {
22
+ var _a;
23
+ list.union(result);
24
+ setTenantServiceTotal(total);
25
+ (_a = props.onTotal) === null || _a === void 0 ? void 0 : _a.call(props, total);
26
+ }, {
27
+ Total: true,
28
+ ...list.filters.options,
29
+ });
30
+ return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
31
+ React.createElement("div", { className: styles["tenant-service-list"] },
32
+ React.createElement(ListView, { headerProps: {
33
+ viewTitle: (React.createElement(React.Fragment, null,
34
+ React.createElement("span", { className: "margin-right-10" }, viewTitle || "Tenant Service"),
35
+ total && tenantServiceTotal ? (React.createElement(Badge, { count: tenantServiceTotal, overflowCount: 99 })) : null)),
36
+ addAble: false,
37
+ sortable: false,
38
+ quickSearch: true,
39
+ }, asideable: asideable, className: "tenant-service-list-content", renderItem: ({ item }) => (React.createElement(DocumentItemFrame, { key: item.id, frameProps: {
40
+ active: activeId === item.id,
41
+ hoverEffect: "none",
42
+ activeEffect: "border",
43
+ borderProps: { location: "right", color: "#1890ff ", size: "2px" },
44
+ }, onClick: () => {
45
+ var _a;
46
+ setActiveId(item.id);
47
+ (_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, item);
48
+ } },
49
+ React.createElement(TenantServiceItem, { id: item.id }))) })))));
50
+ };
51
+ export default TenantServiceList;
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServ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AC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,12 @@
1
+ .tenant-service-list {
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+
6
+ :global {
7
+ .tenant-service-list-content {
8
+ background-color: #fff;
9
+ padding: 0 !important;
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ export type TenantServicePropertiesName = "Enable" | "Is Running" | "Last Start" | "Interval";
3
+ declare const TenantServiceProperties: {
4
+ (props: {
5
+ id: string;
6
+ headerVisible?: boolean;
7
+ tenantServiceTitle?: string;
8
+ tenantServiceProperties?: {
9
+ name: TenantServicePropertiesName;
10
+ visible?: boolean;
11
+ }[];
12
+ }): React.JSX.Element;
13
+ defaultProps: {
14
+ tenantServiceTitle: string;
15
+ tenantServiceProperties: {
16
+ name: string;
17
+ }[];
18
+ };
19
+ };
20
+ export default TenantServiceProperties;
@@ -0,0 +1,53 @@
1
+ import DescriptionEditor from "../../../../controls/DescriptionEditor";
2
+ import ToolBar from "../../../../controls/ToolBar/ToolBar2";
3
+ import { observe } from "@voplus/morpho-ui";
4
+ import Prop from "@voplus/morpho-ui/es/controls/Prop";
5
+ import PropertiesSection from "@voplus/morpho-ui/es/controls/PropertiesSection";
6
+ import React from "react";
7
+ import dayjs from "dayjs";
8
+ import { Switch } from "antd";
9
+ import Scrollbars from "react-custom-scrollbars-2";
10
+ import TenantServiceInterval from "../TenantServiceInterval";
11
+ import { useTenantService, useTenantServiceStore } from "../../../../data/tenant-service";
12
+ import TenantServiceMenu from "../../controls/TenantServiceMenu";
13
+ const TenantServiceProperties = (props) => {
14
+ /** 加class name 为了方便做integration tests */
15
+ const classId = "tenantService-properties";
16
+ const { id, headerVisible, tenantServiceTitle, tenantServiceProperties } = props;
17
+ const tenantService = useTenantService(id);
18
+ const store = useTenantServiceStore();
19
+ const filterPro = tenantServiceProperties === null || tenantServiceProperties === void 0 ? void 0 : tenantServiceProperties.filter((i) => (i === null || i === void 0 ? void 0 : i.visible) !== false);
20
+ return observe(() => (React.createElement("div", { className: "properties-list" },
21
+ headerVisible && (React.createElement("div", { className: "properties-header" },
22
+ React.createElement("div", { className: "title" }, tenantService.name),
23
+ React.createElement(ToolBar, { id: id, showMenu: false },
24
+ React.createElement(TenantServiceMenu, { id: id })))),
25
+ React.createElement(Scrollbars, { autoHide: true },
26
+ tenantService.description ? (React.createElement(DescriptionEditor, { id: id, description: tenantService.description, readonly: true })) : null,
27
+ React.createElement(PropertiesSection, { title: tenantServiceTitle, properties: () => filterPro === null || filterPro === void 0 ? void 0 : filterPro.map((i) => (React.createElement(Prop, { key: i.name, label: i.name, className: `${classId}-${i.name}` }, renderProp(i)))) })))));
28
+ function renderProp(item) {
29
+ switch (item.name) {
30
+ case "Is Running":
31
+ return React.createElement(Switch, { checked: tenantService.isRunning, disabled: true });
32
+ case "Last Start":
33
+ return React.createElement(React.Fragment, null, dayjs(tenantService.lastStart).format("YYYY-MM-DD"));
34
+ case "Enable":
35
+ return (React.createElement(Switch, { checked: tenantService.enable, onChange: (checked) => {
36
+ store.edit(id, { data: { Enable: checked }, error: "message" });
37
+ } }));
38
+ case "Interval":
39
+ return React.createElement(TenantServiceInterval, { id: id });
40
+ }
41
+ }
42
+ };
43
+ TenantServiceProperties.defaultProps = {
44
+ tenantServiceTitle: "TenantService Properties",
45
+ tenantServiceProperties: [
46
+ { name: "Interval" },
47
+ { name: "Enable" },
48
+ { name: "Is Running" },
49
+ { name: "Last Start" },
50
+ ],
51
+ };
52
+ export default TenantServiceProperties;
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServiceProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wCAAwC,CAAC;AACvE,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CA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EAAE,EAAE,GAAI,CAAC;QAC3C,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG;IACtC,kBAAkB,EAAE,0BAA0B;IAC9C,uBAAuB,EAAE;QACxB,EAAE,IAAI,EAAE,UAAU,EAAE;QACpB,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClB,EAAE,IAAI,EAAE,YAAY,EAAE;QACtB,EAAE,IAAI,EAAE,YAAY,EAAE;KACtB;CACD,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import "./index.less";
2
+ import React from "react";
3
+ declare const TenantServicePropertiesView: (props: {
4
+ id: string;
5
+ }) => React.JSX.Element;
6
+ export default TenantServicePropertiesView;
@@ -0,0 +1,16 @@
1
+ import "./index.less";
2
+ import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
3
+ import React, { useMemo } from "react";
4
+ import { observe } from "@voplus/morpho-ui";
5
+ import TenantServiceHeader from "../TenantServiceHeader";
6
+ import TenantServiceTabs from "../TenantServiceTabs";
7
+ const TenantServicePropertiesView = (props) => {
8
+ const id = props.id;
9
+ const view = useMemo(() => new ViewContextData("PropertiesView"), []);
10
+ return observe(() => (React.createElement(ViewContext.Provider, { value: view },
11
+ React.createElement("div", { className: "module-detail-view tenant-service-properties-view" },
12
+ React.createElement(TenantServiceHeader, { id: id }),
13
+ React.createElement(TenantServiceTabs, { id: id, properties: true })))));
14
+ };
15
+ export default TenantServicePropertiesView;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServicePropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAErD,MAAM,2BAA2B,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC7D,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IACpB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEtE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI;QAChC,6BAAK,SAAS,EAAC,mDAAmD;YACjE,oBAAC,mBAAmB,IAAC,EAAE,EAAE,EAAE,GAAI;YAC/B,oBAAC,iBAAiB,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,SAAG,CACnC,CACgB,CACvB,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,4 @@
1
+ :global {
2
+ .tenant-service-properties-view {
3
+ }
4
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ declare const TenantServiceQuickViewDialog: (props: {
4
+ id: string;
5
+ visible?: boolean;
6
+ onCancel?: () => void;
7
+ }) => React.JSX.Element;
8
+ export default TenantServiceQuickViewDialog;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import TenantServiceExecutionList from "../../../tenant-service-execution/components/TenantServiceExecutionList";
4
+ import QuickViewDialog from "../../../../controls/QuickViewDialog";
5
+ import { faBallot } from "@fortawesome/pro-light-svg-icons";
6
+ import TenantServiceHeader from "../TenantServiceHeader";
7
+ import TenantServiceProperties from "../TenantServiceProperties";
8
+ import "./index.less";
9
+ const TenantServiceQuickViewDialog = (props) => {
10
+ const { id } = props;
11
+ return observe(() => (React.createElement(QuickViewDialog, { ...props, className: "tenant-service-quick-view", header: React.createElement(TenantServiceHeader, { id: id }), items: [
12
+ {
13
+ name: "TenantServiceExecution",
14
+ icon: faBallot,
15
+ title: "Tenant Service Execution",
16
+ detail: React.createElement(TenantServiceExecutionList, { tenantServiceId: id }),
17
+ },
18
+ ], subButtons: [] },
19
+ React.createElement(TenantServiceProperties, { id: id }))));
20
+ };
21
+ export default TenantServiceQuickViewDialog;
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServiceQuickViewDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,0BAA0B,MAAM,yEAAyE,CAAC;AACjH,OAAO,eAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,uBAAuB,MAAM,4BAA4B,CAAC;AACjE,OAAO,cAAc,CAAC;AAEtB,MAAM,4BAA4B,GAAG,CAAC,KAIrC,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,eAAe,OACX,KAAK,EACT,SAAS,EAAC,2BAA2B,EACrC,MAAM,EAAE,oBAAC,mBAAmB,IAAC,EAAE,EAAE,EAAE,GAAI,EACvC,KAAK,EAAE;YACN;gBACC,IAAI,EAAE,wBAAwB;gBAC9B,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,0BAA0B;gBACjC,MAAM,EAAE,oBAAC,0BAA0B,IAAC,eAAe,EAAE,EAAE,GAAI;aAC3D;SACD,EACD,UAAU,EAAE,EAAE;QAEd,oBAAC,uBAAuB,IAAC,EAAE,EAAE,EAAE,GAAI,CAClB,CAClB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
@@ -0,0 +1,7 @@
1
+ :global {
2
+ .tenant-service-quick-view {
3
+ .tenant-service-header {
4
+ padding: 10px 44px 10px 20px;
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ declare const TenantServiceReference: (props: {
3
+ id: string;
4
+ }) => React.JSX.Element;
5
+ export default TenantServiceReference;
@@ -0,0 +1,14 @@
1
+ import React, { useState } from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import QuickView from "../TenantServiceQuickViewDialog";
4
+ import { useTenantService } from "../../../../data/tenant-service";
5
+ const TenantServiceReference = (props) => {
6
+ const { id } = props;
7
+ const [visible, setVisible] = useState(false);
8
+ const tenantService = useTenantService(id);
9
+ return observe(() => (React.createElement(React.Fragment, null,
10
+ React.createElement("span", { className: "prosemirror-mention-node", onClick: () => setVisible(true) }, `&${tenantService.name}`),
11
+ visible && React.createElement(QuickView, { id: id, visible: true, onCancel: () => setVisible(false) }))));
12
+ };
13
+ export default TenantServiceReference;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServiceReference/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,sBAAsB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACxD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAE3C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,KAAK,CAAC,QAAQ;QACd,8BACC,SAAS,EAAC,0BAA0B,EACpC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAC9B,IAAI,aAAa,CAAC,IAAI,EAAE,CAAQ;QACjC,OAAO,IAAI,oBAAC,SAAS,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,QAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,CAC5D,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ITenantService } from "../../../../data/tenant-service";
3
+ declare const TenantServiceTabs: (props: {
4
+ id: string;
5
+ properties?: boolean;
6
+ data?: ITenantService;
7
+ }) => React.JSX.Element;
8
+ export default TenantServiceTabs;
@@ -0,0 +1,34 @@
1
+ import React, { useState } from "react";
2
+ import DocumentTabs from "../../../../components/DocumentTabs";
3
+ import TenantServiceExecutionList from "../../../tenant-service-execution/components/TenantServiceExecutionList";
4
+ import { useTenantServiceExecutionListEffect } from "../../../../data/tenant-service-execution";
5
+ import { observe } from "@voplus/morpho-ui";
6
+ import { Badge } from "antd";
7
+ import TenantServiceProperties from "../TenantServiceProperties";
8
+ const TenantServiceTabs = (props) => {
9
+ const { id, properties } = props;
10
+ const [docTotals, setDocTotals] = useState(0);
11
+ useTenantServiceExecutionListEffect(null, (result, total) => setDocTotals(total || 0), {
12
+ Total: true,
13
+ List: false,
14
+ Filters: [{ c: "TenantServiceId", o: "=", l: "And", v1: id }],
15
+ });
16
+ const items = [
17
+ {
18
+ key: "TenantServiceExecution",
19
+ label: (React.createElement(React.Fragment, null,
20
+ "Tenant Service Execution",
21
+ React.createElement(Badge, { count: docTotals, className: "margin-left-10" }))),
22
+ children: React.createElement(TenantServiceExecutionList, { viewTitle: " ", tenantServiceId: id }),
23
+ },
24
+ ];
25
+ properties &&
26
+ items.unshift({
27
+ key: "Properties",
28
+ label: "Properties",
29
+ children: React.createElement(TenantServiceProperties, { id: id }),
30
+ });
31
+ return observe(() => (React.createElement(DocumentTabs, { id: id, active: properties ? "Properties" : "TenantServiceExecution", tabItems: items })));
32
+ };
33
+ export default TenantServiceTabs;
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServiceTabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAE/D,OAAO,0BAA0B,MAAM,yEAAyE,CAAC;AACjH,OAAO,EAAE,mCAAmC,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,uBAAuB,MAAM,4BAA4B,CAAC;AAEjE,MAAM,iBAAiB,GAAG,CAAC,KAAkE,EAAE,EAAE;IAChG,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE9C,mCAAmC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE;QACtF,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;KAC7D,CAAC,CAAC;IAEH,MAAM,KAAK,GAAuB;QACjC;YACC,GAAG,EAAE,wBAAwB;YAC7B,KAAK,EAAE,CACN;;gBAEC,oBAAC,KAAK,IAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAC,gBAAgB,GAAG,CACpD,CACH;YACD,QAAQ,EAAE,oBAAC,0BAA0B,IAAC,SAAS,EAAC,GAAG,EAAC,eAAe,EAAE,EAAE,GAAI;SAC3E;KACD,CAAC;IAEF,UAAU;QACT,KAAK,CAAC,OAAO,CAAC;YACb,GAAG,EAAE,YAAY;YACjB,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,oBAAC,uBAAuB,IAAC,EAAE,EAAE,EAAE,GAAI;SAC7C,CAAC,CAAC;IAEJ,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,YAAY,IACZ,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,wBAAwB,EAC5D,QAAQ,EAAE,KAAK,GACd,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ declare const TenantServiceMenu: (props: {
3
+ id: string;
4
+ closeAside?: boolean;
5
+ }) => React.JSX.Element;
6
+ export default TenantServiceMenu;
@@ -0,0 +1,9 @@
1
+ import NodeMenu from "@voplus/morpho-org/es/controls/NodeMenu";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import React from "react";
4
+ import { Access } from "@voplus/morpho-org/es/controls/NodeMenu/items";
5
+ const TenantServiceMenu = (props) => {
6
+ return observe(() => React.createElement(NodeMenu, { ...props, menus: React.createElement(Access, null) }));
7
+ };
8
+ export default TenantServiceMenu;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/controls/TenantServiceMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AAEvE,MAAM,iBAAiB,GAAG,CAAC,KAA2C,EAAE,EAAE;IACzE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,oBAAC,QAAQ,OAAK,KAAK,EAAE,KAAK,EAAE,oBAAC,MAAM,OAAG,GAAI,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const TenantServiceDefaultView: () => React.JSX.Element;
3
+ export default TenantServiceDefaultView;