-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-system-js-b2f202bf68d6fe007a1b.js.map
1 lines (1 loc) · 28.9 KB
/
component---src-pages-system-js-b2f202bf68d6fe007a1b.js.map
1
{"version":3,"file":"component---src-pages-system-js-b2f202bf68d6fe007a1b.js","mappings":"2QAGIA,GAAgB,IAAAC,KAAI,CAAC,WAAY,IAAK,IAAK,OAAO,SAAUC,GAC9D,OAAOA,EAAMC,MAAMC,IAAIC,MAAMC,aAAc,IAAAL,KAAI,CAAC,cAAe,MAAM,QAAeC,EAAMC,MAAMC,IAAIC,MAAMC,WAAYJ,EAAMC,WAC3H,SAAUD,GACX,OAAOA,EAAMC,MAAMC,IAAIC,MAAME,QAAS,IAAAN,KAAI,CAAC,SAAU,MAAM,QAAeC,EAAMC,MAAMC,IAAIC,MAAME,MAAOL,EAAMC,WAC5G,SAAUD,GACX,OAAOA,EAAMC,MAAMC,IAAIC,MAAMG,UAE3BC,EAAY,yBAAsB,CACpCC,YAAa,YACbC,YAAa,gBAFC,CAGb,CAAC,GAAI,IAAK,IAAK,IAAK,IAAK,MAAe,SAAUT,GACnD,OAAQA,EAAMU,QAAUV,EAAMW,UAAYX,EAAMC,MAAMC,IAAIC,OAASL,KAClE,SAAUE,GACX,OAAOA,EAAMW,UAAYX,EAAMC,MAAMC,IAAIS,YACxC,SAAUX,GACX,OAAOA,EAAMC,MAAMC,IAAII,UClBzB,SAASM,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,IAK3B,OAAOL,IAGOS,MAAMC,KAAMR,WDK9BV,EAAUmB,aAAe,GACzBb,OAAOc,eAAepB,EAAUmB,aAAc,KCqB9C,IAAIE,GAAmB,I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jBJ,GAAeA,MACd,c,oDC5ErB,UAhCkB,WAChB,OACE,4CAEE,gBAAC,IAAD,CACEJ,OAAO,GACPC,YAAY,OACZC,QAAS,CACP,CACEuB,SAAU,WACVC,WAAY,GACZe,YAAY,EACZb,OAAQ,SAACI,GAAD,OAAU,oCAAIA,EAAKU,SAAT,QAGtBC,MAAO,SAACC,GAAD,OAAOA,GACdzC,UAAW,CACTiB,OAAQ","sources":["webpack://gatsby-starter-hello-world/./node_modules/grommet/es6/components/Tab/StyledTab.js","webpack://gatsby-starter-hello-world/./node_modules/grommet/es6/components/Tab/Tab.js","webpack://gatsby-starter-hello-world/./node_modules/grommet/es6/components/Tabs/StyledTabs.js","webpack://gatsby-starter-hello-world/./node_modules/grommet/es6/components/Tabs/Tabs.js","webpack://gatsby-starter-hello-world/./node_modules/grommet/es6/components/Tabs/TabsContext.js","webpack://gatsby-starter-hello-world/./src/containers/DataGrid/index.js","webpack://gatsby-starter-hello-world/./src/pages/system.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { genericStyles, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar tabHoverStyle = css([\"&:hover{\", \" \", \" \", \";}\"], function (props) {\n return props.theme.tab.hover.background && css([\"background:\", \";\"], normalizeColor(props.theme.tab.hover.background, props.theme));\n}, function (props) {\n return props.theme.tab.hover.color && css([\"color:\", \";\"], normalizeColor(props.theme.tab.hover.color, props.theme));\n}, function (props) {\n return props.theme.tab.hover.extend;\n});\nvar StyledTab = styled.div.withConfig({\n displayName: \"StyledTab\",\n componentId: \"sc-1nnwnsb-0\"\n})([\"\", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return !props.plain && !props.disabled && props.theme.tab.hover && tabHoverStyle;\n}, function (props) {\n return props.disabled && props.theme.tab.disabled;\n}, function (props) {\n return props.theme.tab.extend;\n});\nStyledTab.defaultProps = {};\nObject.setPrototypeOf(StyledTab.defaultProps, defaultProps);\nexport { StyledTab };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef, useContext, useEffect, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Text } from '../Text';\nimport { TabsContext } from '../Tabs/TabsContext';\nimport { normalizeColor } from '../../utils';\nimport { StyledTab } from './StyledTab';\nvar Tab = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var activeProp = _ref.active,\n disabled = _ref.disabled,\n children = _ref.children,\n icon = _ref.icon,\n plain = _ref.plain,\n title = _ref.title,\n onMouseOver = _ref.onMouseOver,\n onMouseOut = _ref.onMouseOut,\n reverse = _ref.reverse,\n rest = _objectWithoutPropertiesLoose(_ref, [\"active\", \"disabled\", \"children\", \"icon\", \"plain\", \"title\", \"onMouseOver\", \"onMouseOut\", \"reverse\"]);\n\n var _useContext = useContext(TabsContext),\n active = _useContext.active,\n activeIndex = _useContext.activeIndex,\n onActivate = _useContext.onActivate,\n setActiveContent = _useContext.setActiveContent,\n setActiveTitle = _useContext.setActiveTitle;\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n var _useState = useState(undefined),\n over = _useState[0],\n setOver = _useState[1];\n\n var _useState2 = useState(undefined),\n focus = _useState2[0],\n setFocus = _useState2[1];\n\n var normalizedTitle = title;\n var tabStyles = {};\n useEffect(function () {\n if (active) {\n setActiveContent(children);\n var activeTitle = typeof title === 'string' ? title : activeIndex + 1;\n setActiveTitle(activeTitle);\n }\n }, [active, activeIndex, children, setActiveContent, setActiveTitle, title]);\n\n var onMouseOverTab = function onMouseOverTab(event) {\n setOver(true);\n\n if (onMouseOver) {\n onMouseOver(event);\n }\n };\n\n var onMouseOutTab = function onMouseOutTab(event) {\n setOver(undefined);\n\n if (onMouseOut) {\n onMouseOut(event);\n }\n };\n\n var onClickTab = function onClickTab(event) {\n if (event) {\n event.preventDefault();\n }\n\n onActivate();\n };\n\n if (active && disabled) {\n console.warn( // eslint-disable-next-line max-len\n \"Warning: Tab props 'active' and 'disabled' have both been set to TRUE on the same Tab resulting in an interesting Tab state. Is this your intent?\");\n }\n\n if (!plain) {\n if (typeof title !== 'string') {\n normalizedTitle = title;\n } else if (active) {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, theme.tab.active, title);\n } else if (disabled && theme.tab.disabled) {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, theme.tab.disabled, title);\n } else {\n normalizedTitle = /*#__PURE__*/React.createElement(Text, {\n color: over ? theme.tab.hover.color : theme.tab.color\n }, title);\n }\n\n if (theme.tab.border) {\n var borderColor = theme.tab.border.color || theme.global.control.border.color;\n\n if (active) {\n borderColor = theme.tab.border.active.color || borderColor;\n } else if (disabled && theme.tab.border.disabled) {\n borderColor = theme.tab.border.disabled.color || borderColor;\n } else if (over) {\n borderColor = theme.tab.border.hover.color || borderColor;\n }\n\n borderColor = normalizeColor(borderColor, theme);\n tabStyles.border = {\n side: theme.tab.border.side,\n size: theme.tab.border.size,\n color: borderColor\n };\n }\n\n tabStyles.background = active ? theme.tab.active.background || theme.tab.background : theme.tab.background;\n tabStyles.pad = theme.tab.pad;\n tabStyles.margin = theme.tab.margin;\n } // needed to apply hover/active styles to the icon\n\n\n var renderIcon = function renderIcon(iconProp) {\n if (active) {\n return /*#__PURE__*/React.cloneElement(iconProp, _extends({}, theme.tab.active));\n }\n\n if (disabled) {\n return /*#__PURE__*/React.cloneElement(iconProp, _extends({}, theme.tab.disabled));\n }\n\n return /*#__PURE__*/React.cloneElement(iconProp, {\n color: over ? theme.tab.hover.color : theme.tab.color\n });\n };\n\n var normalizedIcon;\n\n if (icon) {\n normalizedIcon = renderIcon(icon);\n }\n\n var first = reverse ? normalizedTitle : normalizedIcon;\n var second = reverse ? normalizedIcon : normalizedTitle;\n var withIconStyles;\n\n if (first && second) {\n withIconStyles = {\n direction: 'row',\n align: 'center',\n justify: 'center',\n gap: 'small'\n };\n }\n\n return /*#__PURE__*/React.createElement(Button, _extends({\n ref: ref,\n plain: true,\n role: \"tab\",\n \"aria-selected\": active,\n \"aria-expanded\": active,\n disabled: disabled\n }, rest, {\n onClick: onClickTab,\n onMouseOver: onMouseOverTab,\n onMouseOut: onMouseOutTab,\n onFocus: function onFocus() {\n setFocus(true);\n if (onMouseOver) onMouseOver();\n },\n onBlur: function onBlur() {\n setFocus(undefined);\n if (onMouseOut) onMouseOut();\n } // ensure focus outline is not covered by hover styling\n // of adjacent tabs\n ,\n style: focus && {\n zIndex: 1\n }\n }), /*#__PURE__*/React.createElement(StyledTab, _extends({\n as: Box,\n disabled: disabled,\n plain: plain\n }, withIconStyles, tabStyles), first, second));\n});\nTab.displayName = 'Tab';\nTab.defaultProps = {};\nObject.setPrototypeOf(Tab.defaultProps, defaultProps);\nvar TabDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n TabDoc = require('./doc').doc(Tab); // eslint-disable-line global-require\n}\n\nvar TabWrapper = TabDoc || Tab;\nexport { TabWrapper as Tab };","var _FLEX_MAP;\n\nimport styled, { css } from 'styled-components';\nimport { genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar StyledTabsHeader = styled.div.withConfig({\n displayName: \"StyledTabs__StyledTabsHeader\",\n componentId: \"a4fwxl-0\"\n})([\"\", \";\"], function (props) {\n return props.theme.tabs.header.extend;\n});\nStyledTabsHeader.defaultProps = {};\nObject.setPrototypeOf(StyledTabsHeader.defaultProps, defaultProps);\nvar FLEX_MAP = (_FLEX_MAP = {}, _FLEX_MAP[true] = '1 1', _FLEX_MAP[false] = '0 0', _FLEX_MAP.grow = '1 0', _FLEX_MAP.shrink = '0 1', _FLEX_MAP);\nvar flexStyle = css([\"flex:\", \";\"], function (props) {\n return \"\" + FLEX_MAP[props.flex] + (props.flex !== true ? ' auto' : '');\n});\nvar StyledTabPanel = styled.div.withConfig({\n displayName: \"StyledTabs__StyledTabPanel\",\n componentId: \"a4fwxl-1\"\n})([\"min-height:0;\", \" \", \";\"], function (props) {\n return props.flex && flexStyle;\n}, function (props) {\n return props.theme.tabs.panel.extend;\n});\nStyledTabPanel.defaultProps = {};\nObject.setPrototypeOf(StyledTabPanel.defaultProps, defaultProps);\nvar StyledTabs = styled.div.withConfig({\n displayName: \"StyledTabs\",\n componentId: \"a4fwxl-2\"\n})([\"\", \" \", \";\"], genericStyles, function (props) {\n return props.theme.tabs.extend;\n});\nStyledTabs.defaultProps = {};\nObject.setPrototypeOf(StyledTabs.defaultProps, defaultProps);\nexport { StyledTabsHeader, StyledTabPanel, StyledTabs };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef, useContext, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { TabsContext } from './TabsContext';\nimport { StyledTabPanel, StyledTabs, StyledTabsHeader } from './StyledTabs';\nimport { normalizeColor } from '../../utils';\nvar Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var alignControls = _ref.alignControls,\n children = _ref.children,\n flex = _ref.flex,\n _ref$justify = _ref.justify,\n justify = _ref$justify === void 0 ? 'center' : _ref$justify,\n _ref$messages = _ref.messages,\n messages = _ref$messages === void 0 ? {\n tabContents: 'Tab Contents'\n } : _ref$messages,\n _ref$responsive = _ref.responsive,\n responsive = _ref$responsive === void 0 ? true : _ref$responsive,\n rest = _objectWithoutPropertiesLoose(_ref, [\"alignControls\", \"children\", \"flex\", \"justify\", \"messages\", \"responsive\"]);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var propsActiveIndex = rest.activeIndex,\n onActive = rest.onActive;\n\n var _useState = useState(rest.activeIndex || 0),\n activeIndex = _useState[0],\n setActiveIndex = _useState[1];\n\n var _useState2 = useState(),\n activeContent = _useState2[0],\n setActiveContent = _useState2[1];\n\n var _useState3 = useState(),\n activeTitle = _useState3[0],\n setActiveTitle = _useState3[1];\n\n if (activeIndex !== propsActiveIndex && propsActiveIndex !== undefined) {\n setActiveIndex(propsActiveIndex);\n }\n\n var activateTab = function activateTab(index) {\n if (propsActiveIndex === undefined) {\n setActiveIndex(index);\n }\n\n if (onActive) {\n onActive(index);\n }\n };\n /* eslint-disable no-param-reassign */\n\n\n delete rest.activeIndex;\n delete rest.onActive;\n /* eslint-enable no-param-reassign */\n\n var tabs = React.Children.map(children, function (child, index) {\n return /*#__PURE__*/React.createElement(TabsContext.Provider, {\n value: {\n activeIndex: activeIndex,\n active: activeIndex === index,\n onActivate: function onActivate() {\n return activateTab(index);\n },\n setActiveContent: setActiveContent,\n setActiveTitle: setActiveTitle\n }\n }, child ?\n /*#__PURE__*/\n // cloneElement is needed for backward compatibility with custom\n // styled components that rely on props.active. We should reassess\n // if it is still necessary in our next major release.\n React.cloneElement(child, {\n active: activeIndex === index\n }) : child);\n });\n var tabsHeaderStyles = {};\n\n if (theme.tabs.header && theme.tabs.header.border) {\n var borderColor = theme.tabs.header.border.color || theme.global.control.border.color;\n borderColor = normalizeColor(borderColor, theme);\n tabsHeaderStyles.border = {\n side: theme.tabs.header.border.side,\n size: theme.tabs.header.border.size,\n style: theme.tabs.header.border.style,\n color: borderColor\n };\n }\n\n var tabContentTitle = (activeTitle || '') + \" \" + messages.tabContents;\n return /*#__PURE__*/React.createElement(StyledTabs, _extends({\n ref: ref,\n as: Box,\n role: \"tablist\",\n flex: flex,\n responsive: responsive\n }, rest, {\n background: theme.tabs.background\n }), /*#__PURE__*/React.createElement(StyledTabsHeader, _extends({\n as: Box,\n direction: \"row\",\n justify: justify,\n alignSelf: alignControls,\n flex: false,\n wrap: true,\n background: theme.tabs.header.background,\n gap: theme.tabs.gap\n }, tabsHeaderStyles), tabs), /*#__PURE__*/React.createElement(StyledTabPanel, {\n flex: flex,\n \"aria-label\": tabContentTitle,\n role: \"tabpanel\"\n }, activeContent));\n});\nTabs.displayName = 'Tabs';\nvar TabsDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n TabsDoc = require('./doc').doc(Tabs); // eslint-disable-line global-require\n}\n\nvar TabsWrapper = TabsDoc || Tabs;\nexport { TabsWrapper as Tabs };","import React from 'react';\nexport var TabsContext = /*#__PURE__*/React.createContext({});","import React, { useCallback, useEffect, useState } from \"react\";\nimport { Close, Configure } from \"grommet-icons\";\nimport Modal from \"../../components/Modal\";\nimport {\n Tab,\n Tabs,\n Box,\n Anchor,\n DataTable,\n Text,\n ResponsiveContext,\n} from \"grommet\";\nimport { callCloud, crud } from \"../../library/parse\";\nimport CRUDForm from \"../CRUDForm\";\n\nconst Home = ({\n datasource,\n hideCRUDForm,\n suffix = \"\",\n objectClass,\n columns,\n fetchData,\n afterAction,\n}) => {\n const [activeModel, setActiveModel] = useState({});\n const [showFormModal, setShowFormModal] = useState(false);\n const [mode, setMode] = useState(\"read\");\n const [stores, setStores] = useState(datasource || []);\n const [dtColumn, setDtColumn] = useState([]);\n const size = React.useContext(ResponsiveContext);\n const loadData = useCallback(async () => {\n return (\n fetchData &&\n setStores(await callCloud(fetchData.action, fetchData.params))\n );\n }, [fetchData]);\n\n useEffect(() => {\n if (datasource) {\n setStores(datasource);\n } else {\n loadData();\n }\n }, [loadData, datasource]);\n\n useEffect(() => {\n const newDtColumn = columns.map((e) => ({\n property: e.property,\n header: <Text> {e.headerText}</Text>,\n primary: e.primary,\n render: e.render,\n }));\n\n !hideCRUDForm &&\n newDtColumn.push({\n property: \"objectId\",\n header: (\n <Anchor\n onClick={() => {\n setActiveModel({});\n setMode(\"create\");\n setShowFormModal(true);\n }}\n >\n Add {objectClass}\n </Anchor>\n ),\n render: (datum) => (\n <>\n <Configure\n onClick={() => {\n setActiveModel(datum);\n setMode(\"update\");\n setShowFormModal(true);\n }}\n style={{ cursor: \"pointer\" }}\n />\n <Close\n onClick={() => {\n setActiveModel(datum);\n setMode(\"delete\");\n setShowFormModal(true);\n }}\n style={{ cursor: \"pointer\" }}\n />\n </>\n ),\n });\n setDtColumn(newDtColumn);\n }, [hideCRUDForm, columns]);\n\n return (\n <>\n <Box>\n {stores.length} {objectClass}\n <DataTable columns={dtColumn} data={stores.map((e) => e.toJSON())} />\n </Box>\n {showFormModal && (\n <Modal full={true} onClose={() => setShowFormModal(false)}>\n <Tabs>\n <Tab title=\"Information\">\n <CRUDForm\n formConfig={{ config: columns }}\n mode={mode}\n model={activeModel}\n onClick={(mode, model) => {\n crud(objectClass, model, mode, suffix);\n setTimeout(() => {\n loadData();\n setShowFormModal(false);\n afterAction && afterAction();\n }, 1000);\n }}\n />\n </Tab>\n </Tabs>\n </Modal>\n )}\n </>\n );\n};\n\nexport default Home;\n","import React from \"react\";\nimport DataGrid from \"../containers/DataGrid\";\n\nconst Component = () => {\n return (\n <>\n dashboard\n <DataGrid\n suffix=\"\"\n objectClass=\"User\"\n columns={[\n {\n property: \"objectId\",\n headerText: \"\",\n primaryKey: true,\n render: (data) => <> {data.fullName} </>,\n },\n ]}\n query={(q) => q}\n fetchData={{\n action: \"findUser\",\n // params: {\n // query: {\n // storeId: {\n // f: \"equalTo\",\n // v: id,\n // },\n // },\n // },\n }}\n />\n </>\n );\n};\n\nexport default Component;\n"],"names":["tabHoverStyle","css","props","theme","tab","hover","background","color","extend","StyledTab","displayName","componentId","plain","disabled","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","defaultProps","setPrototypeOf","Tab","forwardRef","_ref","ref","active","children","icon","title","onMouseOver","onMouseOut","reverse","rest","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","_useContext","useContext","TabsContext","activeIndex","onActivate","setActiveContent","setActiveTitle","ThemeContext","_useState","useState","undefined","over","setOver","_useState2","focus","setFocus","normalizedTitle","tabStyles","useEffect","console","warn","Text","border","borderColor","global","control","side","size","pad","margin","normalizedIcon","iconProp","withIconStyles","first","second","direction","align","justify","gap","Button","role","onClick","event","preventDefault","onFocus","onBlur","style","zIndex","as","Box","TabWrapper","_FLEX_MAP","StyledTabsHeader","tabs","header","FLEX_MAP","grow","shrink","flexStyle","flex","StyledTabPanel","panel","StyledTabs","Tabs","alignControls","_ref$justify","_ref$messages","messages","tabContents","_ref$responsive","responsive","propsActiveIndex","onActive","setActiveIndex","activeContent","_useState3","activeTitle","child","index","value","activateTab","tabsHeaderStyles","tabContentTitle","alignSelf","wrap","TabsWrapper","datasource","hideCRUDForm","suffix","objectClass","columns","fetchData","afterAction","activeModel","setActiveModel","showFormModal","setShowFormModal","mode","setMode","stores","setStores","dtColumn","setDtColumn","loadData","React","ResponsiveContext","useCallback","callCloud","action","params","newDtColumn","map","e","property","headerText","primary","render","push","datum","cursor","data","toJSON","full","onClose","formConfig","config","model","crud","setTimeout","primaryKey","fullName","query","q"],"sourceRoot":""}