Table of Contents

Package Api.Js.SxcJs Namespace Api.Js.SxcJs

Classes

ContextIdentifier

ContextIdentifier is used to initialize a Sxc object outside of the default context.

HasLog

Any object that has an own log object

Log

A log object which will collect log entries for another ojbect

LogEntry

A log entry item

QuickEditConfig

Quick Edit Configuration which has an enable and specific button configurations

QuickEditConfigButtons

Buttons on a quick-edit toolbar

QuickEditConfigRoot

Quick Edit - Full configuration at root, with enable and rules for modules and innerBlocks

Sxc

The typical sxc-instance object for a specific DNN module or content-block

SxcCms

This is in charge of sxc.cms on the instance level. ATM it just has the run command. In future, it may also have dedicated command like layout etc.

SxcData

Data Service for an App / Sxc-Instance to get/create data of a specific Content-Type

SxcDataServiceBase

Base class doing common checks. This is internal and not important, but we can't keep it out of the docs.

SxcGlobalCms

Global Content-Management System on the $2sxc.cms. It is only available if the page is in edit mode / the page feature 2sxc.JsCms has been activated.

SxcGlobalEnvironment

Provides environment information to $2sxc - usually page-id, api-root and stuff like that

SxcGlobalHttp

Global HTTP Service for information and helpers on $2sxc.http

SxcPart

Base class for anything attached to an sxc-instance. This is internal and not important, but we can't keep it out of the docs.

SxcQuery

Instance Query Service

SxcWebApi

helper API to run ajax / REST calls to the server it will ensure that the headers etc. are set correctly and that urls are rewritten

ToolbarWorkflowManager

A workflow manager of a Toolbar which will run stuff before / after commands. When toolbars are created, they will add a Manager and then raise an event for in-page code to add workflow steps. Normally the toolbar with raise a toolbar-init event where you can then add steps.

UrlParams

Helper object to read url params. Available on $2sxc.urlParams

WorkflowStepCodeArguments

Arguments for WorkflowStepCode. Will be passed to your code and should also be returned by your code. This also allows cancelling further execution.

Interfaces

CommandAddExistingParams

Parameters used for the command add-existing.
The contentType name determines what items will be shown in the dialog. Depending on your use case, you will need to use the CommandParamsEntityInList or CommandParamsEntityInContentBlock parameters as well.
⤴️ back to All Command Names

CommandAddParams

Parameters used for the command add.
The contentType determines what items will be created, the index where. Depending on your use case, you will need to use the CommandParamsEntityInList or CommandParamsEntityInContentBlock parameters as well.
⤴️ back to All Command Names

CommandCodeParams

Parameters used for the command code on toolbars (new in v14.4).
⤴️ back to All Command Names

CommandContentTypeParams

Parameters used for the command contenttype.
The content-type name determines what items will be loaded to manage the fields.
⤴️ back to All Command Names

CommandCopyParams

Parameters used for the command copy. Will copy the entity on entityId.
⤴️ back to All Command Names

CommandDataParams

Parameters used for the command data.
The content-type name determines what items will be managed.
⤴️ back to All Command Names

CommandDeleteParams

Parameters used for the command delete.
⤴️ back to All Command Names

CommandMetadataParams

Parameters used for the command metadata.
Will do either one of these:

  • if it has an entityId, will just open edit for that Entity
  • if it has no entityId, will open new for the current contentType and assign to the target specified by metadata:
    ⤴️ back to All Command Names

CommandNewParams

Parameters used for the command new
The ContentType name determines what kind of item will be created.
Can also contain prefill to add values to the new item.
Can also contain list-information, in which case it's added to that list. Depending on your use case, you will need to use the CommandParamsEntityInList or CommandParamsEntityInContentBlock parameters as well.
⤴️ back to All Command Names

CommandParams

Command parameters are handed over to a command for execution. It contains all possible combinations of parameters that can be used in a command. We will try to improve how this is documented, but ATM it just has all parameters, even though you may need none, or just a few.

Note: For your specific commands, you can also pass other parameters.

Important for the docs

Most properties are actually not visible (you will get them in the types though). So actually you will usually create one of these:

Because of this, most of the properties below are NOT documented, as their purpose can change depending on the command used.

CommandParamsEntity

Parameters used for commands which need an entity ID or a list-reference.
⤴️ back to All Command Names

CommandParamsEntityById

Parameters used for commands which address a specificy entity.
⤴️ back to All Command Names

CommandParamsEntityInContentBlock

Parameters used for command which expect an item from a list of a ContentBlock.
⤴️ back to All Command Names

CommandParamsEntityInList

Parameters used for command which expect an item in a list (field) of a parent.
⤴️ back to All Command Names

CommandParamsMetadata

Parameters on metadata for commands which have a metadata-target.

EnvironmentSpecs

A context information for the current page, helping the JS talk with the backend

MetadataFor

A Metadata-Target identifier to tell an entity that it describes something else. Usually used in Sxc instances with the Data Service

Warning: There is another MetadataFor type and they are not fully consistent. This is historical and not easy to correct, but we're working on it.

RunParams

Parameters for the Instance sxc.cms.run(...) command. New in 13.03

RunParamsWithContext

Parameters for the Global $2sxc.cms.run(...) command in Addition to the RunParams. It provides context to the run-params such as a Sxc instance or a tag which it started on. New in 12.10

SxcGlobal

This is the root global window.$2sxc function / object. It is both a function window.$2sxc(...) and object window.$2sxc.insights...

If the page feature 2sxc.JsCms is enabled, the window.$2sxc will also be a SxcGlobalWithCms

SxcGlobalWithCms

$2sxc global interface extending the SxcGlobal when the page feature JsCms is enabled. If the page feature 2sxc.JsCms is not enabled, the window.$2sxc will be a SxcGlobal

WorkflowStep

A workflow step (code-sequence) to run before/after specific events.

ZzzAjaxSettingsDeprecated

Deprecated parameters for old jQuery AJAX calls. Shouldn't be used any more.

ZzzSxcWebApiDeprecated

Deprecated Old APIs on sxc.webApi. They only exist if jQuery is included on the page, and we highly discourage their use.

Enums

CommandNames

Names of commands known to 2sxc CMS - for use in toolbars and calling commands directly from code

MetadataTargetTypes

Metadata Target Types These are constants to determine what something is assigned to (e.g. it describes an Entity, a file, etc.)

Use it for the @see MetadataFor objects

WorkflowPhases

Phases / events of a specific workflow.