@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
@@ -33,27 +33,9 @@ const PDFViewer = (props) => {
33
33
  return (React.createElement(PDFViewerContext.Provider, { value: state },
34
34
  React.createElement("div", { className: "pdf-viewer" }, (_a = props.toolbar) !== null && _a !== void 0 ? _a : React.createElement(Toolbar, null),
35
35
  React.createElement(Panable, { scroll: true },
36
- React.createElement(Document, { inputRef: viewerRef, file: state.url, onLoadSuccess: onDocumentLoadSuccess, options: options, onLoadError: (error) => {
37
- console.log(error, "----onLoadError");
38
- }, onSourceError: (error) => {
39
- console.log(error, "----onSourceError");
40
- } }, Array.from(new Array(numPages), (el, index) => {
36
+ React.createElement(Document, { inputRef: viewerRef, file: state.url, onLoadSuccess: onDocumentLoadSuccess, options: options }, Array.from(new Array(numPages), (el, index) => {
41
37
  var _a;
42
- return (React.createElement(Page, { onLoadSuccess: onPageLoadSuccess, width: (_a = state.width) !== null && _a !== void 0 ? _a : undefined, key: `page_${index + 1}`, pageNumber: index + 1, renderTextLayer: true, onGetAnnotationsError: (error) => {
43
- console.log(error, "----onGetAnnotationsError");
44
- }, onGetStructTreeError: (error) => {
45
- console.log(error, "----onGetStructTreeError");
46
- }, onGetTextError: (error) => {
47
- console.log(error, "----onGetTextError");
48
- }, onLoadError: (error) => {
49
- console.log(error, "----onLoadError");
50
- }, onRenderAnnotationLayerError: (error) => {
51
- console.log(error, "----onRenderAnnotationLayerError");
52
- }, onRenderError: (error) => {
53
- console.log(error, "----onRenderError");
54
- }, onRenderTextLayerError: (error) => {
55
- console.log(error, "----onRenderTextLayerError");
56
- } }));
38
+ return (React.createElement(Page, { onLoadSuccess: onPageLoadSuccess, width: (_a = state.width) !== null && _a !== void 0 ? _a : undefined, key: `page_${index + 1}`, pageNumber: index + 1, renderTextLayer: true }));
57
39
  }))))));
58
40
  });
59
41
  function onDocumentLoadSuccess(pdf) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/PDFViewer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,6CAA6C,CAAC,CAAC,uEAAuE;AAC7H,OAAO,uCAAuC,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,OAAO,MAAM,WAA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AAY,IACzB,MAAA,KAAK,CAAC,OAAO,mCAAI,oBAAC,OAAO,OAAG;gBAC7B,oBAAC,OAAO,IAAC,MAAM;oBACd,oBAAC,QAAQ,IACR,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,KAAK,CAAC,GAAG,EACf,aAAa,EAAE,qBAAqB,EACpC,OAAO,EAAE,OAAO,IAEf,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;;wBAAC,OAAA,CAC/C,oBAAC,IAAI,IACJ,aAAa,EAAE,iBAAiB,EAChC,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,SAAS,EAC/B,GAAG,EAAE,QAAQ,KAAK,GAAG,CAAC,EAAE,EACxB,UAAU,EAAE,KAAK,GAAG,CAAC,EACrB,eAAe,EAAE,IAAI,GACpB,CACF,CAAA;qBAAA,CAAC,CACQ,CACF,CACL,CACqB,CAC5B,CAAA;KAAA,CAAC,CAAC;IAEH,SAAS,qBAAqB,CAAC,GAAqB;QACnD,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1B,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,SAAS,iBAAiB,CAAC,IAAS;QACnC,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO;IACR,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { ApiEndPoint } from "@voplus/api";
2
+ import { CountedMap, Store } from "@voplus/morpho-data";
3
+ import { EditTenantServiceOptions, LoadTenantServiceOptions } from "./types";
4
+ import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
5
+ import { ITenantService } from "./interfaces";
6
+ /** Quotation store supply backend functions. */
7
+ export declare class TenantServiceStore extends Store {
8
+ readonly endpoint: ApiEndPoint;
9
+ /** Name of the store */
10
+ readonly name: string;
11
+ constructor(endpoint: ApiEndPoint);
12
+ /** All currently used corporate. */
13
+ readonly items: CountedMap<string, ITenantService>;
14
+ /** Edit an existing item on server. */
15
+ edit(id: string, options: EditTenantServiceOptions): Promise<void>;
16
+ /** Load a list of documents from server.
17
+ * @param {LoadDocumentListOptions}
18
+ */
19
+ loadList(options?: LoadDocumentListOptions): Promise<ITenantService[]>;
20
+ load(id: string, options: LoadTenantServiceOptions): Promise<ITenantService>;
21
+ }
22
+ /** 响应钩子检索 IdentityStore */
23
+ export declare const useTenantServiceStore: () => TenantServiceStore;
@@ -0,0 +1,69 @@
1
+ import { RequestBuilder } from "@voplus/api";
2
+ import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
3
+ import { observable } from "mobx";
4
+ const StoreName = "TenantServiceStore";
5
+ /** Quotation store supply backend functions. */
6
+ export class TenantServiceStore extends Store {
7
+ constructor(endpoint) {
8
+ super();
9
+ Object.defineProperty(this, "endpoint", {
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true,
13
+ value: endpoint
14
+ });
15
+ /** Name of the store */
16
+ Object.defineProperty(this, "name", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: StoreName
21
+ });
22
+ /** All currently used corporate. */
23
+ Object.defineProperty(this, "items", {
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true,
27
+ value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
28
+ });
29
+ }
30
+ /** Edit an existing item on server. */
31
+ async edit(id, options) {
32
+ await this.action(async () => {
33
+ const r = await this.endpoint.post(`/api/settings/hosted-services/${id}`, new RequestBuilder().json(options.data));
34
+ const t = await r.json();
35
+ this.items.overwrite(t.id, t);
36
+ }, options);
37
+ }
38
+ /** Load a list of documents from server.
39
+ * @param {LoadDocumentListOptions}
40
+ */
41
+ async loadList(options) {
42
+ let query = "";
43
+ if (options === null || options === void 0 ? void 0 : options.Includes) {
44
+ query = query.concat(`includes=${options.Includes}`);
45
+ }
46
+ if (query)
47
+ query = "?".concat(query);
48
+ const r = await this.endpoint.post(`/api/settings/hosted-services${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
49
+ return (await r.json());
50
+ }
51
+ async load(id, options) {
52
+ let query = "";
53
+ if (options.includes)
54
+ query = query.concat(`includes=${options.includes}`);
55
+ if (query)
56
+ query = "?".concat(query);
57
+ const r = await this.endpoint.get(`/api/settings/hosted-services/${id}${query}`);
58
+ return await r.json();
59
+ }
60
+ }
61
+ /** 响应钩子检索 IdentityStore */
62
+ export const useTenantServiceStore = () => {
63
+ const context = useApplicationContext();
64
+ if (!context.getService(StoreName)) {
65
+ context.registerService(new TenantServiceStore(context.api.currentEndPoint));
66
+ }
67
+ return context.getService(StoreName);
68
+ };
69
+ //# sourceMappingURL=TenantServiceStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TenantServiceStore.js","sourceRoot":"","sources":["../../../src/data/tenant-service/TenantServiceStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAG/E,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIlC,MAAM,SAAS,GAAG,oBAAoB,CAAC;AAEvC,gDAAgD;AAChD,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAI5C,YAAmC,QAAqB;QACvD,KAAK,EAAE,CAAC;QADU;;;;mBAAgB,QAAQ;WAAa;QAHxD,wBAAwB;QACR;;;;mBAAe,SAAS;WAAC;QAMzC,oCAAoC;QACpB;;;;mBAA4C,IAAI,UAAU,CACzE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAqB,CAAA,EAC/D,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC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,CAAC,QAAQ;YAAE,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3E,IAAI,KAAK;YAAE,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iCAAiC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QACjF,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACD;AAED,2BAA2B;AAC3B,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACzC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,eAAe,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,CAAwB,CAAC;AAC7D,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ListDataContextState } from "@voplus/morpho-ui/es/data";
2
+ import { LoadTenantServiceOptions } from ".";
3
+ import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
4
+ import { ITenantService } from "./interfaces";
5
+ /** React hook to retrieve a tenant service
6
+ * @param {string} id - id of the tenant service
7
+ * @param {LoadDocumentOptions} options - options
8
+ */
9
+ export declare const useTenantService: (id: string, options?: LoadTenantServiceOptions) => ITenantService;
10
+ export declare const useTenantServiceListEffect: (list: ListDataContextState<ITenantService> | null, effect: (list: ITenantService[], total: number) => void, options?: LoadDocumentListOptions) => void;
@@ -0,0 +1,19 @@
1
+ import { useLoadCountedMapItem } from "@voplus/morpho-data";
2
+ import { useListLoaderEffect } from "@voplus/morpho-ui/es/hooks";
3
+ import { useTenantServiceStore } from "./TenantServiceStore";
4
+ /** React hook to retrieve a tenant service
5
+ * @param {string} id - id of the tenant service
6
+ * @param {LoadDocumentOptions} options - options
7
+ */
8
+ export const useTenantService = (id, options) => {
9
+ options = options ? options : {};
10
+ const store = useTenantServiceStore();
11
+ return useLoadCountedMapItem(id, store.items, (calculatedOptions) => store.load(id, calculatedOptions), options);
12
+ };
13
+ export const useTenantServiceListEffect = (list, effect, options) => {
14
+ const deps = options ? options : {};
15
+ const store = useTenantServiceStore();
16
+ // Call useListLoaderEffect and ensure won't load twice for same loading options.
17
+ return useListLoaderEffect(list, store.items, effect, () => store.loadList(options), [deps]);
18
+ };
19
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/tenant-service/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAG7D;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAU,EAAE,OAAkC,EAAE,EAAE;IAClF,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA+B,CAAC;IAC/D,MAAM,KAAK,GAAG,qBAAqB,EAAE,CAAC;IACtC,OAAO,qBAAqB,CAC3B,EAAE,EACF,KAAK,CAAC,KAAK,EACX,CAAC,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,iBAAiB,CAAC,EACxD,OAAO,CACP,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACzC,IAAiD,EACjD,MAAuD,EACvD,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,KAAK,GAAG,qBAAqB,EAAE,CAAC;IAEtC,iFAAiF;IACjF,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9F,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./TenantServiceStore";
2
+ export * from "./hooks";
3
+ export * from "./interfaces";
4
+ export * from "./types";
@@ -0,0 +1,5 @@
1
+ export * from "./TenantServiceStore";
2
+ export * from "./hooks";
3
+ export * from "./interfaces";
4
+ export * from "./types";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/tenant-service/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { ILoadable } from "@voplus/morpho-data";
2
+ export interface ITenantService extends ILoadable {
3
+ /** id of the tenant service.
4
+ * 注意Alex给的是 id:number, 但如果是number有多个地方会报错
5
+ */
6
+ id: string;
7
+ /** service id of the tenant service. */
8
+ serviceId: string;
9
+ /** name of the tenant service. */
10
+ name: string;
11
+ /** description of the tenant service. */
12
+ description: string;
13
+ /** is running of the tenant service. */
14
+ isRunning: boolean;
15
+ /** enable of the tenant service. */
16
+ enable?: boolean;
17
+ /** last start of the tenant service. */
18
+ lastStart?: string;
19
+ /** Interval 是每次运行最小间隔,只保证不会小于这个间隔,后台用分钟记录. */
20
+ interval?: number;
21
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/data/tenant-service/interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { LoadOptions, StoreActionOptions } from "@voplus/morpho-data";
2
+ import { ITenantService } from "./interfaces";
3
+ /** Custom load org contact options type */
4
+ export type LoadTenantServiceOptions = {
5
+ /** Comma separated include options e.g. path */
6
+ includes?: string;
7
+ } & LoadOptions<ITenantService>;
8
+ export type TenantServiceEditOptions = {
9
+ /** enable of the tenant service. */
10
+ Enable?: boolean;
11
+ /** interval of the tenant service. */
12
+ Interval?: number;
13
+ };
14
+ export type EditTenantServiceOptions = {
15
+ data: TenantServiceEditOptions;
16
+ } & StoreActionOptions;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/tenant-service/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { ApiEndPoint } from "@voplus/api";
2
+ import { CountedMap, Store } from "@voplus/morpho-data";
3
+ import { LoadTenantServiceExecutionOptions } from "./types";
4
+ import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
5
+ import { ITenantServiceExecution } from "./interfaces";
6
+ /** Quotation store supply backend functions. */
7
+ export declare class TenantServiceExecutionStore extends Store {
8
+ readonly endpoint: ApiEndPoint;
9
+ /** Name of the store */
10
+ readonly name: string;
11
+ constructor(endpoint: ApiEndPoint);
12
+ /** All currently used corporate. */
13
+ readonly items: CountedMap<string, ITenantServiceExecution>;
14
+ /** Load a list of documents from server.
15
+ * @param {LoadDocumentListOptions}
16
+ */
17
+ loadList(options?: LoadDocumentListOptions): Promise<ITenantServiceExecution[]>;
18
+ load(id: string, options: LoadTenantServiceExecutionOptions): Promise<ITenantServiceExecution>;
19
+ }
20
+ /** 响应钩子检索 IdentityStore */
21
+ export declare const useTenantServiceExecutionStore: () => TenantServiceExecutionStore;
@@ -0,0 +1,61 @@
1
+ import { RequestBuilder } from "@voplus/api";
2
+ import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
3
+ import { observable } from "mobx";
4
+ const StoreName = "TenantServiceExecutionStore";
5
+ /** Quotation store supply backend functions. */
6
+ export class TenantServiceExecutionStore extends Store {
7
+ constructor(endpoint) {
8
+ super();
9
+ Object.defineProperty(this, "endpoint", {
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true,
13
+ value: endpoint
14
+ });
15
+ /** Name of the store */
16
+ Object.defineProperty(this, "name", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: StoreName
21
+ });
22
+ /** All currently used corporate. */
23
+ Object.defineProperty(this, "items", {
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true,
27
+ value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
28
+ });
29
+ }
30
+ /** Load a list of documents from server.
31
+ * @param {LoadDocumentListOptions}
32
+ */
33
+ async loadList(options) {
34
+ let query = "";
35
+ if (options === null || options === void 0 ? void 0 : options.Includes) {
36
+ query = query.concat(`includes=${options.Includes}`);
37
+ }
38
+ if (query)
39
+ query = "?".concat(query);
40
+ const r = await this.endpoint.post(`/api/settings/hosted-services/executions${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
41
+ return (await r.json());
42
+ }
43
+ async load(id, options) {
44
+ let query = "";
45
+ if (options.includes)
46
+ query = query.concat(`includes=${options.includes}`);
47
+ if (query)
48
+ query = "?".concat(query);
49
+ const r = await this.endpoint.get(`/api/settings/hosted-services/executions/${id}${query}`);
50
+ return await r.json();
51
+ }
52
+ }
53
+ /** 响应钩子检索 IdentityStore */
54
+ export const useTenantServiceExecutionStore = () => {
55
+ const context = useApplicationContext();
56
+ if (!context.getService(StoreName)) {
57
+ context.registerService(new TenantServiceExecutionStore(context.api.currentEndPoint));
58
+ }
59
+ return context.getService(StoreName);
60
+ };
61
+ //# sourceMappingURL=TenantServiceExecutionStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TenantServiceExecutionStore.js","sourceRoot":"","sources":["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AC,CAC9D,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAA8B,CAAC;IACtD,CAAC;IAEM,KAAK,CAAC,IAAI,CAChB,EAAU,EACV,OAA0C;QAE1C,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,OAAO,CAAC,QAAQ;YAAE,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3E,IAAI,KAAK;YAAE,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,4CAA4C,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QAC5F,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACD;AAED,2BAA2B;AAC3B,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE;IAClD,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,eAAe,CAAC,IAAI,2BAA2B,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IACvF,CAAC;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,CAAiC,CAAC;AACtE,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ListDataContextState } from "@voplus/morpho-ui/es/data";
2
+ import { LoadTenantServiceExecutionOptions } from ".";
3
+ import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
4
+ import { ITenantServiceExecution } from "./interfaces";
5
+ /** React hook to retrieve a tenant service execution
6
+ * @param {string} id - id of the tenant service execution
7
+ * @param {LoadDocumentOptions} options - options
8
+ */
9
+ export declare const useTenantServiceExecution: (id: string, options?: LoadTenantServiceExecutionOptions) => ITenantServiceExecution;
10
+ export declare const useTenantServiceExecutionListEffect: (list: ListDataContextState<ITenantServiceExecution> | null, effect: (list: ITenantServiceExecution[], total: number) => void, options?: LoadDocumentListOptions) => void;
@@ -0,0 +1,19 @@
1
+ import { useLoadCountedMapItem } from "@voplus/morpho-data";
2
+ import { useListLoaderEffect } from "@voplus/morpho-ui/es/hooks";
3
+ import { useTenantServiceExecutionStore } from "./TenantServiceExecutionStore";
4
+ /** React hook to retrieve a tenant service execution
5
+ * @param {string} id - id of the tenant service execution
6
+ * @param {LoadDocumentOptions} options - options
7
+ */
8
+ export const useTenantServiceExecution = (id, options) => {
9
+ options = options ? options : {};
10
+ const store = useTenantServiceExecutionStore();
11
+ return useLoadCountedMapItem(id, store.items, (calculatedOptions) => store.load(id, calculatedOptions), options);
12
+ };
13
+ export const useTenantServiceExecutionListEffect = (list, effect, options) => {
14
+ const deps = options ? options : {};
15
+ const store = useTenantServiceExecutionStore();
16
+ // Call useListLoaderEffect and ensure won't load twice for same loading options.
17
+ return useListLoaderEffect(list, store.items, effect, () => store.loadList(options), [deps]);
18
+ };
19
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/tenant-service-execution/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAG/E;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACxC,EAAU,EACV,OAA2C,EAC1C,EAAE;IACH,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAAwC,CAAC;IACxE,MAAM,KAAK,GAAG,8BAA8B,EAAE,CAAC;IAC/C,OAAO,qBAAqB,CAC3B,EAAE,EACF,KAAK,CAAC,KAAK,EACX,CAAC,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,iBAAiB,CAAC,EACxD,OAAO,CACP,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAClD,IAA0D,EAC1D,MAAgE,EAChE,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,KAAK,GAAG,8BAA8B,EAAE,CAAC;IAE/C,iFAAiF;IACjF,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9F,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./TenantServiceExecutionStore";
2
+ export * from "./hooks";
3
+ export * from "./interfaces";
4
+ export * from "./types";
@@ -0,0 +1,5 @@
1
+ export * from "./TenantServiceExecutionStore";
2
+ export * from "./hooks";
3
+ export * from "./interfaces";
4
+ export * from "./types";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/tenant-service-execution/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { ILoadable } from "@voplus/morpho-data";
2
+ export type IMessage = {
3
+ date: string | Date;
4
+ message: string;
5
+ isError: boolean;
6
+ };
7
+ export type IService = {
8
+ id: string | number;
9
+ name: string;
10
+ serviceId: string;
11
+ };
12
+ export interface ITenantServiceExecution extends ILoadable {
13
+ /** id of the tenant service execution.
14
+ * 注意Alex给的是 id:number, 但如果是number有多个地方会报错
15
+ */
16
+ id: string;
17
+ service: IService;
18
+ /** start time of the tenant service execution. */
19
+ startTime: string | Date;
20
+ /** complete time of the tenant service execution. */
21
+ completeTime: string | Date;
22
+ /** message of the tenant service execution. */
23
+ messages: IMessage[];
24
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/data/tenant-service-execution/interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { LoadOptions } from "@voplus/morpho-data";
2
+ import { ITenantServiceExecution } from "./interfaces";
3
+ /** Custom load org contact options type */
4
+ export type LoadTenantServiceExecutionOptions = {
5
+ /** Comma separated include options e.g. path */
6
+ includes?: string;
7
+ } & LoadOptions<ITenantServiceExecution>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/tenant-service-execution/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import "./index.less";
2
+ import React from "react";
3
+ declare const TenantServiceHeader: (props: {
4
+ id: string;
5
+ }) => React.JSX.Element;
6
+ export default TenantServiceHeader;
@@ -0,0 +1,19 @@
1
+ import "./index.less";
2
+ import ToolBar from "../../../../controls/ToolBar/ToolBar2";
3
+ import { Open } from "../../../../controls/ToolBar/buttons";
4
+ import { observe } from "@voplus/morpho-ui";
5
+ import React from "react";
6
+ import { useTenantService } from "../../../../data/tenant-service";
7
+ import Routes from "../../../../routes";
8
+ import TenantServiceMenu from "../../controls/TenantServiceMenu";
9
+ const TenantServiceHeader = (props) => {
10
+ const id = props.id;
11
+ const tenantService = useTenantService(id);
12
+ return observe(() => (React.createElement("div", { className: "tenant-service-header" },
13
+ React.createElement("div", null, tenantService.name),
14
+ React.createElement(ToolBar, { showMenu: false },
15
+ React.createElement(Open, { url: Routes.TenantService.getUrl(id) }),
16
+ React.createElement(TenantServiceMenu, { id: id, closeAside: true })))));
17
+ };
18
+ export default TenantServiceHeader;
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServiceHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAEjE,MAAM,mBAAmB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACrD,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IACpB,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAE3C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAC,uBAAuB;QACrC,iCAAM,aAAa,CAAC,IAAI,CAAO;QAC/B,oBAAC,OAAO,IAAC,QAAQ,EAAE,KAAK;YACvB,oBAAC,IAAI,IAAC,GAAG,EAAE,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,GAAI;YAC9C,oBAAC,iBAAiB,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,GAAI,CACtC,CACL,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ :global {
2
+ .tenant-service-header {
3
+ font-size: 24px;
4
+ display: flex;
5
+ justify-content: space-between;
6
+ padding: 10px 20px;
7
+
8
+ .tools-bar {
9
+ text-align: right;
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { TenantServiceIntervalProps } from "./state";
3
+ import "./index.less";
4
+ declare const TenantServiceInterval: (props: TenantServiceIntervalProps) => React.JSX.Element;
5
+ export default TenantServiceInterval;
@@ -0,0 +1,36 @@
1
+ import React, { useState } from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import { Button, Popover, InputNumber } from "antd";
4
+ import { useTenantServiceStore, useTenantService } from "../../../../data/tenant-service";
5
+ import dayjs from "dayjs";
6
+ import duration from "dayjs/plugin/duration";
7
+ import { State } from "./state";
8
+ import "./index.less";
9
+ dayjs.extend(duration);
10
+ const TenantServiceInterval = (props) => {
11
+ const { id } = props;
12
+ const store = useTenantServiceStore();
13
+ const [state] = useState(new State(store));
14
+ const tenantService = useTenantService(id);
15
+ state.update(tenantService);
16
+ return observe(() => (React.createElement("div", null,
17
+ React.createElement(Popover, { title: "Interval", trigger: ["click"], open: state.visible, className: props.className, onOpenChange: (open) => state.onVisibleChange(open), overlayClassName: "tenant-service-interval-popover", content: React.createElement("div", null,
18
+ React.createElement("div", null,
19
+ React.createElement(InputNumber, { min: 0, max: 365, value: state.days, onChange: (value) => state.onChangeDays(value !== null && value !== void 0 ? value : 0) }),
20
+ "Days",
21
+ React.createElement(InputNumber, { min: 0, max: 23, value: state.hours, onChange: (value) => state.onChangeHours(value !== null && value !== void 0 ? value : 0) }),
22
+ "Hours",
23
+ React.createElement(InputNumber, { min: 0, max: 59, value: state.minutes, onChange: (value) => state.onChangeMinutes(value !== null && value !== void 0 ? value : 0) }),
24
+ "Minutes"),
25
+ React.createElement("div", { className: "tenant-service-interval-popover_footer" },
26
+ React.createElement(Button, { type: "link", loading: state.loading, onClick: () => state.onSave() }, "Save"))) },
27
+ React.createElement("span", null,
28
+ state.days,
29
+ " Days ",
30
+ state.hours,
31
+ " Hours ",
32
+ state.minutes,
33
+ " Minutes")))));
34
+ };
35
+ export default TenantServiceInterval;
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tenant-service/components/TenantServiceInterval/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAC1F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAA8B,MAAM,SAAS,CAAC;AAC5D,OAAO,cAAc,CAAC;AAEtB,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEvB,MAAM,qBAAqB,GAAG,CAAC,KAAiC,EAAE,EAAE;IACnE,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,MAAM,KAAK,GAAG,qBAAqB,EAAE,CAAC;IACtC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3C,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAC3C,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAE5B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB;QACC,oBAAC,OAAO,IACP,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,CAAC,OAAO,CAAC,EAClB,IAAI,EAAE,KAAK,CAAC,OAAO,EACnB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,EACnD,gBAAgB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+ .ant-input-number {
10
+ width: 68px;
11
+ margin-left: 8px;
12
+ margin-right: 8px;
13
+ &:first-child {
14
+ margin-left: 0;
15
+ }
16
+ }
17
+ }
18
+ &_footer {
19
+ padding-top: 5px;
20
+ text-align: right;
21
+ .ant-btn {
22
+ padding-right: 0;
23
+ &.remove {
24
+ color: #ff4d4f;
25
+ }
26
+ &.default {
27
+ color: #666;
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,28 @@
1
+ import { TenantServiceStore, ITenantService } from "../../../../data/tenant-service";
2
+ export type TenantServiceIntervalProps = {
3
+ id: string;
4
+ className?: string;
5
+ };
6
+ export declare class State {
7
+ private store;
8
+ tenantService: ITenantService;
9
+ days: number;
10
+ hours: number;
11
+ minutes: number;
12
+ /** loading of save */
13
+ loading: boolean;
14
+ /** visible of interval edit dialog */
15
+ visible: boolean;
16
+ constructor(store: TenantServiceStore);
17
+ update(data: ITenantService): void;
18
+ /** save StartDate && DueDate or EstimatedHours*/
19
+ onSave: () => Promise<void>;
20
+ onChangeDays: (value: number) => void;
21
+ onChangeHours: (value: number) => void;
22
+ onChangeMinutes: (value: number) => void;
23
+ onVisibleChange: (visible: boolean) => void;
24
+ /** convertToMinutes 接受天、小时和分钟作为参数,并使用dayjs的duration功能将它们转换为总分钟数 */
25
+ convertToMinutes: (days: number, hours: number, minutes: number) => number;
26
+ /** 将总分钟数转换为天、小时、分钟的格式 */
27
+ formatMinutes: (totalMinutes: number) => void;
28
+ }