@gilluan/ngx-figma
Version:
Angular component to render [Figma live embeds](https://help.figma.com/article/93-figma-live-embed).
81 lines (73 loc) • 3.21 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/platform-browser'), require('@angular/core')) :
typeof define === 'function' && define.amd ? define('@gilluan/ngx-figma', ['exports', '@angular/platform-browser', '@angular/core'], factory) :
(factory((global.gilluan = global.gilluan || {}, global.gilluan['ngx-figma'] = {}),global.ng.platformBrowser,global.ng.core));
}(this, (function (exports,platformBrowser,core) { 'use strict';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NgxFigmaComponent = /** @class */ (function () {
function NgxFigmaComponent(sanitizer) {
this.sanitizer = sanitizer;
this.height = '450';
this.width = '800';
}
Object.defineProperty(NgxFigmaComponent.prototype, "src", {
get: /**
* @return {?}
*/ function () {
return this.sanitizer
.bypassSecurityTrustResourceUrl("https://www.figma.com/embed?embed_host=astra&url=" + this.url);
},
enumerable: true,
configurable: true
});
NgxFigmaComponent.decorators = [
{ type: core.Component, args: [{
selector: 'ngx-figma',
template: "\n <iframe\n [height]=\"height\"\n [width]=\"width\"\n [src]=\"src\"\n allowFullScreen>\n </iframe>"
}] }
];
/** @nocollapse */
NgxFigmaComponent.ctorParameters = function () {
return [
{ type: platformBrowser.DomSanitizer }
];
};
NgxFigmaComponent.propDecorators = {
url: [{ type: core.Input }],
height: [{ type: core.Input }],
width: [{ type: core.Input }]
};
return NgxFigmaComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NgxFigmaModule = /** @class */ (function () {
function NgxFigmaModule() {
}
NgxFigmaModule.decorators = [
{ type: core.NgModule, args: [{
declarations: [NgxFigmaComponent],
imports: [],
exports: [NgxFigmaComponent]
},] }
];
return NgxFigmaModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
exports.NgxFigmaComponent = NgxFigmaComponent;
exports.NgxFigmaModule = NgxFigmaModule;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=gilluan-ngx-figma.umd.js.map