220 Commits

Author SHA1 Message Date
fa78676d57 fix(angular): do not create duplicate menuController instances (#28343)
Issue number: resolves #28337

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Duplicate instances of `menuController` are being created in
`@ionic/angular`. `ion-menu` registers itself in the `menuController`
from `@ionic/core`, but the `MenuController` from `@ionic/angular` uses
the `menuController` from `@ionic/core/components`. This is how the
overlay providers work too. Normally, this is not a problem. However,
`menuController` caches references to registered menus in each
controller instances:
dcbf45101f/core/src/utils/menu-controller/index.ts (L14)

This means that since there are two different controllers,
`menuController` B does not know about the menus in `menuController` A.
The end result is that the menu controller used in developer
applications did not have references to the registered menus, which gave
the impression that the menu controller did not work.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Updated the architecture of `MenuController` in Ionic Angular to
accept a `menuController` instance. This allows `@ionic/angular` to pass
the `menuController` from `@ionic/core` and for
`@ionic/angular/standalone` to pass the `menuController` from
`@ionic/core/components`.

Note: Overlay controllers don't **need** this change per-se since they
don't cache references to overlays internally (they just query the DOM).
However, I think it would be good to have a consistent architecture
here, so I'll put up a separate PR that makes this change for overlays
too.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

Dev build: `7.5.1-dev.11697123035.1ee6b4a2`

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-10-12 19:29:18 +00:00
dd93e0b268 fix(angular): export missing lifecycle interfaces for standalone package (#28346)
Issue number: N/A

Resolves feedback identified here:
baa37ef1e3 (r1356414362)

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The lifecycle interfaces are not exported from
`@ionic/angular/standalone`.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Lifecycle interfaces are exported from `@ionic/angular/standalone`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-10-12 19:04:47 +00:00
59f23dcc2c chore(): update package lock files 2023-10-11 14:21:37 +00:00
053b7d59d3 v7.5.0 2023-10-11 14:21:18 +00:00
dc2f55f0fb chore: sync with main 2023-10-11 09:50:48 -04:00
2caaf6a526 chore(): update package lock files 2023-10-11 13:29:45 +00:00
cb47273f26 v7.4.4 2023-10-11 13:29:27 +00:00
57e2476370 feat(angular): ship Ionic components as Angular standalone components (#28311)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

**1. Bundle Size Reductions**

All Ionic UI components and Ionicons are added to the final bundle of an
Ionic Angular application. This is because all components and icons are
lazily loaded as needed. This prevents the compiler from properly tree
shaking applications. This does not cause all components and icons to be
loaded on application start, but it does increase the size of the final
app output that all users need to download.

**Related Issues**

https://github.com/ionic-team/ionicons/issues/910

https://github.com/ionic-team/ionicons/issues/536

https://github.com/ionic-team/ionic-framework/issues/27280

https://github.com/ionic-team/ionic-framework/issues/24352

**2. Standalone Component Support**

Standalone Components are a stable API as of Angular 15. The Ionic
starter apps on the CLI have NgModule and Standalone options, but all of
the Ionic components are still lazily/dynamically loaded using
`IonicModule`. Standalone components in Ionic also enable support for
new Angular features such as bundling with ESBuild instead of Webpack.
ESBuild does not work in Ionic Angular right now because components
cannot be statically analyzed since they are dynamically imported.

We added preliminary support for standalone components in Ionic v6.3.0.
This enabled developers to use their own custom standalone components
when routing with `ion-router-outlet`. However, we did not ship
standalone components for Ionic's UI components.

**Related Issues**

https://github.com/ionic-team/ionic-framework/issues/25404

https://github.com/ionic-team/ionic-framework/issues/27251

https://github.com/ionic-team/ionic-framework/issues/27387

**3. Faster Component Load Times**

Since Ionic Angular components are lazily loaded, they also need to be
hydrated. However, this hydration does not happen immediately which
prevents components from being usable for multiple frames.

**Related Issues**

https://github.com/ionic-team/ionic-framework/issues/24352

https://github.com/ionic-team/ionic-framework/issues/26474

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Ionic components and directives are accessible as Angular standalone
components/directives

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Associated documentation branch:
https://github.com/ionic-team/ionic-docs/tree/feature-7.5

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Sean Perkins <sean@ionic.io>
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
Co-authored-by: Maria Hutt <maria@ionic.io>
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2023-10-10 13:06:23 -04:00
b5261e0f41 Merge remote-tracking branch 'origin/main' into sync-feature-7.5-109 2023-10-09 15:42:31 -04:00
6da82aab81 feat(angular, react, vue, core): export openURL utility (#28295)
Issue number: resolves #27911 

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The `openURL` utility is not available to developers. 

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Export `openURL` utilities from `@ionic/core`, `@ionic/angular`,
`@ionic/react` and `@ionic/vue`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-10-09 12:51:34 -04:00
897ff6f749 feat(toast): allow custom positioning relative to specific element (#28248)
Issue number: resolves #17499

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Currently, there isn't a way to position toasts such that they don't
overlap navigation elements such as headers, footers, and FABs.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Added the new `positionAnchor` property, which specifies an element that
the toast's position should be anchored to.

While the name can be tweaked, we should take care to keep the relation
between it and the `position` property clear. The `position` acts as a
sort of "origin" point, and the toast is moved from there to sit near
the chosen anchor element. This is important because it helps clarify
why the toast sits above the anchor for `position="bottom"` and vice
versa.

I chose not to rename the `position` prop itself to avoid breaking
changes.

Docs PR: https://github.com/ionic-team/ionic-docs/pull/3158

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-10-04 14:06:27 -05:00
2429caa168 chore(): update package lock files 2023-10-04 13:26:49 +00:00
a8517f4fcf v7.4.3 2023-10-04 13:26:30 +00:00
078964447a chore(): update package lock files 2023-09-27 13:32:44 +00:00
45bcd4c22b v7.4.2 2023-09-27 13:32:27 +00:00
bd0ee0b316 Merge remote-tracking branch 'origin/main' into sync-main-75 2023-09-22 12:23:03 -04:00
de1a4c50bb test: update test apps to cypress 13 (#28212)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

CI is failing for Cypress apps due to
https://github.com/cypress-io/cypress/issues/27804#issuecomment-1721476731.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- All Cypress test apps have been updated to Cypress 13.2.0 which is not
affected by this issue.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-09-21 20:17:46 +00:00
2e626a909f chore(): update package lock files 2023-09-20 13:21:09 +00:00
d82414d43f v7.4.1 2023-09-20 13:20:51 +00:00
6b9c6fcd4d chore(angular): improve types of platform.ts (#27810) 2023-09-18 10:18:03 -07:00
6304645a81 chore(): update package lock files 2023-09-14 13:07:07 +00:00
c28b66a99a v7.4.0 2023-09-14 13:06:52 +00:00
d547944e91 Merge remote-tracking branch 'origin/main' into sync-final-74 2023-09-13 09:38:37 -04:00
af29857c5f chore(): update package lock files 2023-09-13 13:12:27 +00:00
f9a984e4aa v7.3.4 2023-09-13 13:12:09 +00:00
474308618d Merge remote-tracking branch 'origin/main' into sync-feat-74 2023-09-11 09:23:16 -04:00
19f3bb23fd feat: export TransitionOptions interface and getIonPageElement (#28140)
Issue number: resolves #28137

---------

Changes according to [this
comment](https://github.com/ionic-team/ionic-framework/issues/28137#issuecomment-1710283096)

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

@liamdebeasi Sorry for replacing the previous PR. I only copied the main
branch to my fork so I couldn't rebase properly. I am unfortunately not
extremely familiar with Github.

---------

Co-authored-by: Philipp Heuer <philipp@studysmarter.de>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-09-11 08:53:56 -04:00
7dbce4fc09 chore(): update package lock files 2023-09-06 13:24:04 +00:00
3de1dd3c14 v7.3.3 2023-09-06 13:23:50 +00:00
e6c7bb60e7 feat(checkbox, radio, toggle, range): stacked labels for form controls (#28075)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2023-09-01 09:30:59 -07:00
63cb96831e docs(angular): update README for clear directory paths (#28098)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

- The instructions doesn't provide clear directory paths for syncing
local changes.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- The instructions has clear directory paths for syncing local changes.
- Switched to the `[!NOTE]` for notes.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

N/A
2023-08-31 22:46:29 +00:00
a25c38223c chore(): update package lock files 2023-08-30 12:48:07 +00:00
f9211e5434 v7.3.2 2023-08-30 12:47:53 +00:00
b333bdffe6 chore(): update package lock files 2023-08-23 13:40:28 +00:00
5701f7661e v7.3.1 2023-08-23 13:40:10 +00:00
77707b8c1e fix(angular): min/max validator for ion-input type number (#27993)
Issue number: Resolves #23480

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Angular's min/max validators do not work with `ion-input[type=number]`.
Using the built-in validators with `ion-input` will not update the
control status to invalid, reflect the `ng-invalid` class or report the
correct errors.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- The `IonicModule` now includes two additional directive declarations
that extend Angular's built-in min/max validators and target the
`ion-input` component when using `type="number"`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-08-18 18:34:02 +00:00
bbfb8f81a6 fix(angular): ionTabsWillChange is fired before tab activation (#27991)
Issue number: Resolves #27212

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

`ionTabsWillChange` emits _after_ the tab view is activated in the
stack.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `ionTabsWillChange` emits _before_ the tab view is activated in the
stack.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev-build: `7.2.4-dev.11692040948.1fd0ecd2`
2023-08-18 15:07:09 +00:00
6877d659d3 chore(): update package lock files 2023-08-16 14:23:51 +00:00
16f7ec2284 v7.3.0 2023-08-16 14:23:33 +00:00
7c24965216 chore(): update package lock files 2023-08-16 13:26:24 +00:00
ffe5307905 v7.2.4 2023-08-16 13:26:09 +00:00
3a263d14c3 chore(): update package lock files 2023-08-09 16:28:15 +00:00
0cb37430d3 v7.2.3 2023-08-09 16:27:57 +00:00
01857dd315 chore(): update package lock files 2023-08-02 15:59:53 +00:00
dbe6f390ef v7.2.2 2023-08-02 15:59:37 +00:00
960adbbc5c chore(): update package lock files 2023-07-26 15:54:44 +00:00
db29871654 v7.2.1 2023-07-26 15:54:29 +00:00
08cc3d93ae chore(): update package lock files 2023-07-19 16:29:26 +00:00
8661e21674 v7.2.0 2023-07-19 16:29:12 +00:00
ddfbc9faef Merge remote-tracking branch 'origin/main' into final-7.2-sync 2023-07-19 09:52:12 -04:00