@gravityforms/components
Version:
UI components for use in Gravity Forms development. Both React and vanilla js flavors.
205 lines (198 loc) • 15.2 kB
JavaScript
if ( window.gformComponentDistPath ) {
__webpack_public_path__ = window.gformComponentDistPath;
}
import ReactAddress from '../../../react/admin/modules/Address';
import Alert, { alertTemplate } from '../../../html/admin/elements/Alert';
import ReactAlert from '../../../react/admin/modules/Alert';
import ReactAvatar from '../../../react/admin/modules/Avatar';
import ReactAvatarGroup from '../../../react/admin/modules/AvatarGroup';
import ReactBox from '../../../react/admin/elements/Box';
import ReactBrandedButton from '../../../react/admin/elements/Button/BrandedButton';
import ReactBrandedLink from '../../../react/admin/elements/Link/BrandedLink';
import Button, { buttonTemplate } from '../../../html/admin/elements/Button';
import ReactButton from '../../../react/admin/elements/Button';
import ReactCalendar from '../../../react/admin/modules/Calendar';
import ReactChart from '../../../react/admin/modules/Chart';
import ReactCheckbox from '../../../react/admin/elements/Checkbox';
import ReactColorPicker from '../../../react/admin/modules/ColorPicker';
import ReactDataGrid from '../../../react/admin/modules/DataGrid';
import ReactDescriptionList from '../../../react/admin/elements/DescriptionList';
import Dialog, { dialogTemplate } from '../../../html/admin/modules/Dialog';
import ReactDialog from '../../../react/admin/modules/Dialog';
import ReactDotIndicator from '../../../react/admin/modules/Indicators/DotIndicator';
import Dropdown, { dropdownTemplate, dropdownListItems } from '../../../html/admin/elements/Dropdown';
import ReactDropdown from '../../../react/admin/modules/Dropdown';
import ReactDroplist from '../../../react/admin/modules/Droplist';
import ReactFileUpload from '../../../react/admin/elements/FileUpload';
import Flyout, { flyoutTemplate } from '../../../html/admin/modules/Flyout';
import ReactFlyout from '../../../react/admin/modules/Flyout';
import ReactFormTemplateCard from '../../../react/admin/modules/Cards/FormTemplateCard';
import ReactGravatar from '../../../react/admin/modules/Gravatar';
import ReactGrid from '../../../react/admin/elements/Grid';
import Heading, { headingTemplate } from '../../../html/admin/elements/Heading';
import ReactHeading from '../../../react/admin/elements/Heading';
import HelpText, { helpTextTemplate } from '../../../html/admin/elements/HelpText';
import ReactHelpText from '../../../react/admin/elements/HelpText';
import ReactIcon from '../../../react/admin/elements/Icon';
import ReactIconIndicator from '../../../react/admin/modules/Indicators/IconIndicator';
import ReactImage from '../../../react/admin/elements/Image';
import Input, { inputTemplate } from '../../../html/admin/elements/Input';
import ReactInput from '../../../react/admin/elements/Input';
import ReactInputGroup from '../../../react/admin/modules/InputGroup';
import ReactIntegrationCard from '../../../react/admin/modules/Cards/IntegrationCard';
import Label, { labelTemplate } from '../../../html/admin/elements/Label';
import ReactLabel from '../../../react/admin/elements/Label';
import Link, { linkTemplate } from '../../../html/admin/elements/Link';
import ReactLink from '../../../react/admin/elements/Link';
import ReactList from '../../../react/admin/modules/List';
import Loader, { loaderTemplate } from '../../../html/admin/elements/Loader';
import ReactMetaBox from '../../../react/admin/modules/MetaBox';
import ReactMetricCard from '../../../react/admin/modules/Cards/MetricCard';
import ReactModularSidebar from '../../../react/admin/modules/Layouts/ModularSidebar';
import ReactNavBar from '../../../react/admin/modules/NavBar';
import ReactPagination from '../../../react/admin/modules/Pagination';
import ReactPhone from '../../../react/admin/modules/Phone';
import ReactPill from '../../../react/admin/elements/Pill';
import ReactPlaceholder from '../../../react/admin/modules/Loaders/Placeholder';
import ReactRadio from '../../../react/admin/elements/Radio';
import ReactRange from '../../../react/admin/elements/Range';
import ReactRepeater from '../../../react/admin/modules/Repeater';
import ReactRightSidebar from '../../../react/admin/modules/Layouts/RightSidebar';
import ReactRingLoader from '../../../react/admin/modules/Loaders/RingLoader';
import ReactRouterNavBar from '../../../react/admin/modules/RouterNavBar';
import Select, { selectTemplate } from '../../../html/admin/elements/Select';
import ReactSelect from '../../../react/admin/elements/Select';
import ReactSnackBar from '../../../react/admin/modules/SnackBar';
import StackedIcon, { stackedIconTemplate } from '../../../html/admin/elements/StackedIcon';
import StatusIndicator, { statusIndicatorTemplate } from '../../../html/admin/elements/StatusIndicator';
import ReactStatusIndicator from '../../../react/admin/elements/StatusIndicator';
import ReactSteps from '../../../react/admin/modules/Steps';
import ReactSwatch from '../../../react/admin/modules/Swatch';
import Table from '../../../html/admin/modules/Table';
import ReactTabs from '../../../react/admin/modules/Tabs';
import ReactTag from '../../../react/admin/elements/Tag';
import Text, { textTemplate } from '../../../html/admin/elements/Text';
import ReactText from '../../../react/admin/elements/Text';
import Textarea, { textareaTemplate } from '../../../html/admin/elements/Textarea';
import ReactTextarea from '../../../react/admin/elements/Textarea';
import Toggle, { toggleTemplate } from '../../../html/admin/elements/Toggle';
import ReactToggle from '../../../react/admin/elements/Toggle';
import ReactTooltip from '../../../react/admin/modules/Tooltip';
import ReactVidyardVideo from '../../../react/admin/modules/Videos/VidyardVideo';
const getGlobalContainer = ( rootNamespace ) => {
if ( ! window[ rootNamespace ] ) window[ rootNamespace ] = {};
if ( ! window[ rootNamespace ].components ) window[ rootNamespace ].components = {};
if ( ! window[ rootNamespace ].components.admin ) window[ rootNamespace ].components.admin = {};
return window[ rootNamespace ].components.admin;
};
const initModules = (container) => {
container.html = container.html || { elements: {}, modules: {} };
container.react = container.react || { elements: {}, modules: {} };
};
const init = () => {
const rootNamespace = window.gformComponentNamespace || 'gform';
const container = getGlobalContainer( rootNamespace );
initModules( container );
window[ rootNamespace ].components.admin.react.modules.Address = ReactAddress;
window[ rootNamespace ].components.admin.html.elements.Alert = Alert;
window[ rootNamespace ].components.admin.html.elements.Alert.alertTemplate = alertTemplate;
window[ rootNamespace ].components.admin.react.modules.Alert = ReactAlert;
window[ rootNamespace ].components.admin.react.modules.Avatar = ReactAvatar;
window[ rootNamespace ].components.admin.react.modules.AvatarGroup = ReactAvatarGroup;
window[ rootNamespace ].components.admin.react.elements.Box = ReactBox;
window[ rootNamespace ].components.admin.react.elements.Button = ReactButton;
window[ rootNamespace ].components.admin.react.elements.Button.BrandedButton = ReactBrandedButton;
window[ rootNamespace ].components.admin.react.elements.Link = ReactLink;
window[ rootNamespace ].components.admin.react.elements.Link.BrandedLink = ReactBrandedLink;
window[ rootNamespace ].components.admin.html.elements.Button = Button;
window[ rootNamespace ].components.admin.html.elements.Button.buttonTemplate = buttonTemplate;
window[ rootNamespace ].components.admin.react.modules.Calendar = ReactCalendar;
window[ rootNamespace ].components.admin.react.modules.Chart = ReactChart;
window[ rootNamespace ].components.admin.react.elements.Checkbox = ReactCheckbox;
window[ rootNamespace ].components.admin.react.modules.ColorPicker = ReactColorPicker;
window[ rootNamespace ].components.admin.react.modules.DataGrid = ReactDataGrid;
window[ rootNamespace ].components.admin.react.elements.DescriptionList = ReactDescriptionList;
window[ rootNamespace ].components.admin.html.modules.Dialog = Dialog;
window[ rootNamespace ].components.admin.html.modules.Dialog.dialogTemplate = dialogTemplate;
window[ rootNamespace ].components.admin.react.modules.Dialog = ReactDialog;
window[ rootNamespace ].components.admin.react.modules.Indicators = {};
window[ rootNamespace ].components.admin.react.modules.Indicators.DotIndicator = ReactDotIndicator;
window[ rootNamespace ].components.admin.html.elements.Dropdown = Dropdown;
window[ rootNamespace ].components.admin.html.elements.Dropdown.dropdownTemplate = dropdownTemplate;
window[ rootNamespace ].components.admin.html.elements.Dropdown.dropdownListItems = dropdownListItems;
window[ rootNamespace ].components.admin.react.modules.Dropdown = ReactDropdown;
window[ rootNamespace ].components.admin.react.modules.Droplist = ReactDroplist;
window[ rootNamespace ].components.admin.react.elements.FileUpload = ReactFileUpload;
window[ rootNamespace ].components.admin.html.modules.Flyout = Flyout;
window[ rootNamespace ].components.admin.html.modules.Flyout.flyoutTemplate = flyoutTemplate;
window[ rootNamespace ].components.admin.react.modules.Flyout = ReactFlyout;
window[ rootNamespace ].components.admin.react.modules.Cards = {};
window[ rootNamespace ].components.admin.react.modules.Cards.FormTemplateCard = ReactFormTemplateCard;
window[ rootNamespace ].components.admin.react.modules.Gravatar = ReactGravatar;
window[ rootNamespace ].components.admin.react.elements.Grid = ReactGrid;
window[ rootNamespace ].components.admin.html.elements.Heading = Heading;
window[ rootNamespace ].components.admin.html.elements.Heading.headingTemplate = headingTemplate;
window[ rootNamespace ].components.admin.react.elements.Heading = ReactHeading;
window[ rootNamespace ].components.admin.html.elements.HelpText = HelpText;
window[ rootNamespace ].components.admin.html.elements.HelpText.helpTextTemplate = helpTextTemplate;
window[ rootNamespace ].components.admin.react.elements.HelpText = ReactHelpText;
window[ rootNamespace ].components.admin.react.elements.Icon = ReactIcon;
window[ rootNamespace ].components.admin.react.modules.Indicators.IconIndicator = ReactIconIndicator;
window[ rootNamespace ].components.admin.react.elements.Image = ReactImage;
window[ rootNamespace ].components.admin.html.elements.Input = Input;
window[ rootNamespace ].components.admin.html.elements.Input.inputTemplate = inputTemplate;
window[ rootNamespace ].components.admin.react.elements.Input = ReactInput;
window[ rootNamespace ].components.admin.react.modules.InputGroup = ReactInputGroup;
window[ rootNamespace ].components.admin.react.modules.Cards.IntegrationCard = ReactIntegrationCard;
window[ rootNamespace ].components.admin.html.elements.Label = Label;
window[ rootNamespace ].components.admin.html.elements.Label.labelTemplate = labelTemplate;
window[ rootNamespace ].components.admin.react.elements.Label = ReactLabel;
window[ rootNamespace ].components.admin.html.elements.Link = Link;
window[ rootNamespace ].components.admin.html.elements.Link.linkTemplate = linkTemplate;
window[ rootNamespace ].components.admin.react.modules.List = ReactList;
window[ rootNamespace ].components.admin.html.elements.Loader = Loader;
window[ rootNamespace ].components.admin.html.elements.Loader.loaderTemplate = loaderTemplate;
window[ rootNamespace ].components.admin.react.modules.MetaBox = ReactMetaBox;
window[ rootNamespace ].components.admin.react.modules.Cards.MetricCard = ReactMetricCard;
window[ rootNamespace ].components.admin.react.modules.Layouts = {};
window[ rootNamespace ].components.admin.react.modules.Layouts.ModularSidebar = ReactModularSidebar;
window[ rootNamespace ].components.admin.react.modules.NavBar = ReactNavBar;
window[ rootNamespace ].components.admin.react.modules.Pagination = ReactPagination;
window[ rootNamespace ].components.admin.react.modules.Phone = ReactPhone;
window[ rootNamespace ].components.admin.react.elements.Pill = ReactPill;
window[ rootNamespace ].components.admin.react.modules.Loaders = {};
window[ rootNamespace ].components.admin.react.modules.Loaders.Placeholder = ReactPlaceholder;
window[ rootNamespace ].components.admin.react.elements.Radio = ReactRadio;
window[ rootNamespace ].components.admin.react.elements.Range = ReactRange;
window[ rootNamespace ].components.admin.react.modules.Repeater = ReactRepeater;
window[ rootNamespace ].components.admin.react.modules.Layouts.RightSidebar = ReactRightSidebar;
window[ rootNamespace ].components.admin.react.modules.Loaders.RingLoader = ReactRingLoader;
window[ rootNamespace ].components.admin.react.modules.RouterNavBar = ReactRouterNavBar;
window[ rootNamespace ].components.admin.html.elements.Select = Select;
window[ rootNamespace ].components.admin.html.elements.Select.selectTemplate = selectTemplate;
window[ rootNamespace ].components.admin.react.elements.Select = ReactSelect;
window[ rootNamespace ].components.admin.react.modules.SnackBar = ReactSnackBar;
window[ rootNamespace ].components.admin.html.elements.StackedIcon = StackedIcon;
window[ rootNamespace ].components.admin.html.elements.StackedIcon.stackedIconTemplate = stackedIconTemplate;
window[ rootNamespace ].components.admin.html.elements.StatusIndicator = StatusIndicator;
window[ rootNamespace ].components.admin.html.elements.StatusIndicator.statusIndicatorTemplate = statusIndicatorTemplate;
window[ rootNamespace ].components.admin.react.elements.StatusIndicator = ReactStatusIndicator;
window[ rootNamespace ].components.admin.react.modules.Steps = ReactSteps;
window[ rootNamespace ].components.admin.react.modules.Swatch = ReactSwatch;
window[ rootNamespace ].components.admin.html.modules.Table = Table;
window[ rootNamespace ].components.admin.react.modules.Tabs = ReactTabs;
window[ rootNamespace ].components.admin.react.elements.Tag = ReactTag;
window[ rootNamespace ].components.admin.html.elements.Text = Text;
window[ rootNamespace ].components.admin.html.elements.Text.textTemplate = textTemplate;
window[ rootNamespace ].components.admin.react.elements.Text = ReactText;
window[ rootNamespace ].components.admin.html.elements.Textarea = Textarea;
window[ rootNamespace ].components.admin.html.elements.Textarea.textareaTemplate = textareaTemplate;
window[ rootNamespace ].components.admin.react.elements.Textarea = ReactTextarea;
window[ rootNamespace ].components.admin.html.elements.Toggle = Toggle;
window[ rootNamespace ].components.admin.html.elements.Toggle.toggleTemplate = toggleTemplate;
window[ rootNamespace ].components.admin.react.elements.Toggle = ReactToggle;
window[ rootNamespace ].components.admin.react.modules.Tooltip = ReactTooltip;
window[ rootNamespace ].components.admin.react.modules.Videos = {};
window[ rootNamespace ].components.admin.react.modules.Videos.VidyardVideo = ReactVidyardVideo;
};
init();