@superblocksteam/library 1.99.99-next.2
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/LICENSE.txt +87 -0
- package/README.md +108 -0
- package/dist/allPaths-CCZMME3l.js +17 -0
- package/dist/allPaths-CCZMME3l.js.map +1 -0
- package/dist/allPaths-CHXNxDVP.js +17 -0
- package/dist/allPaths-CHXNxDVP.js.map +1 -0
- package/dist/allPathsLoader-DTWFaGcd.js +22 -0
- package/dist/allPathsLoader-DTWFaGcd.js.map +1 -0
- package/dist/allPathsLoader-Fr8EhLGp.js +22 -0
- package/dist/allPathsLoader-Fr8EhLGp.js.map +1 -0
- package/dist/icons-BrNMuu_I.js +40 -0
- package/dist/icons-BrNMuu_I.js.map +1 -0
- package/dist/index-BxzKdlqH.js +1353 -0
- package/dist/index-BxzKdlqH.js.map +1 -0
- package/dist/index-DIJYif9G.js +1341 -0
- package/dist/index-DIJYif9G.js.map +1 -0
- package/dist/index-DIn-fanT.js +1353 -0
- package/dist/index-DIn-fanT.js.map +1 -0
- package/dist/index-LHtbj0-V.js +1341 -0
- package/dist/index-LHtbj0-V.js.map +1 -0
- package/dist/index-U0oPeutu.js +189889 -0
- package/dist/index-U0oPeutu.js.map +1 -0
- package/dist/index.css +34239 -0
- package/dist/index.js +164 -0
- package/dist/index.js.map +1 -0
- package/dist/splitPathsBySizeLoader-DHk6oFvg.js +34 -0
- package/dist/splitPathsBySizeLoader-DHk6oFvg.js.map +1 -0
- package/dist/splitPathsBySizeLoader-PcZVWYaJ.js +34 -0
- package/dist/splitPathsBySizeLoader-PcZVWYaJ.js.map +1 -0
- package/dist-types/app-internal.d.ts +4 -0
- package/dist-types/docs-utils/generate-docs.d.ts +2 -0
- package/dist-types/edit-mode/collisions-layer.d.ts +3 -0
- package/dist-types/edit-mode/create-component.d.ts +8 -0
- package/dist-types/edit-mode/debug-tools.d.ts +11 -0
- package/dist-types/edit-mode/dnd/collision-detection.d.ts +3 -0
- package/dist-types/edit-mode/dnd/dnd-provider.d.ts +4 -0
- package/dist-types/edit-mode/dnd/draggable-widget.d.ts +7 -0
- package/dist-types/edit-mode/dnd/drop-layer.d.ts +5 -0
- package/dist-types/edit-mode/dnd/droppable-widget.d.ts +10 -0
- package/dist-types/edit-mode/dnd/grid-drop.d.ts +4 -0
- package/dist-types/edit-mode/dnd/grid-store.d.ts +33 -0
- package/dist-types/edit-mode/dnd/grid-utils.d.ts +8 -0
- package/dist-types/edit-mode/dnd/handle-grid-drop.d.ts +9 -0
- package/dist-types/edit-mode/dnd/handle-stack-drop.d.ts +9 -0
- package/dist-types/edit-mode/dnd/hooks/use-component-draggable.d.ts +5 -0
- package/dist-types/edit-mode/dnd/hooks/use-component-droppable.d.ts +6 -0
- package/dist-types/edit-mode/dnd/hooks/use-handle-dnd-events.d.ts +1 -0
- package/dist-types/edit-mode/dnd/hooks/use-widget-node-ref.d.ts +2 -0
- package/dist-types/edit-mode/dnd/new-components-drag-layer.d.ts +6 -0
- package/dist-types/edit-mode/dnd/stack-drop.d.ts +4 -0
- package/dist-types/edit-mode/dnd/stack-store.d.ts +10 -0
- package/dist-types/edit-mode/dnd/stack-utils.d.ts +13 -0
- package/dist-types/edit-mode/dnd/types.d.ts +45 -0
- package/dist-types/edit-mode/dnd/utils.d.ts +13 -0
- package/dist-types/edit-mode/duplicated-name-popover.d.ts +7 -0
- package/dist-types/edit-mode/edit-store.d.ts +28 -0
- package/dist-types/edit-mode/edit-wrapper.d.ts +18 -0
- package/dist-types/edit-mode/editor-hotkeys.d.ts +3 -0
- package/dist-types/edit-mode/features/connection-manager.d.ts +10 -0
- package/dist-types/edit-mode/features/drag-and-drop-store.d.ts +69 -0
- package/dist-types/edit-mode/features/interaction-layer-manager.d.ts +17 -0
- package/dist-types/edit-mode/features/operation-store.d.ts +49 -0
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +31 -0
- package/dist-types/edit-mode/features/resizing-store.d.ts +53 -0
- package/dist-types/edit-mode/features/runtime-entities-manager.d.ts +94 -0
- package/dist-types/edit-mode/features/runtime-widgets-manager.d.ts +55 -0
- package/dist-types/edit-mode/features/ui-store.d.ts +41 -0
- package/dist-types/edit-mode/hooks/use-register-source-element.d.ts +2 -0
- package/dist-types/edit-mode/iframe-wrappers.d.ts +4 -0
- package/dist-types/edit-mode/interaction-add-section-button.d.ts +4 -0
- package/dist-types/edit-mode/interaction-layer.d.ts +11 -0
- package/dist-types/edit-mode/interaction-rect-handles.d.ts +7 -0
- package/dist-types/edit-mode/interaction-rect-name-pill.d.ts +13 -0
- package/dist-types/edit-mode/interaction-rect.d.ts +44 -0
- package/dist-types/edit-mode/interaction-utils.d.ts +4 -0
- package/dist-types/edit-mode/mobx-sync/create-patch.d.ts +2 -0
- package/dist-types/edit-mode/mobx-sync/deep-observe.d.ts +24 -0
- package/dist-types/edit-mode/mobx-sync/mobx-editor-sync.d.ts +23 -0
- package/dist-types/edit-mode/properties.d.ts +13 -0
- package/dist-types/edit-mode/resize-capabilities.d.ts +5 -0
- package/dist-types/edit-mode/right-click-menu/right-click-menu.d.ts +14 -0
- package/dist-types/edit-mode/roots.d.ts +9 -0
- package/dist-types/edit-mode/runtime-children.d.ts +14 -0
- package/dist-types/edit-mode/sb-component-from-meta.d.ts +2 -0
- package/dist-types/edit-mode/source-update-api.d.ts +26 -0
- package/dist-types/edit-mode/superblocks-editor-bridge.d.ts +34 -0
- package/dist-types/internal-testing/components/api.d.ts +3 -0
- package/dist-types/internal-testing/components/button.d.ts +1 -0
- package/dist-types/internal-testing/components/checkbox.d.ts +1 -0
- package/dist-types/internal-testing/components/container.d.ts +1 -0
- package/dist-types/internal-testing/components/date-picker.d.ts +1 -0
- package/dist-types/internal-testing/components/dropdown.d.ts +1 -0
- package/dist-types/internal-testing/components/icon.d.ts +1 -0
- package/dist-types/internal-testing/components/image.d.ts +1 -0
- package/dist-types/internal-testing/components/input.d.ts +1 -0
- package/dist-types/internal-testing/components/key-value.d.ts +1 -0
- package/dist-types/internal-testing/components/modal.d.ts +1 -0
- package/dist-types/internal-testing/components/section-column.d.ts +1 -0
- package/dist-types/internal-testing/components/switch.d.ts +1 -0
- package/dist-types/internal-testing/components/table.d.ts +1 -0
- package/dist-types/internal-testing/components/timer.d.ts +3 -0
- package/dist-types/internal-testing/components/variable.d.ts +3 -0
- package/dist-types/internal-testing/utils.d.ts +5 -0
- package/dist-types/internal-testing/widgets.d.ts +2 -0
- package/dist-types/lib/hooks/use-alignment-styles.d.ts +9 -0
- package/dist-types/lib/hooks/use-cached-value.d.ts +11 -0
- package/dist-types/lib/hooks/use-callback-as-ref.d.ts +1 -0
- package/dist-types/lib/hooks/use-deep-memo.d.ts +9 -0
- package/dist-types/lib/hooks/use-editor-hotkeys.d.ts +3 -0
- package/dist-types/lib/hooks/use-element-rect.d.ts +7 -0
- package/dist-types/lib/hooks/use-observer-memo.d.ts +14 -0
- package/dist-types/lib/hooks/use-observer-memo.test.d.ts +1 -0
- package/dist-types/lib/hooks/use-pointer-down-outside.d.ts +15 -0
- package/dist-types/lib/hooks/use-stable-effect.d.ts +22 -0
- package/dist-types/lib/hooks/use-stable-effect.test.d.ts +1 -0
- package/dist-types/lib/index.d.ts +40 -0
- package/dist-types/lib/internal-details/actions-context.d.ts +9 -0
- package/dist-types/lib/internal-details/component-info-context.d.ts +10 -0
- package/dist-types/lib/internal-details/entities-state.d.ts +10 -0
- package/dist-types/lib/internal-details/entities.d.ts +5 -0
- package/dist-types/lib/internal-details/env.d.ts +1 -0
- package/dist-types/lib/internal-details/identifier-normalizer.d.ts +9 -0
- package/dist-types/lib/internal-details/is-sb-component.d.ts +7 -0
- package/dist-types/lib/internal-details/lib/devtools.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +97 -0
- package/dist-types/lib/internal-details/lib/evaluator/binding-extraction.d.ts +2 -0
- package/dist-types/lib/internal-details/lib/evaluator/binding-strings/transform-bindings.d.ts +6 -0
- package/dist-types/lib/internal-details/lib/evaluator/compute-engines.d.ts +20 -0
- package/dist-types/lib/internal-details/lib/evaluator/create-global-object.d.ts +7 -0
- package/dist-types/lib/internal-details/lib/evaluator/create-scope-proxy.d.ts +2 -0
- package/dist-types/lib/internal-details/lib/evaluator/deep-observe.d.ts +27 -0
- package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +83 -0
- package/dist-types/lib/internal-details/lib/evaluator/entity-types.d.ts +16 -0
- package/dist-types/lib/internal-details/lib/evaluator/lazy-function.d.ts +7 -0
- package/dist-types/lib/internal-details/lib/evaluator/names.d.ts +7 -0
- package/dist-types/lib/internal-details/lib/evaluator/pretty-print-function.d.ts +2 -0
- package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +32 -0
- package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/features/api-store.d.ts +36 -0
- package/dist-types/lib/internal-details/lib/features/api-utils.d.ts +77 -0
- package/dist-types/lib/internal-details/lib/features/component-registry.d.ts +27 -0
- package/dist-types/lib/internal-details/lib/features/injected-features.d.ts +8 -0
- package/dist-types/lib/internal-details/lib/features/name-manager.d.ts +36 -0
- package/dist-types/lib/internal-details/lib/iframe.d.ts +44 -0
- package/dist-types/lib/internal-details/lib/mobx-cached-getter.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/resolve-id-singleton.d.ts +4 -0
- package/dist-types/lib/internal-details/lib/root-store.d.ts +30 -0
- package/dist-types/lib/internal-details/lib/throttle.d.ts +2 -0
- package/dist-types/lib/internal-details/lib/types.d.ts +226 -0
- package/dist-types/lib/internal-details/reactive-component.d.ts +10 -0
- package/dist-types/lib/internal-details/sb-wrapper-notes.d.ts +1 -0
- package/dist-types/lib/internal-details/sb-wrapper.d.ts +14 -0
- package/dist-types/lib/internal-details/scope/global.d.ts +9 -0
- package/dist-types/lib/internal-details/scope/scope-context.d.ts +8 -0
- package/dist-types/lib/internal-details/scope/scope.d.ts +12 -0
- package/dist-types/lib/internal-details/size.d.ts +1 -0
- package/dist-types/lib/internal-details/theme-context.d.ts +8 -0
- package/dist-types/lib/internal-details/use-track-runtime-widget.d.ts +15 -0
- package/dist-types/lib/sb-trigger.d.ts +53 -0
- package/dist-types/lib/triggers/base.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +19 -0
- package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +21 -0
- package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/components/reset-component.d.ts +20 -0
- package/dist-types/lib/triggers/implementations/components/set-component-property.d.ts +20 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-app.d.ts +28 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-route.d.ts +23 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +26 -0
- package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +18 -0
- package/dist-types/lib/triggers/implementations/run-js.d.ts +18 -0
- package/dist-types/lib/triggers/implementations/set-profile.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/show-alert.d.ts +22 -0
- package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +15 -0
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +18 -0
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/trigger-event.d.ts +17 -0
- package/dist-types/lib/triggers/registry.d.ts +174 -0
- package/dist-types/lib/triggers/run-event-handlers.d.ts +10 -0
- package/dist-types/lib/user-facing/component-base/components/autolinked-text.d.ts +8 -0
- package/dist-types/lib/user-facing/component-base/components/button.d.ts +46 -0
- package/dist-types/lib/user-facing/component-base/components/checkbox.d.ts +12 -0
- package/dist-types/lib/user-facing/component-base/components/dropdown-select.d.ts +4 -0
- package/dist-types/lib/user-facing/component-base/components/dynamic-svg.d.ts +10 -0
- package/dist-types/lib/user-facing/component-base/components/expand-button.d.ts +8 -0
- package/dist-types/lib/user-facing/component-base/components/loading-animator.d.ts +4 -0
- package/dist-types/lib/user-facing/component-base/components/plain-link.d.ts +1 -0
- package/dist-types/lib/user-facing/component-base/components/popper.d.ts +20 -0
- package/dist-types/lib/user-facing/component-base/components/search-component.d.ts +19 -0
- package/dist-types/lib/user-facing/component-base/components/span-trunc-middle.d.ts +9 -0
- package/dist-types/lib/user-facing/component-base/components/switch.d.ts +6 -0
- package/dist-types/lib/user-facing/component-base/constants.d.ts +18 -0
- package/dist-types/lib/user-facing/component-base/error/error-inline-message.d.ts +36 -0
- package/dist-types/lib/user-facing/component-base/error/error-tooltip.d.ts +11 -0
- package/dist-types/lib/user-facing/component-base/error/error-utils.d.ts +13 -0
- package/dist-types/lib/user-facing/component-base/error/widget-errors-wrapper.d.ts +15 -0
- package/dist-types/lib/user-facing/component-base/error-boundary.d.ts +18 -0
- package/dist-types/lib/user-facing/component-base/sb-component.d.ts +18 -0
- package/dist-types/lib/user-facing/component-base/styles/button-styles.d.ts +16 -0
- package/dist-types/lib/user-facing/component-base/styles/hover-styles.d.ts +10 -0
- package/dist-types/lib/user-facing/component-base/styles/input-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/component-base/use-passthrough-props.d.ts +6 -0
- package/dist-types/lib/user-facing/component-base/utils/format-utils.d.ts +37 -0
- package/dist-types/lib/user-facing/component-base/utils/input-validation.d.ts +17 -0
- package/dist-types/lib/user-facing/components/button/index.d.ts +37 -0
- package/dist-types/lib/user-facing/components/button/props.d.ts +48 -0
- package/dist-types/lib/user-facing/components/checkbox/checkbox-component.d.ts +9 -0
- package/dist-types/lib/user-facing/components/checkbox/index.d.ts +43 -0
- package/dist-types/lib/user-facing/components/checkbox/props.d.ts +44 -0
- package/dist-types/lib/user-facing/components/checkbox/types.d.ts +19 -0
- package/dist-types/lib/user-facing/components/column/index.d.ts +51 -0
- package/dist-types/lib/user-facing/components/column/props.d.ts +45 -0
- package/dist-types/lib/user-facing/components/container/index.d.ts +63 -0
- package/dist-types/lib/user-facing/components/container/props.d.ts +58 -0
- package/dist-types/lib/user-facing/components/custom/context.d.ts +11 -0
- package/dist-types/lib/user-facing/components/custom/index.d.ts +2 -0
- package/dist-types/lib/user-facing/components/custom/register-custom-component.d.ts +27 -0
- package/dist-types/lib/user-facing/components/date-picker/constants.d.ts +8 -0
- package/dist-types/lib/user-facing/components/date-picker/date-picker-component.d.ts +29 -0
- package/dist-types/lib/user-facing/components/date-picker/date-picker.d.ts +2 -0
- package/dist-types/lib/user-facing/components/date-picker/index.d.ts +63 -0
- package/dist-types/lib/user-facing/components/date-picker/props.d.ts +65 -0
- package/dist-types/lib/user-facing/components/date-picker/props.test-d.d.ts +1 -0
- package/dist-types/lib/user-facing/components/date-picker/side-effects.d.ts +3 -0
- package/dist-types/lib/user-facing/components/date-picker/types.d.ts +40 -0
- package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +24 -0
- package/dist-types/lib/user-facing/components/dropdown/constants.d.ts +5 -0
- package/dist-types/lib/user-facing/components/dropdown/dropdown-component.d.ts +106 -0
- package/dist-types/lib/user-facing/components/dropdown/index.d.ts +73 -0
- package/dist-types/lib/user-facing/components/dropdown/multi-dropdown.d.ts +18 -0
- package/dist-types/lib/user-facing/components/dropdown/normalize-values.d.ts +2 -0
- package/dist-types/lib/user-facing/components/dropdown/props.d.ts +76 -0
- package/dist-types/lib/user-facing/components/dropdown/types.d.ts +89 -0
- package/dist-types/lib/user-facing/components/dropdown/utils.d.ts +8 -0
- package/dist-types/lib/user-facing/components/grid/calculations/calculate-constraints.d.ts +26 -0
- package/dist-types/lib/user-facing/components/grid/calculations/calculate-row-positions.d.ts +2 -0
- package/dist-types/lib/user-facing/components/grid/calculations/order-constraints.d.ts +2 -0
- package/dist-types/lib/user-facing/components/grid/index.d.ts +36 -0
- package/dist-types/lib/user-facing/components/grid/use-height-observer.d.ts +5 -0
- package/dist-types/lib/user-facing/components/grid/utils.d.ts +1 -0
- package/dist-types/lib/user-facing/components/icon/index.d.ts +22 -0
- package/dist-types/lib/user-facing/components/icon/props.d.ts +24 -0
- package/dist-types/lib/user-facing/components/image/image-component.d.ts +38 -0
- package/dist-types/lib/user-facing/components/image/index.d.ts +29 -0
- package/dist-types/lib/user-facing/components/image/props.d.ts +39 -0
- package/dist-types/lib/user-facing/components/input/constants.d.ts +24 -0
- package/dist-types/lib/user-facing/components/input/derived-properties.d.ts +5 -0
- package/dist-types/lib/user-facing/components/input/index.d.ts +96 -0
- package/dist-types/lib/user-facing/components/input/input-component.d.ts +57 -0
- package/dist-types/lib/user-facing/components/input/props.d.ts +100 -0
- package/dist-types/lib/user-facing/components/input/styles.d.ts +6 -0
- package/dist-types/lib/user-facing/components/input/types.d.ts +45 -0
- package/dist-types/lib/user-facing/components/input/utils.d.ts +15 -0
- package/dist-types/lib/user-facing/components/key-value/components/key-styles.d.ts +3 -0
- package/dist-types/lib/user-facing/components/key-value/components/property-key.d.ts +7 -0
- package/dist-types/lib/user-facing/components/key-value/components/property-value.d.ts +12 -0
- package/dist-types/lib/user-facing/components/key-value/components/value-styles.d.ts +6 -0
- package/dist-types/lib/user-facing/components/key-value/constants.d.ts +7 -0
- package/dist-types/lib/user-facing/components/key-value/derived-properties.d.ts +1 -0
- package/dist-types/lib/user-facing/components/key-value/index.d.ts +6 -0
- package/dist-types/lib/user-facing/components/key-value/key-value-component.d.ts +2 -0
- package/dist-types/lib/user-facing/components/key-value/properties-props.d.ts +45 -0
- package/dist-types/lib/user-facing/components/key-value/props.d.ts +38 -0
- package/dist-types/lib/user-facing/components/key-value/styles.d.ts +22 -0
- package/dist-types/lib/user-facing/components/key-value/types.d.ts +106 -0
- package/dist-types/lib/user-facing/components/key-value/utils.d.ts +11 -0
- package/dist-types/lib/user-facing/components/modal/constants.d.ts +8 -0
- package/dist-types/lib/user-facing/components/modal/index.d.ts +49 -0
- package/dist-types/lib/user-facing/components/modal/modal-component.d.ts +37 -0
- package/dist-types/lib/user-facing/components/modal/props.d.ts +46 -0
- package/dist-types/lib/user-facing/components/page/index.d.ts +13 -0
- package/dist-types/lib/user-facing/components/page/props.d.ts +15 -0
- package/dist-types/lib/user-facing/components/page/register-page.d.ts +2 -0
- package/dist-types/lib/user-facing/components/section/index.d.ts +22 -0
- package/dist-types/lib/user-facing/components/section/props.d.ts +25 -0
- package/dist-types/lib/user-facing/components/slideout/index.d.ts +1 -0
- package/dist-types/lib/user-facing/components/slideout/props.d.ts +15 -0
- package/dist-types/lib/user-facing/components/stack/index.d.ts +60 -0
- package/dist-types/lib/user-facing/components/switch/index.d.ts +44 -0
- package/dist-types/lib/user-facing/components/switch/props.d.ts +45 -0
- package/dist-types/lib/user-facing/components/switch/switch-component.d.ts +5 -0
- package/dist-types/lib/user-facing/components/switch/types.d.ts +19 -0
- package/dist-types/lib/user-facing/components/table/column-properties-panel.d.ts +178 -0
- package/dist-types/lib/user-facing/components/table/components/autotooltip-component.d.ts +17 -0
- package/dist-types/lib/user-facing/components/table/components/boolean-value-icons.d.ts +16 -0
- package/dist-types/lib/user-facing/components/table/components/column-settings.d.ts +11 -0
- package/dist-types/lib/user-facing/components/table/components/edit-cell.d.ts +15 -0
- package/dist-types/lib/user-facing/components/table/components/edit-checkbox-cell.d.ts +11 -0
- package/dist-types/lib/user-facing/components/table/components/edit-date-cell.d.ts +12 -0
- package/dist-types/lib/user-facing/components/table/components/edit-input-cell.d.ts +14 -0
- package/dist-types/lib/user-facing/components/table/components/edit-multi-select-cell.d.ts +13 -0
- package/dist-types/lib/user-facing/components/table/components/edit-single-select-cell.d.ts +13 -0
- package/dist-types/lib/user-facing/components/table/components/edit-utils.d.ts +28 -0
- package/dist-types/lib/user-facing/components/table/components/editable-link-cell.d.ts +20 -0
- package/dist-types/lib/user-facing/components/table/components/filter-popover-content.d.ts +37 -0
- package/dist-types/lib/user-facing/components/table/components/popover-video.d.ts +5 -0
- package/dist-types/lib/user-facing/components/table/components/table-action-icon.d.ts +13 -0
- package/dist-types/lib/user-facing/components/table/components/table-column-header-button.d.ts +19 -0
- package/dist-types/lib/user-facing/components/table/components/table-data-download.d.ts +15 -0
- package/dist-types/lib/user-facing/components/table/components/table-footer.d.ts +40 -0
- package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +62 -0
- package/dist-types/lib/user-facing/components/table/components/table-loading-state.d.ts +11 -0
- package/dist-types/lib/user-facing/components/table/components/table-pagination-input.d.ts +10 -0
- package/dist-types/lib/user-facing/components/table/components/table-pagination.d.ts +18 -0
- package/dist-types/lib/user-facing/components/table/components/table-row-context-menu.d.ts +17 -0
- package/dist-types/lib/user-facing/components/table/components/table-tag.d.ts +25 -0
- package/dist-types/lib/user-facing/components/table/constants.d.ts +111 -0
- package/dist-types/lib/user-facing/components/table/derived-properties.d.ts +20 -0
- package/dist-types/lib/user-facing/components/table/index.d.ts +255 -0
- package/dist-types/lib/user-facing/components/table/props.d.ts +259 -0
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +100 -0
- package/dist-types/lib/user-facing/components/table/table-manager.d.ts +23 -0
- package/dist-types/lib/user-facing/components/table/table-styles.d.ts +78 -0
- package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +147 -0
- package/dist-types/lib/user-facing/components/table/table-widget.d.ts +148 -0
- package/dist-types/lib/user-facing/components/table/types.d.ts +471 -0
- package/dist-types/lib/user-facing/components/table/use-sticky.d.ts +1 -0
- package/dist-types/lib/user-facing/components/table/utils.d.ts +2 -0
- package/dist-types/lib/user-facing/components/text/index.d.ts +51 -0
- package/dist-types/lib/user-facing/components/text/long-text-button.d.ts +8 -0
- package/dist-types/lib/user-facing/components/text/props.d.ts +60 -0
- package/dist-types/lib/user-facing/components/text/styles.d.ts +2 -0
- package/dist-types/lib/user-facing/components/text/utils.d.ts +25 -0
- package/dist-types/lib/user-facing/constants.d.ts +2 -0
- package/dist-types/lib/user-facing/entities/api/index.d.ts +14 -0
- package/dist-types/lib/user-facing/entities/api/props.d.ts +20 -0
- package/dist-types/lib/user-facing/entities/timer/index.d.ts +16 -0
- package/dist-types/lib/user-facing/entities/timer/props.d.ts +19 -0
- package/dist-types/lib/user-facing/entities/variable/index.d.ts +14 -0
- package/dist-types/lib/user-facing/entities/variable/props.d.ts +13 -0
- package/dist-types/lib/user-facing/global-functions.d.ts +23 -0
- package/dist-types/lib/user-facing/hooks/use-editor.d.ts +42 -0
- package/dist-types/lib/user-facing/hooks/use-update-properties.d.ts +1 -0
- package/dist-types/lib/user-facing/icons/constants.d.ts +8 -0
- package/dist-types/lib/user-facing/icons/encoded.d.ts +1 -0
- package/dist-types/lib/user-facing/icons/helpers.d.ts +21 -0
- package/dist-types/lib/user-facing/icons/index.d.ts +2 -0
- package/dist-types/lib/user-facing/internal-index.d.ts +4 -0
- package/dist-types/lib/user-facing/layers.d.ts +43 -0
- package/dist-types/lib/user-facing/properties-panel/constants.d.ts +1 -0
- package/dist-types/lib/user-facing/properties-panel/create-managed-props-list.d.ts +5 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +22 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +12 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +44 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/layout-section.d.ts +114 -0
- package/dist-types/lib/user-facing/properties-panel/properties-panel-definition.d.ts +6 -0
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +253 -0
- package/dist-types/lib/user-facing/properties-panel/props-builder.test-d.d.ts +1 -0
- package/dist-types/lib/user-facing/properties-panel/props-panel-utils.d.ts +3 -0
- package/dist-types/lib/user-facing/properties-panel/validators.d.ts +33 -0
- package/dist-types/lib/user-facing/sb-event-flow.d.ts +52 -0
- package/dist-types/lib/user-facing/sb-provider.d.ts +12 -0
- package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +6 -0
- package/dist-types/lib/user-facing/state/create-scope.d.ts +17 -0
- package/dist-types/lib/user-facing/state/sb-computed.d.ts +2 -0
- package/dist-types/lib/user-facing/state/types.d.ts +17 -0
- package/dist-types/lib/user-facing/styling/color-utils.d.ts +13 -0
- package/dist-types/lib/user-facing/styling/colors.d.ts +67 -0
- package/dist-types/lib/user-facing/styling/style-as-class.d.ts +1 -0
- package/dist-types/lib/user-facing/styling/styles.d.ts +4 -0
- package/dist-types/lib/user-facing/styling/widget-label-styles.d.ts +11 -0
- package/dist-types/lib/user-facing/themes/classnames.d.ts +72 -0
- package/dist-types/lib/user-facing/themes/constants.d.ts +80 -0
- package/dist-types/lib/user-facing/themes/default-theme.d.ts +8 -0
- package/dist-types/lib/user-facing/themes/generate-border-css.d.ts +25 -0
- package/dist-types/lib/user-facing/themes/generate-border-styles.d.ts +15 -0
- package/dist-types/lib/user-facing/themes/generate-class-name.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generate-colors.d.ts +45 -0
- package/dist-types/lib/user-facing/themes/generate-theme.d.ts +3 -0
- package/dist-types/lib/user-facing/themes/generate-typographies.d.ts +5 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/button-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/container-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/datepicker-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/dropdown-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/editor-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/generate-component-styles.d.ts +16 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/generate-padding-style.d.ts +19 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/icon-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/input-styles.d.ts +3 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/paginator-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/popper-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/styles-utils.d.ts +1 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/text-styles.d.ts +3 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/theme-styles.d.ts +5 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/utils.d.ts +23 -0
- package/dist-types/lib/user-facing/themes/index.d.ts +5 -0
- package/dist-types/lib/user-facing/themes/layers.d.ts +6 -0
- package/dist-types/lib/user-facing/themes/padding-constants.d.ts +10 -0
- package/dist-types/lib/user-facing/themes/typeface-constants.d.ts +3 -0
- package/dist-types/lib/user-facing/themes/typefaces/utils.d.ts +28 -0
- package/dist-types/lib/user-facing/themes/typeography/typography-utils.d.ts +33 -0
- package/dist-types/lib/user-facing/themes/typeography/use-typography-styling.d.ts +15 -0
- package/dist-types/lib/user-facing/themes/typography-constants.d.ts +34 -0
- package/dist-types/lib/user-facing/themes/utils.d.ts +16 -0
- package/dist-types/lib/user-facing/types.d.ts +22 -0
- package/dist-types/lib/user-facing/utils/form.d.ts +10 -0
- package/dist-types/lib/utils/clean-object.d.ts +5 -0
- package/dist-types/lib/utils/fast-clone.d.ts +1 -0
- package/dist-types/lib/utils/generate-id.d.ts +1 -0
- package/dist-types/lib/utils/is-user-on-mac.d.ts +1 -0
- package/dist-types/lib/utils/is-widget-grid.d.ts +2 -0
- package/dist-types/lib/utils/is-widget-vstack.d.ts +2 -0
- package/dist-types/lib/utils/shallow-equal.d.ts +1 -0
- package/dist-types/lib/utils/widget-wrapper-naming.d.ts +6 -0
- package/dist-types/main.d.ts +1 -0
- package/package.json +151 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ValidStepDef } from "./triggers/registry.js";
|
|
2
|
+
import type { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
3
|
+
type ApplicationScope = "APP" | "PAGE";
|
|
4
|
+
type WidgetTypes = string;
|
|
5
|
+
export type SelectedStateVarProps = {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
scope?: ApplicationScope;
|
|
9
|
+
};
|
|
10
|
+
export type SelectedEventProps = {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
scope?: ApplicationScope;
|
|
14
|
+
};
|
|
15
|
+
export type SelectedWidgetProps = {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
type: WidgetTypes;
|
|
19
|
+
};
|
|
20
|
+
export type SelectedTimerProps = {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
scope: ApplicationScope;
|
|
24
|
+
};
|
|
25
|
+
export interface BaseStepDef {
|
|
26
|
+
id: string;
|
|
27
|
+
type: TriggerStepType;
|
|
28
|
+
}
|
|
29
|
+
export type StepDef = {
|
|
30
|
+
id: string;
|
|
31
|
+
} | ValidStepDef;
|
|
32
|
+
export type RuntimeEventData = {
|
|
33
|
+
path: string;
|
|
34
|
+
stepDefs: StepDef[];
|
|
35
|
+
};
|
|
36
|
+
export type MultiStepDef = StepDef[];
|
|
37
|
+
export type ValidMultiStepDef = ValidStepDef[];
|
|
38
|
+
export type EventArg = {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
export type EventDefinition = {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
arguments: EventArg[];
|
|
46
|
+
onTrigger: MultiStepDef;
|
|
47
|
+
};
|
|
48
|
+
export type EventDefinitionLoose = Omit<EventDefinition, "onTrigger"> & {
|
|
49
|
+
onTrigger: unknown[];
|
|
50
|
+
};
|
|
51
|
+
export declare function isValidStepDef(step: unknown): step is ValidStepDef;
|
|
52
|
+
export declare function isValidMultiStepDef(steps: unknown[]): steps is ValidMultiStepDef;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ScopeId } from "../internal-details/lib/evaluator/base-entity-manager.js";
|
|
2
|
+
import type { Name } from "../internal-details/lib/evaluator/names.js";
|
|
3
|
+
import type { RootStore } from "../internal-details/lib/root-store.js";
|
|
4
|
+
import type { ApiV2ExecutionResponse } from "../internal-details/lib/types.js";
|
|
5
|
+
import type { BaseStepDef } from "../sb-trigger.js";
|
|
6
|
+
import type { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
7
|
+
export interface ExecutionContext {
|
|
8
|
+
scopeId: ScopeId;
|
|
9
|
+
name: Name;
|
|
10
|
+
rootStore: RootStore;
|
|
11
|
+
additionalContext?: Record<string, any>;
|
|
12
|
+
}
|
|
13
|
+
export interface Trigger<StepDef extends BaseStepDef> {
|
|
14
|
+
readonly type: TriggerStepType;
|
|
15
|
+
create(...args: any[]): Omit<StepDef, "id">;
|
|
16
|
+
execute(context: ExecutionContext, step: StepDef, onFinish?: (response: PromiseSettledResult<ApiV2ExecutionResponse | undefined>[]) => void): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
|
+
import type { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
4
|
+
import type { ExecutionContext } from "../../base.js";
|
|
5
|
+
import type { SbApiWithFunctions } from "@superblocksteam/library-shared/types";
|
|
6
|
+
export interface CancelApisStep extends BaseStepDef {
|
|
7
|
+
type: typeof TriggerStepType.CANCEL_APIS;
|
|
8
|
+
apis: SbApiWithFunctions[];
|
|
9
|
+
onCancel?: SbEventFlow;
|
|
10
|
+
}
|
|
11
|
+
export declare const CancelApisTrigger: {
|
|
12
|
+
type: "cancelApi";
|
|
13
|
+
execute(_context: ExecutionContext, step: CancelApisStep): Promise<void>;
|
|
14
|
+
create(apis: SbApiWithFunctions[], onCancel?: SbEventFlow): {
|
|
15
|
+
type: "cancelApi";
|
|
16
|
+
apis: SbApiWithFunctions[];
|
|
17
|
+
onCancel: SbEventFlow | undefined;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TriggerStepType, type SbApiWithFunctions } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ApiV2ExecutionResponse } from "../../../internal-details/lib/types.js";
|
|
3
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
4
|
+
import type { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
5
|
+
import type { ExecutionContext } from "../../base.js";
|
|
6
|
+
export interface RunApisStep extends BaseStepDef {
|
|
7
|
+
type: typeof TriggerStepType.RUN_APIS;
|
|
8
|
+
apis: SbApiWithFunctions[];
|
|
9
|
+
onSuccess?: SbEventFlow;
|
|
10
|
+
onError?: SbEventFlow;
|
|
11
|
+
}
|
|
12
|
+
export declare const RunApisTrigger: {
|
|
13
|
+
type: "executeApi";
|
|
14
|
+
execute(context: ExecutionContext, step: RunApisStep, onFinish?: (responses: PromiseSettledResult<ApiV2ExecutionResponse | undefined>[]) => void): Promise<void>;
|
|
15
|
+
create(apis: SbApiWithFunctions[], onSuccess?: SbEventFlow, onError?: SbEventFlow): {
|
|
16
|
+
type: "executeApi";
|
|
17
|
+
apis: SbApiWithFunctions[];
|
|
18
|
+
onSuccess: SbEventFlow | undefined;
|
|
19
|
+
onError: SbEventFlow | undefined;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
|
+
import type { ExecutionContext } from "../../base.js";
|
|
4
|
+
export interface ControlModalStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.CONTROL_MODAL;
|
|
6
|
+
name: string;
|
|
7
|
+
direction: "open" | "close";
|
|
8
|
+
}
|
|
9
|
+
export declare const ControlModalTrigger: {
|
|
10
|
+
type: "controlModal";
|
|
11
|
+
execute(context: ExecutionContext, step: ControlModalStep): Promise<void>;
|
|
12
|
+
create(name: string, direction: "open" | "close"): {
|
|
13
|
+
type: "controlModal";
|
|
14
|
+
name: string;
|
|
15
|
+
direction: "close" | "open";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
|
+
import type { ExecutionContext } from "../../base.js";
|
|
4
|
+
export interface ControlSlideoutStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.CONTROL_SLIDEOUT;
|
|
6
|
+
name: string;
|
|
7
|
+
direction: "open" | "close";
|
|
8
|
+
}
|
|
9
|
+
export declare const ControlSlideoutTrigger: {
|
|
10
|
+
type: "controlSlideout";
|
|
11
|
+
execute(context: ExecutionContext, step: ControlSlideoutStep): Promise<void>;
|
|
12
|
+
create(name: string, direction: "open" | "close"): {
|
|
13
|
+
type: "controlSlideout";
|
|
14
|
+
name: string;
|
|
15
|
+
direction: "close" | "open";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef, SelectedWidgetProps } from "../../../sb-trigger.js";
|
|
4
|
+
import type { ExecutionContext } from "../../base.js";
|
|
5
|
+
export interface ResetComponentStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.RESET_COMPONENT;
|
|
7
|
+
widget: SelectedWidgetProps;
|
|
8
|
+
propertyName: string;
|
|
9
|
+
resetChildren: ValueInputProp;
|
|
10
|
+
}
|
|
11
|
+
export declare const ResetComponentTrigger: {
|
|
12
|
+
type: "resetComponent";
|
|
13
|
+
execute(context: ExecutionContext, step: ResetComponentStep): Promise<void>;
|
|
14
|
+
create(widget: SelectedWidgetProps, propertyName: string, resetChildren: ValueInputProp): {
|
|
15
|
+
type: "resetComponent";
|
|
16
|
+
widget: SelectedWidgetProps;
|
|
17
|
+
propertyName: string;
|
|
18
|
+
resetChildren: ValueInputProp;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { SelectedWidgetProps, BaseStepDef } from "../../../sb-trigger.js";
|
|
4
|
+
import type { ExecutionContext } from "../../base.js";
|
|
5
|
+
export interface SetComponentPropertyStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.SET_COMPONENT_PROPERTY;
|
|
7
|
+
widget: SelectedWidgetProps;
|
|
8
|
+
propertyName: string;
|
|
9
|
+
propertyValue: ValueInputProp;
|
|
10
|
+
}
|
|
11
|
+
export declare const SetComponentPropertyTrigger: {
|
|
12
|
+
type: "setComponentProperty";
|
|
13
|
+
execute(context: ExecutionContext, step: SetComponentPropertyStep): Promise<void>;
|
|
14
|
+
create(widget: SelectedWidgetProps, propertyName: string, propertyValue: ValueInputProp): {
|
|
15
|
+
type: "setComponentProperty";
|
|
16
|
+
widget: SelectedWidgetProps;
|
|
17
|
+
propertyName: string;
|
|
18
|
+
propertyValue: ValueInputProp;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
4
|
+
import type { ExecutionContext } from "../../base.js";
|
|
5
|
+
export interface NavigateToAppStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.NAVIGATE_TO_APP;
|
|
7
|
+
targetApp: {
|
|
8
|
+
name: string;
|
|
9
|
+
id: string;
|
|
10
|
+
url: string;
|
|
11
|
+
};
|
|
12
|
+
queryParams: ValueInputProp<Record<string, string>>;
|
|
13
|
+
newWindowApp: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const NavigateToAppTrigger: {
|
|
16
|
+
type: "navigateToApp";
|
|
17
|
+
execute(_context: ExecutionContext, step: NavigateToAppStep): Promise<void>;
|
|
18
|
+
create(appId: string): {
|
|
19
|
+
type: "navigateToApp";
|
|
20
|
+
targetApp: {
|
|
21
|
+
name: string;
|
|
22
|
+
id: string;
|
|
23
|
+
url: string;
|
|
24
|
+
};
|
|
25
|
+
queryParams: {};
|
|
26
|
+
newWindowApp: false;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
4
|
+
import type { ExecutionContext } from "../../base.js";
|
|
5
|
+
export interface NavigateToRouteStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.NAVIGATE_TO_ROUTE;
|
|
7
|
+
routeId: string;
|
|
8
|
+
routePathDescriptor: string;
|
|
9
|
+
routeParams?: ValueInputProp<Record<string, string>>;
|
|
10
|
+
queryParams?: ValueInputProp<Record<string, string>>;
|
|
11
|
+
keepQueryParams?: boolean;
|
|
12
|
+
newWindow: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const NavigateToRouteTrigger: {
|
|
15
|
+
type: "navigateToRoute";
|
|
16
|
+
execute(context: ExecutionContext, step: NavigateToRouteStep): Promise<void>;
|
|
17
|
+
create(route: string): {
|
|
18
|
+
type: "navigateToRoute";
|
|
19
|
+
routeId: string;
|
|
20
|
+
routePathDescriptor: string;
|
|
21
|
+
newWindow: false;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
|
+
import type { ExecutionContext } from "../../base.js";
|
|
4
|
+
export interface NavigateToStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.NAVIGATE_TO;
|
|
6
|
+
url: string;
|
|
7
|
+
newWindow: boolean;
|
|
8
|
+
replaceHistory?: boolean;
|
|
9
|
+
arguments?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const NavigateToTrigger: {
|
|
12
|
+
type: "navigateTo";
|
|
13
|
+
execute(_context: ExecutionContext, step: NavigateToStep): Promise<void>;
|
|
14
|
+
create(props: {
|
|
15
|
+
url: string;
|
|
16
|
+
newWindow?: boolean;
|
|
17
|
+
replaceHistory?: boolean;
|
|
18
|
+
arguments?: string;
|
|
19
|
+
}): {
|
|
20
|
+
type: "navigateTo";
|
|
21
|
+
url: string;
|
|
22
|
+
newWindow: boolean;
|
|
23
|
+
replaceHistory: boolean | undefined;
|
|
24
|
+
arguments: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
4
|
+
import type { ExecutionContext } from "../../base.js";
|
|
5
|
+
export interface SetQueryParamsStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.SET_QUERY_PARAMS;
|
|
7
|
+
queryParams?: Record<string, ValueInputProp<string>>;
|
|
8
|
+
keepQueryParams?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const SetQueryParamsTrigger: {
|
|
11
|
+
type: "setQueryParams";
|
|
12
|
+
execute(_context: ExecutionContext, step: SetQueryParamsStep): Promise<void>;
|
|
13
|
+
create(queryParams: Record<string, ValueInputProp<string>>, keepQueryParams?: any): {
|
|
14
|
+
type: "setQueryParams";
|
|
15
|
+
queryParams: Record<string, ValueInputProp<string>>;
|
|
16
|
+
keepQueryParams: any;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { Executable } from "../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../sb-trigger.js";
|
|
4
|
+
import type { ExecutionContext } from "../base.js";
|
|
5
|
+
export interface RunJsStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.RUN_JS;
|
|
7
|
+
handler?: Executable;
|
|
8
|
+
code?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const RunJsTrigger: {
|
|
11
|
+
type: "runJs";
|
|
12
|
+
create(handler: Executable): {
|
|
13
|
+
type: "runJs";
|
|
14
|
+
handler: Executable;
|
|
15
|
+
code: string;
|
|
16
|
+
};
|
|
17
|
+
execute(context: ExecutionContext, step: RunJsStep): Promise<void>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../sb-trigger.js";
|
|
3
|
+
import type { ExecutionContext } from "../base.js";
|
|
4
|
+
export interface SetProfileStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.SET_PROFILE;
|
|
6
|
+
profileId: string;
|
|
7
|
+
profileAction: "set" | "unset";
|
|
8
|
+
}
|
|
9
|
+
export declare const SetProfileTrigger: {
|
|
10
|
+
type: "setProfile";
|
|
11
|
+
execute(_context: ExecutionContext, step: SetProfileStep): Promise<void>;
|
|
12
|
+
create(profileId: string, profileAction: "set" | "unset"): {
|
|
13
|
+
type: "setProfile";
|
|
14
|
+
profileId: string;
|
|
15
|
+
profileAction: "unset" | "set";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../sb-trigger.js";
|
|
4
|
+
import type { ExecutionContext } from "../base.js";
|
|
5
|
+
export type TypeOptions = "info" | "success" | "warning" | "error" | "default";
|
|
6
|
+
export type NotificationPosition = string;
|
|
7
|
+
export interface ShowAlertStep extends BaseStepDef {
|
|
8
|
+
type: typeof TriggerStepType.SHOW_ALERT;
|
|
9
|
+
message: ValueInputProp<string>;
|
|
10
|
+
style: TypeOptions;
|
|
11
|
+
alertDuration?: number;
|
|
12
|
+
alertPosition?: NotificationPosition;
|
|
13
|
+
}
|
|
14
|
+
export declare const ShowAlertTrigger: {
|
|
15
|
+
type: "showAlert";
|
|
16
|
+
execute(_context: ExecutionContext, step: ShowAlertStep): Promise<void>;
|
|
17
|
+
create(message: ValueInputProp<string>, alertType: TypeOptions): {
|
|
18
|
+
type: "showAlert";
|
|
19
|
+
message: ValueInputProp<string>;
|
|
20
|
+
style: TypeOptions;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef, SelectedStateVarProps } from "../../../sb-trigger.js";
|
|
3
|
+
import type { ExecutionContext } from "../../base.js";
|
|
4
|
+
export interface ResetStateVarStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.RESET_STATE_VAR;
|
|
6
|
+
state: SelectedStateVarProps;
|
|
7
|
+
}
|
|
8
|
+
export declare const ResetStateVarTrigger: {
|
|
9
|
+
type: "resetStateVar";
|
|
10
|
+
execute(context: ExecutionContext, step: ResetStateVarStep): Promise<void>;
|
|
11
|
+
create(state: SelectedStateVarProps): {
|
|
12
|
+
type: "resetStateVar";
|
|
13
|
+
state: SelectedStateVarProps;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef, SelectedStateVarProps } from "../../../sb-trigger.js";
|
|
4
|
+
import type { ExecutionContext } from "../../base.js";
|
|
5
|
+
export interface SetStateVarStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.SET_STATE_VAR;
|
|
7
|
+
state: SelectedStateVarProps;
|
|
8
|
+
value: ValueInputProp;
|
|
9
|
+
}
|
|
10
|
+
export declare const SetStateVarTrigger: {
|
|
11
|
+
type: "setStateVar";
|
|
12
|
+
execute(context: ExecutionContext, step: SetStateVarStep): Promise<void>;
|
|
13
|
+
create(name: string, value: ValueInputProp): {
|
|
14
|
+
type: "setStateVar";
|
|
15
|
+
state: SelectedStateVarProps;
|
|
16
|
+
value: ValueInputProp;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
|
+
import type { ExecutionContext } from "../../base.js";
|
|
4
|
+
export interface ControlTimerStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.CONTROL_TIMER;
|
|
6
|
+
timerId: string;
|
|
7
|
+
action: "start" | "stop" | "toggle";
|
|
8
|
+
}
|
|
9
|
+
export declare const ControlTimerTrigger: {
|
|
10
|
+
type: "controlTimer";
|
|
11
|
+
execute(_context: ExecutionContext, step: ControlTimerStep): Promise<void>;
|
|
12
|
+
create(timerId: string, action: "start" | "stop" | "toggle"): {
|
|
13
|
+
type: "controlTimer";
|
|
14
|
+
timerId: string;
|
|
15
|
+
action: "toggle" | "stop" | "start";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef, SelectedEventProps } from "../../sb-trigger.js";
|
|
3
|
+
import type { ExecutionContext } from "../base.js";
|
|
4
|
+
export interface TriggerEventStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.TRIGGER_EVENT;
|
|
6
|
+
event: SelectedEventProps;
|
|
7
|
+
eventPayload: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
export declare const TriggerEventTrigger: {
|
|
10
|
+
type: "triggerEvent";
|
|
11
|
+
execute(_context: ExecutionContext, step: TriggerEventStep): Promise<void>;
|
|
12
|
+
create(eventName: string, eventPayload: Record<string, string>): {
|
|
13
|
+
type: "triggerEvent";
|
|
14
|
+
event: SelectedEventProps;
|
|
15
|
+
eventPayload: Record<string, string>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
declare const EventRegistry: {
|
|
2
|
+
readonly runJs: {
|
|
3
|
+
type: "runJs";
|
|
4
|
+
create(handler: import("../internal-details/lib/evaluator/base-entity-manager.js").Executable): {
|
|
5
|
+
type: "runJs";
|
|
6
|
+
handler: import("../internal-details/lib/evaluator/base-entity-manager.js").Executable;
|
|
7
|
+
code: string;
|
|
8
|
+
};
|
|
9
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/run-js.js").RunJsStep): Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
readonly triggerEvent: {
|
|
12
|
+
type: "triggerEvent";
|
|
13
|
+
execute(_context: import("./base.js").ExecutionContext, step: import("./implementations/trigger-event.js").TriggerEventStep): Promise<void>;
|
|
14
|
+
create(eventName: string, eventPayload: Record<string, string>): {
|
|
15
|
+
type: "triggerEvent";
|
|
16
|
+
event: import("../sb-trigger.js").SelectedEventProps;
|
|
17
|
+
eventPayload: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
readonly navigateTo: {
|
|
21
|
+
type: "navigateTo";
|
|
22
|
+
execute(_context: import("./base.js").ExecutionContext, step: import("./implementations/navigate/navigate-to.js").NavigateToStep): Promise<void>;
|
|
23
|
+
create(props: {
|
|
24
|
+
url: string;
|
|
25
|
+
newWindow?: boolean;
|
|
26
|
+
replaceHistory?: boolean;
|
|
27
|
+
arguments?: string;
|
|
28
|
+
}): {
|
|
29
|
+
type: "navigateTo";
|
|
30
|
+
url: string;
|
|
31
|
+
newWindow: boolean;
|
|
32
|
+
replaceHistory: boolean | undefined;
|
|
33
|
+
arguments: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly navigateToApp: {
|
|
37
|
+
type: "navigateToApp";
|
|
38
|
+
execute(_context: import("./base.js").ExecutionContext, step: import("./implementations/navigate/navigate-to-app.js").NavigateToAppStep): Promise<void>;
|
|
39
|
+
create(appId: string): {
|
|
40
|
+
type: "navigateToApp";
|
|
41
|
+
targetApp: {
|
|
42
|
+
name: string;
|
|
43
|
+
id: string;
|
|
44
|
+
url: string;
|
|
45
|
+
};
|
|
46
|
+
queryParams: {};
|
|
47
|
+
newWindowApp: false;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
readonly navigateToRoute: {
|
|
51
|
+
type: "navigateToRoute";
|
|
52
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/navigate/navigate-to-route.js").NavigateToRouteStep): Promise<void>;
|
|
53
|
+
create(route: string): {
|
|
54
|
+
type: "navigateToRoute";
|
|
55
|
+
routeId: string;
|
|
56
|
+
routePathDescriptor: string;
|
|
57
|
+
newWindow: false;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
readonly setQueryParams: {
|
|
61
|
+
type: "setQueryParams";
|
|
62
|
+
execute(_context: import("./base.js").ExecutionContext, step: import("./implementations/navigate/set-query-params.js").SetQueryParamsStep): Promise<void>;
|
|
63
|
+
create(queryParams: Record<string, import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp<string>>, keepQueryParams?: any): {
|
|
64
|
+
type: "setQueryParams";
|
|
65
|
+
queryParams: Record<string, import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp<string>>;
|
|
66
|
+
keepQueryParams: any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly controlSlideout: {
|
|
70
|
+
type: "controlSlideout";
|
|
71
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/components/control-slideout.js").ControlSlideoutStep): Promise<void>;
|
|
72
|
+
create(name: string, direction: "open" | "close"): {
|
|
73
|
+
type: "controlSlideout";
|
|
74
|
+
name: string;
|
|
75
|
+
direction: "close" | "open";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly controlModal: {
|
|
79
|
+
type: "controlModal";
|
|
80
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/components/control-modal.js").ControlModalStep): Promise<void>;
|
|
81
|
+
create(name: string, direction: "open" | "close"): {
|
|
82
|
+
type: "controlModal";
|
|
83
|
+
name: string;
|
|
84
|
+
direction: "close" | "open";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
readonly resetComponent: {
|
|
88
|
+
type: "resetComponent";
|
|
89
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/components/reset-component.js").ResetComponentStep): Promise<void>;
|
|
90
|
+
create(widget: import("../sb-trigger.js").SelectedWidgetProps, propertyName: string, resetChildren: import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp): {
|
|
91
|
+
type: "resetComponent";
|
|
92
|
+
widget: import("../sb-trigger.js").SelectedWidgetProps;
|
|
93
|
+
propertyName: string;
|
|
94
|
+
resetChildren: import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
readonly executeApi: {
|
|
98
|
+
type: "executeApi";
|
|
99
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/apis/run-apis.js").RunApisStep, onFinish?: (responses: PromiseSettledResult<import("../internal-details/lib/types.js").ApiV2ExecutionResponse | undefined>[]) => void): Promise<void>;
|
|
100
|
+
create(apis: import("@superblocksteam/library-shared/types").SbApiWithFunctions[], onSuccess?: import("../index.js").SbEventFlow, onError?: import("../index.js").SbEventFlow): {
|
|
101
|
+
type: "executeApi";
|
|
102
|
+
apis: import("@superblocksteam/library-shared/types").SbApiWithFunctions[];
|
|
103
|
+
onSuccess: import("../index.js").SbEventFlow | undefined;
|
|
104
|
+
onError: import("../index.js").SbEventFlow | undefined;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
readonly cancelApi: {
|
|
108
|
+
type: "cancelApi";
|
|
109
|
+
execute(_context: import("./base.js").ExecutionContext, step: import("./implementations/apis/cancel-apis.js").CancelApisStep): Promise<void>;
|
|
110
|
+
create(apis: import("@superblocksteam/library-shared/types").SbApiWithFunctions[], onCancel?: import("../index.js").SbEventFlow): {
|
|
111
|
+
type: "cancelApi";
|
|
112
|
+
apis: import("@superblocksteam/library-shared/types").SbApiWithFunctions[];
|
|
113
|
+
onCancel: import("../index.js").SbEventFlow | undefined;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
readonly setStateVar: {
|
|
117
|
+
type: "setStateVar";
|
|
118
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/state/set-state-var.js").SetStateVarStep): Promise<void>;
|
|
119
|
+
create(name: string, value: import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp): {
|
|
120
|
+
type: "setStateVar";
|
|
121
|
+
state: import("../sb-trigger.js").SelectedStateVarProps;
|
|
122
|
+
value: import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
readonly setComponentProperty: {
|
|
126
|
+
type: "setComponentProperty";
|
|
127
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/components/set-component-property.js").SetComponentPropertyStep): Promise<void>;
|
|
128
|
+
create(widget: import("../sb-trigger.js").SelectedWidgetProps, propertyName: string, propertyValue: import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp): {
|
|
129
|
+
type: "setComponentProperty";
|
|
130
|
+
widget: import("../sb-trigger.js").SelectedWidgetProps;
|
|
131
|
+
propertyName: string;
|
|
132
|
+
propertyValue: import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
readonly resetStateVar: {
|
|
136
|
+
type: "resetStateVar";
|
|
137
|
+
execute(context: import("./base.js").ExecutionContext, step: import("./implementations/state/reset-state-var.js").ResetStateVarStep): Promise<void>;
|
|
138
|
+
create(state: import("../sb-trigger.js").SelectedStateVarProps): {
|
|
139
|
+
type: "resetStateVar";
|
|
140
|
+
state: import("../sb-trigger.js").SelectedStateVarProps;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
readonly controlTimer: {
|
|
144
|
+
type: "controlTimer";
|
|
145
|
+
execute(_context: import("./base.js").ExecutionContext, step: import("./implementations/timers/control-timer.js").ControlTimerStep): Promise<void>;
|
|
146
|
+
create(timerId: string, action: "start" | "stop" | "toggle"): {
|
|
147
|
+
type: "controlTimer";
|
|
148
|
+
timerId: string;
|
|
149
|
+
action: "toggle" | "stop" | "start";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly showAlert: {
|
|
153
|
+
type: "showAlert";
|
|
154
|
+
execute(_context: import("./base.js").ExecutionContext, step: import("./implementations/show-alert.js").ShowAlertStep): Promise<void>;
|
|
155
|
+
create(message: import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp<string>, alertType: import("./implementations/show-alert.js").TypeOptions): {
|
|
156
|
+
type: "showAlert";
|
|
157
|
+
message: import("../internal-details/lib/evaluator/base-entity-manager.js").ValueInputProp<string>;
|
|
158
|
+
style: import("./implementations/show-alert.js").TypeOptions;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
readonly setProfile: {
|
|
162
|
+
type: "setProfile";
|
|
163
|
+
execute(_context: import("./base.js").ExecutionContext, step: import("./implementations/set-profile.js").SetProfileStep): Promise<void>;
|
|
164
|
+
create(profileId: string, profileAction: "set" | "unset"): {
|
|
165
|
+
type: "setProfile";
|
|
166
|
+
profileId: string;
|
|
167
|
+
profileAction: "unset" | "set";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
export type ValidStepDef = ReturnType<(typeof EventRegistry)[keyof typeof EventRegistry]["create"]> & {
|
|
172
|
+
id: string;
|
|
173
|
+
};
|
|
174
|
+
export default EventRegistry;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ScopeId } from "../internal-details/lib/evaluator/base-entity-manager.js";
|
|
2
|
+
import type { Name } from "../internal-details/lib/evaluator/names.js";
|
|
3
|
+
import type { SbEventFlow } from "../user-facing/sb-event-flow.js";
|
|
4
|
+
export declare const runEventHandlers: ({ flow, name, scopeId, additionalContext, }: {
|
|
5
|
+
flow?: SbEventFlow;
|
|
6
|
+
name: Name;
|
|
7
|
+
scopeId: ScopeId;
|
|
8
|
+
additionalContext?: Record<string, any>;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
export default runEventHandlers;
|