infinity-forge
Version:
121 lines • 5.72 kB
JavaScript
;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Contact = Contact;
var jsx_runtime_1 = require("react/jsx-runtime");
var ui_1 = require("../../../../../../ui/index.js");
var Versions = __importStar(require("./versions/index.js"));
var S = __importStar(require("./styles.js"));
function Contact(_a) {
var _b, _c, _d, _e;
var isGlobal = _a.isGlobal, formHandler = _a.formHandler;
var VersionsElement = Versions;
var dynamicProps = {
refSection: 'ContactAtenaPages',
isGlobal: isGlobal,
templates: { VersionsElement: VersionsElement },
customForm: {
modal: {
styles: {
maxWidth: '98%',
},
},
inputs: [
[
{ name: 'jsonContent.inputName', InputComponent: 'InputSwitch', label: 'Input de nome' },
{ name: 'jsonContent.inputEmail', InputComponent: 'InputSwitch', label: 'Input de email' },
{ name: 'jsonContent.inputPhone', InputComponent: 'InputSwitch', label: 'Input de telefone' },
{ name: 'jsonContent.inputDescription', InputComponent: 'InputSwitch', label: 'Input de descrição' },
],
[
{
name: 'jsonContent.messageProviderKey',
InputComponent: 'Input',
label: 'Refêrencia do formulário no mensage provider por exemplo se no message provider o caminho estiver https://mysite.com.br/mykey então neste campo deverá ser colocado o "mykey"',
},
{ name: 'jsonContent.recaptcha', InputComponent: 'Input', label: 'Recaptcha' },
],
[
{
name: 'items',
InputComponent: 'InputManager',
inputs: [
[
{ InputComponent: 'Input', name: 'titulo', label: 'Título' },
{ InputComponent: 'Input', name: 'link', label: 'Link' },
],
[
{ InputComponent: 'InputSwitch', name: 'target', label: 'Abrir em nova aba' },
{ InputComponent: 'SelectIcon', name: 'icon', label: 'Icone' },
],
[{ InputComponent: 'InputManager', name: 'test' }],
],
},
],
],
},
fields: {
title: {},
description: {},
images: {
disable: true,
},
linkText: {
disable: true,
},
linkUrl: {
disable: true,
},
videoUrl: {
disable: true,
},
},
};
var section = (0, ui_1.useDynamicSection)(dynamicProps);
var Component = VersionsElement[((_b = section === null || section === void 0 ? void 0 : section.jsonContent) === null || _b === void 0 ? void 0 : _b.version) || 'Default'];
return ((0, jsx_runtime_1.jsx)(section.Section, { children: (0, jsx_runtime_1.jsx)(S.Contact, { id: section.ref, "$css": (_c = section === null || section === void 0 ? void 0 : section.jsonContent) === null || _c === void 0 ? void 0 : _c.css, children: (0, jsx_runtime_1.jsx)(Component, __assign({}, dynamicProps, { formHandler: __assign({ recaptcha: (_d = section === null || section === void 0 ? void 0 : section.jsonContent) === null || _d === void 0 ? void 0 : _d.recaptcha, messageProvider: { messageProviderKey: (_e = section === null || section === void 0 ? void 0 : section.jsonContent) === null || _e === void 0 ? void 0 : _e.messageProviderKey, enabled: true } }, formHandler) })) }) }));
}
//# sourceMappingURL=index.js.map