Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmoravek committed Jun 28, 2024
2 parents 1c8b580 + 18a68f5 commit 5d9cb28
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 81 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: oruga-next

36 changes: 36 additions & 0 deletions .github/workflows/publish-release-minor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Generate new release
on:
push:
tags:
- 'm*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Always release the tip of the default branch
ref: develop
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install dependencies 📦
run: npm install
- name: Build lib
run: npm run publish:lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm i extract-changelog-release
- name: Generate Release Body
run: npx extract-changelog-release > RELEASE_BODY.md
- uses: ncipollo/release-action@v1
with:
bodyFile: 'RELEASE_BODY.md'
token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [0.8.12](https://github.com/oruga-ui/oruga/compare/v0.8.11...v0.8.12) (2024-06-28)


### Bug Fixes

* **datetimepicker:** fix datetimepicker initialisation bug ([#948](https://github.com/oruga-ui/oruga/issues/948)) ([92b30f1](https://github.com/oruga-ui/oruga/commit/92b30f16d7f2839f7f69c2ebf6bd9c7f0e11bedf))
* **picker:** fix native input value ([#986](https://github.com/oruga-ui/oruga/issues/986)) ([09154d5](https://github.com/oruga-ui/oruga/commit/09154d5a9adc919a6bcd3f78448dd16baa008bc9))



## [0.8.11](https://github.com/oruga-ui/oruga/compare/v0.8.10...v0.8.11) (2024-06-05)


Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "root",
"version": "0.8.11",
"version": "0.8.12",
"homepage": "https://oruga-ui.com",
"description": "UI components for Vue.js and CSS framework agnostic",
"author": "Walter Tommasi <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oruga-ui/docs-next",
"version": "0.8.11",
"version": "0.8.12",
"homepage": "https://oruga-ui.com",
"description": "UI components for Vue.js and CSS framework agnostic",
"author": "Walter Tommasi <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/oruga/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oruga-ui/oruga-next",
"version": "0.8.11",
"version": "0.8.12",
"homepage": "https://oruga-ui.com",
"description": "UI components for Vue.js and CSS framework agnostic",
"author": "Walter Tommasi <[email protected]>",
Expand Down
15 changes: 9 additions & 6 deletions packages/oruga/src/components/datepicker/Datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,13 @@ const props = defineProps({
type: Boolean,
default: () => getOption("datepicker.mobileModal", true),
},
/** Enable mobile native input if mobile agent */
/**
* Enable mobile native input if mobile agent
* (Default will be switched to `false` in 0.9)
*/
mobileNative: {
type: Boolean,
default: () => getOption("datepicker.mobileNative", true),
default: () => getOption("datepicker.mobileNative", true), // TODO: make false
},
/**
* Icon pack to use
Expand Down Expand Up @@ -619,7 +622,7 @@ const { isMobile } = useMatchMedia(props.mobileBreakpoint);
const pickerRef = ref<InstanceType<typeof OPickerWrapper>>();
/** modelvalue of selected date */
const vmodel = defineModel<Date | Date[]>({ default: undefined });
const vmodel = defineModel<Date | Date[]>({ default: null });
/** Dropdown active state */
const isActive = defineModel<boolean>("active", { default: false });
Expand Down Expand Up @@ -840,9 +843,9 @@ function next(): void {
function formatNative(value: Date | Date[]): string {
if (Array.isArray(value)) value = value[0];
if (!value) return "";
const date = new Date(value);
// return null if no value is given or value can't parse to proper date
if (!value || !date || isNaN(date.getTime())) return null;
if (isTypeMonth.value) {
// Format date into string 'YYYY-MM'
Expand Down Expand Up @@ -953,7 +956,7 @@ defineExpose({ focus: () => pickerRef.value?.focus(), value: vmodel });
v-model:active="isActive"
data-oruga="datepicker"
:value="vmodel"
:picker-props="props"
:picker="props"
:formatted-value="formattedValue"
:native-type="!isTypeMonth ? 'date' : 'month'"
:native-value="formatNative(vmodel)"
Expand Down
5 changes: 3 additions & 2 deletions packages/oruga/src/components/timepicker/Timepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,8 @@ function updateDateSelected(
/** Format date into string 'HH-MM-SS'*/
function formatNative(value: Date): string {
const date = new Date(value);
if (!value || isNaN(date.getTime())) return "";
// return null if no value is given or value can't parse to proper date
if (!value || !date || isNaN(date.getTime())) return null;
const hours = date.getHours();
const minutes = date.getMinutes();
Expand Down Expand Up @@ -742,7 +743,7 @@ defineExpose({ focus: () => pickerRef.value?.focus(), value: vmodel });
v-model:active="isActive"
data-oruga="timepicker"
:value="vmodel"
:picker-props="props"
:picker="props"
:formatted-value="formattedValue"
native-type="time"
:native-value="formatNative(vmodel)"
Expand Down
Loading

0 comments on commit 5d9cb28

Please sign in to comment.