ngx-axis-appforge 0.0.7 → 0.0.9
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/axis-components/date-picker/design/index.d.ts +5 -0
- package/axis-components/date-picker/index.d.ts +36 -0
- package/axis-components/design/index.d.ts +16 -18
- package/axis-components/single-selector/index.d.ts +2 -0
- package/axis-components-covers/date-picker.svg +28 -0
- package/core/index.d.ts +20 -6
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker-design.mjs +115 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs +104 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +48 -50
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs +10 -3
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +3 -2
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +20 -3
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +47 -14
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +103 -95
|
@@ -22,7 +22,7 @@ import { FilteredTreeResult, AXIS_COMPONENTS_LOADER_TOKEN, ScopeDirective, Dynam
|
|
|
22
22
|
import * as i6 from 'ng-zorro-antd/button';
|
|
23
23
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
24
24
|
import * as i9 from 'ng-zorro-antd/tooltip';
|
|
25
|
-
import { NzTooltipModule
|
|
25
|
+
import { NzTooltipModule } from 'ng-zorro-antd/tooltip';
|
|
26
26
|
import * as i10 from 'ng-zorro-antd/empty';
|
|
27
27
|
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
28
28
|
import * as i7 from 'ng-zorro-antd/core/transition-patch';
|
|
@@ -150,7 +150,7 @@ class DragDrop {
|
|
|
150
150
|
else {
|
|
151
151
|
this.dropNode.dropObj[this.targetIndex] = dragObj;
|
|
152
152
|
}
|
|
153
|
-
this.onChange();
|
|
153
|
+
this.onChange({ historyDesc: `拖拽${this.dragNode?.name}` });
|
|
154
154
|
}
|
|
155
155
|
this.dragNode = undefined;
|
|
156
156
|
this.updateElementStyle();
|
|
@@ -185,7 +185,7 @@ class Tree {
|
|
|
185
185
|
onChange = output();
|
|
186
186
|
onSelect = output();
|
|
187
187
|
onContextMenu = output();
|
|
188
|
-
dragdrop = computed(() => new DragDrop(this.optionsNodes(), this.optionIdflatNodes, this.treeControl, () => this.onChange.emit()), ...(ngDevMode ? [{ debugName: "dragdrop" }] : []));
|
|
188
|
+
dragdrop = computed(() => new DragDrop(this.optionsNodes(), this.optionIdflatNodes, this.treeControl, (e) => this.onChange.emit(e)), ...(ngDevMode ? [{ debugName: "dragdrop" }] : []));
|
|
189
189
|
optionIdflatNodes = new Map();
|
|
190
190
|
flatNodeMap = new Map();
|
|
191
191
|
nestedNodeMap = new Map();
|
|
@@ -352,10 +352,10 @@ class Tree {
|
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
if (changed) {
|
|
355
|
-
this.onChange.emit({ value: next, nextNodeId: nextNodeId });
|
|
355
|
+
this.onChange.emit({ value: next, nextNodeId: nextNodeId, historyDesc: `删除${this.selectListSelection.selected.length}个组件` });
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
addNodeForSelected(nodes, deleteSuccess = false) {
|
|
358
|
+
addNodeForSelected(nodes, deleteSuccess = false, historyDesc) {
|
|
359
359
|
if (nodes.length && this.selectListSelection.selected) {
|
|
360
360
|
for (const nodeId of this.selectListSelection.selected) {
|
|
361
361
|
const parentNode = this.optionsNodes().get(nodeId);
|
|
@@ -373,7 +373,7 @@ class Tree {
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
this.onChange.emit();
|
|
376
|
+
this.onChange.emit({ historyDesc });
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
deleteNode(node) {
|
|
@@ -390,7 +390,7 @@ class Tree {
|
|
|
390
390
|
this.design.chooseComponent().subscribe(res => {
|
|
391
391
|
const { options, config } = res;
|
|
392
392
|
if (options && config) {
|
|
393
|
-
this.onChange.emit({ value: options });
|
|
393
|
+
this.onChange.emit({ value: options, historyDesc: `添加${config.componentName}` });
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
396
|
}
|
|
@@ -574,7 +574,7 @@ class DragService {
|
|
|
574
574
|
const dragNode = this.getOptionsNode(this.dragEn);
|
|
575
575
|
let targetIndex = this.dropHandler.beforeElement ? this.preview.getNodeByElement(this.dropHandler.beforeElement)?.indexOfParentObj : dropNode?.defaultDropIndex;
|
|
576
576
|
if (dropNode.dropObj == dragNode.parentObj && dragNode.indexOfParentObj == targetIndex) {
|
|
577
|
-
this.preview.onDragEnd(
|
|
577
|
+
this.preview.onDragEnd({ historyDesc: `拖拽${dragNode.name}` });
|
|
578
578
|
}
|
|
579
579
|
else {
|
|
580
580
|
dragId = dragNode?.id;
|
|
@@ -596,13 +596,13 @@ class DragService {
|
|
|
596
596
|
else {
|
|
597
597
|
dropNode.dropObj[targetIndex] = dragObj;
|
|
598
598
|
}
|
|
599
|
-
this.preview.onDragEnd(
|
|
599
|
+
this.preview.onDragEnd({ historyDesc: `拖拽${dragNode.name}` });
|
|
600
600
|
}
|
|
601
601
|
this.dropHandler.onDragEnd();
|
|
602
602
|
this.dropHandler = undefined;
|
|
603
603
|
}
|
|
604
604
|
else {
|
|
605
|
-
this.preview.onDragEnd(
|
|
605
|
+
this.preview.onDragEnd();
|
|
606
606
|
}
|
|
607
607
|
this.dragEn.element.style.display = this.oriDragDisplay;
|
|
608
608
|
this.dragEn = undefined;
|
|
@@ -853,9 +853,9 @@ class Preview {
|
|
|
853
853
|
onDragStart() {
|
|
854
854
|
this.selectService.disableHover();
|
|
855
855
|
}
|
|
856
|
-
onDragEnd(
|
|
857
|
-
if (
|
|
858
|
-
this.onChange.emit();
|
|
856
|
+
onDragEnd(e) {
|
|
857
|
+
if (e) {
|
|
858
|
+
this.onChange.emit(e);
|
|
859
859
|
}
|
|
860
860
|
this.selectService.enableHover();
|
|
861
861
|
}
|
|
@@ -1031,10 +1031,13 @@ class Cmplib {
|
|
|
1031
1031
|
this.clickExample.emit(example);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
|
-
preloadDragElement(example) {
|
|
1034
|
+
preloadDragElement(example, desc) {
|
|
1035
1035
|
if (this.selectMode() == "drag") {
|
|
1036
1036
|
this.dragOptions.set(example.builder());
|
|
1037
1037
|
this.dragExample = example;
|
|
1038
|
+
if (desc) {
|
|
1039
|
+
example.name ??= desc.component;
|
|
1040
|
+
}
|
|
1038
1041
|
}
|
|
1039
1042
|
}
|
|
1040
1043
|
onDragStart(e) {
|
|
@@ -1057,11 +1060,11 @@ class Cmplib {
|
|
|
1057
1060
|
}
|
|
1058
1061
|
}
|
|
1059
1062
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Cmplib, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1060
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: Cmplib, isStandalone: true, selector: "axis-cmplib", inputs: { cmplib: { classPropertyName: "cmplib", publicName: "cmplib", isSignal: true, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: true, isRequired: true, transformFunction: null }, tags: { classPropertyName: "tags", publicName: "tags", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cmplib: "cmplibChange", clickExample: "clickExample", dragStart: "dragStart", dragEnd: "dragEnd" }, viewQueries: [{ propertyName: "dragElement", first: true, predicate: ["dragElement"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div nz-flex nzAlign=\"center\">\n <input style=\"flex:1\" type=\"text\" nz-input placeholder=\"\u641C\u7D22\" nzBorderless ngModel\n (ngModelChange)=\"searchValue$.next($event)\" />\n <nz-select [(ngModel)]=\"cmplib\" nzSize=\"small\" nzBorderless style=\"width: auto;\">\n @for (lib of cmplibs; track $index) {\n <nz-option [nzValue]=\"lib.lib\" [nzLabel]=\"lib.libName\"></nz-option>\n }\n </nz-select>\n</div>\n<nz-collapse nzAccordion>\n @for (group of displayCmpLib(); track group.groupName) {\n <nz-collapse-panel [nzHeader]=\"`${group.groupName}(${group.children.length})`\">\n <div nz-row [nzGutter]=\"[8,8]\">\n @for (item of group.children; track item.component) {\n <div nz-col [nzSpan]=\"item.span\">\n <nz-card nzSize=\"small\" nzHoverable [nzCover]=\"coverTemplate\" [nzTitle]=\"item.component\"\n [nzExtra]=\"item.moreExamples? more:''\" [nzBodyStyle]=\"{padding:0}\" (click)=\"onClick(item.example)\"\n [draggable]=\"selectMode()=='drag'\" (mouseenter)=\"preloadDragElement(item.example)\"\n (dragstart)=\"onDragStart($event)\" (dragend)=\"onDragEnd($event)\">\n </nz-card>\n <ng-template #coverTemplate>\n <img style=\"margin: 4px;object-fit: contain;\" [style.height.px]=\"item.height\"\n [src]=\"item.coverImg\" />\n </ng-template>\n <ng-template #more>\n <a nz-button nzType=\"link\" nzSize=\"small\" nz-dropdown [nzDropdownMenu]=\"examples\">\n <nz-icon nzType=\"ellipsis\"></nz-icon>\n </a>\n <nz-dropdown-menu #examples=\"nzDropdownMenu\">\n <ul nz-menu nzSelectable>\n @for (item of item.moreExamples; track item.name) {\n <li nz-menu-item (click)=\"onClick(item)\" [draggable]=\"selectMode()=='drag'\"\n (mouseenter)=\"preloadDragElement(item)\" (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd($event)\">{{item.name}}</li>\n }\n </ul>\n </nz-dropdown-menu>\n </ng-template>\n </div>\n }\n </div>\n </nz-collapse-panel>\n }\n</nz-collapse>\n<div class=\"dragElementContainer\">\n <div #dragElement>\n @if (dragOptions()) {\n <ng-container [axisDynamic]=\"dragOptions()\" [standalone]=\"true\"></ng-container>\n {{dragOptions().type}}\n }\n </div>\n</div>", styles: [".dragElementContainer{position:absolute;z-index:-9999;top:100px}\n"], dependencies: [{ kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i1$1.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i1$1.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition"], exportAs: ["nzCollapse"] }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i2$1.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i3$2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3$2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i6.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i7.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i6$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i6$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i7$1.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "directive", type: i7$1.NzDropDownADirective, selector: "a[nz-dropdown]" }, { kind: "component", type: i7$1.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i7$1.NzDropdownButtonDirective, selector: "[nz-button][nz-dropdown]" }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i2.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$1.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i12.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i12.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1063
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: Cmplib, isStandalone: true, selector: "axis-cmplib", inputs: { cmplib: { classPropertyName: "cmplib", publicName: "cmplib", isSignal: true, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: true, isRequired: true, transformFunction: null }, tags: { classPropertyName: "tags", publicName: "tags", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cmplib: "cmplibChange", clickExample: "clickExample", dragStart: "dragStart", dragEnd: "dragEnd" }, viewQueries: [{ propertyName: "dragElement", first: true, predicate: ["dragElement"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div nz-flex nzAlign=\"center\">\n <input style=\"flex:1\" type=\"text\" nz-input placeholder=\"\u641C\u7D22\" nzBorderless ngModel\n (ngModelChange)=\"searchValue$.next($event)\" />\n <nz-select [(ngModel)]=\"cmplib\" nzSize=\"small\" nzBorderless style=\"width: auto;font-size: 12px;\">\n @for (lib of cmplibs; track $index) {\n <nz-option [nzValue]=\"lib.lib\" [nzLabel]=\"lib.libName\"></nz-option>\n }\n </nz-select>\n</div>\n<nz-collapse nzAccordion>\n @for (group of displayCmpLib(); track group.groupName) {\n <nz-collapse-panel [nzHeader]=\"`${group.groupName}(${group.children.length})`\">\n <div nz-row [nzGutter]=\"[8,8]\">\n @for (item of group.children; track item.component) {\n <div nz-col [nzSpan]=\"item.span\">\n <nz-card nzSize=\"small\" nzHoverable [nzCover]=\"coverTemplate\" [nzTitle]=\"item.component\"\n [nzExtra]=\"item.moreExamples? more:''\" [nzBodyStyle]=\"{padding:0}\" (click)=\"onClick(item.example)\"\n [draggable]=\"selectMode()=='drag'\" (mouseenter)=\"preloadDragElement(item.example,item)\"\n (dragstart)=\"onDragStart($event)\" (dragend)=\"onDragEnd($event)\">\n </nz-card>\n <ng-template #coverTemplate>\n <img style=\"margin: 4px;object-fit: contain;\" [style.height.px]=\"item.height\"\n [src]=\"item.coverImg\" />\n </ng-template>\n <ng-template #more>\n <a nz-button nzType=\"link\" nzSize=\"small\" nz-dropdown [nzDropdownMenu]=\"examples\">\n <nz-icon nzType=\"ellipsis\"></nz-icon>\n </a>\n <nz-dropdown-menu #examples=\"nzDropdownMenu\">\n <ul nz-menu nzSelectable>\n @for (item of item.moreExamples; track item.name) {\n <li nz-menu-item (click)=\"onClick(item)\" [draggable]=\"selectMode()=='drag'\"\n (mouseenter)=\"preloadDragElement(item)\" (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd($event)\">{{item.name}}</li>\n }\n </ul>\n </nz-dropdown-menu>\n </ng-template>\n </div>\n }\n </div>\n </nz-collapse-panel>\n }\n</nz-collapse>\n<div class=\"dragElementContainer\">\n <div #dragElement>\n @if (dragOptions()) {\n <ng-container [axisDynamic]=\"dragOptions()\" [standalone]=\"true\"></ng-container>\n {{dragOptions().type}}\n }\n </div>\n</div>", styles: [".dragElementContainer{position:absolute;z-index:-9999;top:100px}\n"], dependencies: [{ kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i1$1.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i1$1.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition"], exportAs: ["nzCollapse"] }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i2$1.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i3$2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3$2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i6.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i7.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i6$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i6$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i7$1.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "directive", type: i7$1.NzDropDownADirective, selector: "a[nz-dropdown]" }, { kind: "component", type: i7$1.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i7$1.NzDropdownButtonDirective, selector: "[nz-button][nz-dropdown]" }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i2.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$1.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i12.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i12.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1061
1064
|
}
|
|
1062
1065
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Cmplib, decorators: [{
|
|
1063
1066
|
type: Component,
|
|
1064
|
-
args: [{ selector: 'axis-cmplib', imports: [NzCollapseModule, NzCardModule, NzGridModule, DynamicDirective, NzButtonModule, NzDropDownModule, NzInputModule, FormsModule, NzIconModule, NzFlexModule, NzSelectModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div nz-flex nzAlign=\"center\">\n <input style=\"flex:1\" type=\"text\" nz-input placeholder=\"\u641C\u7D22\" nzBorderless ngModel\n (ngModelChange)=\"searchValue$.next($event)\" />\n <nz-select [(ngModel)]=\"cmplib\" nzSize=\"small\" nzBorderless style=\"width: auto;\">\n @for (lib of cmplibs; track $index) {\n <nz-option [nzValue]=\"lib.lib\" [nzLabel]=\"lib.libName\"></nz-option>\n }\n </nz-select>\n</div>\n<nz-collapse nzAccordion>\n @for (group of displayCmpLib(); track group.groupName) {\n <nz-collapse-panel [nzHeader]=\"`${group.groupName}(${group.children.length})`\">\n <div nz-row [nzGutter]=\"[8,8]\">\n @for (item of group.children; track item.component) {\n <div nz-col [nzSpan]=\"item.span\">\n <nz-card nzSize=\"small\" nzHoverable [nzCover]=\"coverTemplate\" [nzTitle]=\"item.component\"\n [nzExtra]=\"item.moreExamples? more:''\" [nzBodyStyle]=\"{padding:0}\" (click)=\"onClick(item.example)\"\n [draggable]=\"selectMode()=='drag'\" (mouseenter)=\"preloadDragElement(item.example)\"\n (dragstart)=\"onDragStart($event)\" (dragend)=\"onDragEnd($event)\">\n </nz-card>\n <ng-template #coverTemplate>\n <img style=\"margin: 4px;object-fit: contain;\" [style.height.px]=\"item.height\"\n [src]=\"item.coverImg\" />\n </ng-template>\n <ng-template #more>\n <a nz-button nzType=\"link\" nzSize=\"small\" nz-dropdown [nzDropdownMenu]=\"examples\">\n <nz-icon nzType=\"ellipsis\"></nz-icon>\n </a>\n <nz-dropdown-menu #examples=\"nzDropdownMenu\">\n <ul nz-menu nzSelectable>\n @for (item of item.moreExamples; track item.name) {\n <li nz-menu-item (click)=\"onClick(item)\" [draggable]=\"selectMode()=='drag'\"\n (mouseenter)=\"preloadDragElement(item)\" (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd($event)\">{{item.name}}</li>\n }\n </ul>\n </nz-dropdown-menu>\n </ng-template>\n </div>\n }\n </div>\n </nz-collapse-panel>\n }\n</nz-collapse>\n<div class=\"dragElementContainer\">\n <div #dragElement>\n @if (dragOptions()) {\n <ng-container [axisDynamic]=\"dragOptions()\" [standalone]=\"true\"></ng-container>\n {{dragOptions().type}}\n }\n </div>\n</div>", styles: [".dragElementContainer{position:absolute;z-index:-9999;top:100px}\n"] }]
|
|
1067
|
+
args: [{ selector: 'axis-cmplib', imports: [NzCollapseModule, NzCardModule, NzGridModule, DynamicDirective, NzButtonModule, NzDropDownModule, NzInputModule, FormsModule, NzIconModule, NzFlexModule, NzSelectModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div nz-flex nzAlign=\"center\">\n <input style=\"flex:1\" type=\"text\" nz-input placeholder=\"\u641C\u7D22\" nzBorderless ngModel\n (ngModelChange)=\"searchValue$.next($event)\" />\n <nz-select [(ngModel)]=\"cmplib\" nzSize=\"small\" nzBorderless style=\"width: auto;font-size: 12px;\">\n @for (lib of cmplibs; track $index) {\n <nz-option [nzValue]=\"lib.lib\" [nzLabel]=\"lib.libName\"></nz-option>\n }\n </nz-select>\n</div>\n<nz-collapse nzAccordion>\n @for (group of displayCmpLib(); track group.groupName) {\n <nz-collapse-panel [nzHeader]=\"`${group.groupName}(${group.children.length})`\">\n <div nz-row [nzGutter]=\"[8,8]\">\n @for (item of group.children; track item.component) {\n <div nz-col [nzSpan]=\"item.span\">\n <nz-card nzSize=\"small\" nzHoverable [nzCover]=\"coverTemplate\" [nzTitle]=\"item.component\"\n [nzExtra]=\"item.moreExamples? more:''\" [nzBodyStyle]=\"{padding:0}\" (click)=\"onClick(item.example)\"\n [draggable]=\"selectMode()=='drag'\" (mouseenter)=\"preloadDragElement(item.example,item)\"\n (dragstart)=\"onDragStart($event)\" (dragend)=\"onDragEnd($event)\">\n </nz-card>\n <ng-template #coverTemplate>\n <img style=\"margin: 4px;object-fit: contain;\" [style.height.px]=\"item.height\"\n [src]=\"item.coverImg\" />\n </ng-template>\n <ng-template #more>\n <a nz-button nzType=\"link\" nzSize=\"small\" nz-dropdown [nzDropdownMenu]=\"examples\">\n <nz-icon nzType=\"ellipsis\"></nz-icon>\n </a>\n <nz-dropdown-menu #examples=\"nzDropdownMenu\">\n <ul nz-menu nzSelectable>\n @for (item of item.moreExamples; track item.name) {\n <li nz-menu-item (click)=\"onClick(item)\" [draggable]=\"selectMode()=='drag'\"\n (mouseenter)=\"preloadDragElement(item)\" (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd($event)\">{{item.name}}</li>\n }\n </ul>\n </nz-dropdown-menu>\n </ng-template>\n </div>\n }\n </div>\n </nz-collapse-panel>\n }\n</nz-collapse>\n<div class=\"dragElementContainer\">\n <div #dragElement>\n @if (dragOptions()) {\n <ng-container [axisDynamic]=\"dragOptions()\" [standalone]=\"true\"></ng-container>\n {{dragOptions().type}}\n }\n </div>\n</div>", styles: [".dragElementContainer{position:absolute;z-index:-9999;top:100px}\n"] }]
|
|
1065
1068
|
}], ctorParameters: () => [], propDecorators: { dragElement: [{
|
|
1066
1069
|
type: ViewChild,
|
|
1067
1070
|
args: ["dragElement", { read: ElementRef, static: true }]
|
|
@@ -1117,6 +1120,7 @@ class ShortcutKey {
|
|
|
1117
1120
|
switch (event) {
|
|
1118
1121
|
case "delete":
|
|
1119
1122
|
this.design.tree.removeSelected();
|
|
1123
|
+
this.design.element.nativeElement.focus();
|
|
1120
1124
|
break;
|
|
1121
1125
|
case "undo":
|
|
1122
1126
|
this.design.tools.undo();
|
|
@@ -1239,12 +1243,12 @@ class Toolbar {
|
|
|
1239
1243
|
shortcutKeysModal = model(false, ...(ngDevMode ? [{ debugName: "shortcutKeysModal" }] : []));
|
|
1240
1244
|
history = [];
|
|
1241
1245
|
historyIndex = 0;
|
|
1242
|
-
putHistory(options) {
|
|
1246
|
+
putHistory(options, desc) {
|
|
1243
1247
|
if (this.historyIndex > 0) {
|
|
1244
1248
|
this.history.splice(0, this.historyIndex);
|
|
1245
1249
|
this.historyIndex = 0;
|
|
1246
1250
|
}
|
|
1247
|
-
this.history.unshift({ options: copy(options, true), time: new Date() });
|
|
1251
|
+
this.history.unshift({ options: copy(options, true), time: new Date(), desc });
|
|
1248
1252
|
if (this.history.length > 50) {
|
|
1249
1253
|
this.history.pop();
|
|
1250
1254
|
}
|
|
@@ -1253,30 +1257,30 @@ class Toolbar {
|
|
|
1253
1257
|
undo() {
|
|
1254
1258
|
if (this.historyIndex < this.history.length - 1) {
|
|
1255
1259
|
this.historyIndex++;
|
|
1256
|
-
this.design.onChangeOptionsConfig(copy(this.history[this.historyIndex].options, true), false);
|
|
1260
|
+
this.design.onChangeOptionsConfig({ value: copy(this.history[this.historyIndex].options, true), putHistory: false });
|
|
1257
1261
|
this.cdr.markForCheck();
|
|
1258
1262
|
}
|
|
1259
1263
|
}
|
|
1260
1264
|
redo() {
|
|
1261
1265
|
if (this.historyIndex > 0) {
|
|
1262
1266
|
this.historyIndex--;
|
|
1263
|
-
this.design.onChangeOptionsConfig(copy(this.history[this.historyIndex].options, true), false);
|
|
1267
|
+
this.design.onChangeOptionsConfig({ value: copy(this.history[this.historyIndex].options, true), putHistory: false });
|
|
1264
1268
|
this.cdr.markForCheck();
|
|
1265
1269
|
}
|
|
1266
1270
|
}
|
|
1267
1271
|
switchHistory(index) {
|
|
1268
1272
|
if (index != this.historyIndex && index > -1 && index < this.history.length) {
|
|
1269
1273
|
this.historyIndex = index;
|
|
1270
|
-
this.design.onChangeOptionsConfig(copy(this.history[this.historyIndex].options, true), false);
|
|
1274
|
+
this.design.onChangeOptionsConfig({ value: copy(this.history[this.historyIndex].options, true), putHistory: false });
|
|
1271
1275
|
this.cdr.markForCheck();
|
|
1272
1276
|
}
|
|
1273
1277
|
}
|
|
1274
1278
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Toolbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1275
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: Toolbar, isStandalone: true, selector: "axis-toolbar", inputs: { shortcutKeysModal: { classPropertyName: "shortcutKeysModal", publicName: "shortcutKeysModal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { shortcutKeysModal: "shortcutKeysModalChange" }, ngImport: i0, template: "<div class=\"tools\" nz-flex nzGap=\"4px\">\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u5FEB\u6377\u952E\u8BF4\u660E\"\n (click)=\"shortcutKeysModal.set(true)\">\n <nz-icon nzType=\"exclamation-circle\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u7F16\u8F91\u5386\u53F2\" nz-popover\n [nzPopoverTitle]=\"historyTitle\" nzPopoverTrigger=\"click\" [nzPopoverContent]=\"historyTemp\"\n nzPopoverPlacement=\"bottom\" nzPopoverOverlayClassName=\"history-popover\">\n <nz-icon nzType=\"history\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" [nz-tooltip]=\"onlyPreview()?'\u6062\u590D':'\u653E\u5927'\"\n (click)=\"onlyPreview.set(!onlyPreview())\">\n <nz-icon [nzType]=\"onlyPreview()?'fullscreen-exit':'fullscreen'\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u91CD\u65B0\u8F7D\u5165\"\n (click)=\"design.preview.forceRender()\">\n <nz-icon nzType=\"reload\" />\n </button>\n</div>\n\n<ng-template #historyTitle>\n <div nz-flex>\n <div style=\"flex:1\">\u7F16\u8F91\u5386\u53F2</div>\n <button nz-button nzSize=\"small\" nzType=\"link\" nzShape=\"circle\" nz-tooltip=\"\u64A4\u9500\" (click)=\"undo()\"\n [disabled]=\"historyIndex==history.length-1\">\n <nz-icon nzType=\"undo\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"link\" nzShape=\"circle\" nz-tooltip=\"\u91CD\u505A\" (click)=\"redo()\"\n [disabled]=\"historyIndex==0\">\n <nz-icon nzType=\"redo\" nzTheme=\"outline\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #historyTemp>\n <div nz-flex nzVertical>\n @for (item of history; track item.time;let i=$index) {\n <div nz-flex [class.active]=\"i == historyIndex\" class=\"history-item\" (click)=\"switchHistory(i)\">\n <div style=\"width: 20px;\">\n @if (i == historyIndex) {\n <nz-icon nzType=\"aim\" nzTheme=\"outline\" />\n }\n </div>\n <div
|
|
1279
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: Toolbar, isStandalone: true, selector: "axis-toolbar", inputs: { shortcutKeysModal: { classPropertyName: "shortcutKeysModal", publicName: "shortcutKeysModal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { shortcutKeysModal: "shortcutKeysModalChange" }, ngImport: i0, template: "<div class=\"tools\" nz-flex nzGap=\"4px\">\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u5FEB\u6377\u952E\u8BF4\u660E\"\n (click)=\"shortcutKeysModal.set(true)\">\n <nz-icon nzType=\"exclamation-circle\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u7F16\u8F91\u5386\u53F2\" nz-popover\n [nzPopoverTitle]=\"historyTitle\" nzPopoverTrigger=\"click\" [nzPopoverContent]=\"historyTemp\"\n nzPopoverPlacement=\"bottom\" nzPopoverOverlayClassName=\"history-popover\">\n <nz-icon nzType=\"history\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" [nz-tooltip]=\"onlyPreview()?'\u6062\u590D':'\u653E\u5927'\"\n (click)=\"onlyPreview.set(!onlyPreview())\">\n <nz-icon [nzType]=\"onlyPreview()?'fullscreen-exit':'fullscreen'\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u91CD\u65B0\u8F7D\u5165\"\n (click)=\"design.preview.forceRender()\">\n <nz-icon nzType=\"reload\" />\n </button>\n</div>\n\n<ng-template #historyTitle>\n <div nz-flex>\n <div style=\"flex:1\">\u7F16\u8F91\u5386\u53F2</div>\n <button nz-button nzSize=\"small\" nzType=\"link\" nzShape=\"circle\" nz-tooltip=\"\u64A4\u9500\" (click)=\"undo()\"\n [disabled]=\"historyIndex==history.length-1\">\n <nz-icon nzType=\"undo\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"link\" nzShape=\"circle\" nz-tooltip=\"\u91CD\u505A\" (click)=\"redo()\"\n [disabled]=\"historyIndex==0\">\n <nz-icon nzType=\"redo\" nzTheme=\"outline\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #historyTemp>\n <div nz-flex nzVertical nzGap=\"6px\">\n @for (item of history; track item.time;let i=$index) {\n <div nz-flex nzAlign=\"center\" [class.active]=\"i == historyIndex\" class=\"history-item\" (click)=\"switchHistory(i)\">\n <div style=\"width: 20px;\">\n @if (i == historyIndex) {\n <nz-icon nzType=\"aim\" nzTheme=\"outline\" />\n }\n </div>\n <div nz-flex nzVertical>\n <span>{{item.desc}}</span>\n <span style=\"font-size: 10px;color:rgba(0,0,0,0.38)\"> {{item.time | axisHowLong}}</span>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<nz-modal [(nzVisible)]=\"shortcutKeysModal\" nzTitle=\"\u5FEB\u6377\u952E\u8BF4\u660E\" nzDraggable [nzOkText]=\"null\" nzCancelText=\"\u5173\u95ED\"\n (nzOnCancel)=\"shortcutKeysModal.set(false)\">\n <ng-container *nzModalContent>\n <nz-table nzTemplateMode nzSize=\"small\">\n <thead>\n <tr>\n <th>\u529F\u80FD</th>\n <th>\u5FEB\u6377\u952E</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\u67E5\u770B\u5FEB\u6377\u952E\u8BF4\u660E</td>\n <td>Ctrl Meta H</td>\n </tr>\n <tr>\n <td>\u590D\u5236</td>\n <td>Ctrl C</td>\n </tr>\n <tr>\n <td>\u526A\u5207</td>\n <td>Ctrl X</td>\n </tr>\n <tr>\n <td>\u7C98\u8D34</td>\n <td>Ctrl V</td>\n </tr>\n <tr>\n <td>\u64A4\u9500</td>\n <td>Ctrl Z</td>\n </tr>\n <tr>\n <td>\u91CD\u505A</td>\n <td>Ctrl Shift Z</td>\n </tr>\n <tr>\n <td>\u9884\u89C8\u653E\u5927/\u6062\u590D</td>\n <td>Ctrl Meta C</td>\n </tr>\n <tr>\n <td>\u91CD\u65B0\u8F7D\u5165</td>\n <td>Ctrl Meta R</td>\n </tr>\n </tbody>\n </nz-table>\n </ng-container>\n</nz-modal>", styles: [".tools{position:absolute;right:20px;top:10px}::ng-deep .history-popover .ant-popover-inner-content{width:100%;padding:12px 0}.history-item{padding:0 12px;cursor:pointer}.history-item:hover{background-color:var(--ant-primary-1)}.active{color:var(--ant-primary-color);pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i1$2.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i1$2.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i2$2.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i2$2.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i2$2.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i2$2.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i2$2.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i2$2.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$1.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i9.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i6.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i7.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: NzPopoverModule }, { kind: "directive", type: i8$1.NzPopoverDirective, selector: "[nz-popover]", inputs: ["nzPopoverArrowPointAtCenter", "nzPopoverTitle", "nzPopoverTitleContext", "nzPopoverContent", "nzPopoverContentContext", "nz-popover", "nzPopoverTrigger", "nzPopoverPlacement", "nzPopoverOrigin", "nzPopoverVisible", "nzPopoverMouseEnterDelay", "nzPopoverMouseLeaveDelay", "nzPopoverOverlayClassName", "nzPopoverOverlayStyle", "nzPopoverOverlayClickable", "nzPopoverBackdrop"], outputs: ["nzPopoverVisibleChange"], exportAs: ["nzPopover"] }, { kind: "pipe", type: HowLongPipe, name: "axisHowLong" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1276
1280
|
}
|
|
1277
1281
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Toolbar, decorators: [{
|
|
1278
1282
|
type: Component,
|
|
1279
|
-
args: [{ selector: 'axis-toolbar', imports: [NzModalModule, NzTableModule, NzFlexModule, NzIconModule,
|
|
1283
|
+
args: [{ selector: 'axis-toolbar', imports: [NzModalModule, NzTableModule, NzFlexModule, NzIconModule, NzTooltipModule, NzButtonModule, NzPopoverModule, HowLongPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"tools\" nz-flex nzGap=\"4px\">\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u5FEB\u6377\u952E\u8BF4\u660E\"\n (click)=\"shortcutKeysModal.set(true)\">\n <nz-icon nzType=\"exclamation-circle\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u7F16\u8F91\u5386\u53F2\" nz-popover\n [nzPopoverTitle]=\"historyTitle\" nzPopoverTrigger=\"click\" [nzPopoverContent]=\"historyTemp\"\n nzPopoverPlacement=\"bottom\" nzPopoverOverlayClassName=\"history-popover\">\n <nz-icon nzType=\"history\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" [nz-tooltip]=\"onlyPreview()?'\u6062\u590D':'\u653E\u5927'\"\n (click)=\"onlyPreview.set(!onlyPreview())\">\n <nz-icon [nzType]=\"onlyPreview()?'fullscreen-exit':'fullscreen'\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"text\" nzShape=\"circle\" nz-tooltip=\"\u91CD\u65B0\u8F7D\u5165\"\n (click)=\"design.preview.forceRender()\">\n <nz-icon nzType=\"reload\" />\n </button>\n</div>\n\n<ng-template #historyTitle>\n <div nz-flex>\n <div style=\"flex:1\">\u7F16\u8F91\u5386\u53F2</div>\n <button nz-button nzSize=\"small\" nzType=\"link\" nzShape=\"circle\" nz-tooltip=\"\u64A4\u9500\" (click)=\"undo()\"\n [disabled]=\"historyIndex==history.length-1\">\n <nz-icon nzType=\"undo\" nzTheme=\"outline\" />\n </button>\n <button nz-button nzSize=\"small\" nzType=\"link\" nzShape=\"circle\" nz-tooltip=\"\u91CD\u505A\" (click)=\"redo()\"\n [disabled]=\"historyIndex==0\">\n <nz-icon nzType=\"redo\" nzTheme=\"outline\" />\n </button>\n </div>\n</ng-template>\n\n<ng-template #historyTemp>\n <div nz-flex nzVertical nzGap=\"6px\">\n @for (item of history; track item.time;let i=$index) {\n <div nz-flex nzAlign=\"center\" [class.active]=\"i == historyIndex\" class=\"history-item\" (click)=\"switchHistory(i)\">\n <div style=\"width: 20px;\">\n @if (i == historyIndex) {\n <nz-icon nzType=\"aim\" nzTheme=\"outline\" />\n }\n </div>\n <div nz-flex nzVertical>\n <span>{{item.desc}}</span>\n <span style=\"font-size: 10px;color:rgba(0,0,0,0.38)\"> {{item.time | axisHowLong}}</span>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<nz-modal [(nzVisible)]=\"shortcutKeysModal\" nzTitle=\"\u5FEB\u6377\u952E\u8BF4\u660E\" nzDraggable [nzOkText]=\"null\" nzCancelText=\"\u5173\u95ED\"\n (nzOnCancel)=\"shortcutKeysModal.set(false)\">\n <ng-container *nzModalContent>\n <nz-table nzTemplateMode nzSize=\"small\">\n <thead>\n <tr>\n <th>\u529F\u80FD</th>\n <th>\u5FEB\u6377\u952E</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\u67E5\u770B\u5FEB\u6377\u952E\u8BF4\u660E</td>\n <td>Ctrl Meta H</td>\n </tr>\n <tr>\n <td>\u590D\u5236</td>\n <td>Ctrl C</td>\n </tr>\n <tr>\n <td>\u526A\u5207</td>\n <td>Ctrl X</td>\n </tr>\n <tr>\n <td>\u7C98\u8D34</td>\n <td>Ctrl V</td>\n </tr>\n <tr>\n <td>\u64A4\u9500</td>\n <td>Ctrl Z</td>\n </tr>\n <tr>\n <td>\u91CD\u505A</td>\n <td>Ctrl Shift Z</td>\n </tr>\n <tr>\n <td>\u9884\u89C8\u653E\u5927/\u6062\u590D</td>\n <td>Ctrl Meta C</td>\n </tr>\n <tr>\n <td>\u91CD\u65B0\u8F7D\u5165</td>\n <td>Ctrl Meta R</td>\n </tr>\n </tbody>\n </nz-table>\n </ng-container>\n</nz-modal>", styles: [".tools{position:absolute;right:20px;top:10px}::ng-deep .history-popover .ant-popover-inner-content{width:100%;padding:12px 0}.history-item{padding:0 12px;cursor:pointer}.history-item:hover{background-color:var(--ant-primary-1)}.active{color:var(--ant-primary-color);pointer-events:none}\n"] }]
|
|
1280
1284
|
}] });
|
|
1281
1285
|
|
|
1282
1286
|
class Design extends ValueAccess {
|
|
@@ -1287,6 +1291,7 @@ class Design extends ValueAccess {
|
|
|
1287
1291
|
.subscribe((value) => this.onChangeOptionsConfig(value)));
|
|
1288
1292
|
}
|
|
1289
1293
|
options = new DesignOptions();
|
|
1294
|
+
element = inject(ElementRef);
|
|
1290
1295
|
clipboard = inject(ClipboardService);
|
|
1291
1296
|
loader = inject(AXIS_COMPONENTS_LOADER_TOKEN);
|
|
1292
1297
|
injectDataObs = toObservable(this.options.injectData);
|
|
@@ -1319,12 +1324,12 @@ class Design extends ValueAccess {
|
|
|
1319
1324
|
changeSubject = new Subject();
|
|
1320
1325
|
setInitValue(value) {
|
|
1321
1326
|
super.setInitValue(value);
|
|
1322
|
-
this.tools.putHistory(value);
|
|
1327
|
+
this.tools.putHistory(value, "初始化");
|
|
1323
1328
|
this.render(value);
|
|
1324
1329
|
}
|
|
1325
1330
|
writeValue(value) {
|
|
1326
1331
|
super.writeValue(value);
|
|
1327
|
-
this.tools.putHistory(value);
|
|
1332
|
+
this.tools.putHistory(value, "初始化");
|
|
1328
1333
|
this.render(value);
|
|
1329
1334
|
}
|
|
1330
1335
|
async inspect(nextInfo) {
|
|
@@ -1388,13 +1393,15 @@ class Design extends ValueAccess {
|
|
|
1388
1393
|
}
|
|
1389
1394
|
return res?.treeNode;
|
|
1390
1395
|
}
|
|
1391
|
-
onChangeOptionsConfig(
|
|
1396
|
+
onChangeOptionsConfig(e) {
|
|
1392
1397
|
this.reset();
|
|
1398
|
+
let value = e.value;
|
|
1393
1399
|
if (value === undefined) {
|
|
1394
1400
|
value = this.value();
|
|
1395
1401
|
}
|
|
1396
1402
|
this.value.set(copy(value, true));
|
|
1397
1403
|
this.render(this.value());
|
|
1404
|
+
const putHistory = e.putHistory ?? true;
|
|
1398
1405
|
this.loadAndOptions()?.[0].then(() => {
|
|
1399
1406
|
if (!putHistory && this.settingOptionsNodeId) {
|
|
1400
1407
|
const node = this.optionsNodes.get(this.settingOptionsNodeId);
|
|
@@ -1403,10 +1410,15 @@ class Design extends ValueAccess {
|
|
|
1403
1410
|
}
|
|
1404
1411
|
this.syncToCode();
|
|
1405
1412
|
}
|
|
1413
|
+
if (e.nextNodeId) {
|
|
1414
|
+
this.tree.selectByNodeIds([e.nextNodeId]);
|
|
1415
|
+
this.preview.selectByNodeIds([e.nextNodeId]);
|
|
1416
|
+
this.loadSetting(e.nextNodeId);
|
|
1417
|
+
}
|
|
1406
1418
|
});
|
|
1407
1419
|
this.onChange?.(this.value());
|
|
1408
1420
|
if (putHistory) {
|
|
1409
|
-
this.tools.putHistory(this.value());
|
|
1421
|
+
this.tools.putHistory(this.value(), e.historyDesc ?? "未知变更");
|
|
1410
1422
|
}
|
|
1411
1423
|
}
|
|
1412
1424
|
render(value) {
|
|
@@ -1428,7 +1440,7 @@ class Design extends ValueAccess {
|
|
|
1428
1440
|
this.settingOptionsNodeId = optionsNode.id;
|
|
1429
1441
|
this.preview.selectByNodeIds([this.settingOptionsNodeId]);
|
|
1430
1442
|
this.tree.selectByNodeIds([this.settingOptionsNodeId]);
|
|
1431
|
-
this.changeSubject.next(
|
|
1443
|
+
this.changeSubject.next({ historyDesc: `设置属性${optionsNode.name}` });
|
|
1432
1444
|
}
|
|
1433
1445
|
}
|
|
1434
1446
|
}
|
|
@@ -1575,26 +1587,11 @@ class Design extends ValueAccess {
|
|
|
1575
1587
|
this.menu.clear();
|
|
1576
1588
|
const ref = this.menu.createComponent(node.contextMenu, { injector: injector });
|
|
1577
1589
|
ref.instance.contextMenu(e);
|
|
1578
|
-
ref.instance.onChange = async (
|
|
1579
|
-
this.onChangeOptionsConfig(
|
|
1580
|
-
if (nextNodeId) {
|
|
1581
|
-
await this.loadAndOptions()[0];
|
|
1582
|
-
this.tree.selectByNodeIds([nextNodeId]);
|
|
1583
|
-
this.preview.selectByNodeIds([nextNodeId]);
|
|
1584
|
-
this.loadSetting(nextNodeId);
|
|
1585
|
-
}
|
|
1590
|
+
ref.instance.onChange = async (e) => {
|
|
1591
|
+
this.onChangeOptionsConfig(e);
|
|
1586
1592
|
};
|
|
1587
1593
|
}
|
|
1588
1594
|
}
|
|
1589
|
-
async onTreeChange(e) {
|
|
1590
|
-
this.onChangeOptionsConfig(e?.value);
|
|
1591
|
-
if (e?.nextNodeId) {
|
|
1592
|
-
await this.loadAndOptions()[0];
|
|
1593
|
-
this.tree.selectByNodeIds([e.nextNodeId]);
|
|
1594
|
-
this.preview.selectByNodeIds([e.nextNodeId]);
|
|
1595
|
-
this.loadSetting(e.nextNodeId);
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
1595
|
chooseComponent(...tags) {
|
|
1599
1596
|
this.chooseComponentTags.set(tags);
|
|
1600
1597
|
this.chooseComponentVisible.set(true);
|
|
@@ -1621,7 +1618,8 @@ class Design extends ValueAccess {
|
|
|
1621
1618
|
const optionsNode = new OptionsNode({
|
|
1622
1619
|
canDrag: true,
|
|
1623
1620
|
dragType: "component",
|
|
1624
|
-
rootOptions: options
|
|
1621
|
+
rootOptions: options,
|
|
1622
|
+
name: example.name
|
|
1625
1623
|
});
|
|
1626
1624
|
this.optionsNodes.set(optionsNode.id, optionsNode);
|
|
1627
1625
|
this.preview.dragForOuter(optionsNode.toElementNode({ element }));
|
|
@@ -1647,11 +1645,11 @@ class Design extends ValueAccess {
|
|
|
1647
1645
|
nodes.push(optionsNode);
|
|
1648
1646
|
this.optionsNodes.set(optionsNode.id, optionsNode);
|
|
1649
1647
|
}
|
|
1650
|
-
this.tree.addNodeForSelected(nodes);
|
|
1648
|
+
this.tree.addNodeForSelected(nodes, undefined, `粘贴${nodes.length}个组件`);
|
|
1651
1649
|
}
|
|
1652
1650
|
onNodesMove(nodeIds) {
|
|
1653
1651
|
if (this.tree.selectListSelection.selected.length == 1) {
|
|
1654
|
-
this.tree.addNodeForSelected(nodeIds.map(id => this.optionsNodes.get(id)), true);
|
|
1652
|
+
this.tree.addNodeForSelected(nodeIds.map(id => this.optionsNodes.get(id)), true, `粘贴${nodeIds.length}个组件`);
|
|
1655
1653
|
}
|
|
1656
1654
|
}
|
|
1657
1655
|
onEditorChange(optionsStr) {
|
|
@@ -1727,14 +1725,14 @@ class Design extends ValueAccess {
|
|
|
1727
1725
|
}
|
|
1728
1726
|
}
|
|
1729
1727
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Design, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1730
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: Design, isStandalone: true, selector: "axis-design", inputs: { chooseComponentVisible: { classPropertyName: "chooseComponentVisible", publicName: "chooseComponentVisible", isSignal: true, isRequired: false, transformFunction: null }, settingOptionsStr: { classPropertyName: "settingOptionsStr", publicName: "settingOptionsStr", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { chooseComponentVisible: "chooseComponentVisibleChange", settingOptionsStr: "settingOptionsStrChange" }, host: { attributes: { "tabindex": "-1", "autofocus": "true" }, listeners: { "keydown": "onKeyPress($event)" } }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "setting", first: true, predicate: ["setting"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "preview", first: true, predicate: ["preview"], descendants: true, static: true }, { propertyName: "tree", first: true, predicate: ["tree"], descendants: true, static: true }, { propertyName: "codeEditor", first: true, predicate: ["codeEditor"], descendants: true }, { propertyName: "tools", first: true, predicate: ["tools"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<nz-splitter (nzResize)=\"layoutEditor($event)\">\n <nz-splitter-panel [nzCollapsible]=\"!tools.onlyPreview()\" [nzDefaultSize]=\"cacheSized[0]\" nzMin=\"15%\" nzMax=\"40%\"\n [nzSize]=\"tools.onlyPreview()?0:undefined\">\n <nz-tabs nzCentered>\n <nz-tab nzTitle=\"\u7EC4\u4EF6\u6811\">\n <axis-design-tree #tree [node]=\"treeNode()\" [optionsNodes]=\"optionsNodes\"\n (onSelect)=\"onTreeSelect($event)\" (onChange)=\"
|
|
1728
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: Design, isStandalone: true, selector: "axis-design", inputs: { chooseComponentVisible: { classPropertyName: "chooseComponentVisible", publicName: "chooseComponentVisible", isSignal: true, isRequired: false, transformFunction: null }, settingOptionsStr: { classPropertyName: "settingOptionsStr", publicName: "settingOptionsStr", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { chooseComponentVisible: "chooseComponentVisibleChange", settingOptionsStr: "settingOptionsStrChange" }, host: { attributes: { "tabindex": "-1", "autofocus": "true" }, listeners: { "keydown": "onKeyPress($event)" } }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "setting", first: true, predicate: ["setting"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "preview", first: true, predicate: ["preview"], descendants: true, static: true }, { propertyName: "tree", first: true, predicate: ["tree"], descendants: true, static: true }, { propertyName: "codeEditor", first: true, predicate: ["codeEditor"], descendants: true }, { propertyName: "tools", first: true, predicate: ["tools"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<nz-splitter (nzResize)=\"layoutEditor($event)\">\n <nz-splitter-panel [nzCollapsible]=\"!tools.onlyPreview()\" [nzDefaultSize]=\"cacheSized[0]\" nzMin=\"15%\" nzMax=\"40%\"\n [nzSize]=\"tools.onlyPreview()?0:undefined\">\n <nz-tabs nzCentered>\n <nz-tab nzTitle=\"\u7EC4\u4EF6\u6811\">\n <axis-design-tree #tree [node]=\"treeNode()\" [optionsNodes]=\"optionsNodes\"\n (onSelect)=\"onTreeSelect($event)\" (onChange)=\"onChangeOptionsConfig($event)\"\n (onContextMenu)=\"onContextMenu($event.event,$event.nodeId)\"></axis-design-tree>\n </nz-tab>\n <nz-tab nzTitle=\"\u7EC4\u4EF6\u5E93\">\n <axis-cmplib selectMode=\"drag\" (dragStart)=\"onCmplibDragStart($event.example,$event.element)\"\n (dragEnd)=\"onCmplibDragEnd()\"></axis-cmplib>\n </nz-tab>\n </nz-tabs>\n </nz-splitter-panel>\n <nz-splitter-panel>\n <div nz-flex nzVertical style=\"height: 100%;width: 100%;position: relative;\">\n <h2 style=\"text-align: center;margin-top: 4px;\">\u9884\u89C8</h2>\n <axis-toolbar #tools></axis-toolbar>\n <axis-design-preview #preview style=\"flex:1;overflow: auto;\" [loadAndOptions]=\"loadAndOptions()\"\n [optionsNodes]=\"optionsNodes\" [injectData]=\"injectDataObs\" (onChange)=\"onChangeOptionsConfig($event)\"\n (onSelect)=\"onPreviewSelect($event)\"\n (onContextMenu)=\"onContextMenu($event.event,$event.nodeId)\"></axis-design-preview>\n </div>\n </nz-splitter-panel>\n <nz-splitter-panel [nzCollapsible]=\"!tools.onlyPreview()\" [nzDefaultSize]=\"cacheSized[1]\" nzMin=\"15%\" nzMax=\"40%\"\n [nzSize]=\"tools.onlyPreview()?0:undefined\" style=\"position: relative;\">\n <nz-tabs nzCentered style=\"height: 100%;\">\n <nz-tab nzTitle=\"\u5C5E\u6027\u8BBE\u7F6E\" (nzClick)=\"syncToSetting()\">\n <ng-container #setting></ng-container>\n @if (!settingOptionsStr()){\n <nz-empty style=\"height: 300px;\" nzNotFoundContent=\"\u8BF7\u5148\u9009\u62E9\u4E00\u4E2A\u7EC4\u4EF6\"></nz-empty>\n }\n </nz-tab>\n <nz-tab nzTitle=\"\u4EE3\u7801\" nzForceRender (nzSelect)=\"syncToCode();\">\n <ng-container #codeEditor=\"axisDynamic\"\n [axisDynamic]=\"{component:'axis-components/editor',inuse:true,mode:'json',readonly:!settingOptionsStr(),otherOptions:{tabSize:2}}\"\n [standalone]=\"true\" [(ngModel)]=\"settingOptionsStr\"\n (ngModelChange)=\"onEditorChange($event)\"></ng-container>\n </nz-tab>\n </nz-tabs>\n </nz-splitter-panel>\n</nz-splitter>\n<ng-container #menu></ng-container>\n<nz-drawer [(nzVisible)]=\"chooseComponentVisible\" nzTitle=\"\u9009\u62E9\u7EC4\u4EF6\" [nzBodyStyle]=\"{padding:0}\"\n (nzOnClose)=\"chooseComponentVisible.set(false);chooseComponentSubject.next(undefined)\">\n <ng-container *nzDrawerContent>\n <axis-cmplib selectMode=\"click\" [tags]=\"chooseComponentTags()\"\n (clickExample)=\"chooseComponentVisible.set(false);chooseComponentSubject.next($event)\"></axis-cmplib>\n </ng-container>\n</nz-drawer>", styles: ["nz-tabs,::ng-deep .ant-tabs-content,::ng-deep .ant-tabs-tabpane{height:100%}::ng-deep .ant-tabs-content{overflow:auto}:host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzSplitterModule }, { kind: "component", type: i1$3.NzSplitterComponent, selector: "nz-splitter", inputs: ["nzLayout", "nzLazy"], outputs: ["nzResizeStart", "nzResize", "nzResizeEnd"], exportAs: ["nzSplitter"] }, { kind: "component", type: i1$3.NzSplitterPanelComponent, selector: "nz-splitter-panel", inputs: ["nzDefaultSize", "nzMin", "nzMax", "nzSize", "nzCollapsible", "nzResizable"], exportAs: ["nzSplitterPanel"] }, { kind: "ngmodule", type: NzTabsModule }, { kind: "component", type: i2$3.NzTabsComponent, selector: "nz-tabs,nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabs"] }, { kind: "component", type: i2$3.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "component", type: Preview, selector: "axis-design-preview", inputs: ["loadAndOptions", "optionsNodes", "injectData"], outputs: ["onChange", "onSelect", "onContextMenu"] }, { kind: "component", type: Tree, selector: "axis-design-tree", inputs: ["node", "optionsNodes"], outputs: ["onChange", "onSelect", "onContextMenu"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$1.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "component", type: Cmplib, selector: "axis-cmplib", inputs: ["cmplib", "selectMode", "tags"], outputs: ["cmplibChange", "clickExample", "dragStart", "dragEnd"] }, { 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: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i10.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i6$2.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i6$2.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "component", type: Toolbar, selector: "axis-toolbar", inputs: ["shortcutKeysModal"], outputs: ["shortcutKeysModalChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1731
1729
|
}
|
|
1732
1730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Design, decorators: [{
|
|
1733
1731
|
type: Component,
|
|
1734
1732
|
args: [{ selector: 'axis-design', imports: [NzSplitterModule, NzTabsModule, Preview, Tree, NzFlexModule, Cmplib, FormsModule, NzEmptyModule, DynamicDirective, NzDrawerModule, Toolbar], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1735
1733
|
tabindex: "-1",
|
|
1736
1734
|
autofocus: "true",
|
|
1737
|
-
}, template: "<nz-splitter (nzResize)=\"layoutEditor($event)\">\n <nz-splitter-panel [nzCollapsible]=\"!tools.onlyPreview()\" [nzDefaultSize]=\"cacheSized[0]\" nzMin=\"15%\" nzMax=\"40%\"\n [nzSize]=\"tools.onlyPreview()?0:undefined\">\n <nz-tabs nzCentered>\n <nz-tab nzTitle=\"\u7EC4\u4EF6\u6811\">\n <axis-design-tree #tree [node]=\"treeNode()\" [optionsNodes]=\"optionsNodes\"\n (onSelect)=\"onTreeSelect($event)\" (onChange)=\"
|
|
1735
|
+
}, template: "<nz-splitter (nzResize)=\"layoutEditor($event)\">\n <nz-splitter-panel [nzCollapsible]=\"!tools.onlyPreview()\" [nzDefaultSize]=\"cacheSized[0]\" nzMin=\"15%\" nzMax=\"40%\"\n [nzSize]=\"tools.onlyPreview()?0:undefined\">\n <nz-tabs nzCentered>\n <nz-tab nzTitle=\"\u7EC4\u4EF6\u6811\">\n <axis-design-tree #tree [node]=\"treeNode()\" [optionsNodes]=\"optionsNodes\"\n (onSelect)=\"onTreeSelect($event)\" (onChange)=\"onChangeOptionsConfig($event)\"\n (onContextMenu)=\"onContextMenu($event.event,$event.nodeId)\"></axis-design-tree>\n </nz-tab>\n <nz-tab nzTitle=\"\u7EC4\u4EF6\u5E93\">\n <axis-cmplib selectMode=\"drag\" (dragStart)=\"onCmplibDragStart($event.example,$event.element)\"\n (dragEnd)=\"onCmplibDragEnd()\"></axis-cmplib>\n </nz-tab>\n </nz-tabs>\n </nz-splitter-panel>\n <nz-splitter-panel>\n <div nz-flex nzVertical style=\"height: 100%;width: 100%;position: relative;\">\n <h2 style=\"text-align: center;margin-top: 4px;\">\u9884\u89C8</h2>\n <axis-toolbar #tools></axis-toolbar>\n <axis-design-preview #preview style=\"flex:1;overflow: auto;\" [loadAndOptions]=\"loadAndOptions()\"\n [optionsNodes]=\"optionsNodes\" [injectData]=\"injectDataObs\" (onChange)=\"onChangeOptionsConfig($event)\"\n (onSelect)=\"onPreviewSelect($event)\"\n (onContextMenu)=\"onContextMenu($event.event,$event.nodeId)\"></axis-design-preview>\n </div>\n </nz-splitter-panel>\n <nz-splitter-panel [nzCollapsible]=\"!tools.onlyPreview()\" [nzDefaultSize]=\"cacheSized[1]\" nzMin=\"15%\" nzMax=\"40%\"\n [nzSize]=\"tools.onlyPreview()?0:undefined\" style=\"position: relative;\">\n <nz-tabs nzCentered style=\"height: 100%;\">\n <nz-tab nzTitle=\"\u5C5E\u6027\u8BBE\u7F6E\" (nzClick)=\"syncToSetting()\">\n <ng-container #setting></ng-container>\n @if (!settingOptionsStr()){\n <nz-empty style=\"height: 300px;\" nzNotFoundContent=\"\u8BF7\u5148\u9009\u62E9\u4E00\u4E2A\u7EC4\u4EF6\"></nz-empty>\n }\n </nz-tab>\n <nz-tab nzTitle=\"\u4EE3\u7801\" nzForceRender (nzSelect)=\"syncToCode();\">\n <ng-container #codeEditor=\"axisDynamic\"\n [axisDynamic]=\"{component:'axis-components/editor',inuse:true,mode:'json',readonly:!settingOptionsStr(),otherOptions:{tabSize:2}}\"\n [standalone]=\"true\" [(ngModel)]=\"settingOptionsStr\"\n (ngModelChange)=\"onEditorChange($event)\"></ng-container>\n </nz-tab>\n </nz-tabs>\n </nz-splitter-panel>\n</nz-splitter>\n<ng-container #menu></ng-container>\n<nz-drawer [(nzVisible)]=\"chooseComponentVisible\" nzTitle=\"\u9009\u62E9\u7EC4\u4EF6\" [nzBodyStyle]=\"{padding:0}\"\n (nzOnClose)=\"chooseComponentVisible.set(false);chooseComponentSubject.next(undefined)\">\n <ng-container *nzDrawerContent>\n <axis-cmplib selectMode=\"click\" [tags]=\"chooseComponentTags()\"\n (clickExample)=\"chooseComponentVisible.set(false);chooseComponentSubject.next($event)\"></axis-cmplib>\n </ng-container>\n</nz-drawer>", styles: ["nz-tabs,::ng-deep .ant-tabs-content,::ng-deep .ant-tabs-tabpane{height:100%}::ng-deep .ant-tabs-content{overflow:auto}:host{display:block;width:100%;height:100%}\n"] }]
|
|
1738
1736
|
}], ctorParameters: () => [], propDecorators: { menu: [{
|
|
1739
1737
|
type: ViewChild,
|
|
1740
1738
|
args: ["menu", { static: true, read: ViewContainerRef }]
|