♻ refactor: migrate all mobile components to a standalone project (#2385)

* ♻ refactor: migrate all mobile components to a separate project

* remove unused files

* update

* update locale

* 🐛 fix: updating the logic of fetching latest release version

* update cicd

* update
This commit is contained in:
capdiem
2025-04-17 17:12:58 +08:00
committed by GitHub
parent 0da712c278
commit 9ffb99fcf4
103 changed files with 426 additions and 356 deletions

View File

@@ -32,5 +32,7 @@ jobs:
run: dotnet pack src/Masa.Blazor.JSComponents.DriverJS/Masa.Blazor.JSComponents.DriverJS.csproj --no-build --include-symbols -c Release -p:PackageVersion=${{github.event.inputs.version}}
- name: pack Masa.Blazor.JSComponents.PdfJS
run: dotnet pack src/Masa.Blazor.JSComponents.PdfJS/Masa.Blazor.JSComponents.PdfJS.csproj --no-build --include-symbols -c Release -p:PackageVersion=${{github.event.inputs.version}}
- name: pack Masa.Blazor.MobileComponents
run: dotnet pack src/Masa.Blazor.MobileComponents/Masa.Blazor.MobileComponents.csproj --no-build --include-symbols -c Release -p:PackageVersion=${{github.event.inputs.version}}
- name: package push
run: dotnet nuget push "**/*.symbols.nupkg" --skip-duplicate -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json

View File

@@ -28,5 +28,7 @@ jobs:
run: dotnet pack src/Masa.Blazor.JSComponents.DriverJS/Masa.Blazor.JSComponents.DriverJS.csproj --no-build --include-symbols -c Release -p:PackageVersion=$GITHUB_REF_NAME
- name: pack Masa.Blazor.JSComponents.PdfJS
run: dotnet pack src/Masa.Blazor.JSComponents.PdfJS/Masa.Blazor.JSComponents.PdfJS.csproj --no-build --include-symbols -c Release -p:PackageVersion=$GITHUB_REF_NAME
- name: pack Masa.Blazor.MobileComponents
run: dotnet pack src/Masa.Blazor.MobileComponents/Masa.Blazor.MobileComponents.csproj --no-build --include-symbols -c Release -p:PackageVersion=$GITHUB_REF_NAME
- name: package push
run: dotnet nuget push "**/*.symbols.nupkg" --skip-duplicate -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json

View File

@@ -5,4 +5,6 @@
<Project Path="src/Masa.Blazor.SomethingSkia/Masa.Blazor.SomethingSkia.csproj" />
<Project Path="src/Masa.Blazor/Masa.Blazor.csproj" />
<Project Path="src\Masa.Blazor.JSComponents.PdfJS\Masa.Blazor.JSComponents.PdfJS.csproj" Type="Classic C#" />
<Project Path="src\Masa.Blazor.MobileComponents\Masa.Blazor.MobileComponents.csproj" Type="Classic C#" />
<Project Path="src\Masa.Blazor.SourceGenerator\Masa.Blazor.SourceGenerator.csproj" Type="Classic C#" />
</Solution>

View File

@@ -7,6 +7,7 @@
<Project Path="src/Masa.Blazor.SomethingSkia/Masa.Blazor.SomethingSkia.csproj" />
<Project Path="src/Masa.Blazor/Masa.Blazor.csproj" />
<Project Path="src\Masa.Blazor.JSComponents.PdfJS\Masa.Blazor.JSComponents.PdfJS.csproj" Type="Classic C#" />
<Project Path="src\Masa.Blazor.MobileComponents\Masa.Blazor.MobileComponents.csproj" Type="Classic C#" />
</Folder>
<Folder Name="/3 - Development/">
<Project Path="src/Masa.Blazor.Playground/Masa.Blazor.Playground.csproj" />

View File

@@ -21,6 +21,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Masa.Blazor.JSComponents.DriverJS\Masa.Blazor.JSComponents.DriverJS.csproj" />
<ProjectReference Include="..\..\src\Masa.Blazor.JSComponents.PdfJS\Masa.Blazor.JSComponents.PdfJS.csproj" />
<ProjectReference Include="..\..\src\Masa.Blazor.MobileComponents\Masa.Blazor.MobileComponents.csproj" />
<ProjectReference Include="..\Masa.Docs.Core\Masa.Docs.Core.csproj" />
</ItemGroup>

View File

@@ -1,5 +1,6 @@
@page "/blazor/components/{page}/{tab?}/{api?}"
@page "/blazor/labs/{page}/{tab?}/{api?}"
@page "/blazor/mobiles/{page}/{tab?}/{api?}"
<MContainer Class="pa-4 pa-sm-6 pa-md-8"
Fluid

View File

@@ -109,7 +109,19 @@ public partial class Components
{
await base.OnParametersSetAsync();
_group = NavigationManager.GetAbsolutePath().StartsWith("/blazor/components", StringComparison.OrdinalIgnoreCase) ? "components" : "labs";
var absolutePath = NavigationManager.GetAbsolutePath();
if (absolutePath.StartsWith("/blazor/components", StringComparison.OrdinalIgnoreCase))
{
_group = "components";
}
else if (absolutePath.StartsWith("/blazor/labs", StringComparison.OrdinalIgnoreCase))
{
_group = "labs";
}
else if (absolutePath.StartsWith("/blazor/mobiles", StringComparison.OrdinalIgnoreCase))
{
_group = "mobiles";
}
if (!Equals(_prevPage, Page) || !Equals(_prevCulture, Culture))
{
@@ -265,6 +277,7 @@ public partial class Components
list.AddRange(SomethingSkiaApiGenerator.ComponentMetas);
list.AddRange(DriverJSApiGenerator.ComponentMetas);
list.AddRange(PdfJSApiGenerator.ComponentMetas);
list.AddRange(MobileComponentsApiGenerator.ComponentMetas);
return list;
}

View File

@@ -67,13 +67,8 @@
"title": "ui-components",
"icon": "mdi-layers-triple",
"group": "components",
"hidden": true,
"state": "update",
"items": [
{
"title": "all",
"hidden": false
},
"alerts",
"application",
"aspect-ratios",
@@ -182,26 +177,14 @@
"state": "breaking-change"
},
"images",
"infinite-scroll",
{
"title": "lists",
"state": "update"
},
"infinite-scroll",
"markdowns",
"markdown-parsers",
"menus",
{
"title": "mobiles",
"group": "components",
"items": [
"mobile-cascader",
"mobile-date-pickers",
"mobile-date-time-pickers",
"mobile-pickers",
"mobile-picker-views",
"mobile-time-pickers"
]
},
"modals",
"monaco-editor",
"navigation-drawers",
@@ -267,16 +250,33 @@
"virtual-scroll"
]
},
{
"title": "mobiles",
"icon": "mdi-cellphone",
"group": "mobiles",
"items": [
"mobile-cascader",
"mobile-date-pickers",
"mobile-date-time-pickers",
"mobile-pickers",
"mobile-picker-views",
"mobile-time-pickers",
"page-stack",
{
"title": "pdf-mobile-viewer",
"state": "nuget",
"releasedOn": "v1.7.0"
},
"pull-refresh",
"swiper"
]
},
{
"title": "js-modules",
"icon": "$languageJavascript",
"state": "new",
"items": [
{
"title": "intersection-observer",
"state": "new",
"releasedOn": "v1.1.0"
}
"intersection-observer"
]
},
{
@@ -284,101 +284,33 @@
"icon": "mdi-flask",
"state": "new",
"items": [
{
"title": "date-digital-clock-pickers",
"state": "new",
"releasedOn": "v1.0.2"
},
{
"title": "date-time-pickers",
"state": "new",
"releasedOn": "v1.0.2"
},
{
"title": "digital-clocks",
"state": "new",
"releasedOn": "v1.0.2"
},
{
"title": "drawflow",
"state": "new",
"releasedOn": "v1.0.4"
},
"date-digital-clock-pickers",
"date-time-pickers",
"digital-clocks",
"drawflow",
{
"title": "driverjs",
"state": "new",
"releasedOn": "v1.9.0"
},
{
"title": "inputs-filter",
"state": "new",
"releasedOn": "v1.1.0"
},
{
"title": "interactive-trigger",
"state": "new",
"releasedOn": "v1.3.0"
},
{
"title": "lazy",
"state": "new",
"releasedOn": "v1.1.0"
},
{
"title": "page-stack",
"state": "new",
"releasedOn": "v1.5.0"
},
{
"title": "pdf-mobile-viewer",
"state": "new",
"releasedOn": "v1.7.0"
},
{
"title": "pull-refresh",
"state": "new",
"releasedOn": "v1.1.1"
},
{
"title": "scroll-to-target",
"state": "new",
"releasedOn": "v1.3.4"
},
{
"title": "sortable",
"state": "new",
"releasedOn": "v1.4.0"
},
{
"title": "splitters",
"state": "new",
"releasedOn": "v1.1.1"
},
"inputs-filter",
"interactive-trigger",
"lazy",
"scroll-to-target",
"sortable",
"splitters",
{
"title": "sticky",
"state": "new",
"releasedOn": "v1.8.0"
},
{
"title": "swiper",
"state": "new",
"releasedOn": "v1.0.4"
},
{
"title": "toggles",
"state": "new",
"releasedOn": "v1.7.0"
},
{
"title": "watermark",
"state": "new",
"releasedOn": "v1.1.1"
},
{
"title": "xgplayer",
"state": "new",
"releasedOn": "v1.3.0"
}
"watermark",
"xgplayer"
]
},
{

View File

@@ -1,27 +0,0 @@
---
title: Mobile date pickers
desc: "A date picker designed for the mobile."
tag: Preset
related:
- /blazor/components/mobile-pickers
- /blazor/components/mobile-time-views
- /blazor/components/mobile-date-time-pickers
---
## Examples
### Props
#### Formatter
Format the content displayed in each column.
<masa-example file="Examples.components.mobile_date_pickers.Formatter"></masa-example>
#### Min and max
<masa-example file="Examples.components.mobile_date_pickers.MinMax"></masa-example>
#### Precision
<masa-example file="Examples.components.mobile_date_pickers.Precision"></masa-example>

View File

@@ -1,27 +0,0 @@
---
title: Mobile date pickers移动端日期选择器
desc: "专为移动设备设计的日期选择器。"
tag: "预置"
related:
- /blazor/components/mobile-pickers
- /blazor/components/mobile-time-views
- /blazor/components/mobile-date-time-pickers
---
## 示例
### 属性
#### 格式化
格式化每列展示的内容。
<masa-example file="Examples.components.mobile_date_pickers.Formatter"></masa-example>
#### 最小和最大值
<masa-example file="Examples.components.mobile_date_pickers.MinMax"></masa-example>
#### 精度
<masa-example file="Examples.components.mobile_date_pickers.Precision"></masa-example>

View File

@@ -1,27 +0,0 @@
---
title: Mobile date time pickers
desc: "A date picker designed for the mobile."
tag: Preset
related:
- /blazor/components/mobile-pickers
- /blazor/components/mobile-time-views
- /blazor/components/mobile-date-time-pickers
---
## Examples
### Props
#### Formatter
Format the content displayed in each column.
<masa-example file="Examples.components.mobile_date_time_pickers.Formatter"></masa-example>
#### Min and max
<masa-example file="Examples.components.mobile_date_time_pickers.MinMax"></masa-example>
#### Precision
<masa-example file="Examples.components.mobile_date_time_pickers.Precision"></masa-example>

View File

@@ -1,27 +0,0 @@
---
title: Mobile date time pickers移动端日期时间选择器
desc: "专为移动设备设计的日期选择器。"
tag: "预置"
related:
- /blazor/components/mobile-pickers
- /blazor/components/mobile-time-views
- /blazor/components/mobile-date-time-pickers
---
## 示例
### 属性
#### 格式化
格式化每列展示的内容。
<masa-example file="Examples.components.mobile_date_time_pickers.Formatter"></masa-example>
#### 最小和最大值
<masa-example file="Examples.components.mobile_date_time_pickers.MinMax"></masa-example>
#### 精度
<masa-example file="Examples.components.mobile_date_time_pickers.Precision"></masa-example>

View File

@@ -1,31 +0,0 @@
---
title: Mobile time pickers
desc: "A time picker designed for the mobile."
tag: Preset
related:
- /blazor/components/mobile-pickers
- /blazor/components/mobile-date-time-pickers
- /blazor/components/mobile-date-pickers
---
## Examples
### Props
#### Formatter
Format the content displayed in each column.
<masa-example file="Examples.components.mobile_time_pickers.Formatter"></masa-example>
#### Min and max
<masa-example file="Examples.components.mobile_time_pickers.MinMax"></masa-example>
#### Precision
<masa-example file="Examples.components.mobile_time_pickers.Precision"></masa-example>

View File

@@ -1,27 +0,0 @@
---
title: Mobile time pickers移动端时间选择器
desc: "专为移动设备设计的时间选择器。"
tag: "预置"
related:
- /blazor/components/mobile-pickers
- /blazor/components/mobile-date-time-pickers
- /blazor/components/mobile-date-pickers
---
## 示例
### 属性
#### 格式化
格式化每列展示的内容。
<masa-example file="Examples.components.mobile_time_pickers.Formatter"></masa-example>
#### 最小和最大值
<masa-example file="Examples.components.mobile_time_pickers.MinMax"></masa-example>
#### 精度
<masa-example file="Examples.components.mobile_time_pickers.Precision"></masa-example>

View File

@@ -8,17 +8,23 @@ related:
- /blazor/components/buttons
---
## Installation
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## Examples
### Events
#### Load children
<masa-example file="Examples.components.mobile_cascader.LoadChildren"></masa-example>
<masa-example file="Examples.mobiles.mobile_cascader.LoadChildren"></masa-example>
#### On confirm
<masa-example file="Examples.components.mobile_cascader.OnConfirm"></masa-example>
<masa-example file="Examples.mobiles.mobile_cascader.OnConfirm"></masa-example>

View File

@@ -8,14 +8,20 @@ related:
- /blazor/components/buttons
---
## 安装 {#installation}
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## 示例
### 事件
#### 加载子项
<masa-example file="Examples.components.mobile_cascader.LoadChildren"></masa-example>
<masa-example file="Examples.mobiles.mobile_cascader.LoadChildren"></masa-example>
#### 确认事件
<masa-example file="Examples.components.mobile_cascader.OnConfirm"></masa-example>
<masa-example file="Examples.mobiles.mobile_cascader.OnConfirm"></masa-example>

View File

@@ -0,0 +1,33 @@
---
title: Mobile date pickers
desc: "A date picker designed for the mobile."
tag: Preset
related:
- /blazor/mobiles/mobile-pickers
- /blazor/mobiles/mobile-time-views
- /blazor/mobiles/mobile-date-time-pickers
---
## Installation
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## Examples
### Props
#### Formatter
Format the content displayed in each column.
<masa-example file="Examples.mobiles.mobile_date_pickers.Formatter"></masa-example>
#### Min and max
<masa-example file="Examples.mobiles.mobile_date_pickers.MinMax"></masa-example>
#### Precision
<masa-example file="Examples.mobiles.mobile_date_pickers.Precision"></masa-example>

View File

@@ -0,0 +1,33 @@
---
title: Mobile date pickers移动端日期选择器
desc: "专为移动设备设计的日期选择器。"
tag: "预置"
related:
- /blazor/mobiles/mobile-pickers
- /blazor/mobiles/mobile-time-views
- /blazor/mobiles/mobile-date-time-pickers
---
## 安装 {#installation}
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## 示例
### 属性
#### 格式化
格式化每列展示的内容。
<masa-example file="Examples.mobiles.mobile_date_pickers.Formatter"></masa-example>
#### 最小和最大值
<masa-example file="Examples.mobiles.mobile_date_pickers.MinMax"></masa-example>
#### 精度
<masa-example file="Examples.mobiles.mobile_date_pickers.Precision"></masa-example>

View File

@@ -0,0 +1,33 @@
---
title: Mobile date time pickers
desc: "A date picker designed for the mobile."
tag: Preset
related:
- /blazor/mobiles/mobile-pickers
- /blazor/mobiles/mobile-time-views
- /blazor/mobiles/mobile-date-time-pickers
---
## Installation
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## Examples
### Props
#### Formatter
Format the content displayed in each column.
<masa-example file="Examples.mobiles.mobile_date_time_pickers.Formatter"></masa-example>
#### Min and max
<masa-example file="Examples.mobiles.mobile_date_time_pickers.MinMax"></masa-example>
#### Precision
<masa-example file="Examples.mobiles.mobile_date_time_pickers.Precision"></masa-example>

View File

@@ -0,0 +1,33 @@
---
title: Mobile date time pickers移动端日期时间选择器
desc: "专为移动设备设计的日期选择器。"
tag: "预置"
related:
- /blazor/mobiles/mobile-pickers
- /blazor/mobiles/mobile-time-views
- /blazor/mobiles/mobile-date-time-pickers
---
## 安装 {#installation}
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## 示例
### 属性
#### 格式化
格式化每列展示的内容。
<masa-example file="Examples.mobiles.mobile_date_time_pickers.Formatter"></masa-example>
#### 最小和最大值
<masa-example file="Examples.mobiles.mobile_date_time_pickers.MinMax"></masa-example>
#### 精度
<masa-example file="Examples.mobiles.mobile_date_time_pickers.Precision"></masa-example>

View File

@@ -3,12 +3,18 @@ title: Mobile picker views
desc: "A picker designed for the mobile. Provides multiple sets of options for users to choose, and supports single-column selection, multi-column selection and cascading selection."
tag: Preset
related:
- /blazor/components/mobile-pickers
- /blazor/components/mobile-date-time-pickers
- /blazor/components/mobile-time-pickers
- /blazor/mobiles/mobile-pickers
- /blazor/mobiles/mobile-date-time-pickers
- /blazor/mobiles/mobile-time-pickers
---
**MMobilePickerView** is the content area of [PMobilePicker](/blazor/components/mobile-pickers).
**MMobilePickerView** is the content area of [PMobilePicker](/blazor/mobiles/mobile-pickers).
## Installation
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## Examples
@@ -23,14 +29,14 @@ The data nesting depth of the cascade selection needs to be consistent, and if s
options, you can use an empty string for placeholder.
<!--/alert:warning-->
<masa-example file="Examples.components.mobil_picker_views.Cascade"></masa-example>
<masa-example file="Examples.mobiles.mobil_picker_views.Cascade"></masa-example>
#### Disable item
<masa-example file="Examples.components.mobil_picker_views.ItemDisabled"></masa-example>
<masa-example file="Examples.mobiles.mobil_picker_views.ItemDisabled"></masa-example>
#### Custom item height
You can customize the height of the option through `Itemheight`. Currently, only `px` is supported.
<masa-example file="Examples.components.mobil_picker_views.ItemHeight"></masa-example>
<masa-example file="Examples.mobiles.mobil_picker_views.ItemHeight"></masa-example>

View File

@@ -3,12 +3,18 @@ title: Mobile picker views移动端选择视图
desc: "专为移动设备设计的选择视图。提供多个选项集合供用户选择,支持单列选择、多列选择和级联选择。"
tag: "预置"
related:
- /blazor/components/mobile-pickers
- /blazor/components/mobile-date-time-pickers
- /blazor/components/mobile-time-pickers
- /blazor/mobiles/mobile-pickers
- /blazor/mobiles/mobile-date-time-pickers
- /blazor/mobiles/mobile-time-pickers
---
**MMobilePickerView** is the content area of [PMobilePicker](/blazor/components/mobile-pickers).
**MMobilePickerView** is the content area of [PMobilePicker](/blazor/mobiles/mobile-pickers).
## 安装 {#installation}
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## 示例
@@ -22,14 +28,14 @@ related:
级联选择的数据嵌套深度需要一致,如果某些选项没有子选项,则可以使用空字符串作为占位符。
<!--/alert:warning-->
<masa-example file="Examples.components.mobil_picker_views.Cascade"></masa-example>
<masa-example file="Examples.mobiles.mobil_picker_views.Cascade"></masa-example>
#### 禁止选择某项
<masa-example file="Examples.components.mobil_picker_views.ItemDisabled"></masa-example>
<masa-example file="Examples.mobiles.mobil_picker_views.ItemDisabled"></masa-example>
#### 自定义项高度
通过 `Itemheight` 可以自定义选项的高度。目前只支持 `px`
<masa-example file="Examples.components.mobile_pickers.ItemHeight"></masa-example>
<masa-example file="Examples.mobiles.mobile_pickers.ItemHeight"></masa-example>

View File

@@ -2,11 +2,17 @@
title: Mobile pickers
desc: "A picker designed for the mobile. Provides multiple sets of options for users to choose, and supports single-column selection, multi-column selection and cascading selection."
related:
- /blazor/components/mobile-picker-views
- /blazor/components/mobile-date-time-views
- /blazor/components/mobile-time-pickers
- /blazor/mobiles/mobile-picker-views
- /blazor/mobiles/mobile-date-time-views
- /blazor/mobiles/mobile-time-pickers
---
## Installation
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## Examples
### Props
@@ -18,12 +24,12 @@ Use the cascading `Columns` and `ItemChildren` fields to achieve the effect of c
<app-alert type="warning" content="The data nesting depth of the cascade selection needs to be consistent, and if some of the options do not have sub
options, you can use an empty string for placeholder."></app-alert>
<masa-example file="Examples.components.mobile_pickers.Cascade"></masa-example>
<masa-example file="Examples.mobiles.mobile_pickers.Cascade"></masa-example>
#### Custom item height.
You can customize the height of the option through `Itemheight`. Currently, only `px` is supported.
<masa-example file="Examples.components.mobile_pickers.ItemHeight"></masa-example>
<masa-example file="Examples.mobiles.mobile_pickers.ItemHeight"></masa-example>

View File

@@ -2,11 +2,16 @@
title: Mobile pickers移动端选择器
desc: "专为移动设备设计的选择器。提供多个选项集合供用户选择,支持单列选择、多列选择和级联选择。"
related:
- /blazor/components/mobile-picker-views
- /blazor/components/mobile-date-time-views
- /blazor/components/mobile-time-pickers
- /blazor/mobiles/mobile-picker-views
- /blazor/mobiles/mobile-date-time-views
- /blazor/mobiles/mobile-time-pickers
---
## 安装 {#installation}
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## 示例
@@ -18,10 +23,10 @@ related:
<app-alert type="warning" content="级联选择的数据嵌套深度需要一致,如果某些选项没有子选项,则可以使用空字符串作为占位符。"></app-alert>
<masa-example file="Examples.components.mobile_pickers.Cascade"></masa-example>
<masa-example file="Examples.mobiles.mobile_pickers.Cascade"></masa-example>
#### 自定义项高度
通过 `1Itemheight` 可以自定义选项的高度。目前只支持 `px`
<masa-example file="Examples.components.mobile_pickers.ItemHeight"></masa-example>
<masa-example file="Examples.mobiles.mobile_pickers.ItemHeight"></masa-example>

View File

@@ -0,0 +1,37 @@
---
title: Mobile time pickers
desc: "A time picker designed for the mobile."
tag: Preset
related:
- /blazor/mobiles/mobile-pickers
- /blazor/mobiles/mobile-date-time-pickers
- /blazor/mobiles/mobile-date-pickers
---
## Installation
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## Examples
### Props
#### Formatter
Format the content displayed in each column.
<masa-example file="Examples.mobiles.mobile_time_pickers.Formatter"></masa-example>
#### Min and max
<masa-example file="Examples.mobiles.mobile_time_pickers.MinMax"></masa-example>
#### Precision
<masa-example file="Examples.mobiles.mobile_time_pickers.Precision"></masa-example>

View File

@@ -0,0 +1,33 @@
---
title: Mobile time pickers移动端时间选择器
desc: "专为移动设备设计的时间选择器。"
tag: "预置"
related:
- /blazor/mobiles/mobile-pickers
- /blazor/mobiles/mobile-date-time-pickers
- /blazor/mobiles/mobile-date-pickers
---
## 安装 {#installation}
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## 示例
### 属性
#### 格式化
格式化每列展示的内容。
<masa-example file="Examples.mobiles.mobile_time_pickers.Formatter"></masa-example>
#### 最小和最大值
<masa-example file="Examples.mobiles.mobile_time_pickers.MinMax"></masa-example>
#### 精度
<masa-example file="Examples.mobiles.mobile_time_pickers.Precision"></masa-example>

View File

@@ -29,7 +29,7 @@ related:
Except for the tabbed page list, other pages will enter the page stack with an animation effect from right to left,
and exit will destroy the page.
<masa-example file="Examples.labs.page_stack.Usage" no-actions="true"></masa-example>
<masa-example file="Examples.mobiles.page_stack.Usage" no-actions="true"></masa-example>
## Built-in components and classes

View File

@@ -28,7 +28,7 @@ related:
除了选项卡页面列表,其他页面都会通过从右到左的动画效果进入页面堆栈,移出即销毁。
<masa-example file="Examples.labs.page_stack.Usage" no-actions="true"></masa-example>
<masa-example file="Examples.mobiles.page_stack.Usage" no-actions="true"></masa-example>
## 内置组件和类

View File

@@ -4,6 +4,8 @@ desc: "A PDF viewer designed for mobile."
tag: "JS Proxy"
---
## Installation
```shell
dotnet add package Masa.Blazor.JSComponents.PdfJS
```
@@ -14,7 +16,7 @@ dotnet add package Masa.Blazor.JSComponents.PdfJS
## Usage
<masa-example file="Examples.labs.pdf_mobile_viewer.Usage" no-actions="true"></masa-example>
<masa-example file="Examples.mobiles.pdf_mobile_viewer.Usage" no-actions="true"></masa-example>
```razor
<MPdfMobileViewer Url="_content/Masa.Blazor.Docs/img/compressed.tracemonkey-pldi-09.pdf" />

View File

@@ -4,6 +4,8 @@ desc: "专为移动设备设计的 PDF 查看器。"
tag: "JS代理"
---
## 安装 {#installation}
```shell
dotnet add package Masa.Blazor.JSComponents.PdfJS
```
@@ -14,7 +16,7 @@ dotnet add package Masa.Blazor.JSComponents.PdfJS
## 使用 {#usage}
<masa-example file="Examples.labs.pdf_mobile_viewer.Usage" no-actions="true"></masa-example>
<masa-example file="Examples.mobiles.pdf_mobile_viewer.Usage" no-actions="true"></masa-example>
```razor
<MPdfMobileViewer Url="_content/Masa.Blazor.Docs/img/compressed.tracemonkey-pldi-09.pdf" />

View File

@@ -5,9 +5,15 @@ desc: "Pull down to refresh, usually used in mobile apps"
<app-alert type="warning" content="Only works on mobile, because only implement touch events. So you need to open the browser's mobile mode(`F12`, `Ctrl+Shift+M`) to see the effect."></app-alert>
## Installation
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## Usage
<masa-example file="Examples.labs.pull_refresh.Usage"></masa-example>
<masa-example file="Examples.mobiles.pull_refresh.Usage"></masa-example>
## Examples
@@ -15,14 +21,14 @@ desc: "Pull down to refresh, usually used in mobile apps"
#### Disabled
<masa-example file="Examples.labs.pull_refresh.Disabled"></masa-example>
<masa-example file="Examples.mobiles.pull_refresh.Disabled"></masa-example>
#### On error
<masa-example file="Examples.labs.pull_refresh.OnError"></masa-example>
<masa-example file="Examples.mobiles.pull_refresh.OnError"></masa-example>
### Contents
#### Custom contents
<masa-example file="Examples.labs.pull_refresh.Contents"></masa-example>
<masa-example file="Examples.mobiles.pull_refresh.Contents"></masa-example>

View File

@@ -5,9 +5,15 @@ desc: "下拉刷新,通常用于移动端应用"
<app-alert type="warning" content="仅在移动端生效,因为只实现了触摸事件。因此需要打开浏览器的移动模式(`F12``Ctrl+Shift+M`)才能看到效果。"></app-alert>
## 安装 {#installation}
```shell
dotnet add package Masa.Blazor.MobileComponents
```
## 使用
<masa-example file="Examples.labs.pull_refresh.Usage"></masa-example>
<masa-example file="Examples.mobiles.pull_refresh.Usage"></masa-example>
## 示例
@@ -15,14 +21,14 @@ desc: "下拉刷新,通常用于移动端应用"
#### 禁用
<masa-example file="Examples.labs.pull_refresh.Disabled"></masa-example>
<masa-example file="Examples.mobiles.pull_refresh.Disabled"></masa-example>
#### 处理错误
<masa-example file="Examples.labs.pull_refresh.OnError"></masa-example>
<masa-example file="Examples.mobiles.pull_refresh.OnError"></masa-example>
### 插槽
#### 自定义下拉刷新内容
<masa-example file="Examples.labs.pull_refresh.Contents"></masa-example>
<masa-example file="Examples.mobiles.pull_refresh.Contents"></masa-example>

View File

@@ -18,7 +18,7 @@ You need to reference the following files before using it:
## Usage
<masa-example file="Examples.labs.swiper.Default"></masa-example>
<masa-example file="Examples.mobiles.swiper.Default"></masa-example>
## Examples
@@ -26,15 +26,15 @@ You need to reference the following files before using it:
#### Vertical
<masa-example file="Examples.labs.swiper.Vertical"></masa-example>
<masa-example file="Examples.mobiles.swiper.Vertical"></masa-example>
#### Loop
<masa-example file="Examples.labs.swiper.Loop"></masa-example>
<masa-example file="Examples.mobiles.swiper.Loop"></masa-example>
#### Space between
<masa-example file="Examples.labs.swiper.SpaceBetween"></masa-example>
<masa-example file="Examples.mobiles.swiper.SpaceBetween"></masa-example>
#### Auto height
@@ -53,18 +53,18 @@ to recalculate the height after the content is loaded.
</MSwiper>
```
<masa-example file="Examples.labs.swiper.AutoHeight"></masa-example>
<masa-example file="Examples.mobiles.swiper.AutoHeight"></masa-example>
### Module components
#### Navigation
<masa-example file="Examples.labs.swiper.Navigation"></masa-example>
<masa-example file="Examples.mobiles.swiper.Navigation"></masa-example>
#### Pagination
<masa-example file="Examples.labs.swiper.Pagination"></masa-example>
<masa-example file="Examples.mobiles.swiper.Pagination"></masa-example>
#### Autoplay
<masa-example file="Examples.labs.swiper.Autoplay"></masa-example>
<masa-example file="Examples.mobiles.swiper.Autoplay"></masa-example>

View File

@@ -18,7 +18,7 @@ related:
## 使用 {#usage}
<masa-example file="Examples.labs.swiper.Default"></masa-example>
<masa-example file="Examples.mobiles.swiper.Default"></masa-example>
## 示例 {#examples}
@@ -26,15 +26,15 @@ related:
#### 竖向 {#vertical}
<masa-example file="Examples.labs.swiper.Vertical"></masa-example>
<masa-example file="Examples.mobiles.swiper.Vertical"></masa-example>
#### 循环 {#loop}
<masa-example file="Examples.labs.swiper.Loop"></masa-example>
<masa-example file="Examples.mobiles.swiper.Loop"></masa-example>
#### 间隔 {#space-between}
<masa-example file="Examples.labs.swiper.SpaceBetween"></masa-example>
<masa-example file="Examples.mobiles.swiper.SpaceBetween"></masa-example>
#### 自动高度 {#auto-height}
@@ -50,18 +50,18 @@ related:
</MSwiper>
```
<masa-example file="Examples.labs.swiper.AutoHeight"></masa-example>
<masa-example file="Examples.mobiles.swiper.AutoHeight"></masa-example>
### 模块组件 {#module-components}
#### 导航 {#navigation}
<masa-example file="Examples.labs.swiper.Navigation"></masa-example>
<masa-example file="Examples.mobiles.swiper.Navigation"></masa-example>
#### 分页 {#pagination}
<masa-example file="Examples.labs.swiper.Pagination"></masa-example>
<masa-example file="Examples.mobiles.swiper.Pagination"></masa-example>
#### 自动播放 {#autoplay}
<masa-example file="Examples.labs.swiper.Autoplay"></masa-example>
<masa-example file="Examples.mobiles.swiper.Autoplay"></masa-example>

View File

@@ -68,10 +68,6 @@ public class NavItemsJsonConverter : JsonConverter<List<NavItem>>
case "releasedOn":
navItem.ReleasedOn = reader.GetString();
break;
case "hidden":
var hidden = reader.GetBoolean();
navItem.Hidden = hidden;
break;
case "items":
navItem.Children = ReadSubItems(ref reader);
break;

View File

@@ -35,9 +35,5 @@ public class NavItem : IDefaultItem<NavItem>
public string? ReleasedOn { get; set; }
public bool? Hidden { get; set; }
public string? Segment => (Group ?? Title);
public bool IsHidden => Hidden.HasValue && Hidden.Value && (Children != null && Children.All(c => c.IsHidden));
}

View File

@@ -101,26 +101,21 @@ public class GithubService(ExpiryLocalStorage localStorage, ILogger<GithubServic
try
{
var client = CreateClient(owner, repo);
var response = await client.Actions.Workflows.Runs.ListByWorkflow(owner, repo,
var releaseResponse = await client.Repository.Release.GetLatest(owner, repo);
if (releaseResponse is null) return null;
var release = releaseResponse.TagName;
var runsResponse = await client.Actions.Workflows.Runs.ListByWorkflow(owner, repo,
".github/workflows/wasm-prd.yml",
new WorkflowRunsRequest
{
Status = CheckRunStatusFilter.Success
});
var latest = response.WorkflowRuns.FirstOrDefault();
var latest = runsResponse.WorkflowRuns.FirstOrDefault();
if (latest == null) return null;
var commitSha = latest.HeadSha;
string? release;
if (latest.Event == "release")
{
release = latest.DisplayTitle;
}
else
{
latest = response.WorkflowRuns.FirstOrDefault(u => u.Event == "release");
release = latest?.HeadBranch;
}
latestBuild = new LatestBuild(commitSha, release);
await localStorage.SetExpiryItemAsync(key, latestBuild, TimeSpan.FromHours(1));

View File

@@ -77,6 +77,8 @@ public static class ServiceCollectionExtensions
"M9.5,4C5.36,4 2,6.69 2,10C2,11.89 3.08,13.56 4.78,14.66L4,17L6.5,15.5C7.39,15.81 8.37,16 9.41,16C9.15,15.37 9,14.7 9,14C9,10.69 12.13,8 16,8C16.19,8 16.38,8 16.56,8.03C15.54,5.69 12.78,4 9.5,4M6.5,6.5A1,1 0 0,1 7.5,7.5A1,1 0 0,1 6.5,8.5A1,1 0 0,1 5.5,7.5A1,1 0 0,1 6.5,6.5M11.5,6.5A1,1 0 0,1 12.5,7.5A1,1 0 0,1 11.5,8.5A1,1 0 0,1 10.5,7.5A1,1 0 0,1 11.5,6.5M16,9C12.69,9 10,11.24 10,14C10,16.76 12.69,19 16,19C16.67,19 17.31,18.92 17.91,18.75L20,20L19.38,18.13C20.95,17.22 22,15.71 22,14C22,11.24 19.31,9 16,9M14,11.5A1,1 0 0,1 15,12.5A1,1 0 0,1 14,13.5A1,1 0 0,1 13,12.5A1,1 0 0,1 14,11.5M18,11.5A1,1 0 0,1 19,12.5A1,1 0 0,1 18,13.5A1,1 0 0,1 17,12.5A1,1 0 0,1 18,11.5Z");
aliases.UserDefined["languageJavascript"] = new SvgPath(
"M3,3H21V21H3V3M7.73,18.04C8.13,18.89 8.92,19.59 10.27,19.59C11.77,19.59 12.8,18.79 12.8,17.04V11.26H11.1V17C11.1,17.86 10.75,18.08 10.2,18.08C9.62,18.08 9.38,17.68 9.11,17.21L7.73,18.04M13.71,17.86C14.21,18.84 15.22,19.59 16.8,19.59C18.4,19.59 19.6,18.76 19.6,17.23C19.6,15.82 18.79,15.19 17.35,14.57L16.93,14.39C16.2,14.08 15.89,13.87 15.89,13.37C15.89,12.96 16.2,12.64 16.7,12.64C17.18,12.64 17.5,12.85 17.79,13.37L19.1,12.5C18.55,11.54 17.77,11.17 16.7,11.17C15.19,11.17 14.22,12.13 14.22,13.4C14.22,14.78 15.03,15.43 16.25,15.95L16.67,16.13C17.45,16.47 17.91,16.68 17.91,17.26C17.91,17.74 17.46,18.09 16.76,18.09C15.93,18.09 15.45,17.66 15.09,17.06L13.71,17.86Z");
aliases.UserDefined["nuget"] = new SvgPath(
"M17.67 21.633a3.995 3.995 0 1 1 0-7.99 3.995 3.995 0 0 1 0 7.99m-7.969-9.157a2.497 2.497 0 1 1 0-4.994 2.497 2.497 0 0 1 0 4.994m8.145-7.795h-6.667a6.156 6.156 0 0 0-6.154 6.155v6.667a6.154 6.154 0 0 0 6.154 6.154h6.667A6.154 6.154 0 0 0 24 17.503v-6.667a6.155 6.155 0 0 0-6.154-6.155M3.995 2.339a1.998 1.998 0 1 1-3.996 0 1.998 1.998 0 0 1 3.996 0");
});
});

View File

@@ -1,7 +1,6 @@
@layout BaseLayout
@inherits LayoutComponentBase
@implements IAsyncDisposable
@inject NavigationManager NavigationManager
@using Masa.Blazor.Extensions
<NavDrawer @bind-Value="_showDrawer"

View File

@@ -13,7 +13,7 @@
"upgrade-guide": "Upgrade guide",
"contributing": "Contributing",
"styles-and-animations": "Styles and animations",
"ui-components": "Components",
"ui-components": "UI Components",
"features": "Features",
"border-radius": "Border radius",
"color": "Colors",
@@ -213,7 +213,7 @@
"markdowns": "Markdowns",
"markdown-parsers": "Markdown parsers",
"menus": "Menus",
"mobiles": "Mobiles",
"mobiles": "Mobile components",
"mobile-cascader": "Mobile cascader",
"mobile-date-pickers": "Mobile date pickers",
"mobile-date-time-pickers": "Mobile date time pickers",

View File

@@ -13,7 +13,7 @@
"made-with-masa-blazor": "使用 MASA Blazor 制作的项目",
"installation": "安装",
"styles-and-animations": "样式和动画",
"ui-components": "组件",
"ui-components": "UI 组件",
"js-modules": "JavaScript模块",
"intersection-observer": "交叉观察者",
"labs": "实验室",
@@ -210,7 +210,7 @@
"markdowns": "MarkdownsMarkdown编辑器",
"markdown-parsers": "Markdown parsersMarkdown解析器",
"menus": "Menus菜单",
"mobiles": "Mobiles移动端",
"mobiles": "移动端组件",
"mobile-cascader": "Mobile cascader移动端级联",
"mobile-date-pickers": "Mobile date pickers移动端日期选择器",
"mobile-date-time-pickers": "Mobile date time pickers移动端日期时间选择器",

BIN
imgs/logo-96x96.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>12</LangVersion>
<PackageIcon>../../imgs/logo-96x96.png</PackageIcon>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.33"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Masa.Blazor\Masa.Blazor.csproj"/>
<ProjectReference Include="..\Masa.Blazor.Docs.ComponentApiGenerator\Masa.Blazor.Docs.ComponentApiGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<None Include="../../imgs/logo-96x96.png" Pack="true" PackagePath="$(PackageIcon)" />
<Content Remove="tsconfig.json;package.json" />
</ItemGroup>
</Project>

View File

@@ -1,4 +1,5 @@
@typeparam TColumn
@namespace Masa.Blazor.Presets.MobilePicker
@typeparam TColumn
@typeparam TColumnItem
@typeparam TColumnItemValue
@typeparam TValue

View File

@@ -0,0 +1,8 @@
global using Microsoft.JSInterop;
global using Microsoft.AspNetCore.Components;
global using Microsoft.AspNetCore.Components.Web;
global using Microsoft.Extensions.Logging;
global using Masa.Blazor.Core;
global using Masa.Blazor.Attributes;
global using Masa.Blazor.Extensions;
global using BemIt;

Some files were not shown because too many files have changed in this diff Show More