import Localization from '@zero/services/localization.js'; import createListField from '@zero/renderer/createListField.js'; let field = createListField('text'); field.onRender = (value, config) => { const hasFunc = typeof config.render === 'function'; const hasSharedIndicator = config.shared === true && config.model.appId === zero.sharedAppId; let html = hasFunc ? config.render(config.model, config) : value; if (config.localize === true) { html = Localization.localize(html, config.tokens || {}); } if (hasSharedIndicator) { //html = html + ' '; html = html + ' (shared)'; } if (config.as === 'html' || hasSharedIndicator) { return field.asHTML(html); } return html; }; export default field;