@alauda-fe/dynamic-plugin-shared 0.0.4-alpha.6 → 0.0.4-alpha.8
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i1 from '@alauda/ui';
|
|
2
2
|
import { rgbColor, ThemeService, coerceAttrBoolean, FormItemControlDirective, observeResizeOn, MessageService, NotificationService, DIALOG_DATA, DialogModule, ButtonModule, InputModule, IconModule, FormModule, handlePixel, isTemplateRef, ThemePickerPipe, TooltipModule, TooltipType, ButtonComponent, IconComponent, TagComponent, TooltipDirective, DateNavRange, InputGroupComponent, InputSuffixDirective, InputComponent, DateRangePickerPanelComponent, TagType, TagModule, TooltipComponent, BaseTooltip, TooltipTrigger, INPUT_GROUP_MODULE, SelectModule, FORM_MODULE, DropdownModule, CheckboxModule, CardComponent, TOOLTIP_MODULE, CheckboxComponent, BackTopComponent, SortDirective, SortHeaderComponent, PaginatorComponent, TABLE_MODULE, DROPDOWN_MODULE, DialogRef, DIALOG_MODULE, CARD_MODULE, CHECKBOX_MODULE, TabsModule } from '@alauda/ui';
|
|
3
|
-
import { last, cloneDeep, has, unset, get, isBoolean, sortBy, set, trim, isFunction, range, debounce, uniq, identity, first, isString, isEmpty, isObjectLike,
|
|
3
|
+
import { last, cloneDeep, has, unset, get, isBoolean, sortBy, set, trim, isFunction, range, debounce, uniq, identity, first, isString, isEmpty, isObjectLike, memoize, findKey, some } from 'lodash-es';
|
|
4
4
|
import * as i2$1 from '@alauda-fe/dynamic-plugin-sdk';
|
|
5
5
|
import { parseBase64Type, isBlank, publishRef, TOKEN_BASE_DOMAIN, stringify as stringify$1, isEqual, TimeService, TranslateService, isZhLang, FALLBACK_LANGUAGE, TranslatePipe, ObservableInput, FeatureGateService, FieldNotAvailablePipe, ValueHook, LoadingMaskComponent, PurePipe, StandardTimePipe, RelativeTimePipe, skipError, CURR_ESCAPE_DEACTIVATE_GUARD, ESCAPE_DEACTIVATE_GUARD, parseAll, FIELD_NOT_AVAILABLE_PLACEHOLDER, noop, SafePipe, WatchEvent, K8sUtilService, NAMESPACE as NAMESPACE$1, isFieldNotAvailable, K8S_UTIL_PIPES_MODULE, ResourceSelectorPopupService, ProjectService, ConfigurableField, API_GATEWAY as API_GATEWAY$1, ClusterListComponent, K8sApiService, TRANSLATE_MODULE } from '@alauda-fe/dynamic-plugin-sdk';
|
|
6
6
|
import { Observable, finalize, map, startWith, catchError, of, isObservable, switchMap, animationFrameScheduler, fromEvent, auditTime, Subject, takeUntil, distinctUntilChanged, combineLatest, filter, debounceTime, take, merge, pairwise, tap, BehaviorSubject, from, timer, ReplaySubject, delay, withLatestFrom, scan, takeWhile, concat, exhaustMap, EMPTY as EMPTY$1, interval, NEVER, switchScan, shareReplay, mapTo } from 'rxjs';
|
|
@@ -11332,11 +11332,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
11332
11332
|
}] } });
|
|
11333
11333
|
|
|
11334
11334
|
class UpdateDescriptionDialogComponent {
|
|
11335
|
-
constructor(
|
|
11336
|
-
this.dialogRef =
|
|
11337
|
-
this.k8sApi =
|
|
11338
|
-
this.k8sUtil =
|
|
11339
|
-
this.data =
|
|
11335
|
+
constructor() {
|
|
11336
|
+
this.dialogRef = inject(DialogRef);
|
|
11337
|
+
this.k8sApi = inject(K8sApiService);
|
|
11338
|
+
this.k8sUtil = inject(K8sUtilService);
|
|
11339
|
+
this.data = inject(DIALOG_DATA);
|
|
11340
11340
|
this.description = this.k8sUtil.getDescription(this.data.resource);
|
|
11341
11341
|
this.confirming$$ = new BehaviorSubject(false);
|
|
11342
11342
|
}
|
|
@@ -11344,14 +11344,7 @@ class UpdateDescriptionDialogComponent {
|
|
|
11344
11344
|
this.confirming$$.next(true);
|
|
11345
11345
|
this.k8sApi
|
|
11346
11346
|
.patchResource({
|
|
11347
|
-
|
|
11348
|
-
? {
|
|
11349
|
-
definition: this.data.definition,
|
|
11350
|
-
}
|
|
11351
|
-
: {
|
|
11352
|
-
type: this.data.type ||
|
|
11353
|
-
snakeCase(this.data.resource.kind).toUpperCase(),
|
|
11354
|
-
}),
|
|
11347
|
+
definition: this.data.definition,
|
|
11355
11348
|
cluster: this.data.cluster,
|
|
11356
11349
|
resource: this.data.resource,
|
|
11357
11350
|
part: {
|
|
@@ -11365,7 +11358,7 @@ class UpdateDescriptionDialogComponent {
|
|
|
11365
11358
|
.pipe(finalize(() => this.confirming$$.next(false)))
|
|
11366
11359
|
.subscribe(resource => this.dialogRef.close(resource));
|
|
11367
11360
|
}
|
|
11368
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UpdateDescriptionDialogComponent, deps: [
|
|
11361
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UpdateDescriptionDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11369
11362
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: UpdateDescriptionDialogComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<aui-dialog-header>\n {{ 'update_description' | translate }}\n</aui-dialog-header>\n<aui-dialog-content>\n <aui-form-item>\n <label auiFormItemLabel>\n {{ 'name' | translate }}\n </label>\n {{ data.resource | aclName }}\n </aui-form-item>\n <aui-form-item class=\"last-form-item-no-margin\">\n <label auiFormItemLabel>\n {{ 'description' | translate }}\n </label>\n <textarea\n aui-input\n name=\"description\"\n [(ngModel)]=\"description\"\n ></textarea>\n </aui-form-item>\n</aui-dialog-content>\n<aui-dialog-footer>\n <button\n aui-button=\"primary\"\n [loading]=\"confirming$$ | async\"\n [disabled]=\"confirming$$ | async\"\n (click)=\"confirm()\"\n >\n {{ 'update' | translate }}\n </button>\n <button\n aui-button\n auiDialogClose\n >\n {{ 'cancel' | translate }}\n </button>\n</aui-dialog-footer>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.ButtonComponent, selector: "button[aui-button]", inputs: ["aui-button", "size", "plain", "loading", "round", "square"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1.DialogHeaderComponent, selector: "aui-dialog-header", inputs: ["divider", "closeable", "result"] }, { kind: "component", type: i1.DialogContentComponent, selector: "aui-dialog-content" }, { kind: "component", type: i1.DialogFooterComponent, selector: "aui-dialog-footer" }, { kind: "directive", type: i1.DialogCloseDirective, selector: "[auiDialogClose]", inputs: ["auiDialogClose"], exportAs: ["auiDialogClose"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i1.InputComponent, selector: "input[aui-input],textarea[aui-input]", inputs: ["size", "disabled"] }, { kind: "ngmodule", type: FormModule }, { kind: "component", type: i1.FormItemComponent, selector: "aui-form-item", inputs: ["labelWidth", "width", "labelPosition", "emptyAddon", "plain"] }, { kind: "directive", type: i1.FormItemLabelDirective, selector: "label[auiFormItemLabel]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: i2$1.K8sNamePipe, name: "aclName" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11370
11363
|
}
|
|
11371
11364
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UpdateDescriptionDialogComponent, decorators: [{
|
|
@@ -11380,10 +11373,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
11380
11373
|
TranslatePipe,
|
|
11381
11374
|
K8S_UTIL_PIPES_MODULE,
|
|
11382
11375
|
], template: "<aui-dialog-header>\n {{ 'update_description' | translate }}\n</aui-dialog-header>\n<aui-dialog-content>\n <aui-form-item>\n <label auiFormItemLabel>\n {{ 'name' | translate }}\n </label>\n {{ data.resource | aclName }}\n </aui-form-item>\n <aui-form-item class=\"last-form-item-no-margin\">\n <label auiFormItemLabel>\n {{ 'description' | translate }}\n </label>\n <textarea\n aui-input\n name=\"description\"\n [(ngModel)]=\"description\"\n ></textarea>\n </aui-form-item>\n</aui-dialog-content>\n<aui-dialog-footer>\n <button\n aui-button=\"primary\"\n [loading]=\"confirming$$ | async\"\n [disabled]=\"confirming$$ | async\"\n (click)=\"confirm()\"\n >\n {{ 'update' | translate }}\n </button>\n <button\n aui-button\n auiDialogClose\n >\n {{ 'cancel' | translate }}\n </button>\n</aui-dialog-footer>\n" }]
|
|
11383
|
-
}]
|
|
11384
|
-
type: Inject,
|
|
11385
|
-
args: [DIALOG_DATA]
|
|
11386
|
-
}] }] });
|
|
11376
|
+
}] });
|
|
11387
11377
|
|
|
11388
11378
|
class UpdateDisplayNameDialogComponent {
|
|
11389
11379
|
constructor() {
|