UNPKG

@cuba-platform/front-generator

Version:
27 lines 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const matching = { ["BOOLEAN" /* BOOLEAN */]: "confirm" /* confirm */, ["ENTITY" /* ENTITY */]: "list" /* list */, ["VIEW" /* VIEW */]: "list" /* list */, ["STRING" /* STRING */]: "input" /* input */, ["INTEGER" /* INTEGER */]: "input" /* input */, ["OPTION" /* OPTION */]: "list" /* list */, ["MULTI_OPTION" /* MULTI_OPTION */]: "list" /* list */, ["REST_QUERY" /* REST_QUERY */]: "list" /* list */, ["REST_SERVICE_METHOD" /* REST_SERVICE_METHOD */]: "list" /* list */, ["POLYMER_COMPONENT_NAME" /* POLYMER_COMPONENT_NAME */]: "input" /* input */ }; function fromStudioProperty(prop) { return { type: matching[prop.propertyType] || "input" /* input */, name: prop.code, message: prop.caption }; } exports.fromStudioProperty = fromStudioProperty; function fromStudioProperties(props) { return props.map(prop => fromStudioProperty(prop)); } exports.fromStudioProperties = fromStudioProperties; //# sourceMappingURL=questions.js.map