-
+
@if (!Model.IsModal) { From e8f84fff3d7deec5fda320f794733d21b8be0253 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 02:31:05 -0700 Subject: [PATCH 046/137] Prevent inheritance of topic references for attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default, both attributes and topic references transparently inherit from the `BaseTopic` if a) a `BaseTopic` exists, and b) the local value is `null`. This is the desired behavior in almost all cases. The exception is when evaluating the values for display in the OnTopic Editor, where displaying inherited values results in copying the inherited value to the local topic on `Save()`. The call to `Topic.Attributes.GetValue()` already sets `inheritFromBase` to false, but the call to `Topic.References.GetValue()` didn't—likely because inheritance of topic references was a relatively late addition in OnTopic 5.0.0. Regardless, this is fixed now. This resolves Issue #31. --- OnTopic.Editor.AspNetCore/Controllers/EditorController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index 7d012b21..b0db2e61 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -183,7 +183,7 @@ bool isModal //Serialize references, if it's a topic reference else if (attribute.ModelType is ModelType.Reference) { - topicViewModel.Attributes.Add(attribute.Key, CurrentTopic.References.GetValue(attribute.Key)?.Id.ToString(CultureInfo.InvariantCulture)); + topicViewModel.Attributes.Add(attribute.Key, CurrentTopic.References.GetValue(attribute.Key, null, false, false)?.Id.ToString(CultureInfo.InvariantCulture)); } //Provide special handling for Key, since it's not stored as an attribute From b000623a032072ad714d4f7d23989756289a1144 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:02:43 -0700 Subject: [PATCH 047/137] Pre-filter attributes by `IsHidden` The OnTopic Editor will skip any `AttributeDescriptor`s that are marked as `IsHidden`. Currently, the postback handler for the `Edit()` action does several loops over this collection, each time skipping over `IsHidden` items. Given this, it makes sense to filter this collection once, and remove those checks, with the confidence that only visible attributes remain. --- .../Controllers/EditorController.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index b0db2e61..d6e92525 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -279,6 +279,7 @@ public async Task Edit( \-----------------------------------------------------------------------------------------------------------------------*/ var parentTopic = isNew? CurrentTopic : CurrentTopic.Parent; var contentTypeDescriptor = GetContentType(contentType?? CurrentTopic.ContentType); + var attributeDescriptors = contentTypeDescriptor.AttributeDescriptors.Where(a => !a.IsHidden); var baseTopicId = model.Attributes.GetInteger("BaseTopic"); var baseTopic = baseTopicId.HasValue? TopicRepository.Load(baseTopicId.Value) : null; var newKey = model.Attributes.GetValue("Key"); @@ -293,9 +294,12 @@ public async Task Edit( | VALIDATE REQUIRED FIELDS \-----------------------------------------------------------------------------------------------------------------------*/ if (baseTopic is null) { - foreach (var attribute in contentTypeDescriptor.AttributeDescriptors) { + foreach (var attribute in attributeDescriptors) { var submittedValue = model.Attributes.GetValue(attribute.Key); - if (attribute.IsRequired && !attribute.IsHidden && String.IsNullOrEmpty(submittedValue)) { + if ( + attribute.IsRequired && + String.IsNullOrEmpty(submittedValue) + ) { ModelState.AddModelError(attribute.Key, $"The {attribute.Title} field is required."); } } @@ -339,7 +343,7 @@ public async Task Edit( //Establish view model var editorViewModel = await GetEditorViewModel(contentTypeDescriptor, isNew, isModal).ConfigureAwait(true); - foreach (var attribute in contentTypeDescriptor.AttributeDescriptors) { + foreach (var attribute in attributeDescriptors) { editorViewModel.Topic.Attributes[attribute.Key] = model.Attributes.GetValue(attribute.Key); } @@ -367,12 +371,7 @@ public async Task Edit( /*------------------------------------------------------------------------------------------------------------------------ | SET ATTRIBUTES \-----------------------------------------------------------------------------------------------------------------------*/ - foreach (var attribute in GetContentType(contentType).AttributeDescriptors) { - - //Handle hidden attributes - if (attribute.IsHidden) { - continue; - } + foreach (var attribute in attributeDescriptors) { //Handle new keys if (isNew && attribute.Key.Equals("Key", StringComparison.OrdinalIgnoreCase)) { From 02f07de0b38e75fa3f6e970092c187d524914cbf Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:05:56 -0700 Subject: [PATCH 048/137] Tidied up inline comments to be more descriptive --- .../Controllers/EditorController.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index d6e92525..d88e55a5 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -292,6 +292,10 @@ public async Task Edit( /*------------------------------------------------------------------------------------------------------------------------ | VALIDATE REQUIRED FIELDS + >------------------------------------------------------------------------------------------------------------------------- + | If a BaseTopic is set, then no fields are required. If a DefaultValue is set for an attribute, that attribute isn't + | required—even if it's marked as IsRequired—since a fallback exists. In all other cases, empty IsRequired attributes + | should result in a model error. \-----------------------------------------------------------------------------------------------------------------------*/ if (baseTopic is null) { foreach (var attribute in attributeDescriptors) { @@ -314,6 +318,9 @@ public async Task Edit( /*------------------------------------------------------------------------------------------------------------------------ | VALIDATE KEY + >------------------------------------------------------------------------------------------------------------------------- + | If this topic IsNew or the Key value has changed, ensure that the new Key is valid and that it's unique within the scope + | of the current Parent topic. \-----------------------------------------------------------------------------------------------------------------------*/ if (isNew || !CurrentTopic.Key.Equals(newKey, StringComparison.OrdinalIgnoreCase)) { try @@ -323,14 +330,14 @@ public async Task Edit( catch (InvalidKeyException) { ModelState.AddModelError( "Key", - $"The folder name {newKey} is invalid. Folder names should not contain spaces or symbols outside of periods, " + + $"The folder name '{newKey}' is invalid. Folder names should not contain spaces or symbols outside of periods, " + $"hyphens, and underscores." ); } if (parentTopic.Children.Contains(newKey)) { ModelState.AddModelError( "Key", - $"The folder name {newKey} already exists under '{parentTopic.Title}'. Please choose a unique folder name." + $"The folder name '{newKey}' already exists under '{parentTopic.GetWebPath()}'. Please choose a unique folder name" ); } } @@ -373,7 +380,7 @@ public async Task Edit( \-----------------------------------------------------------------------------------------------------------------------*/ foreach (var attribute in attributeDescriptors) { - //Handle new keys + //New topics will already have had their key set by the TopicFactory call if (isNew && attribute.Key.Equals("Key", StringComparison.OrdinalIgnoreCase)) { continue; } @@ -384,7 +391,7 @@ public async Task Edit( continue; } - //Get reference to current instance + //Get reference to current attribute var attributeValue = model.Attributes[attribute.Key]; //Save value From 5a335dcaa4d4210558f17635f2595ab42c6d6481 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:06:11 -0700 Subject: [PATCH 049/137] Removed redundant setting of `contentType` The `contentType` variable is initialized based on `CurrentTopic.ContentType`, assuming the `contentType` is `null`. As such, there's no need to explicitly set it to `CurrentTopic.ContentType` at this point, as that will be the same value. --- OnTopic.Editor.AspNetCore/Controllers/EditorController.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index d88e55a5..600cb6a0 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -367,9 +367,6 @@ public async Task Edit( Contract.Requires(contentType, nameof(contentType)); topic = TopicFactory.Create(newKey, contentType, CurrentTopic); } - else { - contentType = CurrentTopic.ContentType; - } if (baseTopic is not null && topic.BaseTopic != baseTopic) { topic.BaseTopic = baseTopic; From 70f9b5a56cd300c6ce850d956122cc9f3d8d88ab Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:08:15 -0700 Subject: [PATCH 050/137] Ensure all visible attributes are accounted for MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `AttributeBindingModelBinder` is always expected to return an `AttributeBindingModel` for every instance of a visible attribute in the `ContentTypeDescriptor`'s `AttributeDescriptors` collection. If it doesn't, that suggests a model binding error has occurred—either in the `AttributeBindingModelBinder` or, more likely, in the attribute type plugin's view. Further, each `AttributeBindingModel`'s `Value` is expected not to be `null`; if it is, that suggests a similar problem, as even non-selected radio buttons will return an empty value. Based on this, we can also remove the (errant) logic later in the method which calls `Topic.Attribute.Remove()` if the `AttributeBindingModel` cannot be found. That will no longer happen. This addresses the two concerns raised in Issue #43. --- .../Controllers/EditorController.cs | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index 600cb6a0..629f7012 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -290,6 +290,25 @@ public async Task Edit( Contract.Assume(parentTopic, "The parent topic could not be resolved to an existing topic."); Contract.Assume(newKey, "A value for the required 'Key' attribute was not submitted."); + /*------------------------------------------------------------------------------------------------------------------------ + | VALIDATE BINDING MODEL + >------------------------------------------------------------------------------------------------------------------------- + | There should always be a binding model associated with each visible attribute. If there isn't, that suggests an error + | with either the AttributeBindingModelBinder or, more likely, the attribute type plugin's view. In this case, an + | exception should be thrown instead of assuming a skipped attribute—or, worse, assuming the attribute should be deleted. + | In addition, the Value property should never be null; even if no value is selected in e.g. a radio button, the browser + | should submit an empty value. + \-----------------------------------------------------------------------------------------------------------------------*/ + foreach (var attribute in attributeDescriptors) { + if (model.Attributes.GetValue(attribute.Key) is null) { + throw new InvalidOperationException( + $"The {attribute.Key} was not found in the POST content. This indicates an error with either the attribute " + + $"type plugin or the model binding. A non-empty `Key`, `ContentType`, and `Value` are expected for every visible " + + $"attribute." + ); + } + } + /*------------------------------------------------------------------------------------------------------------------------ | VALIDATE REQUIRED FIELDS >------------------------------------------------------------------------------------------------------------------------- @@ -382,12 +401,6 @@ public async Task Edit( continue; } - //Handle missing attributes - if (!model.Attributes.Contains(attribute.Key)) { - topic.Attributes.Remove(attribute.Key); - continue; - } - //Get reference to current attribute var attributeValue = model.Attributes[attribute.Key]; From 10ddf92ccd3bf84fecbdd12a8433ab80997049a6 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:12:31 -0700 Subject: [PATCH 051/137] Set hidden value for `IncomingRelationshipAttribute` With the new validation logic, every attribute type plugin is expected to submit a `Key`, `ContentType`, and `Value` (70f9b5a). If not, the `EditorController` will suspect a problem with the model binding or attribute type plugin view. This normally isn't an issue. But the `IncomingRelationshipAttribute` is a special read-only attribute that's only intended to give reference information. As these types are an exception to begin with, this can be mitigated by adding a hidden field for `Value`, just as we already do in a similar situation for `InstructionAttribute`. --- .../Editor/Components/IncomingRelationship/Default.cshtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/IncomingRelationship/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/IncomingRelationship/Default.cshtml index 6877fcfa..dfb58764 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/IncomingRelationship/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/IncomingRelationship/Default.cshtml @@ -9,4 +9,6 @@ @foreach(var relatedTopic in Model.RelatedTopics) {
  • @relatedTopic.Title
  • } - \ No newline at end of file + + + \ No newline at end of file From 813ddf6f180c5b320ac54013d578218392cc074a Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:23:19 -0700 Subject: [PATCH 052/137] Refactored `SetReference()` and `SetRelationships()` logic Introduced a new `GetAssociatedTopic()` helper method to aid in `SetReference()` and `SetRelationships()` in identifying a topic in the `ITopicRepository`. This simplifies their code by centralizing the redundant aspects of the lookup. --- .../Controllers/EditorController.cs | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index 629f7012..d67c9e6b 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -445,11 +445,7 @@ private void SetRelationships(Topic topic, AttributeDescriptor attribute, Attrib var relatedTopics = attributeValue.Value.Split(',', StringSplitOptions.RemoveEmptyEntries).ToList(); topic.Relationships.Clear(attribute.Key); foreach (var topicIdString in relatedTopics) { - Topic? relatedTopic = null; - var isTopicId = Int32.TryParse(topicIdString, out var topicIdInt); - if (isTopicId && topicIdInt > 0) { - relatedTopic = TopicRepository.Load(topicIdInt); - } + Topic? relatedTopic = GetAssociatedTopic(topicIdString); if (relatedTopic is not null) { topic.Relationships.SetValue(attribute.Key, relatedTopic); } @@ -463,14 +459,24 @@ private void SetRelationships(Topic topic, AttributeDescriptor attribute, Attrib /// Private helper function that saves a topic reference to the topic. /// private void SetReference(Topic topic, AttributeDescriptor attribute, AttributeBindingModel attributeValue) { - Topic? referencedTopic = null; - var isTopicId = Int32.TryParse(attributeValue.Value, out var topicIdInt); - if (isTopicId && topicIdInt > 0) { - referencedTopic = TopicRepository.Load(topicIdInt); - } + Topic? referencedTopic = GetAssociatedTopic(attributeValue.Value); topic.References.SetValue(attribute.Key, referencedTopic); } + /*========================================================================================================================== + | GET ASSOCIATED TOPIC + \-------------------------------------------------------------------------------------------------------------------------*/ + /// + /// Private helper function to retrieve a from the based on the + /// . + /// + private Topic? GetAssociatedTopic(string? topicId) { + if (Int32.TryParse(topicId, out var topicIdInt) && topicIdInt > 0) { + return TopicRepository.Load(topicIdInt); + } + return null; + } + /*============================================================================================================================ | [POST] SET TOPIC VERSION \---------------------------------------------------------------------------------------------------------------------------*/ From b1dc5ecacd8befee58f72f1ae3b379892498a6c0 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:23:36 -0700 Subject: [PATCH 053/137] Ensure that `DefaultValue` is being set when appropriate If the `BaseTopic` is not set and the attribute value is empty, attempt to fall back to the `DefaultValue`. This fixes a bug where the `DefaultValue` wasn't being correctly set (#25). This logic doesn't check to see if `DefaultValue` is defined; if it isn't, the value will be removed, if it already existed, which is the expected behavior. --- OnTopic.Editor.AspNetCore/Controllers/EditorController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index d67c9e6b..7cb2e648 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -414,6 +414,9 @@ public async Task Edit( else if (attribute.Key is "Key") { topic.Key = attributeValue.Value.Replace(" ", "", StringComparison.Ordinal); } + else if (topic.BaseTopic is null && String.IsNullOrEmpty(attributeValue.Value)) { + topic.Attributes.SetValue(attribute.Key, attribute.DefaultValue); + } else { topic.Attributes.SetValue(attribute.Key, attributeValue.Value); } From 00fa995ea66d3719f63a5325e10ccd11ff85235f Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:23:50 -0700 Subject: [PATCH 054/137] Bypass `IsRequired` validation if `DefaultValue` exists If an attribute `IsRequired` and it's attribute value is not defined, a model validation error is thrown. This should be bypasses if `DefaultValue` is defined, as that establishes an appropriate and deliberate fallback. This satisfies the conditions laid out in #25. --- OnTopic.Editor.AspNetCore/Controllers/EditorController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index 7cb2e648..3f41eadc 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -321,6 +321,7 @@ public async Task Edit( var submittedValue = model.Attributes.GetValue(attribute.Key); if ( attribute.IsRequired && + !String.IsNullOrEmpty(attribute.DefaultValue) && String.IsNullOrEmpty(submittedValue) ) { ModelState.AddModelError(attribute.Key, $"The {attribute.Title} field is required."); From ea1c3250b6d3029a2ea6e08f15bcf6f330b75d3b Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 13:54:10 -0700 Subject: [PATCH 055/137] Disabled `required` in attribute type views if `DefaultValue` is defined All attribute labels will be marked as required if `IsRequired` is defined. If a `DefaultValue` is defined, however, then the value shouldn't _actually_ be required, as it will fallback to the `DefaultValue`. This logic is already handled on the server-side (00fa995); this commit extends it to the client-side. This is done with the help of a new helper property, `IsValueRequired`, on `AttributeDescriptorViewModel`, which combines `IsRequired` and `DefaultValue`. This satisfies the client-side portion of #25. --- .../Views/Editor/Components/Boolean/Default.cshtml | 6 +++--- .../Views/Editor/Components/DateTime/Default.cshtml | 2 +- .../Views/Editor/Components/FileList/Default.cshtml | 2 +- .../Views/Editor/Components/FilePath/Default.cshtml | 2 +- .../Views/Editor/Components/HTML/Default.cshtml | 2 +- .../Editor/Components/LastModifiedBy/Default.cshtml | 2 +- .../Views/Editor/Components/Number/Default.cshtml | 2 +- .../Views/Editor/Components/Text/Default.cshtml | 2 +- .../Views/Editor/Components/TextArea/Default.cshtml | 2 +- .../Components/TokenizedTopicList/Default.cshtml | 2 +- .../Editor/Components/TopicList/Default.cshtml | 2 +- .../Models/Metadata/AttributeDescriptorViewModel.cs | 13 +++++++++++++ 12 files changed, 26 insertions(+), 13 deletions(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/Boolean/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/Boolean/Default.cshtml index 7867cc31..411be732 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/Boolean/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/Boolean/Default.cshtml @@ -6,13 +6,13 @@ }
    - +
    - + @@ -20,7 +20,7 @@ @if (Model.IsValueInferred(out var value, out var source)) {
    - + diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/DateTime/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/DateTime/Default.cshtml index baaba02f..5101fe4c 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/DateTime/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/DateTime/Default.cshtml @@ -14,5 +14,5 @@ class ="FormField Field form-control input-sm" placeholder =@Model.InheritedValue disabled =@(!Model.AttributeDescriptor.IsEnabled) - required =@Model.AttributeDescriptor.IsRequired + required =@Model.AttributeDescriptor.IsValueRequired /> \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/FileList/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/FileList/Default.cshtml index 0ebc8dc1..7502c398 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/FileList/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/FileList/Default.cshtml @@ -11,7 +11,7 @@ asp-items =@Model.Files class ="FormField Field form-control" disabled =@(!Model.AttributeDescriptor.IsEnabled) - required =@Model.AttributeDescriptor.IsRequired + required =@Model.AttributeDescriptor.IsValueRequired > } diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/FilePath/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/FilePath/Default.cshtml index 3e8d4859..4cd96fdf 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/FilePath/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/FilePath/Default.cshtml @@ -12,5 +12,5 @@ maxlength =@(Model.AttributeDescriptor.IsExtendedAttribute? Int32.MaxValue : 250) placeholder =@(Model.AttributeDescriptor.DefaultValue?? Model.InheritedValue?? Model.AttributeDescriptor.ImplicitValue) disabled =@(!Model.AttributeDescriptor.IsEnabled) - required =@Model.AttributeDescriptor.IsRequired + required =@Model.AttributeDescriptor.IsValueRequired /> \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/HTML/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/HTML/Default.cshtml index 64ca80fc..e736c7b4 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/HTML/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/HTML/Default.cshtml @@ -23,7 +23,7 @@ maxlength =@(Model.AttributeDescriptor.MaximumLength?? (Model.AttributeDescriptor.IsExtendedAttribute? Int32.MaxValue : 250)) placeholder =@(Model.AttributeDescriptor.DefaultValue?? Model.InheritedValue?? Model.AttributeDescriptor.ImplicitValue) disabled =@(!Model.AttributeDescriptor.IsEnabled) - required =@Model.AttributeDescriptor.IsRequired + required =@Model.AttributeDescriptor.IsValueRequired > + From eb6586651f04b174f5cee05272aa47533133a621 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Thu, 1 Apr 2021 18:39:32 -0700 Subject: [PATCH 075/137] Update all downstream npm dependencies This doesn't include any of our direct dependencies, but rather the dependencies of dependencies, to ensure they're all up to the latest version. --- .../package-lock.json | 522 +++++++++++++----- OnTopic.Editor.AspNetCore/package-lock.json | 522 +++++++++++++----- 2 files changed, 754 insertions(+), 290 deletions(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/package-lock.json b/OnTopic.Editor.AspNetCore.Attributes/package-lock.json index 90578337..32baf10b 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/package-lock.json +++ b/OnTopic.Editor.AspNetCore.Attributes/package-lock.json @@ -817,9 +817,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001194", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001194.tgz", - "integrity": "sha512-iDUOH+oFeBYk5XawYsPtsx/8fFpndAPUQJC7gBTfxHM8xw5nOZv7ceAD4frS1MKCLUac7QL5wdAJiFQlDRjXlA==", + "version": "1.0.30001205", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", + "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==", "dev": true }, "node_modules/caseless": { @@ -1119,9 +1119,9 @@ "dev": true }, "node_modules/color-string": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", - "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", "dev": true, "dependencies": { "color-name": "^1.0.0", @@ -1225,13 +1225,13 @@ } }, "node_modules/copy-props": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", "dev": true, "dependencies": { - "each-props": "^1.3.0", - "is-plain-object": "^2.0.1" + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" } }, "node_modules/core-util-is": { @@ -1591,9 +1591,9 @@ } }, "node_modules/csso/node_modules/css-tree": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", - "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", "dev": true, "dependencies": { "mdn-data": "2.0.14", @@ -1777,9 +1777,9 @@ } }, "node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", "dev": true, "funding": [ { @@ -1870,6 +1870,18 @@ "object.defaults": "^1.1.0" } }, + "node_modules/each-props/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1881,9 +1893,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.3.678", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.678.tgz", - "integrity": "sha512-E5ha1pE9+aWWrT2fUD5wdPBWUnYtKnEnloewbtVyrkAs79HvodOiNO4rMR94+hKbxgMFQG4fnPQACOc1cfMfBg==", + "version": "1.3.705", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.705.tgz", + "integrity": "sha512-agtrL5vLSOIK89sE/YSzAgqCw76eZ60gf3J7Tid5RfLbSp5H4nWL28/dIV+H+ZhNNi1JNiaF62jffwYsAyXc0g==", "dev": true }, "node_modules/emoji-regex": { @@ -1917,9 +1929,9 @@ } }, "node_modules/es-abstract": { - "version": "1.18.0-next.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.3.tgz", - "integrity": "sha512-VMzHx/Bczjg59E6jZOQjHeN3DEoptdhejpARgflAViidlqSpjdq9zA6lKwlhRRs/lOw1gHJv2xkkSFRgvEwbQg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", @@ -2192,9 +2204,9 @@ } }, "node_modules/ext/node_modules/type": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.3.0.tgz", - "integrity": "sha512-rgPIqOdfK/4J9FhiVrZ3cveAjRRo5rsQBAIhnylX874y1DX/kEKSVdLsnuHB6l1KTjHyU01VjiMBHgU2adejyg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", "dev": true }, "node_modules/extend": { @@ -2354,6 +2366,18 @@ "node": ">= 0.10" } }, + "node_modules/fined/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/flagged-respawn": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", @@ -2898,6 +2922,18 @@ "node": ">=0.10.0" } }, + "node_modules/gulp-postcss/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/gulp-postcss/node_modules/plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -2966,6 +3002,18 @@ "node": ">=0.10.0" } }, + "node_modules/gulp-sass/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/gulp-sass/node_modules/plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -3046,6 +3094,18 @@ "node": ">=0.10.0" } }, + "node_modules/gulp-uglify/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/gulplog": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", @@ -3717,13 +3777,10 @@ } }, "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, "engines": { "node": ">=0.10.0" } @@ -4054,6 +4111,18 @@ "node": ">= 0.8" } }, + "node_modules/liftoff/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -4393,6 +4462,18 @@ "node": ">=0.10.0" } }, + "node_modules/micromatch/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/micromatch/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4466,6 +4547,18 @@ "node": ">=0.10.0" } }, + "node_modules/mixin-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -4500,9 +4593,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.1.22", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.22.tgz", + "integrity": "sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==", "dev": true, "peer": true, "bin": { @@ -4559,6 +4652,18 @@ "node": ">=0.10.0" } }, + "node_modules/nanomatch/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/nanomatch/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -5337,14 +5442,14 @@ } }, "node_modules/postcss": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz", - "integrity": "sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==", + "version": "8.2.9", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.9.tgz", + "integrity": "sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q==", "dev": true, "peer": true, "dependencies": { - "colorette": "^1.2.1", - "nanoid": "^3.1.20", + "colorette": "^1.2.2", + "nanoid": "^3.1.22", "source-map": "^0.6.1" }, "engines": { @@ -6946,6 +7051,18 @@ "node": ">=0.10.0" } }, + "node_modules/regex-not/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/remove-bom-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", @@ -7414,6 +7531,18 @@ "node": ">=0.10.0" } }, + "node_modules/set-value/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/shelljs": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", @@ -7730,6 +7859,18 @@ "node": ">=0.10.0" } }, + "node_modules/split-string/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -8284,6 +8425,18 @@ "node": ">=0.10.0" } }, + "node_modules/to-regex/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/to-through": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", @@ -8358,9 +8511,9 @@ "dev": true }, "node_modules/uglify-js": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.0.tgz", - "integrity": "sha512-TWYSWa9T2pPN4DIJYbU9oAjQx+5qdV5RUDxwARg8fmJZrD/V27Zj0JngW5xg1DFz42G0uDYl2XhzF6alSzD62w==", + "version": "3.13.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.3.tgz", + "integrity": "sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==", "dev": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -8370,15 +8523,18 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", - "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", "dev": true, "dependencies": { "function-bind": "^1.1.1", - "has-bigints": "^1.0.0", - "has-symbols": "^1.0.0", - "which-boxed-primitive": "^1.0.1" + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/unc-path-regex": { @@ -8576,31 +8732,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/util.promisify/node_modules/es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -9545,9 +9676,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001194", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001194.tgz", - "integrity": "sha512-iDUOH+oFeBYk5XawYsPtsx/8fFpndAPUQJC7gBTfxHM8xw5nOZv7ceAD4frS1MKCLUac7QL5wdAJiFQlDRjXlA==", + "version": "1.0.30001205", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", + "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==", "dev": true }, "caseless": { @@ -9798,9 +9929,9 @@ "dev": true }, "color-string": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", - "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", "dev": true, "requires": { "color-name": "^1.0.0", @@ -9892,13 +10023,13 @@ "dev": true }, "copy-props": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", "dev": true, "requires": { - "each-props": "^1.3.0", - "is-plain-object": "^2.0.1" + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" } }, "core-util-is": { @@ -10183,9 +10314,9 @@ }, "dependencies": { "css-tree": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", - "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", "dev": true, "requires": { "mdn-data": "2.0.14", @@ -10335,9 +10466,9 @@ }, "dependencies": { "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", "dev": true }, "entities": { @@ -10415,6 +10546,17 @@ "requires": { "is-plain-object": "^2.0.1", "object.defaults": "^1.1.0" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } } }, "ecc-jsbn": { @@ -10428,9 +10570,9 @@ } }, "electron-to-chromium": { - "version": "1.3.678", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.678.tgz", - "integrity": "sha512-E5ha1pE9+aWWrT2fUD5wdPBWUnYtKnEnloewbtVyrkAs79HvodOiNO4rMR94+hKbxgMFQG4fnPQACOc1cfMfBg==", + "version": "1.3.705", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.705.tgz", + "integrity": "sha512-agtrL5vLSOIK89sE/YSzAgqCw76eZ60gf3J7Tid5RfLbSp5H4nWL28/dIV+H+ZhNNi1JNiaF62jffwYsAyXc0g==", "dev": true }, "emoji-regex": { @@ -10464,9 +10606,9 @@ } }, "es-abstract": { - "version": "1.18.0-next.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.3.tgz", - "integrity": "sha512-VMzHx/Bczjg59E6jZOQjHeN3DEoptdhejpARgflAViidlqSpjdq9zA6lKwlhRRs/lOw1gHJv2xkkSFRgvEwbQg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "dev": true, "requires": { "call-bind": "^1.0.2", @@ -10695,9 +10837,9 @@ }, "dependencies": { "type": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.3.0.tgz", - "integrity": "sha512-rgPIqOdfK/4J9FhiVrZ3cveAjRRo5rsQBAIhnylX874y1DX/kEKSVdLsnuHB6l1KTjHyU01VjiMBHgU2adejyg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", "dev": true } } @@ -10832,6 +10974,17 @@ "object.defaults": "^1.1.0", "object.pick": "^1.2.0", "parse-filepath": "^1.0.1" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } } }, "flagged-respawn": { @@ -11271,6 +11424,15 @@ "is-plain-object": "^2.0.4" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -11326,6 +11488,15 @@ "is-plain-object": "^2.0.4" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -11395,6 +11566,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -11913,13 +12093,10 @@ "dev": true }, "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true }, "is-promise": { "version": "2.2.2", @@ -12182,6 +12359,17 @@ "object.map": "^1.0.0", "rechoir": "^0.6.2", "resolve": "^1.1.7" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } } }, "load-json-file": { @@ -12477,6 +12665,15 @@ "is-plain-object": "^2.0.4" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -12533,6 +12730,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -12564,9 +12770,9 @@ "dev": true }, "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.1.22", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.22.tgz", + "integrity": "sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==", "dev": true, "peer": true }, @@ -12608,6 +12814,15 @@ "is-plain-object": "^2.0.4" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -13206,14 +13421,14 @@ "dev": true }, "postcss": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz", - "integrity": "sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==", + "version": "8.2.9", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.9.tgz", + "integrity": "sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q==", "dev": true, "peer": true, "requires": { - "colorette": "^1.2.1", - "nanoid": "^3.1.20", + "colorette": "^1.2.2", + "nanoid": "^3.1.22", "source-map": "^0.6.1" } }, @@ -14456,6 +14671,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -14846,6 +15070,17 @@ "is-extendable": "^0.1.1", "is-plain-object": "^2.0.3", "split-string": "^3.0.1" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } } }, "shelljs": { @@ -15118,6 +15353,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -15566,6 +15810,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -15641,21 +15894,21 @@ "dev": true }, "uglify-js": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.0.tgz", - "integrity": "sha512-TWYSWa9T2pPN4DIJYbU9oAjQx+5qdV5RUDxwARg8fmJZrD/V27Zj0JngW5xg1DFz42G0uDYl2XhzF6alSzD62w==", + "version": "3.13.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.3.tgz", + "integrity": "sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==", "dev": true }, "unbox-primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", - "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", "dev": true, "requires": { "function-bind": "^1.1.1", - "has-bigints": "^1.0.0", - "has-symbols": "^1.0.0", - "which-boxed-primitive": "^1.0.1" + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" } }, "unc-path-regex": { @@ -15819,27 +16072,6 @@ "es-abstract": "^1.17.2", "has-symbols": "^1.0.1", "object.getownpropertydescriptors": "^2.1.0" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } } }, "uuid": { diff --git a/OnTopic.Editor.AspNetCore/package-lock.json b/OnTopic.Editor.AspNetCore/package-lock.json index 531277f4..d399003c 100644 --- a/OnTopic.Editor.AspNetCore/package-lock.json +++ b/OnTopic.Editor.AspNetCore/package-lock.json @@ -845,9 +845,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001194", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001194.tgz", - "integrity": "sha512-iDUOH+oFeBYk5XawYsPtsx/8fFpndAPUQJC7gBTfxHM8xw5nOZv7ceAD4frS1MKCLUac7QL5wdAJiFQlDRjXlA==", + "version": "1.0.30001205", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", + "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==", "dev": true }, "node_modules/caseless": { @@ -1147,9 +1147,9 @@ "dev": true }, "node_modules/color-string": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", - "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", "dev": true, "dependencies": { "color-name": "^1.0.0", @@ -1253,13 +1253,13 @@ } }, "node_modules/copy-props": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", "dev": true, "dependencies": { - "each-props": "^1.3.0", - "is-plain-object": "^2.0.1" + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" } }, "node_modules/core-util-is": { @@ -1619,9 +1619,9 @@ } }, "node_modules/csso/node_modules/css-tree": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", - "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", "dev": true, "dependencies": { "mdn-data": "2.0.14", @@ -1805,9 +1805,9 @@ } }, "node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", "dev": true, "funding": [ { @@ -1898,6 +1898,18 @@ "object.defaults": "^1.1.0" } }, + "node_modules/each-props/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1909,9 +1921,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.3.678", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.678.tgz", - "integrity": "sha512-E5ha1pE9+aWWrT2fUD5wdPBWUnYtKnEnloewbtVyrkAs79HvodOiNO4rMR94+hKbxgMFQG4fnPQACOc1cfMfBg==", + "version": "1.3.705", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.705.tgz", + "integrity": "sha512-agtrL5vLSOIK89sE/YSzAgqCw76eZ60gf3J7Tid5RfLbSp5H4nWL28/dIV+H+ZhNNi1JNiaF62jffwYsAyXc0g==", "dev": true }, "node_modules/emoji-regex": { @@ -1945,9 +1957,9 @@ } }, "node_modules/es-abstract": { - "version": "1.18.0-next.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.3.tgz", - "integrity": "sha512-VMzHx/Bczjg59E6jZOQjHeN3DEoptdhejpARgflAViidlqSpjdq9zA6lKwlhRRs/lOw1gHJv2xkkSFRgvEwbQg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", @@ -2220,9 +2232,9 @@ } }, "node_modules/ext/node_modules/type": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.3.0.tgz", - "integrity": "sha512-rgPIqOdfK/4J9FhiVrZ3cveAjRRo5rsQBAIhnylX874y1DX/kEKSVdLsnuHB6l1KTjHyU01VjiMBHgU2adejyg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", "dev": true }, "node_modules/extend": { @@ -2382,6 +2394,18 @@ "node": ">= 0.10" } }, + "node_modules/fined/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/flagged-respawn": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", @@ -2926,6 +2950,18 @@ "node": ">=0.10.0" } }, + "node_modules/gulp-postcss/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/gulp-postcss/node_modules/plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -2994,6 +3030,18 @@ "node": ">=0.10.0" } }, + "node_modules/gulp-sass/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/gulp-sass/node_modules/plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -3074,6 +3122,18 @@ "node": ">=0.10.0" } }, + "node_modules/gulp-uglify/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/gulplog": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", @@ -3745,13 +3805,10 @@ } }, "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, "engines": { "node": ">=0.10.0" } @@ -4109,6 +4166,18 @@ "node": ">= 0.8" } }, + "node_modules/liftoff/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -4448,6 +4517,18 @@ "node": ">=0.10.0" } }, + "node_modules/micromatch/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/micromatch/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4521,6 +4602,18 @@ "node": ">=0.10.0" } }, + "node_modules/mixin-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -4555,9 +4648,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.1.22", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.22.tgz", + "integrity": "sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==", "dev": true, "peer": true, "bin": { @@ -4614,6 +4707,18 @@ "node": ">=0.10.0" } }, + "node_modules/nanomatch/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/nanomatch/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -5392,14 +5497,14 @@ } }, "node_modules/postcss": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz", - "integrity": "sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==", + "version": "8.2.9", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.9.tgz", + "integrity": "sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q==", "dev": true, "peer": true, "dependencies": { - "colorette": "^1.2.1", - "nanoid": "^3.1.20", + "colorette": "^1.2.2", + "nanoid": "^3.1.22", "source-map": "^0.6.1" }, "engines": { @@ -7001,6 +7106,18 @@ "node": ">=0.10.0" } }, + "node_modules/regex-not/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/remove-bom-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", @@ -7469,6 +7586,18 @@ "node": ">=0.10.0" } }, + "node_modules/set-value/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/shelljs": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", @@ -7785,6 +7914,18 @@ "node": ">=0.10.0" } }, + "node_modules/split-string/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -8339,6 +8480,18 @@ "node": ">=0.10.0" } }, + "node_modules/to-regex/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/to-through": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", @@ -8413,9 +8566,9 @@ "dev": true }, "node_modules/uglify-js": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.0.tgz", - "integrity": "sha512-TWYSWa9T2pPN4DIJYbU9oAjQx+5qdV5RUDxwARg8fmJZrD/V27Zj0JngW5xg1DFz42G0uDYl2XhzF6alSzD62w==", + "version": "3.13.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.3.tgz", + "integrity": "sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==", "dev": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -8425,15 +8578,18 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", - "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", "dev": true, "dependencies": { "function-bind": "^1.1.1", - "has-bigints": "^1.0.0", - "has-symbols": "^1.0.0", - "which-boxed-primitive": "^1.0.1" + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/unc-path-regex": { @@ -8631,31 +8787,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/util.promisify/node_modules/es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -9613,9 +9744,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001194", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001194.tgz", - "integrity": "sha512-iDUOH+oFeBYk5XawYsPtsx/8fFpndAPUQJC7gBTfxHM8xw5nOZv7ceAD4frS1MKCLUac7QL5wdAJiFQlDRjXlA==", + "version": "1.0.30001205", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", + "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==", "dev": true }, "caseless": { @@ -9866,9 +9997,9 @@ "dev": true }, "color-string": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", - "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", "dev": true, "requires": { "color-name": "^1.0.0", @@ -9960,13 +10091,13 @@ "dev": true }, "copy-props": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", "dev": true, "requires": { - "each-props": "^1.3.0", - "is-plain-object": "^2.0.1" + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" } }, "core-util-is": { @@ -10251,9 +10382,9 @@ }, "dependencies": { "css-tree": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", - "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", "dev": true, "requires": { "mdn-data": "2.0.14", @@ -10403,9 +10534,9 @@ }, "dependencies": { "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", "dev": true }, "entities": { @@ -10483,6 +10614,17 @@ "requires": { "is-plain-object": "^2.0.1", "object.defaults": "^1.1.0" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } } }, "ecc-jsbn": { @@ -10496,9 +10638,9 @@ } }, "electron-to-chromium": { - "version": "1.3.678", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.678.tgz", - "integrity": "sha512-E5ha1pE9+aWWrT2fUD5wdPBWUnYtKnEnloewbtVyrkAs79HvodOiNO4rMR94+hKbxgMFQG4fnPQACOc1cfMfBg==", + "version": "1.3.705", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.705.tgz", + "integrity": "sha512-agtrL5vLSOIK89sE/YSzAgqCw76eZ60gf3J7Tid5RfLbSp5H4nWL28/dIV+H+ZhNNi1JNiaF62jffwYsAyXc0g==", "dev": true }, "emoji-regex": { @@ -10532,9 +10674,9 @@ } }, "es-abstract": { - "version": "1.18.0-next.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.3.tgz", - "integrity": "sha512-VMzHx/Bczjg59E6jZOQjHeN3DEoptdhejpARgflAViidlqSpjdq9zA6lKwlhRRs/lOw1gHJv2xkkSFRgvEwbQg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "dev": true, "requires": { "call-bind": "^1.0.2", @@ -10763,9 +10905,9 @@ }, "dependencies": { "type": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.3.0.tgz", - "integrity": "sha512-rgPIqOdfK/4J9FhiVrZ3cveAjRRo5rsQBAIhnylX874y1DX/kEKSVdLsnuHB6l1KTjHyU01VjiMBHgU2adejyg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", "dev": true } } @@ -10900,6 +11042,17 @@ "object.defaults": "^1.1.0", "object.pick": "^1.2.0", "parse-filepath": "^1.0.1" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } } }, "flagged-respawn": { @@ -11339,6 +11492,15 @@ "is-plain-object": "^2.0.4" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -11394,6 +11556,15 @@ "is-plain-object": "^2.0.4" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -11463,6 +11634,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -11981,13 +12161,10 @@ "dev": true }, "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true }, "is-promise": { "version": "2.2.2", @@ -12272,6 +12449,17 @@ "object.map": "^1.0.0", "rechoir": "^0.6.2", "resolve": "^1.1.7" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } } }, "load-json-file": { @@ -12567,6 +12755,15 @@ "is-plain-object": "^2.0.4" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -12623,6 +12820,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -12654,9 +12860,9 @@ "dev": true }, "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.1.22", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.22.tgz", + "integrity": "sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==", "dev": true, "peer": true }, @@ -12698,6 +12904,15 @@ "is-plain-object": "^2.0.4" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -13296,14 +13511,14 @@ "dev": true }, "postcss": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz", - "integrity": "sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==", + "version": "8.2.9", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.9.tgz", + "integrity": "sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q==", "dev": true, "peer": true, "requires": { - "colorette": "^1.2.1", - "nanoid": "^3.1.20", + "colorette": "^1.2.2", + "nanoid": "^3.1.22", "source-map": "^0.6.1" } }, @@ -14546,6 +14761,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -14936,6 +15160,17 @@ "is-extendable": "^0.1.1", "is-plain-object": "^2.0.3", "split-string": "^3.0.1" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } } }, "shelljs": { @@ -15208,6 +15443,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -15656,6 +15900,15 @@ "requires": { "is-plain-object": "^2.0.4" } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } } } }, @@ -15731,21 +15984,21 @@ "dev": true }, "uglify-js": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.0.tgz", - "integrity": "sha512-TWYSWa9T2pPN4DIJYbU9oAjQx+5qdV5RUDxwARg8fmJZrD/V27Zj0JngW5xg1DFz42G0uDYl2XhzF6alSzD62w==", + "version": "3.13.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.3.tgz", + "integrity": "sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==", "dev": true }, "unbox-primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", - "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", "dev": true, "requires": { "function-bind": "^1.1.1", - "has-bigints": "^1.0.0", - "has-symbols": "^1.0.0", - "which-boxed-primitive": "^1.0.1" + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" } }, "unc-path-regex": { @@ -15909,27 +16162,6 @@ "es-abstract": "^1.17.2", "has-symbols": "^1.0.1", "object.getownpropertydescriptors": "^2.1.0" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } } }, "uuid": { From 258d0b14c2c246e66cb2a161784a3255cb317340 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 11:42:57 -0700 Subject: [PATCH 076/137] Namespaced `data-*` attributes for Bootstrap nav/tab component In Bootstrap 5.0.0, the data attributes have been namespaced, so `data-toggle` is now `data-bs-toggle`. This resolves a bug where the tabs stopped working, as noted in #41. While I was at it, I updated the `aria` accessibility attributes and and markup to align with the reference standard from the Bootstrap documentation. (The markup is flexible, but it's easier to debug issues when the markup is aligned.) --- .../Areas/Editor/Views/Shared/_Toolbar.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml index a1275649..eb6fb096 100644 --- a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml +++ b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml @@ -63,8 +63,8 @@ @for (int i = 0; i < @displayGroups.Count(); i++) { var displayGroupName = displayGroups[i]; var displayGroupId = displayGroups[i].Replace(" ", String.Empty); - } From d79152365aab00ee022046420cec285e2380f89a Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 11:51:03 -0700 Subject: [PATCH 077/137] Namespaced `data-*` attributes for Bootstrap dropdown component In Bootstrap 5.0.0, the data attributes have been namespaced, so `data-toggle` is now `data-bs-toggle`. This resolves a bug where the dropdown stopped working, as noted in #41. While I was at it, I updated the `aria` accessibility attributes and and markup to align with the reference standard from the Bootstrap documentation. (The markup is flexible, but it's easier to debug issues when the markup is aligned.) I also introduced a `nobr` to prevent wrapping of the dates. --- .../Areas/Editor/Views/Shared/_Toolbar.cshtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml index eb6fb096..7bebcd0a 100644 --- a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml +++ b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml @@ -12,15 +12,15 @@ @if (Model.Topic.VersionHistory.Count > 1) { diff --git a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Import.cshtml b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Import.cshtml index 7115a7a7..37e00bca 100644 --- a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Import.cshtml +++ b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Import.cshtml @@ -45,7 +45,7 @@

    Source - +

    @@ -55,22 +55,22 @@



    @@ -89,22 +89,22 @@



    @@ -112,17 +112,17 @@



    @@ -140,7 +140,7 @@
    @@ -148,27 +148,27 @@




    From 9b5ea80254e4adb7e1e84e5931ee95ae984e5ba6 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 12:07:12 -0700 Subject: [PATCH 082/137] Added script for initializing the tooltips In Bootstrap 5.0.0, the tooltips are no longer automatically initialized by Bootstrap. Instead, they need to be wired up individually via JavaScript. I've added a new script to `Layout` that does exactly this, by looping through each `data-bs-toggle="tooltip"` element and initializing it as a `bootstrap.Tooltip()`. This returns the tooltips to a functioning state, thus satisfying the tooltip line item in #41. --- OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js b/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js index 20f58d80..1e805a02 100644 --- a/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js +++ b/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js @@ -67,4 +67,12 @@ $(function () { $('#DisplayGroupTabsContent').css('min-height', $windowHeight-$formAreaOffset.top + 'px'); } + /*---------------------------------------------------------------------------------------------------------------------------- + | Initialize tooltips + \---------------------------------------------------------------------------------------------------------------------------*/ + var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); + tooltipTriggerList.map(function (tooltipTriggerEl) { + return new bootstrap.Tooltip(tooltipTriggerEl); + }); + }); \ No newline at end of file From 87ab811d7c600c9682f3fb12396258f1c9872781 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 12:31:41 -0700 Subject: [PATCH 083/137] Updated `Modal` script to use new Bootstrap modal syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With Bootstrap 5.0.0, the components are no longer implemented via jQuery, and need to be initialized via the `bootstrap` object—e.g. `bootstrap.Modal()` for modal windows, or retrieving an instance of the object via `bootstrap.getInstance()`. While I was at it, for consistency, I updated the scripts to prefer straight JavaScript instead of awkwardly mixing jQuery and plain JavaScript. The jQuery made more sense previously when it was also used for the modal windows. There was also some code in here that is no longer necessary, such as setting the first tab as active. That JavaScript is now removed. This resolves the modal functionality in #41. --- .../Components/NestedTopicList/Default.cshtml | 10 ++-- .../Shared/Scripts/Modal.js | 47 +++++++++---------- 2 files changed, 26 insertions(+), 31 deletions(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/NestedTopicList/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/NestedTopicList/Default.cshtml index af192f23..9315ccc2 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/NestedTopicList/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/NestedTopicList/Default.cshtml @@ -74,11 +74,11 @@ diff --git a/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js b/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js index d3a3b35e..0490924f 100644 --- a/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js +++ b/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js @@ -27,9 +27,9 @@ initEditorModal = function (namespace, title, targetUrl, onCloseFunction) { /*---------------------------------------------------------------------------------------------------------------------------- | Establish variables \---------------------------------------------------------------------------------------------------------------------------*/ - var $editorModal = $('#EditorModal_' + namespace); - var $modalTitle = $('#ModalTitle_' + namespace); - var $editorFrame = $('#EditorFrame_' + namespace); + var editorModal = document.getElementById('EditorModal_' + namespace); + var modalTitle = document.getElementById('ModalTitle_' + namespace); + var editorFrame = document.getElementById('EditorFrame_' + namespace); /*---------------------------------------------------------------------------------------------------------------------------- | Provide debug data for testing @@ -39,30 +39,30 @@ initEditorModal = function (namespace, title, targetUrl, onCloseFunction) { console.log('title: ' + title); console.log('targetUrl: ' + targetUrl); console.log('onCloseFunction: ' + onCloseFunction); - console.log('#EditorModal' + namespace + ': ' + $editorModal); - console.log('#ModalTitle' + namespace + ': ' + $modalTitle); - console.log('#EditorFrame' + namespace + ': ' + $editorFrame); + console.log('#EditorModal' + namespace + ': ' + editorModal.id); + console.log('#ModalTitle' + namespace + ': ' + modalTitle.id); + console.log('#EditorFrame' + namespace + ': ' + editorFrame.id); /*---------------------------------------------------------------------------------------------------------------------------- | Set modal window title \---------------------------------------------------------------------------------------------------------------------------*/ - if ($modalTitle && title.length > 0) { - $modalTitle.html(title); + if (modalTitle && title.length > 0) { + modalTitle.innerText = title; } /*---------------------------------------------------------------------------------------------------------------------------- | Set modal iframe source \---------------------------------------------------------------------------------------------------------------------------*/ - if ($editorFrame && targetUrl.length > 0) { - $editorFrame.attr('src', targetUrl); + if (editorFrame && targetUrl.length > 0) { + editorFrame.src = targetUrl; } /*---------------------------------------------------------------------------------------------------------------------------- | Open modal window \---------------------------------------------------------------------------------------------------------------------------*/ - if ($editorModal) { - $editorModal.modal(); - $(".nav-tabs a.active").tab("show"); + if (editorModal) { + var modal = bootstrap.Modal.getInstance(editorModal); + modal.show(); } }; @@ -74,28 +74,23 @@ initEditorModal = function (namespace, title, targetUrl, onCloseFunction) { * Closes the current modal window */ window.closeModal = function () { - $('[id^="EditorModal"]').modal('hide'); + var modalTriggerList = [].slice.call(document.querySelectorAll('[id^="EditorModal"]')); + modalTriggerList.map(function (tooltipTriggerEl) { + bootstrap.Modal.getInstance(tooltipTriggerEl).hide(); + }); }; /*============================================================================================================================== | JQUERY: WIRE UP ACTIONS \-----------------------------------------------------------------------------------------------------------------------------*/ -(function ($) { +(function (bootstrap, document) { /*---------------------------------------------------------------------------------------------------------------------------- | Event Handler: Close Button \---------------------------------------------------------------------------------------------------------------------------*/ - $('#ModalCloseButton').on('click', function (e) { + var modalCloseElement = document.getElementById('ModalCloseButton'); + modalCloseElement.addEventListener('click', function(e) { window.parent.closeModal(); }); - /*---------------------------------------------------------------------------------------------------------------------------- - | Precondition: Set first tab as active - \---------------------------------------------------------------------------------------------------------------------------*/ - //Set the first tab (and associated content pane) as active - $('.tab-content div.tab-pane:first-child').addClass('active'); - $('[id*="EditorModal"]').on('shown.bs.modal', function(e) { - $('.tab-content div.tab-pane:first-child').addClass('active'); - }); - -})(jQuery); \ No newline at end of file +})(bootstrap, document); \ No newline at end of file From c99ebac9186c538b6530ea0b812e9e6d2507168d Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 12:33:54 -0700 Subject: [PATCH 084/137] Moved logic for setting modal window height to `Modal` script Instead of setting the height of any and all modal windows at the beginning of each page load, instead load it when the modal window is opened. This simplifies the code since we already e.g. have a reference to the editor frame being targeted. While I was at it, I migrated from jQuery to JavaScript syntax. --- OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js | 8 -------- OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js b/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js index 1e805a02..4e060160 100644 --- a/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js +++ b/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js @@ -51,14 +51,6 @@ $(function () { }, 50); }); - /*---------------------------------------------------------------------------------------------------------------------------- - | Set height of modal window - \---------------------------------------------------------------------------------------------------------------------------*/ - var $percentageHeight = $windowHeight * 0.785; - $('[id*="EditorModal"]').on('show.bs.modal', function(e) { - $('div[id*="EditorModal"] iframe').attr('height', $percentageHeight + 'px'); - }); - /*---------------------------------------------------------------------------------------------------------------------------- | Set height of form area \---------------------------------------------------------------------------------------------------------------------------*/ diff --git a/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js b/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js index 0490924f..1899097b 100644 --- a/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js +++ b/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js @@ -61,6 +61,8 @@ initEditorModal = function (namespace, title, targetUrl, onCloseFunction) { | Open modal window \---------------------------------------------------------------------------------------------------------------------------*/ if (editorModal) { + var percentageHeight = window.innerHeight * 0.785; + editorFrame.height = percentageHeight + 'px'; var modal = bootstrap.Modal.getInstance(editorModal); modal.show(); } From 761fa4a7811eaac229953b0877b0a22c867df3ae Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 12:37:23 -0700 Subject: [PATCH 085/137] Wrapped close modal action in condition The `CloseModalButton` only exists when the page is within a modal window. The previous jQuery syntax doesn't care about this as it will apply the logic to zero or more elements, and thus accepts an empty array. With the migration to `getElementById` (87ab811), however, this needs an explicit check. --- OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js b/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js index 1899097b..ded74245 100644 --- a/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js +++ b/OnTopic.Editor.AspNetCore/Shared/Scripts/Modal.js @@ -85,14 +85,16 @@ window.closeModal = function () { /*============================================================================================================================== | JQUERY: WIRE UP ACTIONS \-----------------------------------------------------------------------------------------------------------------------------*/ -(function (bootstrap, document) { +(function (document) { /*---------------------------------------------------------------------------------------------------------------------------- | Event Handler: Close Button \---------------------------------------------------------------------------------------------------------------------------*/ var modalCloseElement = document.getElementById('ModalCloseButton'); - modalCloseElement.addEventListener('click', function(e) { - window.parent.closeModal(); - }); + if (modalCloseElement) { + modalCloseElement.addEventListener('click', function (e) { + window.parent.closeModal(); + }); + } -})(bootstrap, document); \ No newline at end of file +})(document); \ No newline at end of file From 412ee6e0e1a7b344d9b607580ec41f1e7def7962 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 12:56:55 -0700 Subject: [PATCH 086/137] Set `AttributeBindingModelBinder` to fallback to `AttributeBindingModel` The `ITypeLookupService` in OnTopic 5.0.0 now supports setting fallbacks, which will be used if a primary type cannot be identified. By setting the `AttributeBindingModelBinder` to fallback to `AttributeBindingModel`, we remove the _requirement_ for attributes to define their own `AttributeBindingModel` class; if they don't need to e.g. customize the `GetValue()` method, they can just rely on the standard out-of-the-box implementation. --- .../Infrastructure/AttributeBindingModelBinder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OnTopic.Editor.AspNetCore/Infrastructure/AttributeBindingModelBinder.cs b/OnTopic.Editor.AspNetCore/Infrastructure/AttributeBindingModelBinder.cs index df345260..41384750 100644 --- a/OnTopic.Editor.AspNetCore/Infrastructure/AttributeBindingModelBinder.cs +++ b/OnTopic.Editor.AspNetCore/Infrastructure/AttributeBindingModelBinder.cs @@ -75,7 +75,7 @@ public Task BindModelAsync(ModelBindingContext bindingContext) { /*------------------------------------------------------------------------------------------------------------------------ | ESTABLISH MODEL \-----------------------------------------------------------------------------------------------------------------------*/ - var type = TypeLookupService.Lookup($"{editorType}BindingModel"); + var type = TypeLookupService.Lookup($"{editorType}BindingModel", "AttributeBindingModel"); Contract.Assume( type, From 83ddd5bc09b133e5c3d7526dd6b107c79c30ec30 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 13:00:00 -0700 Subject: [PATCH 087/137] Deleted empty derivatives of `AttributeBindingModel` With the exception of the `BooleanAttributeBindingModel`, all of the rest of the derivatives of `AttributeBindingModel` added no logic, and were simply there to satisfy the preexisting need for each attribute type plugin to define one, just in case it was needed. This is ugly, and makes it harder to understand the plugin structure by adding additional levels of abstraction. With the fallback for `AttributeBindingModel` in place (412ee6e), this can be removed. --- .../DateTimeAttributeBindingModel.cs | 42 ------------------- .../FileListAttributeBindingModel.cs | 36 ---------------- .../FilePathAttributeBindingModel.cs | 40 ------------------ .../HtmlAttributeBindingModel.cs | 36 ---------------- ...comingRelationshipAttributeBindingModel.cs | 36 ---------------- .../InstructionAttributeBindingModel.cs | 36 ---------------- .../LastModifiedAttributeBindingModel.cs | 40 ------------------ .../LastModifiedByAttributeBindingModel.cs | 36 ---------------- .../NestedTopicListAttributeBindingModel.cs | 36 ---------------- .../NumberAttributeBindingModel.cs | 36 ---------------- .../RelationshipAttributeBindingModel.cs | 36 ---------------- .../TextAreaAttributeBindingModel.cs | 36 ---------------- .../TextAttributeBindingModel.cs | 36 ---------------- ...TokenizedTopicListAttributeBindingModel.cs | 36 ---------------- .../TopicListAttributeBindingModel.cs | 36 ---------------- .../TopicReferenceAttributeBindingModel.cs | 37 ---------------- 16 files changed, 591 deletions(-) delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/DateTimeAttribute/DateTimeAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/FileListAttribute/FileListAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/FilePathAttribute/FilePathAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/HtmlAttribute/HtmlAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/IncomingRelationshipAttribute/IncomingRelationshipAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/InstructionAttribute/InstructionAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/LastModifiedAttribute/LastModifiedAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/LastModifiedByAttribute/LastModifiedByAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/NestedTopicListAttribute/NestedTopicListAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/NumberAttribute/NumberAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/RelationshipAttribute/RelationshipAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/TextAreaAttribute/TextAreaAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/TextAttribute/TextAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/TokenizedTopicListAttribute/TokenizedTopicListAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/TopicListAttribute/TopicListAttributeBindingModel.cs delete mode 100644 OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeBindingModel.cs diff --git a/OnTopic.Editor.AspNetCore.Attributes/DateTimeAttribute/DateTimeAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/DateTimeAttribute/DateTimeAttributeBindingModel.cs deleted file mode 100644 index 50abdb0e..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/DateTimeAttribute/DateTimeAttributeBindingModel.cs +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.DateTimeAttribute { - - /*============================================================================================================================ - | CLASS: DATE TIME ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of an HTML attribute in the Topic Editor. - /// - /// - /// - public record DateTimeAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | PRIVATE VARIABLES - \-------------------------------------------------------------------------------------------------------------------------*/ - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public DateTimeAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/FileListAttribute/FileListAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/FileListAttribute/FileListAttributeBindingModel.cs deleted file mode 100644 index f135c853..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/FileListAttribute/FileListAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.FileListAttribute { - - /*============================================================================================================================ - | CLASS: FILE LIST ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a file editor attribute in the Topic Editor. - /// - public record FileListAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public FileListAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/FilePathAttribute/FilePathAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/FilePathAttribute/FilePathAttributeBindingModel.cs deleted file mode 100644 index 26290afb..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/FilePathAttribute/FilePathAttributeBindingModel.cs +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.FilePathAttribute { - - /*============================================================================================================================ - | CLASS: FILE PATH ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a file path attribute in the Topic Editor. - /// - public record FilePathAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | PRIVATE VARIABLES - \-------------------------------------------------------------------------------------------------------------------------*/ - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public FilePathAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/HtmlAttribute/HtmlAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/HtmlAttribute/HtmlAttributeBindingModel.cs deleted file mode 100644 index 88516050..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/HtmlAttribute/HtmlAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.HtmlAttribute { - - /*============================================================================================================================ - | CLASS: HTML ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a HTML attribute in the Topic Editor. - /// - public record HtmlAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public HtmlAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/IncomingRelationshipAttribute/IncomingRelationshipAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/IncomingRelationshipAttribute/IncomingRelationshipAttributeBindingModel.cs deleted file mode 100644 index 5f1157c8..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/IncomingRelationshipAttribute/IncomingRelationshipAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.IncomingRelationshipAttribute { - - /*============================================================================================================================ - | CLASS: INCOMING RELATIONSHIP ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of an incoming relationship attribute in the Topic Editor. - /// - public record IncomingRelationshipAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public IncomingRelationshipAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/InstructionAttribute/InstructionAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/InstructionAttribute/InstructionAttributeBindingModel.cs deleted file mode 100644 index 1bf91b3c..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/InstructionAttribute/InstructionAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.InstructionAttribute { - - /*============================================================================================================================ - | CLASS: INSTRUCTION ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of an instruction attribute in the Topic Editor. - /// - public record InstructionAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public InstructionAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/LastModifiedAttribute/LastModifiedAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/LastModifiedAttribute/LastModifiedAttributeBindingModel.cs deleted file mode 100644 index ee3f2614..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/LastModifiedAttribute/LastModifiedAttributeBindingModel.cs +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.LastModifiedAttribute { - - /*============================================================================================================================ - | CLASS: LAST MODIFIED ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a last modified attribute in the Topic Editor. - /// - public record LastModifiedAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | PRIVATE VARIABLES - \-------------------------------------------------------------------------------------------------------------------------*/ - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public LastModifiedAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/LastModifiedByAttribute/LastModifiedByAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/LastModifiedByAttribute/LastModifiedByAttributeBindingModel.cs deleted file mode 100644 index 198b271c..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/LastModifiedByAttribute/LastModifiedByAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.LastModifiedByAttribute { - - /*============================================================================================================================ - | CLASS: LAST MODIFIED BY ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a last modified by attribute in the Topic Editor. - /// - public record LastModifiedByAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public LastModifiedByAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/NestedTopicListAttribute/NestedTopicListAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/NestedTopicListAttribute/NestedTopicListAttributeBindingModel.cs deleted file mode 100644 index 21fc12a0..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/NestedTopicListAttribute/NestedTopicListAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.NestedTopicListAttribute { - - /*============================================================================================================================ - | CLASS: NESTED TOPIC LIST ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a topic list attribute in the Topic Editor. - /// - public record NestedTopicListAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public NestedTopicListAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/NumberAttribute/NumberAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/NumberAttribute/NumberAttributeBindingModel.cs deleted file mode 100644 index 0d7a4918..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/NumberAttribute/NumberAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.NumberAttribute { - - /*============================================================================================================================ - | CLASS: NUMBER ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a text attribute in the Topic Editor. - /// - public record NumberAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public NumberAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/RelationshipAttribute/RelationshipAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/RelationshipAttribute/RelationshipAttributeBindingModel.cs deleted file mode 100644 index a3ce0b0c..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/RelationshipAttribute/RelationshipAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.RelationshipAttribute { - - /*============================================================================================================================ - | CLASS: RELATIONSHIP ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a relationship attribute in the Topic Editor. - /// - public record RelationshipAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public RelationshipAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/TextAreaAttribute/TextAreaAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/TextAreaAttribute/TextAreaAttributeBindingModel.cs deleted file mode 100644 index 0c353349..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/TextAreaAttribute/TextAreaAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.TextAreaAttribute { - - /*============================================================================================================================ - | CLASS: TEXT AREA ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a text attribute in the Topic Editor. - /// - public record TextAreaAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public TextAreaAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/TextAttribute/TextAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/TextAttribute/TextAttributeBindingModel.cs deleted file mode 100644 index 85afb64d..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/TextAttribute/TextAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.TextAttribute { - - /*============================================================================================================================ - | CLASS: TEXT ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a text attribute in the Topic Editor. - /// - public record TextAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public TextAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/TokenizedTopicListAttribute/TokenizedTopicListAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/TokenizedTopicListAttribute/TokenizedTopicListAttributeBindingModel.cs deleted file mode 100644 index 2f80df44..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/TokenizedTopicListAttribute/TokenizedTopicListAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.TokenizedTopicListAttribute { - - /*============================================================================================================================ - | CLASS: TOKENIZED TOPIC LIST ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a tokenized topic list attribute in the Topic Editor. - /// - public record TokenizedTopicListAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public TokenizedTopicListAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/TopicListAttribute/TopicListAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/TopicListAttribute/TopicListAttributeBindingModel.cs deleted file mode 100644 index 705200a5..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/TopicListAttribute/TopicListAttributeBindingModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.TopicListAttribute { - - /*============================================================================================================================ - | CLASS: TOPIC LIST ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a topic list attribute in the Topic Editor. - /// - public record TopicListAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class. - /// - public TopicListAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeBindingModel.cs b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeBindingModel.cs deleted file mode 100644 index 6a6199de..00000000 --- a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeBindingModel.cs +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================================================================== -| Author Ignia, LLC -| Client Ignia, LLC -| Project Topics Library -\=============================================================================================================================*/ -using OnTopic.Editor.AspNetCore.Models; - -namespace OnTopic.Editor.AspNetCore.Attributes.TopicReferenceAttribute { - - /*============================================================================================================================ - | CLASS: TOPIC REFERENCE ATTRIBUTE (BINDING MODEL) - \---------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Represents an instance of a topic reference attribute in the Topic Editor. - /// - public record TopicReferenceAttributeBindingModel : AttributeBindingModel { - - /*========================================================================================================================== - | CONSTRUCTOR - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Initializes a new instance of the class, using the specified key/value - /// pair. - /// - public TopicReferenceAttributeBindingModel() : base() { - } - - /*========================================================================================================================== - | GET VALUE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Retrieves the value associated with the attribute. - /// - public override string GetValue() => Value; - - } // Class -} // Namespace \ No newline at end of file From dabf85c16f00a8d415e347b2786b9738479358d8 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 13:47:03 -0700 Subject: [PATCH 088/137] Fixed width of flower boxes to adhere to 128 character limit --- .../Controllers/EditorController.cs | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs index 5f63dd14..94e71370 100644 --- a/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs +++ b/OnTopic.Editor.AspNetCore/Controllers/EditorController.cs @@ -481,9 +481,9 @@ private void SetReference(Topic topic, AttributeDescriptor attribute, AttributeB return null; } - /*============================================================================================================================ + /*========================================================================================================================== | [POST] SET TOPIC VERSION - \---------------------------------------------------------------------------------------------------------------------------*/ + \-------------------------------------------------------------------------------------------------------------------------*/ /// /// Calls Topic.Rollback() with the selected version datetime to set the data to that version and re-save the Topic. /// @@ -495,21 +495,21 @@ public IActionResult SetVersion(DateTime version, bool isModal = false) { \-----------------------------------------------------------------------------------------------------------------------*/ Contract.Assume(CurrentTopic, "The current route could not be resolved to an existing topic."); - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Initiate rollback - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ TopicRepository.Rollback(CurrentTopic, version); - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Render index - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ return RedirectToAction("Edit", new { path = CurrentTopic.GetWebPath(), IsModal = isModal }); } - /*============================================================================================================================ + /*========================================================================================================================== | [POST] DELETE TOPIC - \---------------------------------------------------------------------------------------------------------------------------*/ + \-------------------------------------------------------------------------------------------------------------------------*/ /// /// Fires when the user clicks the "Delete" button; deletes the current topic and any child attributes. /// @@ -522,29 +522,29 @@ public IActionResult Delete(bool isModal = false) { Contract.Assume(CurrentTopic, "The current route could not be resolved to an existing topic."); Contract.Assume(CurrentTopic.Parent, "The parent could not be resolved to an existing topic."); - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Define variables - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ var parent = CurrentTopic.Parent; var deletedTopic = CurrentTopic.Title; - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Lock the Topic repository before executing the delete - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ lock (TopicRepository) { TopicRepository.Delete(CurrentTopic, true); } - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | If the editor is in modal view, close the window; otherwise, redirect to the parent topic. - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ if (isModal) { return View("CloseModal"); } - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | If the content type is a nested list, display grandparent. - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ else if (parent.ContentType is "List") { return RedirectToAction( "Edit", @@ -557,18 +557,18 @@ public IActionResult Delete(bool isModal = false) { ); } - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Redirect to parent - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ else { return RedirectToAction("Edit", new { path = parent.GetWebPath() }); } } - /*============================================================================================================================ + /*========================================================================================================================== | [POST] MOVE - \---------------------------------------------------------------------------------------------------------------------------*/ + \-------------------------------------------------------------------------------------------------------------------------*/ /// /// AJAX-parsable, querystring-configurable wrapper to the OnTopic engine code that moves a node from one place in the /// hierarchy to another. "true" if succeeded, Returns "false" if failure, as string values. The JS throws a generic @@ -583,9 +583,9 @@ public IActionResult Delete(bool isModal = false) { [HttpPost] public IActionResult Move(int topicId, int targetTopicId = -1, int siblingId = -1) { - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Retrieve the source and destination topics - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ var topic = TopicRepository.Load(topicId); var target = (targetTopicId >= 0)? TopicRepository.Load(targetTopicId) : topic?.Parent; @@ -595,9 +595,9 @@ public IActionResult Move(int topicId, int targetTopicId = -1, int siblingId = - Contract.Assume(topic, $"The topicId '{topicId}' could not be resolved to a topic."); Contract.Assume(target, $"The targetTopicId '{targetTopicId}' could not be resolved to a topic."); - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Move the topic and/or reorder it with its siblings; lock the Topic repository prior to execution - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ lock (TopicRepository) { if (siblingId > 0) { var sibling = TopicRepository.Load(siblingId); @@ -608,9 +608,9 @@ public IActionResult Move(int topicId, int targetTopicId = -1, int siblingId = - } } - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Return - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ return Content("true"); } @@ -629,9 +629,9 @@ public JsonResult Json(TopicQueryOptions options) { Contract.Requires(options, nameof(options)); Contract.Assume(CurrentTopic, "The current route could not be resolved to an existing topic."); - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Get related topics - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ var relatedTopics = (ReadOnlyTopicCollection?)null; if (options.MarkRelated) { @@ -654,15 +654,15 @@ public JsonResult Json(TopicQueryOptions options) { } - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Assemble view model - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ var jsonTopicMappingService = new TopicQueryService(); var jsonTopicViewModel = jsonTopicMappingService.Query(CurrentTopic, options, relatedTopics); - /*-------------------------------------------------------------------------------------------------------------------------- + /*------------------------------------------------------------------------------------------------------------------------ | Return hierarchical view - \-------------------------------------------------------------------------------------------------------------------------*/ + \-----------------------------------------------------------------------------------------------------------------------*/ return new(jsonTopicViewModel); } From 4319cd06ca90ac6882106a1f58fb5046ef23bb75 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 13:53:13 -0700 Subject: [PATCH 089/137] Derived `TopicReference` attribute descriptor from `TokenizedTopicList` The `TopicReferenceAttributeDescriptorViewModel` shared the `RootTopic` with the `QueryableTopicListAttributeDescriptorViewModel`, and the `ResultLimit` with the `TokenizedTopicListAttributeDescriptorViewModel`. In addition, it currently indirectly sets the `AutoPostBack`, `AttributeKey`, and `AttributeValue`. By deriving directly from it, not only do we reduce redundancy, but we provide more flexibility for cases where this is being used for general topic references, and not the `BaseTopic` specifically. E.g., we allow topic references to toggle `AutoPostBack` or set alternate attribute filters. This begins to address the needs of #27. --- ...icReferenceAttributeDescriptorViewModel.cs | 37 ++++--------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs index 6de27321..462a8309 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs +++ b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs @@ -3,10 +3,7 @@ | Client Ignia, LLC | Project Topics Library \=============================================================================================================================*/ -using System.Diagnostics.CodeAnalysis; -using OnTopic.Editor.AspNetCore.Models; -using OnTopic.Editor.AspNetCore.Models.Metadata; -using OnTopic.Mapping.Annotations; +using OnTopic.Editor.AspNetCore.Attributes.TokenizedTopicListAttribute; using OnTopic.Metadata; namespace OnTopic.Editor.AspNetCore.Attributes.TopicReferenceAttribute { @@ -17,7 +14,7 @@ namespace OnTopic.Editor.AspNetCore.Attributes.TopicReferenceAttribute { /// /// Provides access to attributes associated with the . /// - public record TopicReferenceAttributeDescriptorViewModel: AttributeDescriptorViewModel { + public record TopicReferenceAttributeDescriptorViewModel: TokenizedTopicListAttributeDescriptorViewModel { /*========================================================================================================================== | CONSTRUCTOR @@ -25,32 +22,14 @@ public record TopicReferenceAttributeDescriptorViewModel: AttributeDescriptorVie /// /// Initializes a new instance of a /// - public TopicReferenceAttributeDescriptorViewModel() { - StyleSheets.Register(GetNamespacedUri("/Shared/Styles/token-input.min.css")); - StyleSheets.Register(GetNamespacedUri("/Shared/Styles/token-input-facebook.min.css")); - Scripts.Register(GetNamespacedUri("/Shared/Scripts/jquery-tokeninput.min.js")); - Scripts.Register(GetNamespacedUri("/Shared/Scripts/TokenizedTopicList.js")); - } + public TopicReferenceAttributeDescriptorViewModel(): base() { - /*========================================================================================================================== - | PROPERTY: ROOT TOPIC - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Gets or sets a representing the scope of s to display to the user. This - /// allows relationships to be targeted to particular areas of the topic graph. - /// - [AttributeKey("RootTopicId")] - [NotNull] - [MapAs(typeof(CoreTopicViewModel))] - public CoreTopicViewModel? RootTopic { get; init; } + /*------------------------------------------------------------------------------------------------------------------------ + | Restrict token limit + \-----------------------------------------------------------------------------------------------------------------------*/ + TokenLimit = 1; - /*========================================================================================================================== - | RESULT LIMIT - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Gets or sets the maximum number of results to pull from the web service. - /// - public int? ResultLimit { get; init; } = 100; + } /*========================================================================================================================== | TARGET CONTENT TYPE From 7bba5f699335a4bbe49c5e5808c78183e42179ac Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 14:30:07 -0700 Subject: [PATCH 090/137] Customize view model in `TopicReferenceViewComponent` Now that the `TopicReferenceAttributeDescriptorViewModel` derives from the `TokenizedTopicListAttributeDescriptorViewModel`, we can just set the properties we want to customize directly on the `TopicReferenceAttributeDescriptorViewModel` and then relay that to the underlying `TokenizedTopicListViewComponent`. This has a few benefits. First, it's cleaner. Second, it eliminates the need to define interstitial properties on the `TopicReferenceAttributeDescriptorViewModel` exclusively for configuring the `TokenizedTopicListViewComponent`. Third, it makes the logic clearer in the view component itself. As part of this, I limit the customizations to attributes named `BaseTopic`. This isn't ideal. But it maintains backward compatibility with OnTopic 5.0.0, which used the `ReferenceTopicAttribute` exclusively for `BaseTopic`, without introducing the need to add new attributes in order to maintain backward compatibility. We may further abstract this by introducing a special attribute later, but as requiring this would be a breaking change, this hard-coded value won't be removed until OnTopic 6.0.0. --- .../TopicReferenceViewComponent.cs | 7 +++++-- .../Components/TopicReference/Default.cshtml | 18 +----------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceViewComponent.cs b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceViewComponent.cs index 002001cf..1028a61a 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceViewComponent.cs +++ b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceViewComponent.cs @@ -53,9 +53,12 @@ string htmlFieldPrefix /*------------------------------------------------------------------------------------------------------------------------ | Set configuration values \-----------------------------------------------------------------------------------------------------------------------*/ - if (String.IsNullOrWhiteSpace(attribute.TargetContentType)) { + //### TODO 6.0.0: Remove hard-coded reference to BaseTopic; this is only needed for backward compatibility with 5.0.0. + if (attribute.Key.Equals("BaseTopic", StringComparison.OrdinalIgnoreCase)) { attribute = attribute with { - TargetContentType = currentTopic.ContentType + AttributeKey = "ContentType", + AttributeValue = currentTopic.ContentType, + AutoPostBack = true }; } diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/TopicReference/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/TopicReference/Default.cshtml index fab6c762..dbf95be1 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/TopicReference/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/TopicReference/Default.cshtml @@ -1,24 +1,8 @@ @using OnTopic.Editor.AspNetCore.Attributes.TopicReferenceAttribute -@using OnTopic.Editor.AspNetCore.Attributes.TokenizedTopicListAttribute @model AttributeViewModel -@{ - var attributeDescriptor = new TokenizedTopicListAttributeDescriptorViewModel() { - Key = Model.AttributeDescriptor.Key, - ContentType = "TokenizedTopicListAttribute", - Description = Model.AttributeDescriptor.Description, - Title = Model.AttributeDescriptor.Title, - RootTopic = Model.AttributeDescriptor.RootTopic, - AttributeKey = String.IsNullOrEmpty(Model.AttributeDescriptor.TargetContentType)? "": "ContentType", - AttributeValue = Model.AttributeDescriptor.TargetContentType, - ResultLimit = Model.AttributeDescriptor.ResultLimit, - TokenLimit = 1, - AutoPostBack = true - }; -} - \ No newline at end of file From 798ff704ed15fd37db991e812b46cf06247176da Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 14:32:23 -0700 Subject: [PATCH 091/137] Remove unnecessary `TargetContentType` pass-through The `TargetContentType` pass through was set by `TopicReferenceViewComponent`, relayed to the view via the `TopicReferenceAttributeDescriptorViewModel`, then set on the `TokenizedTopicListAttributeDescriptorViewModel`. As we've now streamlined that process (7bba5f6), this is no longer necessary. --- .../TopicReferenceAttributeDescriptorViewModel.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs index 462a8309..e6dec6e2 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs +++ b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs @@ -31,13 +31,5 @@ public TopicReferenceAttributeDescriptorViewModel(): base() { } - /*========================================================================================================================== - | TARGET CONTENT TYPE - \-------------------------------------------------------------------------------------------------------------------------*/ - /// - /// Gets or sets the of the to filter results by. - /// - public string? TargetContentType { get; init; } - } //Class } //Namespace \ No newline at end of file From 7bdedac6fbe588a7c3a2d09b4c3c76d7eddeee78 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 14:43:34 -0700 Subject: [PATCH 092/137] Introduced support for `UseCurrentContentType` The `UseCurrentContentType` is intended to abstract the behavior required by `BaseTopic`, where results should be filtered by the current content type. In the future, we'll remove the hard-coded check for `BaseTopic` and rely exclusively on `UseCurrentContentType`. For OnTopic 5.x, however, the `BaseTopic` reference is needed for backward compatibility, since the original OnTopic 5.0.0 release didn't expect `UseCurrentContentType` (7bba5f6). This satisfies the expectations of #27. --- .../TopicReferenceAttributeDescriptorViewModel.cs | 13 +++++++++++++ .../TopicReferenceViewComponent.cs | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs index e6dec6e2..29ff94ea 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs +++ b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceAttributeDescriptorViewModel.cs @@ -31,5 +31,18 @@ public TopicReferenceAttributeDescriptorViewModel(): base() { } + /*========================================================================================================================== + | USE CURRENT CONTENT TYPE + \-------------------------------------------------------------------------------------------------------------------------*/ + /// + /// Specifies that the underlying should be filtered by the on the current . + /// + /// + /// This is useful for scenarios where the topic reference must target the same as the + /// current , as is the case on . + /// + public bool UseCurrentContentType { get; init; } + } //Class } //Namespace \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceViewComponent.cs b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceViewComponent.cs index 1028a61a..42368501 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceViewComponent.cs +++ b/OnTopic.Editor.AspNetCore.Attributes/TopicReferenceAttribute/TopicReferenceViewComponent.cs @@ -54,11 +54,12 @@ string htmlFieldPrefix | Set configuration values \-----------------------------------------------------------------------------------------------------------------------*/ //### TODO 6.0.0: Remove hard-coded reference to BaseTopic; this is only needed for backward compatibility with 5.0.0. - if (attribute.Key.Equals("BaseTopic", StringComparison.OrdinalIgnoreCase)) { + var isBaseTopic = attribute.Key.Equals("BaseTopic", StringComparison.OrdinalIgnoreCase); + if (attribute.UseCurrentContentType || isBaseTopic) { attribute = attribute with { AttributeKey = "ContentType", AttributeValue = currentTopic.ContentType, - AutoPostBack = true + AutoPostBack = isBaseTopic? true : attribute.AutoPostBack }; } From 6af63f717532670a21efff25cc7eafc457bbb680 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 14:55:53 -0700 Subject: [PATCH 093/137] Updated CSS style for error validation to expect buttons In a previous commit, we updated the markup for the tabs to use buttons instead of anchor links, in order to remain consistent with Bootstrap's reference examples in their documentation (258d0b1). This broke the CSS, which was expecting an anchor link. --- OnTopic.Editor.AspNetCore/Shared/Styles/Base/_forms.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OnTopic.Editor.AspNetCore/Shared/Styles/Base/_forms.scss b/OnTopic.Editor.AspNetCore/Shared/Styles/Base/_forms.scss index a1e3df02..7cb2c642 100644 --- a/OnTopic.Editor.AspNetCore/Shared/Styles/Base/_forms.scss +++ b/OnTopic.Editor.AspNetCore/Shared/Styles/Base/_forms.scss @@ -161,7 +161,7 @@ span.radio { //---------------------------------------------------------------------------------------------- //Tabs -a.nav-link.error { +button.nav-link.error { border-bottom-color : $red !important; small.required { color : $red; From 4d1b5f76e385bf9dec2ea2402c312f7fade62ae0 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 14:57:13 -0700 Subject: [PATCH 094/137] Updated JavaScript to target buttons for error validation In a previous commit, we updated the markup for the tabs to use buttons instead of anchor links, in order to remain consistent with Bootstrap's reference examples in their documentation (258d0b1). This broke the JavaScript selectors for highlighting tabs with errors on them, since it was expecting an anchor link. --- .../Areas/Editor/Views/Editor/Edit.cshtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Edit.cshtml b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Edit.cshtml index e503f841..864ce691 100644 --- a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Edit.cshtml +++ b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Edit.cshtml @@ -121,11 +121,11 @@ ignore: [], invalidHandler: function () { setTimeout(function () { - $('.nav-tabs a small.required').remove(); - $('.nav-tabs a.error').removeClass("error"); + $('.nav-tabs button small.required').remove(); + $('.nav-tabs button.error').removeClass("error"); $('.tab-content.tab-validate .tab-pane:has(input.error, textarea.error, select.error)').each(function () { var id = $(this).attr('id'); - $('.nav-tabs').find('a[href^="#' + id + '"]').addClass("error").append(' *'); + $('.nav-tabs').find('button[data-bs-target^="#' + id + '"]').addClass("error").append(' *'); }); }); } From 1d151fc822f8f2aa132930954aadd9ee5e7bee27 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 14:58:11 -0700 Subject: [PATCH 095/137] Namespaced `data-*` attributes for tooltip component (cont.) In Bootstrap 5.0.0, the data attributes have been namespaced, so `data-toggle` is now `data-bs-toggle`. This doesn't fully resolve the issue with the tooltips; this will also require updates to the JavaScript, which will happen in a subsequent commit. This picks up a case that was overlooked by 0678d7a. --- .../Areas/Editor/Views/Editor/Components/_Layout.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Components/_Layout.cshtml b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Components/_Layout.cshtml index 157ef794..870ca542 100644 --- a/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Components/_Layout.cshtml +++ b/OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Components/_Layout.cshtml @@ -5,7 +5,7 @@
    - +
    From 71c794f5c394e6a439e409093015b8276ba968c1 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 14:59:49 -0700 Subject: [PATCH 096/137] Consolidated scripts for initializing Bootstrap tooltips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a previous commit, I established a new script for initializing the Bootstrap tooltips (9b5ea80)—while overlooking that we already had one in place. Whoops! This consolidates this code into `UserInterface.js` (where it makes more sense anyway) and merges it with the previous configuration that it was using. --- OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js | 8 -------- .../Shared/Scripts/UserInterface.js | 11 +++++++---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js b/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js index 4e060160..24cacddd 100644 --- a/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js +++ b/OnTopic.Editor.AspNetCore/Shared/Scripts/Layout.js @@ -59,12 +59,4 @@ $(function () { $('#DisplayGroupTabsContent').css('min-height', $windowHeight-$formAreaOffset.top + 'px'); } - /*---------------------------------------------------------------------------------------------------------------------------- - | Initialize tooltips - \---------------------------------------------------------------------------------------------------------------------------*/ - var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); - tooltipTriggerList.map(function (tooltipTriggerEl) { - return new bootstrap.Tooltip(tooltipTriggerEl); - }); - }); \ No newline at end of file diff --git a/OnTopic.Editor.AspNetCore/Shared/Scripts/UserInterface.js b/OnTopic.Editor.AspNetCore/Shared/Scripts/UserInterface.js index 88bed882..396f555a 100644 --- a/OnTopic.Editor.AspNetCore/Shared/Scripts/UserInterface.js +++ b/OnTopic.Editor.AspNetCore/Shared/Scripts/UserInterface.js @@ -93,10 +93,13 @@ function confirmDelete(title) { /*---------------------------------------------------------------------------------------------------------------------------- | Tooltip: Attribute Descriptions \---------------------------------------------------------------------------------------------------------------------------*/ - $('.Content-Description').tooltip({ - placement : 'right', - //delay : { 'show': 25, 'hide': 100 }, - viewport : '#DisplayGroupTabsContent' + var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); + tooltipTriggerList.map(function (tooltipTriggerEl) { + return new bootstrap.Tooltip(tooltipTriggerEl, { + placement : 'right', + //delay : { 'show': 25, 'hide': 100 }, + viewport : '#DisplayGroupTabsContent' + }); }); /*---------------------------------------------------------------------------------------------------------------------------- From 4bbf8f7d7ef26c347d6e43030beda32fee17bc44 Mon Sep 17 00:00:00 2001 From: JeremyCaney Date: Fri, 2 Apr 2021 16:51:10 -0700 Subject: [PATCH 097/137] Bug Fix: Ensure modal options are recognized For some reason, the Bootstrap modal options aren't being recognized from their `data-bs-*` attributes. It's unclear why. For now, I'm reiterating these in the `Modal()` constructor's configuration parameter to ensure they're recognized. --- .../Views/Editor/Components/NestedTopicList/Default.cshtml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/NestedTopicList/Default.cshtml b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/NestedTopicList/Default.cshtml index 9315ccc2..6419ab2f 100644 --- a/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/NestedTopicList/Default.cshtml +++ b/OnTopic.Editor.AspNetCore.Attributes/Views/Editor/Components/NestedTopicList/Default.cshtml @@ -75,7 +75,10 @@