@dignite-ng/expand.cms 0.0.39 → 0.0.40
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/config/components/domains/domains.component.d.ts +22 -0
- package/config/proxy/admin/domains/domain-admin.service.d.ts +13 -0
- package/config/proxy/admin/domains/index.d.ts +2 -0
- package/config/proxy/admin/domains/models.d.ts +7 -0
- package/esm2022/config/components/domains/domains.component.mjs +93 -0
- package/esm2022/config/providers/route.provider.mjs +10 -10
- package/esm2022/config/proxy/admin/domains/domain-admin.service.mjs +33 -0
- package/esm2022/config/proxy/admin/domains/index.mjs +3 -0
- package/esm2022/config/proxy/admin/domains/models.mjs +2 -0
- package/esm2022/lib/cms.module.mjs +6 -11
- package/esm2022/lib/components/admin/index.mjs +1 -2
- package/esm2022/public-api.mjs +1 -2
- package/fesm2022/dignite-ng-expand.cms-config.mjs +127 -11
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +1 -1
- package/fesm2022/dignite-ng-expand.cms.mjs +8 -120
- package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -1
- package/lib/cms.module.d.ts +8 -9
- package/lib/components/admin/index.d.ts +0 -1
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Injectable, inject, Component, ViewContainerRef, Input, ViewChildren, ViewChild, Output, InjectionToken, RendererFactory2, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@abp/ng.core';
|
|
4
|
-
import { mapEnumToOptions, ListService, ConfigStateService, LIST_QUERY_DEBOUNCE_TIME,
|
|
4
|
+
import { mapEnumToOptions, ListService, ConfigStateService, LIST_QUERY_DEBOUNCE_TIME, AuthGuard, PermissionGuard, LazyModuleFactory, CoreModule } from '@abp/ng.core';
|
|
5
5
|
import * as i3 from '@abp/ng.theme.shared';
|
|
6
|
-
import {
|
|
6
|
+
import { ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
7
7
|
import * as i3$1 from '@angular/router';
|
|
8
8
|
import { RouterModule } from '@angular/router';
|
|
9
9
|
import * as i1$1 from '@angular/forms';
|
|
@@ -2314,114 +2314,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2314
2314
|
args: ['editFieldModalSubmitBtn', { static: false }]
|
|
2315
2315
|
}] } });
|
|
2316
2316
|
|
|
2317
|
-
class DomainAdminService {
|
|
2318
|
-
constructor(restService) {
|
|
2319
|
-
this.restService = restService;
|
|
2320
|
-
this.apiName = 'CmsAdmin';
|
|
2321
|
-
this.getBound = (config) => this.restService.request({
|
|
2322
|
-
method: 'GET',
|
|
2323
|
-
url: '/api/cms-admin/domains/bound',
|
|
2324
|
-
}, { apiName: this.apiName, ...config });
|
|
2325
|
-
this.nameExists = (domainName, config) => this.restService.request({
|
|
2326
|
-
method: 'GET',
|
|
2327
|
-
url: '/api/cms-admin/domains/name-exists',
|
|
2328
|
-
params: { domainName },
|
|
2329
|
-
}, { apiName: this.apiName, ...config });
|
|
2330
|
-
this.update = (input, config) => this.restService.request({
|
|
2331
|
-
method: 'POST',
|
|
2332
|
-
url: '/api/cms-admin/domains',
|
|
2333
|
-
body: input,
|
|
2334
|
-
}, { apiName: this.apiName, ...config });
|
|
2335
|
-
}
|
|
2336
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2337
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainAdminService, providedIn: 'root' }); }
|
|
2338
|
-
}
|
|
2339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainAdminService, decorators: [{
|
|
2340
|
-
type: Injectable,
|
|
2341
|
-
args: [{
|
|
2342
|
-
providedIn: 'root',
|
|
2343
|
-
}]
|
|
2344
|
-
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
2345
|
-
|
|
2346
|
-
class DomainsComponent {
|
|
2347
|
-
constructor() {
|
|
2348
|
-
this.toaster = inject(ToasterService);
|
|
2349
|
-
this._DomainAdminService = inject(DomainAdminService);
|
|
2350
|
-
this._LocalizationService = inject(LocalizationService);
|
|
2351
|
-
/**domain详情 */
|
|
2352
|
-
this.domainInfo = '';
|
|
2353
|
-
}
|
|
2354
|
-
get domainNameInput() {
|
|
2355
|
-
return this.newEntity.get('domainName');
|
|
2356
|
-
}
|
|
2357
|
-
async ngOnInit() {
|
|
2358
|
-
//Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
|
2359
|
-
//Add 'implements OnInit' to the class.
|
|
2360
|
-
this.newEntity = new FormGroup({
|
|
2361
|
-
domainName: new FormControl('', {
|
|
2362
|
-
asyncValidators: this.repetitionAsyncValidator(),
|
|
2363
|
-
updateOn: 'blur'
|
|
2364
|
-
})
|
|
2365
|
-
});
|
|
2366
|
-
await this.getDomainsBound();
|
|
2367
|
-
}
|
|
2368
|
-
/**用于获取已绑定的域名 */
|
|
2369
|
-
getDomainsBound() {
|
|
2370
|
-
return new Promise((resolve, rejects) => {
|
|
2371
|
-
this._DomainAdminService.getBound().subscribe(res => {
|
|
2372
|
-
this.domainNameInput.patchValue(res?.domainName || '');
|
|
2373
|
-
this.domainInfo = res;
|
|
2374
|
-
resolve(res);
|
|
2375
|
-
});
|
|
2376
|
-
});
|
|
2377
|
-
}
|
|
2378
|
-
//检验域名是否已经绑定
|
|
2379
|
-
repetitionAsyncValidator() {
|
|
2380
|
-
return (ctrl) => {
|
|
2381
|
-
return new Promise(resolve => {
|
|
2382
|
-
let domainNameInput = this.domainNameInput.value;
|
|
2383
|
-
if (!domainNameInput) {
|
|
2384
|
-
resolve(null);
|
|
2385
|
-
return;
|
|
2386
|
-
}
|
|
2387
|
-
if (this.domainInfo?.domainName === domainNameInput) {
|
|
2388
|
-
resolve(null);
|
|
2389
|
-
return;
|
|
2390
|
-
}
|
|
2391
|
-
var patt = /^(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.[A-Za-z]{2,6}$/;
|
|
2392
|
-
if (!patt.test(domainNameInput)) {
|
|
2393
|
-
resolve({ repetition: this._LocalizationService.instant(`AbpValidation::ThisFieldMustMatchTheRegularExpression{0}`, patt.toString()) });
|
|
2394
|
-
console.log(this.newEntity, 'newEntity');
|
|
2395
|
-
return;
|
|
2396
|
-
}
|
|
2397
|
-
this._DomainAdminService.nameExists(domainNameInput).subscribe(res => {
|
|
2398
|
-
if (res) {
|
|
2399
|
-
resolve({ repetition: this._LocalizationService.instant(`Cms::DomainName{0}AlreadyExist`, ctrl.value) });
|
|
2400
|
-
}
|
|
2401
|
-
else {
|
|
2402
|
-
resolve(null);
|
|
2403
|
-
}
|
|
2404
|
-
});
|
|
2405
|
-
});
|
|
2406
|
-
};
|
|
2407
|
-
}
|
|
2408
|
-
/**保存 */
|
|
2409
|
-
SaveSubmit() {
|
|
2410
|
-
let input = this.newEntity.value;
|
|
2411
|
-
console.log(input, '保存');
|
|
2412
|
-
this._DomainAdminService.update(input).subscribe(async (res) => {
|
|
2413
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::保存成功`));
|
|
2414
|
-
await this.getDomainsBound();
|
|
2415
|
-
});
|
|
2416
|
-
}
|
|
2417
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2418
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DomainsComponent, selector: "cms-domains", ngImport: i0, template: "<form [formGroup]=\"newEntity\" (ngSubmit)=\"SaveSubmit()\">\n \n <div class=\"d-flex align-items-center justify-content-between\">\n <h2>{{'Cms::Domain'|abpLocalization}}</h2>\n <button class=\"btn btn-primary btn-sm\" type=\"submit\"><i\n class=\"me-1 fas fa-save\"></i>{{'AbpUi::Save'|abpLocalization}}</button>\n </div>\n <hr class=\"my-3\" />\n <div class=\"mb-2\">\n <!-- <label class=\"form-label\" for=\"title\">{{'Cms::Domain' | abpLocalization}}</label> -->\n <input type=\"text\" class=\"form-control\" formControlName=\"domainName\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"domainNameInput.errors?.repetition\">\n {{domainNameInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\u6B64\u5904\u662F\u586B\u5199\u57DF\u540D\u7684\u63CF\u8FF0\uFF0C\u9700\u8981\u4E00\u4E2A\u5B57\u6BB5\u7EDF\u4E00\u914D\u7F6E\u57DF\u540D\u591A\u8BED\u8A00\uFF0C</div>\n\n </div>\n <hr class=\"my-3\" />\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2419
|
-
}
|
|
2420
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainsComponent, decorators: [{
|
|
2421
|
-
type: Component,
|
|
2422
|
-
args: [{ selector: 'cms-domains', template: "<form [formGroup]=\"newEntity\" (ngSubmit)=\"SaveSubmit()\">\n \n <div class=\"d-flex align-items-center justify-content-between\">\n <h2>{{'Cms::Domain'|abpLocalization}}</h2>\n <button class=\"btn btn-primary btn-sm\" type=\"submit\"><i\n class=\"me-1 fas fa-save\"></i>{{'AbpUi::Save'|abpLocalization}}</button>\n </div>\n <hr class=\"my-3\" />\n <div class=\"mb-2\">\n <!-- <label class=\"form-label\" for=\"title\">{{'Cms::Domain' | abpLocalization}}</label> -->\n <input type=\"text\" class=\"form-control\" formControlName=\"domainName\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"domainNameInput.errors?.repetition\">\n {{domainNameInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\u6B64\u5904\u662F\u586B\u5199\u57DF\u540D\u7684\u63CF\u8FF0\uFF0C\u9700\u8981\u4E00\u4E2A\u5B57\u6BB5\u7EDF\u4E00\u914D\u7F6E\u57DF\u540D\u591A\u8BED\u8A00\uFF0C</div>\n\n </div>\n <hr class=\"my-3\" />\n</form>" }]
|
|
2423
|
-
}] });
|
|
2424
|
-
|
|
2425
2317
|
class EntryConfig {
|
|
2426
2318
|
constructor(data) {
|
|
2427
2319
|
/**多选 */
|
|
@@ -3664,11 +3556,10 @@ class CmsModule {
|
|
|
3664
3556
|
MatrixConfigComponent,
|
|
3665
3557
|
MatrixControlComponent,
|
|
3666
3558
|
EntryConfigComponent,
|
|
3667
|
-
EntryControlComponent,
|
|
3668
|
-
DomainsComponent], imports: [CoreModule,
|
|
3559
|
+
EntryControlComponent], imports: [CoreModule,
|
|
3669
3560
|
ThemeSharedModule,
|
|
3670
|
-
CmsRoutingModule,
|
|
3671
3561
|
FormsModule,
|
|
3562
|
+
CmsRoutingModule,
|
|
3672
3563
|
NgbNavModule,
|
|
3673
3564
|
NgbAccordionModule,
|
|
3674
3565
|
NgbDropdownModule,
|
|
@@ -3678,12 +3569,11 @@ class CmsModule {
|
|
|
3678
3569
|
MatrixConfigComponent,
|
|
3679
3570
|
MatrixControlComponent,
|
|
3680
3571
|
EntryConfigComponent,
|
|
3681
|
-
EntryControlComponent
|
|
3682
|
-
DomainsComponent] }); }
|
|
3572
|
+
EntryControlComponent] }); }
|
|
3683
3573
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, imports: [CoreModule,
|
|
3684
3574
|
ThemeSharedModule,
|
|
3685
|
-
CmsRoutingModule,
|
|
3686
3575
|
FormsModule,
|
|
3576
|
+
CmsRoutingModule,
|
|
3687
3577
|
NgbNavModule,
|
|
3688
3578
|
NgbAccordionModule,
|
|
3689
3579
|
NgbDropdownModule,
|
|
@@ -3714,13 +3604,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3714
3604
|
MatrixControlComponent,
|
|
3715
3605
|
EntryConfigComponent,
|
|
3716
3606
|
EntryControlComponent,
|
|
3717
|
-
DomainsComponent,
|
|
3718
3607
|
],
|
|
3719
3608
|
imports: [
|
|
3720
3609
|
CoreModule,
|
|
3721
3610
|
ThemeSharedModule,
|
|
3722
|
-
CmsRoutingModule,
|
|
3723
3611
|
FormsModule,
|
|
3612
|
+
CmsRoutingModule,
|
|
3724
3613
|
NgbNavModule,
|
|
3725
3614
|
NgbAccordionModule,
|
|
3726
3615
|
NgbDropdownModule,
|
|
@@ -3737,7 +3626,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3737
3626
|
MatrixControlComponent,
|
|
3738
3627
|
EntryConfigComponent,
|
|
3739
3628
|
EntryControlComponent,
|
|
3740
|
-
DomainsComponent
|
|
3741
3629
|
],
|
|
3742
3630
|
providers: [],
|
|
3743
3631
|
}]
|
|
@@ -3751,5 +3639,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3751
3639
|
* Generated bundle index. Do not edit.
|
|
3752
3640
|
*/
|
|
3753
3641
|
|
|
3754
|
-
export { CmsModule,
|
|
3642
|
+
export { CmsModule, EntryConfig, EntryConfigComponent, EntryControlComponent, FieldControlGroup, MatrixConfig, MatrixConfigComponent, MatrixControlComponent, MatrixItemConfig, SimpleReuseStrategy, TableConfig, TableConfigComponent, TableControlComponent, TableFormControl, matrixFieldInputBase };
|
|
3755
3643
|
//# sourceMappingURL=dignite-ng-expand.cms.mjs.map
|