@alauda-fe/common
Version:
Alauda frontend team common codes.
37 lines • 4.6 kB
JavaScript
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
const _c0 = a0 => ({ feature: a0 });
const _c1 = () => ["/"];
function FeatureGateForbiddenComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵelementStart(1, "button", 2);
i0.ɵɵtext(2);
i0.ɵɵpipe(3, "translate");
i0.ɵɵelementEnd();
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
i0.ɵɵadvance();
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(4, _c1));
i0.ɵɵadvance();
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "back_to_product"), " ");
} }
export class FeatureGateForbiddenComponent {
static { this.ɵfac = function FeatureGateForbiddenComponent_Factory(t) { return new (t || FeatureGateForbiddenComponent)(); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FeatureGateForbiddenComponent, selectors: [["acl-feature-gate-forbidden"]], inputs: { featureName: "featureName" }, decls: 4, vars: 10, consts: [[3, "allowed", "title", "description"], [4, "aclPageGuardOperation"], ["aui-button", "primary", 3, "routerLink"]], template: function FeatureGateForbiddenComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "acl-page-guard", 0);
i0.ɵɵpipe(1, "translate");
i0.ɵɵpipe(2, "translate");
i0.ɵɵtemplate(3, FeatureGateForbiddenComponent_ng_container_3_Template, 4, 5, "ng-container", 1);
i0.ɵɵelementEnd();
} if (rf & 2) {
i0.ɵɵproperty("allowed", false)("title", i0.ɵɵpipeBind1(1, 3, "page_not_accessible"))("description", i0.ɵɵpipeBind2(2, 5, "feature_not_enabled", i0.ɵɵpureFunction1(8, _c0, ctx.featureName)));
} }, encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FeatureGateForbiddenComponent, [{
type: Component,
args: [{ selector: 'acl-feature-gate-forbidden', changeDetection: ChangeDetectionStrategy.OnPush, template: "<acl-page-guard\n [allowed]=\"false\"\n [title]=\"'page_not_accessible' | translate\"\n [description]=\"'feature_not_enabled' | translate: { feature: featureName }\"\n>\n <ng-container *aclPageGuardOperation>\n <button\n aui-button=\"primary\"\n [routerLink]=\"['/']\"\n >\n {{ 'back_to_product' | translate }}\n </button>\n </ng-container>\n</acl-page-guard>\n" }]
}], null, { featureName: [{
type: Input
}] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FeatureGateForbiddenComponent, { className: "FeatureGateForbiddenComponent" }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21tb24vc3JjL2ZlYXR1cmUtZ2F0ZS1mb3JiaWRkZW4vY29tcG9uZW50L2NvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tbW9uL3NyYy9mZWF0dXJlLWdhdGUtZm9yYmlkZGVuL2NvbXBvbmVudC90ZW1wbGF0ZS5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7OztJQ0t4RSw2QkFBcUM7SUFDbkMsaUNBR0M7SUFDQyxZQUNGOztJQUFBLGlCQUFTOzs7SUFIUCxjQUFvQjtJQUFwQix1REFBb0I7SUFFcEIsY0FDRjtJQURFLHdFQUNGOztBREpKLE1BQU0sT0FBTyw2QkFBNkI7OEZBQTdCLDZCQUE2QjtvRUFBN0IsNkJBQTZCO1lDUDFDLHlDQUlDOzs7WUFDQyxnR0FBcUM7WUFRdkMsa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