jmash-region 0.0.1 → 0.0.2

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.
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { Entry } from "jmash-core";
2
+ export declare class RegionBizDict {
3
+ values: import("vue").Reactive<Entry[]>;
4
+ query: any;
5
+ constructor(results: any, query: any);
6
+ getValue(key: string): string;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { EnumDict } from "jmash-core";
2
+ import { RegionBizDict } from './dict';
3
+ export declare class Dict {
4
+ static readonly regionTypeEnum: EnumDict;
5
+ static readonly regionCategoryEnum: EnumDict;
6
+ static readonly enableDict: RegionBizDict;
7
+ }
@@ -0,0 +1,18 @@
1
+ import type { AxiosPromise } from "axios";
2
+ import type { DictRegionApi, DictRegionReq, DictRegionModel, DictRegionList, DictRegionKey, DictRegionCreateReq, DictRegionUpdateReq, DictRegionExportReq, DictRegionImportReq } from "./types";
3
+ declare class DictRegionApiImpl implements DictRegionApi {
4
+ getKey(model: DictRegionModel): DictRegionKey;
5
+ findList(query?: DictRegionReq): AxiosPromise<DictRegionList>;
6
+ findByCode(query: DictRegionReq): AxiosPromise<DictRegionModel>;
7
+ findById(query: DictRegionKey): AxiosPromise<DictRegionModel>;
8
+ create(data: DictRegionCreateReq): AxiosPromise<DictRegionModel>;
9
+ update(data: DictRegionUpdateReq): AxiosPromise<DictRegionModel>;
10
+ move(key: DictRegionKey, up: boolean): AxiosPromise<boolean>;
11
+ enable(key: DictRegionKey, enable: boolean): AxiosPromise<boolean>;
12
+ delete(query: DictRegionKey): AxiosPromise<DictRegionModel>;
13
+ downloadTemplate(): AxiosPromise;
14
+ importExcel(data: DictRegionImportReq): AxiosPromise<string>;
15
+ exportExcel(queryParams: DictRegionExportReq): AxiosPromise;
16
+ }
17
+ declare const dictRegionApi: DictRegionApiImpl;
18
+ export { dictRegionApi };
@@ -0,0 +1,74 @@
1
+ import type { EntityApi, EntityReq, EntityModel, EntityList, EntityTotal, EntityKey, EntityCreateReq, EntityUpdateReq, EntityExportReq, EntityImportReq } from "jmash-core";
2
+ export interface DictRegionApi extends EntityApi {
3
+ }
4
+ export interface DictRegionReq extends EntityReq {
5
+ likeRegionName?: string;
6
+ enable?: boolean;
7
+ hasEnable?: boolean;
8
+ parentId?: string;
9
+ excludeId?: string;
10
+ hasParent?: boolean;
11
+ regionCode?: string;
12
+ }
13
+ export interface DictRegionModel extends EntityModel {
14
+ regionId: string;
15
+ parentId?: string;
16
+ regionCode: string;
17
+ regionName?: string;
18
+ regionPinyin?: string;
19
+ regionType?: string;
20
+ regionCategory?: string;
21
+ depth: number;
22
+ orderBy?: number;
23
+ enable?: boolean;
24
+ description?: string;
25
+ hasChildren?: boolean;
26
+ children?: DictRegionModel[];
27
+ }
28
+ export interface DictRegionList extends EntityList {
29
+ results: Array<DictRegionModel>;
30
+ }
31
+ export interface DictRegionModelTotal extends EntityTotal {
32
+ totalSize: number;
33
+ }
34
+ export interface DictRegionKey extends EntityKey {
35
+ tenant?: string;
36
+ regionId?: string;
37
+ }
38
+ export interface DictRegionCreateReq extends EntityCreateReq {
39
+ parentId?: string;
40
+ regionCode?: string;
41
+ regionName?: string;
42
+ regionPinyin?: string;
43
+ regionType?: string;
44
+ regionCategory?: string;
45
+ enable?: boolean;
46
+ description?: string;
47
+ }
48
+ export interface DictRegionUpdateReq extends EntityUpdateReq {
49
+ regionId?: string;
50
+ parentId?: string;
51
+ regionCode?: string;
52
+ regionName?: string;
53
+ regionPinyin?: string;
54
+ regionType?: string;
55
+ regionCategory?: string;
56
+ enable?: boolean;
57
+ description?: string;
58
+ }
59
+ export type DictRegionFormReq = DictRegionCreateReq | DictRegionUpdateReq;
60
+ export interface DictRegionExportReq extends EntityExportReq {
61
+ req: DictRegionReq;
62
+ }
63
+ export interface DictRegionImportReq extends EntityImportReq {
64
+ }
65
+ export interface DictRegionMoveKey {
66
+ tenant?: string;
67
+ regionId?: string;
68
+ up?: boolean;
69
+ }
70
+ export interface DictRegionEnableKey {
71
+ tenant?: string;
72
+ regionId?: string;
73
+ enable?: boolean;
74
+ }
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ modelValue: globalThis.PropType<string[]>;
3
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
4
+ modelValue: globalThis.PropType<string[]>;
5
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ modelValue: globalThis.PropType<string>;
3
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
4
+ modelValue: globalThis.PropType<string>;
5
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import { type PropType } from "vue";
2
+ import type { TableColumn } from "jmash-core";
3
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
4
+ tableLabel: {
5
+ type: PropType<TableColumn[]>;
6
+ default: () => never[];
7
+ };
8
+ isSelection: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ }>, {
13
+ clearSelection: () => any;
14
+ getSelectionRows: () => any;
15
+ toggleRowSelection: (row: any, selected: boolean) => any;
16
+ toggleAllSelection: () => any;
17
+ toggleRowExpansion: (row: any, expanded?: boolean | undefined) => any;
18
+ setCurrentRow: (row: any) => any;
19
+ clearSort: () => any;
20
+ clearFilter: (columnKeys?: string[] | undefined) => any;
21
+ doLayout: () => any;
22
+ sort: (prop: string, order: string) => any;
23
+ scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => any;
24
+ setScrollTop: (top?: number | undefined) => any;
25
+ setScrollLeft: (left?: number | undefined) => any;
26
+ refs: () => any;
27
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
28
+ tableLabel: {
29
+ type: PropType<TableColumn[]>;
30
+ default: () => never[];
31
+ };
32
+ isSelection: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ }>> & Readonly<{}>, {
37
+ tableLabel: TableColumn[];
38
+ isSelection: boolean;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Partial<Record<string, (_: {
40
+ data: any;
41
+ }) => any>>>;
42
+ export default _default;
43
+ type __VLS_WithTemplateSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,16 @@
1
+ export declare class Constant {
2
+ static readonly MODULE_REGION = "region";
3
+ static readonly DEFAULT_ID = "00000000-0000-0000-0000-000000000000";
4
+ static readonly ENUM_REGION_TYPE = "jmash.region.protobuf.RegionType";
5
+ static readonly ENUM_REGION_CATEGORY = "jmash.region.protobuf.RegionCategory";
6
+ static readonly ENABLE_VALUES: globalThis.Ref<{
7
+ key: boolean;
8
+ value: string;
9
+ }[], {
10
+ key: boolean;
11
+ value: string;
12
+ }[] | {
13
+ key: boolean;
14
+ value: string;
15
+ }[]>;
16
+ }
package/dts/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import type { App } from "vue";
2
+ export declare const JmashRegionTree: Promise<typeof import("@/components/JmashRegionTree/index.vue")>;
3
+ export declare const JmashRegionCascader: Promise<typeof import("@/components/JmashRegionCascader/index.vue")>;
4
+ export { dictRegionApi } from "@/api/region/os-dict-region";
5
+ export type { DictRegionApi, DictRegionReq, DictRegionModel, DictRegionList, DictRegionKey, DictRegionMoveKey, DictRegionEnableKey, DictRegionCreateReq, DictRegionUpdateReq, DictRegionExportReq, DictRegionImportReq, } from "@/api/region/os-dict-region/types";
6
+ declare const dict: {
7
+ install(app: App): void;
8
+ };
9
+ export default dict;
@@ -0,0 +1 @@
1
+ export declare function loadLang(i18n: any): void;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,31 @@
1
+ declare const _default: {
2
+ common: {
3
+ delete: string;
4
+ confirm: string;
5
+ cancel: string;
6
+ confirmDelete: string;
7
+ deleteSuccess: string;
8
+ };
9
+ dictRegion: {
10
+ name: string;
11
+ addChild: string;
12
+ parentId: string;
13
+ parentIdPlaceholder: string;
14
+ regionCode: string;
15
+ regionCodePlaceholder: string;
16
+ regionName: string;
17
+ regionNamePlaceholder: string;
18
+ regionPinyin: string;
19
+ regionPinyinPlaceholder: string;
20
+ regionType: string;
21
+ regionTypePlaceholder: string;
22
+ regionCategory: string;
23
+ regionCategoryPlaceholder: string;
24
+ enable: string;
25
+ enablePlaceholder: string;
26
+ orderBy: string;
27
+ description: string;
28
+ descriptionPlaceholder: string;
29
+ };
30
+ };
31
+ export default _default;
package/dts/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import "@/permission";
2
+ import "jmash-core/dist/style.css";
@@ -0,0 +1 @@
1
+ import "nprogress/nprogress.css";
@@ -0,0 +1,12 @@
1
+ import type { DictRegionModel } from "@/api/region/os-dict-region/types";
2
+ export declare const findParentRegions: (regionId: string, regions: DictRegionModel[]) => string[];
3
+ export interface ExtractIdsOrCodes {
4
+ regionIds: string[];
5
+ regionCodes: string[];
6
+ }
7
+ /**
8
+ * 返回区域ID和区域编码
9
+ * @param model DictRegionModel
10
+ * @returns ExtractIdsOrCodes { regionIds: string[], regionCodes: string[] }
11
+ */
12
+ export declare const extractIdsOrCodes: (model: DictRegionModel) => ExtractIdsOrCodes;
@@ -0,0 +1,33 @@
1
+ import { type PropType } from "vue";
2
+ import type { DictRegionKey } from "@/api/region/os-dict-region/types";
3
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
4
+ modelValue: PropType<boolean>;
5
+ entityKey: {
6
+ type: PropType<DictRegionKey>;
7
+ default: () => void;
8
+ };
9
+ parentId: {
10
+ type: PropType<string>;
11
+ default: string;
12
+ };
13
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ refresh: (...args: any[]) => void;
15
+ reload: (...args: any[]) => void;
16
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
17
+ modelValue: PropType<boolean>;
18
+ entityKey: {
19
+ type: PropType<DictRegionKey>;
20
+ default: () => void;
21
+ };
22
+ parentId: {
23
+ type: PropType<string>;
24
+ default: string;
25
+ };
26
+ }>> & Readonly<{
27
+ onRefresh?: ((...args: any[]) => any) | undefined;
28
+ onReload?: ((...args: any[]) => any) | undefined;
29
+ }>, {
30
+ parentId: string;
31
+ entityKey: DictRegionKey;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
33
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "jmash-region",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
- "types": "dts/src/index.d.ts",
6
+ "types": "dts/index.d.ts",
7
7
  "files": [
8
8
  "dist",
9
- "dts/src"
9
+ "dts"
10
10
  ],
11
11
  "scripts": {
12
12
  "dev": "vite",