@indigina/ui-kit 1.1.357 → 1.1.359
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.
|
@@ -6345,11 +6345,6 @@ const findMatches = (obj, translatePrefix, excludedKeys = [], search, translateV
|
|
|
6345
6345
|
if (!search) {
|
|
6346
6346
|
return [];
|
|
6347
6347
|
}
|
|
6348
|
-
const handleArray = (arr, path) => {
|
|
6349
|
-
arr.forEach((item, index) => {
|
|
6350
|
-
traverse(item, `${path}[${index}]`);
|
|
6351
|
-
});
|
|
6352
|
-
};
|
|
6353
6348
|
const handleObject = (obj, path) => {
|
|
6354
6349
|
for (const [key, value,] of Object.entries(obj)) {
|
|
6355
6350
|
const currentPath = path ? `${path}.${key}` : key;
|
|
@@ -6368,8 +6363,8 @@ const findMatches = (obj, translatePrefix, excludedKeys = [], search, translateV
|
|
|
6368
6363
|
}
|
|
6369
6364
|
};
|
|
6370
6365
|
const traverse = (current, path) => {
|
|
6371
|
-
if (current && typeof current === 'object') {
|
|
6372
|
-
|
|
6366
|
+
if (current && typeof current === 'object' && !Array.isArray(current)) {
|
|
6367
|
+
handleObject(current, path);
|
|
6373
6368
|
}
|
|
6374
6369
|
};
|
|
6375
6370
|
traverse(obj, '');
|
|
@@ -10938,6 +10933,7 @@ class KitApiTokenMaintenanceFormComponent {
|
|
|
10938
10933
|
this.kitClipboardService = inject(KitClipboardService);
|
|
10939
10934
|
this.kitNotificationService = inject(KitNotificationService);
|
|
10940
10935
|
this.translateService = inject(TranslateService);
|
|
10936
|
+
this.destroyRef = inject(DestroyRef);
|
|
10941
10937
|
this.isCreateMode = input(false, ...(ngDevMode ? [{ debugName: "isCreateMode" }] : []));
|
|
10942
10938
|
this.cardDetailsComponent = input.required(...(ngDevMode ? [{ debugName: "cardDetailsComponent" }] : []));
|
|
10943
10939
|
this.saved = output();
|
|
@@ -10958,10 +10954,11 @@ class KitApiTokenMaintenanceFormComponent {
|
|
|
10958
10954
|
this.kitSvgIcon = KitSvgIcon;
|
|
10959
10955
|
this.kitSvgIconType = KitSvgIconType;
|
|
10960
10956
|
this.kitTooltipPosition = KitTooltipPosition;
|
|
10957
|
+
this.isFormValid = signal(false, ...(ngDevMode ? [{ debugName: "isFormValid" }] : []));
|
|
10961
10958
|
effect(() => this.updateApiTokensForm());
|
|
10962
10959
|
}
|
|
10963
|
-
|
|
10964
|
-
|
|
10960
|
+
ngOnInit() {
|
|
10961
|
+
this.apiTokensForm.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.isFormValid.set(this.apiTokensForm.valid && this.apiTokensForm.dirty && !this.isSaving()));
|
|
10965
10962
|
}
|
|
10966
10963
|
save() {
|
|
10967
10964
|
const payload = {
|
|
@@ -11006,6 +11003,7 @@ class KitApiTokenMaintenanceFormComponent {
|
|
|
11006
11003
|
if (this.isCreateMode()) {
|
|
11007
11004
|
return;
|
|
11008
11005
|
}
|
|
11006
|
+
this.apiTokensForm.markAsPristine();
|
|
11009
11007
|
this.apiTokensForm.patchValue({
|
|
11010
11008
|
id: this.apiToken().data.id,
|
|
11011
11009
|
name: this.apiToken().data.name ?? '',
|
|
@@ -11102,23 +11100,17 @@ const exportedApiTokenColumns = [
|
|
|
11102
11100
|
class KitCreateApiTokenDialog extends DialogContentBase {
|
|
11103
11101
|
constructor() {
|
|
11104
11102
|
super(...arguments);
|
|
11105
|
-
this.destroyRef = inject(DestroyRef);
|
|
11106
11103
|
this.cardDetailsComponent = input.required(...(ngDevMode ? [{ debugName: "cardDetailsComponent" }] : []));
|
|
11107
|
-
this.apiTokensForm = viewChild(KitApiTokenMaintenanceFormComponent, ...(ngDevMode ? [{ debugName: "apiTokensForm" }] : []));
|
|
11108
11104
|
this.kitButtonType = KitButtonType;
|
|
11109
11105
|
this.kitButtonKind = KitButtonKind;
|
|
11110
|
-
this.saveDisabled = signal(!this.apiTokensForm()?.isFormValid(), ...(ngDevMode ? [{ debugName: "saveDisabled" }] : []));
|
|
11111
|
-
}
|
|
11112
|
-
ngOnInit() {
|
|
11113
|
-
this.apiTokensForm()?.apiTokensForm.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.saveDisabled.set(!this.apiTokensForm()?.isFormValid()));
|
|
11114
11106
|
}
|
|
11115
11107
|
onApiTokenCreate() {
|
|
11116
11108
|
this.dialog.close();
|
|
11117
11109
|
}
|
|
11118
11110
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: KitCreateApiTokenDialog, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11119
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
11111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: KitCreateApiTokenDialog, isStandalone: true, selector: "kit-create-api-token-dialog", inputs: { cardDetailsComponent: { classPropertyName: "cardDetailsComponent", publicName: "cardDetailsComponent", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
11120
11112
|
KitApiTokenMaintenanceService,
|
|
11121
|
-
],
|
|
11113
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"kit-create-api-token-dialog\">\n <kit-api-token-maintenance-form #apiTokensForm\n [isCreateMode]=\"true\"\n [cardDetailsComponent]=\"cardDetailsComponent()\"\n (saved)=\"onApiTokenCreate()\"\n ></kit-api-token-maintenance-form>\n\n <kit-dialog-actions>\n <kit-button [label]=\"'kit.apiTokenMaintenance.cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"dialog.close()\" />\n <kit-button [label]=\"'kit.apiTokenMaintenance.save' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [disabled]=\"!apiTokensForm.isFormValid()\"\n (clicked)=\"apiTokensForm.save()\" />\n </kit-dialog-actions>\n</div>\n", styles: ["::ng-deep .kit-create-api-token-dialog .k-dialog{width:100%;max-width:900px}::ng-deep .kit-create-api-token-dialog .k-dialog .k-dialog-content{padding:20px 25px}\n"], dependencies: [{ kind: "component", type: KitApiTokenMaintenanceFormComponent, selector: "kit-api-token-maintenance-form", inputs: ["isCreateMode", "cardDetailsComponent"], outputs: ["saved"] }, { kind: "component", type: KitDialogActionsComponent, selector: "kit-dialog-actions" }, { kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11122
11114
|
}
|
|
11123
11115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: KitCreateApiTokenDialog, decorators: [{
|
|
11124
11116
|
type: Component,
|
|
@@ -11129,8 +11121,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
11129
11121
|
TranslatePipe,
|
|
11130
11122
|
], providers: [
|
|
11131
11123
|
KitApiTokenMaintenanceService,
|
|
11132
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-create-api-token-dialog\">\n <kit-api-token-maintenance-form #apiTokensForm\n [isCreateMode]=\"true\"\n [cardDetailsComponent]=\"cardDetailsComponent()\"\n (saved)=\"onApiTokenCreate()\"\n ></kit-api-token-maintenance-form>\n\n <kit-dialog-actions>\n <kit-button [label]=\"'kit.apiTokenMaintenance.cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"dialog.close()\" />\n <kit-button [label]=\"'kit.apiTokenMaintenance.save' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [disabled]=\"
|
|
11133
|
-
}], propDecorators: { cardDetailsComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardDetailsComponent", required: true }] }]
|
|
11124
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-create-api-token-dialog\">\n <kit-api-token-maintenance-form #apiTokensForm\n [isCreateMode]=\"true\"\n [cardDetailsComponent]=\"cardDetailsComponent()\"\n (saved)=\"onApiTokenCreate()\"\n ></kit-api-token-maintenance-form>\n\n <kit-dialog-actions>\n <kit-button [label]=\"'kit.apiTokenMaintenance.cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"dialog.close()\" />\n <kit-button [label]=\"'kit.apiTokenMaintenance.save' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [disabled]=\"!apiTokensForm.isFormValid()\"\n (clicked)=\"apiTokensForm.save()\" />\n </kit-dialog-actions>\n</div>\n", styles: ["::ng-deep .kit-create-api-token-dialog .k-dialog{width:100%;max-width:900px}::ng-deep .kit-create-api-token-dialog .k-dialog .k-dialog-content{padding:20px 25px}\n"] }]
|
|
11125
|
+
}], propDecorators: { cardDetailsComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardDetailsComponent", required: true }] }] } });
|
|
11134
11126
|
|
|
11135
11127
|
class KitApiTokenMaintenanceListComponent {
|
|
11136
11128
|
constructor() {
|