@acorex/platform 20.6.2 → 20.6.3

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.
@@ -703,7 +703,42 @@ class PropertyFilter {
703
703
  this.externalMode = mode;
704
704
  return this;
705
705
  }
706
+ async build() {
707
+ const dialog = await this.buildDialog();
708
+ return dialog.build();
709
+ }
706
710
  async show() {
711
+ const dialog = await this.buildDialog();
712
+ // Context: load record by id for update/single and merge with provided context (context overrides)
713
+ let baseContext = {};
714
+ // Only fetch by key if we don't already have initial data
715
+ const hasInitialData = this.initialContext && Object.keys(this.initialContext).length > 0;
716
+ if ((this.kind === 'update' || this.kind === 'single') && !hasInitialData) {
717
+ const { moduleName, entityName } = parseEntityFullName(this.fullName);
718
+ const entity = await this.entityRegistry.resolve(moduleName, entityName);
719
+ try {
720
+ const id = this.recordId;
721
+ if (!id) {
722
+ throw new Error(`Record id is required for ${this.kind}().`);
723
+ }
724
+ const byKeyFn = entity?.queries?.byKey?.execute;
725
+ if (typeof byKeyFn === 'function') {
726
+ baseContext = (await byKeyFn(id)) ?? {};
727
+ }
728
+ }
729
+ catch {
730
+ baseContext = {};
731
+ }
732
+ }
733
+ const effectiveContext = merge({}, baseContext, this.initialContext);
734
+ dialog.setContext(effectiveContext);
735
+ return await dialog.show();
736
+ }
737
+ /**
738
+ * Builds the dialog node structure without showing it.
739
+ * This method is shared by both build() and show() methods.
740
+ */
741
+ async buildDialog() {
707
742
  const { moduleName, entityName } = parseEntityFullName(this.fullName);
708
743
  const entity = await this.entityRegistry.resolve(moduleName, entityName);
709
744
  // Select the appropriate interface based on kind
@@ -812,28 +847,7 @@ class PropertyFilter {
812
847
  d.setActions((a) => a.cancel().submit());
813
848
  }
814
849
  });
815
- // Context: load record by id for update/single and merge with provided context (context overrides)
816
- let baseContext = {};
817
- // Only fetch by key if we don't already have initial data
818
- const hasInitialData = this.initialContext && Object.keys(this.initialContext).length > 0;
819
- if ((this.kind === 'update' || this.kind === 'single') && !hasInitialData) {
820
- try {
821
- const id = this.recordId;
822
- if (!id) {
823
- throw new Error(`Record id is required for ${this.kind}().`);
824
- }
825
- const byKeyFn = entity?.queries?.byKey?.execute;
826
- if (typeof byKeyFn === 'function') {
827
- baseContext = (await byKeyFn(id)) ?? {};
828
- }
829
- }
830
- catch {
831
- baseContext = {};
832
- }
833
- }
834
- const effectiveContext = merge({}, baseContext, this.initialContext);
835
- dialog.setContext(effectiveContext);
836
- return await dialog.show();
850
+ return dialog;
837
851
  }
838
852
  computeAllowedNames(allNames) {
839
853
  if (this.includeList && this.includeList.size > 0) {
@@ -7896,7 +7910,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
7896
7910
  ></ax-button>
7897
7911
  </ax-suffix>
7898
7912
  </ax-footer>
7899
- `, 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 }); }
7913
+ `, 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 }); }
7900
7914
  }
7901
7915
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCategoryTreeSelectorComponent, decorators: [{
7902
7916
  type: Component,