@acorex-platform/module-measurement-core-client 0.0.21
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.mjs +152 -0
- package/fesm2022/acorex-platform-module-measurement-core-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-measurement-core-client.mjs +213 -0
- package/fesm2022/acorex-platform-module-measurement-core-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-measurement-core-client-contracts.d.ts +334 -0
- package/types/acorex-platform-module-measurement-core-client.d.ts +29 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
const AXMMeasurementCoreMenuKeys = {
|
|
2
|
+
Root: 'measurement-core',
|
|
3
|
+
QuantityTypes: 'measurement-core.quantity-types',
|
|
4
|
+
UnitsOfMeasure: 'measurement-core.units-of-measure',
|
|
5
|
+
UnitConversions: 'measurement-core.unit-conversions',
|
|
6
|
+
MeasurementDimensions: 'measurement-core.measurement-dimensions',
|
|
7
|
+
SizingProfiles: 'measurement-core.sizing-profiles',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Assets & Maintenance capabilities used by this module.
|
|
12
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
13
|
+
*/
|
|
14
|
+
const AXPAssetsMaintenancePermissionKeys = {
|
|
15
|
+
Access: 'AssetsMaintenance:Permission:Access',
|
|
16
|
+
MaintainAssets: 'AssetsMaintenance:Permission:MaintainAssets',
|
|
17
|
+
MaintainMaintenance: 'AssetsMaintenance:Permission:MaintainMaintenance',
|
|
18
|
+
Setup: 'AssetsMaintenance:Permission:Setup',
|
|
19
|
+
};
|
|
20
|
+
const setup = AXPAssetsMaintenancePermissionKeys.Setup;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Prefer {@link AXPAssetsMaintenancePermissionKeys}.
|
|
23
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
24
|
+
*/
|
|
25
|
+
const AXMMeasurementCorePermissionKeys = {
|
|
26
|
+
MeasurementCore: {
|
|
27
|
+
Group: setup,
|
|
28
|
+
QuantityType: {
|
|
29
|
+
Management: setup,
|
|
30
|
+
},
|
|
31
|
+
UnitOfMeasure: {
|
|
32
|
+
Management: setup,
|
|
33
|
+
},
|
|
34
|
+
UnitConversion: {
|
|
35
|
+
Management: setup,
|
|
36
|
+
},
|
|
37
|
+
MeasurementDimension: {
|
|
38
|
+
Management: setup,
|
|
39
|
+
},
|
|
40
|
+
MeasurementRange: {
|
|
41
|
+
Management: setup,
|
|
42
|
+
},
|
|
43
|
+
SizingProfile: {
|
|
44
|
+
Management: setup,
|
|
45
|
+
},
|
|
46
|
+
SizingDimensionUsage: {
|
|
47
|
+
Management: setup,
|
|
48
|
+
},
|
|
49
|
+
SizeItem: {
|
|
50
|
+
Management: setup,
|
|
51
|
+
},
|
|
52
|
+
SizeRule: {
|
|
53
|
+
Management: setup,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const config = {
|
|
59
|
+
i18n: 'measurement-core',
|
|
60
|
+
module: 'MeasurementCore',
|
|
61
|
+
};
|
|
62
|
+
const RootConfig = {
|
|
63
|
+
config,
|
|
64
|
+
module: {
|
|
65
|
+
name: config.module,
|
|
66
|
+
title: `@${config.i18n}:module.title`,
|
|
67
|
+
icon: 'fa-light fa-ruler-combined',
|
|
68
|
+
},
|
|
69
|
+
entities: {
|
|
70
|
+
quantityType: {
|
|
71
|
+
name: 'QuantityType',
|
|
72
|
+
title: `@${config.i18n}:quantity-types.entities.quantity-type.title`,
|
|
73
|
+
titlePlural: `@${config.i18n}:quantity-types.entities.quantity-type.plural`,
|
|
74
|
+
icon: 'fa-light fa-calculator',
|
|
75
|
+
},
|
|
76
|
+
unitOfMeasure: {
|
|
77
|
+
name: 'UnitOfMeasure',
|
|
78
|
+
title: `@${config.i18n}:units.entities.unit-of-measure.title`,
|
|
79
|
+
titlePlural: `@${config.i18n}:units.entities.unit-of-measure.plural`,
|
|
80
|
+
icon: 'fa-light fa-ruler',
|
|
81
|
+
},
|
|
82
|
+
unitConversion: {
|
|
83
|
+
name: 'UnitConversion',
|
|
84
|
+
title: `@${config.i18n}:conversions.entities.unit-conversion.title`,
|
|
85
|
+
titlePlural: `@${config.i18n}:conversions.entities.unit-conversion.plural`,
|
|
86
|
+
icon: 'fa-light fa-arrows-rotate',
|
|
87
|
+
},
|
|
88
|
+
measurementDimension: {
|
|
89
|
+
name: 'MeasurementDimension',
|
|
90
|
+
title: `@${config.i18n}:dimensions.entities.measurement-dimension.title`,
|
|
91
|
+
titlePlural: `@${config.i18n}:dimensions.entities.measurement-dimension.plural`,
|
|
92
|
+
icon: 'fa-light fa-cube',
|
|
93
|
+
},
|
|
94
|
+
measurementRange: {
|
|
95
|
+
name: 'MeasurementRange',
|
|
96
|
+
title: `@${config.i18n}:ranges.entities.measurement-range.title`,
|
|
97
|
+
titlePlural: `@${config.i18n}:ranges.entities.measurement-range.plural`,
|
|
98
|
+
icon: 'fa-light fa-chart-line-up',
|
|
99
|
+
},
|
|
100
|
+
sizingProfile: {
|
|
101
|
+
name: 'SizingProfile',
|
|
102
|
+
title: `@${config.i18n}:sizes.entities.sizing-profile.title`,
|
|
103
|
+
titlePlural: `@${config.i18n}:sizes.entities.sizing-profile.plural`,
|
|
104
|
+
icon: 'fa-light fa-chart-column',
|
|
105
|
+
},
|
|
106
|
+
sizingDimensionUsage: {
|
|
107
|
+
name: 'SizingDimensionUsage',
|
|
108
|
+
title: `@${config.i18n}:sizes.entities.sizing-dimension-usage.title`,
|
|
109
|
+
titlePlural: `@${config.i18n}:sizes.entities.sizing-dimension-usage.plural`,
|
|
110
|
+
icon: 'fa-light fa-columns',
|
|
111
|
+
},
|
|
112
|
+
sizeItem: {
|
|
113
|
+
name: 'SizeItem',
|
|
114
|
+
title: `@${config.i18n}:sizes.entities.size-item.title`,
|
|
115
|
+
titlePlural: `@${config.i18n}:sizes.entities.size-item.plural`,
|
|
116
|
+
icon: 'fa-light fa-list',
|
|
117
|
+
},
|
|
118
|
+
sizeRule: {
|
|
119
|
+
name: 'SizeRule',
|
|
120
|
+
title: `@${config.i18n}:sizes.entities.size-rule.title`,
|
|
121
|
+
titlePlural: `@${config.i18n}:sizes.entities.size-rule.plural`,
|
|
122
|
+
icon: 'fa-light fa-grip',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
|
|
129
|
+
//#endregion
|
|
130
|
+
|
|
131
|
+
//#endregion
|
|
132
|
+
|
|
133
|
+
//#endregion
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
|
|
139
|
+
//#endregion
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
|
|
143
|
+
//#endregion
|
|
144
|
+
|
|
145
|
+
//#region ---- Contracts barrel ----
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Generated bundle index. Do not edit.
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
export { AXMMeasurementCoreMenuKeys, AXMMeasurementCorePermissionKeys, AXPAssetsMaintenancePermissionKeys, RootConfig };
|
|
152
|
+
//# sourceMappingURL=acorex-platform-module-measurement-core-client-contracts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-measurement-core-client-contracts.mjs","sources":["../../../../libs/modules/measurement-core/contracts/src/menu.keys.ts","../../../../libs/modules/measurement-core/contracts/src/permission.keys.ts","../../../../libs/modules/measurement-core/contracts/src/root-config.ts","../../../../libs/modules/measurement-core/contracts/src/entities/measurement-dimension/measurement-dimension.types.ts","../../../../libs/modules/measurement-core/contracts/src/entities/measurement-range/measurement-range.types.ts","../../../../libs/modules/measurement-core/contracts/src/entities/quantity-type/quantity-type.types.ts","../../../../libs/modules/measurement-core/contracts/src/entities/size-item/size-item.types.ts","../../../../libs/modules/measurement-core/contracts/src/entities/size-rule/size-rule.types.ts","../../../../libs/modules/measurement-core/contracts/src/entities/sizing-dimension-usage/sizing-dimension-usage.types.ts","../../../../libs/modules/measurement-core/contracts/src/entities/sizing-profile/sizing-profile.types.ts","../../../../libs/modules/measurement-core/contracts/src/entities/unit-conversion/unit-conversion.types.ts","../../../../libs/modules/measurement-core/contracts/src/entities/unit-of-measure/unit-of-measure.types.ts","../../../../libs/modules/measurement-core/contracts/src/index.ts","../../../../libs/modules/measurement-core/contracts/src/acorex-platform-module-measurement-core-client-contracts.ts"],"sourcesContent":["export const AXMMeasurementCoreMenuKeys = {\n Root: 'measurement-core',\n QuantityTypes: 'measurement-core.quantity-types',\n UnitsOfMeasure: 'measurement-core.units-of-measure',\n UnitConversions: 'measurement-core.unit-conversions',\n MeasurementDimensions: 'measurement-core.measurement-dimensions',\n SizingProfiles: 'measurement-core.sizing-profiles',\n} as const;\n","/**\n * Assets & Maintenance capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPAssetsMaintenancePermissionKeys = {\n Access: 'AssetsMaintenance:Permission:Access',\n MaintainAssets: 'AssetsMaintenance:Permission:MaintainAssets',\n MaintainMaintenance: 'AssetsMaintenance:Permission:MaintainMaintenance',\n Setup: 'AssetsMaintenance:Permission:Setup',\n} as const;\n\nconst setup = AXPAssetsMaintenancePermissionKeys.Setup;\n\n/**\n * @deprecated Prefer {@link AXPAssetsMaintenancePermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMMeasurementCorePermissionKeys = {\n MeasurementCore: {\n Group: setup,\n QuantityType: {\n Management: setup,\n },\n UnitOfMeasure: {\n Management: setup,\n },\n UnitConversion: {\n Management: setup,\n },\n MeasurementDimension: {\n Management: setup,\n },\n MeasurementRange: {\n Management: setup,\n },\n SizingProfile: {\n Management: setup,\n },\n SizingDimensionUsage: {\n Management: setup,\n },\n SizeItem: {\n Management: setup,\n },\n SizeRule: {\n Management: setup,\n },\n },\n} as const;\n","const config = {\n i18n: 'measurement-core',\n module: 'MeasurementCore',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-ruler-combined',\n },\n entities: {\n quantityType: {\n name: 'QuantityType',\n title: `@${config.i18n}:quantity-types.entities.quantity-type.title`,\n titlePlural: `@${config.i18n}:quantity-types.entities.quantity-type.plural`,\n icon: 'fa-light fa-calculator',\n },\n unitOfMeasure: {\n name: 'UnitOfMeasure',\n title: `@${config.i18n}:units.entities.unit-of-measure.title`,\n titlePlural: `@${config.i18n}:units.entities.unit-of-measure.plural`,\n icon: 'fa-light fa-ruler',\n },\n unitConversion: {\n name: 'UnitConversion',\n title: `@${config.i18n}:conversions.entities.unit-conversion.title`,\n titlePlural: `@${config.i18n}:conversions.entities.unit-conversion.plural`,\n icon: 'fa-light fa-arrows-rotate',\n },\n measurementDimension: {\n name: 'MeasurementDimension',\n title: `@${config.i18n}:dimensions.entities.measurement-dimension.title`,\n titlePlural: `@${config.i18n}:dimensions.entities.measurement-dimension.plural`,\n icon: 'fa-light fa-cube',\n },\n measurementRange: {\n name: 'MeasurementRange',\n title: `@${config.i18n}:ranges.entities.measurement-range.title`,\n titlePlural: `@${config.i18n}:ranges.entities.measurement-range.plural`,\n icon: 'fa-light fa-chart-line-up',\n },\n sizingProfile: {\n name: 'SizingProfile',\n title: `@${config.i18n}:sizes.entities.sizing-profile.title`,\n titlePlural: `@${config.i18n}:sizes.entities.sizing-profile.plural`,\n icon: 'fa-light fa-chart-column',\n },\n sizingDimensionUsage: {\n name: 'SizingDimensionUsage',\n title: `@${config.i18n}:sizes.entities.sizing-dimension-usage.title`,\n titlePlural: `@${config.i18n}:sizes.entities.sizing-dimension-usage.plural`,\n icon: 'fa-light fa-columns',\n },\n sizeItem: {\n name: 'SizeItem',\n title: `@${config.i18n}:sizes.entities.size-item.title`,\n titlePlural: `@${config.i18n}:sizes.entities.size-item.plural`,\n icon: 'fa-light fa-list',\n },\n sizeRule: {\n name: 'SizeRule',\n title: `@${config.i18n}:sizes.entities.size-rule.title`,\n titlePlural: `@${config.i18n}:sizes.entities.size-rule.plural`,\n icon: 'fa-light fa-grip',\n },\n },\n} as const;\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Measurement Dimension Model ----\n\nexport interface AXMMeasurementCoreMeasurementDimensionEntityModel extends AXPEntityModel<string> {\n code: string;\n title: AXPMultiLanguageString;\n /** FK -> QuantityType */\n quantityTypeId: string;\n quantityType?: { id: string; code: string; title: AXPMultiLanguageString };\n /** Default unit for UI (optional) */\n defaultUomId?: string | null;\n defaultUom?: { id: string; title: AXPMultiLanguageString; symbol?: string | null };\n description?: AXPMultiLanguageString | null;\n isDisabled?: boolean;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Measurement Range Model ----\nexport type AXMMeasurementCoreRangeType = 'acceptable' | 'preferred' | 'tolerance' | 'ideal';\nexport type AXMMeasurementCoreBoundType = 'closed' | 'open' | 'leftClosed' | 'rightClosed';\n\nexport interface AXMMeasurementCoreMeasurementRangeEntityModel extends AXPEntityModel<string> {\n /** FK -> MeasurementDimension */\n measurementDimensionId: string;\n measurementDimension?: { id: string; code: string; title: AXPMultiLanguageString };\n /** Optional code for display/identification */\n code?: string | null;\n /** Optional title for display */\n title?: AXPMultiLanguageString | null;\n description?: AXPMultiLanguageString | null;\n /** Range endpoints */\n min?: number | null;\n max?: number | null;\n /** Optional nominal value (useful for scoring/tolerance) */\n target?: number | null;\n /** Unit for min/max/target */\n uomId: string;\n unit?: { title: AXPMultiLanguageString; symbol?: string | null };\n /** Semantic meaning of this range */\n rangeType?: AXMMeasurementCoreRangeType | null;\n /** Inclusivity of bounds */\n boundType?: AXMMeasurementCoreBoundType | null;\n /** Optional granularity (e.g., shoes step 0.5) */\n step?: number | null;\n /** Optional ordering/precedence */\n priority?: number | null;\n /** If true, the range is intended for reuse across charts/rules */\n isReusable?: boolean;\n isDisabled?: boolean;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Quantity Type Model ----\n\nexport interface AXMMeasurementCoreQuantityTypeEntityModel extends AXPEntityModel<string> {\n code: string;\n title: AXPMultiLanguageString;\n /** Base unit for this quantity type (optional but recommended) */\n baseUomId?: string | null;\n baseUnit?: { title: AXPMultiLanguageString; symbol?: string | null };\n description?: AXPMultiLanguageString | null;\n isDisabled?: boolean;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Size Item Model ----\n\nexport interface AXMMeasurementCoreSizeItemEntityModel extends AXPEntityModel<string> {\n sizeChartId: string;\n sizeChart?: { id: string; code: string; title: AXPMultiLanguageString };\n code: string;\n title?: AXPMultiLanguageString | null;\n sortOrder?: number | null;\n isDisabled?: boolean;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Size Rule Model ----\nexport type AXMMeasurementCoreRuleMatchBehavior = 'hard' | 'soft' | 'scoring';\n\nexport interface AXMMeasurementCoreSizeRuleEntityModel extends AXPEntityModel<string> {\n /** Sizing profile for filtering and performance; rules are scoped to a profile. */\n sizeChartId: string;\n sizeChart?: { id: string; code: string; title: AXPMultiLanguageString };\n sizeItemId: string;\n sizeItem?: { id: string; code: string; title?: AXPMultiLanguageString | null };\n measurementDimensionId: string;\n measurementDimension?: { id: string; code: string; title: AXPMultiLanguageString };\n measurementRangeId: string;\n measurementRange?: { id: string; code?: string | null; title?: AXPMultiLanguageString | null };\n /** Optional matching behavior */\n matchBehavior?: AXMMeasurementCoreRuleMatchBehavior | null;\n /** Optional priority within a size item */\n priority?: number | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Sizing Dimension Usage Model ----\n\nexport interface AXMMeasurementCoreSizingDimensionUsageEntityModel extends AXPEntityModel<string> {\n sizeChartId: string;\n sizeChart?: { id: string; code: string; title: AXPMultiLanguageString };\n measurementDimensionId: string;\n measurementDimension?: { id: string; code: string; title: AXPMultiLanguageString };\n /** Required dimensions must be satisfied for a match */\n required?: boolean;\n /** Primary dimension used for primary-first matching (at most one true recommended) */\n primary?: boolean;\n /** Sorting/order of columns in the matrix */\n sortOrder?: number | null;\n /** Optional tie-break priority (lower = higher priority) */\n priority?: number | null;\n}\n\n//#endregion\n","import { AXPCategoryListItem, AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Sizing Profile Model ----\n\nexport type AXMMeasurementCoreSizeMatchStrategy = 'primary-first' | 'all-required';\n\nexport interface AXMMeasurementCoreSizingProfileEntityModel extends AXPEntityModel<string> {\n code: string;\n title: AXPMultiLanguageString;\n categoryIds?: string[];\n categories?: AXPCategoryListItem[];\n regionId?: string | null;\n region?: { id: string; title: string } | null;\n matchStrategy?: AXMMeasurementCoreSizeMatchStrategy | null;\n enforceNoOverlap?: boolean;\n description?: AXPMultiLanguageString | null;\n isDisabled?: boolean;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Unit Conversion Model ----\nexport type AXMMeasurementCoreConversionOperator = 'multiply' | 'divide';\n\nexport interface AXMMeasurementCoreUnitConversionEntityModel extends AXPEntityModel<string> {\n code?: string | null;\n /** Optional display title (e.g. \"Box to Piece\") */\n title?: AXPMultiLanguageString | null;\n fromUomId: string;\n toUomId: string;\n /** Conversion factor: value_in_to = value_in_from * factor (when operator is multiply) */\n factor: number;\n operator?: AXMMeasurementCoreConversionOperator | null;\n description?: AXPMultiLanguageString | null;\n fromUnit?: { title: AXPMultiLanguageString; symbol?: string | null };\n toUnit?: { title: AXPMultiLanguageString; symbol?: string | null };\n isDisabled?: boolean;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Unit of Measure Model ----\n\nexport interface AXMMeasurementCoreUnitOfMeasureEntityModel extends AXPEntityModel<string> {\n code: string;\n title: AXPMultiLanguageString;\n /** FK -> QuantityType */\n quantityTypeId: string;\n quantityType?: { id: string; code: string; title: AXPMultiLanguageString };\n /**\n * Optional conversion factor to the base unit of the QuantityType.\n * Example: if base is mm, then cm.factorToBase = 10\n */\n factorToBase?: number | null;\n /** Suggested decimal precision for input/display */\n precision?: number | null;\n /** True if this is the base unit */\n isBase?: boolean;\n symbol?: string | null;\n description?: AXPMultiLanguageString | null;\n isDisabled?: boolean;\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './menu.keys';\nexport * from './permission.keys';\n\nexport * from './root-config';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAO,MAAM,0BAA0B,GAAG;AACxC,IAAA,IAAI,EAAE,kBAAkB;AACxB,IAAA,aAAa,EAAE,iCAAiC;AAChD,IAAA,cAAc,EAAE,mCAAmC;AACnD,IAAA,eAAe,EAAE,mCAAmC;AACpD,IAAA,qBAAqB,EAAE,yCAAyC;AAChE,IAAA,cAAc,EAAE,kCAAkC;;;ACNpD;;;AAGG;AACI,MAAM,kCAAkC,GAAG;AAChD,IAAA,MAAM,EAAE,qCAAqC;AAC7C,IAAA,cAAc,EAAE,6CAA6C;AA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gModule } from '@angular/core';
|
|
3
|
+
import { AXP_MODULE_MANIFEST_PROVIDER } from '@acorex-platform/framework-client/core';
|
|
4
|
+
import { RootConfig, AXPAssetsMaintenancePermissionKeys, AXMMeasurementCoreMenuKeys } from '@acorex-platform/module-measurement-core-client/contracts';
|
|
5
|
+
import { createEntityCommandOptions, AXPSearchCommandProvider, AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex-platform/framework-client/common';
|
|
6
|
+
import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';
|
|
7
|
+
import { AXPCommonPermissionGroupKeys, AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';
|
|
8
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
9
|
+
|
|
10
|
+
//#region ---- Imports ----
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ---- Manifest Definition ----
|
|
13
|
+
/**
|
|
14
|
+
* Measurement Core Module Manifest.
|
|
15
|
+
* Defines module metadata, features, and provider references.
|
|
16
|
+
*/
|
|
17
|
+
const MeasurementCoreManifest = {
|
|
18
|
+
name: RootConfig.module.name,
|
|
19
|
+
version: '1.0.0',
|
|
20
|
+
title: RootConfig.module.title,
|
|
21
|
+
icon: RootConfig.module.icon,
|
|
22
|
+
i18n: RootConfig.config.i18n,
|
|
23
|
+
type: 'domain',
|
|
24
|
+
domain: 'data',
|
|
25
|
+
// Module dependencies (optional)
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region ----- Permission Definition Provider -----
|
|
31
|
+
/**
|
|
32
|
+
* Ensures Assets & Maintenance root exists for measurement-core.
|
|
33
|
+
*/
|
|
34
|
+
class AXMMeasurementCorePermissionDefinitionProvider {
|
|
35
|
+
async define(context) {
|
|
36
|
+
const groups = AXPCommonPermissionGroupKeys;
|
|
37
|
+
const G = '@common:permission-groups';
|
|
38
|
+
context.addGroup(groups.AssetsMaintenance.Root, `${G}.assets-maintenance.title`, `${G}.assets-maintenance.description`, { order: 70 });
|
|
39
|
+
}
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMeasurementCorePermissionDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
41
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMeasurementCorePermissionDefinitionProvider }); }
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMeasurementCorePermissionDefinitionProvider, decorators: [{
|
|
44
|
+
type: Injectable
|
|
45
|
+
}] });
|
|
46
|
+
|
|
47
|
+
//#region ---- Imports ----
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region ---- Menu Provider ----
|
|
50
|
+
class AXMMeasurementCoreMenuProvider {
|
|
51
|
+
constructor() {
|
|
52
|
+
this.entityService = inject(AXPEntityService);
|
|
53
|
+
}
|
|
54
|
+
async provide(context) {
|
|
55
|
+
const module = RootConfig.module;
|
|
56
|
+
const keys = AXPAssetsMaintenancePermissionKeys;
|
|
57
|
+
context.find(AXPCommonMenuKeys.Configuration).addItems([
|
|
58
|
+
{
|
|
59
|
+
name: AXMMeasurementCoreMenuKeys.Root,
|
|
60
|
+
priority: 8800,
|
|
61
|
+
text: '@measurement-core:module.menus.root.title',
|
|
62
|
+
icon: module.icon,
|
|
63
|
+
policy: {
|
|
64
|
+
features: [module.name],
|
|
65
|
+
permissions: [keys.Setup],
|
|
66
|
+
},
|
|
67
|
+
children: [
|
|
68
|
+
{
|
|
69
|
+
name: AXMMeasurementCoreMenuKeys.QuantityTypes,
|
|
70
|
+
text: RootConfig.entities.quantityType.titlePlural,
|
|
71
|
+
icon: RootConfig.entities.quantityType.icon,
|
|
72
|
+
priority: 1,
|
|
73
|
+
path: this.entityService.createPath(module.name, RootConfig.entities.quantityType.name),
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: AXMMeasurementCoreMenuKeys.UnitsOfMeasure,
|
|
77
|
+
text: RootConfig.entities.unitOfMeasure.titlePlural,
|
|
78
|
+
icon: RootConfig.entities.unitOfMeasure.icon,
|
|
79
|
+
priority: 2,
|
|
80
|
+
path: this.entityService.createPath(module.name, RootConfig.entities.unitOfMeasure.name),
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: AXMMeasurementCoreMenuKeys.UnitConversions,
|
|
84
|
+
text: RootConfig.entities.unitConversion.titlePlural,
|
|
85
|
+
icon: RootConfig.entities.unitConversion.icon,
|
|
86
|
+
priority: 3,
|
|
87
|
+
path: this.entityService.createPath(module.name, RootConfig.entities.unitConversion.name),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: AXMMeasurementCoreMenuKeys.MeasurementDimensions,
|
|
91
|
+
text: RootConfig.entities.measurementDimension.titlePlural,
|
|
92
|
+
icon: RootConfig.entities.measurementDimension.icon,
|
|
93
|
+
priority: 4,
|
|
94
|
+
path: this.entityService.createPath(module.name, RootConfig.entities.measurementDimension.name),
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: AXMMeasurementCoreMenuKeys.SizingProfiles,
|
|
98
|
+
text: RootConfig.entities.sizingProfile.titlePlural,
|
|
99
|
+
icon: RootConfig.entities.sizingProfile.icon,
|
|
100
|
+
priority: 5,
|
|
101
|
+
path: this.entityService.createPath(module.name, RootConfig.entities.sizingProfile.name),
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
]);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
|
|
110
|
+
//#region ---- Imports ----
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region ---- Search Command Provider ----
|
|
113
|
+
function cmd(id, entityKey, e, title, desc) {
|
|
114
|
+
return {
|
|
115
|
+
id,
|
|
116
|
+
group: 'command',
|
|
117
|
+
title: title ?? e.title,
|
|
118
|
+
icon: e.icon,
|
|
119
|
+
description: desc ?? e.titlePlural ?? e.title,
|
|
120
|
+
command: {
|
|
121
|
+
name: 'Entity:Create',
|
|
122
|
+
options: createEntityCommandOptions(entityKey, {
|
|
123
|
+
name: e.name,
|
|
124
|
+
module: RootConfig.module.name,
|
|
125
|
+
title: e.title,
|
|
126
|
+
}),
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
class AXMMeasurementCoreSearchCommandProvider extends AXPSearchCommandProvider {
|
|
131
|
+
constructor() {
|
|
132
|
+
super(...arguments);
|
|
133
|
+
this.commands = [
|
|
134
|
+
cmd('create-quantity-type', `${RootConfig.module.name}.${RootConfig.entities.quantityType.name}`, RootConfig.entities.quantityType, '@measurement-core:quantity-types.search.create-quantity-type.title', '@measurement-core:quantity-types.search.create-quantity-type.description'),
|
|
135
|
+
cmd('create-unit-of-measure', `${RootConfig.module.name}.${RootConfig.entities.unitOfMeasure.name}`, RootConfig.entities.unitOfMeasure, '@measurement-core:units.search.create-unit-of-measure.title', '@measurement-core:units.search.create-unit-of-measure.description'),
|
|
136
|
+
cmd('create-unit-conversion', `${RootConfig.module.name}.${RootConfig.entities.unitConversion.name}`, RootConfig.entities.unitConversion, '@measurement-core:conversions.search.create-unit-conversion.title', '@measurement-core:conversions.search.create-unit-conversion.description'),
|
|
137
|
+
cmd('create-measurement-dimension', `${RootConfig.module.name}.${RootConfig.entities.measurementDimension.name}`, RootConfig.entities.measurementDimension),
|
|
138
|
+
cmd('create-measurement-range', `${RootConfig.module.name}.${RootConfig.entities.measurementRange.name}`, RootConfig.entities.measurementRange),
|
|
139
|
+
cmd('create-sizing-profile', `${RootConfig.module.name}.${RootConfig.entities.sizingProfile.name}`, RootConfig.entities.sizingProfile, '@measurement-core:sizes.search.create-sizing-profile.title', '@measurement-core:sizes.search.create-sizing-profile.description'),
|
|
140
|
+
cmd('create-size-item', `${RootConfig.module.name}.${RootConfig.entities.sizeItem.name}`, RootConfig.entities.sizeItem, '@measurement-core:sizes.search.create-size-item.title', '@measurement-core:sizes.search.create-size-item.description'),
|
|
141
|
+
];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
|
|
146
|
+
//#region ---- Imports ----
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region ---- Module ----
|
|
149
|
+
class AXMMeasurementCoreModule {
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMeasurementCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
151
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXMMeasurementCoreModule }); }
|
|
152
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMeasurementCoreModule, providers: [
|
|
153
|
+
// Module Manifest Provider
|
|
154
|
+
{
|
|
155
|
+
provide: AXP_MODULE_MANIFEST_PROVIDER,
|
|
156
|
+
useValue: MeasurementCoreManifest,
|
|
157
|
+
multi: true,
|
|
158
|
+
},
|
|
159
|
+
// Provider references (now using tokens)
|
|
160
|
+
{
|
|
161
|
+
provide: AXP_PERMISSION_DEFINITION_PROVIDER,
|
|
162
|
+
useClass: AXMMeasurementCorePermissionDefinitionProvider,
|
|
163
|
+
multi: true,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
provide: AXP_MENU_PROVIDER,
|
|
167
|
+
useClass: AXMMeasurementCoreMenuProvider,
|
|
168
|
+
multi: true,
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
provide: AXP_SEARCH_PROVIDER,
|
|
172
|
+
useClass: AXMMeasurementCoreSearchCommandProvider,
|
|
173
|
+
multi: true,
|
|
174
|
+
},
|
|
175
|
+
] }); }
|
|
176
|
+
}
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMeasurementCoreModule, decorators: [{
|
|
178
|
+
type: NgModule,
|
|
179
|
+
args: [{
|
|
180
|
+
imports: [],
|
|
181
|
+
providers: [
|
|
182
|
+
// Module Manifest Provider
|
|
183
|
+
{
|
|
184
|
+
provide: AXP_MODULE_MANIFEST_PROVIDER,
|
|
185
|
+
useValue: MeasurementCoreManifest,
|
|
186
|
+
multi: true,
|
|
187
|
+
},
|
|
188
|
+
// Provider references (now using tokens)
|
|
189
|
+
{
|
|
190
|
+
provide: AXP_PERMISSION_DEFINITION_PROVIDER,
|
|
191
|
+
useClass: AXMMeasurementCorePermissionDefinitionProvider,
|
|
192
|
+
multi: true,
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
provide: AXP_MENU_PROVIDER,
|
|
196
|
+
useClass: AXMMeasurementCoreMenuProvider,
|
|
197
|
+
multi: true,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
provide: AXP_SEARCH_PROVIDER,
|
|
201
|
+
useClass: AXMMeasurementCoreSearchCommandProvider,
|
|
202
|
+
multi: true,
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
}]
|
|
206
|
+
}] });
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Generated bundle index. Do not edit.
|
|
210
|
+
*/
|
|
211
|
+
|
|
212
|
+
export { AXMMeasurementCoreMenuProvider, AXMMeasurementCoreModule, AXMMeasurementCorePermissionDefinitionProvider, AXMMeasurementCoreSearchCommandProvider };
|
|
213
|
+
//# sourceMappingURL=acorex-platform-module-measurement-core-client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-measurement-core-client.mjs","sources":["../../../../libs/modules/measurement-core/client/src/lib/manifest.ts","../../../../libs/modules/measurement-core/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/measurement-core/client/src/lib/menu.provider.ts","../../../../libs/modules/measurement-core/client/src/lib/search-command.provider.ts","../../../../libs/modules/measurement-core/client/src/lib/measurement-core.module.ts","../../../../libs/modules/measurement-core/client/src/acorex-platform-module-measurement-core-client.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/module-measurement-core-client/contracts';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Measurement Core Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const MeasurementCoreManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n\n type: 'domain',\n domain: 'data',\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ----- Imports -----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Permission Definition Provider -----\n\n/**\n * Ensures Assets & Maintenance root exists for measurement-core.\n */\n@Injectable()\nexport class AXMMeasurementCorePermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const groups = AXPCommonPermissionGroupKeys;\n const G = '@common:permission-groups';\n\n context.addGroup(groups.AssetsMaintenance.Root, `${G}.assets-maintenance.title`, `${G}.assets-maintenance.description`, { order: 70 });\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject } from '@angular/core';\nimport {\n AXPCommonMenuKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport {\n RootConfig,\n AXPAssetsMaintenancePermissionKeys\n} from '@acorex-platform/module-measurement-core-client/contracts';\nimport { AXMMeasurementCoreMenuKeys } from '@acorex-platform/module-measurement-core-client/contracts';\n\n//#endregion\n\n//#region ---- Menu Provider ----\n\nexport class AXMMeasurementCoreMenuProvider implements AXPMenuProvider {\n private readonly entityService = inject(AXPEntityService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n const keys = AXPAssetsMaintenancePermissionKeys;\n\n context.find(AXPCommonMenuKeys.Configuration).addItems([\n {\n name: AXMMeasurementCoreMenuKeys.Root,\n priority: 8800,\n text: '@measurement-core:module.menus.root.title',\n icon: module.icon,\n policy: {\n features: [module.name],\n permissions: [keys.Setup],\n },\n children: [\n {\n name: AXMMeasurementCoreMenuKeys.QuantityTypes,\n text: RootConfig.entities.quantityType.titlePlural,\n icon: RootConfig.entities.quantityType.icon,\n priority: 1,\n path: this.entityService.createPath(module.name, RootConfig.entities.quantityType.name),\n },\n {\n name: AXMMeasurementCoreMenuKeys.UnitsOfMeasure,\n text: RootConfig.entities.unitOfMeasure.titlePlural,\n icon: RootConfig.entities.unitOfMeasure.icon,\n priority: 2,\n path: this.entityService.createPath(module.name, RootConfig.entities.unitOfMeasure.name),\n },\n {\n name: AXMMeasurementCoreMenuKeys.UnitConversions,\n text: RootConfig.entities.unitConversion.titlePlural,\n icon: RootConfig.entities.unitConversion.icon,\n priority: 3,\n path: this.entityService.createPath(module.name, RootConfig.entities.unitConversion.name),\n },\n {\n name: AXMMeasurementCoreMenuKeys.MeasurementDimensions,\n text: RootConfig.entities.measurementDimension.titlePlural,\n icon: RootConfig.entities.measurementDimension.icon,\n priority: 4,\n path: this.entityService.createPath(module.name, RootConfig.entities.measurementDimension.name),\n },\n {\n name: AXMMeasurementCoreMenuKeys.SizingProfiles,\n text: RootConfig.entities.sizingProfile.titlePlural,\n icon: RootConfig.entities.sizingProfile.icon,\n priority: 5,\n path: this.entityService.createPath(module.name, RootConfig.entities.sizingProfile.name),\n },\n ],\n },\n ]);\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPSearchCommandProvider, AXPSearchResult, createEntityCommandOptions } from '@acorex-platform/framework-client/common';\nimport { RootConfig } from '@acorex-platform/module-measurement-core-client/contracts';\n\n//#endregion\n\n//#region ---- Search Command Provider ----\n\nfunction cmd(\n id: string,\n entityKey: string,\n e: { name: string; title: string; titlePlural?: string; icon: string },\n title?: string,\n desc?: string\n) {\n return {\n id,\n group: 'command' as const,\n title: title ?? e.title,\n icon: e.icon,\n description: desc ?? e.titlePlural ?? e.title,\n command: {\n name: 'Entity:Create' as const,\n options: createEntityCommandOptions(entityKey, {\n name: e.name,\n module: RootConfig.module.name,\n title: e.title,\n }),\n },\n };\n}\n\nexport class AXMMeasurementCoreSearchCommandProvider extends AXPSearchCommandProvider {\n commands: AXPSearchResult[] = [\n cmd(\n 'create-quantity-type',\n `${RootConfig.module.name}.${RootConfig.entities.quantityType.name}`,\n RootConfig.entities.quantityType,\n '@measurement-core:quantity-types.search.create-quantity-type.title',\n '@measurement-core:quantity-types.search.create-quantity-type.description'\n ),\n cmd(\n 'create-unit-of-measure',\n `${RootConfig.module.name}.${RootConfig.entities.unitOfMeasure.name}`,\n RootConfig.entities.unitOfMeasure,\n '@measurement-core:units.search.create-unit-of-measure.title',\n '@measurement-core:units.search.create-unit-of-measure.description'\n ),\n cmd(\n 'create-unit-conversion',\n `${RootConfig.module.name}.${RootConfig.entities.unitConversion.name}`,\n RootConfig.entities.unitConversion,\n '@measurement-core:conversions.search.create-unit-conversion.title',\n '@measurement-core:conversions.search.create-unit-conversion.description'\n ),\n cmd(\n 'create-measurement-dimension',\n `${RootConfig.module.name}.${RootConfig.entities.measurementDimension.name}`,\n RootConfig.entities.measurementDimension\n ),\n cmd(\n 'create-measurement-range',\n `${RootConfig.module.name}.${RootConfig.entities.measurementRange.name}`,\n RootConfig.entities.measurementRange\n ),\n cmd(\n 'create-sizing-profile',\n `${RootConfig.module.name}.${RootConfig.entities.sizingProfile.name}`,\n RootConfig.entities.sizingProfile,\n '@measurement-core:sizes.search.create-sizing-profile.title',\n '@measurement-core:sizes.search.create-sizing-profile.description'\n ),\n cmd(\n 'create-size-item',\n `${RootConfig.module.name}.${RootConfig.entities.sizeItem.name}`,\n RootConfig.entities.sizeItem,\n '@measurement-core:sizes.search.create-size-item.title',\n '@measurement-core:sizes.search.create-size-item.description'\n ),\n ];\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { NgModule } from '@angular/core';\nimport { AXP_MODULE_MANIFEST_PROVIDER } from '@acorex-platform/framework-client/core';\nimport { MeasurementCoreManifest } from './manifest';\nimport { AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\nimport { AXMMeasurementCorePermissionDefinitionProvider } from './permission-definition.provider';\nimport { AXMMeasurementCoreMenuProvider } from './menu.provider';\n\nimport { AXMMeasurementCoreSearchCommandProvider } from './search-command.provider';\n\n//#endregion\n\n//#region ---- Module ----\n\n@NgModule({\n imports: [],\n providers: [\n // Module Manifest Provider\n {\n provide: AXP_MODULE_MANIFEST_PROVIDER,\n useValue: MeasurementCoreManifest,\n multi: true,\n },\n // Provider references (now using tokens)\n {\n provide: AXP_PERMISSION_DEFINITION_PROVIDER,\n useClass: AXMMeasurementCorePermissionDefinitionProvider,\n multi: true,\n },\n {\n provide: AXP_MENU_PROVIDER,\n useClass: AXMMeasurementCoreMenuProvider,\n multi: true,\n },\n \n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXMMeasurementCoreSearchCommandProvider,\n multi: true,\n },\n ],\n})\nexport class AXMMeasurementCoreModule { }\n\n//#endregion\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAKA;AAEA;AAEA;;;AAGG;AACI,MAAM,uBAAuB,GAAsB;AACxD,IAAA,IAAI,EAAE,UAAU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O,EAAE,kCAAkC;AAC3C,gBAAA,QAAQ,EAAE,8CAA8C;AACxD,gBAAA,KAAK,EAAE,IAAI;AACd,aAAA;AACD,YAAA;AACI,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,QAAQ,EAAE,8BAA8B;AACxC,gBAAA,KAAK,EAAE,IAAI;AACd,aAAA;AAED,YAAA;AACI,gBAAA,OAAO,EAAE,mBAAmB;AAC5B,gBAAA,QAAQ,EAAE,uCAAuC;AACjD,gBAAA,KAAK,EAAE,IAAI;AACd,aAAA;AACJ,SAAA,EAAA,CAAA,CAAA;;2FAEQ,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBA5BpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;;AAEP,wBAAA;AACI,4BAAA,OAAO,EAAE,4BAA4B;AACrC,4BAAA,QAAQ,EAAE,uBAAuB;AACjC,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;;AAED,wBAAA;AACI,4BAAA,OAAO,EAAE,kCAAkC;AAC3C,4BAAA,QAAQ,EAAE,8CAA8C;AACxD,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;AACD,wBAAA;AACI,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,8BAA8B;AACxC,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;AAED,wBAAA;AACI,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,QAAQ,EAAE,uCAAuC;AACjD,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;AC3CD;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acorex-platform/module-measurement-core-client",
|
|
3
|
+
"version": "0.0.21",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-module-measurement-core-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-module-measurement-core-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-module-measurement-core-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-module-measurement-core-client.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./contracts": {
|
|
23
|
+
"types": "./types/acorex-platform-module-measurement-core-client-contracts.d.ts",
|
|
24
|
+
"default": "./fesm2022/acorex-platform-module-measurement-core-client-contracts.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { AXPMultiLanguageString, AXPCategoryListItem } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';
|
|
3
|
+
|
|
4
|
+
declare const AXMMeasurementCoreMenuKeys: {
|
|
5
|
+
readonly Root: "measurement-core";
|
|
6
|
+
readonly QuantityTypes: "measurement-core.quantity-types";
|
|
7
|
+
readonly UnitsOfMeasure: "measurement-core.units-of-measure";
|
|
8
|
+
readonly UnitConversions: "measurement-core.unit-conversions";
|
|
9
|
+
readonly MeasurementDimensions: "measurement-core.measurement-dimensions";
|
|
10
|
+
readonly SizingProfiles: "measurement-core.sizing-profiles";
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Assets & Maintenance capabilities used by this module.
|
|
15
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
16
|
+
*/
|
|
17
|
+
declare const AXPAssetsMaintenancePermissionKeys: {
|
|
18
|
+
readonly Access: "AssetsMaintenance:Permission:Access";
|
|
19
|
+
readonly MaintainAssets: "AssetsMaintenance:Permission:MaintainAssets";
|
|
20
|
+
readonly MaintainMaintenance: "AssetsMaintenance:Permission:MaintainMaintenance";
|
|
21
|
+
readonly Setup: "AssetsMaintenance:Permission:Setup";
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Prefer {@link AXPAssetsMaintenancePermissionKeys}.
|
|
25
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
26
|
+
*/
|
|
27
|
+
declare const AXMMeasurementCorePermissionKeys: {
|
|
28
|
+
readonly MeasurementCore: {
|
|
29
|
+
readonly Group: "AssetsMaintenance:Permission:Setup";
|
|
30
|
+
readonly QuantityType: {
|
|
31
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
32
|
+
};
|
|
33
|
+
readonly UnitOfMeasure: {
|
|
34
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
35
|
+
};
|
|
36
|
+
readonly UnitConversion: {
|
|
37
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
38
|
+
};
|
|
39
|
+
readonly MeasurementDimension: {
|
|
40
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
41
|
+
};
|
|
42
|
+
readonly MeasurementRange: {
|
|
43
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
44
|
+
};
|
|
45
|
+
readonly SizingProfile: {
|
|
46
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
47
|
+
};
|
|
48
|
+
readonly SizingDimensionUsage: {
|
|
49
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
50
|
+
};
|
|
51
|
+
readonly SizeItem: {
|
|
52
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
53
|
+
};
|
|
54
|
+
readonly SizeRule: {
|
|
55
|
+
readonly Management: "AssetsMaintenance:Permission:Setup";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
declare const RootConfig: {
|
|
61
|
+
readonly config: {
|
|
62
|
+
i18n: string;
|
|
63
|
+
module: string;
|
|
64
|
+
};
|
|
65
|
+
readonly module: {
|
|
66
|
+
readonly name: string;
|
|
67
|
+
readonly title: `@${string}:module.title`;
|
|
68
|
+
readonly icon: "fa-light fa-ruler-combined";
|
|
69
|
+
};
|
|
70
|
+
readonly entities: {
|
|
71
|
+
readonly quantityType: {
|
|
72
|
+
readonly name: "QuantityType";
|
|
73
|
+
readonly title: `@${string}:quantity-types.entities.quantity-type.title`;
|
|
74
|
+
readonly titlePlural: `@${string}:quantity-types.entities.quantity-type.plural`;
|
|
75
|
+
readonly icon: "fa-light fa-calculator";
|
|
76
|
+
};
|
|
77
|
+
readonly unitOfMeasure: {
|
|
78
|
+
readonly name: "UnitOfMeasure";
|
|
79
|
+
readonly title: `@${string}:units.entities.unit-of-measure.title`;
|
|
80
|
+
readonly titlePlural: `@${string}:units.entities.unit-of-measure.plural`;
|
|
81
|
+
readonly icon: "fa-light fa-ruler";
|
|
82
|
+
};
|
|
83
|
+
readonly unitConversion: {
|
|
84
|
+
readonly name: "UnitConversion";
|
|
85
|
+
readonly title: `@${string}:conversions.entities.unit-conversion.title`;
|
|
86
|
+
readonly titlePlural: `@${string}:conversions.entities.unit-conversion.plural`;
|
|
87
|
+
readonly icon: "fa-light fa-arrows-rotate";
|
|
88
|
+
};
|
|
89
|
+
readonly measurementDimension: {
|
|
90
|
+
readonly name: "MeasurementDimension";
|
|
91
|
+
readonly title: `@${string}:dimensions.entities.measurement-dimension.title`;
|
|
92
|
+
readonly titlePlural: `@${string}:dimensions.entities.measurement-dimension.plural`;
|
|
93
|
+
readonly icon: "fa-light fa-cube";
|
|
94
|
+
};
|
|
95
|
+
readonly measurementRange: {
|
|
96
|
+
readonly name: "MeasurementRange";
|
|
97
|
+
readonly title: `@${string}:ranges.entities.measurement-range.title`;
|
|
98
|
+
readonly titlePlural: `@${string}:ranges.entities.measurement-range.plural`;
|
|
99
|
+
readonly icon: "fa-light fa-chart-line-up";
|
|
100
|
+
};
|
|
101
|
+
readonly sizingProfile: {
|
|
102
|
+
readonly name: "SizingProfile";
|
|
103
|
+
readonly title: `@${string}:sizes.entities.sizing-profile.title`;
|
|
104
|
+
readonly titlePlural: `@${string}:sizes.entities.sizing-profile.plural`;
|
|
105
|
+
readonly icon: "fa-light fa-chart-column";
|
|
106
|
+
};
|
|
107
|
+
readonly sizingDimensionUsage: {
|
|
108
|
+
readonly name: "SizingDimensionUsage";
|
|
109
|
+
readonly title: `@${string}:sizes.entities.sizing-dimension-usage.title`;
|
|
110
|
+
readonly titlePlural: `@${string}:sizes.entities.sizing-dimension-usage.plural`;
|
|
111
|
+
readonly icon: "fa-light fa-columns";
|
|
112
|
+
};
|
|
113
|
+
readonly sizeItem: {
|
|
114
|
+
readonly name: "SizeItem";
|
|
115
|
+
readonly title: `@${string}:sizes.entities.size-item.title`;
|
|
116
|
+
readonly titlePlural: `@${string}:sizes.entities.size-item.plural`;
|
|
117
|
+
readonly icon: "fa-light fa-list";
|
|
118
|
+
};
|
|
119
|
+
readonly sizeRule: {
|
|
120
|
+
readonly name: "SizeRule";
|
|
121
|
+
readonly title: `@${string}:sizes.entities.size-rule.title`;
|
|
122
|
+
readonly titlePlural: `@${string}:sizes.entities.size-rule.plural`;
|
|
123
|
+
readonly icon: "fa-light fa-grip";
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
interface AXMMeasurementCoreMeasurementDimensionEntityModel extends AXPEntityModel<string> {
|
|
129
|
+
code: string;
|
|
130
|
+
title: AXPMultiLanguageString;
|
|
131
|
+
/** FK -> QuantityType */
|
|
132
|
+
quantityTypeId: string;
|
|
133
|
+
quantityType?: {
|
|
134
|
+
id: string;
|
|
135
|
+
code: string;
|
|
136
|
+
title: AXPMultiLanguageString;
|
|
137
|
+
};
|
|
138
|
+
/** Default unit for UI (optional) */
|
|
139
|
+
defaultUomId?: string | null;
|
|
140
|
+
defaultUom?: {
|
|
141
|
+
id: string;
|
|
142
|
+
title: AXPMultiLanguageString;
|
|
143
|
+
symbol?: string | null;
|
|
144
|
+
};
|
|
145
|
+
description?: AXPMultiLanguageString | null;
|
|
146
|
+
isDisabled?: boolean;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
type AXMMeasurementCoreRangeType = 'acceptable' | 'preferred' | 'tolerance' | 'ideal';
|
|
150
|
+
type AXMMeasurementCoreBoundType = 'closed' | 'open' | 'leftClosed' | 'rightClosed';
|
|
151
|
+
interface AXMMeasurementCoreMeasurementRangeEntityModel extends AXPEntityModel<string> {
|
|
152
|
+
/** FK -> MeasurementDimension */
|
|
153
|
+
measurementDimensionId: string;
|
|
154
|
+
measurementDimension?: {
|
|
155
|
+
id: string;
|
|
156
|
+
code: string;
|
|
157
|
+
title: AXPMultiLanguageString;
|
|
158
|
+
};
|
|
159
|
+
/** Optional code for display/identification */
|
|
160
|
+
code?: string | null;
|
|
161
|
+
/** Optional title for display */
|
|
162
|
+
title?: AXPMultiLanguageString | null;
|
|
163
|
+
description?: AXPMultiLanguageString | null;
|
|
164
|
+
/** Range endpoints */
|
|
165
|
+
min?: number | null;
|
|
166
|
+
max?: number | null;
|
|
167
|
+
/** Optional nominal value (useful for scoring/tolerance) */
|
|
168
|
+
target?: number | null;
|
|
169
|
+
/** Unit for min/max/target */
|
|
170
|
+
uomId: string;
|
|
171
|
+
unit?: {
|
|
172
|
+
title: AXPMultiLanguageString;
|
|
173
|
+
symbol?: string | null;
|
|
174
|
+
};
|
|
175
|
+
/** Semantic meaning of this range */
|
|
176
|
+
rangeType?: AXMMeasurementCoreRangeType | null;
|
|
177
|
+
/** Inclusivity of bounds */
|
|
178
|
+
boundType?: AXMMeasurementCoreBoundType | null;
|
|
179
|
+
/** Optional granularity (e.g., shoes step 0.5) */
|
|
180
|
+
step?: number | null;
|
|
181
|
+
/** Optional ordering/precedence */
|
|
182
|
+
priority?: number | null;
|
|
183
|
+
/** If true, the range is intended for reuse across charts/rules */
|
|
184
|
+
isReusable?: boolean;
|
|
185
|
+
isDisabled?: boolean;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
interface AXMMeasurementCoreQuantityTypeEntityModel extends AXPEntityModel<string> {
|
|
189
|
+
code: string;
|
|
190
|
+
title: AXPMultiLanguageString;
|
|
191
|
+
/** Base unit for this quantity type (optional but recommended) */
|
|
192
|
+
baseUomId?: string | null;
|
|
193
|
+
baseUnit?: {
|
|
194
|
+
title: AXPMultiLanguageString;
|
|
195
|
+
symbol?: string | null;
|
|
196
|
+
};
|
|
197
|
+
description?: AXPMultiLanguageString | null;
|
|
198
|
+
isDisabled?: boolean;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
interface AXMMeasurementCoreSizeItemEntityModel extends AXPEntityModel<string> {
|
|
202
|
+
sizeChartId: string;
|
|
203
|
+
sizeChart?: {
|
|
204
|
+
id: string;
|
|
205
|
+
code: string;
|
|
206
|
+
title: AXPMultiLanguageString;
|
|
207
|
+
};
|
|
208
|
+
code: string;
|
|
209
|
+
title?: AXPMultiLanguageString | null;
|
|
210
|
+
sortOrder?: number | null;
|
|
211
|
+
isDisabled?: boolean;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
type AXMMeasurementCoreRuleMatchBehavior = 'hard' | 'soft' | 'scoring';
|
|
215
|
+
interface AXMMeasurementCoreSizeRuleEntityModel extends AXPEntityModel<string> {
|
|
216
|
+
/** Sizing profile for filtering and performance; rules are scoped to a profile. */
|
|
217
|
+
sizeChartId: string;
|
|
218
|
+
sizeChart?: {
|
|
219
|
+
id: string;
|
|
220
|
+
code: string;
|
|
221
|
+
title: AXPMultiLanguageString;
|
|
222
|
+
};
|
|
223
|
+
sizeItemId: string;
|
|
224
|
+
sizeItem?: {
|
|
225
|
+
id: string;
|
|
226
|
+
code: string;
|
|
227
|
+
title?: AXPMultiLanguageString | null;
|
|
228
|
+
};
|
|
229
|
+
measurementDimensionId: string;
|
|
230
|
+
measurementDimension?: {
|
|
231
|
+
id: string;
|
|
232
|
+
code: string;
|
|
233
|
+
title: AXPMultiLanguageString;
|
|
234
|
+
};
|
|
235
|
+
measurementRangeId: string;
|
|
236
|
+
measurementRange?: {
|
|
237
|
+
id: string;
|
|
238
|
+
code?: string | null;
|
|
239
|
+
title?: AXPMultiLanguageString | null;
|
|
240
|
+
};
|
|
241
|
+
/** Optional matching behavior */
|
|
242
|
+
matchBehavior?: AXMMeasurementCoreRuleMatchBehavior | null;
|
|
243
|
+
/** Optional priority within a size item */
|
|
244
|
+
priority?: number | null;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface AXMMeasurementCoreSizingDimensionUsageEntityModel extends AXPEntityModel<string> {
|
|
248
|
+
sizeChartId: string;
|
|
249
|
+
sizeChart?: {
|
|
250
|
+
id: string;
|
|
251
|
+
code: string;
|
|
252
|
+
title: AXPMultiLanguageString;
|
|
253
|
+
};
|
|
254
|
+
measurementDimensionId: string;
|
|
255
|
+
measurementDimension?: {
|
|
256
|
+
id: string;
|
|
257
|
+
code: string;
|
|
258
|
+
title: AXPMultiLanguageString;
|
|
259
|
+
};
|
|
260
|
+
/** Required dimensions must be satisfied for a match */
|
|
261
|
+
required?: boolean;
|
|
262
|
+
/** Primary dimension used for primary-first matching (at most one true recommended) */
|
|
263
|
+
primary?: boolean;
|
|
264
|
+
/** Sorting/order of columns in the matrix */
|
|
265
|
+
sortOrder?: number | null;
|
|
266
|
+
/** Optional tie-break priority (lower = higher priority) */
|
|
267
|
+
priority?: number | null;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
type AXMMeasurementCoreSizeMatchStrategy = 'primary-first' | 'all-required';
|
|
271
|
+
interface AXMMeasurementCoreSizingProfileEntityModel extends AXPEntityModel<string> {
|
|
272
|
+
code: string;
|
|
273
|
+
title: AXPMultiLanguageString;
|
|
274
|
+
categoryIds?: string[];
|
|
275
|
+
categories?: AXPCategoryListItem[];
|
|
276
|
+
regionId?: string | null;
|
|
277
|
+
region?: {
|
|
278
|
+
id: string;
|
|
279
|
+
title: string;
|
|
280
|
+
} | null;
|
|
281
|
+
matchStrategy?: AXMMeasurementCoreSizeMatchStrategy | null;
|
|
282
|
+
enforceNoOverlap?: boolean;
|
|
283
|
+
description?: AXPMultiLanguageString | null;
|
|
284
|
+
isDisabled?: boolean;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
type AXMMeasurementCoreConversionOperator = 'multiply' | 'divide';
|
|
288
|
+
interface AXMMeasurementCoreUnitConversionEntityModel extends AXPEntityModel<string> {
|
|
289
|
+
code?: string | null;
|
|
290
|
+
/** Optional display title (e.g. "Box to Piece") */
|
|
291
|
+
title?: AXPMultiLanguageString | null;
|
|
292
|
+
fromUomId: string;
|
|
293
|
+
toUomId: string;
|
|
294
|
+
/** Conversion factor: value_in_to = value_in_from * factor (when operator is multiply) */
|
|
295
|
+
factor: number;
|
|
296
|
+
operator?: AXMMeasurementCoreConversionOperator | null;
|
|
297
|
+
description?: AXPMultiLanguageString | null;
|
|
298
|
+
fromUnit?: {
|
|
299
|
+
title: AXPMultiLanguageString;
|
|
300
|
+
symbol?: string | null;
|
|
301
|
+
};
|
|
302
|
+
toUnit?: {
|
|
303
|
+
title: AXPMultiLanguageString;
|
|
304
|
+
symbol?: string | null;
|
|
305
|
+
};
|
|
306
|
+
isDisabled?: boolean;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface AXMMeasurementCoreUnitOfMeasureEntityModel extends AXPEntityModel<string> {
|
|
310
|
+
code: string;
|
|
311
|
+
title: AXPMultiLanguageString;
|
|
312
|
+
/** FK -> QuantityType */
|
|
313
|
+
quantityTypeId: string;
|
|
314
|
+
quantityType?: {
|
|
315
|
+
id: string;
|
|
316
|
+
code: string;
|
|
317
|
+
title: AXPMultiLanguageString;
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* Optional conversion factor to the base unit of the QuantityType.
|
|
321
|
+
* Example: if base is mm, then cm.factorToBase = 10
|
|
322
|
+
*/
|
|
323
|
+
factorToBase?: number | null;
|
|
324
|
+
/** Suggested decimal precision for input/display */
|
|
325
|
+
precision?: number | null;
|
|
326
|
+
/** True if this is the base unit */
|
|
327
|
+
isBase?: boolean;
|
|
328
|
+
symbol?: string | null;
|
|
329
|
+
description?: AXPMultiLanguageString | null;
|
|
330
|
+
isDisabled?: boolean;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export { AXMMeasurementCoreMenuKeys, AXMMeasurementCorePermissionKeys, AXPAssetsMaintenancePermissionKeys, RootConfig };
|
|
334
|
+
export type { AXMMeasurementCoreBoundType, AXMMeasurementCoreConversionOperator, AXMMeasurementCoreMeasurementDimensionEntityModel, AXMMeasurementCoreMeasurementRangeEntityModel, AXMMeasurementCoreQuantityTypeEntityModel, AXMMeasurementCoreRangeType, AXMMeasurementCoreRuleMatchBehavior, AXMMeasurementCoreSizeItemEntityModel, AXMMeasurementCoreSizeMatchStrategy, AXMMeasurementCoreSizeRuleEntityModel, AXMMeasurementCoreSizingDimensionUsageEntityModel, AXMMeasurementCoreSizingProfileEntityModel, AXMMeasurementCoreUnitConversionEntityModel, AXMMeasurementCoreUnitOfMeasureEntityModel };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult } from '@acorex-platform/framework-client/common';
|
|
3
|
+
import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex-platform/framework-client/auth';
|
|
4
|
+
|
|
5
|
+
declare class AXMMeasurementCoreModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMMeasurementCoreModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXMMeasurementCoreModule, never, never, never>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXMMeasurementCoreModule>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class AXMMeasurementCoreMenuProvider implements AXPMenuProvider {
|
|
12
|
+
private readonly entityService;
|
|
13
|
+
provide(context: AXPMenuProviderContext): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare class AXMMeasurementCoreSearchCommandProvider extends AXPSearchCommandProvider {
|
|
17
|
+
commands: AXPSearchResult[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Ensures Assets & Maintenance root exists for measurement-core.
|
|
22
|
+
*/
|
|
23
|
+
declare class AXMMeasurementCorePermissionDefinitionProvider implements AXPPermissionDefinitionProvider {
|
|
24
|
+
define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMMeasurementCorePermissionDefinitionProvider, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXMMeasurementCorePermissionDefinitionProvider>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { AXMMeasurementCoreMenuProvider, AXMMeasurementCoreModule, AXMMeasurementCorePermissionDefinitionProvider, AXMMeasurementCoreSearchCommandProvider };
|