@acorex/platform 19.2.2 → 19.2.4
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/common/lib/app/application.types.d.ts +2 -1
- package/common/lib/search/search-definition.builder.d.ts +1 -1
- package/common/lib/search/search-definition.provider.d.ts +1 -0
- package/common/lib/search/search.types.d.ts +1 -0
- package/core/lib/types.d.ts +2 -2
- package/fesm2022/acorex-platform-common.mjs +12 -20
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +23 -7
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +52 -70
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-theme-palette-preview.page-Cet1sYXJ.mjs → acorex-platform-themes-default-theme-palette-preview.page-C3RJdApv.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-C3RJdApv.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +1215 -38
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/widget-groups.d.ts +2 -1
- package/layout/builder/lib/builder/widget-map.d.ts +9 -0
- package/layout/builder/lib/builder/widget.types.d.ts +1 -1
- package/package.json +5 -5
- package/widgets/lib/properties/groups.d.ts +2 -1
- package/widgets/lib/properties/validation.props.d.ts +10 -0
- package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/index.d.ts +9 -0
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-designer.component.d.ts +0 -1
- package/widgets/lib/widgets/validations/base-validation/base-validation.component.d.ts +13 -0
- package/widgets/lib/widgets/validations/base-validation/base-validation.d.ts +8 -0
- package/widgets/lib/widgets/validations/between-validation/between-validation-widget-edit.component.d.ts +25 -0
- package/widgets/lib/widgets/validations/between-validation/between-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/between-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/callback-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/equal-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget-edit.component.d.ts +24 -0
- package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/greater-than-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/less-than-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget-edit.component.d.ts +24 -0
- package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/max-length-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/min-length-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/regular-expression-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/required-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/required-validation/required-validation-widget-edit.component.d.ts +21 -0
- package/widgets/lib/widgets/validations/required-validation/required-validation-widget.config.d.ts +7 -0
- package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-Cet1sYXJ.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AXDataSourceOperator, AXStyleColorType } from '@acorex/components/common';
|
|
2
2
|
import { AXPValidationRules } from '@acorex/platform/core';
|
|
3
|
-
import { AXPWidgetTypesMap } from '@acorex/platform/layout/builder';
|
|
3
|
+
import { AXPWidgetTypesMap, AXPWidgetValueTransformFunctions } from '@acorex/platform/layout/builder';
|
|
4
4
|
import { AXPGridLayoutOptions } from '../layout';
|
|
5
5
|
export interface AXEntityPropertyWidget {
|
|
6
6
|
type: AXPWidgetTypesMap[keyof AXPWidgetTypesMap];
|
|
@@ -15,6 +15,7 @@ export interface AXEntityPropertyWidget {
|
|
|
15
15
|
action: string;
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
}[];
|
|
18
|
+
valueTransforms?: AXPWidgetValueTransformFunctions;
|
|
18
19
|
}
|
|
19
20
|
export declare enum AXPRelationshipKind {
|
|
20
21
|
Association = 0,
|
|
@@ -2,7 +2,7 @@ import { AXPSearchAction, AXPSearchDefinition, AXPSearchDefinitionDisplayFormat
|
|
|
2
2
|
export declare class AXPSearchDefinitionProviderContext {
|
|
3
3
|
private definitions;
|
|
4
4
|
private definitionMap;
|
|
5
|
-
addDefinition(name: string, title: string, icon: string, order: number, options?: {
|
|
5
|
+
addDefinition(name: string, title: string, group: string, icon: string, order: number, options?: {
|
|
6
6
|
format?: AXPSearchDefinitionDisplayFormat;
|
|
7
7
|
actions?: AXPSearchAction[];
|
|
8
8
|
}): AXPSearchDefinitionBuilder;
|
|
@@ -13,6 +13,7 @@ export declare class AXPSearchDefinitionProviderService {
|
|
|
13
13
|
getListAsync(): Promise<AXPSearchDefinition[]>;
|
|
14
14
|
getList(): AXPSearchDefinition[];
|
|
15
15
|
findDefinition(definitionName: string): AXPSearchDefinition;
|
|
16
|
+
findDefinitionByGroup(definitionGroup: string): AXPSearchDefinition;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPSearchDefinitionProviderService, never>;
|
|
17
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXPSearchDefinitionProviderService>;
|
|
18
19
|
}
|
package/core/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { NavigationExtras } from
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { NavigationExtras } from '@angular/router';
|
|
3
3
|
export type AXPPartialNested<T> = {
|
|
4
4
|
[K in keyof T]?: T[K] extends object ? AXPPartialNested<T[K]> : T[K];
|
|
5
5
|
};
|
|
@@ -1420,7 +1420,7 @@ withMethods((store, router = inject(Router), workflow = inject(AXPWorkflowServic
|
|
|
1420
1420
|
|
|
1421
1421
|
class AXPMenuSearchDefinitionProvider {
|
|
1422
1422
|
async provide(context) {
|
|
1423
|
-
context.addDefinition('menu', 'Menu', 'fa-thin fa-bars', 2, {
|
|
1423
|
+
context.addDefinition('menu', 'Menu', 'menu', 'fa-thin fa-bars', 2, {
|
|
1424
1424
|
format: {
|
|
1425
1425
|
id: '{{data.name}}',
|
|
1426
1426
|
},
|
|
@@ -1543,10 +1543,11 @@ class AXPSearchDefinitionProviderContext {
|
|
|
1543
1543
|
this.definitions = [];
|
|
1544
1544
|
this.definitionMap = new Map();
|
|
1545
1545
|
}
|
|
1546
|
-
addDefinition(name, title, icon, order, options) {
|
|
1546
|
+
addDefinition(name, title, group, icon, order, options) {
|
|
1547
1547
|
const definitionSearch = {
|
|
1548
1548
|
name,
|
|
1549
1549
|
title,
|
|
1550
|
+
group,
|
|
1550
1551
|
icon,
|
|
1551
1552
|
order,
|
|
1552
1553
|
format: {
|
|
@@ -1600,22 +1601,6 @@ class AXPSearchDefinitionBuilder {
|
|
|
1600
1601
|
}
|
|
1601
1602
|
return new AXPSearchDefinitionActionBuilder(this);
|
|
1602
1603
|
}
|
|
1603
|
-
// addGroup(name: string, title: string, description?: string, icon?: string): AXPTextSearchEntityBuilder {
|
|
1604
|
-
// const newGroup: AXPTextSearchEntity = {
|
|
1605
|
-
// name,
|
|
1606
|
-
// title,
|
|
1607
|
-
// description: description,
|
|
1608
|
-
// icon,
|
|
1609
|
-
// groups: [],
|
|
1610
|
-
// sections: [],
|
|
1611
|
-
// };
|
|
1612
|
-
// this.entity.groups.push(newGroup);
|
|
1613
|
-
// if (this.context.hasGroup(name)) {
|
|
1614
|
-
// throw new Error(`Group with name "${name}" already exists.`);
|
|
1615
|
-
// }
|
|
1616
|
-
// this.context['groupMap'].set(name, newGroup);
|
|
1617
|
-
// return new AXPTextSearchEntityBuilder(this.context, newGroup);
|
|
1618
|
-
// }
|
|
1619
1604
|
endEntity() {
|
|
1620
1605
|
return this.context;
|
|
1621
1606
|
}
|
|
@@ -1667,6 +1652,13 @@ class AXPSearchDefinitionProviderService {
|
|
|
1667
1652
|
}
|
|
1668
1653
|
return definition;
|
|
1669
1654
|
}
|
|
1655
|
+
findDefinitionByGroup(definitionGroup) {
|
|
1656
|
+
const definition = this.getList().find((definition) => definition.group === definitionGroup);
|
|
1657
|
+
if (!definition) {
|
|
1658
|
+
throw new Error(`Definition with group ${definitionGroup} not found`);
|
|
1659
|
+
}
|
|
1660
|
+
return definition;
|
|
1661
|
+
}
|
|
1670
1662
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1671
1663
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
|
|
1672
1664
|
}
|
|
@@ -1705,7 +1697,7 @@ class AXPSearchService {
|
|
|
1705
1697
|
try {
|
|
1706
1698
|
const definition = this.definitionService.findDefinition(result.group);
|
|
1707
1699
|
mergeData.push({
|
|
1708
|
-
definitionName: definition.
|
|
1700
|
+
definitionName: definition.group,
|
|
1709
1701
|
definitionTitle: definition.title,
|
|
1710
1702
|
name: result.group,
|
|
1711
1703
|
id: `${definition.name}:${this.formatService.format(definition.format.id, 'string', result)}`,
|
|
@@ -1729,7 +1721,7 @@ class AXPSearchService {
|
|
|
1729
1721
|
});
|
|
1730
1722
|
}
|
|
1731
1723
|
catch (e) {
|
|
1732
|
-
|
|
1724
|
+
console.error(e);
|
|
1733
1725
|
}
|
|
1734
1726
|
}
|
|
1735
1727
|
}
|