@acorex/modules 19.1.10 → 19.1.12
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/fesm2022/{acorex-modules-form-template-management-category.entity-m0HWwBzu.mjs → acorex-modules-form-template-management-category.entity-D8XA8ZaF.mjs} +5 -5
- package/fesm2022/acorex-modules-form-template-management-category.entity-D8XA8ZaF.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template.entity-EoPISAfV.mjs → acorex-modules-form-template-management-template.entity-CGj7d49H.mjs} +4 -4
- package/fesm2022/acorex-modules-form-template-management-template.entity-CGj7d49H.mjs.map +1 -0
- package/fesm2022/acorex-modules-form-template-management.mjs +3 -3
- package/fesm2022/acorex-modules-form-template-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +65 -63
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-organization-managment-chart-design.page-eE-nOaMw.mjs +305 -0
- package/fesm2022/acorex-modules-organization-managment-chart-design.page-eE-nOaMw.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-managment-chart.entity-C_1rAJrs.mjs +257 -0
- package/fesm2022/acorex-modules-organization-managment-chart.entity-C_1rAJrs.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-managment-company.entity-5qijWD6i.mjs +199 -0
- package/fesm2022/acorex-modules-organization-managment-company.entity-5qijWD6i.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-managment-department.entity-BW18skLD.mjs +199 -0
- package/fesm2022/acorex-modules-organization-managment-department.entity-BW18skLD.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-managment-employment.entity-D28NBRYg.mjs +199 -0
- package/fesm2022/acorex-modules-organization-managment-employment.entity-D28NBRYg.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-managment-position.entity-DhndysSH.mjs +199 -0
- package/fesm2022/acorex-modules-organization-managment-position.entity-DhndysSH.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-managment.mjs +482 -0
- package/fesm2022/acorex-modules-organization-managment.mjs.map +1 -0
- package/fesm2022/acorex-modules-platform-management.mjs +396 -35
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-scheduler-job-management.mjs +36 -24
- package/fesm2022/acorex-modules-scheduler-job-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-security-management.mjs +269 -108
- package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-text-template-management.mjs +2 -7
- package/fesm2022/acorex-modules-text-template-management.mjs.map +1 -1
- package/organization-managment/README.md +3 -0
- package/organization-managment/index.d.ts +8 -0
- package/organization-managment/lib/const.d.ts +38 -0
- package/organization-managment/lib/entities/chart/chart.entity.d.ts +3 -0
- package/organization-managment/lib/entities/chart/chart.module.d.ts +6 -0
- package/organization-managment/lib/entities/chart/chart.service.d.ts +10 -0
- package/organization-managment/lib/entities/chart/chart.types.d.ts +6 -0
- package/organization-managment/lib/entities/company/company.entity.d.ts +3 -0
- package/organization-managment/lib/entities/company/company.module.d.ts +6 -0
- package/organization-managment/lib/entities/company/company.service.d.ts +10 -0
- package/organization-managment/lib/entities/company/company.types.d.ts +4 -0
- package/organization-managment/lib/entities/department/department.entity.d.ts +3 -0
- package/organization-managment/lib/entities/department/department.module.d.ts +6 -0
- package/organization-managment/lib/entities/department/department.service.d.ts +10 -0
- package/organization-managment/lib/entities/department/department.types.d.ts +4 -0
- package/organization-managment/lib/entities/employment/employment.entity.d.ts +3 -0
- package/organization-managment/lib/entities/employment/employment.module.d.ts +6 -0
- package/organization-managment/lib/entities/employment/employment.service.d.ts +10 -0
- package/organization-managment/lib/entities/employment/employment.types.d.ts +4 -0
- package/organization-managment/lib/entities/index.d.ts +5 -0
- package/organization-managment/lib/entities/position/position.entity.d.ts +3 -0
- package/organization-managment/lib/entities/position/position.module.d.ts +6 -0
- package/organization-managment/lib/entities/position/position.service.d.ts +10 -0
- package/organization-managment/lib/entities/position/position.types.d.ts +4 -0
- package/organization-managment/lib/entity.provider.d.ts +10 -0
- package/organization-managment/lib/menu.provider.d.ts +5 -0
- package/organization-managment/lib/organization-managment.module.d.ts +13 -0
- package/organization-managment/lib/pages/chart-design/add-item/add-item.component.d.ts +14 -0
- package/organization-managment/lib/pages/chart-design/chart-design.page.d.ts +26 -0
- package/organization-managment/lib/pages/chart-design/chart-design.service.d.ts +23 -0
- package/organization-managment/lib/pages/chart-design/chart.type.d.ts +9 -0
- package/organization-managment/lib/setting.provider.d.ts +4 -0
- package/organization-managment/lib/workflows/chart.workflow.d.ts +12 -0
- package/package.json +12 -8
- package/platform-management/index.d.ts +0 -1
- package/platform-management/lib/const.d.ts +27 -7
- package/platform-management/lib/entities/app-version/app-version.entity.d.ts +3 -0
- package/platform-management/lib/entities/app-version/app-version.service.d.ts +10 -0
- package/platform-management/lib/entities/app-version/app-version.types.d.ts +6 -0
- package/platform-management/lib/entities/app-version/index.d.ts +3 -0
- package/platform-management/lib/{global-variables → entities/global-variable}/index.d.ts +1 -2
- package/platform-management/lib/entities/index.d.ts +2 -0
- package/platform-management/lib/entity.provider.d.ts +10 -0
- package/scheduler-job-management/lib/const.d.ts +17 -6
- package/security-management/index.d.ts +1 -0
- package/security-management/lib/entities/index.d.ts +3 -0
- package/fesm2022/acorex-modules-form-template-management-category.entity-m0HWwBzu.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template.entity-EoPISAfV.mjs.map +0 -1
- package/platform-management/lib/global-variables/entity.loader.d.ts +0 -9
- /package/platform-management/lib/{global-variables/entities → entities/global-variable}/global-variable.entity.d.ts +0 -0
- /package/platform-management/lib/{global-variables → entities/global-variable}/global-variables.service.d.ts +0 -0
- /package/platform-management/lib/{global-variables → entities/global-variable}/global-variables.types.d.ts +0 -0
@@ -0,0 +1,199 @@
|
|
1
|
+
import { AXPEntityQueryType, AXPEntityCommandScope } from '@acorex/platform/common';
|
2
|
+
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
3
|
+
import { AXMOrganizationManagementCompanyEntityService, RootConfig } from './acorex-modules-organization-managment.mjs';
|
4
|
+
|
5
|
+
async function factory(injector) {
|
6
|
+
const dataService = injector.get(AXMOrganizationManagementCompanyEntityService);
|
7
|
+
const i18n = RootConfig.config.i18n;
|
8
|
+
const entityDef = {
|
9
|
+
module: RootConfig.module.name,
|
10
|
+
name: RootConfig.entities.company.name,
|
11
|
+
source: '',
|
12
|
+
title: `t("company", { scope: "${i18n}" })`,
|
13
|
+
formats: {
|
14
|
+
individual: `t("company", { scope: "${i18n}" })`,
|
15
|
+
plural: `t("companies", { scope: "${i18n}" })`,
|
16
|
+
searchResult: {
|
17
|
+
title: '{{ title }}',
|
18
|
+
description: RootConfig.module.title,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
relatedEntities: [],
|
22
|
+
groups: [
|
23
|
+
{
|
24
|
+
id: 'section',
|
25
|
+
title: `t("company", { scope: "${i18n}" })`,
|
26
|
+
},
|
27
|
+
],
|
28
|
+
properties: [
|
29
|
+
{
|
30
|
+
name: 'title',
|
31
|
+
title: `t("title", { scope: "${i18n}" })`,
|
32
|
+
groupId: 'section',
|
33
|
+
schema: {
|
34
|
+
dataType: 'string',
|
35
|
+
interface: {
|
36
|
+
type: AXPWidgetsCatalog.text,
|
37
|
+
options: {
|
38
|
+
width: '400px',
|
39
|
+
},
|
40
|
+
},
|
41
|
+
},
|
42
|
+
validations: [
|
43
|
+
{
|
44
|
+
rule: 'required',
|
45
|
+
},
|
46
|
+
],
|
47
|
+
},
|
48
|
+
],
|
49
|
+
columns: [{ name: 'title' }],
|
50
|
+
commands: {
|
51
|
+
create: {
|
52
|
+
execute: async (data) => {
|
53
|
+
const res = await dataService.insertOne(data);
|
54
|
+
return { id: res };
|
55
|
+
},
|
56
|
+
},
|
57
|
+
delete: {
|
58
|
+
execute: async (id) => {
|
59
|
+
return await dataService.deleteOne(id);
|
60
|
+
},
|
61
|
+
},
|
62
|
+
update: {
|
63
|
+
execute: async (data) => {
|
64
|
+
return await dataService.updateOne(data.id, data);
|
65
|
+
},
|
66
|
+
},
|
67
|
+
},
|
68
|
+
queries: {
|
69
|
+
byKey: {
|
70
|
+
execute: async (id) => {
|
71
|
+
return await dataService.getOne(id);
|
72
|
+
},
|
73
|
+
type: AXPEntityQueryType.Single,
|
74
|
+
},
|
75
|
+
list: {
|
76
|
+
execute: async (e) => {
|
77
|
+
return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });
|
78
|
+
},
|
79
|
+
type: AXPEntityQueryType.List,
|
80
|
+
},
|
81
|
+
},
|
82
|
+
interfaces: {
|
83
|
+
master: {
|
84
|
+
create: {
|
85
|
+
sections: [
|
86
|
+
{
|
87
|
+
id: 'section',
|
88
|
+
},
|
89
|
+
],
|
90
|
+
properties: [
|
91
|
+
{
|
92
|
+
name: 'title',
|
93
|
+
layout: {
|
94
|
+
positions: {
|
95
|
+
lg: {
|
96
|
+
colSpan: 12,
|
97
|
+
},
|
98
|
+
},
|
99
|
+
},
|
100
|
+
},
|
101
|
+
],
|
102
|
+
},
|
103
|
+
update: {
|
104
|
+
sections: [
|
105
|
+
{
|
106
|
+
id: 'section',
|
107
|
+
},
|
108
|
+
],
|
109
|
+
properties: [
|
110
|
+
{
|
111
|
+
name: 'title',
|
112
|
+
layout: {
|
113
|
+
positions: {
|
114
|
+
lg: {
|
115
|
+
colSpan: 12,
|
116
|
+
},
|
117
|
+
},
|
118
|
+
},
|
119
|
+
},
|
120
|
+
],
|
121
|
+
},
|
122
|
+
single: {
|
123
|
+
title: '{{title}}',
|
124
|
+
sections: [
|
125
|
+
{
|
126
|
+
id: 'section',
|
127
|
+
layout: {
|
128
|
+
positions: {
|
129
|
+
lg: {
|
130
|
+
colSpan: 12,
|
131
|
+
},
|
132
|
+
},
|
133
|
+
},
|
134
|
+
},
|
135
|
+
],
|
136
|
+
properties: [
|
137
|
+
{
|
138
|
+
name: 'title',
|
139
|
+
layout: {
|
140
|
+
positions: {
|
141
|
+
lg: {
|
142
|
+
colSpan: 6,
|
143
|
+
},
|
144
|
+
},
|
145
|
+
},
|
146
|
+
},
|
147
|
+
],
|
148
|
+
actions: [],
|
149
|
+
},
|
150
|
+
list: {
|
151
|
+
actions: [
|
152
|
+
{
|
153
|
+
title: `t("create", { scope: "common" })`,
|
154
|
+
command: 'create-entity',
|
155
|
+
priority: 'primary',
|
156
|
+
type: 'create',
|
157
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
158
|
+
},
|
159
|
+
{
|
160
|
+
title: 't("deleteItems", { scope: "common" })',
|
161
|
+
command: 'delete-entity',
|
162
|
+
priority: 'primary',
|
163
|
+
type: 'delete',
|
164
|
+
scope: AXPEntityCommandScope.Selected,
|
165
|
+
},
|
166
|
+
{
|
167
|
+
title: 't("detail", { scope: "common" })',
|
168
|
+
command: 'open-entity',
|
169
|
+
priority: 'secondary',
|
170
|
+
type: 'view',
|
171
|
+
scope: AXPEntityCommandScope.Individual,
|
172
|
+
},
|
173
|
+
{
|
174
|
+
title: 't("delete", { scope: "common" })',
|
175
|
+
command: 'delete-entity',
|
176
|
+
priority: 'secondary',
|
177
|
+
type: 'delete',
|
178
|
+
scope: AXPEntityCommandScope.Individual,
|
179
|
+
},
|
180
|
+
],
|
181
|
+
views: [
|
182
|
+
{
|
183
|
+
name: 'all',
|
184
|
+
title: 't("allItem", { scope: "common" })',
|
185
|
+
fixed: true,
|
186
|
+
columns: [],
|
187
|
+
conditions: [],
|
188
|
+
sorts: [],
|
189
|
+
},
|
190
|
+
],
|
191
|
+
},
|
192
|
+
},
|
193
|
+
},
|
194
|
+
};
|
195
|
+
return entityDef;
|
196
|
+
}
|
197
|
+
|
198
|
+
export { factory };
|
199
|
+
//# sourceMappingURL=acorex-modules-organization-managment-company.entity-5qijWD6i.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-managment-company.entity-5qijWD6i.mjs","sources":["../../../../libs/modules/organization-managment/src/lib/entities/company/company.entity.ts"],"sourcesContent":["import { AXPEntity, AXPEntityCommandScope, AXPEntityQueryType } from '@acorex/platform/common';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';\nimport { Injector } from '@angular/core';\nimport { RootConfig } from '../../const';\nimport { AXMOrganizationManagementCompanyEntityService } from './company.service';\n\nexport async function factory(injector: Injector): Promise<AXPEntity | null> {\n const dataService = injector.get(AXMOrganizationManagementCompanyEntityService);\n const i18n = RootConfig.config.i18n;\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.company.name,\n source: '',\n title: `t(\"company\", { scope: \"${i18n}\" })`,\n formats: {\n individual: `t(\"company\", { scope: \"${i18n}\" })`,\n plural: `t(\"companies\", { scope: \"${i18n}\" })`,\n searchResult: {\n title: '{{ title }}',\n description: RootConfig.module.title,\n },\n },\n relatedEntities: [],\n groups: [\n {\n id: 'section',\n title: `t(\"company\", { scope: \"${i18n}\" })`,\n },\n ],\n properties: [\n {\n name: 'title',\n title: `t(\"title\", { scope: \"${i18n}\" })`,\n groupId: 'section',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.text,\n options: {\n width: '400px',\n },\n },\n },\n validations: [\n {\n rule: 'required',\n },\n ],\n },\n ],\n columns: [{ name: 'title' }],\n commands: {\n create: {\n execute: async (data: any) => {\n const res = await dataService.insertOne(data);\n return { id: res };\n },\n },\n delete: {\n execute: async (id: any) => {\n return await dataService.deleteOne(id);\n },\n },\n update: {\n execute: async (data: any) => {\n return await dataService.updateOne(data.id, data);\n },\n },\n },\n queries: {\n byKey: {\n execute: async (id: string) => {\n return await dataService.getOne(id);\n },\n type: AXPEntityQueryType.Single,\n },\n list: {\n execute: async (e: any) => {\n return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });\n },\n type: AXPEntityQueryType.List,\n },\n },\n interfaces: {\n master: {\n create: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n update: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n single: {\n title: '{{title}}',\n sections: [\n {\n id: 'section',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 6,\n },\n },\n },\n },\n ],\n actions: [],\n },\n list: {\n actions: [\n {\n title: `t(\"create\", { scope: \"common\" })`,\n command: 'create-entity',\n priority: 'primary',\n type: 'create',\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n title: 't(\"deleteItems\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'primary',\n type: 'delete',\n scope: AXPEntityCommandScope.Selected,\n },\n {\n title: 't(\"detail\", { scope: \"common\" })',\n command: 'open-entity',\n priority: 'secondary',\n type: 'view',\n scope: AXPEntityCommandScope.Individual,\n },\n {\n title: 't(\"delete\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'secondary',\n type: 'delete',\n scope: AXPEntityCommandScope.Individual,\n },\n ],\n views: [\n {\n name: 'all',\n title: 't(\"allItem\", { scope: \"common\" })',\n fixed: true,\n columns: [],\n conditions: [],\n sorts: [],\n },\n ],\n },\n },\n },\n };\n\n return entityDef;\n}\n"],"names":[],"mappings":";;;;AAMO,eAAe,OAAO,CAAC,QAAkB,EAAA;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,6CAA6C,CAAC;AAC/E,IAAA,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAEnC,IAAA,MAAM,SAAS,GAAc;AAC3B,QAAA,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC9B,QAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI;AACtC,QAAA,MAAM,EAAE,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AQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,SAAS;AACvC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,uCAAuC;AAC9C,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,QAAQ,EAAE,SAAS;AACnB,4BAAA,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,QAAQ;AACtC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,kCAAkC;AACzC,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,QAAQ,EAAE,WAAW;AACrB,4BAAA,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,qBAAqB,CAAC,UAAU;AACxC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,kCAAkC;AACzC,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,QAAQ,EAAE,WAAW;AACrB,4BAAA,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,UAAU;AACxC,yBAAA;AACF,qBAAA;AACD,oBAAA,KAAK,EAAE;AACL,wBAAA;AACE,4BAAA,IAAI,EAAE,KAAK;AACX,4BAAA,KAAK,EAAE,mCAAmC;AAC1C,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,OAAO,EAAE,EAAE;AACX,4BAAA,UAAU,EAAE,EAAE;AACd,4BAAA,KAAK,EAAE,EAAE;AACV,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;;;;"}
|
@@ -0,0 +1,199 @@
|
|
1
|
+
import { AXPEntityQueryType, AXPEntityCommandScope } from '@acorex/platform/common';
|
2
|
+
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
3
|
+
import { AXMOrganizationManagementDepartmentEntityService, RootConfig } from './acorex-modules-organization-managment.mjs';
|
4
|
+
|
5
|
+
async function factory(injector) {
|
6
|
+
const dataService = injector.get(AXMOrganizationManagementDepartmentEntityService);
|
7
|
+
const i18n = RootConfig.config.i18n;
|
8
|
+
const entityDef = {
|
9
|
+
module: RootConfig.module.name,
|
10
|
+
name: RootConfig.entities.department.name,
|
11
|
+
source: '',
|
12
|
+
title: `t("department", { scope: "${i18n}" })`,
|
13
|
+
formats: {
|
14
|
+
individual: `t("department", { scope: "${i18n}" })`,
|
15
|
+
plural: `t("departments", { scope: "${i18n}" })`,
|
16
|
+
searchResult: {
|
17
|
+
title: '{{ title }}',
|
18
|
+
description: RootConfig.module.title,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
relatedEntities: [],
|
22
|
+
groups: [
|
23
|
+
{
|
24
|
+
id: 'section',
|
25
|
+
title: `t("department", { scope: "${i18n}" })`,
|
26
|
+
},
|
27
|
+
],
|
28
|
+
properties: [
|
29
|
+
{
|
30
|
+
name: 'title',
|
31
|
+
title: `t("title", { scope: "${i18n}" })`,
|
32
|
+
groupId: 'section',
|
33
|
+
schema: {
|
34
|
+
dataType: 'string',
|
35
|
+
interface: {
|
36
|
+
type: AXPWidgetsCatalog.text,
|
37
|
+
options: {
|
38
|
+
width: '400px',
|
39
|
+
},
|
40
|
+
},
|
41
|
+
},
|
42
|
+
validations: [
|
43
|
+
{
|
44
|
+
rule: 'required',
|
45
|
+
},
|
46
|
+
],
|
47
|
+
},
|
48
|
+
],
|
49
|
+
columns: [{ name: 'title' }],
|
50
|
+
commands: {
|
51
|
+
create: {
|
52
|
+
execute: async (data) => {
|
53
|
+
const res = await dataService.insertOne(data);
|
54
|
+
return { id: res };
|
55
|
+
},
|
56
|
+
},
|
57
|
+
delete: {
|
58
|
+
execute: async (id) => {
|
59
|
+
return await dataService.deleteOne(id);
|
60
|
+
},
|
61
|
+
},
|
62
|
+
update: {
|
63
|
+
execute: async (data) => {
|
64
|
+
return await dataService.updateOne(data.id, data);
|
65
|
+
},
|
66
|
+
},
|
67
|
+
},
|
68
|
+
queries: {
|
69
|
+
byKey: {
|
70
|
+
execute: async (id) => {
|
71
|
+
return await dataService.getOne(id);
|
72
|
+
},
|
73
|
+
type: AXPEntityQueryType.Single,
|
74
|
+
},
|
75
|
+
list: {
|
76
|
+
execute: async (e) => {
|
77
|
+
return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });
|
78
|
+
},
|
79
|
+
type: AXPEntityQueryType.List,
|
80
|
+
},
|
81
|
+
},
|
82
|
+
interfaces: {
|
83
|
+
master: {
|
84
|
+
create: {
|
85
|
+
sections: [
|
86
|
+
{
|
87
|
+
id: 'section',
|
88
|
+
},
|
89
|
+
],
|
90
|
+
properties: [
|
91
|
+
{
|
92
|
+
name: 'title',
|
93
|
+
layout: {
|
94
|
+
positions: {
|
95
|
+
lg: {
|
96
|
+
colSpan: 12,
|
97
|
+
},
|
98
|
+
},
|
99
|
+
},
|
100
|
+
},
|
101
|
+
],
|
102
|
+
},
|
103
|
+
update: {
|
104
|
+
sections: [
|
105
|
+
{
|
106
|
+
id: 'section',
|
107
|
+
},
|
108
|
+
],
|
109
|
+
properties: [
|
110
|
+
{
|
111
|
+
name: 'title',
|
112
|
+
layout: {
|
113
|
+
positions: {
|
114
|
+
lg: {
|
115
|
+
colSpan: 12,
|
116
|
+
},
|
117
|
+
},
|
118
|
+
},
|
119
|
+
},
|
120
|
+
],
|
121
|
+
},
|
122
|
+
single: {
|
123
|
+
title: '{{title}}',
|
124
|
+
sections: [
|
125
|
+
{
|
126
|
+
id: 'section',
|
127
|
+
layout: {
|
128
|
+
positions: {
|
129
|
+
lg: {
|
130
|
+
colSpan: 12,
|
131
|
+
},
|
132
|
+
},
|
133
|
+
},
|
134
|
+
},
|
135
|
+
],
|
136
|
+
properties: [
|
137
|
+
{
|
138
|
+
name: 'title',
|
139
|
+
layout: {
|
140
|
+
positions: {
|
141
|
+
lg: {
|
142
|
+
colSpan: 6,
|
143
|
+
},
|
144
|
+
},
|
145
|
+
},
|
146
|
+
},
|
147
|
+
],
|
148
|
+
actions: [],
|
149
|
+
},
|
150
|
+
list: {
|
151
|
+
actions: [
|
152
|
+
{
|
153
|
+
title: `t("create", { scope: "common" })`,
|
154
|
+
command: 'create-entity',
|
155
|
+
priority: 'primary',
|
156
|
+
type: 'create',
|
157
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
158
|
+
},
|
159
|
+
{
|
160
|
+
title: 't("deleteItems", { scope: "common" })',
|
161
|
+
command: 'delete-entity',
|
162
|
+
priority: 'primary',
|
163
|
+
type: 'delete',
|
164
|
+
scope: AXPEntityCommandScope.Selected,
|
165
|
+
},
|
166
|
+
{
|
167
|
+
title: 't("detail", { scope: "common" })',
|
168
|
+
command: 'open-entity',
|
169
|
+
priority: 'secondary',
|
170
|
+
type: 'view',
|
171
|
+
scope: AXPEntityCommandScope.Individual,
|
172
|
+
},
|
173
|
+
{
|
174
|
+
title: 't("delete", { scope: "common" })',
|
175
|
+
command: 'delete-entity',
|
176
|
+
priority: 'secondary',
|
177
|
+
type: 'delete',
|
178
|
+
scope: AXPEntityCommandScope.Individual,
|
179
|
+
},
|
180
|
+
],
|
181
|
+
views: [
|
182
|
+
{
|
183
|
+
name: 'all',
|
184
|
+
title: 't("allItem", { scope: "common" })',
|
185
|
+
fixed: true,
|
186
|
+
columns: [],
|
187
|
+
conditions: [],
|
188
|
+
sorts: [],
|
189
|
+
},
|
190
|
+
],
|
191
|
+
},
|
192
|
+
},
|
193
|
+
},
|
194
|
+
};
|
195
|
+
return entityDef;
|
196
|
+
}
|
197
|
+
|
198
|
+
export { factory };
|
199
|
+
//# sourceMappingURL=acorex-modules-organization-managment-department.entity-BW18skLD.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-managment-department.entity-BW18skLD.mjs","sources":["../../../../libs/modules/organization-managment/src/lib/entities/department/department.entity.ts"],"sourcesContent":["import { AXPEntity, AXPEntityCommandScope, AXPEntityQueryType } from '@acorex/platform/common';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';\nimport { Injector } from '@angular/core';\nimport { RootConfig } from '../../const';\nimport { AXMOrganizationManagementDepartmentEntityService } from './department.service';\n\nexport async function factory(injector: Injector): Promise<AXPEntity | null> {\n const dataService = injector.get(AXMOrganizationManagementDepartmentEntityService);\n const i18n = RootConfig.config.i18n;\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.department.name,\n source: '',\n title: `t(\"department\", { scope: \"${i18n}\" })`,\n formats: {\n individual: `t(\"department\", { scope: \"${i18n}\" })`,\n plural: `t(\"departments\", { scope: \"${i18n}\" })`,\n searchResult: {\n title: '{{ title }}',\n description: RootConfig.module.title,\n },\n },\n relatedEntities: [],\n groups: [\n {\n id: 'section',\n title: `t(\"department\", { scope: \"${i18n}\" })`,\n },\n ],\n properties: [\n {\n name: 'title',\n title: `t(\"title\", { scope: \"${i18n}\" })`,\n groupId: 'section',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.text,\n options: {\n width: '400px',\n },\n },\n },\n validations: [\n {\n rule: 'required',\n },\n ],\n },\n ],\n columns: [{ name: 'title' }],\n commands: {\n create: {\n execute: async (data: any) => {\n const res = await dataService.insertOne(data);\n return { id: res };\n },\n },\n delete: {\n execute: async (id: any) => {\n return await dataService.deleteOne(id);\n },\n },\n update: {\n execute: async (data: any) => {\n return await dataService.updateOne(data.id, data);\n },\n },\n },\n queries: {\n byKey: {\n execute: async (id: string) => {\n return await dataService.getOne(id);\n },\n type: AXPEntityQueryType.Single,\n },\n list: {\n execute: async (e: any) => {\n return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });\n },\n type: AXPEntityQueryType.List,\n },\n },\n interfaces: {\n master: {\n create: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n update: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n single: {\n title: '{{title}}',\n sections: [\n {\n id: 'section',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 6,\n },\n },\n },\n },\n ],\n actions: [],\n },\n list: {\n actions: [\n {\n title: `t(\"create\", { scope: \"common\" })`,\n command: 'create-entity',\n priority: 'primary',\n type: 'create',\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n title: 't(\"deleteItems\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'primary',\n type: 'delete',\n scope: AXPEntityCommandScope.Selected,\n },\n {\n title: 't(\"detail\", { scope: \"common\" })',\n command: 'open-entity',\n priority: 'secondary',\n type: 'view',\n scope: AXPEntityCommandScope.Individual,\n },\n {\n title: 't(\"delete\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'secondary',\n type: 'delete',\n scope: AXPEntityCommandScope.Individual,\n },\n ],\n views: [\n {\n name: 'all',\n title: 't(\"allItem\", { scope: \"common\" })',\n fixed: true,\n columns: [],\n conditions: [],\n sorts: [],\n },\n ],\n },\n },\n },\n };\n\n return entityDef;\n}\n"],"names":[],"mappings":";;;;AAMO,eAAe,OAAO,CAAC,QAAkB,EAAA;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,gDAAgD,CAAC;AAClF,IAAA,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAEnC,IAAA,MAAM,SAAS,GAAc;AAC3B,QAAA,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC9B,QAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI;AACzC,QAAA,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,CAA6B,0BAAA,EAAA,IAAI,CAAM,IAAA,CAAA;AAC9C,QAAA,OAAO,EAAE;YACP,UAAU,EAAE,CAA6B,0BAAA,EAAA,IAAI,CAA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BAAA,QAAQ,EAAE,SAAS;AACnB,4BAAA,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,QAAQ;AACtC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,kCAAkC;AACzC,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,QAAQ,EAAE,WAAW;AACrB,4BAAA,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,qBAAqB,CAAC,UAAU;AACxC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,kCAAkC;AACzC,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,QAAQ,EAAE,WAAW;AACrB,4BAAA,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,UAAU;AACxC,yBAAA;AACF,qBAAA;AACD,oBAAA,KAAK,EAAE;AACL,wBAAA;AACE,4BAAA,IAAI,EAAE,KAAK;AACX,4BAAA,KAAK,EAAE,mCAAmC;AAC1C,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,OAAO,EAAE,EAAE;AACX,4BAAA,UAAU,EAAE,EAAE;AACd,4BAAA,KAAK,EAAE,EAAE;AACV,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;;;;"}
|
@@ -0,0 +1,199 @@
|
|
1
|
+
import { AXPEntityQueryType, AXPEntityCommandScope } from '@acorex/platform/common';
|
2
|
+
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
3
|
+
import { AXMOrganizationManagementEmploymentEntityService, RootConfig } from './acorex-modules-organization-managment.mjs';
|
4
|
+
|
5
|
+
async function factory(injector) {
|
6
|
+
const dataService = injector.get(AXMOrganizationManagementEmploymentEntityService);
|
7
|
+
const i18n = RootConfig.config.i18n;
|
8
|
+
const entityDef = {
|
9
|
+
module: RootConfig.module.name,
|
10
|
+
name: RootConfig.entities.employment.name,
|
11
|
+
source: '',
|
12
|
+
title: `t("employment", { scope: "${i18n}" })`,
|
13
|
+
formats: {
|
14
|
+
individual: `t("employment", { scope: "${i18n}" })`,
|
15
|
+
plural: `t("employments", { scope: "${i18n}" })`,
|
16
|
+
searchResult: {
|
17
|
+
title: '{{ title }}',
|
18
|
+
description: RootConfig.module.title,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
relatedEntities: [],
|
22
|
+
groups: [
|
23
|
+
{
|
24
|
+
id: 'section',
|
25
|
+
title: `t("employment", { scope: "${i18n}" })`,
|
26
|
+
},
|
27
|
+
],
|
28
|
+
properties: [
|
29
|
+
{
|
30
|
+
name: 'title',
|
31
|
+
title: `t("title", { scope: "${i18n}" })`,
|
32
|
+
groupId: 'section',
|
33
|
+
schema: {
|
34
|
+
dataType: 'string',
|
35
|
+
interface: {
|
36
|
+
type: AXPWidgetsCatalog.text,
|
37
|
+
options: {
|
38
|
+
width: '400px',
|
39
|
+
},
|
40
|
+
},
|
41
|
+
},
|
42
|
+
validations: [
|
43
|
+
{
|
44
|
+
rule: 'required',
|
45
|
+
},
|
46
|
+
],
|
47
|
+
},
|
48
|
+
],
|
49
|
+
columns: [{ name: 'title' }],
|
50
|
+
commands: {
|
51
|
+
create: {
|
52
|
+
execute: async (data) => {
|
53
|
+
const res = await dataService.insertOne(data);
|
54
|
+
return { id: res };
|
55
|
+
},
|
56
|
+
},
|
57
|
+
delete: {
|
58
|
+
execute: async (id) => {
|
59
|
+
return await dataService.deleteOne(id);
|
60
|
+
},
|
61
|
+
},
|
62
|
+
update: {
|
63
|
+
execute: async (data) => {
|
64
|
+
return await dataService.updateOne(data.id, data);
|
65
|
+
},
|
66
|
+
},
|
67
|
+
},
|
68
|
+
queries: {
|
69
|
+
byKey: {
|
70
|
+
execute: async (id) => {
|
71
|
+
return await dataService.getOne(id);
|
72
|
+
},
|
73
|
+
type: AXPEntityQueryType.Single,
|
74
|
+
},
|
75
|
+
list: {
|
76
|
+
execute: async (e) => {
|
77
|
+
return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });
|
78
|
+
},
|
79
|
+
type: AXPEntityQueryType.List,
|
80
|
+
},
|
81
|
+
},
|
82
|
+
interfaces: {
|
83
|
+
master: {
|
84
|
+
create: {
|
85
|
+
sections: [
|
86
|
+
{
|
87
|
+
id: 'section',
|
88
|
+
},
|
89
|
+
],
|
90
|
+
properties: [
|
91
|
+
{
|
92
|
+
name: 'title',
|
93
|
+
layout: {
|
94
|
+
positions: {
|
95
|
+
lg: {
|
96
|
+
colSpan: 12,
|
97
|
+
},
|
98
|
+
},
|
99
|
+
},
|
100
|
+
},
|
101
|
+
],
|
102
|
+
},
|
103
|
+
update: {
|
104
|
+
sections: [
|
105
|
+
{
|
106
|
+
id: 'section',
|
107
|
+
},
|
108
|
+
],
|
109
|
+
properties: [
|
110
|
+
{
|
111
|
+
name: 'title',
|
112
|
+
layout: {
|
113
|
+
positions: {
|
114
|
+
lg: {
|
115
|
+
colSpan: 12,
|
116
|
+
},
|
117
|
+
},
|
118
|
+
},
|
119
|
+
},
|
120
|
+
],
|
121
|
+
},
|
122
|
+
single: {
|
123
|
+
title: '{{title}}',
|
124
|
+
sections: [
|
125
|
+
{
|
126
|
+
id: 'section',
|
127
|
+
layout: {
|
128
|
+
positions: {
|
129
|
+
lg: {
|
130
|
+
colSpan: 12,
|
131
|
+
},
|
132
|
+
},
|
133
|
+
},
|
134
|
+
},
|
135
|
+
],
|
136
|
+
properties: [
|
137
|
+
{
|
138
|
+
name: 'title',
|
139
|
+
layout: {
|
140
|
+
positions: {
|
141
|
+
lg: {
|
142
|
+
colSpan: 6,
|
143
|
+
},
|
144
|
+
},
|
145
|
+
},
|
146
|
+
},
|
147
|
+
],
|
148
|
+
actions: [],
|
149
|
+
},
|
150
|
+
list: {
|
151
|
+
actions: [
|
152
|
+
{
|
153
|
+
title: `t("create", { scope: "common" })`,
|
154
|
+
command: 'create-entity',
|
155
|
+
priority: 'primary',
|
156
|
+
type: 'create',
|
157
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
158
|
+
},
|
159
|
+
{
|
160
|
+
title: 't("deleteItems", { scope: "common" })',
|
161
|
+
command: 'delete-entity',
|
162
|
+
priority: 'primary',
|
163
|
+
type: 'delete',
|
164
|
+
scope: AXPEntityCommandScope.Selected,
|
165
|
+
},
|
166
|
+
{
|
167
|
+
title: 't("detail", { scope: "common" })',
|
168
|
+
command: 'open-entity',
|
169
|
+
priority: 'secondary',
|
170
|
+
type: 'view',
|
171
|
+
scope: AXPEntityCommandScope.Individual,
|
172
|
+
},
|
173
|
+
{
|
174
|
+
title: 't("delete", { scope: "common" })',
|
175
|
+
command: 'delete-entity',
|
176
|
+
priority: 'secondary',
|
177
|
+
type: 'delete',
|
178
|
+
scope: AXPEntityCommandScope.Individual,
|
179
|
+
},
|
180
|
+
],
|
181
|
+
views: [
|
182
|
+
{
|
183
|
+
name: 'all',
|
184
|
+
title: 't("allItem", { scope: "common" })',
|
185
|
+
fixed: true,
|
186
|
+
columns: [],
|
187
|
+
conditions: [],
|
188
|
+
sorts: [],
|
189
|
+
},
|
190
|
+
],
|
191
|
+
},
|
192
|
+
},
|
193
|
+
},
|
194
|
+
};
|
195
|
+
return entityDef;
|
196
|
+
}
|
197
|
+
|
198
|
+
export { factory };
|
199
|
+
//# sourceMappingURL=acorex-modules-organization-managment-employment.entity-D28NBRYg.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-managment-employment.entity-D28NBRYg.mjs","sources":["../../../../libs/modules/organization-managment/src/lib/entities/employment/employment.entity.ts"],"sourcesContent":["import { AXPEntity, AXPEntityCommandScope, AXPEntityQueryType } from '@acorex/platform/common';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';\nimport { Injector } from '@angular/core';\nimport { RootConfig } from '../../const';\nimport { AXMOrganizationManagementEmploymentEntityService } from './employment.service';\n\nexport async function factory(injector: Injector): Promise<AXPEntity | null> {\n const dataService = injector.get(AXMOrganizationManagementEmploymentEntityService);\n const i18n = RootConfig.config.i18n;\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.employment.name,\n source: '',\n title: `t(\"employment\", { scope: \"${i18n}\" })`,\n formats: {\n individual: `t(\"employment\", { scope: \"${i18n}\" })`,\n plural: `t(\"employments\", { scope: \"${i18n}\" })`,\n searchResult: {\n title: '{{ title }}',\n description: RootConfig.module.title,\n },\n },\n relatedEntities: [],\n groups: [\n {\n id: 'section',\n title: `t(\"employment\", { scope: \"${i18n}\" })`,\n },\n ],\n properties: [\n {\n name: 'title',\n title: `t(\"title\", { scope: \"${i18n}\" })`,\n groupId: 'section',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.text,\n options: {\n width: '400px',\n },\n },\n },\n validations: [\n {\n rule: 'required',\n },\n ],\n },\n ],\n columns: [{ name: 'title' }],\n commands: {\n create: {\n execute: async (data: any) => {\n const res = await dataService.insertOne(data);\n return { id: res };\n },\n },\n delete: {\n execute: async (id: any) => {\n return await dataService.deleteOne(id);\n },\n },\n update: {\n execute: async (data: any) => {\n return await dataService.updateOne(data.id, data);\n },\n },\n },\n queries: {\n byKey: {\n execute: async (id: string) => {\n return await dataService.getOne(id);\n },\n type: AXPEntityQueryType.Single,\n },\n list: {\n execute: async (e: any) => {\n return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });\n },\n type: AXPEntityQueryType.List,\n },\n },\n interfaces: {\n master: {\n create: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n update: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n single: {\n title: '{{title}}',\n sections: [\n {\n id: 'section',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 6,\n },\n },\n },\n },\n ],\n actions: [],\n },\n list: {\n actions: [\n {\n title: `t(\"create\", { scope: \"common\" })`,\n command: 'create-entity',\n priority: 'primary',\n type: 'create',\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n title: 't(\"deleteItems\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'primary',\n type: 'delete',\n scope: AXPEntityCommandScope.Selected,\n },\n {\n title: 't(\"detail\", { scope: \"common\" })',\n command: 'open-entity',\n priority: 'secondary',\n type: 'view',\n scope: AXPEntityCommandScope.Individual,\n },\n {\n title: 't(\"delete\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'secondary',\n type: 'delete',\n scope: AXPEntityCommandScope.Individual,\n },\n ],\n views: [\n {\n name: 'all',\n title: 't(\"allItem\", { scope: \"common\" })',\n fixed: true,\n columns: [],\n conditions: [],\n sorts: [],\n },\n ],\n },\n },\n },\n };\n\n return entityDef;\n}\n"],"names":[],"mappings":";;;;AAMO,eAAe,OAAO,CAAC,QAAkB,EAAA;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,gDAAgD,CAAC;AAClF,IAAA,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAEnC,IAAA,MAAM,SAAS,GAAc;AAC3B,QAAA,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC9B,QAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI;AACzC,QAAA,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,CAA6B,0BAAA,EAAA,IAAI,CAAM,IAAA,CAAA;AAC9C,QAAA,OAAO,EAAE;YACP,UAAU,EAAE,CAA6B,0BAAA,EAAA,IAAI,CAAM,IAAA,CAAA;YACnD,MAAM,EAAE,CAA8B,2BAAA,EAAA,IAAI,CAAM,IAAA,CAAA;AAChD,YAAA,YAAY,EAAE;AACZ,gBAAA,KAAK,EA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