ngx-axis-appforge 0.0.89 → 0.0.91
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/drawer/design/index.d.ts +5 -0
- package/axis-components/drawer/index.d.ts +32 -0
- package/axis-components/edit-table/index.d.ts +10 -7
- package/axis-components/input-component/index.d.ts +1 -0
- package/axis-components/input-list/design/index.d.ts +5 -0
- package/axis-components/input-list/index.d.ts +30 -0
- package/axis-components/table/index.d.ts +1 -0
- package/axis-components/time-line/design/index.d.ts +5 -0
- package/axis-components/time-line/index.d.ts +34 -0
- package/axis-components-covers/drawer.svg +24 -0
- package/axis-components-covers/image.png +0 -0
- package/axis-components-covers/input-list.png +0 -0
- package/axis-components-covers/time-line.svg +1 -0
- package/core/index.d.ts +2 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs +5 -2
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +25 -19
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-drawer-design.mjs +195 -0
- package/fesm2022/ngx-axis-appforge-axis-components-drawer-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-drawer.mjs +63 -0
- package/fesm2022/ngx-axis-appforge-axis-components-drawer.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table-design.mjs +52 -4
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs +80 -21
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs +6 -2
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs +5 -2
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-list-design.mjs +89 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-list-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-list.mjs +94 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-list.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs +6 -5
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +7 -2
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs +3 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +7 -2
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tabs.mjs +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-tabs.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-time-line-design.mjs +201 -0
- package/fesm2022/ngx-axis-appforge-axis-components-time-line-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-time-line.mjs +106 -0
- package/fesm2022/ngx-axis-appforge-axis-components-time-line.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +75 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +24 -6
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +25 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-axis-appforge-axis-components-input-component.mjs","sources":["../../../axis-components/input-component/input-component.options.ts","../../../axis-components/input-component/input-component.ts","../../../axis-components/input-component/input-component.html","../../../axis-components/input-component/ngx-axis-appforge-axis-components-input-component.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class InputComponentOptions extends ValueAccessOptions {\n readonly injectData = signal<any>({});\n readonly injectFunc = signal<{ [name: string]: (Function | { func: Function, type: string }) } | undefined>(undefined);\n readonly allPermissions = signal<{ [permission: string]: string }>({});\n readonly httpContextData = signal<any>(undefined);\n readonly fileBaseUrl = signal<string>(\"\");\n}","import { ChangeDetectionStrategy, Component, computed, ElementRef, model, ViewChild } from '@angular/core';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { InputComponentOptions } from './input-component.options';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DynamicDirective, ValueAccess } from 'ngx-axis-appforge/core';\nimport { NzModalModule } from 'ng-zorro-antd/modal';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@Component({\n selector: 'axis-input-component',\n imports: [NzFormModule, NzInputModule, NzFormModule, DynamicDirective, NzModalModule, ReactiveFormsModule, NzIconModule, FormsModule],\n templateUrl: './input-component.html',\n styleUrl: './input-component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputComponent extends ValueAccess<InputComponentOptions> {\n override options: InputComponentOptions = new InputComponentOptions();\n\n readonly isVisible = model(false);\n readonly designValue = model<any>();\n readonly designOptions = computed(() => ({ component: 'axis-components/design', inuse: true, injectData: this.options.injectData(), allPermissions: this.options.allPermissions(), httpContextData: this.options.httpContextData(), fileBaseUrl: this.options.fileBaseUrl() }));\n\n @ViewChild(\"content\")\n content?: ElementRef<HTMLElement>;\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.designValue.set(this.value());\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n if (this.value() !== undefined) {\n this.designValue.set(this.value());\n }\n }\n\n afterOpen() {\n setTimeout(() => {\n this.content?.nativeElement.focus();\n }, 100);\n }\n\n onOk() {\n this.value.set({ ...this.designValue() });\n this.onChange?.(this.value())\n this.isVisible.set(false);\n }\n}\n","<nz-input-
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-input-component.mjs","sources":["../../../axis-components/input-component/input-component.options.ts","../../../axis-components/input-component/input-component.ts","../../../axis-components/input-component/input-component.html","../../../axis-components/input-component/ngx-axis-appforge-axis-components-input-component.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class InputComponentOptions extends ValueAccessOptions {\n readonly tips = signal(\"\");\n readonly injectData = signal<any>({});\n readonly injectFunc = signal<{ [name: string]: (Function | { func: Function, type: string }) } | undefined>(undefined);\n readonly allPermissions = signal<{ [permission: string]: string }>({});\n readonly httpContextData = signal<any>(undefined);\n readonly fileBaseUrl = signal<string>(\"\");\n}","import { ChangeDetectionStrategy, Component, computed, ElementRef, model, ViewChild } from '@angular/core';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { InputComponentOptions } from './input-component.options';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DynamicDirective, ValueAccess } from 'ngx-axis-appforge/core';\nimport { NzModalModule } from 'ng-zorro-antd/modal';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzFlexModule } from 'ng-zorro-antd/flex';\n\n@Component({\n selector: 'axis-input-component',\n imports: [NzFormModule, NzInputModule, NzFormModule, DynamicDirective, NzModalModule, ReactiveFormsModule, NzIconModule, FormsModule, NzFlexModule],\n templateUrl: './input-component.html',\n styleUrl: './input-component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputComponent extends ValueAccess<InputComponentOptions> {\n override options: InputComponentOptions = new InputComponentOptions();\n\n readonly isVisible = model(false);\n readonly designValue = model<any>();\n readonly designOptions = computed(() => ({ component: 'axis-components/design', inuse: true, injectData: this.options.injectData(), allPermissions: this.options.allPermissions(), httpContextData: this.options.httpContextData(), fileBaseUrl: this.options.fileBaseUrl() }));\n\n @ViewChild(\"content\")\n content?: ElementRef<HTMLElement>;\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.designValue.set(this.value());\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n if (this.value() !== undefined) {\n this.designValue.set(this.value());\n }\n }\n\n afterOpen() {\n setTimeout(() => {\n this.content?.nativeElement.focus();\n }, 100);\n }\n\n onOk() {\n this.value.set({ ...this.designValue() });\n this.onChange?.(this.value())\n this.isVisible.set(false);\n }\n}\n","<nz-input-wrapper nzPrefix=\"build\" (click)=\"isVisible.set(!options.disabled())\">\n <nz-icon nzInputPrefix nzType=\"build\"></nz-icon>\n <input nz-input [disabled]=\"options.disabled()\" [placeholder]=\"options.readonly()?'查看组件':'配置组件'\" readonly\n style=\"cursor: pointer;\" />\n <nz-icon nzInputSuffix [nzType]=\"options.readonly()?'eye':'setting'\"></nz-icon>\n</nz-input-wrapper>\n<nz-modal nzDraggable [(nzVisible)]=\"isVisible\" (nzOnOk)=\"onOk()\" (nzOnCancel)=\"isVisible.set(false)\" nzWidth=\"800\"\n [nzCancelText]=\"options.readonly()?null:'取消'\"\n [nzBodyStyle]=\"{padding:'0',height:'70vh',overflow:'hidden',position:'relative'}\" (nzAfterOpen)=\"afterOpen()\">\n <ng-container *nzModalTitle>\n <div tabindex=\"-1\" autofocus=\"true\" (keydown.escape)=\"isVisible.set(false)\" nz-flex nzAlign=\"center\"\n nzGap=\"8px\">\n <nz-icon nzType=\"build\"></nz-icon> {{options.readonly()?'查看组件':'配置组件'}}\n @if(options.tips()){\n <div style=\"font-size: 13px;color: #ff4d4f;font-weight: normal;\">\n <nz-icon nzType=\"info-circle\"></nz-icon>\n <span> {{options.tips()}}</span>\n </div>\n }\n </div>\n </ng-container>\n <div *nzModalContent #content style=\"height: 100%;\" tabindex=\"-1\" autofocus=\"true\"\n (keydown.escape)=\"isVisible.set(false)\">\n @if (!options.readonly()) {\n <ng-container [axisDynamic]=\"designOptions()\" [standalone]=\"true\" [(ngModel)]=\"designValue\"></ng-container>\n }@else {\n <ng-container [axisDynamic]=\"value()\" [standalone]=\"true\"></ng-container>\n }\n </div>\n</nz-modal>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './input-component';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGM,MAAO,qBAAsB,SAAQ,kBAAkB,CAAA;AAChD,IAAA,IAAI,GAAG,MAAM,CAAC,EAAE,gDAAC;AACjB,IAAA,UAAU,GAAG,MAAM,CAAM,EAAE,sDAAC;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAgF,SAAS,sDAAC;AAC7G,IAAA,cAAc,GAAG,MAAM,CAAmC,EAAE,0DAAC;AAC7D,IAAA,eAAe,GAAG,MAAM,CAAM,SAAS,2DAAC;AACxC,IAAA,WAAW,GAAG,MAAM,CAAS,EAAE,uDAAC;AAC5C;;ACOK,MAAO,cAAe,SAAQ,WAAkC,CAAA;AAC3D,IAAA,OAAO,GAA0B,IAAI,qBAAqB,EAAE;AAE5D,IAAA,SAAS,GAAG,KAAK,CAAC,KAAK,qDAAC;IACxB,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAO;IAC1B,aAAa,GAAG,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,OAA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undefined : JSON.parse(this.editData()));
|
|
60
60
|
}
|
|
61
61
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InputJson, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
62
62
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: InputJson, isStandalone: true, selector: "axis-input-json", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, editData: { classPropertyName: "editData", publicName: "editData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", editData: "editDataChange" }, usesInheritance: true, ngImport: i0, template: "<nz-input-group [nzSuffix]=\"suffixTemplate\" [nzPrefix]=\"prefixTemplate\">\n <input nz-input readonly [style.cursor]=\"options.disabled()?null:'pointer'\" [disabled]=\"options.disabled()\"\n type=\"text\" [placeholder]=\"options.readonly()?'\u67E5\u770BJSON':'\u7F16\u8F91JSON'\" (click)=\"open.set(true)\" />\n</nz-input-group>\n<ng-template #prefixTemplate>\n <i nz-icon [nzType]=\"options.readonly()?'eye':'edit'\"></i>\n</ng-template>\n<ng-template #suffixTemplate>\n <i style=\"color:rgba(150, 150, 150, 0.5);\" nz-icon nzType=\"right\" nzTheme=\"outline\"></i>\n</ng-template>\n<nz-modal nzWidth=\"800px\" [nzBodyStyle]=\"{padding:'0',height:'400px'}\" [(nzVisible)]=\"open\" (nzOnCancel)=\"onCancel()\"\n (nzOnOk)=\"onOk()\" [nzOkDisabled]=\"!canOk()\" [nzOkText]=\"options.readonly()?null:'\u786E\u5B9A'\">\n <ng-container *nzModalTitle>\n <i nz-icon [nzType]=\"options.readonly()?'eye':'edit'\"></i> {{options.readonly()?'\u67E5\u770BJSON':'\u7F16\u8F91JSON'}}\n </ng-container>\n <ng-container *nzModalContent>\n <ng-container [axisDynamic]=\"editorOptions()\" [standalone]=\"true\" [(ngModel)]=\"editData\"></ng-container>\n </ng-container>\n</nz-modal>", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i2.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }, { kind: "component", type: i2.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i2.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { 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: NzModalModule }, { kind: "component", type: i4.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: i4.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "directive", type: i4.NzModalTitleDirective, selector: "[nzModalTitle]", exportAs: ["nzModalTitle"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "ngmodule", type: NzAlertModule }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign", "forceRenderOnChange"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-axis-appforge-axis-components-input-json.mjs","sources":["../../../axis-components/input-json/input-json.ts","../../../axis-components/input-json/input-json.html","../../../axis-components/input-json/ngx-axis-appforge-axis-components-input-json.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, model } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzModalModule } from 'ng-zorro-antd/modal';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzAlertModule } from 'ng-zorro-antd/alert';\nimport { DynamicDirective, ValueAccess, ValueAccessOptions } from 'ngx-axis-appforge/core';\n\n@Component({\n selector: 'axis-input-json',\n imports: [ReactiveFormsModule, NzInputModule, NzIconModule, NzModalModule, NzFormModule, NzAlertModule, DynamicDirective, FormsModule],\n templateUrl: './input-json.html',\n styleUrl: './input-json.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class InputJson extends ValueAccess<ValueAccessOptions> {\n\n override options: ValueAccessOptions = new ValueAccessOptions();\n\n readonly editorOptions = computed(() => ({\n component: \"axis-components/editor\",\n inuse: true,\n mode: \"json\",\n readonly: this.options.readonly(),\n disabled: this.options.disabled(),\n }));\n\n readonly open = model(false);\n\n readonly canOk = computed(() => {\n try {\n if (this.editData() != \"\") {\n JSON.parse(this.editData());\n }\n return true;\n } catch (_) {\n return false;\n }\n });\n\n readonly editData = model(\"\");\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n this.setEditData();\n }\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.setEditData();\n }\n\n setEditData() {\n if (this.value() !== undefined) {\n this.editData.set(JSON.stringify(this.value(), null, '\\t'));\n } else {\n this.editData.set(\"\");\n }\n }\n\n onCancel() {\n this.setEditData();\n this.open.set(false);\n }\n\n onOk() {\n this.open.set(false);\n this.onChange?.(this.editData() == \"\" ?
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-input-json.mjs","sources":["../../../axis-components/input-json/input-json.ts","../../../axis-components/input-json/input-json.html","../../../axis-components/input-json/ngx-axis-appforge-axis-components-input-json.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, model } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzModalModule } from 'ng-zorro-antd/modal';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzAlertModule } from 'ng-zorro-antd/alert';\nimport { DynamicDirective, ValueAccess, ValueAccessOptions } from 'ngx-axis-appforge/core';\n\n@Component({\n selector: 'axis-input-json',\n imports: [ReactiveFormsModule, NzInputModule, NzIconModule, NzModalModule, NzFormModule, NzAlertModule, DynamicDirective, FormsModule],\n templateUrl: './input-json.html',\n styleUrl: './input-json.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class InputJson extends ValueAccess<ValueAccessOptions> {\n\n override options: ValueAccessOptions = new ValueAccessOptions();\n\n readonly editorOptions = computed(() => ({\n component: \"axis-components/editor\",\n inuse: true,\n mode: \"json\",\n readonly: this.options.readonly(),\n disabled: this.options.disabled(),\n }));\n\n readonly open = model(false);\n\n readonly canOk = computed(() => {\n try {\n if (this.editData() != \"\") {\n JSON.parse(this.editData());\n }\n return true;\n } catch (_) {\n return false;\n }\n });\n\n readonly editData = model(\"\");\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n this.setEditData();\n }\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.setEditData();\n }\n\n setEditData() {\n if (this.value() !== undefined) {\n this.editData.set(JSON.stringify(this.value(), null, '\\t'));\n } else {\n this.editData.set(\"\");\n }\n }\n\n onCancel() {\n this.setEditData();\n this.open.set(false);\n }\n\n onOk() {\n this.open.set(false);\n this.onChange?.(this.editData() == \"\" ? undefined : JSON.parse(this.editData()));\n }\n\n}\n","<nz-input-group [nzSuffix]=\"suffixTemplate\" [nzPrefix]=\"prefixTemplate\">\n <input nz-input readonly [style.cursor]=\"options.disabled()?null:'pointer'\" [disabled]=\"options.disabled()\"\n type=\"text\" [placeholder]=\"options.readonly()?'查看JSON':'编辑JSON'\" (click)=\"open.set(true)\" />\n</nz-input-group>\n<ng-template #prefixTemplate>\n <i nz-icon [nzType]=\"options.readonly()?'eye':'edit'\"></i>\n</ng-template>\n<ng-template #suffixTemplate>\n <i style=\"color:rgba(150, 150, 150, 0.5);\" nz-icon nzType=\"right\" nzTheme=\"outline\"></i>\n</ng-template>\n<nz-modal nzWidth=\"800px\" [nzBodyStyle]=\"{padding:'0',height:'400px'}\" [(nzVisible)]=\"open\" (nzOnCancel)=\"onCancel()\"\n (nzOnOk)=\"onOk()\" [nzOkDisabled]=\"!canOk()\" [nzOkText]=\"options.readonly()?null:'确定'\">\n <ng-container *nzModalTitle>\n <i nz-icon [nzType]=\"options.readonly()?'eye':'edit'\"></i> {{options.readonly()?'查看JSON':'编辑JSON'}}\n </ng-container>\n <ng-container *nzModalContent>\n <ng-container [axisDynamic]=\"editorOptions()\" [standalone]=\"true\" [(ngModel)]=\"editData\"></ng-container>\n </ng-container>\n</nz-modal>","/**\n *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1H,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAClB,CAAC,mBAAmB,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAAA,eAAA,EAGrH,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6rCAAA,EAAA,MAAA,EAAA,CAAA,mCAAA,CAAA,EAAA;;;AEdjD;;AAEG;;;;"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { FunFieldValueBase, valueFbConfig, baseFbConfig, valueFunField, baseFunField, FunField, BaseDesignSetting, InputTrigger, ValueDesignSetting, OptionsNode, SimpleMenu } from 'ngx-axis-appforge/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import * as i2 from 'ng-zorro-antd/collapse';
|
|
7
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
8
|
+
import * as i6 from 'ng-zorro-antd/form';
|
|
9
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
10
|
+
import * as i4 from 'ng-zorro-antd/input';
|
|
11
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
12
|
+
import * as i3 from 'ng-zorro-antd/input-number';
|
|
13
|
+
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
14
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
15
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
16
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
17
|
+
import * as i5 from 'ng-zorro-antd/grid';
|
|
18
|
+
|
|
19
|
+
class Setting extends FunFieldValueBase {
|
|
20
|
+
fg = this.fb.group({
|
|
21
|
+
...baseFbConfig,
|
|
22
|
+
...valueFbConfig,
|
|
23
|
+
maxLength: [],
|
|
24
|
+
addButtonText: [],
|
|
25
|
+
});
|
|
26
|
+
funFields = {
|
|
27
|
+
...baseFunField,
|
|
28
|
+
...valueFunField,
|
|
29
|
+
maxLength: {
|
|
30
|
+
defaultValue: undefined
|
|
31
|
+
},
|
|
32
|
+
addButtonText: {
|
|
33
|
+
defaultValue: "添加"
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: Setting, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
37
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: Setting, isStandalone: true, selector: "axis-design-input-setting", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u6700\u5927\u957F\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"maxLength\">\n <nz-input-number style=\"width: 100%;\" ngModel [ngModelOptions]=\"{standalone:true}\" [nzMin]=\"1\">\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u6309\u94AE\u6587\u5B57\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"addButtonText\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>", styles: [""], dependencies: [{ 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i2.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon", "nzCollapsible"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i2.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition", "nzSize"], exportAs: ["nzCollapse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i3.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzVariant", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls", "nzPrefix", "nzSuffix", "nzAddonBefore", "nzAddonAfter"], outputs: ["nzBlur", "nzFocus", "nzOnStep"], exportAs: ["nzInputNumber"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i4.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i5.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: i5.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i6.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap", "nzRequiredMark"], exportAs: ["nzForm"] }, { kind: "component", type: i6.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i6.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i6.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "component", type: FunField, selector: "axis-fun-field", inputs: ["scopes", "exclude", "scopeId", "onlyFun", "noListen", "disabled", "editTip", "value", "open", "showCreateListenModal", "createListenDataSourceName"], outputs: ["valueChange", "openChange", "showCreateListenModalChange", "createListenDataSourceNameChange"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: BaseDesignSetting, selector: "axis-base-design-setting", inputs: ["scopeId", "exclude", "fg"] }, { kind: "component", type: InputTrigger, selector: "axis-input-trigger", inputs: ["internalTriggers", "optionsNodeId", "value", "eventDesc", "isVisibleHandlerModal", "editEventHandler"], outputs: ["valueChange", "isVisibleHandlerModalChange", "editEventHandlerChange"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: ValueDesignSetting, selector: "axis-value-design-setting", inputs: ["scopeId", "exclude", "fg"] }, { kind: "ngmodule", type: NzSelectModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: Setting, decorators: [{
|
|
40
|
+
type: Component,
|
|
41
|
+
args: [{ selector: 'axis-design-input-setting', imports: [FormsModule, NzCollapseModule, ReactiveFormsModule, NzInputNumberModule, NzInputModule, NzFormModule, FunField, NzSwitchModule, BaseDesignSetting, InputTrigger, NzRadioModule, ValueDesignSetting, NzSelectModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u6700\u5927\u957F\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"maxLength\">\n <nz-input-number style=\"width: 100%;\" ngModel [ngModelOptions]=\"{standalone:true}\" [nzMin]=\"1\">\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u6309\u94AE\u6587\u5B57\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"addButtonText\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>" }]
|
|
42
|
+
}] });
|
|
43
|
+
|
|
44
|
+
const Config = {
|
|
45
|
+
componentName: "列表输入",
|
|
46
|
+
buildOptionsNodes(nextInfo) {
|
|
47
|
+
return {
|
|
48
|
+
treeNode: new OptionsNode({
|
|
49
|
+
parentId: nextInfo.parentId,
|
|
50
|
+
scopeId: nextInfo.scopeId,
|
|
51
|
+
name: "列表输入",
|
|
52
|
+
canSetting: true,
|
|
53
|
+
canDrag: true,
|
|
54
|
+
dragType: "component",
|
|
55
|
+
canDrop: true,
|
|
56
|
+
dropObj: nextInfo.currentObject,
|
|
57
|
+
dropType: "component",
|
|
58
|
+
defaultDropIndex: "child",
|
|
59
|
+
parentObj: nextInfo.parentObject,
|
|
60
|
+
indexOfParentObj: nextInfo.indexOfParent,
|
|
61
|
+
rootOptions: nextInfo.currentObject,
|
|
62
|
+
settingType: Setting,
|
|
63
|
+
contextMenu: SimpleMenu,
|
|
64
|
+
icon: "unordered-list",
|
|
65
|
+
children: []
|
|
66
|
+
}),
|
|
67
|
+
next: [
|
|
68
|
+
{
|
|
69
|
+
parentObject: nextInfo.currentObject,
|
|
70
|
+
indexOfParent: "child",
|
|
71
|
+
parentId: nextInfo.currentObject.id,
|
|
72
|
+
scopeId: nextInfo.scopeId
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
bindElementsOptionsNode(element, options) {
|
|
78
|
+
return {
|
|
79
|
+
[options.id]: { element }
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Generated bundle index. Do not edit.
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
export { Config };
|
|
89
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-input-list-design.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-input-list-design.mjs","sources":["../../../axis-components/input-list/design/setting/setting.ts","../../../axis-components/input-list/design/setting/setting.html","../../../axis-components/input-list/design/config.ts","../../../axis-components/input-list/design/ngx-axis-appforge-axis-components-input-list-design.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { NzCollapseModule } from 'ng-zorro-antd/collapse';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzInputNumberModule } from 'ng-zorro-antd/input-number';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\nimport { NzSelectModule } from 'ng-zorro-antd/select';\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\nimport { BaseDesignSetting, baseFbConfig, baseFunField, FormValidators, FunField, FunFieldOptions, FunFieldValueBase, InputTrigger, ValueDesignSetting, valueFbConfig, valueFunField } from 'ngx-axis-appforge/core';\n\n@Component({\n selector: 'axis-design-input-setting',\n imports: [FormsModule, NzCollapseModule, ReactiveFormsModule, NzInputNumberModule, NzInputModule, NzFormModule, FunField, NzSwitchModule, BaseDesignSetting, InputTrigger, NzRadioModule, ValueDesignSetting, NzSelectModule],\n templateUrl: './setting.html',\n styleUrl: './setting.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Setting extends FunFieldValueBase {\n\n override fg: UntypedFormGroup = this.fb.group({\n ...baseFbConfig,\n ...valueFbConfig,\n maxLength: [],\n addButtonText: [],\n });\n\n protected override funFields: FunFieldOptions = {\n ...baseFunField,\n ...valueFunField,\n maxLength: {\n defaultValue: undefined\n },\n addButtonText: {\n defaultValue: \"添加\"\n },\n };\n}\n","<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"基本设置\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n 最大长度\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"maxLength\">\n <nz-input-number style=\"width: 100%;\" ngModel [ngModelOptions]=\"{standalone:true}\" [nzMin]=\"1\">\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n 按钮文字\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"addButtonText\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>","import { NextInfo, DesignBuildResult, DesignBindElementsResult, DesignConfig, OptionsNode, SimpleMenu } from \"ngx-axis-appforge/core\";\nimport { Setting } from \"./setting/setting\";\n\nexport const Config: DesignConfig = {\n\n componentName: \"列表输入\",\n buildOptionsNodes(nextInfo: NextInfo): DesignBuildResult {\n return {\n treeNode: new OptionsNode({\n parentId: nextInfo.parentId,\n scopeId: nextInfo.scopeId,\n name: \"列表输入\",\n canSetting: true,\n canDrag: true,\n dragType: \"component\",\n canDrop: true,\n dropObj: nextInfo.currentObject,\n dropType: \"component\",\n defaultDropIndex: \"child\",\n parentObj: nextInfo.parentObject,\n indexOfParentObj: nextInfo.indexOfParent,\n rootOptions: nextInfo.currentObject,\n settingType: Setting,\n contextMenu: SimpleMenu,\n icon: \"unordered-list\",\n children: []\n }),\n next: [\n {\n parentObject: nextInfo.currentObject,\n indexOfParent: \"child\",\n parentId: nextInfo.currentObject.id,\n scopeId: nextInfo.scopeId\n }\n ],\n };\n },\n bindElementsOptionsNode(element: HTMLElement, options: any): DesignBindElementsResult {\n return {\n [options.id]: { element }\n }\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './config';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAkBM,MAAO,OAAQ,SAAQ,iBAAiB,CAAA;AAEnC,IAAA,EAAE,GAAqB,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;AAC5C,QAAA,GAAG,YAAY;AACf,QAAA,GAAG,aAAa;AAChB,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,aAAa,EAAE,EAAE;AAClB,KAAA,CAAC;AAEiB,IAAA,SAAS,GAAoB;AAC9C,QAAA,GAAG,YAAY;AACf,QAAA,GAAG,aAAa;AAChB,QAAA,SAAS,EAAE;AACT,YAAA,YAAY,EAAE;AACf,SAAA;AACD,QAAA,aAAa,EAAE;AACb,YAAA,YAAY,EAAE;AACf,SAAA;KACF;wGAlBU,OAAO,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClBpB,+9CA6BO,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDhBK,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,8CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAA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oBAAA,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE;oBACnC,OAAO,EAAE,QAAQ,CAAC;AACrB;AACJ,aAAA;SACJ;IACL,CAAC;IACD,uBAAuB,CAAC,OAAoB,EAAE,OAAY,EAAA;QACtD,OAAO;AACH,YAAA,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,OAAO;SAC1B;IACL,CAAC;;;ACzCL;;AAEG;;;;"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, inject, ChangeDetectorRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { ValueAccessOptions, ValueAccess, updateAndValidAll, DynamicDirective } from 'ngx-axis-appforge/core';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
7
|
+
import * as i2 from 'ng-zorro-antd/flex';
|
|
8
|
+
import { NzFlexModule } from 'ng-zorro-antd/flex';
|
|
9
|
+
import * as i3 from 'ng-zorro-antd/button';
|
|
10
|
+
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
11
|
+
import * as i5 from 'ng-zorro-antd/icon';
|
|
12
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
13
|
+
import * as i4 from 'ng-zorro-antd/core/transition-patch';
|
|
14
|
+
|
|
15
|
+
class InputListOptions extends ValueAccessOptions {
|
|
16
|
+
maxLength = signal(undefined, ...(ngDevMode ? [{ debugName: "maxLength" }] : []));
|
|
17
|
+
addButtonText = signal("添加", ...(ngDevMode ? [{ debugName: "addButtonText" }] : []));
|
|
18
|
+
child = signal(undefined, ...(ngDevMode ? [{ debugName: "child" }] : []));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class InputList extends ValueAccess {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.addSubscribe(this.fa.valueChanges.subscribe(v => {
|
|
25
|
+
this.value.set(v);
|
|
26
|
+
this.onChange?.(this.value());
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
options = new InputListOptions();
|
|
30
|
+
cdr = inject(ChangeDetectorRef);
|
|
31
|
+
fb = inject(FormBuilder);
|
|
32
|
+
fg = this.fb.group({
|
|
33
|
+
values: this.fb.array([])
|
|
34
|
+
});
|
|
35
|
+
get fa() {
|
|
36
|
+
return this.fg.get("values");
|
|
37
|
+
}
|
|
38
|
+
setInitValue(value) {
|
|
39
|
+
super.setInitValue(value);
|
|
40
|
+
this.valueToFormValue();
|
|
41
|
+
}
|
|
42
|
+
writeValue(value) {
|
|
43
|
+
super.writeValue(value);
|
|
44
|
+
this.valueToFormValue();
|
|
45
|
+
}
|
|
46
|
+
ngOnInit() {
|
|
47
|
+
this.registeValueAccess?.({
|
|
48
|
+
validFn: (control) => {
|
|
49
|
+
return updateAndValidAll(this.fg, { markAsDirty: control.dirty });
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
onRegisteValueAccess(opt, index) {
|
|
54
|
+
if (opt.initValue !== undefined) {
|
|
55
|
+
this.fa.at(index).setValue(opt.initValue, { emitEvent: false });
|
|
56
|
+
}
|
|
57
|
+
if (opt.validFn) {
|
|
58
|
+
this.fa.at(index).setValidators((c) => opt.validFn(c) ? null : { error: true });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
valueToFormValue() {
|
|
62
|
+
if (this.value() !== undefined) {
|
|
63
|
+
if (Array.isArray(this.value())) {
|
|
64
|
+
this.fa.clear({ emitEvent: false });
|
|
65
|
+
this.value().forEach((item) => {
|
|
66
|
+
this.fa.push(this.fb.control(item), { emitEvent: false });
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.fa.clear({ emitEvent: false });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
this.cdr.markForCheck();
|
|
74
|
+
}
|
|
75
|
+
add() {
|
|
76
|
+
this.fa.push(this.fb.control(''));
|
|
77
|
+
}
|
|
78
|
+
remove(index) {
|
|
79
|
+
this.fa.removeAt(index);
|
|
80
|
+
}
|
|
81
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InputList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: InputList, isStandalone: true, selector: "axis-input-list", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" nz-flex nzVertical=\"true\" nzGap=\"8px\" nzAlign=\"start\">\n <ng-container formArrayName=\"values\">\n @for (c of fa.controls; track c;let i=$index) {\n <div nz-flex nzGap=\"4px\" nzAlign=\"center\" style=\"width: 100%;\">\n <div style=\"flex:1;position: relative;\">\n <ng-container [axisDynamic]=\"options.child()\" [formControlName]=\"i\"\n (onRegisteValueAccess)=\"onRegisteValueAccess($event,i)\"></ng-container>\n </div>\n @if (!options.readonly()) {\n <button nz-button (click)=\"remove(i)\" nzDanger nzType=\"link\" [disabled]=\"options.disabled()\">\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n }\n </ng-container>\n @if (!options.readonly() && (options.maxLength() == undefined || fa.controls.length < options.maxLength()!)) {\n <button nz-button nzType=\"link\" (click)=\"add()\" [disabled]=\"options.disabled()\">\n <nz-icon nzType=\"plus\"></nz-icon>\n {{options.addButtonText()}}\n </button>\n }\n</form>", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzInputModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign", "forceRenderOnChange"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i2.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵ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: NzIconModule }, { kind: "directive", type: i5.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
83
|
+
}
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InputList, decorators: [{
|
|
85
|
+
type: Component,
|
|
86
|
+
args: [{ selector: 'axis-input-list', imports: [NzInputModule, FormsModule, DynamicDirective, NzFlexModule, NzButtonModule, NzIconModule, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"fg\" nz-flex nzVertical=\"true\" nzGap=\"8px\" nzAlign=\"start\">\n <ng-container formArrayName=\"values\">\n @for (c of fa.controls; track c;let i=$index) {\n <div nz-flex nzGap=\"4px\" nzAlign=\"center\" style=\"width: 100%;\">\n <div style=\"flex:1;position: relative;\">\n <ng-container [axisDynamic]=\"options.child()\" [formControlName]=\"i\"\n (onRegisteValueAccess)=\"onRegisteValueAccess($event,i)\"></ng-container>\n </div>\n @if (!options.readonly()) {\n <button nz-button (click)=\"remove(i)\" nzDanger nzType=\"link\" [disabled]=\"options.disabled()\">\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n }\n </ng-container>\n @if (!options.readonly() && (options.maxLength() == undefined || fa.controls.length < options.maxLength()!)) {\n <button nz-button nzType=\"link\" (click)=\"add()\" [disabled]=\"options.disabled()\">\n <nz-icon nzType=\"plus\"></nz-icon>\n {{options.addButtonText()}}\n </button>\n }\n</form>", styles: [":host{display:block;width:100%}\n"] }]
|
|
87
|
+
}], ctorParameters: () => [] });
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Generated bundle index. Do not edit.
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
export { InputList };
|
|
94
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-input-list.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-input-list.mjs","sources":["../../../axis-components/input-list/input-list.options.ts","../../../axis-components/input-list/input-list.ts","../../../axis-components/input-list/input-list.html","../../../axis-components/input-list/ngx-axis-appforge-axis-components-input-list.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class InputListOptions extends ValueAccessOptions {\n readonly maxLength = signal<number | undefined>(undefined);\n readonly addButtonText = signal(\"添加\");\n readonly child = signal<any>(undefined);\n}","import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, OnInit } from '@angular/core';\nimport { InputListOptions } from './input-list.options';\nimport { AbstractControl, FormArray, FormBuilder, FormsModule, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { DynamicDirective, RegisteValueAccessOptions, updateAndValidAll, ValueAccess } from 'ngx-axis-appforge/core';\nimport { NzFlexModule } from \"ng-zorro-antd/flex\";\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@Component({\n selector: 'axis-input-list',\n imports: [NzInputModule, FormsModule, DynamicDirective, NzFlexModule, NzButtonModule, NzIconModule, ReactiveFormsModule],\n templateUrl: './input-list.html',\n styleUrl: './input-list.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputList extends ValueAccess<InputListOptions> implements OnInit {\n\n constructor() {\n super();\n this.addSubscribe(this.fa.valueChanges.subscribe(v => {\n this.value.set(v);\n this.onChange?.(this.value());\n }));\n }\n\n override options: InputListOptions = new InputListOptions();\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly fb = inject(FormBuilder);\n readonly fg: UntypedFormGroup = this.fb.group({\n values: this.fb.array([])\n });\n get fa(): FormArray<AbstractControl> {\n return this.fg.get(\"values\") as FormArray<AbstractControl>;\n }\n\n override setInitValue(value: any) {\n super.setInitValue(value);\n this.valueToFormValue();\n }\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.valueToFormValue();\n }\n\n ngOnInit(): void {\n this.registeValueAccess?.({\n validFn: (control: AbstractControl) => {\n return updateAndValidAll(this.fg, { markAsDirty: control.dirty })\n }\n })\n }\n\n onRegisteValueAccess(opt: RegisteValueAccessOptions, index: number) {\n if (opt.initValue !== undefined) {\n this.fa.at(index).setValue(opt.initValue, { emitEvent: false });\n }\n if (opt.validFn) {\n this.fa.at(index).setValidators((c) => opt.validFn!(c) ? null : { error: true });\n }\n }\n\n private valueToFormValue() {\n if (this.value() !== undefined) {\n if (Array.isArray(this.value())) {\n this.fa.clear({ emitEvent: false });\n this.value().forEach((item: any) => {\n this.fa.push(this.fb.control(item), { emitEvent: false });\n });\n } else {\n this.fa.clear({ emitEvent: false });\n }\n }\n this.cdr.markForCheck();\n }\n\n add() {\n this.fa.push(this.fb.control(''));\n }\n\n remove(index: number) {\n this.fa.removeAt(index);\n }\n\n}\n","<form [formGroup]=\"fg\" nz-flex nzVertical=\"true\" nzGap=\"8px\" nzAlign=\"start\">\n <ng-container formArrayName=\"values\">\n @for (c of fa.controls; track c;let i=$index) {\n <div nz-flex nzGap=\"4px\" nzAlign=\"center\" style=\"width: 100%;\">\n <div style=\"flex:1;position: relative;\">\n <ng-container [axisDynamic]=\"options.child()\" [formControlName]=\"i\"\n (onRegisteValueAccess)=\"onRegisteValueAccess($event,i)\"></ng-container>\n </div>\n @if (!options.readonly()) {\n <button nz-button (click)=\"remove(i)\" nzDanger nzType=\"link\" [disabled]=\"options.disabled()\">\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n }\n </ng-container>\n @if (!options.readonly() && (options.maxLength() == undefined || fa.controls.length < options.maxLength()!)) {\n <button nz-button nzType=\"link\" (click)=\"add()\" [disabled]=\"options.disabled()\">\n <nz-icon nzType=\"plus\"></nz-icon>\n {{options.addButtonText()}}\n </button>\n }\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './input-list';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGM,MAAO,gBAAiB,SAAQ,kBAAkB,CAAA;AAC3C,IAAA,SAAS,GAAG,MAAM,CAAqB,SAAS,qDAAC;AACjD,IAAA,aAAa,GAAG,MAAM,CAAC,IAAI,yDAAC;AAC5B,IAAA,KAAK,GAAG,MAAM,CAAM,SAAS,iDAAC;AAC1C;;ACSK,MAAO,SAAU,SAAQ,WAA6B,CAAA;AAE1D,IAAA,WAAA,GAAA;AAC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,EAAA,CAAA;kBAPrB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,WAClB,CAAC,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAGvG,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ooCAAA,EAAA,MAAA,EAAA,CAAA,mCAAA,CAAA,EAAA;;;AEdjD;;AAEG;;;;"}
|
|
@@ -34,15 +34,16 @@ class Select extends ValueAccess {
|
|
|
34
34
|
constructor() {
|
|
35
35
|
super();
|
|
36
36
|
effect(() => {
|
|
37
|
+
const selectValue = untracked(this.selectValue);
|
|
37
38
|
if (this.options.mode() == "default") {
|
|
38
|
-
let next =
|
|
39
|
-
if (!this.options.allowInvalidValue() && this.options.data() !== undefined && !this.validValue().has(
|
|
39
|
+
let next = selectValue;
|
|
40
|
+
if (!this.options.allowInvalidValue() && this.options.data() !== undefined && !this.validValue().has(selectValue)) {
|
|
40
41
|
next = null;
|
|
41
42
|
}
|
|
42
43
|
if (next == null && this.options.defaultFirst() && this.data().length) {
|
|
43
44
|
next = this.data()[0][this.options.valueField()];
|
|
44
45
|
}
|
|
45
|
-
if (next !=
|
|
46
|
+
if (next != selectValue) {
|
|
46
47
|
untracked(() => {
|
|
47
48
|
if (next == null) {
|
|
48
49
|
this.setInitValue(null);
|
|
@@ -57,9 +58,9 @@ class Select extends ValueAccess {
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
else {
|
|
60
|
-
if (!this.options.allowInvalidValue() && this.options.data() !== undefined &&
|
|
61
|
+
if (!this.options.allowInvalidValue() && this.options.data() !== undefined && selectValue?.some((r) => !this.validValue().has(r))) {
|
|
61
62
|
untracked(() => {
|
|
62
|
-
const next =
|
|
63
|
+
const next = selectValue?.filter((r) => this.validValue().has(r));
|
|
63
64
|
if (this.options.fullValue()) {
|
|
64
65
|
this.setInitValue(next?.map((r) => this.dataMap.get(r)) ?? []);
|
|
65
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-axis-appforge-axis-components-select.mjs","sources":["../../../axis-components/select/select.options.ts","../../../axis-components/select/select.ts","../../../axis-components/select/select.html","../../../axis-components/select/ngx-axis-appforge-axis-components-select.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class SelectOptions extends ValueAccessOptions {\n\n readonly labelField = signal(\"title\");\n readonly valueField = signal(\"key\");\n readonly disabledField = signal(\"disabled\");\n readonly fullValue = signal(false);\n readonly allowInvalidValue = signal(false);\n readonly data = signal<any>(undefined);\n\n readonly mode = signal<'multiple' | 'tags' | 'default'>('default');\n readonly allowClear = signal(true);\n readonly defaultFirst = signal(false);\n readonly maxMultipleCount = signal(Infinity);\n\n readonly placeholder = signal(\"\");\n readonly variant = signal<'outlined' | 'borderless' | 'filled' | 'underlined'>('outlined');\n readonly dropdownMatchSelectWidth = signal(true);\n readonly size = signal<'large' | 'small' | 'default'>('default');\n readonly optionOverflowSize = signal(8);\n readonly selectOnTab = signal(false);\n readonly maxTagCount = signal(Infinity);\n\n readonly showSearch = signal(false);\n readonly serverSearch = signal(false);\n readonly autoClearSearchValue = signal(true);\n}","import { ChangeDetectionStrategy, Component, computed, effect, model, signal, untracked } from '@angular/core';\nimport { ValueAccess } from 'ngx-axis-appforge/core';\nimport { NzSelectModule } from 'ng-zorro-antd/select';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\nimport { FormsModule } from '@angular/forms';\nimport { SelectOptions } from './select.options';\n\n@Component({\n selector: 'axis-select',\n imports: [NzSelectModule, NzRadioModule, FormsModule],\n templateUrl: './select.html',\n styleUrl: './select.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Select extends ValueAccess<SelectOptions> {\n\n constructor() {\n super();\n effect(() => {\n if (this.options.mode() == \"default\") {\n let next: any = this.selectValue();\n if (!this.options.allowInvalidValue() && this.options.data() !== undefined && !this.validValue().has(this.selectValue())) {\n next = null;\n }\n if (next == null && this.options.defaultFirst() && this.data().length) {\n next = this.data()[0][this.options.valueField()];\n }\n if (next != this.selectValue()) {\n untracked(() => {\n if (next == null) {\n this.setInitValue(null);\n } else if (this.options.fullValue()) {\n this.setInitValue(this.dataMap.get(next));\n } else {\n this.setInitValue(next);\n }\n });\n }\n } else {\n if (!this.options.allowInvalidValue() && this.options.data() !== undefined && this.selectValue()?.some((r: any) => !this.validValue().has(r))) {\n untracked(() => {\n const next = this.selectValue()?.filter((r: any) => this.validValue().has(r));\n if (this.options.fullValue()) {\n this.setInitValue(next?.map((r: any) => this.dataMap.get(r)) ?? []);\n } else {\n this.setInitValue(next);\n }\n });\n }\n }\n });\n }\n\n override options: SelectOptions = new SelectOptions();\n private dataMap = new Map();\n private readonly validValue = computed(() => this.buildValidValue());\n readonly data = computed(() => this.buildData());\n\n readonly selectValue = model<any>();\n readonly displayValue = computed(() => this.buildDisplay());\n\n readonly searchText = signal<string>(\"\");\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.valueToSelectorValue();\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n this.valueToSelectorValue();\n }\n\n private buildValidValue(): Set<any> {\n const validValue = new Set();\n const data = this.options.data();\n if (Array.isArray(data)) {\n for (const item of data) {\n this.dataMap.set(item[this.options.valueField()], item);\n validValue.add(item[this.options.valueField()]);\n }\n }\n return validValue;\n }\n\n private buildData(): any[] {\n let data: any[] = [];\n for (const item of this.validValue()) {\n data.push(this.dataMap.get(item));\n }\n if (this.options.allowInvalidValue() && this.selectValue()) {\n (this.options.mode() == \"default\" ? [this.selectValue()] : this.selectValue())!\n .filter((r: any) => !this.validValue().has(r)).forEach((r: any) => {\n if (!this.dataMap.has(r)) {\n this.dataMap.set(r, {\n [this.options.labelField()]: r,\n [this.options.valueField()]: r\n });\n }\n data.push(this.dataMap.get(r));\n });\n }\n return data;\n }\n\n private valueToSelectorValue() {\n if (this.value() != undefined) {\n if (this.options.mode() == \"default\") {\n if (this.options.fullValue()) {\n const key = this.value()[this.options.valueField()];\n if (!this.dataMap.has(key)) {\n this.dataMap.set(key, this.value());\n }\n this.selectValue.set(this.value()[this.options.valueField()]);\n } else {\n this.selectValue.set(this.value());\n }\n return;\n } else if (Array.isArray(this.value())) {\n if (this.options.fullValue()) {\n this.selectValue.set(this.value().map((r: any) => r[this.options.valueField()]));\n for (const v of this.value()) {\n if (!this.dataMap.has(v[this.options.valueField()])) {\n this.dataMap.set(v[this.options.valueField()], v);\n }\n }\n } else {\n this.selectValue.set(this.value());\n }\n return;\n }\n }\n this.selectValue.set(this.value());\n }\n\n onSelectChange(value: any) {\n if (this.options.fullValue()) {\n if (this.options.mode() == \"default\") {\n this.value.set(this.dataMap.get(value) ?? null);\n } else {\n this.value.set(value?.map((r: any) => this.dataMap.get(r)));\n }\n } else {\n this.value.set(value);\n }\n this.onChange?.(this.value());\n }\n\n private buildDisplay(): string {\n if (this.options.mode() != \"default\") {\n if (Array.isArray(this.value())) {\n if (this.options.fullValue()) {\n return this.value()?.map((r: any) => r[this.options.labelField()]).join(\";\");\n } else {\n return this.value()?.map((r: any) => this.dataMap.get(r)?.[this.options.labelField()]).join(\";\");\n }\n }\n } else {\n if (this.options.fullValue()) {\n return this.value()[this.options.labelField()];\n } else {\n return this.dataMap.get(this.value())?.[this.options.labelField()];\n }\n }\n return \"\";\n }\n\n searchChange(input: string) {\n this.triggeEvents(\"search\", { searchText: input }).subscribe();\n }\n}\n","@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-select [nzMode]=\"options.mode()\" [nzAllowClear]=\"options.allowClear()\"\n [nzMaxMultipleCount]=\"options.maxMultipleCount()\" [nzPlaceHolder]=\"options.placeholder()\"\n [nzVariant]=\"options.variant()\" [nzDropdownMatchSelectWidth]=\"options.dropdownMatchSelectWidth()\"\n [nzSize]=\"options.size()\" [nzOptionOverflowSize]=\"options.optionOverflowSize()\"\n [nzSelectOnTab]=\"options.selectOnTab()\" [nzMaxTagCount]=\"options.maxTagCount()\"\n [nzShowSearch]=\"options.showSearch()\" [nzServerSearch]=\"options.serverSearch()\"\n [nzAutoClearSearchValue]=\"options.autoClearSearchValue()\" [nzDisabled]=\"options.disabled()\"\n [(ngModel)]=\"selectValue\" (ngModelChange)=\"onSelectChange($event)\" (nzOnSearch)=\"searchChange($event)\">\n @for (o of data(); track o[options.valueField()]) {\n <nz-option [nzValue]=\"o[options.valueField()]\" [nzLabel]=\"o[options.labelField()]\"\n [nzDisabled]=\"o[options.disabledField()]\"></nz-option>\n }\n</nz-select>\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './select';\n"],"names":[],"mappings":";;;;;;;;;AAGM,MAAO,aAAc,SAAQ,kBAAkB,CAAA;AAExC,IAAA,UAAU,GAAG,MAAM,CAAC,OAAO,sDAAC;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC;AAC1B,IAAA,aAAa,GAAG,MAAM,CAAC,UAAU,yDAAC;AAClC,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,qDAAC;AACzB,IAAA,iBAAiB,GAAG,MAAM,CAAC,KAAK,6DAAC;AACjC,IAAA,IAAI,GAAG,MAAM,CAAM,SAAS,gDAAC;AAE7B,IAAA,IAAI,GAAG,MAAM,CAAkC,SAAS,gDAAC;AACzD,IAAA,UAAU,GAAG,MAAM,CAAC,IAAI,sDAAC;AACzB,IAAA,YAAY,GAAG,MAAM,CAAC,KAAK,wDAAC;AAC5B,IAAA,gBAAgB,GAAG,MAAM,CAAC,QAAQ,4DAAC;AAEnC,IAAA,WAAW,GAAG,MAAM,CAAC,EAAE,uDAAC;AACxB,IAAA,OAAO,GAAG,MAAM,CAAsD,UAAU,mDAAC;AACjF,IAAA,wBAAwB,GAAG,MAAM,CAAC,IAAI,oEAAC;AACvC,IAAA,IAAI,GAAG,MAAM,CAAgC,SAAS,gDAAC;AACvD,IAAA,kBAAkB,GAAG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EAAE,aAAa,EAAE,WAAW,CAAC,EAAA,eAAA,EAGpC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0iCAAA,EAAA,MAAA,EAAA,CAAA,wDAAA,CAAA,EAAA;;;AEZjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-select.mjs","sources":["../../../axis-components/select/select.options.ts","../../../axis-components/select/select.ts","../../../axis-components/select/select.html","../../../axis-components/select/ngx-axis-appforge-axis-components-select.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class SelectOptions extends ValueAccessOptions {\n\n readonly labelField = signal(\"title\");\n readonly valueField = signal(\"key\");\n readonly disabledField = signal(\"disabled\");\n readonly fullValue = signal(false);\n readonly allowInvalidValue = signal(false);\n readonly data = signal<any>(undefined);\n\n readonly mode = signal<'multiple' | 'tags' | 'default'>('default');\n readonly allowClear = signal(true);\n readonly defaultFirst = signal(false);\n readonly maxMultipleCount = signal(Infinity);\n\n readonly placeholder = signal(\"\");\n readonly variant = signal<'outlined' | 'borderless' | 'filled' | 'underlined'>('outlined');\n readonly dropdownMatchSelectWidth = signal(true);\n readonly size = signal<'large' | 'small' | 'default'>('default');\n readonly optionOverflowSize = signal(8);\n readonly selectOnTab = signal(false);\n readonly maxTagCount = signal(Infinity);\n\n readonly showSearch = signal(false);\n readonly serverSearch = signal(false);\n readonly autoClearSearchValue = signal(true);\n}","import { ChangeDetectionStrategy, Component, computed, effect, model, signal, untracked } from '@angular/core';\nimport { ValueAccess } from 'ngx-axis-appforge/core';\nimport { NzSelectModule } from 'ng-zorro-antd/select';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\nimport { FormsModule } from '@angular/forms';\nimport { SelectOptions } from './select.options';\n\n@Component({\n selector: 'axis-select',\n imports: [NzSelectModule, NzRadioModule, FormsModule],\n templateUrl: './select.html',\n styleUrl: './select.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Select extends ValueAccess<SelectOptions> {\n\n constructor() {\n super();\n effect(() => {\n const selectValue = untracked(this.selectValue);\n if (this.options.mode() == \"default\") {\n let next: any = selectValue;\n if (!this.options.allowInvalidValue() && this.options.data() !== undefined && !this.validValue().has(selectValue)) {\n next = null;\n }\n if (next == null && this.options.defaultFirst() && this.data().length) {\n next = this.data()[0][this.options.valueField()];\n }\n if (next != selectValue) {\n untracked(() => {\n if (next == null) {\n this.setInitValue(null);\n } else if (this.options.fullValue()) {\n this.setInitValue(this.dataMap.get(next));\n } else {\n this.setInitValue(next);\n }\n });\n }\n } else {\n if (!this.options.allowInvalidValue() && this.options.data() !== undefined && selectValue?.some((r: any) => !this.validValue().has(r))) {\n untracked(() => {\n const next = selectValue?.filter((r: any) => this.validValue().has(r));\n if (this.options.fullValue()) {\n this.setInitValue(next?.map((r: any) => this.dataMap.get(r)) ?? []);\n } else {\n this.setInitValue(next);\n }\n });\n }\n }\n });\n }\n\n override options: SelectOptions = new SelectOptions();\n private dataMap = new Map();\n private readonly validValue = computed(() => this.buildValidValue());\n readonly data = computed(() => this.buildData());\n\n readonly selectValue = model<any>();\n readonly displayValue = computed(() => this.buildDisplay());\n\n readonly searchText = signal<string>(\"\");\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.valueToSelectorValue();\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n this.valueToSelectorValue();\n }\n\n private buildValidValue(): Set<any> {\n const validValue = new Set();\n const data = this.options.data();\n if (Array.isArray(data)) {\n for (const item of data) {\n this.dataMap.set(item[this.options.valueField()], item);\n validValue.add(item[this.options.valueField()]);\n }\n }\n return validValue;\n }\n\n private buildData(): any[] {\n let data: any[] = [];\n for (const item of this.validValue()) {\n data.push(this.dataMap.get(item));\n }\n if (this.options.allowInvalidValue() && this.selectValue()) {\n (this.options.mode() == \"default\" ? [this.selectValue()] : this.selectValue())!\n .filter((r: any) => !this.validValue().has(r)).forEach((r: any) => {\n if (!this.dataMap.has(r)) {\n this.dataMap.set(r, {\n [this.options.labelField()]: r,\n [this.options.valueField()]: r\n });\n }\n data.push(this.dataMap.get(r));\n });\n }\n return data;\n }\n\n private valueToSelectorValue() {\n if (this.value() != undefined) {\n if (this.options.mode() == \"default\") {\n if (this.options.fullValue()) {\n const key = this.value()[this.options.valueField()];\n if (!this.dataMap.has(key)) {\n this.dataMap.set(key, this.value());\n }\n this.selectValue.set(this.value()[this.options.valueField()]);\n } else {\n this.selectValue.set(this.value());\n }\n return;\n } else if (Array.isArray(this.value())) {\n if (this.options.fullValue()) {\n this.selectValue.set(this.value().map((r: any) => r[this.options.valueField()]));\n for (const v of this.value()) {\n if (!this.dataMap.has(v[this.options.valueField()])) {\n this.dataMap.set(v[this.options.valueField()], v);\n }\n }\n } else {\n this.selectValue.set(this.value());\n }\n return;\n }\n }\n this.selectValue.set(this.value());\n }\n\n onSelectChange(value: any) {\n if (this.options.fullValue()) {\n if (this.options.mode() == \"default\") {\n this.value.set(this.dataMap.get(value) ?? null);\n } else {\n this.value.set(value?.map((r: any) => this.dataMap.get(r)));\n }\n } else {\n this.value.set(value);\n }\n this.onChange?.(this.value());\n }\n\n private buildDisplay(): string {\n if (this.options.mode() != \"default\") {\n if (Array.isArray(this.value())) {\n if (this.options.fullValue()) {\n return this.value()?.map((r: any) => r[this.options.labelField()]).join(\";\");\n } else {\n return this.value()?.map((r: any) => this.dataMap.get(r)?.[this.options.labelField()]).join(\";\");\n }\n }\n } else {\n if (this.options.fullValue()) {\n return this.value()[this.options.labelField()];\n } else {\n return this.dataMap.get(this.value())?.[this.options.labelField()];\n }\n }\n return \"\";\n }\n\n searchChange(input: string) {\n this.triggeEvents(\"search\", { searchText: input }).subscribe();\n }\n}\n","@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-select [nzMode]=\"options.mode()\" [nzAllowClear]=\"options.allowClear()\"\n [nzMaxMultipleCount]=\"options.maxMultipleCount()\" [nzPlaceHolder]=\"options.placeholder()\"\n [nzVariant]=\"options.variant()\" [nzDropdownMatchSelectWidth]=\"options.dropdownMatchSelectWidth()\"\n [nzSize]=\"options.size()\" [nzOptionOverflowSize]=\"options.optionOverflowSize()\"\n [nzSelectOnTab]=\"options.selectOnTab()\" [nzMaxTagCount]=\"options.maxTagCount()\"\n [nzShowSearch]=\"options.showSearch()\" [nzServerSearch]=\"options.serverSearch()\"\n [nzAutoClearSearchValue]=\"options.autoClearSearchValue()\" [nzDisabled]=\"options.disabled()\"\n [(ngModel)]=\"selectValue\" (ngModelChange)=\"onSelectChange($event)\" (nzOnSearch)=\"searchChange($event)\">\n @for (o of data(); track o[options.valueField()]) {\n <nz-option [nzValue]=\"o[options.valueField()]\" [nzLabel]=\"o[options.labelField()]\"\n [nzDisabled]=\"o[options.disabledField()]\"></nz-option>\n }\n</nz-select>\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './select';\n"],"names":[],"mappings":";;;;;;;;;AAGM,MAAO,aAAc,SAAQ,kBAAkB,CAAA;AAExC,IAAA,UAAU,GAAG,MAAM,CAAC,OAAO,sDAAC;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC;AAC1B,IAAA,aAAa,GAAG,MAAM,CAAC,UAAU,yDAAC;AAClC,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,qDAAC;AACzB,IAAA,iBAAiB,GAAG,MAAM,CAAC,KAAK,6DAAC;AACjC,IAAA,IAAI,GAAG,MAAM,CAAM,SAAS,gDAAC;AAE7B,IAAA,IAAI,GAAG,MAAM,CAAkC,SAAS,gDAAC;AACzD,IAAA,UAAU,GAAG,MAAM,CAAC,IAAI,sDAAC;AACzB,IAAA,YAAY,GAAG,MAAM,CAAC,KAAK,wDAAC;AAC5B,IAAA,gBAAgB,GAAG,MAAM,CAAC,QAAQ,4DAAC;AAEnC,IAAA,WAAW,GAAG,MAAM,CAAC,EAAE,uDAAC;AACxB,IAAA,OAAO,GAAG,MAAM,CAAsD,UAAU,mDAAC;AACjF,IAAA,wBAAwB,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A,EAAA,CAAA;kBAPlB,SAAS;+BACE,aAAa,EAAA,OAAA,EACd,CAAC,cAAc,EAAE,aAAa,EAAE,WAAW,CAAC,EAAA,eAAA,EAGpC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0iCAAA,EAAA,MAAA,EAAA,CAAA,wDAAA,CAAA,EAAA;;;AEZjD;;AAEG;;;;"}
|
|
@@ -161,6 +161,7 @@ class TableFieldSetting extends FunFieldValueBase {
|
|
|
161
161
|
return [{
|
|
162
162
|
scopeId: this.elementRef.options.id + '.fields.' + this.formValue().field + ".loop",
|
|
163
163
|
scopeName: "列循环",
|
|
164
|
+
noListen: true,
|
|
164
165
|
ds: {
|
|
165
166
|
loopRow: this.loopTargetResult()?.()?.[0],
|
|
166
167
|
}
|
|
@@ -577,9 +578,13 @@ const Config = {
|
|
|
577
578
|
[`${options.id}.fields`]: { element: fieldsParent, dropElement: fieldsParent },
|
|
578
579
|
};
|
|
579
580
|
options.fields?.forEach((f) => {
|
|
580
|
-
const
|
|
581
|
+
const fieldElements = fieldsParent?.querySelectorAll(`th[data-field="${f.field}"]`);
|
|
582
|
+
const elements = [];
|
|
583
|
+
fieldElements?.forEach(e => {
|
|
584
|
+
elements.push(e);
|
|
585
|
+
});
|
|
581
586
|
const fieldChildElement = element?.querySelector(`td[data-field="${f.field}"]`);
|
|
582
|
-
res[`${options.id}.fields.${f.field}`] = {
|
|
587
|
+
res[`${options.id}.fields.${f.field}`] = { elements, dropElement: fieldChildElement };
|
|
583
588
|
});
|
|
584
589
|
const rowActionsElement = fieldsParent?.querySelector("th[data-rowactions]");
|
|
585
590
|
const rowActionsChildElement = element.querySelector("td>div[data-rowactions]");
|