@voplus/morpho-csp 1.2.177 → 1.2.179
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/filing-folder/hooks.js.map +1 -0
- package/es/data/filing-folder/interfaces.js.map +1 -0
- package/es/data/filing-folder/store.js.map +1 -0
- package/es/data/filing-folder/types.js.map +1 -0
- package/es/data/filing-type/FilingTypeStore.d.ts +33 -0
- package/es/data/filing-type/FilingTypeStore.js +115 -0
- package/es/data/filing-type/FilingTypeStore.js.map +1 -0
- package/es/data/filing-type/filing-type-events/index.d.ts +3 -0
- package/es/data/filing-type/filing-type-events/index.js +4 -0
- package/es/data/filing-type/filing-type-events/index.js.map +1 -0
- package/es/data/filing-type/filing-type-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/filing-type/filing-type-events/useAutoUpdateListData.js +15 -0
- package/es/data/filing-type/filing-type-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/filing-type/filing-type-events/useOnDeleteFilingType.d.ts +4 -0
- package/es/data/filing-type/filing-type-events/useOnDeleteFilingType.js +16 -0
- package/es/data/filing-type/filing-type-events/useOnDeleteFilingType.js.map +1 -0
- package/es/data/filing-type/filing-type-events/useOnNewFilingType.d.ts +4 -0
- package/es/data/filing-type/filing-type-events/useOnNewFilingType.js +17 -0
- package/es/data/filing-type/filing-type-events/useOnNewFilingType.js.map +1 -0
- package/es/data/filing-type/hooks.d.ts +10 -0
- package/es/data/filing-type/hooks.js +19 -0
- package/es/data/filing-type/hooks.js.map +1 -0
- package/es/data/filing-type/index.d.ts +4 -0
- package/es/data/filing-type/index.js +5 -0
- package/es/data/filing-type/index.js.map +1 -0
- package/es/data/filing-type/interfaces.d.ts +14 -0
- package/es/data/filing-type/interfaces.js +2 -0
- package/es/data/filing-type/interfaces.js.map +1 -0
- package/es/data/filing-type/types.d.ts +37 -0
- package/es/data/filing-type/types.js +2 -0
- package/es/data/{filingRecord → filing-type}/types.js.map +1 -1
- package/es/data/filing-year/FilingYearStore.d.ts +33 -0
- package/es/data/filing-year/FilingYearStore.js +115 -0
- package/es/data/filing-year/FilingYearStore.js.map +1 -0
- package/es/data/filing-year/filing-year-events/index.d.ts +3 -0
- package/es/data/filing-year/filing-year-events/index.js +4 -0
- package/es/data/filing-year/filing-year-events/index.js.map +1 -0
- package/es/data/filing-year/filing-year-events/useAutoUpdateListData.d.ts +4 -0
- package/es/data/filing-year/filing-year-events/useAutoUpdateListData.js +15 -0
- package/es/data/filing-year/filing-year-events/useAutoUpdateListData.js.map +1 -0
- package/es/data/filing-year/filing-year-events/useOnDeleteFilingYear.d.ts +4 -0
- package/es/data/filing-year/filing-year-events/useOnDeleteFilingYear.js +16 -0
- package/es/data/filing-year/filing-year-events/useOnDeleteFilingYear.js.map +1 -0
- package/es/data/filing-year/filing-year-events/useOnNewFilingYear.d.ts +4 -0
- package/es/data/filing-year/filing-year-events/useOnNewFilingYear.js +17 -0
- package/es/data/filing-year/filing-year-events/useOnNewFilingYear.js.map +1 -0
- package/es/data/filing-year/hooks.d.ts +10 -0
- package/es/data/filing-year/hooks.js +19 -0
- package/es/data/filing-year/hooks.js.map +1 -0
- package/es/data/filing-year/index.d.ts +4 -0
- package/es/data/filing-year/index.js +5 -0
- package/es/data/filing-year/index.js.map +1 -0
- package/es/data/filing-year/interfaces.d.ts +6 -0
- package/es/data/filing-year/interfaces.js +2 -0
- package/es/data/filing-year/interfaces.js.map +1 -0
- package/es/data/filing-year/types.d.ts +22 -0
- package/es/data/filing-year/types.js +2 -0
- package/es/data/filing-year/types.js.map +1 -0
- package/es/data/share-transaction/metas.d.ts +3 -1
- package/es/data/share-transaction/metas.js +8 -0
- package/es/data/share-transaction/metas.js.map +1 -1
- package/es/modules/corporate/clda/components/CLDAListView/index.js +1 -1
- package/es/modules/corporate/clda/components/CLDAListView/index.js.map +1 -1
- package/es/modules/corporate/company/officer-register/components/OfficerItem/index.js +3 -3
- package/es/modules/corporate/company/officer-register/components/OfficerItem/index.js.map +1 -1
- package/es/modules/corporate/company/pages/CompanyPage/index.js +1 -1
- package/es/modules/corporate/company/pages/CompanyPage/index.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.js +3 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionPropertiesView/index.js +5 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionPropertiesView/index.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionQuickViewDialog/index.d.ts +7 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionQuickViewDialog/index.js +34 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionQuickViewDialog/index.js.map +1 -0
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionQuickViewDialog/index.less +15 -0
- package/es/modules/corporate/company/share-transactions-register/controls/ShareTransactionMenu/index.js +2 -4
- package/es/modules/corporate/company/share-transactions-register/controls/ShareTransactionMenu/index.js.map +1 -1
- package/es/modules/corporate/filing-record/components/AnnualFilings/index.d.ts +0 -1
- package/es/modules/corporate/filing-record/components/AnnualFilings/index.js +38 -35
- package/es/modules/corporate/filing-record/components/AnnualFilings/index.js.map +1 -1
- package/es/modules/corporate/filing-record/components/AnnualFilings/index.less +16 -8
- package/es/modules/corporate/filing-record/components/FilingRecordItem/index.d.ts +1 -0
- package/es/modules/corporate/filing-record/components/FilingRecordItem/index.js +13 -15
- package/es/modules/corporate/filing-record/components/FilingRecordItem/index.js.map +1 -1
- package/es/modules/corporate/filing-record/components/FilingYearTimeLine/index.js +1 -1
- package/es/modules/corporate/filing-record/components/FilingYearTimeLine/index.js.map +1 -1
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeHead/index.d.ts +6 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeHead/index.js +18 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeHead/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeHead/index.less +12 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeItem/index.d.ts +7 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeItem/index.js +36 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeItem/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeItem/index.less +54 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeList/index.d.ts +10 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeList/index.js +52 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeList/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeList/index.less +21 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeProperties/index.d.ts +21 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeProperties/index.js +160 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeProperties/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypePropertiesView/index.d.ts +6 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypePropertiesView/index.js +16 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypePropertiesView/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeQuickView/index.d.ts +15 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeQuickView/index.js +29 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeQuickView/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeQuickView/index.less +29 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeTabs/index.d.ts +6 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeTabs/index.js +36 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeTabs/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeTabs/index.less +13 -0
- package/es/modules/corporate/filing-record/filing-type/components/NewFilingTypeForm/index.d.ts +17 -0
- package/es/modules/corporate/filing-record/filing-type/components/NewFilingTypeForm/index.js +112 -0
- package/es/modules/corporate/filing-record/filing-type/components/NewFilingTypeForm/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/components/NewFilingTypeForm/index.less +10 -0
- package/es/modules/corporate/filing-record/filing-type/components/NewFilingTypeForm/state.d.ts +18 -0
- package/es/modules/corporate/filing-record/filing-type/components/NewFilingTypeForm/state.js +38 -0
- package/es/modules/corporate/filing-record/filing-type/components/NewFilingTypeForm/state.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/controls/FilingTypeDataBar/index.d.ts +10 -0
- package/es/modules/corporate/filing-record/filing-type/controls/FilingTypeDataBar/index.js +11 -0
- package/es/modules/corporate/filing-record/filing-type/controls/FilingTypeDataBar/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/controls/FilingTypeMenu/index.d.ts +13 -0
- package/es/modules/corporate/filing-record/filing-type/controls/FilingTypeMenu/index.js +45 -0
- package/es/modules/corporate/filing-record/filing-type/controls/FilingTypeMenu/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/controls/FilingTypeMenu/index.less +54 -0
- package/es/modules/corporate/filing-record/filing-type/pages/FilingTypeDefaultView/index.d.ts +3 -0
- package/es/modules/corporate/filing-record/filing-type/pages/FilingTypeDefaultView/index.js +31 -0
- package/es/modules/corporate/filing-record/filing-type/pages/FilingTypeDefaultView/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-type/pages/FilingTypeDefaultView/index.less +17 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearHeader/index.d.ts +6 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearHeader/index.js +12 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearHeader/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearHeader/index.less +12 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearProperties/index.d.ts +21 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearProperties/index.js +29 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearProperties/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearPropertiesView/index.d.ts +6 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearPropertiesView/index.js +16 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearPropertiesView/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearQuickViewDialog/index.d.ts +15 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearQuickViewDialog/index.js +30 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearQuickViewDialog/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearQuickViewDialog/index.less +25 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearTabs/index.d.ts +6 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearTabs/index.js +44 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearTabs/index.js.map +1 -0
- package/es/modules/corporate/filing-record/filing-year/FilingYearTabs/index.less +13 -0
- package/es/modules/corporate/filing-record/{components → filing-year}/NewFilingYearDialog/index.d.ts +3 -2
- package/es/modules/corporate/filing-record/filing-year/NewFilingYearDialog/index.js +22 -0
- package/es/modules/corporate/filing-record/filing-year/NewFilingYearDialog/index.js.map +1 -0
- package/es/modules/self-registration/incorporation-clda/controls/CLDAIncorporationMenu/index.js +3 -4
- package/es/modules/self-registration/incorporation-clda/controls/CLDAIncorporationMenu/index.js.map +1 -1
- package/es/routes.d.ts +6 -0
- package/es/routes.js +14 -1
- package/es/routes.js.map +1 -1
- package/package.json +1 -1
- package/es/data/filingRecord/hooks.js.map +0 -1
- package/es/data/filingRecord/interfaces.js.map +0 -1
- package/es/data/filingRecord/store.js.map +0 -1
- package/es/modules/corporate/filing-record/components/NewFilingYearDialog/index.js +0 -29
- package/es/modules/corporate/filing-record/components/NewFilingYearDialog/index.js.map +0 -1
- /package/es/data/{filingRecord → filing-folder}/hooks.d.ts +0 -0
- /package/es/data/{filingRecord → filing-folder}/hooks.js +0 -0
- /package/es/data/{filingRecord → filing-folder}/interfaces.d.ts +0 -0
- /package/es/data/{filingRecord → filing-folder}/interfaces.js +0 -0
- /package/es/data/{filingRecord → filing-folder}/store.d.ts +0 -0
- /package/es/data/{filingRecord → filing-folder}/store.js +0 -0
- /package/es/data/{filingRecord → filing-folder}/types.d.ts +0 -0
- /package/es/data/{filingRecord → filing-folder}/types.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/filing-folder/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,2BAA2B,EAC3B,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAU,EAAE,OAA6B,EAAE,EAAE;IAC5E,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA0B,CAAC;IAC1D,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IAErC,OAAO,qBAAqB,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;AAC5F,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACxC,IAAgD,EAChD,MAAuC,EACvC,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IAEvC,mFAAmF;IACnF,OAAO,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3F,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/data/filing-folder/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/data/filing-folder/store.ts"],"names":[],"mappings":"AACA,OAAO,EAA4C,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMzF,OAAO,EAGN,iBAAiB,EAGjB,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AAKtC,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC,gDAAgD;AAChD,MAAM,OAAO,iBAAkB,SAAQ,iBAOtC;IAIA,YAAmC,QAAqB,EAAE,SAAwB;QACjF,KAAK,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;;;;;mBADT;;QAHnC,wBAAwB;QACxB;;;;mBAA+B,SAAS;WAAC;IAIzC,CAAC;CAuDD;AAED,0BAA0B;AAC1B,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACxC,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IAErC,OAAO,QAAQ,CACd,SAAS,EACT,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAC1E,CAAC;IACF,2CAA2C;IAC3C,sCAAsC;IACtC,yEAAyE;IACzE,IAAI;IACJ,4DAA4D;AAC7D,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/filing-folder/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ApiEndPoint } from "@voplus/api";
|
|
2
|
+
import { CountedMap, Store } from "@voplus/morpho-data";
|
|
3
|
+
import { CreateFilingTypeOptions, DeleteFilingTypeOptions, EditFilingTypeOptions, LoadFilingTypeOptions } from "./types";
|
|
4
|
+
import { IFilingType } from "./interfaces";
|
|
5
|
+
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
6
|
+
/** Quotation store supply backend functions. */
|
|
7
|
+
export declare class FilingTypeStore extends Store {
|
|
8
|
+
readonly endpoint: ApiEndPoint;
|
|
9
|
+
/** Name of the store */
|
|
10
|
+
readonly name: string;
|
|
11
|
+
private readonly _filingTypeDeleted;
|
|
12
|
+
private readonly _filingTypeCreated;
|
|
13
|
+
constructor(endpoint: ApiEndPoint);
|
|
14
|
+
/** All currently used corporate. */
|
|
15
|
+
readonly items: CountedMap<string, IFilingType>;
|
|
16
|
+
/** Event fires when a delete filingType has been deleted. */
|
|
17
|
+
get FilingTypeDeletedEvent(): import("strongly-typed-events").IEvent<FilingTypeStore, IFilingType>;
|
|
18
|
+
/** Event fires when a new FilingType has been created. */
|
|
19
|
+
get FilingTypeCreatedEvent(): import("strongly-typed-events").IEvent<FilingTypeStore, IFilingType>;
|
|
20
|
+
/** Create a new Identity. */
|
|
21
|
+
create(options: CreateFilingTypeOptions): Promise<IFilingType>;
|
|
22
|
+
/** Edit an existing item on server. */
|
|
23
|
+
edit(id: string, options: EditFilingTypeOptions): Promise<void>;
|
|
24
|
+
/** filingType 內有文件不能delete */
|
|
25
|
+
delete(ids: string[], options?: DeleteFilingTypeOptions): Promise<any>;
|
|
26
|
+
/** Load a list of documents from server.
|
|
27
|
+
* @param {LoadDocumentListOptions}
|
|
28
|
+
*/
|
|
29
|
+
loadList(options?: LoadDocumentListOptions): Promise<IFilingType[]>;
|
|
30
|
+
load(id: string, options: LoadFilingTypeOptions): Promise<IFilingType>;
|
|
31
|
+
}
|
|
32
|
+
/** 响应钩子检索 IdentityStore */
|
|
33
|
+
export declare const useFilingTypeStore: () => FilingTypeStore;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { RequestBuilder } from "@voplus/api";
|
|
2
|
+
import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
|
|
3
|
+
import { observable } from "mobx";
|
|
4
|
+
import { EventDispatcher } from "strongly-typed-events";
|
|
5
|
+
const StoreName = "FilingTypeStore";
|
|
6
|
+
/** Quotation store supply backend functions. */
|
|
7
|
+
export class FilingTypeStore extends Store {
|
|
8
|
+
constructor(endpoint) {
|
|
9
|
+
super();
|
|
10
|
+
Object.defineProperty(this, "endpoint", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: endpoint
|
|
15
|
+
});
|
|
16
|
+
/** Name of the store */
|
|
17
|
+
Object.defineProperty(this, "name", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: StoreName
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "_filingTypeDeleted", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: new EventDispatcher()
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "_filingTypeCreated", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: new EventDispatcher()
|
|
34
|
+
});
|
|
35
|
+
/** All currently used corporate. */
|
|
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 delete filingType has been deleted. */
|
|
44
|
+
get FilingTypeDeletedEvent() {
|
|
45
|
+
return this._filingTypeDeleted.asEvent();
|
|
46
|
+
}
|
|
47
|
+
/** Event fires when a new FilingType has been created. */
|
|
48
|
+
get FilingTypeCreatedEvent() {
|
|
49
|
+
return this._filingTypeCreated.asEvent();
|
|
50
|
+
}
|
|
51
|
+
/** Create a new Identity. */
|
|
52
|
+
async create(options) {
|
|
53
|
+
// invariant(options.name, "Name cannot be empty.");
|
|
54
|
+
return await this.action(async () => {
|
|
55
|
+
const r = await this.endpoint.post(`/api/csp/filing-types/create`, new RequestBuilder().json(options.data));
|
|
56
|
+
const t = (await r.json());
|
|
57
|
+
this._filingTypeCreated.dispatch(this, t);
|
|
58
|
+
return t;
|
|
59
|
+
}, options);
|
|
60
|
+
}
|
|
61
|
+
/** Edit an existing item on server. */
|
|
62
|
+
async edit(id, options) {
|
|
63
|
+
await this.action(async () => {
|
|
64
|
+
const r = await this.endpoint.post(`/api/csp/filing-types/${id}`, new RequestBuilder().json(options.data));
|
|
65
|
+
const t = await r.json();
|
|
66
|
+
this.items.overwrite(t.id, t);
|
|
67
|
+
}, options);
|
|
68
|
+
}
|
|
69
|
+
/** filingType 內有文件不能delete */
|
|
70
|
+
async delete(ids, options) {
|
|
71
|
+
return await this.action(async () => {
|
|
72
|
+
await this.endpoint.delete(`/api/csp/filing-types/delete`, new RequestBuilder().json({ Ids: ids, Options: options === null || options === void 0 ? void 0 : options.data }));
|
|
73
|
+
const deleted = [];
|
|
74
|
+
for (const id of ids) {
|
|
75
|
+
const item = this.items.peek(id);
|
|
76
|
+
if (item) {
|
|
77
|
+
deleted.push(item);
|
|
78
|
+
this._filingTypeDeleted.dispatch(this, item);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return deleted;
|
|
82
|
+
}, options);
|
|
83
|
+
}
|
|
84
|
+
/** Load a list of documents from server.
|
|
85
|
+
* @param {LoadDocumentListOptions}
|
|
86
|
+
*/
|
|
87
|
+
async loadList(options) {
|
|
88
|
+
let query = "";
|
|
89
|
+
if (options === null || options === void 0 ? void 0 : options.Includes) {
|
|
90
|
+
query = query.concat(`includes=${options.Includes}`);
|
|
91
|
+
}
|
|
92
|
+
if (query)
|
|
93
|
+
query = "?".concat(query);
|
|
94
|
+
const r = await this.endpoint.post(`/api/csp/filing-types${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
|
95
|
+
return (await r.json());
|
|
96
|
+
}
|
|
97
|
+
async load(id, options) {
|
|
98
|
+
let query = "";
|
|
99
|
+
if (options.includes)
|
|
100
|
+
query = query.concat(`includes=${options.includes}`);
|
|
101
|
+
if (query)
|
|
102
|
+
query = "?".concat(query);
|
|
103
|
+
const r = await this.endpoint.get(`/api/csp/filing-types/${id}${query}`);
|
|
104
|
+
return await r.json();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/** 响应钩子检索 IdentityStore */
|
|
108
|
+
export const useFilingTypeStore = () => {
|
|
109
|
+
const context = useApplicationContext();
|
|
110
|
+
if (!context.getStore(StoreName)) {
|
|
111
|
+
context.addStore(new FilingTypeStore(context.api.currentEndPoint));
|
|
112
|
+
}
|
|
113
|
+
return context.getStore(StoreName);
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=FilingTypeStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilingTypeStore.js","sourceRoot":"","sources":["../../../src/data/filing-type/FilingTypeStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAU/E,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,SAAS,GAAG,iBAAiB,CAAC;AAEpC,gDAAgD;AAChD,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAMzC,YAAmC,QAAq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AAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data/filing-type/filing-type-events/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IFilingType } from "../interfaces";
|
|
2
|
+
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
3
|
+
/** React hook to call action when a new FilingType has been created. */
|
|
4
|
+
export declare const useAutoUpdateListData: (list: ListDataContextState<any>, shouldUpdate: (d: IFilingType, event: string) => boolean) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useOnDeleteFilingType, useOnNewFilingType } from ".";
|
|
2
|
+
/** React hook to call action when a new FilingType has been created. */
|
|
3
|
+
export const useAutoUpdateListData = (list, shouldUpdate) => {
|
|
4
|
+
useOnNewFilingType((s, d) => {
|
|
5
|
+
console.log(s, d);
|
|
6
|
+
console.log(shouldUpdate(d, "new"));
|
|
7
|
+
if (shouldUpdate(d, "new"))
|
|
8
|
+
list.union([d]);
|
|
9
|
+
});
|
|
10
|
+
useOnDeleteFilingType((s, d) => {
|
|
11
|
+
if (shouldUpdate(d, "new"))
|
|
12
|
+
list.remove(d.id);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useAutoUpdateListData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutoUpdateListData.js","sourceRoot":"","sources":["../../../../src/data/filing-type/filing-type-events/useAutoUpdateListData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,GAAG,CAAC;AAK9D,wEAAwE;AACxE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACpC,IAA+B,EAC/B,YAAwD,EACvD,EAAE;IACH,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC3B,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;QACnC,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC9B,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 { FilingTypeStore } from "../FilingTypeStore";
|
|
2
|
+
import { IFilingType } from "../interfaces";
|
|
3
|
+
/** React hook to call action when a delete FilingType has been created. */
|
|
4
|
+
export declare const useOnDeleteFilingType: (action: (store: FilingTypeStore, doc: IFilingType) => void) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useFilingTypeStore } from "../FilingTypeStore";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
/** React hook to call action when a delete FilingType has been created. */
|
|
4
|
+
export const useOnDeleteFilingType = (action) => {
|
|
5
|
+
const store = useFilingTypeStore();
|
|
6
|
+
const onDeleteFilingType = (store, doc) => {
|
|
7
|
+
action(store, doc);
|
|
8
|
+
};
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
store.FilingTypeDeletedEvent.subscribe(onDeleteFilingType);
|
|
11
|
+
return () => {
|
|
12
|
+
store.FilingTypeDeletedEvent.unsubscribe(onDeleteFilingType);
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useOnDeleteFilingType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnDeleteFilingType.js","sourceRoot":"","sources":["../../../../src/data/filing-type/filing-type-events/useOnDeleteFilingType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAA0D,EAAE,EAAE;IACnG,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,kBAAkB,GAAG,CAAC,KAAsB,EAAE,GAAgB,EAAE,EAAE;QACvE,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,sBAAsB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QAC3D,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,sBAAsB,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QAC9D,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FilingTypeStore } from "../FilingTypeStore";
|
|
2
|
+
import { IFilingType } from "../interfaces";
|
|
3
|
+
/** React hook to call action when a new FilingType has been created. */
|
|
4
|
+
export declare const useOnNewFilingType: (action: (store: FilingTypeStore, doc: IFilingType) => void) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useFilingTypeStore } from "../FilingTypeStore";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
/** React hook to call action when a new FilingType has been created. */
|
|
4
|
+
export const useOnNewFilingType = (action) => {
|
|
5
|
+
const store = useFilingTypeStore();
|
|
6
|
+
const onNewFilingType = (store, doc) => {
|
|
7
|
+
// console.log(`onNewFilingType - ${doc.id} ${doc.name}`);
|
|
8
|
+
action(store, doc);
|
|
9
|
+
};
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
store.FilingTypeCreatedEvent.subscribe(onNewFilingType);
|
|
12
|
+
return () => {
|
|
13
|
+
store.FilingTypeCreatedEvent.unsubscribe(onNewFilingType);
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useOnNewFilingType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnNewFilingType.js","sourceRoot":"","sources":["../../../../src/data/filing-type/filing-type-events/useOnNewFilingType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAA0D,EAAE,EAAE;IAChG,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,eAAe,GAAG,CAAC,KAAsB,EAAE,GAAgB,EAAE,EAAE;QACpE,0DAA0D;QAC1D,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,sBAAsB,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACxD,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,sBAAsB,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QAC3D,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
2
|
+
import { IFilingType } from "./interfaces";
|
|
3
|
+
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
4
|
+
import { LoadFilingTypeOptions } from ".";
|
|
5
|
+
/** React hook to retrieve a filingType
|
|
6
|
+
* @param {string} id - id of the filingType
|
|
7
|
+
* @param {LoadDocumentOptions} options - options
|
|
8
|
+
*/
|
|
9
|
+
export declare const useFilingType: (id: string, options?: LoadFilingTypeOptions | undefined) => IFilingType;
|
|
10
|
+
export declare const useFilingTypeListEffect: (list: ListDataContextState<IFilingType> | null, effect: (list: any[], total: number) => void, options?: LoadDocumentListOptions | undefined) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useDocumentListLoaderEffect } from "@voplus/morpho-document-core";
|
|
2
|
+
import { useLoadCountedMapItem } from "@voplus/morpho-data";
|
|
3
|
+
import { useFilingTypeStore } from "./FilingTypeStore";
|
|
4
|
+
/** React hook to retrieve a filingType
|
|
5
|
+
* @param {string} id - id of the filingType
|
|
6
|
+
* @param {LoadDocumentOptions} options - options
|
|
7
|
+
*/
|
|
8
|
+
export const useFilingType = (id, options) => {
|
|
9
|
+
options = options ? options : {};
|
|
10
|
+
const store = useFilingTypeStore();
|
|
11
|
+
return useLoadCountedMapItem(id, store.items, () => store.load(id, options), options);
|
|
12
|
+
};
|
|
13
|
+
export const useFilingTypeListEffect = (list, effect, options) => {
|
|
14
|
+
const deps = options ? options : {};
|
|
15
|
+
const filingType = useFilingTypeStore();
|
|
16
|
+
// Call useDocumentListEffect and ensure won't load twice for same loading options.
|
|
17
|
+
return useDocumentListLoaderEffect(list, effect, () => filingType.loadList(options), [deps]);
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/filing-type/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAKpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAU,EAAE,OAA+B,EAAE,EAAE;IAC5E,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA4B,CAAC;IAC5D,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,OAAO,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;AACxF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACtC,IAA8C,EAC9C,MAA4C,EAC5C,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,UAAU,GAAG,kBAAkB,EAAE,CAAC;IAExC,mFAAmF;IACnF,OAAO,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,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/filing-type/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ILoadable } from "@voplus/morpho-data";
|
|
2
|
+
export declare type FilingTypeStatus = "Active" | "Inactive" | "Terminated" | "Cancelled" | "Prospect";
|
|
3
|
+
export interface IFilingType extends ILoadable {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
jurisdiction: string;
|
|
7
|
+
corporateType: string;
|
|
8
|
+
liabilityType?: string;
|
|
9
|
+
category: string;
|
|
10
|
+
frequency: string;
|
|
11
|
+
dateBased: string;
|
|
12
|
+
fixedDate?: Date;
|
|
13
|
+
monthOffset?: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/data/filing-type/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LoadOptions, StoreActionOptions } from "@voplus/morpho-data";
|
|
2
|
+
import { DeleteDocumentOptions } from "@voplus/morpho-document-core";
|
|
3
|
+
import { IFilingType } from "./interfaces";
|
|
4
|
+
/** Custom load org contact options type */
|
|
5
|
+
export declare type LoadFilingTypeOptions = {
|
|
6
|
+
/** Comma separated include options e.g. path */
|
|
7
|
+
includes?: string;
|
|
8
|
+
} & LoadOptions<IFilingType>;
|
|
9
|
+
export declare type CorporateTypes = "Proprietorship" | "Company" | "Partnership";
|
|
10
|
+
export declare type CorporateLiabilityTypes = "Unlimited" | "LimitedByShares" | "LimitedByGuarantee";
|
|
11
|
+
export declare type FilingCategory = "Tax" | "Business";
|
|
12
|
+
export declare type FilingFrequency = "Monthly" | "Quarterly" | "HalfYearly" | "Yearly";
|
|
13
|
+
export declare type FilingDateBased = "FinancialYear" | "CalendarYear" | "Fixed";
|
|
14
|
+
export declare type FilingTypeCreateOptions = {
|
|
15
|
+
CenterId: string;
|
|
16
|
+
Name: string;
|
|
17
|
+
Jurisdiction: string;
|
|
18
|
+
CorporateType: CorporateTypes;
|
|
19
|
+
LiabilityType: CorporateLiabilityTypes;
|
|
20
|
+
};
|
|
21
|
+
export declare type FilingTypeEditOptions = {
|
|
22
|
+
Name?: string;
|
|
23
|
+
Category?: FilingCategory;
|
|
24
|
+
Frequency?: FilingFrequency;
|
|
25
|
+
DateBased?: FilingDateBased;
|
|
26
|
+
FixedDate?: string;
|
|
27
|
+
MonthOffset?: number;
|
|
28
|
+
};
|
|
29
|
+
export declare type CreateFilingTypeOptions = {
|
|
30
|
+
data: FilingTypeCreateOptions;
|
|
31
|
+
} & StoreActionOptions;
|
|
32
|
+
export declare type EditFilingTypeOptions = {
|
|
33
|
+
data: FilingTypeEditOptions;
|
|
34
|
+
} & StoreActionOptions;
|
|
35
|
+
export declare type DeleteFilingTypeOptions = {
|
|
36
|
+
data?: DeleteDocumentOptions;
|
|
37
|
+
} & StoreActionOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/filing-type/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ApiEndPoint } from "@voplus/api";
|
|
2
|
+
import { CountedMap, Store } from "@voplus/morpho-data";
|
|
3
|
+
import { CreateFilingYearOptions, DeleteFilingYearOptions, EditFilingYearOptions, LoadFilingYearOptions } from "./types";
|
|
4
|
+
import { IFilingYear } from "./interfaces";
|
|
5
|
+
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
6
|
+
/** Quotation store supply backend functions. */
|
|
7
|
+
export declare class FilingYearStore extends Store {
|
|
8
|
+
readonly endpoint: ApiEndPoint;
|
|
9
|
+
/** Name of the store */
|
|
10
|
+
readonly name: string;
|
|
11
|
+
private readonly _filingYearDeleted;
|
|
12
|
+
private readonly _filingYearCreated;
|
|
13
|
+
constructor(endpoint: ApiEndPoint);
|
|
14
|
+
/** All currently used corporate. */
|
|
15
|
+
readonly items: CountedMap<string, IFilingYear>;
|
|
16
|
+
/** Event fires when a delete filingYear has been deleted. */
|
|
17
|
+
get FilingYearDeletedEvent(): import("strongly-typed-events").IEvent<FilingYearStore, IFilingYear>;
|
|
18
|
+
/** Event fires when a new FilingYear has been created. */
|
|
19
|
+
get FilingYearCreatedEvent(): import("strongly-typed-events").IEvent<FilingYearStore, IFilingYear>;
|
|
20
|
+
/** Create a new Identity. */
|
|
21
|
+
create(options: CreateFilingYearOptions): Promise<IFilingYear>;
|
|
22
|
+
/** Edit an existing item on server. */
|
|
23
|
+
edit(id: string, options: EditFilingYearOptions): Promise<void>;
|
|
24
|
+
/** filingYear 內有文件不能delete */
|
|
25
|
+
delete(ids: string[], options?: DeleteFilingYearOptions): Promise<any>;
|
|
26
|
+
/** Load a list of documents from server.
|
|
27
|
+
* @param {LoadDocumentListOptions}
|
|
28
|
+
*/
|
|
29
|
+
loadList(options?: LoadDocumentListOptions): Promise<IFilingYear[]>;
|
|
30
|
+
load(id: string, options: LoadFilingYearOptions): Promise<IFilingYear>;
|
|
31
|
+
}
|
|
32
|
+
/** 响应钩子检索 IdentityStore */
|
|
33
|
+
export declare const useFilingYearStore: () => FilingYearStore;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { RequestBuilder } from "@voplus/api";
|
|
2
|
+
import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
|
|
3
|
+
import { observable } from "mobx";
|
|
4
|
+
import { EventDispatcher } from "strongly-typed-events";
|
|
5
|
+
const StoreName = "FilingYearStore";
|
|
6
|
+
/** Quotation store supply backend functions. */
|
|
7
|
+
export class FilingYearStore extends Store {
|
|
8
|
+
constructor(endpoint) {
|
|
9
|
+
super();
|
|
10
|
+
Object.defineProperty(this, "endpoint", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: endpoint
|
|
15
|
+
});
|
|
16
|
+
/** Name of the store */
|
|
17
|
+
Object.defineProperty(this, "name", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: StoreName
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "_filingYearDeleted", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: new EventDispatcher()
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "_filingYearCreated", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: new EventDispatcher()
|
|
34
|
+
});
|
|
35
|
+
/** All currently used corporate. */
|
|
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 delete filingYear has been deleted. */
|
|
44
|
+
get FilingYearDeletedEvent() {
|
|
45
|
+
return this._filingYearDeleted.asEvent();
|
|
46
|
+
}
|
|
47
|
+
/** Event fires when a new FilingYear has been created. */
|
|
48
|
+
get FilingYearCreatedEvent() {
|
|
49
|
+
return this._filingYearCreated.asEvent();
|
|
50
|
+
}
|
|
51
|
+
/** Create a new Identity. */
|
|
52
|
+
async create(options) {
|
|
53
|
+
// invariant(options.name, "Name cannot be empty.");
|
|
54
|
+
return await this.action(async () => {
|
|
55
|
+
const r = await this.endpoint.post(`/api/csp/corporate/filing-years/create`, new RequestBuilder().json(options.data));
|
|
56
|
+
const t = (await r.json());
|
|
57
|
+
this._filingYearCreated.dispatch(this, t);
|
|
58
|
+
return t;
|
|
59
|
+
}, options);
|
|
60
|
+
}
|
|
61
|
+
/** Edit an existing item on server. */
|
|
62
|
+
async edit(id, options) {
|
|
63
|
+
await this.action(async () => {
|
|
64
|
+
const r = await this.endpoint.post(`/api/csp/corporate/filing-years/${id}`, new RequestBuilder().json(options.data));
|
|
65
|
+
const t = await r.json();
|
|
66
|
+
this.items.overwrite(t.id, t);
|
|
67
|
+
}, options);
|
|
68
|
+
}
|
|
69
|
+
/** filingYear 內有文件不能delete */
|
|
70
|
+
async delete(ids, options) {
|
|
71
|
+
return await this.action(async () => {
|
|
72
|
+
await this.endpoint.delete(`/api/csp/corporate/filing-years/delete`, new RequestBuilder().json({ Ids: ids, Options: options === null || options === void 0 ? void 0 : options.data }));
|
|
73
|
+
const deleted = [];
|
|
74
|
+
for (const id of ids) {
|
|
75
|
+
const item = this.items.peek(id);
|
|
76
|
+
if (item) {
|
|
77
|
+
deleted.push(item);
|
|
78
|
+
this._filingYearDeleted.dispatch(this, item);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return deleted;
|
|
82
|
+
}, options);
|
|
83
|
+
}
|
|
84
|
+
/** Load a list of documents from server.
|
|
85
|
+
* @param {LoadDocumentListOptions}
|
|
86
|
+
*/
|
|
87
|
+
async loadList(options) {
|
|
88
|
+
let query = "";
|
|
89
|
+
if (options === null || options === void 0 ? void 0 : options.Includes) {
|
|
90
|
+
query = query.concat(`includes=${options.Includes}`);
|
|
91
|
+
}
|
|
92
|
+
if (query)
|
|
93
|
+
query = "?".concat(query);
|
|
94
|
+
const r = await this.endpoint.post(`/api/csp/corporate/filing-years${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
|
95
|
+
return (await r.json());
|
|
96
|
+
}
|
|
97
|
+
async load(id, options) {
|
|
98
|
+
let query = "";
|
|
99
|
+
if (options.includes)
|
|
100
|
+
query = query.concat(`includes=${options.includes}`);
|
|
101
|
+
if (query)
|
|
102
|
+
query = "?".concat(query);
|
|
103
|
+
const r = await this.endpoint.get(`/api/csp/corporate/filing-years/${id}${query}`);
|
|
104
|
+
return await r.json();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/** 响应钩子检索 IdentityStore */
|
|
108
|
+
export const useFilingYearStore = () => {
|
|
109
|
+
const context = useApplicationContext();
|
|
110
|
+
if (!context.getStore(StoreName)) {
|
|
111
|
+
context.addStore(new FilingYearStore(context.api.currentEndPoint));
|
|
112
|
+
}
|
|
113
|
+
return context.getStore(StoreName);
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=FilingYearStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Filing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AG,CAAC,mCAAmC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CAED;AAED,2BAA2B;AAC3B,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;KACnE;IACD,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data/filing-year/filing-year-events/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IFilingYear } from "../interfaces";
|
|
2
|
+
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
3
|
+
/** React hook to call action when a new FilingYear has been created. */
|
|
4
|
+
export declare const useAutoUpdateListData: (list: ListDataContextState<any>, shouldUpdate: (d: IFilingYear, event: string) => boolean) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useOnDeleteFilingYear, useOnNewFilingYear } from ".";
|
|
2
|
+
/** React hook to call action when a new FilingYear has been created. */
|
|
3
|
+
export const useAutoUpdateListData = (list, shouldUpdate) => {
|
|
4
|
+
useOnNewFilingYear((s, d) => {
|
|
5
|
+
console.log(s, d);
|
|
6
|
+
console.log(shouldUpdate(d, "new"));
|
|
7
|
+
if (shouldUpdate(d, "new"))
|
|
8
|
+
list.union([d]);
|
|
9
|
+
});
|
|
10
|
+
useOnDeleteFilingYear((s, d) => {
|
|
11
|
+
if (shouldUpdate(d, "new"))
|
|
12
|
+
list.remove(d.id);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useAutoUpdateListData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutoUpdateListData.js","sourceRoot":"","sources":["../../../../src/data/filing-year/filing-year-events/useAutoUpdateListData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,GAAG,CAAC;AAK9D,wEAAwE;AACxE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACpC,IAA+B,EAC/B,YAAwD,EACvD,EAAE;IACH,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC3B,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;QACnC,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC9B,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 { FilingYearStore } from "../FilingYearStore";
|
|
2
|
+
import { IFilingYear } from "../interfaces";
|
|
3
|
+
/** React hook to call action when a delete FilingYear has been created. */
|
|
4
|
+
export declare const useOnDeleteFilingYear: (action: (store: FilingYearStore, doc: IFilingYear) => void) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useFilingYearStore } from "../FilingYearStore";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
/** React hook to call action when a delete FilingYear has been created. */
|
|
4
|
+
export const useOnDeleteFilingYear = (action) => {
|
|
5
|
+
const store = useFilingYearStore();
|
|
6
|
+
const onDeleteFilingYear = (store, doc) => {
|
|
7
|
+
action(store, doc);
|
|
8
|
+
};
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
store.FilingYearDeletedEvent.subscribe(onDeleteFilingYear);
|
|
11
|
+
return () => {
|
|
12
|
+
store.FilingYearDeletedEvent.unsubscribe(onDeleteFilingYear);
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useOnDeleteFilingYear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnDeleteFilingYear.js","sourceRoot":"","sources":["../../../../src/data/filing-year/filing-year-events/useOnDeleteFilingYear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAA0D,EAAE,EAAE;IACnG,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,kBAAkB,GAAG,CAAC,KAAsB,EAAE,GAAgB,EAAE,EAAE;QACvE,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,sBAAsB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QAC3D,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,sBAAsB,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QAC9D,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|