-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from 2sic/develop
v14.03
- Loading branch information
Showing
265 changed files
with
7,829 additions
and
12,227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,269 @@ | ||
// Documentation notes | ||
// | ||
// You cannot use @see in the docs, it doesn't work with docFx | ||
// Instead, always use [text](xref:Api.Js.SxcJs.CommandNames) | ||
// or similar | ||
// | ||
// End documentation notes | ||
|
||
|
||
/** | ||
* Names of commands known to 2sxc CMS - for use in toolbars and calling commands directly from code | ||
*/ | ||
export enum CommandNames { | ||
/** | ||
* `add` opens a `new` dialog to create and add a new item to a **list of items**. | ||
* <br> The new item is placed after the item the (+) was clicked on. | ||
* <br>π‘ | ||
* This is similar to `new` but also adds the item to the existing list of items shown on the page. | ||
* <br> πͺ Only appears on toolbars of items which are in a list. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandAddParams) | ||
*/ | ||
add = 'add', | ||
|
||
/** | ||
* `add-existing` opens a dialog allowing the user to select an existing item to add to a **list of items**. | ||
* <br> The new item is placed after the item the (+) was clicked on. | ||
* <br> πͺ Only appears on toolbars of items which are in a list. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandAddExistingParams) | ||
* <br> π in v11.01 | ||
*/ | ||
addExisting = 'add-existing', | ||
|
||
/** | ||
* `app` opens the app-admin dialog | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
app = 'app', | ||
|
||
/** | ||
* `app-import` opens the dialog to import an App. | ||
* <br> π This is not available on the toolbar. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
appImport = 'app-import', | ||
|
||
/** | ||
* `app-resources` opens the edit dialog for app-resources (multi-language texts, labels etc.). | ||
* <br> π It's disabled on the toolbar if the app doesn't have resource-values to configure. | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
appResources = 'app-resources', | ||
|
||
/** | ||
* `app-settings` opens the edit dialog for the app-settings. | ||
* <br> π It's disabled on the toolbar if the app doesn't have setting-values to configure | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
appSettings = 'app-settings', | ||
|
||
/** | ||
* `apps` opens the manage all apps dialog. | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© No params required, | ||
* (auto-detected based on toolbar) | ||
*/ | ||
apps = 'apps', | ||
|
||
/** | ||
* `contentitems` opens the list to manage all items of a specific content-type. | ||
* <br> π Will use the settings of the current template to open. | ||
* It is only shown to elevated admins. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandContentItemsParams) | ||
*/ | ||
contentItems = 'contentitems', | ||
|
||
/** | ||
* `contenttype` opens the dialog to view or modify fields of a content-type. | ||
* <br> π On a toolbar it will use the content-type of the current item. | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandContentTypeParams) | ||
*/ | ||
contentType = 'contenttype', | ||
|
||
/** | ||
* `copy` opens the edit-dialog for the current item in copy-mode, so when saving it will be a new item. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandCopyParams) | ||
* <br> π in v14.03 | ||
*/ | ||
copy = 'copy', | ||
|
||
/** | ||
* `custom` will execute custom javascript. | ||
* <br> π This is mainly for toolbars, to add buttons with custom code. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandCustomParams) | ||
*/ | ||
custom = 'custom', | ||
|
||
/** | ||
* `delete` will delete (not just remove) a content-item. | ||
* <br> π‘ This is similar to `remove` but really deletes the data from the DB. | ||
* <br> π It only appears if the toolbar explicitly asks for it. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandDeleteParams) | ||
* (auto-detected from context) | ||
*/ | ||
delete = 'delete', | ||
|
||
/** | ||
* `edit` opens an edit-dialog. | ||
* <br> | ||
* In scenarios where the page is currently showing a demo item, this will have the same effect as `add` | ||
* <br> π Only appears if `entityId` is known or item is in a list. | ||
* <br> π© Parameters either one of these: | ||
* [Id](xref:Api.Js.SxcJs.CommandParamsEntityById), | ||
* [In Block](xref:Api.Js.SxcJs.CommandParamsEntityInContentBlock), | ||
* [In List](xref:Api.Js.SxcJs.CommandParamsEntityInList) | ||
* (auto-detected from context) | ||
*/ | ||
edit = 'edit', | ||
|
||
/** | ||
* `image` opens the edit-dialog for the metadata of the current image | ||
* @internal - may be removed soon | ||
*/ | ||
image = 'image', | ||
|
||
/** | ||
* `insights-server` opens the insights logs page | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© No params required. | ||
*/ | ||
insightsServer = 'insights-server', | ||
|
||
/** | ||
* `instance-list` opens a dialog to manually re-order **items in a list**. | ||
* <br> πͺ Only appears on toolbars of items which are in a list. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
instanceList = 'instance-list', | ||
|
||
/** | ||
* `layout` opens the in-page dialog to change the layout of the current content. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
layout = 'layout', | ||
|
||
/** | ||
* `metadata` opens the edit-dialog for the current metadata item. | ||
* <br> π It only appears if the toolbar explicitly asks for it. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandMetadataParams) | ||
*/ | ||
metadata = 'metadata', | ||
|
||
/** | ||
* `more` create a "β¦" (ellipsis) button which flips through the button groups of toolbars | ||
* <br> π It only appears if the toolbar has `more`=`auto` and has multiple groups. | ||
* <br> π© No params required, | ||
* (auto-detected based on toolbar) | ||
*/ | ||
more = 'more', | ||
|
||
/** | ||
* `movedown` moves a content-item down one position in a **list of items**. | ||
* <br> πͺ Only appears on toolbars of items which are in a list. | ||
* <br> π© Parameters either one of these: | ||
* [In Block](xref:Api.Js.SxcJs.CommandParamsEntityInContentBlock), | ||
* [In List](xref:Api.Js.SxcJs.CommandParamsEntityInList) | ||
* (auto-detected from context) | ||
*/ | ||
moveDown = 'movedown', | ||
|
||
/** | ||
* `moveup` moves a content-item up one position in a **list of items**. | ||
* <br> πͺ Only appears on toolbars of items which are in a list. | ||
* <br> π© Parameters either one of these: | ||
* [In Block](xref:Api.Js.SxcJs.CommandParamsEntityInContentBlock), | ||
* [In List](xref:Api.Js.SxcJs.CommandParamsEntityInList) | ||
* (auto-detected from context) | ||
*/ | ||
moveUp = 'moveup', | ||
|
||
/** | ||
* `new` opens the edit-dialog for a new content-item. | ||
* <br> | ||
* It will only create an item, not add it to a list. | ||
* For that you would need to use `add` | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandContentTypeParams) | ||
* (auto-detected from context) | ||
*/ | ||
new = 'new', | ||
|
||
/** | ||
* `new` sets new mode used in parameters | ||
* @internal - must move, this shouldn't be here as it's not a command! | ||
*/ | ||
newMode = 'new', | ||
|
||
/** | ||
* `publish` tells the system to update a content-items status to published. If there was a published and a draft before, the draft will replace the previous item | ||
* <br> π Appears automatically if the item is in draft mode / not published. | ||
* <br> π© Parameters either one of these: | ||
* [Id](xref:Api.Js.SxcJs.CommandParamsEntityById), | ||
* [In Block](xref:Api.Js.SxcJs.CommandParamsEntityInContentBlock), | ||
* [In List](xref:Api.Js.SxcJs.CommandParamsEntityInList) | ||
* (auto-detected from context) | ||
*/ | ||
publish = 'publish', | ||
|
||
/** | ||
* `remove` removes an item from a list of items. | ||
* <br> πͺ Only appears on toolbars of items which are in a list. | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandParamsEntityInList) | ||
* (auto-detected from context) | ||
*/ | ||
remove = 'remove', | ||
|
||
/** | ||
* `replace` opens the dialog to assign a different content-item in this slot on module-assigned content items | ||
* <br> π© [Parameters](xref:Api.Js.SxcJs.CommandParamsEntityInList) | ||
* (auto-detected from context) | ||
*/ | ||
replace = 'replace', | ||
|
||
/** | ||
* `template-develop` opens the template-editor dialog in a new window. | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
templateDevelop = 'template-develop', | ||
|
||
/** | ||
* `template-query` opens the pipeline/query-designer in a new window. | ||
* <br> π It's not available on the simple Content App, only on full Apps. | ||
* It is disabled if no query is configured. | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
templateQuery = 'template-query', | ||
|
||
/** | ||
* `template-settings` will change settings on the template currently used | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
*/ | ||
templateSettings = 'template-settings', | ||
|
||
/** | ||
* `zone` opens the system dialog for this zone/site. | ||
* <br> π Toolbar shows this automatically to elevated admins. | ||
* <br> π© No params required, | ||
* (auto-detected from context) | ||
*/ | ||
zone = 'zone', | ||
} | ||
|
||
|
||
// Experimental | ||
// Goal is to probably split the command names | ||
// and then make a new CommandNames which merges all the previous ones | ||
// type All = CommandNames | CommandNamesEdit; |
Oops, something went wrong.