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,EAAgC78C,UAElCkD,EAAI2qB,SAAW,4DAA4DgvB,EAAgC78C,QAAQ49C,aAG/G16C,CACR,EAEA,QAA0B,KACxB25C,EAAgC78C,aAAUjC,EAC1C+8C,EAA0B96C,aAAUjC,EACpC48C,EAAe36C,QAAU09C,CAAgB,IAI3C,MAAMG,EAA2B,WAAc,IAI3C,gBAAoB/B,GAAkB,OAAS,CAAC,EAAG4B,EAAkB,CACnEx5C,IAAKk4C,MAGR,CAACA,EAAwBN,EAAkB4B,IAe9C,OAZsB,WAAc,IAC9B9B,EAIkB,gBAAoBS,EAAa/nC,SAAU,CAC7DnW,MAAOw+C,GACNkB,GAGEA,GACN,CAACxB,EAAcwB,EAA0BlB,GAE9C,CAEA,MAGMmB,EAHW,OAAW5B,GAO5B,GAHA4B,EAAQhC,iBAAmBA,EAC3BgC,EAAQ9B,YAAcE,EAAgBF,YAAcA,EAEhDR,EAAY,CACd,MAOMuC,EAPa,cAAiB,SAA2BtgD,EAAOyG,GAEpE,OAAoB,gBAAoB45C,GAAS,OAAS,CAAC,EAAGrgD,EAAO,CACnE2+C,uBAAwBl4C,IAE5B,IAKA,OAFA65C,EAAU/B,YAAcA,EACxB+B,EAAUjC,iBAAmBA,EACtB,IAAaiC,EAAWjC,EACjC,CAEA,OAAO,IAAagC,EAAShC,EAAiB,CAIlD,EAEsB,I","sources":["webpack://humanportal/./node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.js","webpack://humanportal/./node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.js","webpack://humanportal/./app/src/js/components/advanced-filter.jsx","webpack://humanportal/./app/src/js/components/http.jsx","webpack://humanportal/./app/src/js/components/notifications.js","webpack://humanportal/./app/src/js/components/messages.jsx","webpack://humanportal/./app/src/js/components/message-tray.jsx","webpack://humanportal/./app/src/js/components/app.jsx","webpack://humanportal/./app/src/js/components/http-notifier.js","webpack://humanportal/./app/src/js/components/calendar.jsx","webpack://humanportal/./app/src/js/components/chat-editor.jsx","webpack://humanportal/./app/src/js/components/chat-socket.jsx","webpack://humanportal/./app/src/js/components/colorizer.jsx","webpack://humanportal/./app/src/js/components/common.jsx","webpack://humanportal/./app/src/js/components/email-manager.jsx","webpack://humanportal/./app/src/js/components/config.jsx","webpack://humanportal/./app/src/js/components/courseinfo.jsx","webpack://humanportal/./app/src/js/components/horizontal-table.jsx","webpack://humanportal/./app/src/js/components/html-editor.jsx","webpack://humanportal/./app/src/js/components/logs.jsx","webpack://humanportal/./app/src/js/components/model.jsx","webpack://humanportal/./app/src/js/components/paginate.jsx","webpack://humanportal/./app/src/js/components/postal-code.jsx","webpack://humanportal/./app/src/js/components/reports.jsx","webpack://humanportal/./app/src/js/components/router.jsx","webpack://humanportal/./app/src/js/components/table.jsx","webpack://humanportal/./app/src/js/components/twofa.jsx","webpack://humanportal/./app/src/js/components/user-cronogram.jsx","webpack://humanportal/./app/src/js/components/userroles.jsx","webpack://humanportal/./app/src/js/components/validators.jsx","webpack://humanportal/./node_modules/react-redux/es/components/Context.js","webpack://humanportal/./node_modules/react-redux/es/components/Provider.js","webpack://humanportal/./node_modules/react-redux/es/components/connect.js"],"sourcesContent":["var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport { ScriptLoader } from '../ScriptLoader2';\nimport { getTinymce } from '../TinyMCE';\nimport { isFunction, isTextareaOrInput, mergePlugins, uuid, configHandlers, isBeforeInputEventAvailable, isInDoc, setMode } from '../Utils';\nimport { EditorPropTypes } from './EditorPropTypes';\nvar Editor = /** @class */ (function (_super) {\n __extends(Editor, _super);\n function Editor(props) {\n var _a, _b, _c;\n var _this = _super.call(this, props) || this;\n _this.rollbackTimer = undefined;\n _this.valueCursor = undefined;\n _this.rollbackChange = function () {\n var editor = _this.editor;\n var value = _this.props.value;\n if (editor && value && value !== _this.currentContent) {\n editor.undoManager.ignore(function () {\n editor.setContent(value);\n // only restore cursor on inline editors when they are focused\n // as otherwise it will cause a focus grab\n if (_this.valueCursor && (!_this.inline || editor.hasFocus())) {\n try {\n editor.selection.moveToBookmark(_this.valueCursor);\n }\n catch (e) { /* ignore */ }\n }\n });\n }\n _this.rollbackTimer = undefined;\n };\n _this.handleBeforeInput = function (_evt) {\n if (_this.props.value !== undefined && _this.props.value === _this.currentContent && _this.editor) {\n if (!_this.inline || _this.editor.hasFocus()) {\n try {\n // getBookmark throws exceptions when the editor has not been focused\n // possibly only in inline mode but I'm not taking chances\n _this.valueCursor = _this.editor.selection.getBookmark(3);\n }\n catch (e) { /* ignore */ }\n }\n }\n };\n _this.handleBeforeInputSpecial = function (evt) {\n if (evt.key === 'Enter' || evt.key === 'Backspace' || evt.key === 'Delete') {\n _this.handleBeforeInput(evt);\n }\n };\n _this.handleEditorChange = function (_evt) {\n var editor = _this.editor;\n if (editor && editor.initialized) {\n var newContent = editor.getContent();\n if (_this.props.value !== undefined && _this.props.value !== newContent && _this.props.rollback !== false) {\n // start a timer and revert to the value if not applied in time\n if (!_this.rollbackTimer) {\n _this.rollbackTimer = window.setTimeout(_this.rollbackChange, typeof _this.props.rollback === 'number' ? _this.props.rollback : 200);\n }\n }\n if (newContent !== _this.currentContent) {\n _this.currentContent = newContent;\n if (isFunction(_this.props.onEditorChange)) {\n _this.props.onEditorChange(newContent, editor);\n }\n }\n }\n };\n _this.handleEditorChangeSpecial = function (evt) {\n if (evt.key === 'Backspace' || evt.key === 'Delete') {\n _this.handleEditorChange(evt);\n }\n };\n _this.initialise = function (attempts) {\n var _a, _b, _c;\n if (attempts === void 0) { attempts = 0; }\n var target = _this.elementRef.current;\n if (!target) {\n return; // Editor has been unmounted\n }\n if (!isInDoc(target)) {\n // this is probably someone trying to help by rendering us offscreen\n // but we can't do that because the editor iframe must be in the document\n // in order to have state\n if (attempts === 0) {\n // we probably just need to wait for the current events to be processed\n setTimeout(function () { return _this.initialise(1); }, 1);\n }\n else if (attempts < 100) {\n // wait for ten seconds, polling every tenth of a second\n setTimeout(function () { return _this.initialise(attempts + 1); }, 100);\n }\n else {\n // give up, at this point it seems that more polling is unlikely to help\n throw new Error('tinymce can only be initialised when in a document');\n }\n return;\n }\n var tinymce = getTinymce(_this.view);\n if (!tinymce) {\n throw new Error('tinymce should have been loaded into global scope');\n }\n var finalInit = __assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: mergePlugins((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar, setup: function (editor) {\n _this.editor = editor;\n _this.bindHandlers({});\n // When running in inline mode the editor gets the initial value\n // from the innerHTML of the element it is initialized on.\n // However we don't want to take on the responsibility of sanitizing\n // to remove XSS in the react integration so we have a chicken and egg\n // problem... We avoid it by sneaking in a set content before the first\n // \"official\" setContent and using TinyMCE to do the sanitization.\n if (_this.inline && !isTextareaOrInput(target)) {\n editor.once('PostRender', function (_evt) {\n editor.setContent(_this.getInitialValue(), { no_events: true });\n });\n }\n if (_this.props.init && isFunction(_this.props.init.setup)) {\n _this.props.init.setup(editor);\n }\n }, init_instance_callback: function (editor) {\n var _a, _b;\n // check for changes that happened since tinymce.init() was called\n var initialValue = _this.getInitialValue();\n _this.currentContent = (_a = _this.currentContent) !== null && _a !== void 0 ? _a : editor.getContent();\n if (_this.currentContent !== initialValue) {\n _this.currentContent = initialValue;\n // same as resetContent in TinyMCE 5\n editor.setContent(initialValue);\n editor.undoManager.clear();\n editor.undoManager.add();\n editor.setDirty(false);\n }\n var disabled = (_b = _this.props.disabled) !== null && _b !== void 0 ? _b : false;\n setMode(_this.editor, disabled ? 'readonly' : 'design');\n // ensure existing init_instance_callback is called\n if (_this.props.init && isFunction(_this.props.init.init_instance_callback)) {\n _this.props.init.init_instance_callback(editor);\n }\n } });\n if (!_this.inline) {\n target.style.visibility = '';\n }\n if (isTextareaOrInput(target)) {\n target.value = _this.getInitialValue();\n }\n tinymce.init(finalInit);\n };\n _this.id = _this.props.id || uuid('tiny-react');\n _this.elementRef = React.createRef();\n _this.inline = (_c = (_a = _this.props.inline) !== null && _a !== void 0 ? _a : (_b = _this.props.init) === null || _b === void 0 ? void 0 : _b.inline) !== null && _c !== void 0 ? _c : false;\n _this.boundHandlers = {};\n return _this;\n }\n Object.defineProperty(Editor.prototype, \"view\", {\n get: function () {\n var _a, _b;\n return (_b = (_a = this.elementRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.defaultView) !== null && _b !== void 0 ? _b : window;\n },\n enumerable: false,\n configurable: true\n });\n Editor.prototype.componentDidUpdate = function (prevProps) {\n var _this = this;\n var _a, _b;\n if (this.rollbackTimer) {\n clearTimeout(this.rollbackTimer);\n this.rollbackTimer = undefined;\n }\n if (this.editor) {\n this.bindHandlers(prevProps);\n if (this.editor.initialized) {\n this.currentContent = (_a = this.currentContent) !== null && _a !== void 0 ? _a : this.editor.getContent();\n if (typeof this.props.initialValue === 'string' && this.props.initialValue !== prevProps.initialValue) {\n // same as resetContent in TinyMCE 5\n this.editor.setContent(this.props.initialValue);\n this.editor.undoManager.clear();\n this.editor.undoManager.add();\n this.editor.setDirty(false);\n }\n else if (typeof this.props.value === 'string' && this.props.value !== this.currentContent) {\n var localEditor_1 = this.editor;\n localEditor_1.undoManager.transact(function () {\n // inline editors grab focus when restoring selection\n // so we don't try to keep their selection unless they are currently focused\n var cursor;\n if (!_this.inline || localEditor_1.hasFocus()) {\n try {\n // getBookmark throws exceptions when the editor has not been focused\n // possibly only in inline mode but I'm not taking chances\n cursor = localEditor_1.selection.getBookmark(3);\n }\n catch (e) { /* ignore */ }\n }\n var valueCursor = _this.valueCursor;\n localEditor_1.setContent(_this.props.value);\n if (!_this.inline || localEditor_1.hasFocus()) {\n for (var _i = 0, _a = [cursor, valueCursor]; _i < _a.length; _i++) {\n var bookmark = _a[_i];\n if (bookmark) {\n try {\n localEditor_1.selection.moveToBookmark(bookmark);\n _this.valueCursor = bookmark;\n break;\n }\n catch (e) { /* ignore */ }\n }\n }\n }\n });\n }\n if (this.props.disabled !== prevProps.disabled) {\n var disabled = (_b = this.props.disabled) !== null && _b !== void 0 ? _b : false;\n setMode(this.editor, disabled ? 'readonly' : 'design');\n }\n }\n }\n };\n Editor.prototype.componentDidMount = function () {\n var _this = this;\n var _a, _b, _c, _d, _e;\n if (getTinymce(this.view) !== null) {\n this.initialise();\n }\n else if (Array.isArray(this.props.tinymceScriptSrc) && this.props.tinymceScriptSrc.length === 0) {\n (_b = (_a = this.props).onScriptsLoadError) === null || _b === void 0 ? void 0 : _b.call(_a, new Error('No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array.'));\n }\n else if ((_c = this.elementRef.current) === null || _c === void 0 ? void 0 : _c.ownerDocument) {\n var successHandler = function () {\n var _a, _b;\n (_b = (_a = _this.props).onScriptsLoad) === null || _b === void 0 ? void 0 : _b.call(_a);\n _this.initialise();\n };\n var errorHandler = function (err) {\n var _a, _b;\n (_b = (_a = _this.props).onScriptsLoadError) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n ScriptLoader.loadList(this.elementRef.current.ownerDocument, this.getScriptSources(), (_e = (_d = this.props.scriptLoading) === null || _d === void 0 ? void 0 : _d.delay) !== null && _e !== void 0 ? _e : 0, successHandler, errorHandler);\n }\n };\n Editor.prototype.componentWillUnmount = function () {\n var _this = this;\n var editor = this.editor;\n if (editor) {\n editor.off(this.changeEvents(), this.handleEditorChange);\n editor.off(this.beforeInputEvent(), this.handleBeforeInput);\n editor.off('keypress', this.handleEditorChangeSpecial);\n editor.off('keydown', this.handleBeforeInputSpecial);\n editor.off('NewBlock', this.handleEditorChange);\n Object.keys(this.boundHandlers).forEach(function (eventName) {\n editor.off(eventName, _this.boundHandlers[eventName]);\n });\n this.boundHandlers = {};\n editor.remove();\n this.editor = undefined;\n }\n };\n Editor.prototype.render = function () {\n return this.inline ? this.renderInline() : this.renderIframe();\n };\n Editor.prototype.changeEvents = function () {\n var _a, _b, _c;\n var isIE = (_c = (_b = (_a = getTinymce(this.view)) === null || _a === void 0 ? void 0 : _a.Env) === null || _b === void 0 ? void 0 : _b.browser) === null || _c === void 0 ? void 0 : _c.isIE();\n return (isIE\n ? 'change keyup compositionend setcontent CommentChange'\n : 'change input compositionend setcontent CommentChange');\n };\n Editor.prototype.beforeInputEvent = function () {\n return isBeforeInputEventAvailable() ? 'beforeinput SelectionChange' : 'SelectionChange';\n };\n Editor.prototype.renderInline = function () {\n var _a = this.props.tagName, tagName = _a === void 0 ? 'div' : _a;\n return React.createElement(tagName, {\n ref: this.elementRef,\n id: this.id\n });\n };\n Editor.prototype.renderIframe = function () {\n return React.createElement('textarea', {\n ref: this.elementRef,\n style: { visibility: 'hidden' },\n name: this.props.textareaName,\n id: this.id\n });\n };\n Editor.prototype.getScriptSources = function () {\n var _a, _b;\n var async = (_a = this.props.scriptLoading) === null || _a === void 0 ? void 0 : _a.async;\n var defer = (_b = this.props.scriptLoading) === null || _b === void 0 ? void 0 : _b.defer;\n if (this.props.tinymceScriptSrc !== undefined) {\n if (typeof this.props.tinymceScriptSrc === 'string') {\n return [{ src: this.props.tinymceScriptSrc, async: async, defer: defer }];\n }\n // multiple scripts can be specified which allows for hybrid mode\n return this.props.tinymceScriptSrc.map(function (item) {\n if (typeof item === 'string') {\n // async does not make sense for multiple items unless\n // they are not dependent (which will be unlikely)\n return { src: item, async: async, defer: defer };\n }\n else {\n return item;\n }\n });\n }\n // fallback to the cloud when the tinymceScriptSrc is not specified\n var channel = this.props.cloudChannel;\n var apiKey = this.props.apiKey ? this.props.apiKey : 'no-api-key';\n var cloudTinyJs = \"https://cdn.tiny.cloud/1/\".concat(apiKey, \"/tinymce/\").concat(channel, \"/tinymce.min.js\");\n return [{ src: cloudTinyJs, async: async, defer: defer }];\n };\n Editor.prototype.getInitialValue = function () {\n if (typeof this.props.initialValue === 'string') {\n return this.props.initialValue;\n }\n else if (typeof this.props.value === 'string') {\n return this.props.value;\n }\n else {\n return '';\n }\n };\n Editor.prototype.bindHandlers = function (prevProps) {\n var _this = this;\n if (this.editor !== undefined) {\n // typescript chokes trying to understand the type of the lookup function\n configHandlers(this.editor, prevProps, this.props, this.boundHandlers, function (key) { return _this.props[key]; });\n // check if we should monitor editor changes\n var isValueControlled = function (p) { return p.onEditorChange !== undefined || p.value !== undefined; };\n var wasControlled = isValueControlled(prevProps);\n var nowControlled = isValueControlled(this.props);\n if (!wasControlled && nowControlled) {\n this.editor.on(this.changeEvents(), this.handleEditorChange);\n this.editor.on(this.beforeInputEvent(), this.handleBeforeInput);\n this.editor.on('keydown', this.handleBeforeInputSpecial);\n this.editor.on('keyup', this.handleEditorChangeSpecial);\n this.editor.on('NewBlock', this.handleEditorChange);\n }\n else if (wasControlled && !nowControlled) {\n this.editor.off(this.changeEvents(), this.handleEditorChange);\n this.editor.off(this.beforeInputEvent(), this.handleBeforeInput);\n this.editor.off('keydown', this.handleBeforeInputSpecial);\n this.editor.off('keyup', this.handleEditorChangeSpecial);\n this.editor.off('NewBlock', this.handleEditorChange);\n }\n }\n };\n Editor.propTypes = EditorPropTypes;\n Editor.defaultProps = {\n cloudChannel: '6'\n };\n return Editor;\n}(React.Component));\nexport { Editor };\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as PropTypes from 'prop-types';\nexport var eventPropTypes = {\n onActivate: PropTypes.func,\n onAddUndo: PropTypes.func,\n onBeforeAddUndo: PropTypes.func,\n onBeforeExecCommand: PropTypes.func,\n onBeforeGetContent: PropTypes.func,\n onBeforeRenderUI: PropTypes.func,\n onBeforeSetContent: PropTypes.func,\n onBeforePaste: PropTypes.func,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onClearUndos: PropTypes.func,\n onClick: PropTypes.func,\n onContextMenu: PropTypes.func,\n onCommentChange: PropTypes.func,\n onCopy: PropTypes.func,\n onCut: PropTypes.func,\n onDblclick: PropTypes.func,\n onDeactivate: PropTypes.func,\n onDirty: PropTypes.func,\n onDrag: PropTypes.func,\n onDragDrop: PropTypes.func,\n onDragEnd: PropTypes.func,\n onDragGesture: PropTypes.func,\n onDragOver: PropTypes.func,\n onDrop: PropTypes.func,\n onExecCommand: PropTypes.func,\n onFocus: PropTypes.func,\n onFocusIn: PropTypes.func,\n onFocusOut: PropTypes.func,\n onGetContent: PropTypes.func,\n onHide: PropTypes.func,\n onInit: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyPress: PropTypes.func,\n onKeyUp: PropTypes.func,\n onLoadContent: PropTypes.func,\n onMouseDown: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseMove: PropTypes.func,\n onMouseOut: PropTypes.func,\n onMouseOver: PropTypes.func,\n onMouseUp: PropTypes.func,\n onNodeChange: PropTypes.func,\n onObjectResizeStart: PropTypes.func,\n onObjectResized: PropTypes.func,\n onObjectSelected: PropTypes.func,\n onPaste: PropTypes.func,\n onPostProcess: PropTypes.func,\n onPostRender: PropTypes.func,\n onPreProcess: PropTypes.func,\n onProgressState: PropTypes.func,\n onRedo: PropTypes.func,\n onRemove: PropTypes.func,\n onReset: PropTypes.func,\n onSaveContent: PropTypes.func,\n onSelectionChange: PropTypes.func,\n onSetAttrib: PropTypes.func,\n onSetContent: PropTypes.func,\n onShow: PropTypes.func,\n onSubmit: PropTypes.func,\n onUndo: PropTypes.func,\n onVisualAid: PropTypes.func,\n onSkinLoadError: PropTypes.func,\n onThemeLoadError: PropTypes.func,\n onModelLoadError: PropTypes.func,\n onPluginLoadError: PropTypes.func,\n onIconsLoadError: PropTypes.func,\n onLanguageLoadError: PropTypes.func,\n onScriptsLoad: PropTypes.func,\n onScriptsLoadError: PropTypes.func,\n};\nexport var EditorPropTypes = __assign({ apiKey: PropTypes.string, id: PropTypes.string, inline: PropTypes.bool, init: PropTypes.object, initialValue: PropTypes.string, onEditorChange: PropTypes.func, value: PropTypes.string, tagName: PropTypes.string, cloudChannel: PropTypes.string, plugins: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), toolbar: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), disabled: PropTypes.bool, textareaName: PropTypes.string, tinymceScriptSrc: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.arrayOf(PropTypes.shape({\n src: PropTypes.string,\n async: PropTypes.bool,\n defer: PropTypes.bool\n }))\n ]), rollback: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf([false])]), scriptLoading: PropTypes.shape({\n async: PropTypes.bool,\n defer: PropTypes.bool,\n delay: PropTypes.number\n }) }, eventPropTypes);\n","import React from 'react'\nimport { Input, Select, Switch } from 'components/common'\n\n\nconst editors = {\n\tselect: (model, name, onValuedChanged, filter) => <Select options={hp.store.products} model={model} name={name} {...filter.params || null} onChange={onValuedChanged} />,\n\tdate: (model, name, onValuedChanged, filter) => <Input type=\"date\" model={model} name={name} {...filter.params || null} onBlur={onValuedChanged} />,\n\tbool: (model, name, onValuedChanged, filter) => <Switch model={model} name={name} {...filter.params || null} onChange={onValuedChanged} />\n}\n\nexport default class AdvancedFilter extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.state = {\n\t\t\tfilterString: null,\n\t\t\tfilters: [],\n\t\t\tselected: 0\n\t\t}\n\t}\n\n\tstatic getDerivedStateFromProps(props, state) {\n\t\tif (state.filterString == props.filter) {\n\t\t\treturn null;\n\t\t}\n\t\tconst filters = props.filter ? JSON.parse(props.filter) : []\n\t\tlet current = state.current || props.current\n\t\tlet selected = props.selected || (current ? current.name : null)\n\t\tlet selected_index = 0;\n\n\t\tif (selected) {\n\t\t\t// reposicionar o current\n\t\t\tfor (let i in filters) {\n\t\t\t\tif (filters[i].name == selected) {\n\t\t\t\t\tcurrent = filters[i]\n\t\t\t\t\tselected_index = parseInt(i) + 1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfilters.unshift({\n\t\t\tname: '(novo filtro)',\n\t\t\t_isnew: true,\n\t\t\tfilter: []\n\t\t})\n\t\treturn {\n\t\t\tfilterString: props.filter || '',\n\t\t\tfilters: filters,\n\t\t\tcurrent: current || filters[0],\n\t\t\tselected: selected_index\n\t\t}\n\t}\n\n\tonChangeFilter = (e) => {\n\t\tconst filter = this.state.filters[e.currentTarget.value]\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tcurrent: filter,\n\t\t\t\tselected: e.currentTarget.value\n\t\t\t}, () => {\n\t\t\t\tif (this.props.autoApply === undefined || this.props.autoApply === true) {\n\t\t\t\t\tthis.onApply()\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\t}\n\n\tonChangeField(name, filter) {\n\t\tthis.state.current.filter.push({\n\t\t\tname: name,\n\t\t\tvalue: null\n\t\t})\n\t\tthis.forceUpdate()\n\t}\n\n\tformatCurrent() {\n\t\tconst {current} = this.state\n\t\tconst {models} = this.props\n\n\t\t// percorrer todos os filtros e limpar os que não têm valor definido\n\t\tfor (let i = current.filter.length - 1; i >= 0; i -= 1) {\n\t\t\tconst f = current.filter[i]\n\t\t\tif (f.value === null && (!models.hasOwnProperty(f.name) || models[f.name].type != 'bool')) {\n\t\t\t\tcurrent.filter.splice(i, 1)\n\t\t\t}\n\t\t}\n\t}\n\n\tonSave = () => {\n\t\tconst {name} = this.props\n\t\tconst {filters} = this.state\n\n\t\tif (!name) {\n\t\t\talert('nome para este filtro avançado não definido!')\n\t\t\treturn\n\t\t}\n\t\tthis.formatCurrent()\n\t\t// verificar se primeiro filtro está vazio\n\t\tif (filters.length > 0 && filters[0]._isnew && filters[0].filter.length > 0) {\n\t\t\t// renomear o filtro\n\t\t\tlet _name = prompt('Indique nome para o novo filtro', filters[0].name)\n\t\t\tif (_name == null) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tfilters[0].name =_name\n\t\t\tfilters[0]._isnew = false\n\t\t}\n\t\tconst filter_string = JSON.stringify(filters)\n\t\thttp.post('dynamicfilters/saveAdv.json', {\n\t\t\tname: name,\n\t\t\tfilter: filter_string\n\t\t}, (response, status) => {\n\t\t\tif (status && this.props.onAfterSave) {\n\t\t\t\tthis.props.onAfterSave(response.filter)\n\t\t\t}\n\t\t})\n\t}\n\n\tonApply = () => {\n\t\tthis.formatCurrent();\n\t\tconst {filters, filterString, current} = this.state\n\t\tconst filter_string = JSON.stringify(filters)\n\n\t\tif (filterString !== filter_string) {\n\t\t\tthis.forceUpdate()\n\t\t}\n\t\tif (this.props.onApply) {\n\t\t\tthis.props.onApply(current)\n\t\t}\n\t}\n\n\tonClear = () => {\n\t\tif (this.props.onApply) {\n\t\t\tthis.props.onApply(null)\n\t\t}\n\t}\n\n\tonRemove(index) {\n\t\tthis.state.current.filter.splice(index, 1);\n\t\tif (this.props.autoApply === undefined || this.props.autoApply === true) {\n\t\t\tthis.onApply()\n\t\t}\n\t\telse {\n\t\t\tthis.forceUpdate()\n\t\t}\n\t}\n\n\tonRemoveCurrent = () => {\n\t\tconst {current, filters} = this.state\n\n\t\tfor (let i in filters) {\n\t\t\tif (filters[i] === current) {\n\t\t\t\tfilters.splice(i, 1);\n\t\t\t\tlet selected = i < filters.length ? i : (i == 0 ? 0 : (i - 1))\n\t\t\t\tthis.setState({\n\t\t\t\t\tselected: selected,\n\t\t\t\t\tcurrent: filters.length > 0 ? filters[selected] : {name: '(novo filtro)', filter: []}\n\t\t\t\t})\n\t\t\t\tif (this.props.autoApply === undefined || this.props.autoApply === true) {\n\t\t\t\t\tthis.onApply()\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\tonValuedChanged = (e) => {\n\t\tif (this.props.autoApply === undefined || this.props.autoApply === true) {\n\t\t\tthis.onApply()\n\t\t}\n\t\telse {\n\t\t\tthis.forceUpdate()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {current, selected, filters} = this.state\n\t\tconst {models} = this.props\n\t\tconst _options = filters.map((filter, i) =>\n\t\t\t<option key={i} value={i}>{filter.name}</option>\n\t\t)\n\t\tconst filter_fields = Object.keys(models).map(name => {\n\t\t\tconst model = models[name];\n\t\t\treturn (\n\t\t\t\t<li key={name}><a onClick={this.onChangeField.bind(this, name, model)}>{model.label}</a></li>\n\t\t\t)\n\t\t})\n\t\tconst btn_add =\n\t\t\t<div className=\"btn-group\">\n\t\t\t\t<button className=\"btn dropdown-toggle btn-transparent btn-circular\" data-toggle=\"dropdown\" aria-haspopup=\"true\">\n\t\t\t\t\t<em className=\"la la-plus\" />\n\t\t\t\t</button>\n\t\t\t\t<ul className=\"dropdown-menu\">{filter_fields}</ul>\n\t\t\t</div>\n\t\tconst last_idx = current.filter.length - 1\n\t\tconst _fields = current.filter.map((filter, i) => {\n\t\t\tconst model = models[filter.name]\n\t\t\treturn (\n\t\t\t\t<div key={i} className=\"adv-filter\">\n\t\t\t\t\t<div className=\"label\">{model.label}</div>\n\t\t\t\t\t<div className=\"editor\">\n\t\t\t\t\t\t{editors[model.type](filter, 'value', this.onValuedChanged, model)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<button className=\"btn btn-transparent btn-xs btn-circular-xs\" onClick={this.onRemove.bind(this, i)}>\n\t\t\t\t\t\t<em className=\"la la-times\" />\n\t\t\t\t\t</button>\n\t\t\t\t\t{i === last_idx ? btn_add : null}\n\t\t\t\t</div>\n\t\t\t)\n\t\t})\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<div className=\"adv-filter\">\n\t\t\t\t\t<select className=\"form-control\" onChange={this.onChangeFilter} value={selected}>{_options}</select>\n\t\t\t\t\t<div className=\"btn-group\">\n\t\t\t\t\t\t<button className=\"btn btn-default btn-circular\" title=\"Limpar filtro\" onClick={this.onClear}>\n\t\t\t\t\t\t\t<em className=\"la la-eraser\"></em>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t{this.props.autoApply === false\n\t\t\t\t\t ? <div className=\"btn-group\">\n\t\t\t\t\t\t<button className=\"btn btn-default btn-circular\" title=\"Aplicar\" onClick={this.onApply}>\n\t\t\t\t\t\t\t<em className=\"la la-filter\"></em>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t </div>\n\t\t\t\t\t : null\n\t\t\t\t\t}\n\t\t\t\t\t{current.filter.length === 0 ? null :\n\t\t\t\t\t\t<div className=\"btn-group\">\n\t\t\t\t\t\t\t<button className=\"btn btn-default btn-circular\" title=\"Eliminar filtro atual\" onClick={this.onRemoveCurrent}>\n\t\t\t\t\t\t\t\t<em className=\"la la-trash\"></em>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>}\n\t\t\t\t\t<div className=\"btn-group\">\n\t\t\t\t\t\t<button className=\"btn btn-default btn-circular\" title=\"Gravar filtro\" onClick={this.onSave}>\n\t\t\t\t\t\t\t<em className=\"la la-save\"></em>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t{current.filter.length === 0 ? btn_add : null}\n\t\t\t\t</div>\n\t\t\t\t{_fields}\n\t\t\t</div>\n\t\t)\n\t}\n}\n","import React from 'react'\n\nexport default class Http {\n\tstatic get def() {\n\t\treturn { value: '', label: '(' + trans.get('attrs/not_defined') + ')' };\n\t}\n\n\tstatic open(url, params, then) {\n\t\tlet el_parent = null;\n\t\tlet el_overlay = null;\n\t\tconst onerror = (e) => {\n\t\t\tif (el_overlay && el_parent && el_parent.contains(el_overlay)) {\n\t\t\t\tel_parent.removeChild(el_overlay);\n\t\t\t}\n\t\t\talert('Não foi possÃvel efetuar este pedido. Poderá ter perdido a ligação. Tente mais tarde.');\n\t\t}\n\n\t\tif (params instanceof Function) {\n\t\t\tvar aux = then;\n\t\t\tthen = params;\n\t\t\tparams = aux || {};\n\t\t}\n\t\telse if (params == undefined) {\n\t\t\tparams = {};\n\t\t}\n\t\tconst type = params.type || 'get';\n\t\t//var sync = params.sync || false;\n\t\tconst req = new XMLHttpRequest();\n\t\t// se url é relativo e nao tem /\n\t\tif (!url.match(/^[a-z]+:\\/\\/|^\\//i)) {\n\t\t\turl = '/' + url;\n\t\t}\n\t\treq.onload = () => {\n\t\t\tif (el_overlay && el_parent && el_parent.contains(el_overlay)) {\n\t\t\t\tel_parent.removeChild(el_overlay);\n\t\t\t}\n\t\t\tif (req.readyState != 4 || req.status != 200) {\n\t\t\t\thttpNotifier.unregister();\n\t\t\t\t//console.error(req);\n\t\t\t\tmbox.error(req.responseURL, req.statusText);\n\t\t\t\tif (params.error) {\n\t\t\t\t\tparams.error(req);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet response = null;\n\n\t\t\ttry {\n\t\t\t\tresponse = req.response ? JSON.parse(req.response) : {};\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tconst showResponse = () => {\n\t\t\t\t\tmbox.modal(<div dangerouslySetInnerHTML={{__html: req.response}} />, {\n\t\t\t\t\t\ttitle: __('attrs_reply')\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tif (hp.store.env === 'dev') {\n\t\t\t\t\tconsole.log(req.response);\n\t\t\t\t\tshowResponse();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmbox.show(__('errors_unknown_io_error'), __('errors_notice'), 'exclamation', [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\ttext: __('errors_response'),\n\t\t\t\t\t\t\ticon: 'exclamation',\n\t\t\t\t\t\t\tonClick: showResponse\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'close'\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (response.xupdte) { // se aplicacao em atualizacao\n\t\t\t\twindow.location.reload();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (response.xpired) {\n\t\t\t\t//session.logout();\n\t\t\t\thttpNotifier.unregister();\n\t\t\t\tmessages.register(response.messages);\n\t\t\t\t//Router.go('/login/index', true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t/*else {\n\t\t\t\tsession.touch();\n\t\t\t}\n\t\t\tif (session.isActive()) {\n\t\t\t\tmessages.clear(false);\n\t\t\t}*/\n\t\t\tif (response.msg || response.war || response.err || response.inf) {\n\t\t\t\tconst msgs =\n\t\t\t\t\t[].concat(\n\t\t\t\t\t\t(response.msg || []).map(m => ({ msg: m, type: 'success' })),\n\t\t\t\t\t\t(response.inf || []).map(m => ({ msg: m, type: 'info' })),\n\t\t\t\t\t\t(response.war || []).map(m => ({ msg: m, type: 'warning' })),\n\t\t\t\t\t\t(response.err || []).map(m => ({ msg: m, type: 'danger' }))\n\t\t\t\t\t);\n\t\t\t\tlet has_only_success_msg = response.success != false;\n\t\t\t\tif (response.success == undefined) {\n\t\t\t\t\tresponse.success = true;\n\t\t\t\t\tfor (let msg of msgs) {\n\t\t\t\t\t\tif (!msg.type) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (msg.type == 'danger' || msg.type == 'warning') {\n\t\t\t\t\t\t\tresponse.success = false;\n\t\t\t\t\t\t\thas_only_success_msg = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (msg.type == 'info') {\n\t\t\t\t\t\t\thas_only_success_msg = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (has_only_success_msg) {\n\t\t\t\t\tmessages.raiseEvents();\n\t\t\t\t\tnotifications.set(msgs);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmessages.set(msgs);\n\t\t\t\t}\n\t\t\t\tdelete response.msg;\n\t\t\t\tdelete response.war;\n\t\t\t\tdelete response.err;\n\t\t\t}\n\t\t\tif (response.store) {\n\t\t\t\tObject.assign(hp.store, response.store);\n\t\t\t\tdelete response.store;\n\t\t\t}\n\t\t\t/*\n\t\t\tif (response.debug) {\n\t\t\t\tlet dbg = response.debug;\n\n\t\t\t\tdelete response.debug;\n\t\t\t\t// nao se pode atribuir logo debug.set porque podemos estar num render\n\t\t\t\t// e isso poderia causar outro render do Debug\n\t\t\t\tsetTimeout(() => { debug.set(url, dbg); }, 0);\n\t\t\t}\n\t\t\t*/\n\t\t\tlet success = response.success || response.success == undefined;\n\t\t\tdelete response.success;\n\n\t\t\tif (params.def && Array.isArray(response)) {\n\t\t\t\tresponse.unshift(typeof params.def == 'object' ? params.def : Http.def);\n\t\t\t}\n\t\t\tif (then) {\n\t\t\t\tthen(response, success);\n\t\t\t}\n\t\t\thttpNotifier.unregister();\n\t\t}\n\t\treq.onerror = onerror\n\n\t\tlet data = params.data || null;\n\t\tlet content_type = null;\n\n\t\tif (params.data) {\n\t\t\tif (type == 'get') {\n\t\t\t\turl += (url.indexOf('?') < 0 ? '?' : '&') + Object.toParam(params.data);\n\t\t\t\tcontent_type = 'application/x-www-form-urlencoded';\n\t\t\t}\n\t\t\telse if (!(data instanceof FormData)) {\n\t\t\t\tcontent_type = 'application/x-www-form-urlencoded';\n\t\t\t\tdata = 'json=' + encodeURIComponent(JSON.stringify(params.data));\n\t\t\t}\n\t\t}\n\t\tif (!params.silent) {\n\t\t\tconst el_loading = document.createElement('div');\n\n\t\t\tel_loading.setAttribute('class', 'loading');\n\t\t\t//el_loading.setAttribute('style', 'height: 100%');\n\t\t\tel_loading.appendChild(document.createElement('div'));\n\n\t\t\t// mostra o loader durante o processamento\n\t\t\tel_overlay = document.createElement('div');\n\t\t\tel_overlay.setAttribute('class', 'ui-widget-overlay http-overlay');\n\t\t\tel_overlay.appendChild(el_loading);\n\t\t\tel_parent = document.getElementById('loader') || document.body;\n\t\t\tel_parent.appendChild(el_overlay);\n\t\t}\n\t\telse {\n\t\t\tdelete params.silent;\n\t\t}\n\t\treq.open(type, url, params.async === undefined ? true : params.async);\n\t\tif (content_type) {\n\t\t\treq.setRequestHeader('Content-Type', content_type);\n\t\t}\n\t\treq.setRequestHeader('HTTP_X_REQUESTED_WITH', 'xmlhttprequest');\n\t\treq.send(data);\n\t\thttpNotifier.register();\n\t}\n\n\tstatic get(url, params, then) {\n\t\tif (params == undefined) {\n\t\t\tparams = {};\n\t\t}\n\t\telse if (params && !params.data) {\n\t\t\tparams = { data: params };\n\t\t\t['dataType', 'async', 'type', 'silent'].forEach(def => {\n\t\t\t\tif (params.data[def] !== undefined) {\n\t\t\t\t\tparams[def] = params.data[def];\n\t\t\t\t\tdelete params.data[def];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tparams.type = 'get';\n\t\tHttp.open(url, params, then);\n\t}\n\n\tstatic post(url, params, then) {\n\t\tif (params == undefined) {\n\t\t\tparams = {};\n\t\t}\n\t\telse if (params && !params.data) {\n\t\t\tparams = { data: params };\n\t\t\t['dataType', 'async', 'type', 'silent'].forEach(def => {\n\t\t\t\tif (params.data[def] !== undefined) {\n\t\t\t\t\tparams[def] = params.data[def];\n\t\t\t\t\tdelete params.data[def];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tparams.type = 'post';\n\t\tHttp.open(url, params, then);\n\t}\n}\n","export default class Notifications {\n\tconstructor(timeout = 10000) {\n\t\tthis.timeout = timeout;\n\t\tthis.msgs = [];\n\t\tthis.handlers = {};\n\t}\n\n\tget(i) {\n\t\treturn this.msgs[i];\n\t}\n\n\t// mensagens registadas para o proximo Messages (React)\n\tregister(msgs) {\n\t\tthis.msgs_reg = msgs;\n\t}\n\n\tflush() {\n\t\tif (this.msgs_reg) {\n\t\t\tthis.set(this.msgs_reg);\n\t\t\tthis.msgs_reg = undefined;\n\t\t}\n\t\treturn this.msgs;\n\t}\n\n\tset(msgs) {\n\t\tthis.msgs = msgs;\n\t\tthis.raiseEvents();\n\t\tfor (let i = 0, l = msgs.length; i < l; i ++) {\n\t\t\tthis.setTimeout(msgs[i]);\n\t\t}\n\t}\n\n\tadd(m) {\n\t\tthis.msgs.push(m);\n\t\tthis.raiseEvents();\n\t\tthis.setTimeout(m);\n\t}\n\n\tsetTimeout(msg) {\n\t\tconst _msg = typeof msg.msg === 'string' ? msg : msg.msg;\n\n\t\tif (_msg.timeout === undefined || _msg.timeout > 0) {\n\t\t\tmsg.handlerTimeout = setTimeout( () => {\n\t\t\t\t\tthis.remove(msg);\n\t\t\t\t},\n\t\t\t\t_msg.timeout || this.timeout\n\t\t\t);\n\t\t}\n\t}\n\n\tremove(msg, contains = false) {\n\t\tfor (let i in this.msgs) {\n\t\t\tif (this.msgs[i] === msg || (contains && this.msgs[i].msg.indexOf(msg) >= 0)) {\n\t\t\t\tif (this.msgs[i].handlerTimeout) {\n\t\t\t\t\tclearTimeout(this.msgs[i].handlerTimeout);\n\t\t\t\t}\n\t\t\t\tthis.msgs.splice(i, 1);\n\t\t\t\tthis.raiseEvents();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tclear(raiseEvents = true) {\n\t\tthis.msgs = [];\n\t\tif (raiseEvents) {\n\t\t\tthis.raiseEvents();\n\t\t}\n\t}\n\n\taddHandler(handler) {\n\t\tlet idx = Object.keys(this.handlers).length;\n\n\t\tthis.handlers[idx] = handler;\n\t\treturn idx;\n\t}\n\n\tremoveHandler(handlerIdx) {\n\t\tif (this.handlers.hasOwnProperty(handlerIdx)) {\n\t\t\tdelete this.handlers[handlerIdx];\n\t\t}\n\t}\n\n\traiseEvents() {\n\t\tfor (let i in this.handlers) {\n\t\t\tthis.handlers[i](this.msgs);\n\t\t}\n\t}\n}\n","import React from 'react'\n\nexport default class Messages extends React.Component {\n\tonChangeMessages = (msgs) => {\n\t\tthis.forceUpdate();\n\t}\n\n\tcomponentDidMount() {\n\t\tmessages.flush();\n\t\tthis.handlerChange = messages.addHandler(this.onChangeMessages);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tmessages.removeHandler(this.handlerChange);\n\t}\n\n\trender() {\n\t\tconst msgs = messages.msgs.map(( msg, i ) => {\n\t\t\tconst cn = 'alert alert-' + (!msg.type ? 'success' : msg.type);\n\t\t\tconst _msg = typeof msg.msg === 'string' ? msg : msg.msg;\n\n\t\t\treturn (\n\t\t\t\t<div className={cn} key={i}>\n\t\t\t\t\t<button className=\"close\" title={__('attrs_close')} onClick={() => { messages.remove(msg); }}>\n\t\t\t\t\t\t<em className=\"la la-times\" />\n\t\t\t\t\t</button>\n\t\t\t\t\t<span dangerouslySetInnerHTML={{__html: _msg.msg}} title={_msg.title || null} />\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\t\treturn(\n\t\t\t<div className=\"messages\">{msgs}</div>\n\t\t);\n\t}\n}\n","import React from 'react'\n\nexport default class MessageTray extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tnotifications.flush();\n\t\tthis.handlerChange = notifications.addHandler(this.onChangeMessages.bind(this));\n\t}\n\n\tonChangeMessages(msgs) {\n\t\tthis.forceUpdate();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tnotifications.removeHandler(this.handlerChange);\n\t}\n\n\tonClose() {\n\t\tnotifications.clear();\n\t}\n\n\trender() {\n\t\tif (notifications.msgs.length == 0) {\n\t\t\treturn null;\n\t\t}\n\t\tconst msgs = notifications.msgs.map( ( msg, i ) =>\n\t\t\t<span key={i} dangerouslySetInnerHTML={ (() => { return {__html: msg.msg} })() } title={msg.title || null} />\n\t\t);\n\n\t\treturn (\n\t\t\t<div className='msg-tray'>\n\t\t\t\t<div className='inner'>\n\t\t\t\t\t<em className='la la-check' />\n\t\t\t\t\t<span className='content'>{msgs}</span>\n\t\t\t\t\t<a className=\"close\" title={trans.get('attrs_close')} onClick={this.onClose.bind(this)}>\n\t\t\t\t\t\t<span className=\"la la-close\"/>\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import React from 'react'\nimport { createRoot } from 'react-dom/client'\nimport { Provider } from 'react-redux'\nimport { HashRouter } from 'react-router-dom'\nimport PropTypes from 'prop-types'\nimport HttpNotifier from './http-notifier'\nimport Http from './http'\nimport Notifications from './notifications'\nimport Messages from './messages'\nimport MessageTray from './message-tray'\n//import Router from './router'\n\n\nexport const Permission = (prms) => {\n\treturn {\n\t\thas: (prm) => (prms & prm) === prm,\n\t\tread: () => (prms & 1) === 1,\n\t\tedit: () => (prms & 2) === 2,\n\t\tdelete: () => (prms & 4) === 4\n\t}\n}\n\n// devolve novo objeto apenas com as primitivas\nObject.flat = obj => {\n\tlet data = {};\n\n\tObject.keys(obj).forEach(k => {\n\t\tif (!(obj[k] instanceof Object)) {\n\t\t\tdata[k] = obj[k];\n\t\t}\n\t});\n\treturn data;\n}\n\nwindow.httpNotifier = window.httpNotifier || new HttpNotifier();\nwindow.http = Http;\nwindow.messages = window.messages || new Notifications();\nwindow.notifications = window.notifications || new Notifications(8000);\n\nexport const App = props => (\n\t<>\n\t\t<Messages />\n\t\t<Provider store={props.store}>\n\t\t\t<HashRouter>{props.children}</HashRouter>\n\t\t</Provider>\n\t\t<MessageTray />\n\t</>\n)\nApp.propTypes = {\n\tstore: PropTypes.object.isRequired\n}\n\nexport const SimpleApp = props => (\n\t<div>\n\t\t<Messages />\n\t\t{props.children}\n\t\t<MessageTray />\n\t</div>\n)\n\nconst renderRoute = (routes, el) => {\n\tlet appelem = null\n\n\tif (Array.isArray(el)) {\n\t\tfor (let e of el) {\n\t\t\tif ((appelem = document.getElementById(e)) != null) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\tappelem = document.getElementById(el)\n\t}\n\tif (appelem) {\n\t\tconst root = createRoot(appelem)\n\t\tif (routes instanceof Function) {\n\t\t\troot.render(routes())\n\t\t\treturn true;\n\t\t}\n\t\tif (routes.hasOwnProperty(hp.store.route)) {\n\t\t\tconst route = routes[hp.store.route] instanceof Function\n\t\t\t\t? routes[hp.store.route]()\n\t\t\t\t: routes[hp.store.route]\n\t\t\troot.render(route)\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport const startup = (routes, el = 'app') => {\n\tif (!renderRoute(routes, el)) {\n\t\tdocument.addEventListener(\"DOMContentLoaded\", () => {\n\t\t\trenderRoute(routes, el)\n\t\t})\n\t}\n}\n","export default class HttpNotifier {\n\tconstructor() {\n\t\t// total de requests ao mesmo tempo\n\t\tthis.requestCount = 0;\n\t\tthis.handlers = {};\n\t\tthis.timeoutHandler = 0;\n\t\tthis.loading = false;\n\t}\n\n\tregister() {\n\t\tthis.requestCount += 1;\n\t\tif (this.requestCount == 1 && this.timeoutHandler == 0) {\n\t\t\tthis.timeoutHandler = setTimeout( () => {\n\t\t\t\tthis.loading = true;\n\t\t\t\tthis.raiseEvents();\n\t\t\t}, 100);\n\t\t}\n\t}\n\n\tunregister() {\n\t\tthis.requestCount -= 1;\n\t\tif (this.requestCount <= 0) {\n\t\t\tif (this.timeoutHandler > 0) {\n\t\t\t\tclearTimeout(this.timeoutHandler);\n\t\t\t\tthis.timeoutHandler = 0;\n\t\t\t}\n\t\t\tthis.requestCount = 0;\n\t\t\tif (this.loading) {\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.raiseEvents();\n\t\t\t}\n\t\t}\n\t}\n\n\taddHandler(handler) {\n\t\tlet idx = Object.keys(this.handlers).length;\n\t\tthis.handlers[idx] = handler;\n\t\treturn idx;\n\t}\n\n\tremoveHandler(handlerIdx) {\n\t\tif (this.handlers.hasOwnProperty(handlerIdx)) {\n\t\t\tdelete this.handlers[handlerIdx];\n\t\t}\n\t}\n\n\traiseEvents() {\n\t\tsetTimeout( () => {\n\t\t\tfor (var i in this.handlers) {\n\t\t\t\tthis.handlers[i](this.loading);\n\t\t\t}\n\t\t});\n\t}\n}\n","import React from 'react'\nimport { Calendar as BigCalendar, momentLocalizer, Views } from 'react-big-calendar'\nimport withDragAndDrop from 'react-big-calendar/lib/addons/dragAndDrop'\nimport moment from 'moment'\nimport 'moment/locale/pt'\nimport 'react-big-calendar/lib/sass/styles.scss'\nimport 'react-big-calendar/lib/addons/dragAndDrop/styles.scss'\n\nconst locale = (hp.settings.current_lang || hp.settings.locale || 'pt').replace(/[\\W].+/, '')\nmoment.locale(locale)\n\nconst localizer = momentLocalizer(moment)\n\nconst messages = locale == 'pt'\n\t? {\n\t\tallDay: trans.get('date_all_ay'),\n\t\tprevious: '<',\n\t\tnext: '>',\n\t\ttoday: trans.get('date_today'),\n\t\tmonth: trans.get('date_month_tag'),\n\t\tweek: trans.get('date_week_tag'),\n\t\twork_week: trans.get('date_work_week_tag'),\n\t\tday: trans.get('date_day_tag'),\n\t\tdate: trans.get('attrs_date'),\n\t\ttime: trans.get('attrs_time'),\n\t\tevent: trans.get('attrs_event'),\n\t\tnoEventsInRange: trans.get('date_no_events_in_range'),\n\t}\n\t: null\n\nconst DragAndDropCalendar = withDragAndDrop(BigCalendar)\n\nclass AgendaEvent extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.onClick = this.onClick.bind(this)\n\t}\n\n\tonClick() {\n\t\tconst { event, onSelectEvent } = this.props\n\t\tif (onSelectEvent) {\n\t\t\tonSelectEvent(event.event)\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { event } = this.props\n\t\treturn (\n\t\t\t<div className=\"pointer\" onClick={this.onClick}>\n\t\t\t\t{event.title}\n\t\t\t</div>\n\t\t)\n\t}\n}\n\n/*\nfunction AgendaEvent() {\n\treturn <AgendaEventComponent\n\n\t/>\n}\n*/\n\nexport default class Calendar extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tview: props.view || sessionStorage.getItem('calendar.view') || Views.WEEK\n\t\t};\n\t\tif (hp.store.config && hp.store.config.calendar) {\n\t\t\tconst cfg = hp.store.config.calendar;\n\t\t\tif (cfg.min) {\n\t\t\t\tthis.state.min = new Date(2018, 1, 0, cfg.min, 0, 0);\n\t\t\t}\n\t\t\tif (cfg.max) {\n\t\t\t\tthis.state.max = new Date(2018, 1, 0, cfg.max, 0, 0);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.state.min = new Date(2018, 1, 0, 7, 0, 0);\n\t\t}\n\t\tthis.onViewChanged = this.onViewChanged.bind(this)\n\t\tthis.onAgenda = this.onAgenda.bind(this)\n\t}\n\n\tstatic getRangeFor = (view = null, date = null) => {\n\t\tlet start, end\n\n\t\tif (date == null) {\n\t\t\tdate = new Date()\n\t\t}\n\t\telse {\n\t\t\tstart = date\n\t\t}\n\t\tview = view || sessionStorage.getItem('calendar.view') || Views.WEEK\n\t\tif (view === Views.MONTH) {\n\t\t\tend = new Date(date.getFullYear(), date.getMonth() + 1, 7)\n\t\t\tstart = new Date(date.getFullYear(), date.getMonth(), 1)\n\t\t\tstart.setDate(start.getDate() - 7)\n\t\t}\n\t\telse if (view === Views.WEEK) {\n\t\t\tstart = new Date(date)\n\t\t\t// quando dia atual é domingo, getDay devolve 0 e, é necessário que o 1º dia a mostrar seja uma semana antes\n\t\t\tstart.setDate(date.getDate() - (date.getDay() || 7) + 1)\n\t\t\tend = new Date(date)\n\t\t\tend.setDate(date.getDate() + 7)\n\t\t}\n\t\telse if (view === Views.WORK_WEEK) {\n\t\t\tstart = new Date(date)\n\t\t\tstart.setDate(date.getDate() - (date.getDay() || 7) + 1)\n\t\t\tend = new Date(date)\n\t\t\tend.setDate(date.getDate() + 5)\n\t\t}\n\t\telse {\n\t\t\tstart = end = date\n\t\t}\n\t\treturn { start, end }\n\t}\n\n\tonViewChanged(view) {\n\t\tsessionStorage.setItem('calendar.view', view);\n\t\tif (this.props.onViewChanged) {\n\t\t\tthis.props.onViewChanged(view)\n\t\t}\n\t\tthis.setState({ view: view });\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.isMobile();\n\t}\n\n\tisMobile() {\n\t\tif (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n\t\t\tthis.setState({ view: Views.DAY });\n\t\t}\n\t}\n\n\tonAgenda(event) {\n\t\treturn <AgendaEvent event={event} onSelectEvent={this.props.onSelectEvent || null} />\n\t}\n\n\trender() {\n\t\tconst props = Object.assign({\n\t\t\tlocalizer: localizer,\n\t\t\tmessages: messages,\n\t\t\tevents: this.props.events,\n\t\t\tdefaultDate: this.props.defaultDate || null,\n\t\t\tdate: this.props.date || null,\n\t\t\tselectable: this.props.selectable || false,\n\t\t\tstartAccessor: this.props.startAccessor || 'evt_start',\n\t\t\tendAccessor: this.props.endAccessor || 'evt_end',\n\t\t\ttitleAccessor: this.props.titleAccessor || 'title',\n\t\t\ttooltipAccessor: this.props.tooltipAccessor || this.props.titleAccessor || null,\n\t\t\teventPropGetter: this.props.eventPropGetter || null,\n\t\t\tonSelectSlot: this.props.onSelectSlot || null,\n\t\t\tonSelectEvent: this.props.onSelectEvent || null,\n\t\t\tonRangeChange: this.props.onRangeChange || null,\n\t\t\tdraggableAccessor: this.props.draggableAccessor || null,\n\t\t\tresizableAccessor: this.props.resizableAccessor || null,\n\t\t\tonEventDrop: this.props.onEventDrop || null,\n\t\t\tonEventResize: this.props.onEventResize || null,\n\t\t\tdefaultView: this.props.defaultView || Views.WEEK,\n\t\t\tview: this.state.view,\n\t\t\tonView: this.onViewChanged,\n\t\t\tviews: this.props.views || [Views.MONTH, Views.WEEK, Views.DAY, Views.AGENDA],\n\t\t\tonNavigate: this.props.onNavigate || null,\n\t\t\tcomponents: {\n\t\t\t\tagenda: {\n\t\t\t\t\tevent: this.onAgenda\n\t\t\t\t},\n\t\t\t\tevent: this.props.renderEvent || null\n\t\t\t},\n\t\t\tshowAllEvents: this.props.showAllEvents || null,\n\t\t\tpopup: this.props.popup || null\n\t\t}, this.state);\n\t\tif (this.props.date) {\n\t\t\tprops.date = this.props.date;\n\t\t}\n\t\tconst calendar = React.createElement(this.props.dragDrop ? DragAndDropCalendar : BigCalendar, props)\n\n\t\treturn (\n\t\t\t<div className={classNames(\"calendar\", this.props.className)}>\n\t\t\t\t{calendar}\n\t\t\t</div>\n\t\t)\n\t}\n}\n","import React from 'react'\nimport { InputFile } from './common'\n\nexport default class ChatEditor extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {file: null, dragging: false};\n\t\tthis.editor = React.createRef();\n\t\tthis.onAddFile = this.onAddFile.bind(this);\n\t}\n\n\tstatic getDerivedStateFromProps(nextProps, prevState) {\n\t\tconst model = nextProps.model || {};\n\t\tconst file = model.file || null;\n\n\t\tif (file === prevState.file) {\n\t\t\treturn null;\n\t\t}\n\t\treturn {\n\t\t\tfile: file\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst editor = this.editor.current;\n\n\t\teditor.addEventListener(\"input\", e => {\n\t\t\tthis.props.model[this.props.name] = editor.innerText;\n\t\t\tif (this.props.onInput) {\n\t\t\t\tthis.props.onInput(e);\n\t\t\t}\n\t\t\tthis.forceUpdate();\n\t\t})\n\t\teditor.addEventListener(\"keydown\", e => {\n\t\t\tif (e.ctrlKey || e.shiftKey) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tswitch(e.keyCode) {\n\t\t\t\tcase 13: // enter\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.onSend();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 38: // seta cima\n\t\t\t\t\tif (this.props.onSelect && !this.props.model[this.props.name]) {\n\t\t\t\t\t\tthis.props.onSelect();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 27: // escape\n\t\t\t\tif (this.props.onSelect && this.props.model[this.props.name]) {\n\t\t\t\t\tthis.props.onSelect(true);\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\teditor.addEventListener(\"paste\", e => {\n\t\t\treturn this.onDropFile(e, e.clipboardData);\n\t\t})\n//\t\teditor.addEventListener(\"dragover\", e => {\n//\t\t\te.preventDefault();\n//\t\t})\n\t\teditor.addEventListener(\"dragenter\", e => {\n\t\t\tconsole.log(\"enter\");\n\t\t\tthis.setState({dragging: true});\n\t\t})\n\t\teditor.addEventListener( \"dragleave\", e => this.setState({dragging: false}) )\n\t\teditor.addEventListener( \"dragend\", e => this.setState({dragging: false}) )\n\t\teditor.addEventListener(\"drop\", e => {\n\t\t\treturn this.onDropFile(e, e.dataTransfer);\n\t\t})\n\t\teditor.focus()\n\t}\n\n\tonDropFile(ev, data) {\n\t\tif (data instanceof DataTransfer && data.files.length > 0) {\n\t\t\tev.preventDefault()\n\t\t\tthis.props.model['file'] = data.files[0]\n\t\t\tthis.setState({file: data.files[0], dragging: false})\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconst editor = this.editor.current;\n\t\tconst {model, name} = this.props;\n\n\t\tif (document.activeElement !== editor || editor.innerText != model[name]) {\n\t\t\teditor.innerText = model[name];\n\t\t}\n\t}\n\n\tgetQuote(msg, chat) {\n\t\tif (!msg.quote_id || !chat || !chat.hasOwnProperty(msg.quote_id)) {\n\t\t\treturn null\n\t\t}\n\t\tconst msg_quote = chat[msg.quote_id]\n\t\treturn (\n\t\t\t<div className=\"chat-quote chat-quote-reply\">\n\t\t\t\t{msg_quote.comment}\n\t\t\t\t<span className=\"pull-right pointer\" onClick={this.props.onClearQuote || null}>\n\t\t\t\t\t<em className=\"la la-close\" />\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t)\n\t}\n\n\tonSend() {\n\t\tconst {file} = this.state\n\t\tif (this.props.canSend === false || (!this.props.model[this.props.name] && !file)) {\n\t\t\treturn;\n\t\t}\n\t\tthis.props.model[this.props.name] = this.props.model[this.props.name].trim();\n\t\tthis.props.model['file'] = file || null;\n\t\tif (this.props.model[this.props.name] || file) {\n\t\t\tthis.props.onSend();\n\t\t}\n\t}\n\n\tonAddFile(e) {\n\t\tthis.props.model['file'] = e ? e.currentTarget.files[0] : null;\n\t\tthis.setState({file: this.props.model['file']})\n\t}\n\n\trender() {\n\t\tconst {model, name, data} = this.props\n\t\tconst{file, dragging} = this.state\n\t\tconst uploader = <InputFile\n\t\t\ttype=\"file\"\n\t\t\tlabel={null}\n\t\t\ttitle={!file ? __('attrs_upload_file') : null}\n\t\t\tfile={file}\n\t\t\tonChange={this.onAddFile}\n\t\t/>\n\t\tconst quote = this.getQuote(model, data)\n\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{file ? uploader : null}\n\t\t\t\t{quote}\n\t\t\t\t<div className={classNames(\"d-flex chat-editor\", dragging ? 'dragging' : null)}>\n\t\t\t\t\t{!file\n\t\t\t\t\t\t? uploader\n\t\t\t\t\t\t: <span className=\"label\">\n\t\t\t\t\t\t\t<button className=\"btn btn-circular\" onClick={this.props.onCancel}>\n\t\t\t\t\t\t\t\t<em className=\"la la-undo\" />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t </span>\n\t\t\t\t\t}\n\t\t\t\t\t<span\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tref={this.editor}\n\t\t\t\t\t\tclassName=\"textarea\"\n\t\t\t\t\t\tcontentEditable={true}\n\t\t\t\t\t\tsuppressContentEditableWarning={true}\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName={classNames(\"btn btn-circular\", model[name] == '' || this.props.canSend === false ? 'btn-default' : 'btn-primary')}\n\t\t\t\t\t\ttitle={__('socials_chat_send_title')}\n\t\t\t\t\t\tonClick={this.onSend.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<em className=\"la la-paper-plane\" />\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import io from \"socket.io-client\"\n\nexport default class ChatSocket {\n\tconstructor(store = null, params = {}) {\n\t\tthis.handlers = {\n\t\t\t'new-message': [],\n\t\t\t'del-message': [],\n\t\t\t'typing': [],\n\t\t};\n\t\tthis.params = params\n\t\tthis.store = store || hp.store;\n\t\tif (!this.store.chat) {\n\t\t\tthis.store.chat = {\n\t\t\t\tchat: {},\n\t\t\t\tusers: {},\n\t\t\t\tunread: {} // guarda, por user, o numero de mensagens não lidas\n\t\t\t}\n\t\t}\n\t\tif (!this.store.me) {\n\t\t\tthis.store.me = {groups: null}\n\t\t}\n\t\tthis.alias = this.store.alias;\n\t\tthis.socket = io(hp.settings.chat.server, {autoConnect: false});\n\t\tthis.socket\n\t\t\t.on('new-message', (data) => {\n\t\t\t\tif (!window.document.hasFocus()) {\n\t\t\t\t\tconst notif = new Audio(hp.settings.tpldns + 'admin/sounds/notification.mp3');\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnotif.play()\n\t\t\t\t\t}\n\t\t\t\t\tcatch(ex) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.params.onNewMessage instanceof Function) {\n\t\t\t\t\tthis.params.onNewMessage(data)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// vai buscar a mensagem gravada\n\t\t\t\tthis.load(!data.group_id || data.group_id == 0 ? data.user_id : data.group_id, 1).then(response => {\n\t\t\t\t\tthis.raiseEvents('new-message', {chat: response})\n\t\t\t\t})\n\t\t\t})\n\t\t\t.on('typing', (data) => {\n\t\t\t\tconst users = this.store.chat.users;\n\n\t\t\t\tif (data.group_id && users.hasOwnProperty(data.group_id)) {\n\t\t\t\t\tusers[data.group_id].typing = data.typing;\n\t\t\t\t\tthis.raiseEvents('typing', data);\n\t\t\t\t}\n\t\t\t\telse if (users.hasOwnProperty(data.user_id)) {\n\t\t\t\t\tusers[data.user_id].typing = data.typing;\n\t\t\t\t\tthis.raiseEvents('typing', data);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('del-message', (data) => {\n\t\t\t\tconst chat = this.store.chat.chat;\n\t\t\t\tif (!chat.hasOwnProperty(data.to) || !chat[data.to][data.id]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tchat[data.to][data.id].href = null;\n\t\t\t\tchat[data.to][data.id].deleted = true;\n\t\t\t\tthis.raiseEvents('del-message', data);\n\t\t\t})\n\t\tthis.socket.connect()\n\t\tthis.connect()\n\t\tthis.socket\n\t\t\t.on('connect', number => {\n\t\t\t\tthis.connect()\n\t\t\t})\n\t\t\t.on('connect_error', () => console.log('chat: error connect to socket server'));\n\t}\n\n\tconnect() {\n\t\tthis.socket.emit('add-user', hp.settings.chat.nif, {\n\t\t\tid: this.store.uid,\n\t\t\troom: this.alias,\n\t\t\ttoken: hp.settings.chat.token,\n\t\t\tgroups: this.store.me.groups\n\t\t})\n\t}\n\n\tsubscribe(type, handler) {\n\t\tif (!this.handlers[type]) {\n\t\t\treturn -1;\n\t\t}\n\t\tconst idx = Object.keys(this.handlers[type]).length;\n\t\tthis.handlers[type][idx] = handler;\n\t\treturn idx;\n\t}\n\n\tunsubscribe(type, handlerIdx) {\n\t\tif (this.handlers[type] && this.handlers[type].hasOwnProperty(handlerIdx)) {\n\t\t\tdelete this.handlers[type][handlerIdx];\n\t\t}\n\t}\n\n\traiseEvents(type, params = null) {\n\t\tif (this.handlers[type]) {\n\t\t\tsetTimeout( () => {\n\t\t\t\tthis.handlers[type].forEach(handler => {\n\t\t\t\t\thandler(params);\n\t\t\t\t})\n\t\t\t});\n\t\t}\n\t}\n\n\tsend(data) {\n\t\treturn new Promise((resolve, success) => {\n\t\t\tdata.silent = true;\n\t\t\thttp.post('/chat/send.json', data, (response, success) => {\n\t\t\t\tif (response && success) {\n\t\t\t\t\tif (data instanceof FormData) {\n\t\t\t\t\t\tconst _data = {};\n\t\t\t\t\t\tfor (let [key, value] of data.entries()) {\n\t\t\t\t\t\t\t_data[key] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdata = _data;\n\t\t\t\t\t}\n\t\t\t\t\t// tell server to execute 'new message' and send along one parameter\n\t\t\t\t\tthis.socket.emit('new-message', data);\n\t\t\t\t\tthis.mergeResults(response);\n\t\t\t\t}\n\t\t\t\tresponse = response || {};\n\t\t\t\tresponse.success = success;\n\t\t\t\tresolve(response);\n\t\t\t})\n\t\t});\n\t}\n\n\tdelete(chat_id, to) {\n\t\treturn new Promise((resolve, success) => {\n\t\t\thttp.post('/chat/delete.json', {id: chat_id}, (response, success) => {\n\t\t\t\tif (response && success) {\n\t\t\t\t\t// tell server to execute 'new message' and send along one parameter\n\t\t\t\t\t//this.socket.emit('del-message', {chat_id: chat_id, to: to});\n\t\t\t\t\t//this.mergeResults(response);\n\t\t\t\t\tif (this.store.chat.chat.hasOwnProperty(to)) {\n\t\t\t\t\t\tdelete this.store.chat.chat[to][chat_id];\n\t\t\t\t\t\tthis.socket.emit('del-message', {to: to, id: chat_id});\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t});\n\t}\n\n\tsetRead(uid) {\n\t\tif (this.read_timeout) {\n\t\t\tclearTimeout(this.read_timeout);\n\t\t}\n\t\tconst chat = this.store.chat;\n\n\t\tif (chat.unread[uid] == undefined || chat.unread[uid] == 0) {\n\t\t\treturn;\n\t\t}\n\t\tthis.read_timeout = setTimeout(() => {\n\t\t\thttp.post('/chat/setChatRead.json', {to: uid, alias: this.alias, silent: true}, response => {\n\t\t\t\tthis.read_timeout = 0;\n\t\t\t\tdelete chat.unread[uid];\n\t\t\t\t// definir todas as mensagens como lidas\n\t\t\t\tconst user_msgs = chat.chat[uid] || {};\n\n\t\t\t\tfor (let id in user_msgs) {\n\t\t\t\t\tuser_msgs[id].read = 1\n\t\t\t\t}\n\t\t\t\tthis.raiseEvents('new-message');\n\t\t\t});\n\t\t}, 1000);\n\t}\n\n\t/**\n\t * Load das mensagens da pagina page. Se page = 0, load da pagina seguinte\n\t * @param {object} user \n\t * @param {int} page se page = 1, não atualiza user.page, uma vez que é necessário o valor original para o scroll\n\t */\n\tload(user, page = 0) {\n\t\t//const { chat } = this.store;\n\t\t//const user = chat.users[to];\n\t\tif (!(user instanceof Object)) {\n\t\t\tuser = this.store.chat.users[user];\n\t\t}\n\t\tconst _page = page || (user.page ? (user.page + 1) : 1);\n\n\t\t//if (page == 0) {\n\t\t//\tpage = user.page ? (user.page + 1) : 1;\n\t\t//}\n\t\tuser.loading = true;\n\t\treturn new Promise(resolve => {\n\t\t\thttp.post('/chat/get.json', {silent: true, alias: this.alias, page: _page, to: user.to_user_id}, response => {\n\t\t\t\tuser.loaded = true;\n\t\t\t\tuser.loading = false;\n\t\t\t\tuser.page = page != 1 || !user.page ? response.page : user.page;\n\t\t\t\tuser.page_count = response.page_count;\n\n\t\t\t\tthis.mergeResults(response)\n\t\t\t\tresolve(response)\n\t\t\t})\n\t\t})\n\t}\n\n\tmergeResults(response) {\n\t\tconst {chat} = this.store;\n\t\tconst user_ids = Object.keys(response.chat);\n\n\t\tuser_ids.forEach(uid => {\n\t\t\tconst msgs = response.chat[uid];\n\n\t\t\tfor (let mid in msgs) {\n\t\t\t\tmsgs[mid].updated_at = new Date(msgs[mid].updated_at)\n\t\t\t}\n\t\t\tif (chat.chat.hasOwnProperty(uid)) {\n\t\t\t\tObject.assign(chat.chat[uid], msgs);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchat.chat[uid] = msgs;\n\t\t\t}\n\t\t\t// set my last message as editable\n\t\t\tconst data = chat.chat[uid];\n\t\t\tconst msg_keys = Object.keys(data);\n\n\t\t\tfor (let i = msg_keys.length - 1, my_last = null; i >= 0; i --) {\n\t\t\t\tconst msg = data[msg_keys[i]];\n\n\t\t\t\tif (!msg.mine) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (msg.editable) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (my_last == null) {\n\t\t\t\t\tmy_last = msg;\n\t\t\t\t\tmsg.editable = true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tObject.assign(chat.unread, response.unread);\n\n\t\treturn user_ids.length > 0;\n\t}\n\n}\n","\nexport const FromBackground = (color) => {\n\tconst _color = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(color)\n\tconst rgb = {\n\t\tr: parseInt(_color[1], 16),\n\t\tg: parseInt(_color[2], 16),\n\t\tb: parseInt(_color[3], 16)\n\t};\n\tconst brightness = ((rgb.r << 5) + (rgb.g << 6) + (rgb.b << 2)) / 100\n\n\treturn {\n\t\tbgColor: color,\n\t\trgb: rgb,\n\t\tbrightness: brightness,\n\t\tfgColor: brightness < 130 ? '#fff' : '#333'\n\t}\n}\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport { createRoot } from 'react-dom/client'\nimport PropTypes from 'prop-types'\nimport * as ReactSelect from 'react-select'\nimport AsyncSelect from 'react-select/async'\n//import moment from 'moment'\nimport {format, parse} from 'date-fns'\nimport { InputMask as ReactInputMask } from '@react-input/mask'\n\nexport const guid = () =>\n\t'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {\n\t\tconst r = Math.random() * 16 | 0;\n\t\tconst v = c == 'x' ? r : (r & 0x3 | 0x8);\n\t\treturn v.toString(16);\n\t});\n\nexport const simpleHash = (value) => {\n\tlet hash = 0;\n\tif (!value || value.length === 0){\n\t\treturn hash.toString(16);\n\t}\n\n\tfor (let i = 0; i < value.length; i++) {\n\t\tconst char = value.charCodeAt(i);\n\t\thash = ((hash << 5) - hash) + char;\n\t\thash &= hash;\n\t}\n\n\treturn hash.toString(16);\n};\n\nconst extend = window.extend = (target, source) => {\n\tif (typeof target !== 'object') {\n\t\ttarget = source instanceof Array ? [] : {};\n\t}\n\tfor (let key in source) {\n\t\tif (source.hasOwnProperty(key)) {\n\t\t\tlet value = source[key];\n\n\t\t\tif (value instanceof Array) {\n\t\t\t\ttarget[key] = extend([], value);\n\t\t\t}\n\t\t\telse if (value instanceof Object && value.constructor === Object) {\n\t\t\t\ttarget[key] = extend({}, value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttarget[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\t//for (var a = 2, l = arguments.length; a < l; a++) {\n\t//\textend(target, arguments[a]);\n\t//}\n\treturn target;\n}\n\nDate.prototype.toISO = function() {\n\tlet month = String(this.getMonth() + 1).padStart(2, '0');\n\tlet day = String(this.getDate()).padStart(2, '0');\n\tlet hour = String(this.getHours()).padStart(2, '0');\n\tlet min = String(this.getMinutes()).padStart(2, '0');\n\n\treturn `${this.getFullYear()}-${month}-${day}T${hour}:${min}`\n}\n\nexport class Loader extends React.Component {\n\trender() {\n\t\tconst loader = <div key='l' className={classNames(\"loading\", this.props.className || null)}><div /></div>;\n\n\t\tif (!this.props.dimmed) {\n\t\t\treturn loader;\n\t\t}\n\t\treturn [\n\t\t\tloader,\n\t\t\t<div key='c' className='ui-widget-overlay' style={{\n\t\t\t\tposition: \"fixed\", zIndex: 99999,\n\t\t\t\ttop: 0, left: 0, right: 0, bottom: 0,\n\t\t\t\twidth: '100%', height: '100%', minHeight: '100%',\n\t\t\t\tbackground: 'rgba(60, 50, 80, 0.30)'\n\t\t\t}} />\n\t\t];\n\t}\n}\n\nexport class Component extends React.Component {\n\tconstructor(props, lng_files = null) {\n\t\tsuper(props);\n\t\tthis.lng_files = lng_files;\n\t\tthis.state = { loading: lng_files !== null };\n/*\n\t\tif (lng_files) {\n\t\t\tthis.state = { loading: true };\n\t\t\ttrans.load(lng_files, () => {\n\t\t\t\t//this.setState({ loading: false });\n\t\t\t\tthis.state.loading = false;\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis.state = { loading: false };\n\t\t}\n*/\n\t}\n\n\tsetLoading(start, now) {\n\t\tif (now) {\n\t\t\tthis.setState({loading: start});\n\t\t}\n\t\telse {\n\t\t\tthis.state.loading = start;\n\t\t}\n\t}\n\tstartLoading(now = true) { this.setLoading(true, now); }\n\tstopLoading(now = true) { this.setLoading(false, now); }\n\tgetLoader() {\n\t\treturn this.state.loading || this.state.saving ? <Loader className='inline' /> : null;\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.lng_files) {\n\t\t\ttrans.load(this.lng_files, () => {\n\t\t\t\tthis.setState({ loading: false });\n\t\t\t});\n\t\t\tthis.lng_files = null;\n\t\t}\n\t}\n\n\trenderElement() {\n\t\treturn 'not implemented yet!';\n\t}\n\n\trender() {\n\t\tif (this.state.loading) {\n\t\t\treturn <Loader className='inline' />;\n\t\t}\n\t\treturn this.renderElement();\n\t}\n}\n\nComponent.propTypes = {\n\tloading: PropTypes.bool\n}\n\nexport class Button extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {icon: props.icon ? (props.icon.indexOf(' ') > 0 ? props.icon : `la la-${props.icon}`) : null};\n\t}\n\n\tstyle = () => 'btn' + (this.props.className ? ` ${this.props.className}` : '')\n\n\tonClick = () => {}\n\n\tstatic getDerivedStateFromProps = (props, state) =>\n\t\tprops.icon\n\t\t\t? {icon: (props.icon.indexOf(' ') > 0 ? props.icon : `la la-${props.icon}`)}\n\t\t\t: null;\n\n\trender() {\n\t\tlet children = this.props.children || [\n\t\t\tthis.state.icon\n\t\t\t\t? <em key='1' className={this.state.icon} />\n\t\t\t\t: null,\n\t\t\tthis.props.label ? <span key='2'>{this.props.label}</span> : null\n\t\t];\n\t\treturn (\n\t\t\t<button\n\t\t\t\ttype={this.props.type || 'button'}\n\t\t\t\tclassName={this.style()}\n\t\t\t\tdisabled={this.props.disabled || false}\n\t\t\t\tonClick={this.props.onClick || this.onClick}\n\t\t\t\ttitle={this.props.title || null}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t}\n}\n\nexport class ButtonDelete extends Button {\n\tstyle() {\n\t\treturn 'btn btn-danger ' + (this.props.className || '');\n\t}\n}\nButtonDelete.defaultProps = {\n\ticon: 'trash'\n}\n\nexport class Badge extends React.Component {\n\trender() {\n\t\tconst { title, className, tip } = this.props;\n\t\treturn <div className={`badge ${className}`} title={tip || null}>{title}</div>;\n\t}\n}\n\nexport class ButtonAttachment extends Button {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.name = props.name || guid();\n\t\tthis.state = {};\n\t}\n\n\tonUploadChange(e) {\n\t\tif (e.target.files.length == 0) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.props.model && this.props.name) {\n\t\t\tthis.props.model[this.props.name] = e.target.files[0];\n\t\t}\n\t\tthis.setState({ file: e.target.files[0] });\n\t}\n\n\tonClear() {\n\t\tif (this.props.model && this.props.name) {\n\t\t\tthis.props.model[this.props.name] = null;\n\t\t}\n\t\tthis.setState({ file: null });\n\t}\n\n\trender() {\n\t\tlet _file = !this.state.file ? null : <span> ({this.state.file.name})</span>;\n\t\tlet el_remove = !this.state.file\n\t\t\t? null\n\t\t\t: <button key=\"2\" className=\"btn btn-default\" title=\"Remover anexo\" onClick={this.onClear.bind(this)}><em className=\"fa fa-times\"></em></button>\n\t\tlet el = [\n\t\t\t<label key=\"1\" htmlFor={this.name} className=\"btn btn-default\">\n\t\t\t\t<em className=\"fa fa-papperclip\" />\n\t\t\t\t<span>{__('attrs_attachment') + ' ...'}</span>{_file}\n\t\t\t\t<input type=\"file\" id={this.name} onChange={this.onUploadChange.bind(this)} style={{ display: \"none\" }} />\n\t\t\t</label>,\n\t\t\tel_remove\n\t\t];\n\t\treturn el;\n\t}\n}\n\nexport function CheckToggleButton(props = {}) {\n\tconst [hovered, setHovered] = React.useState(false)\n\tconst toggleHover = () => setHovered(!hovered)\n\tconst _props = Object.assign({}, props, {\n\t\tclassName: hovered ? (props.classNameHovered || props.className || 'btn btn-default') : (props.className || 'btn btn-default')\n\t})\n\n\treturn (\n\t\t<button {..._props} onMouseEnter={toggleHover} onMouseLeave={toggleHover}>\n\t\t\t<em className={hovered ? (props.iconHovered || 'la la-check') : (props.icon || 'la la-times')} />\n\t\t</button>\n\t)\n}\n\nexport class LinkBack extends React.Component {\n\tonGoBack() {\n\t\twindow.history.back();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<a onClick={this.onGoBack} className=\"go-back btn btn-light btn-circular\">\n\t\t\t\t<em className=\"la la-arrow-left\" />\n\t\t\t</a>\n\t\t);\n\t}\n}\n\nexport class TextComponent extends Component {\n\tgetValue() {\n\t\tconst value = this.props.model && this.props.name ? this.props.model[this.props.name] : this.props.value;\n\t\treturn value || (value === 0 ? value : '');\n\t}\n\n\trenderElement() {\n\t\treturn this.props.renderElement instanceof Function ? this.props.renderElement() : null;\n\t}\n\n\trenderTip() {\n\t\tif (!this.props.tip || this.tipped) {\n\t\t\treturn null\n\t\t}\n\t\tthis.tipped = true\n\t\tconst tip =\n\t\t\t<span className='tip'>\n\t\t\t\t<em className='la la-info-circle' />\n\t\t\t\t<span>({this.props.tip})</span>\n\t\t\t</span>\n\t\tif (this.props.inlineTip) {\n\t\t\treturn tip\n\t\t}\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<div className=\"clearfix\" />\n\t\t\t\t{tip}\n\t\t\t</div>\n\t\t)\n\t}\n\n\trender() {\n\t\tthis.tipped = false\n\t\tvar el = this.renderElement();\n\n\t\tif (this.props.icon) {\n\t\t\tel = <div title={this.props.label || this.props.placeholder}>\n\t\t\t\t<em className={this.props.icon} />\n\t\t\t\t{el}\n\t\t\t</div>;\n\t\t}\n\t\tif (this.props.label) {\n\t\t\tlet cls = this.props.className === undefined ? 'form-group' : this.props.className;\n\t\t\tif (this.props.disabled) {\n\t\t\t\tcls += ' disabled'\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<div className={cls} title={this.props.title || this.props.tip || null}>\n\t\t\t\t\t<label htmlFor={this.props.name} className={this.props.classNameLabel || null}>\n\t\t\t\t\t\t{this.props.label}\n\t\t\t\t\t</label>\n\t\t\t\t\t{el}\n\t\t\t\t\t{this.renderTip()}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t!this.props.tip\n\t\t\t\t? el\n\t\t\t\t: <div>{el}{this.renderTip()}</div>\n\t\t);\n\t}\n}\n\nexport class Input extends TextComponent {\n\tgetValue() {\n\t\tconst name = this.props.mapName || this.props.name;\n\t\tconst value = this.props.model && name ? this.props.model[name] : this.props.value;\n\t\treturn value || (value === 0 ? value : '');\n\t}\n\n\tonChange = (e) => {\n\t\tlet name = this.props.mapName || this.props.name;\n\n\t\tif (this.props.model && name) {\n\t\t\tthis.props.model[name] = e.currentTarget.value;\n\t\t\tthis.forceUpdate();\n\t\t}\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(e);\n\t\t}\n\t}\n\n\trenderElement() {\n\t\t//let classes = this.props.label ? null : this.props.className;\n\t\t/*\n\t\tif (this.props.defStyle === undefined || this.props.defStyle === true) {\n\t\t\tclasses = classes ? `${classes} form-control input-sm` : 'form-control input-sm';\n\t\t}\n\t\tif (this.props.required) {\n\t\t\tclasses = classes ? `${classes} required` : 'required';\n\t\t}\n\t\t*/\n\t\tconst p = this.props\n\t\tlet required = p.required || (p.validations && p.validations.hasOwnProperty(p.name) && p.validations[p.name].hasOwnProperty('required'));\n\t\tlet el =\n\t\t\t<input\n\t\t\t\ttype={p.type || this.state.type || null}\n\t\t\t\tid={p.id || p.name || null}\n\t\t\t\tname={p.name || null}\n\t\t\t\tclassName={classNames([p.classNameEl || \"form-control input-sm\", required ? 'required' : null])}\n\t\t\t\trequired={required}\n\t\t\t\tplaceholder={p.placeholder || p.title}\n\t\t\t\tvalue={this.getValue()}\n\t\t\t\tonChange={this.onChange}\n\t\t\t\tonKeyDown={p.onKeyDown ?? null}\n\t\t\t\tonFocus={p.onFocus ?? null}\n\t\t\t\tonBlur={p.onBlur ?? null}\n\t\t\t\tonKeyUp={p.onKeyUp ?? null}\n\t\t\t\tstyle={p.style || null}\n\t\t\t\tdisabled={p.disabled || false}\n\t\t\t\treadOnly={p.readOnly || false}\n\t\t\t\tmin={p.min || p.min === 0 ? p.min : null}\n\t\t\t\tmax={p.max || p.max === 0 ? p.max : null}\n\t\t\t\tmaxLength={p.maxLength || null}\n\t\t\t\tstep={p.step || (p.type == 'number' ? 'any' : null)}\n\t\t\t\tlang={p.lang || (p.type == 'number' ? 'en' : null)}\n\t\t\t\tautoFocus={p.autoFocus || null}\n\t\t\t\tautoComplete={p.autoComplete || null}\n\t\t\t\ttitle={p.title || null}\n\t\t\t/>;\n\t\treturn (\n\t\t\t!p.classNameControl\n\t\t\t\t? el\n\t\t\t\t: <div className={p.classNameControl}>{el}{this.renderTip()}{this.props.children || null}</div>\n\t\t);\n\t}\n}\n\nexport class InputMask extends Input {\n\trenderElement() {\n\t\tconst p = this.props\n\t\tlet required = p.required || (p.validations && p.validations.hasOwnProperty(p.name) && p.validations[p.name].hasOwnProperty('required'));\n\t\tlet el =\n\t\t\t<ReactInputMask\n\t\t\t\tid={p.id || p.name || null}\n\t\t\t\tname={p.name || null}\n\t\t\t\tclassName={classNames([p.classNameEl || \"form-control input-sm\", required ? 'required' : null])}\n\t\t\t\tmask={p.mask}\n\t\t\t\treplacement={p.replacement || null}\n\t\t\t\tshowMask={p.showMask || null}\n\t\t\t\trequired={required}\n\t\t\t\tplaceholder={p.placeholder || p.title}\n\t\t\t\tvalue={this.getValue()}\n\t\t\t\tonChange={this.onChange}\n\t\t\t\tonKeyDown={p.onKeyDown ?? null}\n\t\t\t\tonFocus={p.onFocus ?? null}\n\t\t\t\tonBlur={p.onBlur ?? null}\n\t\t\t\tonKeyUp={p.onKeyUp ?? null}\n\t\t\t\tdisabled={p.disabled || false}\n\t\t\t\treadOnly={p.readOnly || false}\n\t\t\t\tmaxLength={p.maxLength || null}\n\t\t\t\tstep={p.step || (p.type == 'number' ? 'any' : null)}\n\t\t\t\tlang={p.lang || (p.type == 'number' ? 'en' : null)}\n\t\t\t\tautoFocus={p.autoFocus || null}\n\t\t\t\ttitle={p.title || null}\n\t\t\t/>;\n\t\treturn (\n\t\t\t!p.classNameControl\n\t\t\t\t? el\n\t\t\t\t: <div className={p.classNameControl}>{el}{this.renderTip()}{this.props.children || null}</div>\n\t\t);\n\t}\n}\n\nexport class InputFile extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfile: null,\n\t\t\timg: null\n\t\t}\n\t\tthis.ref = React.createRef()\n\t}\n\n\tstatic getFileState(file) {\n\t\tif (!file || typeof file === 'string') {\n\t\t\treturn {\n\t\t\t\tfile: null,\n\t\t\t\timg: null\n\t\t\t}\n\t\t}\n\t\tconst is_image = file.type.match(/^image\\//) != null\n\t\treturn {\n\t\t\tfile: file,\n\t\t\timg: is_image ? URL.createObjectURL(file) : null\n\t\t}\n\t}\n\n\tstatic getDerivedStateFromProps(nextProps, prevState) {\n\t\tif (!nextProps.hasOwnProperty('file') || nextProps.file === prevState.file) {\n\t\t\treturn null;\n\t\t}\n\t\treturn InputFile.getFileState(nextProps.file);\n\t}\n\n\tonChange = (e) => {\n\t\tif (e.currentTarget.files.length == 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst state = InputFile.getFileState(e.currentTarget.files[0]);\n\t\tthis.setState(state);\n\t\tif (this.props.model && this.props.name) {\n\t\t\tthis.props.model[this.props.name] = e.currentTarget.files[0];\n\t\t}\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(e);\n\t\t}\n\t}\n\n\tonRemove = (e) => {\n\t\te.preventDefault()\n\t\tthis.setState({\n\t\t\tfile: null,\n\t\t\timg: null\n\t\t});\n\t\tif (this.props.model && this.props.name) {\n\t\t\tthis.props.model[this.props.name] = null;\n\t\t}\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(null);\n\t\t}\n\t}\n\n\tonEdit = (e) => {\n\t\te.preventDefault()\n\t\tthis.ref.current.click()\n\t}\n\n\tgetRemoveButton(transparency = 'btn-transparent') {\n\t\treturn (\n\t\t\t!this.props.hasOwnProperty('readOnly') || this.props.readOnly == 0\n\t\t\t\t?\t<button key='x' type='button' className={classNames('btn xdel btn-circular', transparency)} onClick={this.onRemove}>\n\t\t\t\t\t\t<em className=\"la la-trash danger pointer\"/>\n\t\t\t\t\t</button>\n\t\t\t\t: null\n\t\t)\n\t}\n\n\tgetEditButton(transparency = 'btn-transparent', classname = 'edt') {\n\t\treturn (\n\t\t\t!this.props.hasOwnProperty('readOnly') || this.props.readOnly == 0\n\t\t\t\t?\t<button key='e' type='button' className={classNames('btn btn-circular', classname, transparency)} onClick={this.onEdit}>\n\t\t\t\t\t\t<em className=\"la la-pencil pointer\"/>\n\t\t\t\t\t</button>\n\t\t\t\t: null\n\t\t)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconst { model, name, file } = this.props\n\t\tconst value = model && name ? model[name] : file\n\n\t\tif (!value) {\n\t\t\tthis.ref.current.value = ''\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { type, model, name, className, file, imageNone, readOnly, required } = this.props\n\t\tconst as_image = type == 'image'\n\t\tlet thumb\n\t\tlet remove = null\n\t\tconst value = model && name ? model[name] : file\n\t\tconst id = this.props.id || 'file'\n\n\t\tif (this.state.img) {\n\t\t\tthumb =\n\t\t\t\t<label htmlFor={id}>\n\t\t\t\t\t{required ? <img className='required' src=\"/public/admin/img/required.gif\" alt=\"x\" /> : null}\n\t\t\t\t\t<img src={this.state.img} />\n\t\t\t\t\t{this.getEditButton(null)}\n\t\t\t\t\t{this.getRemoveButton(null)}\n\t\t\t\t\t<span className='filename'>{this.state.file.name}</span>\n\t\t\t\t</label>\n\t\t}\n\t\telse if (this.state.file) {\n\t\t\tthumb =\n\t\t\t\t<label htmlFor={id}>\n\t\t\t\t\t<em className=\"la la-file-alt\" />\n\t\t\t\t\t{this.state.file.name}\n\t\t\t\t</label>\n\t\t\tremove = this.getRemoveButton()\n\t\t}\n\t\telse {\n\t\t\tlet label;\n\n\t\t\tif (this.props.hasOwnProperty('label')) {\n\t\t\t\tlabel = this.props.label;\n\t\t\t}\n\t\t\telse if (model && typeof model[name] == 'string' && model[name]) {\n\t\t\t\tif (as_image) {\n\t\t\t\t\tlabel = [\n\t\t\t\t\t\t<img key='i' src={model[name]} />,\n\t\t\t\t\t\tthis.getRemoveButton(null),\n\t\t\t\t\t\tthis.getEditButton(null)\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel = /(png|jpg|jpeg|gif|webp|bmp)/.test(model[name] || '') ? <img src={'/' + file} /> : <span className='legend-label'>{model[name]}</span>\n\t\t\t\t\tremove = this.getRemoveButton()\n\t\t\t\t}\n\t\t\t\t//label = as_image ? <img src={model[name]} /> : model;\n\t\t\t\t//remove = this.getRemoveButton()\n\t\t\t}\n\t\t\telse if (imageNone) {\n\t\t\t\tlabel = [\n\t\t\t\t\t<img key='i' src={imageNone} />,\n\t\t\t\t\tthis.getEditButton(null, 'xdel')\n\t\t\t\t]\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlabel = __(as_image ? 'attrs_upload_image' : 'attrs_upload_file');\n\t\t\t}\n\t\t\tthumb =\n\t\t\t\t<label htmlFor={id} className=\"none\">\n\t\t\t\t\t{required ? <img className='required' src=\"/public/admin/img/required.gif\" alt=\"x\" /> : null}\n\t\t\t\t\t{label}\n\t\t\t\t</label>\n\t\t\t/*\n\t\t\tconst current = this.props.model && typeof this.props.model[this.props.name] == 'string' ? this.props.model[this.props.name] : null;\n\t\t\tthumb =\n\t\t\t\t<label htmlFor=\"file\" className=\"none\">\n\t\t\t\t\t{this.props.label || current || __(as_image ? 'attrs_upload_image' : 'attrs_upload_file')}\n\t\t\t\t</label>\n\t\t\t*/\n\t\t}\n\t\treturn (\n\t\t\t<div className={classNames(className || \"file\", readOnly == true ? 'readonly' : null)} title={this.props.title || null}>\n\t\t\t\t{thumb}\n\t\t\t\t<input type=\"file\" id={id} disabled={readOnly == true} multiple={this.props.multiple || null}\n\t\t\t\t\tfilename={value instanceof Object ? value.name : value}\n\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\tref={this.ref}\n\t\t\t\t\taccept={this.props.accept || (as_image ? 'image/*' : null)}\n\t\t\t\t/>\n\t\t\t\t{remove}\n\t\t\t\t{this.props.children || null}\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nexport class Textarea extends TextComponent {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.onChange = this.onChange.bind(this)\n\t}\n\n\tonChange(e) {\n\t\tlet name = this.props.mapName || this.props.name;\n\n\t\tif (this.props.model && name) {\n\t\t\tthis.props.model[name] = e.currentTarget.value;\n\t\t\tthis.forceUpdate();\n\t\t}\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange()\n\t\t}\n\t}\n\n\trenderElement() {\n\t\tconst base_class = this.props.label ? null : (this.props.className || null)\n\t\tconst classes = classNames(base_class ?? 'form-control', this.props.required ? 'required' : null)\n\n\t\tconst el =\n\t\t\t<textarea\n\t\t\t\tid={this.props.name}\n\t\t\t\tclassName={classes || this.props.classNameEl || null}\n\t\t\t\trows={this.props.rows || 4}\n\t\t\t\tvalue={this.props.model && this.props.name ? this.props.model[this.props.name] || '' : ''}\n\t\t\t\tonChange={this.onChange}\n\t\t\t\trequired={this.props.required ?? null}\n\t\t\t\tminLength={this.props.minLength ?? null}\n\t\t\t\tmaxLength={this.props.maxLength ?? null}\n\t\t\t\tautoFocus={this.props.autoFocus ?? null}\n\t\t\t\tdisabled={this.props.disabled ?? null}\n\t\t\t/>;\n\t\treturn (!this.props.classNameControl ? el : <div className={this.props.classNameControl}>{el}</div>);\n\t}\n}\n\n\nexport class Search extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = { value: props.initValue || '', timeout: 0 }\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.state.value = this.props.initValue || '';\n\t}\n\n\tstatic getDerivedStateFromProps(nextProps, prevState) {\n\t\tif (prevState.timeout == 0 && nextProps.value && nextProps.value != prevState.value) {\n\t\t\treturn {value: nextProps.value};\n\t\t}\n\t\treturn null;\n\t}\n\n\tonClick = () => {\n\t\tif (this.props.doSearch) {\n\t\t\tthis.props.doSearch(this.state.value);\n\t\t}\n\t}\n\n\tonChange = (e) => {\n\t\tconst timeout = this.props.timeout === undefined ? 500 : this.props.timeout\n\n\t\tif (this.state.timeout > 0) {\n\t\t\tclearTimeout(this.state.timeout);\n\t\t\tthis.state.timeout = 0;\n\t\t}\n\t\tconst value = e.currentTarget.value;\n\n\t\tif (timeout > 0 && this.props.doSearch) {\n\t\t\tthis.state.timeout = setTimeout(() => {\n\t\t\t\tthis.props.doSearch(value.toLowerCase().normalize());\n\t\t\t\tthis.state.timeout = 0;\n\t\t\t}, timeout);\n\t\t}\n\t\tthis.setState({value: value});\n\t}\n\n\tonClear() {\n\t\tthis.setState({value: ''});\n\t}\n\n\trender() {\n\t\tconst {showSearchButton, showSearchIcon, name} = this.props;\n\t\tconst el =\n\t\t\t<input name={name || null}\n\t\t\t\ttype='text'\n\t\t\t\tclassName={this.props.className || 'prompt form-control'}\n\t\t\t\tplaceholder={(this.props.placeholder || __('attrs_search')) + '...'}\n\t\t\t\tvalue={this.state.value}\n\t\t\t\tonChange={this.onChange}\n\t\t\t\tstyle={this.props.style || null}\n\t\t\t/>;\n\n\t\tif (showSearchButton || showSearchIcon || this.props.actions) {\n\t\t\treturn (\n\t\t\t\t<div className={this.props.classNameCtnr || 'input-group input-group-sm'} style={this.props.style || null}>\n\t\t\t\t\t{this.props.onCheckAll\n\t\t\t\t\t\t? <span className=\"input-group-addon\">\n\t\t\t\t\t\t\t<input type=\"checkbox\" value={1} checked={this.props.checked} onChange={this.props.onCheckAll} />\n\t\t\t\t\t\t </span>\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t\tshowSearchIcon\n\t\t\t\t\t\t\t\t? <span className=\"input-group-addon\"><em className=\"la la-search\" /></span>\n\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\t{this.props.actions || null}\n\t\t\t\t\t{el}\n\t\t\t\t\t{showSearchButton\n\t\t\t\t\t\t? <span className=\"input-group-btn\">\n\t\t\t\t\t\t\t<button className=\"btn btn-default\" type=\"button\" onClick={this.onClick}>\n\t\t\t\t\t\t\t\t<em className='la la-search' />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t: null\n\t\t\t\t\t}\n\t\t\t\t\t{/*this.state.value == '' || this.state.value == undefined\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: <em\n\t\t\t\t\t\t\tclassName='la la-times'\n\t\t\t\t\t\t\tonClick={this.onClear.bind(this)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t*/}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn el;\n\t}\n}\n\nexport class Checkbox extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.ref = React.createRef()\n\t}\n\n\tonClick = (e) => {\n\t\tif (this.props.disabled) {\n\t\t\treturn;\n\t\t}\n\t\tlet checked;\n\t\tlet name = this.props.mapName || this.props.name;\n\n\t\t//e.stopPropagation();\n\t\tif (this.props.model) {\n\t\t\tif (!this.props.bitwise) {\n\t\t\t\tthis.props.model[name] = this.props.model[name] == false || this.props.model[name] == undefined ? 1 : 0;\n\t\t\t}\n\t\t\telse if ((this.props.model[name] & this.props.bitwise) == this.props.bitwise) {\n\t\t\t\tthis.props.model[name] = this.props.model[name] - (this.props.model[name] & this.props.bitwise);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.props.model[name] |= this.props.bitwise;\n\t\t\t}\n\t\t\tchecked = this.props.model[name];\n\t\t\tif (this.props.model.onChange instanceof Function) {\n\t\t\t\tthis.props.model.onChange(name, checked);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tchecked = this.ref.current.value;\n\t\t}\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(checked, e);\n\t\t}\n\t\telse if (this.props.onClick) {\n\t\t\tthis.props.onClick(e);\n\t\t}\n\t\telse {\n\t\t\tthis.forceUpdate();\n\t\t}\n\t}\n\n\trender() {\n\t\tlet name = this.props.mapName || this.props.name;\n\t\tlet checked = this.props.model\n\t\t\t? (!this.props.bitwise\n\t\t\t\t? this.props.model[name] == true\n\t\t\t\t: (this.props.model[name] & this.props.bitwise) == this.props.bitwise\n\t\t\t)\n\t\t\t: this.props.checked;\n\n\t\treturn (\n\t\t\t<div className={(this.props.className || null)} title={this.props.title || null}>\n\t\t\t\t<input\n\t\t\t\t\ttype={this.props.type || \"checkbox\"}\n\t\t\t\t\tref={this.ref}\n\t\t\t\t\tid={this.props.id || this.props.name}\n\t\t\t\t\tname={this.props.name || null}\n\t\t\t\t\tclassName='form-check-input'\n\t\t\t\t\tchecked={checked}\n\t\t\t\t\t//onChange={this.props.onChange || null}\n\t\t\t\t\tonChange={this.onClick}\n\t\t\t\t/>\n\t\t\t\t<label htmlFor={this.props.id || this.props.name} className={classNames(\"ml-1 pointer\", this.props.classNameLabel || null)}>{this.props.label}</label>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n\nexport class Switch extends Checkbox {\n\trender() {\n\t\tconst name = this.props.mapName || this.props.name;\n\t\tconst checked = this.props.model\n\t\t\t? (!this.props.bitwise\n\t\t\t\t? this.props.model[name] == true\n\t\t\t\t: (this.props.model[name] & this.props.bitwise) == this.props.bitwise\n\t\t\t)\n\t\t\t: this.props.checked;\n\t\tconst id = this.props.id || this.props.name\n\n\t\treturn (\n\t\t\t<label className={classNames('mtoggle', this.props.className || null)} title={this.props.title || null}>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tid={id}\n\t\t\t\t\tref={this.ref}\n\t\t\t\t\tclassName='switch'\n\t\t\t\t\tchecked={checked}\n\t\t\t\t\tonChange={this.onClick}\n\t\t\t\t\tdisabled={this.props.disabled || null}\n\t\t\t\t/>\n\t\t\t\t<div className='mtoggle_fill' />\n\t\t\t</label>\n\t\t);\n\t}\n}\n\nexport class Toggle extends Checkbox {\n\trender() {\n\t\tconst { className, title, label, disabled } = this.props\n\t\tconst name = this.props.mapName || this.props.name;\n\t\tconst checked = this.props.model\n\t\t\t? (!this.props.bitwise\n\t\t\t\t? this.props.model[name] == true\n\t\t\t\t: (this.props.model[name] & this.props.bitwise) == this.props.bitwise\n\t\t\t)\n\t\t\t: this.props.checked;\n\n\t\treturn (\n\t\t\t<label className={classNames('toggle', disabled ? null : 'pointer', className || null)} title={title || null} onClick={this.onClick}>\n\t\t\t\t<em className={classNames(checked ? 'la la-toggle-on' : 'la la-toggle-off', disabled ? 'disabled' : null)} ref={this.ref} />\n\t\t\t\t{label ? <span>{label}</span> : null}\n\t\t\t</label>\n\t\t);\n\t}\n}\n\n\nexport class Radio extends React.Component {\n\tonChange = (e) => {\n\t\tif (this.props.disabled) {\n\t\t\treturn;\n\t\t}\n\t\tconst { model, name, bitwise, onChange } = this.props\n\t\tconst value = e.currentTarget.value\n\n\t\te.stopPropagation()\n\t\tif (model) {\n\t\t\tif (!bitwise) {\n\t\t\t\tmodel[name] = value;\n\t\t\t}\n\t\t\telse if ((model[name] & bitwise) == bitwise) {\n\t\t\t\tmodel[name] = model[name] - (model[name] & bitwise);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmodel[name] |= bitwise;\n\t\t\t}\n\t\t}\n\t\tif (onChange) {\n\t\t\tonChange(value);\n\t\t}\n\t\telse {\n\t\t\tthis.forceUpdate();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { model, name, values, className, classNameBtnDef, title, required, disabled } = this.props\n\t\tlet value = model\n\t\t\t? (!this.props.bitwise\n\t\t\t\t? model[name]\n\t\t\t\t: (model[name] & this.props.bitwise)\n\t\t\t)\n\t\t\t: this.props.value;\n\t\tlet components = [];\n\t\tconst cls_def = classNameBtnDef || 'btn-default';\n\n\t\t(values || []).forEach((v, i) => {\n\t\t\tcomponents.push(\n\t\t\t\t<label key={i} htmlFor={name + i} className={classNames('btn', value == v.value ? 'btn-default active' : cls_def, disabled ? 'disabled' : null)}>\n\t\t\t\t\t<input key={i} type=\"radio\" id={name + i} name={name} value={v.value} checked={value == v.value} className=\"switch\" onChange={this.onChange} />\n\t\t\t\t\t<span>{v.label}</span>\n\t\t\t\t</label>\n\t\t\t);\n\t\t})\n\t\treturn (\n\t\t\t<div className=\"flex-center\">\n\t\t\t\t<div className={classNames('btn-group btn-switch', className || null)} title={title || ''}>\n\t\t\t\t\t{components}\n\t\t\t\t</div>\n\t\t\t\t{required ? <span className=\"required\" /> : null}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n\nexport class MonthPicker extends TextComponent {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {editingValue: null};\n\t\tthis.ref = React.createRef();\n\t}\n\n \tgetValue() {\n\t\tlet value = this.state.editingValue || (this.props.model ? (this.props.model[this.props.name] || '') : '');\n\t\tif (value instanceof Date) {\n\t\t\tvalue =\tformat(value, this.props.format || 'yyyy-MM');\n\t\t}\n\t\treturn value\n\t}\n\n\tonCalendarIconClick(e) {\n\t\tif (this.props.onCalendarIconClick) {\n\t\t\tthis.props.onCalendarIconClick(e.target.value)\n\t\t}\n\t\telse {\n\t\t\t$('#'+this.props.name).datepicker('show');\n\t\t}\n\t};\n\n\tonChange(e) {\n\t\tlet value = e.target.value;\n\t\tif(!e.target.value) {\n\t\t\tthis.props.model[this.props.name] = null;\n\t\t\tvalue = null;\n\t\t}\n\t\tif(this.props.model) {\n\t\t\tthis.props.model[this.props.name] = e.target.value;\n\t\t}\n\t\tthis.setState({editingValue: value});\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(e.target.value)\n\t\t}\n\t}\n\n\tonBlur() {\n\t\tif (this.state.editingValue) {\n\t\t\tlet value = Date.parse(this.state.editingValue);\n\t\t\tif (!isNaN(value)) {\n\t\t\t\tthis.props.model[this.props.name] = new Date(value);\n\t\t\t}\n\t\t\tif (this.props.onChange instanceof Function) {\n\t\t\t\tthis.props.onChange(this.state.editingValue, value);\n\t\t\t}\n\t\t\tthis.setState({editingValue: null});\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\t$(this.ref.current).datepicker({\n\t \t\tonClose: (dateText, inst) => {\n\t\t\t\tthis.state.editingValue = new Date(inst.selectedYear, inst.selectedMonth, 1);\n\t\t\t\t$('#ui-datepicker-div').removeClass('ui-calendar-only-month');\n\t\t\t\tthis.onBlur();\n\t\t\t},\n \t\t\tbeforeShow:(input, inst) => {\n\t\t\t\t$('#ui-datepicker-div').addClass('ui-calendar-only-month');\n\t\t\t},\n\t\t\tminDate: this.props.minDate || null,\n\t\t\tmaxDate: this.props.maxDate || null,\n \t\t\tchangeMonth: this.props.changeMonth || null,\n\t\t\tchangeYear: this.props.changeYear || null,\n\t\t\tformat: this.props.format || 'yyyy-MM',\n\t\t\tshowOn: this.props.showOn || 'none',\n\t\t\tshowButtonPanel: this.props.showButtonPanel || null,\n\t\t});\n\t}\n\n\tcomponentWillReceiveProps () {\n\t\t$(this.ref.current)\n\t\t\t.datepicker('option', 'minDate', this.props.minDate || null)\n\t\t\t.datepicker('option', 'maxDate', this.props.maxDate || null)\n \t\t\t.datepicker('option', 'changeMonth', this.props.changeMonth || null)\n\t\t\t.datepicker('option', 'changeYear', this.props.changeYear || null)\n\t\t\t.datepicker('option', 'format', this.props.format || null)\n\t\t\t.datepicker('option', 'showButtonPanel', this.props.showButtonPanel || null) ;\n\t}\n\n\trenderElement() {\n\t\tconst el =\n\t\t\t<div className='input-group'>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tid={this.props.name || null}\n\t\t\t\t\tref={this.ref}\n\t\t\t\t\tclassName={classNames([\"form-control input-sm\", this.props.classNameEl, this.props.required ? 'required' : null])}\n\t\t\t\t\tvalue={this.getValue()}\n\t\t\t\t\tonChange={this.onChange.bind(this)}\n\t\t\t\t\tonBlur={this.onBlur.bind(this)}\n\t\t\t\t\tplaceholder={this.props.placeholder || null}\n\t\t\t\t\tdisabled={this.props.disabled || null}\n\t\t\t\t\trequired={this.props.required || null}\n\t\t\t\t\tautoComplete={this.props.autoComplete || null }\n\t\t\t\t/>\n\t\t\t\t<span className=\"input-group-addon last input-sm\" onClick={this.onCalendarIconClick.bind(this)}><em className=\"la la-calendar\"></em></span>\n\t\t\t</div>;\n\t\treturn (!this.props.classNameControl ? el : <div className={this.props.classNameControl}>{el}</div>);\n\t}\n}\n\nexport class DatePicker extends TextComponent {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {editingValue: null};\n\t\tthis.ref = React.createRef();\n\t\tthis.onChange = this.onChange.bind(this)\n\t\tthis.onBlur = this.onBlur.bind(this)\n\t}\n\n\tgetValue() {\n\t\tvar value = this.props.value || (this.props.model ? this.props.model[this.props.name] : null);\n\t\treturn !value || value instanceof Date ? value : new Date(value);\n\t}\n\n\tonChange(e) {\n\t\tthis.setState({editingValue: e.target.value});\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(e.target.value)\n\t\t}\n\t}\n\n\tonBlur() {\n\t\tif (this.state.editingValue) {\n\t\t\tlet value = Date.parse(this.state.editingValue);\n\n\t\t\tif (!isNaN(value)) {\n\t\t\t\tthis.props.model[this.props.name] = new Date(value);\n\t\t\t}\n\t\t\tif (this.props.onChange instanceof Function) {\n\t\t\t\tthis.props.onChange(this.state.editingValue, value);\n\t\t\t}\n\t\t\tthis.setState({editingValue: null});\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\t$(this.ref.current).datepickr({\n\t\t\tonSelect: value => {\n\t\t\t\tthis.state.editingValue = value;\n\t\t\t\tthis.onBlur();\n\t\t\t},\n\t\t\tminDate: this.props.minDate || null,\n\t\t\tmaxDate: this.props.maxDate || null\n\t\t});\n\t}\n\n\tcomponentWillReceiveProps(props) {\n\t\t$(this.ref.current)\n\t\t\t.datepickr('option', 'minDate', props.minDate || null)\n\t\t\t.datepickr('option', 'maxDate', props.maxDate || null);\n\t}\n\n\trenderElement() {\n\t\tlet value = this.state.editingValue || (this.props.model ? (this.props.model[this.props.name] || '') : '');\n\n\t\tif (value instanceof Date) {\n\t\t\tvalue = format(value, 'yyyy-MM-dd');\n\t\t}\n\t\tconst el =\n\t\t\t<input\n\t\t\t\ttype=\"text\"\n\t\t\t\tid={this.props.name || null}\n\t\t\t\tref={this.ref}\n\t\t\t\tclassName={classNames([\"form-control input-sm\", this.props.classNameEl, this.props.required ? 'required' : null])}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={this.onChange}\n\t\t\t\tonBlur={this.onBlur}\n\t\t\t\tplaceholder={this.props.placeholder || null}\n\t\t\t\tdisabled={this.props.disabled || null}\n\t\t\t\trequired={this.props.required || null}\n\t\t\t\tautoComplete={this.props.autoComplete || null }\n\t\t\t/>;\n\t\treturn (!this.props.classNameControl ? el : <div className={this.props.classNameControl}>{el}</div>);\n\t}\n}\n\nexport class DateTimePicker extends Input {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state.type = props && props.type ? props.type : \"datetime-local\";\n\t}\n\t/*\n\tcomponentDidMount() {\n\t\t$(this.ref.current).datetimepicker({\n\t\t\tonSelect: value => {\n\t\t\t\tthis.state.editingValue = value;\n\t\t\t\tthis.onBlur();\n\t\t\t},\n\t\t\tautoclose: true,\n\t\t\tformat: 'Y-m-d H:i',\n\t\t\tminDate: this.props.minDate || null,\n\t\t\tmaxDate: this.props.maxDate || null\n\t\t});\n\t}\n\n\tcomponentWillReceiveProps(props) {\n\t\t$(this.ref.current)\n\t\t\t.datetimepicker('option', 'minDate', props.minDate || null)\n\t\t\t.datetimepicker('option', 'maxDate', props.maxDate || null);\n\t}\n\t*/\n}\n\n\nexport class Select extends TextComponent {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tinputValue: null,\n\t\t\tselectedOption: null\n\t\t};\n\t\tthis.timeout = 0;\n\t\tthis.inputText = null\n\t}\n\n\tstatic getSelectedOption(props, state) {\n\t\tconst options = props.options || state.defaultOptions || [];\n\t\tconst has_model_name = props.model && props.name\n\t\tconst value = has_model_name ? props.model[props.name] : props.value;\n\n\t\tif (state.selectedOption && state.selectedOption == value) {\n\t\t\treturn state.selectedOption;\n\t\t}\n\t\tif (value === null || value === undefined || options.length == 0) {\n\t\t\treturn null;\n\t\t}\n\t\tif (Array.isArray(value)) {\n\t\t\tconst selection = [];\n\t\t\tlet k;\n\t\t\tfor (let i = 0, l = value.length; i < l; i ++) {\n\t\t\t\tlet v = value[i];\n\t\t\t\tif ((k = options.findIndex(e => e.value == v)) >= 0) {\n\t\t\t\t\tselection.push(options[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn selection;\n\t\t}\n\t\tif (options.length == 0) {\n\t\t\treturn null\n\t\t}\n\t\tif (has_model_name && options[0].hasOwnProperty(props.name) && (props.useNameAsValue === undefined || props.useNameAsValue == true)) {\n\t\t\treturn options.find(e => e[props.name] == value);\n\t\t}\n\t\treturn options.find(e => e.value == value);\n\t}\n\n\tstatic getDerivedStateFromProps(props, state) {\n\t\tconst selected = Select.getSelectedOption(props, state)\n\t\tif (selected) {\n\t\t\treturn {selectedOption: selected}\n\t\t}\n\t\treturn null\n\t}\n\n\tonInputChange = (text) => {\n\t\tif (text) {\n\t\t\tthis.inputText = text\n\t\t}\n\t}\n\n\tonChange = (_selectedOption) => {\n\t\tlet selectedOption = _selectedOption || [];\n\t\tconst { model, name, onChange } = this.props\n\n\t\tif (model) {\n\t\t\tconst id = selectedOption.hasOwnProperty(name) && (this.props.useNameAsValue === undefined || this.props.useNameAsValue == true)\n\t\t\t\t? name\n\t\t\t\t: (selectedOption.hasOwnProperty('id') ? 'id' : 'value');\n\t\t\tmodel[name] = Array.isArray(selectedOption)\n\t\t\t\t? selectedOption.reduce((selection, current) => {\n\t\t\t\t\tselection.push(current[id])\n\t\t\t\t\treturn selection\n\t\t\t\t}, [])\n\t\t\t\t: (selectedOption[id] || selectedOption[id] === 0 ? selectedOption[id] : null);\n\t\t}\n\t\tif (onChange instanceof Function) {\n\t\t\tselectedOption.inputText = this.inputText\n\t\t\tonChange(selectedOption);\n\t\t}\n\n\t\tif (_selectedOption === null) {\n\t\t\tselectedOption = [];\n\t\t}\n\n\t\tthis.setState({ selectedOption });\n\t}\n\n\tonInputChange(inputValue) {\n\t\tthis.setState({ inputValue });\n\t\treturn inputValue;\n\t}\n\n\tloadOptions = (inputValue, callback) => {\n\t\tif (this.timeout > 0) {\n\t\t\tclearTimeout(this.timeout);\n\t\t\tthis.timeout = 0;\n\t\t}\n\t\tif (!inputValue) {\n\t\t\treturn callback([]);\n\t\t}\n\t\tthis.timeout = setTimeout(() => {\n\t\t\thttp.get(this.props.url, { data: {term: inputValue} }, (response) => {\n\t\t\t\tconst results = response.results || response\n\t\t\t\t// mantem a select com os ultimos resultados pesquisados\n\t\t\t\tthis.setState({ defaultOptions: results });\n\t\t\t\tcallback(results);\n\t\t\t});\n\t\t\tthis.timeout = 0;\n\t\t}, 500);\n\t}\n\n\tnoOptionsMessage = (props) => {\n\t\tif (this.state.inputValue === null || this.state.inputValue === '') {\n\t\t return (\n\t\t\t<span {...props.innerProps} align=\"center\" variant=\"title\">\n\t\t\t {__('attrs_search')}...\n\t\t\t</span>\n\t\t );\n\t\t}\n\t\treturn (\n\t\t <span {...props.innerProps} align=\"center\" variant=\"title\">\n\t\t\treveja a sua pesquisa\n\t\t </span>\n\t\t);\n\t}\n\n\tgetOptionValue = (el) => this.props.optionValue ? el[this.props.optionValue] : (el.value || el.id)\n\tgetOptionLabel = (el) => this.props.optionLabel ? el[this.props.optionLabel] : (el.label || el.text || el.value)\n\tgetStyle = (base) => ({ ...base, zIndex: 1999 })\n\n\tgetAssyncSelectObs = () => {\n\t\tconst optionLabel = this.props.optionLabel ?? 'label';\n\t\treturn { \n\t\t\tvalue: null, \n\t\t\t[optionLabel]: __('attrs_async_select_obs'),\n\t\t\tisDisabled: true \n\t\t}\n\t}\n\n\tgetDefaultOptions = () => {\n\t\tconst options = this.state.defaultOptions || this.props.options || [];\n\n\t\tif(this.props.hideObs) {\n\t\t\treturn options;\n\t\t}\n\n\t\treturn [this.getAssyncSelectObs(), ...options];\n\t}\n\n\trenderElement() {\n\t\tconst p = this.props\n\t\tconst options = p.options || [];\n\t\tconst el = !p.url\n\t\t\t? <ReactSelect.default\n\t\t\t\tplaceholder={p.placeholder || __('attrs_pick_option')}\n\t\t\t\tvalue={this.state.selectedOption}\n\t\t\t\toptions={options}\n\t\t\t\tonChange={this.onChange}\n\t\t\t\tonInputChange={this.onInputChange}\n\t\t\t\tisDisabled={p.disabled || null}\n\t\t\t\trequired={p.required || null}\n\t\t\t\tisMulti={p.isMulti || null}\n\t\t\t\tnoOptionsMessage={this.noOptionsMessage}\n\t\t\t\tgetOptionValue={this.getOptionValue}\n\t\t\t\tgetOptionLabel={this.getOptionLabel}\n\t\t\t\tclassName={`rselect ${p.classNameSelect || ''}${p.required ? ' required' : ''}`}\n\t\t\t\tclassNamePrefix='rselect'\n\t\t\t\tisClearable={p.isClearable ?? true}\n\t\t\t\tmenuPortalTarget={document.body}\n\t\t\t\tstyles={{ menuPortal: this.getStyle }}\n\t\t\t />\n\t\t\t:\n\t\t\t<AsyncSelect\n\t\t\t\tplaceholder={p.placeholder || __('attrs_pick_option')}\n\t\t\t\tcacheOptions={p.cacheOptions || false}\n\t\t\t\tdefaultOptions={this.getDefaultOptions()}\n\t\t\t\tvalue={this.state.selectedOption}\n\t\t\t\tloadOptions={this.loadOptions}\n\t\t\t\tonChange={this.onChange}\n\t\t\t\tonInputChange={this.onInputChange}\n\t\t\t\tisDisabled={p.disabled || null}\n\t\t\t\trequired={p.required || null}\n\t\t\t\tisMulti={p.isMulti || null}\n\t\t\t\tnoOptionsMessage={this.noOptionsMessage}\n\t\t\t\tgetOptionValue={this.getOptionValue}\n\t\t\t\tgetOptionLabel={this.getOptionLabel}\n\t\t\t\tisClearable={p.isClearable ?? true}\n\t\t\t\tclassName={`rselect ${p.classNameSelect || ''}${p.required ? ' required' : ''}`}\n\t\t\t\tclassNamePrefix='rselect'\n\t\t\t\tloadingMessage={() => <span className='la la-ellipsis-h' />}\n\t\t\t\tmenuPortalTarget={document.body}\n\t\t\t\tstyles={{ menuPortal: this.getStyle }}\n\t\t\t/>\n\t\treturn (!p.classNameControl ? el : <div className={p.classNameControl}>{el}</div>);\n\t}\n}\n\n\n/**\n * devolve um object com propriedades por defeito do botão @name\n * @param name nome do button\n */\nconst defModalButton = name => {\n\tif (!hp._defModalButtons) {\n\t\thp._defModalButtons = {\n\t\t\tclose: { text: __('buttons_close'), icon: 'close', close: 'before' },\n\t\t\tcancel: { text: __('buttons_cancel'), icon: 'remove' },\n\t\t\tremove: { text: __('buttons_delete'), icon: 'trash', type: 'danger' },\n\t\t\tsave: { label: __('buttons_save'), icon: 'check', type: 'primary' },\n\t\t\tconfirm: { icon: 'check', type: 'primary' }\n\t\t}\n\t}\n\treturn hp._defModalButtons[name];\n}\n\nexport class Modal extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {buttons: []};\n\t\tthis.ref = React.createRef();\n\t\tthis.setButtons(props ? props.buttons : null);\n\t}\n\n\tonClose() {\n\t\tif (this.props.onClose instanceof Function && this.props.onClose() === false) {\n\t\t\treturn;\n\t\t}\n\t\t$(this.ref.current).modal('hide');\n\t\tif (this.props.onDispose instanceof Function) {\n\t\t\tthis.props.onDispose();\n\t\t}\n\t}\n\n\tonClick(callback, close) {\n\t\tif (close === 'before') {\n\t\t\tthis.onClose();\n\t\t}\n\t\tconst result = callback(this.onClose.bind(this));\n\t\tif (close === 'after' && (typeof result === 'undefined' || result)) {\n\t\t\tthis.onClose();\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tconst modal = $(this.ref.current).modal({\n\t\t\tduration: 100,\n\t\t\tbackdrop: this.props.backdrop === undefined ? true : this.props.backdrop,\n\t\t\tkeyboard: this.props.exitOnEsc === undefined ? true : this.props.exitOnEsc\n\t\t});\n\t\tmodal.modal('show').on('hidden.bs.modal', () => {\n\t\t\tthis.onClose();\n\t\t});\n\t}\n\n\tsetButtons(buttons_def) {\n\t\tconst left = [];\n\t\tconst right = [];\n\n\t\t(buttons_def || [{name: 'close'}]).forEach((btn, i) => {\n\t\t\tif (btn.constructor === String) {\n\t\t\t\tbtn = Object.assign({}, defModalButton(btn));\n\t\t\t}\n\t\t\telse if (btn.name) {\n\t\t\t\tbtn = Object.assign({}, defModalButton(btn.name), btn);\n\t\t\t}\n\t\t\tconst b = btn.tag\n\t\t\t\t? React.createElement(btn.tag, Object.assign({key: i}, btn.props || {}), btn.children || null)\n\t\t\t\t: <button\n\t\t\t\t\tkey={i}\n\t\t\t\t\tclassName={classNames('btn btn-' + (btn.type || 'default btn-light'), btn.className || null)}\n\t\t\t\t\ttitle={btn.title || null}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tif (btn.onClick instanceof Function) {\n\t\t\t\t\t\t\tthis.onClick.call(this, btn.onClick, btn.close || null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.onClose.call(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tdisabled={btn.disabled || false}\n\t\t\t\t >\n\t\t\t\t\t{btn.icon ? <em className={\"la la-\" + btn.icon}/> : null} {btn.text}\n\t\t\t\t </button>;\n\t\t\tbtn.align == 'left' ? left.push(b) : right.push(b);\n\t\t});\n\t\tthis.state.buttons = [\n\t\t\t<div key='l' className=\"btn-group btn-group-sm mr-auto pull-left\">{left}</div>,\n\t\t\t<div key='r' className=\"btn-group btn-group-sm\">{right}</div>\n\t\t];\n\t}\n\n\trenderButtons() {\n\t\treturn this.state.buttons;\n\t}\n\n\tcomponentWillReceiveProps(props) {\n\t\tthis.setButtons(props ? props.buttons : null);\n\t\t$(this.ref.current).modal('show');\n\t}\n\n\tcomponentWillUnmount() {\n\t\t$(this.ref.current).modal('hide');\n\t}\n\n\trenderChildren() {\n\t\treturn this.props.children;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className='modal' ref={this.ref} role='dialog'>\n\t\t\t\t<div className={\"modal-dialog \" + (this.props.className || '')}>\n\t\t\t\t\t<div className=\"modal-content\">\n\t\t\t\t\t\t<div className='modal-header react'>\n\t\t\t\t\t\t\t<h3 className=\"modal-title\">{this.props.title || this.state.title}</h3>\n\t\t\t\t\t\t\t<div className=\"close\" onClick={this.onClose.bind(this)}><em className=\"la la-close la-min\"/></div>\n\t\t\t\t\t\t\t<div className=\"clearfix\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className='modal-body react'>\n\t\t\t\t\t\t\t{this.renderChildren()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className='modal-footer justify-content-between'>\n\t\t\t\t\t\t\t{this.renderButtons()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tstatic show(children, params = {}) {\n\t\tmbox.modal(children, params);\n\t}\n}\nwindow.mbox = {\n\troot: null,\n\trefs: [], // contem as divs que servem de suporte à s modals. o numero de refs representa a quantidade de modals abertas no mesmo instante\n\tmodal: (children, params = {}) => {\n\t\tconst el = document.createElement('div');\n\t\tconst parent = params.parent ? document.getElementById(params.parent) : document.body;\n\n\t\tmbox.root = createRoot(parent.appendChild(el))\n\t\tmbox.refs.push(el);\n\n\t\tmbox.root.render(\n\t\t\t<Modal\n\t\t\t\t{...params}\n\t\t\t\tonClose={ () => params.onClose != null ? params.onClose() : true }\n\t\t\t\tonDispose={() => { mbox.dismiss(el) }}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Modal>\n\t\t)\n\t},\n\n\tshow: (message, title, icon, buttons = undefined, onClose = null) => {\n\t\tif (typeof message === \"string\") {\n\t\t\tmessage = <div dangerouslySetInnerHTML={{__html: message}} />\n\t\t}\n\t\tmbox.modal(\n\t\t\t<table style={{width: '100%'}}>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style={{padding: '10px 20px', width: '50px'}} valign='top'>\n\t\t\t\t\t\t\t<em className={'las la-' + icon + ' la-5x'} />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>{message}</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>, {\n\t\t\t\ttitle: title,\n\t\t\t\tbuttons: buttons,\n\t\t\t\tonClose: onClose\n\t\t\t}\n\t\t)\n\t},\n\n\tdismiss: (ref = null) => {\n\t\tif (!ref) {\n\t\t\tif (mbox.refs.length == 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tref = mbox.refs.pop();\n\t\t\tmbox.root.unmount(ref)\n\t\t}\n\t\telse {\n\t\t\tconst i = mbox.refs.indexOf(ref);\n\t\t\tif (i >= 0) {\n\t\t\t\tmbox.refs.splice(i, 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (ref && ref.parentElement && ref.parentElement.isConnected) {\n\t\t\tref.parentElement.removeChild(ref);\n\t\t}\n\t},\n\n\tconfirm: (callback, message, title, buttons) => {\n\t\tmbox.show(\n\t\t\tmessage,\n\t\t\ttitle || __('buttons_confirm'),\n\t\t\t'question-circle', buttons || [\n\t\t\t\t{ type: 'primary', icon: 'check', title: __('buttons_confirm'), onClick: callback },\n\t\t\t\t'cancel'\n\t\t\t]\n\t\t)\n\t},\n\n\tconfirmDelete: (callback, message, title, id) => {\n\t\tmbox.show(\n\t\t\t__('attrs_delete_item_confirm', {id: message || id}),\n\t\t\ttitle || (__('attrs_delete') + (id ? (' [' + id + ']') : '')),\n\t\t\t'question-circle', [\n\t\t\t\t{ name: 'remove', onClick: callback },\n\t\t\t\t'cancel'\n\t\t\t]\n\t\t)\n\t},\n\n\tinfo: (message, title, onClose = null) => {\n\t\tmbox.show(message, title || __('attrs_info'), 'info-circle', [{ type: 'transparent', icon: 'la la-check' }], onClose);\n\t},\n\n\terror: (message, title, onClose = null) => {\n\t\tmbox.show(message, title || __('attrs_error'), 'exclamation-circle red', [], onClose);\n\t}\n}\nmbox.ask = mbox.confirm;\n\n\nexport class Tabs extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.state = {}\n\t\tthis.loaded = {} // memoriza os tabs que já foram carregados\n\t}\n\n\tstatic getDerivedStateFromProps = (props, state) => (\n\t\tprops.activeTab !== undefined\n\t\t\t? {\n\t\t\t\tprevTab: props.activeTab,\n\t\t\t\tactiveTab: state.prevTab != props.activeTab ? props.activeTab : state.activeTab\n\t\t\t}\n\t\t\t: null\n\t)\n\n\tchildren() {\n\t\tif (this.props.children instanceof Array) {\n\t\t\treturn this.props.children.filter(tab => tab != null);\n\t\t}\n\t\treturn this.props.children instanceof Object ? [this.props.children] : [];\n\t}\n\n\tonTabChanged = (e) => {\n\t\tconst name = e.currentTarget.name\n\n\t\tif (name) {\n\t\t\tthis.loaded[name] = 1\n\t\t}\n\t\tthis.setState({activeTab: name});\n\t\tif (this.props.onTabChanged instanceof Function) {\n\t\t\tthis.props.onTabChanged(name);\n\t\t}\n\t}\n\n\tonTabKeyDown = (e) => {\n\t\tconst key = e.key !== undefined ? e.key : e.keyCode\n\n\t\tif (key === 13 || key === 32 || key === 'Enter' || key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.onTabChanged(e)\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {activeTab} = this.state\n\t\tconst children = this.children()\n\t\tlet selected_tab = activeTab ? children.find(tab => activeTab === tab.props.name) : null\n\n\t\tif (( selected_tab = selected_tab || (children.length > 0 ? children[0] : null) ) != null) {\n\t\t\tthis.loaded[selected_tab.props.name] = 1\n\t\t}\n\t\tconst tabs = children.map((tab, i) =>\n\t\t\t<li\n\t\t\t\tkey={i}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ttab === selected_tab ? 'active' : null,\n\t\t\t\t\ttab.props.disabled ? 'disabled' : null\n\t\t\t\t)}\n\t\t\t\ttitle={tab.props.title || null}\n\t\t\t>\n\t\t\t\t<a role='button' tabIndex={0} name={tab.props.name} onClick={tab.props.disabled ? null : this.onTabChanged} onKeyDown={this.onTabKeyDown}>\n\t\t\t\t\t{tab.props.icon ? <em className={tab.props.icon} /> : null}\n\t\t\t\t\t<span className={tab.props.classNameLabel || null}>{tab.props.label || tab.props.title || null}</span>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t)\n\t\tconst tabContent = children.map((tab, i) =>\n\t\t\tselected_tab === tab\n\t\t\t\t? <div key={i} className='tab-pane fade in active'>{tab}</div>\n\t\t\t\t: <div key={i} className='tab-pane fade'>{this.loaded[tab.props.name] == 1 ? tab : null}</div>\n\t\t);\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<div>\n\t\t\t\t\t<ul className={this.props.className || \"nav nav-tabs\"}>\n\t\t\t\t\t\t{tabs}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"tab-content\">\n\t\t\t\t\t{tabContent}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport class Tab extends React.Component {\n\trender() {\n\t\tif (this.props.children instanceof Array) {\n\t\t\treturn (<div>{this.props.children}</div>);\n\t\t}\n\t\treturn (this.props.children || <noscript />);\n\t}\n}\n\n\nexport class Dropdown extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tconst value = props.model && props.name ? props.model[props.name] : null\n\t\tconst item = props.items && value != null\n\t\t\t? props.items.find(item => item.value == value)\n\t\t\t: null\n\t\tthis.state = {selected: item}\n\t}\n\n\tonChange = (e) => {\n\t\tconst { model, name } = this.props\n\t\tconst item = this.props.items[e.currentTarget.value]\n\n\t\tthis.setState({selected: item})\n\t\tif (model && name) {\n\t\t\tmodel[name] = item.value\n\t\t}\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(item)\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { items, className, classNameBtn, renderItem } = this.props\n\t\tconst { selected } = this.state\n\t\tconst cls = classNames('dropdown-toggle', classNameBtn === undefined ? 'btn btn-default' : classNameBtn)\n\t\tconst _items = (items || []).map((item, i) =>\n\t\t\t<li key={i} value={i} onClick={this.onChange} className={item == selected ? 'active' : null}>\n\t\t\t\t{renderItem\n\t\t\t\t\t? renderItem(item)\n\t\t\t\t\t: <a href=\"#\">{this.props.itemLabel ? item[this.props.itemLabel] : (item.label || item.text)}</a>\n\t\t\t\t}\n\t\t\t</li>\n\t\t);\n\t\treturn (\n\t\t\t<div className={classNames(\"btn-group\", className || null)}>\n\t\t\t\t<button className={cls} data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n\t\t\t\t\t{this.props.icon ? <em className={this.props.icon} /> : null}\n\t\t\t\t\t<span>{selected ? (selected.label || selected.text) : (this.props.label || null)}</span>\n\t\t\t\t\t<span className=\"caret\" />\n\t\t\t\t</button>\n\t\t\t\t<ul className={classNames(\"dropdown-menu\", this.props.className)}>\n\t\t\t\t\t{_items}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport const CopyClipboard = (text, message = null) => {\n\tnavigator.clipboard.writeText(text);\n\tnotifications.set([{msg: message || __('buttons_copy_clipboard_success')}])\n}\n\n\nexport class ButtonTaskUpdate extends React.Component {\n\trender() {\n\t\tconst { className } = this.props\n\n\t\treturn (\n\t\t\t<button className={className || \"btn btn-default\"} title={`(${hp.store.update.date}). ${__('buttons_update_tip')}`} onClick={this.props.onClick}>\n\t\t\t\t<em className=\"la la-sync\" />\n\t\t\t\t<span>{__('attrs_updated_at')}: </span>\n\t\t\t\t<span>{hp.store.update.hour} </span>\n\t\t\t</button>\n\t\t)\n\t}\n}\n","import React from 'react'\nimport { Input, Switch } from './common'\n\nclass EmailEditor extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.has_changes = false\n\t\tthis.onChange = this.onChange.bind(this)\n\t\tthis.onBlur = this.onBlur.bind(this)\n\t}\n\n\tonChange(e) {\n\t\tthis.has_changes = true\n\t}\n\n\tonBlur() {\n\t\tif (!this.has_changes) {\n\t\t\treturn\n\t\t}\n\t\tconst { cfg, accounts } = this.props\n\t\tthis.has_changes = false\n\t\tcfg.value = JSON.stringify(accounts)\n\t}\n\n\trender() {\n\t\tconst { account, accounts, cfg } = this.props\n\n\t\treturn (\n\t\t\t<div className='widget-body'>\n\t\t\t\t{account._system == 1 ? null :\n\t\t\t\t <Input model={account} name=\"name\"\n\t\t\t\t\tlabel=\"Nome da conta\"\n\t\t\t\t\tclassName=\"row form-group\"\n\t\t\t\t\tclassNameLabel=\"col-xs-12 col-sm-3\"\n\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-8\"\n\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t />}\n\t\t\t\t<Input model={account} name=\"smtp_server\"\n\t\t\t\t\tlabel=\"Servidor SMTP\"\n\t\t\t\t\tclassName=\"row form-group\"\n\t\t\t\t\tclassNameLabel=\"col-xs-12 col-sm-3\"\n\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-8\"\n\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t/>\n\t\t\t\t<div className=\"row form-group\">\n\t\t\t\t\t<label htmlFor=\"port\" className=\"col-xs-12 col-md-3\">Porta</label>\n\t\t\t\t\t<Input model={account} name=\"port\" type=\"number\"\n\t\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-3\"\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"col-xs-12 col-sm-4\">\n\t\t\t\t\t\t<label className=\"radio-inline\" htmlFor=\"ssh1\">\n\t\t\t\t\t\t\t<input id=\"ssh1\" type=\"radio\" name=\"ssl\" checked={account.ssl == 1 || account.ssl == 'ssl'}\n\t\t\t\t\t\t\t\tonChange={() => {\n\t\t\t\t\t\t\t\t\taccount.ssl = 1\n\t\t\t\t\t\t\t\t\tcfg.value = JSON.stringify(accounts)\n\t\t\t\t\t\t\t\t\tthis.forceUpdate()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\tSSL/TLS\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label className=\"radio-inline\" htmlFor=\"ssh2\">\n\t\t\t\t\t\t\t<input id=\"ssh2\" type=\"radio\" name=\"ssl\" checked={account.ssl == 0}\n\t\t\t\t\t\t\t\tonChange={() => {\n\t\t\t\t\t\t\t\t\taccount.ssl = 0\n\t\t\t\t\t\t\t\t\tcfg.value = JSON.stringify(accounts)\n\t\t\t\t\t\t\t\t\tthis.forceUpdate()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\tNormal\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"row form-group\">\n\t\t\t\t\t<label className=\"col-xs-12 col-md-3 radio-inline\" htmlFor=\"smtp_auth\">Autenticação SMTP</label>\n\t\t\t\t\t<div className=\"col-xs-12 col-md-8\">\n\t\t\t\t\t\t<Switch model={account} name=\"smtp_auth\" onChange={() => {\n\t\t\t\t\t\t\tcfg.value = JSON.stringify(accounts)\n\t\t\t\t\t\t\tthis.forceUpdate()\n\t\t\t\t\t\t}} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Input model={account} name=\"username\"\n\t\t\t\t\tlabel=\"Utilizador\"\n\t\t\t\t\tclassName=\"row form-group\"\n\t\t\t\t\tclassNameLabel=\"col-xs-12 col-sm-3\"\n\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-8\"\n\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t/>\n\t\t\t\t<Input model={account} name=\"password\" type=\"password\"\n\t\t\t\t\tlabel=\"Password\"\n\t\t\t\t\tclassName=\"row form-group\"\n\t\t\t\t\tclassNameLabel=\"col-xs-12 col-sm-3\"\n\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-8\"\n\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t/>\n\t\t\t\t<div className=\"row form-group\">\n\t\t\t\t\t<label htmlFor=\"from\" className=\"col-xs-12 col-md-3\">De</label>\n\t\t\t\t\t<Input model={account} name=\"from\"\n\t\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-3\"\n\t\t\t\t\t\tplaceholder=\"Email\"\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\t/>\n\t\t\t\t\t<Input model={account} name=\"from_name\"\n\t\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-4\"\n\t\t\t\t\t\tplaceholder=\"Nome\"\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"row form-group\">\n\t\t\t\t\t<label htmlFor=\"reply\" className=\"col-xs-12 col-md-3\">Responder para</label>\n\t\t\t\t\t<Input model={account} name=\"reply\" type=\"email\"\n\t\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-3\"\n\t\t\t\t\t\tplaceholder=\"Email\"\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\t/>\n\t\t\t\t\t<Input model={account} name=\"reply_name\"\n\t\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-4\"\n\t\t\t\t\t\tplaceholder=\"Nome\"\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"row form-group\">\n\t\t\t\t\t<label htmlFor=\"inbox\" className=\"col-xs-12 col-md-3\">{__('buttons_inbox_text')}</label>\n\t\t\t\t\t<Input model={account} name=\"inbox\" type=\"email\"\n\t\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-3\"\n\t\t\t\t\t\tplaceholder=\"Email\"\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\t/>\n\t\t\t\t\t<Input model={account} name=\"inbox_name\"\n\t\t\t\t\t\tclassNameControl=\"col-xs-12 col-sm-4\"\n\t\t\t\t\t\tplaceholder=\"Nome\"\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nexport default class EmailManager extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.componentWillReceiveProps(props)\n\t}\n\n\tcomponentWillReceiveProps(props) {\n\t\tthis.accounts = JSON.parse(props.cfg.value)\n\t\tthis.accounts[0]._system = 1\n\t}\n\n\trender() {\n\t\tconst { cfg } = this.props\n\t\tconst accounts = []\n\t\tconst alts = ['even', 'odd']\n\n\t\tthis.accounts.forEach((account, i) => {\n\t\t\tconst cls = alts[i % 2]\n\n\t\t\taccounts.push(\n\t\t\t\t<tr key={i} className={'pointer ' + cls} onClick={() => {\n\t\t\t\t\taccount.expanded = account.expanded == 1 ? 0 : 1\n\t\t\t\t\tthis.forceUpdate()\n\t\t\t\t}}>\n\t\t\t\t\t<td>{account.id || ''}</td>\n\t\t\t\t\t<td>{account.name}</td>\n\t\t\t\t\t<td>{account.username}</td>\n\t\t\t\t\t<td>{account.smtp_server}</td>\n\t\t\t\t\t<td>{account.ssl}</td>\n\t\t\t\t\t<td>{account.port}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<button className=\"btn btn-circular\" title=\"Enviar email de teste\" onClick={e => {\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\thttp.post('/humanportalconfigs/saveEmailAccount.json?test_mode=1', account)\n\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t<em className=\"fa fa-envelope\" />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t{account._system == 1 ? null :\n\t\t\t\t\t\t\t<button className=\"btn btn-circular\" onClick={(e) => {\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.accounts.splice(i, 1)\n\t\t\t\t\t\t\t\tcfg.value = JSON.stringify(this.accounts)\n\t\t\t\t\t\t\t\tthis.forceUpdate()\n\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t<em className=\"la la-trash\" />\n\t\t\t\t\t\t\t</button>}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t)\n\t\t\tif (account.expanded) {\n\t\t\t\taccounts.push(\n\t\t\t\t\t<tr key={i + 'e'} className={cls}>\n\t\t\t\t\t\t<td />\n\t\t\t\t\t\t<td colSpan={6}><EmailEditor account={account} cfg={cfg} accounts={this.accounts} /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<table className=\"table\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>#</th>\n\t\t\t\t\t\t\t<th className='left'>Nome</th>\n\t\t\t\t\t\t\t<th className='left'>Utilizador</th>\n\t\t\t\t\t\t\t<th className='left'>Servidor SMTP</th>\n\t\t\t\t\t\t\t<th className='left'>SSL</th>\n\t\t\t\t\t\t\t<th className='left'>Porta</th>\n\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t<button className=\"btn btn-circular\" onClick={(e) => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.accounts.push({\n\t\t\t\t\t\t\t\t\t\texpanded: 1,\n\t\t\t\t\t\t\t\t\t\tport: 587,\n\t\t\t\t\t\t\t\t\t\tssl: 1,\n\t\t\t\t\t\t\t\t\t\tsmtp_auth: 1\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\tthis.forceUpdate()\n\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t<em className=\"la la-plus\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t{accounts}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t)\n\t}\n}","import React, { useState } from 'react';\nimport {Input, Textarea, Checkbox, Switch, Select, Toggle, Search} from 'components/common';\nimport HtmlEditor from 'components/html-editor'\nimport EmailManager from './email-manager';\n\n\nif (!hp.store.queries) {\n\thp.store.queries = hp.store.queries || {}\n}\n\nconst TimeEditor = function(props) {\n\tconst {model, name, id} = props;\n\tconst [value, setValue] = useState(Number(model[name]) == model[name] ? (model[name] / 60) : 0)\n\n\treturn (\n\t\t<input type='number' id={id || name} value={value} className='form-control input-sm hp-input-max-120' onChange={e => {\n\t\t\tsetValue(e.currentTarget.value);\n\t\t\tmodel[name] = e.currentTarget.value * (props.conversion || 1);\n\t\t}} />\n\t)\n}\n\nclass RegisterEditor extends React.Component {\n\tcomponentDidMount() {\n\t\t// carregar dados\n\t\t//http.get()\n\t}\n\n\trender() {\n\t\tconst {model, name, id} = this.props;\n\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{id}\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nclass CertificateEditor extends React.Component {\n\tonGenerate = () => {\n\t\tconst {model, name, id} = this.props;\n\t\tconst params = {\n\t\t\tname: id,\n\t\t\tcert_path: 'private/security/idp/cert'\n\t\t}\n\t\thttp.post('/humanportalconfigs/genCert.json', params, (response, success) => {\n\t\t\tif (success) {\n\t\t\t\tmodel[name] = response.cert\n\t\t\t\tthis.forceUpdate()\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\tconst {model, name, id} = this.props;\n\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<div className=\"btn-group btn-group-xs\">\n\t\t\t\t\t<button className='btn btn-default' onClick={this.onGenerate}>\n\t\t\t\t\t\t<em className=\"la la-certificate\"/>\n\t\t\t\t\t\t<span>Gerar certificado</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<textarea name={name} id={id} className=\"form-control\" rows=\"10\" readOnly={true} value={model.value || ''} />\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nclass TableEditor extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tconst { cfg } = props;\n\t\tthis.ref = cfg.config && cfg.config.sortable ? React.createRef() : null;\n\t\tthis.sortable_created = false;\n\t}\n\n\tcomponentDidUpdate() {\n\t\tif (!this.ref) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.sortable_created) {\n\t\t\t$(this.ref.current).sortable(\"destroy\");\n\t\t}\n\t\t$(this.ref.current).sortable({\n\t\t\thandle: '.drag',\n\t\t\tupdate: (index, elem) => {\n\t\t\t\tconst new_idx = elem.item.index();\n\t\t\t\tconst old_idx = elem.item[0].getAttribute('aria_index');\n\n\t\t\t\tif (old_idx !== undefined && old_idx != new_idx) {\n\t\t\t\t\tconst { cfg } = this.props;\n\t\t\t\t\tconst _value = cfg._value instanceof Array ? cfg._value : cfg._value[cfg.config.select.active]\n\n\t\t\t\t\t_value.splice(new_idx, 0, _value.splice(old_idx, 1)[0]);\n\t\t\t\t\tcfg.value = JSON.stringify(cfg._value);\nthis.forceUpdate()\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\tthis.sortable_created = true;\n\t}\n\n\tonChange = () => {\n\t\tconst { cfg } = this.props;\n\t\tcfg.value = JSON.stringify(cfg._value);\n\t\tthis.forceUpdate();\n\t}\n\n\trender() {\n\t\tconst { cfg, configs, onGetEditor } = this.props;\n\t\tconst { config } = cfg;\n\t\tlet disabled = false;\n\n\t\tif (config == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (config.url_loader && !config.loaded) {\n\t\t\tconfig.loaded = true\n\t\t\thttp.post(config.url_loader, [], (response, success) => {\n\t\t\t\tif (success) {\n\t\t\t\t\tcfg._value = response\n\t\t\t\t\tcfg.value = JSON.stringify(response)\n\t\t\t\t}\n\t\t\t\tthis.forceUpdate()\n\t\t\t});\n\t\t\treturn\n\t\t}\n\t\tif (config.enabled) {\n\t\t\tconst cfg_enabled = configs.find(el => el.key == config.enabled);\n\t\t\tdisabled = cfg_enabled && cfg_enabled.value == 0;\n\t\t\tif (cfg_enabled) {\n\t\t\t\tcfg_enabled.onChange = () => this.forceUpdate();\n\t\t\t}\n\t\t}\n\t\tconst select = config.select;\n\t\tlet select_el = null;\n\t\tlet cfg_values = cfg._value || (\n\t\t\tcfg._value = JSON.parse(cfg.value ? cfg.value : cfg.default_value) || ((select || config.target) ? {} : [])\n\t\t);\n\t\tif (select) {\n\t\t\tselect.active = select.active || (select.options.length > 0 ? select.options[0].id : null);\n\t\t\tconst options = select.options.map(op =>\n\t\t\t\t<option key={op.id} value={op.id}>{op.label}</option>\n\t\t\t)\n\t\t\tselect_el = config.select_el =\n\t\t\t\t<select value={select.active} title={select.title || null} onChange={e => {\n\t\t\t\t\tselect.active = e.target.value;\n\t\t\t\t\tthis.forceUpdate();\n\t\t\t\t}}>\n\t\t\t\t\t{options}\n\t\t\t\t</select>;\n\t\t\tif (select.label) {\n\t\t\t\tselect_el = <div><label>{select.label}</label>{select_el}</div>\n\t\t\t}\n\t\t\tcfg_values = cfg._value[select.active] || (cfg._value[select.active] = [])\n\t\t}\n\t\telse if (config.target) {\n\t\t\tcfg_values = cfg._value[config.target] || (cfg._value[config.target] = []);\n\t\t}\n\t\tconst header = config.schema.map((column, i) => (\n\t\t\t<th key={i} style={{ width: column.width || null}}>{column.header || column.name}</th>\n\t\t));\n\t\tconst rows = Array.isArray(cfg_values)\n\t\t\t? cfg_values.map((row, i) => {\n\t\t\t\tconst values = config.schema.map(c => {\n\t\t\t\t\tif (c.url_template) {\n\t\t\t\t\t\tc.url = c.url_template.replace('{value}', select && select.active ? select.active : 0)\n\t\t\t\t\t}\n\t\t\t\t\tconst editor = c.editor\n\t\t\t\t\t\t? onGetEditor(c, row, this.onChange)\n\t\t\t\t\t\t: <Input model={row} name={c.name} id={c.name + i} disabled={disabled} required={c.required || null} onBlur={this.onChange} />\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<td key={c.name} className={c.class || null}>\n\t\t\t\t\t\t\t{editor}\n\t\t\t\t\t\t</td>\n\t\t\t\t\t)\n\t\t\t\t});\n\t\t\t\tvalues.push(\n\t\t\t\t\t<td key={-1} className=\"right\">\n\t\t\t\t\t\t<button className=\"btn btn-light btn-xs btn-circular\" style={{ fontSize: \"15px\" }} disabled={disabled} onClick={() => {\n\t\t\t\t\t\t\tcfg_values.splice(i, 1);\n\t\t\t\t\t\t\tcfg.value = JSON.stringify(cfg._value);\n\t\t\t\t\t\t\tthis.forceUpdate();\n\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t<em className=\"la la-times\" />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</td>\n\t\t\t\t);\n\t\t\t\tif (config.sortable) {\n\t\t\t\t\tvalues.unshift(<td key={-2}><em className=\"la la-grip-vertical drag\" /></td>)\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<tr key={i} className={config.sortable ? 'sortable' : null} aria_index={i}>\n\t\t\t\t\t\t{values}\n\t\t\t\t\t</tr>\n\t\t\t\t);\n\t\t\t})\n\t\t\t: [];\n\t\theader.push(<th key={-1} className=\"right\">\n\t\t\t<button className=\"btn btn-xs btn-light btn-circular\" disabled={disabled} style={{ fontSize: \"15px\"}} onClick={() => {\n\t\t\t\tconst nrow = config.schema.reduce(\n\t\t\t\t\t(value, column) => {\n\t\t\t\t\t\tvalue[column.name] = null;\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t},\n\t\t\t\t\t{}\n\t\t\t\t);\n\t\t\t\tcfg_values.push(nrow);\n\t\t\t\t//cfg.value = JSON.stringify(cfg_values);\n\t\t\t\tthis.forceUpdate();\n\t\t\t}}>\n\t\t\t\t<em className=\"la la-plus\" />\n\t\t\t</button>\n\t\t</th>);\n\n\t\tif (config.sortable) {\n\t\t\theader.unshift(<th key={-2} />)\n\t\t}\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{select_el}\n\t\t\t\t<table className=\"regular_table_grid alternate fixed\">\n\t\t\t\t\t<thead><tr>{header}</tr></thead>\n\t\t\t\t\t<tbody ref={this.ref}>{rows}</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nclass FormEditor extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tconst { cfg } = props;\n\t\tcfg._value = cfg.value ? JSON.parse(cfg.value) : {}\n\t\tObject.keys(cfg.config).forEach(name => {\n\t\t\tconst c = cfg.config[name]\n\t\t\tc.id = `${cfg.key}_${name}`\n\t\t})\n\t}\n\n\tonChange = () => {\n\t\tconst { cfg } = this.props\n\t\tcfg.value = JSON.stringify(cfg._value)\n\t\tthis.forceUpdate()\n\t}\n\n\trender() {\n\t\tconst { cfg, onGetEditor } = this.props\n\t\tconst { config } = cfg\n\n\t\tif (config == null) {\n\t\t\treturn null;\n\t\t}\n\t\tconst editors = Object.keys(config).map(name => {\n\t\t\tconst c = config[name]\n\t\t\tconst editor = c.editor\n\t\t\t\t? onGetEditor(c, cfg._value, name, this.onChange)\n\t\t\t\t: <Input model={cfg._value} name={name} id={c.id} required={c.required || null} onBlur={this.onChange} />\n\n\t\t\treturn (\n\t\t\t\t<div key={c.id} className=\"row form-group\">\n\t\t\t\t\t<div className=\"col-xs-3\">\n\t\t\t\t\t\t<label htmlFor={c.id}>{c.label || name}{c.label != name && hp.settings.env == 0 ? ` (${name})` : null}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"col-xs-9\">\n\t\t\t\t\t\t{editor}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)\n\t\t})\n\n\t\treturn (\n\t\t\t<div className='widget-box no-margin pt-1'>\n\t\t\t\t{editors}\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nclass ConfigCat extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.onExpand = this.onExpand.bind(this);\n\t\tthis.onSave = this.onSave.bind(this);\n\t}\n\n\teditorEmail(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<Input type='email' model={row || cfg} name={name} id={cfg.id || cfg.key} onChange={onChange} />);\n\t}\n\n\teditorCheckbox(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<Checkbox model={row || cfg} name={name} id={cfg.id || cfg.key} className=\"pull-left\" onChange={onChange} />);\n\t}\n\n\teditorSwitch(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<Switch model={row || cfg} name={name} id={cfg.id || cfg.key} className=\"pull-left\" onChange={onChange} />);\n\t}\n\n\teditorToggle(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<Toggle model={row || cfg} name={name} id={cfg.id || cfg.key} className=\"pull-left\" onChange={onChange} />);\n\t}\n\n\teditorNumber(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<Input type='number' model={row || cfg} name={name} id={cfg.id || cfg.key} classNameEl='form-control input-sm hp-input-max-120' onChange={onChange} />);\n\t}\n\n\teditorUrl(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<Input type='url' model={row || cfg} name={name} id={cfg.id || cfg.key} onChange={onChange} />);\n\t}\n\n\teditorDate(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\t//return (<DatePicker model={row || cfg} name={name} id={cfg.id || cfg.key} />);\n\t\treturn (<Input type=\"date\" model={row || cfg} name={name} id={cfg.id || cfg.key} onChange={onChange} />);\n\t}\n\n\teditorMinute(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn <TimeEditor model={row || cfg} name={name} id={cfg.id || cfg.key} conversion={60} onChange={onChange} />\n\t}\n\n\teditorHtml(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (\n\t\t\t<HtmlEditor model={row || cfg} name={name} id={cfg.id || cfg.key}\n\t\t\t\tconfig={{convert_urls : false}}\n\t\t\t\ttags={configs.tags || cfg.tags || null}\n\t\t\t\tonChange={onChange}\n\t\t\t\theight={325}\n\t\t\t/>\n\t\t);\n\t}\n\n\teditorText(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<Textarea model={row || cfg} name={name} id={cfg.id || cfg.key} classNameEl='form-control' rows={5} onBlur={onChange} />);\n\t}\n\n\teditorCert(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<CertificateEditor model={row || cfg} name={name} id={cfg.id || cfg.key} onBlur={onChange} />);\n\t}\n\n\teditorSelect(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\tif (cfg.value && cfg.url && cfg.defaultOptions === undefined) {\n\t\t\tcfg.defaultOptions = null;\n\t\t\thttp.get(\n\t\t\t\tcfg.url, {\n\t\t\t\t\tdata: {value: cfg.value},\n\t\t\t\t\tsilent: true\n\t\t\t\t}, (response, success) => {\n\t\t\t\t\tif (success) {\n\t\t\t\t\t\tcfg.defaultOptions = response;\n\t\t\t\t\t\tthis.forceUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t)\n\t\t}\n\t\tconst url = cfg.url_template ? null : (cfg.url || null)\n\n\t\tif (cfg.url_template && cfg.url) {\n\t\t\tif (hp.store.queries.hasOwnProperty(cfg.url)) {\n\t\t\t\tcfg.query = cfg.url\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcfg.query = cfg.url\n\t\t\t\thp.store.queries[cfg.url] = []\n\t\t\t\thttp.get(\n\t\t\t\t\tcfg.url, {\n\t\t\t\t\t\tsilent: true\n\t\t\t\t\t}, (response, success) => {\n\t\t\t\t\t\tif (success) {\n\t\t\t\t\t\t\thp.store.queries[cfg.url] = response;\n\t\t\t\t\t\t\tthis.forceUpdate();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tlet options = cfg.query ? (hp.store.queries[cfg.query] || null) : (cfg.defaultOptions || null)\n\n\t\tif (options && !cfg.multiple && cfg.xor != 0) {\n\t\t\tif (row && row[name] && configs.editor != 'form') {\n\t\t\t\tconst value = row[name]\n\t\t\t\tconst el = options.find(el => el.value == value)\n\t\t\t\treturn (\n\t\t\t\t\t<span>{el ? (el.label || el.text) : value}</span>\n\t\t\t\t)\n\t\t\t}\n\t\t\tif (configs.key && Array.isArray(configs._value)) {\n\t\t\t\t// buscar configuracao selecionada\n\t\t\t\tconst active = {}\n\t\t\t\tconst _xor_options = []\n\n\t\t\t\tfor (let _value of configs.config.select && configs.config.select.active ? configs._value[configs.config.select.active] : configs._value) {\n\t\t\t\t\tactive[_value[cfg.name]] = 1\n\t\t\t\t}\n\t\t\t\t// mostrar apenas as opções ainda disponÃveis, ou seja, que não constam da lista de selecionados em active\n\t\t\t\tfor (let opt of options) {\n\t\t\t\t\tif (!active.hasOwnProperty(opt.value)) {\n\t\t\t\t\t\t_xor_options.push(opt)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toptions = _xor_options\n\t\t\t}\n\t\t}\n\t\treturn (\n\t\t\t<Select model={row || cfg} name={name} id={cfg.id || cfg.key} isMulti={cfg.multiple || false}\n\t\t\t\turl={url}\n\t\t\t\toptions={options}\n\t\t\t\tonChange={onChange}\n\t\t\t/>\n\t\t);\n\t}\n\n\teditorTable(cfg, configs) {\n\t\treturn <TableEditor cfg={cfg} configs={configs} onGetEditor={(c, row, onChange) => {\n\t\t\treturn this[\"editor\" + c.editor.capitalize()](c, cfg, row, c.name, onChange)\n\t\t}} />;\n\t}\n\n\teditorForm(cfg, configs) {\n\t\treturn <FormEditor cfg={cfg} configs={configs} onGetEditor={(c, row, name, onChange) => {\n\t\t\treturn this[\"editor\" + c.editor.capitalize()](c, cfg, row, name, onChange)\n\t\t}} />;\n\t}\n\n\teditorEmailManager(cfg, configs) {\n\t\treturn <EmailManager cfg={cfg} />\n\t}\n\n\teditorRegister(cfg, configs, row = null, name = 'value', onChange = null) {\n\t\treturn (<RegisterEditor model={row || cfg} name={name} id={cfg.key} />);\n\t}\n\n\trenderEditor(cfg, configs) {\n\t\tconst method_ed = 'editor' + cfg.editor.capitalize();\n\t\tif (this[method_ed] instanceof Function) {\n\t\t\treturn this[method_ed](cfg, configs);\n\t\t}\n\t\treturn (<Input model={cfg} name='value' id={cfg.key} />);\n\t}\n\n\tonSave(e) {\n\t\te.stopPropagation();\n\t\tconst configs = this.props.cat.configs.map(cfg => ({key: cfg.key, value: cfg.value}));\n\t\t/*\n\t\t(cat ? [cat] : (this.state.cats || [])).map(cat => {\n\t\t\tconfigs.push.apply(configs, cat.configs.map(cfg => ({key: cfg.key, value: cfg.value})));\n\t\t});\n\t\t*/\n\t\thttp.post('/humanportalconfigs/save.json', {configs: configs}, (response, success) => {\n\t\t\tif (success && response) {\n\t\t\t\tthis.props.cat.configs.forEach(config => {\n\t\t\t\t\tif (response.hasOwnProperty(config.key)) {\n\t\t\t\t\t\tconfig.value = response[config.key]\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tthis.forceUpdate()\n\t\t\t}\n\t\t});\n\t}\n\n\tonExpand() {\n\t\tconst {cat} = this.props;\n\t\tcat._expanded = cat._expanded ? 0 : 1;\n\t\tthis.forceUpdate();\n\t}\n\n\trender() {\n\t\tconst {cat} = this.props;\n\t\tconst content = cat._expanded\n\t\t\t?\t<div className=\"widget-body pcontent panel-scroll\">\n\t\t\t\t\t{cat.configs.map((cfg, j) => {\n\t\t\t\t\t\tlet obs = cfg.obs ? trans.getif(cfg.obs) : null;\n\t\t\t\t\t\tlet name = cfg.name ? trans.getif(cfg.name) : null;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div key={j} className=\"row form-group\">\n\t\t\t\t\t\t\t\t<div className=\"col-xs-12 col-sm-3 col-md-2 no-padding-right\" title={cfg.key}>\n\t\t\t\t\t\t\t\t\t<label className='pointer' htmlFor={cfg.key}>\n\t\t\t\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"col-xs-12 col-sm-9 col-md-10\">\n\t\t\t\t\t\t\t\t\t{this.renderEditor(cfg, cat.configs)}\n\t\t\t\t\t\t\t\t\t{obs ? <div><span className='tip'><em className='fa fa-info-circle'/><span dangerouslySetInnerHTML={{__html: obs}} /></span></div> : null}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t: \tnull;\n\n\t\treturn (\n\t\t\t<div className=\"widget-box config\">\n\t\t\t\t<div className=\"widget-title pointer\" onClick={this.onExpand}>\n\t\t\t\t\t<h4>\n\t\t\t\t\t\t<em className='la la-sliders-h' />\n\t\t\t\t\t\t<span>{cat.label}</span>\n\t\t\t\t\t</h4>\n\t\t\t\t\t<div className=\"pull-right\">\n\t\t\t\t\t\t{cat._expanded\n\t\t\t\t\t\t\t?\t<button className=\"btn btn-xs btn-primary\" style={{margin: \"-2px 5px 0 0\"}} onClick={this.onSave}>\n\t\t\t\t\t\t\t\t\t<em className=\"la la-check\" />\n\t\t\t\t\t\t\t\t\t<span>{__('buttons_save')}</span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t:\tnull}\n\t\t\t\t\t\t<span><em className={classNames('la', cat._expanded ? 'la-angle-down' : 'la-angle-right')} /></span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{content}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport class Config extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdata: props.categories || [],\n\t\t\tcats: props.categories || [],\n\t\t\tcategory: props.categories ? props.category : '',\n\t\t\tsearch: null\n\t\t};\n\t\tif (props.categories && props.categories.length > 0 && props.categories.length < 5) {\n\t\t\tprops.categories[0]._expanded = 1;\n\t\t}\n\t\t/*\n\t\tthis.observer = function(cat) {\n\t\t\treturn {\n\t\t\t\tset: (target, prop, value) => {\n\t\t\t\t\ttarget[prop] = value;\n\t\t\t\t\tif (prop == 'value' && !cat._is_dirty) {\n\t\t\t\t\t\tcat._is_dirty = true;\n\t\t\t\t\t\tthis.forceUpdate();\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*/\n\t\tthis.load(props);\n\t}\n\n\tload(props) {\n\t\tif (typeof this.state.category === 'undefined' || this.state.category != props.category) {\n\t\t\thttp.get('/humanportalconfigs/get.json', {\n\t\t\t\tcategory: this.state.category = props.category\n\t\t\t}, (response, success) => {\n\t\t\t\tif (success) {\n\t\t\t\t\tif (response.config.length <= 5) {\n\t\t\t\t\t\tresponse.config[0]._expanded = true;\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\tresponse.config.forEach(cat => {\n\t\t\t\t\t\tconst configs = [];\n\t\t\t\t\t\tcat.configs.forEach(cfg => {\n\t\t\t\t\t\t\tconfigs.push(new Proxy(cfg, this.observer(cat)));\n\t\t\t\t\t\t})\n\t\t\t\t\t\tcat.configs = configs;\n\t\t\t\t\t})\n\t\t\t\t\t*/\n\t\t\t\t\tObject.assign(hp.store.queries, response.queries || {})\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tdata: response.config,\n\t\t\t\t\t\tcats: response.config\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tcomponentWillReceiveProps(props) {\n\t\tthis.load(props);\n\t}\n\n\tdoSearch(text) {\n\t\tconst cats = [];\n\n\t\ttext = text.normalize();\n\t\tthis.state.data.forEach(cat => {\n\t\t\tconst config = text.in(cat.label) ? cat.configs : cat.configs.filter(cfg => text.in(cfg.name) || text.in(cfg.key));\n\t\t\tif (config.length > 0) {\n\t\t\t\tcats.push({\n\t\t\t\t\tlabel: cat.label,\n\t\t\t\t\tconfigs: config\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tif (text != '' && cats.length == 1) {\n\t\t\tcats[0]._expanded = 1;\n\t\t}\n\t\tthis.setState({cats: cats});\n\t}\n\n\trender() {\n\t\tconst cats = (this.state.cats || []).map((cat, i) =>\n\t\t\t<ConfigCat cat={cat} key={i} />\n\t\t);\n\t\tconst is_dialog = this.props.dialog === undefined || this.props.dialog;\n\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<div className={classNames(\"pull-right\", is_dialog ? \"pcontent\" : null)}>\n\t\t\t\t\t<Search className=\"input-sm search\" doSearch={this.doSearch.bind(this)} />\n\t\t\t\t</div>\n\t\t\t\t<div className=\"clearfix\" />\n\t\t\t\t<div>\n\t\t\t\t\t{cats}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default function (category = null) {\n\thttp.get('/humanportalconfigs/get.json', {\n\t\tcategory: category\n\t}, (response, success) => {\n\t\tif (success) {\n\t\t\tObject.assign(hp.store.queries, response.queries || {})\n\t\t\tmbox.modal(\n\t\t\t\t<Config\n\t\t\t\t\tcategories={response.config}\n\t\t\t\t\tcategory={category}\n\t\t\t\t/>, {\n\t\t\t\ttitle: 'configurações da aplicação',\n\t\t\t\tclassName: \"modal-lg\",\n\t\t\t\tbuttons: ['close', {\n\t\t\t\t\tname: 'save',\n\t\t\t\t\t//close: 'after',\n\t\t\t\t\tonClick: closeCallback => {\n\t\t\t\t\t\tconst configs = [];\n\t\t\t\t\t\tresponse.config.map(cat => {\n\t\t\t\t\t\t\tconfigs.push.apply(configs, cat.configs.map(cfg => ({key: cfg.key, value: cfg.value})));\n\t\t\t\t\t\t});\n\t\t\t\t\t\thttp.post('/humanportalconfigs/save.json', {configs: configs}, (response, success) => {\n\t\t\t\t\t\t\tcloseCallback();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t});\n\t\t}\n\t});\n}\n","import React from 'react'\nimport {format} from 'date-fns'\n\nexport const cinfo = action => {\n\tconst typology = !action.program ? null : <span title='Programa/Tipologia'> - {action.program}</span>;\n\tconst evt_start = action.evt_start instanceof Date ? format(action.evt_start, 'dd-MM-yyyy') : action.evt_start;\n\tconst evt_end = action.evt_end instanceof Date ? format(action.evt_end, 'dd-MM-yyyy') : action.evt_end;\n\tconst sep = '»';\n\tconst course_info = action.course_code\n\t\t? [\n\t\t\t<small key='c' title='candidatura'>{action.can_number}</small>,\n\t\t\t<small key='k' title='cód. curso'> {sep} {action.course_code}</small>,\n\t\t\t<small key='a' title='n.º ação'> {sep} {action.action_number}</small>\n\t\t]\n\t\t: null;\n\n\treturn (\n\t\t<div>\n\t\t\t<div>\n\t\t\t\t{action.id === undefined || action.id <= 0 ? <em className='la la-graduation-cap' title=\"formação externa\" /> : null}\n\t\t\t\t{action.courseaction_ref ? <span title='referência da ação'>[{action.courseaction_ref}] </span> : null}\n\t\t\t\t<span title='nome do curso'>{action.course}</span>\n\t\t\t\t{typology}\n\t\t\t</div>\n\t\t\t{course_info}\n\t\t\t{evt_start\n\t\t\t\t? <small title='periodo'> {sep} [{evt_start}{evt_end && evt_end != evt_start ? (' - ' + evt_end) : null}]</small>\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{action.local ? <small title='local'> {sep} {action.local}</small> : null}\n\t\t\t{!action.duration_effect ? null : <small title='n.º horas'> {sep} ({action.duration_effect} horas)</small>}\n\t\t\t{!action.web_schedule ? null : <div><small title='horário'>{action.web_schedule}</small></div>}\n\t\t\t{!action.training_entity ? null : <div><small title='entidade'> {sep} {action.training_entity}</small></div>}\n\t\t</div>\n\t);\n}\n\nexport default class CourseInfo extends React.Component {\n\trender() {\n\t\tif (!this.props.courseaction) {\n\t\t\treturn null;\n\t\t}\n\t\tconst courseaction = this.props.courseaction;\n\n\t\treturn (\n\t\t\t<div className=\"form-group row clear courseinfo\">\n\t\t\t\t<div className=\"col-xs-12\">\n\t\t\t\t\t{cinfo(courseaction)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import React from 'react'\nimport { Modal } from 'components/common'\nimport Table from 'components/table'\n\n\nclass AbsenteeismDetails extends React.Component {\n\n\trender() {\n\t\tconst { coursemodule_id, entity_code } = this.props;\n\t\tconst params = {\n\t\t\tcourseaction_id: hp.store.courseaction_id,\n\t\t\tmodule_id: coursemodule_id,\n\t\t\tentity_code: entity_code,\n\t\t\treact: 1\n\t\t};\n\t\tconst url = \"/courseactions/absenteeism_details.json\".urlify(params);\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<Table url={url}\n\t\t\t\tclassName=\"table regular_table no-margin-bottom\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport class HorizontalTable extends React.Component {\n\tonExpand(module) {\n\t\tif (!module.eval_params) {\n\t\t\thttp.get('/courseaction/absenteeism_evaluation_params_details.json',\n\t\t\t\t{\n\t\t\t\t\tcourseaction_id: hp.store.courseaction_id,\n\t\t\t\t\tcoursemodule_id: module.coursemodule_id,\n\t\t\t\t\tlevel: module.level\n\t\t\t\t},\n\t\t\t\t(response, suceess) => {\n\t\t\t\t\tmodule.eval_params = {\n\t\t\t\t\t\texpanded: true,\n\t\t\t\t\t\tparams: response.params,\n\t\t\t\t\t\tevals: response.evals\n\t\t\t\t\t}\n\t\t\t\t\tthis.forceUpdate();\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tmodule.eval_params.expanded = !module.eval_params.expanded;\n\t\t\tthis.forceUpdate();\n\t\t}\n\t}\n\n\tshowParamsDetails(coursemodule_id, entity_code){\n\t\thttp.get('/courseactions/absenteeism_details.ajax',\n\t\t\t{\n\t\t\t\tcourseaction_id: hp.store.courseaction_id,\n\t\t\t\tmodule_id: coursemodule_id,\n\t\t\t\tentity_code: entity_code\n\t\t\t},\n\t\t\t(response, suceess) => {}\n\t\t);\n\t}\n\n\n\trender() {\n\t\t// percorrer todos os modulos\n\t\tconst table_body = hp.store.modules.map((module, i) => {\n\t\t\t// percorrer todos os formandos\n\t\t\tconst tds = hp.store.trainees.map((trainee, j) => {\n\t\t\t\tconst evall = module.trainees ? module.trainees[trainee.entity_code] : null;\n\t\t\t\tvar assid = \"-\";\n\t\t\t\tvar just = \"-\";\n\t\t\t\tvar injust = \"-\";\n\t\t\t\tvar search = \"\";\n\t\t\t\tconst params = {\n\t\t\t\t\ttitle: __('attrs_details')\n\t\t\t\t}\n\n\t\t\t\tif(hp.store.assids && hp.store.assids[module.coursemodule_id] && hp.store.assids[module.coursemodule_id][trainee.entity_code]){\n\t\t\t\t\tconst value = hp.store.assids[module.coursemodule_id][trainee.entity_code];\n\t\t\t\t\tif(value && value.assid >= 0){\n\t\t\t\t\t\tassid = value.assid + \"% \";\n\t\t\t\t\t\tsearch =\n\t\t\t\t\t\t\t<em className=\"la la-search-plus pointer\" onClick={() => Modal.show(\n\t\t\t\t\t\t\t\t<AbsenteeismDetails\n\t\t\t\t\t\t\t\t\tcoursemodule_id={module.coursemodule_id}\n\t\t\t\t\t\t\t\t\tentity_code={trainee.entity_code}\n\t\t\t\t\t\t\t\t/>,\n\t\t\t\t\t\t\t\tparams\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={__('attrs_details_attendance')}>\n\t\t\t\t\t\t\t</em>\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassid = \"-\";\n\t\t\t\t\t\tsearch = \"\"\n\t\t\t\t\t}\n\t\t\t\t\tjust = value.just;\n\t\t\t\t\tinjust = value.injust;\n\t\t\t\t}\n\t\t\t\tconst td_obs = evall && evall.obs ? <em className=\"la la-info-circle\" title={evall.obs} /> : \"-\";\n\t\t\t\treturn [\n\t\t\t\t\t<td key={'a' + j}>{evall && evall.classification ? evall.classification : \"-\" }</td>,\n\t\t\t\t\t<td key={'b' + j}>{td_obs}</td>,\n\t\t\t\t\t<td key={'c' + j}>{just}</td>,\n\t\t\t\t\t<td key={'d' + j}>{injust}</td>,\n\t\t\t\t\t<td className='ht-separator right' key={'e' + j}>\n\t\t\t\t\t{ assid }\n\t\t\t\t\t{ search }\n\t\t\t\t\t</td>\n\t\t\t\t];\n\t\t\t});\n\n\t\t\t//percorrer os parâmetros de avaliação apra adicionar os trs correspondentes\n\t\t\tconst trs = (module.eval_params && module.eval_params.expanded ? module.eval_params.params : []).map((param, k) => {\n\t\t\t\tconst tds_evals = hp.store.trainees.map((trainee, m) => {\n\t\t\t\t\tconst peval = param.evals ? param.evals[trainee.entity_code] : null;\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\t<td key={'m' + m} colSpan={2}>{peval ? peval.eval : '-'}</td>,\n\t\t\t\t\t\t<td className=\"ht-separator\" key={'n' + m} colSpan={3}>{peval ? peval.weighing_factor : '-'}</td>\n\t\t\t\t\t];\n\t\t\t\t});\n\t\t\t\treturn (\n\t\t\t\t\t<tr key={'k' + k}>\n\t\t\t\t\t\t<th style={{paddingLeft: '40px'}}>\n\t\t\t\t\t\t\t{param.name}\n\t\t\t\t\t\t</th>\n\t\t\t\t\t\t{tds_evals}\n\t\t\t\t\t</tr>\n\t\t\t\t);\n\t\t\t});\n\t\t\ttrs.unshift(\n\t\t\t\t<tr key={i} rowSpan={module.eval_params && module.eval_params.expanded ? (module.eval_params.params.length + 1) : null} className={module.coursemodule_id == 0 ? 'footer' : null}>\n\t\t\t\t\t<th className=\"pointer\" onClick={this.onExpand.bind(this, module)}>\n\t\t\t\t\t\t{module.coursemodule_id == 0 ? null :\n\t\t\t\t\t\t\t<em\n\t\t\t\t\t\t\t\tclassName={\"fa fa-chevron-\" + (module.eval_params && module.eval_params.expanded ? 'up' : 'down')}\n\t\t\t\t\t\t\t\ttitle={__('attrs_evaluation_parameter')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{module.module}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</th>\n\t\t\t\t\t{tds}\n\n\t\t\t\t</tr>\n\t\t\t);\n\t\t\treturn trs\n\t\t})\n\n\t\tconst head_details = []\n\t\tconst head = hp.store.trainees.map((trainee, i) => {\n\t\t\thead_details.push(\n\t\t\t\t<th key={'a' + i} className=\"details\">Nota</th>,\n\t\t\t\t<th key={'b' + i} className=\"details\" title=\"Observações\">Obs.</th>,\n\t\t\t\t<th key={'c' + i} className=\"details\" title=\"Faltas justificadas\">F.J.</th>,\n\t\t\t\t<th key={'d' + i} className=\"details\" title=\"Faltas injustificadas\">F.I.</th>,\n\t\t\t\t<th className=\"ht-separator details\" key={'e' + i}>%Assid.</th>\n\t\t\t)\n\t\t\treturn (\n\t\t\t\t<th className='ht-separator' key={i} colSpan={5}>\n\t\t\t\t\t<div className=\"left item-center\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<img className=\"avatar\" src={trainee.image} />\n\t\t\t\t\t\t\t{trainee.name}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</th>\n\t\t\t)\n\t\t})\n\t\thead.unshift(<th className='center sticky-l ht-separator' key='m' rowSpan={2}>{__('attrs_coursemodule')}</th>)\n\n\t\treturn (\n\t\t\t<div className='horizontal-table'>\n\t\t\t\t<table className='table sticky alternate'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>{head}</tr>\n\t\t\t\t\t\t<tr>{head_details}</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t{table_body}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t)\n\t}\n}\n","import React from 'react'\nimport tinymce from 'tinymce/tinymce'\nimport { Editor } from '@tinymce/tinymce-react'\n\nconst language_maps = {\n\t'pt-pt': 'pt_PT',\n\t'de-de': 'de'\n}\n\nlet el_picker = null\nconst globalConfig = {\n\ttheme: 'silver',\n\tskin: 'oxide',\n\tplugins:\n\t\t//'image code link image table code'\n\t\t//'preview importcss searchreplace autolink autosave save directionality visualblocks visualchars fullscreen image link media codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons code',\n\t\t'preview importcss searchreplace autolink autosave save directionality visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount noneditable help charmap quickbars emoticons code',\n\tsuffix: '.min',\n\timage_title: true,\n\t/* enable automatic uploads of images represented by blob or data URIs*/\n\tautomatic_uploads: true,\n\tentity_encoding: 'raw',\n\tfile_picker_types: 'image',\n\tbranding: false,\n\tmenubar: false,\n\tstatusbar: false,\n\ttoolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview print | image media link anchor codesample | code',\n\ttoolbar_mode: \"sliding\",\n\tquickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',\n\tcontextmenu: false, //'link image imagetools table configurepermanentpen',\n\tbrowser_spellcheck: true,\n\ttinycomments_mode: 'embedded',\n\theight: 500,\n\tfile_picker_callback: (cb, value, meta) => {\n\t\tif (el_picker == null) {\n\t\t\tel_picker = document.createElement('input');\n\t\t\tel_picker.setAttribute('type', 'file');\n\t\t\tel_picker.setAttribute('accept', 'image/*');\n\t\t\tel_picker.onchange = function() {\n\t\t\t\tconst file = files[0];\n\t\t\t\tconst reader = new FileReader();\n\t\t\t\treader.onload = () => {\n\t\t\t\t\tconst id = 'blobid' + (new Date()).getTime();\n\t\t\t\t\tconst blobCache = tinymce.activeEditor.editorUpload.blobCache;\n\t\t\t\t\tconst base64 = reader.result.split(',')[1];\n\t\t\t\t\tconst blobInfo = blobCache.create(id, file, base64);\n\n\t\t\t\t\tblobCache.add(blobInfo);\n\n\t\t\t\t\t/* call the callback and populate the Title field with the file name */\n\t\t\t\t\tcb(blobInfo.blobUri(), { title: file.name });\n\t\t\t\t};\n\t\t\t\treader.readAsDataURL(file);\n\t\t\t};\n\t\t}\n\t\tel_picker.click();\n\t},\n}\n\ntinymce.baseURL = hp.settings.tpldns + 'admin/tinymce/react'\nif (hp.settings.locale) {\n\tglobalConfig.language = language_maps[hp.settings.locale];\n\tglobalConfig.language_url = tinymce.baseURL + '/langs/' + hp.settings.locale + '.js';\n}\n\nexport default class HtmlEditor extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\t//this.previous_value = null\n\t\tthis.el_picker = null\n\n\t\tlet { tags } = this.props\n\n\t\tthis.config = {}\n\t\tif (tags) {\n\t\t\tthis.config.toolbar = globalConfig.toolbar + \" | tags\"\n\t\t\tthis.config.init = (editor) => {\n\t\t\t\teditor.ui.registry.addMenuButton('tags', {\n\t\t\t\t\ttext: 'Tags',\n\t\t\t\t\tfetch: function(callback) {\n\t\t\t\t\t\tconst items = []\n\t\t\t\t\t\ttags = typeof tags === 'string' ? JSON.parse(tags) : tags\n\t\t\t\t\t\tfor (const [key, label] of Object.entries(tags)) {\n\t\t\t\t\t\t\titems.push({type: 'menuitem', text: label, onAction: (e) => {\n\t\t\t\t\t\t\t\teditor.insertContent(key);\n\t\t\t\t\t\t\t}})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback(items)\n\t\t\t\t\t},\n\t\t\t\t\tonAction: function(e) {\n\t\t\t\t\t\teditor.insertContent(this.value());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\thandleEditorChange = (content) => {\n\t\tif (!tinymce.activeEditor.hasFocus()) {\n\t\t\treturn\n\t\t}\n\t\t//if (this.previous_value == content) {\n\t\t//\treturn;\n\t\t//}\n\t\t//this.previous_value = content;\n\t\tif (this.props.model) {\n\t\t\tthis.props.model[this.props.name] = content;\n\t\t}\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(content);\n\t\t}\n\t\tthis.forceUpdate()\n\t}\n\n\tgetValue() {\n\t\treturn this.props.initValue || (this.props.model ? this.props.model[this.props.name] : '') || '';\n\t}\n\n\trender() {\n\t\tconst config = Object.assign({}, globalConfig, this.config,\n\t\t\t{\n\t\t\t\theight: this.props.height || globalConfig.height,\n\t\t\t\tsetup: editor => {\n\t\t\t\t\tif (this.config.init) {\n\t\t\t\t\t\tthis.config.init(editor)\n\t\t\t\t\t}\n\t\t\t\t\tthis.setState({activeEditor: editor})\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.props.config || null\n\t\t)\n\t\treturn (\n\t\t\t<Editor\n\t\t\t\tvalue={this.getValue()}\n\t\t\t\tinit={config}\n\t\t\t\tonEditorChange={this.handleEditorChange}\n\t\t\t/>\n\t\t);\n\t}\n\n\tstatic setSaved() {\n\t\treturn tinymce.activeEditor ? tinymce.activeEditor.save() : null\n\t}\n\n\t//componentDidUpdate(prevProps) {\n\t\t//\ttinymce.activeEditor.startContent = tinymce.activeEditor.getContent({format: 'raw'})\n\t\t/*\n\t\t// update content only if value changes\n\t\tif (tinymce.activeEditor && (this.previous_value === null || this.previous_value != this.getValue())) {\n\t\t\ttinymce.activeEditor.setContent(this.previous_value = this.getValue());\n\t\t}\n\t\t*/\n\t//}\n}\n","import React from 'react'\nimport {Button} from 'components/common'\n\nclass Log extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.actions = {1: 'insert', 2: 'update', 3: 'delete'};\n\t}\n\n\trenderJson(json) {\n\t\tconst items = Object.keys(json).map(key => {\n\t\t\tconst row = json[key]\n\t\t\treturn (\n\t\t\t\t<tr key={key}>\n\t\t\t\t\t<td>{key}</td>\n\t\t\t\t\t<td>{row instanceof Object ? this.renderJson(row) : row}</td>\n\t\t\t\t</tr>\n\t\t\t)\n\t\t})\n\t\treturn (\n\t\t\t<table className=\"table min alternate\">\n\t\t\t\t<tbody>\n\t\t\t\t\t{items}\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t)\n\t}\n\n\tonExpand(log, is_expanded) {\n\t\tlog.expanded = is_expanded == 1 ? 0 : 1;\n\t\tthis.forceUpdate();\n\t}\n\n\trender() {\n\t\tconst data = this.props.data.map(log => {\n\t\t\tconst row = log.expanded ? this.renderJson(log.data) : log.placeholder;\n\t\t\treturn (\n\t\t\t\t<tr key={log.id}>\n\t\t\t\t\t<td className=\"pointer\"><em className={log.expanded ? 'la la-minus' : 'la la-plus'} onClick={() => this.onExpand(log, log.expanded == 1)} /></td>\n\t\t\t\t\t<td>{log.id}</td>\n\t\t\t\t\t<td>{this.actions[log.action]}</td>\n\t\t\t\t\t<td>{row}</td>\n\t\t\t\t\t<td title={log.name}>{log.username}</td>\n\t\t\t\t\t<td>{log.created_at}</td>\n\t\t\t\t</tr>)\n\t\t});\n\t\t\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<table className=\"table regular_table_grid\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t<th>Id.</th>\n\t\t\t\t\t\t\t<th className=\"left\">Operação</th>\n\t\t\t\t\t\t\t<th className=\"left\">Dados</th>\n\t\t\t\t\t\t\t<th className=\"left\">Utilizador</th>\n\t\t\t\t\t\t\t<th className=\"left\">Data</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t{data}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport const buttonLog = (model, id, classn = null) => (\n\t<a key={'_log' + id} title='ver logs' className={classn} onClick={() => { LogDialog(model, id) }}>\n\t\t<em className=\"la la-history\" />\n\t</a>)\n\nexport const LogDialog = (model, id) => {\n\thttp.get('/log/get.json', {\n\t\tmodel: model,\n\t\tid: id\n\t}, (response, success) => {\n\t\tif (success) {\n\t\t\tresponse.data.forEach(row => {\n\t\t\t\trow.placeholder = row.data.substring(0, 60) + '...';\n\t\t\t\trow.data = JSON.parse(row.data);\n\t\t\t});\n\t\t\tmbox.modal(\n\t\t\t\t<Log\n\t\t\t\t\tmodel={model}\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata={response.data}\n\t\t\t\t/>, {\n\t\t\t\ttitle: 'Log [' + model + '] :: ' + id,\n\t\t\t\tbuttons: ['close']\n\t\t\t});\n\t\t}\n\t});\n}\n","export const createReducer = (reducers, def) => (state = def, action) => reducers[action.type] ? reducers[action.type](state, action) : state;\n\nconst model = (data, props = {}) => {\n\tconst key = props.key || 'id';\n\n\tprops.data = data || [];\n\tprops.keys = {};\n\tif (Array.isArray(props.data)) {\n\t\tfor (let i in data) {\n\t\t\tprops.keys[data[i][key]] = i;\n\t\t}\n\t}\n\tObject.defineProperty(props, 'length', {\n\t\tget: () => props.data.length\n\t});\n\tprops.filter = fn => props.data.filter(fn);\n\tprops.map = fn => props.data.map(fn);\n\tprops.reverse = () => props.data.reverse();\n\tprops.find = fn => (\n\t\t(fn instanceof Function)\n\t\t\t? props.data.find(fn)\n\t\t\t: (fn instanceof Object)\n\t\t\t\t? props.data.find(m => {\n\t\t\t\t\t\tfor (let i in fn) {\n\t\t\t\t\t\t\tif (m[i] != fn[i])\t{\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t})\n\t\t\t\t: props.get(fn)\n\t);\n\tprops.first = () => {\n\t\tconst keys = Object.keys(props.data);\n\t\treturn keys.length === 0 ? null : props.data[keys[0]] || null;\n\t},\n\tprops.shift = () => {\n\t\tconst row = prop.data.shift();\n\t\tdelete props.keys.keys[row[key]];\n\t\treturn row;\n\t};\n\tprops.push = row => {\n\t\tif (!Array.isArray(row)) {\n\t\t\tprops.keys[row[key]] = props.data.length;\n\t\t\treturn props.data.push(row);\n\t\t}\n\t\trow.forEach(r => {\n\t\t\tprops.keys[r[key]] = props.data.length;\n\t\t\tprops.data.push(r);\n\t\t})\n\t}\n\tprops.add = row => props.keys[row[key]] = props.data.push(row);\n\tprops.merge = rows => {\n\t\tif (!Array.isArray(rows)) {\n\t\t\trows = [rows]\n\t\t}\n\t\tfor (let row of rows) {\n\t\t\tif (props.keys.hasOwnProperty(row[key])) {\n\t\t\t\tprops.data[props.keys[key]] = row;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprops.keys[row[key]] = props.data.push(row) - 1;\n\t\t\t}\n\t\t}\n\t\treturn props;\n\t}\n\tprops.rebuildKeys = () => {\n\t\t// reconstruir key indexs\n\t\tprops.keys = {};\n\t\tfor (let i in props.data) {\n\t\t\tprops.keys[props.data[i][key]] = i;\n\t\t}\n\t}\n\tprops.get = id => props.keys.hasOwnProperty(id) ? props.data[props.keys[id]] : null;\n\tprops.delete = model => {\n\t\tconst id = model instanceof Object\n\t\t\t? ( props.keys.hasOwnProperty(model[key]) ? model[key] : null)\n\t\t\t: model;\n\n\t\tif (id !== null && props.keys[id]) {\n\t\t\tprops.data.splice(props.keys[id], 1);\n\t\t\tprops.rebuildKeys();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tprops.unshift = model => {\n\t\tprops.data.unshift(model);\n\t\tprops.rebuildKeys();\n\t}\n\n\treturn props;\n}\n\nexport default model;\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport ReactPaginate from 'react-paginate'\n\n/**\n * Componente para paginação de componentes em array\n * @prop items array com a informação a ser paginada\n * @prop renderItem função para renderização de cada componente. Deve devolver um componente React\n */\nexport default class Paginate extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tpage: 1,\n\t\t\titemsPerPage: props.itemsPerPage || 8\n\t\t};\n\t\tthis.refTop = React.createRef()\n\t}\n\n\tsetPage = (pagination) => {\n\t\tconst page = pagination.selected + 1;\n\n\t\tif (!this.props.url || this.state.data?.hasOwnProperty(page)) {\n\t\t\t// fazer scroll apenas se elemento top escondido\n\t\t\tconst bounds = this.refTop.current instanceof React.Component ? null : this.refTop.current.getBoundingClientRect();\n\t\t\tif (bounds && bounds.top < 0) {\n\t\t\t\twindow.scrollTo(0, this.refTop.current.offsetTop);\n\t\t\t}\n\t\t\tif (this.props.pageChanging && !this.props.items[(page - 1) * this.state.itemsPerPage]) {\n\t\t\t\tthis.props.pageChanging(page).then(() => {\n\t\t\t\t\tthis.setState({page: page})\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.setState({page: page});\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.fetch(page)\n\t\t}\n\t}\n\n\tfetch(page, url = null) {\n\t\turl = url || this.props.url;\n\n\t\thttp.get(\n\t\t\turl || url, {\n\t\t\t\titem_per_page: this.state.itemsPerPage,\n\t\t\t\tpage: page\n\t\t\t},\n\t\t\tresponse => {\n\t\t\t\tif (!this.state.data || url != this.props.url) {\n\t\t\t\t\tthis.state.data = {};\n\t\t\t\t}\n\t\t\t\tthis.state.data[page] = response.data;\n\t\t\t\tthis.setState({\n\t\t\t\t\turl: url,\n\t\t\t\t\tpage: response.meta.page,\n\t\t\t\t\titemCount: response.meta.item_count\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.url) {\n\t\t\tthis.fetch(1)\n\t\t}\n\t}\n\n\tcomponentWillReceiveProps(props) {\n\t\tif (props.url && props.url != this.state.url) {\n\t\t\tthis.fetch(1, props.url);\n\t\t}\n\t}\n\n\trender() {\n\t\t//const items = (this.state.data ? this.state.data[this.state.page] : this.props.items) || [];\n\t\tlet items, start, end;\n\n\t\tif (this.state.data) {\n\t\t\titems = this.state.data[this.state.page] || [];\n\t\t\tstart = 0;\n\t\t\tend = items.length;\n\t\t}\n\t\telse {\n\t\t\titems = this.props.items || [];\n\t\t\tstart = (this.state.page - 1) * this.state.itemsPerPage;\n\t\t\tend = Math.min(start + this.state.itemsPerPage, items.length);\n\t\t}\n\t\tif (items.length == 0) {\n\t\t\treturn null;\n\t\t}\n\t\tconst pages = Math.ceil( (this.state.itemCount || this.props.itemCount || items.length) / this.state.itemsPerPage );\n\t\tif (this.state.page > pages) {\n\t\t\tthis.state.page = pages;\n\t\t}\n\t\t//let start = (this.state.page - 1) * this.state.itemsPerPage;\n\t\t//let end = Math.min(start + this.state.itemsPerPage, items.length);\n\t\tlet items_page = [];\n\n\t\tif (this.props.renderItem instanceof Function) {\n\t\t\tconst el = this.props.el || 'div';\n\n\t\t\tfor (let i = 0; start < end; start ++, i ++) {\n\t\t\t\tconst props = {key: start, className: classNames(\"page_\" + start, this.props.classNameEl)};\n\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tprops.ref = this.refTop;\n\t\t\t\t}\n\t\t\t\titems_page.push(\n\t\t\t\t\tthis.props.el === null\n\t\t\t\t\t\t? this.props.renderItem(items[start], i, props)\n\t\t\t\t\t\t: React.createElement(el, props, this.props.renderItem(items[start], i))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse if (this.props.children) {\n\t\t\tfor (let i = 0; start < end; start ++, i ++) {\n\t\t\t\tconst props = {item: items[start], index: i};\n\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tprops.ref = this.refTop;\n\t\t\t\t}\n\t\t\t\titems_page.push(\n\t\t\t\t\tReact.Children.map(this.props.children, child =>\n\t\t\t\t\t\t<child.type {...child.props} {...props} />\n\t\t\t\t\t\t//React.cloneElement(child, props)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tif (pages > 1) {\n\t\t\tconst page_nav =\n\t\t\t\t<ReactPaginate\n\t\t\t\t\tkey='pag'\n\t\t\t\t\tinitialPage={this.props.forcePage ? undefined : this.state.page - 1}\n\t\t\t\t\tforcePage={this.props.forcePage || undefined}\n\t\t\t\t\tpreviousLabel={this.props.previousLabel || <em className=\"la la-angle-left\" />}\n\t\t\t\t\tnextLabel={this.props.nextLabel || <em className=\"la la-angle-right\" />}\n\t\t\t\t\tpageCount={pages}\n\t\t\t\t\tcontainerClassName='pagination'\n\t\t\t\t\tsubContainerClassName='pages page-item'\n\t\t\t\t\tactiveClassName='active'\n\t\t\t\t\tonPageChange={this.props.onPageChange || this.setPage}\n\t\t\t\t/>;\n\t\t\titems_page.push(this.props.paginationContainer ? this.props.paginationContainer(page_nav) : page_nav);\n\t\t}\n\t\treturn items_page;\n\t}\n}\n\nPaginate.propTypes = {\n\titems: PropTypes.array\n}","import React from 'react'\nimport { Input, Select } from 'components/common'\n\nexport default class PostalCode extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.state = {\n\t\t\toptions: props.model && props.name && props.model[props.name]\n\t\t\t\t? [{[props.name]: props.model[props.name]}]\n\t\t\t\t: null\n\t\t}\n\t}\n\n\tonChange = (selected) => {\n\t\tconst { model, onChange } = this.props\n\n\t\tmodel.postal_description = selected.postal_description\n\t\tif (model.hasOwnProperty('district_code')) {\n\t\t\tmodel.district_code = selected.district_code\n\t\t}\n\t\tif (model.hasOwnProperty('province_code')) {\n\t\t\tmodel.province_code = selected.province_code\n\t\t}\n\t\tif (onChange) {\n\t\t\tonChange(selected)\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { model, name, required, disabled } = this.props\n\t\tconst { options } = this.state\n\t\tconst component = model.foreign_contacts == 1\n\t\t\t?\t<Input model={model} name={name} required={required} classNameControl='postal_code' readOnly={disabled || null} />\n\t\t\t:\t<Select classNameSelect=\"postal-code\" placeholder=\"(cód.postal)\" model={model} name={name} required={required}\n\t\t\t\t\turl='/ctts/codes.json'\n\t\t\t\t\toptions={options}\n\t\t\t\t\toptionValue='postal_code'\n\t\t\t\t\toptionLabel='postal_code'\n\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\tdisabled={disabled || null}\n\t\t\t\t/>\n\n\t\treturn (\n\t\t\t<div className='d-flex'>\n\t\t\t\t{component}\n\t\t\t\t<Input model={model} name=\"postal_description\" disabled={disabled || null} />\n\t\t\t</div>\n\t\t)\n\t}\n}","import React from 'react';\nimport { format } from 'date-fns';\n\nexport default class Reports extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t}\n\n onPrintReport(rpt) {\n\t\tif (rpt.file) {\n\t\t\tprint.pdf('/reports/generate.json', $.param({report_id: rpt.id}))\n\t\t}\n\t\telse {\n\t\t\tprint.pdf('/pdfs/generate.json', $.param({report_id: rpt.id, id: rpt.alias}))\n\t\t}\n\t}\n\n\trender() {\n\t\tif (!this.props.reports) {\n\t\t\treturn null;\n\t\t}\n\t\tconst reports = this.props.reports;\n\n\t\treturn (\n\t\t\t<div className=\"dropdown btn-group\">\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"btn btn-default dropdown-toggle\"\n\t\t\t\t\tdata-toggle=\"dropdown\"\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\taria-expanded=\"true\"\n\t\t\t\t>\n\t\t\t\t\t<em className=\"la la-print\" />\n\t\t\t\t\t<span>{__('buttons_reports')}</span>\n\t\t\t\t\t<span className=\"caret\" />\n\t\t\t\t</button>\n\t\t\t\t<ul className=\"dropdown-menu dropdown-menu-right\">\n\t\t\t\t\t{reports.map((report, index) => (\n\t\t\t\t\t\t<li key={index}>\n\t\t\t\t\t\t\t<a onClick={this.onPrintReport.bind(this, report)}>\n\t\t\t\t\t\t\t\t<em className={`la la-${report.file ? 'file-text-o' : 'file-pdf-o'}`}/>\n\t\t\t\t\t\t\t\t<span>{report.name}</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","import React from 'react'\n\nclass NotFound extends React.Component {\n\trender() {\n\t\treturn (<div>Ups! este caminho não está definido ...</div>);\n\t}\n}\n\nlet Router = {\n\troutes: {},\n\tbreadcrumbs: [],\n\tactive: null,\n\n\tisLoading: () => Router.active === null,\n\n\tset: (url, callback) => {\n\t\tlet urlblocks = url.split('?', 2);\n\t\tlet urlparts = urlblocks[0].replace(/^[\\/#]+\\/?/, '/').split('/');\n\t\tlet route = Router.routes;\n\t\tlet routing = []; // lista de routes por onde passou em arvore\n\t\tlet params = {};\n\t\tlet match = null;\n\n\t\tRouter.active = null;\n\t\t// descodificar parametros depois do ? no url\n\t\tif (urlblocks.length > 1) {\n\t\t\turlblocks[1].split('&').map(p => {\n\t\t\t\tp = p.split(/\\=(.+)?/);\n\t\t\t\tparams[p[0]] = p[1];\n\t\t\t});\n\t\t}\n\t\tRouter.breadcrumbs = [];\n\t\tfor (var k = 0, next = true; next; k++) {\n\t\t\tlet part = urlparts[k] || '/';\n\n\t\t\tnext = k < urlparts.length - 1 ? urlparts[k + 1] : '';\n\t\t\t// procura route \n\t\t\tfor (var link in route) {\n\t\t\t\tlet id = null;\n\n\t\t\t\tif (link === part) {\n\t\t\t\t\troute = route[link];\n\t\t\t\t}\n\t\t\t\telse if (/^\\d+$/.test(next) && (match = link.match(new RegExp(part + '/\\:([a-z,_]+)'))) !== null) {\n\t\t\t\t\troute = route[link];\n\t\t\t\t\tid = params[match[1]] = next;\n\t\t\t\t\tnext = (++k) < urlparts.length - 1 ? urlparts[k + 1] : '';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn { component: NotFound }; // nao encontrou route => NotFound\n\t\t\t\t}\n\t\t\t\troute.params = params;\n\t\t\t\trouting.push(route);\n\t\t\t\tRouter.breadcrumbs.push({ link: link, label: route.breadcrumb.label, id: id });\n\t\t\t\tif (next) {\n\t\t\t\t\tif (!route.routes) {\n\t\t\t\t\t\treturn { component: NotFound };\n\t\t\t\t\t}\n\t\t\t\t\troute = route.routes;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// verificar se existe algum router para carregar dados\n\t\trouting = routing.filter(r => r.component.loadData instanceof Function);\n\t\tlet loads_count = routing.length;\n\n\t\tif (loads_count === 0) {\n\t\t\tRouter.active = route;\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\t\tlet loads_i = 0;\n\n\t\twhile(routing.length > 0) {\n\t\t\t//route = routing.pop();\n\t\t\t(r => {\n\t\t\t\thttp.open(r.loader.url,\n\t\t\t\t\tresponse => {\n\t\t\t\t\t\tr.data = response;\n\t\t\t\t\t\tif (loads_count == ++loads_i) {\n\t\t\t\t\t\t\tRouter.active = r;\n\t\t\t\t\t\t\tcallback();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{ data: r.loader.params(r.params) }\n\t\t\t\t);\n\t\t\t})(routing.pop());\n\t\t}\n\t},\n\n\tfind: (url, callback) => {\n\t\tlet urlblocks = url.split('?', 2);\n\t\tlet urlparts = urlblocks[0].replace(/^[\\/#]+\\/?/, '/').split('/');\n\t\tlet route = Router.routes;\n\t\tlet params = {};\n\t\tlet match = null;\n\n\t\t// descodificar parametros depois do ? no url\n\t\tif (urlblocks.length > 1) {\n\t\t\turlblocks[1].split('&').map(p => {\n\t\t\t\tp = p.split(/\\=(.+)?/);\n\t\t\t\tparams[p[0]] = p[1];\n\t\t\t});\n\t\t}\n\t\tRouter.breadcrumbs = [];\n\t\tfor (var k = 0, next = true; next; k++) {\n\t\t\tlet part = urlparts[k] || '/';\n\n\t\t\tnext = k < urlparts.length - 1 ? urlparts[k + 1] : '';\n\t\t\t// procura route \n\t\t\tfor (var link in route) {\n\t\t\t\tlet id = null;\n\n\t\t\t\tif (link === part) {\n\t\t\t\t\troute = route[link];\n\t\t\t\t}\n\t\t\t\telse if (/^\\d+$/.test(next) && (match = link.match(new RegExp(part + '/\\:([a-z,_]+)'))) !== null) {\n\t\t\t\t\troute = route[link];\n\t\t\t\t\tid = params[match[1]] = next;\n\t\t\t\t\tnext = (++k) < urlparts.length - 1 ? urlparts[k + 1] : '';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn { component: NotFound }; // nao encontrou route => NotFound\n\t\t\t\t}\n\t\t\t\tRouter.breadcrumbs.push({ link: link, label: route.breadcrumb.label, id: id });\n\t\t\t\tif (next) {\n\t\t\t\t\tif (!route.routes) {\n\t\t\t\t\t\treturn { component: NotFound };\n\t\t\t\t\t}\n\t\t\t\t\troute = route.routes;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\troute.params = params;\n\t\treturn route;\n\t},\n\n\tlinkTo: (url, params) => url.replace(/\\:\\w+/g, match => params[match.replace(':', '')] ),\n\n\tgo: (to, absolute = false) => {\n\t\tif (to instanceof Object) {\n\t\t\t// calcular hash sem params\n\t\t\tvar i = window.location.hash.indexOf('?');\n\t\t\tvar hash = i > 0 ? window.location.hash.substring(0, i) : window.location.hash;\n\n\t\t\tto = hash.urlify(to);\n\t\t}\n\t\tif (!absolute) {\n\t\t\twindow.location.hash = to;\n\t\t}\n\t\telse {\n\t\t\twindow.location.href = to;\n\t\t}\n\t},\n\n\tgoBack: () => {\n\t\twindow.history.back();\n\t},\n\n\treload: () => {\n\t\twindow.location.reload();\n\t},\n\n\tlisten: callback => {\n\t\twindow.addEventListener('hashchange', l => {\n\t\t\tRouter.active = Router.set(window.location.hash, () => callback(Router.active) );\n\t\t}, false);\n\t\tRouter.set(window.location.hash, () => callback(Router.active) );\n\t},\n\n\tgetBreadcrumbs: () => {\n\t\tlet link = '';\n\t\tlet parent = null;\n\n\t\tlet breadcrumbs = Router.breadcrumbs.map((breadcrumb, i) => {\n\t\t\tlet label = breadcrumb.label.replace(/(\\{[a-z,_,.]+\\})/g, match => {\n\t\t\t\tlet parts = match.replace(/\\{|\\}/g, '').split('.');\n\t\t\t\tlet model = hp.store.findModel(parts[0] == 'parent' ? parent[parts[1]] : parts[0], breadcrumb.id);\n\t\t\t\treturn model ? model[parts[2] || parts[1]] : '';\n\t\t\t});\n\t\t\tlink = (link + '/' + breadcrumb.link).replace(/^[\\/]+/, '/').replace(/\\:\\w+/, breadcrumb.id || 0);\n\t\t\tparent = breadcrumb;\n\t\t\treturn (\n\t\t\t\t<li key={i}>\n\t\t\t\t\t{i < Router.breadcrumbs.length - 1 ? <a href={'#' + link}>{label}</a> : label}\n\t\t\t\t</li>\n\t\t\t)\n\t\t});\n\t\treturn (\n\t\t\t<ul className=\"breadcrumb\">\n\t\t\t\t{breadcrumbs}\n\t\t\t</ul>\n\t\t)\n\t}\n}\n\nexport default Router;\n","import React from 'react'\r\nimport * as sys from './common'\r\nimport Router from './router'\r\n//import './table.css!'\r\n\r\nclass ColumnHeader extends React.Component {\r\n\tonDropdownClick = (e) => {\r\n\t\tconst el = $(e.currentTarget.nextElementSibling)\r\n\t\te.stopPropagation()\r\n\t\tel.toggle()\r\n\t\t$(document).one('click', () => el.hide())\r\n\t}\r\n\r\n\tonDropdownItemClick = (e) => {\r\n\t\te.stopPropagation()\r\n\t\t$(e.currentTarget).hide()\r\n\t}\r\n\r\n\tonFilterValueChanged = (e) => {\r\n\t\tconst { columnFilter } = this.props\r\n\r\n\t\tcolumnFilter.selected = e.currentTarget.value || e.currentTarget.getAttribute('value')\r\n\t\tif (columnFilter.onChanged) {\r\n\t\t\tcolumnFilter.onChanged(columnFilter.selected)\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.forceUpdate()\r\n\t\t}\r\n\t}\r\n\r\n\tonSelectClick = (e) => {\r\n\t\te.stopPropagation()\r\n\t}\r\n\r\n\trenderFilterDropdown = (filter) => {\r\n\t\tconst { values, selected } = filter\r\n\t\tconst null_value = filter.nullValue || 0\r\n\t\tlet list\r\n\t\tlet label = selected === undefined || selected == null_value ? filter.header : null\r\n\r\n\t\tif (Array.isArray(values)) {\r\n\t\t\tlist = []\r\n\t\t\tfor (let item of values) {\r\n\t\t\t\tlist.push(<li key={item.value}><a href=\"#\" value={item.value} onClick={this.onFilterValueChanged}>{item.label}</a></li>)\r\n\t\t\t\tlabel = label || (item.value == selected ? item.label : null)\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlist = Object.keys(values).map(value => <li key={value}><a href=\"#\" value={value} onClick={this.onFilterValueChanged}>{values[value]}</a></li>)\r\n\t\t\tlabel = label || values[selected]\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div className=\"btn-group wide\" role=\"group\">\r\n\t\t\t\t<button type='button' className=\"btn btn-transparent dropdown-toggle\" onClick={this.onDropdownClick}>\r\n\t\t\t\t\t<span className='font-weight-bold'>\r\n\t\t\t\t\t\t{label}\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<span className=\"caret\"></span>\r\n\t\t\t\t</button>\r\n\t\t\t\t<ul className=\"dropdown-menu\" onClick={this.onDropdownItemClick}>\r\n\t\t\t\t\t<li><a href=\"#\" value={null_value} onClick={this.onFilterValueChanged}>({__('attrs_all')})</a></li>\r\n\t\t\t\t\t{list}\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t)\r\n\t}\r\n\r\n\trenderFilterSelect = (filter) => {\r\n\t\tconst { values, selected } = filter\r\n\t\tconst list = Array.isArray(values)\r\n\t\t\t? values.map(item => <option key={item.value} value={item.value}>{item.label}</option>)\r\n\t\t\t: Object.keys(values).map(value => <option key={value} value={value}>{values[value]}</option>)\r\n\t\tconst null_value = filter.nullValue || 0\r\n\r\n\t\treturn (\r\n\t\t\t<select className='btn-pure wide' onClick={this.onSelectClick} onChange={this.onFilterValueChanged} value={selected || null_value}>\r\n\t\t\t\t<option value={null_value} onClick={this.onFilterValueChanged}>({filter.header}: {__('attrs_all')})</option>\r\n\t\t\t\t{list}\r\n\t\t\t</select>\r\n\t\t)\r\n\t}\r\n\r\n\trenderFilter = (c, filter) => {\r\n\t\tif (filter.hasOwnProperty('render')) {\r\n\t\t\treturn filter.render(c)\r\n\t\t}\r\n\t\treturn ( Array.isArray(filter.values) ? filter.values.length : Object.keys(filter.values).length ) > 12\r\n\t\t\t? this.renderFilterSelect(filter)\r\n\t\t\t: this.renderFilterDropdown(filter)\r\n\t}\r\n\r\n\tonSort(column) {\r\n\t\tconst { meta, data } = this.props\r\n\t\tconst name = column.index || column.name\r\n\r\n\t\t// verificar se faz reset à ordenação\r\n\t\tif (name == meta.sort && meta.schc > 1) {\r\n\t\t\tdelete meta.sort\r\n\t\t\tdelete meta.asc\r\n\t\t\tmeta.schc = 0 // chc: same column header clicks\r\n\t\t}\r\n\t\telse {\r\n\t\t\tmeta.schc = name == meta.sort ? (meta.schc + 1) : 1\r\n\t\t\tmeta.asc = meta.sort != name || !meta.asc\r\n\t\t\tmeta.sort = name\r\n\t\t}\r\n\t\tmeta.page = 1\r\n\r\n\t\t// se dados dinamicos\r\n\t\tif (this.props.url) {\r\n\t\t\treturn this.props.fetchData();\r\n\t\t}\r\n\t\tconst asc = meta.asc ? -1 : 1;\r\n\t\tconst desc = asc == -1 ? 1 : -1;\r\n\t\tconst _data = data.sort((a, b) =>\r\n\t\t\ta[name] == b[name]\r\n\t\t\t\t? 0\r\n\t\t\t\t: (a[name] < b[name] ? asc : desc)\r\n\t\t)\r\n\t\tthis.props.setData({data: _data});\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { meta, c, columnFilter, rowEditing, renderColumn } = this.props\r\n\t\tconst cheader = columnFilter\r\n\t\t\t? this.renderFilter(c, columnFilter)\r\n\t\t\t: (\r\n\t\t\t\tc.header !== undefined\r\n\t\t\t\t\t? <span dangerouslySetInnerHTML={{ __html: c.header }} style={{textAlign: c.headerAlign || c.align || null}} />\r\n\t\t\t\t\t: ( c.name ? trans.get('attrs_' + c.name, null, c.name) : '' )\r\n\t\t\t)\r\n\t\tlet el_sort = null;\r\n\t\tlet onSort = null;\r\n\t\tlet ch;\r\n\t\tconst style = {\r\n\t\t\twidth: c.width || null\r\n\t\t};\r\n\r\n\t\tif (c.name && !rowEditing && (c.sort == undefined || c.sort)) {\r\n\t\t\tif (meta.sort != undefined) {\r\n\t\t\t\tel_sort =\r\n\t\t\t\t\t<em className={\r\n\t\t\t\t\t\t(c.index || c.name) == meta.sort\r\n\t\t\t\t\t\t\t? (!meta.asc ? 'la la-angle-down la-min' : 'la la-angle-up la-min')\r\n\t\t\t\t\t\t\t: 'la la-sort la-min'\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t/>\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tel_sort = <em className='la la-sort la-min' />;\r\n\t\t\t}\r\n\t\t\tonSort = this.onSort.bind(this, c);\r\n\t\t}\r\n\t\tif ((renderColumn && (ch = renderColumn(c)) != null) || (c.renderHeader && (ch = c.renderHeader(c)) != null)) {\r\n\t\t\treturn (\r\n\t\t\t\t<th style={style} className={(c.class || '') + (el_sort ? ' sortable' : '')} onClick={onSort}>\r\n\t\t\t\t\t{ch}\r\n\t\t\t\t</th>\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<th style={style} className={(c.class || '') + (el_sort ? ' sortable' : '')} title={c.headerTitle || null} onClick={onSort}>\r\n\t\t\t\t<div className=\"fb-header\" style={{justifyContent: c.headerAlign || c.align || null}}>\r\n\t\t\t\t\t{cheader}\r\n\t\t\t\t\t{el_sort}\r\n\t\t\t\t</div>\r\n\t\t\t</th>\r\n\t\t);\r\n\r\n\t}\r\n}\r\n\r\n\r\nexport default class Table extends sys.Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tcolumns: [],\r\n\t\t\tdata: [],\r\n\t\t\tmeta: {page: 1, item_per_page: props.itemsPerPage || 0, schc: 0 },\r\n\t\t\tloading: false,\r\n\t\t\trowEditing: null,\r\n\t\t\trowSel: null,\r\n\t\t\tselectionMode: false,\r\n\t\t\tselection: [],\r\n\t\t\tcurrent_url: null\r\n\t\t};\r\n\t\tthis.searchHandler = false;\r\n\t\tthis.unmounted = true;\r\n\t\tthis.refSearch = React.createRef();\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tthis.setState({\r\n\t\t\tsearch: this.props.search === undefined ? true : this.props.search,\r\n\t\t\tpagination: this.props.pagination === undefined ? true : this.props.pagination\r\n\t\t});\r\n\t\tthis.id = this.props.id || sys.simpleHash(this.props.url);\r\n\t\tthis.unmounted = false;\r\n\t\tif (this.id) {\r\n\t\t\tconst meta = sessionStorage.getItem(this.id);\r\n\t\t\tif (meta) {\r\n\t\t\t\tthis.state.meta = JSON.parse(meta);\r\n\t\t\t\tif (this.props.itemsPerPage) {\r\n\t\t\t\t\tthis.state.meta.item_per_page = this.props.itemsPerPage;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst urlParams = new URLSearchParams(window.location.search);\r\n \t\t\tconst inputParam = urlParams.get(this.id);\r\n\t\t\t\tthis.state.meta.search = inputParam || '';\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!this.props.url) {\r\n\t\t\tthis.refreshMetaData(this.props.columns, this.props.data);\r\n\t\t}\r\n\t\tthis.fetchData(false);\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tsetTimeout(() => { this.unmounted = true; }, 0);\r\n\t}\r\n\r\n\tcomponentDidUpdate() {\r\n\t\tif (this.state.loading == 1) {\r\n\t\t\t// verificar se entretanto o props.url mudou (nao funciona no metodo ComponentDidUpdate)\r\n\t\t\tthis.fetchData(false);\r\n\t\t}\r\n\t}\r\n\r\n\tsetSelectionMode(mode, update = true) {\r\n\t\tif (update) {\r\n\t\t\tthis.setState({selectionMode: mode});\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.state.selectionMode = mode;\r\n\t\t}\r\n\t}\r\n\r\n\tgetSelection(state = 1) {\r\n\t\tconst sel = {};\r\n\r\n\t\t(this.state.data || []).forEach( (r) => {\r\n\t\t\tif (r.selected == state) {\r\n\t\t\t\tsel[r.id] = state;\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn sel;\r\n\t}\r\n\r\n\tgetSearch() {\r\n\t\treturn this.state.meta.search || null;\r\n\t}\r\n\r\n\r\n\trefreshMetaData(columns, data, meta) {\r\n\t\tif (data && data.length > 0) {\r\n\t\t\tif (!this.props.treeGrid) {\r\n\t\t\t\tfor (let i in data) {\r\n\t\t\t\t\tdata[i].meta = {};\r\n\t\t\t\t}\r\n\t\t\t\tthis.state.meta.item_count = data.length;\r\n\t\t\t}\r\n\t\t\telse { // treeGrid\r\n\t\t\t\tconst parents = {};\r\n\t\t\t\tlet row;\r\n\t\t\t\tlet child_name = this.props.childName || 'id';\r\n\r\n\t\t\t\tfor (let i in data) {\r\n\t\t\t\t\trow = data[i];\r\n\r\n\t\t\t\t\trow.meta = {\r\n\t\t\t\t\t\tlevel: 1,\r\n\t\t\t\t\t\ttreed: meta[row[child_name]]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tif (!parents.hasOwnProperty(row[child_name])) {\r\n\t\t\t\t\t\tparents[row[child_name]] = [];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!parents.hasOwnProperty(row.parent_id)) {\r\n\t\t\t\t\t\tparents[row.parent_id] = [];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (row.parent_id == 0) {\r\n\t\t\t\t\t\tparents[row.parent_id].push(row);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tparents[row.parent_id].unshift(row);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tlet rows = parents[0] || [];\r\n\r\n\t\t\t\tdata = [];\r\n\t\t\t\t// percorrer apenas os pais\r\n\t\t\t\twhile (rows.length > 0) {\r\n\t\t\t\t\trow = rows.shift();\r\n\t\t\t\t\trow.meta.hasChildren = parents[row[child_name]] && parents[row[child_name]].length > 0;\r\n\t\t\t\t\tdata.push(row);\r\n\t\t\t\t\tif (parents[row[child_name]]) {\r\n\t\t\t\t\t\tparents[row[child_name]].forEach( child => {\r\n\t\t\t\t\t\t\tchild.meta.parent = row;\r\n\t\t\t\t\t\t\tchild.meta.level += row.meta.level;\r\n\t\t\t\t\t\t\trows.unshift(child);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tdelete parents[row[child_name]];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (let i in columns) {\r\n\t\t\tswitch(columns[i].format) {\r\n\t\t\t\tcase 'expand':\r\n\t\t\t\t\tthis.state.meta.columnExpand = columns[i];\r\n\t\t\t\t\tthis.state.meta.columnExpand.width = '20px';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'actions':\r\n\t\t\t\t\tcolumns[i].width = columns[i].width || '80px';\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn data;\r\n\t}\r\n\r\n\tupdate() {\r\n\t\tthis.fetchData(true);\r\n\t}\r\n\r\n\tstatic getDerivedStateFromProps(props, state) {\r\n\t\tif (state.current_url != props.url) {\r\n\t\t\treturn {\r\n\t\t\t\tcurrent_url: props.url,\r\n\t\t\t\tloading: 1 // indica que deve forcar fetchData\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (props.rowEditing != state.rowEditing) {\r\n\t\t\treturn {\r\n\t\t\t\trowEditing: props.rowEditing || (props.rowEditing === null ? null : state.rowEditing)\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null\r\n\t}\r\n\r\n\tprintData = () => {\r\n\t\tif (this.props.onBeforePrint && this.props.onBeforePrint() === false) {\r\n\t\t\treturn\r\n\t\t}\r\n\t\tconst columns = this.state.columns\r\n\t\t\t.filter(column => column.name && (!column.hasOwnProperty('exportable') || column.exportable))\r\n\t\t\t.map((column, index) => ({ name: column.name, title: column.header}))\r\n\r\n\t\tconst params = Object.flat(this.state.meta);\r\n\t\tparams.print = this.props.exportType || 'excel';\r\n\t\tparams.title = this.props.exportTitle || 'hp_file';\r\n\t\tparams.columns = JSON.stringify(columns);\r\n\r\n\t\thttp.get(this.state.current_url, { data: params },\r\n\t\t\t(response, success) => {\r\n\t\t\t\tif (success && response.file) {\r\n\t\t\t\t\tconst file = \"/cache/\" + encodeURIComponent(response.file);\r\n\t\t\t\t\twindow.open(file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\tfetchData = (force = true) => {\r\n\t\tconst {loading, current_url} = this.state\r\n\r\n\t\tif (loading === true) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!( force || loading === 1 )) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.setState({loading: true});\r\n\t\tconst meta = !this.props.treeGrid\r\n\t\t\t? null\r\n\t\t\t: this.state.data.reduce( (obj, d) => {\r\n\t\t\t\t\tif (d.meta.treed) {\r\n\t\t\t\t\t\tobj[d.id] = d.meta.treed;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn obj;\r\n\t\t\t\t}, {item_per_page: 0, search: this.state.meta.search}\r\n\t\t\t);\r\n\t\thttp.get(current_url, {data: meta || Object.flat(this.state.meta), silent: true}, response => {\r\n\t\t\tif (this.unmounted) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (response.meta === undefined) {\r\n\t\t\t\tresponse.meta = {};\r\n\t\t\t}\r\n\t\t\tconst { meta } = response\r\n\t\t\tmeta.asc = !meta.asc ? false : (typeof meta.asc == 'string' ? meta.asc == 'asc' || meta.asc == 'true' : JSON.parse(meta.asc));\r\n\t\t\t// gravar metadados na sessao\r\n\t\t\tif (this.id) {\r\n\t\t\t\tlet new_url = `${window.location.pathname}`;\r\n\t\t\t\tif (this.state.meta.search) {\r\n\t\t\t\t\tconst searchParams = new URLSearchParams(window.location.search);\r\n\t\t\t\t\tsearchParams.set(this.id, this.state.meta.search);\r\n\t\t\t\t\tnew_url += `?${searchParams.toString()}`;\r\n\t\t\t\t}\r\n\r\n\t\t\t\twindow.history.replaceState(null, null, `${new_url}`);\r\n\t\t\t\tsessionStorage.setItem(this.id, JSON.stringify(this.state.meta));\r\n\t\t\t}\r\n\t\t\tif (!response.columns) {\r\n\t\t\t\tresponse.columns = this.state.columns || {};\r\n\t\t\t}\r\n\t\t\tresponse.data = this.refreshMetaData(response.columns, response.data || [], meta);\r\n\t\t\tObject.assign(\r\n\t\t\t\tthis.state.meta,\r\n\t\t\t\t{ item_per_page: 0, item_count: 0 },\r\n\t\t\t\tmeta\r\n\t\t\t);\r\n\t\t\tif (this.props.onDataFetched) {\r\n\t\t\t\tthis.props.onDataFetched(response.data);\r\n\t\t\t}\r\n\t\t\tif (this.props.autoExpand && this.props.autoExpand == response.data.length) {\r\n\t\t\t\tthis.expand(null, response.data[this.props.autoExpand - 1]);\r\n\t\t\t}\r\n\t\t\tif (this.state.rowSel && this.props.onRowSelected instanceof Function) {\r\n\t\t\t\tthis.props.onRowSelected(null);\r\n\t\t\t}\r\n\t\t\tif (this.props.store) {\r\n\t\t\t\tthis.props.store[this.props.name] = response.data\r\n\t\t\t}\r\n\t\t\tthis.setState({\r\n\t\t\t\tcolumns: response.columns,\r\n\t\t\t\tdata: response.data,\r\n\t\t\t\trowEditing: null,\r\n\t\t\t\trowSel: null,\r\n\t\t\t\tselection: [],\r\n\t\t\t\tloading: false\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\teachChildren(row, callback, update = true) {\r\n\t\tvar data = this.state.data;\r\n\t\tvar l = data.length;\r\n\r\n\t\t// procurar pelo primeiro parent_id = row_id\r\n\t\tfor (var i = 0; i < l; i ++) {\r\n\t\t\tif (data[i].parent_id == row.id) {\r\n\t\t\t\twhile (i < l && data[i].meta.level > row.meta.level) {\r\n\t\t\t\t\tcallback(data[i ++]);\r\n\t\t\t\t}\r\n\t\t\t\tif (update) {\r\n\t\t\t\t\tthis.forceUpdate();\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tonSearch = (e) => {\r\n\t\tif (this.searchHandler) {\r\n\t\t\tclearTimeout(this.searchHandler);\r\n\t\t}\r\n\t\tthis.searchHandler = setTimeout(() => {\r\n\t\t\tthis.state.meta.page = 1;\r\n\t\t\tthis.state.meta.search = this.refSearch.current.value;\r\n\t\t\tthis.fetchData();\r\n\t\t}, 1000);\r\n\t}\r\n\r\n\tonClearSearch(e) {\r\n\t\tthis.state.meta.search = '';\r\n\t\tthis.refSearch.current.value = '';\r\n\t\tthis.fetchData();\r\n\t}\r\n\r\n\tonPage(i) {\r\n\t\tthis.state.meta.page = i;\r\n\t\tif (this.props.url) {\r\n\t\t\tthis.fetchData();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.forceUpdate();\r\n\t\t}\r\n\t}\r\n\r\n\tonSort(column) {\r\n\t\tconst name = column.index || column.name;\r\n\r\n\t\tthis.state.meta.asc = this.state.meta.sort != name || !this.state.meta.asc;\r\n\t\tthis.state.meta.page = 1;\r\n\t\tthis.state.meta.sort = name;\r\n\t\t// se dados dinamicos\r\n\t\tif (this.props.url) {\r\n\t\t\treturn this.fetchData();\r\n\t\t}\r\n\t\tconst asc = this.state.meta.asc ? -1 : 1;\r\n\t\tconst desc = asc == -1 ? 1 : -1;\r\n\t\tconst data = this.props.data.sort((a, b) =>\r\n\t\t\ta[name] == b[name]\r\n\t\t\t\t? 0\r\n\t\t\t\t: (a[name] < b[name] ? asc : desc)\r\n\t\t);\r\n\t\tthis.setState({data: data});\r\n\t}\r\n\r\n\teditingMode() {\r\n\t\tif (!this.state.rowEditing) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn this.state.rowEditing.id ? 1 : 2;\r\n\t}\r\n\r\n\tsetRowEdit(row) {\r\n\t\tthis.setState({ rowEditing: row });\r\n\t\tif (this.props.rowEditChanged instanceof Function) {\r\n\t\t\tthis.props.rowEditChanged(row);\r\n\t\t}\r\n\t}\r\n\r\n\tonEdit(row, column, e) {\r\n\t\tconst { editable, url, loadRowOnEdit } = this.props\r\n\r\n\t\tif (editable === false) {\r\n\t\t\tif (this.props.onDoubleClick) {\r\n\t\t\t\tthis.props.onDoubleClick(row, column);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!url && loadRowOnEdit !== false) {\r\n\t\t\tmbox.info(trans.get('dev_url_edit_undefined'));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (this.props.onEdit) {\r\n\t\t\tthis.props.onEdit(row);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse if (column && column.actions && column.actions.edit && column.actions.edit.url) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (this.state.rowEditing) {\r\n\t\t\tmbox.info(trans.get('attrs_editing_mode'));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// copia a row para o caso do cancelamento\r\n\t\tif (row.id) {\r\n\t\t\tif (this.props.loadRowOnEdit === false) {\r\n\t\t\t\tthis.rowEditingBkup = Object.assign({}, row);\r\n\t\t\t\tdelete this.rowEditingBkup.meta;\r\n\t\t\t\tthis.setRowEdit(row);\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\thttp.get(this.props.url, (response) => {\r\n\t\t\t\t\tthis.rowEditingBkup = Object.assign({}, row, response.data);\r\n\t\t\t\t\tdelete this.rowEditingBkup.meta;\r\n\t\t\t\t\tthis.validations = response.validation || {};\r\n\t\t\t\t\tthis.setRowEdit(row);\r\n\t\t\t\t},\r\n\t\t\t\t{ data: {edtid: row.id} }\r\n\t\t\t);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!row.meta) {\r\n\t\t\trow.meta = {};\r\n\t\t}\r\n\t\t// se row ainda nao existe, significa que é novo\r\n\t\tif (this.state.data.indexOf(row) < 0) {\r\n\t\t\tthis.state.data.unshift(row);\r\n\t\t}\r\n\t\telse if (row.id) {\r\n\t\t\tthis.rowEditingBkup = Object.assign({}, row);\r\n\t\t}\r\n\t\tthis.setRowEdit(row);\r\n\t}\r\n\r\n\tonDoubleClick(row, column) {\r\n\t\tif (column.actions.edit.url) {\r\n\t\t\tRouter.go(column.actions.edit.url.replace(':id', row.id));\r\n\t\t}\r\n\t\telse if (this.props.onDoubleClick) {\r\n\t\t\tthis.props.onDoubleClick(row, column);\r\n\t\t}\r\n\t}\r\n\r\n\tonCancel(row) {\r\n\t\tif (this.rowEditingBkup) {\r\n\t\t\tObject.assign(row, this.rowEditingBkup);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tconst data = this.props.data || this.state.data\r\n\t\t\tconst i = data.indexOf(row)\r\n\r\n\t\t\tif (i >= 0) {\r\n\t\t\t\tdata.splice(i, 1)\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.rowEditingBkup = null\r\n\t\tthis.setRowEdit(null)\r\n\t}\r\n\r\n\tonSave(row) {\r\n\t\tconst { url_save, loadRowOnEdit, onSaved } = this.props\r\n\r\n\t\tif (!url_save && loadRowOnEdit !== false) {\r\n\t\t\tmbox.info(trans.get('dev_url_save_undefined'));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (url_save) {\r\n\t\t\thttp.post(url_save, {data: Object.flat(row)},\r\n\t\t\t\t(response, success) => {\r\n\t\t\t\t\tif (success) {\r\n\t\t\t\t\t\tif (response.data) {\r\n\t\t\t\t\t\t\tObject.assign(row, response.data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (response.id) {\r\n\t\t\t\t\t\t\trow.id = response.id;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.rowEditingBkup = null;\r\n\t\t\t\t\t\tthis.setRowEdit(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t\telse if (loadRowOnEdit === false) {\r\n\t\t\tthis.rowEditingBkup = null;\r\n\t\t\tthis.setRowEdit(null);\r\n\t\t\tif (onSaved) {\r\n\t\t\t\tonSaved(row)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tonDelete(row) {\r\n\t\t// tem a certeza que deseja remover este registo...\r\n\t\tif (this.props.onDelete) {\r\n\t\t\tthis.props.onDelete(row);\r\n\t\t}\r\n\t\telse if (this.props.url_delete) {\r\n\t\t\tif (!row.id) {\r\n\t\t\t\tthis.setState({ data: this.state.data.filter( (el) => el != row ) });\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tmbox.confirmDelete( () => {\r\n\t\t\t\thttp.post(\r\n\t\t\t\t\tthis.props.url_delete,\r\n\t\t\t\t\t{data: Object.flat(row)},\r\n\t\t\t\t\t(response, success) => {\r\n\t\t\t\t\t\tif (success) {\r\n\t\t\t\t\t\t\tthis.setState({ data: this.state.data.filter( el => el.id != row.id ) });\r\n\t\t\t\t\t\t\tmbox.dismiss()\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}, row.description || row.name || row.id, undefined, row.id );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tmbox.info('método delete não definido !', trans.get('attrs_delete'));\r\n\t\t}\r\n\t}\r\n\r\n\tformatReorder(column, row) {\r\n\t\treturn (\r\n\t\t\t<em />\r\n\t\t)\r\n\t}\r\n\r\n\tformatAvatar(column, row) {\r\n\t\tif (!row[column.name]) {\r\n\t\t\treturn null\r\n\t\t}\r\n\t\tif (column.zoomed == true) {\r\n\t\t\treturn (\r\n\t\t\t\t<div style={{width: '25px'}}>\r\n\t\t\t\t\t<div className=\"zoomed\">\r\n\t\t\t\t\t\t<img className='avatar' src={row[column.name]} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t)\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div>\r\n\t\t\t\t<img className='avatar' src={row[column.name]} />\r\n\t\t\t</div>\r\n\t\t)\r\n\t}\r\n\r\n\r\n\tformatImage(column, row) {\r\n\t\treturn row[column.name] ? <img className='circular' src={row[column.name]} /> : null;\r\n\t}\r\n\r\n\tformatIcon(column, row) {\r\n\t\tvar icon =\r\n\t\t\t(column.maps instanceof Object)\r\n\t\t\t\t? (\r\n\t\t\t\t\tcolumn.maps.hasOwnProperty(row[column.name])\r\n\t\t\t\t\t\t? column.maps[row[column.name]]\r\n\t\t\t\t\t\t: (column.maps.hasOwnProperty('%') ? column.maps['%'] : null)\r\n\t\t\t\t)\r\n\t\t\t\t: row[column.name];\r\n\r\n\t\tif (icon) {\r\n\t\t\tif (typeof icon == 'string') {\r\n\t\t\t\treturn <i className={'icon ' + icon} />;\r\n\t\t\t}\r\n\t\t\treturn <i className={'icon ' + icon.value} title={icon.title.startsWith('@') ? row[icon.title.replace('@', '')] : icon.title} />;\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tformatEdit(column, row, config) {\r\n\t\tconst url = column.actions && column.actions.edit && column.actions.edit.url\r\n\t\t\t? column.actions.edit.url.replace(/\\:(\\w+)/g, ($1, $2) => row[$2])\r\n\t\t\t: null;\r\n\t\tconst disabled = this.state.rowEditing != null;\r\n\r\n\t\treturn React.createElement(\r\n\t\t\turl ? 'a' : 'button', {\r\n\t\t\t\ttype: 'button',\r\n\t\t\t\ttitle: config.title || trans.get('attrs_edit'),\r\n\t\t\t\thref: url,\r\n\t\t\t\tclassName: (config.class || 'btn btn-default') + (disabled ? ' disabled' : ''),\r\n\t\t\t\tonClick: disabled ? null : this.onEdit.bind(this, row, column),\r\n\t\t\t\ttarget: config.target || null,\r\n\t\t\t\tkey: row.id + 'edit'\r\n\t\t\t},\r\n\t\t\t<em className={config.icon || 'la la-pencil'}\r\n\t\t/>)\r\n\t}\r\n\r\n\tformatDelete(column, row, config) {\r\n\t\tvar disabled = this.state.rowEditing != null;\r\n\r\n\t\treturn (\r\n\t\t\t<button type='button'\r\n\t\t\t\ttitle={trans.get('attrs_delete')}\r\n\t\t\t\tclassName={(config.class || 'btn btn-default') + (disabled ? ' disabled' : '')}\r\n\t\t\t\tonClick={disabled ? null : this.onDelete.bind(this, row)}\r\n\t\t\t\tdisabled={disabled}\r\n\t\t\t\tkey={row.id + 'delete'}\r\n\t\t\t>\r\n\t\t\t\t<em className='la la-trash' />\r\n\t\t\t</button>\r\n\t\t);\r\n\t}\r\n\r\n\tformatCheckbox(column, row) {\r\n\t\treturn (\r\n\t\t\t<sys.Checkbox\r\n\t\t\t\tname={column.name}\r\n\t\t\t\tmodel={row}\r\n\t\t\t\tbitwise={column.bitwise}\r\n\t\t\t\tdisabled={this.props.disabled || (column.editable!==2 && this.state.rowEditing == null)}\r\n\t\t\t\tonClick={this.props.onClickBool ? this.props.onClickBool.bind(column, row) : null}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\tformatBool(column, row) {\r\n\t\treturn (\r\n\t\t\t<em className={\r\n\t\t\t\trow[column.name] == null\r\n\t\t\t\t\t? (column.nullSymbol || column.falseSymbol || 'la la-time')\r\n\t\t\t\t\t: (row[column.name] == 0 ? (column.falseSymbol || 'la la-time') : (column.trueSymbol || 'la la-check'))\r\n\t\t\t}/>\r\n\t\t);\r\n\t}\r\n\r\n\texpand(column, row, e) {\r\n\t\tif (e) {\r\n\t\t\te.preventDefault();\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t\tconst expanded = row.meta.expanded === undefined ? true : !row.meta.expanded;\r\n\r\n\t\tif (this.props.onBeforeRowExpand) {\r\n\t\t\treturn this.props.onBeforeRowExpand(row, expanded);\r\n\t\t}\r\n\t\trow.meta.expanded = expanded;\r\n\t\tthis.forceUpdate();\r\n\t}\r\n\r\n\tformatExpand(column, row) {\r\n\t\tif (!row.id || (column.hidden && row[column.hidden] == 0)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tif(column.enabled && row[column.enabled] == 0) {\r\n\t\t\treturn <em className={'disabled la la-' + (column.iconPlus || 'angle-right')} title={column.title ? trans.getif(column.title, row) : ''}/>\r\n\t\t}\r\n\r\n\t\tcolumn.class = 'expand';\r\n\t\trow.meta = row.meta ?? {};\r\n\t\treturn (\r\n\t\t\t<a className='expand pointer' title={column.title ? trans.getif(column.title, row) : ''} onClick={this.expand.bind(this, column, row)}>\r\n\t\t\t\t<em className={'la la-' + (row.meta.expanded ? (column.iconMinus || 'angle-down') : (column.iconPlus || 'angle-right'))} />\r\n\t\t\t</a>\r\n\t\t);\r\n\t}\r\n\r\n\t// quando se clica para expandir/retrair uma row na arvore\r\n\ttreeExpand(column, row, e) {\r\n\t\tif (e) {\r\n\t\t\te.preventDefault();\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t\trow.meta.treed = row.meta.treed === undefined ? row.id > 0 : !row.meta.treed;\r\n\t\tif (!row.meta.hasChildren && column.url) {\r\n\t\t\trow.meta.expanded = row.meta.treed;\r\n\t\t\tif (row.meta.expanded && !row.meta.fn) {\r\n\t\t\t\t/*\r\n\t\t\t\tSystem.import(column.url.urlify(null, 'cid')).then( R => {\r\n\t\t\t\t\tif (!this.unmounted) {\r\n\t\t\t\t\t\trow.meta.fn = R.default;\r\n\t\t\t\t\t\tthis.forceUpdate();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t*/\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.forceUpdate();\r\n\t}\r\n\r\n\tformatTree(column, row) {\r\n\t\tif (!row.id) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif (!row.meta.hasChildren && !column.url) {\r\n\t\t\treturn (\r\n\t\t\t\t<p className={'treed level-' + row.meta.level}>\r\n\t\t\t\t\t<i className='expand fa fa-circle-o' />\r\n\t\t\t\t\t{column.icon ? this.formatIcon(column.icon, row) : null}\r\n\t\t\t\t\t<span>{row[column.name]}</span>\r\n\t\t\t\t</p>\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<p className={'treed level-' + row.meta.level}>\r\n\t\t\t\t<a onClick={this.treeExpand.bind(this, column, row)}>\r\n\t\t\t\t\t<i className={'expand icon ' + (row.meta.treed ? (column.iconMinus || 'minus') : (column.iconPlus || 'plus'))} />\r\n\t\t\t\t\t{column.icon ? this.formatIcon(column.icon, row) : null}\r\n\t\t\t\t\t<span>{row[column.name]}</span>\r\n\t\t\t\t</a>\r\n\t\t\t</p>\r\n\t\t);\r\n\t}\r\n\r\n\r\n\tformatTrans(column, row) {\r\n\t\treturn trans.get(row[column.name]);\r\n\t}\r\n\r\n\tformatCombobox(column, row) {\r\n\t\tlet value = row[column.name];\r\n\r\n\t\tif (column.alias && row.hasOwnProperty(column.alias)) {\r\n\t\t\treturn row[column.alias];\r\n\t\t}\r\n\t\t// indicar registos no array data\r\n\t\tif (!column.k) {\r\n\t\t\tcolumn.k = {};\r\n\t\t\tif (column.data) {\r\n\t\t\t\tfor (let i in column.data) {\r\n\t\t\t\t\tcolumn.k[column.data[i].value] = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn column.k[value] && column.data[column.k[value]] ? column.data[column.k[value]].label : value;\r\n\t}\r\n\r\n\tformatHtml(column, row) {\r\n\t\treturn <div dangerouslySetInnerHTML={{ __html: row[column.name] }}/>;\r\n\t}\r\n\r\n\tformatBadge(column, row) {\r\n\t\treturn <sys.Badge className={ row[column.className] } title={row[column.name]} tip={column.tip ? row[column.tip] : null}/>;\r\n\t}\r\n\r\n\tformatLink(column, row, config) {\r\n\t\t// se filtro definido, verificar se todas as condições se verificam\r\n\t\tif (config.filter) {\r\n\t\t\tfor (let cn in config.filter) {\r\n\t\t\t\tif (row[cn] != config.filter[cn]) {\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst url = (config.url || '#').replace(/\\:(\\w+)/g, ($1, $2) => row[$2]);\r\n\t\treturn (\r\n\t\t\t<a key={config.name || '_k'} className={config.classBtn || 'btn btn-default'} target={config.target || '_blank'} href={url}>\r\n\t\t\t\t<em className={config.class || 'la la-external-link-alt'} />\r\n\t\t\t</a>\r\n\t\t);\r\n\t}\r\n\r\n\tformatDefaultActions(column, row) {\r\n\t\tconst actions = [];\r\n\r\n\t\tfor (let i in column.actions) {\r\n\t\t\tconst config = column.actions[i];\r\n\t\t\tlet el = null;\r\n\r\n\t\t\tif (config.fn instanceof Function) {\r\n\t\t\t\tel = config.fn(column, row, config);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconst fn = \"format\" + (config.type || i).capitalize();\r\n\r\n\t\t\t\tif (this.props[fn] instanceof Function) {\r\n\t\t\t\t\tel = this.props[fn](column, row, config);\r\n\t\t\t\t}\r\n\t\t\t\telse if (this[fn] instanceof Function) {\r\n\t\t\t\t\tel = this[fn](column, row, config);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (el) {\r\n\t\t\t\t//actions.push(<span key={row.id + i}>{el}</span>);\r\n\t\t\t\tactions.push(el);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.props.groupDefaultActions === false) {\r\n\t\t\treturn actions\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div className=\"btn-group\">\r\n\t\t\t\t{actions}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n\tformatActions(column, row) {\r\n\t\tif (this.props.formatActions) {\r\n\t\t\treturn this.props.formatActions(column, row, this);\r\n\t\t}\r\n\t\treturn this.formatDefaultActions(column, row);\r\n\t}\r\n\r\n\teditorCheckbox(col, row) {\r\n\t\treturn <sys.Checkbox model={row} name={col.name} autoFocus={row.meta.focused == 1} validations={this.validations} />;\r\n\t}\r\n\r\n\teditorDate(col, row) {\r\n\t\treturn <sys.Input type=\"date\" model={row} name={col.name} classNameEl=\"form-control input-sm hp-input-max-120\" />\r\n\t}\r\n\r\n\teditorNumber(col, row) {\r\n\t\treturn <sys.Input type=\"number\" model={row} name={col.name} classNameEl=\"form-control input-sm hp-input-max-120\" />\r\n\t}\r\n\r\n\teditorUrl(col, row) {\r\n\t\treturn <sys.Input type=\"url\" model={row} name={col.name} classNameEl=\"form-control input-sm\" />\r\n\t}\r\n\r\n\teditorDropdown(col, row) {\r\n\t\t//return <Select model={row} name={col.name} url={col.url} data={col.data} value={row[col.name]} description={col.header} />;\r\n\t\treturn (\r\n\t\t\t<sys.Dropdown\r\n\t\t\t\tmodel={row}\r\n\t\t\t\tname={col.name}\r\n\t\t\t\turl={col.url}\r\n\t\t\t\tdata={col.data}\r\n\t\t\t\tvalue={row[col.name]}\r\n\t\t\t\tdescription={col.header}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\teditorText(col, row) {\r\n\t\treturn <sys.Textarea model={row} name={col.name} className=\"form-control\" />;\r\n\t}\r\n\r\n\tclearSelection() {\r\n\t\tthis.setState({rowSel: null});\r\n\t}\r\n\r\n\tonRowClick(row) {\r\n\t\tif (this.props.multiselect == 1) {\r\n\t\t\tthis.setState({rowSel: row});\r\n\t\t}\r\n\t\tif (this.props.onRowSelected instanceof Function) {\r\n\t\t\tif (this.props.onRowSelected(row)) {\r\n\t\t\t\tthis.forceUpdate();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tonCheckAll = (value) => {\r\n\t\tconst { data } = this.state\r\n\t\tif (data.length > 0) {\r\n\t\t\tconst selected = data.at(0) === undefined ? !selection : (data.at(0).selected ? false : true)\r\n\t\t\tconst selection = selected ? [...data] : []\r\n\r\n\t\t\tdata.forEach( row => {\r\n\t\t\t\trow.selected = selected\r\n\t\t\t} )\r\n\t\t\tthis.setState({\r\n\t\t\t\tselection: selection\r\n\t\t\t})\r\n\t\t\tif (this.props.onCheck) {\r\n\t\t\t\tthis.props.onCheck(selection, selected)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tonCheck(row) {\r\n\t\tconst {data, selection} = this.state\r\n\t\tconst i = selection.findIndex(r => r === row)\r\n\r\n\t\tif (row.selected) {\r\n\t\t\tif (i < 0) {\r\n\t\t\t\tselection.push(row)\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (i >= 0) {\r\n\t\t\tselection.splice(i, 1)\r\n\t\t}\r\n\t\tthis.forceUpdate()\r\n\t\tif (this.props.onCheck) {\r\n\t\t\tthis.props.onCheck(selection, row.selected)\r\n\t\t}\r\n\t}\r\n\r\n\tonNew = () => {\r\n\t\tthis.onEdit(this.props.onNew ? this.props.onNew() : {})\r\n\t}\r\n\r\n\trenderColumnData(col, row) {\r\n\t\tif (this.state.rowEditing == row) {\r\n\t\t\tif (col.editable || col.editor) {\r\n\t\t\t\tconst editor = \"editor\" + (\r\n\t\t\t\t\tcol.editor\r\n\t\t\t\t\t\t? col.editor.capitalize()\r\n\t\t\t\t\t\t: ( col.format ? col.format.capitalize() : '' )\r\n\t\t\t\t);\r\n\t\t\t\trow.meta.focused = !row.meta.focused ? 1 : row.meta.focused + 1;\r\n\r\n\t\t\t\tif (this.props[editor] instanceof Function) {\r\n\t\t\t\t\treturn this.props[editor](col, row);\r\n\t\t\t\t}\r\n\t\t\t\telse if (this[editor] instanceof Function) {\r\n\t\t\t\t\treturn this[editor](col, row);\r\n\t\t\t\t}\r\n\t\t\t\tlet title = row.meta && row.meta.hasOwnProperty(col.name + '@title') ? row.meta[col.name + '@title'] : '';\r\n\t\t\t\treturn <sys.Input model={row} name={col.name} className='form-control input-sm' autoFocus={row.meta.focused == 1} title={title} validations={this.validations} />;\r\n\t\t\t}\r\n\t\t\telse if (col.actions) {\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<div className='btn-group'>\r\n\t\t\t\t\t\t<button type='button' className='btn btn-default btn-circular' title={__('buttons_cancel')} onClick={this.onCancel.bind(this, row)}>\r\n\t\t\t\t\t\t\t<em className='la la-undo'/>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t<button type='button' className='btn btn-primary btn-circular' title={__('buttons_save')} onClick={this.onSave.bind(this, row)}>\r\n\t\t\t\t\t\t\t<em className='la la-check'/>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!col.format) {\r\n\t\t\treturn row[col.name];\r\n\t\t}\r\n\t\tconst formatFunc = 'format' + col.format.capitalize();\r\n\r\n\t\tif (this.props[formatFunc] instanceof Function) {\r\n\t\t\treturn this.props[formatFunc](col, row);\r\n\t\t}\r\n\t\treturn this[formatFunc] instanceof Function\r\n\t\t\t? this[formatFunc](col, row)\r\n\t\t\t: row[col.name];\r\n\t}\r\n\r\n\tsetData = (data) => {\r\n\t\tthis.setState({data: data});\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { props } = this\r\n\t\tconst rowEditing = this.state.rowEditing || props.rowEditing\r\n\t\tconst colsDef = props.columns || this.state.columns\r\n\t\tconst loader = this.state.loading === true\r\n\t\t\t? [<sys.Loader key='l' className='inline' />, <div key='o' className='overlay' />]\r\n\t\t\t: null;\r\n\r\n\t\tlet data = props.data || this.state.data;\r\n\t\tlet rows = [];\r\n\t\tconst header = [];\r\n\t\tlet footer = [];\r\n\t\tlet cActions = null;\r\n\t\tconst meta = this.state.meta;\r\n\t\tconst columns = colsDef.map( (c, i) => {\r\n\t\t\tif (c.actions) {\r\n\t\t\t\tcActions = c;\r\n\t\t\t}\r\n\t\t\treturn (\r\n\t\t\t\t<ColumnHeader key={'th-' + i} c={c}\r\n\t\t\t\t\tmeta={meta}\r\n\t\t\t\t\tdata={data}\r\n\t\t\t\t\turl={props.url}\r\n\t\t\t\t\tfetchData={this.fetchData}\r\n\t\t\t\t\tsetData={this.setData}\r\n\t\t\t\t\trowEditing={rowEditing}\r\n\t\t\t\t\tcolumnFilter={props.columnFilters && props.columnFilters.hasOwnProperty(c.name) ? props.columnFilters[c.name] : null}\r\n\t\t\t\t/>\r\n\t\t\t)\r\n\t\t})\r\n\t\tconst paginate = meta && this.state.pagination && !this.props.treeGrid;\r\n\r\n\t\tif (!this.props.url && paginate) {\r\n\t\t\tconst k = ((meta.page || 1) - 1) * meta.item_per_page;\r\n\t\t\tdata = data.slice(k, k + meta.item_per_page);\r\n\t\t}\r\n\t\tif (!rowEditing && (this.state.selectionMode || this.props.selectionMode)) {\r\n\t\t\tcolumns.unshift(\r\n\t\t\t\t<th key={'th-k'} className='selection' width=\"15px\">\r\n\t\t\t\t\t<sys.Checkbox\r\n\t\t\t\t\t\tonClick={this.onCheckAll}\r\n\t\t\t\t\t\tchecked={this.state.selection.length > 0}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</th>\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (this.props.renderRow) {\r\n\t\t\trows = data.map( d => this.props.renderRow(d, colsDef) );\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// filtrar dados em caso de treegrid\r\n\t\t\tif (this.props.treeGrid) {\r\n\t\t\t\tdata = data.filter( d => {\r\n\t\t\t\t\tfor (let p = d.meta.parent; p; p = p.meta.parent) {\r\n\t\t\t\t\t\tif (!p.meta.treed)\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tlet k = 0;\r\n\t\t\trows = data.map( (d, i) => {\r\n\t\t\t\tconst columnData = colsDef.map( (c, j) => {\r\n\t\t\t\t\tconst style = {\r\n\t\t\t\t\t\ttextAlign: c.align || null\r\n\t\t\t\t\t};\r\n\t\t\t\t\tconst content = this.renderColumnData(c, d);\r\n\t\t\t\t\tconst title =\r\n\t\t\t\t\t\td.title || (\r\n\t\t\t\t\t\tc.title\r\n\t\t\t\t\t\t\t? (c.title.startsWith('#') ? d[c.title.substring(1)] : trans.getif(c.title, d))\r\n\t\t\t\t\t\t\t: null\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\treturn React.createElement(c.el || 'td', {\r\n\t\t\t\t\t\t\tkey: 'td-' + (k ++),\r\n\t\t\t\t\t\t\ttitle: title,\r\n\t\t\t\t\t\t\tclassName: c.class,\r\n\t\t\t\t\t\t\tstyle: style\r\n\t\t\t\t\t\t}, content\r\n\t\t\t\t\t)\r\n\t\t\t\t});\r\n\t\t\t\tif (!rowEditing && (this.state.selectionMode || this.props.selectionMode)) {\r\n\t\t\t\t\tcolumnData.unshift(\r\n\t\t\t\t\t\t<td key={'td-k' + i} className='selection'>\r\n\t\t\t\t\t\t\t<sys.Checkbox\r\n\t\t\t\t\t\t\t\tname='selected'\r\n\t\t\t\t\t\t\t\tmodel={d}\r\n\t\t\t\t\t\t\t\tonClick={this.onCheck.bind(this, d)}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\tif (!d.meta) {\r\n\t\t\t\t\td.meta = {};\r\n\t\t\t\t}\r\n\t\t\t\td.meta.focused = 0;\r\n\t\t\t\tlet props = this.props.getRowProps instanceof Function\r\n\t\t\t\t\t? this.props.getRowProps(d, columnData)\r\n\t\t\t\t\t: null;\r\n\t\t\t\tif (!d.meta.expanded) {\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<tr key={'r' + i}\r\n\t\t\t\t\t\t\tonDoubleClick={\r\n\t\t\t\t\t\t\t\tcActions && cActions.actions.edit\r\n\t\t\t\t\t\t\t\t\t? this.onDoubleClick.bind(this, d, cActions)\r\n\t\t\t\t\t\t\t\t\t: (rowEditing ? null : this.onEdit.bind(this, d, cActions))\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tonClick={this.onRowClick.bind(this, d)}\r\n\t\t\t\t\t\t\t{...props}\r\n\t\t\t\t\t\t\tclassName={classNames(this.state.rowSel == d ? 'selected' : null, (props ? props.className : null))}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{columnData}\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\t\t\t\treturn [\r\n\t\t\t\t\t<tr key={i + 'xo'} className='expanded-owner' onClick={this.onRowClick.bind(this, d)} {...props}>{columnData}</tr>,\r\n\t\t\t\t\t<tr key={i + 'x_'} />,\r\n\t\t\t\t\t<tr key={i + 'xx'} className='expanded'>\r\n\t\t\t\t\t\t<td />\r\n\t\t\t\t\t\t<td colSpan={colsDef.length - 1} className='content'>\r\n\t\t\t\t\t\t\t{this.props.renderRowExpanded ? this.props.renderRowExpanded(d) : null}\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t];\r\n\t\t\t});\r\n\t\t}\r\n\t\t// paginacao\r\n\t\tconst pagination = [];\r\n\r\n\t\tif (paginate && rowEditing == null) {\r\n\t\t\tconst pages = meta.item_per_page ? Math.ceil(Number(meta.item_count) / Number(meta.item_per_page)) : 0;\r\n\r\n\t\t\tif (meta.page > 1) {\r\n\t\t\t\tpagination.push(\r\n\t\t\t\t\t<a key='first' className='btn btn-default' onClick={this.onPage.bind(this, 1)} title={__('buttons_first')}>\r\n\t\t\t\t\t\t<em className='la la-angle-double-left' />\r\n\t\t\t\t\t</a>\r\n\t\t\t\t);\r\n\t\t\t\tpagination.push(\r\n\t\t\t\t\t<a key='prev' className='btn btn-default' onClick={this.onPage.bind(this, Number(meta.page) - 1)}>\r\n\t\t\t\t\t\t<em className='la la-angle-left' />\r\n\t\t\t\t\t</a>\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif (meta.page < pages) {\r\n\t\t\t\tpagination.push(\r\n\t\t\t\t\t<a key='next' className='btn btn-default' title={__('buttons_next')} onClick={this.onPage.bind(this, Number(meta.page) + 1)}>\r\n\t\t\t\t\t\t<em className='la la-angle-right' />\r\n\t\t\t\t\t</a>\r\n\t\t\t\t);\r\n\t\t\t\tpagination.push(\r\n\t\t\t\t\t<a key='last' className='btn btn-default' onClick={this.onPage.bind(this, pages)} title={__('buttons_last')}>\r\n\t\t\t\t\t\t<em className='la la-angle-double-right' />\r\n\t\t\t\t\t</a>\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif (pagination.length > 0) {\r\n\t\t\t\tfooter.push(\r\n\t\t\t\t\t<div key='p' className='right'>\r\n\t\t\t\t\t\t{<div className='pr-1'>{meta.page} de {pages}</div>}\r\n\t\t\t\t\t\t<div className='btn-group btn-group-xs btn-group-pure'>{pagination}</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.state.search) {\r\n\t\t\theader.push(\r\n\t\t\t\t<div className='header' key='h1'>\r\n\t\t\t\t\t<div className='pull-left search'>\r\n\t\t\t\t\t\t<em className=\"la la-info-circle\" title='Cada palavra na pesquisa será aplicada em multiplas colunas' />\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\ttype='search'\r\n\t\t\t\t\t\t\tref={this.refSearch}\r\n\t\t\t\t\t\t\tdefaultValue={meta.search}\r\n\t\t\t\t\t\t\tclassName='search'\r\n\t\t\t\t\t\t\tplaceholder={trans.get('attrs_search')}\r\n\t\t\t\t\t\t\tonChange={this.onSearch}\r\n\t\t\t\t\t\t\tdisabled={rowEditing != null}\r\n\t\t\t\t\t\t\tautoFocus={this.props.autoFocus}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t{meta.search\r\n\t\t\t\t\t\t\t? <a\r\n\t\t\t\t\t\t\t\tonClick={this.onClearSearch.bind(this)}\r\n\t\t\t\t\t\t\t\tdisabled={rowEditing != null || meta.search == '' || meta.search == undefined}\r\n\t\t\t\t\t\t\t\ttitle={trans.get('attrs_clear_search')}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<em className=\"la la-close la-min\" />\r\n\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t: null\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"pull-right btn-group btn-group-xs btn-group-pure\">\r\n\t\t\t\t\t\t{this.props.newLabel && !rowEditing\r\n\t\t\t\t\t\t\t? <button type='button' className=\"btn btn-primary\" onClick={this.onNew}>\r\n\t\t\t\t\t\t\t\t<em className=\"la la-plus\" />\r\n\t\t\t\t\t\t\t\t<span>{this.props.newLabel}</span>\r\n\t\t\t\t\t \t\t</button>\r\n\t\t\t\t\t\t\t: null\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t{(!this.props.hasOwnProperty('export') || this.props.export)\r\n\t\t\t\t\t\t\t? <a\r\n\t\t\t\t\t\t\t\tclassName='btn btn-default'\r\n\t\t\t\t\t\t\t\tonClick={this.printData}\r\n\t\t\t\t\t\t\t\tdisabled={rowEditing != null}\r\n\t\t\t\t\t\t\t\ttitle={trans.get('buttons_print')}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<em className='la la-print'/>\r\n\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t: null\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t{(this.props.showRefreshBtn === undefined || this.props.showRefreshBtn) && this.props.url\r\n\t\t\t\t\t\t\t? <a\r\n\t\t\t\t\t\t\t\tclassName='btn btn-default'\r\n\t\t\t\t\t\t\t\tonClick={this.fetchData}\r\n\t\t\t\t\t\t\t\tdisabled={rowEditing != null}\r\n\t\t\t\t\t\t\t\ttitle={trans.get('buttons_update')}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<em className='la la-sync'/>\r\n\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t: null\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t{pagination}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"clearfix\" />\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (this.props.title) {\r\n\t\t\theader.unshift(\r\n\t\t\t\t<div key='h0'>\r\n\t\t\t\t\t<div className='titled'>\r\n\t\t\t\t\t\t{this.props.title}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (footer.length > 0) {\r\n\t\t\tfooter =\r\n\t\t\t\t<tfoot className='full-width'>\r\n\t\t\t\t\t<tr className='footer'><th colSpan={columns.length}>{footer}</th></tr>\r\n\t\t\t\t</tfoot>;\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div className={\"table-container \" + (this.props.classNameContainer || '')}>\r\n\t\t\t\t{loader}\r\n\t\t\t\t{header}\r\n\t\t\t\t<div className={this.props.classNameTableContainer || null}>\r\n\t\t\t\t\t<table\r\n\t\t\t\t\t\tclassName={(this.props.className || 'table regular_table') + ' ' + (this.props.name || '') + (this.props.multiselect==1 ? ' multi' : '')}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{columns\r\n\t\t\t\t\t\t\t? <thead>\r\n\t\t\t\t\t\t\t\t<tr>{columns}</tr>\r\n\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t: null\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t<tbody>{rows}</tbody>\r\n\t\t\t\t\t\t{footer}\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t\t\t{data.length == 0 && this.props.emptyMessage\r\n\t\t\t\t\t? <div className='alert-none center'>{this.props.emptyMessage}</div>\r\n\t\t\t\t\t: null\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n","import React from 'react'\nimport { Input, Loader } from 'components/common'\n\nexport default class TwoFA extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.state = {\n\t\t\tloading: props.loadQrcodeOnInit == true,\n\t\t\tsecret: null,\n\t\t\tqrCodeUrl: null\n\t\t}\n\t}\n\n\tsetup = () => {\n\t\tconst { pwdData } = this.props\n\t\tconst credentials = btoa( JSON.stringify(pwdData) )\n\n\t\thttp.post('/users/setup2FA.json', {process: 'start', credentials: credentials}, (response, success) => {\n\t\t\tthis.setState({loading: false})\n\t\t\tif (success) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tsecret: response.secret,\n\t\t\t\t\tqrCodeUrl: response.qrCodeUrl\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.loadQrcodeOnInit == true) {\n\t\t\tthis.setup()\n\t\t}\n\t}\n\n\tonChange2FACode = () => {\n\t\tthis.forceUpdate()\n\t}\n\n\tonCancel2FA = () => {\n\t\tthis.setState({\n\t\t\tsecret: null,\n\t\t\tqrCodeUrl: null\n\t\t})\n\t}\n\n\tonDefine2FA = () => {\n\t\tconst { pwdData, onSubmitted } = this.props\n\t\tconst credentials = btoa( JSON.stringify(pwdData) )\n\n\t\thttp.post('/users/setup2FA.json', {process: 'end', credentials: credentials}, (response, success) => {\n\t\t\tif (success) {\n\t\t\t\tconst { user } = this.props\n\n\t\t\t\tif (user) {\n\t\t\t\t\tuser.tfa = 1\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tsecret: null,\n\t\t\t\t\tqrCodeUrl: null\n\t\t\t\t})\n\t\t\t\tif (onSubmitted) {\n\t\t\t\t\tonSubmitted(response)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tonDefineKeyDown = (e) => {\n\t\tif (e.keyCode === 13) {\n\t\t\tthis.onDefine2FA()\n\t\t}\n\t}\n\n\trenderQrCode = () => {\n\t\tconst { secret, qrCodeUrl } = this.state\n\t\tconst { pwdData } = this.props\n\t\tconst { tfa_code } = pwdData\n\n\t\tif (!secret) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div dangerouslySetInnerHTML={{__html: __('security_2fa_define')}}></div>\n\t\t\t\t<div className=\"center\">\n\t\t\t\t\t<div>{qrCodeUrl ? <img src={qrCodeUrl} /> : null}</div>\n\t\t\t\t\t<div>{secret || null}</div>\n\t\t\t\t\t<hr />\n\t\t\t\t\t<div className='bold'>{__('security_2fa_input_code')}</div>\n\t\t\t\t\t<Input model={pwdData} name=\"tfa_code\" maxLength={6} autoFocus\n\t\t\t\t\t\tclassNameEl=\"form-control input-sm input-num center\"\n\t\t\t\t\t\tonChange={this.onChange2FACode}\n\t\t\t\t\t\tonKeyDown={this.onDefineKeyDown}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"clearfix\" /><p/>\n\t\t\t\t\t<div className=\"btn-group\">\n\t\t\t\t\t\t<button className='btn btn-success' disabled={!tfa_code} onClick={this.onDefine2FA}>Definir</button>\n\t\t\t\t\t\t<button className='btn btn-default' onClick={this.onCancel2FA}>{__('buttons_cancel')}</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t)\n\t}\n\n\trender() {\n\t\tconst { secret, loading } = this.state\n\t\tlet content = null\n\t\tconst { user } = this.props\n\n\t\tif (loading) {\n\t\t\treturn <Loader />\n\t\t}\n\t\tif (secret) {\n\t\t\tcontent = this.renderQrCode()\n\t\t}\n\t\telse if (user && user.tfa == 1) {\n\t\t\tcontent =\n\t\t\t\t<>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<em className=\"la la-info-circle\" />\n\t\t\t\t\t\t{__('security_2fa_defined')}\n\t\t\t\t\t\t<button className='btn btn-primary' onClick={this.setup}>Redefinir 2FA</button>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t}\n\t\telse {\n\t\t\tcontent =\n\t\t\t\t<>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<em className=\"la la-info-circle\" />\n\t\t\t\t\t\t{__('security_2fa_not_defined')}\n\t\t\t\t\t\t<button className='btn btn-primary' onClick={this.setup}>Iniciar 2FA</button>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t}\n\t\treturn (\n\t\t\t<div className='pcontent'>\n\t\t\t\t{content}\n\t\t\t</div>\n\t\t)\n\t}\n}\n","import React from 'react'\nimport { format, addMonths } from 'date-fns'\nimport Calendar from './calendar'\nimport { Toggle, Input } from './common'\n\n\nexport const visibleItems = function() {\n\tconst { crono_groups, crono_visible_items } = hp.settings\n\tconst items = {\n\t\tselected: crono_visible_items || 0,\n\t\tconfig: {\n\t\t\t1: __('coursesessions_view_intership'),\n\t\t\t2: __('coursesessions_view_coordinator'),\n\t\t\t4: __('coursesessions_view_mediator'),\n\t\t\t4096: __('coursesessions_view_responsible'),\n\t\t\t8192: \"(\" + __('coursesessions_view_all') + \")\"\n\t\t}\n\t}\n\n\tfor (let i of [2, 4, 4096, 8192]) {\n\t\tif ((crono_groups & i) == 0) {\n\t\t\tdelete items.config[i]\n\t\t}\n\t}\n\tconst onClick = (e) => {\n\t\te.stopPropagation()\n\t\tif (e.currentTarget.getAttribute('disabled') === '') {\n\t\t\treturn;\n\t\t}\n\t\tconst idx = Number(e.currentTarget.getAttribute('data-item'))\n\n\t\titems.selected = (items.selected & idx) == idx\n\t\t\t? ( items.selected - (items.selected & idx) )\n\t\t\t: ( items.selected | idx )\n\t\thp.settings.crono_visible_items = items.selected\n\t\tself.onMenuClick(e)\n\t}\n\tconst onExport = (e) => {\n\t\tconst data = {\n\t\t\tgroups: {}\n\t\t}\n\t\tmbox.modal(<Export data={data} />, {\n\t\t\ttitle: \"Exportar\",\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: 'share',\n\t\t\t\t\ttext: 'Exportar',\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\tlet groups = Object.keys(data.groups).filter(group_id => data.groups[group_id])\n\t\t\t\t\t\tconst internship = (crono_groups & 1) == 1 ? '&internship=1' : ''\n\n\t\t\t\t\t\tgroups = encodeURIComponent(JSON.stringify(groups))\n\t\t\t\t\t\twindow.location.href = `/usercalendar/export.personal?groups=${groups}&start=${data.datepicker_start}&end=${data.atepicker_end}'&company=${hp.settings.title}${internship}`;\n\t\t\t\t\t\t//mbox.dismiss()\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'close'\n\t\t\t]\n\t\t})\n\t}\n\tconst self = {\n\t\trender: () => {\n\t\t\tconst { crono_can_export } = hp.settings\n\t\t\tconst _items = []\n\n\t\t\tif ( crono_can_export ) {\n\t\t\t\t_items.push(\n\t\t\t\t\t<li key=\"-1\">\n\t\t\t\t\t\t<a title={__('coursesessions_export_session_button_title')} onClick={onExport}>\n\t\t\t\t\t\t\t<em className=\"la la-share\" />\n\t\t\t\t\t\t\t<span>{__('coursesessions_export_session_button')}</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t)\n\t\t\t\t_items.push(<li key=\"-2\" className='divider' />)\n\t\t\t}\n\t\t\tfor (const [i, label] of Object.entries(items.config)) {\n\t\t\t\tconst disabled = i > 1 && i < 8192 && (items.selected & 8192) == 8192\n\t\t\t\t_items.push(\n\t\t\t\t\t<li key={i} className='py-1' onClick={onClick} data-item={i} disabled={disabled}>\n\t\t\t\t\t\t<Toggle checked={(items.selected & i) == i} disabled={disabled} label={label} />\n\t\t\t\t\t</li>\n\t\t\t\t)\n\t\t\t}\n\t\t\t_items.push(<li key=\"-3\" className='divider' />)\n\t\t\t_items.push(\n\t\t\t\t<li key=\"-4\">\n\t\t\t\t\t<a href=\"/tips/show/coursesession-cronogram.help\" target=\"_blank\">\n\t\t\t\t\t\t<em className=\"la la-exclamation-circle\" />\n\t\t\t\t\t\t<span>{__('attrs_help')}</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t)\n\t\t\treturn _items\n\t\t},\n\t\tselected: () => items.selected\n\t\t//isVisible: (item) => (items.selected & item) == item\n\t}\n\treturn self\n}\n\nconst eventTypes = {\n\t//'-2': {url: '/tests/trainee/{courseaction_id}.personal'},\n\t'-2': {url: '/testevents/info/{id}.ajax'},\n\t2: {url: '/courseactions/trainee_works/{courseaction_id}.personal'},\n\t3: {url: '/coursesessions/info/{id}.ajax'},\n\t4: {url: '/coursesessions/info/{id}.ajax', goto: {text: __('coursesessions_summary_presences'), url: '/coursesessions/show/{id}.personal'}},\n\t//4: {url: '/coursesessions/show/{id}.personal'},\n\t5: {url: '/vehicles/edit_usage/{id}.ajax'}\n}\n\nclass Export extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tconst { groups } = props.data\n\t\tthis.user_groups = hp.settings.user_groups.filter(group_id => group_id >= 2 && group_id <= 4)\n\t\tthis.user_groups.forEach(group_id => groups[group_id] = true)\n\n\t\tprops.data.datepicker_start = format(new Date(), 'Y-MM-d')\n\t\tprops.data.datepicker_end = format(addMonths(new Date(), 1), 'Y-MM-d')\n\t}\n\n\trender() {\n\t\tconst { data } = this.props\n\t\tconst items = this.user_groups.map(group_id => (\n\t\t\t<li key={group_id} className='list-group-items'>\n\t\t\t\t<Toggle model={data.groups} name={group_id} label={__(`coursesessions_my_session_as_group_${group_id}`)} />\n\t\t\t</li>\n\t\t))\n\n\t\treturn (\n\t\t\t<div className='pcontent'>\n\t\t\t\t<ul className='list-group'>\n\t\t\t\t\t{items}\n\t\t\t\t</ul>\n\t\t\t\t<hr />\n\t\t\t\t<div className=\"flex\">\n\t\t\t\t\t<label class=\"control-label\">{__(\"coursesessions_export_between\")}</label>\n\t\t\t\t\t<Input type=\"date\" model={data} name=\"datepicker_start\" class=\"form-control input-sm\" title={__(\"coursesessions_export_start_title\")} />\n\t\t\t\t\t<label class=\"control-label mx-1\">{__(\"attrs_and\")}</label>\n\t\t\t\t\t<Input type=\"date\" model={data} name=\"datepicker_end\" class=\"form-control input-sm\" title={__(\"coursesessions_export_end_title\")} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nexport default class UserCronogram extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tconst view = sessionStorage.getItem('calendar.cronogram') || 'week'\n\t\tconst { start, end} = Calendar.getRangeFor(view)\n\t\tthis.state = {\n\t\t\tview: view,\n\t\t\tevents: {},\n\t\t\tdate: new Date(),\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tselectedEvents: [],\n\t\t}\n\t\tthis.visible_items = props.visible_items || visibleItems()\n\t\tthis.visible_items.onMenuClick = this.onMenuClick\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.loadData()\n\t}\n\n\tloadData() {\n\t\tconst { start, end } = this.state\n\t\tconst params = {\n\t\t\tevt_start: `${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`,\n\t\t\tevt_end: `${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()}`,\n\t\t\titems: this.visible_items.selected()\n\t\t}\n\t\thttp.get('/users/cronogram.json', params, (response, success) => {\n\t\t\tif (success) {\n\t\t\t\tresponse.events.forEach(event => {\n\t\t\t\t\tevent.start = new Date(event.start)\n\t\t\t\t\tevent.end = new Date(event.end)\n\t\t\t\t})\n\t\t\t\tthis.state.events[start.getTime()] = {\n\t\t\t\t\tstart: start,\n\t\t\t\t\tend: end,\n\t\t\t\t\tdata: response.events\n\t\t\t\t}\n\t\t\t\tfor(let event of response.events) {\n\t\t\t\t\tevent.foreColor = hp.html.deriveTextColorFrom(event.color)\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tselectedEvents: response.events\n\t\t\t\t})\n\t\t\t\tif (this.props.onAfterLoad) {\n\t\t\t\t\tthis.props.onAfterLoad()\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tonMenuClick = (e) => {\n\t\tthis.setState({events: {}})\n\t\tthis.loadData()\n\t}\n\n\tonViewChanged = (view) => {\n\t\tsessionStorage.setItem('calendar.cronogram', view)\n\t\tthis.state.view = view\n\t\tthis.onNavigate(this.state.start)\n\t}\n\n\tonNavigate = (date) => {\n\t\tconst { view, events } = this.state\n\t\tconst { start, end } = Calendar.getRangeFor(view, date)\n\t\tconst time = start.getTime()\n\n\t\tif (events.hasOwnProperty(time) && events[time].end <= end) {\n\t\t\tthis.setState({\n\t\t\t\tselectedEvents: events[time].data,\n\t\t\t\tdate: date,\n\t\t\t\tstart: start,\n\t\t\t\tend: end\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t\t// procura uma lista de eventos cujas datas estejam compreendidas\n\t\tfor (const [_start, _events] of Object.entries(events)) {\n\t\t\tif (start >= _events.start && end <= _events.end) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tselectedEvents: _events.data,\n\t\t\t\t\tdate: date,\n\t\t\t\t\tstart: start,\n\t\t\t\t\tend: end\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tthis.state.start = start\n\t\tthis.state.end = end\n\t\tthis.loadData()\n\t\tthis.setState({date, date})\n\t}\n\n\tonSelectEvent = (event, e) => {\n\t\t// based on event type, build the link\n\t\tif (!eventTypes.hasOwnProperty(event.gid)) {\n\t\t\treturn\n\t\t}\n\t\tconst event_type = eventTypes[event.gid]\n\t\tconst url = event_type.url.replace(/\\{(\\w+)\\}/, (str, param) => event.hasOwnProperty(param) ? event[param] : '' )\n\n\t\t// if ajax url, call dialog\n\t\tif (/\\.ajax$/.test(url)) {\n\t\t\tconst buttons = [\"close\"]\n\t\t\tlet after = null\n\n\t\t\tif (event_type.goto) {\n\t\t\t\tbuttons.unshift({\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ttext: event_type.goto.text,\n\t\t\t\t\ticon: 'la la-external-link',\n\t\t\t\t\tclick: () => {\n\t\t\t\t\t\tconst url_goto = event_type.goto.url.replace(/\\{(\\w+)\\}/, (str, param) => event.hasOwnProperty(param) ? event[param] : '' )\n\t\t\t\t\t\tlocation.href = url_goto\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\tif (event.gid == 5) {\n\t\t\t\tbuttons.unshift({\n\t\t\t\t\ttext: humanportal.regional.vehicles.navigate,\n\t\t\t\t\ticon: \"la la-external-link\",\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\twindow.location = \"/vehicles.personal\"\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tafter = function(dv) {\n\t\t\t\t\tdv.find(\"form :input\").attr({\n\t\t\t\t\t\tdisabled: \"disabled\",\n\t\t\t\t\t\treadonly: \"\"\n\t\t\t\t\t}).removeAttr(\"readonly\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (event.gid == -2 && event.canReply == 1) {\n\t\t\t\tbuttons.unshift({\n\t\t\t\t\ttext: humanportal.regional.tests.respond,\n\t\t\t\t\ticon: \"la la-reply\",\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\thp.helpers.openPopup(`/testevents/show/${event.id}.popup`);\n\t\t\t\t\t\t$(this).blur();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\thp.ui.dialog.create(\n\t\t\t\turl,\n\t\t\t\tbuttons,\n\t\t\t\t{attrs: \"callendar_events\", title: event.title},\n\t\t\t\tafter\n\t\t\t);\n\t\t}\n\t\telse if (url) {\n\t\t\twindow.open(url, '_blank')\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { selectedEvents, date, view } = this.state\n\n\t\treturn (\n\t\t\t<Calendar\n\t\t\t\tview={view}\n\t\t\t\tevents={selectedEvents}\n\t\t\t\tdate={date}\n\t\t\t\tonSelectEvent={this.onSelectEvent}\n\t\t\t\tonNavigate={this.onNavigate}\n\t\t\t\t//onRangeChange={this.onRangeChange}\n\t\t\t\tonViewChanged={this.onViewChanged}\n\t\t\t\tstartAccessor=\"start\"\n\t\t\t\tendAccessor=\"end\"\n\t\t\t\teventPropGetter={(event, start, end, selected) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tbackgroundColor: event.color,\n\t\t\t\t\t\t\tborderColor: event.color,\n\t\t\t\t\t\t\tcolor: event.foreColor,\n\t\t\t\t\t\t\topacity: event.prevision == 1 || event.equiv == 1 ? 0.5 : 1\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}}\n\t\t\t\ttitleAccessor={e =>\n\t\t\t\t\t<>\n\t\t\t\t\t\t{e.prevision == 1 ? <em className='la la-compass' title=\"Sessão prevista\"/> : null}\n\t\t\t\t\t\t{e.equiv == 1 ? <em className='la la-retweet' title=\"Equivalência\"/> : null}\n\t\t\t\t\t\t{e.summarized == 1 ? <em className='la la-check' title=\"Sessão com sumário lançado\"/> : null}\n\t\t\t\t\t\t{e.title}\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\ttooltipAccessor={e => e.title}\n\t\t\t/>\n\t\t)\n\t}\n}\n","import React from 'react'\nimport { Loader, Input, Select } from './common'\nimport model from './model'\nimport Table from './table'\n\nconst none = __('buttons_notsubscribe').toLowerCase();\n\nexport const Actions = {\n\tLOADING: 'LOADING',\n\tSAVE: 'SAVE',\n}\n\nexport const saveSubscription = (courses, fields, options, callback = null) => {\n\tconst _courses = courses.reduce(\n\t\t(_course, course) => {\n\t\t\tif (course.actions.length > 0 || course.is_interested == 1) {\n\t\t\t\t_course[course.course_code] = {\n\t\t\t\t\tcourseaction_id: course.courseaction_id || null,\n\t\t\t\t\tis_interested: course.is_interested == 1 ? 1 : 0,\n\t\t\t\t\tord: course.ord\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn _course;\n\t\t},\n\t\t{}\n\t)\n\tconst cfields = Object.keys(fields).reduce((fields, name) => {\n\t\tif (fields[name].value) {\n\t\t\tfields[name] = fields[name].value;\n\t\t}\n\t\treturn fields;\n\t}, {})\n\tconst data = {\n\t\ttp_code: options.trainingpath_code,\n\t\tcourses: _courses,\n\t\tfields: cfields\n\t}\n\tif (callback) {\n\t\tif (options.entity_code) {\n\t\t\tdata.entity_code = options.entity_code\n\t\t}\n\t\thttp.post('/trainingpaths/saveSubscription.json',\n\t\t\t{ data: data },\n\t\t\t(response, success) => {\n\t\t\t\tcallback(response, success);\n\t\t\t}\n\t\t)\n\t\treturn\n\t}\n\treturn dispatch => {\n\t\tdispatch({ type: Actions.LOADING });\n\t\thttp.post('/trainingpaths/saveSubscription.json',\n\t\t\t{ data: data },\n\t\t\t(response, success) => {\n\t\t\t\tdispatch({ type: Actions.LOADING, loading: false, status: response.status });\n\t\t\t}\n\t\t)\n\t}\n}\n\nexport class SubscribeComponent extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {has_validated: false};\n\t\tthis.onRequestSave = this.onRequestSave.bind(this)\n\t}\n\n\tcheckAction(course, action, e) {\n\t\tif (action != null) {\n\t\t\tcourse.courseaction_id = e.currentTarget.checked ? action.courseaction_id : null;\n\t\t}\n\t\telse {\n\t\t\tcourse.is_interested = e.currentTarget.checked;\n\t\t}\n\t\tif (this.state.has_validated) {\n\t\t\tthis.validate();\n\t\t}\n\t\telse {\n\t\t\tthis.forceUpdate();\n\t\t}\n\t}\n\n\t// validar se user selecionou ações de cursos obrigatórios\n\tvalidate(validate_fields = false) {\n\t\tconst { courses, fields } = this.props\n\t\tlet has_errors = false;\n\n\t\tif (validate_fields) {\n\t\t\tObject.keys(fields).forEach(name => {\n\t\t\t\tconst field = fields[name];\n\t\t\t\tif (field.required && !field.value) {\n\t\t\t\t\tmbox.info('Tem de preencher: ' + field.label, 'Inscrição');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\t//return false;\n\t\tthis.state.has_validated = true;\n\t\tcourses.data.forEach(course => {\n\t\t\tcourse._error =\n\t\t\t\tcourse.required == 1 && course.actions.length > 0 && !course.courseaction_id\n\t\t\t\t\t? __('matriculations_required_action')\n\t\t\t\t\t: ( course.required == 1 && course.actions.length == 0 && !course.is_interested\n\t\t\t\t\t\t? __('matriculations_required_interest')\n\t\t\t\t\t\t: null\n\t\t\t\t\t);\n\t\t\thas_errors = has_errors || (course._error ? true : false);\n\t\t});\n\t\tthis.forceUpdate();\n\t\tif (has_errors) {\n\t\t\thp.ui.dialog.inline({war: __('attrs_mandatory_string')});\n\t\t}\n\t\treturn !has_errors;\n\t}\n\n\tonRequestSave() {\n\t\tconst { courses, fields, trainingpath, entity_code, afterSave } = this.props\n\t\tif (this.validate(true)) {\n\t\t\tthis.props.saveSubscription(courses.data, fields, {\n\t\t\t\ttrainingpath_code: trainingpath.trainingpath_code,\n\t\t\t\tentity_code: entity_code || null\n\t\t\t}, afterSave || null);\n\t\t}\n\t}\n\n\tonFieldChange(component, e) {\n\t\t//if (component)\n\t\tdebugger;\n\t}\n\n\trender() {\n\t\tconst disabled = this.props.courses.status != 0;\n\t\tconst { trainingpath, onCancel, label_interested } = this.props;\n\t\tconst courses = this.props.courses.data.map((course, i) => {\n\t\t\tlet actions = null;\n\n\t\t\t// se não existirem ações para o curso, permite marcar como curso de interesse\n\t\t\tif (course.actions.length == 0) {\n\t\t\t\tactions = [\n\t\t\t\t\t<div key='chk' className=\"checkbox\">\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t<input type=\"checkbox\" name={course.course_code} onChange={this.checkAction.bind(this, course, null)} disabled={disabled || course.is_interested == 2} checked={course.is_interested >= 1} />\n\t\t\t\t\t\t\t{label_interested || __('courseactions_interested')}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t]\n\t\t\t\tactions.push(\n\t\t\t\t\t<div key='ord'>\n\t\t\t\t\t\t<label className={disabled || course.is_interested != 1 ? 'disabled' : null}>{__('attrs_ord_pref')}</label>\n\t\t\t\t\t\t<Input type=\"number\" model={course} name='ord' classNameEl='hp-input-max-60' disabled={disabled || course.is_interested != 1} value={course.ord} />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t\telse if (course.actions.length == 1) {\n\t\t\t\tactions =\n\t\t\t\t\t<div className=\"checkbox\" title={course.actions[0].courseaction_id}>\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t<input type=\"checkbox\" name={course.course_code} onChange={this.checkAction.bind(this, course, course.actions[0])} disabled={disabled || course.confirmed > 0} checked={course.courseaction_id == course.actions[0].courseaction_id} />\n\t\t\t\t\t\t\t{course.actions[0].evt_start} - {course.actions[0].evt_end}\n\t\t\t\t\t\t\t{course.actions[0].obs ? <span className=\"legend-label\" title={course.actions[0].obs_title}> ({course.actions[0].obs})</span> : null}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tactions = course.actions.map((action, i) =>\n\t\t\t\t\t<div className=\"radio\" key={i} title={action.courseaction_id}>\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t<input type=\"radio\" name={course.course_code} onChange={this.checkAction.bind(this, course, action)} disabled={disabled || course.confirmed > 0} checked={course.courseaction_id == action.courseaction_id} />\n\t\t\t\t\t\t\t{action.evt_start ? `${action.evt_start} - ${action.evt_end}` : ''}\n\t\t\t\t\t\t\t{action.obs ? <span className=\"legend-label\" title={action.obs_title}> ({action.obs})</span> : null}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<tr key={i} className={course._error ? 'error' : null}>\n\t\t\t\t\t<td>{!this.state.has_validated\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: (course._error\n\t\t\t\t\t\t\t? <em className=\"la la-exclamation-circle\" title={course._error} />\n\t\t\t\t\t\t\t: <em className=\"la la-check\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>{course.course_code}</td>\n\t\t\t\t\t<td>{course.course} {course.required == 1 ? '*' : null}</td>\n\t\t\t\t\t<td>{actions}</td>\n\t\t\t\t</tr>\n\t\t\t)\n\t\t});\n\t\tconst fields = Object.keys(this.props.fields).map(name => {\n\t\t\tconst field = this.props.fields[name];\n\t\t\tconst component = field.data\n\t\t\t\t? <Select\n\t\t\t\t\tmodel={field} name='value'\n\t\t\t\t\toptions={field.data}\n\t\t\t\t\tdisabled={field.readonly || disabled}\n\t\t\t\t\t//onChange={this.onFieldChange.bind(this.component)}\n\t\t\t\t />\n\t\t\t\t: <Input model={field} name='value' disabled={field.readonly || disabled} />\n\t\t\treturn (\n\t\t\t\t<div key={name} className=\"form-group row\">\n\t\t\t\t\t<label htmlFor={field.label} className=\"col-xs-2\">\n\t\t\t\t\t\t{field.label}\n\t\t\t\t\t\t<span>{field.required ? '*' : ''}</span>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div className=\"col-xs-10 col-md-6\">\n\t\t\t\t\t\t{component}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\t\tlet _actions;\n\t\tif (onCancel) {\n\t\t\t_actions = [\n\t\t\t\t<button key='c' className=\"btn btn-default\" onClick={onCancel}>\n\t\t\t\t\t<em className=\"la la-undo\" />\n\t\t\t\t\t<span>{__('buttons_cancel')}</span>\n\t\t\t\t</button>,\n\t\t\t\t<button key='i' className=\"btn btn-primary\" onClick={this.onRequestSave} disabled={disabled}>\n\t\t\t\t\t<em className=\"la la-check\" />\n\t\t\t\t\t<span>{hp.settings.requires_validation ? __('courseactions_pre_subscribe') : __('courseactions_subscribe')}</span>\n\t\t\t\t</button>\n\t\t\t]\n\t\t}\n\t\telse {\n\t\t\t_actions = [\n\t\t\t\t<button key='c' className=\"btn btn-default\" onClick={window.history.back}>\n\t\t\t\t\t<em className=\"la la-undo\" />\n\t\t\t\t\t<span>{__('buttons_back')}</span>\n\t\t\t\t</button>,\n\t\t\t\t<button key='i' className=\"btn btn-primary\" onClick={this.onRequestSave} disabled={disabled}>\n\t\t\t\t\t<em className=\"la la-check\" />\n\t\t\t\t\t<span>{hp.settings.requires_validation ? __('courseactions_pre_subscribe') : __('courseactions_subscribe_me')}</span>\n\t\t\t\t</button>\n\t\t\t]\n\t\t}\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{this.props.courses.status == 1\n\t\t\t\t\t? <div className=\"alert alert-info center\">{__('matriculations_is_validating')}</div>\n\t\t\t\t\t: (this.props.courses.status == 2\n\t\t\t\t\t? <div className=\"alert alert-success center\">{__('matriculations_is_validated')}</div>\n\t\t\t\t\t\t: null\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\t<div className=\"form-check-label\">\n\t\t\t\t\t<em className=\"la la-info-circle\" />\n\t\t\t\t\t<span className=\"legend-label\"> {__('matriculations_pf_obs')}</span>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"widget-box\">\n\t\t\t\t\t<div className=\"widget-title\">\n\t\t\t\t\t\t{this.props.courses.loading ? <Loader className=\"inline\" dimmed={false} /> : null}\n\t\t\t\t\t\t<h4>\n\t\t\t\t\t\t\t<span>Percurso formativo: {trainingpath.description}</span>\n\t\t\t\t\t\t\t<div className=\"btn-group btn-group-xs pull-right\">\n\t\t\t\t\t\t\t\t{_actions}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</h4>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"widget-content\">\n\t\t\t\t\t\t<div className=\"padding-top-16 padding-left-16\">\n\t\t\t\t\t\t\t{fields}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<table className=\"table alternate\">\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t{courses}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport const getRowPropsExpanded = () => ({className: 'class_slide'});\n\nclass UserTPCourses extends React.Component {\n\tonAfterSave = (response, success) => {\n\t\tconst { row } = this.props\n\n\t\trow.meta.editing = false\n\t\tdelete row.meta.courses\n\t\tthis.props.loadTPCourses(row)\n\t}\n\n\tonCancel = () => {\n\t\tconst { row } = this.props\n\t\tthis.props.onCancelSubscription(row)\n\t}\n\n\trender() {\n\t\tconst { row } = this.props;\n\n\t\tif (row.meta.editing) {\n\t\t\tconst { courses, fields, trainingpath } = row.meta\n\n\t\t\treturn (\n\t\t\t\t<SubscribeComponent\n\t\t\t\t\tcourses={courses}\n\t\t\t\t\tfields={fields}\n\t\t\t\t\tsaveSubscription={saveSubscription}\n\t\t\t\t\tafterSave={this.onAfterSave}\n\t\t\t\t\ttrainingpath={trainingpath}\n\t\t\t\t\tentity_code={row.entity_code}\n\t\t\t\t\tonCancel={this.onCancel}\n\t\t\t\t\tlabel_interested={__('courseactions_has_interest')}\n\t\t\t\t/>\n\t\t\t)\n\t\t}\n\t\tif (!row.meta.mycourses) {\n\t\t\tthis.props.loadTPCourses(row);\n\t\t\treturn (<Loader />);\n\t\t}\n\t\treturn (\n\t\t\t<Table\n\t\t\t\tid=\"userroles\"\n\t\t\t\tcolumns={row.meta.columns}\n\t\t\t\tdata={row.meta.mycourses}\n\t\t\t\tclassName='table regular_table no-margin-bottom alternate'\n\t\t\t\tsearch={false}\n\t\t\t\titemsPerPage={99}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nclass UsersTrainingPaths extends React.Component {\n\tonEdit(row, e) {\n\t\tconst { courseaction_ref, entity_code } = row\n\n\t\te.stopPropagation()\n\t\tif (row.meta.courses) {\n\t\t\trow.meta.editing = true\n\t\t\trow.meta.expanded = true\n\t\t\tthis.forceUpdate()\n\t\t\treturn\n\t\t}\n\t\thttp.post('/trainingpaths/edit.json', {trainingpath_code: courseaction_ref, entity_code: entity_code}, (response, success) => {\n\t\t\t// devolver todas as ações do percurso onde o user pode inscrever o formando, bem como cursos (sem ações) para manifestação de interesse\n\t\t\tif (!success) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tresponse.courses.forEach(course => {\n\t\t\t\tif (course.actions.length > 1) {\n\t\t\t\t\tcourse.actions.unshift({courseaction_id: null, obs: none});\n\t\t\t\t}\n\t\t\t})\n\t\t\tconst courses = model(response.courses, {status: false})\n\t\t\trow.meta.editing = true\n\t\t\trow.meta.expanded = true\n\t\t\trow.meta.courses = courses\n\t\t\trow.meta.fields = response.fields\n\t\t\trow.meta.trainingpath = response.trainingpath\n\t\t\tthis.forceUpdate()\n\t\t})\n\t}\n\n\tonAfterSave = (row, response, success) => {\n\t\tdebugger;\n\t}\n\n\tonCancelSubscription = (row) => {\n\t\trow.meta.editing = false\n\t\tthis.forceUpdate()\n\t}\n\n\tformatActions = (column, row, config) => {\n\t\tconst { prm } = this.props\n\t\tconst actions = [];\n\n\t\tif (!row.meta.editing && (prm & 2) > 0 && row.confirmed == 1) {\n\t\t\tactions.push(\n\t\t\t\t<button key=\"edit\"\n\t\t\t\t\tclassName=\"btn btn-tiny btn-primary\"\n\t\t\t\t\tonClick={this.onEdit.bind(this, row)}\n\t\t\t\t>\n\t\t\t\t\t<em className=\"la la-pencil\" />\n\t\t\t\t\t<span>Editar</span>\n\t\t\t\t</button>\n\t\t\t)\n\t\t}\n\t\treturn actions\n\t}\n\n\trender() {\n\t\tconst tp_row = this.props.row;\n\n\t\tif (!tp_row.meta.trainingpaths) {\n\t\t\tthis.props.loadUsersTPs(tp_row);\n\t\t\treturn (<Loader />);\n\t\t}\n\t\treturn (\n\t\t\t<Table\n\t\t\t\tid=\"trainingpaths\"\n\t\t\t\tcolumns={tp_row.meta.columns}\n\t\t\t\tdata={tp_row.meta.trainingpaths}\n\t\t\t\tclassName='table regular_table no-margin-bottom alternate'\n\t\t\t\tsearch={false}\n\t\t\t\titemsPerPage={9}\n\t\t\t\trenderRowExpanded={\n\t\t\t\t\trow => <UserTPCourses\n\t\t\t\t\t\trow={row}\n\t\t\t\t\t\tloadTPCourses={this.props.loadTPCourses}\n\t\t\t\t\t\tonCancelSubscription={this.onCancelSubscription}\n\t\t\t\t\t/>}\n\t\t\t\tgetRowProps={getRowPropsExpanded}\n\t\t\t\tonRowSelected={row => {\n\t\t\t\t\trow.meta.expanded = row.meta.expanded === undefined ? true : !row.meta.expanded;\n\t\t\t\t\treturn true;\n\t\t\t\t}}\n\t\t\t\tformatActions={this.formatActions}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport class TrainingPathsView extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.state = {\n\t\t\tview: 0,\n\t\t\turlMyTrainees: `/trainingpaths/myTrainees.json${props.company == 1 ? '?company=1' : ''}`,\n\t\t\turlStatsOfTrainees: `/trainingpaths/statsOfTrainees.json?${props.company == 1 ? 'company=1&' : ''}`\n\t\t}\n\t}\n\n\tloadUsersTPs = row => {\n\t\thttp.post('/trainingpaths/ofEntity.json',\n\t\t\t{\n\t\t\t\tdata: { entity_code: row.entity_code },\n\t\t\t\tsilent: true\n\t\t\t},\n\t\t\t(response, success) => {\n\t\t\t\tif (success) {\n\t\t\t\t\trow.meta.trainingpaths = response.data\n\t\t\t\t\trow.meta.columns = response.columns\n\t\t\t\t\tthis.forceUpdate()\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\t}\n\n\tloadTPCourses = (row) => {\n\t\thttp.post('/trainingpaths/getCourses.json',\n\t\t\t{\n\t\t\t\tdata: { trainingpath_code: row.courseaction_ref, entity_code: row.entity_code },\n\t\t\t\tsilent: true\n\t\t\t},\n\t\t\t(response, success) => {\n\t\t\t\tif (success) {\n\t\t\t\t\trow.meta.mycourses = response.data\n\t\t\t\t\trow.meta.columns = response.columns\n\t\t\t\t\tthis.forceUpdate()\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\t}\n\n\tonChangeView = (e) => {\n\t\tthis.setState({view: e.value})\n\t}\n\n\tonBeforePrint = () => {\n\t\tconst params = {\n\t\t\tid: 'trainingpaths',\n\t\t}\n\t\thttp.get('/pdf/generate.json', { data: params },\n\t\t\t(response, success) => {\n\t\t\t\tif (success && response.file) {\n\t\t\t\t\twindow.open(response.file);\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\t\treturn false\n\t}\n\n\trender() {\n\t\tconst { view, urlMyTrainees, urlStatsOfTrainees } = this.state\n\t\tlet view_el = null\n\n\t\tif (view == 0) {\n\t\t\tview_el =\n\t\t\t\t<Table\n\t\t\t\t\tname=\"pf\"\n\t\t\t\t\tlabel={__('courses_with_employees')}\n\t\t\t\t\turl={urlMyTrainees}\n\t\t\t\t\tclassName='table no-border-top alternate vcenter'\n\t\t\t\t\trenderRowExpanded={row => <UsersTrainingPaths\n\t\t\t\t\t\tprm={hp.settings.prm_training_pathway}\n\t\t\t\t\t\trow={row}\n\t\t\t\t\t\tloadUsersTPs={this.loadUsersTPs}\n\t\t\t\t\t\tloadTPCourses={this.loadTPCourses}\n\t\t\t\t\t/>}\n\t\t\t\t\tgetRowProps={getRowPropsExpanded}\n\t\t\t\t\tonRowSelected={row => {\n\t\t\t\t\t\trow.meta.expanded = row.meta.expanded === undefined ? true : !row.meta.expanded;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}}\n\t\t\t\t\tonBeforePrint={this.onBeforePrint}\n\t\t\t\t/>\n\t\t}\n\t\telse {\n\t\t\tview_el =\n\t\t\t\t<Table\n\t\t\t\t\turl={`${urlStatsOfTrainees}tp_code=${view}`}\n\t\t\t\t\tclassNameTableContainer=\"horizontal-table\"\n\t\t\t\t\tclassName='table sticky no-border-top alternate vcenter'\n\t\t\t\t\tonBeforePrint={this.onBeforePrint}\n\t\t\t\t/>\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div className=\"widget-title bold no-border\">\n\t\t\t\t\t<div className=\"pull-left\">\n\t\t\t\t\t\t<Select model={this.state} name='view' options={hp.store.trainingPaths} onChange={this.onChangeView} title=\"Percurso formativo\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"clearfix\" />\n\t\t\t\t</div>\n\t\t\t\t<div className=\"widget-body\">\n\t\t\t\t\t{view_el}\n\t\t\t\t</div>\n\t\t\t</>\n\t\t)\n\t}\n}\n","// metodo de validação nif e bi (algoritmo igual)\nconst validateBiNif = (num) => {\n\tif ((num != null) && (!isNaN(num)) && (num.length==9)) {\n\t\tlet dC = parseInt(num.charAt(0)) * 9;\n\n\t\tfor (let i = 2; i <= 8; i ++) {\n\t\t\tdC += (parseInt(num.charAt((i-1)))) * (10-i);\n\t\t}\n\t\tdC = 11 - (dC % 11);\n\n\t\tif (dC >= 10) {\n\t\t\tdC = 0;\n\t\t}\n\t\treturn dC == parseInt(num.charAt(8));\n\t}\n\treturn false;\n}\n\n\nconst validateDocId = (id_doc_type, id_doc) => {\n\tconst value = id_doc.replace(/[^0-9a-z]/ig, '');\n\n\tswitch (id_doc_type.toLowerCase()) {\n\t\tcase \"cc\":\n\t\t\tif (value.length != 12) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tlet secondDigit = false;\n\t\t\tlet sum = 0;\n\n\t\t\tfor (let i = value.length -1; i >= 0; i--) {\n\t\t\t\tlet n = hp.helpers.getNumberFromChar(value.charAt(i));\n\t\t\t\tif (secondDigit) {\n\t\t\t\t\tn *= 2;\n\t\t\t\t\tif (n > 9) {\n\t\t\t\t\t\tn-= 9;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsum += n;\n\t\t\t\tsecondDigit = !secondDigit;\n\t\t\t}\n\t\t\treturn ((sum % 10) == 0);\n\n\t\tcase \"bi\":\n\t\t\treturn validateBiNif(value);\n\n\t\tdefault: return true;\n\t}\n}\n\nconst validateNiss = (niss) => {\n\tniss = niss.trim();\n\n\tif (isNaN(niss) || niss.length != 11) {\n\t\treturn false;\n\t}\n\tif (niss == '00000000000') {\n\t\treturn true;\n\t}\n\tconst factors = [29, 23, 19, 17, 13, 11, 7, 5, 3, 2];\n\tconst sum = factors.reduce((prev, value, idx) => prev + (parseInt(niss[idx]) * value), 0);\n\n\treturn niss[niss.length - 1] == (9 - (sum % 10));\n}\n\nconst validateNib = (nib) => {\n\tif(nib.length != 21 || val == null || isNaN(val)) {\n\t\treturn false;\n\t}\n\tconst pesos = [73, 17, 89, 38, 62, 45, 53, 15, 50, 5, 49, 34, 81, 76, 27, 90, 9, 30, 3];\n\t// Check Digit Calculado\n\tlet checkDgtClc = 0;\n\t// Check Digit Embutido no nib\n\tlet checkDgtEmb = nib.substr(19, 2);\n\n\tfor (let i = 0; i < 19; i++) {\n\t\tcheckDgtClc += parseInt(nib.charAt(i)) * pesos[i];\n\t}\n\tcheckDgtClc = 98 - (checkDgtClc - parseInt(checkDgtClc / 97) * 97);\n\n\treturn checkDgtEmb == checkDgtClc;\n}\n\nconst validateEmail = (email) => {\n\treturn /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$/.test(email)\n}\n\nconst mod97 = (string) => {\n\tlet checksum = string.slice(0, 2), fragment;\n\tfor (let offset = 2; offset < string.length; offset += 7) {\n\t\tfragment = String(checksum) + string.substring(offset, offset + 7);\n\t\tchecksum = parseInt(fragment, 10) % 97;\n\t}\n\treturn checksum;\n}\n\n/*\n * Returns 1 if the IBAN is valid\n * Returns FALSE if the IBAN's length is not as should be (for PT the IBAN Should be 25 chars long starting with PT )\n * Returns any other number (checksum) when the IBAN is invalid (check digits do not match)\n */\nconst validateIban = (input) => {\n\tconst CODE_LENGTHS = {\n\t\tAD: 24, AE: 23, AT: 20, AZ: 28, BA: 20, BE: 16, BG: 22, BH: 22, BR: 29,\n\t\tCH: 21, CR: 21, CY: 28, CZ: 24, DE: 22, DK: 18, DO: 28, EE: 20, ES: 24,\n\t\tFI: 18, FO: 18, FR: 27, GB: 22, GI: 23, GL: 18, GR: 27, GT: 28, HR: 21,\n\t\tHU: 28, IE: 22, IL: 23, IS: 26, IT: 27, JO: 30, KW: 30, KZ: 20, LB: 28,\n\t\tLI: 21, LT: 20, LU: 20, LV: 21, MC: 27, MD: 24, ME: 22, MK: 19, MR: 27,\n\t\tMT: 31, MU: 30, NL: 18, NO: 15, PK: 24, PL: 28, PS: 29, PT: 25, QA: 29,\n\t\tRO: 24, RS: 22, SA: 24, SE: 24, SI: 19, SK: 24, SM: 27, TN: 24, TR: 26,\n\t\tAL: 28, BY: 28, CR: 22, EG: 29, GE: 22, IQ: 23, LC: 32, SC: 31, ST: 25,\n\t\tSV: 28, TL: 23, UA: 29, VA: 22, VG: 24, XK: 20\n\t};\n\tconst iban = String(input).toUpperCase().replace(/[^A-Z0-9]/g, '') // keep only alphanumeric characters\n\tconst code = iban.match(/^([A-Z]{2})(\\d{2})([A-Z\\d]+)$/) // match and capture (1) the country code, (2) the check digits, and (3) the rest\n\t// check syntax and length\n\tif (!code || iban.length !== CODE_LENGTHS[code[1]]) {\n\t\treturn false;\n\t}\n\t// rearrange country code and check digits, and convert chars to ints\n\tconst digits = (code[3] + code[1] + code[2]).replace(/[A-Z]/g, letter => letter.charCodeAt(0) - 55)\n\t// final check\n\treturn mod97(digits) === 1;\n}\n\nexport {validateBiNif, validateDocId, validateNiss, validateNib, validateEmail, validateIban}\n","import * as React from 'react';\nconst ContextKey = Symbol.for(`react-redux-context`);\nconst gT = typeof globalThis !== \"undefined\" ? globalThis :\n/* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */\n{};\n\nfunction getContext() {\n var _gT$ContextKey;\n\n if (!React.createContext) return {};\n const contextMap = (_gT$ContextKey = gT[ContextKey]) != null ? _gT$ContextKey : gT[ContextKey] = new Map();\n let realContext = contextMap.get(React.createContext);\n\n if (!realContext) {\n realContext = React.createContext(null);\n\n if (process.env.NODE_ENV !== 'production') {\n realContext.displayName = 'ReactRedux';\n }\n\n contextMap.set(React.createContext, realContext);\n }\n\n return realContext;\n}\n\nexport const ReactReduxContext = /*#__PURE__*/getContext();\nexport default ReactReduxContext;","import * as React from 'react';\nimport { ReactReduxContext } from './Context';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\n\nfunction Provider({\n store,\n context,\n children,\n serverState,\n stabilityCheck = 'once',\n noopCheck = 'once'\n}) {\n const contextValue = React.useMemo(() => {\n const subscription = createSubscription(store);\n return {\n store,\n subscription,\n getServerState: serverState ? () => serverState : undefined,\n stabilityCheck,\n noopCheck\n };\n }, [store, serverState, stabilityCheck, noopCheck]);\n const previousState = React.useMemo(() => store.getState(), [store]);\n useIsomorphicLayoutEffect(() => {\n const {\n subscription\n } = contextValue;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return () => {\n subscription.tryUnsubscribe();\n subscription.onStateChange = undefined;\n };\n }, [contextValue, previousState]);\n const Context = context || ReactReduxContext; // @ts-ignore 'AnyAction' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype\n\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nexport default Provider;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"reactReduxForwardedRef\"];\n\n/* eslint-disable valid-jsdoc, @typescript-eslint/no-unused-vars */\nimport hoistStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nimport { isValidElementType, isContextConsumer } from 'react-is';\nimport defaultSelectorFactory from '../connect/selectorFactory';\nimport { mapDispatchToPropsFactory } from '../connect/mapDispatchToProps';\nimport { mapStateToPropsFactory } from '../connect/mapStateToProps';\nimport { mergePropsFactory } from '../connect/mergeProps';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport shallowEqual from '../utils/shallowEqual';\nimport warning from '../utils/warning';\nimport { ReactReduxContext } from './Context';\nimport { notInitialized } from '../utils/useSyncExternalStore';\nlet useSyncExternalStore = notInitialized;\nexport const initializeConnect = fn => {\n useSyncExternalStore = fn;\n}; // Define some constant arrays just to avoid re-creating these\n\nconst EMPTY_ARRAY = [null, 0];\nconst NO_SUBSCRIPTION_ARRAY = [null, null]; // Attempts to stringify whatever not-really-a-component value we were given\n// for logging in an error message\n\nconst stringifyComponent = Comp => {\n try {\n return JSON.stringify(Comp);\n } catch (err) {\n return String(Comp);\n }\n};\n\n// This is \"just\" a `useLayoutEffect`, but with two modifications:\n// - we need to fall back to `useEffect` in SSR to avoid annoying warnings\n// - we extract this to a separate function to avoid closing over values\n// and causing memory leaks\nfunction useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {\n useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies);\n} // Effect callback, extracted: assign the latest props values to refs for later usage\n\n\nfunction captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, // actualChildProps: unknown,\nchildPropsFromStoreUpdate, notifyNestedSubs) {\n // We want to capture the wrapper props and child props we used for later comparisons\n lastWrapperProps.current = wrapperProps;\n renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update\n\n if (childPropsFromStoreUpdate.current) {\n childPropsFromStoreUpdate.current = null;\n notifyNestedSubs();\n }\n} // Effect callback, extracted: subscribe to the Redux store or nearest connected ancestor,\n// check for updates after dispatched actions, and trigger re-renders.\n\n\nfunction subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, // forceComponentUpdateDispatch: React.Dispatch<any>,\nadditionalSubscribeListener) {\n // If we're not subscribed to the store, nothing to do here\n if (!shouldHandleStateChanges) return () => {}; // Capture values for checking if and when this component unmounts\n\n let didUnsubscribe = false;\n let lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component\n\n const checkForUpdates = () => {\n if (didUnsubscribe || !isMounted.current) {\n // Don't run stale listeners.\n // Redux doesn't guarantee unsubscriptions happen until next dispatch.\n return;\n } // TODO We're currently calling getState ourselves here, rather than letting `uSES` do it\n\n\n const latestStoreState = store.getState();\n let newChildProps, error;\n\n try {\n // Actually run the selector with the most recent store state and wrapper props\n // to determine what the child props should be\n newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current);\n } catch (e) {\n error = e;\n lastThrownError = e;\n }\n\n if (!error) {\n lastThrownError = null;\n } // If the child props haven't changed, nothing to do here - cascade the subscription update\n\n\n if (newChildProps === lastChildProps.current) {\n if (!renderIsScheduled.current) {\n notifyNestedSubs();\n }\n } else {\n // Save references to the new child props. Note that we track the \"child props from store update\"\n // as a ref instead of a useState/useReducer because we need a way to determine if that value has\n // been processed. If this went into useState/useReducer, we couldn't clear out the value without\n // forcing another re-render, which we don't want.\n lastChildProps.current = newChildProps;\n childPropsFromStoreUpdate.current = newChildProps;\n renderIsScheduled.current = true; // TODO This is hacky and not how `uSES` is meant to be used\n // Trigger the React `useSyncExternalStore` subscriber\n\n additionalSubscribeListener();\n }\n }; // Actually subscribe to the nearest connected ancestor (or store)\n\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe(); // Pull data from the store after first render in case the store has\n // changed since we began.\n\n checkForUpdates();\n\n const unsubscribeWrapper = () => {\n didUnsubscribe = true;\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n\n if (lastThrownError) {\n // It's possible that we caught an error due to a bad mapState function, but the\n // parent re-rendered without this component and we're about to unmount.\n // This shouldn't happen as long as we do top-down subscriptions correctly, but\n // if we ever do those wrong, this throw will surface the error in our tests.\n // In that case, throw the error from here so it doesn't get lost.\n throw lastThrownError;\n }\n };\n\n return unsubscribeWrapper;\n} // Reducer initial state creation for our update reducer\n\n\nconst initStateUpdates = () => EMPTY_ARRAY;\n\nfunction strictEqual(a, b) {\n return a === b;\n}\n/**\r\n * Infers the type of props that a connector will inject into a component.\r\n */\n\n\nlet hasWarnedAboutDeprecatedPureOption = false;\n/**\r\n * Connects a React component to a Redux store.\r\n *\r\n * - Without arguments, just wraps the component, without changing the behavior / props\r\n *\r\n * - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior\r\n * is to override ownProps (as stated in the docs), so what remains is everything that's\r\n * not a state or dispatch prop\r\n *\r\n * - When 3rd param is passed, we don't know if ownProps propagate and whether they\r\n * should be valid component props, because it depends on mergeProps implementation.\r\n * As such, it is the user's responsibility to extend ownProps interface from state or\r\n * dispatch props or both when applicable\r\n *\r\n * @param mapStateToProps A function that extracts values from state\r\n * @param mapDispatchToProps Setup for dispatching actions\r\n * @param mergeProps Optional callback to merge state and dispatch props together\r\n * @param options Options for configuring the connection\r\n *\r\n */\n\nfunction connect(mapStateToProps, mapDispatchToProps, mergeProps, {\n // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence.\n // @ts-ignore\n pure,\n areStatesEqual = strictEqual,\n areOwnPropsEqual = shallowEqual,\n areStatePropsEqual = shallowEqual,\n areMergedPropsEqual = shallowEqual,\n // use React's forwardRef to expose a ref of the wrapped component\n forwardRef = false,\n // the context consumer to use\n context = ReactReduxContext\n} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (pure !== undefined && !hasWarnedAboutDeprecatedPureOption) {\n hasWarnedAboutDeprecatedPureOption = true;\n warning('The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component');\n }\n }\n\n const Context = context;\n const initMapStateToProps = mapStateToPropsFactory(mapStateToProps);\n const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps);\n const initMergeProps = mergePropsFactory(mergeProps);\n const shouldHandleStateChanges = Boolean(mapStateToProps);\n\n const wrapWithConnect = WrappedComponent => {\n if (process.env.NODE_ENV !== 'production' && !isValidElementType(WrappedComponent)) {\n throw new Error(`You must pass a component to the function returned by connect. Instead received ${stringifyComponent(WrappedComponent)}`);\n }\n\n const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n const displayName = `Connect(${wrappedComponentName})`;\n const selectorFactoryOptions = {\n shouldHandleStateChanges,\n displayName,\n wrappedComponentName,\n WrappedComponent,\n // @ts-ignore\n initMapStateToProps,\n // @ts-ignore\n initMapDispatchToProps,\n initMergeProps,\n areStatesEqual,\n areStatePropsEqual,\n areOwnPropsEqual,\n areMergedPropsEqual\n };\n\n function ConnectFunction(props) {\n const [propsContext, reactReduxForwardedRef, wrapperProps] = React.useMemo(() => {\n // Distinguish between actual \"data\" props that were passed to the wrapper component,\n // and values needed to control behavior (forwarded refs, alternate context instances).\n // To maintain the wrapperProps object reference, memoize this destructuring.\n const {\n reactReduxForwardedRef\n } = props,\n wrapperProps = _objectWithoutPropertiesLoose(props, _excluded);\n\n return [props.context, reactReduxForwardedRef, wrapperProps];\n }, [props]);\n const ContextToUse = React.useMemo(() => {\n // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.\n // Memoize the check that determines which context instance we should use.\n return propsContext && propsContext.Consumer && // @ts-ignore\n isContextConsumer( /*#__PURE__*/React.createElement(propsContext.Consumer, null)) ? propsContext : Context;\n }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available\n\n const contextValue = React.useContext(ContextToUse); // The store _must_ exist as either a prop or in context.\n // We'll check to see if it _looks_ like a Redux store first.\n // This allows us to pass through a `store` prop that is just a plain value.\n\n const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n\n if (process.env.NODE_ENV !== 'production' && !didStoreComeFromProps && !didStoreComeFromContext) {\n throw new Error(`Could not find \"store\" in the context of ` + `\"${displayName}\". Either wrap the root component in a <Provider>, ` + `or pass a custom React context provider to <Provider> and the corresponding ` + `React context consumer to ${displayName} in connect options.`);\n } // Based on the previous check, one of these must be true\n\n\n const store = didStoreComeFromProps ? props.store : contextValue.store;\n const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState;\n const childPropsSelector = React.useMemo(() => {\n // The child props selector needs the store reference as an input.\n // Re-create this selector whenever the store changes.\n return defaultSelectorFactory(store.dispatch, selectorFactoryOptions);\n }, [store]);\n const [subscription, notifyNestedSubs] = React.useMemo(() => {\n if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component\n // connected to the store via props shouldn't use subscription from context, or vice versa.\n\n const subscription = createSubscription(store, didStoreComeFromProps ? undefined : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n // the middle of the notification loop, where `subscription` will then be null. This can\n // probably be avoided if Subscription's listeners logic is changed to not call listeners\n // that have been unsubscribed in the middle of the notification loop.\n\n const notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription);\n return [subscription, notifyNestedSubs];\n }, [store, didStoreComeFromProps, contextValue]); // Determine what {store, subscription} value should be put into nested context, if necessary,\n // and memoize that value to avoid unnecessary context updates.\n\n const overriddenContextValue = React.useMemo(() => {\n if (didStoreComeFromProps) {\n // This component is directly subscribed to a store from props.\n // We don't want descendants reading from this store - pass down whatever\n // the existing context value is from the nearest connected ancestor.\n return contextValue;\n } // Otherwise, put this component's subscription instance into context, so that\n // connected descendants won't update until after this component is done\n\n\n return _extends({}, contextValue, {\n subscription\n });\n }, [didStoreComeFromProps, contextValue, subscription]); // Set up refs to coordinate values between the subscription effect and the render logic\n\n const lastChildProps = React.useRef();\n const lastWrapperProps = React.useRef(wrapperProps);\n const childPropsFromStoreUpdate = React.useRef();\n const renderIsScheduled = React.useRef(false);\n const isProcessingDispatch = React.useRef(false);\n const isMounted = React.useRef(false);\n const latestSubscriptionCallbackError = React.useRef();\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n const actualChildPropsSelector = React.useMemo(() => {\n const selector = () => {\n // Tricky logic here:\n // - This render may have been triggered by a Redux store update that produced new child props\n // - However, we may have gotten new wrapper props after that\n // If we have new child props, and the same wrapper props, we know we should use the new child props as-is.\n // But, if we have new wrapper props, those might change the child props, so we have to recalculate things.\n // So, we'll use the child props from store update only if the wrapper props are the same as last time.\n if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n return childPropsFromStoreUpdate.current;\n } // TODO We're reading the store directly in render() here. Bad idea?\n // This will likely cause Bad Things (TM) to happen in Concurrent Mode.\n // Note that we do this because on renders _not_ caused by store updates, we need the latest store state\n // to determine what the child props should be.\n\n\n return childPropsSelector(store.getState(), wrapperProps);\n };\n\n return selector;\n }, [store, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns\n // about useLayoutEffect in SSR, so we try to detect environment and fall back to\n // just useEffect instead to avoid the warning, since neither will run anyway.\n\n const subscribeForReact = React.useMemo(() => {\n const subscribe = reactListener => {\n if (!subscription) {\n return () => {};\n }\n\n return subscribeUpdates(shouldHandleStateChanges, store, subscription, // @ts-ignore\n childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, reactListener);\n };\n\n return subscribe;\n }, [subscription]);\n useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs]);\n let actualChildProps;\n\n try {\n actualChildProps = useSyncExternalStore( // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing\n subscribeForReact, // TODO This is incredibly hacky. We've already processed the store update and calculated new child props,\n // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`.\n actualChildPropsSelector, getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector);\n } catch (err) {\n if (latestSubscriptionCallbackError.current) {\n ;\n err.message += `\\nThe error may be correlated with this previous error:\\n${latestSubscriptionCallbackError.current.stack}\\n\\n`;\n }\n\n throw err;\n }\n\n useIsomorphicLayoutEffect(() => {\n latestSubscriptionCallbackError.current = undefined;\n childPropsFromStoreUpdate.current = undefined;\n lastChildProps.current = actualChildProps;\n }); // Now that all that's done, we can finally try to actually render the child component.\n // We memoize the elements for the rendered child component as an optimization.\n\n const renderedWrappedComponent = React.useMemo(() => {\n return (\n /*#__PURE__*/\n // @ts-ignore\n React.createElement(WrappedComponent, _extends({}, actualChildProps, {\n ref: reactReduxForwardedRef\n }))\n );\n }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering\n // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.\n\n const renderedChild = React.useMemo(() => {\n if (shouldHandleStateChanges) {\n // If this component is subscribed to store updates, we need to pass its own\n // subscription instance down to our descendants. That means rendering the same\n // Context instance, and putting a different value into the context.\n return /*#__PURE__*/React.createElement(ContextToUse.Provider, {\n value: overriddenContextValue\n }, renderedWrappedComponent);\n }\n\n return renderedWrappedComponent;\n }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n return renderedChild;\n }\n\n const _Connect = React.memo(ConnectFunction);\n\n // Add a hacky cast to get the right output type\n const Connect = _Connect;\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = ConnectFunction.displayName = displayName;\n\n if (forwardRef) {\n const _forwarded = React.forwardRef(function forwardConnectRef(props, ref) {\n // @ts-ignore\n return /*#__PURE__*/React.createElement(Connect, _extends({}, props, {\n reactReduxForwardedRef: ref\n }));\n });\n\n const forwarded = _forwarded;\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return hoistStatics(forwarded, WrappedComponent);\n }\n\n return hoistStatics(Connect, WrappedComponent);\n };\n\n return wrapWithConnect;\n}\n\nexport default connect;"],"names":["extendStatics","__extends","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","Editor","_super","props","_a","_b","_c","_this","rollbackTimer","undefined","valueCursor","rollbackChange","editor","value","currentContent","undoManager","ignore","setContent","inline","hasFocus","selection","moveToBookmark","e","handleBeforeInput","_evt","getBookmark","handleBeforeInputSpecial","evt","key","handleEditorChange","initialized","newContent","getContent","rollback","window","setTimeout","onEditorChange","handleEditorChangeSpecial","initialise","attempts","target","elementRef","current","tinymce","view","Error","finalInit","init","selector","readonly","disabled","plugins","toolbar","setup","bindHandlers","once","getInitialValue","no_events","init_instance_callback","initialValue","clear","add","setDirty","style","visibility","id","boundHandlers","defineProperty","get","ownerDocument","defaultView","enumerable","configurable","componentDidUpdate","prevProps","clearTimeout","localEditor_1","transact","cursor","_i","bookmark","componentDidMount","_d","_e","isArray","tinymceScriptSrc","onScriptsLoadError","loadList","getScriptSources","scriptLoading","delay","onScriptsLoad","err","componentWillUnmount","off","changeEvents","beforeInputEvent","keys","forEach","eventName","remove","render","renderInline","renderIframe","Env","browser","isIE","tagName","ref","name","textareaName","async","defer","src","map","item","channel","cloudChannel","apiKey","concat","isValueControlled","wasControlled","nowControlled","on","propTypes","defaultProps","eventPropTypes","onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCommentChange","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid","onSkinLoadError","onThemeLoadError","onModelLoadError","onPluginLoadError","onIconsLoadError","onLanguageLoadError","EditorPropTypes","editors","select","model","onValuedChanged","filter","_jsx","Select","_objectSpread","options","hp","store","products","params","date","Input","type","bool","Switch","AdvancedFilter","React","super","_defineProperty","state","filters","currentTarget","setState","selected","autoApply","onApply","alert","formatCurrent","_isnew","_name","prompt","filter_string","JSON","stringify","http","post","response","status","onAfterSave","filterString","forceUpdate","splice","getDerivedStateFromProps","parse","selected_index","parseInt","unshift","onChangeField","push","models","f","index","_options","children","filter_fields","bind","label","btn_add","_jsxs","className","last_idx","_fields","onChangeFilter","title","onClear","onRemoveCurrent","onSave","Http","def","trans","open","url","then","el_parent","el_overlay","Function","aux","req","XMLHttpRequest","match","onload","contains","removeChild","readyState","httpNotifier","unregister","mbox","error","responseURL","statusText","showResponse","modal","dangerouslySetInnerHTML","__html","env","console","log","show","text","icon","xupdte","location","reload","xpired","messages","register","msg","war","inf","msgs","m","has_only_success_msg","success","raiseEvents","notifications","set","onerror","data","content_type","indexOf","toParam","FormData","encodeURIComponent","silent","el_loading","document","createElement","setAttribute","appendChild","getElementById","body","setRequestHeader","send","Notifications","timeout","handlers","msgs_reg","flush","l","_msg","handlerTimeout","addHandler","handler","idx","removeHandler","handlerIdx","Messages","args","handlerChange","onChangeMessages","cn","MessageTray","onClose","Permission","prms","has","prm","read","edit","delete","flat","obj","k","requestCount","timeoutHandler","loading","App","_Fragment","Provider","HashRouter","PropTypes","isRequired","SimpleApp","renderRoute","routes","el","appelem","root","createRoot","route","startup","addEventListener","locale","settings","current_lang","replace","moment","localizer","momentLocalizer","allDay","previous","next","today","month","week","work_week","day","time","event","noEventsInRange","DragAndDropCalendar","withDragAndDrop","BigCalendar","AgendaEvent","onSelectEvent","Calendar","sessionStorage","getItem","Views","WEEK","config","calendar","cfg","min","Date","max","onViewChanged","onAgenda","setItem","isMobile","test","navigator","userAgent","DAY","events","defaultDate","selectable","startAccessor","endAccessor","titleAccessor","tooltipAccessor","eventPropGetter","onSelectSlot","onRangeChange","draggableAccessor","resizableAccessor","onEventDrop","onEventResize","onView","views","MONTH","AGENDA","onNavigate","components","agenda","renderEvent","showAllEvents","popup","dragDrop","classNames","start","end","getFullYear","getMonth","setDate","getDate","getDay","WORK_WEEK","ChatEditor","file","dragging","onAddFile","nextProps","prevState","innerText","onInput","ctrlKey","shiftKey","keyCode","preventDefault","onSend","onSelect","onDropFile","clipboardData","dataTransfer","focus","ev","DataTransfer","files","activeElement","getQuote","chat","quote_id","msg_quote","comment","onClearQuote","canSend","trim","uploader","InputFile","quote","onCancel","role","contentEditable","suppressContentEditableWarning","ChatSocket","users","unread","me","groups","alias","socket","io","server","autoConnect","notif","Audio","tpldns","play","ex","onNewMessage","load","group_id","user_id","typing","to","href","deleted","connect","number","emit","nif","uid","room","token","subscribe","unsubscribe","Promise","resolve","_data","entries","mergeResults","chat_id","setRead","read_timeout","user_msgs","user","page","_page","to_user_id","loaded","page_count","user_ids","mid","updated_at","msg_keys","my_last","mine","editable","FromBackground","color","_color","exec","rgb","r","g","brightness","bgColor","fgColor","simpleHash","hash","toString","charCodeAt","extend","source","toISO","padStart","hour","getHours","getMinutes","Loader","loader","dimmed","position","zIndex","top","left","right","bottom","width","height","minHeight","background","Component","lng_files","setLoading","now","startLoading","stopLoading","getLoader","saving","renderElement","Button","Badge","tip","CheckToggleButton","hovered","setHovered","toggleHover","_props","classNameHovered","iconHovered","TextComponent","getValue","renderTip","tipped","inlineTip","placeholder","cls","htmlFor","classNameLabel","mapName","_p$onKeyDown","_p$onFocus","_p$onBlur","_p$onKeyUp","required","validations","classNameEl","readOnly","maxLength","step","lang","autoFocus","autoComplete","classNameControl","InputMask","_p$onKeyDown2","_p$onFocus2","_p$onBlur2","_p$onKeyUp2","ReactInputMask","mask","replacement","showMask","getFileState","img","click","is_image","URL","createObjectURL","getRemoveButton","transparency","getEditButton","classname","onEdit","imageNone","as_image","thumb","alt","multiple","filename","accept","Textarea","_this$props$required","_this$props$minLength","_this$props$maxLength","_this$props$autoFocus","_this$props$disabled","base_class","classes","rows","minLength","Search","doSearch","toLowerCase","normalize","initValue","showSearchButton","showSearchIcon","actions","classNameCtnr","onCheckAll","checked","Checkbox","bitwise","Toggle","Radio","stopPropagation","values","classNameBtnDef","cls_def","v","MonthPicker","editingValue","format","onCalendarIconClick","$","datepicker","isNaN","dateText","inst","selectedYear","selectedMonth","removeClass","beforeShow","input","addClass","minDate","maxDate","changeMonth","changeYear","showOn","showButtonPanel","componentWillReceiveProps","DatePicker","datepickr","DateTimePicker","inputText","_selectedOption","selectedOption","useNameAsValue","reduce","inputValue","callback","term","results","defaultOptions","innerProps","align","variant","optionValue","optionLabel","base","_this$props$optionLab","isDisabled","hideObs","getAssyncSelectObs","getSelectedOption","has_model_name","findIndex","find","onInputChange","_p$isClearable","_p$isClearable2","AsyncSelect","cacheOptions","getDefaultOptions","loadOptions","isMulti","noOptionsMessage","getOptionValue","getOptionLabel","isClearable","classNameSelect","classNamePrefix","loadingMessage","menuPortalTarget","styles","menuPortal","getStyle","ReactSelect","defModalButton","_defModalButtons","close","cancel","save","confirm","Modal","buttons","setButtons","onDispose","result","duration","backdrop","keyboard","exitOnEsc","buttons_def","btn","tag","renderButtons","renderChildren","refs","parent","dismiss","message","padding","valign","pop","unmount","parentElement","isConnected","confirmDelete","info","ask","Tabs","activeTab","onTabChanged","tab","selected_tab","tabs","tabIndex","onTabKeyDown","tabContent","prevTab","Tab","Dropdown","items","classNameBtn","renderItem","_items","itemLabel","CopyClipboard","clipboard","writeText","ButtonTaskUpdate","update","EmailEditor","has_changes","accounts","account","_system","ssl","EmailManager","alts","expanded","username","smtp_server","port","colSpan","smtp_auth","queries","TimeEditor","setValue","useState","Number","conversion","RegisterEditor","CertificateEditor","cert_path","cert","onGenerate","TableEditor","_value","sortable","sortable_created","handle","elem","new_idx","old_idx","getAttribute","active","configs","onGetEditor","url_loader","enabled","cfg_enabled","select_el","cfg_values","default_value","op","header","schema","column","row","c","url_template","class","fontSize","aria_index","nrow","FormEditor","ConfigCat","onExpand","editorEmail","editorCheckbox","editorSwitch","editorToggle","editorNumber","editorUrl","editorDate","editorMinute","editorHtml","HtmlEditor","convert_urls","tags","editorText","editorCert","editorSelect","query","xor","_xor_options","opt","editorTable","capitalize","editorForm","editorEmailManager","editorRegister","renderEditor","method_ed","cat","_expanded","content","j","obs","getif","margin","Config","categories","cats","category","search","in","is_dialog","dialog","closeCallback","cinfo","action","typology","program","evt_start","evt_end","sep","course_info","course_code","can_number","action_number","courseaction_ref","course","local","duration_effect","web_schedule","training_entity","CourseInfo","courseaction","AbsenteeismDetails","coursemodule_id","entity_code","courseaction_id","module_id","react","urlify","Table","HorizontalTable","module","eval_params","level","suceess","evals","showParamsDetails","table_body","modules","tds","trainees","trainee","evall","assid","just","injust","assids","td_obs","classification","trs","param","tds_evals","peval","eval","weighing_factor","paddingLeft","rowSpan","head_details","head","image","el_picker","globalConfig","theme","skin","suffix","image_title","automatic_uploads","entity_encoding","file_picker_types","branding","menubar","statusbar","toolbar_mode","quickbars_selection_toolbar","contextmenu","browser_spellcheck","tinycomments_mode","file_picker_callback","cb","meta","onchange","reader","FileReader","getTime","blobCache","editorUpload","base64","split","blobInfo","blobUri","readAsDataURL","language","language_url","ui","registry","addMenuButton","fetch","onAction","insertContent","activeEditor","setSaved","Log","renderJson","json","is_expanded","created_at","buttonLog","classn","LogDialog","substring","createReducer","reducers","fn","reverse","first","shift","prop","merge","rebuildKeys","Paginate","pagination","_this$state$data","bounds","refTop","getBoundingClientRect","scrollTo","offsetTop","pageChanging","itemsPerPage","item_per_page","itemCount","item_count","Math","pages","ceil","items_page","child","page_nav","ReactPaginate","initialPage","forcePage","previousLabel","nextLabel","pageCount","containerClassName","subContainerClassName","activeClassName","onPageChange","setPage","paginationContainer","PostalCode","postal_description","district_code","province_code","component","foreign_contacts","Reports","onPrintReport","rpt","print","pdf","report_id","reports","report","NotFound","Router","breadcrumbs","isLoading","urlblocks","urlparts","routing","part","link","RegExp","breadcrumb","loadData","loads_count","loads_i","linkTo","go","absolute","goBack","history","back","listen","getBreadcrumbs","parts","findModel","ColumnHeader","nextElementSibling","toggle","one","hide","columnFilter","onChanged","null_value","nullValue","list","onFilterValueChanged","onDropdownClick","onDropdownItemClick","onSelectClick","renderFilterSelect","renderFilterDropdown","onSort","sort","schc","asc","fetchData","desc","a","setData","rowEditing","renderColumn","cheader","renderFilter","textAlign","headerAlign","ch","el_sort","renderHeader","headerTitle","justifyContent","sys","onBeforePrint","columns","exportable","exportType","exportTitle","current_url","force","treeGrid","treed","unmounted","new_url","pathname","searchParams","URLSearchParams","replaceState","refreshMetaData","onDataFetched","autoExpand","expand","rowSel","onRowSelected","searchHandler","refSearch","at","onCheck","onNew","selectionMode","inputParam","setSelectionMode","mode","getSelection","sel","getSearch","parents","child_name","childName","parent_id","hasChildren","columnExpand","eachChildren","onClearSearch","onPage","editingMode","setRowEdit","rowEditChanged","loadRowOnEdit","rowEditingBkup","validation","edtid","onDoubleClick","url_save","onSaved","onDelete","url_delete","description","formatReorder","formatAvatar","zoomed","formatImage","formatIcon","maps","startsWith","formatEdit","$1","$2","formatDelete","formatCheckbox","onClickBool","formatBool","nullSymbol","falseSymbol","trueSymbol","onBeforeRowExpand","formatExpand","_row$meta","hidden","iconPlus","iconMinus","treeExpand","formatTree","formatTrans","formatCombobox","formatHtml","formatBadge","formatLink","classBtn","formatDefaultActions","groupDefaultActions","formatActions","col","focused","editorDropdown","clearSelection","onRowClick","multiselect","renderColumnData","formatFunc","colsDef","footer","cActions","columnFilters","paginate","slice","renderRow","columnData","getRowProps","renderRowExpanded","defaultValue","onSearch","newLabel","export","printData","showRefreshBtn","classNameContainer","classNameTableContainer","emptyMessage","TwoFA","pwdData","credentials","btoa","process","secret","qrCodeUrl","onSubmitted","tfa","onDefine2FA","tfa_code","onChange2FACode","onDefineKeyDown","onCancel2FA","loadQrcodeOnInit","renderQrCode","visibleItems","crono_groups","crono_visible_items","self","onMenuClick","onExport","Export","internship","datepicker_start","atepicker_end","crono_can_export","eventTypes","goto","user_groups","datepicker_end","addMonths","UserCronogram","getRangeFor","selectedEvents","_start","_events","gid","event_type","str","after","url_goto","humanportal","regional","vehicles","navigate","dv","attr","removeAttr","canReply","tests","respond","helpers","openPopup","blur","attrs","visible_items","foreColor","html","deriveTextColorFrom","onAfterLoad","backgroundColor","borderColor","opacity","prevision","equiv","summarized","none","Actions","LOADING","SAVE","saveSubscription","courses","fields","_courses","_course","is_interested","ord","cfields","tp_code","trainingpath_code","dispatch","SubscribeComponent","has_validated","onRequestSave","checkAction","validate","validate_fields","has_errors","field","_error","trainingpath","afterSave","onFieldChange","label_interested","confirmed","obs_title","_actions","requires_validation","getRowPropsExpanded","UserTPCourses","editing","loadTPCourses","onCancelSubscription","mycourses","UsersTrainingPaths","tp_row","trainingpaths","loadUsersTPs","TrainingPathsView","urlMyTrainees","company","urlStatsOfTrainees","view_el","prm_training_pathway","trainingPaths","onChangeView","validateBiNif","num","dC","charAt","validateDocId","id_doc_type","id_doc","secondDigit","sum","getNumberFromChar","validateNiss","niss","prev","validateEmail","email","validateIban","iban","toUpperCase","code","AD","AE","AT","AZ","BA","BE","BG","BH","BR","CH","CR","CY","CZ","DE","DK","DO","EE","ES","FI","FO","FR","GB","GI","GL","GR","GT","HR","HU","IE","IL","IS","IT","JO","KW","KZ","LB","LI","LT","LU","LV","MC","MD","ME","MK","MR","MT","MU","NL","NO","PK","PL","PS","PT","QA","RO","RS","SA","SE","SI","SK","SM","TN","TR","AL","BY","EG","GE","IQ","LC","SC","ST","SV","TL","UA","VA","VG","XK","string","fragment","checksum","offset","mod97","letter","ContextKey","Symbol","for","gT","globalThis","getContext","_gT$ContextKey","contextMap","Map","realContext","ReactReduxContext","context","serverState","stabilityCheck","noopCheck","contextValue","subscription","getServerState","previousState","getState","onStateChange","notifyNestedSubs","trySubscribe","tryUnsubscribe","Context","_excluded","useSyncExternalStore","initializeConnect","NO_SUBSCRIPTION_ARRAY","captureWrapperProps","lastWrapperProps","lastChildProps","renderIsScheduled","wrapperProps","childPropsFromStoreUpdate","strictEqual","mapStateToProps","mapDispatchToProps","mergeProps","pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual","forwardRef","initMapStateToProps","initMapDispatchToProps","initMergeProps","shouldHandleStateChanges","Boolean","WrappedComponent","wrappedComponentName","displayName","selectorFactoryOptions","ConnectFunction","propsContext","reactReduxForwardedRef","ContextToUse","Consumer","isContextConsumer","didStoreComeFromProps","didStoreComeFromContext","childPropsSelector","overriddenContextValue","isMounted","latestSubscriptionCallbackError","actualChildPropsSelector","subscribeForReact","reactListener","additionalSubscribeListener","didUnsubscribe","lastThrownError","checkForUpdates","latestStoreState","newChildProps","subscribeUpdates","effectFunc","effectArgs","actualChildProps","dependencies","stack","renderedWrappedComponent","Connect","forwarded"],"sourceRoot":""}