Skip to content

Commit dd876b8

Browse files
Merge pull request dnnsoftware#6293 from valadas/bulk-install-rebase
Rebased bulk-install branch with latest changes from release/10.0.0
2 parents 98c5406 + c31fd69 commit dd876b8

File tree

95 files changed

+2819
-1623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2819
-1623
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Update Browserslist database
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 1,15 * *'
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
update-browserslist-database:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Configure git
20+
run: |
21+
# Setup for commiting using built-in token. See https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
22+
git config user.name "github-actions[bot]"
23+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
24+
- name: Update Browserslist database and create PR if applies
25+
uses: c2corg/browserslist-update-action@v2
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
branch: browserslist-update
29+
base_branch: develop
30+
labels: 'javascript, Type: Maintenance'

DNN Platform/DotNetNuke.Abstractions/Portals/IPortalStyles.cs

Lines changed: 77 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,205 +9,231 @@ namespace DotNetNuke.Abstractions.Portals
99
/// </summary>
1010
public interface IPortalStyles
1111
{
12+
/// <summary>
13+
/// Gets or sets a value indicating whether the site admins can edit the styles.
14+
/// </summary>
15+
bool AllowAdminEdits { get; set; }
16+
1217
/// <summary>
1318
/// Gets or sets the main shade of the primary color.
1419
/// </summary>
15-
StyleColor ColorPrimary { get; set; }
20+
string ColorPrimary { get; set; }
1621

1722
/// <summary>
1823
/// Gets or sets the light shade of the primary color.
1924
/// </summary>
20-
StyleColor ColorPrimaryLight { get; set; }
25+
string ColorPrimaryLight { get; set; }
2126

2227
/// <summary>
2328
/// Gets or sets the dark shade of the primary color.
2429
/// </summary>
25-
StyleColor ColorPrimaryDark { get; set; }
30+
string ColorPrimaryDark { get; set; }
2631

2732
/// <summary>
2833
/// Gets or sets a color that contrasts well over the primary color shades.
2934
/// </summary>
30-
StyleColor ColorPrimaryContrast { get; set; }
35+
string ColorPrimaryContrast { get; set; }
3136

3237
/// <summary>
3338
/// Gets or sets the main shade of the secondary color.
3439
/// </summary>
35-
StyleColor ColorSecondary { get; set; }
40+
string ColorSecondary { get; set; }
3641

3742
/// <summary>
3843
/// Gets or sets the light shade of the secondary color.
3944
/// </summary>
40-
StyleColor ColorSecondaryLight { get; set; }
45+
string ColorSecondaryLight { get; set; }
4146

4247
/// <summary>
4348
/// Gets or sets the dark shade of the secondary color.
4449
/// </summary>
45-
StyleColor ColorSecondaryDark { get; set; }
50+
string ColorSecondaryDark { get; set; }
4651

4752
/// <summary>
4853
/// Gets or sets a color that contrasts well over the secondary color shades.
4954
/// </summary>
50-
StyleColor ColorSecondaryContrast { get; set; }
55+
string ColorSecondaryContrast { get; set; }
5156

5257
/// <summary>
5358
/// Gets or sets the main shade of the Tertiary color.
5459
/// </summary>
55-
StyleColor ColorTertiary { get; set; }
60+
string ColorTertiary { get; set; }
5661

5762
/// <summary>
5863
/// Gets or sets the light shade of the Tertiary color.
5964
/// </summary>
60-
StyleColor ColorTertiaryLight { get; set; }
65+
string ColorTertiaryLight { get; set; }
6166

6267
/// <summary>
6368
/// Gets or sets the dark shade of the Tertiary color.
6469
/// </summary>
65-
StyleColor ColorTertiaryDark { get; set; }
70+
string ColorTertiaryDark { get; set; }
6671

6772
/// <summary>
6873
/// Gets or sets a color that contrasts well over the Tertiary color shades.
6974
/// </summary>
70-
StyleColor ColorTertiaryContrast { get; set; }
75+
string ColorTertiaryContrast { get; set; }
7176

7277
/// <summary>
7378
/// Gets or sets the main shade of the Neutral color.
7479
/// </summary>
75-
StyleColor ColorNeutral { get; set; }
80+
string ColorNeutral { get; set; }
7681

7782
/// <summary>
7883
/// Gets or sets the light shade of the Neutral color.
7984
/// </summary>
80-
StyleColor ColorNeutralLight { get; set; }
85+
string ColorNeutralLight { get; set; }
8186

8287
/// <summary>
8388
/// Gets or sets the dark shade of the Neutral color.
8489
/// </summary>
85-
StyleColor ColorNeutralDark { get; set; }
90+
string ColorNeutralDark { get; set; }
8691

8792
/// <summary>
8893
/// Gets or sets a color that contrasts well over the Neutral color shades.
8994
/// </summary>
90-
StyleColor ColorNeutralContrast { get; set; }
95+
string ColorNeutralContrast { get; set; }
9196

9297
/// <summary>
9398
/// Gets or sets the main shade of the Background color.
9499
/// </summary>
95-
StyleColor ColorBackground { get; set; }
100+
string ColorBackground { get; set; }
96101

97102
/// <summary>
98103
/// Gets or sets the light shade of the Background color.
99104
/// </summary>
100-
StyleColor ColorBackgroundLight { get; set; }
105+
string ColorBackgroundLight { get; set; }
101106

102107
/// <summary>
103108
/// Gets or sets the dark shade of the Background color.
104109
/// </summary>
105-
StyleColor ColorBackgroundDark { get; set; }
110+
string ColorBackgroundDark { get; set; }
106111

107112
/// <summary>
108113
/// Gets or sets a color that contrasts well over the Background color shades.
109114
/// </summary>
110-
StyleColor ColorBackgroundContrast { get; set; }
115+
string ColorBackgroundContrast { get; set; }
111116

112117
/// <summary>
113118
/// Gets or sets the main shade of the Foreground color.
114119
/// </summary>
115-
StyleColor ColorForeground { get; set; }
120+
string ColorForeground { get; set; }
116121

117122
/// <summary>
118123
/// Gets or sets the light shade of the Foreground color.
119124
/// </summary>
120-
StyleColor ColorForegroundLight { get; set; }
125+
string ColorForegroundLight { get; set; }
121126

122127
/// <summary>
123128
/// Gets or sets the dark shade of the Foreground color.
124129
/// </summary>
125-
StyleColor ColorForegroundDark { get; set; }
130+
string ColorForegroundDark { get; set; }
126131

127132
/// <summary>
128133
/// Gets or sets a color that contrasts well over the Foreground color shades.
129134
/// </summary>
130-
StyleColor ColorForegroundContrast { get; set; }
135+
string ColorForegroundContrast { get; set; }
131136

132137
/// <summary>
133138
/// Gets or sets the main shade of the Info color.
134139
/// </summary>
135-
StyleColor ColorInfo { get; set; }
140+
string ColorInfo { get; set; }
136141

137142
/// <summary>
138143
/// Gets or sets the light shade of the Info color.
139144
/// </summary>
140-
StyleColor ColorInfoLight { get; set; }
145+
string ColorInfoLight { get; set; }
141146

142147
/// <summary>
143148
/// Gets or sets the dark shade of the Info color.
144149
/// </summary>
145-
StyleColor ColorInfoDark { get; set; }
150+
string ColorInfoDark { get; set; }
146151

147152
/// <summary>
148153
/// Gets or sets a color that contrasts well over the Info color shades.
149154
/// </summary>
150-
StyleColor ColorInfoContrast { get; set; }
155+
string ColorInfoContrast { get; set; }
151156

152157
/// <summary>
153158
/// Gets or sets the main shade of the Success color.
154159
/// </summary>
155-
StyleColor ColorSuccess { get; set; }
160+
string ColorSuccess { get; set; }
156161

157162
/// <summary>
158163
/// Gets or sets the light shade of the Success color.
159164
/// </summary>
160-
StyleColor ColorSuccessLight { get; set; }
165+
string ColorSuccessLight { get; set; }
161166

162167
/// <summary>
163168
/// Gets or sets the dark shade of the Success color.
164169
/// </summary>
165-
StyleColor ColorSuccessDark { get; set; }
170+
string ColorSuccessDark { get; set; }
166171

167172
/// <summary>
168173
/// Gets or sets a color that contrasts well over the Success color shades.
169174
/// </summary>
170-
StyleColor ColorSuccessContrast { get; set; }
175+
string ColorSuccessContrast { get; set; }
171176

172177
/// <summary>
173178
/// Gets or sets the main shade of the Warning color.
174179
/// </summary>
175-
StyleColor ColorWarning { get; set; }
180+
string ColorWarning { get; set; }
176181

177182
/// <summary>
178183
/// Gets or sets the light shade of the Warning color.
179184
/// </summary>
180-
StyleColor ColorWarningLight { get; set; }
185+
string ColorWarningLight { get; set; }
181186

182187
/// <summary>
183188
/// Gets or sets the dark shade of the Warning color.
184189
/// </summary>
185-
StyleColor ColorWarningDark { get; set; }
190+
string ColorWarningDark { get; set; }
186191

187192
/// <summary>
188193
/// Gets or sets a color that contrasts well over the Warning color shades.
189194
/// </summary>
190-
StyleColor ColorWarningContrast { get; set; }
195+
string ColorWarningContrast { get; set; }
191196

192197
/// <summary>
193198
/// Gets or sets the main shade of the Danger color.
194199
/// </summary>
195-
StyleColor ColorDanger { get; set; }
200+
string ColorDanger { get; set; }
196201

197202
/// <summary>
198203
/// Gets or sets the light shade of the Danger color.
199204
/// </summary>
200-
StyleColor ColorDangerLight { get; set; }
205+
string ColorDangerLight { get; set; }
201206

202207
/// <summary>
203208
/// Gets or sets the dark shade of the Danger color.
204209
/// </summary>
205-
StyleColor ColorDangerDark { get; set; }
210+
string ColorDangerDark { get; set; }
206211

207212
/// <summary>
208213
/// Gets or sets a color that contrasts well over the Danger color shades.
209214
/// </summary>
210-
StyleColor ColorDangerContrast { get; set; }
215+
string ColorDangerContrast { get; set; }
216+
217+
/// <summary>
218+
/// Gets or sets the color of the surface.
219+
/// A surface is an area that is overlaid over the main background (menus, popovers, etc).
220+
/// </summary>
221+
string ColorSurface { get; set; }
222+
223+
/// <summary>
224+
/// Gets or sets the light variation of surface color.
225+
/// </summary>
226+
string ColorSurfaceLight { get; set; }
227+
228+
/// <summary>
229+
/// Gets or sets the dark variation of surface color.
230+
/// </summary>
231+
string ColorSurfaceDark { get; set; }
232+
233+
/// <summary>
234+
/// Gets or sets a color that contrasts well over the surface color.
235+
/// </summary>
236+
string ColorSurfaceContrast { get; set; }
211237

212238
/// <summary>
213239
/// Gets or sets the controls border radius in pixels.
@@ -223,5 +249,16 @@ public interface IPortalStyles
223249
/// Gets or sets the base font size in pixels.
224250
/// </summary>
225251
double BaseFontSize { get; set; }
252+
253+
/// <summary>
254+
/// Gets or sets the color variation opacity.
255+
/// This can be used to define how opaque a contrasting color should look over another.
256+
/// </summary>
257+
double VariationOpacity { get; set; }
258+
259+
/// <summary>
260+
/// Gets the name of the css file.
261+
/// </summary>
262+
string FileName { get; }
226263
}
227264
}

DNN Platform/DotNetNuke.Abstractions/Portals/StyleColor.cs

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public StyleColor(string hexValue)
3535
{
3636
AssertIsValidCssColor(hexValue);
3737

38-
this.HexValue = ExpandColor(hexValue);
38+
this.HexValue = hexValue;
3939
this.red = byte.Parse(this.HexValue.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
4040
this.green = byte.Parse(this.HexValue.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
4141
this.blue = byte.Parse(this.HexValue.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
@@ -88,45 +88,10 @@ public string HexValue
8888
set
8989
{
9090
AssertIsValidCssColor(value);
91-
this.hex = ExpandColor(value);
91+
this.hex = value;
9292
}
9393
}
9494

95-
/// <summary>
96-
/// Gets a minified hexadecimal value for the color.
97-
/// </summary>
98-
/// <example>If the color is 0088FF, it should return 08F.</example>
99-
public string MinifiedHex
100-
{
101-
get
102-
{
103-
if (
104-
this.hex[0] == this.hex[1] &&
105-
this.hex[2] == this.hex[3] &&
106-
this.hex[4] == this.hex[5])
107-
{
108-
return $"{this.hex[0]}{this.hex[2]}{this.hex[4]}";
109-
}
110-
111-
return this.hex;
112-
}
113-
}
114-
115-
private static string ExpandColor(string hexValue)
116-
{
117-
if (hexValue.Length == 6)
118-
{
119-
return hexValue.ToUpperInvariant();
120-
}
121-
122-
string value;
123-
var r = hexValue[0];
124-
var g = hexValue[1];
125-
var b = hexValue[2];
126-
value = string.Concat(r, r, g, g, b, b);
127-
return value.ToUpperInvariant();
128-
}
129-
13095
private static void AssertIsValidCssColor(string hexValue)
13196
{
13297
if (string.IsNullOrWhiteSpace(hexValue))

DNN Platform/Library/Common/Utilities/DataCache.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@ public class DataCache
7676
/// <summary> The portal styles cache key.</summary>
7777
public const string PortalStylesCacheKey = "Dnn_Css_Custom_Properties_{0}";
7878

79-
/// <summary> The portal styles cache priority.</summary>
80-
public const CacheItemPriority PortalStylesCachePriority = CacheItemPriority.High;
81-
82-
/// <summary>The portal styles cache time out.</summary>
83-
public const int PortalStylesCacheTimeOut = 20;
84-
8579
// Tab cache keys
8680
public const string TabCacheKey = "Tab_Tabs{0}";
8781
public const string TabSettingsCacheKey = "TabSettings{0}";

0 commit comments

Comments
 (0)