@acorex/platform 20.3.0-next.15 → 20.3.0-next.17
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/core/index.d.ts +1 -0
- package/fesm2022/acorex-platform-layout-builder.mjs +107 -13
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +7 -4
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +132 -298
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/layout/builder/index.d.ts +70 -1
- package/layout/entity/index.d.ts +51 -76
- package/package.json +10 -10
package/core/index.d.ts
CHANGED
|
@@ -1087,6 +1087,7 @@ interface AXPFilterDefinition {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
interface AXPFilterQuery extends Pick<AXPFilterDefinition, 'field' | 'value' | 'operator' | 'logic' | 'hidden'> {
|
|
1089
1089
|
filters?: AXPFilterQuery[];
|
|
1090
|
+
displayText?: string;
|
|
1090
1091
|
}
|
|
1091
1092
|
|
|
1092
1093
|
type AXPActionMenuItem = {
|
|
@@ -92,7 +92,7 @@ class AXPLayoutBuilderService {
|
|
|
92
92
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLayoutBuilderService, decorators: [{
|
|
93
93
|
type: Injectable,
|
|
94
94
|
args: [{
|
|
95
|
-
providedIn: 'root'
|
|
95
|
+
providedIn: 'root',
|
|
96
96
|
}]
|
|
97
97
|
}] });
|
|
98
98
|
//#endregion
|
|
@@ -240,9 +240,17 @@ class BaseContainerBuilder {
|
|
|
240
240
|
}
|
|
241
241
|
isValueWidget(type) {
|
|
242
242
|
const valueWidgetTypes = [
|
|
243
|
-
'text-editor',
|
|
244
|
-
'
|
|
245
|
-
'
|
|
243
|
+
'text-editor',
|
|
244
|
+
'large-text-editor',
|
|
245
|
+
'rich-text-editor',
|
|
246
|
+
'password-editor',
|
|
247
|
+
'number-editor',
|
|
248
|
+
'select-editor',
|
|
249
|
+
'lookup-editor',
|
|
250
|
+
'selection-list-editor',
|
|
251
|
+
'date-time-editor',
|
|
252
|
+
'toggle-editor',
|
|
253
|
+
'color-editor',
|
|
246
254
|
];
|
|
247
255
|
return valueWidgetTypes.includes(type);
|
|
248
256
|
}
|
|
@@ -476,6 +484,16 @@ class WidgetContainerMixin extends ChildContainerMixin {
|
|
|
476
484
|
this.addWidget('color-editor', options);
|
|
477
485
|
return this;
|
|
478
486
|
}
|
|
487
|
+
list(delegate) {
|
|
488
|
+
const container = new ListWidgetBuilder();
|
|
489
|
+
container.withInheritanceContext(this.inheritanceContext);
|
|
490
|
+
if (delegate) {
|
|
491
|
+
delegate(container);
|
|
492
|
+
}
|
|
493
|
+
this.ensureChildren();
|
|
494
|
+
this.containerState.children.push(container.build());
|
|
495
|
+
return this;
|
|
496
|
+
}
|
|
479
497
|
customWidget(type, options) {
|
|
480
498
|
this.addWidget(type, options);
|
|
481
499
|
return this;
|
|
@@ -789,6 +807,82 @@ class FieldsetContainerBuilder extends LayoutContainerMixin {
|
|
|
789
807
|
return this;
|
|
790
808
|
}
|
|
791
809
|
}
|
|
810
|
+
/**
|
|
811
|
+
* List Widget Builder - Liskov Substitution Principle
|
|
812
|
+
* Extends WidgetContainerMixin to inherit all common functionality
|
|
813
|
+
*/
|
|
814
|
+
class ListWidgetBuilder extends WidgetContainerMixin {
|
|
815
|
+
constructor() {
|
|
816
|
+
super('list');
|
|
817
|
+
}
|
|
818
|
+
setOptions(options) {
|
|
819
|
+
this.containerState.options = { ...this.containerState.options, ...options };
|
|
820
|
+
return this;
|
|
821
|
+
}
|
|
822
|
+
// Individual fluent methods for List Widget
|
|
823
|
+
setDataSource(dataSource) {
|
|
824
|
+
return this.setOptions({ dataSource });
|
|
825
|
+
}
|
|
826
|
+
setColumns(columns) {
|
|
827
|
+
return this.setOptions({ columns });
|
|
828
|
+
}
|
|
829
|
+
// Event handlers
|
|
830
|
+
setOnRowClick(handler) {
|
|
831
|
+
return this.setOptions({ onRowClick: handler });
|
|
832
|
+
}
|
|
833
|
+
setOnRowDoubleClick(handler) {
|
|
834
|
+
return this.setOptions({ onRowDoubleClick: handler });
|
|
835
|
+
}
|
|
836
|
+
setOnSelectionChange(handler) {
|
|
837
|
+
return this.setOptions({ onSelectionChange: handler });
|
|
838
|
+
}
|
|
839
|
+
setOnRowCommand(handler) {
|
|
840
|
+
return this.setOptions({ onRowCommand: handler });
|
|
841
|
+
}
|
|
842
|
+
// Table features
|
|
843
|
+
setPaging(paging) {
|
|
844
|
+
return this.setOptions({ paging });
|
|
845
|
+
}
|
|
846
|
+
setShowHeader(show) {
|
|
847
|
+
return this.setOptions({ showHeader: show });
|
|
848
|
+
}
|
|
849
|
+
setShowFooter(show) {
|
|
850
|
+
return this.setOptions({ showFooter: show });
|
|
851
|
+
}
|
|
852
|
+
setFixHeader(fix) {
|
|
853
|
+
return this.setOptions({ fixHeader: fix });
|
|
854
|
+
}
|
|
855
|
+
setFixFooter(fix) {
|
|
856
|
+
return this.setOptions({ fixFooter: fix });
|
|
857
|
+
}
|
|
858
|
+
setFetchDataMode(mode) {
|
|
859
|
+
return this.setOptions({ fetchDataMode: mode });
|
|
860
|
+
}
|
|
861
|
+
setParentField(field) {
|
|
862
|
+
return this.setOptions({ parentField: field });
|
|
863
|
+
}
|
|
864
|
+
setMinHeight(height) {
|
|
865
|
+
return this.setOptions({ minHeight: height });
|
|
866
|
+
}
|
|
867
|
+
// Selection & Index
|
|
868
|
+
setShowIndex(show) {
|
|
869
|
+
return this.setOptions({ showIndex: show });
|
|
870
|
+
}
|
|
871
|
+
setAllowSelection(allow) {
|
|
872
|
+
return this.setOptions({ allowSelection: allow });
|
|
873
|
+
}
|
|
874
|
+
// Commands
|
|
875
|
+
setPrimaryCommands(commands) {
|
|
876
|
+
return this.setOptions({ primaryCommands: commands });
|
|
877
|
+
}
|
|
878
|
+
setSecondaryCommands(commands) {
|
|
879
|
+
return this.setOptions({ secondaryCommands: commands });
|
|
880
|
+
}
|
|
881
|
+
// Loading
|
|
882
|
+
setLoading(loading) {
|
|
883
|
+
return this.setOptions({ loading });
|
|
884
|
+
}
|
|
885
|
+
}
|
|
792
886
|
/**
|
|
793
887
|
* Dialog Container Builder - Specialized for dialog functionality
|
|
794
888
|
* Uses composition instead of inheritance for cleaner separation
|
|
@@ -807,9 +901,9 @@ class DialogContainerBuilder {
|
|
|
807
901
|
actions: {
|
|
808
902
|
footer: {
|
|
809
903
|
prefix: [],
|
|
810
|
-
suffix: []
|
|
811
|
-
}
|
|
812
|
-
}
|
|
904
|
+
suffix: [],
|
|
905
|
+
},
|
|
906
|
+
},
|
|
813
907
|
};
|
|
814
908
|
if (popupService) {
|
|
815
909
|
this.popupService = popupService;
|
|
@@ -865,14 +959,14 @@ class DialogContainerBuilder {
|
|
|
865
959
|
// Add dialog-specific properties
|
|
866
960
|
options: {
|
|
867
961
|
...this.contentLayout.options,
|
|
868
|
-
...this.dialogState.dialogOptions
|
|
869
|
-
}
|
|
962
|
+
...this.dialogState.dialogOptions,
|
|
963
|
+
},
|
|
870
964
|
};
|
|
871
965
|
}
|
|
872
966
|
// Fallback to dialog state structure if no content
|
|
873
967
|
const result = {
|
|
874
968
|
...this.dialogState,
|
|
875
|
-
children: []
|
|
969
|
+
children: [],
|
|
876
970
|
};
|
|
877
971
|
// Add dialog-specific properties
|
|
878
972
|
if (this.dialogState.dialogOptions) {
|
|
@@ -906,8 +1000,8 @@ class DialogContainerBuilder {
|
|
|
906
1000
|
callBack: (result) => {
|
|
907
1001
|
// Resolve with the dialog reference when user clicks an action
|
|
908
1002
|
resolve(result);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
1003
|
+
},
|
|
1004
|
+
},
|
|
911
1005
|
});
|
|
912
1006
|
});
|
|
913
1007
|
}
|
|
@@ -957,7 +1051,7 @@ class WidgetBuilder {
|
|
|
957
1051
|
lg: { colSpan: value },
|
|
958
1052
|
xl: { colSpan: value },
|
|
959
1053
|
xxl: { colSpan: value },
|
|
960
|
-
}
|
|
1054
|
+
},
|
|
961
1055
|
};
|
|
962
1056
|
}
|
|
963
1057
|
else {
|