Skip to content

Commit

Permalink
Merge pull request #428 from Badgerati/develop
Browse files Browse the repository at this point in the history
v0.8.3
  • Loading branch information
Badgerati authored Feb 28, 2023
2 parents a1d69b2 + 07c1ea9 commit 2b973a9
Show file tree
Hide file tree
Showing 20 changed files with 68 additions and 33 deletions.
13 changes: 9 additions & 4 deletions .build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ $src_path = './pode_modules'
#>

$Versions = @{
MkDocs = '1.2.3'
MkDocsTheme = '8.1.2'
PlatyPS = '0.14.0'
MkDocs = '1.4.2'
MkDocsTheme = '9.0.2'
PlatyPS = '0.14.2'
}

<#
Expand Down Expand Up @@ -152,7 +152,7 @@ task MoveLibs {

# chart.js
New-Item -Path "$($libs_path)/chartjs" -ItemType Directory -Force | Out-Null
Copy-Item -Path "$($src_path)/chart.js/dist/chart.min.js" -Destination "$($libs_path)/chartjs/" -Force
Copy-Item -Path "$($src_path)/chart.js/dist/chart.umd.js*" -Destination "$($libs_path)/chartjs/" -Force

# mdi fonts - icons
New-Item -Path "$($libs_path)/mdi-font/css" -ItemType Directory -Force | Out-Null
Expand Down Expand Up @@ -257,17 +257,22 @@ task MoveLibs {
Copy-Item -Path "$($src_path)/monaco-editor/min/vs/language/$($_)/*.*" -Destination "$($libs_path)/vs/language/$($_)/" -Force
}

New-Item -Path "$($libs_path)/vs/base/common/worker" -ItemType Directory -Force | Out-Null
Copy-Item -Path "$($src_path)/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.js" -Destination "$($libs_path)/vs/base/common/worker/" -Force

$vs_maps_path = "$($dest_path)/min-maps/vs"
if (Test-Path $vs_maps_path) {
Remove-Item -Path $vs_maps_path -Recurse -Force | Out-Null
}

New-Item -Path "$($vs_maps_path)/editor" -ItemType Directory -Force | Out-Null
New-Item -Path "$($vs_maps_path)/base/worker" -ItemType Directory -Force | Out-Null
New-Item -Path "$($vs_maps_path)/base/common/worker" -ItemType Directory -Force | Out-Null

Copy-Item -Path "$($src_path)/monaco-editor/min-maps/vs/loader.js.map" -Destination $vs_maps_path -Force
Copy-Item -Path "$($src_path)/monaco-editor/min-maps/vs/editor/*.*" -Destination "$($vs_maps_path)/editor/" -Force
Copy-Item -Path "$($src_path)/monaco-editor/min-maps/vs/base/worker/*.*" -Destination "$($vs_maps_path)/base/worker/" -Force
Copy-Item -Path "$($src_path)/monaco-editor/min-maps/vs/base/common/worker/simpleWorker.nls.js*" -Destination "$($vs_maps_path)/base/common/worker/" -Force
}


Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ docs/[Ff]unctions/
examples/state.json
examples/docs.ps1
examples/issue-*
examples/issues/
pkg/
yarn.lock
min-maps/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM badgerati/pode:2.7.2
FROM badgerati/pode:2.8.0
LABEL maintainer="Matthew Kelly (Badgerati)"
RUN mkdir -p /usr/local/share/powershell/Modules/Pode.Web
COPY ./src/ /usr/local/share/powershell/Modules/Pode.Web
2 changes: 1 addition & 1 deletion alpine.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM badgerati/pode:2.7.2-alpine
FROM badgerati/pode:2.8.0-alpine
LABEL maintainer="Matthew Kelly (Badgerati)"
RUN mkdir -p /usr/local/share/powershell/Modules/Pode.Web
COPY ./src/ /usr/local/share/powershell/Modules/Pode.Web
2 changes: 1 addition & 1 deletion arm32.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM badgerati/pode:2.7.2-arm32
FROM badgerati/pode:2.8.0-arm32
LABEL maintainer="Matthew Kelly (Badgerati)"
RUN mkdir -p /usr/local/share/powershell/Modules/Pode.Web
COPY ./src/ /usr/local/share/powershell/Modules/Pode.Web
2 changes: 1 addition & 1 deletion docs/Getting-Started/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Install-Module -Name Pode.Web
[![Docker](https://img.shields.io/docker/stars/badgerati/pode.web.svg?label=Stars)](https://hub.docker.com/r/badgerati/pode.web/)
[![Docker](https://img.shields.io/docker/pulls/badgerati/pode.web.svg?label=Pulls)](https://hub.docker.com/r/badgerati/pode.web/)

Like Pode, Pode.Web also has Docker images available. The images use Pode v2.7.2 on either an Ubuntu Focal image (default), an Alpine image, or an ARM32 image (for Raspberry Pis).
Like Pode, Pode.Web also has Docker images available. The images use Pode v2.8.0 on either an Ubuntu Focal image (default), an Alpine image, or an ARM32 image (for Raspberry Pis).

* To pull down the latest Pode.Web image you can do:

Expand Down
4 changes: 2 additions & 2 deletions docs/Hosting/Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pode.Web has a Docker image that you can use to host your server, for instructions on pulling these images you can [look here](../../Getting-Started/Installation).

The images use Pode v2.7.2 on either an Ubuntu Focal (default), Alpine, or ARM32 image.
The images use Pode v2.8.0 on either an Ubuntu Focal (default), Alpine, or ARM32 image.

## Images

Expand All @@ -11,7 +11,7 @@ The images use Pode v2.7.2 on either an Ubuntu Focal (default), Alpine, or ARM32

### Default

The default Pode.Web image is an Ubuntu Focal image with Pode v2.7.2 and Pode.Web installed. An example of using this image in your Dockerfile could be as follows:
The default Pode.Web image is an Ubuntu Focal image with Pode v2.8.0 and Pode.Web installed. An example of using this image in your Dockerfile could be as follows:

```dockerfile
# pull down the pode image
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/ClassAndStyles.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Then you could create some `/public/my-styles.css` file with the following, to s

and import it via: `Import-PodeWebStylesheet -Url '/my-styles.css'`.

or, you can create some JavaScript file at `/public/my-scritps.js` with an event to write to console on keyup. jQuery works here, as Pode.Web uses jQuery. Also, we have to reference the class then the input control, as the class is at the paraent level of the textbox element; this allows for more fine grained control of a component as a whole - such as a textbox's labels, divs, spans, etc.
or, you can create some JavaScript file at `/public/my-scripts.js` with an event to write to console on keyup. jQuery works here, as Pode.Web uses jQuery. Also, we have to reference the class then the input control, as the class is at the paraent level of the textbox element; this allows for more fine grained control of a component as a whole - such as a textbox's labels, divs, spans, etc.

```js
$('.my-custom-textbox input').off('keyup').on('keyup', (e) => {
Expand Down
4 changes: 2 additions & 2 deletions docs/Tutorials/Elements/Icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ The icon element will render a [Material Design Icon](https://materialdesignicon
```powershell
New-PodeWebCard -Content @(
New-PodeWebText -Value 'Here is an icon: '
New-PodeWebIcon -Name 'alert-triange' -Colour 'yellow'
New-PodeWebIcon -Name 'alert' -Colour 'yellow'
New-PodeWebText -Value ', and look another one!: '
New-PodeWebIcon -Name 'smile' -Colour '#00CC00'
New-PodeWebIcon -Name 'emoticon-happy' -Colour '#00CC00'
)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Outputs/Accordion.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This page details the output actions available to control an Accordion layout.
You can change the current active accordion bellow by using [`Move-PodeWebAccordion`](../../../Functions/Outputs/Move-PodeWebAccordion). This will make the specified bellow become the active one, and collapse the others.

```powershell
New-PodeWebAccordion -Items @(
New-PodeWebAccordion -Bellows @(
New-PodeWebBellow -Name 'Item 1' -Content @(
New-PodeWebButton -Name 'Next' -Id 'next_1' -ScriptBlock {
Move-PodeWebAccordion -Name 'Item 2'
Expand Down
25 changes: 25 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Release Notes

## v0.8.3

```plain
### Bugs
* #380: Fixes a bug where you couldn't hit the enter key in multiline textboxes in a modal
* #384: Fixes a double encoding issue which rendered Page names incorrectly (thanks @ili101!)
* #392: Fixes `New-PodeWebTextbox` with `-NoForm` to we can create wider textboxes (thanks @ili101!)
* #413: Fixes `Update-PodeWebTextbox` to work with Date types
* #423: Fixes line charts back to being curved lines and filled areas
* #430: Temporary fix for showing the back button pages when there is no query string
### Packaging
* #378: Bumps highlightjs to 11.7.0
* #383: Bumps material design icons to 7.1.96
* #388: Bumps jquery to 3.6.3
* #414: Bumps chart.js to 4.2.1
* #418: Bumps Pode in Dockerfiles to 2.8.0
* #419: Bumps mkdocs and material theme
* #420: Bumps monaco to 0.36.0
### Documentation
* #397: Fixes a typo in the Class and Styles docs (thanks @fatherofinvention!)
* #402: Fixes a typo in the Accordion docs (thanks @fatherofinvention!)
```

## v0.8.2

```plain
Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ theme:
- navigation.tabs.sticky
- navigation.tracking
- navigation.top
- content.copy.code
- content.action.edit
font:
text: Fira Sans
code: Fira Code
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"author": "Matthew Kelly <[email protected]>",
"license": "MIT",
"dependencies": {
"jquery": "3.6.1",
"jquery": "3.6.3",
"jquery-ui-dist": "1.13.2",
"popper.js": "1.16.1",
"bootstrap": "4.6.1",
"bs-stepper": "1.7.0",
"@mdi/font": "7.0.96",
"chart.js": "3.9.1",
"@highlightjs/cdn-assets": "11.6.0",
"monaco-editor": "0.34.1",
"@mdi/font": "7.1.96",
"chart.js": "4.2.1",
"@highlightjs/cdn-assets": "11.7.0",
"monaco-editor": "0.36.0",
"moment": "2.29.4"
}
}
2 changes: 1 addition & 1 deletion src/Pode.Web.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'Pode.Web.psm1'

# Version number of this module.
ModuleVersion = '0.8.2'
ModuleVersion = '0.8.3'

# ID used to uniquely identify this module
GUID = '5c6cae5a-8e62-48a4-c2e5-7511ffe2d439'
Expand Down
4 changes: 2 additions & 2 deletions src/Public/Outputs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ function Out-PodeWebTextbox

end {
if (!$AsJson) {
$items = ($items | Out-String)
$items = ($items | Out-String -NoNewline)
}

if ($Size -le 0) {
Expand Down Expand Up @@ -585,7 +585,7 @@ function Update-PodeWebTextbox

end {
if (!$AsJson) {
$items = ($items | Out-String)
$items = ($items | Out-String -NoNewline)
}

return @{
Expand Down
3 changes: 3 additions & 0 deletions src/Public/Pages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ function Add-PodeWebPage

if (!$global:PageData.NoBackArrow) {
$global:PageData.ShowBack = (($null -ne $WebEvent.Query) -and ($WebEvent.Query.Count -gt 0))
if ($global:PageData.ShowBack -and ($WebEvent.Query.Count -eq 1) -and ($WebEvent.Query.ContainsKey(''))) {
$global:PageData.ShowBack = $false
}
}
else {
$global:PageData.ShowBack = $false
Expand Down
10 changes: 6 additions & 4 deletions src/Templates/Public/scripts/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ function bindFormSubmits() {
// show the spinner
showSpinner(form);
$('.alert').remove();

// remove validation errors
removeValidationErrors(form);
});
Expand All @@ -1599,7 +1599,7 @@ function bindFormResets() {

function bindModalSubmits() {
$("div.modal-content form.pode-form").off('keypress').on('keypress', function(e) {
if (!isEnterKey(e)) {
if (!isEnterKey(e) || testTagName(e.target, 'textarea')) {
return;
}

Expand Down Expand Up @@ -2863,7 +2863,7 @@ function updateButton(action) {
setTitle(btn, action.DisplayName);
}
else {
btn.find('span.pode-text').text(action.DisplayName);
btn.find('span.pode-text').text(decodeHTML(action.DisplayName));
}
}

Expand Down Expand Up @@ -3019,7 +3019,7 @@ function actionValidation(action, sender) {
}

var validationId = `div#${$(input).attr('id')}_validation`;
$(validationId).text(action.Message);
$(validationId).text(decodeHTML(action.Message));

setValidationError(input);
}
Expand Down Expand Up @@ -3658,6 +3658,8 @@ function createTheChart(canvas, action, sender) {
yAxises[key].backgroundColor = palette[index % palette.length].replace('1.0)', '0.2)');
yAxises[key].borderColor = palette[index % palette.length];
yAxises[key].borderWidth = 3;
yAxises[key].fill = true;
yAxises[key].tension = 0.4;
axesOpts.x = getChartAxesColours(theme, canvas, 'x');
axesOpts.y = getChartAxesColours(theme, canvas, 'y');
break;
Expand Down
7 changes: 2 additions & 5 deletions src/Templates/Views/elements/textbox.pode
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
$(
$controlDivClass = 'form-group row'
if ($data.DynamicLabel) {
if ($data.NoForm -or $data.DynamicLabel) {
$controlDivClass = [string]::Empty
}
if ($data.NoForm) {
$controlDivClass = 'no-form'
}

"<div class='$($controlDivClass) pode-form-textbox $($data.CssClasses)'>"
)

$(if (!$data.NoForm -and !$data.DynamicLabel) {
"<label for='$($data.ID)' class='col-sm-2 col-form-label'>$($data.DisplayName)</label>"
})
<div class="$(if (!$data.DynamicLabel) { 'col-sm-10' })">
<div class="$(if (!$data.NoForm -and !$data.DynamicLabel) { 'col-sm-10' })">
$(
$element = [string]::Empty

Expand Down
2 changes: 1 addition & 1 deletion src/Templates/Views/index.pode
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<a class='nav-link $($activePage)' name='$($page.Name)' pode-page-group='$($pageGroup.Name)' pode-page-type='$($page.ObjectType)' pode-dynamic='$($page.IsDynamic)' $($href)>
<div>
<span class='mdi mdi-$($page.Icon.ToLowerInvariant()) mdi-size-22 mRight02'></span>
$([System.Net.WebUtility]::HtmlEncode($page.DisplayName))
$($page.DisplayName)
</div>
</a>
</li>"
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/Views/shared/scripts.pode
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script src="$($data.AppPath)/pode.web/libs/bootstrap/bootstrap.bundle.min.js"></script>
<script src="$($data.AppPath)/pode.web/libs/bs-stepper/bs-stepper.min.js"></script>
<script src="$($data.AppPath)/pode.web/libs/moment/moment.min.js"></script>
<script src="$($data.AppPath)/pode.web/libs/chartjs/chart.min.js"></script>
<script src="$($data.AppPath)/pode.web/libs/chartjs/chart.umd.js"></script>
<script src="$($data.AppPath)/pode.web/libs/highlightjs/highlight.min.js"></script>
<script src="$($data.AppPath)/pode.web/libs/monaco/loader.js" role='monaco'></script>

Expand Down

0 comments on commit 2b973a9

Please sign in to comment.