@acorex/platform 19.1.4 → 19.1.6
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/workflows/common.workflow.d.ts +11 -0
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CJZJzh1K.mjs +69 -0
- package/fesm2022/{acorex-platform-common-rich-text-widget-edit.component-CHT12edE.mjs.map → acorex-platform-common-rich-text-widget-edit.component-CJZJzh1K.mjs.map} +1 -1
- package/fesm2022/acorex-platform-common.mjs +5 -5
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +127 -94
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +545 -535
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-filters.mjs +0 -3
- package/fesm2022/acorex-platform-layout-filters.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DAmHq1bt.mjs → acorex-platform-themes-default-entity-master-list-view.component-CtpkzjOm.mjs} +5 -5
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CtpkzjOm.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +3 -4
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-RCi5IJOR.mjs → acorex-platform-widgets-checkbox-widget-designer.component-D8KErkus.mjs} +4 -4
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-RCi5IJOR.mjs.map → acorex-platform-widgets-checkbox-widget-designer.component-D8KErkus.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-CWhbgmDV.mjs → acorex-platform-widgets-color-box-widget-designer.component-B2g0ct24.mjs} +4 -4
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-B2g0ct24.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +1025 -167
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/builder.module.d.ts +4 -3
- package/layout/builder/lib/builder/widget-map.d.ts +5 -0
- package/layout/builder/lib/builder/widget-placeholder.component.d.ts +5 -0
- package/layout/builder/lib/builder/widget-renderer.directive.d.ts +1 -1
- package/layout/builder/lib/builder/widget.types.d.ts +6 -2
- package/layout/entity/lib/index.d.ts +1 -0
- package/{layouts/lib/admin/entity-layout → layout/entity/lib}/workflows/index.d.ts +1 -1
- package/package.json +12 -16
- package/themes/shared/lib/components/layout-elements/index.d.ts +1 -1
- package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +1 -1
- package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget-edit.component.d.ts +18 -0
- package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/boolean-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/date-time-filter/date-time-filter-widget-edit.component.d.ts +19 -0
- package/widgets/lib/widgets/filters/date-time-filter/date-time-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/date-time-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/number-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/number-filter/number-filter-widget-edit.component.d.ts +12 -0
- package/widgets/lib/widgets/filters/number-filter/number-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/select-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/select-filter/select-filter-widget-edit.component.d.ts +16 -0
- package/widgets/lib/widgets/filters/select-filter/select-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/string-filter/string-filter-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/layout/block/block-widget-designer.component.d.ts +1 -0
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +28 -19
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.type.d.ts +16 -13
- package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +10 -0
- package/widgets/lib/widgets/property-editors/spacing/spacing-widget-editor.component.d.ts +1 -0
- package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CHT12edE.mjs +0 -69
- package/fesm2022/acorex-platform-layouts-entity-create-view.component-1Yw4H3CW.mjs +0 -121
- package/fesm2022/acorex-platform-layouts-entity-create-view.component-1Yw4H3CW.mjs.map +0 -1
- package/fesm2022/acorex-platform-layouts-entity-import-view.component-BIHTWoXR.mjs +0 -91
- package/fesm2022/acorex-platform-layouts-entity-import-view.component-BIHTWoXR.mjs.map +0 -1
- package/fesm2022/acorex-platform-layouts-entity-modify-view.component-Cb2Yvtav.mjs +0 -96
- package/fesm2022/acorex-platform-layouts-entity-modify-view.component-Cb2Yvtav.mjs.map +0 -1
- package/fesm2022/acorex-platform-layouts.mjs +0 -2483
- package/fesm2022/acorex-platform-layouts.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DAmHq1bt.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CWhbgmDV.mjs.map +0 -1
- package/layouts/README.md +0 -3
- package/layouts/index.d.ts +0 -2
- package/layouts/lib/admin/admin.module.d.ts +0 -11
- package/layouts/lib/admin/admin.routes.d.ts +0 -2
- package/layouts/lib/admin/custom-reuse.strategy.d.ts +0 -8
- package/layouts/lib/admin/entity-layout/entity-create-view/entity-create-view.component.d.ts +0 -20
- package/layouts/lib/admin/entity-layout/entity-create-view/entity-create-view.config.d.ts +0 -54
- package/layouts/lib/admin/entity-layout/entity-details-view/detail-view.config.d.ts +0 -48
- package/layouts/lib/admin/entity-layout/entity-details-view/entity-details-view.component.d.ts +0 -83
- package/layouts/lib/admin/entity-layout/entity-details-view/index.d.ts +0 -2
- package/layouts/lib/admin/entity-layout/entity-import-view/entity-import-view.component.d.ts +0 -27
- package/layouts/lib/admin/entity-layout/entity-list-view/components/entity-custom-view/entity-custom-view.component.d.ts +0 -46
- package/layouts/lib/admin/entity-layout/entity-list-view/components/index.d.ts +0 -5
- package/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-columns/list-view-option-columns.component.d.ts +0 -20
- package/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-conditions/list-view-option-conditions.component.d.ts +0 -33
- package/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-conditions/list-view-option-filter-operator.component.d.ts +0 -18
- package/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-sorting/list-view-option-sorting.component.d.ts +0 -21
- package/layouts/lib/admin/entity-layout/entity-list-view/entity-list-view.component.d.ts +0 -79
- package/layouts/lib/admin/entity-layout/entity-list-view/index.d.ts +0 -4
- package/layouts/lib/admin/entity-layout/entity-list-view/list-view.config.d.ts +0 -113
- package/layouts/lib/admin/entity-layout/entity-list-view/list-view.module.d.ts +0 -42
- package/layouts/lib/admin/entity-layout/entity-modify-view/entity-modify-view.component.d.ts +0 -25
- package/layouts/lib/admin/entity-layout/entity-modify-view/entity-modify-view.config.d.ts +0 -31
- package/layouts/lib/admin/entity-layout/entity-quick-view/entity-quick-view.component.d.ts +0 -24
- package/layouts/lib/admin/entity-layout/entity-quick-view/index.d.ts +0 -1
- package/layouts/lib/admin/entity-layout/index.d.ts +0 -4
- package/layouts/lib/admin/entity-layout/workflows/create-entity.workflow.d.ts +0 -31
- package/layouts/lib/admin/entity-layout/workflows/delete-entity.workflow.d.ts +0 -33
- package/layouts/lib/admin/entity-layout/workflows/import-entity.workflow.d.ts +0 -27
- package/layouts/lib/admin/entity-layout/workflows/modify-entity.workflow.d.ts +0 -32
- package/layouts/lib/admin/entity-layout/workflows/modify-section.workflow.d.ts +0 -12
- package/layouts/lib/admin/entity-layout/workflows/show-details.workflow.d.ts +0 -10
- package/layouts/lib/admin/entity-layout/workflows/show-list.workflow.d.ts +0 -10
- package/layouts/lib/admin/entity-layout/workflows/show-quick-view.workflow.d.ts +0 -12
- package/layouts/lib/admin/entity.resolver.d.ts +0 -4
- package/layouts/lib/admin/index.d.ts +0 -5
- package/layouts/lib/layout.module.d.ts +0 -9
- /package/themes/shared/lib/components/layout-elements/{layout-list-component.d.ts → layout-list.component.d.ts} +0 -0
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import * as i4$1 from '@acorex/components/button';
|
|
2
|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
3
|
-
import * as i4 from '@acorex/components/decorators';
|
|
4
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
|
-
import { AXDialogModule } from '@acorex/components/dialog';
|
|
6
|
-
import * as i14 from '@acorex/components/dropdown-button';
|
|
7
|
-
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
8
|
-
import * as i2 from '@acorex/components/form';
|
|
9
|
-
import { AXFormModule } from '@acorex/components/form';
|
|
10
|
-
import * as i7 from '@acorex/components/label';
|
|
11
|
-
import { AXLabelModule } from '@acorex/components/label';
|
|
12
|
-
import * as i5 from '@acorex/components/loading';
|
|
13
|
-
import { AXLoadingModule } from '@acorex/components/loading';
|
|
14
|
-
import { AXBasePageComponent } from '@acorex/components/page';
|
|
15
|
-
import { AXTabsModule } from '@acorex/components/tabs';
|
|
16
|
-
import { AXTooltipModule } from '@acorex/components/tooltip';
|
|
17
|
-
import * as i10 from '@acorex/platform/common';
|
|
18
|
-
import { AXPSchemaModule, AXPStickyDirective } from '@acorex/platform/common';
|
|
19
|
-
import * as i1 from '@angular/common';
|
|
20
|
-
import { CommonModule } from '@angular/common';
|
|
21
|
-
import * as i0 from '@angular/core';
|
|
22
|
-
import { inject, signal, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
23
|
-
import { FormsModule } from '@angular/forms';
|
|
24
|
-
import { AXValidationModule } from '@acorex/core/validation';
|
|
25
|
-
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
26
|
-
import * as i8 from '@acorex/core/translation';
|
|
27
|
-
import { AXTranslationModule } from '@acorex/core/translation';
|
|
28
|
-
import { AXPWorkflowService } from '@acorex/platform/workflow';
|
|
29
|
-
|
|
30
|
-
class AXPEntityCreateViewComponent extends AXBasePageComponent {
|
|
31
|
-
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
|
-
this.workflow = inject(AXPWorkflowService);
|
|
34
|
-
this.submitLoading = signal(false);
|
|
35
|
-
}
|
|
36
|
-
handleCloseClick() {
|
|
37
|
-
this.close();
|
|
38
|
-
}
|
|
39
|
-
async handleBackClick() {
|
|
40
|
-
await this.loader.back();
|
|
41
|
-
}
|
|
42
|
-
async handleNextClick(form) {
|
|
43
|
-
const formResult = await form.validate();
|
|
44
|
-
if (formResult.result) {
|
|
45
|
-
await this.loader.next();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
async handleSaveClick(form) {
|
|
49
|
-
const formResult = await form.validate();
|
|
50
|
-
if (formResult.result) {
|
|
51
|
-
if (this.entity.commands?.create) {
|
|
52
|
-
this.submitLoading.set(true);
|
|
53
|
-
const options = this.entity.actions?.['create'].options;
|
|
54
|
-
try {
|
|
55
|
-
const record = await this.entity.commands.create(this.loader.data);
|
|
56
|
-
if (record) {
|
|
57
|
-
this.close({ save: true, recordId: record.id, redirect: options?.redirect ?? true });
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
console.log(error);
|
|
62
|
-
}
|
|
63
|
-
this.submitLoading.set(false);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
async handleSaveAndNewClick(form) {
|
|
68
|
-
const formResult = await form.validate();
|
|
69
|
-
if (formResult.result) {
|
|
70
|
-
if (this.entity.commands?.create) {
|
|
71
|
-
this.submitLoading.set(true);
|
|
72
|
-
try {
|
|
73
|
-
const record = await this.entity.commands.create(this.loader.data);
|
|
74
|
-
if (record) {
|
|
75
|
-
this.close({ save: true, recordId: record.id, redirect: false });
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
console.log(error);
|
|
80
|
-
}
|
|
81
|
-
this.submitLoading.set(false);
|
|
82
|
-
}
|
|
83
|
-
this.workflow.execute('create-entity', {
|
|
84
|
-
payload: {
|
|
85
|
-
module: this.loader.entity.module,
|
|
86
|
-
entity: this.loader.entity.name,
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
92
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityCreateViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-min-h-[25vh]\">\n @if((loader.hasSections$ | async)) {\n <ol\n class=\"ax-flex ax-items-center ax-w-full ax-space-x-2 ax-text-sm ax-font-medium ax-text-center ax-text-gray-500 ax-bg-white dark:ax-text-gray-400 sm:ax-text-base ax-p-4 sm:ax-space-x-4 rtl:ax-space-x-reverse ax-sticky ax-top-0 ax-z-10\"\n [axpSticky]=\"'ax-bg-surface ax-drop-shadow-lg'\"\n [stickyParent]=\"'.ax-popup-body-container'\"\n >\n @for(section of (loader.sections$ | async); track section.name;let index = $index;let last = $last;let count= $count) {\n <li class=\"ax-flex ax-items-center\">\n <span\n class=\"ax-flex ax-items-center ax-justify-center ax-w-5 ax-h-5 ax-me-2 ax-text-xs ax-text-white ax-bg-neutral-500 ax-rounded-full ax-shrink-0\"\n [class.!ax-bg-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-bg-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n >\n {{ index + 1 }}\n </span>\n <p\n class=\"ax-font-normal\"\n [class.!ax-text-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-text-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n [class.!ax-font-semibold]=\"(loader.section$ | async) == section\"\n >\n {{ section.title }}\n </p>\n\n <i\n *ngIf=\"!last\"\n [class.!ax-text-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-text-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n class=\"ax-text-xs ax-text-neutral-500 fa-solid fa-chevrons-right ax-ms-2 sm:ax-ms-4 rtl:ax-rotate-180\"\n ></i>\n </li>\n }\n </ol>\n }\n\n <ax-form class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\" #form [messageStyle]=\"'bottom'\" [updateOn]=\"'blur'\">\n @for(section of (loader.section$ | async)?.sections; track section.name;) {\n <div class=\"ax-flex ax-flex-col ax-pb-4\">\n @if(((loader.section$ | async)?.sections?.length ?? 0) > 1) {\n <div class=\"ax-pb-4\">\n <span class=\"ax-font-bold ax-text-2xl\">{{ section.title }}</span>\n @if(section.description) {\n <p class=\"ax-text-sm ax-text-gray-500\">{{ section.description }}</p>\n }\n </div>\n }\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n @for(name of section.properties; track name) {\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <!-- lg:ax-col-span-6 -->\n <!-- lg:ax-col-start-1 -->\n <ax-form-field\n class=\"ax-col-span-12 ax-col-start-1 lg:ax-col-span-{{ prop.layout?.positions?.default?.span || 12 }} lg:ax-col-start-{{\n prop.layout?.positions?.default?.start || 1\n }} ax-flex ax-flex-col\"\n >\n <ax-label class=\"ax-font-semibold ax-text-sm\" [required]=\"loader.isRequired(name)\">{{ prop.title }}</ax-label>\n <axp-widget-renderer [schema]=\"prop.schema\" [prop]=\"prop\" [mode]=\"'edit'\" [context]=\"loader.data\"></axp-widget-renderer>\n </ax-form-field>\n </ng-container>\n }\n </div>\n </div>\n }\n </ax-form>\n <ax-footer>\n <ax-prefix> </ax-prefix>\n <ax-suffix>\n @if((loader.hasSections$| async) && !(loader.isFirst$| async)) {\n <ax-button look=\"solid\" color=\"ghost\" text=\"Back\" (onClick)=\"handleBackClick()\"> </ax-button>\n } @else {\n <ax-button look=\"solid\" color=\"ghost\" [text]=\"'cancel' | translate | async\" (onClick)=\"handleCloseClick()\"> </ax-button>\n } @if((loader.isLast$ | async)) {\n <ax-dropdown-button [disabled]=\"submitLoading()\" color=\"primary\" [text]=\"'save' | translate | async\" look=\"solid\" (onClick)=\"handleSaveClick(form)\">\n <ax-loading *ngIf=\"submitLoading()\"></ax-loading>\n <ax-button-item-list>\n <ax-button-item [text]=\"('save' | translate | async) + ' & ' + ('create-new' | translate | async)\" (onClick)=\"handleSaveAndNewClick(form)\">\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n\n } @else {\n <ax-button look=\"solid\" color=\"primary\" [text]=\"'continue' | translate | async\" (onClick)=\"handleNextClick(form)\"> </ax-button>\n }\n </ax-suffix>\n </ax-footer>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4$1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4$1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDialogModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i5.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXPSchemaModule }, { kind: "component", type: i10.AXPWidgetRendererComponent, selector: "axp-widget-renderer", inputs: ["context", "prop", "mode", "schema"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i7.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type: i14.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }, { kind: "directive", type:
|
|
93
|
-
//
|
|
94
|
-
AXPStickyDirective, selector: "[axpSticky]", inputs: ["axpSticky", "stickyOffset", "stickyParent", "stickyTarget"], outputs: ["isStickyChange"], exportAs: ["axpSticky"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
95
|
-
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateViewComponent, decorators: [{
|
|
97
|
-
type: Component,
|
|
98
|
-
args: [{ imports: [
|
|
99
|
-
CommonModule,
|
|
100
|
-
FormsModule,
|
|
101
|
-
AXFormModule,
|
|
102
|
-
AXDecoratorModule,
|
|
103
|
-
CommonModule,
|
|
104
|
-
AXButtonModule,
|
|
105
|
-
AXDialogModule,
|
|
106
|
-
AXLoadingModule,
|
|
107
|
-
AXTabsModule,
|
|
108
|
-
AXPSchemaModule,
|
|
109
|
-
AXTooltipModule,
|
|
110
|
-
AXValidationModule,
|
|
111
|
-
AXLabelModule,
|
|
112
|
-
AXDropdownModule,
|
|
113
|
-
AXDropdownButtonModule,
|
|
114
|
-
AXTranslationModule,
|
|
115
|
-
//
|
|
116
|
-
AXPStickyDirective,
|
|
117
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-min-h-[25vh]\">\n @if((loader.hasSections$ | async)) {\n <ol\n class=\"ax-flex ax-items-center ax-w-full ax-space-x-2 ax-text-sm ax-font-medium ax-text-center ax-text-gray-500 ax-bg-white dark:ax-text-gray-400 sm:ax-text-base ax-p-4 sm:ax-space-x-4 rtl:ax-space-x-reverse ax-sticky ax-top-0 ax-z-10\"\n [axpSticky]=\"'ax-bg-surface ax-drop-shadow-lg'\"\n [stickyParent]=\"'.ax-popup-body-container'\"\n >\n @for(section of (loader.sections$ | async); track section.name;let index = $index;let last = $last;let count= $count) {\n <li class=\"ax-flex ax-items-center\">\n <span\n class=\"ax-flex ax-items-center ax-justify-center ax-w-5 ax-h-5 ax-me-2 ax-text-xs ax-text-white ax-bg-neutral-500 ax-rounded-full ax-shrink-0\"\n [class.!ax-bg-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-bg-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n >\n {{ index + 1 }}\n </span>\n <p\n class=\"ax-font-normal\"\n [class.!ax-text-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-text-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n [class.!ax-font-semibold]=\"(loader.section$ | async) == section\"\n >\n {{ section.title }}\n </p>\n\n <i\n *ngIf=\"!last\"\n [class.!ax-text-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-text-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n class=\"ax-text-xs ax-text-neutral-500 fa-solid fa-chevrons-right ax-ms-2 sm:ax-ms-4 rtl:ax-rotate-180\"\n ></i>\n </li>\n }\n </ol>\n }\n\n <ax-form class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\" #form [messageStyle]=\"'bottom'\" [updateOn]=\"'blur'\">\n @for(section of (loader.section$ | async)?.sections; track section.name;) {\n <div class=\"ax-flex ax-flex-col ax-pb-4\">\n @if(((loader.section$ | async)?.sections?.length ?? 0) > 1) {\n <div class=\"ax-pb-4\">\n <span class=\"ax-font-bold ax-text-2xl\">{{ section.title }}</span>\n @if(section.description) {\n <p class=\"ax-text-sm ax-text-gray-500\">{{ section.description }}</p>\n }\n </div>\n }\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n @for(name of section.properties; track name) {\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <!-- lg:ax-col-span-6 -->\n <!-- lg:ax-col-start-1 -->\n <ax-form-field\n class=\"ax-col-span-12 ax-col-start-1 lg:ax-col-span-{{ prop.layout?.positions?.default?.span || 12 }} lg:ax-col-start-{{\n prop.layout?.positions?.default?.start || 1\n }} ax-flex ax-flex-col\"\n >\n <ax-label class=\"ax-font-semibold ax-text-sm\" [required]=\"loader.isRequired(name)\">{{ prop.title }}</ax-label>\n <axp-widget-renderer [schema]=\"prop.schema\" [prop]=\"prop\" [mode]=\"'edit'\" [context]=\"loader.data\"></axp-widget-renderer>\n </ax-form-field>\n </ng-container>\n }\n </div>\n </div>\n }\n </ax-form>\n <ax-footer>\n <ax-prefix> </ax-prefix>\n <ax-suffix>\n @if((loader.hasSections$| async) && !(loader.isFirst$| async)) {\n <ax-button look=\"solid\" color=\"ghost\" text=\"Back\" (onClick)=\"handleBackClick()\"> </ax-button>\n } @else {\n <ax-button look=\"solid\" color=\"ghost\" [text]=\"'cancel' | translate | async\" (onClick)=\"handleCloseClick()\"> </ax-button>\n } @if((loader.isLast$ | async)) {\n <ax-dropdown-button [disabled]=\"submitLoading()\" color=\"primary\" [text]=\"'save' | translate | async\" look=\"solid\" (onClick)=\"handleSaveClick(form)\">\n <ax-loading *ngIf=\"submitLoading()\"></ax-loading>\n <ax-button-item-list>\n <ax-button-item [text]=\"('save' | translate | async) + ' & ' + ('create-new' | translate | async)\" (onClick)=\"handleSaveAndNewClick(form)\">\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n\n } @else {\n <ax-button look=\"solid\" color=\"primary\" [text]=\"'continue' | translate | async\" (onClick)=\"handleNextClick(form)\"> </ax-button>\n }\n </ax-suffix>\n </ax-footer>\n</div>\n" }]
|
|
118
|
-
}] });
|
|
119
|
-
|
|
120
|
-
export { AXPEntityCreateViewComponent };
|
|
121
|
-
//# sourceMappingURL=acorex-platform-layouts-entity-create-view.component-1Yw4H3CW.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-layouts-entity-create-view.component-1Yw4H3CW.mjs","sources":["../../../../libs/platform/layouts/src/lib/admin/entity-layout/entity-create-view/entity-create-view.component.ts","../../../../libs/platform/layouts/src/lib/admin/entity-layout/entity-create-view/entity-create-view.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDialogModule } from '@acorex/components/dialog';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTabsModule } from '@acorex/components/tabs';\nimport { AXTooltipModule } from '@acorex/components/tooltip';\nimport { AXPEntityConfig, AXPSchemaModule } from '@acorex/platform/common';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, WritableSignal, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXPEntityCreateViewLoader } from './entity-create-view.config';\n\nimport { AXValidationModule } from '@acorex/core/validation';\n\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPStickyDirective } from '@acorex/platform/common';\nimport { AXPWorkflowService } from '@acorex/platform/workflow';\n\n@Component({\n templateUrl: './entity-create-view.component.html',\n imports: [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXDecoratorModule,\n CommonModule,\n AXButtonModule,\n AXDialogModule,\n AXLoadingModule,\n AXTabsModule,\n AXPSchemaModule,\n AXTooltipModule,\n AXValidationModule,\n AXLabelModule,\n AXDropdownModule,\n AXDropdownButtonModule,\n AXTranslationModule,\n //\n AXPStickyDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AXPEntityCreateViewComponent extends AXBasePageComponent {\n protected loader!: AXPEntityCreateViewLoader;\n protected entity!: AXPEntityConfig;\n protected workflow = inject(AXPWorkflowService);\n protected submitLoading: WritableSignal<boolean> = signal(false);\n\n protected handleCloseClick() {\n this.close();\n }\n\n protected async handleBackClick() {\n await this.loader.back();\n }\n\n protected async handleNextClick(form: AXFormComponent) {\n const formResult = await form.validate();\n if (formResult.result) {\n await this.loader.next();\n }\n }\n\n protected async handleSaveClick(form: AXFormComponent) {\n const formResult = await form.validate();\n if (formResult.result) {\n if (this.entity.commands?.create) {\n this.submitLoading.set(true);\n const options = this.entity.actions?.['create'].options;\n try {\n const record = await this.entity.commands.create(this.loader.data);\n if (record) {\n this.close({ save: true, recordId: record.id, redirect: options?.redirect ?? true });\n }\n } catch (error) {\n console.log(error);\n }\n this.submitLoading.set(false);\n }\n }\n }\n\n protected async handleSaveAndNewClick(form: AXFormComponent) {\n const formResult = await form.validate();\n if (formResult.result) {\n if (this.entity.commands?.create) {\n this.submitLoading.set(true);\n try {\n const record = await this.entity.commands.create(this.loader.data);\n if (record) {\n this.close({ save: true, recordId: record.id, redirect: false });\n }\n } catch (error) {\n console.log(error);\n }\n this.submitLoading.set(false);\n }\n this.workflow.execute('create-entity', {\n payload: {\n module: this.loader.entity.module,\n entity: this.loader.entity.name,\n },\n });\n }\n }\n}\n","<div class=\"ax-min-h-[25vh]\">\n @if((loader.hasSections$ | async)) {\n <ol\n class=\"ax-flex ax-items-center ax-w-full ax-space-x-2 ax-text-sm ax-font-medium ax-text-center ax-text-gray-500 ax-bg-white dark:ax-text-gray-400 sm:ax-text-base ax-p-4 sm:ax-space-x-4 rtl:ax-space-x-reverse ax-sticky ax-top-0 ax-z-10\"\n [axpSticky]=\"'ax-bg-surface ax-drop-shadow-lg'\"\n [stickyParent]=\"'.ax-popup-body-container'\"\n >\n @for(section of (loader.sections$ | async); track section.name;let index = $index;let last = $last;let count= $count) {\n <li class=\"ax-flex ax-items-center\">\n <span\n class=\"ax-flex ax-items-center ax-justify-center ax-w-5 ax-h-5 ax-me-2 ax-text-xs ax-text-white ax-bg-neutral-500 ax-rounded-full ax-shrink-0\"\n [class.!ax-bg-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-bg-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n >\n {{ index + 1 }}\n </span>\n <p\n class=\"ax-font-normal\"\n [class.!ax-text-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-text-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n [class.!ax-font-semibold]=\"(loader.section$ | async) == section\"\n >\n {{ section.title }}\n </p>\n\n <i\n *ngIf=\"!last\"\n [class.!ax-text-primary-500]=\"(loader.section$ | async) == section\"\n [class.!ax-text-success-500]=\"index < ((loader.currentIndex$ | async) || 0)\"\n class=\"ax-text-xs ax-text-neutral-500 fa-solid fa-chevrons-right ax-ms-2 sm:ax-ms-4 rtl:ax-rotate-180\"\n ></i>\n </li>\n }\n </ol>\n }\n\n <ax-form class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\" #form [messageStyle]=\"'bottom'\" [updateOn]=\"'blur'\">\n @for(section of (loader.section$ | async)?.sections; track section.name;) {\n <div class=\"ax-flex ax-flex-col ax-pb-4\">\n @if(((loader.section$ | async)?.sections?.length ?? 0) > 1) {\n <div class=\"ax-pb-4\">\n <span class=\"ax-font-bold ax-text-2xl\">{{ section.title }}</span>\n @if(section.description) {\n <p class=\"ax-text-sm ax-text-gray-500\">{{ section.description }}</p>\n }\n </div>\n }\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n @for(name of section.properties; track name) {\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <!-- lg:ax-col-span-6 -->\n <!-- lg:ax-col-start-1 -->\n <ax-form-field\n class=\"ax-col-span-12 ax-col-start-1 lg:ax-col-span-{{ prop.layout?.positions?.default?.span || 12 }} lg:ax-col-start-{{\n prop.layout?.positions?.default?.start || 1\n }} ax-flex ax-flex-col\"\n >\n <ax-label class=\"ax-font-semibold ax-text-sm\" [required]=\"loader.isRequired(name)\">{{ prop.title }}</ax-label>\n <axp-widget-renderer [schema]=\"prop.schema\" [prop]=\"prop\" [mode]=\"'edit'\" [context]=\"loader.data\"></axp-widget-renderer>\n </ax-form-field>\n </ng-container>\n }\n </div>\n </div>\n }\n </ax-form>\n <ax-footer>\n <ax-prefix> </ax-prefix>\n <ax-suffix>\n @if((loader.hasSections$| async) && !(loader.isFirst$| async)) {\n <ax-button look=\"solid\" color=\"ghost\" text=\"Back\" (onClick)=\"handleBackClick()\"> </ax-button>\n } @else {\n <ax-button look=\"solid\" color=\"ghost\" [text]=\"'cancel' | translate | async\" (onClick)=\"handleCloseClick()\"> </ax-button>\n } @if((loader.isLast$ | async)) {\n <ax-dropdown-button [disabled]=\"submitLoading()\" color=\"primary\" [text]=\"'save' | translate | async\" look=\"solid\" (onClick)=\"handleSaveClick(form)\">\n <ax-loading *ngIf=\"submitLoading()\"></ax-loading>\n <ax-button-item-list>\n <ax-button-item [text]=\"('save' | translate | async) + ' & ' + ('create-new' | translate | async)\" (onClick)=\"handleSaveAndNewClick(form)\">\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n\n } @else {\n <ax-button look=\"solid\" color=\"primary\" [text]=\"'continue' | translate | async\" (onClick)=\"handleNextClick(form)\"> </ax-button>\n }\n </ax-suffix>\n </ax-footer>\n</div>\n"],"names":["i3","i6","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CM,MAAO,4BAA6B,SAAQ,mBAAmB,CAAA;AAxBrE,IAAA,WAAA,GAAA;;AA2BY,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,aAAa,GAA4B,MAAM,CAAC,KAAK,CAAC;AA2DjE;IAzDW,gBAAgB,GAAA;QACxB,IAAI,CAAC,KAAK,EAAE;;AAGJ,IAAA,MAAM,eAAe,GAAA;AAC7B,QAAA,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;;IAGhB,MAAM,eAAe,CAAC,IAAqB,EAAA;AACnD,QAAA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE;AACxC,QAAA,IAAI,UAAU,CAAC,MAAM,EAAE;AACrB,YAAA,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;;;IAIlB,MAAM,eAAe,CAAC,IAAqB,EAAA;AACnD,QAAA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE;AACxC,QAAA,IAAI,UAAU,CAAC,MAAM,EAAE;YACrB,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE;AAChC,gBAAA,IAAI,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|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
3
|
-
import * as i4 from '@acorex/components/decorators';
|
|
4
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
|
-
import { AXDialogModule } from '@acorex/components/dialog';
|
|
6
|
-
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
7
|
-
import { AXFormModule } from '@acorex/components/form';
|
|
8
|
-
import { AXLabelModule } from '@acorex/components/label';
|
|
9
|
-
import * as i5 from '@acorex/components/loading';
|
|
10
|
-
import { AXLoadingModule } from '@acorex/components/loading';
|
|
11
|
-
import { AXBasePageComponent } from '@acorex/components/page';
|
|
12
|
-
import { AXTabsModule } from '@acorex/components/tabs';
|
|
13
|
-
import { AXTooltipModule } from '@acorex/components/tooltip';
|
|
14
|
-
import { AXPDataProvider, AXPSchemaModule } from '@acorex/platform/common';
|
|
15
|
-
import { CommonModule } from '@angular/common';
|
|
16
|
-
import * as i0 from '@angular/core';
|
|
17
|
-
import { viewChild, inject, signal, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
18
|
-
import * as i1 from '@angular/forms';
|
|
19
|
-
import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
20
|
-
import { AXValidationModule } from '@acorex/core/validation';
|
|
21
|
-
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
22
|
-
import { AXPWorkflowService } from '@acorex/platform/workflow';
|
|
23
|
-
|
|
24
|
-
class AXPEntityImportViewComponent extends AXBasePageComponent {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
this.fileInput = viewChild('input');
|
|
28
|
-
this.workflow = inject(AXPWorkflowService);
|
|
29
|
-
this.dataService = inject(AXPDataProvider);
|
|
30
|
-
this.submitLoading = signal(false);
|
|
31
|
-
this.selectedFileInfo = signal(null);
|
|
32
|
-
this.form = new FormGroup({
|
|
33
|
-
title: new FormControl(''),
|
|
34
|
-
file: new FormControl(null),
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
onFilePicked(event) {
|
|
38
|
-
const file = event.target?.files?.[0];
|
|
39
|
-
this.form.patchValue({ file: file });
|
|
40
|
-
this.selectedFileInfo.set(this.form.controls?.file.value);
|
|
41
|
-
}
|
|
42
|
-
handleCloseClick() {
|
|
43
|
-
this.close();
|
|
44
|
-
}
|
|
45
|
-
async handleUploadClick() {
|
|
46
|
-
if (this.form.status === 'VALID') {
|
|
47
|
-
const file = this.form.controls.file.value;
|
|
48
|
-
if (file) {
|
|
49
|
-
this.submitLoading.set(true);
|
|
50
|
-
const url = `${this.entity.module}/${this.entity.name}/ImportExcel`;
|
|
51
|
-
const resolved = await this.dataService.uploadFile(file, file.name, url);
|
|
52
|
-
this.submitLoading.set(false);
|
|
53
|
-
if (resolved.totalCount) {
|
|
54
|
-
this.close({ save: true, redirect: false });
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
console.log('Form is invalid');
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
handleUploaderClick() {
|
|
63
|
-
this.fileInput()?.nativeElement.click();
|
|
64
|
-
}
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityImportViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
66
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityImportViewComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-min-h-[25vh]\">\n <form class=\"ax-flex ax-flex-col ax-gap-2 ax-p-4\">\n <div\n class=\"ax-flex ax-cursor-pointer ax-items-center ax-justify-center ax-border ax-border- ax-rounded-lg ax-h-40 ax-flex-col ax-gap-2\"\n (click)=\"handleUploaderClick()\"\n >\n @if(selectedFileInfo()?.name){\n <label>{{ selectedFileInfo()?.name }}</label>\n }@else{\n <label class=\"ax-cursor-pointer\">Choose an Excel file to upload</label>\n }\n <input\n (change)=\"onFilePicked($event)\"\n type=\"file\"\n id=\"fileUpload\"\n name=\"fileUpload\"\n accept=\".xlsx, .xls\"\n ngModel\n required\n #input\n class=\"ax-invisible ax-size-0 ax-absolute\"\n />\n </div>\n @if(selectedFileInfo()){\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <div class=\"ax-flex ax-flex-col ax-text-sm ax-font-semibold\">\n <span>{{ selectedFileInfo()?.name }}</span>\n <!-- <span>{{ selectedFileInfo()?.size | format : 'filesize' | async }}</span> -->\n </div>\n <ax-icon class=\"fa-solid fa-circle-check ax-text-success\"> </ax-icon>\n </div>\n }\n </form>\n <ax-footer>\n <ax-prefix> </ax-prefix>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"ghost\" text=\"Cancel\" (onClick)=\"handleCloseClick()\"> </ax-button>\n <ax-button look=\"solid\" color=\"primary\" text=\"Upload\" (onClick)=\"handleUploadClick()\" [disabled]=\"submitLoading()\">\n @if(submitLoading()){\n <ax-loading></ax-loading>\n }\n </ax-button>\n </ax-suffix>\n </ax-footer>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDialogModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i5.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXPSchemaModule }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDropdownButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
67
|
-
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityImportViewComponent, decorators: [{
|
|
69
|
-
type: Component,
|
|
70
|
-
args: [{ imports: [
|
|
71
|
-
CommonModule,
|
|
72
|
-
FormsModule,
|
|
73
|
-
ReactiveFormsModule,
|
|
74
|
-
AXFormModule,
|
|
75
|
-
AXDecoratorModule,
|
|
76
|
-
CommonModule,
|
|
77
|
-
AXButtonModule,
|
|
78
|
-
AXDialogModule,
|
|
79
|
-
AXLoadingModule,
|
|
80
|
-
AXTabsModule,
|
|
81
|
-
AXPSchemaModule,
|
|
82
|
-
AXTooltipModule,
|
|
83
|
-
AXValidationModule,
|
|
84
|
-
AXLabelModule,
|
|
85
|
-
AXDropdownModule,
|
|
86
|
-
AXDropdownButtonModule,
|
|
87
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-min-h-[25vh]\">\n <form class=\"ax-flex ax-flex-col ax-gap-2 ax-p-4\">\n <div\n class=\"ax-flex ax-cursor-pointer ax-items-center ax-justify-center ax-border ax-border- ax-rounded-lg ax-h-40 ax-flex-col ax-gap-2\"\n (click)=\"handleUploaderClick()\"\n >\n @if(selectedFileInfo()?.name){\n <label>{{ selectedFileInfo()?.name }}</label>\n }@else{\n <label class=\"ax-cursor-pointer\">Choose an Excel file to upload</label>\n }\n <input\n (change)=\"onFilePicked($event)\"\n type=\"file\"\n id=\"fileUpload\"\n name=\"fileUpload\"\n accept=\".xlsx, .xls\"\n ngModel\n required\n #input\n class=\"ax-invisible ax-size-0 ax-absolute\"\n />\n </div>\n @if(selectedFileInfo()){\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <div class=\"ax-flex ax-flex-col ax-text-sm ax-font-semibold\">\n <span>{{ selectedFileInfo()?.name }}</span>\n <!-- <span>{{ selectedFileInfo()?.size | format : 'filesize' | async }}</span> -->\n </div>\n <ax-icon class=\"fa-solid fa-circle-check ax-text-success\"> </ax-icon>\n </div>\n }\n </form>\n <ax-footer>\n <ax-prefix> </ax-prefix>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"ghost\" text=\"Cancel\" (onClick)=\"handleCloseClick()\"> </ax-button>\n <ax-button look=\"solid\" color=\"primary\" text=\"Upload\" (onClick)=\"handleUploadClick()\" [disabled]=\"submitLoading()\">\n @if(submitLoading()){\n <ax-loading></ax-loading>\n }\n </ax-button>\n </ax-suffix>\n </ax-footer>\n</div>\n" }]
|
|
88
|
-
}] });
|
|
89
|
-
|
|
90
|
-
export { AXPEntityImportViewComponent };
|
|
91
|
-
//# sourceMappingURL=acorex-platform-layouts-entity-import-view.component-BIHTWoXR.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-layouts-entity-import-view.component-BIHTWoXR.mjs","sources":["../../../../libs/platform/layouts/src/lib/admin/entity-layout/entity-import-view/entity-import-view.component.ts","../../../../libs/platform/layouts/src/lib/admin/entity-layout/entity-import-view/entity-import-view.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDialogModule } from '@acorex/components/dialog';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTabsModule } from '@acorex/components/tabs';\nimport { AXTooltipModule } from '@acorex/components/tooltip';\nimport { AXPDataProvider, AXPEntityConfig, AXPSchemaModule } from '@acorex/platform/common';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n WritableSignal,\n inject,\n signal,\n viewChild,\n} from '@angular/core';\nimport { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { AXValidationModule } from '@acorex/core/validation';\n\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXPWorkflowService } from '@acorex/platform/workflow';\n\n@Component({\n templateUrl: './entity-import-view.component.html',\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n AXFormModule,\n AXDecoratorModule,\n CommonModule,\n AXButtonModule,\n AXDialogModule,\n AXLoadingModule,\n AXTabsModule,\n AXPSchemaModule,\n AXTooltipModule,\n AXValidationModule,\n AXLabelModule,\n AXDropdownModule,\n AXDropdownButtonModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPEntityImportViewComponent extends AXBasePageComponent {\n fileInput = viewChild<ElementRef<HTMLDivElement>>('input');\n\n protected workflow = inject(AXPWorkflowService);\n protected dataService = inject(AXPDataProvider);\n protected entity!: AXPEntityConfig;\n protected submitLoading: WritableSignal<boolean> = signal(false);\n protected selectedFileInfo: WritableSignal<{ name: string; size: string } | null> = signal(null);\n\n form = new FormGroup({\n title: new FormControl(''),\n file: new FormControl(null),\n });\n\n onFilePicked(event: Event) {\n const file = (event.target as HTMLInputElement)?.files?.[0];\n this.form.patchValue({ file: file as any });\n this.selectedFileInfo.set(this.form.controls?.file.value);\n }\n\n protected handleCloseClick() {\n this.close();\n }\n\n protected async handleUploadClick() {\n if (this.form.status === 'VALID') {\n const file: any = this.form.controls.file.value;\n\n if (file) {\n this.submitLoading.set(true);\n const url = `${this.entity.module}/${this.entity.name}/ImportExcel`;\n const resolved: any = await this.dataService.uploadFile(file, file.name, url);\n this.submitLoading.set(false);\n if (resolved.totalCount) {\n this.close({ save: true, redirect: false });\n }\n }\n } else {\n console.log('Form is invalid');\n }\n }\n\n handleUploaderClick() {\n this.fileInput()?.nativeElement.click();\n }\n}\n","<div class=\"ax-min-h-[25vh]\">\n <form class=\"ax-flex ax-flex-col ax-gap-2 ax-p-4\">\n <div\n class=\"ax-flex ax-cursor-pointer ax-items-center ax-justify-center ax-border ax-border- ax-rounded-lg ax-h-40 ax-flex-col ax-gap-2\"\n (click)=\"handleUploaderClick()\"\n >\n @if(selectedFileInfo()?.name){\n <label>{{ selectedFileInfo()?.name }}</label>\n }@else{\n <label class=\"ax-cursor-pointer\">Choose an Excel file to upload</label>\n }\n <input\n (change)=\"onFilePicked($event)\"\n type=\"file\"\n id=\"fileUpload\"\n name=\"fileUpload\"\n accept=\".xlsx, .xls\"\n ngModel\n required\n #input\n class=\"ax-invisible ax-size-0 ax-absolute\"\n />\n </div>\n @if(selectedFileInfo()){\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <div class=\"ax-flex ax-flex-col ax-text-sm ax-font-semibold\">\n <span>{{ selectedFileInfo()?.name }}</span>\n <!-- <span>{{ selectedFileInfo()?.size | format : 'filesize' | async }}</span> -->\n </div>\n <ax-icon class=\"fa-solid fa-circle-check ax-text-success\"> </ax-icon>\n </div>\n }\n </form>\n <ax-footer>\n <ax-prefix> </ax-prefix>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"ghost\" text=\"Cancel\" (onClick)=\"handleCloseClick()\"> </ax-button>\n <ax-button look=\"solid\" color=\"primary\" text=\"Upload\" (onClick)=\"handleUploadClick()\" [disabled]=\"submitLoading()\">\n @if(submitLoading()){\n <ax-loading></ax-loading>\n }\n </ax-button>\n </ax-suffix>\n </ax-footer>\n</div>\n"],"names":["i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAkDM,MAAO,4BAA6B,SAAQ,mBAAmB,CAAA;AAtBrE,IAAA,WAAA,GAAA;;AAuBE,QAAA,IAAA,CAAA,SAAS,GAAG,SAAS,CAA6B,OAAO,CAAC;AAEhD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,eAAe,CAAC;AAErC,QAAA,IAAA,CAAA,aAAa,GAA4B,MAAM,CAAC,KAAK,CAAC;AACtD,QAAA,IAAA,CAAA,gBAAgB,GAA0D,MAAM,CAAC,IAAI,CAAC;QAEhG,IAAI,CAAA,IAAA,GAAG,IAAI,SAAS,CAAC;AACnB,YAAA,KAAK,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;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A,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACf,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACZ,eAAe,EACf,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,eAAe,EACf,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,kBAAkB,EAClB,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,aAAa,EACb,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,gBAAgB,8BAChB,sBAAsB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIb,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAtBxC,SAAS;AAEC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,YAAY;wBACZ,iBAAiB;wBACjB,YAAY;wBACZ,cAAc;wBACd,cAAc;wBACd,eAAe;wBACf,YAAY;wBACZ,eAAe;wBACf,eAAe;wBACf,kBAAkB;wBAClB,aAAa;wBACb,gBAAgB;wBAChB,sBAAsB;qBACvB,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4nDAAA,EAAA;;;;;"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import * as i4$1 from '@acorex/components/button';
|
|
2
|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
3
|
-
import * as i4 from '@acorex/components/decorators';
|
|
4
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
|
-
import { AXDialogModule } from '@acorex/components/dialog';
|
|
6
|
-
import * as i14 from '@acorex/components/dropdown-button';
|
|
7
|
-
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
8
|
-
import * as i2 from '@acorex/components/form';
|
|
9
|
-
import { AXFormModule } from '@acorex/components/form';
|
|
10
|
-
import { AXLabelModule } from '@acorex/components/label';
|
|
11
|
-
import * as i5 from '@acorex/components/loading';
|
|
12
|
-
import { AXLoadingModule } from '@acorex/components/loading';
|
|
13
|
-
import { AXBasePageComponent } from '@acorex/components/page';
|
|
14
|
-
import { AXTabsModule } from '@acorex/components/tabs';
|
|
15
|
-
import { AXTooltipModule } from '@acorex/components/tooltip';
|
|
16
|
-
import * as i8 from '@acorex/core/translation';
|
|
17
|
-
import { AXTranslationModule } from '@acorex/core/translation';
|
|
18
|
-
import { AXValidationModule } from '@acorex/core/validation';
|
|
19
|
-
import * as i10 from '@acorex/platform/common';
|
|
20
|
-
import { AXPSchemaModule } from '@acorex/platform/common';
|
|
21
|
-
import * as i1 from '@angular/common';
|
|
22
|
-
import { CommonModule } from '@angular/common';
|
|
23
|
-
import * as i0 from '@angular/core';
|
|
24
|
-
import { signal, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
25
|
-
import { FormsModule } from '@angular/forms';
|
|
26
|
-
import { cloneDeep } from 'lodash-es';
|
|
27
|
-
|
|
28
|
-
class AXPEntityModifyViewComponent extends AXBasePageComponent {
|
|
29
|
-
constructor() {
|
|
30
|
-
super(...arguments);
|
|
31
|
-
this.properties = [];
|
|
32
|
-
this.submitLoading = signal(false);
|
|
33
|
-
this.editForm = {};
|
|
34
|
-
}
|
|
35
|
-
handleCloseClick() {
|
|
36
|
-
this.close({ result: false });
|
|
37
|
-
}
|
|
38
|
-
ngOnInit() {
|
|
39
|
-
this.editForm.context = cloneDeep(this.context);
|
|
40
|
-
this.editForm.previousContext = cloneDeep(this.context);
|
|
41
|
-
}
|
|
42
|
-
async handleSectionDiscard(form) {
|
|
43
|
-
this.close({ result: false });
|
|
44
|
-
}
|
|
45
|
-
async handleSectionReset(form) {
|
|
46
|
-
this.editForm.context = cloneDeep(this.editForm.previousContext);
|
|
47
|
-
}
|
|
48
|
-
async handleSectionSubmit(form) {
|
|
49
|
-
const formResult = await form.validate();
|
|
50
|
-
if (formResult.result) {
|
|
51
|
-
if (this.entity.commands?.update) {
|
|
52
|
-
this.submitLoading.set(true);
|
|
53
|
-
try {
|
|
54
|
-
const res = await this.entity.commands.update(this.editForm.context.id, this.editForm.context);
|
|
55
|
-
if (res?.result != false) {
|
|
56
|
-
this.close({ result: true, context: this.editForm.context });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
console.log(error);
|
|
61
|
-
}
|
|
62
|
-
this.submitLoading.set(false);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
ngOnDestroy() {
|
|
67
|
-
super.ngOnDestroy();
|
|
68
|
-
this.editForm.context = null;
|
|
69
|
-
this.editForm.previousContext = null;
|
|
70
|
-
}
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPEntityModifyViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-min-h-[25vh]\">\n <ax-form class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\" #form [messageStyle]=\"'bottom'\" [updateOn]=\"'blur'\">\n <div class=\"ax-flex ax-flex-col ax-pb-4\">\n <ax-form-field class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <ng-container *ngFor=\"let name of properties\">\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <!-- lg:ax-col-span-6 -->\n <!-- lg:ax-col-start-1 -->\n <div *ngIf=\"prop.canEdit\" class=\"ax-col-span-12 ax-col-start-1 lg:ax-col-span-{{\n prop.layout?.positions?.default?.span || 12\n }} lg:ax-col-start-{{ prop.layout?.positions?.default?.start || 1 }} ax-flex ax-flex-col ax-gap-1\">\n <span class=\"ax-font-semibold ax-text-sm\">{{ prop.title }}</span>\n <axp-widget-renderer [schema]=\"prop.schema\" [prop]=\"prop\" [mode]=\"'edit'\"\n [context]=\"editForm.context\"></axp-widget-renderer>\n </div>\n </ng-container>\n </ng-container>\n </ax-form-field>\n </div>\n </ax-form>\n <ax-footer>\n <ax-suffix>\n <ax-dropdown-button [text]=\"'discard' | translate | async\" (onClick)=\"handleSectionDiscard(form)\">\n <ax-button-item-list>\n <ax-button-item [text]=\"('reset' | translate | async) ?? ' '\" (onClick)=\"handleSectionReset(form)\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-rotate-left fa-flip-horizontal\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n <ax-button [disabled]=\"submitLoading()\" color=\"primary\" [text]=\"'save-changes' | translate | async\" (onClick)=\"handleSectionSubmit(form)\">\n <ax-loading *ngIf=\"submitLoading()\"></ax-loading>\n </ax-button>\n </ax-suffix>\n </ax-footer>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4$1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4$1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDialogModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i5.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXPSchemaModule }, { kind: "component", type: i10.AXPWidgetRendererComponent, selector: "axp-widget-renderer", inputs: ["context", "prop", "mode", "schema"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type: i14.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
73
|
-
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyViewComponent, decorators: [{
|
|
75
|
-
type: Component,
|
|
76
|
-
args: [{ imports: [
|
|
77
|
-
CommonModule,
|
|
78
|
-
FormsModule,
|
|
79
|
-
AXFormModule,
|
|
80
|
-
AXDecoratorModule,
|
|
81
|
-
CommonModule,
|
|
82
|
-
AXButtonModule,
|
|
83
|
-
AXDialogModule,
|
|
84
|
-
AXLoadingModule,
|
|
85
|
-
AXTabsModule,
|
|
86
|
-
AXPSchemaModule,
|
|
87
|
-
AXTooltipModule,
|
|
88
|
-
AXValidationModule,
|
|
89
|
-
AXLabelModule,
|
|
90
|
-
AXDropdownButtonModule,
|
|
91
|
-
AXTranslationModule,
|
|
92
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-min-h-[25vh]\">\n <ax-form class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\" #form [messageStyle]=\"'bottom'\" [updateOn]=\"'blur'\">\n <div class=\"ax-flex ax-flex-col ax-pb-4\">\n <ax-form-field class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <ng-container *ngFor=\"let name of properties\">\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <!-- lg:ax-col-span-6 -->\n <!-- lg:ax-col-start-1 -->\n <div *ngIf=\"prop.canEdit\" class=\"ax-col-span-12 ax-col-start-1 lg:ax-col-span-{{\n prop.layout?.positions?.default?.span || 12\n }} lg:ax-col-start-{{ prop.layout?.positions?.default?.start || 1 }} ax-flex ax-flex-col ax-gap-1\">\n <span class=\"ax-font-semibold ax-text-sm\">{{ prop.title }}</span>\n <axp-widget-renderer [schema]=\"prop.schema\" [prop]=\"prop\" [mode]=\"'edit'\"\n [context]=\"editForm.context\"></axp-widget-renderer>\n </div>\n </ng-container>\n </ng-container>\n </ax-form-field>\n </div>\n </ax-form>\n <ax-footer>\n <ax-suffix>\n <ax-dropdown-button [text]=\"'discard' | translate | async\" (onClick)=\"handleSectionDiscard(form)\">\n <ax-button-item-list>\n <ax-button-item [text]=\"('reset' | translate | async) ?? ' '\" (onClick)=\"handleSectionReset(form)\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-rotate-left fa-flip-horizontal\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n <ax-button [disabled]=\"submitLoading()\" color=\"primary\" [text]=\"'save-changes' | translate | async\" (onClick)=\"handleSectionSubmit(form)\">\n <ax-loading *ngIf=\"submitLoading()\"></ax-loading>\n </ax-button>\n </ax-suffix>\n </ax-footer>\n</div>" }]
|
|
93
|
-
}] });
|
|
94
|
-
|
|
95
|
-
export { AXPEntityModifyViewComponent };
|
|
96
|
-
//# sourceMappingURL=acorex-platform-layouts-entity-modify-view.component-Cb2Yvtav.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-layouts-entity-modify-view.component-Cb2Yvtav.mjs","sources":["../../../../libs/platform/layouts/src/lib/admin/entity-layout/entity-modify-view/entity-modify-view.component.ts","../../../../libs/platform/layouts/src/lib/admin/entity-layout/entity-modify-view/entity-modify-view.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDialogModule } from '@acorex/components/dialog';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTabsModule } from '@acorex/components/tabs';\nimport { AXTooltipModule } from '@acorex/components/tooltip';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPEntityConfig, AXPSchemaModule } from '@acorex/platform/common';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, WritableSignal, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { cloneDeep } from 'lodash-es';\nimport { AXPEntityModifyViewLoader } from './entity-modify-view.config';\n\n@Component({\n templateUrl: './entity-modify-view.component.html',\n imports: [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXDecoratorModule,\n CommonModule,\n AXButtonModule,\n AXDialogModule,\n AXLoadingModule,\n AXTabsModule,\n AXPSchemaModule,\n AXTooltipModule,\n AXValidationModule,\n AXLabelModule,\n AXDropdownButtonModule,\n AXTranslationModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPEntityModifyViewComponent extends AXBasePageComponent {\n protected loader!: AXPEntityModifyViewLoader;\n context: any;\n entity!: AXPEntityConfig;\n properties: string[] = [];\n submitLoading: WritableSignal<boolean> = signal(false);\n\n protected editForm: {\n context?: any;\n previousContext?: any;\n } = {};\n\n protected handleCloseClick() {\n this.close({ result: false });\n }\n\n protected override ngOnInit(): void {\n this.editForm.context = cloneDeep(this.context);\n this.editForm.previousContext = cloneDeep(this.context);\n }\n\n protected async handleSectionDiscard(form: AXFormComponent) {\n this.close({ result: false });\n }\n\n protected async handleSectionReset(form: AXFormComponent) {\n this.editForm.context = cloneDeep(this.editForm.previousContext);\n }\n\n protected async handleSectionSubmit(form: AXFormComponent) {\n const formResult = await form.validate();\n if (formResult.result) {\n if (this.entity.commands?.update) {\n this.submitLoading.set(true);\n try {\n const res = await this.entity.commands.update(this.editForm.context.id, this.editForm.context);\n if (res?.result != false) {\n this.close({ result: true, context: this.editForm.context });\n }\n } catch (error) {\n console.log(error);\n }\n this.submitLoading.set(false);\n }\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this.editForm.context = null;\n this.editForm.previousContext = null;\n }\n\n // override onClosing(e: AXComponentClosing): void | Promise<void> {\n // if (e.data?.save || isEmpty(this.loader.data))\n // e.cancel = false;\n // else {\n // e.cancel = true;\n // }\n // }\n}\n","<div class=\"ax-min-h-[25vh]\">\n <ax-form class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\" #form [messageStyle]=\"'bottom'\" [updateOn]=\"'blur'\">\n <div class=\"ax-flex ax-flex-col ax-pb-4\">\n <ax-form-field class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <ng-container *ngFor=\"let name of properties\">\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <!-- lg:ax-col-span-6 -->\n <!-- lg:ax-col-start-1 -->\n <div *ngIf=\"prop.canEdit\" class=\"ax-col-span-12 ax-col-start-1 lg:ax-col-span-{{\n prop.layout?.positions?.default?.span || 12\n }} lg:ax-col-start-{{ prop.layout?.positions?.default?.start || 1 }} ax-flex ax-flex-col ax-gap-1\">\n <span class=\"ax-font-semibold ax-text-sm\">{{ prop.title }}</span>\n <axp-widget-renderer [schema]=\"prop.schema\" [prop]=\"prop\" [mode]=\"'edit'\"\n [context]=\"editForm.context\"></axp-widget-renderer>\n </div>\n </ng-container>\n </ng-container>\n </ax-form-field>\n </div>\n </ax-form>\n <ax-footer>\n <ax-suffix>\n <ax-dropdown-button [text]=\"'discard' | translate | async\" (onClick)=\"handleSectionDiscard(form)\">\n <ax-button-item-list>\n <ax-button-item [text]=\"('reset' | translate | async) ?? ' '\" (onClick)=\"handleSectionReset(form)\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-rotate-left fa-flip-horizontal\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n <ax-button [disabled]=\"submitLoading()\" color=\"primary\" [text]=\"'save-changes' | translate | async\" (onClick)=\"handleSectionSubmit(form)\">\n <ax-loading *ngIf=\"submitLoading()\"></ax-loading>\n </ax-button>\n </ax-suffix>\n </ax-footer>\n</div>"],"names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