@voplus/morpho-csp 6.0.85 → 6.0.86
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.
- package/es/data/share-type/ShareTypeStore.d.ts +31 -0
- package/es/data/share-type/ShareTypeStore.js +118 -0
- package/es/data/share-type/ShareTypeStore.js.map +1 -0
- package/es/data/share-type/hook.d.ts +9 -0
- package/es/data/share-type/hook.js +19 -0
- package/es/data/share-type/hook.js.map +1 -0
- package/es/data/share-type/index.d.ts +5 -0
- package/es/data/share-type/index.js +6 -0
- package/es/data/share-type/index.js.map +1 -0
- package/es/data/share-type/interfaces.d.ts +10 -0
- package/es/data/share-type/interfaces.js +2 -0
- package/es/data/share-type/interfaces.js.map +1 -0
- package/es/data/share-type/share-type-events/index.d.ts +3 -0
- package/es/data/share-type/share-type-events/index.js +4 -0
- package/es/data/share-type/share-type-events/index.js.map +1 -0
- package/es/data/share-type/share-type-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/share-type/share-type-events/useAutoUpdateListData.js +13 -0
- package/es/data/share-type/share-type-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/share-type/share-type-events/useOnDeleteShareType.d.ts +4 -0
- package/es/data/share-type/share-type-events/useOnDeleteShareType.js +16 -0
- package/es/data/share-type/share-type-events/useOnDeleteShareType.js.map +1 -0
- package/es/data/share-type/share-type-events/useOnNewShareType.d.ts +4 -0
- package/es/data/share-type/share-type-events/useOnNewShareType.js +16 -0
- package/es/data/share-type/share-type-events/useOnNewShareType.js.map +1 -0
- package/es/data/share-type/types.d.ts +31 -0
- package/es/data/share-type/types.js +2 -0
- package/es/data/share-type/types.js.map +1 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionCard/index.js +3 -2
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionCard/index.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/VerifyConfirm/index.d.ts +7 -0
- package/es/modules/corporate/company/share-transactions-register/components/VerifyConfirm/index.js +14 -0
- package/es/modules/corporate/company/share-transactions-register/components/VerifyConfirm/index.js.map +1 -0
- package/es/modules/corporate/company/share-transactions-register/components/VerifyConfirm/index.less +9 -0
- package/es/modules/corporate/company/share-transactions-register/components/VerifyConfirmTable/index.d.ts +14 -0
- package/es/modules/corporate/company/share-transactions-register/components/VerifyConfirmTable/index.js +28 -0
- package/es/modules/corporate/company/share-transactions-register/components/VerifyConfirmTable/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/ShareTypeForm.d.ts +17 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/ShareTypeForm.js +51 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/ShareTypeForm.js.map +1 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/index.d.ts +10 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/index.js +14 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/index.less +27 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/state.d.ts +5 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/state.js +26 -0
- package/es/modules/corporate/share-type/components/NewShareTypeForm/state.js.map +1 -0
- package/es/modules/corporate/share-type/components/ShareTypeHeader/index.d.ts +6 -0
- package/es/modules/corporate/share-type/components/ShareTypeHeader/index.js +16 -0
- package/es/modules/corporate/share-type/components/ShareTypeHeader/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/ShareTypeHeader/index.less +12 -0
- package/es/modules/corporate/share-type/components/ShareTypeItem/index.d.ts +6 -0
- package/es/modules/corporate/share-type/components/ShareTypeItem/index.js +26 -0
- package/es/modules/corporate/share-type/components/ShareTypeItem/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/ShareTypeItem/index.less +29 -0
- package/es/modules/corporate/share-type/components/ShareTypeList/index.d.ts +14 -0
- package/es/modules/corporate/share-type/components/ShareTypeList/index.js +45 -0
- package/es/modules/corporate/share-type/components/ShareTypeList/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/ShareTypeList/index.less +11 -0
- package/es/modules/corporate/share-type/components/ShareTypeProperties/index.d.ts +21 -0
- package/es/modules/corporate/share-type/components/ShareTypeProperties/index.js +38 -0
- package/es/modules/corporate/share-type/components/ShareTypeProperties/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/ShareTypeProperties/index.less +7 -0
- package/es/modules/corporate/share-type/components/ShareTypePropertiesView/index.d.ts +7 -0
- package/es/modules/corporate/share-type/components/ShareTypePropertiesView/index.js +16 -0
- package/es/modules/corporate/share-type/components/ShareTypePropertiesView/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/ShareTypePropertiesView/index.less +35 -0
- package/es/modules/corporate/share-type/components/ShareTypeQuickViewDialog/index.d.ts +8 -0
- package/es/modules/corporate/share-type/components/ShareTypeQuickViewDialog/index.js +13 -0
- package/es/modules/corporate/share-type/components/ShareTypeQuickViewDialog/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/ShareTypeQuickViewDialog/index.less +7 -0
- package/es/modules/corporate/share-type/components/ShareTypeTabs/index.d.ts +8 -0
- package/es/modules/corporate/share-type/components/ShareTypeTabs/index.js +53 -0
- package/es/modules/corporate/share-type/components/ShareTypeTabs/index.js.map +1 -0
- package/es/modules/corporate/share-type/components/ShareTypeTabs/index.less +8 -0
- package/es/modules/corporate/share-type/controls/ShareTypeMenu/index.d.ts +7 -0
- package/es/modules/corporate/share-type/controls/ShareTypeMenu/index.js +13 -0
- package/es/modules/corporate/share-type/controls/ShareTypeMenu/index.js.map +1 -0
- package/es/modules/corporate/share-type/pages/ShareTypeDefaultView/index.d.ts +4 -0
- package/es/modules/corporate/share-type/pages/ShareTypeDefaultView/index.js +24 -0
- package/es/modules/corporate/share-type/pages/ShareTypeDefaultView/index.js.map +1 -0
- package/es/modules/corporate/share-type/pages/ShareTypeDefaultView/index.less +17 -0
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IShareType, LoadShareTypeOptions, EditShareTypeOptions, CreateShareTypeOptions, DeleteShareTypeOptions } from ".";
|
|
2
|
+
import { ApiEndPoint } from "@voplus/api";
|
|
3
|
+
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
4
|
+
import { CountedMap, Store } from "@voplus/morpho-data";
|
|
5
|
+
export declare class ShareTypeStore extends Store {
|
|
6
|
+
private readonly _api;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
/** Contac created event dispatcher */
|
|
9
|
+
private readonly _created;
|
|
10
|
+
private readonly _deleted;
|
|
11
|
+
constructor(_api: ApiEndPoint);
|
|
12
|
+
/** Event fires when a new share-type has been created. */
|
|
13
|
+
get ShareTypeCreatedEvent(): import("strongly-typed-events").IEvent<ShareTypeStore, IShareType>;
|
|
14
|
+
/** Event fires when a delete contact has been deleted. */
|
|
15
|
+
get ShareTypeDeletedEvent(): import("strongly-typed-events").IEvent<ShareTypeStore, IShareType>;
|
|
16
|
+
/** All currently used contacts. */
|
|
17
|
+
readonly items: CountedMap<string, IShareType>;
|
|
18
|
+
/** Create a new contact base on type. */
|
|
19
|
+
create(options: CreateShareTypeOptions): Promise<IShareType>;
|
|
20
|
+
/** Load a task from server.
|
|
21
|
+
* @param {string} id - id of the task.
|
|
22
|
+
* @param {LoadTaskOptions} options - Optional load options.
|
|
23
|
+
*/
|
|
24
|
+
load(id: string, options: LoadShareTypeOptions): Promise<IShareType>;
|
|
25
|
+
loadList(options?: LoadDocumentListOptions): Promise<IShareType[]>;
|
|
26
|
+
/** Edit an existing item on server. */
|
|
27
|
+
edit(id: string, options: EditShareTypeOptions): Promise<void>;
|
|
28
|
+
delete(ids: string[], options?: DeleteShareTypeOptions): Promise<any>;
|
|
29
|
+
}
|
|
30
|
+
/** React hook to retrieve ContactStore */
|
|
31
|
+
export declare const useShareTypeStore: () => ShareTypeStore;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { RequestBuilder } from "@voplus/api";
|
|
3
|
+
import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
|
|
4
|
+
import { action, observable } from "mobx";
|
|
5
|
+
import { EventDispatcher } from "strongly-typed-events";
|
|
6
|
+
const StoreName = "ShareTypeStore";
|
|
7
|
+
export class ShareTypeStore extends Store {
|
|
8
|
+
constructor(_api) {
|
|
9
|
+
super();
|
|
10
|
+
Object.defineProperty(this, "_api", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: _api
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(this, "name", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: StoreName
|
|
21
|
+
});
|
|
22
|
+
/** Contac created event dispatcher */
|
|
23
|
+
Object.defineProperty(this, "_created", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: new EventDispatcher()
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "_deleted", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: new EventDispatcher()
|
|
34
|
+
});
|
|
35
|
+
/** All currently used contacts. */
|
|
36
|
+
Object.defineProperty(this, "items", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/** Event fires when a new share-type has been created. */
|
|
44
|
+
get ShareTypeCreatedEvent() {
|
|
45
|
+
return this._created.asEvent();
|
|
46
|
+
}
|
|
47
|
+
/** Event fires when a delete contact has been deleted. */
|
|
48
|
+
get ShareTypeDeletedEvent() {
|
|
49
|
+
return this._deleted.asEvent();
|
|
50
|
+
}
|
|
51
|
+
/** Create a new contact base on type. */
|
|
52
|
+
async create(options) {
|
|
53
|
+
// invariant(options.data.name, "Name cannot be empty.");
|
|
54
|
+
return await this.action(async () => {
|
|
55
|
+
const r = await this._api.post(`/api/create`, new RequestBuilder().json(options.data));
|
|
56
|
+
const t = (await r.json());
|
|
57
|
+
this._created.dispatch(this, t);
|
|
58
|
+
return t;
|
|
59
|
+
}, options);
|
|
60
|
+
}
|
|
61
|
+
/** Load a task from server.
|
|
62
|
+
* @param {string} id - id of the task.
|
|
63
|
+
* @param {LoadTaskOptions} options - Optional load options.
|
|
64
|
+
*/
|
|
65
|
+
async load(id, options) {
|
|
66
|
+
let query = "";
|
|
67
|
+
if (options.includes)
|
|
68
|
+
query = query.concat(`includes=${options.includes}`);
|
|
69
|
+
if (query)
|
|
70
|
+
query = "?".concat(query);
|
|
71
|
+
const r = await this._api.get(`/api/${id}${query}`);
|
|
72
|
+
return (await r.json());
|
|
73
|
+
}
|
|
74
|
+
async loadList(options) {
|
|
75
|
+
let query = "";
|
|
76
|
+
if (options === null || options === void 0 ? void 0 : options.Includes) {
|
|
77
|
+
query = query.concat(`includes=${options.Includes}`);
|
|
78
|
+
}
|
|
79
|
+
if (query)
|
|
80
|
+
query = "?".concat(query);
|
|
81
|
+
const r = await this._api.post(`/api${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
|
82
|
+
return (await r.json());
|
|
83
|
+
}
|
|
84
|
+
/** Edit an existing item on server. */
|
|
85
|
+
async edit(id, options) {
|
|
86
|
+
await this.action(async () => {
|
|
87
|
+
const r = await this._api.post(`/api/${id}`, new RequestBuilder().json(options.data));
|
|
88
|
+
const t = await r.json();
|
|
89
|
+
this.items.overwrite(t.id, t);
|
|
90
|
+
}, options);
|
|
91
|
+
}
|
|
92
|
+
async delete(ids, options) {
|
|
93
|
+
return await this.action(async () => {
|
|
94
|
+
await this._api.delete(`/api/delete`, new RequestBuilder().json({ Ids: ids, Options: options === null || options === void 0 ? void 0 : options.data }));
|
|
95
|
+
const deleted = [];
|
|
96
|
+
for (const id of ids) {
|
|
97
|
+
const item = this.items.peek(id);
|
|
98
|
+
if (item) {
|
|
99
|
+
deleted.push(item);
|
|
100
|
+
this._deleted.dispatch(this, item);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return deleted;
|
|
104
|
+
}, options);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
__decorate([
|
|
108
|
+
action
|
|
109
|
+
], ShareTypeStore.prototype, "delete", null);
|
|
110
|
+
/** React hook to retrieve ContactStore */
|
|
111
|
+
export const useShareTypeStore = () => {
|
|
112
|
+
const context = useApplicationContext();
|
|
113
|
+
if (!context.getService(StoreName)) {
|
|
114
|
+
context.registerService(new ShareTypeStore(context.api.currentEndPoint));
|
|
115
|
+
}
|
|
116
|
+
return context.getService(StoreName);
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=ShareTypeStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareTypeStore.js","sourceRoot":"","sources":["../../../src/data/share-type/ShareTypeStore.ts"],"names":[],"mappings":";AAOA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAEnC,MAAM,OAAO,cAAe,SAAQ,KAAK;IAMxC,YAAoC,IAAiB;QACpD,KAAK,EAAE,CAAC;QADU;;;;mBAAiB,IAAI;WAAa;QALrC;;;;mBAAe,SAAS;WAAC;QACzC,sCAAsC;QACrB;;;;mBAAW,IAAI,eAAe,EAA8B;WAAC;QAC7D;;;;mBAAW,IAAI,eAAe,EAA8B;WAAC;QAgB9E,mCAAmC;QACnB;;;;mBA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{ ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
3
|
+
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
4
|
+
export declare const useShareType: (id: string, options?: LoadShareTypeOptions) => IShareType;
|
|
5
|
+
/** React hook to retrieve a list of share type
|
|
6
|
+
* @param effect - Effect callback to be ran after successful retrieved the list.
|
|
7
|
+
* @param options - Optional share type list loading options.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useShareTypeListEffect: (list: ListDataContextState<IShareType> | null, effect: (list: IShareType[], total: number) => void, options?: LoadDocumentListOptions) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useShareTypeStore } from ".";
|
|
2
|
+
import { useListLoaderEffect } from "@voplus/morpho-ui/es/hooks";
|
|
3
|
+
import { useLoadCountedMapItem } from "@voplus/morpho-data";
|
|
4
|
+
export const useShareType = (id, options) => {
|
|
5
|
+
options = options ? options : {};
|
|
6
|
+
const store = useShareTypeStore();
|
|
7
|
+
return useLoadCountedMapItem(id, store.items, (calculatedOptions) => store.load(id, calculatedOptions), options);
|
|
8
|
+
};
|
|
9
|
+
/** React hook to retrieve a list of share type
|
|
10
|
+
* @param effect - Effect callback to be ran after successful retrieved the list.
|
|
11
|
+
* @param options - Optional share type list loading options.
|
|
12
|
+
*/
|
|
13
|
+
export const useShareTypeListEffect = (list, effect, options) => {
|
|
14
|
+
const deps = options ? options : {};
|
|
15
|
+
const store = useShareTypeStore();
|
|
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=hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/data/share-type/hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,iBAAiB,EAAE,MAAM,GAAG,CAAC;AAGxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAU,EAAE,OAA8B,EAAE,EAAE;IAC1E,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA2B,CAAC;IAC3D,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAElC,OAAO,qBAAqB,CAC3B,EAAE,EACF,KAAK,CAAC,KAAK,EACX,CAAC,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,iBAAiB,CAAC,EACxD,OAAO,CACO,CAAC;AACjB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACrC,IAA6C,EAC7C,MAAmD,EACnD,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAElC,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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/share-type/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { INode } from "@voplus/morpho-document-core";
|
|
2
|
+
import { ILoadable } from "@voplus/morpho-data";
|
|
3
|
+
export interface IShareType extends INode, ILoadable {
|
|
4
|
+
name: string;
|
|
5
|
+
officialName: string;
|
|
6
|
+
capitalReturnPriority: number;
|
|
7
|
+
surplusReturn: string;
|
|
8
|
+
voting: number;
|
|
9
|
+
note: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/data/share-type/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data/share-type/share-type-events/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IShareType } from "../interfaces";
|
|
2
|
+
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
3
|
+
/** React hook to call action when a new virtual address has been created. */
|
|
4
|
+
export declare const useAutoUpdateListData: (list: ListDataContextState<any>, shouldUpdate: (d: IShareType, event: string) => boolean) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useOnDeleteShareType, useOnNewShareType } from ".";
|
|
2
|
+
/** React hook to call action when a new virtual address has been created. */
|
|
3
|
+
export const useAutoUpdateListData = (list, shouldUpdate) => {
|
|
4
|
+
useOnNewShareType((s, d) => {
|
|
5
|
+
if (shouldUpdate(d, "new"))
|
|
6
|
+
list.union([d]);
|
|
7
|
+
});
|
|
8
|
+
useOnDeleteShareType((s, d) => {
|
|
9
|
+
if (shouldUpdate(d, "del"))
|
|
10
|
+
list.remove(d.id);
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useAutoUpdateListData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutoUpdateListData.js","sourceRoot":"","sources":["../../../../src/data/share-type/share-type-events/useAutoUpdateListData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAC;AAI5D,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACpC,IAA+B,EAC/B,YAAuD,EACtD,EAAE;IACH,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1B,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC7B,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ShareTypeStore } from "../ShareTypeStore";
|
|
2
|
+
import { IShareType } from "../interfaces";
|
|
3
|
+
/** React hook to call action when a delete virtual address has been created. */
|
|
4
|
+
export declare const useOnDeleteShareType: (action: (store: ShareTypeStore, doc: IShareType) => void) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useShareTypeStore } from "../ShareTypeStore";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
/** React hook to call action when a delete virtual address has been created. */
|
|
4
|
+
export const useOnDeleteShareType = (action) => {
|
|
5
|
+
const store = useShareTypeStore();
|
|
6
|
+
const onDeleteShareType = (store, doc) => {
|
|
7
|
+
action(store, doc);
|
|
8
|
+
};
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
store.ShareTypeDeletedEvent.subscribe(onDeleteShareType);
|
|
11
|
+
return () => {
|
|
12
|
+
store.ShareTypeDeletedEvent.unsubscribe(onDeleteShareType);
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useOnDeleteShareType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnDeleteShareType.js","sourceRoot":"","sources":["../../../../src/data/share-type/share-type-events/useOnDeleteShareType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,gFAAgF;AAChF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAwD,EAAE,EAAE;IAChG,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAClC,MAAM,iBAAiB,GAAG,CAAC,KAAqB,EAAE,GAAe,EAAE,EAAE;QACpE,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,qBAAqB,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QACzD,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,qBAAqB,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QAC5D,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ShareTypeStore } from "../ShareTypeStore";
|
|
2
|
+
import { IShareType } from "../interfaces";
|
|
3
|
+
/** React hook to call action when a new virtual address has been created. */
|
|
4
|
+
export declare const useOnNewShareType: (action: (store: ShareTypeStore, doc: IShareType) => void) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useShareTypeStore } from "../ShareTypeStore";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
/** React hook to call action when a new virtual address has been created. */
|
|
4
|
+
export const useOnNewShareType = (action) => {
|
|
5
|
+
const store = useShareTypeStore();
|
|
6
|
+
const onNewShareType = (store, doc) => {
|
|
7
|
+
action(store, doc);
|
|
8
|
+
};
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
store.ShareTypeCreatedEvent.subscribe(onNewShareType);
|
|
11
|
+
return () => {
|
|
12
|
+
store.ShareTypeCreatedEvent.unsubscribe(onNewShareType);
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useOnNewShareType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnNewShareType.js","sourceRoot":"","sources":["../../../../src/data/share-type/share-type-events/useOnNewShareType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAwD,EAAE,EAAE;IAC7F,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAClC,MAAM,cAAc,GAAG,CAAC,KAAqB,EAAE,GAAe,EAAE,EAAE;QACjE,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,qBAAqB,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QACtD,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,qBAAqB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACzD,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IShareType } from "./interfaces";
|
|
2
|
+
import { LoadOptions } from "@voplus/morpho-data";
|
|
3
|
+
import { StoreActionOptions } from "@voplus/morpho-data";
|
|
4
|
+
import { DeleteDocumentOptions } from "@voplus/morpho-document-core";
|
|
5
|
+
/** Custom load virtual address options type */
|
|
6
|
+
export type LoadShareTypeOptions = {
|
|
7
|
+
/** Comma separated include options e.g. path */
|
|
8
|
+
includes?: string;
|
|
9
|
+
} & LoadOptions<IShareType>;
|
|
10
|
+
export type EditShareTypeDataOptions = {
|
|
11
|
+
Name?: string;
|
|
12
|
+
OfficialName?: string;
|
|
13
|
+
CapitalReturnPriority?: number;
|
|
14
|
+
SurplusReturn?: "Yes" | "No" | "Others";
|
|
15
|
+
Voting?: number;
|
|
16
|
+
Note?: string;
|
|
17
|
+
};
|
|
18
|
+
export type EditShareTypeOptions = {
|
|
19
|
+
data: EditShareTypeDataOptions;
|
|
20
|
+
} & StoreActionOptions;
|
|
21
|
+
/** create ShareType options */
|
|
22
|
+
export type CreateShareTypeOptions = {
|
|
23
|
+
data: {
|
|
24
|
+
CorporateId: string;
|
|
25
|
+
OfficeId: string;
|
|
26
|
+
};
|
|
27
|
+
} & StoreActionOptions;
|
|
28
|
+
/** Custom load virtual address list options type. */
|
|
29
|
+
export type DeleteShareTypeOptions = {
|
|
30
|
+
data?: DeleteDocumentOptions;
|
|
31
|
+
} & StoreActionOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/share-type/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { useShareTransaction, useShareTransactionStore, } from "../../../../../../data/share-transaction";
|
|
3
3
|
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
|
4
|
-
import {
|
|
4
|
+
import { Space, Empty } from "antd";
|
|
5
5
|
import ShareTablePreview from "../ShareTablePreview";
|
|
6
6
|
import ShareTransactionPropertiesView from "../ShareTransactionPropertiesView";
|
|
7
7
|
import ShareTransactionQuickViewDialog from "../ShareTransactionQuickViewDialog";
|
|
8
8
|
import ItemFunction from "@voplus/morpho-org/es/controls/ItemFunction";
|
|
9
9
|
import { State } from "../ShareTransactionProperties/state";
|
|
10
10
|
import TagView from "@voplus/morpho-document/es/components/TagView";
|
|
11
|
+
import VerifyConfirm from "../VerifyConfirm";
|
|
11
12
|
import classnames from "classnames";
|
|
12
13
|
import { observe } from "@voplus/morpho-ui";
|
|
13
14
|
import { runInAction } from "mobx";
|
|
@@ -31,7 +32,7 @@ const ShareTransactionCard = (props) => {
|
|
|
31
32
|
React.createElement("div", { className: classnames("shareTransaction-header") },
|
|
32
33
|
React.createElement(ItemFunction, { className: "header-content", propertiesView: React.createElement(ShareTransactionPropertiesView, { id: id }), quickViewDialog: (onCancel) => (React.createElement(ShareTransactionQuickViewDialog, { id: id, visible: true, onCancel: onCancel })) },
|
|
33
34
|
React.createElement(Space, null,
|
|
34
|
-
|
|
35
|
+
React.createElement(VerifyConfirm, { verification: state.verification }),
|
|
35
36
|
React.createElement("span", { className: "header-type" }, shareTransaction.transactionType)),
|
|
36
37
|
React.createElement("div", { className: "header-info" },
|
|
37
38
|
React.createElement("div", { className: "header-name" }, shareTransaction.name),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/share-transactions-register/components/ShareTransactionCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EACN,mBAAmB,EACnB,wBAAwB,GACxB,MAAM,0CAA0C,CAAC;AAClD,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/share-transactions-register/components/ShareTransactionCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EACN,mBAAmB,EACnB,wBAAwB,GACxB,MAAM,0CAA0C,CAAC;AAClD,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAS,KAAK,EAAE,KAAK,EAAE,MAAM,MAA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ions-register/components/VerifyConfirm/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IVerification } from "@voplus/morpho-org/es/modules/verification/VerificationInformation/VerificationStore";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
declare const VerifyConfirm: (props: {
|
|
5
|
+
verification: IVerification;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
export default VerifyConfirm;
|
package/es/modules/corporate/company/share-transactions-register/components/VerifyConfirm/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Badge, Popover } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import VerifyConfirmTable from "../VerifyConfirmTable";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
const VerifyConfirm = (props) => {
|
|
7
|
+
const { verification } = props;
|
|
8
|
+
return observe(() => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
return (React.createElement(Popover, { content: React.createElement(VerifyConfirmTable, { data: verification }), overlayStyle: { width: "600px" }, placement: "leftTop" }, ((_a = verification === null || verification === void 0 ? void 0 : verification.confirmedBy) === null || _a === void 0 ? void 0 : _a.id) ? (React.createElement(Badge, { status: "success" })) : ((_b = verification === null || verification === void 0 ? void 0 : verification.verifiedBy) === null || _b === void 0 ? void 0 : _b.id) ? (React.createElement(Badge, { status: "default" })) : (React.createElement(Badge, { color: "#fff", className: "verification-empty-badge" }))));
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export default VerifyConfirm;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/share-transactions-register/components/VerifyConfirm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAEvD,OAAO,cAAc,CAAC;AAEtB,MAAM,aAAa,GAAG,CAAC,KAAsC,EAAE,EAAE;IAChE,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAE/B,OAAO,OAAO,CAAC,GAAG,EAAE;;QAAC,OAAA,CACpB,oBAAC,OAAO,IACP,OAAO,EAAE,oBAAC,kBAAkB,IAAC,IAAI,EAAE,YAAY,GAAI,EACnD,YAAY,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAChC,SAAS,EAAC,SAAS,IAGlB,CAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,0CAAE,EAAE,EAAC,CAAC,CAAC,CAChC,oBAAC,KAAK,IAAC,MAAM,EAAC,SAAS,GAAG,CAC1B,CAAC,CAAC,CAAC,CAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,UAAU,0CAAE,EAAE,EAAC,CAAC,CAAC,CAClC,oBAAC,KAAK,IAAC,MAAM,EAAC,SAAS,GAAG,CAC1B,CAAC,CAAC,CAAC,CACH,oBAAC,KAAK,IAAC,KAAK,EAAC,MAAM,EAAC,SAAS,EAAC,0BAA0B,GAAG,CAC3D,CACQ,CACV,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IVerification } from "@voplus/morpho-org/es/modules/verification/VerificationInformation/VerificationStore";
|
|
3
|
+
export type IDate = {
|
|
4
|
+
verification: string;
|
|
5
|
+
date: string;
|
|
6
|
+
by: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
declare const VerifyConfirmTable: (props: {
|
|
12
|
+
data: IVerification;
|
|
13
|
+
}) => React.JSX.Element;
|
|
14
|
+
export default VerifyConfirmTable;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Table } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
|
5
|
+
const VerifyConfirmTable = (props) => {
|
|
6
|
+
const { data } = props;
|
|
7
|
+
const verification = [];
|
|
8
|
+
if (data.confirmedBy.id)
|
|
9
|
+
verification.push({ verification: "Confirmed", date: data.confirmedOn, by: data.confirmedBy });
|
|
10
|
+
if (data.verifiedBy.id)
|
|
11
|
+
verification.push({ verification: "Verified", date: data.verifiedOn, by: data.verifiedBy });
|
|
12
|
+
const columns = [
|
|
13
|
+
{ title: "Verification", dataIndex: "verification" },
|
|
14
|
+
{
|
|
15
|
+
title: "Date",
|
|
16
|
+
dataIndex: "date",
|
|
17
|
+
render: (_, { date }) => React.createElement(UTCShortDate, { value: date }),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: "By",
|
|
21
|
+
dataIndex: "by",
|
|
22
|
+
render: (_, { by }) => by.name,
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
return observe(() => (React.createElement(Table, { columns: columns, rowKey: "verification", dataSource: verification, pagination: false })));
|
|
26
|
+
};
|
|
27
|
+
export default VerifyConfirmTable;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/share-transactions-register/components/VerifyConfirmTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,YAAY,MAAM,4CAA4C,CAAC;AAKt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
+
export type NewShareTypeFormProps = {
|
|
4
|
+
corporateId: string;
|
|
5
|
+
type?: "full" | "mini";
|
|
6
|
+
showView?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onCancel?: () => void;
|
|
9
|
+
onSave?: (data?: any) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const NewShareTypeFormContent: {
|
|
12
|
+
(props: NewShareTypeFormProps): React.JSX.Element;
|
|
13
|
+
defaultProps: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default NewShareTypeFormContent;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { State } from "./state";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
5
|
+
import { Form, Row, Space, Button } from "antd";
|
|
6
|
+
import { useShareTypeStore } from "../../../../../data/share-type";
|
|
7
|
+
import ShareTypePropertiesView from "../ShareTypePropertiesView";
|
|
8
|
+
import OfficeSelect from "@voplus/morpho-org/es/modules/office/components/OfficeSelect";
|
|
9
|
+
import AddFormView from "@voplus/morpho-ui/es/controls/AddFormView";
|
|
10
|
+
import classnames from "classnames";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
const NewShareTypeFormContent = (props) => {
|
|
13
|
+
const store = useShareTypeStore();
|
|
14
|
+
const asideContext = useAsideContentContext();
|
|
15
|
+
const [state] = useState(new State());
|
|
16
|
+
const content = observe(() => (React.createElement("div", { className: classnames("new-share-type-form", { "sub-share-type-simply-form": props.type === "mini" }, props.className) },
|
|
17
|
+
React.createElement(Form, { layout: "vertical" },
|
|
18
|
+
React.createElement(Form.Item, { name: "Office", label: "Office" },
|
|
19
|
+
React.createElement(OfficeSelect, { onChange: (office) => (state.officeId = office === null || office === void 0 ? void 0 : office.id) })),
|
|
20
|
+
props.type === "mini" && (React.createElement(Row, { className: "share-type-form-btn", justify: "end" },
|
|
21
|
+
React.createElement(Space, null,
|
|
22
|
+
React.createElement(Button, { onClick: onCancel }, "Cancel"),
|
|
23
|
+
React.createElement(Button, { type: "primary", loading: state.loading, onClick: onSave }, "Submit"))))))));
|
|
24
|
+
return observe(() => (React.createElement(React.Fragment, null, props.type === "full" ? (React.createElement(AddFormView, { title: "Add Virtual Address", loading: !!state.loading, onCancel: onCancel, onSubmit: onSave }, content)) : (content))));
|
|
25
|
+
async function onSave() {
|
|
26
|
+
var _a;
|
|
27
|
+
state.loading = true;
|
|
28
|
+
const res = await store.create({
|
|
29
|
+
data: { CorporateId: props.corporateId, OfficeId: state.officeId },
|
|
30
|
+
error: "message",
|
|
31
|
+
});
|
|
32
|
+
(_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
33
|
+
state.loading = false;
|
|
34
|
+
if (props.showView && res)
|
|
35
|
+
return asideContext.openAside(React.createElement(ShareTypePropertiesView, { id: res.id }), {
|
|
36
|
+
span: 12,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// cancel add virtual address
|
|
40
|
+
function onCancel() {
|
|
41
|
+
var _a;
|
|
42
|
+
if (props.showView)
|
|
43
|
+
return asideContext.closeAside();
|
|
44
|
+
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
NewShareTypeFormContent.defaultProps = {
|
|
48
|
+
type: "full",
|
|
49
|
+
};
|
|
50
|
+
export default NewShareTypeFormContent;
|
|
51
|
+
//# sourceMappingURL=ShareTypeForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareTypeForm.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/share-type/components/NewShareTypeForm/ShareTypeForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC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DAAI,CAAC;IACpB,CAAC;AACF,CAAC,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG;IACtC,IAAI,EAAE,MAAM;CACZ,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NewShareTypeFormProps } from "./ShareTypeForm";
|
|
3
|
+
declare const NewShareTypeFormDialog: {
|
|
4
|
+
(props: NewShareTypeFormProps): React.JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
type: string;
|
|
7
|
+
showSubmit: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default NewShareTypeFormDialog;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Content from "./ShareTypeForm";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { Modal } from "antd";
|
|
5
|
+
const NewShareTypeFormDialog = (props) => {
|
|
6
|
+
return observe(() => (React.createElement(Modal, { title: "New Share Type Form Dialog", open: true, closable: false, footer: null, onCancel: props.onCancel },
|
|
7
|
+
React.createElement(Content, { ...props }))));
|
|
8
|
+
};
|
|
9
|
+
NewShareTypeFormDialog.defaultProps = {
|
|
10
|
+
type: "mini",
|
|
11
|
+
showSubmit: true,
|
|
12
|
+
};
|
|
13
|
+
export default NewShareTypeFormDialog;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/share-type/components/NewShareTypeForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAkC,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,MAAM,sBAAsB,GAAG,CAAC,KAA4B,EAAE,EAAE;IAC/D,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,KAAK,IACL,KAAK,EAAC,4BAA4B,EAClC,IAAI,QACJ,QAAQ,EAAE,KAAK,EACf,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,KAAK,CAAC,QAAQ;QAExB,oBAAC,OAAO,OAAK,KAAK,GAAI,CACf,CACR,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,sBAAsB,CAAC,YAAY,GAAG;IACrC,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,IAAI;CAChB,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|