From db2a797a263dd00be19d663bf5f98674986696ab Mon Sep 17 00:00:00 2001 From: Taras Nakonechnyi Date: Wed, 7 Aug 2019 15:57:53 +0300 Subject: [PATCH 01/36] add tree selector --- .../CoreUiControls/TreeSelectorUiControl.cs | 32 +++ Composite/Composite.csproj | 5 + .../TemplatedTreelSelectorUiControlFactory.cs | 178 ++++++++++++++++ .../StandardWidgetFunctionProvider.cs | 3 +- .../String/TreeSelectorWidgetFunction.cs | 96 +++++++++ Website/Composite/CompileScripts.xml | 3 +- .../Selectors/TreeSelector.ascx | 55 +++++ .../source/top/core/ViewDefinitions.js | 20 ++ .../data/dialogs/DataInputDialogBinding.js | 22 +- .../data/dialogs/TreeSelectorDialogBinding.js | 196 ++++++++++++++++++ Website/WebSite.csproj | 2 + 11 files changed, 605 insertions(+), 7 deletions(-) create mode 100644 Composite/C1Console/Forms/CoreUiControls/TreeSelectorUiControl.cs create mode 100644 Composite/Plugins/Forms/WebChannel/UiControlFactories/TemplatedTreelSelectorUiControlFactory.cs create mode 100644 Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/String/TreeSelectorWidgetFunction.cs create mode 100644 Website/Composite/controls/FormsControls/FormUiControlTemplates/Selectors/TreeSelector.ascx create mode 100644 Website/Composite/scripts/source/top/ui/bindings/data/dialogs/TreeSelectorDialogBinding.js diff --git a/Composite/C1Console/Forms/CoreUiControls/TreeSelectorUiControl.cs b/Composite/C1Console/Forms/CoreUiControls/TreeSelectorUiControl.cs new file mode 100644 index 0000000000..ee9f06324e --- /dev/null +++ b/Composite/C1Console/Forms/CoreUiControls/TreeSelectorUiControl.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using Composite.C1Console.Forms.Foundation; + +namespace Composite.C1Console.Forms.CoreUiControls +{ + [ControlValueProperty("SelectedKeys")] + internal abstract class TreeSelectorUiControl : UiControl + { + [BindableProperty] + [FormsProperty] + public string SelectedKey { get; set; } + + [FormsProperty] + public string ElementProvider { get; set; } + + [FormsProperty] + public string SelectionProperty { get; set; } + + [FormsProperty] + public string SelectionValue { get; set; } + + [FormsProperty] + public string SelectionResult { get; set; } + + [FormsProperty] + public string SerializedSearchToken { get; set; } + + [FormsProperty] + public bool Required { get; set; } + } +} diff --git a/Composite/Composite.csproj b/Composite/Composite.csproj index 0a4a811f99..3522bf813a 100644 --- a/Composite/Composite.csproj +++ b/Composite/Composite.csproj @@ -233,6 +233,7 @@ + @@ -260,6 +261,10 @@ + + ASPXCodeBehind + + diff --git a/Composite/Plugins/Forms/WebChannel/UiControlFactories/TemplatedTreelSelectorUiControlFactory.cs b/Composite/Plugins/Forms/WebChannel/UiControlFactories/TemplatedTreelSelectorUiControlFactory.cs new file mode 100644 index 0000000000..0c1c0bb0e4 --- /dev/null +++ b/Composite/Plugins/Forms/WebChannel/UiControlFactories/TemplatedTreelSelectorUiControlFactory.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Configuration; +using System.Web.UI; +using Composite.C1Console.Forms; +using Composite.C1Console.Forms.CoreUiControls; +using Composite.C1Console.Forms.Plugins.UiControlFactory; +using Composite.C1Console.Forms.WebChannel; +using Composite.Plugins.Forms.WebChannel.Foundation; +using Microsoft.Practices.EnterpriseLibrary.Common.Configuration; +using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder; +using Microsoft.Practices.ObjectBuilder; + + +namespace Composite.Plugins.Forms.WebChannel.UiControlFactories +{ + /// + /// + /// + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public abstract class TreeSelectorTemplateUserControlBase : UserControl, IPostBackDataHandler + { + /// + protected abstract void BindStateToProperties(); + + /// + protected abstract void InitializeViewState(); + + /// + public abstract string GetDataFieldClientName(); + + internal void BindStateToControlProperties() + { + this.BindStateToProperties(); + } + + internal void InitializeWebViewState() + { + this.InitializeViewState(); + } + + /// + public string SelectedKey { get; set; } + + /// + public string ElementProvider { get; set; } + + /// + public string SelectionProperty { get; set; } + + /// + public string SelectionValue { get; set; } + + /// + public string SelectionResult { get; set; } + + /// + public string SerializedSearchToken { get; set; } + + /// + public bool Required { get; set; } + + /// + /// When implemented by a class, processes postback data for an ASP.NET server control. + /// + /// + /// + /// + public virtual bool LoadPostData(string postDataKey, NameValueCollection postCollection) + { + return false; + } + + /// + /// When implemented by a class, signals the server control to notify the ASP.NET application that the state of the control has changed. + /// + public virtual void RaisePostDataChangedEvent() + { + } + } + + + + internal sealed class TemplatedTreeSelectorUiControl : TreeSelectorUiControl, IWebUiControl + { + private readonly Type _userControlType; + private TreeSelectorTemplateUserControlBase _userControl; + + internal TemplatedTreeSelectorUiControl(Type userControlType) + { + _userControlType = userControlType; + } + + public override void BindStateToControlProperties() + { + _userControl.BindStateToControlProperties(); + + this.SelectedKey = _userControl.SelectedKey; + } + + public void InitializeViewState() + { + _userControl.InitializeWebViewState(); + } + + + public Control BuildWebControl() + { + _userControl = _userControlType.ActivateAsUserControl(this.UiControlID); + + _userControl.SelectedKey = this.SelectedKey; + _userControl.ElementProvider = this.ElementProvider; + _userControl.SelectionProperty = this.SelectionProperty; + _userControl.SelectionValue = this.SelectionValue; + _userControl.SelectionResult = this.SelectionResult; + _userControl.SerializedSearchToken = this.SerializedSearchToken; + _userControl.Required = this.Required; + + return _userControl; + } + + public bool IsFullWidthControl => false; + + public string ClientName => _userControl.GetDataFieldClientName(); + } + + + + [ConfigurationElementType(typeof(TemplatedTreeSelectorUiControlFactoryData))] + internal sealed class TemplatedTreeSelectorUiControlFactory : Base.BaseTemplatedUiControlFactory + { + public TemplatedTreeSelectorUiControlFactory(TemplatedTreeSelectorUiControlFactoryData data) + : base(data) + { } + + public override IUiControl CreateControl() + { + var control = new TemplatedTreeSelectorUiControl(this.UserControlType); + + return control; + } + } + + + + [Assembler(typeof(TemplatedTreeSelectorUiControlFactoryAssembler))] + internal sealed class TemplatedTreeSelectorUiControlFactoryData : UiControlFactoryData, Base.ITemplatedUiControlFactoryData + { + private const string _userControlVirtualPathPropertyName = "userControlVirtualPath"; + private const string _cacheCompiledUserControlTypePropertyName = "cacheCompiledUserControlType"; + + [ConfigurationProperty(_userControlVirtualPathPropertyName, IsRequired = true)] + public string UserControlVirtualPath + { + get { return (string)base[_userControlVirtualPathPropertyName]; } + set { base[_userControlVirtualPathPropertyName] = value; } + } + + [ConfigurationProperty(_cacheCompiledUserControlTypePropertyName, IsRequired = false, DefaultValue = true)] + public bool CacheCompiledUserControlType + { + get { return (bool)base[_cacheCompiledUserControlTypePropertyName]; } + set { base[_cacheCompiledUserControlTypePropertyName] = value; } + } + } + + + + internal sealed class TemplatedTreeSelectorUiControlFactoryAssembler : IAssembler + { + public IUiControlFactory Assemble(IBuilderContext context, UiControlFactoryData objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) + { + return new TemplatedTreeSelectorUiControlFactory( + objectConfiguration as TemplatedTreeSelectorUiControlFactoryData); + } + } +} diff --git a/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/StandardWidgetFunctionProvider.cs b/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/StandardWidgetFunctionProvider.cs index dbb52c6ffc..7e8848ef22 100644 --- a/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/StandardWidgetFunctionProvider.cs +++ b/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/StandardWidgetFunctionProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Composite.Data; @@ -90,6 +90,7 @@ private void InitializeStaticTypeFunctions() _widgetStaticTypeFunctions.Add(new TextAreaWidgetFuntion(_entityTokenFactory)); _widgetStaticTypeFunctions.Add(new String.SelectorWidgetFunction(_entityTokenFactory)); _widgetStaticTypeFunctions.Add(new String.HierarchicalSelectorWidgetFunction(_entityTokenFactory)); + _widgetStaticTypeFunctions.Add(new TreeSelectorWidgetFunction(_entityTokenFactory)); _widgetStaticTypeFunctions.Add(new DataIdMultiSelectorWidgetFunction(_entityTokenFactory)); _widgetStaticTypeFunctions.Add(new String.VisualXhtmlEditorFuntion(_entityTokenFactory)); _widgetStaticTypeFunctions.Add(new String.UrlComboBoxWidgetFunction(_entityTokenFactory)); diff --git a/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/String/TreeSelectorWidgetFunction.cs b/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/String/TreeSelectorWidgetFunction.cs new file mode 100644 index 0000000000..80bf45bd0b --- /dev/null +++ b/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/String/TreeSelectorWidgetFunction.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Linq; + +using Composite.Functions; +using Composite.Plugins.Functions.WidgetFunctionProviders.StandardWidgetFunctionProvider.Foundation; +using Composite.C1Console.Forms.CoreUiControls; +using Composite.Core.Xml; + +namespace Composite.Plugins.Functions.WidgetFunctionProviders.StandardWidgetFunctionProvider.String +{ + internal sealed class TreeSelectorWidgetFunction : CompositeWidgetFunctionBase + { + private const string _functionName = "TreeSelector"; + public const string CompositeName = CompositeWidgetFunctionBase.CommonNamespace + ".String." + _functionName; + + public TreeSelectorWidgetFunction(EntityTokenFactory entityTokenFactory) + : base(CompositeName, typeof(string), entityTokenFactory) + { + SetParameterProfiles(); + } + + + private void SetParameterProfiles() + { + base.AddParameterProfile( + new ParameterProfile("ElementProvider", + typeof(string), + true, + new ConstantValueProvider(string.Empty), + StandardWidgetFunctions.TextBoxWidget, + null, + "Element Provider", new HelpDefinition("Tree Provider"))); + + base.AddParameterProfile( + new ParameterProfile("SelectionProperty", + typeof(string), + true, + new ConstantValueProvider(string.Empty), + StandardWidgetFunctions.TextBoxWidget, + null, + "SelectionProperty", new HelpDefinition(""))); + + base.AddParameterProfile( + new ParameterProfile("SelectionValue", + typeof(string), + false, + new ConstantValueProvider(string.Empty), + StandardWidgetFunctions.TextBoxWidget, + null, + "SelectionValue", new HelpDefinition(""))); + + base.AddParameterProfile( + new ParameterProfile("SelectionResult", + typeof(string), + false, + new ConstantValueProvider(string.Empty), + StandardWidgetFunctions.TextBoxWidget, + null, + "SelectionResult", new HelpDefinition(""))); + base.AddParameterProfile( + new ParameterProfile("SerializedSearchToken", + typeof(string), + false, + new ConstantValueProvider(string.Empty), + StandardWidgetFunctions.TextBoxWidget, + null, + "SerializedSearchToken", new HelpDefinition(""))); + base.AddParameterProfile( + new ParameterProfile("Required", + typeof(bool), + false, + new ConstantValueProvider(false), + StandardWidgetFunctions.CheckBoxWidget, + null, + "Required", new HelpDefinition(""))); + } + + + public override XElement GetWidgetMarkup(ParameterList parameters, string label, HelpDefinition helpDefinition, string bindingSourceName) + { + XElement formElement = base.BuildBasicWidgetMarkup("TreeSelector", "SelectedKey", label, helpDefinition, bindingSourceName); + foreach (var propertyName in new [] + { + "ElementProvider", "SelectionProperty", "SelectionValue", "SelectionResult", "SerializedSearchToken", "Required" + }) + { + string propertyValue = parameters.GetParameter(propertyName); + formElement.Add(new XAttribute(propertyName, propertyValue)); + } + return formElement; + } + } +} diff --git a/Website/Composite/CompileScripts.xml b/Website/Composite/CompileScripts.xml index 6cca8a60ce..6973950b2d 100644 --- a/Website/Composite/CompileScripts.xml +++ b/Website/Composite/CompileScripts.xml @@ -1,4 +1,4 @@ - + @@ -196,6 +196,7 @@ + /> diff --git a/Website/Composite/scripts/source/top/core/ViewDefinitions.js b/Website/Composite/scripts/source/top/core/ViewDefinitions.js index 1cf01c2c8b..a24999d56a 100644 --- a/Website/Composite/scripts/source/top/core/ViewDefinitions.js +++ b/Website/Composite/scripts/source/top/core/ViewDefinitions.js @@ -436,6 +436,26 @@ var ViewDefinitions = { } }), + /* + * Stub for tree selector. + */ + "Composite.Management.TreeSelectorDialog": new DialogViewDefinition({ + handle: "Composite.Management.TreeSelectorDialog", + isMutable : true, + position: Dialog.MODAL, + url: Dialog.URL_TREESELECTOR, + argument: { + label: "", + image: "${icon:link}", + selectionProperty: "ElementType", + selectionValue: null, + selectionResult: null, + nodes: [ + { key: null } + ] + } + }), + /* * Function selector (ALL TYPES). */ diff --git a/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/DataInputDialogBinding.js b/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/DataInputDialogBinding.js index d3eae4d87f..3ebf05284a 100644 --- a/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/DataInputDialogBinding.js +++ b/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/DataInputDialogBinding.js @@ -68,12 +68,8 @@ DataInputDialogBinding.prototype.buildButton = function () { self._isButtonClicked = false; }, 1000); - var handle = self.getProperty("handle"); - var definition = ViewDefinition.clone( - handle, - "Generated.ViewDefinition.Handle." + KeyMaster.getUniqueKey() - ); + var definition = self.getDefinition(); if (definition instanceof DialogViewDefinition) { @@ -108,6 +104,22 @@ DataInputDialogBinding.prototype.buildButton = function () { this._dialogButtonBinding = button; }; +/** + * Get definition to invoke. + */ +DataInputDialogBinding.prototype.getDefinition = function () { + + var handle = this.getProperty("handle"); + + var definition = ViewDefinition.clone( + handle, + "Generated.ViewDefinition.Handle." + KeyMaster.getUniqueKey() + ); + + return definition; +}; + + /** * Invoke dialog programatically. */ diff --git a/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/TreeSelectorDialogBinding.js b/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/TreeSelectorDialogBinding.js new file mode 100644 index 0000000000..3d9de5f231 --- /dev/null +++ b/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/TreeSelectorDialogBinding.js @@ -0,0 +1,196 @@ +TreeSelectorDialogBinding.prototype = new DataInputDialogBinding; +TreeSelectorDialogBinding.prototype.constructor = TreeSelectorDialogBinding; +TreeSelectorDialogBinding.superclass = DataInputDialogBinding.prototype; + +/** +* @class +* @implements {IData} +*/ +function TreeSelectorDialogBinding() { + + /** + * @type {SystemLogger} + */ + this.logger = SystemLogger.getLogger("TreeSelectorDialogBinding"); + + /** + * @type {ToolBarButtonBinding} + */ + this.editButtonBinding = null; + + /** + * @type {LabelBinding} + */ + this.labelBinding = null; + + +} + +/** +* Identifies binding. +*/ +TreeSelectorDialogBinding.prototype.toString = function () { + + return "[TreeSelectorDialogBinding]"; +} + +/** +* @overloads {Binding#onBindingRegister} +*/ +TreeSelectorDialogBinding.prototype.onBindingRegister = function () { + + TreeSelectorDialogBinding.superclass.onBindingRegister.call(this); + //this.addActionListener(PageBinding.ACTION_DOPOSTBACK); +}; + +/** +* Build button, build popup and populate by selection elements. +* @overloads {DataInputBinding#_buildDOMContent} +*/ +TreeSelectorDialogBinding.prototype._buildDOMContent = function () { + + TreeSelectorDialogBinding.superclass._buildDOMContent.call(this); + +} + + + +///** +//* Build button. +//*/ +//TreeSelectorDialogBinding.prototype.buildButtonAndLabel = function () { + +// /* +// * Build the label. +// */ +// if (this.shadowTree.labelInput == null) { + +// this.shadowTree.labelInput = DOMUtil.createElementNS(Constants.NS_XHTML, "input", this.bindingDocument); +// this.shadowTree.box.appendChild(this.shadowTree.labelInput); +// this.shadowTree.labelInput.style.display = "none"; +// this.shadowTree.labelInput.readOnly = true; + +// var self = this; + +// DOMEvents.addEventListener(this.shadowTree.labelInput, DOMEvents.DOUBLECLICK, { +// handleEvent: function (e) { +// self.clearLabel(); +// self.focus(); +// } +// }); +// } + +// /* +// * Build the edit button. +// */ +// if (this.editButtonBinding == null) { + +// var button = ToolBarButtonBinding.newInstance(this.bindingDocument); +// button.setImage("${icon:editor-sourceview}"); +// button.bindingElement.style.left = "3px"; +// button.bindingElement.style.width = "29px"; +// this.addFirst(button); +// button.attach(); +// button.hide(); + +// var self = this; + +// button.oncommand = function () { +// self.clearLabel(); +// self.focus(); +// } + +// this.editButtonBinding = button; +// } +//}; + + +///** +//* OnBlur event +//* @overloads {DataInputBinding#onblur} +//*/ +//TreeSelectorDialogBinding.prototype.onblur = function () { + +// TreeSelectorDialogBinding.superclass.onblur.call(this); +// this.setValue(this.getValue()); +//} + +///** +//* Set value. +//* @param {String} value +//* @overloads {DataInputBinding#setValue} +//*/ +//TreeSelectorDialogBinding.prototype.setValue = function (value) { + +// TreeSelectorDialogBinding.superclass.setValue.call(this, value); + +// if (this.isAttached) { + +// this.compositeUrl = new Uri(value); + +// if (this.compositeUrl.isMedia || this.compositeUrl.isPage || this.compositeUrl.isInternalUrl) { +// var label = TreeService.GetCompositeUrlLabel(value); +// if (label != value) { +// this.setLabel(label); +// } +// } else { +// this.clearLabel(); +// } +// this.dispatchAction(TreeSelectorDialogBinding.URL_SELECTED); +// } +//} + + +///** +//* Set Label for input +//* @param {String} value +//* @overloads {DataInputBinding#setValue} +//*/ +//TreeSelectorDialogBinding.prototype.setLabel = function (label) { + +// this.buildButtonAndLabel(); + +// if (this.shadowTree.labelInput) { +// if (label) { +// this.setReadOnly(true); +// this.editButtonBinding.show(); +// this.shadowTree.input.style.display = "none"; +// this.shadowTree.labelInput.style.display = "block"; +// this.shadowTree.labelInput.value = label; +// } else { +// this.setReadOnly(false); +// this.editButtonBinding.hide(); +// this.shadowTree.input.style.display = "block"; +// this.shadowTree.labelInput.style.display = "none"; +// } +// } +//} + +///** +//* Unset Label for input +//*/ +//TreeSelectorDialogBinding.prototype.clearLabel = function () { +// this.setLabel(); +//} + +/** + * Get definition to invoke. + */ +TreeSelectorDialogBinding.prototype.getDefinition = function () { + + var definition = ViewDefinition.clone( + "Composite.Management.TreeSelectorDialog", + "Generated.ViewDefinition.Handle." + KeyMaster.getUniqueKey() + ); + definition.argument.selectionProperty = this.getProperty("selection-property"); + definition.argument.selectionValue = this.getProperty("selection-value"); + definition.argument.selectionResult = this.getProperty("selection-result"); + definition.argument.nodes = [ + { + key: this.getProperty("element-provider"), + search: this.getProperty('serialized-search-token') + } + ]; + + return definition; +}; \ No newline at end of file diff --git a/Website/WebSite.csproj b/Website/WebSite.csproj index 820e32b677..68305b0756 100644 --- a/Website/WebSite.csproj +++ b/Website/WebSite.csproj @@ -324,6 +324,7 @@ + @@ -664,6 +665,7 @@ + From 166cead27c2d70b0071207c2c57286d3d024706a Mon Sep 17 00:00:00 2001 From: Taras Nakonechnyi Date: Wed, 7 Aug 2019 16:44:58 +0300 Subject: [PATCH 02/36] add configuration --- Website/App_Data/Composite/DebugBuild.Composite.config | 3 ++- Website/App_Data/Composite/ReleaseBuild.Composite.config | 3 ++- .../Composite/ReleaseBuild.Composite.config.changeHistory.txt | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Website/App_Data/Composite/DebugBuild.Composite.config b/Website/App_Data/Composite/DebugBuild.Composite.config index b444bb16eb..c1c5c02345 100644 --- a/Website/App_Data/Composite/DebugBuild.Composite.config +++ b/Website/App_Data/Composite/DebugBuild.Composite.config @@ -194,7 +194,8 @@ - + + diff --git a/Website/App_Data/Composite/ReleaseBuild.Composite.config b/Website/App_Data/Composite/ReleaseBuild.Composite.config index 112f99a63d..b257af27c6 100644 --- a/Website/App_Data/Composite/ReleaseBuild.Composite.config +++ b/Website/App_Data/Composite/ReleaseBuild.Composite.config @@ -189,7 +189,8 @@ - + + diff --git a/Website/App_Data/Composite/ReleaseBuild.Composite.config.changeHistory.txt b/Website/App_Data/Composite/ReleaseBuild.Composite.config.changeHistory.txt index 9b5c5997ea..6e456a7377 100644 --- a/Website/App_Data/Composite/ReleaseBuild.Composite.config.changeHistory.txt +++ b/Website/App_Data/Composite/ReleaseBuild.Composite.config.changeHistory.txt @@ -173,4 +173,4 @@ Changes in 6.0 or later -Added to loggingConfiguration/specialSources/allEvents/listeners Changes in 6.7 or later: - - n/a \ No newline at end of file + -Added to configuration/Composite.C1Console.Forms.Plugins.UiControlFactoryConfiguration/Channels/Channel/Namespaces/Namespace/Factories \ No newline at end of file From 47313bc61e237d154dc41c72ed63692f1c13ac87 Mon Sep 17 00:00:00 2001 From: Taras Nakonechnyi Date: Thu, 8 Aug 2019 16:15:04 +0300 Subject: [PATCH 03/36] remove unused comments --- .../data/dialogs/TreeSelectorDialogBinding.js | 145 +----------------- 1 file changed, 1 insertion(+), 144 deletions(-) diff --git a/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/TreeSelectorDialogBinding.js b/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/TreeSelectorDialogBinding.js index 3d9de5f231..5ae041dcfa 100644 --- a/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/TreeSelectorDialogBinding.js +++ b/Website/Composite/scripts/source/top/ui/bindings/data/dialogs/TreeSelectorDialogBinding.js @@ -13,11 +13,6 @@ function TreeSelectorDialogBinding() { */ this.logger = SystemLogger.getLogger("TreeSelectorDialogBinding"); - /** - * @type {ToolBarButtonBinding} - */ - this.editButtonBinding = null; - /** * @type {LabelBinding} */ @@ -34,147 +29,9 @@ TreeSelectorDialogBinding.prototype.toString = function () { return "[TreeSelectorDialogBinding]"; } -/** -* @overloads {Binding#onBindingRegister} -*/ -TreeSelectorDialogBinding.prototype.onBindingRegister = function () { - - TreeSelectorDialogBinding.superclass.onBindingRegister.call(this); - //this.addActionListener(PageBinding.ACTION_DOPOSTBACK); -}; - -/** -* Build button, build popup and populate by selection elements. -* @overloads {DataInputBinding#_buildDOMContent} -*/ -TreeSelectorDialogBinding.prototype._buildDOMContent = function () { - - TreeSelectorDialogBinding.superclass._buildDOMContent.call(this); - -} - - - -///** -//* Build button. -//*/ -//TreeSelectorDialogBinding.prototype.buildButtonAndLabel = function () { - -// /* -// * Build the label. -// */ -// if (this.shadowTree.labelInput == null) { - -// this.shadowTree.labelInput = DOMUtil.createElementNS(Constants.NS_XHTML, "input", this.bindingDocument); -// this.shadowTree.box.appendChild(this.shadowTree.labelInput); -// this.shadowTree.labelInput.style.display = "none"; -// this.shadowTree.labelInput.readOnly = true; - -// var self = this; - -// DOMEvents.addEventListener(this.shadowTree.labelInput, DOMEvents.DOUBLECLICK, { -// handleEvent: function (e) { -// self.clearLabel(); -// self.focus(); -// } -// }); -// } - -// /* -// * Build the edit button. -// */ -// if (this.editButtonBinding == null) { - -// var button = ToolBarButtonBinding.newInstance(this.bindingDocument); -// button.setImage("${icon:editor-sourceview}"); -// button.bindingElement.style.left = "3px"; -// button.bindingElement.style.width = "29px"; -// this.addFirst(button); -// button.attach(); -// button.hide(); - -// var self = this; - -// button.oncommand = function () { -// self.clearLabel(); -// self.focus(); -// } - -// this.editButtonBinding = button; -// } -//}; - - -///** -//* OnBlur event -//* @overloads {DataInputBinding#onblur} -//*/ -//TreeSelectorDialogBinding.prototype.onblur = function () { - -// TreeSelectorDialogBinding.superclass.onblur.call(this); -// this.setValue(this.getValue()); -//} - -///** -//* Set value. -//* @param {String} value -//* @overloads {DataInputBinding#setValue} -//*/ -//TreeSelectorDialogBinding.prototype.setValue = function (value) { - -// TreeSelectorDialogBinding.superclass.setValue.call(this, value); - -// if (this.isAttached) { - -// this.compositeUrl = new Uri(value); - -// if (this.compositeUrl.isMedia || this.compositeUrl.isPage || this.compositeUrl.isInternalUrl) { -// var label = TreeService.GetCompositeUrlLabel(value); -// if (label != value) { -// this.setLabel(label); -// } -// } else { -// this.clearLabel(); -// } -// this.dispatchAction(TreeSelectorDialogBinding.URL_SELECTED); -// } -//} - - -///** -//* Set Label for input -//* @param {String} value -//* @overloads {DataInputBinding#setValue} -//*/ -//TreeSelectorDialogBinding.prototype.setLabel = function (label) { - -// this.buildButtonAndLabel(); - -// if (this.shadowTree.labelInput) { -// if (label) { -// this.setReadOnly(true); -// this.editButtonBinding.show(); -// this.shadowTree.input.style.display = "none"; -// this.shadowTree.labelInput.style.display = "block"; -// this.shadowTree.labelInput.value = label; -// } else { -// this.setReadOnly(false); -// this.editButtonBinding.hide(); -// this.shadowTree.input.style.display = "block"; -// this.shadowTree.labelInput.style.display = "none"; -// } -// } -//} - -///** -//* Unset Label for input -//*/ -//TreeSelectorDialogBinding.prototype.clearLabel = function () { -// this.setLabel(); -//} - /** * Get definition to invoke. + * @overloads {DataInputDialogBinding#getDefinition} */ TreeSelectorDialogBinding.prototype.getDefinition = function () { From 56f8447ab07ffff7908f72d7ed52470eeb7fe4b7 Mon Sep 17 00:00:00 2001 From: Taras Nakonechnyi Date: Mon, 2 Sep 2019 14:58:11 +0300 Subject: [PATCH 04/36] update package versions --- Website/package.json | 474 ++++++++++++++++++++++--------------------- 1 file changed, 240 insertions(+), 234 deletions(-) diff --git a/Website/package.json b/Website/package.json index 95bb8dc981..b6f3f49c13 100644 --- a/Website/package.json +++ b/Website/package.json @@ -1,234 +1,240 @@ -{ - "name": "CompositeC1", - "version": "1.0.0", - "scripts": { - "test": "npm run unit:test", - "lint": "npm run lintconsole", - "coverage": "npm run unit:cov", - "unit:test": "jspm run test/unit/runner.js", - "unit:cov": "jspm run test/unit/coverage.js", - "watch": "chokidar-socket-emitter -p Composite/console/", - "buildconsole": "jspm build CMSConsole Composite/console.js --minify --production", - "lintconsole": "eslint Composite/console test/unit/" - }, - "devDependencies": { - "JSONPath": "^0.10.0", - "autoprefixer-core": "^5.2.1", - "chromedriver": "^2.34.0", - "chokidar-socket-emitter": "0.5.4", - "csswring": "^3.0.5", - "eslint": "3.1.1", - "eslint-plugin-mocha": "4.0.0", - "eslint-plugin-react": "5.2.2", - "grunt": "~0.4.5", - "grunt-contrib-copy": "0.8.2", - "grunt-contrib-less": "^1.0.0", - "grunt-contrib-uglify": "^0.9.2", - "grunt-contrib-watch": "~0.6.1", - "grunt-postcss": "^0.5.5", - "grunt-svgmin": "3.2.0", - "iedriver": "3.14.1", - "istanbul": "^0.4.3", - "istanbul-lib-coverage": "1.0.0", - "jsdom": "9.4.1", - "jspm": "0.17.0-beta.28", - "less": "^2.1.2", - "load-grunt-tasks": "3.5.0", - "mocha": "3.0.1", - "nightwatch": "0.9.3", - "node-fetch": "1.6.0", - "rimraf": "2.5.4", - "robocopy": "^0.1.15", - "selenium-server-standalone-jar": "2.53.1", - "systemjs": "^0.19.36", - "systemjs-istanbul-hook": "0.1.1", - "xml2js": "^0.4.10" - }, - "jspm": { - "main": "Composite/console/console.js", - "dependencies": { - "fixed-data-table-2": "npm:fixed-data-table-2@^0.7.6", - "normalizr": "npm:normalizr@^2.2.1", - "plugin-babel": "npm:systemjs-plugin-babel@^0.0.13", - "rc-table": "npm:rc-table@^5.0.3", - "react-dimensions": "npm:react-dimensions@^1.3.0", - "react-redux": "npm:react-redux@^4.4.5", - "react-select": "npm:react-select@^1.0.0-beta14", - "redux-immutablejs": "npm:redux-immutablejs@^0.0.8", - "redux-observer": "npm:redux-observer@^1.0.0", - "redux-thunk": "npm:redux-thunk@^2.1.0", - "reselect": "npm:reselect@^2.5.4", - "styled-components": "npm:styled-components@^1.1.1", - "svg": "github:npbenjohnson/plugin-svg@^0.1.0", - "text": "github:systemjs/plugin-text@^0.0.9", - "url-polyfill": "npm:url-polyfill@1.0.13", - "wampy": "npm:wampy@^4.0.0", - "whatwg-fetch": "npm:whatwg-fetch@^1.0.0" - }, - "devDependencies": { - "babel-plugin-transform-react-jsx": "npm:babel-plugin-transform-react-jsx@^6.8.0", - "babel-runtime": "npm:babel-runtime@^5.8.24", - "core-js": "npm:core-js@^1.2.0", - "dgram": "npm:jspm-nodelibs-dgram@^0.2.0", - "dns": "npm:jspm-nodelibs-dns@^0.2.0", - "ecc-jsbn": "npm:ecc-jsbn@~0.1.1", - "glob": "npm:glob@^7.0.5", - "jodid25519": "npm:jodid25519@^1.0.0", - "jsbn": "npm:jsbn@0.1", - "react-addons-test-utils": "npm:react-addons-test-utils@^15.3.0", - "react-immutable-proptypes": "npm:react-immutable-proptypes@^2.1.0", - "sinon": "npm:sinon@^1.17.5", - "source-map": "npm:source-map@0.2", - "systemjs-hot-reloader": "github:alexisvincent/systemjs-hot-reloader@^0.6.0", - "systemjs-hot-reloader-store": "github:peteruithoven/systemjs-hot-reloader-store@^1.0.0", - "tweetnacl": "npm:tweetnacl@0.13", - "unexpected-dom": "npm:unexpected-dom@^3.1.0", - "unexpected-mitm": "npm:unexpected-mitm@^9.1.6", - "unexpected-react": "npm:unexpected-react@^3.2.3", - "unexpected-sinon": "npm:unexpected-sinon@^10.5.1", - "unexpected-zurvan": "npm:unexpected-zurvan@^0.1.0", - "zurvan": "npm:zurvan@^0.3.2" - }, - "peerDependencies": { - "assert": "npm:jspm-nodelibs-assert@^0.2.0", - "bluebird": "npm:bluebird@^3.0.0", - "buffer": "github:jspm/nodelibs-buffer@^0.2.0-alpha", - "child_process": "npm:jspm-nodelibs-child_process@^0.2.0", - "constants": "npm:jspm-nodelibs-constants@^0.2.0", - "crypto": "npm:jspm-nodelibs-crypto@^0.2.0", - "domain": "npm:jspm-nodelibs-domain@^0.2.0", - "events": "github:jspm/nodelibs-events@^0.2.0-alpha", - "fs": "github:jspm/nodelibs-fs@^0.2.0-alpha", - "http": "github:jspm/nodelibs-http@^0.2.0-alpha", - "https": "npm:jspm-nodelibs-https@^0.2.0", - "immutable": "npm:immutable@^3.8.1", - "magicpen-media": "npm:magicpen-media@^1.5.0", - "messy": "npm:messy@^6.12.0", - "module": "npm:jspm-nodelibs-module@^0.2.0", - "net": "npm:jspm-nodelibs-net@^0.2.0", - "os": "npm:jspm-nodelibs-os@^0.2.0", - "path": "github:jspm/nodelibs-path@^0.2.0-alpha", - "process": "github:jspm/nodelibs-process@^0.2.0-alpha", - "punycode": "npm:jspm-nodelibs-punycode@^0.2.0", - "querystring": "npm:jspm-nodelibs-querystring@^0.2.0", - "react": "npm:react@^15.3.2", - "react-dom": "npm:react-dom@^15.3.2", - "redux": "npm:redux@^3.5.2", - "repl": "npm:jspm-nodelibs-repl@^0.2.0", - "stream": "github:jspm/nodelibs-stream@^0.2.0-alpha", - "string_decoder": "npm:jspm-nodelibs-string_decoder@^0.2.0", - "tls": "npm:jspm-nodelibs-tls@^0.2.0", - "tty": "npm:jspm-nodelibs-tty@^0.2.0", - "unexpected": "npm:unexpected@^10.10.0", - "unexpected-messy": "npm:unexpected-messy@^6.0.0", - "url": "github:jspm/nodelibs-url@^0.2.0-alpha", - "util": "github:jspm/nodelibs-util@^0.2.0-alpha", - "vm": "npm:jspm-nodelibs-vm@^0.2.0", - "zlib": "npm:jspm-nodelibs-zlib@^0.2.0" - }, - "overrides": { - "github:socketio/socket.io-client@1.5.0": { - "main": "socket.io.js" - }, - "npm:babel-runtime@5.8.38": { - "main": false, - "dependencies": {}, - "optionalDependencies": { - "core-js": "^1.2.0" - } - }, - "npm:bluebird@3.4.6": { - "meta": { - "js/browser/bluebird.js": { - "format": "global" - }, - "js/browser/bluebird.min.js": { - "format": "global" - } - } - }, - "npm:browserify-zlib@0.1.4": { - "dependencies": { - "readable-stream": "^2.0.2", - "pako": "~0.2.0" - }, - "map": { - "_stream_transform": "readable-stream/transform" - } - }, - "npm:debug@2.2.0": { - "main": "browser.js", - "jspmNodeConversion": false, - "format": "cjs", - "map": { - "./browser.js": { - "node": "./node.js" - }, - "fs": "@node/fs", - "net": "@node/net", - "tty": "@node/tty", - "util": "@node/util" - } - }, - "npm:debug@2.3.2": { - "main": "browser.js", - "jspmNodeConversion": false, - "format": "cjs", - "map": { - "./browser.js": { - "node": "./node.js" - }, - "fs": "@node/fs", - "net": "@node/net", - "tty": "@node/tty", - "util": "@node/util" - } - }, - "npm:inherits@2.0.1": { - "ignore": [ - "test.js" - ] - }, - "npm:inherits@2.0.3": { - "ignore": [ - "test.js" - ] - }, - "npm:lodash@4.16.4": { - "map": { - "buffer": "@empty", - "process": "@empty" - } - }, - "npm:lodash@4.17.2": { - "map": { - "buffer": "@empty", - "process": "@empty" - } - }, - "npm:ms@0.7.1": { - "jspmNodeConversion": false, - "format": "cjs" - }, - "npm:ms@0.7.2": { - "jspmNodeConversion": false, - "format": "cjs" - }, - "npm:styled-components@1.1.1": { - "dependencies": { - "buffer": "^5.0.0", - "fbjs": "^0.8.4", - "glamor": "^2.15.5", - "inline-style-prefixer": "^2.0.4", - "lodash": "^4.15.0", - "supports-color": "^3.1.2" - } - }, - "npm:unexpected@10.18.1": { - "main": "unexpected.js", - "dependencies": {}, - "jspmPackage": true - } - } - } -} +{ + "name": "CompositeC1", + "version": "1.0.0", + "scripts": { + "test": "npm run unit:test", + "lint": "npm run lintconsole", + "coverage": "npm run unit:cov", + "unit:test": "jspm run test/unit/runner.js", + "unit:cov": "jspm run test/unit/coverage.js", + "watch": "chokidar-socket-emitter -p Composite/console/", + "buildconsole": "jspm build CMSConsole Composite/console.js --minify --production", + "lintconsole": "eslint Composite/console test/unit/" + }, + "devDependencies": { + "JSONPath": "^0.10.0", + "autoprefixer-core": "^5.2.1", + "chokidar-socket-emitter": "0.5.4", + "chromedriver": "^2.34.0", + "csswring": "^3.0.5", + "eslint": "^4.18.2", + "eslint-plugin-mocha": "4.0.0", + "eslint-plugin-react": "5.2.2", + "grunt": "~0.4.5", + "grunt-contrib-copy": "0.8.2", + "grunt-contrib-less": "^1.0.0", + "grunt-contrib-uglify": "^0.9.2", + "grunt-contrib-watch": "~0.6.1", + "grunt-postcss": "^0.5.5", + "grunt-svgmin": "3.2.0", + "iedriver": "3.14.1", + "istanbul": "^0.4.3", + "istanbul-lib-coverage": "1.0.0", + "jsdom": "9.4.1", + "jspm": "^0.17.0-beta.49", + "less": "^2.1.2", + "load-grunt-tasks": "3.5.0", + "mocha": "3.0.1", + "nightwatch": "0.9.3", + "node-fetch": "1.6.0", + "rimraf": "2.5.4", + "robocopy": "^0.1.15", + "selenium-server-standalone-jar": "2.53.1", + "systemjs": "^0.19.36", + "systemjs-istanbul-hook": "0.1.1", + "xml2js": "^0.4.10" + }, + "jspm": { + "main": "Composite/console/console.js", + "dependencies": { + "fixed-data-table-2": "npm:fixed-data-table-2@^0.7.6", + "normalizr": "npm:normalizr@^2.2.1", + "plugin-babel": "npm:systemjs-plugin-babel@^0.0.13", + "rc-table": "npm:rc-table@^5.0.3", + "react-dimensions": "npm:react-dimensions@^1.3.0", + "react-redux": "npm:react-redux@^4.4.5", + "react-select": "npm:react-select@^1.0.0-beta14", + "redux-immutablejs": "npm:redux-immutablejs@^0.0.8", + "redux-observer": "npm:redux-observer@^1.0.0", + "redux-thunk": "npm:redux-thunk@^2.1.0", + "reselect": "npm:reselect@^2.5.4", + "styled-components": "npm:styled-components@^1.1.1", + "svg": "github:npbenjohnson/plugin-svg@^0.1.0", + "text": "github:systemjs/plugin-text@^0.0.9", + "url-polyfill": "npm:url-polyfill@1.0.13", + "wampy": "npm:wampy@^4.0.0", + "whatwg-fetch": "npm:whatwg-fetch@^1.0.0" + }, + "devDependencies": { + "babel-plugin-transform-react-jsx": "npm:babel-plugin-transform-react-jsx@^6.8.0", + "babel-runtime": "npm:babel-runtime@^5.8.24", + "core-js": "npm:core-js@^1.2.0", + "dgram": "npm:jspm-nodelibs-dgram@^0.2.0", + "dns": "npm:jspm-nodelibs-dns@^0.2.0", + "ecc-jsbn": "npm:ecc-jsbn@~0.1.1", + "glob": "npm:glob@^7.0.5", + "jodid25519": "npm:jodid25519@^1.0.0", + "jsbn": "npm:jsbn@0.1", + "react-addons-test-utils": "npm:react-addons-test-utils@^15.3.0", + "react-immutable-proptypes": "npm:react-immutable-proptypes@^2.1.0", + "sinon": "npm:sinon@^1.17.5", + "source-map": "npm:source-map@0.2", + "systemjs-hot-reloader": "github:alexisvincent/systemjs-hot-reloader@^0.6.0", + "systemjs-hot-reloader-store": "github:peteruithoven/systemjs-hot-reloader-store@^1.0.0", + "tweetnacl": "npm:tweetnacl@0.13", + "unexpected-dom": "npm:unexpected-dom@^3.1.0", + "unexpected-mitm": "npm:unexpected-mitm@^9.1.6", + "unexpected-react": "npm:unexpected-react@^3.2.3", + "unexpected-sinon": "npm:unexpected-sinon@^10.5.1", + "unexpected-zurvan": "npm:unexpected-zurvan@^0.1.0", + "zurvan": "npm:zurvan@^0.3.2" + }, + "peerDependencies": { + "assert": "npm:jspm-nodelibs-assert@^0.2.0", + "bluebird": "npm:bluebird@^3.0.0", + "buffer": "npm:jspm-nodelibs-buffer@^0.2.0", + "child_process": "npm:jspm-nodelibs-child_process@^0.2.0", + "constants": "npm:jspm-nodelibs-constants@^0.2.0", + "crypto": "npm:jspm-nodelibs-crypto@^0.2.0", + "domain": "npm:jspm-nodelibs-domain@^0.2.0", + "events": "npm:jspm-nodelibs-events@^0.2.0", + "fs": "npm:jspm-nodelibs-fs@^0.2.0", + "http": "npm:jspm-nodelibs-http@^0.2.0", + "https": "npm:jspm-nodelibs-https@^0.2.0", + "immutable": "npm:immutable@^3.8.1", + "magicpen-media": "npm:magicpen-media@^1.5.0", + "messy": "npm:messy@^6.12.0", + "module": "npm:jspm-nodelibs-module@^0.2.0", + "net": "npm:jspm-nodelibs-net@^0.2.0", + "os": "npm:jspm-nodelibs-os@^0.2.0", + "path": "npm:jspm-nodelibs-path@^0.2.0", + "process": "npm:jspm-nodelibs-process@^0.2.0", + "punycode": "npm:jspm-nodelibs-punycode@^0.2.0", + "querystring": "npm:jspm-nodelibs-querystring@^0.2.0", + "react": "npm:react@^15.3.2", + "react-dom": "npm:react-dom@^15.3.2", + "redux": "npm:redux@^3.5.2", + "repl": "npm:jspm-nodelibs-repl@^0.2.0", + "stream": "npm:jspm-nodelibs-stream@^0.2.0", + "string_decoder": "npm:jspm-nodelibs-string_decoder@^0.2.0", + "tls": "npm:jspm-nodelibs-tls@^0.2.0", + "tty": "npm:jspm-nodelibs-tty@^0.2.0", + "unexpected": "npm:unexpected@^10.10.0", + "unexpected-messy": "npm:unexpected-messy@^6.0.0", + "url": "npm:jspm-nodelibs-url@^0.2.0", + "util": "npm:jspm-nodelibs-util@^0.2.0", + "vm": "npm:jspm-nodelibs-vm@^0.2.0", + "zlib": "npm:jspm-nodelibs-zlib@^0.2.0" + }, + "overrides": { + "github:socketio/socket.io-client@1.5.0": { + "main": "socket.io.js" + }, + "npm:babel-runtime@5.8.38": { + "main": false, + "dependencies": {}, + "optionalDependencies": { + "core-js": "^1.2.0" + } + }, + "npm:bluebird@3.4.6": { + "meta": { + "js/browser/bluebird.js": { + "format": "global" + }, + "js/browser/bluebird.min.js": { + "format": "global" + } + } + }, + "npm:browserify-zlib@0.1.4": { + "dependencies": { + "readable-stream": "^2.0.2", + "pako": "~0.2.0" + }, + "map": { + "_stream_transform": "readable-stream/transform" + } + }, + "npm:debug@2.2.0": { + "main": "browser.js", + "jspmNodeConversion": false, + "format": "cjs", + "map": { + "./browser.js": { + "node": "./node.js" + }, + "fs": "@node/fs", + "net": "@node/net", + "tty": "@node/tty", + "util": "@node/util" + } + }, + "npm:debug@2.3.2": { + "main": "browser.js", + "jspmNodeConversion": false, + "format": "cjs", + "map": { + "./browser.js": { + "node": "./node.js" + }, + "fs": "@node/fs", + "net": "@node/net", + "tty": "@node/tty", + "util": "@node/util" + } + }, + "npm:inherits@2.0.1": { + "ignore": [ + "test.js" + ] + }, + "npm:inherits@2.0.3": { + "ignore": [ + "test.js" + ] + }, + "npm:lodash@4.16.4": { + "map": { + "buffer": "@empty", + "process": "@empty" + } + }, + "npm:lodash@4.17.2": { + "map": { + "buffer": "@empty", + "process": "@empty" + } + }, + "npm:ms@0.7.1": { + "jspmNodeConversion": false, + "format": "cjs" + }, + "npm:ms@0.7.2": { + "jspmNodeConversion": false, + "format": "cjs" + }, + "npm:pbkdf2@3.0.17": { + "main": "browser.js" + }, + "npm:safe-buffer@5.2.0": { + "browser": "index.js" + }, + "npm:styled-components@1.1.1": { + "dependencies": { + "buffer": "^5.0.0", + "fbjs": "^0.8.4", + "glamor": "^2.15.5", + "inline-style-prefixer": "^2.0.4", + "lodash": "^4.15.0", + "supports-color": "^3.1.2" + } + }, + "npm:unexpected@10.18.1": { + "main": "unexpected.js", + "dependencies": {}, + "jspmPackage": true + } + } + } +} From d261809749804a4d0995b8a8d2f22cbcaed41106 Mon Sep 17 00:00:00 2001 From: Taras Nakonechnyi Date: Wed, 4 Sep 2019 15:44:42 +0300 Subject: [PATCH 05/36] return old version of jspm --- Website/package.json | 474 +++++++++++++++++++++---------------------- 1 file changed, 234 insertions(+), 240 deletions(-) diff --git a/Website/package.json b/Website/package.json index b6f3f49c13..53d939be87 100644 --- a/Website/package.json +++ b/Website/package.json @@ -1,240 +1,234 @@ -{ - "name": "CompositeC1", - "version": "1.0.0", - "scripts": { - "test": "npm run unit:test", - "lint": "npm run lintconsole", - "coverage": "npm run unit:cov", - "unit:test": "jspm run test/unit/runner.js", - "unit:cov": "jspm run test/unit/coverage.js", - "watch": "chokidar-socket-emitter -p Composite/console/", - "buildconsole": "jspm build CMSConsole Composite/console.js --minify --production", - "lintconsole": "eslint Composite/console test/unit/" - }, - "devDependencies": { - "JSONPath": "^0.10.0", - "autoprefixer-core": "^5.2.1", - "chokidar-socket-emitter": "0.5.4", - "chromedriver": "^2.34.0", - "csswring": "^3.0.5", - "eslint": "^4.18.2", - "eslint-plugin-mocha": "4.0.0", - "eslint-plugin-react": "5.2.2", - "grunt": "~0.4.5", - "grunt-contrib-copy": "0.8.2", - "grunt-contrib-less": "^1.0.0", - "grunt-contrib-uglify": "^0.9.2", - "grunt-contrib-watch": "~0.6.1", - "grunt-postcss": "^0.5.5", - "grunt-svgmin": "3.2.0", - "iedriver": "3.14.1", - "istanbul": "^0.4.3", - "istanbul-lib-coverage": "1.0.0", - "jsdom": "9.4.1", - "jspm": "^0.17.0-beta.49", - "less": "^2.1.2", - "load-grunt-tasks": "3.5.0", - "mocha": "3.0.1", - "nightwatch": "0.9.3", - "node-fetch": "1.6.0", - "rimraf": "2.5.4", - "robocopy": "^0.1.15", - "selenium-server-standalone-jar": "2.53.1", - "systemjs": "^0.19.36", - "systemjs-istanbul-hook": "0.1.1", - "xml2js": "^0.4.10" - }, - "jspm": { - "main": "Composite/console/console.js", - "dependencies": { - "fixed-data-table-2": "npm:fixed-data-table-2@^0.7.6", - "normalizr": "npm:normalizr@^2.2.1", - "plugin-babel": "npm:systemjs-plugin-babel@^0.0.13", - "rc-table": "npm:rc-table@^5.0.3", - "react-dimensions": "npm:react-dimensions@^1.3.0", - "react-redux": "npm:react-redux@^4.4.5", - "react-select": "npm:react-select@^1.0.0-beta14", - "redux-immutablejs": "npm:redux-immutablejs@^0.0.8", - "redux-observer": "npm:redux-observer@^1.0.0", - "redux-thunk": "npm:redux-thunk@^2.1.0", - "reselect": "npm:reselect@^2.5.4", - "styled-components": "npm:styled-components@^1.1.1", - "svg": "github:npbenjohnson/plugin-svg@^0.1.0", - "text": "github:systemjs/plugin-text@^0.0.9", - "url-polyfill": "npm:url-polyfill@1.0.13", - "wampy": "npm:wampy@^4.0.0", - "whatwg-fetch": "npm:whatwg-fetch@^1.0.0" - }, - "devDependencies": { - "babel-plugin-transform-react-jsx": "npm:babel-plugin-transform-react-jsx@^6.8.0", - "babel-runtime": "npm:babel-runtime@^5.8.24", - "core-js": "npm:core-js@^1.2.0", - "dgram": "npm:jspm-nodelibs-dgram@^0.2.0", - "dns": "npm:jspm-nodelibs-dns@^0.2.0", - "ecc-jsbn": "npm:ecc-jsbn@~0.1.1", - "glob": "npm:glob@^7.0.5", - "jodid25519": "npm:jodid25519@^1.0.0", - "jsbn": "npm:jsbn@0.1", - "react-addons-test-utils": "npm:react-addons-test-utils@^15.3.0", - "react-immutable-proptypes": "npm:react-immutable-proptypes@^2.1.0", - "sinon": "npm:sinon@^1.17.5", - "source-map": "npm:source-map@0.2", - "systemjs-hot-reloader": "github:alexisvincent/systemjs-hot-reloader@^0.6.0", - "systemjs-hot-reloader-store": "github:peteruithoven/systemjs-hot-reloader-store@^1.0.0", - "tweetnacl": "npm:tweetnacl@0.13", - "unexpected-dom": "npm:unexpected-dom@^3.1.0", - "unexpected-mitm": "npm:unexpected-mitm@^9.1.6", - "unexpected-react": "npm:unexpected-react@^3.2.3", - "unexpected-sinon": "npm:unexpected-sinon@^10.5.1", - "unexpected-zurvan": "npm:unexpected-zurvan@^0.1.0", - "zurvan": "npm:zurvan@^0.3.2" - }, - "peerDependencies": { - "assert": "npm:jspm-nodelibs-assert@^0.2.0", - "bluebird": "npm:bluebird@^3.0.0", - "buffer": "npm:jspm-nodelibs-buffer@^0.2.0", - "child_process": "npm:jspm-nodelibs-child_process@^0.2.0", - "constants": "npm:jspm-nodelibs-constants@^0.2.0", - "crypto": "npm:jspm-nodelibs-crypto@^0.2.0", - "domain": "npm:jspm-nodelibs-domain@^0.2.0", - "events": "npm:jspm-nodelibs-events@^0.2.0", - "fs": "npm:jspm-nodelibs-fs@^0.2.0", - "http": "npm:jspm-nodelibs-http@^0.2.0", - "https": "npm:jspm-nodelibs-https@^0.2.0", - "immutable": "npm:immutable@^3.8.1", - "magicpen-media": "npm:magicpen-media@^1.5.0", - "messy": "npm:messy@^6.12.0", - "module": "npm:jspm-nodelibs-module@^0.2.0", - "net": "npm:jspm-nodelibs-net@^0.2.0", - "os": "npm:jspm-nodelibs-os@^0.2.0", - "path": "npm:jspm-nodelibs-path@^0.2.0", - "process": "npm:jspm-nodelibs-process@^0.2.0", - "punycode": "npm:jspm-nodelibs-punycode@^0.2.0", - "querystring": "npm:jspm-nodelibs-querystring@^0.2.0", - "react": "npm:react@^15.3.2", - "react-dom": "npm:react-dom@^15.3.2", - "redux": "npm:redux@^3.5.2", - "repl": "npm:jspm-nodelibs-repl@^0.2.0", - "stream": "npm:jspm-nodelibs-stream@^0.2.0", - "string_decoder": "npm:jspm-nodelibs-string_decoder@^0.2.0", - "tls": "npm:jspm-nodelibs-tls@^0.2.0", - "tty": "npm:jspm-nodelibs-tty@^0.2.0", - "unexpected": "npm:unexpected@^10.10.0", - "unexpected-messy": "npm:unexpected-messy@^6.0.0", - "url": "npm:jspm-nodelibs-url@^0.2.0", - "util": "npm:jspm-nodelibs-util@^0.2.0", - "vm": "npm:jspm-nodelibs-vm@^0.2.0", - "zlib": "npm:jspm-nodelibs-zlib@^0.2.0" - }, - "overrides": { - "github:socketio/socket.io-client@1.5.0": { - "main": "socket.io.js" - }, - "npm:babel-runtime@5.8.38": { - "main": false, - "dependencies": {}, - "optionalDependencies": { - "core-js": "^1.2.0" - } - }, - "npm:bluebird@3.4.6": { - "meta": { - "js/browser/bluebird.js": { - "format": "global" - }, - "js/browser/bluebird.min.js": { - "format": "global" - } - } - }, - "npm:browserify-zlib@0.1.4": { - "dependencies": { - "readable-stream": "^2.0.2", - "pako": "~0.2.0" - }, - "map": { - "_stream_transform": "readable-stream/transform" - } - }, - "npm:debug@2.2.0": { - "main": "browser.js", - "jspmNodeConversion": false, - "format": "cjs", - "map": { - "./browser.js": { - "node": "./node.js" - }, - "fs": "@node/fs", - "net": "@node/net", - "tty": "@node/tty", - "util": "@node/util" - } - }, - "npm:debug@2.3.2": { - "main": "browser.js", - "jspmNodeConversion": false, - "format": "cjs", - "map": { - "./browser.js": { - "node": "./node.js" - }, - "fs": "@node/fs", - "net": "@node/net", - "tty": "@node/tty", - "util": "@node/util" - } - }, - "npm:inherits@2.0.1": { - "ignore": [ - "test.js" - ] - }, - "npm:inherits@2.0.3": { - "ignore": [ - "test.js" - ] - }, - "npm:lodash@4.16.4": { - "map": { - "buffer": "@empty", - "process": "@empty" - } - }, - "npm:lodash@4.17.2": { - "map": { - "buffer": "@empty", - "process": "@empty" - } - }, - "npm:ms@0.7.1": { - "jspmNodeConversion": false, - "format": "cjs" - }, - "npm:ms@0.7.2": { - "jspmNodeConversion": false, - "format": "cjs" - }, - "npm:pbkdf2@3.0.17": { - "main": "browser.js" - }, - "npm:safe-buffer@5.2.0": { - "browser": "index.js" - }, - "npm:styled-components@1.1.1": { - "dependencies": { - "buffer": "^5.0.0", - "fbjs": "^0.8.4", - "glamor": "^2.15.5", - "inline-style-prefixer": "^2.0.4", - "lodash": "^4.15.0", - "supports-color": "^3.1.2" - } - }, - "npm:unexpected@10.18.1": { - "main": "unexpected.js", - "dependencies": {}, - "jspmPackage": true - } - } - } -} +{ + "name": "CompositeC1", + "version": "1.0.0", + "scripts": { + "test": "npm run unit:test", + "lint": "npm run lintconsole", + "coverage": "npm run unit:cov", + "unit:test": "jspm run test/unit/runner.js", + "unit:cov": "jspm run test/unit/coverage.js", + "watch": "chokidar-socket-emitter -p Composite/console/", + "buildconsole": "jspm build CMSConsole Composite/console.js --minify --production", + "lintconsole": "eslint Composite/console test/unit/" + }, + "devDependencies": { + "JSONPath": "^0.10.0", + "autoprefixer-core": "^5.2.1", + "chokidar-socket-emitter": "0.5.4", + "chromedriver": "^2.34.0", + "csswring": "^3.0.5", + "eslint": "^4.18.2", + "eslint-plugin-mocha": "4.0.0", + "eslint-plugin-react": "5.2.2", + "grunt": "~0.4.5", + "grunt-contrib-copy": "0.8.2", + "grunt-contrib-less": "^1.0.0", + "grunt-contrib-uglify": "^0.9.2", + "grunt-contrib-watch": "~0.6.1", + "grunt-postcss": "^0.5.5", + "grunt-svgmin": "3.2.0", + "iedriver": "3.14.1", + "istanbul": "^0.4.3", + "istanbul-lib-coverage": "1.0.0", + "jsdom": "9.4.1", + "jspm": "0.17.0-beta.28", + "less": "^2.1.2", + "load-grunt-tasks": "3.5.0", + "mocha": "3.0.1", + "nightwatch": "0.9.3", + "node-fetch": "1.6.0", + "rimraf": "2.5.4", + "robocopy": "^0.1.15", + "selenium-server-standalone-jar": "2.53.1", + "systemjs": "^0.19.36", + "systemjs-istanbul-hook": "0.1.1", + "xml2js": "^0.4.10" + }, + "jspm": { + "main": "Composite/console/console.js", + "dependencies": { + "fixed-data-table-2": "npm:fixed-data-table-2@^0.7.6", + "normalizr": "npm:normalizr@^2.2.1", + "plugin-babel": "npm:systemjs-plugin-babel@^0.0.13", + "rc-table": "npm:rc-table@^5.0.3", + "react-dimensions": "npm:react-dimensions@^1.3.0", + "react-redux": "npm:react-redux@^4.4.5", + "react-select": "npm:react-select@^1.0.0-beta14", + "redux-immutablejs": "npm:redux-immutablejs@^0.0.8", + "redux-observer": "npm:redux-observer@^1.0.0", + "redux-thunk": "npm:redux-thunk@^2.1.0", + "reselect": "npm:reselect@^2.5.4", + "styled-components": "npm:styled-components@^1.1.1", + "svg": "github:npbenjohnson/plugin-svg@^0.1.0", + "text": "github:systemjs/plugin-text@^0.0.9", + "url-polyfill": "npm:url-polyfill@1.0.13", + "wampy": "npm:wampy@^4.0.0", + "whatwg-fetch": "npm:whatwg-fetch@^1.0.0" + }, + "devDependencies": { + "babel-plugin-transform-react-jsx": "npm:babel-plugin-transform-react-jsx@^6.8.0", + "babel-runtime": "npm:babel-runtime@^5.8.24", + "core-js": "npm:core-js@^1.2.0", + "dgram": "npm:jspm-nodelibs-dgram@^0.2.0", + "dns": "npm:jspm-nodelibs-dns@^0.2.0", + "ecc-jsbn": "npm:ecc-jsbn@~0.1.1", + "glob": "npm:glob@^7.0.5", + "jodid25519": "npm:jodid25519@^1.0.0", + "jsbn": "npm:jsbn@0.1", + "react-addons-test-utils": "npm:react-addons-test-utils@^15.3.0", + "react-immutable-proptypes": "npm:react-immutable-proptypes@^2.1.0", + "sinon": "npm:sinon@^1.17.5", + "source-map": "npm:source-map@0.2", + "systemjs-hot-reloader": "github:alexisvincent/systemjs-hot-reloader@^0.6.0", + "systemjs-hot-reloader-store": "github:peteruithoven/systemjs-hot-reloader-store@^1.0.0", + "tweetnacl": "npm:tweetnacl@0.13", + "unexpected-dom": "npm:unexpected-dom@^3.1.0", + "unexpected-mitm": "npm:unexpected-mitm@^9.1.6", + "unexpected-react": "npm:unexpected-react@^3.2.3", + "unexpected-sinon": "npm:unexpected-sinon@^10.5.1", + "unexpected-zurvan": "npm:unexpected-zurvan@^0.1.0", + "zurvan": "npm:zurvan@^0.3.2" + }, + "peerDependencies": { + "assert": "npm:jspm-nodelibs-assert@^0.2.0", + "bluebird": "npm:bluebird@^3.0.0", + "buffer": "github:jspm/nodelibs-buffer@^0.2.0-alpha", + "child_process": "npm:jspm-nodelibs-child_process@^0.2.0", + "constants": "npm:jspm-nodelibs-constants@^0.2.0", + "crypto": "npm:jspm-nodelibs-crypto@^0.2.0", + "domain": "npm:jspm-nodelibs-domain@^0.2.0", + "events": "github:jspm/nodelibs-events@^0.2.0-alpha", + "fs": "github:jspm/nodelibs-fs@^0.2.0-alpha", + "http": "github:jspm/nodelibs-http@^0.2.0-alpha", + "https": "npm:jspm-nodelibs-https@^0.2.0", + "immutable": "npm:immutable@^3.8.1", + "magicpen-media": "npm:magicpen-media@^1.5.0", + "messy": "npm:messy@^6.12.0", + "module": "npm:jspm-nodelibs-module@^0.2.0", + "net": "npm:jspm-nodelibs-net@^0.2.0", + "os": "npm:jspm-nodelibs-os@^0.2.0", + "path": "github:jspm/nodelibs-path@^0.2.0-alpha", + "process": "github:jspm/nodelibs-process@^0.2.0-alpha", + "punycode": "npm:jspm-nodelibs-punycode@^0.2.0", + "querystring": "npm:jspm-nodelibs-querystring@^0.2.0", + "react": "npm:react@^15.3.2", + "react-dom": "npm:react-dom@^15.3.2", + "redux": "npm:redux@^3.5.2", + "repl": "npm:jspm-nodelibs-repl@^0.2.0", + "stream": "github:jspm/nodelibs-stream@^0.2.0-alpha", + "string_decoder": "npm:jspm-nodelibs-string_decoder@^0.2.0", + "tls": "npm:jspm-nodelibs-tls@^0.2.0", + "tty": "npm:jspm-nodelibs-tty@^0.2.0", + "unexpected": "npm:unexpected@^10.10.0", + "unexpected-messy": "npm:unexpected-messy@^6.0.0", + "url": "github:jspm/nodelibs-url@^0.2.0-alpha", + "util": "github:jspm/nodelibs-util@^0.2.0-alpha", + "vm": "npm:jspm-nodelibs-vm@^0.2.0", + "zlib": "npm:jspm-nodelibs-zlib@^0.2.0" + }, + "overrides": { + "github:socketio/socket.io-client@1.5.0": { + "main": "socket.io.js" + }, + "npm:babel-runtime@5.8.38": { + "main": false, + "dependencies": {}, + "optionalDependencies": { + "core-js": "^1.2.0" + } + }, + "npm:bluebird@3.4.6": { + "meta": { + "js/browser/bluebird.js": { + "format": "global" + }, + "js/browser/bluebird.min.js": { + "format": "global" + } + } + }, + "npm:browserify-zlib@0.1.4": { + "dependencies": { + "readable-stream": "^2.0.2", + "pako": "~0.2.0" + }, + "map": { + "_stream_transform": "readable-stream/transform" + } + }, + "npm:debug@2.2.0": { + "main": "browser.js", + "jspmNodeConversion": false, + "format": "cjs", + "map": { + "./browser.js": { + "node": "./node.js" + }, + "fs": "@node/fs", + "net": "@node/net", + "tty": "@node/tty", + "util": "@node/util" + } + }, + "npm:debug@2.3.2": { + "main": "browser.js", + "jspmNodeConversion": false, + "format": "cjs", + "map": { + "./browser.js": { + "node": "./node.js" + }, + "fs": "@node/fs", + "net": "@node/net", + "tty": "@node/tty", + "util": "@node/util" + } + }, + "npm:inherits@2.0.1": { + "ignore": [ + "test.js" + ] + }, + "npm:inherits@2.0.3": { + "ignore": [ + "test.js" + ] + }, + "npm:lodash@4.16.4": { + "map": { + "buffer": "@empty", + "process": "@empty" + } + }, + "npm:lodash@4.17.2": { + "map": { + "buffer": "@empty", + "process": "@empty" + } + }, + "npm:ms@0.7.1": { + "jspmNodeConversion": false, + "format": "cjs" + }, + "npm:ms@0.7.2": { + "jspmNodeConversion": false, + "format": "cjs" + }, + "npm:styled-components@1.1.1": { + "dependencies": { + "buffer": "^5.0.0", + "fbjs": "^0.8.4", + "glamor": "^2.15.5", + "inline-style-prefixer": "^2.0.4", + "lodash": "^4.15.0", + "supports-color": "^3.1.2" + } + }, + "npm:unexpected@10.18.1": { + "main": "unexpected.js", + "dependencies": {}, + "jspmPackage": true + } + } + } +} From 85c53e8555d31a0b49ccc6ab67037f0ed96cdd81 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Mon, 14 Oct 2019 20:03:28 +0200 Subject: [PATCH 06/36] Non-functional formatting fix --- Website/ReleaseCleanupConfiguration.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index 20ff15d3fc..36261abe37 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -1,4 +1,4 @@ - + @@ -19,9 +19,9 @@ - - - + + + From 4da2402b898c2b28c111b1f08249b1c986e89e08 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Mon, 14 Oct 2019 20:05:46 +0200 Subject: [PATCH 07/36] Build; adding \node_modules to ReleaseCleanupConfiguration Explorative. --- Website/ReleaseCleanupConfiguration.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index 36261abe37..dda1325969 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -43,6 +43,7 @@ + From fd526e30560133cac7d326efaa9370a5b5423432 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Tue, 15 Oct 2019 17:37:42 +0200 Subject: [PATCH 08/36] Update ReleaseCleanupConfiguration.xml --- Website/ReleaseCleanupConfiguration.xml | 34 +++++++------------------ 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index dda1325969..4b1fcdf0f1 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -2,38 +2,22 @@ - - - - - - - - + - - - - - - - - - - - - + + + @@ -41,21 +25,21 @@ + + + - - - - - + + From 28d343487b8c5c278f2dfdcc65a1a6e97395ee13 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Tue, 15 Oct 2019 22:47:50 +0200 Subject: [PATCH 09/36] Update ReleaseCleanupConfiguration.xml Moving more semantics to this file, for simpler build code --- Website/ReleaseCleanupConfiguration.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index 4b1fcdf0f1..beba171dc8 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -10,14 +10,13 @@ - - - - - + + + + @@ -40,6 +39,7 @@ + From 613c17e9139d1d9c8fe07da9cebe98ae4e48137c Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 00:55:53 +0200 Subject: [PATCH 10/36] Update ReleaseCleanupConfiguration.xml Retaining \Composite\lib\codemirror files in build. Cleaning up non-prod *.js* files. --- Website/ReleaseCleanupConfiguration.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index beba171dc8..225d24230f 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -29,13 +29,14 @@ - + + From 2218fc925985777e1cc9bff7f5268731bb38c23e Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 15:44:40 +0200 Subject: [PATCH 11/36] Update ReleaseCleanupConfiguration.xml Pure debug step --- Website/ReleaseCleanupConfiguration.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index 225d24230f..b5f23a910b 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -27,7 +27,9 @@ + From fec324f86eccda22184826b5ce9b65f8a9676eaf Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 17:58:23 +0200 Subject: [PATCH 12/36] Rename Default.common.xml to ReleaseBuild.common.xml To be handles by build ReleaseBuild.*.* rule --- .../{Default.common.xml => ReleaseBuild.common.xml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename Website/Frontend/Config/VisualEditor/{Default.common.xml => ReleaseBuild.common.xml} (99%) diff --git a/Website/Frontend/Config/VisualEditor/Default.common.xml b/Website/Frontend/Config/VisualEditor/ReleaseBuild.common.xml similarity index 99% rename from Website/Frontend/Config/VisualEditor/Default.common.xml rename to Website/Frontend/Config/VisualEditor/ReleaseBuild.common.xml index f30438f247..9cfefcfa90 100644 --- a/Website/Frontend/Config/VisualEditor/Default.common.xml +++ b/Website/Frontend/Config/VisualEditor/ReleaseBuild.common.xml @@ -130,4 +130,4 @@ - \ No newline at end of file + From 266a9f9e0117054f2e8b9c8428f16ba064079c74 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 19:03:00 +0200 Subject: [PATCH 13/36] Update ReleaseCleanupConfiguration.xml index.prod.html --> index.html in /Composite/console --- Website/ReleaseCleanupConfiguration.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index b5f23a910b..fbdb0c4df4 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -41,6 +41,8 @@ + + From d2a4bd77a5d77ec328f0745f542e03c4194ff419 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 19:45:59 +0200 Subject: [PATCH 14/36] Update ReleaseCleanupConfiguration.xml Functionally good now. --- Website/ReleaseCleanupConfiguration.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index fbdb0c4df4..7617c8fbd0 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -27,9 +27,7 @@ - From 53b8528b54d3718aeccff2d9321bc12dc3e4d638 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 20:08:48 +0200 Subject: [PATCH 15/36] Update ReleaseCleanupConfiguration.xml Changing structure so build can alternate fluently between folder and file operations. --- Website/ReleaseCleanupConfiguration.xml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index 7617c8fbd0..d422af8761 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -1,14 +1,13 @@ - + + - - @@ -17,11 +16,11 @@ - + - + @@ -29,8 +28,6 @@ - - @@ -43,6 +40,6 @@ - + From 3effe8b0d7c89d0f0ae95d7b1d2f37e04b40b640 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 20:14:42 +0200 Subject: [PATCH 16/36] Update ReleaseCleanupConfiguration.xml Attempt at emptying folder /Composite/console except index.html --- Website/ReleaseCleanupConfiguration.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index d422af8761..7fb8a7b8b5 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -34,12 +34,13 @@ - - - + + + + From 601352d9f5b2f0b1e9ed9291d03edbdac8be5519 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 20:29:33 +0200 Subject: [PATCH 17/36] Update ReleaseCleanupConfiguration.xml Old renaming is back, cause path changes not supported yet. --- Website/ReleaseCleanupConfiguration.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index 7fb8a7b8b5..55418765cf 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -35,9 +35,12 @@ + + From 929fedb81256d7767222706c1afba31bdc4d86d6 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 21:57:12 +0200 Subject: [PATCH 18/36] Update WebSite.csproj handling rename of file ReleaseBuild.common.xml reference, simplifying robocopy --- Website/WebSite.csproj | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Website/WebSite.csproj b/Website/WebSite.csproj index 820e32b677..b9af2e9dd8 100644 --- a/Website/WebSite.csproj +++ b/Website/WebSite.csproj @@ -2799,19 +2799,17 @@ ) if not exist "$(ProjectDir)Frontend\Config\VisualEditor\common.xml" ( - copy "$(ProjectDir)Frontend\Config\VisualEditor\Default.common.xml" "$(ProjectDir)Frontend\Config\VisualEditor\common.xml" + copy "$(ProjectDir)Frontend\Config\VisualEditor\ReleaseBuild.common.xml" "$(ProjectDir)Frontend\Config\VisualEditor\common.xml" ) if not exist "$(TargetDir)\System.Threading.Tasks.Dataflow.dll" ( copy "$(ProjectDir)\..\Packages\System.Threading.Tasks.Dataflow.4.6.0\lib\netstandard1.1\System.Threading.Tasks.Dataflow.dll" "$(TargetDir)\System.Threading.Tasks.Dataflow.dll" ) - cd "$(ProjectDir)" .\node_modules\.bin\jspm install --quick - - robocopy "$(ProjectDir)\..\Packages\PhantomJS.2.1.1\tools\phantomjs" "$(ProjectDir)\App_Data\Composite\PhantomJs" "phantomjs.exe" + robocopy "..\Packages\PhantomJS.2.1.1\tools\phantomjs" "App_Data\Composite\PhantomJs" "phantomjs.exe" set rce=%25errorlevel%25 if not %25rce%25==1 exit %25rce%25 else exit 0 @@ -2819,4 +2817,4 @@ - \ No newline at end of file + From 52afbff8356270e465f8b99df10d9881e5fbbd08 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Wed, 16 Oct 2019 22:09:02 +0200 Subject: [PATCH 19/36] Update WebSite.csproj non-functional, moving robocopy copy up for build visibility --- Website/WebSite.csproj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Website/WebSite.csproj b/Website/WebSite.csproj index b9af2e9dd8..23e602d8b0 100644 --- a/Website/WebSite.csproj +++ b/Website/WebSite.csproj @@ -2807,9 +2807,10 @@ ) cd "$(ProjectDir)" - .\node_modules\.bin\jspm install --quick - robocopy "..\Packages\PhantomJS.2.1.1\tools\phantomjs" "App_Data\Composite\PhantomJs" "phantomjs.exe" + + .\node_modules\.bin\jspm install --quick + set rce=%25errorlevel%25 if not %25rce%25==1 exit %25rce%25 else exit 0 From dadb56f3a6d08029905132adf2d98dfcf6174b38 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Thu, 17 Oct 2019 14:19:54 +0200 Subject: [PATCH 20/36] Update ReleaseCleanupConfiguration.xml \ --> / in general Adding rules so /Composite/console/index.html is only thing left in that folder for smaller build --- Website/ReleaseCleanupConfiguration.xml | 49 ++++++++++++------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index 55418765cf..ad930f3d4f 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -3,12 +3,12 @@ - - - - - - + + + + + + @@ -21,29 +21,26 @@ - - - - - - - - - - - - - - - - + - + From a2e58b76320980fea9e8a24aba6b956e8eccdcd7 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Thu, 17 Oct 2019 14:58:26 +0200 Subject: [PATCH 21/36] Update ReleaseCleanupConfiguration.xml Removing /Composite/extensions from release build drop --- Website/ReleaseCleanupConfiguration.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index ad930f3d4f..c714903adf 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -8,6 +8,7 @@ + From b439f3de559c534a989434965b564457f2338896 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Thu, 17 Oct 2019 17:12:09 +0200 Subject: [PATCH 22/36] Create ReleaseCleanup.ps1 Feed off local ReleaseCleanupConfiguration.xml - doing release clean up --- .build/ReleaseCleanup.ps1 | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .build/ReleaseCleanup.ps1 diff --git a/.build/ReleaseCleanup.ps1 b/.build/ReleaseCleanup.ps1 new file mode 100644 index 0000000000..63f1bc0acc --- /dev/null +++ b/.build/ReleaseCleanup.ps1 @@ -0,0 +1,55 @@ +param ( + [string]$cleanupTargetName, + [string]$cleanupDirectory +) + +# This script deletes/rename files according to rules in ReleaseCleanupConfiguration.xml - it is used by automated builds + +if(-not($cleanupTargetName)) { Throw "You must supply a value for -cleanupTargetName - matching a target name in ReleaseCleanupConfiguration.xml" } +if(-not($cleanupDirectory)) { Throw "You must supply a value for -cleanupDirectory - this is the path where cleaning will be taking place" } + +$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition +[xml]$xml = Get-Content (Join-Path $scriptPath "ReleaseCleanupConfiguration.xml") + +$targetItems = $xml.SelectNodes("/Configuration/Target[@name='" + $targetName + "']/*/*[@path]") + +Foreach ($fileNode in $targetItems) { + $relPath = $fileNode.Attributes["path"].Value + $fullPath = Join-Path $cleanupDirectory $relPath + + if (($fileNode.Attributes["rename-find"]) -and ($fileNode.Attributes["rename-replace"]) ) { + # if rename + Write-Host "Handling $fullPath for renaming" + + $findString = $fileNode.Attributes["rename-find"].Value.Replace("\","/") + $replaceString = $fileNode.Attributes["rename-replace"].Value + + $matches = Get-ChildItem -Path $fullPath -Recurse + + if ($matches.length -eq 0) { Write-Warning "Pattern matched 0 files - probably you should remove it from ReleaseCleanupConfiguration.xml in repo" } + + Foreach ($match in $matches) { + $name = $match.FullName.Replace("\","/") + $newName = $name.Replace($findString.Replace("\","/"), $replaceString) + + #ensure dir + $newDirPath = Split-Path -Path $newName + if (-not (Test-Path($newDirPath))) { New-Item -ItemType Directory -Force -Path $newDirPath } + Move-Item $match -Destination $newName -Force + } + } + else { + # assume delete otherwise + Write-Host "Handling $fullPath for deletion" + + if (($fileNode.Name -eq "Directory") -and (Test-Path $fullPath)) { + Remove-Item -LiteralPath $fullPath -Force -Recurse + } else { + $matches = Get-ChildItem -Path $fullPath -Recurse + + if ($matches.length -eq 0) { Write-Warning "Pattern matched 0 files - probably you should remove it from ReleaseCleanupConfiguration.xml in repo" } + + $matches | Where-Object { Test-Path($_) } | Remove-Item -Force -Recurse + } + } +} From f2ba75aa9dfc1e189d0c4e678f9c79483d1ba665 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Thu, 17 Oct 2019 17:13:47 +0200 Subject: [PATCH 23/36] Create ReleaseCleanupConfiguration.xml Putting it here, rather than in the web root --- .build/ReleaseCleanupConfiguration.xml | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .build/ReleaseCleanupConfiguration.xml diff --git a/.build/ReleaseCleanupConfiguration.xml b/.build/ReleaseCleanupConfiguration.xml new file mode 100644 index 0000000000..7857487446 --- /dev/null +++ b/.build/ReleaseCleanupConfiguration.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 2e66bca7c151d6a947b9dae6e68f815de7439743 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Thu, 17 Oct 2019 17:56:48 +0200 Subject: [PATCH 24/36] Update ReleaseCleanup.ps1 Adding log test for build debug --- .build/ReleaseCleanup.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/.build/ReleaseCleanup.ps1 b/.build/ReleaseCleanup.ps1 index 63f1bc0acc..8fc3c8f913 100644 --- a/.build/ReleaseCleanup.ps1 +++ b/.build/ReleaseCleanup.ps1 @@ -3,6 +3,7 @@ param ( [string]$cleanupDirectory ) +Write-Host "ReleaseCleanup script started..." # This script deletes/rename files according to rules in ReleaseCleanupConfiguration.xml - it is used by automated builds if(-not($cleanupTargetName)) { Throw "You must supply a value for -cleanupTargetName - matching a target name in ReleaseCleanupConfiguration.xml" } From e478c385362549efdcb55313399508d409dfdfd3 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Thu, 17 Oct 2019 18:03:05 +0200 Subject: [PATCH 25/36] Update ReleaseCleanup.ps1 Fixing issue using bad var for target lookuo --- .build/ReleaseCleanup.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/ReleaseCleanup.ps1 b/.build/ReleaseCleanup.ps1 index 8fc3c8f913..81ffb55d0a 100644 --- a/.build/ReleaseCleanup.ps1 +++ b/.build/ReleaseCleanup.ps1 @@ -12,7 +12,7 @@ if(-not($cleanupDirectory)) { Throw "You must supply a value for -cleanupDirecto $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition [xml]$xml = Get-Content (Join-Path $scriptPath "ReleaseCleanupConfiguration.xml") -$targetItems = $xml.SelectNodes("/Configuration/Target[@name='" + $targetName + "']/*/*[@path]") +$targetItems = $xml.SelectNodes("/Configuration/Target[@name='" + $cleanupTargetName + "']/*/*[@path]") Foreach ($fileNode in $targetItems) { $relPath = $fileNode.Attributes["path"].Value From c2a5612ad3257b44ad37ebe3ac5f23efc1912fec Mon Sep 17 00:00:00 2001 From: Taras Nakonechnyi Date: Wed, 13 Nov 2019 12:34:35 +0200 Subject: [PATCH 26/36] rename properties and description --- .../CoreUiControls/TreeSelectorUiControl.cs | 6 ++--- .../TemplatedTreelSelectorUiControlFactory.cs | 12 ++++----- .../String/TreeSelectorWidgetFunction.cs | 25 ++++++++++--------- .../Selectors/TreeSelector.ascx | 6 ++--- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Composite/C1Console/Forms/CoreUiControls/TreeSelectorUiControl.cs b/Composite/C1Console/Forms/CoreUiControls/TreeSelectorUiControl.cs index ee9f06324e..3741db400e 100644 --- a/Composite/C1Console/Forms/CoreUiControls/TreeSelectorUiControl.cs +++ b/Composite/C1Console/Forms/CoreUiControls/TreeSelectorUiControl.cs @@ -15,13 +15,13 @@ internal abstract class TreeSelectorUiControl : UiControl public string ElementProvider { get; set; } [FormsProperty] - public string SelectionProperty { get; set; } + public string SelectableElementPropertyName { get; set; } [FormsProperty] - public string SelectionValue { get; set; } + public string SelectableElementPropertyValue { get; set; } [FormsProperty] - public string SelectionResult { get; set; } + public string SelectableElementReturnValue { get; set; } [FormsProperty] public string SerializedSearchToken { get; set; } diff --git a/Composite/Plugins/Forms/WebChannel/UiControlFactories/TemplatedTreelSelectorUiControlFactory.cs b/Composite/Plugins/Forms/WebChannel/UiControlFactories/TemplatedTreelSelectorUiControlFactory.cs index 0c1c0bb0e4..4fb965d3a7 100644 --- a/Composite/Plugins/Forms/WebChannel/UiControlFactories/TemplatedTreelSelectorUiControlFactory.cs +++ b/Composite/Plugins/Forms/WebChannel/UiControlFactories/TemplatedTreelSelectorUiControlFactory.cs @@ -47,13 +47,13 @@ internal void InitializeWebViewState() public string ElementProvider { get; set; } /// - public string SelectionProperty { get; set; } + public string SelectableElementPropertyName { get; set; } /// - public string SelectionValue { get; set; } + public string SelectableElementPropertyValue { get; set; } /// - public string SelectionResult { get; set; } + public string SelectableElementReturnValue { get; set; } /// public string SerializedSearchToken { get; set; } @@ -111,9 +111,9 @@ public Control BuildWebControl() _userControl.SelectedKey = this.SelectedKey; _userControl.ElementProvider = this.ElementProvider; - _userControl.SelectionProperty = this.SelectionProperty; - _userControl.SelectionValue = this.SelectionValue; - _userControl.SelectionResult = this.SelectionResult; + _userControl.SelectableElementPropertyName = this.SelectableElementPropertyName; + _userControl.SelectableElementPropertyValue = this.SelectableElementPropertyValue; + _userControl.SelectableElementReturnValue = this.SelectableElementReturnValue; _userControl.SerializedSearchToken = this.SerializedSearchToken; _userControl.Required = this.Required; diff --git a/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/String/TreeSelectorWidgetFunction.cs b/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/String/TreeSelectorWidgetFunction.cs index 80bf45bd0b..217dbe51a5 100644 --- a/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/String/TreeSelectorWidgetFunction.cs +++ b/Composite/Plugins/Functions/WidgetFunctionProviders/StandardWidgetFunctionProvider/String/TreeSelectorWidgetFunction.cs @@ -32,34 +32,34 @@ private void SetParameterProfiles() new ConstantValueProvider(string.Empty), StandardWidgetFunctions.TextBoxWidget, null, - "Element Provider", new HelpDefinition("Tree Provider"))); + "Element Provider", new HelpDefinition("The name of a tree element provider (as defined in Composite.config)"))); base.AddParameterProfile( - new ParameterProfile("SelectionProperty", + new ParameterProfile("SelectableElementPropertyName", typeof(string), true, new ConstantValueProvider(string.Empty), StandardWidgetFunctions.TextBoxWidget, null, - "SelectionProperty", new HelpDefinition(""))); + "Selectable Element Property Name", new HelpDefinition("The name of a property used to identify a selectable tree element by"))); base.AddParameterProfile( - new ParameterProfile("SelectionValue", + new ParameterProfile("SelectableElementPropertyValue", typeof(string), false, new ConstantValueProvider(string.Empty), StandardWidgetFunctions.TextBoxWidget, null, - "SelectionValue", new HelpDefinition(""))); + "Selectable Element Property Value", new HelpDefinition("The value of the property optionally used (if provided) to further identify a selectable tree element by"))); base.AddParameterProfile( - new ParameterProfile("SelectionResult", + new ParameterProfile("SelectableElementReturnValue", typeof(string), false, new ConstantValueProvider(string.Empty), StandardWidgetFunctions.TextBoxWidget, null, - "SelectionResult", new HelpDefinition(""))); + "Selectable Element Return Value", new HelpDefinition("The value to return for the selected tree element"))); base.AddParameterProfile( new ParameterProfile("SerializedSearchToken", typeof(string), @@ -67,15 +67,16 @@ private void SetParameterProfiles() new ConstantValueProvider(string.Empty), StandardWidgetFunctions.TextBoxWidget, null, - "SerializedSearchToken", new HelpDefinition(""))); + "Selectable Element Return Value", new HelpDefinition("A search token to filter tree elements by"))); base.AddParameterProfile( new ParameterProfile("Required", typeof(bool), false, - new ConstantValueProvider(false), - StandardWidgetFunctions.CheckBoxWidget, + new ConstantValueProvider(true), + StandardWidgetFunctions.GetBoolSelectorWidget("Yes, selection is required", "No, a 'none' selection is allowed."), null, - "Required", new HelpDefinition(""))); + "Required", new HelpDefinition("An option that indicates whether the user is required to make a selection"))); + } @@ -84,7 +85,7 @@ public override XElement GetWidgetMarkup(ParameterList parameters, string label, XElement formElement = base.BuildBasicWidgetMarkup("TreeSelector", "SelectedKey", label, helpDefinition, bindingSourceName); foreach (var propertyName in new [] { - "ElementProvider", "SelectionProperty", "SelectionValue", "SelectionResult", "SerializedSearchToken", "Required" + "ElementProvider", "SelectableElementPropertyName", "SelectableElementPropertyValue", "SelectableElementReturnValue", "SerializedSearchToken", "Required" }) { string propertyValue = parameters.GetParameter(propertyName); diff --git a/Website/Composite/controls/FormsControls/FormUiControlTemplates/Selectors/TreeSelector.ascx b/Website/Composite/controls/FormsControls/FormUiControlTemplates/Selectors/TreeSelector.ascx index 0ce80c73e6..fb1f6e07a6 100644 --- a/Website/Composite/controls/FormsControls/FormUiControlTemplates/Selectors/TreeSelector.ascx +++ b/Website/Composite/controls/FormsControls/FormUiControlTemplates/Selectors/TreeSelector.ascx @@ -47,9 +47,9 @@ id="<%= this.UniqueID %>" name="<%= this.UniqueID %>" element-provider="<%= FilterCharactersAndEncode(this.ElementProvider) %>" - selection-property="<%= FilterCharactersAndEncode(this.SelectionProperty) %>" - selection-value="<%= FilterCharactersAndEncode(this.SelectionValue) %>" - selection-result="<%= FilterCharactersAndEncode(this.SelectionResult) %>" + selection-property="<%= FilterCharactersAndEncode(this.SelectableElementPropertyName) %>" + selection-value="<%= FilterCharactersAndEncode(this.SelectableElementPropertyValue) %>" + selection-result="<%= FilterCharactersAndEncode(this.SelectableElementReturnValue) %>" serialized-search-token="<%= FilterCharactersAndEncode(this.SerializedSearchToken) %>" value="<%= FilterCharactersAndEncode(_currentStringValue) %>" binding="TreeSelectorDialogBinding" <%= ValidationParams() %> /> From 8d6957a78e6178c55d9dcbb7e794cffb4d11af85 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Thu, 14 Nov 2019 16:54:44 +0100 Subject: [PATCH 27/36] Reverting ReleaseCleanupConfiguration.xml This file is used by the old build system, reverting to keep compatibility - a newer version of this is located in .build/ReleaseCleanupConfiguration.xml (which is used by new devops build). The Website/ReleaseCleanupConfiguration.xml can be deleted once we no longer need to keep the old build alive. --- Website/ReleaseCleanupConfiguration.xml | 91 ++++++++++++++----------- 1 file changed, 52 insertions(+), 39 deletions(-) diff --git a/Website/ReleaseCleanupConfiguration.xml b/Website/ReleaseCleanupConfiguration.xml index c714903adf..92ece5a5fc 100644 --- a/Website/ReleaseCleanupConfiguration.xml +++ b/Website/ReleaseCleanupConfiguration.xml @@ -1,47 +1,60 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + From 90ac6b0a9fbe745f7991650c5e1e9f6122aefcf5 Mon Sep 17 00:00:00 2001 From: mawtex Date: Fri, 15 Nov 2019 13:43:16 +0100 Subject: [PATCH 28/36] When adding a new data locale and request "access to all users" also give access to all user groups. --- Composite/Core/Localization/LocalizationFacade.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Composite/Core/Localization/LocalizationFacade.cs b/Composite/Core/Localization/LocalizationFacade.cs index f06c60ee2b..97225512fd 100644 --- a/Composite/Core/Localization/LocalizationFacade.cs +++ b/Composite/Core/Localization/LocalizationFacade.cs @@ -178,6 +178,19 @@ internal static void AddLocale(CultureInfo cultureInfo, string urlMappingName, b UserSettings.SetForeignLocaleCultureInfo(username, cultureInfo); } } + + List usergroupids = + (from u in DataFacade.GetData() + select u.Id).ToList(); + + foreach (Guid usergroupid in usergroupids) + { + var groupLang = DataFacade.BuildNew(); + groupLang.Id = Guid.NewGuid(); + groupLang.CultureName = cultureInfo.ToString(); + groupLang.UserGroupId = usergroupid; + DataFacade.AddNew(groupLang); + } } if (DataLocalizationFacade.DefaultLocalizationCulture == null) From f714a41291126186f47de4bd87fc1f0e457badb7 Mon Sep 17 00:00:00 2001 From: Marcus Wendt Date: Mon, 18 Nov 2019 14:39:30 +0100 Subject: [PATCH 29/36] Update Package.nuspec Simplifying (enabling nuget creation from a build artifact without additional restore) --- Package.nuspec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Package.nuspec b/Package.nuspec index 6054b350dd..5925153686 100644 --- a/Package.nuspec +++ b/Package.nuspec @@ -28,9 +28,8 @@ - - - - + + + From eef3eeb5fb226ea9d006b9eeb4dbb10e0a22d34b Mon Sep 17 00:00:00 2001 From: mawtex Date: Thu, 21 Nov 2019 13:26:32 +0100 Subject: [PATCH 30/36] Installing a package with versioned data on a site where this data already exists (in the same or a different version) would fail. --- .../DataPackageFragmentInstaller.cs | 20 ++++++++++------ Composite/Data/DataFacade.cs | 24 ++++++++++++++++++- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs b/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs index afa2739080..fae528b04c 100644 --- a/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs +++ b/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs @@ -191,15 +191,18 @@ private XElement AddData(DataType dataType, CultureInfo cultureInfo) } - var dataKey = CopyFieldValues(dataType, data, addElement); + var dataKey = GetKeyPropertyValues(dataType, data, addElement); if (dataType.AllowOverwrite || dataType.OnlyUpdate) { - IData existingData = DataFacade.TryGetDataByUniqueKey(interfaceType, dataKey); + List existingDataList = DataFacade.TryGetDataByLookupKeys(interfaceType, dataKey).ToList(); + if (existingDataList.Count > 1) throw new InvalidOperationException("Got more than 1 existing data element when querying on key properties for " + addElement.ToString()); + + IData existingData = existingDataList.FirstOrDefault(); if (existingData != null) { - CopyFieldValues(dataType, existingData, addElement); + GetKeyPropertyValues(dataType, existingData, addElement); DataFacade.Update(existingData, false, true, false); continue; @@ -281,12 +284,15 @@ private void UpdateVersionId(IVersioned data) } - private static DataKeyPropertyCollection CopyFieldValues(DataType dataType, IData data, XElement addElement) + private static DataPropertyValueCollection GetKeyPropertyValues(DataType dataType, IData data, XElement addElement) { - var dataKeyPropertyCollection = new DataKeyPropertyCollection(); + var dataKeyPropertyCollection = new DataPropertyValueCollection(); var properties = GetDataTypeProperties(dataType.InterfaceType); + var keyPropertyNames = dataType.InterfaceType.GetKeyPropertyNames(); + var versionKeyPropertyNames = dataType.InterfaceType.GetVersionKeyPropertyNames(); + foreach (XAttribute attribute in addElement.Attributes()) { string fieldName = attribute.Name.LocalName; @@ -300,9 +306,9 @@ private static DataKeyPropertyCollection CopyFieldValues(DataType dataType, IDat object fieldValue = ValueTypeConverter.Convert(attribute.Value, propertyInfo.PropertyType); propertyInfo.SetValue(data, fieldValue, null); - if (dataType.InterfaceType.GetKeyPropertyNames().Contains(fieldName)) + if (keyPropertyNames.Contains(fieldName) || versionKeyPropertyNames.Contains(fieldName)) { - dataKeyPropertyCollection.AddKeyProperty(fieldName, fieldValue); + dataKeyPropertyCollection.AddKeyProperty(propertyInfo, fieldValue); } } diff --git a/Composite/Data/DataFacade.cs b/Composite/Data/DataFacade.cs index 9b42e89ab7..ecc0877ad6 100644 --- a/Composite/Data/DataFacade.cs +++ b/Composite/Data/DataFacade.cs @@ -509,7 +509,7 @@ public static LambdaExpression GetPredicateExpressionByUniqueKey(Type interfaceT // Private helper private static Expression GetPredicateExpressionByUniqueKeyFilterExpression(IReadOnlyList keyProperties, DataKeyPropertyCollection dataKeyPropertyCollection, ParameterExpression parameterExpression) { - if (keyProperties.Count != dataKeyPropertyCollection.Count) throw new ArgumentException("Missing og to many key properties"); + if (keyProperties.Count != dataKeyPropertyCollection.Count) throw new ArgumentException("Missing or to many key properties"); var propertiesWithValues = new List>(); foreach (var kvp in dataKeyPropertyCollection.KeyProperties) @@ -606,6 +606,28 @@ public static IData TryGetDataByUniqueKey(Type interfaceType, DataKeyPropertyCol return data; } + /// + /// Returns all data items of the given type, which matchs the provided dataPropertyCollection (property/value pairs) + /// + /// The data type to query - type is expected to implement a subinterface of IData + /// The properties and values to use for filtering + /// Data matching the provided property values + public static IEnumerable TryGetDataByLookupKeys(Type interfaceType, DataPropertyValueCollection dataPropertyCollection) + { + Verify.ArgumentNotNull(interfaceType, nameof(interfaceType)); + Verify.ArgumentNotNull(dataPropertyCollection, nameof(dataPropertyCollection)); + + LambdaExpression lambdaExpression = GetPredicateExpression(interfaceType, dataPropertyCollection); + + MethodInfo methodInfo = GetGetDataWithPredicatMethodInfo(interfaceType); + + var queryable = (IQueryable)methodInfo.Invoke(null, new object[] { lambdaExpression }); + + return ((IEnumerable)queryable).Cast(); + } + + + /// public static IEnumerable TryGetDataVersionsByUniqueKey(Type interfaceType, DataKeyPropertyCollection dataKeyPropertyCollection) From 5ec466935b3cde2f95f1663863c15bf99de7b83a Mon Sep 17 00:00:00 2001 From: mawtex Date: Thu, 21 Nov 2019 14:52:31 +0100 Subject: [PATCH 31/36] Removing "bool ignoreVersioning" parameters / function overloads - argument not used at all. --- Composite/Data/DataFacade.cs | 6 ++--- .../Data/Foundation/DataExpressionBuilder.cs | 23 +++++++------------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/Composite/Data/DataFacade.cs b/Composite/Data/DataFacade.cs index ecc0877ad6..b0e3a0e84c 100644 --- a/Composite/Data/DataFacade.cs +++ b/Composite/Data/DataFacade.cs @@ -371,7 +371,7 @@ public static IQueryable GetDataFromOtherScope(T data, DataScopeIdentifier using (new DataScope(dataScopeIdentifier)) { - return DataExpressionBuilder.GetQueryableByData(data, true); + return DataExpressionBuilder.GetQueryableByData(data); } } @@ -384,7 +384,7 @@ public static IQueryable GetDataFromOtherLocale(T data, CultureInfo cultur using (new DataScope(cultureInfo)) { - return DataExpressionBuilder.GetQueryableByData(data, true); + return DataExpressionBuilder.GetQueryableByData(data); } } @@ -432,7 +432,7 @@ public static IEnumerable GetDataFromOtherScope( { IQueryable table = GetData(data.DataSourceId.InterfaceType, false); - IQueryable queryable = DataExpressionBuilder.GetQueryableByData(data, table, ignoreVersioning); + IQueryable queryable = DataExpressionBuilder.GetQueryableByData(data, table); foreach (object obj in queryable) { diff --git a/Composite/Data/Foundation/DataExpressionBuilder.cs b/Composite/Data/Foundation/DataExpressionBuilder.cs index 0a861aa5c2..c712392d2b 100644 --- a/Composite/Data/Foundation/DataExpressionBuilder.cs +++ b/Composite/Data/Foundation/DataExpressionBuilder.cs @@ -29,21 +29,14 @@ static DataExpressionBuilder() /// public static IQueryable GetQueryableByData(IData data) { - return GetQueryableByData(data, true); + return GetQueryableByData(data, null); } - public static IQueryable GetQueryableByData(IData data, bool ignoreVersioning) + public static IQueryable GetQueryableByData(IData data, IQueryable sourceQueryable) { - return GetQueryableByData(data, null, ignoreVersioning); - } - - - - public static IQueryable GetQueryableByData(IData data, IQueryable sourceQueryable, bool ignoreVersioning) - { - LambdaExpression whereLambdaExpression = GetWhereLambdaExpression(data, ignoreVersioning); + LambdaExpression whereLambdaExpression = GetWhereLambdaExpression(data); if (sourceQueryable == null) { @@ -59,10 +52,10 @@ public static IQueryable GetQueryableByData(IData data, IQueryable sourceQueryab - public static IQueryable GetQueryableByData(T data, bool ignoreVersioning) + public static IQueryable GetQueryableByData(T data) where T : class, IData { - LambdaExpression whereLambdaExpression = GetWhereLambdaExpression(data, ignoreVersioning); + LambdaExpression whereLambdaExpression = GetWhereLambdaExpression(data); IQueryable queryable = DataFacade.GetData(data.DataSourceId.InterfaceType); @@ -75,9 +68,9 @@ public static IQueryable GetQueryableByData(T data, bool ignoreVersioning) - public static Delegate GetWherePredicateDelegate(IData data, bool ignoreVersioning) + public static Delegate GetWherePredicateDelegate(IData data) { - LambdaExpression whereLambdaExpression = GetWhereLambdaExpression(data, ignoreVersioning); + LambdaExpression whereLambdaExpression = GetWhereLambdaExpression(data); Delegate resultDelegate = whereLambdaExpression.Compile(); @@ -86,7 +79,7 @@ public static Delegate GetWherePredicateDelegate(IData data, bool ignoreVersioni - private static LambdaExpression GetWhereLambdaExpression(IData data, bool ignoreVersioning) + private static LambdaExpression GetWhereLambdaExpression(IData data) { var propertyInfoes = data.DataSourceId.InterfaceType.GetPhysicalKeyProperties(); From dd078cecfab51d4027b923f18c78db2b6ee861ee Mon Sep 17 00:00:00 2001 From: mawtex Date: Thu, 21 Nov 2019 15:27:23 +0100 Subject: [PATCH 32/36] More dead "bool ignoreVersioning" cleanup --- Composite/Data/DataFacade.cs | 7 ------- .../GenericPublishProcessController.cs | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Composite/Data/DataFacade.cs b/Composite/Data/DataFacade.cs index b0e3a0e84c..dfc6750b42 100644 --- a/Composite/Data/DataFacade.cs +++ b/Composite/Data/DataFacade.cs @@ -397,13 +397,6 @@ public static IEnumerable GetDataFromOtherScope(IData data, DataScopeIden /// public static IEnumerable GetDataFromOtherScope( IData data, DataScopeIdentifier dataScopeIdentifier, bool useCaching) - { - return GetDataFromOtherScope(data, dataScopeIdentifier, useCaching, true); - } - - /// - public static IEnumerable GetDataFromOtherScope( - IData data, DataScopeIdentifier dataScopeIdentifier, bool useCaching, bool ignoreVersioning) { Verify.ArgumentNotNull(data, "data"); Verify.ArgumentNotNull(dataScopeIdentifier, nameof(dataScopeIdentifier)); diff --git a/Composite/Data/ProcessControlled/ProcessControllers/GenericPublishProcessController/GenericPublishProcessController.cs b/Composite/Data/ProcessControlled/ProcessControllers/GenericPublishProcessController/GenericPublishProcessController.cs index ff2d64def2..329cda425f 100644 --- a/Composite/Data/ProcessControlled/ProcessControllers/GenericPublishProcessController/GenericPublishProcessController.cs +++ b/Composite/Data/ProcessControlled/ProcessControllers/GenericPublishProcessController/GenericPublishProcessController.cs @@ -370,7 +370,7 @@ public List GetActions(IData data, Type elementProviderType) var clientActions = visualTrans.Select(newState => _visualTransitionsActions[newState]()).ToList(); - IData publicData = DataFacade.GetDataFromOtherScope(data, DataScopeIdentifier.Public, true, false).FirstOrDefault(); + IData publicData = DataFacade.GetDataFromOtherScope(data, DataScopeIdentifier.Public, true).FirstOrDefault(); if (publicData != null) { var unpublishAction = new ElementAction(new ActionHandle(new ProxyDataActionToken(ActionIdentifier.Unpublish) { DoIgnoreEntityTokenLocking = true })) From 027c5bd9b441b0565225a010729eb1b994569054 Mon Sep 17 00:00:00 2001 From: mawtex Date: Fri, 22 Nov 2019 16:31:23 +0100 Subject: [PATCH 33/36] Renaming private function and correcting spelling mistakes (no functional impact) --- .../DataPackageFragmentInstaller.cs | 6 +++--- Composite/Data/DataFacade.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs b/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs index fae528b04c..45512ee285 100644 --- a/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs +++ b/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs @@ -283,8 +283,8 @@ private void UpdateVersionId(IVersioned data) } } - - private static DataPropertyValueCollection GetKeyPropertyValues(DataType dataType, IData data, XElement addElement) + + private static DataPropertyValueCollection PopulateAndReturnKeyPropertyValues(DataType dataType, IData dataToPopulate, XElement addElement) { var dataKeyPropertyCollection = new DataPropertyValueCollection(); @@ -304,7 +304,7 @@ private static DataPropertyValueCollection GetKeyPropertyValues(DataType dataTyp PropertyInfo propertyInfo = properties[fieldName]; object fieldValue = ValueTypeConverter.Convert(attribute.Value, propertyInfo.PropertyType); - propertyInfo.SetValue(data, fieldValue, null); + propertyInfo.SetValue(dataToPopulate, fieldValue, null); if (keyPropertyNames.Contains(fieldName) || versionKeyPropertyNames.Contains(fieldName)) { diff --git a/Composite/Data/DataFacade.cs b/Composite/Data/DataFacade.cs index dfc6750b42..c44e9b5a8a 100644 --- a/Composite/Data/DataFacade.cs +++ b/Composite/Data/DataFacade.cs @@ -502,7 +502,7 @@ public static LambdaExpression GetPredicateExpressionByUniqueKey(Type interfaceT // Private helper private static Expression GetPredicateExpressionByUniqueKeyFilterExpression(IReadOnlyList keyProperties, DataKeyPropertyCollection dataKeyPropertyCollection, ParameterExpression parameterExpression) { - if (keyProperties.Count != dataKeyPropertyCollection.Count) throw new ArgumentException("Missing or to many key properties"); + if (keyProperties.Count != dataKeyPropertyCollection.Count) throw new ArgumentException("Missing or too many key properties"); var propertiesWithValues = new List>(); foreach (var kvp in dataKeyPropertyCollection.KeyProperties) @@ -600,7 +600,7 @@ public static IData TryGetDataByUniqueKey(Type interfaceType, DataKeyPropertyCol } /// - /// Returns all data items of the given type, which matchs the provided dataPropertyCollection (property/value pairs) + /// Returns all data items of the given type, which matches the provided dataPropertyCollection (property/value pairs) /// /// The data type to query - type is expected to implement a subinterface of IData /// The properties and values to use for filtering From 807cb70e7184d88f7ee561f40da82128ffe95d74 Mon Sep 17 00:00:00 2001 From: mawtex Date: Fri, 22 Nov 2019 16:45:10 +0100 Subject: [PATCH 34/36] Catching up on missing renaming of private method. --- .../PackageFragmentInstallers/DataPackageFragmentInstaller.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs b/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs index 45512ee285..211a723ff3 100644 --- a/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs +++ b/Composite/Core/PackageSystem/PackageFragmentInstallers/DataPackageFragmentInstaller.cs @@ -191,7 +191,7 @@ private XElement AddData(DataType dataType, CultureInfo cultureInfo) } - var dataKey = GetKeyPropertyValues(dataType, data, addElement); + var dataKey = PopulateAndReturnKeyPropertyValues(dataType, data, addElement); if (dataType.AllowOverwrite || dataType.OnlyUpdate) { @@ -202,7 +202,7 @@ private XElement AddData(DataType dataType, CultureInfo cultureInfo) if (existingData != null) { - GetKeyPropertyValues(dataType, existingData, addElement); + PopulateAndReturnKeyPropertyValues(dataType, existingData, addElement); DataFacade.Update(existingData, false, true, false); continue; From 178e82065b0bbe8869495e00a14d98b26bac33b2 Mon Sep 17 00:00:00 2001 From: mawtex Date: Fri, 22 Nov 2019 17:15:12 +0100 Subject: [PATCH 35/36] Changing version moniker to 6.8 --- Composite/Properties/SharedAssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Composite/Properties/SharedAssemblyInfo.cs b/Composite/Properties/SharedAssemblyInfo.cs index c83dfe9766..f8c232e35d 100644 --- a/Composite/Properties/SharedAssemblyInfo.cs +++ b/Composite/Properties/SharedAssemblyInfo.cs @@ -2,7 +2,7 @@ // General Information about the assemblies Composite and Composite.Workflows #if !InternalBuild -[assembly: AssemblyTitle("C1 CMS 6.7")] +[assembly: AssemblyTitle("C1 CMS 6.8")] #else [assembly: AssemblyTitle("C1 CMS 6.7 (Internal Build)")] #endif @@ -13,4 +13,4 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("6.7.*")] +[assembly: AssemblyVersion("6.8.*")] From 263e1b222075a559fe84c560777afc15e6d43239 Mon Sep 17 00:00:00 2001 From: mawtex Date: Mon, 25 Nov 2019 13:54:09 +0100 Subject: [PATCH 36/36] Version moniker now 6.8 --- Composite/Properties/SharedAssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Composite/Properties/SharedAssemblyInfo.cs b/Composite/Properties/SharedAssemblyInfo.cs index f8c232e35d..dc4329dde4 100644 --- a/Composite/Properties/SharedAssemblyInfo.cs +++ b/Composite/Properties/SharedAssemblyInfo.cs @@ -4,7 +4,7 @@ #if !InternalBuild [assembly: AssemblyTitle("C1 CMS 6.8")] #else -[assembly: AssemblyTitle("C1 CMS 6.7 (Internal Build)")] +[assembly: AssemblyTitle("C1 CMS 6.8 (Internal Build)")] #endif [assembly: AssemblyCompany("Orckestra Inc")]