action-buttons
2 years ago
action-fields-map
2 years ago
action-modal
2 years ago
actions
2 years ago
block-conditions
2 years ago
blocks
2 years ago
components
2 years ago
context
2 years ago
dynamic.value
2 years ago
events
2 years ago
gateways
2 years ago
hooks
2 years ago
macros.button
2 years ago
migrations
2 years ago
preset
2 years ago
repeater
2 years ago
validation
2 years ago
manager.js
2 years ago
store.manager.js
2 years ago
tools.js
2 years ago
manager.js
348 lines
| 1 | import ActionFieldsMap from './action-fields-map/components/ActionFieldsMap'; |
| 2 | import ActionModal from './action-modal/components/ActionModal'; |
| 3 | import WrapperRequiredControl |
| 4 | from './action-fields-map/components/WrapperRequiredControl'; |
| 5 | import RequestButton from './actions/components/RequestButton'; |
| 6 | import ValidateButton from './actions/components/ValidateButton'; |
| 7 | import addAction from './actions/helpers/addAction'; |
| 8 | import Tools, { |
| 9 | classnames, |
| 10 | event, |
| 11 | getConvertedName, |
| 12 | listen, |
| 13 | maybeCyrToLatin, |
| 14 | versionCompare, |
| 15 | convertObjectToOptionsList, |
| 16 | column, |
| 17 | assetUrl, |
| 18 | set, |
| 19 | isEmpty, |
| 20 | } from './tools'; |
| 21 | |
| 22 | import getAvailableFields from './blocks/helpers/getAvailableFields'; |
| 23 | import getAvailableFieldsString |
| 24 | from './blocks/helpers/getAvailableFieldsString'; |
| 25 | import getBlocksByName from './blocks/helpers/getBlocksByName'; |
| 26 | import getFieldsWithoutCurrent from './blocks/helpers/getFieldsWithoutCurrent'; |
| 27 | import getFormFieldsBlocks from './blocks/helpers/getFormFieldsBlocks'; |
| 28 | import getInnerBlocks from './blocks/helpers/getInnerBlocks'; |
| 29 | import appendField from './blocks/helpers/appendField'; |
| 30 | |
| 31 | import gatewayAttr from './gateways/helpers/gatewayAttr'; |
| 32 | import gatewayLabel from './gateways/helpers/gatewayLabel'; |
| 33 | import registerGateway from './gateways/helpers/registerGateway'; |
| 34 | import renderGateway from './gateways/helpers/renderGateway'; |
| 35 | import renderGatewayWithPlaceholder |
| 36 | from './gateways/helpers/renderGatewayWithPlaceholder'; |
| 37 | import useActions from './actions/hooks/useActions'; |
| 38 | import useMetaState from './hooks/useMetaState'; |
| 39 | import useStateLoadingClasses from './hooks/useStateLoadingClasses'; |
| 40 | import useStateValidClasses from './hooks/useStateValidClasses'; |
| 41 | import useSuccessNotice from './hooks/useSuccessNotice'; |
| 42 | import useRequestFields from './actions/hooks/useRequestFields'; |
| 43 | import useSelectPostMeta from './hooks/useSelectPostMeta'; |
| 44 | import withRequestFields from './actions/hooks/withRequestFields'; |
| 45 | import useOnUpdateModal from './action-modal/hooks/useOnUpdateModal'; |
| 46 | import withSelectFormFields from './hooks/withSelectFormFields'; |
| 47 | import withSelectGateways from './gateways/hooks/withSelectGateways'; |
| 48 | import withDispatchGateways from './gateways/hooks/withDispatchGateways'; |
| 49 | import useSanitizeFieldsMap from './actions/hooks/useSanitizeFieldsMap'; |
| 50 | import withSelectActionLoading from './actions/hooks/withSelectActionLoading'; |
| 51 | import useRequestEvents from './events/hooks/useRequestEvents'; |
| 52 | import useBlockConditions from './block-conditions/hooks/useBlockConditions'; |
| 53 | import useUniqKey from './blocks/hooks/useUniqKey'; |
| 54 | import useIsAdvancedValidation from './blocks/hooks/useIsAdvancedValidation'; |
| 55 | import useBlockAttributes from './blocks/hooks/useBlockAttributes'; |
| 56 | import useActionButtonEdit from './action-buttons/hooks/useActionButtonEdit'; |
| 57 | import useIsHasAttribute from './hooks/useIsHasAttribute'; |
| 58 | import globalTab from './actions/helpers/globalTab'; |
| 59 | |
| 60 | import DynamicPreset from './preset/components/DynamicPreset'; |
| 61 | import JetFieldsMapControl from '../editor/blocks/controls/fields-map'; |
| 62 | import FieldWithPreset from './preset/components/FieldWithPreset'; |
| 63 | import GlobalFieldPreset from './preset/components/GlobalFieldPreset'; |
| 64 | import AvailableMapFieldPreset |
| 65 | from './preset/components/AvailableMapFieldPreset'; |
| 66 | import MapFieldPreset from './preset/components/MapFieldPreset'; |
| 67 | import useGroupedValidationMessages |
| 68 | from './validation/hooks/useGroupedValidationMessages'; |
| 69 | import FieldWrapper from './blocks/components/FieldWrapper'; |
| 70 | import MacrosInserter from './components/MacrosInserter'; |
| 71 | import RepeaterWithState from './repeater/components/RepeaterWithState'; |
| 72 | import withPreset from './preset/components/withPreset'; |
| 73 | import AdvancedFields from './blocks/components/AdvancedFields'; |
| 74 | import GeneralFields from './blocks/components/GeneralFields'; |
| 75 | import ToolBarFields from './blocks/components/ToolBarFields'; |
| 76 | import PlaceholderMessage from './actions/components/PlaceholderMessage'; |
| 77 | import ActionMessages from './actions/components/ActionMessages'; |
| 78 | import HorizontalLine from './components/HorizontalLine'; |
| 79 | import RequestLoadingButton from './actions/components/RequestLoadingButton'; |
| 80 | import convertListToFieldsMap from './actions/helpers/convertListToFieldsMap'; |
| 81 | import FieldSettingsWrapper from './blocks/components/FieldSettingsWrapper'; |
| 82 | import GroupedSelectControl from './components/GroupedSelectControl'; |
| 83 | import getBlockControls from './blocks/helpers/getBlockControls'; |
| 84 | import BaseHelp from './components/BaseHelp'; |
| 85 | import ValidateButtonWithStore |
| 86 | from './actions/components/ValidateButtonWithStore'; |
| 87 | import GatewayFetchButton from './gateways/components/GatewayFetchButton'; |
| 88 | import './store.manager'; |
| 89 | import ActionModalContext from './action-modal/context/ActionModalContext'; |
| 90 | import SafeDeleteContext from './repeater/context/safe.delete'; |
| 91 | import RepeaterItemContext from './repeater/context/repeater.item'; |
| 92 | import ActionListItemContext from './context/action.list.item'; |
| 93 | import RepeaterBodyContext from './repeater/context/repeater.custom.item.body'; |
| 94 | import RepeaterHeadContext from './repeater/context/repeater.custom.item.head'; |
| 95 | import RepeaterButtonsContext |
| 96 | from './repeater/context/repeater.custom.item.buttons'; |
| 97 | import BlockValueItemContext from './context/block.value.item.context'; |
| 98 | import SafeDeleteToggle from './repeater/components/safe.delete.toggle'; |
| 99 | import RepeaterAddNew from './repeater/components/repeater.add.new'; |
| 100 | import Repeater from './repeater/components/repeater'; |
| 101 | import ValidationToggleGroup |
| 102 | from './validation/components/ValidationToggleGroup'; |
| 103 | import ValidationBlockMessage |
| 104 | from './validation/components/ValidationBlockMessage'; |
| 105 | import ValidationMetaMessage |
| 106 | from './validation/components/ValidationMetaMessage'; |
| 107 | import CurrentActionEditContext |
| 108 | from './actions/context/CurrentActionEditContext'; |
| 109 | import ActionFieldsMapContext |
| 110 | from './action-fields-map/context/ActionFieldsMapContext'; |
| 111 | import CurrentPropertyMapContext |
| 112 | from './action-fields-map/context/CurrentPropertyMapContext'; |
| 113 | import DynamicPropertySelect |
| 114 | from './action-fields-map/components/DynamicPropertySelect'; |
| 115 | import ActionFetchButton from './actions/components/ActionFetchButton'; |
| 116 | import DynamicValues from './dynamic.value/components/DynamicValues'; |
| 117 | import RepeaterAddOrOperator from './repeater/components/repeater.add.or'; |
| 118 | import EditAdvancedRulesButton |
| 119 | from './validation/components/EditAdvancedRulesButton'; |
| 120 | import RepeaterStateContext from './repeater/context/repeater.state'; |
| 121 | import RepeaterState from './repeater/components/repeater.state'; |
| 122 | import FieldControl from './blocks/components/FieldControl'; |
| 123 | import BlockLabel from './blocks/components/BlockLabel'; |
| 124 | import BlockName from './blocks/components/BlockName'; |
| 125 | import BlockDescription from './blocks/components/BlockDescription'; |
| 126 | import BlockDefaultValue from './blocks/components/BlockDefaultValue'; |
| 127 | import BlockPlaceholder from './blocks/components/BlockPlaceholder'; |
| 128 | import BlockAddPrevButton from './blocks/components/BlockAddPrevButton'; |
| 129 | import BlockPrevButtonLabel from './blocks/components/BlockPrevButtonLabel'; |
| 130 | import BlockVisibility from './blocks/components/BlockVisibility'; |
| 131 | import BlockClassName from './blocks/components/BlockClassName'; |
| 132 | import BlockAdvancedValue from './blocks/components/BlockAdvancedValue'; |
| 133 | import MacrosFieldsTemplate |
| 134 | from './macros.button/components/MacrosFieldsTemplate'; |
| 135 | import MacrosButtonTemplate |
| 136 | from './macros.button/components/MacrosButtonTemplate'; |
| 137 | import MacrosFields from './macros.button/components/MacrosFields'; |
| 138 | import PopoverContext from './macros.button/context/PopoverContext'; |
| 139 | import PopoverItem from './macros.button/context/PopoverItem'; |
| 140 | import PresetButton from './preset/components/PresetButton'; |
| 141 | import ConditionItem from './block-conditions/components/ConditionItem'; |
| 142 | import AdvancedInspectorControl from './components/AdvancedInspectorControl'; |
| 143 | import AdvancedModalControl from './components/AdvancedModalControl'; |
| 144 | import ClientSideMacros |
| 145 | from './macros.button/components/ClientSideMacros'; |
| 146 | import { insertMacro } from './macros.button/functions'; |
| 147 | import useInsertMacro from './macros.button/hooks/useInsertMacro'; |
| 148 | import addDetail from './actions/helpers/addDetail'; |
| 149 | import ToggleControl from './components/ToggleControl'; |
| 150 | import BaseAction from './actions/abstract/BaseAction'; |
| 151 | import addComputedField from './actions/helpers/addComputedField'; |
| 152 | import BaseComputedField from './actions/abstract/BaseComputedField'; |
| 153 | import DetailsContainer from './components/DetailsContainer'; |
| 154 | import HoverContainer from './components/HoverContainer'; |
| 155 | import getCurrentInnerBlocks from './blocks/helpers/getCurrentInnerBlocks'; |
| 156 | import ContainersList from './components/ContainersList'; |
| 157 | import HumanReadableConditions |
| 158 | from './block-conditions/components/HumanReadableConditions'; |
| 159 | import humanReadableCondition |
| 160 | from './block-conditions/helpers/humanReadableCondition'; |
| 161 | import ConditionsRepeaterContextProvider |
| 162 | from './block-conditions/components/ConditionsRepeaterContextProvider'; |
| 163 | import ServerSideMacros from './macros.button/components/ServerSideMacros'; |
| 164 | import convertFlow from './actions/helpers/convertFlow'; |
| 165 | import ActionsFlow from './actions/abstract/ActionsFlow'; |
| 166 | import useCurrentAction from './actions/hooks/useCurrentAction'; |
| 167 | import useUpdateCurrentAction from './actions/hooks/useUpdateCurrentAction'; |
| 168 | import useUpdateCurrentActionMeta |
| 169 | from './actions/hooks/useUpdateCurrentActionMeta'; |
| 170 | import useActionsEdit from './actions/hooks/useActionsEdit'; |
| 171 | import useActionCallback from './actions/hooks/useActionCallback'; |
| 172 | import useActionDetail from './actions/hooks/useActionDetail'; |
| 173 | import useUniqueNameOnDuplicate from './blocks/hooks/useUniqueNameOnDuplicate'; |
| 174 | import useFields from './blocks/hooks/useFields'; |
| 175 | import SelectVariations from './blocks/components/SelectVariations'; |
| 176 | import ToggleGroupVariations from './blocks/components/ToggleGroupVariations'; |
| 177 | import BaseLabel from './components/BaseLabel'; |
| 178 | import useSupport from './blocks/hooks/useSupport'; |
| 179 | import AttributeHelp from './blocks/components/AttributeHelp'; |
| 180 | import ActionMessagesSlotFills |
| 181 | from './actions/components/ActionMessagesSlotFills'; |
| 182 | |
| 183 | // JFBComponents |
| 184 | window.JetFBComponents = { |
| 185 | BaseLabel, |
| 186 | ActionFieldsMap, |
| 187 | ActionModal, |
| 188 | ActionModalContext, |
| 189 | SafeDeleteContext, |
| 190 | RepeaterItemContext, |
| 191 | ActionListItemContext, |
| 192 | RepeaterBodyContext, |
| 193 | RepeaterHeadContext, |
| 194 | RepeaterButtonsContext, |
| 195 | CurrentActionEditContext, |
| 196 | ActionFieldsMapContext, |
| 197 | CurrentPropertyMapContext, |
| 198 | BlockValueItemContext, |
| 199 | DynamicPropertySelect, |
| 200 | SafeDeleteToggle, |
| 201 | RepeaterAddNew, |
| 202 | RepeaterAddOrOperator, |
| 203 | Repeater, |
| 204 | RequestButton, |
| 205 | ValidateButton, |
| 206 | RequestLoadingButton, |
| 207 | WrapperRequiredControl, |
| 208 | DynamicPreset, |
| 209 | JetFieldsMapControl, |
| 210 | FieldWithPreset, |
| 211 | GlobalField: GlobalFieldPreset, |
| 212 | AvailableMapField: AvailableMapFieldPreset, |
| 213 | MapField: MapFieldPreset, |
| 214 | FieldWrapper, |
| 215 | MacrosInserter, |
| 216 | RepeaterWithState, |
| 217 | AdvancedFields, |
| 218 | GeneralFields, |
| 219 | ToolBarFields, |
| 220 | FieldControl, |
| 221 | PlaceholderMessage, |
| 222 | HorizontalLine, |
| 223 | FieldSettingsWrapper, |
| 224 | ActionMessages, |
| 225 | GroupedSelectControl, |
| 226 | BaseHelp, |
| 227 | ValidateButtonWithStore, |
| 228 | GatewayFetchButton, |
| 229 | ValidationToggleGroup, |
| 230 | ValidationBlockMessage, |
| 231 | ValidationMetaMessage, |
| 232 | ActionFetchButton, |
| 233 | DynamicValues, |
| 234 | EditAdvancedRulesButton, |
| 235 | RepeaterStateContext, |
| 236 | RepeaterState, |
| 237 | BlockLabel, |
| 238 | BlockName, |
| 239 | BlockDescription, |
| 240 | BlockDefaultValue, |
| 241 | BlockPlaceholder, |
| 242 | BlockAddPrevButton, |
| 243 | BlockPrevButtonLabel, |
| 244 | BlockVisibility, |
| 245 | BlockClassName, |
| 246 | BlockAdvancedValue, |
| 247 | MacrosFields, |
| 248 | MacrosButtonTemplate, |
| 249 | MacrosFieldsTemplate, |
| 250 | ShowPopoverContext: PopoverContext, |
| 251 | PopoverItem, |
| 252 | PresetButton, |
| 253 | ConditionItem, |
| 254 | AdvancedInspectorControl, |
| 255 | AdvancedModalControl, |
| 256 | ClientSideMacros, |
| 257 | ToggleControl, |
| 258 | BaseAction, |
| 259 | BaseComputedField, |
| 260 | DetailsContainer, |
| 261 | HoverContainer, |
| 262 | ContainersList, |
| 263 | HumanReadableConditions, |
| 264 | ConditionsRepeaterContextProvider, |
| 265 | ServerSideMacros, |
| 266 | ActionsFlow, |
| 267 | SelectVariations, |
| 268 | ToggleGroupVariations, |
| 269 | AttributeHelp, |
| 270 | ActionMessagesSlotFills, |
| 271 | }; |
| 272 | |
| 273 | // JFBFunctions |
| 274 | window.JetFBActions = { |
| 275 | addAction, |
| 276 | withPreset, |
| 277 | getInnerBlocks, |
| 278 | getAvailableFieldsString, |
| 279 | getAvailableFields, |
| 280 | getFormFieldsBlocks, |
| 281 | getFieldsWithoutCurrent, |
| 282 | gatewayAttr, |
| 283 | gatewayLabel, |
| 284 | registerGateway, |
| 285 | Tools, |
| 286 | event, |
| 287 | listen, |
| 288 | renderGateway, |
| 289 | renderGatewayWithPlaceholder, |
| 290 | globalTab, |
| 291 | versionCompare, |
| 292 | convertListToFieldsMap, |
| 293 | maybeCyrToLatin, |
| 294 | getConvertedName, |
| 295 | getBlockControls, |
| 296 | classnames, |
| 297 | getBlocksByName, |
| 298 | convertObjectToOptionsList, |
| 299 | appendField, |
| 300 | insertMacro, |
| 301 | addDetail, |
| 302 | column, |
| 303 | addComputedField, |
| 304 | getCurrentInnerBlocks, |
| 305 | humanReadableCondition, |
| 306 | convertFlow, |
| 307 | assetUrl, |
| 308 | set, |
| 309 | isEmpty, |
| 310 | }; |
| 311 | |
| 312 | // JFBHooks |
| 313 | window.JetFBHooks = { |
| 314 | useActions, |
| 315 | useMetaState, |
| 316 | useSelectPostMeta, |
| 317 | useStateValidClasses, |
| 318 | useStateLoadingClasses, |
| 319 | useSuccessNotice, |
| 320 | useRequestEvents, |
| 321 | useBlockConditions, |
| 322 | useUniqKey, |
| 323 | useBlockAttributes, |
| 324 | useIsAdvancedValidation, |
| 325 | useActionButtonEdit, |
| 326 | useGroupedValidationMessages, |
| 327 | useSanitizeFieldsMap, |
| 328 | withRequestFields, |
| 329 | useRequestFields, |
| 330 | withSelectActionLoading, |
| 331 | withSelectFormFields, |
| 332 | withSelectGateways, |
| 333 | withDispatchGateways, |
| 334 | useOnUpdateModal, |
| 335 | useInsertMacro, |
| 336 | useIsHasAttribute, |
| 337 | useCurrentAction, |
| 338 | useUpdateCurrentAction, |
| 339 | useUpdateCurrentActionMeta, |
| 340 | useActionsEdit, |
| 341 | useActionCallback, |
| 342 | useActionDetail, |
| 343 | useUniqueNameOnDuplicate, |
| 344 | useFields: useFields, |
| 345 | useSupport, |
| 346 | }; |
| 347 | |
| 348 |