UNPKG

@formio-tmt/bootstrap

Version:

Bootstrap templates for Form.io forms

75 lines 2.99 kB
Object.defineProperty(exports, "__esModule", { value: true }); exports.default=function(ctx) { var __t, __p = '', __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } __p += '<div class="mb-2 card border">\n '; if (!ctx.component.hideLabel || ctx.builder || ctx.component.collapsible || ctx.component.tooltip) { ; __p += '\n <div class="card-header ' + ((__t = (ctx.transform('class', 'bg-' + ctx.component.theme))) == null ? '' : __t) + '"\n '; if (ctx.component.collapsible) { ; __p += '\n tabindex="0"\n '; } ; __p += '\n role="button"\n aria-expanded="' + ((__t = (ctx.component.collapsible ? !ctx.collapsed : true)) == null ? '' : __t) + '"\n aria-controls="' + ((__t = (ctx.instance.id)) == null ? '' : __t) + '-' + ((__t = (ctx.component.key)) == null ? '' : __t) + '"\n ref="header"\n >\n <span class="mb-0 card-title '; if (ctx.component.theme && ctx.component.theme !== 'default') { ; __p += 'text-light'; } ; __p += '">\n '; if (ctx.component.collapsible) { ; __p += '\n <i class=" ' + ((__t = (ctx.collapsed ? 'fa-solid fa-circle-chevron-up fa-rotate-90' : 'fa-solid fa-circle-chevron-up')) == null ? '' : __t) + ' " data-title="Collapse Panel"></i>\n '; } ; __p += '\n '; if (!ctx.component.hideLabel || ctx.builder) { ; __p += '\n <span class="' + ((__t = (ctx.component.attributes && ctx.component.attributes['titleClass'] ? ctx.component.attributes['titleClass'] : '')) == null ? '' : __t) + '"> ' + ((__t = (ctx.t(ctx.component.title, { _userInput: true }))) == null ? '' : __t) + ' </span>\n '; } ; __p += '\n '; if (ctx.component.tooltip) { ; __p += '\n <i ref="tooltip" tabindex="0" class="' + ((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) + ' text-muted" data-tooltip="' + ((__t = (ctx.component.tooltip)) == null ? '' : __t) + '"></i>\n '; } ; __p += '\n </span>\n '; if (ctx.component && ctx.component.attributes["editActionEnabled"]) { ; __p += '\n <button class="float-end icon-button m-0 p-0 text-light"><i class="fa-solid fa-pen-to-square"></i></button>\n '; } ; __p += '\n '; if (ctx.component && ctx.component.attributes["deleteActionEnabled"]) { ; __p += '\n <button class="float-end icon-button m-0 p-0 text-light"><i class="fa-solid fa-trash"></i></button>\n '; } ; __p += '\n '; if (ctx.component && ctx.component.attributes["closeActionEnabled"]) { ; __p += '\n <button class="float-end icon-button m-0 p-0 text-light"><i class="fa-regular fa-circle-xmark"></i></button>\n '; } ; __p += '\n\n </div>\n '; } ; __p += '\n '; if (!ctx.collapsed || ctx.builder) { ; __p += '\n <div class="card-body" ref="' + ((__t = (ctx.nestedKey)) == null ? '' : __t) + '" id="' + ((__t = (ctx.instance.id)) == null ? '' : __t) + '-' + ((__t = (ctx.component.key)) == null ? '' : __t) + '">\n ' + ((__t = (ctx.children)) == null ? '' : __t) + '\n </div>\n '; } ; __p += '\n</div>\n'; return __p }