@makeswift/runtime 0.0.0-a0e5297 → 0.0.0-a49c3c6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Page.cjs.js +215 -0
- package/dist/Page.cjs.js.map +1 -0
- package/dist/Page.es.js +209 -0
- package/dist/Page.es.js.map +1 -0
- package/dist/actions.cjs.js +5 -0
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +5 -1
- package/dist/actions.es.js.map +1 -1
- package/dist/components.cjs.js +16 -1
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +7 -2
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +77 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +77 -1
- package/dist/constants.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +61 -5
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +61 -5
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/descriptors.cjs.js +8 -0
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +6 -1
- package/dist/descriptors.es.js.map +1 -1
- package/dist/instances.cjs.js +17 -0
- package/dist/instances.cjs.js.map +1 -1
- package/dist/instances.es.js +17 -1
- package/dist/instances.es.js.map +1 -1
- package/dist/main.cjs.js +1 -0
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +1 -1
- package/dist/next.cjs.js +37 -17
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +38 -18
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +1 -0
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +1 -1
- package/dist/react-builder-preview.cjs.js +3 -0
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +4 -1
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react-page.cjs.js +1 -1
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +2 -2
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +6 -1
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.cjs2.js +2371 -319
- package/dist/react.cjs2.js.map +1 -1
- package/dist/react.es.js +6 -2
- package/dist/react.es.js.map +1 -1
- package/dist/react.es2.js +2369 -327
- package/dist/react.es2.js.map +1 -1
- package/dist/types/api/constants.d.ts.map +1 -1
- package/dist/types/api/generated/graphql.d.ts +53 -0
- package/dist/types/api/generated/graphql.d.ts.map +1 -1
- package/dist/types/api/react.d.ts +25 -4
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +2 -2
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/builder/serialization/control-serialization.d.ts +55 -7
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/Form.d.ts +41 -0
- package/dist/types/components/builtin/Form/Form.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +14 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts +16 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +10 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +17 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +24 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts +13 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts +9 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts +32 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/index.d.ts +2 -0
- package/dist/types/components/builtin/Form/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/builtin/Video/Video.d.ts +15 -0
- package/dist/types/components/builtin/Video/Video.d.ts.map +1 -0
- package/dist/types/components/builtin/Video/index.d.ts +2 -0
- package/dist/types/components/builtin/Video/index.d.ts.map +1 -0
- package/dist/types/components/builtin/index.d.ts +1 -0
- package/dist/types/components/builtin/index.d.ts.map +1 -1
- package/dist/types/components/hooks/index.d.ts +1 -0
- package/dist/types/components/hooks/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useTable.d.ts +66 -0
- package/dist/types/components/hooks/useTable.d.ts.map +1 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts +8 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/page/BodySnippet.d.ts +7 -0
- package/dist/types/components/page/BodySnippet.d.ts.map +1 -0
- package/dist/types/components/page/Page.d.ts +45 -0
- package/dist/types/components/page/Page.d.ts.map +1 -0
- package/dist/types/components/page/index.d.ts +2 -0
- package/dist/types/components/page/index.d.ts.map +1 -0
- package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts +7 -0
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts +2 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts.map +1 -0
- package/dist/types/components/utils/placeholders.d.ts +7 -0
- package/dist/types/components/utils/placeholders.d.ts.map +1 -1
- package/dist/types/components/utils/queries.d.ts +1 -0
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/components/utils/types.d.ts +1 -2
- package/dist/types/components/utils/types.d.ts.map +1 -1
- package/dist/types/controls.d.ts +4 -0
- package/dist/types/controls.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/next.d.ts +5 -4
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts +24 -6
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/index.d.ts +3 -3
- package/dist/types/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/prop-controllers/instances.d.ts +36 -4
- package/dist/types/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/runtimes/react.d.ts +3 -3
- package/dist/types/runtimes/react.d.ts.map +1 -1
- package/dist/types/state/actions.d.ts +9 -1
- package/dist/types/state/actions.d.ts.map +1 -1
- package/dist/types/state/react-builder-preview.d.ts.map +1 -1
- package/package.json +3 -1
- package/dist/graphql.cjs.js +0 -162
- package/dist/graphql.cjs.js.map +0 -1
- package/dist/graphql.es.js +0 -157
- package/dist/graphql.es.js.map +0 -1
package/dist/actions.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.es.js","sources":["../src/state/actions.ts"],"sourcesContent":["import type { Operation } from 'ot-json0'\n\nimport type { Document } from './modules/read-only-documents'\nimport type { ComponentType } from './modules/react-components'\nimport type { Measurable, BoxModel } from './modules/box-models'\nimport type { ThunkAction } from 'redux-thunk'\nimport { ComponentMeta } from './modules/components-meta'\nimport { PropControllerDescriptor } from '../prop-controllers'\nimport type { Size } from './react-builder-preview'\nimport type { PropControllersHandle } from './modules/prop-controller-handles'\nimport type { PropController, PropControllerMessage } from '../prop-controllers/instances'\nimport type { APIResource } from '../api/types'\nimport type { SerializedControl } from '../builder'\n\nexport const ActionTypes = {\n INIT: 'INIT',\n CLEAN_UP: 'CLEAN_UP',\n\n REGISTER_DOCUMENT: 'REGISTER_DOCUMENT',\n UNREGISTER_DOCUMENT: 'UNREGISTER_DOCUMENT',\n\n CHANGE_DOCUMENT: 'CHANGE_DOCUMENT',\n\n REGISTER_COMPONENT: 'REGISTER_COMPONENT',\n UNREGISTER_COMPONENT: 'UNREGISTER_COMPONENT',\n\n REGISTER_BUILDER_COMPONENT: 'REGISTER_BUILDER_COMPONENT',\n UNREGISTER_BUILDER_COMPONENT: 'UNREGISTER_BUILDER_COMPONENT',\n\n REGISTER_REACT_COMPONENT: 'REGISTER_REACT_COMPONENT',\n UNREGISTER_REACT_COMPONENT: 'UNREGISTER_REACT_COMPONENT',\n\n MOUNT_COMPONENT: 'MOUNT_COMPONENT',\n UNMOUNT_COMPONENT: 'UNMOUNT_COMPONENT',\n\n REGISTER_COMPONENT_HANDLE: 'REGISTER_COMPONENT_HANDLE',\n UNREGISTER_COMPONENT_HANDLE: 'UNREGISTER_COMPONENT_HANDLE',\n\n REGISTER_MEASURABLE: 'REGISTER_MEASURABLE',\n UNREGISTER_MEASURABLE: 'UNREGISTER_MEASURABLE',\n\n CHANGE_ELEMENT_BOX_MODELS: 'CHANGE_ELEMENT_BOX_MODELS',\n\n CHANGE_DOCUMENT_ELEMENT_SIZE: 'CHANGE_DOCUMENT_ELEMENT_SIZE',\n CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: 'CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP',\n\n REGISTER_PROP_CONTROLLERS_HANDLE: 'REGISTER_PROP_CONTROLLERS_HANDLE',\n UNREGISTER_PROP_CONTROLLERS_HANDLE: 'UNREGISTER_PROP_CONTROLLERS_HANDLE',\n REGISTER_PROP_CONTROLLERS: 'REGISTER_PROP_CONTROLLERS',\n UNREGISTER_PROP_CONTROLLERS: 'UNREGISTER_PROP_CONTROLLERS',\n MESSAGE_HOST_PROP_CONTROLLER: 'MESSAGE_HOST_PROP_CONTROLLER',\n MESSAGE_BUILDER_PROP_CONTROLLER: 'MESSAGE_BUILDER_PROP_CONTROLLER',\n\n CHANGE_API_RESOURCE: 'CHANGE_API_RESOURCE',\n EVICT_API_RESOURCE: 'EVICT_API_RESOURCE',\n} as const\n\ntype InitAction = { type: typeof ActionTypes.INIT }\n\ntype CleanUpAction = { type: typeof ActionTypes.CLEAN_UP }\n\ntype RegisterDocumentAction = {\n type: typeof ActionTypes.REGISTER_DOCUMENT\n payload: { documentKey: string; document: Document }\n}\n\ntype UnregisterDocumentAction = {\n type: typeof ActionTypes.UNREGISTER_DOCUMENT\n payload: { documentKey: string }\n}\n\ntype ChangeDocumentAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT\n payload: { documentKey: string; operation: Operation }\n}\n\ntype RegisterComponentAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n propControllerDescriptors: Record<string, PropControllerDescriptor>\n }\n}\n\ntype UnregisterComponentAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterBuilderComponentAction = {\n type: typeof ActionTypes.REGISTER_BUILDER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n serializedControls: Record<string, SerializedControl>\n }\n}\n\ntype UnregisterBuilderComponentAction = {\n type: typeof ActionTypes.UNREGISTER_BUILDER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterReactComponentAction = {\n type: typeof ActionTypes.REGISTER_REACT_COMPONENT\n payload: { type: string; component: ComponentType }\n}\n\ntype UnregisterReactComponentAction = {\n type: typeof ActionTypes.UNREGISTER_REACT_COMPONENT\n payload: { type: string }\n}\n\ntype MountComponentAction = {\n type: typeof ActionTypes.MOUNT_COMPONENT\n payload: { documentKey: string; elementKey: string }\n}\n\ntype UnmountComponentAction = {\n type: typeof ActionTypes.UNMOUNT_COMPONENT\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: unknown }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype ChangeElementBoxModelsAction = {\n type: typeof ActionTypes.CHANGE_ELEMENT_BOX_MODELS\n payload: { changedElementBoxModels: Map<string, Map<string, BoxModel | null>> }\n}\n\ntype ChangeDocumentElementSizeAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE\n payload: { size: Size }\n}\n\ntype ChangeDocumentElementScrollTopAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP\n payload: { scrollTop: number }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, PropController>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype MessageHostPropControllerAction<T = PropControllerMessage> = {\n type: typeof ActionTypes.MESSAGE_HOST_PROP_CONTROLLER\n payload: { documentKey: string; elementKey: string; propName: string; message: T }\n}\n\ntype MessageBuilderPropControllerAction<T = PropControllerMessage> = {\n type: typeof ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER\n payload: { documentKey: string; elementKey: string; propName: string; message: T }\n}\n\ntype ChangeAPIResourceAction = {\n type: typeof ActionTypes.CHANGE_API_RESOURCE\n payload: { resource: APIResource }\n}\n\ntype EvictAPIResourceAction = {\n type: typeof ActionTypes.EVICT_API_RESOURCE\n payload: { id: string }\n}\n\nexport type Action =\n | InitAction\n | CleanUpAction\n | ChangeDocumentAction\n | RegisterDocumentAction\n | UnregisterDocumentAction\n | RegisterComponentAction\n | UnregisterComponentAction\n | RegisterBuilderComponentAction\n | UnregisterBuilderComponentAction\n | RegisterReactComponentAction\n | UnregisterReactComponentAction\n | MountComponentAction\n | UnmountComponentAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | ChangeElementBoxModelsAction\n | ChangeDocumentElementSizeAction\n | ChangeDocumentElementScrollTopAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | MessageHostPropControllerAction\n | MessageBuilderPropControllerAction\n | ChangeAPIResourceAction\n | EvictAPIResourceAction\n\nexport function init(): InitAction {\n return { type: ActionTypes.INIT }\n}\n\nexport function cleanUp(): CleanUpAction {\n return { type: ActionTypes.CLEAN_UP }\n}\n\nexport function registerDocument(document: Document): RegisterDocumentAction {\n return { type: ActionTypes.REGISTER_DOCUMENT, payload: { documentKey: document.key, document } }\n}\n\nexport function unregisterDocument(documentKey: string): UnregisterDocumentAction {\n return { type: ActionTypes.UNREGISTER_DOCUMENT, payload: { documentKey } }\n}\n\nexport function registerDocumentEffect(\n document: Document,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerDocument(document))\n\n return () => {\n dispatch(unregisterDocument(document.key))\n }\n }\n}\n\nexport function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction {\n return { type: ActionTypes.CHANGE_DOCUMENT, payload: { documentKey, operation } }\n}\n\nexport function registerComponent(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): RegisterComponentAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT,\n payload: { type, meta, propControllerDescriptors },\n }\n}\n\nexport function unregisterComponent(type: string): UnregisterComponentAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT, payload: { type } }\n}\n\nexport function registerComponentEffect(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponent(type, meta, propControllerDescriptors))\n\n return () => {\n dispatch(unregisterComponent(type))\n }\n }\n}\n\nexport function registerBuilderComponent(\n type: string,\n meta: ComponentMeta,\n serializedControls: Record<string, SerializedControl>,\n): RegisterBuilderComponentAction {\n return {\n type: ActionTypes.REGISTER_BUILDER_COMPONENT,\n payload: { type, meta, serializedControls },\n }\n}\n\nexport function unregisterBuilderComponent(type: string): UnregisterBuilderComponentAction {\n return { type: ActionTypes.UNREGISTER_BUILDER_COMPONENT, payload: { type } }\n}\n\nfunction registerReactComponent(\n type: string,\n component: ComponentType,\n): RegisterReactComponentAction {\n return { type: ActionTypes.REGISTER_REACT_COMPONENT, payload: { type, component } }\n}\n\nfunction unregisterReactComponent(type: string): UnregisterReactComponentAction {\n return { type: ActionTypes.UNREGISTER_REACT_COMPONENT, payload: { type } }\n}\n\nexport function registerReactComponentEffect(\n type: string,\n component: ComponentType,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerReactComponent(type, component))\n\n return () => {\n dispatch(unregisterReactComponent(type))\n }\n }\n}\n\nexport function mountComponent(documentKey: string, elementKey: string): MountComponentAction {\n return { type: ActionTypes.MOUNT_COMPONENT, payload: { documentKey, elementKey } }\n}\n\nexport function unmountComponent(documentKey: string, elementKey: string): UnmountComponentAction {\n return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { documentKey, elementKey } }\n}\n\nexport function mountComponentEffect(\n documentKey: string,\n elementKey: string,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(mountComponent(documentKey, elementKey))\n\n return () => {\n dispatch(unmountComponent(documentKey, elementKey))\n }\n }\n}\n\nfunction registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: unknown,\n): RegisterComponentHandleAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\nfunction unregisterComponentHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterComponentHandleAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT_HANDLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerComponentHandleEffect(\n documentKey: string,\n elementKey: string,\n componentHandle: unknown,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponentHandle(documentKey, elementKey, componentHandle))\n\n return () => {\n dispatch(unregisterComponentHandle(documentKey, elementKey))\n }\n }\n}\n\nexport function registerMeasurable(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): RegisterMeasurableAction {\n return { type: ActionTypes.REGISTER_MEASURABLE, payload: { documentKey, elementKey, measurable } }\n}\n\nexport function unregisterMeasurable(\n documentKey: string,\n elementKey: string,\n): UnregisterMeasurableAction {\n return { type: ActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerMeasurableEffect(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerMeasurable(documentKey, elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(documentKey, elementKey))\n }\n }\n}\n\nexport function changeElementBoxModels(\n changedElementBoxModels: Map<string, Map<string, BoxModel | null>>,\n): ChangeElementBoxModelsAction {\n return { type: ActionTypes.CHANGE_ELEMENT_BOX_MODELS, payload: { changedElementBoxModels } }\n}\n\nexport function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE, payload: { size } }\n}\n\nexport function changeDocumentElementScrollTop(\n scrollTop: number,\n): ChangeDocumentElementScrollTopAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP, payload: { scrollTop } }\n}\n\nexport function registerPropControllersHandle(\n documentKey: string,\n elementKey: string,\n handle: PropControllersHandle,\n): RegisterPropControllersHandleAction {\n return {\n type: ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey, handle },\n }\n}\n\nexport function unregisterPropControllersHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersHandleAction {\n return {\n type: ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerPropControllers(\n documentKey: string,\n elementKey: string,\n propControllers: Record<string, PropController>,\n): RegisterPropControllersAction {\n return {\n type: ActionTypes.REGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey, propControllers },\n }\n}\n\nexport function unregisterPropControllers(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersAction {\n return { type: ActionTypes.UNREGISTER_PROP_CONTROLLERS, payload: { documentKey, elementKey } }\n}\n\nexport function messageHostPropController<T>(\n documentKey: string,\n elementKey: string,\n propName: string,\n message: T,\n): MessageHostPropControllerAction<T> {\n return {\n type: ActionTypes.MESSAGE_HOST_PROP_CONTROLLER,\n payload: { documentKey, elementKey, propName, message },\n }\n}\n\nexport function messageBuilderPropController<T>(\n documentKey: string,\n elementKey: string,\n propName: string,\n message: T,\n): MessageBuilderPropControllerAction<T> {\n return {\n type: ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER,\n payload: { documentKey, elementKey, propName, message },\n }\n}\n\nexport function changeApiResource(resource: APIResource): ChangeAPIResourceAction {\n return { type: ActionTypes.CHANGE_API_RESOURCE, payload: { resource } }\n}\n\nexport function evictApiResource(id: string): EvictAPIResourceAction {\n return { type: ActionTypes.EVICT_API_RESOURCE, payload: { id } }\n}\n"],"names":[],"mappings":"AAcO,MAAM,cAAc;AAAA,EACzB,MAAM;AAAA,EACN,UAAU;AAAA,EAEV,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EAErB,iBAAiB;AAAA,EAEjB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EAEtB,4BAA4B;AAAA,EAC5B,8BAA8B;AAAA,EAE9B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAE5B,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EAEnB,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAE7B,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EAEvB,2BAA2B;AAAA,EAE3B,8BAA8B;AAAA,EAC9B,oCAAoC;AAAA,EAEpC,kCAAkC;AAAA,EAClC,oCAAoC;AAAA,EACpC,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,iCAAiC;AAAA,EAEjC,qBAAqB;AAAA,EACrB,oBAAoB;AACtB;AAkLmC,gBAAA;AAC1B,SAAA,EAAE,MAAM,YAAY;AAC7B;AAEyC,mBAAA;AAChC,SAAA,EAAE,MAAM,YAAY;AAC7B;AAEO,0BAA0B,UAA4C;AACpE,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AAA,EAAA;AAE/C;AAaE,iCAAA,aACA,YACA,iBAC+B;AACxB,SAAA;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,SAAS,EAAE,aAAa,YAAY,gBAAgB;AAAA,EAAA;AAExD;AAEO,mCACL,aACA,YACiC;AAC1B,SAAA,EAAE,MAAM,YAAY,6BAA6B,SAAS,EAAE,aAAa;AAClF;AAGE,mCAAA,aACA,YACA,UACA,SACoC;AAC7B,SAAA;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,SAAS,EAAE,aAAa,YAAY,UAAU,QAAQ;AAAA,EAAA;AAE1D;AAGE,sCAAA,aACA,YACA,UACA,SACuC;AAChC,SAAA;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,SAAS,EAAE,aAAa,YAAY,UAAU,QAAQ;AAAA,EAAA;AAE1D;AAEO,2BAA2B,UAAgD;AAChF,SAAO,EAAE,MAAM,YAAY,qBAAqB,SAAS,EAAE;AAC7D;AAEO,0BAA0B,IAAoC;AACnE,SAAO,EAAE,MAAM,YAAY,oBAAoB,SAAS,EAAE;AAC5D;;"}
|
|
1
|
+
{"version":3,"file":"actions.es.js","sources":["../src/state/actions.ts"],"sourcesContent":["import type { Operation } from 'ot-json0'\n\nimport type { Document } from './modules/read-only-documents'\nimport type { ComponentType } from './modules/react-components'\nimport type { Measurable, BoxModel } from './modules/box-models'\nimport type { ThunkAction } from 'redux-thunk'\nimport { ComponentMeta } from './modules/components-meta'\nimport { PropControllerDescriptor } from '../prop-controllers'\nimport type { Size } from './react-builder-preview'\nimport type { PropControllersHandle } from './modules/prop-controller-handles'\nimport type { PropController, PropControllerMessage } from '../prop-controllers/instances'\nimport type { APIResource } from '../api/types'\nimport type { SerializedControl } from '../builder'\n\nexport const ActionTypes = {\n INIT: 'INIT',\n CLEAN_UP: 'CLEAN_UP',\n\n REGISTER_DOCUMENT: 'REGISTER_DOCUMENT',\n UNREGISTER_DOCUMENT: 'UNREGISTER_DOCUMENT',\n\n CHANGE_DOCUMENT: 'CHANGE_DOCUMENT',\n\n REGISTER_COMPONENT: 'REGISTER_COMPONENT',\n UNREGISTER_COMPONENT: 'UNREGISTER_COMPONENT',\n\n REGISTER_BUILDER_COMPONENT: 'REGISTER_BUILDER_COMPONENT',\n UNREGISTER_BUILDER_COMPONENT: 'UNREGISTER_BUILDER_COMPONENT',\n\n REGISTER_REACT_COMPONENT: 'REGISTER_REACT_COMPONENT',\n UNREGISTER_REACT_COMPONENT: 'UNREGISTER_REACT_COMPONENT',\n\n MOUNT_COMPONENT: 'MOUNT_COMPONENT',\n UNMOUNT_COMPONENT: 'UNMOUNT_COMPONENT',\n\n REGISTER_COMPONENT_HANDLE: 'REGISTER_COMPONENT_HANDLE',\n UNREGISTER_COMPONENT_HANDLE: 'UNREGISTER_COMPONENT_HANDLE',\n\n REGISTER_MEASURABLE: 'REGISTER_MEASURABLE',\n UNREGISTER_MEASURABLE: 'UNREGISTER_MEASURABLE',\n\n CHANGE_ELEMENT_BOX_MODELS: 'CHANGE_ELEMENT_BOX_MODELS',\n\n CHANGE_DOCUMENT_ELEMENT_SIZE: 'CHANGE_DOCUMENT_ELEMENT_SIZE',\n CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: 'CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP',\n SCROLL_DOCUMENT_ELEMENT: 'SCROLL_DOCUMENT_ELEMENT',\n\n REGISTER_PROP_CONTROLLERS_HANDLE: 'REGISTER_PROP_CONTROLLERS_HANDLE',\n UNREGISTER_PROP_CONTROLLERS_HANDLE: 'UNREGISTER_PROP_CONTROLLERS_HANDLE',\n REGISTER_PROP_CONTROLLERS: 'REGISTER_PROP_CONTROLLERS',\n UNREGISTER_PROP_CONTROLLERS: 'UNREGISTER_PROP_CONTROLLERS',\n MESSAGE_HOST_PROP_CONTROLLER: 'MESSAGE_HOST_PROP_CONTROLLER',\n MESSAGE_BUILDER_PROP_CONTROLLER: 'MESSAGE_BUILDER_PROP_CONTROLLER',\n\n CHANGE_API_RESOURCE: 'CHANGE_API_RESOURCE',\n EVICT_API_RESOURCE: 'EVICT_API_RESOURCE',\n} as const\n\ntype InitAction = { type: typeof ActionTypes.INIT }\n\ntype CleanUpAction = { type: typeof ActionTypes.CLEAN_UP }\n\ntype RegisterDocumentAction = {\n type: typeof ActionTypes.REGISTER_DOCUMENT\n payload: { documentKey: string; document: Document }\n}\n\ntype UnregisterDocumentAction = {\n type: typeof ActionTypes.UNREGISTER_DOCUMENT\n payload: { documentKey: string }\n}\n\ntype ChangeDocumentAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT\n payload: { documentKey: string; operation: Operation }\n}\n\ntype RegisterComponentAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n propControllerDescriptors: Record<string, PropControllerDescriptor>\n }\n}\n\ntype UnregisterComponentAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterBuilderComponentAction = {\n type: typeof ActionTypes.REGISTER_BUILDER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n serializedControls: Record<string, SerializedControl>\n }\n}\n\ntype UnregisterBuilderComponentAction = {\n type: typeof ActionTypes.UNREGISTER_BUILDER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterReactComponentAction = {\n type: typeof ActionTypes.REGISTER_REACT_COMPONENT\n payload: { type: string; component: ComponentType }\n}\n\ntype UnregisterReactComponentAction = {\n type: typeof ActionTypes.UNREGISTER_REACT_COMPONENT\n payload: { type: string }\n}\n\ntype MountComponentAction = {\n type: typeof ActionTypes.MOUNT_COMPONENT\n payload: { documentKey: string; elementKey: string }\n}\n\ntype UnmountComponentAction = {\n type: typeof ActionTypes.UNMOUNT_COMPONENT\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: unknown }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype ChangeElementBoxModelsAction = {\n type: typeof ActionTypes.CHANGE_ELEMENT_BOX_MODELS\n payload: { changedElementBoxModels: Map<string, Map<string, BoxModel | null>> }\n}\n\ntype ChangeDocumentElementSizeAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE\n payload: { size: Size }\n}\n\ntype ChangeDocumentElementScrollTopAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP\n payload: { scrollTop: number }\n}\n\ntype ScrollDocumentElementAction = {\n type: typeof ActionTypes.SCROLL_DOCUMENT_ELEMENT\n payload: { scrollTopDelta: number }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, PropController>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype MessageHostPropControllerAction<T = PropControllerMessage> = {\n type: typeof ActionTypes.MESSAGE_HOST_PROP_CONTROLLER\n payload: { documentKey: string; elementKey: string; propName: string; message: T }\n}\n\ntype MessageBuilderPropControllerAction<T = PropControllerMessage> = {\n type: typeof ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER\n payload: { documentKey: string; elementKey: string; propName: string; message: T }\n}\n\ntype ChangeAPIResourceAction = {\n type: typeof ActionTypes.CHANGE_API_RESOURCE\n payload: { resource: APIResource }\n}\n\ntype EvictAPIResourceAction = {\n type: typeof ActionTypes.EVICT_API_RESOURCE\n payload: { id: string }\n}\n\nexport type Action =\n | InitAction\n | CleanUpAction\n | ChangeDocumentAction\n | RegisterDocumentAction\n | UnregisterDocumentAction\n | RegisterComponentAction\n | UnregisterComponentAction\n | RegisterBuilderComponentAction\n | UnregisterBuilderComponentAction\n | RegisterReactComponentAction\n | UnregisterReactComponentAction\n | MountComponentAction\n | UnmountComponentAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | ChangeElementBoxModelsAction\n | ChangeDocumentElementSizeAction\n | ChangeDocumentElementScrollTopAction\n | ScrollDocumentElementAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | MessageHostPropControllerAction\n | MessageBuilderPropControllerAction\n | ChangeAPIResourceAction\n | EvictAPIResourceAction\n\nexport function init(): InitAction {\n return { type: ActionTypes.INIT }\n}\n\nexport function cleanUp(): CleanUpAction {\n return { type: ActionTypes.CLEAN_UP }\n}\n\nexport function registerDocument(document: Document): RegisterDocumentAction {\n return { type: ActionTypes.REGISTER_DOCUMENT, payload: { documentKey: document.key, document } }\n}\n\nexport function unregisterDocument(documentKey: string): UnregisterDocumentAction {\n return { type: ActionTypes.UNREGISTER_DOCUMENT, payload: { documentKey } }\n}\n\nexport function registerDocumentEffect(\n document: Document,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerDocument(document))\n\n return () => {\n dispatch(unregisterDocument(document.key))\n }\n }\n}\n\nexport function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction {\n return { type: ActionTypes.CHANGE_DOCUMENT, payload: { documentKey, operation } }\n}\n\nexport function registerComponent(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): RegisterComponentAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT,\n payload: { type, meta, propControllerDescriptors },\n }\n}\n\nexport function unregisterComponent(type: string): UnregisterComponentAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT, payload: { type } }\n}\n\nexport function registerComponentEffect(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponent(type, meta, propControllerDescriptors))\n\n return () => {\n dispatch(unregisterComponent(type))\n }\n }\n}\n\nexport function registerBuilderComponent(\n type: string,\n meta: ComponentMeta,\n serializedControls: Record<string, SerializedControl>,\n): RegisterBuilderComponentAction {\n return {\n type: ActionTypes.REGISTER_BUILDER_COMPONENT,\n payload: { type, meta, serializedControls },\n }\n}\n\nexport function unregisterBuilderComponent(type: string): UnregisterBuilderComponentAction {\n return { type: ActionTypes.UNREGISTER_BUILDER_COMPONENT, payload: { type } }\n}\n\nfunction registerReactComponent(\n type: string,\n component: ComponentType,\n): RegisterReactComponentAction {\n return { type: ActionTypes.REGISTER_REACT_COMPONENT, payload: { type, component } }\n}\n\nfunction unregisterReactComponent(type: string): UnregisterReactComponentAction {\n return { type: ActionTypes.UNREGISTER_REACT_COMPONENT, payload: { type } }\n}\n\nexport function registerReactComponentEffect(\n type: string,\n component: ComponentType,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerReactComponent(type, component))\n\n return () => {\n dispatch(unregisterReactComponent(type))\n }\n }\n}\n\nexport function mountComponent(documentKey: string, elementKey: string): MountComponentAction {\n return { type: ActionTypes.MOUNT_COMPONENT, payload: { documentKey, elementKey } }\n}\n\nexport function unmountComponent(documentKey: string, elementKey: string): UnmountComponentAction {\n return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { documentKey, elementKey } }\n}\n\nexport function mountComponentEffect(\n documentKey: string,\n elementKey: string,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(mountComponent(documentKey, elementKey))\n\n return () => {\n dispatch(unmountComponent(documentKey, elementKey))\n }\n }\n}\n\nfunction registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: unknown,\n): RegisterComponentHandleAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\nfunction unregisterComponentHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterComponentHandleAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT_HANDLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerComponentHandleEffect(\n documentKey: string,\n elementKey: string,\n componentHandle: unknown,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponentHandle(documentKey, elementKey, componentHandle))\n\n return () => {\n dispatch(unregisterComponentHandle(documentKey, elementKey))\n }\n }\n}\n\nexport function registerMeasurable(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): RegisterMeasurableAction {\n return { type: ActionTypes.REGISTER_MEASURABLE, payload: { documentKey, elementKey, measurable } }\n}\n\nexport function unregisterMeasurable(\n documentKey: string,\n elementKey: string,\n): UnregisterMeasurableAction {\n return { type: ActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerMeasurableEffect(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerMeasurable(documentKey, elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(documentKey, elementKey))\n }\n }\n}\n\nexport function changeElementBoxModels(\n changedElementBoxModels: Map<string, Map<string, BoxModel | null>>,\n): ChangeElementBoxModelsAction {\n return { type: ActionTypes.CHANGE_ELEMENT_BOX_MODELS, payload: { changedElementBoxModels } }\n}\n\nexport function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE, payload: { size } }\n}\n\nexport function changeDocumentElementScrollTop(\n scrollTop: number,\n): ChangeDocumentElementScrollTopAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP, payload: { scrollTop } }\n}\n\nexport function scrollDocumentElement(scrollTopDelta: number): ScrollDocumentElementAction {\n return { type: ActionTypes.SCROLL_DOCUMENT_ELEMENT, payload: { scrollTopDelta } }\n}\n\nexport function registerPropControllersHandle(\n documentKey: string,\n elementKey: string,\n handle: PropControllersHandle,\n): RegisterPropControllersHandleAction {\n return {\n type: ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey, handle },\n }\n}\n\nexport function unregisterPropControllersHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersHandleAction {\n return {\n type: ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerPropControllers(\n documentKey: string,\n elementKey: string,\n propControllers: Record<string, PropController>,\n): RegisterPropControllersAction {\n return {\n type: ActionTypes.REGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey, propControllers },\n }\n}\n\nexport function unregisterPropControllers(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersAction {\n return { type: ActionTypes.UNREGISTER_PROP_CONTROLLERS, payload: { documentKey, elementKey } }\n}\n\nexport function messageHostPropController<T>(\n documentKey: string,\n elementKey: string,\n propName: string,\n message: T,\n): MessageHostPropControllerAction<T> {\n return {\n type: ActionTypes.MESSAGE_HOST_PROP_CONTROLLER,\n payload: { documentKey, elementKey, propName, message },\n }\n}\n\nexport function messageBuilderPropController<T>(\n documentKey: string,\n elementKey: string,\n propName: string,\n message: T,\n): MessageBuilderPropControllerAction<T> {\n return {\n type: ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER,\n payload: { documentKey, elementKey, propName, message },\n }\n}\n\nexport function changeApiResource(resource: APIResource): ChangeAPIResourceAction {\n return { type: ActionTypes.CHANGE_API_RESOURCE, payload: { resource } }\n}\n\nexport function evictApiResource(id: string): EvictAPIResourceAction {\n return { type: ActionTypes.EVICT_API_RESOURCE, payload: { id } }\n}\n"],"names":[],"mappings":"AAcO,MAAM,cAAc;AAAA,EACzB,MAAM;AAAA,EACN,UAAU;AAAA,EAEV,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EAErB,iBAAiB;AAAA,EAEjB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EAEtB,4BAA4B;AAAA,EAC5B,8BAA8B;AAAA,EAE9B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAE5B,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EAEnB,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAE7B,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EAEvB,2BAA2B;AAAA,EAE3B,8BAA8B;AAAA,EAC9B,oCAAoC;AAAA,EACpC,yBAAyB;AAAA,EAEzB,kCAAkC;AAAA,EAClC,oCAAoC;AAAA,EACpC,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,iCAAiC;AAAA,EAEjC,qBAAqB;AAAA,EACrB,oBAAoB;AACtB;AAwLmC,gBAAA;AAC1B,SAAA,EAAE,MAAM,YAAY;AAC7B;AAEyC,mBAAA;AAChC,SAAA,EAAE,MAAM,YAAY;AAC7B;AAEO,0BAA0B,UAA4C;AACpE,SAAA,EAAE,MAAM,YAAY,mBAAmB,SAAS,EAAE,aAAa,SAAS,KAAK,SAAA;AACtF;AAEO,4BAA4B,aAA+C;AAChF,SAAO,EAAE,MAAM,YAAY,qBAAqB,SAAS,EAAE;AAC7D;AAcO,wBAAwB,aAAqB,WAA4C;AACvF,SAAA,EAAE,MAAM,YAAY,iBAAiB,SAAS,EAAE,aAAa;AACtE;AAGE,2B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B,SAAA,EAAE,MAAM,YAAY,6BAA6B,SAAS,EAAE,aAAa;AAClF;AAGE,mCAAA,aACA,YACA,UACA,SACoC;AAC7B,SAAA;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,SAAS,EAAE,aAAa,YAAY,UAAU,QAAQ;AAAA,EAAA;AAE1D;AAGE,sCAAA,aACA,YACA,UACA,SACuC;AAChC,SAAA;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,SAAS,EAAE,aAAa,YAAY,UAAU,QAAQ;AAAA,EAAA;AAE1D;AAEO,2BAA2B,UAAgD;AAChF,SAAO,EAAE,MAAM,YAAY,qBAAqB,SAAS,EAAE;AAC7D;AAEO,0BAA0B,IAAoC;AACnE,SAAO,EAAE,MAAM,YAAY,oBAAoB,SAAS,EAAE;AAC5D;;"}
|
package/dist/components.cjs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
var react = require("./react.cjs2.js");
|
|
4
|
+
var Page = require("./Page.cjs.js");
|
|
4
5
|
require("react");
|
|
5
6
|
require("use-sync-external-store/shim/with-selector");
|
|
6
7
|
require("@apollo/client");
|
|
@@ -11,7 +12,11 @@ require("./actions.cjs.js");
|
|
|
11
12
|
require("./descriptors.cjs.js");
|
|
12
13
|
require("styled-components");
|
|
13
14
|
require("framer-motion");
|
|
15
|
+
require("@apollo/client/react/ssr");
|
|
16
|
+
require("uuid/v4");
|
|
14
17
|
require("react/jsx-runtime");
|
|
18
|
+
require("html-react-parser");
|
|
19
|
+
require("next/head");
|
|
15
20
|
require("./box-models.cjs.js");
|
|
16
21
|
require("css-box-model");
|
|
17
22
|
require("next/image");
|
|
@@ -21,7 +26,7 @@ require("scroll-into-view-if-needed");
|
|
|
21
26
|
require("next/link");
|
|
22
27
|
require("react-use-gesture");
|
|
23
28
|
require("@popmotion/popcorn");
|
|
24
|
-
require("
|
|
29
|
+
require("formik");
|
|
25
30
|
require("polished");
|
|
26
31
|
require("slate");
|
|
27
32
|
require("slate-hotkeys");
|
|
@@ -41,6 +46,7 @@ exports.DEFAULT_ITEM_ANIMATE_TYPE = react.DEFAULT_ITEM_ANIMATE_TYPE;
|
|
|
41
46
|
exports.DEFAULT_ITEM_STAGGER_DURATION = react.DEFAULT_ITEM_STAGGER_DURATION;
|
|
42
47
|
exports.Divider = react.Divider;
|
|
43
48
|
exports.Embed = react.Embed;
|
|
49
|
+
exports.Form = react.Form;
|
|
44
50
|
exports.Image = react.ImageComponent;
|
|
45
51
|
exports.Navigation = react.Navigation;
|
|
46
52
|
exports.Root = react.Root;
|
|
@@ -57,4 +63,13 @@ exports.cssTextStyle = react.cssTextStyle;
|
|
|
57
63
|
exports.cssWidth = react.cssWidth;
|
|
58
64
|
exports.registerBuiltinComponents = react.registerBuiltinComponents;
|
|
59
65
|
exports.registerComponent = react.registerComponent;
|
|
66
|
+
exports.useBackgrounds = react.useBackgrounds;
|
|
67
|
+
exports.useBorder = react.useBorder;
|
|
68
|
+
exports.useBoxShadow = react.useBoxShadow;
|
|
69
|
+
exports.useColor = react.useColor;
|
|
70
|
+
exports.useFile = react.useFile;
|
|
71
|
+
exports.useMediaQuery = react.useMediaQuery;
|
|
72
|
+
exports.usePage = react.usePage;
|
|
73
|
+
exports.useTable = react.useTable;
|
|
74
|
+
exports.Page = Page.Page;
|
|
60
75
|
//# sourceMappingURL=components.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/components.es.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { B as Box, c as Button, C as Carousel, d as Countdown,
|
|
1
|
+
export { B as Box, c as Button, C as Carousel, d as Countdown, j as DEFAULT_BOX_ANIMATE_DELAY, k as DEFAULT_BOX_ANIMATE_DURATION, i as DEFAULT_BOX_ANIMATE_TYPE, m as DEFAULT_ITEM_ANIMATE_DELAY, n as DEFAULT_ITEM_ANIMATE_DURATION, l as DEFAULT_ITEM_ANIMATE_TYPE, o as DEFAULT_ITEM_STAGGER_DURATION, e as Divider, f as Embed, F as Form, I as Image, N as Navigation, g as Root, S as SocialLinks, T as Text, v as cssBorder, w as cssBorderRadius, x as cssBoxShadow, y as cssGridItem, s as cssMargin, p as cssMediaRules, t as cssPadding, z as cssTextStyle, q as cssWidth, r as registerBuiltinComponents, h as registerComponent, A as useBackgrounds, G as useBorder, H as useBoxShadow, J as useColor, K as useFile, L as useMediaQuery, M as usePage, O as useTable } from "./react.es2.js";
|
|
2
|
+
export { P as Page } from "./Page.es.js";
|
|
2
3
|
import "react";
|
|
3
4
|
import "use-sync-external-store/shim/with-selector";
|
|
4
5
|
import "@apollo/client";
|
|
@@ -9,7 +10,11 @@ import "./actions.es.js";
|
|
|
9
10
|
import "./descriptors.es.js";
|
|
10
11
|
import "styled-components";
|
|
11
12
|
import "framer-motion";
|
|
13
|
+
import "@apollo/client/react/ssr";
|
|
14
|
+
import "uuid/v4";
|
|
12
15
|
import "react/jsx-runtime";
|
|
16
|
+
import "html-react-parser";
|
|
17
|
+
import "next/head";
|
|
13
18
|
import "./box-models.es.js";
|
|
14
19
|
import "css-box-model";
|
|
15
20
|
import "next/image";
|
|
@@ -19,7 +24,7 @@ import "scroll-into-view-if-needed";
|
|
|
19
24
|
import "next/link";
|
|
20
25
|
import "react-use-gesture";
|
|
21
26
|
import "@popmotion/popcorn";
|
|
22
|
-
import "
|
|
27
|
+
import "formik";
|
|
23
28
|
import "polished";
|
|
24
29
|
import "slate";
|
|
25
30
|
import "slate-hotkeys";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/constants.cjs.js
CHANGED
|
@@ -154,12 +154,88 @@ const GlobalElementFragmentDoc = {
|
|
|
154
154
|
}
|
|
155
155
|
]
|
|
156
156
|
};
|
|
157
|
+
const TableFragmentDoc = {
|
|
158
|
+
kind: "Document",
|
|
159
|
+
definitions: [
|
|
160
|
+
{
|
|
161
|
+
kind: "FragmentDefinition",
|
|
162
|
+
name: { kind: "Name", value: "Table" },
|
|
163
|
+
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Table" } },
|
|
164
|
+
selectionSet: {
|
|
165
|
+
kind: "SelectionSet",
|
|
166
|
+
selections: [
|
|
167
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
|
168
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
169
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
|
170
|
+
{
|
|
171
|
+
kind: "Field",
|
|
172
|
+
name: { kind: "Name", value: "columns" },
|
|
173
|
+
selectionSet: {
|
|
174
|
+
kind: "SelectionSet",
|
|
175
|
+
selections: [
|
|
176
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
177
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
|
178
|
+
{
|
|
179
|
+
kind: "InlineFragment",
|
|
180
|
+
typeCondition: {
|
|
181
|
+
kind: "NamedType",
|
|
182
|
+
name: { kind: "Name", value: "MultipleSelectTableColumn" }
|
|
183
|
+
},
|
|
184
|
+
selectionSet: {
|
|
185
|
+
kind: "SelectionSet",
|
|
186
|
+
selections: [
|
|
187
|
+
{
|
|
188
|
+
kind: "Field",
|
|
189
|
+
name: { kind: "Name", value: "options" },
|
|
190
|
+
selectionSet: {
|
|
191
|
+
kind: "SelectionSet",
|
|
192
|
+
selections: [
|
|
193
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
194
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } }
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
kind: "InlineFragment",
|
|
203
|
+
typeCondition: {
|
|
204
|
+
kind: "NamedType",
|
|
205
|
+
name: { kind: "Name", value: "SingleSelectTableColumn" }
|
|
206
|
+
},
|
|
207
|
+
selectionSet: {
|
|
208
|
+
kind: "SelectionSet",
|
|
209
|
+
selections: [
|
|
210
|
+
{
|
|
211
|
+
kind: "Field",
|
|
212
|
+
name: { kind: "Name", value: "options" },
|
|
213
|
+
selectionSet: {
|
|
214
|
+
kind: "SelectionSet",
|
|
215
|
+
selections: [
|
|
216
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
217
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } }
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
};
|
|
157
232
|
const Fragments = {
|
|
158
233
|
Swatch: SwatchFragmentDoc,
|
|
159
234
|
File: FileFragmentDoc,
|
|
160
235
|
Typography: TypographyFragmentDoc,
|
|
161
236
|
PagePathnameSlice: PagePathnameSliceFragmentDoc,
|
|
162
|
-
GlobalElement: GlobalElementFragmentDoc
|
|
237
|
+
GlobalElement: GlobalElementFragmentDoc,
|
|
238
|
+
Table: TableFragmentDoc
|
|
163
239
|
};
|
|
164
240
|
exports.Fragments = Fragments;
|
|
165
241
|
//# sourceMappingURL=constants.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.cjs.js","sources":["../src/api/generated/graphql.ts","../src/api/constants.ts"],"sourcesContent":["import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'\nexport type SwatchFragment = {\n __typename: 'Swatch'\n id: string\n hue: number\n saturation: number\n lightness: number\n}\n\nexport type FileFragment = {\n __typename: 'File'\n id: string\n name: string\n publicUrl: any\n extension?: string | null\n dimensions?: { __typename?: 'ImageDimensions'; width: number; height: number } | null\n}\n\nexport type TypographyFragment = {\n __typename: 'Typography'\n id: string\n name: string\n style: Array<{\n __typename?: 'TypographyStyle'\n deviceId: string\n value: {\n __typename?: 'TypographyStyleValue'\n fontFamily?: string | null\n lineHeight?: number | null\n letterSpacing?: number | null\n fontWeight?: number | null\n textAlign?: string | null\n uppercase?: boolean | null\n underline?: boolean | null\n strikethrough?: boolean | null\n italic?: boolean | null\n fontSize?: { __typename?: 'Length'; value?: number | null; unit?: string | null } | null\n color?: { __typename?: 'Color'; swatchId?: string | null; alpha?: number | null } | null\n }\n }>\n}\n\nexport type PagePathnameSliceFragment = {\n __typename: 'PagePathnameSlice'\n id: string\n pathname: any\n}\n\nexport type GlobalElementFragment = { __typename: 'GlobalElement'; id: string; data: any }\n\nexport const SwatchFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Swatch' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Swatch' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'hue' } },\n { kind: 'Field', name: { kind: 'Name', value: 'saturation' } },\n { kind: 'Field', name: { kind: 'Name', value: 'lightness' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<SwatchFragment, unknown>\nexport const FileFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'File' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'File' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'publicUrl' } },\n { kind: 'Field', name: { kind: 'Name', value: 'extension' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'dimensions' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'width' } },\n { kind: 'Field', name: { kind: 'Name', value: 'height' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<FileFragment, unknown>\nexport const TypographyFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Typography' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Typography' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'style' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'deviceId' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'value' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'fontFamily' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'fontSize' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'value' } },\n { kind: 'Field', name: { kind: 'Name', value: 'unit' } },\n ],\n },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'color' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'swatchId' } },\n { kind: 'Field', name: { kind: 'Name', value: 'alpha' } },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'lineHeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'letterSpacing' } },\n { kind: 'Field', name: { kind: 'Name', value: 'fontWeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'textAlign' } },\n { kind: 'Field', name: { kind: 'Name', value: 'uppercase' } },\n { kind: 'Field', name: { kind: 'Name', value: 'underline' } },\n { kind: 'Field', name: { kind: 'Name', value: 'strikethrough' } },\n { kind: 'Field', name: { kind: 'Name', value: 'italic' } },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<TypographyFragment, unknown>\nexport const PagePathnameSliceFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'PagePathnameSlice' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'PagePathnameSlice' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'pathname' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<PagePathnameSliceFragment, unknown>\nexport const GlobalElementFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'GlobalElement' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'GlobalElement' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'data' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<GlobalElementFragment, unknown>\n","import type { DocumentNode } from 'graphql'\n\nimport {\n SwatchFragmentDoc,\n FileFragmentDoc,\n TypographyFragmentDoc,\n PagePathnameSliceFragmentDoc,\n GlobalElementFragmentDoc,\n} from './generated/graphql'\nimport type { APIResourceType } from './types'\n\nexport const Fragments: Record<APIResourceType, DocumentNode> = {\n Swatch: SwatchFragmentDoc,\n File: FileFragmentDoc,\n Typography: TypographyFragmentDoc,\n PagePathnameSlice: PagePathnameSliceFragmentDoc,\n GlobalElement: GlobalElementFragmentDoc,\n}\n"],"names":[],"mappings":";AAkDO,MAAM,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,QAAQ,OAAO,SAAS;AAAA,MACtC,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO,WAAW;AAAA,MAC5E,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,eAAe;AAAA,UAC7D,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,OAAO;AAAA,UACrD,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,QAAQ;AAAA,UACtD,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,eAAe;AAAA,UAC7D,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,cAAc;AAAA,QAC9D;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AACO,MAAM,kBAAkB;AAAA,EAC7B,MAAM;AAAA,EACN,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,QAAQ,OAAO,OAAO;AAAA,MACpC,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO,SAAS;AAAA,MAC1E,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAA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E,MAAM,QAAQ,OAAO,OAAO;AAAA,UACrD,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,SAAS;AAAA,QACzD;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;ACjMO,MAAM,YAAmD;AAAA,EAC9D,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,eAAe;AACjB;;"}
|
|
1
|
+
{"version":3,"file":"constants.cjs.js","sources":["../src/api/generated/graphql.ts","../src/api/constants.ts"],"sourcesContent":["import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'\nexport type SwatchFragment = {\n __typename: 'Swatch'\n id: string\n hue: number\n saturation: number\n lightness: number\n}\n\nexport type FileFragment = {\n __typename: 'File'\n id: string\n name: string\n publicUrl: any\n extension?: string | null\n dimensions?: { __typename?: 'ImageDimensions'; width: number; height: number } | null\n}\n\nexport type TypographyFragment = {\n __typename: 'Typography'\n id: string\n name: string\n style: Array<{\n __typename?: 'TypographyStyle'\n deviceId: string\n value: {\n __typename?: 'TypographyStyleValue'\n fontFamily?: string | null\n lineHeight?: number | null\n letterSpacing?: number | null\n fontWeight?: number | null\n textAlign?: string | null\n uppercase?: boolean | null\n underline?: boolean | null\n strikethrough?: boolean | null\n italic?: boolean | null\n fontSize?: { __typename?: 'Length'; value?: number | null; unit?: string | null } | null\n color?: { __typename?: 'Color'; swatchId?: string | null; alpha?: number | null } | null\n }\n }>\n}\n\nexport type PagePathnameSliceFragment = {\n __typename: 'PagePathnameSlice'\n id: string\n pathname: any\n}\n\nexport type GlobalElementFragment = { __typename: 'GlobalElement'; id: string; data: any }\n\nexport type TableFragment = {\n __typename: 'Table'\n id: string\n name: string\n columns: Array<\n | { __typename?: 'CheckboxTableColumn'; id: string; name: string }\n | { __typename?: 'EmailTableColumn'; id: string; name: string }\n | { __typename?: 'LongTextTableColumn'; id: string; name: string }\n | {\n __typename?: 'MultipleSelectTableColumn'\n id: string\n name: string\n options: Array<{ __typename?: 'MultipleSelectTableColumnOption'; id: string; name: string }>\n }\n | { __typename?: 'NumberTableColumn'; id: string; name: string }\n | { __typename?: 'PhoneNumberTableColumn'; id: string; name: string }\n | { __typename?: 'SingleLineTextTableColumn'; id: string; name: string }\n | {\n __typename?: 'SingleSelectTableColumn'\n id: string\n name: string\n options: Array<{ __typename?: 'SingleSelectTableColumnOption'; id: string; name: string }>\n }\n | { __typename?: 'URLTableColumn'; id: string; name: string }\n >\n}\n\nexport const SwatchFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Swatch' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Swatch' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'hue' } },\n { kind: 'Field', name: { kind: 'Name', value: 'saturation' } },\n { kind: 'Field', name: { kind: 'Name', value: 'lightness' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<SwatchFragment, unknown>\nexport const FileFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'File' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'File' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'publicUrl' } },\n { kind: 'Field', name: { kind: 'Name', value: 'extension' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'dimensions' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'width' } },\n { kind: 'Field', name: { kind: 'Name', value: 'height' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<FileFragment, unknown>\nexport const TypographyFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Typography' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Typography' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'style' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'deviceId' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'value' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'fontFamily' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'fontSize' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'value' } },\n { kind: 'Field', name: { kind: 'Name', value: 'unit' } },\n ],\n },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'color' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'swatchId' } },\n { kind: 'Field', name: { kind: 'Name', value: 'alpha' } },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'lineHeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'letterSpacing' } },\n { kind: 'Field', name: { kind: 'Name', value: 'fontWeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'textAlign' } },\n { kind: 'Field', name: { kind: 'Name', value: 'uppercase' } },\n { kind: 'Field', name: { kind: 'Name', value: 'underline' } },\n { kind: 'Field', name: { kind: 'Name', value: 'strikethrough' } },\n { kind: 'Field', name: { kind: 'Name', value: 'italic' } },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<TypographyFragment, unknown>\nexport const PagePathnameSliceFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'PagePathnameSlice' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'PagePathnameSlice' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'pathname' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<PagePathnameSliceFragment, unknown>\nexport const GlobalElementFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'GlobalElement' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'GlobalElement' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'data' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<GlobalElementFragment, unknown>\nexport const TableFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Table' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Table' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'columns' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'InlineFragment',\n typeCondition: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'MultipleSelectTableColumn' },\n },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'options' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n ],\n },\n },\n ],\n },\n },\n {\n kind: 'InlineFragment',\n typeCondition: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'SingleSelectTableColumn' },\n },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'options' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<TableFragment, unknown>\n","import type { DocumentNode } from 'graphql'\n\nimport {\n SwatchFragmentDoc,\n FileFragmentDoc,\n TypographyFragmentDoc,\n PagePathnameSliceFragmentDoc,\n GlobalElementFragmentDoc,\n TableFragmentDoc,\n} from './generated/graphql'\nimport type { APIResourceType } from './types'\n\nexport const Fragments: Record<APIResourceType, DocumentNode> = {\n Swatch: SwatchFragmentDoc,\n File: FileFragmentDoc,\n Typography: TypographyFragmentDoc,\n PagePathnameSlice: PagePathnameSliceFragmentDoc,\n GlobalElement: GlobalElementFragmentDoc,\n Table: TableFragmentDoc,\n}\n"],"names":[],"mappings":";AA6EO,MAAM,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,QAAQ,OAAO,SAAS;AAAA,MACtC,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO,WAAW;AAAA,MAC5E,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;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MAAM,QAAQ,OAAO,OAAO;AAAA,4BACrD,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,SAAS;AAAA,0BACzD;AAAA,wBACF;AAAA,sBACF;AAAA,oBACF;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;ACtSO,MAAM,YAAmD;AAAA,EAC9D,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,eAAe;AAAA,EACf,OAAO;AACT;;"}
|
package/dist/constants.es.js
CHANGED
|
@@ -153,12 +153,88 @@ const GlobalElementFragmentDoc = {
|
|
|
153
153
|
}
|
|
154
154
|
]
|
|
155
155
|
};
|
|
156
|
+
const TableFragmentDoc = {
|
|
157
|
+
kind: "Document",
|
|
158
|
+
definitions: [
|
|
159
|
+
{
|
|
160
|
+
kind: "FragmentDefinition",
|
|
161
|
+
name: { kind: "Name", value: "Table" },
|
|
162
|
+
typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Table" } },
|
|
163
|
+
selectionSet: {
|
|
164
|
+
kind: "SelectionSet",
|
|
165
|
+
selections: [
|
|
166
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } },
|
|
167
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
168
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
|
169
|
+
{
|
|
170
|
+
kind: "Field",
|
|
171
|
+
name: { kind: "Name", value: "columns" },
|
|
172
|
+
selectionSet: {
|
|
173
|
+
kind: "SelectionSet",
|
|
174
|
+
selections: [
|
|
175
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
176
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
|
177
|
+
{
|
|
178
|
+
kind: "InlineFragment",
|
|
179
|
+
typeCondition: {
|
|
180
|
+
kind: "NamedType",
|
|
181
|
+
name: { kind: "Name", value: "MultipleSelectTableColumn" }
|
|
182
|
+
},
|
|
183
|
+
selectionSet: {
|
|
184
|
+
kind: "SelectionSet",
|
|
185
|
+
selections: [
|
|
186
|
+
{
|
|
187
|
+
kind: "Field",
|
|
188
|
+
name: { kind: "Name", value: "options" },
|
|
189
|
+
selectionSet: {
|
|
190
|
+
kind: "SelectionSet",
|
|
191
|
+
selections: [
|
|
192
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
193
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } }
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
kind: "InlineFragment",
|
|
202
|
+
typeCondition: {
|
|
203
|
+
kind: "NamedType",
|
|
204
|
+
name: { kind: "Name", value: "SingleSelectTableColumn" }
|
|
205
|
+
},
|
|
206
|
+
selectionSet: {
|
|
207
|
+
kind: "SelectionSet",
|
|
208
|
+
selections: [
|
|
209
|
+
{
|
|
210
|
+
kind: "Field",
|
|
211
|
+
name: { kind: "Name", value: "options" },
|
|
212
|
+
selectionSet: {
|
|
213
|
+
kind: "SelectionSet",
|
|
214
|
+
selections: [
|
|
215
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
216
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } }
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
};
|
|
156
231
|
const Fragments = {
|
|
157
232
|
Swatch: SwatchFragmentDoc,
|
|
158
233
|
File: FileFragmentDoc,
|
|
159
234
|
Typography: TypographyFragmentDoc,
|
|
160
235
|
PagePathnameSlice: PagePathnameSliceFragmentDoc,
|
|
161
|
-
GlobalElement: GlobalElementFragmentDoc
|
|
236
|
+
GlobalElement: GlobalElementFragmentDoc,
|
|
237
|
+
Table: TableFragmentDoc
|
|
162
238
|
};
|
|
163
239
|
export { Fragments as F };
|
|
164
240
|
//# sourceMappingURL=constants.es.js.map
|
package/dist/constants.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.es.js","sources":["../src/api/generated/graphql.ts","../src/api/constants.ts"],"sourcesContent":["import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'\nexport type SwatchFragment = {\n __typename: 'Swatch'\n id: string\n hue: number\n saturation: number\n lightness: number\n}\n\nexport type FileFragment = {\n __typename: 'File'\n id: string\n name: string\n publicUrl: any\n extension?: string | null\n dimensions?: { __typename?: 'ImageDimensions'; width: number; height: number } | null\n}\n\nexport type TypographyFragment = {\n __typename: 'Typography'\n id: string\n name: string\n style: Array<{\n __typename?: 'TypographyStyle'\n deviceId: string\n value: {\n __typename?: 'TypographyStyleValue'\n fontFamily?: string | null\n lineHeight?: number | null\n letterSpacing?: number | null\n fontWeight?: number | null\n textAlign?: string | null\n uppercase?: boolean | null\n underline?: boolean | null\n strikethrough?: boolean | null\n italic?: boolean | null\n fontSize?: { __typename?: 'Length'; value?: number | null; unit?: string | null } | null\n color?: { __typename?: 'Color'; swatchId?: string | null; alpha?: number | null } | null\n }\n }>\n}\n\nexport type PagePathnameSliceFragment = {\n __typename: 'PagePathnameSlice'\n id: string\n pathname: any\n}\n\nexport type GlobalElementFragment = { __typename: 'GlobalElement'; id: string; data: any }\n\nexport const SwatchFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Swatch' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Swatch' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'hue' } },\n { kind: 'Field', name: { kind: 'Name', value: 'saturation' } },\n { kind: 'Field', name: { kind: 'Name', value: 'lightness' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<SwatchFragment, unknown>\nexport const FileFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'File' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'File' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'publicUrl' } },\n { kind: 'Field', name: { kind: 'Name', value: 'extension' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'dimensions' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'width' } },\n { kind: 'Field', name: { kind: 'Name', value: 'height' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<FileFragment, unknown>\nexport const TypographyFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Typography' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Typography' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'style' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'deviceId' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'value' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'fontFamily' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'fontSize' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'value' } },\n { kind: 'Field', name: { kind: 'Name', value: 'unit' } },\n ],\n },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'color' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'swatchId' } },\n { kind: 'Field', name: { kind: 'Name', value: 'alpha' } },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'lineHeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'letterSpacing' } },\n { kind: 'Field', name: { kind: 'Name', value: 'fontWeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'textAlign' } },\n { kind: 'Field', name: { kind: 'Name', value: 'uppercase' } },\n { kind: 'Field', name: { kind: 'Name', value: 'underline' } },\n { kind: 'Field', name: { kind: 'Name', value: 'strikethrough' } },\n { kind: 'Field', name: { kind: 'Name', value: 'italic' } },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<TypographyFragment, unknown>\nexport const PagePathnameSliceFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'PagePathnameSlice' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'PagePathnameSlice' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'pathname' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<PagePathnameSliceFragment, unknown>\nexport const GlobalElementFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'GlobalElement' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'GlobalElement' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'data' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<GlobalElementFragment, unknown>\n","import type { DocumentNode } from 'graphql'\n\nimport {\n SwatchFragmentDoc,\n FileFragmentDoc,\n TypographyFragmentDoc,\n PagePathnameSliceFragmentDoc,\n GlobalElementFragmentDoc,\n} from './generated/graphql'\nimport type { APIResourceType } from './types'\n\nexport const Fragments: Record<APIResourceType, DocumentNode> = {\n Swatch: SwatchFragmentDoc,\n File: FileFragmentDoc,\n Typography: TypographyFragmentDoc,\n PagePathnameSlice: PagePathnameSliceFragmentDoc,\n GlobalElement: GlobalElementFragmentDoc,\n}\n"],"names":[],"mappings":"AAkDO,MAAM,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,QAAQ,OAAO,SAAS;AAAA,MACtC,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO,WAAW;AAAA,MAC5E,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,eAAe;AAAA,UAC7D,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,OAAO;AAAA,UACrD,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,QAAQ;AAAA,UACtD,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,eAAe;AAAA,UAC7D,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,cAAc;AAAA,QAC9D;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AACO,MAAM,kBAAkB;AAAA,EAC7B,MAAM;AAAA,EACN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Q,OAAO,gBAAgB;AAAA,MAC7C,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO,kBAAkB;AAAA,MACnF,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,eAAe;AAAA,UAC7D,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,OAAO;AAAA,UACrD,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,SAAS;AAAA,QACzD;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;ACjMO,MAAM,YAAmD;AAAA,EAC9D,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,eAAe;AACjB;;"}
|
|
1
|
+
{"version":3,"file":"constants.es.js","sources":["../src/api/generated/graphql.ts","../src/api/constants.ts"],"sourcesContent":["import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'\nexport type SwatchFragment = {\n __typename: 'Swatch'\n id: string\n hue: number\n saturation: number\n lightness: number\n}\n\nexport type FileFragment = {\n __typename: 'File'\n id: string\n name: string\n publicUrl: any\n extension?: string | null\n dimensions?: { __typename?: 'ImageDimensions'; width: number; height: number } | null\n}\n\nexport type TypographyFragment = {\n __typename: 'Typography'\n id: string\n name: string\n style: Array<{\n __typename?: 'TypographyStyle'\n deviceId: string\n value: {\n __typename?: 'TypographyStyleValue'\n fontFamily?: string | null\n lineHeight?: number | null\n letterSpacing?: number | null\n fontWeight?: number | null\n textAlign?: string | null\n uppercase?: boolean | null\n underline?: boolean | null\n strikethrough?: boolean | null\n italic?: boolean | null\n fontSize?: { __typename?: 'Length'; value?: number | null; unit?: string | null } | null\n color?: { __typename?: 'Color'; swatchId?: string | null; alpha?: number | null } | null\n }\n }>\n}\n\nexport type PagePathnameSliceFragment = {\n __typename: 'PagePathnameSlice'\n id: string\n pathname: any\n}\n\nexport type GlobalElementFragment = { __typename: 'GlobalElement'; id: string; data: any }\n\nexport type TableFragment = {\n __typename: 'Table'\n id: string\n name: string\n columns: Array<\n | { __typename?: 'CheckboxTableColumn'; id: string; name: string }\n | { __typename?: 'EmailTableColumn'; id: string; name: string }\n | { __typename?: 'LongTextTableColumn'; id: string; name: string }\n | {\n __typename?: 'MultipleSelectTableColumn'\n id: string\n name: string\n options: Array<{ __typename?: 'MultipleSelectTableColumnOption'; id: string; name: string }>\n }\n | { __typename?: 'NumberTableColumn'; id: string; name: string }\n | { __typename?: 'PhoneNumberTableColumn'; id: string; name: string }\n | { __typename?: 'SingleLineTextTableColumn'; id: string; name: string }\n | {\n __typename?: 'SingleSelectTableColumn'\n id: string\n name: string\n options: Array<{ __typename?: 'SingleSelectTableColumnOption'; id: string; name: string }>\n }\n | { __typename?: 'URLTableColumn'; id: string; name: string }\n >\n}\n\nexport const SwatchFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Swatch' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Swatch' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'hue' } },\n { kind: 'Field', name: { kind: 'Name', value: 'saturation' } },\n { kind: 'Field', name: { kind: 'Name', value: 'lightness' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<SwatchFragment, unknown>\nexport const FileFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'File' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'File' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'publicUrl' } },\n { kind: 'Field', name: { kind: 'Name', value: 'extension' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'dimensions' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'width' } },\n { kind: 'Field', name: { kind: 'Name', value: 'height' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<FileFragment, unknown>\nexport const TypographyFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Typography' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Typography' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'style' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'deviceId' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'value' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'fontFamily' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'fontSize' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'value' } },\n { kind: 'Field', name: { kind: 'Name', value: 'unit' } },\n ],\n },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'color' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'swatchId' } },\n { kind: 'Field', name: { kind: 'Name', value: 'alpha' } },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'lineHeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'letterSpacing' } },\n { kind: 'Field', name: { kind: 'Name', value: 'fontWeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'textAlign' } },\n { kind: 'Field', name: { kind: 'Name', value: 'uppercase' } },\n { kind: 'Field', name: { kind: 'Name', value: 'underline' } },\n { kind: 'Field', name: { kind: 'Name', value: 'strikethrough' } },\n { kind: 'Field', name: { kind: 'Name', value: 'italic' } },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<TypographyFragment, unknown>\nexport const PagePathnameSliceFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'PagePathnameSlice' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'PagePathnameSlice' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'pathname' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<PagePathnameSliceFragment, unknown>\nexport const GlobalElementFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'GlobalElement' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'GlobalElement' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'data' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<GlobalElementFragment, unknown>\nexport const TableFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Table' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Table' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'columns' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'InlineFragment',\n typeCondition: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'MultipleSelectTableColumn' },\n },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'options' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n ],\n },\n },\n ],\n },\n },\n {\n kind: 'InlineFragment',\n typeCondition: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'SingleSelectTableColumn' },\n },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'options' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<TableFragment, unknown>\n","import type { DocumentNode } from 'graphql'\n\nimport {\n SwatchFragmentDoc,\n FileFragmentDoc,\n TypographyFragmentDoc,\n PagePathnameSliceFragmentDoc,\n GlobalElementFragmentDoc,\n TableFragmentDoc,\n} from './generated/graphql'\nimport type { APIResourceType } from './types'\n\nexport const Fragments: Record<APIResourceType, DocumentNode> = {\n Swatch: SwatchFragmentDoc,\n File: FileFragmentDoc,\n Typography: TypographyFragmentDoc,\n PagePathnameSlice: PagePathnameSliceFragmentDoc,\n GlobalElement: GlobalElementFragmentDoc,\n Table: TableFragmentDoc,\n}\n"],"names":[],"mappings":"AA6EO,M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AA0B;AAAA,kBACzD;AAAA,kBACA,cAAc;AAAA,oBACZ,MAAM;AAAA,oBACN,YAAY;AAAA,sBACV;AAAA,wBACE,MAAM;AAAA,wBACN,MAAM,EAAE,MAAM,QAAQ,OAAO,UAAU;AAAA,wBACvC,cAAc;AAAA,0BACZ,MAAM;AAAA,0BACN,YAAY;AAAA,4BACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,OAAO;AAAA,4BACrD,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO,SAAS;AAAA,0BACzD;AAAA,wBACF;AAAA,sBACF;AAAA,oBACF;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;ACtSO,MAAM,YAAmD;AAAA,EAC9D,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,eAAe;AAAA,EACf,OAAO;AACT;;"}
|
|
@@ -42,25 +42,77 @@ function deserializeFunction(serializedFunction) {
|
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
+
function serializeShapeControl(control) {
|
|
46
|
+
const { type } = control.options;
|
|
47
|
+
const transferables = [];
|
|
48
|
+
const serializedType = {};
|
|
49
|
+
Object.entries(type).forEach(([key, control2]) => {
|
|
50
|
+
const [serializedControl, serializedControlTransferables] = serializeControl(control2);
|
|
51
|
+
serializedType[key] = serializedControl;
|
|
52
|
+
transferables.push(...serializedControlTransferables);
|
|
53
|
+
});
|
|
54
|
+
return [__spreadProps(__spreadValues({}, control), { options: __spreadProps(__spreadValues({}, control.options), { type: serializedType }) }), transferables];
|
|
55
|
+
}
|
|
56
|
+
function deserializeShapeControl(control) {
|
|
57
|
+
const { type } = control.options;
|
|
58
|
+
const deserializedType = {};
|
|
59
|
+
Object.entries(type).forEach(([key, control2]) => {
|
|
60
|
+
deserializedType[key] = deserializeControl(control2);
|
|
61
|
+
});
|
|
62
|
+
return __spreadProps(__spreadValues({}, control), { options: __spreadProps(__spreadValues({}, control.options), { type: deserializedType }) });
|
|
63
|
+
}
|
|
45
64
|
function serializeListControl(control) {
|
|
46
|
-
const { getItemLabel } = control.options;
|
|
65
|
+
const { type, getItemLabel } = control.options;
|
|
66
|
+
const transferables = [];
|
|
67
|
+
const [serializedType, serializedTypeTransferables] = serializeControl(type);
|
|
47
68
|
const serializedGetItemLabel = getItemLabel && serializeFunction(getItemLabel);
|
|
69
|
+
transferables.push(...serializedTypeTransferables);
|
|
70
|
+
if (serializedGetItemLabel != null)
|
|
71
|
+
transferables.push(serializedGetItemLabel);
|
|
48
72
|
return [
|
|
49
|
-
__spreadProps(__spreadValues({}, control), {
|
|
50
|
-
|
|
73
|
+
__spreadProps(__spreadValues({}, control), {
|
|
74
|
+
options: __spreadProps(__spreadValues({}, control.options), {
|
|
75
|
+
type: serializedType,
|
|
76
|
+
getItemLabel: serializedGetItemLabel
|
|
77
|
+
})
|
|
78
|
+
}),
|
|
79
|
+
transferables
|
|
51
80
|
];
|
|
52
81
|
}
|
|
53
82
|
function deserializeListControl(serializedControl) {
|
|
54
|
-
const { getItemLabel } = serializedControl.options;
|
|
83
|
+
const { type, getItemLabel } = serializedControl.options;
|
|
84
|
+
const deserializedType = deserializeControl(type);
|
|
55
85
|
const deserializedGetItemLabel = getItemLabel && deserializeFunction(getItemLabel);
|
|
56
86
|
return __spreadProps(__spreadValues({}, serializedControl), {
|
|
57
|
-
options: __spreadProps(__spreadValues({}, serializedControl.options), {
|
|
87
|
+
options: __spreadProps(__spreadValues({}, serializedControl.options), {
|
|
88
|
+
type: deserializedType,
|
|
89
|
+
getItemLabel: deserializedGetItemLabel
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function serializeTypeaheadControl(control) {
|
|
94
|
+
const { getItems } = control.options;
|
|
95
|
+
const serializedGetItems = getItems && serializeFunction(getItems);
|
|
96
|
+
return [
|
|
97
|
+
__spreadProps(__spreadValues({}, control), { options: __spreadProps(__spreadValues({}, control.options), { getItems: serializedGetItems }) }),
|
|
98
|
+
serializedGetItems == null ? [] : [serializedGetItems]
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
function deserializeTypeaheadControl(serializedControl) {
|
|
102
|
+
const { getItems } = serializedControl.options;
|
|
103
|
+
const deserializedGetItems = getItems && deserializeFunction(getItems);
|
|
104
|
+
return __spreadProps(__spreadValues({}, serializedControl), {
|
|
105
|
+
options: __spreadProps(__spreadValues({}, serializedControl.options), { getItems: deserializedGetItems })
|
|
58
106
|
});
|
|
59
107
|
}
|
|
60
108
|
function serializeControl(control) {
|
|
61
109
|
switch (control.type) {
|
|
62
110
|
case descriptors.Types.List:
|
|
63
111
|
return serializeListControl(control);
|
|
112
|
+
case descriptors.Types.Shape:
|
|
113
|
+
return serializeShapeControl(control);
|
|
114
|
+
case descriptors.Types.Typeahead:
|
|
115
|
+
return serializeTypeaheadControl(control);
|
|
64
116
|
default:
|
|
65
117
|
return [control, []];
|
|
66
118
|
}
|
|
@@ -69,6 +121,10 @@ function deserializeControl(serializedControl) {
|
|
|
69
121
|
switch (serializedControl.type) {
|
|
70
122
|
case descriptors.Types.List:
|
|
71
123
|
return deserializeListControl(serializedControl);
|
|
124
|
+
case descriptors.Types.Shape:
|
|
125
|
+
return deserializeShapeControl(serializedControl);
|
|
126
|
+
case descriptors.Types.Typeahead:
|
|
127
|
+
return deserializeTypeaheadControl(serializedControl);
|
|
72
128
|
default:
|
|
73
129
|
return serializedControl;
|
|
74
130
|
}
|