-
Notifications
You must be signed in to change notification settings - Fork 3
/
10-fd5ef347026a0fd2f506.js.map
1 lines (1 loc) · 66.8 KB
/
10-fd5ef347026a0fd2f506.js.map
1
{"version":3,"sources":["webpack:///10-fd5ef347026a0fd2f506.js","webpack:///./src/List/HelpLink.component.js?e268*****","webpack:///./src/config/inlinehelp-mapping.json?abd3*****","webpack:///./src/EditModel/FormHeading.js?6597***","webpack:///./src/EditModel/BackButton.component.js?d1ea***","webpack:///./src/SqlView/SqlView.component.js"],"names":["webpackJsonp","3315","module","__webpack_exports__","__webpack_require__","Object","defineProperty","value","__WEBPACK_IMPORTED_MODULE_0__SqlView_component__","d","3346","mappingPathExists","mappingKey","__WEBPACK_IMPORTED_MODULE_4__config_inlinehelp_mapping_json___default","a","getDocsVersion","_ref","major","minor","snapshot","replacePlaceholder","variablesToReplace","placeholderRegex","replace","match","variable","has","get","replaceMappingPathPlaceholder","path","keys","find","pathToMatch","RegExp","test","getPartialHelpContentPath","replacedMappingPath","variablesToReplaceCamel","findHelpLinkForPath","schema","Map","i","__WEBPACK_IMPORTED_MODULE_3_d2_utilizr__","HelpLink","_ref2","_ref3","d2","window","location","hash","docsVersion","system","version","docsLink","helpLink","__WEBPACK_IMPORTED_MODULE_0_react___default","createElement","__WEBPACK_IMPORTED_MODULE_2_material_ui_IconButton___default","href","target","rel","tooltip","i18n","getTranslation","tooltipPosition","iconClassName","iconStyle","top","__WEBPACK_IMPORTED_MODULE_0_react__","n","__WEBPACK_IMPORTED_MODULE_1_prop_types__","__WEBPACK_IMPORTED_MODULE_1_prop_types___default","__WEBPACK_IMPORTED_MODULE_2_material_ui_IconButton__","__WEBPACK_IMPORTED_MODULE_4__config_inlinehelp_mapping_json__","propTypes","string","isRequired","contextTypes","object","3357","exports","/list/categorySection","/list/dataElementSection","/list/dataSetSection","/edit/dataSetSection/dataSet/${objectId}/sections","/edit/dataSetSection/dataSetNotificationTemplate","/edit/dataSetSection/dataSet","/list/indicatorSection/programIndicatorGroup","/list/indicatorSection/programIndicator","/list/indicatorSection","/edit/indicatorSection/programIndicator","/edit/indicatorSection/programIndicatorGroup","/list/organisationUnitSection/organisationUnitLevel","/list/organisationUnitSection","organisationUnitSection/hierarchy","/list/programSection/trackedEntity","/list/programSection/programRuleVariable","/list/programSection/program/","/list/programSection/${objectType}","/list/programSection","/edit/programSection/program/","/edit/programSection/trackedEntityType","/edit/programSection/${objectType}","/list/validationSection","/edit/validationSection/validationNotificationTemplate","/edit/otherSection/attribute","/list/otherSection/optionGroup","/list/otherSection/optionGroupSet","/list/otherSection/legendSet","/edit/otherSection/legendSet","/list/otherSection/predictorGroup","/list/otherSection/pushAnalysis","/edit/otherSection/pushAnalysis","/list/otherSection/externalMapLayer","/list/otherSection/locale","/edit/otherSection/locale","/list/otherSection/sqlView","/edit/otherSection/sqlView","/edit/","/list/","3392","_objectWithoutProperties","obj","indexOf","prototype","hasOwnProperty","call","FormHeading","context","level","children","groupName","isDirtyHandler","skipTranslation","props","__WEBPACK_IMPORTED_MODULE_3_d2_ui_lib_headings_Heading_component__","_extends","__WEBPACK_IMPORTED_MODULE_5__BackButton_component__","onClick","__WEBPACK_IMPORTED_MODULE_6__router_utils__","goToAndScrollUp","__WEBPACK_IMPORTED_MODULE_4__List_HelpLink_component__","__WEBPACK_IMPORTED_MODULE_2_d2_ui_lib_component_helpers_addD2Context__","assign","arguments","length","source","key","oneOfType","array","number","func","bool","defaultProps","3396","BackButton","_props$isDirtyHandler","undefined","__WEBPACK_IMPORTED_MODULE_3__EditModel_modelToEditStore__","getState","bind","otherProps","onClickWithConfirm","dirty","confirm","__WEBPACK_IMPORTED_MODULE_1_material_ui_IconButton_IconButton___default","__WEBPACK_IMPORTED_MODULE_1_material_ui_IconButton_IconButton__","PropTypes","3914","_asyncToGenerator","fn","gen","apply","this","Promise","resolve","reject","step","arg","info","error","done","then","err","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","enumerable","writable","configurable","setPrototypeOf","__proto__","__WEBPACK_IMPORTED_MODULE_2_material_ui_Paper_Paper__","__WEBPACK_IMPORTED_MODULE_2_material_ui_Paper_Paper___default","__WEBPACK_IMPORTED_MODULE_3_material_ui_RaisedButton__","__WEBPACK_IMPORTED_MODULE_3_material_ui_RaisedButton___default","__WEBPACK_IMPORTED_MODULE_4_material_ui_Popover__","__WEBPACK_IMPORTED_MODULE_4_material_ui_Popover___default","__WEBPACK_IMPORTED_MODULE_5_material_ui_Menu__","__WEBPACK_IMPORTED_MODULE_5_material_ui_Menu___default","__WEBPACK_IMPORTED_MODULE_6_material_ui_MenuItem__","__WEBPACK_IMPORTED_MODULE_6_material_ui_MenuItem___default","__WEBPACK_IMPORTED_MODULE_7_material_ui_svg_icons_hardware_keyboard_arrow_down__","__WEBPACK_IMPORTED_MODULE_7_material_ui_svg_icons_hardware_keyboard_arrow_down___default","__WEBPACK_IMPORTED_MODULE_8__EditModel_FormHeading__","__WEBPACK_IMPORTED_MODULE_9__router_utils__","__WEBPACK_IMPORTED_MODULE_10__loading_mask_LoadingMask_component__","__WEBPACK_IMPORTED_MODULE_11__Snackbar_snack_actions__","_createClass","defineProperties","descriptor","protoProps","staticProps","_typeof","Symbol","iterator","backToList","formatCellValue","cell","JSON","stringify","String","styles","menuItem","paddingLeft","paddingRight","SqlView","_Component","_this","getPrototypeOf","openDownloadMenu","event","setState","downloadMenuOpen","downloadMenuAnchor","currentTarget","closeDownloadMenu","renderCell","index","renderRow","row","map","state","listGrid","getSqlView","regeneratorRuntime","mark","_callee","modelId","url","queryParams","wrap","_context","prev","next","params","paging","Api","getApi","sent","t0","console","show","message","action","stop","file","open","title","headerText","className","renderDropDownButton","labelPosition","primary","icon","label","anchorEl","anchorOrigin","horizontal","vertical","targetOrigin","onRequestClose","renderDropDownMenuItems","_this2","style","primaryText","openFileLink","_state$listGrid","headers","rows","_ref4","name","renderHeader","renderTable","shape"],"mappings":"AAAAA,cAAc,KAERC,KACA,SAAUC,EAAQC,EAAq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AAO9D,EAAOC,SACd8D,YAAaxP,EAAGgB,KAAKC,eAAe6N,GACpClJ,QAAS,iBAAM0J,GAAKG,aAAapB,WLkazChI,IAAK,cAIL5I,MAAO,WKvZG,GAAAiS,GAC8B3H,KAAK8E,MAArCC,SAAY6C,EADVD,EACUC,QAASC,EADnBF,EACmBE,IAC7B,OACInP,GAAAzC,EAAA0C,cAAA,SAAO+N,UAAU,mBACbhO,EAAAzC,EAAA0C,cAAA,aACID,EAAAzC,EAAA0C,cAAA,UACKiP,EAAQ/C,IAAI,SAAAiD,GAAA,GAAGC,GAAHD,EAAGC,IAAH,OAAcrP,GAAAzC,EAAA0C,cAAA,MAAI2F,IAAKyJ,GAAOA,OAGnDrP,EAAAzC,EAAA0C,cAAA,aACKkP,EAAKhD,IAAI7E,KAAK2E,gBL6a3BrG,IAAK,SACL5I,MAAO,WKvaP,MAAKsK,MAAK8E,MAAMC,SAKZrM,EAAAzC,EAAA0C,cAAA,WACKqH,KAAKgI,eACNtP,EAAAzC,EAAA0C,cAACkJ,EAAA5L,GAAMyQ,UAAU,qBACZ1G,KAAKiI,gBAPPvP,EAAAzC,EAAA0C,cAAC+J,EAAA,EAAD,ULwbRoB,GKtkBWvK,EAAA,UA2JtBuK,GAAQjK,WACJ8L,OAAQjM,EAAAzD,EAAUiS,OACd9C,QAAS1L,EAAAzD,EAAU6D,SACpBC,YAGP+J,EAAQ9J,cACJ/B,GAAIyB,EAAAzD,EAAUgE,QAGlB3E,EAAA","file":"10-fd5ef347026a0fd2f506.js","sourcesContent":["webpackJsonp([10],{\n\n/***/ 3315:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SqlView_component__ = __webpack_require__(3914);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return __WEBPACK_IMPORTED_MODULE_0__SqlView_component__[\"a\"]; });\n\n\n\n/***/ }),\n\n/***/ 3346:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = HelpLink;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_material_ui_IconButton__ = __webpack_require__(133);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_material_ui_IconButton___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_material_ui_IconButton__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d2_utilizr__ = __webpack_require__(724);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d2_utilizr___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_d2_utilizr__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config_inlinehelp_mapping_json__ = __webpack_require__(3357);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config_inlinehelp_mapping_json___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__config_inlinehelp_mapping_json__);\n\n\n\n\n\n\n\n\n\nfunction mappingPathExists(mappingKey) {\n return mappingKey && __WEBPACK_IMPORTED_MODULE_4__config_inlinehelp_mapping_json___default.a[mappingKey];\n}\n\n/**\n * Returns the \"version\" of the documentation that corresponds with the current dhis2 version.\n *\n * @param {Object} version - The version definition as provided by d2.system.version.\n * @param {number} version.minor - The minor dhis2 version. e.g. The 25 in 2.25.\n * @param {boolean} version.snapshot - True when the current version is the snapshot(master/development) branch.\n *\n * @returns {string} `master` for a snapshot branch. `25` for 2.25 etc.\n */\nfunction getDocsVersion(_ref) {\n var major = _ref.major,\n minor = _ref.minor,\n snapshot = _ref.snapshot;\n\n if (snapshot) {\n return 'master';\n }\n return '' + major + minor;\n}\n\n/** \n * If ${placeholder} is found in mappingKey, it will be replaced with a matching name if \n * present from variablesToReplace. \n * \n * Eg. for the mappingKey \"/edit/otherSection/${objectType}\" the placeholder objectType\n * will be found. If an entry in variablesToReplace exists objectType will be replaced \n * with the value to this entry, say constant. This will result in the new path \"/edit/otherSection/constant\".\n * If no match is found, the path will return.\n * \n * @param {string} mappingKey The mapping that may have a placeholder to replace\n * @param {Map} variablesToReplace The variables that are to be replaced with the placeholder \n *\n * @returns {string} The matched path with replaced placeholders if found\n */\nfunction replacePlaceholder(mappingKey, variablesToReplace) {\n var placeholderRegex = /\\$\\{(.+?)\\}/g;\n\n return mappingKey.replace(placeholderRegex, function (match, variable) {\n if (variablesToReplace.has(variable)) {\n return variablesToReplace.get(variable);\n }\n return '.+?';\n });\n}\n\n/** \n * Checks if the mappingKeyPath with replaced placeholders matches the path were currently on.\n * \n * @param {string} path The path to be matched with a mappingKey \n * @param {Map} variablesToReplace The variables that are to be replaced with a placeholder \n *\n * @returns {string} The matched mappingKey with replaced placeholders if found\n */\nfunction replaceMappingPathPlaceholder(path, variablesToReplace) {\n return Object.keys(__WEBPACK_IMPORTED_MODULE_4__config_inlinehelp_mapping_json___default.a).find(function (mappingKey) {\n var pathToMatch = replacePlaceholder(mappingKey, variablesToReplace);\n return new RegExp(pathToMatch).test(path);\n });\n}\n\n// Replaces the placeholders of the matched mappingKey url to create the complete partial help content path.\nfunction getPartialHelpContentPath(replacedMappingPath, variablesToReplaceCamel) {\n if (mappingPathExists(replacedMappingPath)) {\n return replacePlaceholder(__WEBPACK_IMPORTED_MODULE_4__config_inlinehelp_mapping_json___default.a[replacedMappingPath], variablesToReplaceCamel);\n }\n\n return '';\n}\n\n/**\n * Attempts to find a help link as defined in the inlinehelp-mapping.js It will always pick the first match that it finds. Help links should therefore be\n * sorted with the longer links first.\n * The search is done using a regular expression that matches the path from the start. This means that paths that are longer/dynamic can still show help links.\n *\n * For example a help link key that is defined as `/edit/dataElementSection/dataElement` would show up on both `/edit/dataElementSection/dataElement/add` and `/edit/dataElementSection/dataElement/wap68IYzTXr`.\n *\n * @param {string} path The current path/route that the browser is on. This is the path that the help link should be used for.\n * @param {string} schema The name of the schema to find help for.\n *\n * @returns {string} The partial path that the refers to the help content in the documentation. e.g. `/en/user/html/manage_org_unit.html`\n */\nfunction findHelpLinkForPath(path, schema) {\n var variablesToReplace = new Map([['objectType', schema]]);\n var variablesToReplaceCamel = new Map([['objectType', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_d2_utilizr__[\"camelCaseToUnderscores\"])(schema)]]);\n\n var replacedMappingPath = replaceMappingPathPlaceholder(path, variablesToReplace);\n return getPartialHelpContentPath(replacedMappingPath, variablesToReplaceCamel);\n}\n\nfunction HelpLink(_ref2, _ref3) {\n var schema = _ref2.schema;\n var d2 = _ref3.d2;\n\n var path = window.location.hash.replace(/^#/, '') // Remove leading hash\n .replace(/\\?.+?$/, ''); // Remove query param/cache breaker\n var docsVersion = getDocsVersion(d2.system.version);\n var docsLink = 'https://docs.dhis2.org/en/use/user-guides/dhis-core-version-' + docsVersion + '/configuring-the-system';\n var helpLink = findHelpLinkForPath(path, schema);\n\n if (helpLink) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_material_ui_IconButton___default.a,\n {\n href: '' + docsLink + helpLink,\n target: '_blank',\n rel: 'noopener noreferrer',\n tooltip: d2.i18n.getTranslation('open_user_guide'),\n tooltipPosition: 'bottom-center',\n iconClassName: 'material-icons',\n iconStyle: { top: -2 }\n },\n 'help_outline'\n );\n }\n\n return null;\n}\n\nHelpLink.propTypes = {\n schema: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired\n};\n\nHelpLink.contextTypes = {\n d2: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n};\n\n/***/ }),\n\n/***/ 3357:\n/***/ (function(module, exports) {\n\nmodule.exports = {\"/list/categorySection\":\"/metadata.html#manage_category\",\"/list/dataElementSection\":\"/metadata.html#manage_data_element\",\"/list/dataSetSection\":\"/metadata.html#manage_data_set\",\"/edit/dataSetSection/dataSet/${objectId}/sections\":\"/metadata.html#manage_section_form\",\"/edit/dataSetSection/dataSetNotificationTemplate\":\"/metadata.html#create_data_set_notification\",\"/edit/dataSetSection/dataSet\":\"/metadata.html#create_data_set\",\"/list/indicatorSection/programIndicatorGroup\":\"/programs.html#manage_${objectType}\",\"/list/indicatorSection/programIndicator\":\"/programs.html#configure_program_indicator\",\"/list/indicatorSection\":\"/metadata.html#manage_indicator\",\"/edit/indicatorSection/programIndicator\":\"/programs.html#create_${objectType}\",\"/edit/indicatorSection/programIndicatorGroup\":\"/programs.html#create_${objectType}\",\"/list/organisationUnitSection/organisationUnitLevel\":\"/metadata.html#name_organisation_unit_level\",\"/list/organisationUnitSection\":\"/metadata.html#manage_organisation_unit\",\"organisationUnitSection/hierarchy\":\"/metadata.html#move_organisation_unit\",\"/list/programSection/trackedEntity\":\"/programs.html#configure_tracked_entity\",\"/list/programSection/programRuleVariable\":\"/programs.html#configure_program_rule\",\"/list/programSection/program/\":\"/programs.html#configure_programs_in_maintenance_app\",\"/list/programSection/${objectType}\":\"/programs.html#configure_${objectType}\",\"/list/programSection\":\"/programs.html#configure_programs_in_maintenance_app\",\"/edit/programSection/program/\":\"/programs.html#configure_programs_in_maintenance_app\",\"/edit/programSection/trackedEntityType\":\"/programs.html#create_tracked_entity\",\"/edit/programSection/${objectType}\":\"/programs.html#create_${objectType}\",\"/list/validationSection\":\"/metadata.html#manage_validation_rule\",\"/edit/validationSection/validationNotificationTemplate\":\"/metadata.html#create_validation_notification\",\"/edit/otherSection/attribute\":\"/metadata.html#create-or-edit-an-attribute\",\"/list/otherSection/optionGroup\":\"/metadata.html#create_option_group\",\"/list/otherSection/optionGroupSet\":\"/metadata.html#create_option_group_set\",\"/list/otherSection/legendSet\":\"/metadata.html#manage_legend\",\"/edit/otherSection/legendSet\":\"/metadata.html#create_legend\",\"/list/otherSection/predictorGroup\":\"/metadata.html#create_predictor_group\",\"/list/otherSection/pushAnalysis\":\"/metadata.html#manage_push_report\",\"/edit/otherSection/pushAnalysis\":\"/metadata.html#manage_push_report\",\"/list/otherSection/externalMapLayer\":\"/metadata.html#manage_external_maplayer\",\"/list/otherSection/locale\":\"/metadata.html#maintenance_locale_management\",\"/edit/otherSection/locale\":\"/metadata.html#maintenance_locale_management\",\"/list/otherSection/sqlView\":\"/metadata.html#maintenance_sql_view\",\"/edit/otherSection/sqlView\":\"/metadata.html#maintenance_sql_view\",\"/edit/\":\"/metadata.html#create_${objectType}\",\"/list/\":\"/metadata.html#manage_${objectType}\"}\n\n/***/ }),\n\n/***/ 3392:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d2_ui_lib_component_helpers_addD2Context__ = __webpack_require__(83);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d2_ui_lib_headings_Heading_component__ = __webpack_require__(316);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__List_HelpLink_component__ = __webpack_require__(3346);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__BackButton_component__ = __webpack_require__(3396);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__router_utils__ = __webpack_require__(202);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\n\nfunction FormHeading(_ref, context) {\n var level = _ref.level,\n schema = _ref.schema,\n children = _ref.children,\n groupName = _ref.groupName,\n isDirtyHandler = _ref.isDirtyHandler,\n skipTranslation = _ref.skipTranslation,\n props = _objectWithoutProperties(_ref, ['level', 'schema', 'children', 'groupName', 'isDirtyHandler', 'skipTranslation']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3_d2_ui_lib_headings_Heading_component__[\"a\" /* default */],\n _extends({}, props, { level: level }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__BackButton_component__[\"a\" /* default */], {\n onClick: function onClick() {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__router_utils__[\"b\" /* goToAndScrollUp */])('/list/' + groupName + '/' + schema);\n },\n iconStyle: { top: 3 },\n isDirtyHandler: isDirtyHandler\n }),\n skipTranslation ? children : context.d2.i18n.getTranslation(children),\n schema && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__List_HelpLink_component__[\"a\" /* default */], { schema: schema })\n );\n}\n\nFormHeading.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array]),\n level: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,\n isDirtyHandler: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n schema: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,\n groupName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,\n skipTranslation: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool\n};\n\nFormHeading.defaultProps = {\n isDirtyHandler: function isDirtyHandler() {},\n level: 2,\n children: '',\n skipTranslation: false\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_d2_ui_lib_component_helpers_addD2Context__[\"a\" /* default */])(FormHeading));\n\n/***/ }),\n\n/***/ 3396:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_material_ui_IconButton_IconButton__ = __webpack_require__(203);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_material_ui_IconButton_IconButton___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_material_ui_IconButton_IconButton__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d2_ui_lib_component_helpers_addD2Context__ = __webpack_require__(83);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__EditModel_modelToEditStore__ = __webpack_require__(245);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nfunction BackButton(props, context) {\n var tooltip = props.tooltip,\n onClick = props.onClick,\n _props$isDirtyHandler = props.isDirtyHandler,\n isDirtyHandler = _props$isDirtyHandler === undefined ? __WEBPACK_IMPORTED_MODULE_3__EditModel_modelToEditStore__[\"a\" /* default */].getState.bind(__WEBPACK_IMPORTED_MODULE_3__EditModel_modelToEditStore__[\"a\" /* default */]) : _props$isDirtyHandler,\n otherProps = _objectWithoutProperties(props, ['tooltip', 'onClick', 'isDirtyHandler']);\n\n var onClickWithConfirm = function onClickWithConfirm() {\n var isDirty = isDirtyHandler && isDirtyHandler() && isDirtyHandler().dirty;\n\n if (!isDirty) {\n onClick.apply(undefined, arguments);\n } else if (\n // eslint-disable-next-line no-restricted-globals\n confirm(context.d2.i18n.getTranslation('abandon_unsaved_changes'))) {\n onClick.apply(undefined, arguments);\n }\n };\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_material_ui_IconButton_IconButton___default.a,\n _extends({\n tooltip: tooltip || context.d2.i18n.getTranslation('back'),\n tooltipPosition: 'bottom-right',\n onClick: onClickWithConfirm\n }, otherProps, {\n iconClassName: 'material-icons'\n }),\n '\\uE5C4'\n );\n}\nBackButton.propTypes = {\n tooltip: __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes.string\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_d2_ui_lib_component_helpers_addD2Context__[\"a\" /* default */])(BackButton));\n\n/***/ }),\n\n/***/ 3914:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_material_ui_Paper_Paper__ = __webpack_require__(317);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_material_ui_Paper_Paper___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_material_ui_Paper_Paper__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_material_ui_RaisedButton__ = __webpack_require__(152);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_material_ui_RaisedButton___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_material_ui_RaisedButton__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_material_ui_Popover__ = __webpack_require__(1317);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_material_ui_Popover___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_material_ui_Popover__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_material_ui_Menu__ = __webpack_require__(443);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_material_ui_Menu___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_material_ui_Menu__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_material_ui_MenuItem__ = __webpack_require__(115);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_material_ui_MenuItem___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_material_ui_MenuItem__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_material_ui_svg_icons_hardware_keyboard_arrow_down__ = __webpack_require__(1356);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_material_ui_svg_icons_hardware_keyboard_arrow_down___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_material_ui_svg_icons_hardware_keyboard_arrow_down__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__EditModel_FormHeading__ = __webpack_require__(3392);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__router_utils__ = __webpack_require__(202);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__loading_mask_LoadingMask_component__ = __webpack_require__(325);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Snackbar_snack_actions__ = __webpack_require__(84);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step(\"next\", value); }, function (err) { step(\"throw\", err); }); } } return step(\"next\"); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar backToList = function backToList() {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__router_utils__[\"a\" /* goToRoute */])('list/otherSection/sqlView');\n};\n\nvar formatCellValue = function formatCellValue(cell) {\n if (cell === null) {\n return null;\n }\n\n if ((typeof cell === 'undefined' ? 'undefined' : _typeof(cell)) === 'object') {\n return JSON.stringify(cell, null, 2);\n }\n\n return String(cell);\n};\n\nvar styles = {\n menuItem: {\n paddingLeft: '1.5rem',\n paddingRight: '1.5rem'\n }\n};\n\nvar SqlView = function (_Component) {\n _inherits(SqlView, _Component);\n\n function SqlView(props, context) {\n _classCallCheck(this, SqlView);\n\n var _this = _possibleConstructorReturn(this, (SqlView.__proto__ || Object.getPrototypeOf(SqlView)).call(this, props, context));\n\n _this.openDownloadMenu = function (event) {\n _this.setState({\n downloadMenuOpen: true,\n downloadMenuAnchor: event.currentTarget\n });\n };\n\n _this.closeDownloadMenu = function () {\n _this.setState({\n downloadMenuOpen: false\n });\n };\n\n _this.renderCell = function (cell, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'td',\n { key: 'cell' + index },\n formatCellValue(cell)\n );\n };\n\n _this.renderRow = function (row, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'tr',\n { key: 'row' + index },\n row.map(_this.renderCell)\n );\n };\n\n _this.state = {\n listGrid: null,\n downloadMenuOpen: false,\n downloadMenuAnchor: null\n };\n return _this;\n }\n\n _createClass(SqlView, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.getSqlView();\n }\n }, {\n key: 'getSqlView',\n value: function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var d2, modelId, url, queryParams, _ref2, listGrid;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n d2 = this.context.d2;\n modelId = this.props.params.modelId;\n url = 'sqlViews/' + modelId + '/data';\n queryParams = { paging: false };\n _context.prev = 4;\n _context.next = 7;\n return d2.Api.getApi().get(url, queryParams);\n\n case 7:\n _ref2 = _context.sent;\n listGrid = _ref2.listGrid;\n\n this.setState({ listGrid: listGrid });\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](4);\n\n console.error(_context.t0);\n backToList();\n __WEBPACK_IMPORTED_MODULE_11__Snackbar_snack_actions__[\"a\" /* default */].show({ message: d2.i18n.getTranslation('sql_query_error'), action: 'ok' });\n\n case 17:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[4, 12]]);\n }));\n\n function getSqlView() {\n return _ref.apply(this, arguments);\n }\n\n return getSqlView;\n }()\n }, {\n key: 'openFileLink',\n value: function openFileLink(file) {\n var modelId = this.props.params.modelId;\n\n this.closeDownloadMenu();\n window.open('../api/sqlViews/' + modelId + '/' + file, '_blank');\n }\n }, {\n key: 'renderHeader',\n value: function renderHeader() {\n var title = this.state.listGrid.title;\n var d2 = this.context.d2;\n\n var headerText = d2.i18n.getTranslation('view_data_for') + ' \"' + title + '\"';\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: 'sql-view__header' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__EditModel_FormHeading__[\"a\" /* default */],\n {\n level: 1,\n groupName: 'otherSection',\n schema: 'sqlView',\n skipTranslation: true\n },\n headerText\n ),\n this.renderDropDownButton()\n );\n }\n }, {\n key: 'renderDropDownButton',\n value: function renderDropDownButton() {\n var d2 = this.context.d2;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: 'sql-view__dropdown-button' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_material_ui_RaisedButton___default.a, {\n onClick: this.openDownloadMenu,\n className: 'sql-view__download-btn',\n labelPosition: 'before',\n primary: true,\n icon: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_material_ui_svg_icons_hardware_keyboard_arrow_down___default.a, null),\n label: d2.i18n.getTranslation('download_as')\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_material_ui_Popover___default.a,\n {\n open: this.state.downloadMenuOpen,\n anchorEl: this.state.downloadMenuAnchor,\n anchorOrigin: { horizontal: 'right', vertical: 'bottom' },\n targetOrigin: { horizontal: 'right', vertical: 'top' },\n onRequestClose: this.closeDownloadMenu\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_material_ui_Menu___default.a,\n null,\n this.renderDropDownMenuItems()\n )\n )\n );\n }\n }, {\n key: 'renderDropDownMenuItems',\n value: function renderDropDownMenuItems() {\n var _this2 = this;\n\n var d2 = this.context.d2;\n\n return [{ label: 'excel', file: 'data.xls' }, { label: 'csv', file: 'data.csv' }, { label: 'pdf', file: 'data.pdf' }, { label: 'html', file: 'data.html+css' }, { label: 'xml', file: 'data.xml' }, { label: 'json', file: 'data.json' }].map(function (_ref3) {\n var label = _ref3.label,\n file = _ref3.file;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_material_ui_MenuItem___default.a, {\n key: label,\n style: styles.menuItem,\n primaryText: d2.i18n.getTranslation(label),\n onClick: function onClick() {\n return _this2.openFileLink(file);\n } // eslint-disable-line react/jsx-no-bind\n });\n });\n }\n\n /* eslint-disable react/no-array-index-key */\n\n }, {\n key: 'renderTable',\n\n /* eslint-enable react/no-array-index-key */\n\n value: function renderTable() {\n var _state$listGrid = this.state.listGrid,\n headers = _state$listGrid.headers,\n rows = _state$listGrid.rows;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'table',\n { className: 'sql-view__table' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'thead',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'tr',\n null,\n headers.map(function (_ref4) {\n var name = _ref4.name;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'th',\n { key: name },\n name\n );\n })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'tbody',\n null,\n rows.map(this.renderRow)\n )\n );\n }\n }, {\n key: 'render',\n value: function render() {\n if (!this.state.listGrid) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__loading_mask_LoadingMask_component__[\"a\" /* default */], null);\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n null,\n this.renderHeader(),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_material_ui_Paper_Paper___default.a,\n { className: 'sql-view__content' },\n this.renderTable()\n )\n );\n }\n }]);\n\n return SqlView;\n}(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n\nSqlView.propTypes = {\n params: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n modelId: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string\n }).isRequired\n};\n\nSqlView.contextTypes = {\n d2: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (SqlView);\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// 10-fd5ef347026a0fd2f506.js","\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport IconButton from 'material-ui/IconButton';\nimport { camelCaseToUnderscores } from 'd2-utilizr';\n\nimport inlineHelpMapping from '../config/inlinehelp-mapping.json';\n\nfunction mappingPathExists(mappingKey) {\n return mappingKey && inlineHelpMapping[mappingKey];\n}\n\n/**\n * Returns the \"version\" of the documentation that corresponds with the current dhis2 version.\n *\n * @param {Object} version - The version definition as provided by d2.system.version.\n * @param {number} version.minor - The minor dhis2 version. e.g. The 25 in 2.25.\n * @param {boolean} version.snapshot - True when the current version is the snapshot(master/development) branch.\n *\n * @returns {string} `master` for a snapshot branch. `25` for 2.25 etc.\n */\nfunction getDocsVersion({ major, minor, snapshot }) {\n if (snapshot) {\n return 'master';\n }\n return `${major}${minor}`;\n}\n\n/** \n * If ${placeholder} is found in mappingKey, it will be replaced with a matching name if \n * present from variablesToReplace. \n * \n * Eg. for the mappingKey \"/edit/otherSection/${objectType}\" the placeholder objectType\n * will be found. If an entry in variablesToReplace exists objectType will be replaced \n * with the value to this entry, say constant. This will result in the new path \"/edit/otherSection/constant\".\n * If no match is found, the path will return.\n * \n * @param {string} mappingKey The mapping that may have a placeholder to replace\n * @param {Map} variablesToReplace The variables that are to be replaced with the placeholder \n *\n * @returns {string} The matched path with replaced placeholders if found\n */\nfunction replacePlaceholder(mappingKey, variablesToReplace) {\n const placeholderRegex = /\\$\\{(.+?)\\}/g;\n\n return mappingKey.replace(placeholderRegex, (match, variable) => {\n if (variablesToReplace.has(variable)) {\n return variablesToReplace.get(variable);\n }\n return '.+?';\n });\n}\n\n/** \n * Checks if the mappingKeyPath with replaced placeholders matches the path were currently on.\n * \n * @param {string} path The path to be matched with a mappingKey \n * @param {Map} variablesToReplace The variables that are to be replaced with a placeholder \n *\n * @returns {string} The matched mappingKey with replaced placeholders if found\n */\nfunction replaceMappingPathPlaceholder(path, variablesToReplace) {\n return Object.keys(inlineHelpMapping)\n .find((mappingKey) => {\n const pathToMatch = replacePlaceholder(mappingKey, variablesToReplace);\n return (new RegExp(pathToMatch)).test(path);\n });\n}\n\n// Replaces the placeholders of the matched mappingKey url to create the complete partial help content path.\nfunction getPartialHelpContentPath(replacedMappingPath, variablesToReplaceCamel) {\n if (mappingPathExists(replacedMappingPath)) {\n return replacePlaceholder(inlineHelpMapping[replacedMappingPath], variablesToReplaceCamel);\n }\n\n return '';\n}\n\n/**\n * Attempts to find a help link as defined in the inlinehelp-mapping.js It will always pick the first match that it finds. Help links should therefore be\n * sorted with the longer links first.\n * The search is done using a regular expression that matches the path from the start. This means that paths that are longer/dynamic can still show help links.\n *\n * For example a help link key that is defined as `/edit/dataElementSection/dataElement` would show up on both `/edit/dataElementSection/dataElement/add` and `/edit/dataElementSection/dataElement/wap68IYzTXr`.\n *\n * @param {string} path The current path/route that the browser is on. This is the path that the help link should be used for.\n * @param {string} schema The name of the schema to find help for.\n *\n * @returns {string} The partial path that the refers to the help content in the documentation. e.g. `/en/user/html/manage_org_unit.html`\n */\nfunction findHelpLinkForPath(path, schema) {\n const variablesToReplace = new Map([['objectType', schema]]);\n const variablesToReplaceCamel = new Map([['objectType', camelCaseToUnderscores(schema)]]);\n\n const replacedMappingPath = replaceMappingPathPlaceholder(path, variablesToReplace);\n return getPartialHelpContentPath(replacedMappingPath, variablesToReplaceCamel);\n}\n\nexport default function HelpLink({ schema }, { d2 }) {\n const path = window.location.hash\n .replace(/^#/, '') // Remove leading hash\n .replace(/\\?.+?$/, ''); // Remove query param/cache breaker\n const docsVersion = getDocsVersion(d2.system.version)\n const docsLink = `https://docs.dhis2.org/en/use/user-guides/dhis-core-version-${docsVersion}/configuring-the-system`\n const helpLink = findHelpLinkForPath(path, schema);\n\n if (helpLink) {\n return (\n <IconButton\n href={`${docsLink}${helpLink}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n tooltip={d2.i18n.getTranslation('open_user_guide')}\n tooltipPosition=\"bottom-center\"\n iconClassName=\"material-icons\"\n iconStyle={{ top: -2 }}\n >\n help_outline\n </IconButton>\n );\n }\n\n return null;\n}\n\nHelpLink.propTypes = {\n schema: PropTypes.string.isRequired,\n};\n\nHelpLink.contextTypes = {\n d2: PropTypes.object,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/List/HelpLink.component.js","module.exports = {\"/list/categorySection\":\"/metadata.html#manage_category\",\"/list/dataElementSection\":\"/metadata.html#manage_data_element\",\"/list/dataSetSection\":\"/metadata.html#manage_data_set\",\"/edit/dataSetSection/dataSet/${objectId}/sections\":\"/metadata.html#manage_section_form\",\"/edit/dataSetSection/dataSetNotificationTemplate\":\"/metadata.html#create_data_set_notification\",\"/edit/dataSetSection/dataSet\":\"/metadata.html#create_data_set\",\"/list/indicatorSection/programIndicatorGroup\":\"/programs.html#manage_${objectType}\",\"/list/indicatorSection/programIndicator\":\"/programs.html#configure_program_indicator\",\"/list/indicatorSection\":\"/metadata.html#manage_indicator\",\"/edit/indicatorSection/programIndicator\":\"/programs.html#create_${objectType}\",\"/edit/indicatorSection/programIndicatorGroup\":\"/programs.html#create_${objectType}\",\"/list/organisationUnitSection/organisationUnitLevel\":\"/metadata.html#name_organisation_unit_level\",\"/list/organisationUnitSection\":\"/metadata.html#manage_organisation_unit\",\"organisationUnitSection/hierarchy\":\"/metadata.html#move_organisation_unit\",\"/list/programSection/trackedEntity\":\"/programs.html#configure_tracked_entity\",\"/list/programSection/programRuleVariable\":\"/programs.html#configure_program_rule\",\"/list/programSection/program/\":\"/programs.html#configure_programs_in_maintenance_app\",\"/list/programSection/${objectType}\":\"/programs.html#configure_${objectType}\",\"/list/programSection\":\"/programs.html#configure_programs_in_maintenance_app\",\"/edit/programSection/program/\":\"/programs.html#configure_programs_in_maintenance_app\",\"/edit/programSection/trackedEntityType\":\"/programs.html#create_tracked_entity\",\"/edit/programSection/${objectType}\":\"/programs.html#create_${objectType}\",\"/list/validationSection\":\"/metadata.html#manage_validation_rule\",\"/edit/validationSection/validationNotificationTemplate\":\"/metadata.html#create_validation_notification\",\"/edit/otherSection/attribute\":\"/metadata.html#create-or-edit-an-attribute\",\"/list/otherSection/optionGroup\":\"/metadata.html#create_option_group\",\"/list/otherSection/optionGroupSet\":\"/metadata.html#create_option_group_set\",\"/list/otherSection/legendSet\":\"/metadata.html#manage_legend\",\"/edit/otherSection/legendSet\":\"/metadata.html#create_legend\",\"/list/otherSection/predictorGroup\":\"/metadata.html#create_predictor_group\",\"/list/otherSection/pushAnalysis\":\"/metadata.html#manage_push_report\",\"/edit/otherSection/pushAnalysis\":\"/metadata.html#manage_push_report\",\"/list/otherSection/externalMapLayer\":\"/metadata.html#manage_external_maplayer\",\"/list/otherSection/locale\":\"/metadata.html#maintenance_locale_management\",\"/edit/otherSection/locale\":\"/metadata.html#maintenance_locale_management\",\"/list/otherSection/sqlView\":\"/metadata.html#maintenance_sql_view\",\"/edit/otherSection/sqlView\":\"/metadata.html#maintenance_sql_view\",\"/edit/\":\"/metadata.html#create_${objectType}\",\"/list/\":\"/metadata.html#manage_${objectType}\"}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config/inlinehelp-mapping.json\n// module id = 3357\n// module chunks = 0 1 5 6 7 8 10","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport addD2Context from 'd2-ui/lib/component-helpers/addD2Context';\nimport Heading from 'd2-ui/lib/headings/Heading.component';\nimport HelpLink from '../List/HelpLink.component';\nimport BackButton from './BackButton.component';\nimport { goToAndScrollUp } from '../router-utils';\n\nfunction FormHeading({ level, schema, children, groupName, isDirtyHandler, skipTranslation, ...props }, context) {\n return (\n <Heading {...props} level={level}>\n <BackButton\n onClick={() => goToAndScrollUp(`/list/${groupName}/${schema}`)}\n iconStyle={{ top: 3 }}\n isDirtyHandler={isDirtyHandler}\n />\n {skipTranslation ? children : context.d2.i18n.getTranslation(children)}\n {schema && (<HelpLink schema={schema} />)}\n </Heading>\n );\n}\n\nFormHeading.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.array,\n ]),\n level: PropTypes.number,\n isDirtyHandler: PropTypes.func,\n schema: PropTypes.string.isRequired,\n groupName: PropTypes.string.isRequired,\n skipTranslation: PropTypes.bool,\n};\n\nFormHeading.defaultProps = {\n isDirtyHandler: () => {},\n level: 2,\n children: '',\n skipTranslation: false,\n};\n\nexport default addD2Context(FormHeading);\n\n\n\n// WEBPACK FOOTER //\n// ./src/EditModel/FormHeading.js","import React from 'react';\nimport IconButton from 'material-ui/IconButton/IconButton';\nimport addD2Context from 'd2-ui/lib/component-helpers/addD2Context';\nimport modelToEditStore from '../EditModel/modelToEditStore';\n\nfunction BackButton(props, context) {\n const { tooltip, onClick, isDirtyHandler = modelToEditStore.getState.bind(modelToEditStore), ...otherProps } = props;\n const onClickWithConfirm = (...params) => {\n const isDirty = isDirtyHandler && isDirtyHandler() && isDirtyHandler().dirty;\n\n if (!isDirty) {\n onClick(...params);\n } else if (\n // eslint-disable-next-line no-restricted-globals\n confirm(context.d2.i18n.getTranslation('abandon_unsaved_changes'))\n ) {\n onClick(...params);\n }\n };\n\n return (\n <IconButton\n tooltip={tooltip || context.d2.i18n.getTranslation('back')}\n tooltipPosition=\"bottom-right\"\n onClick={onClickWithConfirm}\n {...otherProps}\n iconClassName=\"material-icons\"\n >\n \n </IconButton>\n );\n}\nBackButton.propTypes = {\n tooltip: React.PropTypes.string,\n};\n\nexport default addD2Context(BackButton);\n\n\n\n// WEBPACK FOOTER //\n// ./src/EditModel/BackButton.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Paper from 'material-ui/Paper/Paper';\nimport RaisedButton from 'material-ui/RaisedButton';\nimport Popover from 'material-ui/Popover';\nimport Menu from 'material-ui/Menu';\nimport MenuItem from 'material-ui/MenuItem';\nimport HardwareKeyboardArrowDown from 'material-ui/svg-icons/hardware/keyboard-arrow-down';\nimport FormHeading from '../EditModel/FormHeading';\nimport { goToRoute } from '../router-utils';\nimport LoadingMask from '../loading-mask/LoadingMask.component';\nimport snackActions from '../Snackbar/snack.actions';\n\nconst backToList = () => {\n goToRoute('list/otherSection/sqlView');\n};\n\nconst formatCellValue = (cell) => {\n if (cell === null) {\n return null\n }\n\n if (typeof cell === 'object') {\n return JSON.stringify(cell, null, 2)\n }\n\n return String(cell)\n}\n\nconst styles = {\n menuItem: {\n paddingLeft: '1.5rem',\n paddingRight: '1.5rem',\n }\n}\n\nclass SqlView extends Component {\n constructor(props, context) {\n super(props, context);\n this.state = {\n listGrid: null,\n downloadMenuOpen: false,\n downloadMenuAnchor: null,\n };\n }\n\n componentDidMount() {\n this.getSqlView();\n }\n\n async getSqlView() {\n const { d2 } = this.context;\n const { params: { modelId } } = this.props;\n const url = `sqlViews/${modelId}/data`;\n const queryParams = { paging: false };\n\n try {\n const { listGrid } = await d2.Api.getApi().get(url, queryParams);\n this.setState({ listGrid });\n } catch (error) {\n console.error(error)\n backToList();\n snackActions.show({ message: d2.i18n.getTranslation('sql_query_error'), action: 'ok' });\n }\n }\n\n openFileLink(file) {\n const { params: { modelId } } = this.props;\n this.closeDownloadMenu();\n window.open(`../api/sqlViews/${modelId}/${file}`, '_blank');\n }\n\n openDownloadMenu = (event) => {\n this.setState({\n downloadMenuOpen: true,\n downloadMenuAnchor: event.currentTarget,\n });\n }\n\n closeDownloadMenu = () => {\n this.setState({\n downloadMenuOpen: false,\n });\n }\n\n renderHeader() {\n const { title } = this.state.listGrid;\n const { d2 } = this.context;\n const headerText = `${d2.i18n.getTranslation('view_data_for')} \"${title}\"`;\n return (\n <div className=\"sql-view__header\">\n <FormHeading\n level={1}\n groupName=\"otherSection\"\n schema=\"sqlView\"\n skipTranslation\n >\n {headerText}\n </FormHeading>\n {this.renderDropDownButton()}\n </div>\n );\n }\n\n renderDropDownButton() {\n const { d2 } = this.context;\n return (\n <div className=\"sql-view__dropdown-button\">\n <RaisedButton\n onClick={this.openDownloadMenu}\n className=\"sql-view__download-btn\"\n labelPosition=\"before\"\n primary\n icon={<HardwareKeyboardArrowDown />}\n label={d2.i18n.getTranslation('download_as')}\n />\n <Popover\n open={this.state.downloadMenuOpen}\n anchorEl={this.state.downloadMenuAnchor}\n anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}\n targetOrigin={{ horizontal: 'right', vertical: 'top' }}\n onRequestClose={this.closeDownloadMenu}\n >\n <Menu>\n { this.renderDropDownMenuItems() }\n </Menu>\n </Popover>\n </div>\n );\n }\n\n renderDropDownMenuItems() {\n const { d2 } = this.context;\n return [\n { label: 'excel', file: 'data.xls' },\n { label: 'csv', file: 'data.csv' },\n { label: 'pdf', file: 'data.pdf' },\n { label: 'html', file: 'data.html+css' },\n { label: 'xml', file: 'data.xml' },\n { label: 'json', file: 'data.json' },\n ].map(({ label, file }) => (\n <MenuItem\n key={label}\n style={styles.menuItem}\n primaryText={d2.i18n.getTranslation(label)}\n onClick={() => this.openFileLink(file)} // eslint-disable-line react/jsx-no-bind\n />\n ));\n }\n\n /* eslint-disable react/no-array-index-key */\n renderCell = (cell, index) => {\n return <td key={`cell${index}`}>{formatCellValue(cell)}</td>;\n };\n\n renderRow = (row, index) => (\n <tr key={`row${index}`}>{row.map(this.renderCell)}</tr>\n );\n /* eslint-enable react/no-array-index-key */\n\n renderTable() {\n const { listGrid: { headers, rows } } = this.state;\n return (\n <table className=\"sql-view__table\">\n <thead>\n <tr>\n {headers.map(({ name }) => <th key={name}>{name}</th>)}\n </tr>\n </thead>\n <tbody>\n {rows.map(this.renderRow)}\n </tbody>\n </table>\n );\n }\n\n render() {\n if (!this.state.listGrid) {\n return <LoadingMask />;\n }\n\n return (\n <div>\n {this.renderHeader()}\n <Paper className=\"sql-view__content\">\n {this.renderTable()}\n </Paper>\n </div>\n );\n }\n}\nSqlView.propTypes = {\n params: PropTypes.shape({\n modelId: PropTypes.string,\n }).isRequired,\n};\n\nSqlView.contextTypes = {\n d2: PropTypes.object,\n};\n\nexport default SqlView;\n\n\n\n// WEBPACK FOOTER //\n// ./src/SqlView/SqlView.component.js"],"sourceRoot":""}