@ionic/core 8.7.17-dev.11770147425.1bfcd5e5 → 8.7.17-dev.11770319814.172b4f50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ion-range.js +39 -97
- package/components/ion-refresher.js +32 -3
- package/components/ion-select.js +3 -2
- package/components/select-modal.js +6 -1
- package/dist/cjs/ion-range.cjs.entry.js +39 -95
- package/dist/cjs/ion-refresher_2.cjs.entry.js +32 -3
- package/dist/cjs/ion-select-modal.cjs.entry.js +5 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +3 -2
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/range/range.js +42 -116
- package/dist/collection/components/refresher/refresher.js +70 -4
- package/dist/collection/components/select/select.js +3 -2
- package/dist/collection/components/select-modal/select-modal.js +25 -1
- package/dist/docs.json +83 -137
- package/dist/esm/ion-range.entry.js +39 -95
- package/dist/esm/ion-refresher_2.entry.js +32 -3
- package/dist/esm/ion-select-modal.entry.js +5 -1
- package/dist/esm/ion-select_3.entry.js +3 -2
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/html.html-data.json +5 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-012212e4.entry.js +4 -0
- package/dist/ionic/p-88367362.entry.js +4 -0
- package/dist/ionic/p-90f2d3ff.entry.js +4 -0
- package/dist/ionic/p-d2489bf2.entry.js +4 -0
- package/dist/types/components/range/range-interface.d.ts +0 -1
- package/dist/types/components/range/range.d.ts +4 -24
- package/dist/types/components/refresher/refresher-interface.d.ts +7 -0
- package/dist/types/components/refresher/refresher.d.ts +16 -3
- package/dist/types/components/select-modal/select-modal.d.ts +4 -0
- package/dist/types/components.d.ts +26 -5
- package/dist/types/interface.d.ts +1 -1
- package/hydrate/index.js +83 -122
- package/hydrate/index.mjs +83 -122
- package/package.json +1 -1
- package/dist/ionic/p-02d76786.entry.js +0 -4
- package/dist/ionic/p-639dd543.entry.js +0 -4
- package/dist/ionic/p-b0c2f1f1.entry.js +0 -4
- package/dist/ionic/p-eb024a5b.entry.js +0 -4
|
@@ -29,7 +29,7 @@ import { PickerButton, PickerColumn } from "./components/picker-legacy/picker-in
|
|
|
29
29
|
import { PopoverSize, PositionAlign, PositionReference, PositionSide, TriggerAction } from "./components/popover/popover-interface";
|
|
30
30
|
import { RadioGroupChangeEventDetail, RadioGroupCompareFn } from "./components/radio-group/radio-group-interface";
|
|
31
31
|
import { PinFormatter, RangeChangeEventDetail, RangeKnobMoveEndEventDetail, RangeKnobMoveStartEventDetail, RangeValue } from "./components/range/range-interface";
|
|
32
|
-
import { RefresherEventDetail } from "./components/refresher/refresher-interface";
|
|
32
|
+
import { RefresherEventDetail, RefresherPullEndEventDetail } from "./components/refresher/refresher-interface";
|
|
33
33
|
import { ItemReorderEventDetail, ReorderEndEventDetail, ReorderMoveEventDetail } from "./components/reorder-group/reorder-group-interface";
|
|
34
34
|
import { NavigationHookCallback } from "./components/route/route-interface";
|
|
35
35
|
import { SearchbarChangeEventDetail, SearchbarInputEventDetail } from "./components/searchbar/searchbar-interface";
|
|
@@ -67,7 +67,7 @@ export { PickerButton, PickerColumn } from "./components/picker-legacy/picker-in
|
|
|
67
67
|
export { PopoverSize, PositionAlign, PositionReference, PositionSide, TriggerAction } from "./components/popover/popover-interface";
|
|
68
68
|
export { RadioGroupChangeEventDetail, RadioGroupCompareFn } from "./components/radio-group/radio-group-interface";
|
|
69
69
|
export { PinFormatter, RangeChangeEventDetail, RangeKnobMoveEndEventDetail, RangeKnobMoveStartEventDetail, RangeValue } from "./components/range/range-interface";
|
|
70
|
-
export { RefresherEventDetail } from "./components/refresher/refresher-interface";
|
|
70
|
+
export { RefresherEventDetail, RefresherPullEndEventDetail } from "./components/refresher/refresher-interface";
|
|
71
71
|
export { ItemReorderEventDetail, ReorderEndEventDetail, ReorderMoveEventDetail } from "./components/reorder-group/reorder-group-interface";
|
|
72
72
|
export { NavigationHookCallback } from "./components/route/route-interface";
|
|
73
73
|
export { SearchbarChangeEventDetail, SearchbarInputEventDetail } from "./components/searchbar/searchbar-interface";
|
|
@@ -2745,7 +2745,7 @@ export namespace Components {
|
|
|
2745
2745
|
*/
|
|
2746
2746
|
"mode"?: "ios" | "md";
|
|
2747
2747
|
/**
|
|
2748
|
-
* How much to multiply the pull speed by. To slow the pull animation down, pass a number less than `1`. To speed up the pull, pass a number greater than `1`. The default value is `1` which is equal to the speed of the cursor. If a negative value is passed in, the factor will be `1` instead. For example
|
|
2748
|
+
* How much to multiply the pull speed by. To slow the pull animation down, pass a number less than `1`. To speed up the pull, pass a number greater than `1`. The default value is `1` which is equal to the speed of the cursor. If a negative value is passed in, the factor will be `1` instead. For example, If the value passed is `1.2` and the content is dragged by `10` pixels, instead of `10` pixels, the content will be pulled by `12` pixels (an increase of 20 percent). If the value passed is `0.8`, the dragged amount will be `8` pixels, less than the amount the cursor has moved. Does not apply when the refresher content uses a spinner, enabling the native refresher.
|
|
2749
2749
|
* @default 1
|
|
2750
2750
|
*/
|
|
2751
2751
|
"pullFactor": number;
|
|
@@ -3223,6 +3223,11 @@ export namespace Components {
|
|
|
3223
3223
|
"value"?: any | null;
|
|
3224
3224
|
}
|
|
3225
3225
|
interface IonSelectModal {
|
|
3226
|
+
/**
|
|
3227
|
+
* The text to display on the cancel button.
|
|
3228
|
+
* @default 'Close'
|
|
3229
|
+
*/
|
|
3230
|
+
"cancelText": string;
|
|
3226
3231
|
"header"?: string;
|
|
3227
3232
|
"multiple"?: boolean;
|
|
3228
3233
|
/**
|
|
@@ -4744,6 +4749,8 @@ declare global {
|
|
|
4744
4749
|
"ionRefresh": RefresherEventDetail;
|
|
4745
4750
|
"ionPull": void;
|
|
4746
4751
|
"ionStart": void;
|
|
4752
|
+
"ionPullStart": void;
|
|
4753
|
+
"ionPullEnd": RefresherPullEndEventDetail;
|
|
4747
4754
|
}
|
|
4748
4755
|
interface HTMLIonRefresherElement extends Components.IonRefresher, HTMLStencilElement {
|
|
4749
4756
|
addEventListener<K extends keyof HTMLIonRefresherElementEventMap>(type: K, listener: (this: HTMLIonRefresherElement, ev: IonRefresherCustomEvent<HTMLIonRefresherElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -7879,16 +7886,25 @@ declare namespace LocalJSX {
|
|
|
7879
7886
|
* Emitted while the user is pulling down the content and exposing the refresher.
|
|
7880
7887
|
*/
|
|
7881
7888
|
"onIonPull"?: (event: IonRefresherCustomEvent<void>) => void;
|
|
7889
|
+
/**
|
|
7890
|
+
* Emitted when the refresher has returned to the inactive state after a pull gesture. This fires whether the refresh completed successfully or was canceled.
|
|
7891
|
+
*/
|
|
7892
|
+
"onIonPullEnd"?: (event: IonRefresherCustomEvent<RefresherPullEndEventDetail>) => void;
|
|
7893
|
+
/**
|
|
7894
|
+
* Emitted when the user begins to start pulling down.
|
|
7895
|
+
*/
|
|
7896
|
+
"onIonPullStart"?: (event: IonRefresherCustomEvent<void>) => void;
|
|
7882
7897
|
/**
|
|
7883
7898
|
* Emitted when the user lets go of the content and has pulled down further than the `pullMin` or pulls the content down and exceeds the pullMax. Updates the refresher state to `refreshing`. The `complete()` method should be called when the async operation has completed.
|
|
7884
7899
|
*/
|
|
7885
7900
|
"onIonRefresh"?: (event: IonRefresherCustomEvent<RefresherEventDetail>) => void;
|
|
7886
7901
|
/**
|
|
7887
|
-
* Emitted when the user begins to start pulling down.
|
|
7902
|
+
* Emitted when the user begins to start pulling down. TODO(FW-7044): Remove this in a major release
|
|
7903
|
+
* @deprecated Use `ionPullStart` instead.
|
|
7888
7904
|
*/
|
|
7889
7905
|
"onIonStart"?: (event: IonRefresherCustomEvent<void>) => void;
|
|
7890
7906
|
/**
|
|
7891
|
-
* How much to multiply the pull speed by. To slow the pull animation down, pass a number less than `1`. To speed up the pull, pass a number greater than `1`. The default value is `1` which is equal to the speed of the cursor. If a negative value is passed in, the factor will be `1` instead. For example
|
|
7907
|
+
* How much to multiply the pull speed by. To slow the pull animation down, pass a number less than `1`. To speed up the pull, pass a number greater than `1`. The default value is `1` which is equal to the speed of the cursor. If a negative value is passed in, the factor will be `1` instead. For example, If the value passed is `1.2` and the content is dragged by `10` pixels, instead of `10` pixels, the content will be pulled by `12` pixels (an increase of 20 percent). If the value passed is `0.8`, the dragged amount will be `8` pixels, less than the amount the cursor has moved. Does not apply when the refresher content uses a spinner, enabling the native refresher.
|
|
7892
7908
|
* @default 1
|
|
7893
7909
|
*/
|
|
7894
7910
|
"pullFactor"?: number;
|
|
@@ -8402,6 +8418,11 @@ declare namespace LocalJSX {
|
|
|
8402
8418
|
"value"?: any | null;
|
|
8403
8419
|
}
|
|
8404
8420
|
interface IonSelectModal {
|
|
8421
|
+
/**
|
|
8422
|
+
* The text to display on the cancel button.
|
|
8423
|
+
* @default 'Close'
|
|
8424
|
+
*/
|
|
8425
|
+
"cancelText"?: string;
|
|
8405
8426
|
"header"?: string;
|
|
8406
8427
|
"multiple"?: boolean;
|
|
8407
8428
|
/**
|
|
@@ -24,7 +24,7 @@ export { PopoverOptions } from './components/popover/popover-interface';
|
|
|
24
24
|
export { RadioGroupCustomEvent } from './components/radio-group/radio-group-interface';
|
|
25
25
|
export { RangeCustomEvent, PinFormatter } from './components/range/range-interface';
|
|
26
26
|
export { RouterCustomEvent } from './components/router/utils/interface';
|
|
27
|
-
export { RefresherCustomEvent } from './components/refresher/refresher-interface';
|
|
27
|
+
export { RefresherCustomEvent, RefresherPullEndCustomEvent } from './components/refresher/refresher-interface';
|
|
28
28
|
export {
|
|
29
29
|
ItemReorderCustomEvent,
|
|
30
30
|
ReorderEndCustomEvent,
|
package/hydrate/index.js
CHANGED
|
@@ -28717,29 +28717,13 @@ const rangeMdCss = ":host{--knob-handle-size:calc(var(--knob-size) * 2);display:
|
|
|
28717
28717
|
* @slot start - Content is placed to the left of the range slider in LTR, and to the right in RTL.
|
|
28718
28718
|
* @slot end - Content is placed to the right of the range slider in LTR, and to the left in RTL.
|
|
28719
28719
|
*
|
|
28720
|
-
* @part label - The label text describing the range.
|
|
28721
28720
|
* @part tick - An inactive tick mark.
|
|
28722
28721
|
* @part tick-active - An active tick mark.
|
|
28722
|
+
* @part pin - The counter that appears above a knob.
|
|
28723
|
+
* @part knob - The handle that is used to drag the range.
|
|
28723
28724
|
* @part bar - The inactive part of the bar.
|
|
28724
28725
|
* @part bar-active - The active part of the bar.
|
|
28725
|
-
* @part
|
|
28726
|
-
* @part knob-handle-a - The container element for the first knob. Only available when `dualKnobs` is `true`.
|
|
28727
|
-
* @part knob-handle-b - The container element for the second knob. Only available when `dualKnobs` is `true`.
|
|
28728
|
-
* @part knob-handle-lower - The container element for the lower knob. Only available when `dualKnobs` is `true`.
|
|
28729
|
-
* @part knob-handle-upper - The container element for the upper knob. Only available when `dualKnobs` is `true`.
|
|
28730
|
-
* @part pin - The counter that appears above a knob.
|
|
28731
|
-
* @part pin-a - The counter that appears above the first knob. Only available when `dualKnobs` is `true`.
|
|
28732
|
-
* @part pin-b - The counter that appears above the second knob. Only available when `dualKnobs` is `true`.
|
|
28733
|
-
* @part pin-lower - The counter that appears above the lower knob. Only available when `dualKnobs` is `true`.
|
|
28734
|
-
* @part pin-upper - The counter that appears above the upper knob. Only available when `dualKnobs` is `true`.
|
|
28735
|
-
* @part knob - The visual knob element that appears on the range track.
|
|
28736
|
-
* @part knob-a - The visual knob element for the first knob. Only available when `dualKnobs` is `true`.
|
|
28737
|
-
* @part knob-b - The visual knob element for the second knob. Only available when `dualKnobs` is `true`.
|
|
28738
|
-
* @part knob-lower - The visual knob element for the lower knob. Only available when `dualKnobs` is `true`.
|
|
28739
|
-
* @part knob-upper - The visual knob element for the upper knob. Only available when `dualKnobs` is `true`.
|
|
28740
|
-
* @part pressed - Added to the knob-handle, knob, and pin that is currently being pressed to drag. Only one set has this part at a time when `dualKnobs` is `true`.
|
|
28741
|
-
* @part focused - Added to the knob-handle, knob, and pin that currently has focus. Only one set has this part at a time when `dualKnobs` is `true`.
|
|
28742
|
-
* @part hover - Added to the knob-handle, knob, and pin when the knob has hover. Only one set has this part at a time.
|
|
28726
|
+
* @part label - The label text describing the range.
|
|
28743
28727
|
*/
|
|
28744
28728
|
class Range {
|
|
28745
28729
|
constructor(hostRef) {
|
|
@@ -28757,7 +28741,6 @@ class Range {
|
|
|
28757
28741
|
this.inheritedAttributes = {};
|
|
28758
28742
|
this.contentEl = null;
|
|
28759
28743
|
this.initialContentScrollY = true;
|
|
28760
|
-
this.focusFromPointer = false;
|
|
28761
28744
|
this.ratioA = 0;
|
|
28762
28745
|
this.ratioB = 0;
|
|
28763
28746
|
/**
|
|
@@ -28889,7 +28872,6 @@ class Range {
|
|
|
28889
28872
|
this.onBlur = () => {
|
|
28890
28873
|
if (this.hasFocus) {
|
|
28891
28874
|
this.hasFocus = false;
|
|
28892
|
-
this.focusedKnob = undefined;
|
|
28893
28875
|
this.ionBlur.emit();
|
|
28894
28876
|
}
|
|
28895
28877
|
};
|
|
@@ -28900,20 +28882,21 @@ class Range {
|
|
|
28900
28882
|
}
|
|
28901
28883
|
};
|
|
28902
28884
|
this.onKnobFocus = (knob) => {
|
|
28903
|
-
// Clicking focuses the range which is needed for the keyboard,
|
|
28904
|
-
// but we only want to add the ion-focused class when focused via Tab.
|
|
28905
|
-
if (!this.focusFromPointer) {
|
|
28906
|
-
this.focusedKnob = knob;
|
|
28907
|
-
}
|
|
28908
|
-
else {
|
|
28909
|
-
this.focusFromPointer = false;
|
|
28910
|
-
this.focusedKnob = undefined;
|
|
28911
|
-
}
|
|
28912
|
-
// If the knob was not already focused, emit the focus event
|
|
28913
28885
|
if (!this.hasFocus) {
|
|
28914
28886
|
this.hasFocus = true;
|
|
28915
28887
|
this.ionFocus.emit();
|
|
28916
28888
|
}
|
|
28889
|
+
// Manually manage ion-focused class for dual knobs
|
|
28890
|
+
if (this.dualKnobs && this.el.shadowRoot) {
|
|
28891
|
+
const knobA = this.el.shadowRoot.querySelector('.range-knob-a');
|
|
28892
|
+
const knobB = this.el.shadowRoot.querySelector('.range-knob-b');
|
|
28893
|
+
// Remove ion-focused from both knobs first
|
|
28894
|
+
knobA === null || knobA === void 0 ? void 0 : knobA.classList.remove('ion-focused');
|
|
28895
|
+
knobB === null || knobB === void 0 ? void 0 : knobB.classList.remove('ion-focused');
|
|
28896
|
+
// Add ion-focused only to the focused knob
|
|
28897
|
+
const focusedKnobEl = knob === 'A' ? knobA : knobB;
|
|
28898
|
+
focusedKnobEl === null || focusedKnobEl === void 0 ? void 0 : focusedKnobEl.classList.add('ion-focused');
|
|
28899
|
+
}
|
|
28917
28900
|
};
|
|
28918
28901
|
this.onKnobBlur = () => {
|
|
28919
28902
|
// Check if focus is moving to another knob within the same range
|
|
@@ -28925,18 +28908,18 @@ class Range {
|
|
|
28925
28908
|
if (!isStillFocusedOnKnob) {
|
|
28926
28909
|
if (this.hasFocus) {
|
|
28927
28910
|
this.hasFocus = false;
|
|
28928
|
-
this.focusedKnob = undefined;
|
|
28929
28911
|
this.ionBlur.emit();
|
|
28930
28912
|
}
|
|
28913
|
+
// Remove ion-focused from both knobs when focus leaves the range
|
|
28914
|
+
if (this.dualKnobs && this.el.shadowRoot) {
|
|
28915
|
+
const knobA = this.el.shadowRoot.querySelector('.range-knob-a');
|
|
28916
|
+
const knobB = this.el.shadowRoot.querySelector('.range-knob-b');
|
|
28917
|
+
knobA === null || knobA === void 0 ? void 0 : knobA.classList.remove('ion-focused');
|
|
28918
|
+
knobB === null || knobB === void 0 ? void 0 : knobB.classList.remove('ion-focused');
|
|
28919
|
+
}
|
|
28931
28920
|
}
|
|
28932
28921
|
}, 0);
|
|
28933
28922
|
};
|
|
28934
|
-
this.onKnobMouseEnter = (knob) => {
|
|
28935
|
-
this.hoveredKnob = knob;
|
|
28936
|
-
};
|
|
28937
|
-
this.onKnobMouseLeave = () => {
|
|
28938
|
-
this.hoveredKnob = undefined;
|
|
28939
|
-
};
|
|
28940
28923
|
}
|
|
28941
28924
|
debounceChanged() {
|
|
28942
28925
|
const { ionInput, debounce, originalIonInput } = this;
|
|
@@ -29190,6 +29173,7 @@ class Range {
|
|
|
29190
29173
|
ratio = 1 - ratio;
|
|
29191
29174
|
}
|
|
29192
29175
|
this.pressedKnob = !this.dualKnobs || Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio) ? 'A' : 'B';
|
|
29176
|
+
this.setFocus(this.pressedKnob);
|
|
29193
29177
|
}
|
|
29194
29178
|
get valA() {
|
|
29195
29179
|
return ratioToValue(this.ratioA, this.min, this.max, this.step);
|
|
@@ -29216,23 +29200,9 @@ class Range {
|
|
|
29216
29200
|
updateRatio() {
|
|
29217
29201
|
const value = this.getValue();
|
|
29218
29202
|
const { min, max } = this;
|
|
29219
|
-
/**
|
|
29220
|
-
* For dual knobs, value gives lower/upper but not which is A vs B.
|
|
29221
|
-
* Assign (lowerRatio, upperRatio) to (ratioA, ratioB) in the way that
|
|
29222
|
-
* minimizes change from the current ratios so the knobs don't swap.
|
|
29223
|
-
*/
|
|
29224
29203
|
if (this.dualKnobs) {
|
|
29225
|
-
|
|
29226
|
-
|
|
29227
|
-
if (Math.abs(this.ratioA - lowerRatio) + Math.abs(this.ratioB - upperRatio) <=
|
|
29228
|
-
Math.abs(this.ratioA - upperRatio) + Math.abs(this.ratioB - lowerRatio)) {
|
|
29229
|
-
this.ratioA = lowerRatio;
|
|
29230
|
-
this.ratioB = upperRatio;
|
|
29231
|
-
}
|
|
29232
|
-
else {
|
|
29233
|
-
this.ratioA = upperRatio;
|
|
29234
|
-
this.ratioB = lowerRatio;
|
|
29235
|
-
}
|
|
29204
|
+
this.ratioA = valueToRatio(value.lower, min, max);
|
|
29205
|
+
this.ratioB = valueToRatio(value.upper, min, max);
|
|
29236
29206
|
}
|
|
29237
29207
|
else {
|
|
29238
29208
|
this.ratioA = valueToRatio(value, min, max);
|
|
@@ -29249,6 +29219,14 @@ class Range {
|
|
|
29249
29219
|
};
|
|
29250
29220
|
this.noUpdate = false;
|
|
29251
29221
|
}
|
|
29222
|
+
setFocus(knob) {
|
|
29223
|
+
if (this.el.shadowRoot) {
|
|
29224
|
+
const knobEl = this.el.shadowRoot.querySelector(knob === 'A' ? '.range-knob-a' : '.range-knob-b');
|
|
29225
|
+
if (knobEl) {
|
|
29226
|
+
knobEl.focus();
|
|
29227
|
+
}
|
|
29228
|
+
}
|
|
29229
|
+
}
|
|
29252
29230
|
/**
|
|
29253
29231
|
* Returns true if content was passed to the "start" slot
|
|
29254
29232
|
*/
|
|
@@ -29266,7 +29244,7 @@ class Range {
|
|
|
29266
29244
|
}
|
|
29267
29245
|
renderRangeSlider() {
|
|
29268
29246
|
var _a;
|
|
29269
|
-
const { min, max, step, handleKeyboard,
|
|
29247
|
+
const { min, max, step, handleKeyboard, pressedKnob, disabled, pin, ratioLower, ratioUpper, pinFormatter, inheritedAttributes, } = this;
|
|
29270
29248
|
let barStart = `${ratioLower * 100}%`;
|
|
29271
29249
|
let barEnd = `${100 - ratioUpper * 100}%`;
|
|
29272
29250
|
const rtl = isRTL$1(this.el);
|
|
@@ -29326,9 +29304,7 @@ class Range {
|
|
|
29326
29304
|
ticks.push(tick);
|
|
29327
29305
|
}
|
|
29328
29306
|
}
|
|
29329
|
-
return (hAsync("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl),
|
|
29330
|
-
this.focusFromPointer = true;
|
|
29331
|
-
},
|
|
29307
|
+
return (hAsync("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl),
|
|
29332
29308
|
/**
|
|
29333
29309
|
* Since the gesture has a threshold, the value
|
|
29334
29310
|
* won't change until the user has dragged past
|
|
@@ -29341,7 +29317,6 @@ class Range {
|
|
|
29341
29317
|
* we need to listen for the "pointerUp" event.
|
|
29342
29318
|
*/
|
|
29343
29319
|
onPointerUp: (ev) => {
|
|
29344
|
-
this.focusFromPointer = false;
|
|
29345
29320
|
/**
|
|
29346
29321
|
* If the user drags the knob on the web
|
|
29347
29322
|
* version (does not occur on mobile),
|
|
@@ -29367,10 +29342,6 @@ class Range {
|
|
|
29367
29342
|
'has-ticks': ticks.length > 0,
|
|
29368
29343
|
}, role: "presentation", style: barStyle, part: "bar-active" })), renderKnob(rtl, {
|
|
29369
29344
|
knob: 'A',
|
|
29370
|
-
position: this.dualKnobs ? (this.ratioA <= this.ratioB ? 'lower' : 'upper') : 'lower',
|
|
29371
|
-
dualKnobs: this.dualKnobs,
|
|
29372
|
-
focused: focusedKnob === 'A',
|
|
29373
|
-
hovered: hoveredKnob === 'A',
|
|
29374
29345
|
pressed: pressedKnob === 'A',
|
|
29375
29346
|
value: this.valA,
|
|
29376
29347
|
ratio: this.ratioA,
|
|
@@ -29383,15 +29354,9 @@ class Range {
|
|
|
29383
29354
|
inheritedAttributes,
|
|
29384
29355
|
onKnobFocus: this.onKnobFocus,
|
|
29385
29356
|
onKnobBlur: this.onKnobBlur,
|
|
29386
|
-
onKnobMouseEnter: this.onKnobMouseEnter,
|
|
29387
|
-
onKnobMouseLeave: this.onKnobMouseLeave,
|
|
29388
29357
|
}), this.dualKnobs &&
|
|
29389
29358
|
renderKnob(rtl, {
|
|
29390
29359
|
knob: 'B',
|
|
29391
|
-
position: this.ratioB <= this.ratioA ? 'lower' : 'upper',
|
|
29392
|
-
dualKnobs: this.dualKnobs,
|
|
29393
|
-
focused: focusedKnob === 'B',
|
|
29394
|
-
hovered: hoveredKnob === 'B',
|
|
29395
29360
|
pressed: pressedKnob === 'B',
|
|
29396
29361
|
value: this.valB,
|
|
29397
29362
|
ratio: this.ratioB,
|
|
@@ -29404,8 +29369,6 @@ class Range {
|
|
|
29404
29369
|
inheritedAttributes,
|
|
29405
29370
|
onKnobFocus: this.onKnobFocus,
|
|
29406
29371
|
onKnobBlur: this.onKnobBlur,
|
|
29407
|
-
onKnobMouseEnter: this.onKnobMouseEnter,
|
|
29408
|
-
onKnobMouseLeave: this.onKnobMouseLeave,
|
|
29409
29372
|
})));
|
|
29410
29373
|
}
|
|
29411
29374
|
render() {
|
|
@@ -29431,11 +29394,10 @@ class Range {
|
|
|
29431
29394
|
const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
|
|
29432
29395
|
const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
|
|
29433
29396
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
29434
|
-
return (hAsync(Host, { key: '
|
|
29397
|
+
return (hAsync(Host, { key: 'ed646a42d51b8fe22012198c354cbcf5a389c108', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses$1(this.color, {
|
|
29435
29398
|
[mode]: true,
|
|
29436
29399
|
'in-item': inItem,
|
|
29437
29400
|
'range-disabled': disabled,
|
|
29438
|
-
'range-dual-knobs': dualKnobs,
|
|
29439
29401
|
'range-pressed': pressedKnob !== undefined,
|
|
29440
29402
|
'range-has-pin': pin,
|
|
29441
29403
|
[`range-label-placement-${labelPlacement}`]: true,
|
|
@@ -29443,10 +29405,10 @@ class Range {
|
|
|
29443
29405
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
29444
29406
|
'range-value-min': valueAtMin,
|
|
29445
29407
|
'range-value-max': valueAtMax,
|
|
29446
|
-
}) }, hAsync("label", { key: '
|
|
29408
|
+
}) }, hAsync("label", { key: '3083e4f2a624e3b268396acb4415f7c6ac44d851', class: "range-wrapper", id: "range-label" }, hAsync("div", { key: '47b92f94d2a0381dd7c5cd3dda54ed2942096715', class: {
|
|
29447
29409
|
'label-text-wrapper': true,
|
|
29448
29410
|
'label-text-wrapper-hidden': !hasLabel,
|
|
29449
|
-
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '
|
|
29411
|
+
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '5341da8d19eb29091df680978a0e20cc8f2eec65', class: "native-wrapper" }, hAsync("slot", { key: '09f1437078032676695442d8c827a16faa7dffe2', name: "start" }), this.renderRangeSlider(), hAsync("slot", { key: '02b7781970ea4d44f10b5f4627a2ca36eca45f85', name: "end" })))));
|
|
29450
29412
|
}
|
|
29451
29413
|
get el() { return getElement(this); }
|
|
29452
29414
|
static get watchers() { return {
|
|
@@ -29484,8 +29446,6 @@ class Range {
|
|
|
29484
29446
|
"labelPlacement": [1, "label-placement"],
|
|
29485
29447
|
"ratioA": [32],
|
|
29486
29448
|
"ratioB": [32],
|
|
29487
|
-
"focusedKnob": [32],
|
|
29488
|
-
"hoveredKnob": [32],
|
|
29489
29449
|
"pressedKnob": [32]
|
|
29490
29450
|
},
|
|
29491
29451
|
"$listeners$": undefined,
|
|
@@ -29493,7 +29453,7 @@ class Range {
|
|
|
29493
29453
|
"$attrsToReflect$": [["color", "color"]]
|
|
29494
29454
|
}; }
|
|
29495
29455
|
}
|
|
29496
|
-
const renderKnob = (rtl, { knob,
|
|
29456
|
+
const renderKnob = (rtl, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, pinFormatter, inheritedAttributes, onKnobFocus, onKnobBlur, }) => {
|
|
29497
29457
|
const start = rtl ? 'right' : 'left';
|
|
29498
29458
|
const knobStyle = () => {
|
|
29499
29459
|
const style = {};
|
|
@@ -29514,50 +29474,16 @@ const renderKnob = (rtl, { knob, position, dualKnobs, value, ratio, min, max, di
|
|
|
29514
29474
|
ev.preventDefault();
|
|
29515
29475
|
ev.stopPropagation();
|
|
29516
29476
|
}
|
|
29517
|
-
}, onFocus: () => onKnobFocus(knob), onBlur: onKnobBlur,
|
|
29477
|
+
}, onFocus: () => onKnobFocus(knob), onBlur: onKnobBlur, class: {
|
|
29518
29478
|
'range-knob-handle': true,
|
|
29519
|
-
'range-knob-
|
|
29520
|
-
'range-knob-
|
|
29479
|
+
'range-knob-a': knob === 'A',
|
|
29480
|
+
'range-knob-b': knob === 'B',
|
|
29521
29481
|
'range-knob-pressed': pressed,
|
|
29522
29482
|
'range-knob-min': value === min,
|
|
29523
29483
|
'range-knob-max': value === max,
|
|
29524
29484
|
'ion-activatable': true,
|
|
29525
29485
|
'ion-focusable': true,
|
|
29526
|
-
|
|
29527
|
-
}, part: [
|
|
29528
|
-
'knob-handle',
|
|
29529
|
-
dualKnobs && knob === 'A' && 'knob-handle-a',
|
|
29530
|
-
dualKnobs && knob === 'B' && 'knob-handle-b',
|
|
29531
|
-
dualKnobs && position === 'lower' && 'knob-handle-lower',
|
|
29532
|
-
dualKnobs && position === 'upper' && 'knob-handle-upper',
|
|
29533
|
-
pressed && 'pressed',
|
|
29534
|
-
focused && 'focused',
|
|
29535
|
-
hovered && 'hover',
|
|
29536
|
-
]
|
|
29537
|
-
.filter(Boolean)
|
|
29538
|
-
.join(' '), style: knobStyle(), role: "slider", tabindex: disabled ? -1 : 0, "aria-label": ariaLabel !== undefined ? ariaLabel : null, "aria-labelledby": ariaLabel === undefined ? 'range-label' : null, "aria-valuemin": min, "aria-valuemax": max, "aria-disabled": disabled ? 'true' : null, "aria-valuenow": value }, pin && (hAsync("div", { class: "range-pin", role: "presentation", part: [
|
|
29539
|
-
'pin',
|
|
29540
|
-
dualKnobs && knob === 'A' && 'pin-a',
|
|
29541
|
-
dualKnobs && knob === 'B' && 'pin-b',
|
|
29542
|
-
dualKnobs && position === 'lower' && 'pin-lower',
|
|
29543
|
-
dualKnobs && position === 'upper' && 'pin-upper',
|
|
29544
|
-
pressed && 'pressed',
|
|
29545
|
-
focused && 'focused',
|
|
29546
|
-
hovered && 'hover',
|
|
29547
|
-
]
|
|
29548
|
-
.filter(Boolean)
|
|
29549
|
-
.join(' ') }, pinFormatter(value))), hAsync("div", { class: "range-knob", role: "presentation", part: [
|
|
29550
|
-
'knob',
|
|
29551
|
-
dualKnobs && knob === 'A' && 'knob-a',
|
|
29552
|
-
dualKnobs && knob === 'B' && 'knob-b',
|
|
29553
|
-
dualKnobs && position === 'lower' && 'knob-lower',
|
|
29554
|
-
dualKnobs && position === 'upper' && 'knob-upper',
|
|
29555
|
-
pressed && 'pressed',
|
|
29556
|
-
focused && 'focused',
|
|
29557
|
-
hovered && 'hover',
|
|
29558
|
-
]
|
|
29559
|
-
.filter(Boolean)
|
|
29560
|
-
.join(' ') })));
|
|
29486
|
+
}, style: knobStyle(), role: "slider", tabindex: disabled ? -1 : 0, "aria-label": ariaLabel !== undefined ? ariaLabel : null, "aria-labelledby": ariaLabel === undefined ? 'range-label' : null, "aria-valuemin": min, "aria-valuemax": max, "aria-disabled": disabled ? 'true' : null, "aria-valuenow": value }, pin && (hAsync("div", { class: "range-pin", role: "presentation", part: "pin" }, pinFormatter(value))), hAsync("div", { class: "range-knob", role: "presentation", part: "knob" })));
|
|
29561
29487
|
};
|
|
29562
29488
|
const ratioToValue = (ratio, min, max, step) => {
|
|
29563
29489
|
let value = (max - min) * ratio;
|
|
@@ -29774,6 +29700,8 @@ class Refresher {
|
|
|
29774
29700
|
this.ionRefresh = createEvent(this, "ionRefresh", 7);
|
|
29775
29701
|
this.ionPull = createEvent(this, "ionPull", 7);
|
|
29776
29702
|
this.ionStart = createEvent(this, "ionStart", 7);
|
|
29703
|
+
this.ionPullStart = createEvent(this, "ionPullStart", 7);
|
|
29704
|
+
this.ionPullEnd = createEvent(this, "ionPullEnd", 7);
|
|
29777
29705
|
this.appliedStyles = false;
|
|
29778
29706
|
this.didStart = false;
|
|
29779
29707
|
this.progress = 0;
|
|
@@ -29828,8 +29756,8 @@ class Refresher {
|
|
|
29828
29756
|
* than `1`. The default value is `1` which is equal to the speed of the cursor.
|
|
29829
29757
|
* If a negative value is passed in, the factor will be `1` instead.
|
|
29830
29758
|
*
|
|
29831
|
-
* For example
|
|
29832
|
-
* `10` pixels, instead of `10` pixels the content will be pulled by `12` pixels
|
|
29759
|
+
* For example, If the value passed is `1.2` and the content is dragged by
|
|
29760
|
+
* `10` pixels, instead of `10` pixels, the content will be pulled by `12` pixels
|
|
29833
29761
|
* (an increase of 20 percent). If the value passed is `0.8`, the dragged amount
|
|
29834
29762
|
* will be `8` pixels, less than the amount the cursor has moved.
|
|
29835
29763
|
*
|
|
@@ -29879,6 +29807,9 @@ class Refresher {
|
|
|
29879
29807
|
this.animations = [];
|
|
29880
29808
|
this.progress = 0;
|
|
29881
29809
|
this.state = 1 /* RefresherState.Inactive */;
|
|
29810
|
+
this.ionPullEnd.emit({
|
|
29811
|
+
reason: state === 32 /* RefresherState.Completing */ ? 'complete' : 'cancel',
|
|
29812
|
+
});
|
|
29882
29813
|
}
|
|
29883
29814
|
async setupiOSNativeRefresher(pullingSpinner, refreshingSpinner) {
|
|
29884
29815
|
this.elementToTransform = this.scrollEl;
|
|
@@ -29911,6 +29842,7 @@ class Refresher {
|
|
|
29911
29842
|
if (!this.didStart) {
|
|
29912
29843
|
this.didStart = true;
|
|
29913
29844
|
this.ionStart.emit();
|
|
29845
|
+
this.ionPullStart.emit();
|
|
29914
29846
|
}
|
|
29915
29847
|
// emit "pulling" on every move
|
|
29916
29848
|
if (this.pointerDown) {
|
|
@@ -29986,6 +29918,7 @@ class Refresher {
|
|
|
29986
29918
|
this.lastVelocityY = ev.velocityY;
|
|
29987
29919
|
},
|
|
29988
29920
|
onEnd: () => {
|
|
29921
|
+
const hadStarted = this.didStart;
|
|
29989
29922
|
this.pointerDown = false;
|
|
29990
29923
|
this.didStart = false;
|
|
29991
29924
|
if (this.needsCompletion) {
|
|
@@ -29995,6 +29928,13 @@ class Refresher {
|
|
|
29995
29928
|
else if (this.didRefresh) {
|
|
29996
29929
|
readTask(() => translateElement(this.elementToTransform, `${this.el.clientHeight}px`));
|
|
29997
29930
|
}
|
|
29931
|
+
else if (hadStarted) {
|
|
29932
|
+
/**
|
|
29933
|
+
* User started pulling but released before reaching the refresh threshold.
|
|
29934
|
+
* Emit ionPullEnd to complete the event pair.
|
|
29935
|
+
*/
|
|
29936
|
+
this.ionPullEnd.emit({ reason: 'cancel' });
|
|
29937
|
+
}
|
|
29998
29938
|
},
|
|
29999
29939
|
});
|
|
30000
29940
|
this.disabledChanged();
|
|
@@ -30041,6 +29981,7 @@ class Refresher {
|
|
|
30041
29981
|
ev.data.animation = animation;
|
|
30042
29982
|
animation.progressStart(false, 0);
|
|
30043
29983
|
this.ionStart.emit();
|
|
29984
|
+
this.ionPullStart.emit();
|
|
30044
29985
|
this.animations.push(animation);
|
|
30045
29986
|
return;
|
|
30046
29987
|
}
|
|
@@ -30063,6 +30004,7 @@ class Refresher {
|
|
|
30063
30004
|
this.animations = [];
|
|
30064
30005
|
this.gesture.enable(true);
|
|
30065
30006
|
this.state = 1 /* RefresherState.Inactive */;
|
|
30007
|
+
this.ionPullEnd.emit({ reason: 'cancel' });
|
|
30066
30008
|
});
|
|
30067
30009
|
return;
|
|
30068
30010
|
}
|
|
@@ -30307,6 +30249,7 @@ class Refresher {
|
|
|
30307
30249
|
if (!this.didStart) {
|
|
30308
30250
|
this.didStart = true;
|
|
30309
30251
|
this.ionStart.emit();
|
|
30252
|
+
this.ionPullStart.emit();
|
|
30310
30253
|
}
|
|
30311
30254
|
// emit "pulling" on every move
|
|
30312
30255
|
this.ionPull.emit();
|
|
@@ -30350,6 +30293,15 @@ class Refresher {
|
|
|
30350
30293
|
* available right away.
|
|
30351
30294
|
*/
|
|
30352
30295
|
this.restoreOverflowStyle();
|
|
30296
|
+
/**
|
|
30297
|
+
* If ionPullStart was emitted, we need to emit ionPullEnd
|
|
30298
|
+
* even though the gesture was aborted before reaching the
|
|
30299
|
+
* pulling threshold.
|
|
30300
|
+
*/
|
|
30301
|
+
if (this.didStart) {
|
|
30302
|
+
this.didStart = false;
|
|
30303
|
+
this.ionPullEnd.emit({ reason: 'cancel' });
|
|
30304
|
+
}
|
|
30353
30305
|
}
|
|
30354
30306
|
}
|
|
30355
30307
|
beginRefresh() {
|
|
@@ -30396,6 +30348,9 @@ class Refresher {
|
|
|
30396
30348
|
if (this.contentFullscreen && this.backgroundContentEl) {
|
|
30397
30349
|
(_a = this.backgroundContentEl) === null || _a === void 0 ? void 0 : _a.style.removeProperty('--offset-top');
|
|
30398
30350
|
}
|
|
30351
|
+
this.ionPullEnd.emit({
|
|
30352
|
+
reason: state === 32 /* RefresherState.Completing */ ? 'complete' : 'cancel',
|
|
30353
|
+
});
|
|
30399
30354
|
}, 600);
|
|
30400
30355
|
// reset the styles on the scroll element
|
|
30401
30356
|
// set that the refresh is actively cancelling/completing
|
|
@@ -30449,7 +30404,7 @@ class Refresher {
|
|
|
30449
30404
|
}
|
|
30450
30405
|
render() {
|
|
30451
30406
|
const mode = getIonMode$1(this);
|
|
30452
|
-
return (hAsync(Host, { key: '
|
|
30407
|
+
return (hAsync(Host, { key: 'bed0c2f44c32ecac24b7d8326ac7c7ef1d12c44f', slot: "fixed", class: {
|
|
30453
30408
|
[mode]: true,
|
|
30454
30409
|
// Used internally for styling
|
|
30455
30410
|
[`refresher-${mode}`]: true,
|
|
@@ -34181,6 +34136,7 @@ class Select {
|
|
|
34181
34136
|
const mode = getIonMode$1(this);
|
|
34182
34137
|
const modalOpts = Object.assign(Object.assign({}, interfaceOptions), { mode, cssClass: ['select-modal', interfaceOptions.cssClass], component: 'ion-select-modal', componentProps: {
|
|
34183
34138
|
header: interfaceOptions.header,
|
|
34139
|
+
cancelText: this.cancelText,
|
|
34184
34140
|
multiple,
|
|
34185
34141
|
value,
|
|
34186
34142
|
options: this.createOverlaySelectOptions(this.childOpts, value),
|
|
@@ -34430,7 +34386,7 @@ class Select {
|
|
|
34430
34386
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
34431
34387
|
*/
|
|
34432
34388
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
34433
|
-
return (hAsync(Host, { key: '
|
|
34389
|
+
return (hAsync(Host, { key: 'b7fa907f8fbc54fd63e2d07a9bb5156d94fd5057', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
34434
34390
|
[mode]: true,
|
|
34435
34391
|
'in-item': inItem,
|
|
34436
34392
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -34448,7 +34404,7 @@ class Select {
|
|
|
34448
34404
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
34449
34405
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
34450
34406
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
34451
|
-
}) }, hAsync("label", { key: '
|
|
34407
|
+
}) }, hAsync("label", { key: '11137e6a8b0374e93923ddb5a4629972ded5f43c', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '99e3c09b5e6c2e7be493ed5834f991fffe45cfff', class: "select-wrapper-inner" }, hAsync("slot", { key: '740f0e5a913cb0209d5acae31c33a6ed8f672dfc', name: "start" }), hAsync("div", { key: 'b20e33c8b60915a5194948fcf8e22d7789f0b050', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: '0199f338185d5fa2cdd977bb20516746bd9ddad5', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: '3b54de893cc8fc66df8588cee22e30d6f10850b3', class: "select-highlight" })), this.renderBottomContent()));
|
|
34452
34408
|
}
|
|
34453
34409
|
get el() { return getElement(this); }
|
|
34454
34410
|
static get watchers() { return {
|
|
@@ -34543,6 +34499,10 @@ const selectModalMdCss = ".sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-
|
|
|
34543
34499
|
class SelectModal {
|
|
34544
34500
|
constructor(hostRef) {
|
|
34545
34501
|
registerInstance(this, hostRef);
|
|
34502
|
+
/**
|
|
34503
|
+
* The text to display on the cancel button.
|
|
34504
|
+
*/
|
|
34505
|
+
this.cancelText = 'Close';
|
|
34546
34506
|
this.options = [];
|
|
34547
34507
|
}
|
|
34548
34508
|
closeModal() {
|
|
@@ -34609,7 +34569,7 @@ class SelectModal {
|
|
|
34609
34569
|
} }, option.text))));
|
|
34610
34570
|
}
|
|
34611
34571
|
render() {
|
|
34612
|
-
return (hAsync(Host, { key: '
|
|
34572
|
+
return (hAsync(Host, { key: '59ba79ffdbb69befe8e13745450c1071a1fe8c6c', class: getIonMode$1(this) }, hAsync("ion-header", { key: 'fa4d08ee43eec4b9add09d9ffabcba9ed13dd4af' }, hAsync("ion-toolbar", { key: 'b5e26cf092297c51c1dba3ce7963e7b03420393b' }, this.header !== undefined && hAsync("ion-title", { key: 'a8a93cdea4d119d3a17d8cef3878b8a1daa86e26' }, this.header), hAsync("ion-buttons", { key: 'bbc656713b41ef09099ed466f93a9cfbdaceecc1', slot: "end" }, hAsync("ion-button", { key: '80b8751fe4c96e06b620a0b9d17b2d9b3da2faa5', onClick: () => this.closeModal() }, this.cancelText)))), hAsync("ion-content", { key: 'a251fc00ae4cc7e6b3abe13caa10d95bb515558e' }, hAsync("ion-list", { key: 'bcaf38d6d91accfabb4a9d26783bc0e4801abe3c' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
|
|
34613
34573
|
}
|
|
34614
34574
|
get el() { return getElement(this); }
|
|
34615
34575
|
static get style() { return {
|
|
@@ -34622,6 +34582,7 @@ class SelectModal {
|
|
|
34622
34582
|
"$tagName$": "ion-select-modal",
|
|
34623
34583
|
"$members$": {
|
|
34624
34584
|
"header": [1],
|
|
34585
|
+
"cancelText": [1, "cancel-text"],
|
|
34625
34586
|
"multiple": [4],
|
|
34626
34587
|
"options": [16]
|
|
34627
34588
|
},
|