@acorex-platform/module-measurement-core-client 0.0.30 → 0.0.33
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-platform-module-measurement-core-client-contracts-entities-measurement-dimension.mjs +280 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-measurement-dimension.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-measurement-range.mjs +405 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-measurement-range.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-quantity-type.mjs +242 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-quantity-type.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-size-item.mjs +250 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-size-item.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-size-rule.mjs +327 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-size-rule.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-sizing-dimension-usage.mjs +276 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-sizing-dimension-usage.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-sizing-profile.mjs +326 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-sizing-profile.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-unit-conversion.mjs +291 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-unit-conversion.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-unit-of-measure.mjs +315 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entities-unit-of-measure.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-acorex-platform-module-measurement-core-client-contracts-entity-catalog-D_3qAB6g.mjs +99 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-acorex-platform-module-measurement-core-client-contracts-entity-catalog-D_3qAB6g.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-measurement-dimension.entity-hKoZ7MYW.mjs +208 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-measurement-dimension.entity-hKoZ7MYW.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-measurement-range.entity-5TG_paCh.mjs +333 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-measurement-range.entity-5TG_paCh.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-quantity-type.entity-qM6kczXO.mjs +170 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-quantity-type.entity-qM6kczXO.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-size-item.entity-DBZTjTbr.mjs +178 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-size-item.entity-DBZTjTbr.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-size-rule.entity-DdsOkrLS.mjs +255 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-size-rule.entity-DdsOkrLS.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-sizing-dimension-usage.entity-D0L5v_Lw.mjs +204 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-sizing-dimension-usage.entity-D0L5v_Lw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-sizing-profile.entity-BWZ882vO.mjs +254 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-sizing-profile.entity-BWZ882vO.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-unit-conversion.entity-DDLTaqsv.mjs +219 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-unit-conversion.entity-DDLTaqsv.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-unit-of-measure.entity-CYJDuSvX.mjs +243 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog-unit-of-measure.entity-CYJDuSvX.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog.mjs +2 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-local-entities.mjs +37 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-local-entities.mjs.map +1 -0
- package/package.json +45 -1
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-measurement-dimension.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-measurement-range.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-quantity-type.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-size-item.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-size-rule.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-sizing-dimension-usage.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-sizing-profile.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-unit-conversion.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entities-unit-of-measure.d.ts +5 -0
- package/types/acorex-platform-module-measurement-core-client-contracts-entity-catalog.d.ts +10 -0
- package/types/acorex-platform-module-measurement-core-client-local-entities.d.ts +12 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { AXPWidgetsList } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
|
|
3
|
+
import { R as RootConfig } from './acorex-platform-module-measurement-core-client-contracts-entity-catalog-acorex-platform-module-measurement-core-client-contracts-entity-catalog-D_3qAB6g.mjs';
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region ---- Entity Factory ----
|
|
7
|
+
async function unitConversionFactory() {
|
|
8
|
+
const sections = [
|
|
9
|
+
{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
10
|
+
{ id: 'conversion', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
11
|
+
];
|
|
12
|
+
const propertyLayouts = [
|
|
13
|
+
{ name: 'code', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
|
|
14
|
+
{ name: 'title', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
|
|
15
|
+
{ name: 'description', layout: { positions: { lg: { colSpan: 8, order: 3 } } } },
|
|
16
|
+
{ name: 'fromUomId', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
|
|
17
|
+
{ name: 'toUomId', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
|
|
18
|
+
{ name: 'factor', layout: { positions: { lg: { colSpan: 4, order: 6 } } } },
|
|
19
|
+
{ name: 'operator', layout: { positions: { lg: { colSpan: 4, order: 7 } } } },
|
|
20
|
+
];
|
|
21
|
+
const entityDef = {
|
|
22
|
+
module: RootConfig.module.name,
|
|
23
|
+
name: RootConfig.entities.unitConversion.name,
|
|
24
|
+
title: RootConfig.entities.unitConversion.title,
|
|
25
|
+
icon: RootConfig.entities.unitConversion.icon,
|
|
26
|
+
formats: {
|
|
27
|
+
individual: '{{ title || (fromUnit?.symbol + " → " + toUnit?.symbol) }}',
|
|
28
|
+
plural: RootConfig.entities.unitConversion.titlePlural,
|
|
29
|
+
searchResult: {
|
|
30
|
+
title: '{{ title || (fromUnit?.symbol + " → " + toUnit?.symbol) }}',
|
|
31
|
+
description: '{{ code }}',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'disable' }],
|
|
35
|
+
groups: [
|
|
36
|
+
{ id: 'basic-info', title: '@measurement-core:conversions.entities.unit-conversion.groups.basic-info' },
|
|
37
|
+
{ id: 'conversion', title: '@measurement-core:conversions.entities.unit-conversion.groups.conversion' },
|
|
38
|
+
],
|
|
39
|
+
properties: [
|
|
40
|
+
{
|
|
41
|
+
name: 'id',
|
|
42
|
+
title: '@general:terms.common.id',
|
|
43
|
+
groupId: 'basic-info',
|
|
44
|
+
schema: {
|
|
45
|
+
dataType: 'uuid',
|
|
46
|
+
visible: false,
|
|
47
|
+
readonly: true,
|
|
48
|
+
unique: { enabled: true },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'code',
|
|
53
|
+
title: '@general:terms.common.code',
|
|
54
|
+
groupId: 'basic-info',
|
|
55
|
+
options: {
|
|
56
|
+
sort: { enabled: true },
|
|
57
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
58
|
+
},
|
|
59
|
+
schema: {
|
|
60
|
+
dataType: 'string',
|
|
61
|
+
interface: {
|
|
62
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
63
|
+
options: {
|
|
64
|
+
placeholder: '@measurement-core:conversions.entities.unit-conversion.fields.code.placeholder',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'title',
|
|
71
|
+
title: '@general:terms.common.title',
|
|
72
|
+
groupId: 'basic-info',
|
|
73
|
+
options: {
|
|
74
|
+
sort: { enabled: true },
|
|
75
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
76
|
+
},
|
|
77
|
+
schema: {
|
|
78
|
+
dataType: 'string',
|
|
79
|
+
interface: {
|
|
80
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
81
|
+
options: {
|
|
82
|
+
placeholder: '@measurement-core:conversions.entities.unit-conversion.fields.title.placeholder',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'description',
|
|
89
|
+
title: '@general:terms.common.description',
|
|
90
|
+
groupId: 'basic-info',
|
|
91
|
+
schema: {
|
|
92
|
+
dataType: 'string',
|
|
93
|
+
interface: {
|
|
94
|
+
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
95
|
+
options: {
|
|
96
|
+
rows: 2,
|
|
97
|
+
placeholder: '@measurement-core:conversions.entities.unit-conversion.fields.description.placeholder',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'fromUomId',
|
|
104
|
+
title: '@measurement-core:conversions.entities.unit-conversion.fields.from-unit.title',
|
|
105
|
+
groupId: 'conversion',
|
|
106
|
+
options: {
|
|
107
|
+
sort: { enabled: true },
|
|
108
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
109
|
+
},
|
|
110
|
+
schema: {
|
|
111
|
+
dataType: 'string',
|
|
112
|
+
interface: {
|
|
113
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
114
|
+
options: {
|
|
115
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.unitOfMeasure.name}`,
|
|
116
|
+
expose: [
|
|
117
|
+
{ source: 'id', target: 'fromUomId' },
|
|
118
|
+
{ source: 'title', target: 'fromUnit.title' },
|
|
119
|
+
{ source: 'symbol', target: 'fromUnit.symbol' },
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
validations: [{ rule: 'required' }],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'toUomId',
|
|
128
|
+
title: '@measurement-core:conversions.entities.unit-conversion.fields.to-unit.title',
|
|
129
|
+
groupId: 'conversion',
|
|
130
|
+
options: {
|
|
131
|
+
sort: { enabled: true },
|
|
132
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
133
|
+
},
|
|
134
|
+
schema: {
|
|
135
|
+
dataType: 'string',
|
|
136
|
+
interface: {
|
|
137
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
138
|
+
options: {
|
|
139
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.unitOfMeasure.name}`,
|
|
140
|
+
expose: [
|
|
141
|
+
{ source: 'id', target: 'toUomId' },
|
|
142
|
+
{ source: 'title', target: 'toUnit.title' },
|
|
143
|
+
{ source: 'symbol', target: 'toUnit.symbol' },
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
validations: [{ rule: 'required' }],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: 'factor',
|
|
152
|
+
title: '@measurement-core:conversions.entities.unit-conversion.fields.factor.title',
|
|
153
|
+
groupId: 'conversion',
|
|
154
|
+
schema: {
|
|
155
|
+
dataType: 'number',
|
|
156
|
+
interface: {
|
|
157
|
+
type: AXPWidgetsList.Editors.NumberBox,
|
|
158
|
+
options: {
|
|
159
|
+
placeholder: '@measurement-core:conversions.entities.unit-conversion.fields.factor.placeholder',
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
validations: [{ rule: 'required' }],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'operator',
|
|
167
|
+
title: '@measurement-core:conversions.entities.unit-conversion.fields.operator.title',
|
|
168
|
+
groupId: 'conversion',
|
|
169
|
+
schema: {
|
|
170
|
+
dataType: 'string',
|
|
171
|
+
interface: {
|
|
172
|
+
type: AXPWidgetsList.Editors.SelectBox,
|
|
173
|
+
options: {
|
|
174
|
+
valueField: 'value',
|
|
175
|
+
textField: 'text',
|
|
176
|
+
dataSource: [
|
|
177
|
+
{ value: 'multiply', text: '@measurement-core:conversions.entities.unit-conversion.fields.operator.options.multiply' },
|
|
178
|
+
{ value: 'divide', text: '@measurement-core:conversions.entities.unit-conversion.fields.operator.options.divide' },
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
columns: [
|
|
186
|
+
{ name: 'code', options: { width: '120px', order: 1 } },
|
|
187
|
+
{ name: 'title', options: { width: '140px', order: 2 } },
|
|
188
|
+
{ name: 'fromUomId', options: { width: '120px', dataPath: 'fromUnit.symbol', order: 3 } },
|
|
189
|
+
{ name: 'toUomId', options: { width: '120px', dataPath: 'toUnit.symbol', order: 4 } },
|
|
190
|
+
{ name: 'factor', options: { width: '100px', order: 5 } },
|
|
191
|
+
{ name: 'operator', options: { width: '100px', order: 6 } },
|
|
192
|
+
],
|
|
193
|
+
interfaces: {
|
|
194
|
+
master: {
|
|
195
|
+
create: { sections, properties: propertyLayouts },
|
|
196
|
+
update: { sections, properties: propertyLayouts },
|
|
197
|
+
single: {
|
|
198
|
+
title: '{{ context.eval("fromUnit.symbol") + " → " + context.eval("toUnit.symbol") }}',
|
|
199
|
+
sections,
|
|
200
|
+
properties: propertyLayouts,
|
|
201
|
+
actions: [...entityMasterRecordActions()],
|
|
202
|
+
},
|
|
203
|
+
list: {
|
|
204
|
+
actions: [...entityMasterCrudActions()],
|
|
205
|
+
views: [
|
|
206
|
+
createAllQueryView({
|
|
207
|
+
sorts: [{ name: 'code', dir: 'asc' }],
|
|
208
|
+
}),
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
return entityDef;
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
|
|
218
|
+
export { unitConversionFactory };
|
|
219
|
+
//# sourceMappingURL=acorex-platform-module-measurement-core-client-contracts-entity-catalog-unit-conversion.entity-DDLTaqsv.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-measurement-core-client-contracts-entity-catalog-unit-conversion.entity-DDLTaqsv.mjs","sources":["../../../../libs/modules/measurement-core/contracts/src/entities/unit-conversion/unit-conversion.entity.ts"],"sourcesContent":["import { AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport { AXPEntity, createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';\n//#region ---- Imports ----\nimport { RootConfig } from '../../root-config';\n\n//#endregion\n\n//#region ---- Entity Factory ----\n\nexport async function unitConversionFactory(): Promise<AXPEntity> {\n const sections = [\n { id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },\n { id: 'conversion', layout: { positions: { lg: { colSpan: 12 } } } },\n ];\n\n const propertyLayouts = [\n { name: 'code', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },\n { name: 'description', layout: { positions: { lg: { colSpan: 8, order: 3 } } } },\n { name: 'fromUomId', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },\n { name: 'toUomId', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },\n { name: 'factor', layout: { positions: { lg: { colSpan: 4, order: 6 } } } },\n { name: 'operator', layout: { positions: { lg: { colSpan: 4, order: 7 } } } },\n ];\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.unitConversion.name,\n title: RootConfig.entities.unitConversion.title,\n icon: RootConfig.entities.unitConversion.icon,\n formats: {\n individual: '{{ title || (fromUnit?.symbol + \" → \" + toUnit?.symbol) }}',\n plural: RootConfig.entities.unitConversion.titlePlural,\n searchResult: {\n title: '{{ title || (fromUnit?.symbol + \" → \" + toUnit?.symbol) }}',\n description: '{{ code }}',\n },\n },\n plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'disable' }],\n groups: [\n { id: 'basic-info', title: '@measurement-core:conversions.entities.unit-conversion.groups.basic-info' },\n { id: 'conversion', title: '@measurement-core:conversions.entities.unit-conversion.groups.conversion' },\n ],\n properties: [\n {\n name: 'id',\n title: '@general:terms.common.id',\n groupId: 'basic-info',\n schema: {\n dataType: 'uuid',\n visible: false,\n readonly: true,\n unique: { enabled: true },\n },\n },\n {\n name: 'code',\n title: '@general:terms.common.code',\n groupId: 'basic-info',\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.TextBox,\n options: {\n placeholder: '@measurement-core:conversions.entities.unit-conversion.fields.code.placeholder',\n },\n },\n },\n },\n {\n name: 'title',\n title: '@general:terms.common.title',\n groupId: 'basic-info',\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.TextBox,\n options: {\n placeholder: '@measurement-core:conversions.entities.unit-conversion.fields.title.placeholder',\n },\n },\n },\n },\n {\n name: 'description',\n title: '@general:terms.common.description',\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LargeTextBox,\n options: {\n rows: 2,\n placeholder: '@measurement-core:conversions.entities.unit-conversion.fields.description.placeholder',\n },\n },\n },\n },\n {\n name: 'fromUomId',\n title: '@measurement-core:conversions.entities.unit-conversion.fields.from-unit.title',\n groupId: 'conversion',\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n entity: `${RootConfig.module.name}.${RootConfig.entities.unitOfMeasure.name}`,\n expose: [\n { source: 'id', target: 'fromUomId' },\n { source: 'title', target: 'fromUnit.title' },\n { source: 'symbol', target: 'fromUnit.symbol' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'toUomId',\n title: '@measurement-core:conversions.entities.unit-conversion.fields.to-unit.title',\n groupId: 'conversion',\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n entity: `${RootConfig.module.name}.${RootConfig.entities.unitOfMeasure.name}`,\n expose: [\n { source: 'id', target: 'toUomId' },\n { source: 'title', target: 'toUnit.title' },\n { source: 'symbol', target: 'toUnit.symbol' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'factor',\n title: '@measurement-core:conversions.entities.unit-conversion.fields.factor.title',\n groupId: 'conversion',\n schema: {\n dataType: 'number',\n interface: {\n type: AXPWidgetsList.Editors.NumberBox,\n options: {\n placeholder: '@measurement-core:conversions.entities.unit-conversion.fields.factor.placeholder',\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'operator',\n title: '@measurement-core:conversions.entities.unit-conversion.fields.operator.title',\n groupId: 'conversion',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.SelectBox,\n options: {\n valueField: 'value',\n textField: 'text',\n dataSource: [\n { value: 'multiply', text: '@measurement-core:conversions.entities.unit-conversion.fields.operator.options.multiply' },\n { value: 'divide', text: '@measurement-core:conversions.entities.unit-conversion.fields.operator.options.divide' },\n ],\n },\n },\n },\n },\n ],\n columns: [\n { name: 'code', options: { width: '120px', order: 1 } },\n { name: 'title', options: { width: '140px', order: 2 } },\n { name: 'fromUomId', options: { width: '120px', dataPath: 'fromUnit.symbol', order: 3 } },\n { name: 'toUomId', options: { width: '120px', dataPath: 'toUnit.symbol', order: 4 } },\n { name: 'factor', options: { width: '100px', order: 5 } },\n { name: 'operator', options: { width: '100px', order: 6 } },\n ],\n interfaces: {\n master: {\n create: { sections, properties: propertyLayouts },\n update: { sections, properties: propertyLayouts },\n single: {\n title: '{{ context.eval(\"fromUnit.symbol\") + \" → \" + context.eval(\"toUnit.symbol\") }}',\n sections,\n properties: propertyLayouts,\n actions: [...entityMasterRecordActions()],\n },\n list: {\n actions: [...entityMasterCrudActions()],\n views: [\n createAllQueryView({\n sorts: [{ name: 'code', dir: 'asc' }],\n }),\n ],\n },\n },\n },\n };\n\n return entityDef;\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAKA;AAEA;AAEO,eAAe,qBAAqB,GAAA;AACzC,IAAA,MAAM,QAAQ,GAAG;AACf,QAAA,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AACpE,QAAA,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;KACrE;AAED,IAAA,MAAM,eAAe,GAAG;QACtB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;QACzE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;QAC1E,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;QAChF,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;QAC9E,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,E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yBACtC,CAAC;AACH,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;AAEA;;;;"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { AXPWidgetsList } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
|
|
3
|
+
import { R as RootConfig } from './acorex-platform-module-measurement-core-client-contracts-entity-catalog-acorex-platform-module-measurement-core-client-contracts-entity-catalog-D_3qAB6g.mjs';
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region ---- Entity Factory ----
|
|
7
|
+
async function unitOfMeasureFactory() {
|
|
8
|
+
const sections = [
|
|
9
|
+
{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
10
|
+
{ id: 'configuration', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
11
|
+
];
|
|
12
|
+
const propertyLayouts = [
|
|
13
|
+
{ name: 'code', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
|
|
14
|
+
{ name: 'title', layout: { positions: { lg: { colSpan: 5, order: 2 } } } },
|
|
15
|
+
{ name: 'symbol', layout: { positions: { lg: { colSpan: 3, order: 3 } } } },
|
|
16
|
+
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },
|
|
17
|
+
{ name: 'quantityTypeId', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
|
|
18
|
+
{ name: 'factorToBase', layout: { positions: { lg: { colSpan: 3, order: 6 } } } },
|
|
19
|
+
{ name: 'precision', layout: { positions: { lg: { colSpan: 3, order: 7 } } } },
|
|
20
|
+
{ name: 'isBase', layout: { positions: { lg: { colSpan: 3, order: 8 } } } },
|
|
21
|
+
];
|
|
22
|
+
const entityDef = {
|
|
23
|
+
module: RootConfig.module.name,
|
|
24
|
+
name: RootConfig.entities.unitOfMeasure.name,
|
|
25
|
+
title: RootConfig.entities.unitOfMeasure.title,
|
|
26
|
+
icon: RootConfig.entities.unitOfMeasure.icon,
|
|
27
|
+
formats: {
|
|
28
|
+
individual: RootConfig.entities.unitOfMeasure.title,
|
|
29
|
+
plural: RootConfig.entities.unitOfMeasure.titlePlural,
|
|
30
|
+
searchResult: {
|
|
31
|
+
title: '{{ title }}',
|
|
32
|
+
description: '{{ context.eval("code") + " (" + context.eval("symbol") + ")" }}',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'disable' }],
|
|
36
|
+
groups: [
|
|
37
|
+
{ id: 'basic-info', title: '@measurement-core:units.entities.unit-of-measure.groups.basic-info' },
|
|
38
|
+
{ id: 'configuration', title: '@measurement-core:units.entities.unit-of-measure.groups.configuration' },
|
|
39
|
+
],
|
|
40
|
+
properties: [
|
|
41
|
+
{
|
|
42
|
+
name: 'id',
|
|
43
|
+
title: '@general:terms.common.id',
|
|
44
|
+
groupId: 'basic-info',
|
|
45
|
+
schema: {
|
|
46
|
+
dataType: 'uuid',
|
|
47
|
+
visible: false,
|
|
48
|
+
readonly: true,
|
|
49
|
+
unique: { enabled: true },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'code',
|
|
54
|
+
title: '@general:terms.common.code',
|
|
55
|
+
groupId: 'basic-info',
|
|
56
|
+
options: {
|
|
57
|
+
sort: { enabled: true },
|
|
58
|
+
filter: {
|
|
59
|
+
advance: { enabled: true },
|
|
60
|
+
inline: { enabled: true },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
schema: {
|
|
64
|
+
dataType: 'string',
|
|
65
|
+
interface: {
|
|
66
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
67
|
+
options: {
|
|
68
|
+
placeholder: '@measurement-core:units.entities.unit-of-measure.fields.code.placeholder',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
validations: [{ rule: 'required' }],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'title',
|
|
76
|
+
title: '@general:terms.common.title',
|
|
77
|
+
groupId: 'basic-info',
|
|
78
|
+
options: {
|
|
79
|
+
sort: { enabled: true },
|
|
80
|
+
filter: {
|
|
81
|
+
advance: { enabled: true },
|
|
82
|
+
inline: { enabled: true },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
schema: {
|
|
86
|
+
dataType: 'string',
|
|
87
|
+
interface: {
|
|
88
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
89
|
+
options: {
|
|
90
|
+
placeholder: '@measurement-core:units.entities.unit-of-measure.fields.title.placeholder',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
validations: [{ rule: 'required' }],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'symbol',
|
|
98
|
+
title: '@measurement-core:units.entities.unit-of-measure.fields.symbol.title',
|
|
99
|
+
groupId: 'basic-info',
|
|
100
|
+
options: {
|
|
101
|
+
sort: { enabled: true },
|
|
102
|
+
filter: { advance: { enabled: true } },
|
|
103
|
+
},
|
|
104
|
+
schema: {
|
|
105
|
+
dataType: 'string',
|
|
106
|
+
interface: {
|
|
107
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
108
|
+
options: {
|
|
109
|
+
maxLength: 10,
|
|
110
|
+
placeholder: '@measurement-core:units.entities.unit-of-measure.fields.symbol.placeholder',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'description',
|
|
117
|
+
title: '@general:terms.common.description',
|
|
118
|
+
groupId: 'basic-info',
|
|
119
|
+
schema: {
|
|
120
|
+
dataType: 'string',
|
|
121
|
+
interface: {
|
|
122
|
+
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
123
|
+
options: {
|
|
124
|
+
rows: 3,
|
|
125
|
+
placeholder: '@measurement-core:units.entities.unit-of-measure.fields.description.placeholder',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'quantityTypeId',
|
|
132
|
+
title: '@measurement-core:units.entities.unit-of-measure.fields.quantity-type.title',
|
|
133
|
+
groupId: 'configuration',
|
|
134
|
+
options: {
|
|
135
|
+
sort: { enabled: true },
|
|
136
|
+
filter: {
|
|
137
|
+
advance: { enabled: true },
|
|
138
|
+
inline: { enabled: true },
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
schema: {
|
|
142
|
+
dataType: 'string',
|
|
143
|
+
interface: {
|
|
144
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
145
|
+
options: {
|
|
146
|
+
look: 'select',
|
|
147
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.quantityType.name}`,
|
|
148
|
+
expose: [
|
|
149
|
+
{ source: 'id', target: 'quantityTypeId' },
|
|
150
|
+
{ source: 'code', target: 'quantityType.code' },
|
|
151
|
+
{ source: 'title', target: 'quantityType.title' },
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
validations: [{ rule: 'required' }],
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'factorToBase',
|
|
160
|
+
title: '@measurement-core:units.entities.unit-of-measure.fields.factor-to-base.title',
|
|
161
|
+
groupId: 'configuration',
|
|
162
|
+
schema: {
|
|
163
|
+
dataType: 'number',
|
|
164
|
+
interface: {
|
|
165
|
+
type: AXPWidgetsList.Editors.NumberBox,
|
|
166
|
+
options: {
|
|
167
|
+
placeholder: '@measurement-core:units.entities.unit-of-measure.fields.factor-to-base.placeholder',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'precision',
|
|
174
|
+
title: '@measurement-core:units.entities.unit-of-measure.fields.precision.title',
|
|
175
|
+
groupId: 'configuration',
|
|
176
|
+
schema: {
|
|
177
|
+
dataType: 'number',
|
|
178
|
+
interface: {
|
|
179
|
+
type: AXPWidgetsList.Editors.NumberBox,
|
|
180
|
+
options: {
|
|
181
|
+
minValue: 0,
|
|
182
|
+
maxValue: 10,
|
|
183
|
+
placeholder: '@measurement-core:units.entities.unit-of-measure.fields.precision.placeholder',
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'isBase',
|
|
190
|
+
title: '@measurement-core:units.entities.unit-of-measure.fields.is-base.title',
|
|
191
|
+
groupId: 'configuration',
|
|
192
|
+
schema: {
|
|
193
|
+
dataType: 'boolean',
|
|
194
|
+
interface: {
|
|
195
|
+
type: AXPWidgetsList.Editors.ToggleSwitch,
|
|
196
|
+
options: {
|
|
197
|
+
trulyText: '@general:terms.common.yes-no.yes',
|
|
198
|
+
falsyText: '@general:terms.common.yes-no.no',
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
columns: [
|
|
205
|
+
{ name: 'code', options: { width: '120px', order: 1 } },
|
|
206
|
+
{ name: 'title', options: { width: '220px', order: 2 } },
|
|
207
|
+
{ name: 'symbol', options: { width: '100px', order: 3 } },
|
|
208
|
+
{ name: 'quantityTypeId', options: { width: '180px', order: 4 } },
|
|
209
|
+
{ name: 'isBase', options: { width: '100px', order: 5 } },
|
|
210
|
+
],
|
|
211
|
+
interfaces: {
|
|
212
|
+
master: {
|
|
213
|
+
create: {
|
|
214
|
+
sections,
|
|
215
|
+
properties: propertyLayouts,
|
|
216
|
+
},
|
|
217
|
+
update: {
|
|
218
|
+
sections,
|
|
219
|
+
properties: propertyLayouts,
|
|
220
|
+
},
|
|
221
|
+
single: {
|
|
222
|
+
title: '{{ title }}',
|
|
223
|
+
sections,
|
|
224
|
+
properties: propertyLayouts,
|
|
225
|
+
actions: [...entityMasterRecordActions()],
|
|
226
|
+
},
|
|
227
|
+
list: {
|
|
228
|
+
actions: [...entityMasterCrudActions()],
|
|
229
|
+
views: [
|
|
230
|
+
createAllQueryView({
|
|
231
|
+
sorts: [{ name: 'code', dir: 'asc' }],
|
|
232
|
+
}),
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
return entityDef;
|
|
239
|
+
}
|
|
240
|
+
//#endregion
|
|
241
|
+
|
|
242
|
+
export { unitOfMeasureFactory };
|
|
243
|
+
//# sourceMappingURL=acorex-platform-module-measurement-core-client-contracts-entity-catalog-unit-of-measure.entity-CYJDuSvX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-measurement-core-client-contracts-entity-catalog-unit-of-measure.entity-CYJDuSvX.mjs","sources":["../../../../libs/modules/measurement-core/contracts/src/entities/unit-of-measure/unit-of-measure.entity.ts"],"sourcesContent":["import { AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport { AXPEntity, createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';\n//#region ---- Imports ----\nimport { RootConfig } from '../../root-config';\n\n//#endregion\n\n//#region ---- Entity Factory ----\n\nexport async function unitOfMeasureFactory(): Promise<AXPEntity> {\n const sections = [\n { id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },\n { id: 'configuration', layout: { positions: { lg: { colSpan: 12 } } } },\n ];\n\n const propertyLayouts = [\n { name: 'code', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 5, order: 2 } } } },\n { name: 'symbol', layout: { positions: { lg: { colSpan: 3, order: 3 } } } },\n { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },\n { name: 'quantityTypeId', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },\n { name: 'factorToBase', layout: { positions: { lg: { colSpan: 3, order: 6 } } } },\n { name: 'precision', layout: { positions: { lg: { colSpan: 3, order: 7 } } } },\n { name: 'isBase', layout: { positions: { lg: { colSpan: 3, order: 8 } } } },\n ];\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.unitOfMeasure.name,\n title: RootConfig.entities.unitOfMeasure.title,\n icon: RootConfig.entities.unitOfMeasure.icon,\n formats: {\n individual: RootConfig.entities.unitOfMeasure.title,\n plural: RootConfig.entities.unitOfMeasure.titlePlural,\n searchResult: {\n title: '{{ title }}',\n description: '{{ context.eval(\"code\") + \" (\" + context.eval(\"symbol\") + \")\" }}',\n },\n },\n plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'disable' }],\n groups: [\n { id: 'basic-info', title: '@measurement-core:units.entities.unit-of-measure.groups.basic-info' },\n { id: 'configuration', title: '@measurement-core:units.entities.unit-of-measure.groups.configuration' },\n ],\n properties: [\n {\n name: 'id',\n title: '@general:terms.common.id',\n groupId: 'basic-info',\n schema: {\n dataType: 'uuid',\n visible: false,\n readonly: true,\n unique: { enabled: true },\n },\n },\n {\n name: 'code',\n title: '@general:terms.common.code',\n groupId: 'basic-info',\n options: {\n sort: { enabled: true },\n filter: {\n advance: { enabled: true },\n inline: { enabled: true },\n },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.TextBox,\n options: {\n placeholder: '@measurement-core:units.entities.unit-of-measure.fields.code.placeholder',\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'title',\n title: '@general:terms.common.title',\n groupId: 'basic-info',\n options: {\n sort: { enabled: true },\n filter: {\n advance: { enabled: true },\n inline: { enabled: true },\n },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.TextBox,\n options: {\n placeholder: '@measurement-core:units.entities.unit-of-measure.fields.title.placeholder',\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'symbol',\n title: '@measurement-core:units.entities.unit-of-measure.fields.symbol.title',\n groupId: 'basic-info',\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true } },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.TextBox,\n options: {\n maxLength: 10,\n placeholder: '@measurement-core:units.entities.unit-of-measure.fields.symbol.placeholder',\n },\n },\n },\n },\n {\n name: 'description',\n title: '@general:terms.common.description',\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LargeTextBox,\n options: {\n rows: 3,\n placeholder: '@measurement-core:units.entities.unit-of-measure.fields.description.placeholder',\n },\n },\n },\n },\n {\n name: 'quantityTypeId',\n title: '@measurement-core:units.entities.unit-of-measure.fields.quantity-type.title',\n groupId: 'configuration',\n options: {\n sort: { enabled: true },\n filter: {\n advance: { enabled: true },\n inline: { enabled: true },\n },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n look: 'select',\n entity: `${RootConfig.module.name}.${RootConfig.entities.quantityType.name}`,\n expose: [\n { source: 'id', target: 'quantityTypeId' },\n { source: 'code', target: 'quantityType.code' },\n { source: 'title', target: 'quantityType.title' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'factorToBase',\n title: '@measurement-core:units.entities.unit-of-measure.fields.factor-to-base.title',\n groupId: 'configuration',\n schema: {\n dataType: 'number',\n interface: {\n type: AXPWidgetsList.Editors.NumberBox,\n options: {\n placeholder: '@measurement-core:units.entities.unit-of-measure.fields.factor-to-base.placeholder',\n },\n },\n },\n },\n {\n name: 'precision',\n title: '@measurement-core:units.entities.unit-of-measure.fields.precision.title',\n groupId: 'configuration',\n schema: {\n dataType: 'number',\n interface: {\n type: AXPWidgetsList.Editors.NumberBox,\n options: {\n minValue: 0,\n maxValue: 10,\n placeholder: '@measurement-core:units.entities.unit-of-measure.fields.precision.placeholder',\n },\n },\n },\n },\n {\n name: 'isBase',\n title: '@measurement-core:units.entities.unit-of-measure.fields.is-base.title',\n groupId: 'configuration',\n schema: {\n dataType: 'boolean',\n interface: {\n type: AXPWidgetsList.Editors.ToggleSwitch,\n options: {\n trulyText: '@general:terms.common.yes-no.yes',\n falsyText: '@general:terms.common.yes-no.no',\n },\n },\n },\n },\n ],\n columns: [\n { name: 'code', options: { width: '120px', order: 1 } },\n { name: 'title', options: { width: '220px', order: 2 } },\n { name: 'symbol', options: { width: '100px', order: 3 } },\n { name: 'quantityTypeId', options: { width: '180px', order: 4 } },\n { name: 'isBase', options: { width: '100px', order: 5 } },\n ],\n interfaces: {\n master: {\n create: {\n sections,\n properties: propertyLayouts,\n },\n update: {\n sections,\n properties: propertyLayouts,\n },\n single: {\n title: '{{ title }}',\n sections,\n properties: propertyLayouts,\n actions: [...entityMasterRecordActions()],\n },\n list: {\n actions: [...entityMasterCrudActions()],\n views: [\n createAllQueryView({\n sorts: [{ name: 'code', dir: 'asc' }],\n }),\n ],\n },\n },\n },\n };\n\n return entityDef;\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAKA;AAEA;AAEO,eAAe,oBAAoB,GAAA;AACxC,IAAA,MAAM,QAAQ,GAAG;AACf,QAAA,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AACpE,QAAA,EAAE,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;KACxE;AAED,IAAA,MAAM,eAAe,GAAG;QACtB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;QACzE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EA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AACD,gBAAA,MAAM,EAAE;oBACN,QAAQ;AACR,oBAAA,UAAU,EAAE,eAAe;AAC5B,iBAAA;AACD,gBAAA,MAAM,EAAE;AACN,oBAAA,KAAK,EAAE,aAAa;oBACpB,QAAQ;AACR,oBAAA,UAAU,EAAE,eAAe;AAC3B,oBAAA,OAAO,EAAE,CAAC,GAAG,yBAAyB,EAAE,CAAC;AAC1C,iBAAA;AACD,gBAAA,IAAI,EAAE;AACJ,oBAAA,OAAO,EAAE,CAAC,GAAG,uBAAuB,EAAE,CAAC;AACvC,oBAAA,KAAK,EAAE;AACL,wBAAA,kBAAkB,CAAC;4BACjB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;yBACtC,CAAC;AACH,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;AAEA;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { m as measurementCoreLocalEntityCatalog } from './acorex-platform-module-measurement-core-client-contracts-entity-catalog-acorex-platform-module-measurement-core-client-contracts-entity-catalog-D_3qAB6g.mjs';
|
|
2
|
+
//# sourceMappingURL=acorex-platform-module-measurement-core-client-contracts-entity-catalog.mjs.map
|
package/fesm2022/acorex-platform-module-measurement-core-client-contracts-entity-catalog.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-measurement-core-client-contracts-entity-catalog.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';
|
|
2
|
+
import { RootConfig } from '@acorex-platform/module-measurement-core-client/contracts';
|
|
3
|
+
export { measurementCoreLocalEntityCatalog } from '@acorex-platform/module-measurement-core-client/contracts/entity-catalog';
|
|
4
|
+
|
|
5
|
+
//#region ----- Imports -----
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region ----- Provide local entities -----
|
|
8
|
+
/**
|
|
9
|
+
* Registers measurement-core layouts on the client from packaged factories.
|
|
10
|
+
* Each `import()` targets a secondary entry so unused entities stay out of the
|
|
11
|
+
* bundle. Do not add this to the demo app; demo continues to load layouts via
|
|
12
|
+
* `Domain:GetEntityLayout`.
|
|
13
|
+
*/
|
|
14
|
+
function provideMeasurementCoreLocalEntities() {
|
|
15
|
+
return provideLocalEntityCatalog({
|
|
16
|
+
moduleName: RootConfig.module.name,
|
|
17
|
+
loaders: {
|
|
18
|
+
[RootConfig.entities.measurementDimension.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/measurement-dimension').then((m) => m.measurementDimensionFactory()),
|
|
19
|
+
[RootConfig.entities.measurementRange.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/measurement-range').then((m) => m.measurementRangeFactory()),
|
|
20
|
+
[RootConfig.entities.quantityType.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/quantity-type').then((m) => m.quantityTypeFactory()),
|
|
21
|
+
[RootConfig.entities.sizeItem.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/size-item').then((m) => m.sizeItemFactory()),
|
|
22
|
+
[RootConfig.entities.sizeRule.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/size-rule').then((m) => m.sizeRuleFactory()),
|
|
23
|
+
[RootConfig.entities.sizingDimensionUsage.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/sizing-dimension-usage').then((m) => m.sizingDimensionUsageFactory()),
|
|
24
|
+
[RootConfig.entities.sizingProfile.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/sizing-profile').then((m) => m.sizingProfileFactory()),
|
|
25
|
+
[RootConfig.entities.unitConversion.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/unit-conversion').then((m) => m.unitConversionFactory()),
|
|
26
|
+
[RootConfig.entities.unitOfMeasure.name]: () => import('@acorex-platform/module-measurement-core-client/contracts/entities/unit-of-measure').then((m) => m.unitOfMeasureFactory()),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Generated bundle index. Do not edit.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
export { provideMeasurementCoreLocalEntities };
|
|
37
|
+
//# sourceMappingURL=acorex-platform-module-measurement-core-client-local-entities.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-measurement-core-client-local-entities.mjs","sources":["../../../../libs/modules/measurement-core/client/src/lib/provide-local-entities.ts","../../../../libs/modules/measurement-core/client/src/lib/acorex-platform-module-measurement-core-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-measurement-core-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers measurement-core layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function provideMeasurementCoreLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.measurementDimension.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/measurement-dimension').then((m) => m.measurementDimensionFactory()),\n [RootConfig.entities.measurementRange.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/measurement-range').then((m) => m.measurementRangeFactory()),\n [RootConfig.entities.quantityType.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/quantity-type').then((m) => m.quantityTypeFactory()),\n [RootConfig.entities.sizeItem.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/size-item').then((m) => m.sizeItemFactory()),\n [RootConfig.entities.sizeRule.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/size-rule').then((m) => m.sizeRuleFactory()),\n [RootConfig.entities.sizingDimensionUsage.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/sizing-dimension-usage').then((m) => m.sizingDimensionUsageFactory()),\n [RootConfig.entities.sizingProfile.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/sizing-profile').then((m) => m.sizingProfileFactory()),\n [RootConfig.entities.unitConversion.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/unit-conversion').then((m) => m.unitConversionFactory()),\n [RootConfig.entities.unitOfMeasure.name]: () =>\n import('@acorex-platform/module-measurement-core-client/contracts/entities/unit-of-measure').then((m) => m.unitOfMeasureFactory()),\n },\n });\n}\n\nexport { measurementCoreLocalEntityCatalog } from '@acorex-platform/module-measurement-core-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,mCAAmC,GAAA;AACjD,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,QAAA,OAAO,EAAE;AACP,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,GAAG,MAC/C,OAAO,0FAA0F,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,2BAA2B,EAAE,CAAC;AACjJ,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,GAAG,MAC3C,OAAO,sFAAsF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,uBAAuB,EAAE,CAAC;AACzI,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,GAAG,MACvC,OAAO,kFAAkF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK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