@voplus/morpho-document 6.0.45 → 6.0.46

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 (78) 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 +17 -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 +14 -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 +13 -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 +8 -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/TenantServiceItem/index.d.ts +7 -0
  38. package/es/modules/tenant-service/components/TenantServiceItem/index.js +36 -0
  39. package/es/modules/tenant-service/components/TenantServiceItem/index.js.map +1 -0
  40. package/es/modules/tenant-service/components/TenantServiceItem/index.less +35 -0
  41. package/es/modules/tenant-service/components/TenantServiceList/index.d.ts +17 -0
  42. package/es/modules/tenant-service/components/TenantServiceList/index.js +68 -0
  43. package/es/modules/tenant-service/components/TenantServiceList/index.js.map +1 -0
  44. package/es/modules/tenant-service/components/TenantServiceList/index.less +12 -0
  45. package/es/modules/tenant-service/components/TenantServiceProperties/index.d.ts +22 -0
  46. package/es/modules/tenant-service/components/TenantServiceProperties/index.js +43 -0
  47. package/es/modules/tenant-service/components/TenantServiceProperties/index.js.map +1 -0
  48. package/es/modules/tenant-service/components/TenantServicePropertiesView/index.d.ts +9 -0
  49. package/es/modules/tenant-service/components/TenantServicePropertiesView/index.js +18 -0
  50. package/es/modules/tenant-service/components/TenantServicePropertiesView/index.js.map +1 -0
  51. package/es/modules/tenant-service/components/TenantServicePropertiesView/index.less +4 -0
  52. package/es/modules/tenant-service/components/TenantServiceQuickViewDialog/index.d.ts +8 -0
  53. package/es/modules/tenant-service/components/TenantServiceQuickViewDialog/index.js +13 -0
  54. package/es/modules/tenant-service/components/TenantServiceQuickViewDialog/index.js.map +1 -0
  55. package/es/modules/tenant-service/components/TenantServiceQuickViewDialog/index.less +7 -0
  56. package/es/modules/tenant-service/components/TenantServiceSelect/index.d.ts +12 -0
  57. package/es/modules/tenant-service/components/TenantServiceSelect/index.js +44 -0
  58. package/es/modules/tenant-service/components/TenantServiceSelect/index.js.map +1 -0
  59. package/es/modules/tenant-service/components/TenantServiceTabs/index.d.ts +8 -0
  60. package/es/modules/tenant-service/components/TenantServiceTabs/index.js +41 -0
  61. package/es/modules/tenant-service/components/TenantServiceTabs/index.js.map +1 -0
  62. package/es/modules/tenant-service/controls/TenantServiceMenu/index.d.ts +6 -0
  63. package/es/modules/tenant-service/controls/TenantServiceMenu/index.js +9 -0
  64. package/es/modules/tenant-service/controls/TenantServiceMenu/index.js.map +1 -0
  65. package/es/modules/tenant-service/pages/TenantServiceDefaultView/index.d.ts +3 -0
  66. package/es/modules/tenant-service/pages/TenantServiceDefaultView/index.js +36 -0
  67. package/es/modules/tenant-service/pages/TenantServiceDefaultView/index.js.map +1 -0
  68. package/es/modules/tenant-service/pages/TenantServiceDefaultView/index.less +17 -0
  69. package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.js +42 -12
  70. package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.js.map +1 -1
  71. package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.less +77 -15
  72. package/es/pages/Signature/Envelope/EnvelopeRecipientView/state.d.ts +1 -0
  73. package/es/pages/Signature/Envelope/EnvelopeRecipientView/state.js +9 -0
  74. package/es/pages/Signature/Envelope/EnvelopeRecipientView/state.js.map +1 -1
  75. package/es/routes.d.ts +6 -0
  76. package/es/routes.js +14 -1
  77. package/es/routes.js.map +1 -1
  78. 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,CA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KAAK;YACtC,6BAAK,SAAS,EAAC,YAAY,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/tenant/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/tenant/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/tenant/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,E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E,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,wBAAwB,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QACxE,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,17 @@
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
+ }
@@ -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,14 @@
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
+ };
12
+ export type EditTenantServiceOptions = {
13
+ data: TenantServiceEditOptions;
14
+ } & 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/tenant/services/execution${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/tenant/services/execution/${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":["../../../src/data/tenant-service-execution/TenantServiceExecutionStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UA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U,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,kCAAkC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QAClF,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 useTenantServiceListEffect: (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 useTenantServiceListEffect = (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,0BAA0B,GAAG,CACzC,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,13 @@
1
+ import { ILoadable } from "@voplus/morpho-data";
2
+ export interface ITenantServiceExecution extends ILoadable {
3
+ /** id of the tenant service execution.
4
+ * 注意Alex给的是 id:number, 但如果是number有多个地方会报错
5
+ */
6
+ id: string;
7
+ /** start time of the tenant service execution. */
8
+ startTime?: Date;
9
+ /** complete time of the tenant service execution. */
10
+ completeTime?: Date;
11
+ /** message of the tenant service execution. */
12
+ message?: string;
13
+ }
@@ -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,8 @@
1
+ import "./index.less";
2
+ import React from "react";
3
+ import { ITenantService } from "../../../../data/tenant-service";
4
+ declare const TenantServiceHeader: (props: {
5
+ id: string;
6
+ data?: ITenantService;
7
+ }) => React.JSX.Element;
8
+ 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 Routes from "../../../../routes";
7
+ import TenantServiceMenu from "../../controls/TenantServiceMenu";
8
+ const TenantServiceHeader = (props) => {
9
+ const id = props.id;
10
+ // const tenantService = useTenantService(id);
11
+ const tenantService = props.data;
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;AAEtB,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;AAE1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAEjE,MAAM,mBAAmB,GAAG,CAAC,KAA4C,EAAE,EAAE;IAC5E,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IACpB,8CAA8C;IAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,IAAK,CAAC;IAElC,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,7 @@
1
+ import React from "react";
2
+ import { ITenantService } from "../../../../data/tenant-service";
3
+ declare const TenantServiceItem: (props: {
4
+ id: string;
5
+ data?: ITenantService;
6
+ }) => React.JSX.Element;
7
+ export default TenantServiceItem;
@@ -0,0 +1,36 @@
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 { Badge } from "antd";
7
+ import classnames from "classnames";
8
+ import React, { useState } from "react";
9
+ import Routes from "../../../../routes";
10
+ import TenantServiceMenu from "../../controls/TenantServiceMenu";
11
+ import PropertiesView from "../TenantServicePropertiesView";
12
+ import TenantServiceQuickViewDialog from "../TenantServiceQuickViewDialog";
13
+ import styles from "./index.less";
14
+ const TenantServiceItem = (props) => {
15
+ const { id } = props;
16
+ // const tenantService = useTenantService(id);
17
+ const tenantService = props.data;
18
+ const [hover, setHover] = useState(false);
19
+ return observe(() => (
20
+ // <Skeleton active loading={tenantService.loading}>
21
+ React.createElement(ItemFunction, { className: styles["tenant-service-item"], onMouseOver: () => setHover(true), onMouseLeave: () => setHover(false), propertiesView: React.createElement(PropertiesView, { id: id, data: tenantService }), quickViewDialog: (onCancel) => (React.createElement(TenantServiceQuickViewDialog, { id: id, visible: true, onCancel: onCancel })) },
22
+ React.createElement(ColumnItem, { className: "tenant-service-column-item" },
23
+ React.createElement(ColumnItemCol, { span: 18 },
24
+ React.createElement("div", { className: "tenant-service-item-name" }, `${tenantService.name}`),
25
+ React.createElement("div", { className: "text-gray-400 text-xs" }, tenantService.description)),
26
+ React.createElement(ColumnItemCol, { span: 6, align: "flex-end" },
27
+ React.createElement("div", { className: classnames("tenant-service-running", { hide: hover }) }, tenantService.isRunning ? React.createElement(Badge, { color: "green", text: "Running" }) : null),
28
+ React.createElement("div", { className: classnames("tenant-service-item-tool", { show: hover }) },
29
+ React.createElement(ToolBar, { showMenu: false },
30
+ React.createElement(Open, { url: Routes.TenantService.getUrl(id) }),
31
+ React.createElement(TenantServiceMenu, { id: id, closeAside: true }))))))
32
+ // </Skeleton>
33
+ ));
34
+ };
35
+ export default TenantServiceItem;
36
+ //# 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,EAAY,KAAK,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,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,KAA4C,EAAE,EAAE;IAC1E,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,8CAA8C;IAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,IAAK,CAAC;IAClC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;IACpB,oDAAoD;IACpD,oBAAC,YAAY,IACZ,SAAS,EAAE,MAAM,CAAC,qBAAqB,CAAC,EACxC,WAAW,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EACjC,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EACnC,cAAc,EAAE,oBAAC,cAAc,IAAC,EAAE,EAAE,EAAE,EAAE,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+ background-color: #f5f8fd;
8
+ }
9
+
10
+ :global {
11
+ .tenant-service-item-name {
12
+ color: #575757;
13
+ font-weight: 500;
14
+ word-break: break-all;
15
+ }
16
+
17
+ .tenant-service-running {
18
+ &.hide {
19
+ display: none;
20
+ }
21
+ }
22
+
23
+ .tenant-service-item-tool {
24
+ display: none;
25
+
26
+ &.show {
27
+ display: block;
28
+ }
29
+ }
30
+
31
+ .tenant-service-column-item {
32
+ padding: 10px 20px;
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { ITenantService } from "../../../../data/tenant-service";
3
+ declare const TenantServiceList: (props: {
4
+ /** filter by id */
5
+ centerId?: string | undefined;
6
+ /** title */
7
+ viewTitle?: React.ReactNode;
8
+ /** 是否显示 total */
9
+ total?: boolean | undefined;
10
+ /** 是否允在 listView 内部打开 aside */
11
+ asideable?: boolean | undefined;
12
+ /** Call back when received total number of tenant-service. */
13
+ onTotal?: ((total: number) => void) | undefined;
14
+ /** Call back when an item has been clicked on the list. */
15
+ onClickItem?: ((item: ITenantService) => void) | undefined;
16
+ }) => React.JSX.Element;
17
+ export default TenantServiceList;