Skip to content

Commit

Permalink
Merge pull request #117 from 2sic/develop
Browse files Browse the repository at this point in the history
v14.03
  • Loading branch information
iJungleboy authored Jun 21, 2022
2 parents 5f9c115 + ff4da9a commit a41adcb
Show file tree
Hide file tree
Showing 265 changed files with 7,829 additions and 12,227 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ projects/$2sxc/docs/typedoc
projects/$2sxc/docs/docFx
projects/$2sxc/docs/_docFxSite
projects/$2sxc/docs/obj

# Sub-Projects dist - to make sure results don't appear in search
projects/quick-dialog/dist
18 changes: 9 additions & 9 deletions docs/dnn-sxc-angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@
},
{
"id": 8,
"name": "DnnAppComponent",
"name": "SxcAppComponent",
"kind": 128,
"kindString": "Class",
"flags": {},
Expand All @@ -1830,7 +1830,7 @@
"signatures": [
{
"id": 10,
"name": "new DnnAppComponent",
"name": "new SxcAppComponent",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {},
Expand Down Expand Up @@ -1891,7 +1891,7 @@
"type": {
"type": "reference",
"id": 8,
"name": "DnnAppComponent"
"name": "SxcAppComponent"
}
}
]
Expand All @@ -1916,7 +1916,7 @@
},
{
"id": 1,
"name": "DnnSxcRootModule",
"name": "SxcRootModule",
"kind": 128,
"kindString": "Class",
"flags": {},
Expand All @@ -1937,7 +1937,7 @@
"name": "NgModule"
},
"arguments": {
"obj": "{\r\n imports: [\r\n // Note: it's extremely important that HttpClientModule is _not_ imported\r\n // anywhere. Otherwise it will break sub-modules\r\n // because it will create a new HttpClientModule which won't have the interceptor\r\n // HttpClientModule,\r\n ],\r\n providers: [\r\n Data,\r\n Context,\r\n DnnInterceptor,\r\n ]\r\n}"
"obj": "{\r\n imports: [\r\n // Note: it's extremely important that HttpClientModule is _not_ imported\r\n // anywhere. Otherwise it will break sub-modules\r\n // because it will create a new HttpClientModule which won't have the interceptor\r\n // HttpClientModule,\r\n ],\r\n providers: [\r\n Data,\r\n Context,\r\n SxcHttpInterceptorProvider,\r\n ]\r\n}"
}
}
],
Expand All @@ -1951,7 +1951,7 @@
"signatures": [
{
"id": 3,
"name": "new DnnSxcRootModule",
"name": "new SxcRootModule",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {},
Expand Down Expand Up @@ -1985,14 +1985,14 @@
"type": {
"type": "reference",
"id": 1,
"name": "DnnSxcRootModule"
"name": "SxcRootModule"
}
}
],
"type": {
"type": "reference",
"id": 1,
"name": "DnnSxcRootModule"
"name": "SxcRootModule"
}
}
]
Expand Down Expand Up @@ -3390,7 +3390,7 @@
},
{
"id": 14,
"name": "DnnInterceptor",
"name": "SxcHttpInterceptorProvider",
"kind": 32,
"kindString": "Variable",
"flags": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "2sxc-ui",
"version": "14.02.00",
"version": "14.03.00",
"description": "2sxc UI - the JS UI of 2sxc",
"scripts": {
"release-all": "npm run js2sxc && npm run inpage && npm run snippets && npm run quickdialog && npm run turn-on",
Expand Down
4 changes: 2 additions & 2 deletions projects/$2sxc/src/_/Window.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SxcGlobal } from '../sxc-root';
import { SxcGlobal } from '../sxc-global';

/**
* export interface WindowInternal extends
Expand All @@ -21,4 +21,4 @@ interface DnnJQueryExtensions {
dnnSF: (id?: number) => any;
/** The DNN Services Framework */
ServicesFramework: (id: number) => any;
}
}
269 changes: 269 additions & 0 deletions projects/$2sxc/src/cms/command-names.ts
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;
Loading

0 comments on commit a41adcb

Please sign in to comment.