@acorex/platform 21.0.0-next.5 → 21.0.0-next.7

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.
@@ -710,7 +710,42 @@ class PropertyFilter {
710
710
  this.externalMode = mode;
711
711
  return this;
712
712
  }
713
+ async build() {
714
+ const dialog = await this.buildDialog();
715
+ return dialog.build();
716
+ }
713
717
  async show() {
718
+ const dialog = await this.buildDialog();
719
+ // Context: load record by id for update/single and merge with provided context (context overrides)
720
+ let baseContext = {};
721
+ // Only fetch by key if we don't already have initial data
722
+ const hasInitialData = this.initialContext && Object.keys(this.initialContext).length > 0;
723
+ if ((this.kind === 'update' || this.kind === 'single') && !hasInitialData) {
724
+ const { moduleName, entityName } = parseEntityFullName(this.fullName);
725
+ const entity = await this.entityRegistry.resolve(moduleName, entityName);
726
+ try {
727
+ const id = this.recordId;
728
+ if (!id) {
729
+ throw new Error(`Record id is required for ${this.kind}().`);
730
+ }
731
+ const byKeyFn = entity?.queries?.byKey?.execute;
732
+ if (typeof byKeyFn === 'function') {
733
+ baseContext = (await byKeyFn(id)) ?? {};
734
+ }
735
+ }
736
+ catch {
737
+ baseContext = {};
738
+ }
739
+ }
740
+ const effectiveContext = merge({}, baseContext, this.initialContext);
741
+ dialog.setContext(effectiveContext);
742
+ return await dialog.show();
743
+ }
744
+ /**
745
+ * Builds the dialog node structure without showing it.
746
+ * This method is shared by both build() and show() methods.
747
+ */
748
+ async buildDialog() {
714
749
  const { moduleName, entityName } = parseEntityFullName(this.fullName);
715
750
  const entity = await this.entityRegistry.resolve(moduleName, entityName);
716
751
  // Select the appropriate interface based on kind
@@ -819,28 +854,7 @@ class PropertyFilter {
819
854
  d.setActions((a) => a.cancel().submit());
820
855
  }
821
856
  });
822
- // Context: load record by id for update/single and merge with provided context (context overrides)
823
- let baseContext = {};
824
- // Only fetch by key if we don't already have initial data
825
- const hasInitialData = this.initialContext && Object.keys(this.initialContext).length > 0;
826
- if ((this.kind === 'update' || this.kind === 'single') && !hasInitialData) {
827
- try {
828
- const id = this.recordId;
829
- if (!id) {
830
- throw new Error(`Record id is required for ${this.kind}().`);
831
- }
832
- const byKeyFn = entity?.queries?.byKey?.execute;
833
- if (typeof byKeyFn === 'function') {
834
- baseContext = (await byKeyFn(id)) ?? {};
835
- }
836
- }
837
- catch {
838
- baseContext = {};
839
- }
840
- }
841
- const effectiveContext = merge({}, baseContext, this.initialContext);
842
- dialog.setContext(effectiveContext);
843
- return await dialog.show();
857
+ return dialog;
844
858
  }
845
859
  computeAllowedNames(allNames) {
846
860
  if (this.includeList && this.includeList.size > 0) {
@@ -8227,7 +8241,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
8227
8241
  ></ax-button>
8228
8242
  </ax-suffix>
8229
8243
  </ax-footer>
8230
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i2$1.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4$2.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i5$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "nodeTemplate", "idField", "titleField", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick"], outputs: ["datasourceChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8244
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i2$1.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4$2.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i5$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "nodeTemplate", "idField", "titleField", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick", "doubleClickDuration", "tooltipDelay"], outputs: ["datasourceChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8231
8245
  }
8232
8246
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCategoryTreeSelectorComponent, decorators: [{
8233
8247
  type: Component,