├── .github
└── workflows
│ ├── Universal.Apps.NetworkUtilities.yaml
│ ├── Universal.Security.ActiveDirectoryRoles.yaml
│ ├── active-directory.yaml
│ ├── bootstrap.yaml
│ ├── build.yaml
│ ├── calendar.yaml
│ ├── feather.yaml
│ ├── joyride.yaml
│ ├── loader.yaml
│ ├── materialdesign.yaml
│ ├── notifications.yaml
│ ├── powergui.yaml
│ ├── recharts.yaml
│ ├── tabler.yaml
│ ├── tinymce.yaml
│ ├── utilities.apps.yaml
│ └── windowsSysInfo.yaml
├── .gitignore
├── Apps
├── Universal.Apps.ActiveDirectory
│ ├── .universal
│ │ ├── dashboards.ps1
│ │ ├── roles.ps1
│ │ └── scripts.ps1
│ ├── README.md
│ ├── Reports
│ │ ├── Computers - Disabled.ps1
│ │ ├── Computers - Domain Controllers.ps1
│ │ ├── Computers - Inactive.ps1
│ │ ├── Users - Inactive Users.ps1
│ │ ├── Users - Locked Out.ps1
│ │ ├── Users - Never Logged On.ps1
│ │ ├── Users - Recently Created.ps1
│ │ ├── Users - Recently Deleted.ps1
│ │ ├── Users - Recently Modified.ps1
│ │ └── Users - Without Manager.ps1
│ ├── Universal.Apps.ActiveDirectory.psd1
│ ├── Universal.Apps.ActiveDirectory.psm1
│ ├── images
│ │ ├── reports-screenshot.png
│ │ └── screenshot.png
│ └── pages
│ │ ├── Create Group.ps1
│ │ ├── Create User.ps1
│ │ ├── Domain Controllers.ps1
│ │ ├── Group Membership.ps1
│ │ ├── Groups.ps1
│ │ ├── Home.ps1
│ │ ├── Inactive Users.ps1
│ │ ├── Object Info.ps1
│ │ ├── Object Search.ps1
│ │ ├── Reset Password.ps1
│ │ ├── Restore Deleted User.ps1
│ │ ├── Search Computers.ps1
│ │ └── Search Users.ps1
├── Universal.Apps.NetworkUtilities
│ ├── .universal
│ │ ├── dashboards.ps1
│ │ └── roles.ps1
│ ├── IPv4NetworkScan.ps1
│ ├── README.md
│ ├── Resources
│ │ └── oui.txt
│ ├── Universal.Apps.NetworkUtilities.psd1
│ ├── Universal.Apps.NetworkUtilities.psm1
│ ├── ping.png
│ ├── resolve.png
│ ├── scan.png
│ ├── speed.png
│ ├── speedtest.exe
│ └── traceroute.png
├── Universal.Apps.PowerGUI
│ ├── .universal
│ │ ├── dashboards.ps1
│ │ ├── environments.ps1
│ │ └── roles.ps1
│ ├── README.md
│ ├── Universal.Apps.PowerGUI.psd1
│ ├── Universal.Apps.PowerGUI.psm1
│ ├── powergui.jpg
│ └── screenshot.png
├── Universal.Apps.SelfService
│ ├── .universal
│ │ ├── dashboards.ps1
│ │ ├── publishedFolders.ps1
│ │ ├── roles.ps1
│ │ ├── scripts.ps1
│ │ └── tags.ps1
│ ├── Modules
│ │ └── SelfService
│ │ │ └── 1.0.0
│ │ │ ├── SelfService.psd1
│ │ │ └── SelfService.psm1
│ ├── Self-Service
│ │ ├── Active Directory
│ │ │ └── Reset Password.ps1
│ │ └── Hyper-V
│ │ │ └── Create Virtual Machine.ps1
│ ├── dashboards
│ │ └── Self-Service
│ │ │ ├── Self-Service.ps1
│ │ │ └── pages
│ │ │ ├── Dashboard.ps1
│ │ │ ├── History.ps1
│ │ │ ├── New Service.ps1
│ │ │ ├── Service Groups.ps1
│ │ │ ├── Service.ps1
│ │ │ ├── Services.ps1
│ │ │ ├── Settings.ps1
│ │ │ ├── Users.ps1
│ │ │ └── home.ps1
│ └── scripts
│ │ └── Assign to Group.ps1
└── Universal.Apps.WindowsSystemInformation
│ ├── .universal
│ ├── dashboards.ps1
│ └── roles.ps1
│ ├── README.md
│ ├── Universal.Apps.WindowsSystemInformation.psd1
│ ├── Universal.Apps.WindowsSystemInformation.psm1
│ └── images
│ ├── diskSpace.png
│ ├── eventLog.png
│ └── services.png
├── Components
├── AdaptiveCards
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.AdaptiveCards.psd1
│ ├── Universal.AdaptiveCards.psm1
│ ├── components
│ │ ├── component.jsx
│ │ └── index.js
│ ├── logo.png
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── Calendar
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Components.Calendar.psd1
│ ├── Universal.Components.Calendar.psm1
│ ├── component.build.ps1
│ ├── components
│ │ ├── component.jsx
│ │ └── index.js
│ ├── images
│ │ ├── basic.png
│ │ ├── customRender.png
│ │ ├── eventClick.png
│ │ ├── locale.png
│ │ └── onClick.png
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── Icons.Bootstrap
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Icons.Bootstrap.psd1
│ ├── Universal.Icons.Bootstrap.psm1
│ ├── components
│ │ ├── component.jsx
│ │ └── index.js
│ ├── logo.png
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── Icons.Feather
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Icons.Feather.psd1
│ ├── Universal.Icons.Feather.psm1
│ ├── components
│ │ ├── component.jsx
│ │ └── index.js
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── Icons.MaterialDesign
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Icons.MaterialDesign.psd1
│ ├── Universal.Icons.MaterialDesign.psm1
│ ├── components
│ │ ├── component.jsx
│ │ └── index.js
│ ├── logo.png
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── Icons.Tabler
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Icons.Tabler.psd1
│ ├── Universal.Icons.Tabler.psm1
│ ├── components
│ │ ├── component.jsx
│ │ └── index.js
│ ├── logo.svg
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── Joyride
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Components.Joyride.psd1
│ ├── Universal.Components.Joyride.psm1
│ ├── component.build.ps1
│ ├── components
│ │ ├── index.js
│ │ └── joyride.jsx
│ ├── package-lock.json
│ ├── package.json
│ ├── screenshot.png
│ └── webpack.config.js
├── Kbar
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Components.Kbar.psd1
│ ├── Universal.Components.Kbar.psm1
│ ├── component.build.ps1
│ ├── components
│ │ ├── component.jsx
│ │ └── index.js
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── Loader
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Components.Loader.psd1
│ ├── Universal.Components.Loader.psm1
│ ├── component.build.ps1
│ ├── components
│ │ ├── component.jsx
│ │ └── index.js
│ ├── loaders.gif
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── Recharts
│ ├── .babelrc
│ ├── README.md
│ ├── Universal.Components.Recharts.psd1
│ ├── Universal.Components.Recharts.psm1
│ ├── component.build.ps1
│ ├── components
│ │ ├── chart.jsx
│ │ └── index.js
│ ├── package-lock.json
│ ├── package.json
│ └── webpack.config.js
├── TinyMCE
│ ├── .babelrc
│ ├── .gitignore
│ ├── Components
│ │ ├── BundledEditor.js
│ │ ├── component.jsx
│ │ └── index.js
│ ├── README.md
│ ├── Universal.Components.TinyMCE.psd1
│ ├── Universal.Components.TinyMCE.psm1
│ ├── component.build.ps1
│ ├── github.ps1
│ ├── package-lock.json
│ ├── package.json
│ ├── screenshot.png
│ └── webpack.config.js
└── components.build.ps1
├── LICENSE
├── Notifications
└── Universal.Notifications
│ ├── .universal
│ └── scripts.ps1
│ ├── README.md
│ ├── Universal.Notifications.psd1
│ └── Universal.Notifications.psm1
├── README.md
├── Security
└── Universal.Security.ActiveDirectoryRoles
│ ├── .universal
│ └── roles.ps1
│ ├── README.md
│ └── Universal.Security.ActiveDirectoryRoles.psd1
└── Utilities
└── Universal.Utilities.Apps
├── README.md
├── Universal.Utilities.Apps.psd1
└── Universal.Utilities.Apps.psm1
/.github/workflows/Universal.Apps.NetworkUtilities.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Universal.Apps.NetworkUtilities
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | with:
11 | fetch-depth: 0
12 | - name: Publish
13 | run: |
14 | Install-Module -Name PowerShellGet -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber -Confirm:$false -AllowPrerelease
15 | Publish-PSResource -Path .\Apps\Universal.Apps.NetworkUtilities -ApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
16 | shell: pwsh
17 | env:
18 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.github/workflows/Universal.Security.ActiveDirectoryRoles.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Universal.Security.ActiveDirectoryRoles
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | with:
11 | fetch-depth: 0
12 | - name: Publish
13 | run: |
14 | Install-Module -Name PowerShellGet -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber -Confirm:$false -AllowPrerelease
15 | Publish-PSResource -Path .\Security\Universal.Security.ActiveDirectoryRoles -ApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
16 | shell: pwsh
17 | env:
18 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.github/workflows/active-directory.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Universal.Apps.ActiveDirectory
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | with:
11 | fetch-depth: 0
12 | - name: Publish
13 | run: |
14 | Install-Module -Name PowerShellGet -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber -Confirm:$false -AllowPrerelease
15 | Publish-PSResource -Path .\Apps\Universal.Apps.ActiveDirectory -ApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
16 | shell: pwsh
17 | env:
18 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.github/workflows/bootstrap.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Bootstrap
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task Bootstrap
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\Icons.Bootstrap\output\Universal.Icons.Bootstrap -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.NuGetApiKey }}
--------------------------------------------------------------------------------
/.github/workflows/build.yaml:
--------------------------------------------------------------------------------
1 | name: CI
2 | on: [push, pull_request, workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1
20 | shell: pwsh
--------------------------------------------------------------------------------
/.github/workflows/calendar.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Calendar
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task Calendar
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\Calendar\output\Universal.Components.Calendar -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.github/workflows/feather.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Feather
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task Feather
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\Icons.Feather\output\Universal.Icons.Feather -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.NuGetApiKey }}
--------------------------------------------------------------------------------
/.github/workflows/joyride.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Joyride
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task Joyride
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\Joyride\output\Universal.Components.Joyride -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.NuGetApiKey }}
--------------------------------------------------------------------------------
/.github/workflows/loader.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Loader
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task Loader
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\Loader\output\Universal.Components.Loader -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.NuGetApiKey }}
--------------------------------------------------------------------------------
/.github/workflows/materialdesign.yaml:
--------------------------------------------------------------------------------
1 | name: Publish MaterialDesign
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task MaterialDesign
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\Icons.MaterialDesign\output\Universal.Icons.MaterialDesign -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.NuGetApiKey }}
--------------------------------------------------------------------------------
/.github/workflows/notifications.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Universal.Notifications
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: windows-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | with:
11 | fetch-depth: 0
12 | - name: Publish
13 | run: |
14 | Install-Module PSHtml -Force
15 | Install-Module PSTeams -Force
16 | Publish-Module -Path .\Notifications\Universal.Notifications -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
17 | shell: pwsh
18 | env:
19 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.github/workflows/powergui.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Universal.Apps.PowerGUI
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | with:
11 | fetch-depth: 0
12 | - name: Publish
13 | run: |
14 | Install-Module -Name PowerShellGet -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber -Confirm:$false -AllowPrerelease
15 | Publish-PSResource -Path .\Apps\Universal.Apps.PowerGUI -ApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
16 | shell: pwsh
17 | env:
18 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.github/workflows/recharts.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Recharts
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task Recharts
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\Recharts\output\Universal.Components.Recharts -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.NuGetApiKey }}
--------------------------------------------------------------------------------
/.github/workflows/tabler.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Tabler
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task Tabler
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\Icons.Tabler\output\Universal.Icons.Tabler -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.NuGetApiKey }}
--------------------------------------------------------------------------------
/.github/workflows/tinymce.yaml:
--------------------------------------------------------------------------------
1 | name: Publish TinyMCE
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/setup-node@v3
10 | with:
11 | node-version: '16.13.2'
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Install InvokeBuild
16 | run: Install-Module InvokeBuild -Force
17 | shell: pwsh
18 | - name: Build
19 | run: Invoke-Build -File .\Components\components.build.ps1 -Task TinyMCE
20 | shell: pwsh
21 | - name: Publish
22 | run: Publish-Module -Path .\Components\TinyMCE\output\Universal.Components.TinyMCE -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
23 | shell: pwsh
24 | env:
25 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.github/workflows/utilities.apps.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Universal.Utilities.Apps
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | with:
11 | fetch-depth: 0
12 | - name: Publish
13 | run: |
14 | Publish-Module -Path .\Utilities\Universal.Utilities.Apps -NuGetApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
15 | shell: pwsh
16 | env:
17 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.github/workflows/windowsSysInfo.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Universal.Apps.WindowsSystemInformation
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | build:
6 | name: Build
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | with:
11 | fetch-depth: 0
12 | - name: Publish
13 | run: |
14 | Install-Module -Name PowerShellGet -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber -Confirm:$false -AllowPrerelease
15 | Publish-PSResource -Path .\Apps\Universal.Apps.WindowsSystemInformation -ApiKey $ENV:NUGETAPIKEY -Repository PSGallery -Verbose
16 | shell: pwsh
17 | env:
18 | NUGETAPIKEY: ${{ secrets.PSGALLERYKEY }}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | output/
2 | node_modules/
3 | public/
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/.universal/dashboards.ps1:
--------------------------------------------------------------------------------
1 | New-PSUDashboard -Name 'Active Directory' -BaseUrl '/active-directory' -Module 'Universal.Apps.ActiveDirectory' -Command 'New-UDActiveDirectoryApp' -Authenticated -Role @("Administrator", "AD Admin", "AD Users", "AD Groups")
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/.universal/roles.ps1:
--------------------------------------------------------------------------------
1 | New-PSURole -Name 'AD Admin' -Description 'Users that have access to the Active Directory app.'
2 | New-PSURole -Name 'AD Users' -Description 'Users that have access to the Active Directory app''s user features.'
3 | New-PSURole -Name 'AD Groups' -Description 'Users that have access to the Active Directory app''s group features.'
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/.universal/scripts.ps1:
--------------------------------------------------------------------------------
1 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDDisabledComputers" -InformationAction "SilentlyContinue"
2 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDDomainControllers" -InformationAction "SilentlyContinue"
3 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDInactiveComputers" -InformationAction "SilentlyContinue"
4 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDInactiveUsers" -InformationAction "SilentlyContinue"
5 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDLockedOutUsers" -InformationAction "SilentlyContinue"
6 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDUsersNeverLoggedOn" -InformationAction "SilentlyContinue"
7 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDUsersRecentlyCreated" -InformationAction "SilentlyContinue"
8 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDUsersRecentlyDeleted" -InformationAction "SilentlyContinue"
9 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDUsersRecentlyModified" -InformationAction "SilentlyContinue"
10 | New-PSUScript -Module "Universal.Apps.ActiveDirectory" -Command "Get-UDUsersWithoutManager" -InformationAction "SilentlyContinue"
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/README.md:
--------------------------------------------------------------------------------
1 | # Active Directory App
2 |
3 | Active Directory tools built with PowerShell Universal. Reset passwords, restore deleted users, manage group membership and search for objects.
4 |
5 | 
6 |
7 | Active Directory tools built with PowerShell Universal. Reset passwords, restore deleted users, manage group membership and search for objects.
8 |
9 | ### General Tools
10 | - Object Search
11 |
12 | ### User Tools
13 | - Search Users
14 | - Reset Password
15 | - Restore Deleted Users
16 |
17 | ### Group Tools
18 | - Search Groups
19 | - Manage Group Membership
20 |
21 | ### Infrastructure Tools
22 | - Search Computers
23 | - View Domain Controllers
24 |
25 | ### Reports
26 |
27 | Reports are scripts that can be run to query Active Directory. All reports support exporting as CSV, Excel, PDF and JSON. Reports can be re-run from the dashboard.
28 |
29 | 
30 |
31 | ### Current Reports Include:
32 |
33 | - Inactive Users
34 | - Users that have never logged on
35 | - Users without Managers
36 | - Recently Changed Users
37 | - Recently Created Users
38 | - Recently Deleted Users
39 | - Disabled Computers
40 | - Inactive Computers
41 | - Domain Controllers
42 |
43 | ### Role-Based Access
44 | - Administrator - Administrators have access to the entire dashboard.
45 | - AD Admin - UD Admin have access to the entire dashboard but no access to the admin console.
46 | - AD Users - Has access to user functionality.
47 | - AD Groups - Has access to group functionality.
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Computers - Disabled.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDDisabledComputers {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of disabled computers.
5 |
6 | .DESCRIPTION
7 | Gets a list of disabled computers.
8 | #>
9 | [System.ComponentModel.DisplayName("Disabled Computers")]
10 | param()
11 | Get-ADComputer -Filter { (Enabled -eq $False) } -ResultPageSize 2000 -ResultSetSize $null -Properties Name, OperatingSystem, SamAccountName, DistinguishedName | Select-Object Name, OperatingSystem, SamAccountName, DistinguishedName
12 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Computers - Domain Controllers.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDDomainControllers {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of domain controllers.
5 |
6 | .DESCRIPTION
7 | Gets a list of domain controllers.
8 | #>
9 | [System.ComponentModel.DisplayName("Domain Controllers")]
10 | param()
11 | Get-ADDomainController | Select-Object HostName, IPv4Address, Domain, OperatingSystem
12 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Computers - Inactive.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDInactiveComputers {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of inactive computers.
5 |
6 | .DESCRIPTION
7 | Gets a list of inactive computers.
8 | #>
9 | [System.ComponentModel.DisplayName("Inactive Computers")]
10 | param()
11 | $DaysInactive = 30
12 | $time = (Get-Date).Adddays( - ($DaysInactive))
13 | Get-ADComputer -Filter { LastLogonTimeStamp -lt $time } -ResultPageSize 2000 -resultSetSize $null -Properties Name, OperatingSystem, SamAccountName, DistinguishedName | Select-Object Name, OperatingSystem, SamAccountName, DistinguishedName
14 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Users - Inactive Users.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDInactiveUsers {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of inactive users.
5 |
6 | .DESCRIPTION
7 | Gets a list of inactive users.
8 | #>
9 | [System.ComponentModel.DisplayName("Inactive Users")]
10 | param()
11 | $When = ((Get-Date).AddDays(-30)).Date
12 | Get-ADUser -Filter { LastLogonDate -lt $When } -Properties * | select-object samaccountname, DistinguishedName, LastLogonDate
13 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Users - Locked Out.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDLockedOutUsers {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of locked out users.
5 |
6 | .DESCRIPTION
7 | Gets a list of locked out users.
8 | #>
9 | [System.ComponentModel.DisplayName("Locked Out Users")]
10 | param()
11 | Search-AdAccount -LockedOut | Select-Object SamAccountName, DistinguishedName
12 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Users - Never Logged On.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDUsersNeverLoggedOn {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of users that have never logged on.
5 |
6 | .DESCRIPTION
7 | Gets a list of users that have never logged on.
8 | #>
9 | [System.ComponentModel.DisplayName("Users Never Logged On")]
10 | param()
11 | Get-ADUser -Filter { -not (lastlogontime -like '*') } -Properties Name, SID, whenCreated | ForEach-Object {
12 | [PSCustomObject]@{
13 | Name = $_.Name
14 | SID = $_.SID
15 | WhenCreated = $_.whenCreated
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Users - Recently Created.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDUsersRecentlyCreated {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of users that were recently created.
5 |
6 | .DESCRIPTION
7 | Gets a list of users that were recently created.
8 | #>
9 | [System.ComponentModel.DisplayName("Users Recently Created")]
10 | param()
11 | $prvDate = ((Get-Date).AddDays(-30)).Date
12 | Get-ADUser -Filter { whenCreated -ge $prvDate } -Properties whenCreated | Select Name, whenCreated | Sort-Object whenCreated
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Users - Recently Deleted.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDUsersRecentlyDeleted {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of users that were recently deleted.
5 |
6 | .DESCRIPTION
7 | Gets a list of users that were recently deleted.
8 | #>
9 | [System.ComponentModel.DisplayName("Users Recently Deleted")]
10 | param()
11 | $prvDate = ((Get-Date).AddDays(-30)).Date
12 | Get-ADObject -IncludeDeletedObjects -Filter { objectClass -eq "user" -and IsDeleted -eq $True -and whenChanged -ge $prvDate } -Properties samaccountname, distinguishedname, whencreated, whenchanged | select -Property samaccountname, distinguishedname, whencreated, whenchanged
13 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Users - Recently Modified.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDUsersRecentlyModified {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of users that were recently modified.
5 |
6 | .DESCRIPTION
7 | Gets a list of users that were recently modified.
8 | #>
9 | [System.ComponentModel.DisplayName("Users Recently Modified")]
10 | param()
11 | $prvDate = ((Get-Date).AddDays(-30)).Date
12 | Get-ADUser -Filter { whenChanged -ge $prvDate } -Properties whenChanged | Select Name, whenChanged | Sort-Object whenChanged
13 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/Reports/Users - Without Manager.ps1:
--------------------------------------------------------------------------------
1 | function Get-UDUsersWithoutManager {
2 | <#
3 | .SYNOPSIS
4 | Gets a list of users that do not have a manager.
5 |
6 | .DESCRIPTION
7 | Gets a list of users that do not have a manager.
8 | #>
9 | [System.ComponentModel.DisplayName("Users Without Manager")]
10 | param()
11 | Get-ADUser -LDAPFilter "(!manager=*)" -Properties DisplayName, UserPrincipalName, DistinguishedName | ForEach-Object {
12 | [PSCustomObject]@{
13 | DisplayName = $_.DisplayName
14 | UserPrincipalName = $_.UserPrincipalName
15 | DistinguishedName = $_.DistinguishedName
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/images/reports-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.ActiveDirectory/images/reports-screenshot.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.ActiveDirectory/images/screenshot.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Create Group.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Create-Group" -Name "Create Group" -Content {
2 | New-UDForm -Content {
3 | New-UDTextbox -Id "Name" -Label 'Name'
4 | New-UDSelect -Id 'Scope' -Label 'Scope' -Option {
5 | New-UDSelectOption -Name 'DomainLocal' -Value 'DomainLocal'
6 | New-UDSelectOption -Name 'Global' -Value 'Global'
7 | New-UDSelectOption -Name 'Universal' -Value 'Universal'
8 | } -DefaultValue 'DomainLocal'
9 | } -OnValidate {
10 | if (-not $EventData.Name) {
11 | New-UDFormValidationResult -ValidationError "Name is required"
12 | } else {
13 | New-UDFormValidationResult -Valid
14 | }
15 | } -OnSubmit {
16 | New-ADGroup -Name $EventData.Name -GroupScope $EventData.Scope
17 | Show-UDToast "Group created sucessfully!"
18 | }
19 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Create User.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Create-User" -Name "Create User" -Content {
2 | New-UDForm -Content {
3 | New-UDALert -Text "Enter the information below to create a user."
4 | New-UDTextbox -Id 'FirstName' -Label 'First Name'
5 | New-UDTextbox -Id 'LastName' -Label 'Last Name'
6 | New-UDTextbox -Id 'UserName' -Label 'Username'
7 | New-UDTextbox -Id 'Password' -Label 'Password' -Type password
8 | } -OnValidate {
9 | if (-not $EventData.FirstName -or -not $EventData.LastName -or -not $EventData.UserName -or -not $EventData.Password) {
10 | New-UDFormValidationResult -ValidationError 'Required field is missing'
11 | }
12 | else {
13 | New-UDFormValidationResult -Valid
14 | }
15 | } -OnSubmit {
16 | New-ADUser -Name $EventData.FirstName -GivenName $EventData.LastName -UserPrincipalName $EventData.UserName -AccountPassword (ConvertTo-SecureString -AsPlainText -String $EventData.Password)
17 | Show-UDToast "User created successfully!"
18 | }
19 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Domain Controllers.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Domain-Controllers" -Name "Domain Controllers" -Icon (New-UDIcon -Icon 'Server') -Content {
2 | $DomainControllers = Get-ADDomainController
3 | New-UDTable -Data $DomainControllers -ShowFilter -Columns @(
4 | New-UDTableColumn -Property 'HostName' -Title 'Host Name'
5 | New-UDTableColumn -Property 'IPv4Address' -Title 'IPv4 Address'
6 | New-UDTableColumn -Property 'Domain' -Title 'Domain'
7 | New-UDTableColumn -Property 'OperatingSystem' -Title 'Operating System'
8 | )
9 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Group Membership.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/group-membership" -Name "Group Membership" -Icon (New-UDIcon -Icon 'Users' -Style @{ marginRight = "10px" }) -Content {
2 | New-UDTypography -Text 'Select Group' -Variant h5
3 |
4 | New-UDAutocomplete -OnLoadOptions {
5 | Get-ADGroup -Filter "Name -like '*$body*'" | Select-Object -ExpandProperty Name | ConvertTo-Json
6 | } -OnChange {
7 | $Session:SelectedGroup = $Body
8 | Sync-UDElement -Id 'members'
9 | }
10 |
11 | New-UDElement -Tag 'div' -Attributes @{
12 | style = @{
13 | margin = '10px'
14 | }
15 | }
16 |
17 | New-UDDynamic -Id 'members' -Content {
18 | if ($Session:SelectedGroup) {
19 | $Data = Get-ADGroupMember -Identity $Session:SelectedGroup
20 | New-UDTable -Title $Session:SelectedGroup -Data $Data -ShowPagination -Columns @(
21 | New-UDTableColumn -Property Name -Title 'Name'
22 | New-UDTableColumn -Property Remove -Title Remove -Render {
23 | $DN = $EventData.DistinguishedName
24 | New-UDButton -Text 'Remove' -OnClick {
25 | $ADUser = Get-ADGroupMember -Identity $Session:SelectedGroup | Where-Object { $_.DistinguishedName -eq $DN }
26 | Remove-ADGroupMember -Identity $Session:SelectedGroup -Members $ADUser -Confirm:$false
27 | Sync-UDElement -Id 'members'
28 | }
29 | }
30 | )
31 |
32 | New-UDElement -Tag 'div' -Attributes @{
33 | style = @{
34 | margin = '10px'
35 | }
36 | }
37 |
38 | New-UDTypography -Text "Add Members to $Session:SelectedGroup" -Variant h5
39 |
40 | New-UDAutocomplete -OnLoadOptions {
41 | Get-ADUser -Filter "Name -like '*$body*'" | Select-Object -ExpandProperty DistinguishedName | ConvertTo-Json
42 | } -OnChange {
43 | $Session:SelectedUser = $Body
44 | }
45 |
46 | New-UDButton -Text 'Add Member' -OnClick {
47 | if ($Session:SelectedUser) {
48 | Add-ADGroupMember -Identity $Session:SelectedGroup -Members (Get-ADUser -Identity $Session:SelectedUser)
49 | Show-UDToast -Message "Added $Session:SelectedUser to $Session:SelectedGroup"
50 | Sync-UDElement -Id 'members'
51 | }
52 | }
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Groups.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Groups" -Name "Groups" -Content {
2 | New-UDTypography -Text "Search for groups within AD. By default, standard PowerShell filter syntax is used (e.g. Name -like 'j*')."
3 | New-UDElement -Tag 'p'
4 | New-UDForm -Content {
5 | New-UDTextbox -Label 'Filter' -Id 'filter'
6 | New-UDCheckbox -Label 'Use LDAP filter' -Id 'ldapFilter'
7 | } -OnSubmit {
8 | if ($EventData.LdapFilter) {
9 | $Session:Objects = Get-ADGroup -LdapFilter $EventDat.filter
10 | }
11 | else {
12 | $Session:Objects = Get-ADGroup -Filter $EventData.filter
13 | }
14 |
15 | Sync-UDElement -Id 'adObjects'
16 | }
17 |
18 | New-UDDynamic -Id 'adObjects' -Content {
19 | if ($Session:Objects -eq $null) {
20 | return
21 | }
22 | New-UDTable -Title 'Objects' -Data $Session:Objects -Columns @(
23 | New-UDTableColumn -Property Name -Title "Name" -Filter
24 | New-UDTableColumn -Property DistinguishedName -Title "Distinguished Name" -Filter
25 | New-UDTableColumn -Property ViewObject -Title "View Object" -Render {
26 | $Guid = $EventData.ObjectGUID
27 | New-UDButton -Text 'View Object' -OnClick {
28 | Invoke-UDRedirect "/Object-Info/$Guid"
29 | }
30 | }
31 | ) -Filter
32 | }
33 | } -Icon (New-UDIcon -Icon 'Search')
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Home.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Home" -Name "Home" -Content {
2 | New-UDLayout -Columns 2 -Content {
3 |
4 | }
5 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Inactive Users.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Inactive-Users" -Name "Inactive Users" -Icon (New-UDIcon -Icon 'Stop' -Style @{ marginRight = "10px" }) -Content {
2 | $When = ((Get-Date).AddDays(-30)).Date
3 | $InactiveUsers = Get-ADUser -Filter {LastLogonDate -lt $When} -Properties * | select-object samaccountname,DistinguishedName,LastLogonDate
4 | $Columns = @(
5 | New-UDTableColumn -Property samaccountname -Title "Name" -Filter
6 | New-UDTableColumn -Property DistinguishedName -Title "Distinguished Name" -Filter
7 | New-UDTableColumn -Property LastLogonDate -Title "Last Logon Date" -Filter
8 | )
9 | New-UDTable -Data $InactiveUsers -Columns $Columns -ShowFilter
10 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Object Info.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Object-Info/:guid" -Name "Object Info" -Icon (New-UDIcon -Icon 'User' -Style @{ marginRight = "10px" }) -Content {
2 | $Object = Get-ADObject -IncludeDeletedObjects:$EventData.includeDeleted -Identity $Guid -Properties *
3 | New-UDTable -Data $Object.PSObject.Properties -Columns @(
4 | New-UDTableColumn -Property Name -Title "Name" -Filter
5 | New-UDTableColumn -Property Value -Title "Value" -Filter -Render { if ($EventData.Value) { $EventData.Value.ToString() } else { "" } }
6 | ) -Filter -Paging
7 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Object Search.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Object-Search" -Name "Object Search" -Icon (New-UDIcon -Icon 'Search' -Style @{ marginRight = "10px" }) -Content {
2 | New-UDTypography -Text "Search for objects within AD. By default, standard PowerShell filter syntax is used (e.g. Name -like 'j*')."
3 | New-UDElement -Tag 'p'
4 | New-UDForm -Content {
5 | New-UDTextbox -Label 'Filter' -Id 'filter'
6 | New-UDCheckbox -Label 'Include Deleted Objects' -Id 'includeDeleted'
7 | New-UDCheckbox -Label 'Use LDAP filter' -Id 'ldapFilter'
8 | } -OnSubmit {
9 | if ($EventData.LdapFilter) {
10 | $Session:Objects = Get-ADObject -IncludeDeletedObjects:$EventData.includeDeleted -LdapFilter $EventDat.filter
11 | }
12 | else {
13 | $Session:Objects = Get-ADObject -IncludeDeletedObjects:$EventData.includeDeleted -Filter $EventData.filter
14 | }
15 |
16 | Sync-UDElement -Id 'adObjects'
17 | }
18 |
19 | New-UDDynamic -Id 'adObjects' -Content {
20 | if ($Session:Objects -eq $null) {
21 | return
22 | }
23 | New-UDTable -Title 'Objects' -Data $Session:Objects -Columns @(
24 | New-UDTableColumn -Property Name -Title "Name" -Filter
25 | New-UDTableColumn -Property DistinguishedName -Title "Distinguished Name" -Filter
26 | New-UDTableColumn -Property ObjectClass -Title "Object Class" -Filter
27 | New-UDTableColumn -Property ViewObject -Title "View Object" -Render {
28 | $Guid = $EventData.ObjectGUID
29 | New-UDButton -Text 'View Object' -OnClick {
30 | Invoke-UDRedirect "/Object-Info/$Guid"
31 | }
32 | }
33 | ) -Filter
34 | }
35 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Reset Password.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Reset-Password" -Name "Reset Password" -Icon (New-UDIcon -Icon 'Lock' -Style @{ marginRight = "10px" }) -Content {
2 | New-UDForm -Content {
3 | New-UDTextbox -Id 'txtIdentity' -Label 'User Name'
4 | New-UDTextbox -Id 'txtPassword' -Label 'Password' -Type password
5 | New-UDCheckbox -Id 'chkUnlock' -Label 'Unlock'
6 | New-UDCheckbox -Id 'chkChangePasswordOnLogon' -Label 'Change password on logon'
7 | } -OnSubmit {
8 | $SecurePassword = ConvertTo-SecureString $EventData.txtPassword -AsPlainText -Force
9 |
10 | Set-ADAccountPassword -Identity $EventData.txtIdentity -NewPassword $SecurePassword -Reset
11 |
12 | if ($EventData.chkUnlock) {
13 | Unlock-ADAccount –Identity $EventData.txtIdentity
14 | }
15 |
16 | if ($EventData.chkChangePasswordOnLogon) {
17 | Set-ADUser –Identity $EventData.txtIdentity -ChangePasswordAtLogon $true
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Restore Deleted User.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Restore-Deleted-User" -Name "Restore Deleted User" -Icon (New-UDIcon -Icon 'DeleteLeft' -Style @{ marginRight = "10px" }) -Content {
2 | New-UDTypography -Text 'Restore deleted users from the Active Directory recycling bin. You can selected multiple users to restore and click the Restore Selected to do so.'
3 | New-UDElement -Tag 'p'
4 | $Columns = @(
5 | New-UDTableColumn -Property Name -Title "Name" -Filter
6 | New-UDTableColumn -Property DistinguishedName -Title "Distinguished Name" -Filter
7 | New-UDTableColumn -Property Restore -Title Restore -Render {
8 | $Item = $EventData
9 | New-UDButton -Id "btn$($Item.ObjectGuid)" -Text "Restore" -OnClick {
10 | Show-UDToast -Message "Restoring user $($Item.Name)" -Duration 5000
11 |
12 | try {
13 | Restore-ADObject -Identity $Item.DistinguishedName
14 | Show-UDToast -Message "Restored user $($Item.Name)" -Duration 5000
15 | Sync-UDElement -Id 'Table'
16 | }
17 | catch {
18 | Show-UDToast -Message "Failed to restore user $($_.Exception)" -BackgroundColor red -MessageColor white -Duration 5000
19 | }
20 | }
21 | }
22 | )
23 |
24 | New-UDDynamic -Id 'Table' -Content {
25 | $DeletedUsers = Get-ADObject -Filter 'IsDeleted -eq $true -and objectClass -eq "user"' -IncludeDeletedObjects | ForEach-Object {
26 | @{
27 | distinguishedname = $_.DistinguishedName
28 | name = $_.Name
29 | }
30 | }
31 |
32 | if ($DeletedUsers -eq $null) {
33 | New-UDTypography -Text 'No deleted users'
34 | }
35 | else {
36 | New-UDButton -Text 'Restore Selected' -OnClick {
37 | Show-UDToast -Message "Restoring selected users..." -Duration 5000
38 | (Get-UDElement -Id 'users').SelectedRows | ForEach-Object {
39 | try {
40 | Restore-ADObject -Identity $_.DistinguishedName
41 |
42 |
43 | }
44 | catch {
45 | Show-UDToast -Message "Failed to restore user $($_.Exception)" -BackgroundColor red -MessageColor white -Duration 5000
46 | }
47 | }
48 | Show-UDToast -Message "Restored users" -Duration 5000
49 | Sync-UDElement -Id 'Table'
50 | }
51 | New-UDTable -Id 'users' -Data $DeletedUsers -Columns $Columns -Filter -ShowSelection
52 |
53 | }
54 | } -LoadingComponent {
55 | New-UDProgress -Circular
56 | }
57 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Search Computers.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Search-Computers" -Name "Search Computers" -Icon (New-UDIcon -Icon 'Search') -Content {
2 | New-UDTypography -Text "Search for computers within AD. By default, standard PowerShell filter syntax is used (e.g. Name -like 'j*')."
3 | New-UDElement -Tag 'p'
4 | New-UDForm -Content {
5 | New-UDTextbox -Label 'Filter' -Id 'filter'
6 | New-UDCheckbox -Label 'Use LDAP filter' -Id 'ldapFilter'
7 | } -OnSubmit {
8 | if ($EventData.LdapFilter) {
9 | $Session:Objects = Get-ADComputer -LdapFilter $EventDat.filter
10 | }
11 | else {
12 | $Session:Objects = Get-ADComputer -Filter $EventData.filter
13 | }
14 |
15 | Sync-UDElement -Id 'adObjects'
16 | }
17 |
18 | New-UDDynamic -Id 'adObjects' -Content {
19 | if ($Session:Objects -eq $null) {
20 | return
21 | }
22 | New-UDTable -Title 'Objects' -Data $Session:Objects -Columns @(
23 | New-UDTableColumn -Property Name -Title "Name" -Filter
24 | New-UDTableColumn -Property DistinguishedName -Title "Distinguished Name" -Filter
25 | New-UDTableColumn -Property ViewObject -Title "View Object" -Render {
26 | $Guid = $EventData.ObjectGUID
27 | New-UDButton -Text 'View Object' -OnClick {
28 | Invoke-UDRedirect "/Object-Info/$Guid"
29 | }
30 | }
31 | ) -Filter
32 | }
33 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.ActiveDirectory/pages/Search Users.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Search-Users" -Name "Search Users" -Content {
2 | New-UDTypography -Text "Search for users within AD. By default, standard PowerShell filter syntax is used (e.g. Name -like 'j*')."
3 | New-UDElement -Tag 'p'
4 | New-UDForm -Content {
5 | New-UDTextbox -Label 'Filter' -Id 'filter'
6 | New-UDCheckbox -Label 'Use LDAP filter' -Id 'ldapFilter'
7 | } -OnSubmit {
8 | if ($EventData.LdapFilter) {
9 | $Session:Objects = Get-ADUser -LdapFilter $EventDat.filter
10 | }
11 | else {
12 | $Session:Objects = Get-ADUser -Filter $EventData.filter
13 | }
14 |
15 | Sync-UDElement -Id 'adObjects'
16 | }
17 |
18 | New-UDDynamic -Id 'adObjects' -Content {
19 | if ($Session:Objects -eq $null) {
20 | return
21 | }
22 | New-UDTable -Title 'Objects' -Data $Session:Objects -Columns @(
23 | New-UDTableColumn -Property Name -Title "Name" -Filter
24 | New-UDTableColumn -Property DistinguishedName -Title "Distinguished Name" -Filter
25 | New-UDTableColumn -Property ViewObject -Title "View Object" -Render {
26 | $Guid = $EventData.ObjectGUID
27 | New-UDButton -Text 'View Object' -OnClick {
28 | Invoke-UDRedirect "/Object-Info/$Guid"
29 | }
30 | }
31 | ) -Filter
32 | }
33 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/.universal/dashboards.ps1:
--------------------------------------------------------------------------------
1 | New-PSUDashboard -Name 'Network Utilities' -BaseUrl '/network-utilities' -Module 'Universal.Apps.NetworkUtilities' -Command 'New-NetworkUtilityApp' -Authenticated -Role @("Administrator", "Network Utilities User")
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/.universal/roles.ps1:
--------------------------------------------------------------------------------
1 | New-PSURole -Name 'Network Utilities User' -Description "Users that have access to the Network Utilities app."
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/README.md:
--------------------------------------------------------------------------------
1 | # Network Utilities App
2 |
3 | ## Features
4 |
5 | ### Ping
6 |
7 | Ping a host.
8 |
9 | 
10 |
11 | ### Traceroute
12 |
13 | Run a traceroute against a host.
14 |
15 | 
16 |
17 | ### Resolve
18 |
19 | Resolve a host name to an IP address.
20 |
21 | 
22 |
23 | ### Network Scan
24 |
25 | Scan a network for hosts.
26 |
27 | 
28 |
29 | ### Speed Test
30 |
31 | Test the speed of your internet connection with Speedtest.net
32 |
33 | 
34 |
35 | ## Requirements
36 |
37 | - PowerShell Universal 4.0 or later
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/Universal.Apps.NetworkUtilities.psm1:
--------------------------------------------------------------------------------
1 | function New-NetworkUtilityApp {
2 | $AppRoot = $PSScriptRoot
3 |
4 | New-UDApp -Title 'Network Utilities' -Content {
5 | New-UDTabs -Tabs {
6 | New-UDTab -Text 'Ping' -Content {
7 | New-UDForm -Children {
8 | New-UDTextbox -Label "IP Address/Host Name" -Id 'pingHost'
9 | New-UDCheckbox -Label 'Traceroute' -Id 'pingTraceroute'
10 | } -OnSubmit {
11 |
12 | $traceroute = $EventData.pingTraceroute -eq $true
13 | $Session:PingOutput = Test-NetConnection -ComputerName $EventData.pingHost -TraceRoute:$traceroute | Out-String
14 | Sync-UDElement -Id 'pingOutput'
15 | } -SubmitText "Ping"
16 |
17 | New-UDDynamic -Id 'pingOutput' -Content {
18 | New-UDElement -Tag pre -Content {
19 | $Session:PingOutput
20 | }
21 | }
22 | }
23 | New-UDTab -Text 'Resolve' -Content {
24 | New-UDForm -Children {
25 | New-UDTextbox -Label "DNS Name" -Id 'resolveName'
26 | } -OnSubmit {
27 | $Session:ResolveOutput = Resolve-DnsName $EventData.resolveName | Out-String
28 | Sync-UDElement -Id 'resolveOutput'
29 | } -SubmitText "Resolve"
30 |
31 | New-UDDynamic -Id 'resolveOutput' -Content {
32 | New-UDElement -Tag pre -Content {
33 | $Session:ResolveOutput
34 | }
35 | }
36 | }
37 | New-UDTab -Text 'Network Scanner' -Content {
38 | New-UDForm -Children {
39 | New-UDTextbox -Label "Start IP Address" -Id 'scanStartIp' -Value '192.168.0.1'
40 | New-UDTextbox -Label "End IP Address" -Id 'scanEndIp' -Value '192.168.0.255'
41 | } -OnSubmit {
42 | $Session:NetworkScan = & "$AppRoot\IPv4NetworkScan.ps1" -StartIPv4Address $EventData.scanStartIp -EndIPv4Address $EventData.scanEndIp -IncludeInactive
43 | Sync-UDElement -Id 'netScanOutput'
44 | }
45 |
46 | New-UDDynamic -Id 'netScanOutput' -Content {
47 | New-UDTable -Data $Session:NetworkScan -ShowPagination -ShowExport
48 | }
49 | }
50 | New-UDTab -Text 'Speed Test' -Content {
51 | New-UDButton -Text 'Run Speed Test' -OnClick {
52 | Write-Progress -Activity "Running speed test..."
53 | $Speedtest = & "$AppRoot\speedtest.exe" --format=json --accept-license --accept-gdpr
54 | $Speedtest = $Speedtest | ConvertFrom-Json
55 |
56 | [PSCustomObject]$SpeedObject = @{
57 | downloadspeed = [math]::Round($Speedtest.download.bandwidth / 1000000 * 8, 2)
58 | uploadspeed = [math]::Round($Speedtest.upload.bandwidth / 1000000 * 8, 2)
59 | packetloss = [math]::Round($Speedtest.packetLoss)
60 | isp = $Speedtest.isp
61 | ExternalIP = $Speedtest.interface.externalIp
62 | InternalIP = $Speedtest.interface.internalIp
63 | UsedServer = $Speedtest.server.host
64 | URL = $Speedtest.result.url
65 | Jitter = [math]::Round($Speedtest.ping.jitter)
66 | Latency = [math]::Round($Speedtest.ping.latency)
67 | }
68 |
69 | $Session:Speed = [PSCustomObject]$SpeedObject
70 | Sync-UDElement -Id 'speedResult'
71 | } -ShowLoading
72 |
73 | New-UDDynamic -Id 'speedResult' -Content {
74 | New-UDElement -Tag pre -Content {
75 | $Session:Speed | Out-String
76 | }
77 | }
78 | }
79 | }
80 | }
81 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/ping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.NetworkUtilities/ping.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/resolve.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.NetworkUtilities/resolve.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/scan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.NetworkUtilities/scan.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.NetworkUtilities/speed.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/speedtest.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.NetworkUtilities/speedtest.exe
--------------------------------------------------------------------------------
/Apps/Universal.Apps.NetworkUtilities/traceroute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.NetworkUtilities/traceroute.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.PowerGUI/.universal/dashboards.ps1:
--------------------------------------------------------------------------------
1 | New-PSUDashboard -Name 'PowerGUI' -BaseUrl '/powergui' -Module 'Universal.Apps.PowerGUI' -Command 'New-PowerGUIApp' -Authenticated -Role @("Administrator", "PowerGUI User") -Environment 'PowerGUI'
--------------------------------------------------------------------------------
/Apps/Universal.Apps.PowerGUI/.universal/environments.ps1:
--------------------------------------------------------------------------------
1 | New-PSUEnvironment -Name 'PowerGUI' -Path "powershell.exe"
--------------------------------------------------------------------------------
/Apps/Universal.Apps.PowerGUI/.universal/roles.ps1:
--------------------------------------------------------------------------------
1 | New-PSURole -Name 'PowerGUI User' -Description "Users that have access to the PowerGUI app."
--------------------------------------------------------------------------------
/Apps/Universal.Apps.PowerGUI/README.md:
--------------------------------------------------------------------------------
1 | # PowerGUI App
2 |
3 | A [PowerGUI Administrative Console](https://4sysops.com/archives/powergui-create-powershell-scripts-with-a-gui/) clone made in PowerShell Universal.
4 |
5 | ### PowerShell Universal PowerGUI
6 |
7 | 
8 |
9 | ### PowerGUI 3.8
10 |
11 | 
12 |
13 | Includes the Local System PowerPack functionality.
14 |
15 | - Processes
16 | - Services
17 | - Event Log
18 | - Users
19 | - Groups
20 | - Network Adapters
21 |
22 | ### Role-Based Access
23 |
24 | - Administrator - Administrators have access to the entire app.
25 | - PowerGUI User - Has access to the app.
--------------------------------------------------------------------------------
/Apps/Universal.Apps.PowerGUI/powergui.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.PowerGUI/powergui.jpg
--------------------------------------------------------------------------------
/Apps/Universal.Apps.PowerGUI/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.PowerGUI/screenshot.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/.universal/dashboards.ps1:
--------------------------------------------------------------------------------
1 | New-PSUApp -Name "Self-Service Portal" -FilePath "dashboards\Self-Service\Self-Service.ps1" -BaseUrl "/self-service" -AutoDeploy
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/.universal/publishedFolders.ps1:
--------------------------------------------------------------------------------
1 | New-PSUPublishedFolder -RequestPath "/images" -Path "images" -DefaultDocument @() -Name "Images"
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/.universal/roles.ps1:
--------------------------------------------------------------------------------
1 | New-PSURole -Name "Administrator" -Description "Administrators can manage settings, create and edit any entity and view all the entities with PowerShell Universal." -Policy {
2 | param(
3 | [Security.ClaimsPrincipal]$User
4 | )
5 |
6 | <#
7 | Policies should return $true or $false to determine whether the user has the particular
8 | claim that require them for that role.
9 | #>
10 |
11 | $true
12 | }
13 | New-PSURole -Name "Operator" -Description "Operators have access to manage and execute scripts, create other entities within PowerShell Universal but cannot manage PowerShell Universal itself." -Policy {
14 | param(
15 | [Security.ClaimsPrincipal]$User
16 | )
17 |
18 | <#
19 | Policies should return $true or $false to determine whether the user has the particular
20 | claim that require them for that role.
21 | #>
22 |
23 | $false
24 | }
25 | New-PSURole -Name "Reader" -Description "Readers have read-only access to PowerShell Universal. They cannot make changes to any entity within the system." -Policy {
26 | param(
27 | [Security.ClaimsPrincipal]$User
28 | )
29 |
30 | <#
31 | Policies should return $true or $false to determine whether the user has the particular
32 | claim that require them for that role.
33 | #>
34 |
35 | $false
36 | }
37 | New-PSURole -Name "Execute" -Description "Execute scripts within PowerShell Universal." -Policy {
38 | param(
39 | [Security.ClaimsPrincipal]$User
40 | )
41 |
42 | <#
43 | Policies should return $true or $false to determine whether the user has the particular
44 | claim that require them for that role.
45 | #>
46 |
47 | $false
48 | }
49 | New-PSURole -Name "User" -Description "Does not have access to the admin console but can be assigned resources like APIs, scripts, dashboards and pages." -Policy {
50 | param(
51 | [Security.ClaimsPrincipal]$User
52 | )
53 |
54 | <#
55 | Policies should return $true or $false to determine whether the user has the particular
56 | claim that require them for that role.
57 | #>
58 |
59 | $false
60 | }
61 | New-PSURole -Name "Active Directory" -Description "A user that has access to Active Directory services. " -Policy {
62 | param(
63 | [Security.ClaimsPrincipal]$User
64 | )
65 |
66 | $true
67 | }
68 | New-PSURole -Name "Self-Service Admin" -Description "An administrator of the Self-Service app. " -Policy {
69 | # Define your policy here
70 | }
71 | New-PSURole -Name "Test" -Description "Test" -Policy {
72 | $true
73 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/.universal/scripts.ps1:
--------------------------------------------------------------------------------
1 | New-PSUScript -Name "Reset Password.ps1" -Description "Resets an account password. " -Tag @('Self-Service', 'Active Directory') -Path "Self-Service\Active Directory\Reset Password.ps1" -InformationAction "SilentlyContinue"
2 | New-PSUScript -Name "Create Virtual Machine.ps1" -Description "Creates a new virtual machine. " -Tag @('Self-Service', 'Hyper-V') -Path "Self-Service\Hyper-V\Create Virtual Machine.ps1" -InformationAction "SilentlyContinue"
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/.universal/tags.ps1:
--------------------------------------------------------------------------------
1 | New-PSUTag -Name "Self-Service" -Color "#0050b3" -Description "A script that should be surfaced on the self-service app."
2 | New-PSUTag -Name "Active Directory" -Color "#d4380d" -Description "An Active Directory script. "
3 | New-PSUTag -Name "Hyper-V" -Color "#1d39c4" -Description "Hyper-V scripts. "
4 | New-PSUTag -Name "Test" -Description "Test"
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/Modules/SelfService/1.0.0/SelfService.psd1:
--------------------------------------------------------------------------------
1 | #
2 | # Module manifest for module 'SelfService'
3 | #
4 | # Generated by: adamr
5 | #
6 | # Generated on: 7/13/2023
7 | #
8 |
9 | @{
10 |
11 | # Script module or binary module file associated with this manifest.
12 | RootModule = 'SelfService.psm1'
13 |
14 | # Version number of this module.
15 | ModuleVersion = '1.0.0'
16 |
17 | # Supported PSEditions
18 | # CompatiblePSEditions = @()
19 |
20 | # ID used to uniquely identify this module
21 | GUID = '88f33ea3-fbc8-4788-800d-592a44227c0a'
22 |
23 | # Author of this module
24 | Author = 'adamr'
25 |
26 | # Company or vendor of this module
27 | CompanyName = 'Unknown'
28 |
29 | # Copyright statement for this module
30 | Copyright = '(c) adamr. All rights reserved.'
31 |
32 | # Description of the functionality provided by this module
33 | # Description = ''
34 |
35 | # Minimum version of the PowerShell engine required by this module
36 | # PowerShellVersion = ''
37 |
38 | # Name of the PowerShell host required by this module
39 | # PowerShellHostName = ''
40 |
41 | # Minimum version of the PowerShell host required by this module
42 | # PowerShellHostVersion = ''
43 |
44 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45 | # DotNetFrameworkVersion = ''
46 |
47 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48 | # ClrVersion = ''
49 |
50 | # Processor architecture (None, X86, Amd64) required by this module
51 | # ProcessorArchitecture = ''
52 |
53 | # Modules that must be imported into the global environment prior to importing this module
54 | # RequiredModules = @()
55 |
56 | # Assemblies that must be loaded prior to importing this module
57 | # RequiredAssemblies = @()
58 |
59 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
60 | # ScriptsToProcess = @()
61 |
62 | # Type files (.ps1xml) to be loaded when importing this module
63 | # TypesToProcess = @()
64 |
65 | # Format files (.ps1xml) to be loaded when importing this module
66 | # FormatsToProcess = @()
67 |
68 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69 | # NestedModules = @()
70 |
71 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72 | FunctionsToExport = '*'
73 |
74 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75 | CmdletsToExport = '*'
76 |
77 | # Variables to export from this module
78 | VariablesToExport = '*'
79 |
80 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
81 | AliasesToExport = '*'
82 |
83 | # DSC resources to export from this module
84 | # DscResourcesToExport = @()
85 |
86 | # List of all modules packaged with this module
87 | # ModuleList = @()
88 |
89 | # List of all files packaged with this module
90 | # FileList = @()
91 |
92 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
93 | PrivateData = @{
94 |
95 | PSData = @{
96 |
97 | # Tags applied to this module. These help with module discovery in online galleries.
98 | Tags = 'PowerShellUniversal'
99 |
100 | # A URL to the license for this module.
101 | # LicenseUri = ''
102 |
103 | # A URL to the main website for this project.
104 | # ProjectUri = ''
105 |
106 | # A URL to an icon representing this module.
107 | # IconUri = ''
108 |
109 | # ReleaseNotes of this module
110 | # ReleaseNotes = ''
111 |
112 | # Prerelease string of this module
113 | # Prerelease = ''
114 |
115 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
116 | # RequireLicenseAcceptance = $false
117 |
118 | # External dependent modules of this module
119 | # ExternalModuleDependencies = @()
120 |
121 | } # End of PSData hashtable
122 |
123 | } # End of PrivateData hashtable
124 |
125 | # HelpInfo URI of this module
126 | # HelpInfoURI = ''
127 |
128 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
129 | # DefaultCommandPrefix = ''
130 |
131 | }
132 |
133 |
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/Modules/SelfService/1.0.0/SelfService.psm1:
--------------------------------------------------------------------------------
1 | $DataDirectory = Join-Path $Repository "data"
2 | $ServiceGroupPath = Join-Path $DataDirectory "servicegroups.json"
3 | $ServicePath = Join-Path $DataDirectory "services.json"
4 |
5 | function New-PSUService {
6 | param(
7 | $Name,
8 | $Description,
9 | $ServiceGroup
10 | )
11 |
12 | $Service = @{
13 | Name = $Name
14 | Description = $Description
15 | ServiceGroup = $ServiceGroup
16 | }
17 |
18 | [Array]$Services = Get-PSUService
19 | $Services += $Service
20 |
21 | if (-not (Test-Path $DataDirectory)) {
22 | New-Item $DataDirectory -ItemType Directory | Out-Null
23 | }
24 |
25 | $Services | ConvertTo-Json | Out-File -FilePath $ServicePath
26 | }
27 |
28 | function Get-PSUService {
29 | if (-not (Test-Path $ServicePath)) {
30 | return
31 | }
32 |
33 | Get-Content $ServicePath | ConvertFrom-Json
34 | }
35 |
36 | function Remove-PSUService {
37 | param($Name)
38 |
39 | $Services = Get-PSUService | Where-Object Name -ne $Name
40 | $Services | ConvertTo-Json | Out-File -FilePath $ServicePath
41 | }
42 |
43 | function New-PSUServiceGroup {
44 | param(
45 | $Name,
46 | $Description
47 | )
48 |
49 | $ServiceGroup = @{
50 | Name = $Name
51 | Description = $Description
52 | }
53 |
54 | New-PSUTag -Name $Name -Description $Description
55 | New-PSURole -Name $Name -Description $Description
56 |
57 | [Array]$ServiceGroups = Get-PSUServiceGroup
58 | $ServiceGroups += $ServiceGroup
59 |
60 | if (-not (Test-Path $DataDirectory)) {
61 | New-Item $DataDirectory -ItemType Directory | Out-Null
62 | }
63 |
64 | $ServiceGroups | ConvertTo-Json | Out-File -FilePath $ServiceGroupPath
65 | }
66 |
67 | function Get-PSUServiceGroup {
68 | if (-not (Test-Path $ServiceGroupPath)) {
69 | return
70 | }
71 |
72 | Get-Content $ServiceGroupPath | ConvertFrom-Json
73 | }
74 |
75 | function Remove-PSUServiceGroup {
76 | param($Name)
77 |
78 | Get-PSUTag -Name $Name | Remove-PSUTag
79 | Get-PSURole -Name $Name | Remove-PSURole
80 |
81 | $ServiceGroups = Get-PSUServiceGroup | Where-Object Name -ne $Name
82 | $ServiceGroups | ConvertTo-Json | Out-File -FilePath $ServiceGroupPath
83 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/Self-Service/Active Directory/Reset Password.ps1:
--------------------------------------------------------------------------------
1 | param(
2 | [Parameter(Mandatory, HelpMessage = "Cool")]
3 | $User
4 | )
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/Self-Service/Hyper-V/Create Virtual Machine.ps1:
--------------------------------------------------------------------------------
1 | # It all starts with a single line of powershell code.
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/Self-Service.ps1:
--------------------------------------------------------------------------------
1 | Import-Module C:\ProgramData\UniversalAutomation\Repository\Modules\SelfService\1.0.0\SelfService.psm1 -Force
2 |
3 | $Navigation = @(
4 | New-UDListItem -Label "Dashboard" -Href '/dashboard' -Icon (New-UDIcon -Icon 'Home')
5 | New-UDListItem -Label "Services" -Href '/services' -Icon (New-UDIcon -Icon 'Play')
6 | New-UDListItem -Label "Service Groups" -Href '/service-groups' -Icon (New-UDIcon -Icon 'LayerGroup')
7 | New-UDListItem -Label "Approvals" -Href '/approvals' -Icon (New-UDIcon -Icon 'CheckCircle')
8 | New-UDListItem -Label "History" -Href '/history' -Icon (New-UDIcon -Icon 'TimeLine')
9 | New-UDListItem -Label "Users" -Href '/users' -Icon (New-UDIcon -Icon 'Users')
10 | New-UDListItem -Label "Settings" -Href '/settings' -Icon (New-UDIcon -Icon 'Gear')
11 | )
12 |
13 | New-UDApp -Title 'Self-Service' -Pages @(
14 | Get-UDPage -Name 'Dashboard'
15 | Get-UDPage -Name 'Services'
16 | Get-UDPage -Name 'Service'
17 | Get-UDPage -Name 'Service Groups'
18 | Get-UDPage -Name 'Settings'
19 | Get-UDPage -Name 'Users'
20 | Get-UDPage -Name 'History'
21 | Get-UDPage -Name 'New Service'
22 | ) -Navigation $Navigation -NavigationLayout Permanent
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/Dashboard.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/dashboard" -Name "Dashboard" -Content {
2 | New-UDAlert -Severity info -Text "The self-service portal provides services based on your service groups."
3 |
4 | New-UDTextbox -Label 'Search...' -HelperText 'Search for services available in the portal.' -FullWidth
5 |
6 | New-UDExpansionPanelGroup -Children {
7 | Get-PSUTag | Where-Object Name -NE "Self-Service" | ForEach-Object {
8 | if ($Roles -notcontains $_.Name) {
9 | return
10 | }
11 |
12 | New-UDExpansionPanel -Title $_.Name -Children {
13 | New-UDTypography -Text $_.Description
14 | New-UDRow -Columns {
15 | Get-PSUScript -Tag $_.Name | ForEach-Object {
16 | New-UDColumn -LargeSize 3 -Content {
17 | New-UDCard -Title $_.Name -Text $_.Description
18 | New-UDLink -Text $_.Name -Url "service/$($_.Id)"
19 | }
20 | }
21 | }
22 | }
23 | }
24 | }
25 | } -DefaultHomePage -Title "Self-Service Dashboard" -BackgroundRepeat
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/History.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/History" -Name "History" -Content {
2 | New-UDAlert -Severity info -Text 'View the history of service executions.'
3 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/New Service.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/New-Service" -Name "New Service" -Content {
2 | New-UDAlert -Text 'Create a new service for your users.' -Severity info
3 | New-UDForm -Children {
4 | New-UDTextbox -Id 'name' -Label 'Name' -HelperText 'The name of the service the end user will see.' -FullWidth
5 | New-UDTextbox -Id 'description' -Label 'Description' -HelperText 'The description of the service.' -FullWidth
6 | New-UDAutocomplete -Label 'Script' -Id 'script' -FullWidth
7 | New-UDTypography -Variant caption -Text "The script to run when the user invokes this service."
8 | New-UDSelect -Option {
9 | Get-PSUServiceGroup | ForEach-Object {
10 | New-UDSelectOption -Name $_.Name -Value $_.Name
11 | }
12 | } -Label 'Service Group' -FullWidth -Id 'ServiceGroup'
13 | New-UDTypography -Variant caption -Text "The service group that this service is associated with."
14 | } -OnSubmit {
15 | New-PSUService -Name $EventData.Name -Description $EventData.Description -ServiceGroup $EventData.ServiceGroup
16 | Invoke-UDRedirect "/services"
17 | }
18 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/Service Groups.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Service-Groups" -Name "Service Groups" -Content {
2 | New-UDAlert -Severity info -Text 'Service Groups allow you to group together services and assign those services to users.'
3 |
4 | New-UDButton -Text 'Create New Service Group' -Icon (New-UDIcon -Icon Users) -OnClick {
5 | Show-UDModal -Content {
6 | New-UDForm -Children {
7 | New-UDTextbox -Label 'Name' -HelperText 'The name of the Service Group.' -Id 'name'
8 | New-UDTextbox -Label 'Description' -HelperText 'A description for the Service Group.' -Id 'description'
9 | New-UDUpload -Text 'Image'
10 | New-UDTypography -Text "An image is optional" -Variant caption
11 | } -OnSubmit {
12 | New-PSUServiceGroup -Name $EventData.Name -Description $EventData.Description
13 | Sync-UDElement -Id 'serviceGroups'
14 | Hide-UDModal
15 | } -SubmitText "Create" -OnCancel {
16 | Hide-UDModal
17 | }
18 | } -Header {
19 | New-UDTypography -Variant h5 -Text "Create New Service Group"
20 | }
21 | }
22 |
23 | New-UDDynamic -Id 'serviceGroups' -Content {
24 | $ServiceGroups = Get-PSUServiceGroup
25 | New-UDTable -Data $ServiceGroups -Columns @(
26 | New-UDTableColumn -Title 'Name' -Property 'Name'
27 | New-UDTableColumn -Title 'Description' -Property 'Description'
28 | New-UDTableColumn -Property 'Actions' -Render {
29 | New-UDButton -Text 'Delete' -Icon (New-UDIcon -Icon 'Trash') -OnClick {
30 | Remove-PSUServiceGroup -Name $EventData.Name
31 | Sync-UDElement -I 'serviceGroups'
32 | }
33 | }
34 | )
35 | }
36 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/Service.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/service/:service" -Name "Service" -Content {
2 | $Script = Get-PSUScript -Id $Service
3 | New-UDForm -Script $Script.FullPath
4 | } -Title "Service"
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/Services.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Services" -Name "Services" -Content {
2 | New-UDAlert -Severity info -Text "Provide services to your end users."
3 | New-UDButton -Icon (New-UDIcon -Icon 'plus') -Text 'Create New Service' -OnClick {
4 | Invoke-UDRedirect "/new-service"
5 | }
6 |
7 | New-UDDynamic -Id 'services' -Content {
8 | $Services = Get-PSUService
9 | New-UDTable -Data $Services -Columns @(
10 | New-UDTableColumn -Title 'Name' -Property 'Name'
11 | New-UDTableColumn -Title 'Description' -Property 'Description'
12 | New-UDTableColumn -Title 'Service Group' -Property 'ServiceGroup'
13 | New-UDTableColumn -Property 'Actions' -Render {
14 | New-UDButton -Text 'Delete' -Icon (New-UDIcon -Icon 'Trash') -OnClick {
15 | Remove-PSUService -Name $EventData.Name
16 | Sync-UDElement -I 'services'
17 | }
18 | }
19 | )
20 | }
21 | } -Description "Manage services for the self-service portal." -DefaultHomePage -BackgroundRepeat
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/Settings.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Settings" -Name "Settings" -Content {
2 | New-UDAlert -Severity info -Text "General settings for the Self-Service portal."
3 | New-UDForm -Children {
4 | New-UDTextbox -Id 'email_server' -Label 'Email Server' -HelperText "The SMTP server to use for sending emails from the Self-Service App"
5 | New-UDTextbox -Id 'email_user' -Label 'Email User' -HelperText "The SMTP server to use for sending emails from the Self-Service App"
6 | New-UDTextbox -Id 'email_password' -Label 'Email Password' -HelperText "The SMTP server to use for sending emails from the Self-Service App" -Type password
7 | } -OnSubmit {
8 |
9 | }
10 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/Users.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Url "/Users" -Name "Users" -Content {
2 | New-UDAlert -Severity info -Text 'Manage users that have access to the Self-Service portal.'
3 |
4 | New-UDButton -Text 'Add New User' -Icon (New-UDIcon -Icon Plus) -OnClick {
5 | Show-UDModal -Content {
6 | New-UDForm -Children {
7 | New-UDTextbox -Label 'User Name' -HelperText 'The user name of the user.' -Id 'username'
8 | New-UDAutocomplete -Multiple -OnLoadOptions {
9 | Get-PSUServiceGroup | Where-Object Name -Match $Body | Select-Object -ExpandProperty Name | ConvertTo-Json
10 | } -Label 'Service Groups'
11 | New-UDTypography -Variant caption -Text "Assign the user to serivce groups to provide them access to the services in the groups."
12 | } -OnSubmit {
13 | New-PSUServiceGroup -Name $EventData.Name -Description $EventData.Description
14 | Sync-UDElement -Id 'serviceGroups'
15 | Hide-UDModal
16 | } -SubmitText "Create" -OnCancel {
17 | Hide-UDModal
18 | }
19 | } -Header {
20 | New-UDTypography -Variant h5 -Text "Create New Service Group"
21 | }
22 | }
23 |
24 |
25 | $Users = Get-PSUIdentity
26 | New-UDTable -Data $Users -Columns @(
27 | New-UDTableColumn -Property 'Name'
28 | New-UDTableColumn -Property 'Roles' -Render {
29 | $EventData.Roles | ForEach-Object {
30 | New-UDChip -Label $_
31 | }
32 | }
33 | )
34 | }
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/dashboards/Self-Service/pages/home.ps1:
--------------------------------------------------------------------------------
1 | New-UDPage -Name 'Home' -Content {
2 | New-UDTypography -Text 'Home' -Id 'homeText'
3 | } -Generated
--------------------------------------------------------------------------------
/Apps/Universal.Apps.SelfService/scripts/Assign to Group.ps1:
--------------------------------------------------------------------------------
1 | # It all starts with a single line of powershell code.
--------------------------------------------------------------------------------
/Apps/Universal.Apps.WindowsSystemInformation/.universal/dashboards.ps1:
--------------------------------------------------------------------------------
1 | New-PSUDashboard -Name 'Windows System Information' -BaseUrl '/windows-sys-info' -Module 'Universal.Apps.WindowsSystemInformation' -Command 'New-UDWindowsSysInfoApp' -Role @('Administrator', 'Windows System Information User')
--------------------------------------------------------------------------------
/Apps/Universal.Apps.WindowsSystemInformation/.universal/roles.ps1:
--------------------------------------------------------------------------------
1 | New-PSURole -Name 'Windows System Information User' -Description "Users that have access to the Windows System Information app."
--------------------------------------------------------------------------------
/Apps/Universal.Apps.WindowsSystemInformation/README.md:
--------------------------------------------------------------------------------
1 | # Windows System Information App
2 |
3 | A PowerShell Universal app that displays Windows System Information.
4 |
5 | This app displays the following:
6 |
7 | - Processes
8 | - Services
9 | - Event Log
10 | - Network Information
11 | - Temperatures
12 | - Uptime
13 | - Operating System Information
14 |
15 | 
16 |
17 | 
18 |
19 | 
--------------------------------------------------------------------------------
/Apps/Universal.Apps.WindowsSystemInformation/images/diskSpace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.WindowsSystemInformation/images/diskSpace.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.WindowsSystemInformation/images/eventLog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.WindowsSystemInformation/images/eventLog.png
--------------------------------------------------------------------------------
/Apps/Universal.Apps.WindowsSystemInformation/images/services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Apps/Universal.Apps.WindowsSystemInformation/images/services.png
--------------------------------------------------------------------------------
/Components/AdaptiveCards/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/AdaptiveCards/README.md:
--------------------------------------------------------------------------------
1 | ## [Adaptive Cards](https://github.com/microsoft/AdaptiveCards)
2 |
3 | ```powershell
4 | Install-Module Universal.AdaptiveCards
5 | New-UDAdaptiveCard -Payload $JSON
6 | ```
--------------------------------------------------------------------------------
/Components/AdaptiveCards/Universal.AdaptiveCards.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest.
4 | RootModule = 'Universal.AdaptiveCards.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '0.0.1'
8 |
9 | # Supported PSEditions
10 | # CompatiblePSEditions = @()
11 |
12 | # ID used to uniquely identify this module
13 | GUID = '637118be-e501-4c77-aad8-f81cc09ece69'
14 |
15 | # Author of this module
16 | Author = 'Ironman Software'
17 |
18 | # Company or vendor of this module
19 | CompanyName = 'Ironman Software'
20 |
21 | # Copyright statement for this module
22 | Copyright = '(c) Ironman Software. All rights reserved.'
23 |
24 | # Description of the functionality provided by this module
25 | Description = 'Microsoft Adaptive Cards for PowerShell Universal.'
26 |
27 | # Minimum version of the PowerShell engine required by this module
28 | # PowerShellVersion = ''
29 |
30 | # Name of the PowerShell host required by this module
31 | # PowerShellHostName = ''
32 |
33 | # Minimum version of the PowerShell host required by this module
34 | # PowerShellHostVersion = ''
35 |
36 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
37 | # DotNetFrameworkVersion = ''
38 |
39 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
40 | # ClrVersion = ''
41 |
42 | # Processor architecture (None, X86, Amd64) required by this module
43 | # ProcessorArchitecture = ''
44 |
45 | # Modules that must be imported into the global environment prior to importing this module
46 | # RequiredModules = @()
47 |
48 | # Assemblies that must be loaded prior to importing this module
49 | # RequiredAssemblies = @()
50 |
51 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
52 | # ScriptsToProcess = @()
53 |
54 | # Type files (.ps1xml) to be loaded when importing this module
55 | # TypesToProcess = @()
56 |
57 | # Format files (.ps1xml) to be loaded when importing this module
58 | # FormatsToProcess = @()
59 |
60 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
61 | # NestedModules = @()
62 |
63 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
64 | FunctionsToExport = 'New-UDAdaptiveCard'
65 |
66 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
67 | # CmdletsToExport = '*'
68 |
69 | # Variables to export from this module
70 | # VariablesToExport = '*'
71 |
72 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
73 | # AliasesToExport = '*'
74 |
75 | # DSC resources to export from this module
76 | # DscResourcesToExport = @()
77 |
78 | # List of all modules packaged with this module
79 | # ModuleList = @()
80 |
81 | # List of all files packaged with this module
82 | # FileList = @()
83 |
84 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
85 | PrivateData = @{
86 |
87 | PSData = @{
88 |
89 | # Tags applied to this module. These help with module discovery in online galleries.
90 | Tags = @("PowerShellUniversal", "App", "AdaptiveCard")
91 |
92 | # A URL to the license for this module.
93 | LicenseUri = 'https://github.com/ironmansoftware/universal-modules/blob/main/LICENSE'
94 |
95 | # A URL to the main website for this project.
96 | ProjectUri = 'https://github.com/ironmansoftware/universal-modules/tree/main/Components/AdaptiveCards'
97 |
98 | # A URL to an icon representing this module.
99 | # IconUri = 'https://raw.githubusercontent.com/ironmansoftware/universal-modules/main/Components/Icons.MaterialDesign/logo.png'
100 |
101 | # ReleaseNotes of this module
102 | # ReleaseNotes = ''
103 |
104 | # Prerelease string of this module
105 | # Prerelease = ''
106 |
107 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
108 | # RequireLicenseAcceptance = $false
109 |
110 | # External dependent modules of this module
111 | # ExternalModuleDependencies = @()
112 |
113 | } # End of PSData hashtable
114 |
115 | } # End of PrivateData hashtable
116 |
117 | # HelpInfo URI of this module
118 | # HelpInfoURI = ''
119 |
120 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
121 | # DefaultCommandPrefix = ''
122 |
123 | }
--------------------------------------------------------------------------------
/Components/AdaptiveCards/Universal.AdaptiveCards.psm1:
--------------------------------------------------------------------------------
1 | $IndexJs = Get-ChildItem "$PSScriptRoot\index.*.bundle.js"
2 | $AssetId = [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($IndexJs.FullName)
3 |
4 | function New-UDAdaptiveCard {
5 | <#
6 | .SYNOPSIS
7 | Material Design icons for PowerShell Universal apps.
8 |
9 | .DESCRIPTION
10 | Material Design icons for PowerShell Universal apps.
11 |
12 | .PARAMETER Id
13 | The ID for this component. If not specified, a GUID will be generated.
14 |
15 | .PARAMETER Icon
16 | The name of the icon to use. See https://react-icons.github.io/react-icons/icons?name=md for icons.
17 |
18 | .PARAMETER Style
19 | A hashtable for CSS styles to apply.
20 |
21 | .PARAMETER ClassName
22 | A CSS class to apply to this component.
23 |
24 | .EXAMPLE
25 | New-UDMaterialDesignIcon -Icon 'Md123'
26 |
27 | .EXAMPLE
28 | New-UDMaterialDesignIcon -Icon 'Md123' -Style @{
29 | FontSize = '100px'
30 | }
31 | #>#
32 | param(
33 | [Parameter()]
34 | [string]$Id = (New-Guid).ToString(),
35 | [Parameter()]
36 | [string]$Icon,
37 | [Parameter()]
38 | [Hashtable]$Style,
39 | [Parameter()]
40 | [string]$ClassName,
41 | [Parameter()]
42 | [string]$Size
43 | )
44 |
45 | End {
46 | @{
47 | assetId = $AssetId
48 | isPlugin = $true
49 | type = "ud-adaptivecard"
50 | id = $Id
51 |
52 | icon = $icon
53 | style = $Style
54 | className = $ClassName
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/Components/AdaptiveCards/components/component.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 |
4 | const UDComponent = props => {
5 | return <>>
6 | }
7 |
8 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/AdaptiveCards/components/index.js:
--------------------------------------------------------------------------------
1 | import UDComponent from './component';
2 | UniversalDashboard.register("ud-adcard", UDComponent);
--------------------------------------------------------------------------------
/Components/AdaptiveCards/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/AdaptiveCards/logo.png
--------------------------------------------------------------------------------
/Components/AdaptiveCards/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-material-design-icons",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "adaptivecards": "^3.0.2",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Components/AdaptiveCards/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
--------------------------------------------------------------------------------
/Components/Calendar/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Calendar/README.md:
--------------------------------------------------------------------------------
1 | ## PowerShell Universal App Calendar
2 |
3 | A calendar component for PowerShell Universal Apps.
4 |
5 | ## Installation
6 |
7 | You can install this component as a PowerShell module using PowerShellGet or via PowerShell Universal.
8 |
9 | ```powershell
10 | Install-Module Universal.Components.Calendar
11 | ```
12 |
13 | ## Usage
14 |
15 | ### Basic
16 |
17 | A basic calendar with events.
18 |
19 | ```powershell
20 | New-UDCalendar -Events @(
21 | New-UDCalendarEvent -Title "Run"
22 | New-UDCalendarEvent -Title "Run" -Start ((Get-Date).AddDays(1)) -AllDay
23 | )
24 | ```
25 |
26 | 
27 |
28 | ### Min\Max Time
29 |
30 | Specify the minimum and maximum time for the calendar.
31 |
32 | ```powershell
33 | New-UDCalendar -Events @(
34 | New-UDCalendarEvent -Title "Run"
35 | New-UDCalendarEvent -Title "Run" -Start ((Get-Date).AddDays(1)) -AllDay
36 | ) -View 'timeGridWeek' -SlotMinTime "08:00:00" -SlotMaxTime "19:00:00"
37 | ```
38 |
39 | ### DateClicked
40 |
41 | An event handler that is fired when a date is clicked. `$Body` will contain a JSON string with the date. `$EventData` will contain an object with the date's properties.
42 |
43 | ```powershell
44 | New-UDCalendar -Events @(
45 | New-UDCalendarEvent -Title "Run"
46 | New-UDCalendarEvent -Title "Run" -Start ((Get-Date).AddDays(1)) -AllDay
47 | ) -DateClicked {
48 | Show-UDToast $Body
49 | }
50 | ```
51 |
52 | 
53 |
54 | ### EventClicked
55 |
56 | An event handler that is fired when an event is clicked. `$Body` will contain a JSON string with the event. `$EventData` will contain an object with the event's properties.
57 |
58 | ```powershell
59 | New-UDCalendar -Events @(
60 | New-UDCalendarEvent -Title "Run"
61 | New-UDCalendarEvent -Title "Run" -Start ((Get-Date).AddDays(1)) -AllDay
62 | ) -EventClicked {
63 | Show-UDToast $Body
64 | }
65 | ```
66 |
67 | 
68 |
69 | ### Locale
70 |
71 | Localization of the calendar.
72 |
73 | ```powershell
74 | New-UDCalendar -Events @(
75 | New-UDCalendarEvent -Title "Run"
76 | New-UDCalendarEvent -Title "Run" -Start ((Get-Date).AddDays(1)) -AllDay
77 | ) -Locale 'fr'
78 | ```
79 |
80 | 
81 |
82 | ### Custom Event Rendering
83 |
84 | Use the `-Content` parameter of `New-UDCalendarEvent` to customize the rendering of an event.
85 |
86 | ```powershell
87 | New-UDCalendar -Events @(
88 | New-UDCalendarEvent -Content {
89 | New-UDAlert -Text 'Swim'
90 | }
91 | New-UDCalendarEvent -Title "Run" -Start ((Get-Date).AddDays(1)) -AllDay
92 | )
93 | ```
94 |
95 | 
96 |
97 | ## Development
98 |
99 | You will need NodeJS version 16.13.2 and the InvokeBuild module installed to build this module.
100 |
101 | You can run `Invoke-Build` within this directory to build this component.
102 |
103 | ```powershell
104 | Invoke-Build
105 | ```
106 |
107 | The output will be found within the output folder.
--------------------------------------------------------------------------------
/Components/Calendar/Universal.Components.Calendar.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest.
4 | RootModule = 'Universal.Components.Calendar.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '0.0.7'
8 |
9 | # Supported PSEditions
10 | # CompatiblePSEditions = @()
11 |
12 | # ID used to uniquely identify this module
13 | GUID = 'eda4d7a7-030f-4e7f-88ac-3cdc980e8ae7'
14 |
15 | # Author of this module
16 | Author = 'Ironman Software'
17 |
18 | # Company or vendor of this module
19 | CompanyName = 'Ironman Software'
20 |
21 | # Copyright statement for this module
22 | Copyright = '(c) Ironman Software. All rights reserved.'
23 |
24 | # Description of the functionality provided by this module
25 | Description = 'Calendar component for PowerShell Universal apps.'
26 |
27 | # Minimum version of the PowerShell engine required by this module
28 | # PowerShellVersion = ''
29 |
30 | # Name of the PowerShell host required by this module
31 | # PowerShellHostName = ''
32 |
33 | # Minimum version of the PowerShell host required by this module
34 | # PowerShellHostVersion = ''
35 |
36 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
37 | # DotNetFrameworkVersion = ''
38 |
39 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
40 | # ClrVersion = ''
41 |
42 | # Processor architecture (None, X86, Amd64) required by this module
43 | # ProcessorArchitecture = ''
44 |
45 | # Modules that must be imported into the global environment prior to importing this module
46 | # RequiredModules = @()
47 |
48 | # Assemblies that must be loaded prior to importing this module
49 | # RequiredAssemblies = @()
50 |
51 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
52 | # ScriptsToProcess = @()
53 |
54 | # Type files (.ps1xml) to be loaded when importing this module
55 | # TypesToProcess = @()
56 |
57 | # Format files (.ps1xml) to be loaded when importing this module
58 | # FormatsToProcess = @()
59 |
60 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
61 | # NestedModules = @()
62 |
63 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
64 | FunctionsToExport = @('New-UDCalendar', 'New-UDCalendarEvent')
65 |
66 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
67 | # CmdletsToExport = '*'
68 |
69 | # Variables to export from this module
70 | # VariablesToExport = '*'
71 |
72 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
73 | # AliasesToExport = '*'
74 |
75 | # DSC resources to export from this module
76 | # DscResourcesToExport = @()
77 |
78 | # List of all modules packaged with this module
79 | # ModuleList = @()
80 |
81 | # List of all files packaged with this module
82 | # FileList = @()
83 |
84 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
85 | PrivateData = @{
86 |
87 | PSData = @{
88 |
89 | # Tags applied to this module. These help with module discovery in online galleries.
90 | Tags = @("PowerShellUniversal", "App", "Calendar")
91 |
92 | # A URL to the license for this module.
93 | LicenseUri = 'https://github.com/ironmansoftware/universal-icons/blob/main/LICENSE'
94 |
95 | # A URL to the main website for this project.
96 | ProjectUri = 'https://github.com/ironmansoftware/universal-modules/tree/main/Components/Calendar'
97 |
98 | # A URL to an icon representing this module.
99 | IconUri = 'https://www.ironmansoftware.com/img/ps-icon.svg'
100 |
101 | # ReleaseNotes of this module
102 | # ReleaseNotes = ''
103 |
104 | # Prerelease string of this module
105 | # Prerelease = ''
106 |
107 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
108 | # RequireLicenseAcceptance = $false
109 |
110 | # External dependent modules of this module
111 | # ExternalModuleDependencies = @()
112 |
113 | } # End of PSData hashtable
114 |
115 | } # End of PrivateData hashtable
116 |
117 | # HelpInfo URI of this module
118 | # HelpInfoURI = ''
119 |
120 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
121 | # DefaultCommandPrefix = ''
122 |
123 | }
--------------------------------------------------------------------------------
/Components/Calendar/component.build.ps1:
--------------------------------------------------------------------------------
1 | task Build {
2 | $OutputPath = "$PSScriptRoot\output\Universal.Components.Calendar"
3 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
4 | Remove-Item -Path "$PSScriptRoot\public" -Force -ErrorAction SilentlyContinue -Recurse
5 | Set-Location "$PSScriptRoot"
6 |
7 | & {
8 | $ErrorActionPreference = 'SilentlyContinue'
9 | npm install
10 | npm run build
11 | }
12 |
13 | New-Item -Path $OutputPath -ItemType Directory
14 |
15 | Copy-Item $PSScriptRoot\public\*.* $OutputPath
16 | Copy-Item $PSScriptRoot\Universal.*.psd1 $OutputPath
17 | Copy-Item $PSScriptRoot\Universal.*.psm1 $OutputPath
18 | }
19 |
20 | task . Build
--------------------------------------------------------------------------------
/Components/Calendar/components/component.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { h } from 'preact';
3 | import { withComponentFeatures } from 'universal-dashboard'
4 | import FullCalendar from '@fullcalendar/react'
5 | import dayGridPlugin from '@fullcalendar/daygrid'
6 | import timeGridPlugin from '@fullcalendar/timegrid'
7 | import multimonthPlugin from '@fullcalendar/multimonth'
8 | import listPlugin from '@fullcalendar/list'
9 | import interactionPlugin from '@fullcalendar/interaction';
10 |
11 | import allLocales from '@fullcalendar/core/locales-all';
12 |
13 | const UDComponent = props => {
14 |
15 | const dateClicked = (arg) => {
16 | if (props.dateClicked == null) return
17 | props.dateClicked({
18 | date: arg.date,
19 | allDay: arg.allDay,
20 | dateStr: arg.dateStr
21 | })
22 | }
23 |
24 | const eventClicked = (arg) => {
25 | if (props.eventClicked == null) return
26 | props.eventClicked(arg.event)
27 | }
28 |
29 | const renderEventContent = (arg) => {
30 | if (arg.event.extendedProps.content) {
31 | return props.render(arg.event.extendedProps.content)
32 | }
33 | return {arg.event.title}
34 | }
35 |
36 | return (
37 |
60 | )
61 | }
62 |
63 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/Calendar/components/index.js:
--------------------------------------------------------------------------------
1 | import UDComponent from './component';
2 | UniversalDashboard.register("ud-calendar", UDComponent);
--------------------------------------------------------------------------------
/Components/Calendar/images/basic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Calendar/images/basic.png
--------------------------------------------------------------------------------
/Components/Calendar/images/customRender.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Calendar/images/customRender.png
--------------------------------------------------------------------------------
/Components/Calendar/images/eventClick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Calendar/images/eventClick.png
--------------------------------------------------------------------------------
/Components/Calendar/images/locale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Calendar/images/locale.png
--------------------------------------------------------------------------------
/Components/Calendar/images/onClick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Calendar/images/onClick.png
--------------------------------------------------------------------------------
/Components/Calendar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-calendar",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@fullcalendar/core": "^6.1.6",
15 | "@fullcalendar/daygrid": "^6.1.6",
16 | "@fullcalendar/interaction": "^6.1.6",
17 | "@fullcalendar/list": "^6.1.6",
18 | "@fullcalendar/multimonth": "^6.1.6",
19 | "@fullcalendar/react": "^6.1.6",
20 | "@fullcalendar/timegrid": "^6.1.6",
21 | "preact": "^10.15.0",
22 | "universal-dashboard": "^1.0.1"
23 | },
24 | "devDependencies": {
25 | "@babel/core": "7.1.2",
26 | "@babel/plugin-proposal-class-properties": "^7.1.0",
27 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
28 | "@babel/polyfill": "^7.0.0",
29 | "@babel/preset-env": "7.1.0",
30 | "@babel/preset-react": "7.0.0",
31 | "babel-loader": "8.0.4",
32 | "css-loader": "^0.28.7",
33 | "file-loader": "2.0.0",
34 | "style-loader": "0.23.1",
35 | "webpack": "4.21.0",
36 | "webpack-cli": "^3.3.10",
37 | "webpack-dev-server": "3.1.11"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Components/Calendar/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/README.md:
--------------------------------------------------------------------------------
1 | ## [Bootstrap Icons](https://react-icons.github.io/react-icons/icons?name=bs)
2 |
3 | ```powershell
4 | Install-Module Universal.Icons.Bootstrap
5 | New-UDBootstrapIcon -Icon "BsFillBox2Fill"
6 | ```
7 |
8 | ### Size
9 |
10 | Adjust the size of the icon.
11 |
12 | ```powershell
13 | New-UDBootstrapIcon -Icon "BsFillBox2Fill" -Size '20em'
14 | ```
15 |
16 | ### Styling
17 |
18 | Adjust the style of the icon.
19 |
20 | ```powershell
21 | New-UDBootstrapIcon -Icon "BsFillBox2Fill" -Style @{
22 | backgroundColor = "red"
23 | }
24 | ```
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/Universal.Icons.Bootstrap.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest.
4 | RootModule = 'Universal.Icons.Bootstrap.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '0.0.5'
8 |
9 | # Supported PSEditions
10 | # CompatiblePSEditions = @()
11 |
12 | # ID used to uniquely identify this module
13 | GUID = 'a18a3b57-7f5c-4865-bd42-b9b1aefe742b'
14 |
15 | # Author of this module
16 | Author = 'Ironman Software'
17 |
18 | # Company or vendor of this module
19 | CompanyName = 'Ironman Software'
20 |
21 | # Copyright statement for this module
22 | Copyright = '(c) Ironman Software. All rights reserved.'
23 |
24 | # Description of the functionality provided by this module
25 | Description = 'Bootstrap icons for PowerShell Universal apps.'
26 |
27 | # Minimum version of the PowerShell engine required by this module
28 | # PowerShellVersion = ''
29 |
30 | # Name of the PowerShell host required by this module
31 | # PowerShellHostName = ''
32 |
33 | # Minimum version of the PowerShell host required by this module
34 | # PowerShellHostVersion = ''
35 |
36 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
37 | # DotNetFrameworkVersion = ''
38 |
39 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
40 | # ClrVersion = ''
41 |
42 | # Processor architecture (None, X86, Amd64) required by this module
43 | # ProcessorArchitecture = ''
44 |
45 | # Modules that must be imported into the global environment prior to importing this module
46 | # RequiredModules = @()
47 |
48 | # Assemblies that must be loaded prior to importing this module
49 | # RequiredAssemblies = @()
50 |
51 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
52 | # ScriptsToProcess = @()
53 |
54 | # Type files (.ps1xml) to be loaded when importing this module
55 | # TypesToProcess = @()
56 |
57 | # Format files (.ps1xml) to be loaded when importing this module
58 | # FormatsToProcess = @()
59 |
60 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
61 | # NestedModules = @()
62 |
63 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
64 | FunctionsToExport = 'New-UDBootstrapIcon'
65 |
66 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
67 | # CmdletsToExport = '*'
68 |
69 | # Variables to export from this module
70 | # VariablesToExport = '*'
71 |
72 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
73 | # AliasesToExport = '*'
74 |
75 | # DSC resources to export from this module
76 | # DscResourcesToExport = @()
77 |
78 | # List of all modules packaged with this module
79 | # ModuleList = @()
80 |
81 | # List of all files packaged with this module
82 | # FileList = @()
83 |
84 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
85 | PrivateData = @{
86 |
87 | PSData = @{
88 |
89 | # Tags applied to this module. These help with module discovery in online galleries.
90 | Tags = @("PowerShellUniversal", "App", "Bootstrap")
91 |
92 | # A URL to the license for this module.
93 | LicenseUri = 'https://github.com/ironmansoftware/universal-modules/blob/main/LICENSE'
94 |
95 | # A URL to the main website for this project.
96 | ProjectUri = 'https://github.com/ironmansoftware/universal-modules/tree/main/Components/Icons.Bootstrap'
97 |
98 | # A URL to an icon representing this module.
99 | IconUri = 'https://raw.githubusercontent.com/ironmansoftware/universal-modules/main/Components/Icons.Bootstrap/logo.png'
100 |
101 | # ReleaseNotes of this module
102 | # ReleaseNotes = ''
103 |
104 | # Prerelease string of this module
105 | # Prerelease = ''
106 |
107 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
108 | # RequireLicenseAcceptance = $false
109 |
110 | # External dependent modules of this module
111 | # ExternalModuleDependencies = @()
112 |
113 | } # End of PSData hashtable
114 |
115 | } # End of PrivateData hashtable
116 |
117 | # HelpInfo URI of this module
118 | # HelpInfoURI = ''
119 |
120 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
121 | # DefaultCommandPrefix = ''
122 |
123 | }
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/Universal.Icons.Bootstrap.psm1:
--------------------------------------------------------------------------------
1 | $IndexJs = Get-ChildItem "$PSScriptRoot\index.*.bundle.js"
2 | $AssetId = [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($IndexJs.FullName)
3 |
4 | function New-UDBootstrapIcon {
5 | <#
6 | .SYNOPSIS
7 | Bootstrap icons for PowerShell Universal apps.
8 |
9 | .DESCRIPTION
10 | Bootstrap icons for PowerShell Universal apps.
11 |
12 | .PARAMETER Id
13 | The ID for this component. If not specified, a GUID will be generated.
14 |
15 | .PARAMETER Icon
16 | The name of the icon to use. See https://react-icons.github.io/react-icons/icons?name=bs for icons.
17 |
18 | .PARAMETER Style
19 | A hashtable for CSS styles to apply.
20 |
21 | .PARAMETER ClassName
22 | A CSS class to apply to this component.
23 |
24 | .EXAMPLE
25 | New-UDBootstrapIcon -Icon 'BsFillAlarmFill'
26 |
27 | .EXAMPLE
28 | New-UDBootstrapIcon -Icon 'BsFillAlarmFill' -Style @{
29 | FontSize = '100px'
30 | }
31 | #>#
32 | param(
33 | [Parameter()]
34 | [string]$Id = (New-Guid).ToString(),
35 | [Parameter()]
36 | [string]$Icon,
37 | [Parameter()]
38 | [Hashtable]$Style,
39 | [Parameter()]
40 | [string]$ClassName,
41 | [Parameter()]
42 | [string]$Size
43 | )
44 |
45 | End {
46 | @{
47 | assetId = $AssetId
48 | isPlugin = $true
49 | type = "ud-bsicon"
50 | id = $Id
51 |
52 | icon = $icon
53 | style = $Style
54 | className = $ClassName
55 | size = $Size
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/components/component.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 | import * as Icons from 'react-icons/bs';
4 | import { IconContext } from 'react-icons/lib';
5 | const UDComponent = props => {
6 | return
7 | {React.createElement(Icons[props.icon])}
8 |
9 | }
10 |
11 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/components/index.js:
--------------------------------------------------------------------------------
1 | import UDComponent from './component';
2 | UniversalDashboard.register("ud-bsicon", UDComponent);
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Icons.Bootstrap/logo.png
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-feather-icons",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "react-icons": "^4.8.0",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
--------------------------------------------------------------------------------
/Components/Icons.Bootstrap/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
--------------------------------------------------------------------------------
/Components/Icons.Feather/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Icons.Feather/README.md:
--------------------------------------------------------------------------------
1 | ## [Feather Icons](https://react-icons.github.io/react-icons/icons?name=fi)
2 |
3 | ```powershell
4 | Install-Module Universal.Icons.Feather
5 | New-UDFeatherIcon -Icon "FiActivity"
6 | ```
7 |
--------------------------------------------------------------------------------
/Components/Icons.Feather/Universal.Icons.Feather.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest.
4 | RootModule = 'Universal.Icons.Feather.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '0.0.5'
8 |
9 | # Supported PSEditions
10 | # CompatiblePSEditions = @()
11 |
12 | # ID used to uniquely identify this module
13 | GUID = '291e6e99-10ee-4f90-88bc-f477a33aa759'
14 |
15 | # Author of this module
16 | Author = 'Ironman Software'
17 |
18 | # Company or vendor of this module
19 | CompanyName = 'Ironman Software'
20 |
21 | # Copyright statement for this module
22 | Copyright = '(c) Ironman Software. All rights reserved.'
23 |
24 | # Description of the functionality provided by this module
25 | Description = 'Feather icons for PowerShell Universal apps.'
26 |
27 | # Minimum version of the PowerShell engine required by this module
28 | # PowerShellVersion = ''
29 |
30 | # Name of the PowerShell host required by this module
31 | # PowerShellHostName = ''
32 |
33 | # Minimum version of the PowerShell host required by this module
34 | # PowerShellHostVersion = ''
35 |
36 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
37 | # DotNetFrameworkVersion = ''
38 |
39 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
40 | # ClrVersion = ''
41 |
42 | # Processor architecture (None, X86, Amd64) required by this module
43 | # ProcessorArchitecture = ''
44 |
45 | # Modules that must be imported into the global environment prior to importing this module
46 | # RequiredModules = @()
47 |
48 | # Assemblies that must be loaded prior to importing this module
49 | # RequiredAssemblies = @()
50 |
51 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
52 | # ScriptsToProcess = @()
53 |
54 | # Type files (.ps1xml) to be loaded when importing this module
55 | # TypesToProcess = @()
56 |
57 | # Format files (.ps1xml) to be loaded when importing this module
58 | # FormatsToProcess = @()
59 |
60 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
61 | # NestedModules = @()
62 |
63 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
64 | FunctionsToExport = 'New-UDFeatherIcon'
65 |
66 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
67 | # CmdletsToExport = '*'
68 |
69 | # Variables to export from this module
70 | # VariablesToExport = '*'
71 |
72 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
73 | # AliasesToExport = '*'
74 |
75 | # DSC resources to export from this module
76 | # DscResourcesToExport = @()
77 |
78 | # List of all modules packaged with this module
79 | # ModuleList = @()
80 |
81 | # List of all files packaged with this module
82 | # FileList = @()
83 |
84 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
85 | PrivateData = @{
86 |
87 | PSData = @{
88 |
89 | # Tags applied to this module. These help with module discovery in online galleries.
90 | Tags = @("PowerShellUniversal", "App", "Feather")
91 |
92 | # A URL to the license for this module.
93 | LicenseUri = 'https://github.com/ironmansoftware/universal-modules/blob/main/LICENSE'
94 |
95 | # A URL to the main website for this project.
96 | ProjectUri = 'https://github.com/ironmansoftware/universal-modules/tree/main/Components/Icons.Feather'
97 |
98 | # A URL to an icon representing this module.
99 | IconUri = 'https://www.ironmansoftware.com/img/ps-icon.svg'
100 |
101 | # ReleaseNotes of this module
102 | # ReleaseNotes = ''
103 |
104 | # Prerelease string of this module
105 | # Prerelease = ''
106 |
107 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
108 | # RequireLicenseAcceptance = $false
109 |
110 | # External dependent modules of this module
111 | # ExternalModuleDependencies = @()
112 |
113 | } # End of PSData hashtable
114 |
115 | } # End of PrivateData hashtable
116 |
117 | # HelpInfo URI of this module
118 | # HelpInfoURI = ''
119 |
120 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
121 | # DefaultCommandPrefix = ''
122 |
123 | }
--------------------------------------------------------------------------------
/Components/Icons.Feather/Universal.Icons.Feather.psm1:
--------------------------------------------------------------------------------
1 | $IndexJs = Get-ChildItem "$PSScriptRoot\index.*.bundle.js"
2 | $AssetId = [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($IndexJs.FullName)
3 |
4 | function New-UDFeatherIcon {
5 | <#
6 | .SYNOPSIS
7 | Feather icons for PowerShell Universal apps.
8 |
9 | .DESCRIPTION
10 | Feather icons for PowerShell Universal apps.
11 |
12 | .PARAMETER Id
13 | The ID for this component. If not specified, a GUID will be generated.
14 |
15 | .PARAMETER Icon
16 | The name of the icon to use. See https://react-icons.github.io/react-icons/icons?name=fi for icons.
17 |
18 | .PARAMETER Style
19 | A hashtable for CSS styles to apply.
20 |
21 | .PARAMETER ClassName
22 | A CSS class to apply to this component.
23 |
24 | .EXAMPLE
25 | New-UDFeatherIcon -Icon 'FiActivity'
26 |
27 | .EXAMPLE
28 | New-UDFeatherIcon -Icon 'FiActivity' -Style @{
29 | FontSize = '100px'
30 | }
31 | #>#
32 | param(
33 | [Parameter()]
34 | [string]$Id = (New-Guid).ToString(),
35 | [Parameter()]
36 | [string]$Icon,
37 | [Parameter()]
38 | [Hashtable]$Style,
39 | [Parameter()]
40 | [string]$ClassName
41 | )
42 |
43 | End {
44 | @{
45 | assetId = $AssetId
46 | isPlugin = $true
47 | type = "ud-fiicon"
48 | id = $Id
49 |
50 | icon = $icon
51 | style = $Style
52 | className = $ClassName
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/Components/Icons.Feather/components/component.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 | import * as Icons from 'react-icons/fi';
4 | import { IconContext } from 'react-icons/lib';
5 | const UDComponent = props => {
6 | return
7 | {React.createElement(Icons[props.icon])}
8 |
9 | }
10 |
11 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/Icons.Feather/components/index.js:
--------------------------------------------------------------------------------
1 | import UDComponent from './component';
2 | UniversalDashboard.register("ud-fiicon", UDComponent);
--------------------------------------------------------------------------------
/Components/Icons.Feather/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-feather-icons",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "react-icons": "^4.8.0",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
--------------------------------------------------------------------------------
/Components/Icons.Feather/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
--------------------------------------------------------------------------------
/Components/Icons.MaterialDesign/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Icons.MaterialDesign/README.md:
--------------------------------------------------------------------------------
1 | ## [Material Design Icons](https://react-icons.github.io/react-icons/icons?name=md)
2 |
3 | ```powershell
4 | Install-Module Universal.Icons.MaterialDesign
5 | New-UDMaterialDesignIcon -Icon "Md123"
6 | ```
--------------------------------------------------------------------------------
/Components/Icons.MaterialDesign/Universal.Icons.MaterialDesign.psm1:
--------------------------------------------------------------------------------
1 | $IndexJs = Get-ChildItem "$PSScriptRoot\index.*.bundle.js"
2 | $AssetId = [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($IndexJs.FullName)
3 |
4 | function New-UDMaterialDesignIcon {
5 | <#
6 | .SYNOPSIS
7 | Material Design icons for PowerShell Universal apps.
8 |
9 | .DESCRIPTION
10 | Material Design icons for PowerShell Universal apps.
11 |
12 | .PARAMETER Id
13 | The ID for this component. If not specified, a GUID will be generated.
14 |
15 | .PARAMETER Icon
16 | The name of the icon to use. See https://react-icons.github.io/react-icons/icons?name=md for icons.
17 |
18 | .PARAMETER Style
19 | A hashtable for CSS styles to apply.
20 |
21 | .PARAMETER ClassName
22 | A CSS class to apply to this component.
23 |
24 | .EXAMPLE
25 | New-UDMaterialDesignIcon -Icon 'Md123'
26 |
27 | .EXAMPLE
28 | New-UDMaterialDesignIcon -Icon 'Md123' -Style @{
29 | FontSize = '100px'
30 | }
31 | #>#
32 | param(
33 | [Parameter()]
34 | [string]$Id = (New-Guid).ToString(),
35 | [Parameter()]
36 | [string]$Icon,
37 | [Parameter()]
38 | [Hashtable]$Style,
39 | [Parameter()]
40 | [string]$ClassName,
41 | [Parameter()]
42 | [string]$Size
43 | )
44 |
45 | End {
46 | @{
47 | assetId = $AssetId
48 | isPlugin = $true
49 | type = "ud-mdicon"
50 | id = $Id
51 |
52 | icon = $icon
53 | style = $Style
54 | className = $ClassName
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/Components/Icons.MaterialDesign/components/component.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 | import * as MDIcons from 'react-icons/md';
4 | import { IconContext } from 'react-icons/lib';
5 | const UDComponent = props => {
6 | return
7 | {React.createElement(MDIcons[props.icon])}
8 |
9 | }
10 |
11 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/Icons.MaterialDesign/components/index.js:
--------------------------------------------------------------------------------
1 | import UDComponent from './component';
2 | UniversalDashboard.register("ud-mdicon", UDComponent);
--------------------------------------------------------------------------------
/Components/Icons.MaterialDesign/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Icons.MaterialDesign/logo.png
--------------------------------------------------------------------------------
/Components/Icons.MaterialDesign/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-material-design-icons",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "react-icons": "^4.8.0",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Components/Icons.MaterialDesign/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
--------------------------------------------------------------------------------
/Components/Icons.Tabler/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Icons.Tabler/README.md:
--------------------------------------------------------------------------------
1 | ## [Tabler Icons](https://react-icons.github.io/react-icons/icons?name=tb)
2 |
3 | ```powershell
4 | Install-Module Universal.Icons.Tabler
5 | New-UDTablerIcon -Icon "Tb3DRotate"
6 | ```
--------------------------------------------------------------------------------
/Components/Icons.Tabler/Universal.Icons.Tabler.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest.
4 | RootModule = 'Universal.Icons.Tabler.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '0.0.3'
8 |
9 | # Supported PSEditions
10 | # CompatiblePSEditions = @()
11 |
12 | # ID used to uniquely identify this module
13 | GUID = 'be8935d2-1120-4f0a-a883-f9a88e417c79'
14 |
15 | # Author of this module
16 | Author = 'Ironman Software'
17 |
18 | # Company or vendor of this module
19 | CompanyName = 'Ironman Software'
20 |
21 | # Copyright statement for this module
22 | Copyright = '(c) Ironman Software. All rights reserved.'
23 |
24 | # Description of the functionality provided by this module
25 | Description = 'Tabler icons for PowerShell Universal apps.'
26 |
27 | # Minimum version of the PowerShell engine required by this module
28 | # PowerShellVersion = ''
29 |
30 | # Name of the PowerShell host required by this module
31 | # PowerShellHostName = ''
32 |
33 | # Minimum version of the PowerShell host required by this module
34 | # PowerShellHostVersion = ''
35 |
36 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
37 | # DotNetFrameworkVersion = ''
38 |
39 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
40 | # ClrVersion = ''
41 |
42 | # Processor architecture (None, X86, Amd64) required by this module
43 | # ProcessorArchitecture = ''
44 |
45 | # Modules that must be imported into the global environment prior to importing this module
46 | # RequiredModules = @()
47 |
48 | # Assemblies that must be loaded prior to importing this module
49 | # RequiredAssemblies = @()
50 |
51 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
52 | # ScriptsToProcess = @()
53 |
54 | # Type files (.ps1xml) to be loaded when importing this module
55 | # TypesToProcess = @()
56 |
57 | # Format files (.ps1xml) to be loaded when importing this module
58 | # FormatsToProcess = @()
59 |
60 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
61 | # NestedModules = @()
62 |
63 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
64 | FunctionsToExport = 'New-UDTablerIcon'
65 |
66 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
67 | # CmdletsToExport = '*'
68 |
69 | # Variables to export from this module
70 | # VariablesToExport = '*'
71 |
72 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
73 | # AliasesToExport = '*'
74 |
75 | # DSC resources to export from this module
76 | # DscResourcesToExport = @()
77 |
78 | # List of all modules packaged with this module
79 | # ModuleList = @()
80 |
81 | # List of all files packaged with this module
82 | # FileList = @()
83 |
84 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
85 | PrivateData = @{
86 |
87 | PSData = @{
88 |
89 | # Tags applied to this module. These help with module discovery in online galleries.
90 | Tags = @("PowerShellUniversal", "App", "Tabler")
91 |
92 | # A URL to the license for this module.
93 | LicenseUri = 'https://github.com/ironmansoftware/universal-modules/blob/main/LICENSE'
94 |
95 | # A URL to the main website for this project.
96 | ProjectUri = 'https://github.com/ironmansoftware/universal-modules/tree/main/Components/Icons.Tabler'
97 |
98 | # A URL to an icon representing this module.
99 | IconUri = 'https://raw.githubusercontent.com/ironmansoftware/universal-modules/main/Components/Icons.Tabler/logo.svg'
100 |
101 | # ReleaseNotes of this module
102 | # ReleaseNotes = ''
103 |
104 | # Prerelease string of this module
105 | # Prerelease = ''
106 |
107 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
108 | # RequireLicenseAcceptance = $false
109 |
110 | # External dependent modules of this module
111 | # ExternalModuleDependencies = @()
112 |
113 | } # End of PSData hashtable
114 |
115 | } # End of PrivateData hashtable
116 |
117 | # HelpInfo URI of this module
118 | # HelpInfoURI = ''
119 |
120 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
121 | # DefaultCommandPrefix = ''
122 |
123 | }
--------------------------------------------------------------------------------
/Components/Icons.Tabler/Universal.Icons.Tabler.psm1:
--------------------------------------------------------------------------------
1 | $IndexJs = Get-ChildItem "$PSScriptRoot\index.*.bundle.js"
2 | $AssetId = [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($IndexJs.FullName)
3 |
4 | function New-UDTablerIcon {
5 | <#
6 | .SYNOPSIS
7 | Tabler icons for PowerShell Universal apps.
8 |
9 | .DESCRIPTION
10 | Tabler icons for PowerShell Universal apps.
11 |
12 | .PARAMETER Id
13 | The ID for this component. If not specified, a GUID will be generated.
14 |
15 | .PARAMETER Icon
16 | The name of the icon to use. See https://react-icons.github.io/react-icons/icons?name=tb for icons.
17 |
18 | .PARAMETER Style
19 | A hashtable for CSS styles to apply.
20 |
21 | .PARAMETER ClassName
22 | A CSS class to apply to this component.
23 |
24 | .EXAMPLE
25 | New-UDTablerIcon -Icon 'Tb360View'
26 |
27 | .EXAMPLE
28 | New-UDTablerIcon -Icon 'Tb360View' -Style @{
29 | FontSize = '100px'
30 | }
31 | #>#
32 | param(
33 | [Parameter()]
34 | [string]$Id = (New-Guid).ToString(),
35 | [Parameter()]
36 | [string]$Icon,
37 | [Parameter()]
38 | [Hashtable]$Style,
39 | [Parameter()]
40 | [string]$ClassName
41 | )
42 |
43 | End {
44 | @{
45 | assetId = $AssetId
46 | isPlugin = $true
47 | type = "ud-tbicon"
48 | id = $Id
49 |
50 | icon = $icon
51 | style = $Style
52 | className = $ClassName
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/Components/Icons.Tabler/components/component.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 | import * as MDIcons from 'react-icons/tb';
4 | import { IconContext } from 'react-icons/lib';
5 | const UDComponent = props => {
6 | return
7 | {React.createElement(MDIcons[props.icon])}
8 |
9 | }
10 |
11 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/Icons.Tabler/components/index.js:
--------------------------------------------------------------------------------
1 | import UDComponent from './component';
2 | UniversalDashboard.register("ud-tbicon", UDComponent);
--------------------------------------------------------------------------------
/Components/Icons.Tabler/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-tabler-icons",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "react-icons": "^4.8.0",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
--------------------------------------------------------------------------------
/Components/Icons.Tabler/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
--------------------------------------------------------------------------------
/Components/Joyride/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Joyride/README.md:
--------------------------------------------------------------------------------
1 | ## PowerShell Universal App Joyride
2 |
3 | Create awesome tours for your app!
4 |
5 | Showcase your app to new users or explain functionality of new features.
6 |
7 | ## Installation
8 |
9 | You can install this component as a PowerShell module using PowerShellGet or via PowerShell Universal.
10 |
11 | ```powershell
12 | Install-Module Universal.Components.Joyride
13 | ```
14 |
15 | ## Usage
16 |
17 | ### Basic
18 |
19 | ```powershell
20 | New-UDJoyride -Steps {
21 | New-UDJoyrideStep -Target '#element1' -Content { 'This is element 1'}
22 | New-UDJoyrideStep -Target '#element2' -Content { 'This is element 2'}
23 | New-UDJoyrideStep -Target '#element3' -Content { 'This is element 3'}
24 | } -Id 'joyride' -Continuous -ScrollToFirstStep -ShowProgress -ShowSkipButton -Run $false
25 |
26 | New-UDButton -OnClick {
27 | Set-UDElement -Id 'joyride' -Properties @{
28 | run = $true
29 | }
30 | } -Text 'Start'
31 |
32 | New-UDPaper -Elevation 3 -Children {
33 | New-UDTypography -Text 'Element 1'
34 | } -Id 'element1'
35 | New-UDPaper -Elevation 3 -Children {
36 | New-UDTypography -Text 'Element 2'
37 | } -Id 'element2'
38 | New-UDPaper -Elevation 3 -Children {
39 | New-UDTypography -Text 'Element 3'
40 | } -Id 'element3'
41 | ```
42 |
43 | 
--------------------------------------------------------------------------------
/Components/Joyride/component.build.ps1:
--------------------------------------------------------------------------------
1 | task Build {
2 | $OutputPath = "$PSScriptRoot\output\Universal.Components.Joyride"
3 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
4 | Remove-Item -Path "$PSScriptRoot\public" -Force -ErrorAction SilentlyContinue -Recurse
5 | Set-Location "$PSScriptRoot"
6 |
7 | & {
8 | $ErrorActionPreference = 'SilentlyContinue'
9 | npm install
10 | npm run build
11 | }
12 |
13 | New-Item -Path $OutputPath -ItemType Directory
14 |
15 | Copy-Item $PSScriptRoot\public\*.* $OutputPath
16 | Copy-Item $PSScriptRoot\Universal.*.psd1 $OutputPath
17 | Copy-Item $PSScriptRoot\Universal.*.psm1 $OutputPath
18 | }
19 |
20 | task . Build
--------------------------------------------------------------------------------
/Components/Joyride/components/index.js:
--------------------------------------------------------------------------------
1 | import Joyride from './joyride';
2 |
3 | UniversalDashboard.register("ud-joyride", Joyride);
--------------------------------------------------------------------------------
/Components/Joyride/components/joyride.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 | import Joyride from 'react-joyride';
4 |
5 | const UDComponent = props => {
6 | return
7 | }
8 |
9 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/Joyride/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-joyride",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "react-joyride": "^2.5.4",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
--------------------------------------------------------------------------------
/Components/Joyride/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Joyride/screenshot.png
--------------------------------------------------------------------------------
/Components/Joyride/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
--------------------------------------------------------------------------------
/Components/Kbar/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Kbar/Universal.Components.Kbar.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest.
4 | RootModule = 'Universal.Components.Kbar.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '0.0.1'
8 |
9 | # Supported PSEditions
10 | # CompatiblePSEditions = @()
11 |
12 | # ID used to uniquely identify this module
13 | GUID = '9fbe94b2-9f07-4067-96bc-fa20701d3fd6'
14 |
15 | # Author of this module
16 | Author = 'Ironman Software'
17 |
18 | # Company or vendor of this module
19 | CompanyName = 'Ironman Software'
20 |
21 | # Copyright statement for this module
22 | Copyright = '(c) Ironman Software. All rights reserved.'
23 |
24 | # Description of the functionality provided by this module
25 | Description = 'A command+k interface for for PowerShell Universal apps.'
26 |
27 | # Minimum version of the PowerShell engine required by this module
28 | # PowerShellVersion = ''
29 |
30 | # Name of the PowerShell host required by this module
31 | # PowerShellHostName = ''
32 |
33 | # Minimum version of the PowerShell host required by this module
34 | # PowerShellHostVersion = ''
35 |
36 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
37 | # DotNetFrameworkVersion = ''
38 |
39 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
40 | # ClrVersion = ''
41 |
42 | # Processor architecture (None, X86, Amd64) required by this module
43 | # ProcessorArchitecture = ''
44 |
45 | # Modules that must be imported into the global environment prior to importing this module
46 | # RequiredModules = @()
47 |
48 | # Assemblies that must be loaded prior to importing this module
49 | # RequiredAssemblies = @()
50 |
51 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
52 | # ScriptsToProcess = @()
53 |
54 | # Type files (.ps1xml) to be loaded when importing this module
55 | # TypesToProcess = @()
56 |
57 | # Format files (.ps1xml) to be loaded when importing this module
58 | # FormatsToProcess = @()
59 |
60 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
61 | # NestedModules = @()
62 |
63 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
64 | FunctionsToExport = @(
65 | 'New-UDKBar',
66 | 'New-UDKBarAction'
67 | )
68 |
69 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
70 | # CmdletsToExport = '*'
71 |
72 | # Variables to export from this module
73 | # VariablesToExport = '*'
74 |
75 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
76 | # AliasesToExport = '*'
77 |
78 | # DSC resources to export from this module
79 | # DscResourcesToExport = @()
80 |
81 | # List of all modules packaged with this module
82 | # ModuleList = @()
83 |
84 | # List of all files packaged with this module
85 | # FileList = @()
86 |
87 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
88 | PrivateData = @{
89 |
90 | PSData = @{
91 |
92 | # Tags applied to this module. These help with module discovery in online galleries.
93 | Tags = @("PowerShellUniversal", "App", "KBar")
94 |
95 | # A URL to the license for this module.
96 | LicenseUri = 'https://github.com/ironmansoftware/universal-icons/blob/main/LICENSE'
97 |
98 | # A URL to the main website for this project.
99 | ProjectUri = 'https://github.com/ironmansoftware/universal-modules/tree/main/Components/Kbar'
100 |
101 | # A URL to an icon representing this module.
102 | IconUri = 'https://www.ironmansoftware.com/img/ps-icon.svg'
103 |
104 | # ReleaseNotes of this module
105 | # ReleaseNotes = ''
106 |
107 | # Prerelease string of this module
108 | # Prerelease = ''
109 |
110 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
111 | # RequireLicenseAcceptance = $false
112 |
113 | # External dependent modules of this module
114 | # ExternalModuleDependencies = @()
115 |
116 | } # End of PSData hashtable
117 |
118 | } # End of PrivateData hashtable
119 |
120 | # HelpInfo URI of this module
121 | # HelpInfoURI = ''
122 |
123 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
124 | # DefaultCommandPrefix = ''
125 |
126 | }
--------------------------------------------------------------------------------
/Components/Kbar/Universal.Components.Kbar.psm1:
--------------------------------------------------------------------------------
1 | $IndexJs = Get-ChildItem "$PSScriptRoot\index.*.bundle.js"
2 | $AssetId = [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($IndexJs.FullName)
3 |
4 | $IndexMap = Get-ChildItem "$PSScriptRoot\index.*.bundle.map"
5 | [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($IndexMap.FullName) | Out-Null
6 |
7 | function New-UDKBar {
8 | <#
9 | .SYNOPSIS
10 | A chart component for PowerShell Universal apps.
11 |
12 | .DESCRIPTION
13 | A chart component for PowerShell Universal apps.
14 |
15 | .PARAMETER Id
16 | The ID for this component. If not specified, a GUID will be generated.
17 |
18 | #>
19 | param(
20 | [Parameter()]
21 | [string]$Id = (New-Guid).ToString(),
22 | [Parameter(Mandatory)]
23 | [Hashtable[]]$Action,
24 | [Parameter(Mandatory)]
25 | [Endpoint]$OnPerform,
26 | [Parameter()]
27 | [Alias("Content")]
28 | [ScriptBlock]$Children
29 | )
30 |
31 | End {
32 | $OnPerform.Register($Id, $PSCmdlet)
33 |
34 | @{
35 | assetId = $AssetId
36 | isPlugin = $true
37 | type = "ud-kbar"
38 | id = $Id
39 |
40 | children = & $Children
41 | action = $Action
42 | onPerform = $OnPerform
43 | }
44 | }
45 | }
46 |
47 | function New-UDKBarAction {
48 | param(
49 | [Parameter()]
50 | [string]$Id = [Guid]::NewGuid(),
51 | [Parameter(Mandatory)]
52 | [string]$Name,
53 | [Parameter()]
54 | [string[]]$Shortcut,
55 | [Parameter()]
56 | [string]$Keywords,
57 | [Parameter()]
58 | [string]$Section,
59 | [Parameter()]
60 | [Hashtable]$Icon,
61 | [Parameter()]
62 | [string]$Subtitle
63 | )
64 |
65 | End {
66 | @{
67 | id = $Id
68 | name = $Name
69 | shortcut = $Shortcut
70 | keywords = $Keywords
71 | section = $Section
72 | icon = $Icon
73 | subtitle = $Subtitle
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/Components/Kbar/component.build.ps1:
--------------------------------------------------------------------------------
1 | task Build {
2 | $OutputPath = "$PSScriptRoot\output\Universal.Components.Recharts"
3 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
4 | Remove-Item -Path "$PSScriptRoot\public" -Force -ErrorAction SilentlyContinue -Recurse
5 | Set-Location "$PSScriptRoot"
6 |
7 | & {
8 | $ErrorActionPreference = 'SilentlyContinue'
9 | npm install
10 | npm run build
11 | }
12 |
13 | New-Item -Path $OutputPath -ItemType Directory
14 |
15 | Copy-Item $PSScriptRoot\public\*.* $OutputPath
16 | Copy-Item $PSScriptRoot\Universal.*.psd1 $OutputPath
17 | Copy-Item $PSScriptRoot\Universal.*.psm1 $OutputPath
18 | }
19 |
20 | task . Build
--------------------------------------------------------------------------------
/Components/Kbar/components/index.js:
--------------------------------------------------------------------------------
1 | import Kbar from './component';
2 |
3 | UniversalDashboard.register("ud-kbar", Kbar);
--------------------------------------------------------------------------------
/Components/Kbar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-kbar",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "kbar": "^0.1.0-beta.40",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
--------------------------------------------------------------------------------
/Components/Kbar/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | },
32 | {
33 | type: 'javascript/auto',
34 | test: /\.mjs$/,
35 | use: []
36 | }
37 | ]
38 | },
39 | externals: {
40 | UniversalDashboard: 'UniversalDashboard',
41 | $: "$",
42 | 'react': 'react',
43 | 'react-dom': 'reactdom'
44 | },
45 | resolve: {
46 | extensions: ['.json', '.js', '.jsx']
47 | },
48 | devtool: 'source-map',
49 | devServer: {
50 | disableHostCheck: true,
51 | historyApiFallback: true,
52 | port: 10000,
53 | // hot: true,
54 | compress: true,
55 | publicPath: '/',
56 | stats: "minimal"
57 | },
58 | plugins: [
59 | ]
60 | };
61 | }
--------------------------------------------------------------------------------
/Components/Loader/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Loader/README.md:
--------------------------------------------------------------------------------
1 | ## PowerShell Universal App Recharts
2 |
3 | 23 loader components built on [react-spinners](https://www.davidhu.io/react-spinners/storybook/?path=/docs/barloader--main) for PowerShell Universal Apps.
4 |
5 | ## Installation
6 |
7 | You can install this component as a PowerShell module using PowerShellGet or via PowerShell Universal.
8 |
9 | ```powershell
10 | Install-Module Universal.Components.Loader
11 | ```
12 |
13 | ## Usage
14 |
15 | ```powershell
16 | New-UDLayout -Columns 4 -Content {
17 | @(
18 | New-UDLoader -Bar -Style @{ position = 'relative' }
19 | New-UDLoader -Beat -Style @{ position = 'relative' }
20 | New-UDLoader -Bounce -Style @{ position = 'relative' }
21 | New-UDLoader -Circle -Style @{ position = 'relative' }
22 | New-UDLoader -ClimbingBox -Style @{ position = 'relative' }
23 | New-UDLoader -Clip -Style @{ position = 'relative' }
24 | New-UDLoader -Clock -Style @{ position = 'relative' }
25 | New-UDLoader -Dot -Style @{ position = 'relative' }
26 | New-UDLoader -Fade -Style @{ position = 'relative' }
27 | New-UDLoader -Grid -Style @{ position = 'relative' }
28 | New-UDLoader -Hash -Style @{ position = 'relative' }
29 | New-UDLoader -Moon -Style @{ position = 'relative' }
30 | New-UDLoader -Pacman -Style @{ position = 'relative' }
31 | New-UDLoader -Propagate -Style @{ position = 'relative' }
32 | New-UDLoader -Puff -Style @{ position = 'relative' }
33 | New-UDLoader -Pulse -Style @{ position = 'relative' }
34 | New-UDLoader -Ring -Style @{ position = 'relative' }
35 | New-UDLoader -Rotate -Style @{ position = 'relative' }
36 | New-UDLoader -Scale -Style @{ position = 'relative' }
37 | New-UDLoader -Skew -Style @{ position = 'relative' }
38 | New-UDLoader -Square -Style @{ position = 'relative' }
39 | New-UDLoader -Sync -Style @{ position = 'relative' }
40 | ) | ForEach-Object {
41 | New-UDElement -Content { $_ } -Tag 'div' -Attributes @{
42 | style = @{
43 | height = "50px"
44 | }
45 | }
46 | }
47 | }
48 | ```
49 |
50 | 
51 |
52 | ## Development
53 |
54 | You will need NodeJS version 16.13.2 and the InvokeBuild module installed to build this module.
55 |
56 | You can run `Invoke-Build` within this directory to build this component.
57 |
58 | ```powershell
59 | Invoke-Build
60 | ```
61 |
62 | The output will be found within the output folder.
--------------------------------------------------------------------------------
/Components/Loader/Universal.Components.Loader.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest.
4 | RootModule = 'Universal.Components.Loader.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '0.0.1'
8 |
9 | # Supported PSEditions
10 | # CompatiblePSEditions = @()
11 |
12 | # ID used to uniquely identify this module
13 | GUID = '03b483ff-7332-4bd8-8b2c-2a5a1927b66e'
14 |
15 | # Author of this module
16 | Author = 'Ironman Software'
17 |
18 | # Company or vendor of this module
19 | CompanyName = 'Ironman Software'
20 |
21 | # Copyright statement for this module
22 | Copyright = '(c) Ironman Software. All rights reserved.'
23 |
24 | # Description of the functionality provided by this module
25 | Description = 'A loader component for PowerShell Universal apps.'
26 |
27 | # Minimum version of the PowerShell engine required by this module
28 | # PowerShellVersion = ''
29 |
30 | # Name of the PowerShell host required by this module
31 | # PowerShellHostName = ''
32 |
33 | # Minimum version of the PowerShell host required by this module
34 | # PowerShellHostVersion = ''
35 |
36 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
37 | # DotNetFrameworkVersion = ''
38 |
39 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
40 | # ClrVersion = ''
41 |
42 | # Processor architecture (None, X86, Amd64) required by this module
43 | # ProcessorArchitecture = ''
44 |
45 | # Modules that must be imported into the global environment prior to importing this module
46 | # RequiredModules = @()
47 |
48 | # Assemblies that must be loaded prior to importing this module
49 | # RequiredAssemblies = @()
50 |
51 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
52 | # ScriptsToProcess = @()
53 |
54 | # Type files (.ps1xml) to be loaded when importing this module
55 | # TypesToProcess = @()
56 |
57 | # Format files (.ps1xml) to be loaded when importing this module
58 | # FormatsToProcess = @()
59 |
60 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
61 | # NestedModules = @()
62 |
63 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
64 | FunctionsToExport = @(
65 | 'New-UDLoader'
66 | )
67 |
68 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
69 | # CmdletsToExport = '*'
70 |
71 | # Variables to export from this module
72 | # VariablesToExport = '*'
73 |
74 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
75 | # AliasesToExport = '*'
76 |
77 | # DSC resources to export from this module
78 | # DscResourcesToExport = @()
79 |
80 | # List of all modules packaged with this module
81 | # ModuleList = @()
82 |
83 | # List of all files packaged with this module
84 | # FileList = @()
85 |
86 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
87 | PrivateData = @{
88 |
89 | PSData = @{
90 |
91 | # Tags applied to this module. These help with module discovery in online galleries.
92 | Tags = @("PowerShellUniversal", "App", "Loader")
93 |
94 | # A URL to the license for this module.
95 | LicenseUri = 'https://github.com/ironmansoftware/universal-icons/blob/main/LICENSE'
96 |
97 | # A URL to the main website for this project.
98 | ProjectUri = 'https://github.com/ironmansoftware/universal-modules/tree/main/Components/Loader'
99 |
100 | # A URL to an icon representing this module.
101 | IconUri = 'https://www.ironmansoftware.com/img/ps-icon.svg'
102 |
103 | # ReleaseNotes of this module
104 | # ReleaseNotes = ''
105 |
106 | # Prerelease string of this module
107 | # Prerelease = ''
108 |
109 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
110 | # RequireLicenseAcceptance = $false
111 |
112 | # External dependent modules of this module
113 | # ExternalModuleDependencies = @()
114 |
115 | } # End of PSData hashtable
116 |
117 | } # End of PrivateData hashtable
118 |
119 | # HelpInfo URI of this module
120 | # HelpInfoURI = ''
121 |
122 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
123 | # DefaultCommandPrefix = ''
124 |
125 | }
--------------------------------------------------------------------------------
/Components/Loader/component.build.ps1:
--------------------------------------------------------------------------------
1 | task Build {
2 | $OutputPath = "$PSScriptRoot\output\Universal.Components.Loader"
3 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
4 | Remove-Item -Path "$PSScriptRoot\public" -Force -ErrorAction SilentlyContinue -Recurse
5 | Set-Location "$PSScriptRoot"
6 |
7 | & {
8 | $ErrorActionPreference = 'SilentlyContinue'
9 | npm install
10 | npm run build
11 | }
12 |
13 | New-Item -Path $OutputPath -ItemType Directory
14 |
15 | Copy-Item $PSScriptRoot\public\*.* $OutputPath
16 | Copy-Item $PSScriptRoot\Universal.*.psd1 $OutputPath
17 | Copy-Item $PSScriptRoot\Universal.*.psm1 $OutputPath
18 | }
19 |
20 | task . Build
--------------------------------------------------------------------------------
/Components/Loader/components/component.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 |
4 | import * as Loaders from 'react-spinners';
5 |
6 | const UDComponent = props => {
7 | var loader = Loaders[props.loaderType + 'Loader']
8 | debugger
9 | return React.createElement(loader, props)
10 | }
11 |
12 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/Loader/components/index.js:
--------------------------------------------------------------------------------
1 | import Loader from './component';
2 |
3 | UniversalDashboard.register("ud-loader", Loader);
--------------------------------------------------------------------------------
/Components/Loader/loaders.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/Loader/loaders.gif
--------------------------------------------------------------------------------
/Components/Loader/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-kbar",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "react-spinners": "0.13.8",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
--------------------------------------------------------------------------------
/Components/Loader/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | },
32 | {
33 | type: 'javascript/auto',
34 | test: /\.mjs$/,
35 | use: []
36 | }
37 | ]
38 | },
39 | externals: {
40 | UniversalDashboard: 'UniversalDashboard',
41 | $: "$",
42 | 'react': 'react',
43 | 'react-dom': 'reactdom'
44 | },
45 | resolve: {
46 | extensions: ['.json', '.js', '.jsx']
47 | },
48 | devtool: 'source-map',
49 | devServer: {
50 | disableHostCheck: true,
51 | historyApiFallback: true,
52 | port: 10000,
53 | // hot: true,
54 | compress: true,
55 | publicPath: '/',
56 | stats: "minimal"
57 | },
58 | plugins: [
59 | ]
60 | };
61 | }
--------------------------------------------------------------------------------
/Components/Recharts/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": [
8 | ">0.5%",
9 | "not dead"
10 | ]
11 | }
12 | }
13 | ],
14 | "@babel/preset-react"
15 | ],
16 | "plugins": [
17 | "@babel/plugin-proposal-class-properties",
18 | "@babel/plugin-syntax-dynamic-import"
19 | ]
20 | }
--------------------------------------------------------------------------------
/Components/Recharts/component.build.ps1:
--------------------------------------------------------------------------------
1 | task Build {
2 | $OutputPath = "$PSScriptRoot\output\Universal.Components.Recharts"
3 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
4 | Remove-Item -Path "$PSScriptRoot\public" -Force -ErrorAction SilentlyContinue -Recurse
5 | Set-Location "$PSScriptRoot"
6 |
7 | & {
8 | $ErrorActionPreference = 'SilentlyContinue'
9 | npm install
10 | npm run build
11 | }
12 |
13 | New-Item -Path $OutputPath -ItemType Directory
14 |
15 | Copy-Item $PSScriptRoot\public\*.* $OutputPath
16 | Copy-Item $PSScriptRoot\Universal.*.psd1 $OutputPath
17 | Copy-Item $PSScriptRoot\Universal.*.psm1 $OutputPath
18 | }
19 |
20 | task . Build
--------------------------------------------------------------------------------
/Components/Recharts/components/chart.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 | import {
4 | LineChart,
5 | AreaChart,
6 | BarChart,
7 | CartesianGrid,
8 | Area,
9 | Legend,
10 | XAxis,
11 | YAxis,
12 | Line,
13 | Bar,
14 | PieChart,
15 | Pie,
16 | ScatterChart,
17 | Scatter,
18 | Tooltip
19 | } from 'recharts';
20 |
21 | const renderFeature = (feature, props) => {
22 | switch (feature) {
23 | case 'ud-rechart-axis':
24 | if (props.axis === 'x') {
25 | return
26 | } else {
27 | return
28 | }
29 | case 'ud-rechart-area':
30 | return
31 | case 'ud-rechart-legend':
32 | return
33 | case 'ud-rechart-line':
34 | return
35 | case 'ud-rechart-bar':
36 | return
37 | case 'ud-rechart-pie':
38 | return
39 | case 'ud-rechart-scatter':
40 | return
41 | case 'ud-rechart-tooltip':
42 | return
43 | default:
44 |
45 | return null;
46 | }
47 | }
48 |
49 | const UDComponent = props => {
50 | const chartProps = {
51 | width: props.width,
52 | height: props.height,
53 | data: props.data,
54 | margin: props.margin
55 | }
56 |
57 | const children = props.children.map((child) => renderFeature(child.type, child))
58 |
59 | switch (props.chartType) {
60 | case 'line':
61 | return {children}
62 | case 'area':
63 | return {children}
64 | case 'bar':
65 | return {children}
66 | case 'pie':
67 | return {children}
68 | case 'scatter':
69 | return {children}
70 |
71 | }
72 | }
73 |
74 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/Recharts/components/index.js:
--------------------------------------------------------------------------------
1 | import Chart from './chart';
2 |
3 | UniversalDashboard.register("ud-rechart", Chart);
--------------------------------------------------------------------------------
/Components/Recharts/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ud-calendar",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "build": "webpack -p --env production",
9 | "dev": "webpack-dev-server --config webpack.config.js -p --env development"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "recharts": "^2.5.0",
15 | "universal-dashboard": "^1.0.1"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "7.1.2",
19 | "@babel/plugin-proposal-class-properties": "^7.1.0",
20 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
21 | "@babel/polyfill": "^7.0.0",
22 | "@babel/preset-env": "7.1.0",
23 | "@babel/preset-react": "7.0.0",
24 | "babel-loader": "8.0.4",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "2.0.0",
27 | "style-loader": "0.23.1",
28 | "webpack": "4.21.0",
29 | "webpack-cli": "^3.3.10",
30 | "webpack-dev-server": "3.1.11"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Components/Recharts/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
--------------------------------------------------------------------------------
/Components/TinyMCE/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets" : [
3 | [
4 | "@babel/preset-env", {
5 | "targets":{
6 | "browsers":[
7 | ">0.5%",
8 | "not dead"
9 | ]
10 | }
11 | }
12 | ],
13 | "@babel/preset-react"
14 | ],
15 | "plugins": [
16 | "@babel/plugin-proposal-class-properties",
17 | "@babel/plugin-syntax-dynamic-import"
18 | ]
19 | }
--------------------------------------------------------------------------------
/Components/TinyMCE/.gitignore:
--------------------------------------------------------------------------------
1 | /public/tinymce/
2 |
3 | # Logs
4 | logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (http://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # Typescript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # Yarn Integrity file
57 | .yarn-integrity
58 |
59 | # dotenv environment variables file
60 | .env
61 |
62 | public/
63 | output/
64 |
65 | classes/bin
66 | classes/obj
--------------------------------------------------------------------------------
/Components/TinyMCE/Components/BundledEditor.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Editor } from '@tinymce/tinymce-react';
3 | import { Helmet } from 'react-helmet';
4 |
5 | // TinyMCE so the global var exists
6 | // eslint-disable-next-line no-unused-vars
7 | import tinymce from 'tinymce/tinymce';
8 | // DOM model
9 | import 'tinymce/models/dom/model'
10 | // Theme
11 | import 'tinymce/themes/silver';
12 | // Toolbar icons
13 | import 'tinymce/icons/default';
14 |
15 | // importing the plugin js.
16 | // if you use a plugin that is not listed here the editor will fail to load
17 | import 'tinymce/plugins/advlist';
18 | import 'tinymce/plugins/anchor';
19 | import 'tinymce/plugins/autolink';
20 | import 'tinymce/plugins/autoresize';
21 | import 'tinymce/plugins/autosave';
22 | import 'tinymce/plugins/charmap';
23 | import 'tinymce/plugins/code';
24 | import 'tinymce/plugins/codesample';
25 | import 'tinymce/plugins/directionality';
26 | import 'tinymce/plugins/emoticons';
27 | import 'tinymce/plugins/fullscreen';
28 | import 'tinymce/plugins/help';
29 | import 'tinymce/plugins/image';
30 | import 'tinymce/plugins/importcss';
31 | import 'tinymce/plugins/insertdatetime';
32 | import 'tinymce/plugins/link';
33 | import 'tinymce/plugins/lists';
34 | import 'tinymce/plugins/media';
35 | import 'tinymce/plugins/nonbreaking';
36 | import 'tinymce/plugins/pagebreak';
37 | import 'tinymce/plugins/preview';
38 | import 'tinymce/plugins/quickbars';
39 | import 'tinymce/plugins/save';
40 | import 'tinymce/plugins/searchreplace';
41 | import 'tinymce/plugins/table';
42 | import 'tinymce/plugins/template';
43 | import 'tinymce/plugins/visualblocks';
44 | import 'tinymce/plugins/visualchars';
45 | import 'tinymce/plugins/wordcount';
46 |
47 | // importing plugin resources
48 | import 'tinymce/plugins/emoticons/js/emojis';
49 |
50 | // Content styles, including inline UI like fake cursors
51 | /* eslint import/no-webpack-loader-syntax: off */
52 | import contentCss from '!!raw-loader!tinymce/skins/content/default/content.min.css';
53 | import contentUiCss from '!!raw-loader!tinymce/skins/ui/oxide/content.min.css';
54 |
55 | import darkContentCss from '!!raw-loader!tinymce/skins/content/dark/content.min.css';
56 | import darkContentUiCss from '!!raw-loader!tinymce/skins/ui/oxide-dark/content.min.css';
57 |
58 | import skin from '!!raw-loader!tinymce/skins/ui/oxide/skin.min.css';
59 | import darkSkin from '!!raw-loader!tinymce/skins/ui/oxide-dark/skin.min.css';
60 |
61 | export default function BundledEditor(props) {
62 | const { init, ...rest } = props;
63 |
64 | const css = localStorage.getItem("theme") === "light" ? contentCss : darkContentCss;
65 | const uiCss = localStorage.getItem("theme") === "light" ? contentUiCss : darkContentUiCss;
66 |
67 | // note that skin and content_css is disabled to avoid the normal
68 | // loading process and is instead loaded as a string via content_style
69 | return (
70 | <>
71 |
72 |
73 |
74 |
83 | >
84 |
85 | );
86 | }
--------------------------------------------------------------------------------
/Components/TinyMCE/Components/component.jsx:
--------------------------------------------------------------------------------
1 | import React, { useRef } from 'react';
2 | import { withComponentFeatures } from 'universal-dashboard'
3 | import BundledEditor from './BundledEditor';
4 |
5 | const UDComponent = props => {
6 | const editorRef = useRef(null);
7 |
8 | return ( editorRef.current = editor}
10 | {...props}
11 | onEditorChange={(value) => {
12 | if (props.onEditorChange) {
13 | props.onEditorChange(value)
14 | }
15 | }}
16 | />)
17 | }
18 |
19 | export default withComponentFeatures(UDComponent)
--------------------------------------------------------------------------------
/Components/TinyMCE/Components/index.js:
--------------------------------------------------------------------------------
1 |
2 | import UDComponent from './component';
3 | UniversalDashboard.register("ud-tinymce", UDComponent);
--------------------------------------------------------------------------------
/Components/TinyMCE/README.md:
--------------------------------------------------------------------------------
1 | # TinyMCE for PowerShell Universal Apps
2 |
3 | This component integrates the [TinyMCE](https://www.tiny.cloud) React component into PowerShell Universal.
4 |
5 | 
6 |
7 | ## Installation
8 |
9 | ```powershell
10 | Install-Module Universal.Components.TinyMCE
11 | ```
12 |
13 | ## Usage
14 |
15 | ```powershell
16 | New-UDTinyMCE
17 | ```
18 |
19 | ## Parameters
20 |
21 | - `Init` - Hashtable of TinyMCE [initialization options](https://www.tiny.cloud/docs/tinymce/6/basic-setup/)
22 | - `InitialValue` - The initial value of the editor
23 | - `OnEditorChange` - An event handler that receives the value of the editor when it changes
--------------------------------------------------------------------------------
/Components/TinyMCE/Universal.Components.TinyMCE.psd1:
--------------------------------------------------------------------------------
1 | #
2 | # Module manifest for module 'UniversalDashboard.Component'
3 | #
4 | # Generated by: adamr
5 | #
6 | # Generated on: 25/09/2020
7 | #
8 |
9 | @{
10 |
11 | # Script module or binary module file associated with this manifest.
12 | RootModule = 'Universal.Components.TinyMCE.psm1'
13 |
14 | # Version number of this module.
15 | ModuleVersion = '1.0.0'
16 |
17 | # Supported PSEditions
18 | # CompatiblePSEditions = @()
19 |
20 | # ID used to uniquely identify this module
21 | GUID = '0beda748-fa8d-4374-af29-156c53ff6db3'
22 |
23 | # Author of this module
24 | Author = 'Ironman Software'
25 |
26 | # Company or vendor of this module
27 | CompanyName = 'Ironman Software'
28 |
29 | # Copyright statement for this module
30 | Copyright = '(c) Ironman Software. All rights reserved.'
31 |
32 | # Description of the functionality provided by this module
33 | Description = 'TinyMCE Editor for PowerShell Universal apps.'
34 |
35 | # Minimum version of the PowerShell engine required by this module
36 | # PowerShellVersion = ''
37 |
38 | # Name of the PowerShell host required by this module
39 | # PowerShellHostName = ''
40 |
41 | # Minimum version of the PowerShell host required by this module
42 | # PowerShellHostVersion = ''
43 |
44 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45 | # DotNetFrameworkVersion = ''
46 |
47 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48 | # ClrVersion = ''
49 |
50 | # Processor architecture (None, X86, Amd64) required by this module
51 | # ProcessorArchitecture = ''
52 |
53 | # Modules that must be imported into the global environment prior to importing this module
54 | # RequiredModules = @()
55 |
56 | # Assemblies that must be loaded prior to importing this module
57 | # RequiredAssemblies = @()
58 |
59 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
60 | # ScriptsToProcess = @()
61 |
62 | # Type files (.ps1xml) to be loaded when importing this module
63 | # TypesToProcess = @()
64 |
65 | # Format files (.ps1xml) to be loaded when importing this module
66 | # FormatsToProcess = @()
67 |
68 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69 | # NestedModules = @()
70 |
71 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72 | FunctionsToExport = 'New-UDTinyMCE'
73 |
74 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75 | # CmdletsToExport = '*'
76 |
77 | # Variables to export from this module
78 | # VariablesToExport = '*'
79 |
80 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
81 | # AliasesToExport = '*'
82 |
83 | # DSC resources to export from this module
84 | # DscResourcesToExport = @()
85 |
86 | # List of all modules packaged with this module
87 | # ModuleList = @()
88 |
89 | # List of all files packaged with this module
90 | # FileList = @()
91 |
92 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
93 | PrivateData = @{
94 |
95 | PSData = @{
96 |
97 | # Tags applied to this module. These help with module discovery in online galleries.
98 | Tags = @('PowerShellUniversal', "Apps", "TinyMCE")
99 |
100 | # A URL to the license for this module.
101 | LicenseUri = 'https://github.com/ironmansoftware/universal-modules/blob/main/LICENSE'
102 |
103 | # A URL to the main website for this project.
104 | ProjectUri = 'https://github.com/ironmansoftware/universal-modules/tree/main/Components/TinyMCE'
105 |
106 | # A URL to an icon representing this module.
107 | IconUri = 'https://www.ironmansoftware.com/img/ps-icon.svg'
108 |
109 | # ReleaseNotes of this module
110 | # ReleaseNotes = ''
111 |
112 | # Prerelease string of this module
113 | # Prerelease = ''
114 |
115 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
116 | # RequireLicenseAcceptance = $false
117 |
118 | # External dependent modules of this module
119 | # ExternalModuleDependencies = @()
120 |
121 | } # End of PSData hashtable
122 |
123 | } # End of PrivateData hashtable
124 |
125 | # HelpInfo URI of this module
126 | # HelpInfoURI = ''
127 |
128 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
129 | # DefaultCommandPrefix = ''
130 |
131 | }
132 |
133 |
--------------------------------------------------------------------------------
/Components/TinyMCE/Universal.Components.TinyMCE.psm1:
--------------------------------------------------------------------------------
1 | $IndexJs = Get-ChildItem "$PSScriptRoot\index.*.bundle.js"
2 | $AssetId = [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($IndexJs.FullName)
3 |
4 | Get-ChildItem "$PSScriptRoot\*.bundle.js" | ForEach-Object {
5 | if ($_.Name -eq $IndexJS.Name) {
6 | return
7 | }
8 | [UniversalDashboard.Services.AssetService]::Instance.RegisterAsset($_.FullName) | Out-Null
9 | }
10 |
11 |
12 | function New-UDTinyMCE {
13 | param(
14 | [Parameter()]
15 | [string]$Id = (New-Guid).ToString(),
16 | [Parameter()]
17 | [string]$InitialValue,
18 | [Parameter()]
19 | [Hashtable]$Init = @{},
20 | [Parameter()]
21 | [Endpoint]$OnEditorChange
22 | )
23 |
24 | End {
25 |
26 | if ($OnEditorChange) {
27 | $OnEditorChange.Register($Id, $PSCmdlet)
28 | }
29 |
30 | @{
31 | assetId = $AssetId
32 | isPlugin = $true
33 | type = "ud-tinymce"
34 | id = $Id
35 |
36 | initialValue = $InitialValue
37 | init = $init
38 | onEditorChange = $OnEditorChange
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Components/TinyMCE/component.build.ps1:
--------------------------------------------------------------------------------
1 | $OutputPath = "$PSScriptRoot/output/Universal.Components.TinyMCE"
2 |
3 | task Build {
4 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
5 | Remove-Item -Path "$PSScriptRoot/public" -Force -ErrorAction SilentlyContinue -Recurse
6 | Set-Location $PSScriptRoot
7 |
8 | & {
9 | $ErrorActionPreference = 'SilentlyContinue'
10 | npm install
11 | npm run build
12 | }
13 |
14 | New-Item -Path $OutputPath -ItemType Directory
15 |
16 | Copy-Item $PSScriptRoot\public\*.* $OutputPath
17 | Copy-Item $PSScriptRoot\Universal.*.psd1 $OutputPath
18 | Copy-Item $PSScriptRoot\Universal.*.psm1 $OutputPath
19 | }
20 |
21 | task . Build
22 |
--------------------------------------------------------------------------------
/Components/TinyMCE/github.ps1:
--------------------------------------------------------------------------------
1 |
2 | Install-Module InvokeBuild -Force -Scope CurrentUser
3 | Invoke-Build -Task @('Build', 'Publish')
--------------------------------------------------------------------------------
/Components/TinyMCE/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "component",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "build": "webpack --env production"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "@tinymce/tinymce-react": "^4.1.0",
13 | "fs-extra": "^10.1.0",
14 | "raw-loader": "^4.0.2",
15 | "react-helmet": "^6.1.0",
16 | "tinymce": "^6.1.0",
17 | "universal-dashboard": "^1.0.1"
18 | },
19 | "devDependencies": {
20 | "@babel/core": "7.1.2",
21 | "@babel/plugin-proposal-class-properties": "^7.1.0",
22 | "@babel/plugin-syntax-dynamic-import": "^7.0.0",
23 | "@babel/polyfill": "^7.0.0",
24 | "@babel/preset-env": "7.1.0",
25 | "@babel/preset-react": "7.0.0",
26 | "babel-loader": "8.0.4",
27 | "css-loader": "^0.28.7",
28 | "file-loader": "2.0.0",
29 | "style-loader": "0.23.1",
30 | "webpack": "4.46.0",
31 | "webpack-cli": "^4.10.0"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Components/TinyMCE/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ironmansoftware/universal-modules/4e6dc549804bc24d816dfb0b4fef2f147f9478a2/Components/TinyMCE/screenshot.png
--------------------------------------------------------------------------------
/Components/TinyMCE/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 |
4 | var BUILD_DIR = path.resolve(__dirname, 'public');
5 | var SRC_DIR = path.resolve(__dirname);
6 | var APP_DIR = path.resolve(__dirname, 'src/app');
7 |
8 | module.exports = (env) => {
9 | const isDev = env == 'development' || env == 'isolated';
10 |
11 | return {
12 | entry: {
13 | 'index': __dirname + '/Components/index.js'
14 | },
15 | output: {
16 | path: BUILD_DIR,
17 | filename: isDev ? 'component.[name].bundle.js' : '[name].[hash].bundle.js',
18 | sourceMapFilename: '[name].[hash].bundle.map',
19 | publicPath: "",
20 | library: 'udcomponent',
21 | libraryTarget: 'var'
22 | },
23 | module: {
24 | rules: [
25 | { test: /\.css$/, loader: "style-loader!css-loader" },
26 | { test: /\.(js|jsx)$/, exclude: [/node_modules/, /public/], loader: 'babel-loader' },
27 | {
28 | test: /\.(eot|ttf|woff2?|otf|svg|png)$/, loader: 'file-loader', options: {
29 | name: '[name].[ext]'
30 | }
31 | }
32 | ]
33 | },
34 | externals: {
35 | UniversalDashboard: 'UniversalDashboard',
36 | $: "$",
37 | 'react': 'react',
38 | 'react-dom': 'reactdom'
39 | },
40 | resolve: {
41 | extensions: ['.json', '.js', '.jsx']
42 | },
43 | devtool: 'source-map',
44 | devServer: {
45 | disableHostCheck: true,
46 | historyApiFallback: true,
47 | port: 10000,
48 | // hot: true,
49 | compress: true,
50 | publicPath: '/',
51 | stats: "minimal"
52 | },
53 | plugins: [
54 | ]
55 | };
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/Components/components.build.ps1:
--------------------------------------------------------------------------------
1 | task MaterialDesign {
2 | $OutputPath = "$PSScriptRoot\Icons.MaterialDesign\output\Universal.Icons.MaterialDesign"
3 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
4 | Remove-Item -Path "$PSScriptRoot\Icons.MaterialDesign\public" -Force -ErrorAction SilentlyContinue -Recurse
5 | Set-Location "$PSScriptRoot\Icons.MaterialDesign"
6 |
7 | & {
8 | $ErrorActionPreference = 'SilentlyContinue'
9 | npm install
10 | npm run build
11 | }
12 |
13 | New-Item -Path $OutputPath -ItemType Directory
14 |
15 | Copy-Item $PSScriptRoot\Icons.MaterialDesign\public\*.* $OutputPath
16 | Copy-Item $PSScriptRoot\Icons.MaterialDesign\Universal.*.psd1 $OutputPath
17 | Copy-Item $PSScriptRoot\Icons.MaterialDesign\Universal.*.psm1 $OutputPath
18 | }
19 |
20 | task Feather {
21 | $OutputPath = "$PSScriptRoot\Icons.Feather\output\Universal.Icons.Feather"
22 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
23 | Remove-Item -Path "$PSScriptRoot\Icons.Feather\public" -Force -ErrorAction SilentlyContinue -Recurse
24 | Set-Location "$PSScriptRoot\Icons.Feather"
25 |
26 | & {
27 | $ErrorActionPreference = 'SilentlyContinue'
28 | npm install
29 | npm run build
30 | }
31 |
32 | New-Item -Path $OutputPath -ItemType Directory
33 |
34 | Copy-Item $PSScriptRoot\Icons.Feather\public\*.* $OutputPath
35 | Copy-Item $PSScriptRoot\Icons.Feather\Universal.*.psd1 $OutputPath
36 | Copy-Item $PSScriptRoot\Icons.Feather\Universal.*.psm1 $OutputPath
37 | }
38 |
39 | task Bootstrap {
40 | $OutputPath = "$PSScriptRoot\Icons.Bootstrap\output\Universal.Icons.Bootstrap"
41 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
42 | Remove-Item -Path "$PSScriptRoot\Icons.Bootstrap\public" -Force -ErrorAction SilentlyContinue -Recurse
43 | Set-Location "$PSScriptRoot\Icons.Bootstrap"
44 |
45 | & {
46 | $ErrorActionPreference = 'SilentlyContinue'
47 | npm install
48 | npm run build
49 | }
50 |
51 | New-Item -Path $OutputPath -ItemType Directory
52 |
53 | Copy-Item $PSScriptRoot\Icons.Bootstrap\public\*.* $OutputPath
54 | Copy-Item $PSScriptRoot\Icons.Bootstrap\Universal.*.psd1 $OutputPath
55 | Copy-Item $PSScriptRoot\Icons.Bootstrap\Universal.*.psm1 $OutputPath
56 | }
57 |
58 | task Tabler {
59 | $OutputPath = "$PSScriptRoot\Icons.Tabler\output\Universal.Icons.Tabler"
60 | Remove-Item -Path $OutputPath -Force -ErrorAction SilentlyContinue -Recurse
61 | Remove-Item -Path "$PSScriptRoot\Icons.Tabler\public" -Force -ErrorAction SilentlyContinue -Recurse
62 | Set-Location "$PSScriptRoot\Icons.Tabler"
63 |
64 | & {
65 | $ErrorActionPreference = 'SilentlyContinue'
66 | npm install
67 | npm run build
68 | }
69 |
70 | New-Item -Path $OutputPath -ItemType Directory
71 |
72 | Copy-Item $PSScriptRoot\Icons.Tabler\public\*.* $OutputPath
73 | Copy-Item $PSScriptRoot\Icons.Tabler\Universal.*.psd1 $OutputPath
74 | Copy-Item $PSScriptRoot\Icons.Tabler\Universal.*.psm1 $OutputPath
75 | }
76 |
77 | task Calendar {
78 | Invoke-Build -File "$PSScriptRoot\Calendar\component.build.ps1"
79 | }
80 |
81 | task Recharts {
82 | Invoke-Build -File "$PSScriptRoot\Recharts\component.build.ps1"
83 | }
84 |
85 | task TinyMCE {
86 | Invoke-Build -File "$PSScriptRoot\TinyMCE\component.build.ps1"
87 | }
88 |
89 | task Joyride {
90 | Invoke-Build -File "$PSScriptRoot\Joyride\component.build.ps1"
91 | }
92 |
93 | task Loader {
94 | Invoke-Build -File "$PSScriptRoot\Loader\component.build.ps1"
95 | }
96 |
97 |
98 | task . MaterialDesign, Feather, Bootstrap, Tabler, Calendar, TinyMCE, Recharts, Joyride, Loader
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Ironman Software, LLC
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Notifications/Universal.Notifications/.universal/scripts.ps1:
--------------------------------------------------------------------------------
1 | New-PSUScript -Module "Universal.Notifications" -Command "Send-PSUFailedJobEmail" -Description "Sends an email when a job fails."
2 | New-PSUScript -Module "Universal.Notifications" -Command "Send-PSUFailedJobSlackNotification" -Description "Sends a Slack notification when a job fails."
3 | New-PSUScript -Module "Universal.Notifications" -Command "Send-PSUFailedJobTeamsNotification" -Description "Sends a Microsoft Teams notification when a job fails."
4 |
--------------------------------------------------------------------------------
/Notifications/Universal.Notifications/README.md:
--------------------------------------------------------------------------------
1 | # Universal.Notifications
2 |
3 | A collection of functions for sending notifications in PowerShell Universal. This module requires PowerShell Universal v4.
4 |
5 | ## Send-PSUFailedJobEmail
6 |
7 | This notification can be used with a trigger to send a failed job email. You will need to configure the following variables for this to work.
8 |
9 | ```powershell
10 | New-PSUVariable -Name "EmailServer" -Value '' -Description "The SMTP server to use for email. "
11 | New-PSUVariable -Name "EmailUser" -Value '' -Description "The username for authenticaitng to your email server. "
12 | New-PSUVariable -Name "ToEmail" -Value '' -Description "The email address to send email notifications to. "
13 | New-PSUVariable -Name "FromEmail" -Value '' -Description "The email address to send notifications from."
14 | New-PSUVariable -Name "EmailPassword" -Vault "BuiltInLocalVault" -Description "The password for authenticating against the email server. "
15 | ```
16 |
17 | Once the variables are configured, you can setup a trigger to send emails.
18 |
19 | ```powershell
20 | New-PSUTrigger -Name "Failed Job Email" -EventType "JobFailed" -TriggerScript "Universal.Notifications\Send-PSUFailedJobEmail"
21 | ```
22 |
23 | ## Send-PSUFailedJobSlackNotification
24 |
25 | This command can be used with a trigger to send a failed job Slack notification. You will need to configure the following variables for this to work.
26 |
27 | ```powershell
28 | New-PSUVariable -Name "SlackUrl" -Description "The Slack web hook URL."
29 | ```
30 |
31 |
32 | Once the variables are configured, you can setup a trigger to send notifications.
33 |
34 | ```powershell
35 | New-PSUTrigger -Name "Failed Job Slack Notification" -EventType "JobFailed" -TriggerScript "Universal.Notifications\Send-PSUFailedJobSlackNotification"
36 | ```
37 |
38 | ## Send-PSUFailedJobTeamsNotification
39 |
40 | This command can be used with a trigger to send a failed job Microsoft Teams notification. You will need to configure the following variables for this to work.
41 |
42 | ```powershell
43 | New-PSUVariable -Name "TeamsUrl" -Description "The Microsoft teams web hook URL."
44 | ```
45 |
46 | Once the variables are configured, you can setup a trigger to send notifications.
47 |
48 | ```powershell
49 | New-PSUTrigger -Name "Failed Job Teams Notification" -EventType "JobFailed" -TriggerScript "Universal.Notifications\Send-PSUFailedJobTeamsNotification"
50 | ```
51 |
--------------------------------------------------------------------------------
/Notifications/Universal.Notifications/Universal.Notifications.psm1:
--------------------------------------------------------------------------------
1 | function Send-PSUFailedJobEmail {
2 | param($Job)
3 |
4 | $JobId = $Job.Id
5 | $Script = $Job.ScriptFullPath
6 | $Message = "The job $JobId for script $Script failed."
7 |
8 | Email {
9 | EmailBody -FontFamily 'Calibri' -Size 15 {
10 | EmailTextBox {
11 | $Message
12 | }
13 | EmailHtml {
14 | "View Job"
15 | }
16 | }
17 | } -To $ToEmail -From $FromEmail -Server $EmailServer -Subject $Message -Username $EmailUser -Password $EmailPassword
18 | }
19 |
20 | function Send-PSUFailedJobSlackNotification {
21 | param($Job)
22 |
23 | if ($Job -eq $null) {
24 | return
25 | }
26 |
27 | $JobId = $Job.Id
28 | $Script = $Job.ScriptFullPath
29 | $Message = "The job $JobId for script $Script failed."
30 | $payload = @{
31 | text = $Message
32 | blocks = @(
33 | @{
34 | type = "section"
35 | text = @{
36 | type = "plain_text"
37 | text = $Message
38 | }
39 | }
40 | @{
41 | type = "actions"
42 | 'block_id' = "actionblock123"
43 | elements = @(
44 | @{
45 | type = "button"
46 | text = @{
47 | type = "plain_text"
48 | text = "View Job"
49 | }
50 | url = "$ApiUrl/admin/automation/jobs/$JobId"
51 | }
52 | )
53 | }
54 |
55 | )
56 | } | ConvertTo-Json -Depth 10
57 |
58 | Invoke-RestMethod $SlackUrl -Body $payload -Method POST -ContentType 'application/json' | Out-Null
59 | }
60 |
61 | function Send-PSUFailedJobTeamsNotification {
62 | param($Job)
63 |
64 | if ($Job -eq $null) {
65 | return
66 | }
67 |
68 | $ViewJobButton = New-TeamsButton -Name 'View Job' -Link "$ApiUrl/admin/automation/jobs/$($Job.Id)"
69 |
70 | $Section = New-TeamsSection -Buttons $ViewJobButton
71 |
72 | Send-TeamsMessage -Uri $TeamsUrl -MessageTitle "Job $($Job.Id) failed while running script $($Job.ScriptFullPath)" -MessageText "The job was started at $($Job.StartTime) in the $($job.Environment) environment" -Sections $Section
73 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Components
2 |
3 | Additional components to add to your PowerShell Universal apps.
4 |
5 | - [Bootstrap Icons](/Components/Icons.Bootstrap/)
6 | - [Calendar](/Components/Calendar/)
7 | - [Feather Icons](/Components/Icons.Feather/)
8 | - [Joyride](/Components/Joyride/)
9 | - [Loader](/Components/Loader/)
10 | - [Material Design Icons](/Components/Icons.MaterialDesign/)
11 | - [Tabler Icons](/Components/Icons.Tabler/)
12 | - [TinyMCE](/Components/TinyMCE)
13 | - [Recharts](/Components/Recharts)
14 |
15 | ## Gallery
16 |
17 | Modules in this repository are published to the PowerShell Gallery. Modules will also appear on the [Ironman Software PowerShell Universal Modules](https://ironmansoftware.com/powershell-universal/modules) page and within PowerShell Universal.
18 |
19 | Many of these modules require PowerShell Universal version 4 or later.
20 |
21 | ## Contributing
22 |
23 | We are open to issues and pull requests to this repository.
24 |
--------------------------------------------------------------------------------
/Security/Universal.Security.ActiveDirectoryRoles/.universal/roles.ps1:
--------------------------------------------------------------------------------
1 | Get-ADGroup | ForEach-Object {
2 | New-PSURole -Name $_.Name -ClaimType 'http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid' -ClaimValue $_.SID.Value
3 | }
--------------------------------------------------------------------------------
/Security/Universal.Security.ActiveDirectoryRoles/README.md:
--------------------------------------------------------------------------------
1 | # Active Directory Roles
2 |
3 | Generates and assigns roles based on Active Directory groups.
4 |
5 | ## Installation
6 |
7 | Installing this module will invoke `Get-ADGroup` against the current domain in PowerShell Universal. For each group found, a role will be created and automatically assigned to users via claim to role mapping.
8 |
9 | ## Requirements
10 |
11 | - PowerShell Universal v4
12 | - Active Directory Module
13 | - Windows Authentication
--------------------------------------------------------------------------------
/Utilities/Universal.Utilities.Apps/README.md:
--------------------------------------------------------------------------------
1 | # App (Dashboard) Utilities
2 |
3 | Utility functions for PowerShell Universal apps.
4 |
5 | ## Get-UDCache
6 |
7 | Returns the current values in the `$Cache` scope.
8 |
9 | ## New-UDCenter
10 |
11 | Center items on an app.
12 |
13 | ## New-UDConfirm
14 |
15 | Prompts the user a yes\no confirm prompt with a customizable prompt.
16 |
17 | ## New-UDLineBreak
18 |
19 | Creates a line break (``) in the app.
20 |
21 | ## Reset-UDPage
22 |
23 | Reloads the current page.
24 |
25 | ## Show-UDEventData
26 |
27 | Shows the `$EventData` variable in a modal as JSON.
28 |
29 | ## Show-UDObject
30 |
31 | Shows an object in a modal in a table.
32 |
33 | ## Show-UDThemeColorViewer
34 |
35 | Shows all the theme colors in a modal.
36 |
37 | ## Show-UDVariable
38 |
39 | Shows variables and their values in a modal.
--------------------------------------------------------------------------------