@hestia-earth/ui-components 0.43.29 → 0.43.31
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.
|
@@ -227,7 +227,8 @@ var Template;
|
|
|
227
227
|
const reportIssueUrl = (repository, template, issueParams = {}) => [
|
|
228
228
|
`${gitHome}/${repository}/-/issues/new`,
|
|
229
229
|
[
|
|
230
|
-
|
|
230
|
+
// GitLab replaces the description with the template's, so a pre-filled description goes without it
|
|
231
|
+
template && !issueParams.description ? `issuable_template=${template}` : '',
|
|
231
232
|
...Object.entries(issueParams).map(([key, value]) => key && value ? `issue[${key}]=${encodeURIComponent(value)}` : null)
|
|
232
233
|
]
|
|
233
234
|
.filter(Boolean)
|
|
@@ -2523,23 +2524,24 @@ class IssueConfirmComponent {
|
|
|
2523
2524
|
this.repository = model(...(ngDevMode ? [undefined, { debugName: "repository" }] : []));
|
|
2524
2525
|
this.template = model(...(ngDevMode ? [undefined, { debugName: "template" }] : []));
|
|
2525
2526
|
this.isCommunity = model(false, ...(ngDevMode ? [{ debugName: "isCommunity" }] : []));
|
|
2527
|
+
this.issueParams = model({}, ...(ngDevMode ? [{ debugName: "issueParams" }] : []));
|
|
2526
2528
|
this.closed = output();
|
|
2527
2529
|
this.Repository = Repository;
|
|
2528
2530
|
this.Template = Template;
|
|
2529
2531
|
this.repositories = computed(() => Object.values(Repository).filter(value => value !== Repository.community || this.isCommunity()), ...(ngDevMode ? [{ debugName: "repositories" }] : []));
|
|
2530
|
-
this.issueUrl = computed(() => this.repository() && this.template() ? reportIssueUrl(this.repository(), this.template()) : null, ...(ngDevMode ? [{ debugName: "issueUrl" }] : []));
|
|
2532
|
+
this.issueUrl = computed(() => this.repository() && this.template() ? reportIssueUrl(this.repository(), this.template(), this.issueParams()) : null, ...(ngDevMode ? [{ debugName: "issueUrl" }] : []));
|
|
2531
2533
|
}
|
|
2532
2534
|
close() {
|
|
2533
2535
|
this.closed.emit();
|
|
2534
2536
|
this.activeModal?.close();
|
|
2535
2537
|
}
|
|
2536
2538
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: IssueConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2537
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: IssueConfirmComponent, isStandalone: true, selector: "he-issue-confirm", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, repository: { classPropertyName: "repository", publicName: "repository", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, isCommunity: { classPropertyName: "isCommunity", publicName: "isCommunity", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { title: "titleChange", repository: "repositoryChange", template: "templateChange", isCommunity: "isCommunityChange", closed: "closed" }, ngImport: i0, template: "<div class=\"modal is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">{{ title() }}</p>\n <button class=\"delete is-small\" aria-label=\"close\" type=\"button\" (click)=\"close()\"></button>\n </header>\n <section class=\"modal-card-body\">\n <p class=\"mb-2\">Please select the type of issue from the list below to start:</p>\n\n <div class=\"field is-horizontal my-3\">\n <div class=\"field-label is-normal\">\n <label class=\"label\" for=\"repository\">Category</label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <div class=\"control is-expanded\">\n <div class=\"select is-multiple is-fullwidth\">\n <select [(ngModel)]=\"repository\" name=\"repository\" required>\n <option [ngValue]=\"undefined\">Select from the list</option>\n @for (repo of repositories(); track repo) {\n <option [value]=\"repo\">\n @switch (repo) {\n @case (Repository.glossary) {\n Glossary of terms / lookup issues\n }\n @case (Repository.models) {\n Calculation issues\n }\n @case (Repository.aggregation) {\n Aggregated Data issues\n }\n @case (Repository.community) {\n UI/UX or API issues\n }\n @case (Repository.schema) {\n Schema issues\n }\n @default {\n Other issues\n }\n }\n </option>\n }\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n @if (repository()) {\n <div class=\"field is-horizontal my-3\">\n <div class=\"field-label is-normal\">\n <label class=\"label\" for=\"template\">Issue</label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <div class=\"control is-expanded\">\n <div class=\"select is-multiple is-fullwidth\">\n <select [(ngModel)]=\"template\" name=\"template\" required>\n <option [value]=\"undefined\">Select from the list</option>\n @for (t of Template | keyvalue; track t) {\n <option [value]=\"t.value\">\n @switch (t.value) {\n @case (Template.bug) {\n I found a bug\n }\n @case (Template.feature) {\n I would like a new feature\n }\n }\n </option>\n }\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n @if (repository() && template() && issueUrl()) {\n <p>\n <span>Please report the issue on Gitlab using</span>\n <a class=\"pl-1\" [href]=\"issueUrl()\" target=\"_blank\">this link</a>\n .\n </p>\n }\n </section>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }] }); }
|
|
2539
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: IssueConfirmComponent, isStandalone: true, selector: "he-issue-confirm", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, repository: { classPropertyName: "repository", publicName: "repository", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, isCommunity: { classPropertyName: "isCommunity", publicName: "isCommunity", isSignal: true, isRequired: false, transformFunction: null }, issueParams: { classPropertyName: "issueParams", publicName: "issueParams", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { title: "titleChange", repository: "repositoryChange", template: "templateChange", isCommunity: "isCommunityChange", issueParams: "issueParamsChange", closed: "closed" }, ngImport: i0, template: "<div class=\"modal is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">{{ title() }}</p>\n <button class=\"delete is-small\" aria-label=\"close\" type=\"button\" (click)=\"close()\"></button>\n </header>\n <section class=\"modal-card-body\">\n <p class=\"mb-2\">Please select the type of issue from the list below to start:</p>\n\n <div class=\"field is-horizontal my-3\">\n <div class=\"field-label is-normal\">\n <label class=\"label\" for=\"repository\">Category</label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <div class=\"control is-expanded\">\n <div class=\"select is-multiple is-fullwidth\">\n <select [(ngModel)]=\"repository\" name=\"repository\" required>\n <option [ngValue]=\"undefined\">Select from the list</option>\n @for (repo of repositories(); track repo) {\n <option [value]=\"repo\">\n @switch (repo) {\n @case (Repository.glossary) {\n Glossary of terms / lookup issues\n }\n @case (Repository.models) {\n Calculation issues\n }\n @case (Repository.aggregation) {\n Aggregated Data issues\n }\n @case (Repository.community) {\n UI/UX or API issues\n }\n @case (Repository.schema) {\n Schema issues\n }\n @default {\n Other issues\n }\n }\n </option>\n }\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n @if (repository()) {\n <div class=\"field is-horizontal my-3\">\n <div class=\"field-label is-normal\">\n <label class=\"label\" for=\"template\">Issue</label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <div class=\"control is-expanded\">\n <div class=\"select is-multiple is-fullwidth\">\n <select [(ngModel)]=\"template\" name=\"template\" required>\n <option [value]=\"undefined\">Select from the list</option>\n @for (t of Template | keyvalue; track t) {\n <option [value]=\"t.value\">\n @switch (t.value) {\n @case (Template.bug) {\n I found a bug\n }\n @case (Template.feature) {\n I would like a new feature\n }\n }\n </option>\n }\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n @if (repository() && template() && issueUrl()) {\n <p>\n <span>Please report the issue on Gitlab using</span>\n <a class=\"pl-1\" [href]=\"issueUrl()\" target=\"_blank\">this link</a>\n .\n </p>\n }\n </section>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }] }); }
|
|
2538
2540
|
}
|
|
2539
2541
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: IssueConfirmComponent, decorators: [{
|
|
2540
2542
|
type: Component$1,
|
|
2541
2543
|
args: [{ selector: 'he-issue-confirm', imports: [FormsModule, KeyValuePipe], template: "<div class=\"modal is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">{{ title() }}</p>\n <button class=\"delete is-small\" aria-label=\"close\" type=\"button\" (click)=\"close()\"></button>\n </header>\n <section class=\"modal-card-body\">\n <p class=\"mb-2\">Please select the type of issue from the list below to start:</p>\n\n <div class=\"field is-horizontal my-3\">\n <div class=\"field-label is-normal\">\n <label class=\"label\" for=\"repository\">Category</label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <div class=\"control is-expanded\">\n <div class=\"select is-multiple is-fullwidth\">\n <select [(ngModel)]=\"repository\" name=\"repository\" required>\n <option [ngValue]=\"undefined\">Select from the list</option>\n @for (repo of repositories(); track repo) {\n <option [value]=\"repo\">\n @switch (repo) {\n @case (Repository.glossary) {\n Glossary of terms / lookup issues\n }\n @case (Repository.models) {\n Calculation issues\n }\n @case (Repository.aggregation) {\n Aggregated Data issues\n }\n @case (Repository.community) {\n UI/UX or API issues\n }\n @case (Repository.schema) {\n Schema issues\n }\n @default {\n Other issues\n }\n }\n </option>\n }\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n @if (repository()) {\n <div class=\"field is-horizontal my-3\">\n <div class=\"field-label is-normal\">\n <label class=\"label\" for=\"template\">Issue</label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <div class=\"control is-expanded\">\n <div class=\"select is-multiple is-fullwidth\">\n <select [(ngModel)]=\"template\" name=\"template\" required>\n <option [value]=\"undefined\">Select from the list</option>\n @for (t of Template | keyvalue; track t) {\n <option [value]=\"t.value\">\n @switch (t.value) {\n @case (Template.bug) {\n I found a bug\n }\n @case (Template.feature) {\n I would like a new feature\n }\n }\n </option>\n }\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n @if (repository() && template() && issueUrl()) {\n <p>\n <span>Please report the issue on Gitlab using</span>\n <a class=\"pl-1\" [href]=\"issueUrl()\" target=\"_blank\">this link</a>\n .\n </p>\n }\n </section>\n </div>\n</div>\n" }]
|
|
2542
|
-
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }, { type: i0.Output, args: ["titleChange"] }], repository: [{ type: i0.Input, args: [{ isSignal: true, alias: "repository", required: false }] }, { type: i0.Output, args: ["repositoryChange"] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }, { type: i0.Output, args: ["templateChange"] }], isCommunity: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCommunity", required: false }] }, { type: i0.Output, args: ["isCommunityChange"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
2544
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }, { type: i0.Output, args: ["titleChange"] }], repository: [{ type: i0.Input, args: [{ isSignal: true, alias: "repository", required: false }] }, { type: i0.Output, args: ["repositoryChange"] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }, { type: i0.Output, args: ["templateChange"] }], isCommunity: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCommunity", required: false }] }, { type: i0.Output, args: ["isCommunityChange"] }], issueParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "issueParams", required: false }] }, { type: i0.Output, args: ["issueParamsChange"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
2543
2545
|
|
|
2544
2546
|
const minMaxValue = (min, max) => [isUndefined(min) ? '' : `Min: ${valueValue(min)}`, isUndefined(max) ? '' : `Max: ${valueValue(max)}`].join('; ');
|
|
2545
2547
|
class LinkKeyValueComponent {
|