web-core-tcm 0.0.45 → 0.0.49

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.
@@ -1,51 +1,49 @@
1
1
  import { Method as g } from "../../../../node_modules/alova/dist/alova.esm.js";
2
- import A from "./apiDefinitions.js";
3
- const l = /* @__PURE__ */ Object.create(null), m = (t, r, p) => {
4
- const e = t.join(".");
5
- if (l[e])
6
- return l[e];
7
- const n = new Proxy(function() {
2
+ import _ from "./apiDefinitions.js";
3
+ const l = /* @__PURE__ */ Object.create(null), d = (e, a, p) => {
4
+ const o = e.join(".");
5
+ if (l[o])
6
+ return l[o];
7
+ const i = new Proxy(function() {
8
8
  }, {
9
- get(d, u) {
10
- const s = [...t, u];
11
- return m(s, r, p);
9
+ get(y, u) {
10
+ const f = [...e, u];
11
+ return d(f, a, p);
12
12
  },
13
- apply(d, u, [s]) {
14
- const h = A[e];
13
+ apply(y, u, [f]) {
14
+ const h = _[o];
15
15
  if (!h)
16
- throw new Error(`the api path of \`${e}\` is not found`);
17
- const a = {
18
- ...p[e],
19
- ...s
20
- }, [y, P] = h, w = a.pathParams, b = P.replace(/\{([^}]+)\}/g, (f, c) => w[c]);
21
- delete a.pathParams;
22
- let o = a.data;
23
- if (Object.prototype.toString.call(o) === "[object Object]" && typeof FormData < "u") {
24
- let f = !1;
25
- const c = new FormData();
26
- for (const i in o)
27
- c.append(i, o[i]), o[i] instanceof Blob && (f = !0);
28
- o = f ? c : o;
16
+ throw new Error(`the api path of \`${o}\` is not found`);
17
+ const s = {
18
+ ...p[o],
19
+ ...f
20
+ }, [P, b] = h, w = s.pathParams, A = b.replace(/\{([^}]+)\}/g, (c, n) => w[n]);
21
+ delete s.pathParams;
22
+ let t = s.data;
23
+ if (Object.prototype.toString.call(t) === "[object Object]" && typeof FormData < "u") {
24
+ let c = !1;
25
+ const n = new FormData();
26
+ for (const r in t)
27
+ if (Array.isArray(t[r]))
28
+ for (const m of t[r])
29
+ n.append(r, m), m instanceof Blob && (c = !0);
30
+ else
31
+ n.append(r, t[r]), t[r] instanceof Blob && (c = !0);
32
+ t = c ? n : t;
29
33
  }
30
- return new g(
31
- y.toUpperCase(),
32
- r,
33
- b,
34
- a,
35
- o
36
- );
34
+ return new g(P.toUpperCase(), a, A, s, t);
37
35
  }
38
36
  });
39
- return l[e] = n, n;
40
- }, x = (t, r) => new Proxy({}, {
41
- get(e, n) {
42
- return m([n], t, r);
37
+ return l[o] = i, i;
38
+ }, D = (e, a) => new Proxy({}, {
39
+ get(o, i) {
40
+ return d([i], e, a);
43
41
  }
44
- }), D = (t) => {
45
- globalThis.authorizeApi = t;
46
- }, C = (t) => t;
42
+ }), B = (e) => {
43
+ globalThis.authorizeApi = e;
44
+ }, C = (e) => e;
47
45
  export {
48
- x as createApis,
49
- D as mountApis,
46
+ D as createApis,
47
+ B as mountApis,
50
48
  C as withConfigType
51
49
  };
@@ -1,51 +1,49 @@
1
1
  import { Method as g } from "../../../../node_modules/alova/dist/alova.esm.js";
2
- import A from "./apiDefinitions.js";
3
- const l = /* @__PURE__ */ Object.create(null), u = (t, n, s) => {
4
- const e = t.join(".");
5
- if (l[e])
6
- return l[e];
7
- const r = new Proxy(function() {
2
+ import _ from "./apiDefinitions.js";
3
+ const l = /* @__PURE__ */ Object.create(null), d = (e, a, p) => {
4
+ const o = e.join(".");
5
+ if (l[o])
6
+ return l[o];
7
+ const c = new Proxy(function() {
8
8
  }, {
9
- get(d, h) {
10
- const i = [...t, h];
11
- return u(i, n, s);
9
+ get(y, u) {
10
+ const f = [...e, u];
11
+ return d(f, a, p);
12
12
  },
13
- apply(d, h, [i]) {
14
- const m = A[e];
15
- if (!m)
16
- throw new Error(`the api path of \`${e}\` is not found`);
17
- const a = {
18
- ...s[e],
19
- ...i
20
- }, [y, P] = m, w = a.pathParams, b = P.replace(/\{([^}]+)\}/g, (f, c) => w[c]);
21
- delete a.pathParams;
22
- let o = a.data;
23
- if (Object.prototype.toString.call(o) === "[object Object]" && typeof FormData < "u") {
24
- let f = !1;
25
- const c = new FormData();
26
- for (const p in o)
27
- c.append(p, o[p]), o[p] instanceof Blob && (f = !0);
28
- o = f ? c : o;
13
+ apply(y, u, [f]) {
14
+ const h = _[o];
15
+ if (!h)
16
+ throw new Error(`the api path of \`${o}\` is not found`);
17
+ const s = {
18
+ ...p[o],
19
+ ...f
20
+ }, [P, b] = h, w = s.pathParams, A = b.replace(/\{([^}]+)\}/g, (i, n) => w[n]);
21
+ delete s.pathParams;
22
+ let t = s.data;
23
+ if (Object.prototype.toString.call(t) === "[object Object]" && typeof FormData < "u") {
24
+ let i = !1;
25
+ const n = new FormData();
26
+ for (const r in t)
27
+ if (Array.isArray(t[r]))
28
+ for (const m of t[r])
29
+ n.append(r, m), m instanceof Blob && (i = !0);
30
+ else
31
+ n.append(r, t[r]), t[r] instanceof Blob && (i = !0);
32
+ t = i ? n : t;
29
33
  }
30
- return new g(
31
- y.toUpperCase(),
32
- n,
33
- b,
34
- a,
35
- o
36
- );
34
+ return new g(P.toUpperCase(), a, A, s, t);
37
35
  }
38
36
  });
39
- return l[e] = r, r;
40
- }, x = (t, n) => new Proxy({}, {
41
- get(e, r) {
42
- return u([r], t, n);
37
+ return l[o] = c, c;
38
+ }, D = (e, a) => new Proxy({}, {
39
+ get(o, c) {
40
+ return d([c], e, a);
43
41
  }
44
- }), D = (t) => {
45
- globalThis.checkApi = t;
46
- }, C = (t) => t;
42
+ }), B = (e) => {
43
+ globalThis.checkApi = e;
44
+ }, C = (e) => e;
47
45
  export {
48
- x as createApis,
49
- D as mountApis,
46
+ D as createApis,
47
+ B as mountApis,
50
48
  C as withConfigType
51
49
  };
@@ -94,20 +94,17 @@ export interface PageCheckState {
94
94
  content?: CheckState[];
95
95
  number?: number;
96
96
  sort?: SortObject;
97
- first?: boolean;
98
- last?: boolean;
99
97
  numberOfElements?: number;
100
98
  pageable?: PageableObject;
99
+ first?: boolean;
100
+ last?: boolean;
101
101
  empty?: boolean;
102
102
  }
103
103
  export interface PaymentState {
104
104
  id?: string;
105
- prescription?: string;
106
- doctorId?: string;
107
- patientId?: string;
108
- patientName?: string;
109
- patientPhone?: string;
110
- patientGender?: string;
105
+ doctorState?: DoctorState;
106
+ patientState?: PatientState;
107
+ prescriptionsState?: string;
111
108
  createdTimestamp?: number;
112
109
  updatedTimestamp?: number;
113
110
  prescriptionPaymentStatus?: number;
@@ -120,10 +117,10 @@ export interface PagePaymentState {
120
117
  content?: PaymentState[];
121
118
  number?: number;
122
119
  sort?: SortObject;
123
- first?: boolean;
124
- last?: boolean;
125
120
  numberOfElements?: number;
126
121
  pageable?: PageableObject;
122
+ first?: boolean;
123
+ last?: boolean;
127
124
  empty?: boolean;
128
125
  }
129
126
  declare global {
@@ -687,8 +684,6 @@ declare global {
687
684
  * sorted?: boolean
688
685
  * unsorted?: boolean
689
686
  * }
690
- * first?: boolean
691
- * last?: boolean
692
687
  * numberOfElements?: number
693
688
  * pageable?: {
694
689
  * offset?: number
@@ -702,6 +697,8 @@ declare global {
702
697
  * pageNumber?: number
703
698
  * unpaged?: boolean
704
699
  * }
700
+ * first?: boolean
701
+ * last?: boolean
705
702
  * empty?: boolean
706
703
  * }
707
704
  * ```
@@ -992,12 +989,44 @@ declare global {
992
989
  * // [items] end
993
990
  * content?: Array<{
994
991
  * id?: string
995
- * prescription?: string
996
- * doctorId?: string
997
- * patientId?: string
998
- * patientName?: string
999
- * patientPhone?: string
1000
- * patientGender?: string
992
+ * doctorState?: {
993
+ * id?: string
994
+ * name?: string
995
+ * createdTimestamp?: string
996
+ * updatedTimestamp?: string
997
+ * gender?: string
998
+ * identityNumber?: string
999
+ * phoneNumber?: string
1000
+ * birthdate?: string
1001
+ * }
1002
+ * patientState?: {
1003
+ * id?: string
1004
+ * doctorId?: string
1005
+ * name?: string
1006
+ * createdTimestamp?: string
1007
+ * updatedTimestamp?: string
1008
+ * identity?: string
1009
+ * gender?: string
1010
+ * phoneNumber?: string
1011
+ * birthdate?: string
1012
+ * // [items] start
1013
+ * // [items] end
1014
+ * remarks?: string[]
1015
+ * // [items] start
1016
+ * // [items] end
1017
+ * tagsState?: Array<{
1018
+ * key?: string
1019
+ * // [items] start
1020
+ * // [items] end
1021
+ * annotationsState?: Array<{
1022
+ * value?: string
1023
+ * actor?: string
1024
+ * timestamp?: string
1025
+ * }>
1026
+ * }>
1027
+ * mainSymptom?: string
1028
+ * }
1029
+ * prescriptionsState?: string
1001
1030
  * createdTimestamp?: number
1002
1031
  * updatedTimestamp?: number
1003
1032
  * prescriptionPaymentStatus?: number
@@ -1009,8 +1038,6 @@ declare global {
1009
1038
  * sorted?: boolean
1010
1039
  * unsorted?: boolean
1011
1040
  * }
1012
- * first?: boolean
1013
- * last?: boolean
1014
1041
  * numberOfElements?: number
1015
1042
  * pageable?: {
1016
1043
  * offset?: number
@@ -1024,6 +1051,8 @@ declare global {
1024
1051
  * pageNumber?: number
1025
1052
  * unpaged?: boolean
1026
1053
  * }
1054
+ * first?: boolean
1055
+ * last?: boolean
1027
1056
  * empty?: boolean
1028
1057
  * }
1029
1058
  * ```
@@ -37,12 +37,9 @@ export declare abstract class Payment extends NetworkObject {
37
37
  static builder(): IBuilder<Payment>;
38
38
  static default(): typeof Payment;
39
39
  id: string;
40
- prescription: string;
41
- doctorId: string;
42
- patientId: string;
43
- patientName: string;
44
- patientPhone: string;
45
- patientGender: string;
40
+ prescriptions: Sequence<Prescription>;
41
+ doctor: Doctor;
42
+ patient: Patient;
46
43
  createdTimestamp: number;
47
44
  updatedTimestamp: number;
48
45
  prescriptionPaymentStatus: number;
@@ -1,26 +1,25 @@
1
- import { Patient as S } from "../patient/patient.js";
2
- import { NetworkObject as h, Sequence as m, Tag as y } from "../core/core.js";
3
- import { Metas as n } from "../patient/meta.js";
4
- import { Prescription as u } from "../prescription/prescription.js";
5
- import { AlovaPrescription as g } from "../prescription/alova/implement/prescription.js";
1
+ import { Patient as h } from "../patient/patient.js";
2
+ import { NetworkObject as l, Sequence as r, Tag as b } from "../core/core.js";
3
+ import { Metas as m } from "../patient/meta.js";
4
+ import { Prescription as s } from "../prescription/prescription.js";
6
5
  import { extractPlainText as c } from "../../util/RichTextUtil.js";
7
- import { Doctor as b } from "../doctor/doctor.js";
8
- import { Herbal as P } from "../prescription/herbal.js";
6
+ import { Doctor as f } from "../doctor/doctor.js";
7
+ import { Herbal as g } from "../prescription/herbal.js";
9
8
  import "../prescription/alova/index.js";
10
- import { Builder as l } from "../../../node_modules/builder-pattern/dist/index.js";
11
- class o extends h {
9
+ import { Builder as S } from "../../../node_modules/builder-pattern/dist/index.js";
10
+ class n extends l {
12
11
  static builder() {
13
- return l(this._default);
12
+ return S(this._default);
14
13
  }
15
14
  static default() {
16
15
  return this._default;
17
16
  }
18
17
  id = "";
19
- doctor = b.builder().build();
20
- patient = S.builder().build();
18
+ doctor = f.builder().build();
19
+ patient = h.builder().build();
21
20
  diagnosis = "";
22
21
  tags = [];
23
- prescriptions = new m();
22
+ prescriptions = new r();
24
23
  createdTimestamp = Date.now().toString();
25
24
  updatedTimestamp = Date.now().toString();
26
25
  prescriptionPaymentStatus = 0;
@@ -31,93 +30,94 @@ class o extends h {
31
30
  outpatientType = "预约";
32
31
  draft = !1;
33
32
  isEditing = !1;
34
- metas = n.builder().build();
33
+ metas = m.builder().build();
35
34
  constructor() {
36
35
  super();
37
- const t = u.builder().build();
38
- t.herbals.push(P.builder().build()), this.prescriptions.data.push(t);
36
+ const t = s.builder().build();
37
+ t.herbals.push(g.builder().build()), this.prescriptions.data.push(t);
39
38
  }
40
39
  async of(t) {
41
40
  if (t.tagsState != null && (this.tags = await Promise.all(
42
- t.tagsState.map((i) => new y().of(i))
41
+ t.tagsState.map((i) => new b().of(i))
43
42
  )), t.id != null && (this.id = t.id), t.prescriptionsState != null) {
44
- this.prescriptions = new m();
43
+ this.prescriptions = new r();
45
44
  const i = JSON.parse(t.prescriptionsState), e = await Promise.all(
46
- i.map(async (a) => new g().of(a))
45
+ i.map(async (a) => s.builder().build().of(a))
47
46
  );
48
47
  this.prescriptions.data.push(...e);
49
48
  }
50
- return this.prescriptions.data.length === 0 && this.prescriptions.data.push(u.builder().build()), t.diagnosis != null && (t.diagnosis.indexOf("脉证") !== 0 && t.diagnosis.indexOf(`
49
+ return this.prescriptions.data.length === 0 && this.prescriptions.data.push(s.builder().build()), t.diagnosis != null && (t.diagnosis.indexOf("脉证") !== 0 && t.diagnosis.indexOf(`
51
50
  脉证`) === -1 && (t.diagnosis = t.diagnosis.replaceAll("脉证", `
52
51
  脉证`)), t.diagnosis.indexOf(`
53
52
  方证`) === -1 && (t.diagnosis = t.diagnosis.replaceAll("方证", `
54
- 方证`)), this.diagnosis = c(t.diagnosis)), t.doctorState != null && (this.doctor = await this.doctor.of(t.doctorState)), t.patientState != null && (this.patient = await this.patient.of(t.patientState)), t.createdTimestamp != null && (this.createdTimestamp = t.createdTimestamp), t.updatedTimestamp != null && (this.updatedTimestamp = t.updatedTimestamp), t.prescriptionPaymentStatus != null && (this.prescriptionPaymentStatus = t.prescriptionPaymentStatus), t.outboundStatus != null && (this.outboundStatus = t.outboundStatus), t.paymentType != null && (this.paymentType = t.paymentType), t.outpatientType != null && (this.outpatientType = t.outpatientType), t.metasState != null && this.metas.addMetas(await Promise.all(t.metasState.map((i) => n.map(i)))), this;
53
+ 方证`)), this.diagnosis = c(t.diagnosis)), t.doctorState != null && (this.doctor = await this.doctor.of(t.doctorState)), t.patientState != null && (this.patient = await this.patient.of(t.patientState)), t.createdTimestamp != null && (this.createdTimestamp = t.createdTimestamp), t.updatedTimestamp != null && (this.updatedTimestamp = t.updatedTimestamp), t.prescriptionPaymentStatus != null && (this.prescriptionPaymentStatus = t.prescriptionPaymentStatus), t.outboundStatus != null && (this.outboundStatus = t.outboundStatus), t.paymentType != null && (this.paymentType = t.paymentType), t.outpatientType != null && (this.outpatientType = t.outpatientType), t.metasState != null && this.metas.addMetas(await Promise.all(t.metasState.map((i) => m.map(i)))), this;
55
54
  }
56
55
  state() {
57
56
  console.log(this);
58
57
  const t = {};
59
58
  return t.id = this.id, t.doctorState = this.doctor.state(), t.patientState = this.patient.state(), t.outpatientType = this.outpatientType, t.paymentType = this.paymentType, t.diagnosis = c(this.diagnosis.replace("</div>", `
60
- <div>`)), t.createdTimestamp = this.createdTimestamp, t.diagnosis = this.diagnosis, t.tagsState = this.tags.map((i) => i.state()), t.createdTimestamp = this.createdTimestamp, t.updatedTimestamp = this.updatedTimestamp, t.prescriptionsState = JSON.stringify(this.prescriptions.data.map((i) => i.state())), t.metasState = n.standards().flatMap(
59
+ <div>`)), t.createdTimestamp = this.createdTimestamp, t.diagnosis = this.diagnosis, t.tagsState = this.tags.map((i) => i.state()), t.createdTimestamp = this.createdTimestamp, t.updatedTimestamp = this.updatedTimestamp, t.prescriptionsState = JSON.stringify(this.prescriptions.data.map((i) => i.state())), t.metasState = m.standards().flatMap(
61
60
  (i) => this.metas[i].data.map((e) => e.state())
62
61
  ), t;
63
62
  }
64
- static query(t, i, e, a, s, p, r, d, f, T) {
65
- return o.default().query(
63
+ static query(t, i, e, a, p, d, o, u, T, y) {
64
+ return n.default().query(
66
65
  t,
67
66
  i,
68
67
  e,
69
68
  a,
70
- s,
71
69
  p,
72
- r,
73
70
  d,
74
- f,
75
- T
71
+ o,
72
+ u,
73
+ T,
74
+ y
76
75
  );
77
76
  }
78
- static queryPayment(t, i, e, a, s, p, r, d) {
79
- return o.default().queryPayment(
77
+ static queryPayment(t, i, e, a, p, d, o, u) {
78
+ return n.default().queryPayment(
80
79
  t,
81
80
  i,
82
81
  e,
83
82
  a,
84
- s,
85
83
  p,
86
- r,
87
- d
84
+ d,
85
+ o,
86
+ u
88
87
  );
89
88
  }
90
89
  }
91
- class J extends h {
90
+ class A extends l {
92
91
  static builder() {
93
- return l(this._default);
92
+ return S(this._default);
94
93
  }
95
94
  static default() {
96
95
  return this._default;
97
96
  }
98
97
  id = "";
99
- prescription = "";
100
- doctorId = "";
101
- patientId = "";
102
- patientName = "";
103
- patientPhone = "";
104
- patientGender = "";
98
+ prescriptions = new r();
99
+ doctor = f.builder().build();
100
+ patient = h.builder().build();
105
101
  createdTimestamp = 0;
106
102
  updatedTimestamp = 0;
107
103
  prescriptionPaymentStatus = 0;
108
104
  outboundStatus = 0;
109
105
  async of(t) {
110
- return this.id = t.id, this.prescription = t.prescription ? t.prescription : "", this.doctorId = t.doctorId, this.patientId = t.patientId, this.patientName = t.patientName ? t.patientName : "", this.patientPhone = t.patientPhone ? t.patientPhone : "", this.patientGender = t.patientGender ? t.patientGender : "", this.createdTimestamp = t.createdTimestamp ? t.createdTimestamp : 0, this.updatedTimestamp = t.updatedTimestamp ? t.updatedTimestamp : 0, this.prescriptionPaymentStatus = t.prescriptionPaymentStatus ? t.prescriptionPaymentStatus : 0, this.outboundStatus = t.outboundStatus ? t.outboundStatus : 0, Promise.resolve(this);
106
+ if (this.id = t.id, this.createdTimestamp = t.createdTimestamp ? t.createdTimestamp : 0, this.updatedTimestamp = t.updatedTimestamp ? t.updatedTimestamp : 0, this.prescriptionPaymentStatus = t.prescriptionPaymentStatus ? t.prescriptionPaymentStatus : 0, this.outboundStatus = t.outboundStatus ? t.outboundStatus : 0, t.prescriptionsState != null) {
107
+ this.prescriptions = new r();
108
+ const i = JSON.parse(t.prescriptionsState), e = await Promise.all(
109
+ i.map(async (a) => s.builder().build().of(a))
110
+ );
111
+ this.prescriptions.data.push(...e);
112
+ }
113
+ return Promise.resolve(this);
111
114
  }
112
115
  state() {
113
116
  return {
114
117
  id: this.id,
115
- prescription: this.prescription,
116
- doctorId: this.doctorId,
117
- patientId: this.patientId,
118
- patientName: this.patientName,
119
- patientPhone: this.patientPhone,
120
- patientGender: this.patientGender,
118
+ prescriptionsState: JSON.stringify(this.prescriptions.data.map((t) => t.state())),
119
+ doctorState: this.doctor.state(),
120
+ patientState: this.patient.state(),
121
121
  createdTimestamp: this.createdTimestamp,
122
122
  updatedTimestamp: this.updatedTimestamp,
123
123
  prescriptionPaymentStatus: this.prescriptionPaymentStatus,
@@ -126,6 +126,6 @@ class J extends h {
126
126
  }
127
127
  }
128
128
  export {
129
- o as Check,
130
- J as Payment
129
+ n as Check,
130
+ A as Payment
131
131
  };
@@ -1,51 +1,49 @@
1
1
  import { Method as g } from "../../../../node_modules/alova/dist/alova.esm.js";
2
- import A from "./apiDefinitions.js";
3
- const l = /* @__PURE__ */ Object.create(null), h = (t, r, s) => {
4
- const e = t.join(".");
5
- if (l[e])
6
- return l[e];
7
- const n = new Proxy(function() {
2
+ import _ from "./apiDefinitions.js";
3
+ const l = /* @__PURE__ */ Object.create(null), d = (e, a, p) => {
4
+ const o = e.join(".");
5
+ if (l[o])
6
+ return l[o];
7
+ const s = new Proxy(function() {
8
8
  }, {
9
- get(d, m) {
10
- const i = [...t, m];
11
- return h(i, r, s);
9
+ get(y, u) {
10
+ const f = [...e, u];
11
+ return d(f, a, p);
12
12
  },
13
- apply(d, m, [i]) {
14
- const u = A[e];
15
- if (!u)
16
- throw new Error(`the api path of \`${e}\` is not found`);
17
- const a = {
18
- ...s[e],
19
- ...i
20
- }, [y, P] = u, w = a.pathParams, b = P.replace(/\{([^}]+)\}/g, (f, c) => w[c]);
21
- delete a.pathParams;
22
- let o = a.data;
23
- if (Object.prototype.toString.call(o) === "[object Object]" && typeof FormData < "u") {
24
- let f = !1;
25
- const c = new FormData();
26
- for (const p in o)
27
- c.append(p, o[p]), o[p] instanceof Blob && (f = !0);
28
- o = f ? c : o;
13
+ apply(y, u, [f]) {
14
+ const m = _[o];
15
+ if (!m)
16
+ throw new Error(`the api path of \`${o}\` is not found`);
17
+ const c = {
18
+ ...p[o],
19
+ ...f
20
+ }, [P, b] = m, w = c.pathParams, A = b.replace(/\{([^}]+)\}/g, (i, n) => w[n]);
21
+ delete c.pathParams;
22
+ let t = c.data;
23
+ if (Object.prototype.toString.call(t) === "[object Object]" && typeof FormData < "u") {
24
+ let i = !1;
25
+ const n = new FormData();
26
+ for (const r in t)
27
+ if (Array.isArray(t[r]))
28
+ for (const h of t[r])
29
+ n.append(r, h), h instanceof Blob && (i = !0);
30
+ else
31
+ n.append(r, t[r]), t[r] instanceof Blob && (i = !0);
32
+ t = i ? n : t;
29
33
  }
30
- return new g(
31
- y.toUpperCase(),
32
- r,
33
- b,
34
- a,
35
- o
36
- );
34
+ return new g(P.toUpperCase(), a, A, c, t);
37
35
  }
38
36
  });
39
- return l[e] = n, n;
40
- }, x = (t, r) => new Proxy({}, {
41
- get(e, n) {
42
- return h([n], t, r);
37
+ return l[o] = s, s;
38
+ }, D = (e, a) => new Proxy({}, {
39
+ get(o, s) {
40
+ return d([s], e, a);
43
41
  }
44
- }), D = (t) => {
45
- globalThis.doctorApi = t;
46
- }, C = (t) => t;
42
+ }), B = (e) => {
43
+ globalThis.doctorApi = e;
44
+ }, C = (e) => e;
47
45
  export {
48
- x as createApis,
49
- D as mountApis,
46
+ D as createApis,
47
+ B as mountApis,
50
48
  C as withConfigType
51
49
  };
@@ -1,51 +1,49 @@
1
1
  import { Method as g } from "../../../../node_modules/alova/dist/alova.esm.js";
2
- import A from "./apiDefinitions.js";
3
- const l = /* @__PURE__ */ Object.create(null), m = (t, n, s) => {
4
- const e = t.join(".");
5
- if (l[e])
6
- return l[e];
7
- const r = new Proxy(function() {
2
+ import _ from "./apiDefinitions.js";
3
+ const l = /* @__PURE__ */ Object.create(null), d = (e, a, p) => {
4
+ const o = e.join(".");
5
+ if (l[o])
6
+ return l[o];
7
+ const s = new Proxy(function() {
8
8
  }, {
9
- get(d, u) {
10
- const i = [...t, u];
11
- return m(i, n, s);
9
+ get(y, u) {
10
+ const f = [...e, u];
11
+ return d(f, a, p);
12
12
  },
13
- apply(d, u, [i]) {
14
- const h = A[e];
13
+ apply(y, u, [f]) {
14
+ const h = _[o];
15
15
  if (!h)
16
- throw new Error(`the api path of \`${e}\` is not found`);
17
- const a = {
18
- ...s[e],
19
- ...i
20
- }, [y, P] = h, w = a.pathParams, b = P.replace(/\{([^}]+)\}/g, (f, c) => w[c]);
21
- delete a.pathParams;
22
- let o = a.data;
23
- if (Object.prototype.toString.call(o) === "[object Object]" && typeof FormData < "u") {
24
- let f = !1;
25
- const c = new FormData();
26
- for (const p in o)
27
- c.append(p, o[p]), o[p] instanceof Blob && (f = !0);
28
- o = f ? c : o;
16
+ throw new Error(`the api path of \`${o}\` is not found`);
17
+ const i = {
18
+ ...p[o],
19
+ ...f
20
+ }, [P, b] = h, w = i.pathParams, A = b.replace(/\{([^}]+)\}/g, (c, n) => w[n]);
21
+ delete i.pathParams;
22
+ let t = i.data;
23
+ if (Object.prototype.toString.call(t) === "[object Object]" && typeof FormData < "u") {
24
+ let c = !1;
25
+ const n = new FormData();
26
+ for (const r in t)
27
+ if (Array.isArray(t[r]))
28
+ for (const m of t[r])
29
+ n.append(r, m), m instanceof Blob && (c = !0);
30
+ else
31
+ n.append(r, t[r]), t[r] instanceof Blob && (c = !0);
32
+ t = c ? n : t;
29
33
  }
30
- return new g(
31
- y.toUpperCase(),
32
- n,
33
- b,
34
- a,
35
- o
36
- );
34
+ return new g(P.toUpperCase(), a, A, i, t);
37
35
  }
38
36
  });
39
- return l[e] = r, r;
40
- }, x = (t, n) => new Proxy({}, {
41
- get(e, r) {
42
- return m([r], t, n);
37
+ return l[o] = s, s;
38
+ }, D = (e, a) => new Proxy({}, {
39
+ get(o, s) {
40
+ return d([s], e, a);
43
41
  }
44
- }), D = (t) => {
45
- globalThis.oauthApi = t;
46
- }, C = (t) => t;
42
+ }), B = (e) => {
43
+ globalThis.oauthApi = e;
44
+ }, C = (e) => e;
47
45
  export {
48
- x as createApis,
49
- D as mountApis,
46
+ D as createApis,
47
+ B as mountApis,
50
48
  C as withConfigType
51
49
  };
@@ -1,51 +1,49 @@
1
1
  import { Method as g } from "../../../../node_modules/alova/dist/alova.esm.js";
2
- import A from "./apiDefinitions.js";
3
- const l = /* @__PURE__ */ Object.create(null), h = (t, n, i) => {
4
- const e = t.join(".");
5
- if (l[e])
6
- return l[e];
7
- const r = new Proxy(function() {
2
+ import _ from "./apiDefinitions.js";
3
+ const l = /* @__PURE__ */ Object.create(null), d = (e, a, c) => {
4
+ const o = e.join(".");
5
+ if (l[o])
6
+ return l[o];
7
+ const i = new Proxy(function() {
8
8
  }, {
9
- get(d, u) {
10
- const s = [...t, u];
11
- return h(s, n, i);
9
+ get(y, u) {
10
+ const f = [...e, u];
11
+ return d(f, a, c);
12
12
  },
13
- apply(d, u, [s]) {
14
- const m = A[e];
13
+ apply(y, u, [f]) {
14
+ const m = _[o];
15
15
  if (!m)
16
- throw new Error(`the api path of \`${e}\` is not found`);
17
- const a = {
18
- ...i[e],
19
- ...s
20
- }, [y, P] = m, w = a.pathParams, b = P.replace(/\{([^}]+)\}/g, (f, p) => w[p]);
21
- delete a.pathParams;
22
- let o = a.data;
23
- if (Object.prototype.toString.call(o) === "[object Object]" && typeof FormData < "u") {
24
- let f = !1;
25
- const p = new FormData();
26
- for (const c in o)
27
- p.append(c, o[c]), o[c] instanceof Blob && (f = !0);
28
- o = f ? p : o;
16
+ throw new Error(`the api path of \`${o}\` is not found`);
17
+ const s = {
18
+ ...c[o],
19
+ ...f
20
+ }, [P, b] = m, w = s.pathParams, A = b.replace(/\{([^}]+)\}/g, (p, n) => w[n]);
21
+ delete s.pathParams;
22
+ let t = s.data;
23
+ if (Object.prototype.toString.call(t) === "[object Object]" && typeof FormData < "u") {
24
+ let p = !1;
25
+ const n = new FormData();
26
+ for (const r in t)
27
+ if (Array.isArray(t[r]))
28
+ for (const h of t[r])
29
+ n.append(r, h), h instanceof Blob && (p = !0);
30
+ else
31
+ n.append(r, t[r]), t[r] instanceof Blob && (p = !0);
32
+ t = p ? n : t;
29
33
  }
30
- return new g(
31
- y.toUpperCase(),
32
- n,
33
- b,
34
- a,
35
- o
36
- );
34
+ return new g(P.toUpperCase(), a, A, s, t);
37
35
  }
38
36
  });
39
- return l[e] = r, r;
40
- }, x = (t, n) => new Proxy({}, {
41
- get(e, r) {
42
- return h([r], t, n);
37
+ return l[o] = i, i;
38
+ }, D = (e, a) => new Proxy({}, {
39
+ get(o, i) {
40
+ return d([i], e, a);
43
41
  }
44
- }), D = (t) => {
45
- globalThis.outpatientApi = t;
46
- }, C = (t) => t;
42
+ }), B = (e) => {
43
+ globalThis.outpatientApi = e;
44
+ }, C = (e) => e;
47
45
  export {
48
- x as createApis,
49
- D as mountApis,
46
+ D as createApis,
47
+ B as mountApis,
50
48
  C as withConfigType
51
49
  };
@@ -1,51 +1,49 @@
1
1
  import { Method as g } from "../../../../node_modules/alova/dist/alova.esm.js";
2
- import A from "./apiDefinitions.js";
3
- const l = /* @__PURE__ */ Object.create(null), h = (t, n, i) => {
4
- const e = t.join(".");
5
- if (l[e])
6
- return l[e];
7
- const r = new Proxy(function() {
2
+ import _ from "./apiDefinitions.js";
3
+ const l = /* @__PURE__ */ Object.create(null), d = (e, a, c) => {
4
+ const o = e.join(".");
5
+ if (l[o])
6
+ return l[o];
7
+ const i = new Proxy(function() {
8
8
  }, {
9
- get(d, m) {
10
- const s = [...t, m];
11
- return h(s, n, i);
9
+ get(y, u) {
10
+ const f = [...e, u];
11
+ return d(f, a, c);
12
12
  },
13
- apply(d, m, [s]) {
14
- const u = A[e];
15
- if (!u)
16
- throw new Error(`the api path of \`${e}\` is not found`);
17
- const a = {
18
- ...i[e],
19
- ...s
20
- }, [y, P] = u, w = a.pathParams, b = P.replace(/\{([^}]+)\}/g, (f, p) => w[p]);
21
- delete a.pathParams;
22
- let o = a.data;
23
- if (Object.prototype.toString.call(o) === "[object Object]" && typeof FormData < "u") {
24
- let f = !1;
25
- const p = new FormData();
26
- for (const c in o)
27
- p.append(c, o[c]), o[c] instanceof Blob && (f = !0);
28
- o = f ? p : o;
13
+ apply(y, u, [f]) {
14
+ const m = _[o];
15
+ if (!m)
16
+ throw new Error(`the api path of \`${o}\` is not found`);
17
+ const s = {
18
+ ...c[o],
19
+ ...f
20
+ }, [P, b] = m, w = s.pathParams, A = b.replace(/\{([^}]+)\}/g, (p, n) => w[n]);
21
+ delete s.pathParams;
22
+ let t = s.data;
23
+ if (Object.prototype.toString.call(t) === "[object Object]" && typeof FormData < "u") {
24
+ let p = !1;
25
+ const n = new FormData();
26
+ for (const r in t)
27
+ if (Array.isArray(t[r]))
28
+ for (const h of t[r])
29
+ n.append(r, h), h instanceof Blob && (p = !0);
30
+ else
31
+ n.append(r, t[r]), t[r] instanceof Blob && (p = !0);
32
+ t = p ? n : t;
29
33
  }
30
- return new g(
31
- y.toUpperCase(),
32
- n,
33
- b,
34
- a,
35
- o
36
- );
34
+ return new g(P.toUpperCase(), a, A, s, t);
37
35
  }
38
36
  });
39
- return l[e] = r, r;
40
- }, x = (t, n) => new Proxy({}, {
41
- get(e, r) {
42
- return h([r], t, n);
37
+ return l[o] = i, i;
38
+ }, D = (e, a) => new Proxy({}, {
39
+ get(o, i) {
40
+ return d([i], e, a);
43
41
  }
44
- }), D = (t) => {
45
- globalThis.patientApi = t;
46
- }, C = (t) => t;
42
+ }), B = (e) => {
43
+ globalThis.patientApi = e;
44
+ }, C = (e) => e;
47
45
  export {
48
- x as createApis,
49
- D as mountApis,
46
+ D as createApis,
47
+ B as mountApis,
50
48
  C as withConfigType
51
49
  };
@@ -1,51 +1,49 @@
1
1
  import { Method as g } from "../../../../node_modules/alova/dist/alova.esm.js";
2
- import A from "./apiDefinitions.js";
3
- const l = /* @__PURE__ */ Object.create(null), h = (t, r, i) => {
4
- const e = t.join(".");
5
- if (l[e])
6
- return l[e];
7
- const n = new Proxy(function() {
2
+ import _ from "./apiDefinitions.js";
3
+ const l = /* @__PURE__ */ Object.create(null), d = (e, a, c) => {
4
+ const o = e.join(".");
5
+ if (l[o])
6
+ return l[o];
7
+ const i = new Proxy(function() {
8
8
  }, {
9
- get(d, m) {
10
- const s = [...t, m];
11
- return h(s, r, i);
9
+ get(y, u) {
10
+ const f = [...e, u];
11
+ return d(f, a, c);
12
12
  },
13
- apply(d, m, [s]) {
14
- const u = A[e];
15
- if (!u)
16
- throw new Error(`the api path of \`${e}\` is not found`);
17
- const a = {
18
- ...i[e],
19
- ...s
20
- }, [y, P] = u, w = a.pathParams, b = P.replace(/\{([^}]+)\}/g, (f, p) => w[p]);
21
- delete a.pathParams;
22
- let o = a.data;
23
- if (Object.prototype.toString.call(o) === "[object Object]" && typeof FormData < "u") {
24
- let f = !1;
25
- const p = new FormData();
26
- for (const c in o)
27
- p.append(c, o[c]), o[c] instanceof Blob && (f = !0);
28
- o = f ? p : o;
13
+ apply(y, u, [f]) {
14
+ const m = _[o];
15
+ if (!m)
16
+ throw new Error(`the api path of \`${o}\` is not found`);
17
+ const s = {
18
+ ...c[o],
19
+ ...f
20
+ }, [P, b] = m, w = s.pathParams, A = b.replace(/\{([^}]+)\}/g, (p, n) => w[n]);
21
+ delete s.pathParams;
22
+ let t = s.data;
23
+ if (Object.prototype.toString.call(t) === "[object Object]" && typeof FormData < "u") {
24
+ let p = !1;
25
+ const n = new FormData();
26
+ for (const r in t)
27
+ if (Array.isArray(t[r]))
28
+ for (const h of t[r])
29
+ n.append(r, h), h instanceof Blob && (p = !0);
30
+ else
31
+ n.append(r, t[r]), t[r] instanceof Blob && (p = !0);
32
+ t = p ? n : t;
29
33
  }
30
- return new g(
31
- y.toUpperCase(),
32
- r,
33
- b,
34
- a,
35
- o
36
- );
34
+ return new g(P.toUpperCase(), a, A, s, t);
37
35
  }
38
36
  });
39
- return l[e] = n, n;
40
- }, x = (t, r) => new Proxy({}, {
41
- get(e, n) {
42
- return h([n], t, r);
37
+ return l[o] = i, i;
38
+ }, D = (e, a) => new Proxy({}, {
39
+ get(o, i) {
40
+ return d([i], e, a);
43
41
  }
44
- }), D = (t) => {
45
- globalThis.prescriptionApi = t;
46
- }, C = (t) => t;
42
+ }), B = (e) => {
43
+ globalThis.prescriptionApi = e;
44
+ }, C = (e) => e;
47
45
  export {
48
- x as createApis,
49
- D as mountApis,
46
+ D as createApis,
47
+ B as mountApis,
50
48
  C as withConfigType
51
49
  };
@@ -1,51 +1,49 @@
1
1
  import { Method as g } from "../../../../node_modules/alova/dist/alova.esm.js";
2
- import A from "./apiDefinitions.js";
3
- const l = /* @__PURE__ */ Object.create(null), h = (t, n, i) => {
4
- const e = t.join(".");
5
- if (l[e])
6
- return l[e];
7
- const r = new Proxy(function() {
2
+ import _ from "./apiDefinitions.js";
3
+ const l = /* @__PURE__ */ Object.create(null), d = (e, a, p) => {
4
+ const o = e.join(".");
5
+ if (l[o])
6
+ return l[o];
7
+ const s = new Proxy(function() {
8
8
  }, {
9
- get(d, m) {
10
- const p = [...t, m];
11
- return h(p, n, i);
9
+ get(y, u) {
10
+ const f = [...e, u];
11
+ return d(f, a, p);
12
12
  },
13
- apply(d, m, [p]) {
14
- const u = A[e];
15
- if (!u)
16
- throw new Error(`the api path of \`${e}\` is not found`);
17
- const a = {
18
- ...i[e],
19
- ...p
20
- }, [y, P] = u, w = a.pathParams, b = P.replace(/\{([^}]+)\}/g, (f, s) => w[s]);
21
- delete a.pathParams;
22
- let o = a.data;
23
- if (Object.prototype.toString.call(o) === "[object Object]" && typeof FormData < "u") {
24
- let f = !1;
25
- const s = new FormData();
26
- for (const c in o)
27
- s.append(c, o[c]), o[c] instanceof Blob && (f = !0);
28
- o = f ? s : o;
13
+ apply(y, u, [f]) {
14
+ const m = _[o];
15
+ if (!m)
16
+ throw new Error(`the api path of \`${o}\` is not found`);
17
+ const i = {
18
+ ...p[o],
19
+ ...f
20
+ }, [P, b] = m, w = i.pathParams, A = b.replace(/\{([^}]+)\}/g, (c, n) => w[n]);
21
+ delete i.pathParams;
22
+ let t = i.data;
23
+ if (Object.prototype.toString.call(t) === "[object Object]" && typeof FormData < "u") {
24
+ let c = !1;
25
+ const n = new FormData();
26
+ for (const r in t)
27
+ if (Array.isArray(t[r]))
28
+ for (const h of t[r])
29
+ n.append(r, h), h instanceof Blob && (c = !0);
30
+ else
31
+ n.append(r, t[r]), t[r] instanceof Blob && (c = !0);
32
+ t = c ? n : t;
29
33
  }
30
- return new g(
31
- y.toUpperCase(),
32
- n,
33
- b,
34
- a,
35
- o
36
- );
34
+ return new g(P.toUpperCase(), a, A, i, t);
37
35
  }
38
36
  });
39
- return l[e] = r, r;
40
- }, x = (t, n) => new Proxy({}, {
41
- get(e, r) {
42
- return h([r], t, n);
37
+ return l[o] = s, s;
38
+ }, D = (e, a) => new Proxy({}, {
39
+ get(o, s) {
40
+ return d([s], e, a);
43
41
  }
44
- }), D = (t) => {
45
- globalThis.scientistApi = t;
46
- }, C = (t) => t;
42
+ }), B = (e) => {
43
+ globalThis.scientistApi = e;
44
+ }, C = (e) => e;
47
45
  export {
48
- x as createApis,
49
- D as mountApis,
46
+ D as createApis,
47
+ B as mountApis,
50
48
  C as withConfigType
51
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-core-tcm",
3
- "version": "0.0.45",
3
+ "version": "0.0.49",
4
4
  "description": "Core",
5
5
  "productName": "Core",
6
6
  "author": "wywywywywywywywywy <qa123456_0714@qq.com>",
@@ -20,7 +20,6 @@
20
20
  "@alova/scene-vue": "^1.6.2",
21
21
  "@bufbuild/protobuf": "^2.9.0",
22
22
  "@bufbuild/protoc-gen-es": "^2.9.0",
23
- "@electron/remote": "^2.1.3",
24
23
  "@quasar/extras": "^1.16.4",
25
24
  "@vueuse/core": "^11.0.3",
26
25
  "alova": "^3.3.4",
@@ -28,8 +27,6 @@
28
27
  "compressorjs": "^1.2.1",
29
28
  "dotenv-cli": "^7.4.2",
30
29
  "echarts": "^5.5.0",
31
- "electron": "latest",
32
- "electron-store": "^11.0.2",
33
30
  "ftdi-d2xx": "^1.3.1",
34
31
  "jwt-decode": "^4.0.0",
35
32
  "papaparse": "^5.5.3",
@@ -64,6 +61,7 @@
64
61
  "npm": ">= 6.13.4",
65
62
  "yarn": ">= 1.21.1"
66
63
  },
64
+ "type": "module",
67
65
  "main": "dist/index.ts",
68
66
  "types": "dist/index.ts",
69
67
  "module": "dist/index.ts",
@@ -1,8 +0,0 @@
1
- declare namespace NodeJS {
2
- interface ProcessEnv {
3
- QUASAR_PUBLIC_FOLDER: string;
4
- QUASAR_ELECTRON_PRELOAD_FOLDER: string;
5
- QUASAR_ELECTRON_PRELOAD_EXTENSION: string;
6
- APP_URL: string;
7
- }
8
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};