@sbb-esta/lyne-elements 2.0.2 → 2.1.0
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/accordion/accordion.d.ts.map +1 -1
- package/accordion.js +6 -6
- package/alert/alert.js +8 -8
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button.js +4 -4
- package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-option.js +10 -10
- package/autocomplete-grid/autocomplete-grid-row.js +4 -4
- package/autocomplete.js +92 -89
- package/breadcrumb/breadcrumb-group.js +4 -4
- package/button/accent-button-link.js +9 -9
- package/button/accent-button-static.js +6 -6
- package/button/accent-button.js +6 -6
- package/button/button-link.js +7 -7
- package/button/button-static.js +7 -7
- package/button/button.js +8 -8
- package/button/common.js +1 -1
- package/button/mini-button-group.js +8 -8
- package/button/secondary-button-link.js +7 -7
- package/button/secondary-button-static.js +7 -7
- package/button/secondary-button.js +3 -3
- package/button/transparent-button-link.js +6 -6
- package/button/transparent-button-static.js +5 -5
- package/button/transparent-button.js +6 -6
- package/card/card-badge.js +9 -9
- package/card/card-button.js +5 -5
- package/card/card-link.js +7 -7
- package/checkbox/checkbox-panel.js +16 -16
- package/checkbox/checkbox.js +15 -15
- package/checkbox/common.js +3 -3
- package/clock.js +8 -8
- package/container/container/container.d.ts +1 -1
- package/container/container/container.d.ts.map +1 -1
- package/container/container.js +21 -21
- package/container/sticky-bar/sticky-bar.d.ts +1 -1
- package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/container/sticky-bar.js +4 -4
- package/core/base-elements.js +8 -8
- package/core/controllers.js +4 -4
- package/core/datetime/date-adapter.d.ts +1 -1
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/native-date-adapter.d.ts +1 -1
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime.js +6 -6
- package/core/dom/scroll.d.ts +1 -1
- package/core/dom/scroll.d.ts.map +1 -1
- package/core/dom.js +39 -39
- package/core/eventing.js +4 -4
- package/core/mixins/form-associated-mixin.d.ts +2 -4
- package/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-radio-button-mixin.d.ts +3 -3
- package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/core/mixins.js +276 -276
- package/core/styles/core.scss +21 -2
- package/core/testing.js +14 -14
- package/core.css +18 -2
- package/custom-elements.json +528 -554
- package/datepicker/common/datepicker-association-controllers.d.ts +21 -0
- package/datepicker/common/datepicker-association-controllers.d.ts.map +1 -0
- package/datepicker/common/datepicker-button.d.ts +17 -9
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common.d.ts +1 -0
- package/datepicker/common.d.ts.map +1 -1
- package/datepicker/common.js +130 -92
- package/datepicker/datepicker/datepicker.d.ts +19 -4
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +14 -8
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +108 -112
- package/datepicker/datepicker.js +95 -80
- package/development/accordion/accordion.d.ts.map +1 -1
- package/development/accordion.js +1 -1
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option.js +3 -3
- package/development/autocomplete.js +24 -8
- package/development/button/common.js +4 -2
- package/development/calendar.js +1 -1
- package/development/container/container/container.d.ts +1 -1
- package/development/container/container/container.d.ts.map +1 -1
- package/development/container/container.js +17 -1
- package/development/container/sticky-bar/sticky-bar.d.ts +1 -1
- package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/development/container/sticky-bar.js +9 -1
- package/development/core/datetime/date-adapter.d.ts +1 -1
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/native-date-adapter.d.ts +1 -1
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime.js +1 -1
- package/development/core/dom/scroll.d.ts +1 -1
- package/development/core/dom/scroll.d.ts.map +1 -1
- package/development/core/dom.js +4 -4
- package/development/core/mixins/form-associated-mixin.d.ts +2 -4
- package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts +3 -3
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/development/core/mixins.js +45 -49
- package/development/datepicker/common/datepicker-association-controllers.d.ts +21 -0
- package/development/datepicker/common/datepicker-association-controllers.d.ts.map +1 -0
- package/development/datepicker/common/datepicker-button.d.ts +17 -9
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common.d.ts +1 -0
- package/development/datepicker/common.d.ts.map +1 -1
- package/development/datepicker/common.js +139 -90
- package/development/datepicker/datepicker/datepicker.d.ts +19 -4
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +14 -8
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +65 -69
- package/development/datepicker/datepicker.js +54 -36
- package/development/dialog/dialog/dialog.d.ts +2 -0
- package/development/dialog/dialog/dialog.d.ts.map +1 -1
- package/development/dialog/dialog.js +37 -11
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu.js +35 -12
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation.js +15 -8
- package/development/option/option/option-base-element.d.ts +3 -2
- package/development/option/option/option-base-element.d.ts.map +1 -1
- package/development/option/option.js +15 -8
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay/overlay.d.ts.map +1 -1
- package/development/overlay.js +29 -13
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover.js +16 -13
- package/development/radio-button/common/radio-button-common.d.ts +0 -2
- package/development/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/development/radio-button/common.js +2 -18
- package/development/radio-button/radio-button-group.js +2 -2
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts +9 -1
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/development/radio-button/radio-button-panel.js +17 -7
- package/development/select/select.d.ts +11 -0
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +60 -9
- package/development/toast/toast.d.ts.map +1 -1
- package/development/toast.js +14 -8
- package/development/toggle/toggle.js +1 -1
- package/development/train/train-wagon.js +1 -1
- package/dialog/dialog/dialog.d.ts +2 -0
- package/dialog/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog-content.js +3 -3
- package/dialog/dialog-title.js +8 -8
- package/dialog/dialog.js +59 -49
- package/divider.js +12 -12
- package/file-selector/file-selector-dropzone.js +5 -5
- package/file-selector/file-selector.js +6 -6
- package/flip-card/flip-card-details.js +4 -4
- package/flip-card/flip-card-summary.js +9 -9
- package/header/header-button.js +5 -5
- package/header/header-link.js +5 -5
- package/icon.js +36 -36
- package/link/block-link-button.js +4 -4
- package/link/block-link-static.js +9 -9
- package/link/block-link.js +4 -4
- package/link/common.js +16 -16
- package/link/link-button.js +7 -7
- package/link/link-static.js +7 -7
- package/link/link.js +4 -4
- package/link-list/common.js +12 -12
- package/loading-indicator-circle.js +11 -11
- package/map-container.js +4 -4
- package/menu/common.js +7 -7
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu-button.js +8 -8
- package/menu/menu-link.js +6 -6
- package/menu/menu.js +64 -42
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation-button.js +4 -4
- package/navigation/navigation-link.js +7 -7
- package/navigation/navigation-list.js +4 -4
- package/navigation/navigation-marker.js +3 -3
- package/navigation/navigation.js +21 -20
- package/notification.js +17 -17
- package/option/optgroup.js +11 -11
- package/option/option/option-base-element.d.ts +3 -2
- package/option/option/option-base-element.d.ts.map +1 -1
- package/option/option.js +113 -101
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay/overlay.d.ts.map +1 -1
- package/overlay.js +87 -84
- package/package.json +1 -1
- package/paginator/common.js +6 -6
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover.js +73 -73
- package/radio-button/common/radio-button-common.d.ts +0 -2
- package/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/radio-button/common.js +13 -18
- package/radio-button/radio-button-group.js +1 -1
- package/radio-button/radio-button-panel/radio-button-panel.d.ts +9 -1
- package/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/radio-button/radio-button-panel.js +40 -38
- package/screen-reader-only.js +5 -5
- package/select/select.d.ts +11 -0
- package/select/select.d.ts.map +1 -1
- package/select.js +111 -83
- package/slider.js +8 -8
- package/standard-theme.css +18 -2
- package/status.js +3 -3
- package/stepper/step-label.js +4 -4
- package/table/table-wrapper.js +4 -4
- package/tabs/tab-group.js +24 -24
- package/tabs/tab.js +3 -3
- package/tag/tag-group.js +7 -7
- package/teaser-product/common.js +5 -5
- package/teaser-product/teaser-product-static.js +2 -2
- package/timetable-occupancy-icon.js +3 -3
- package/timetable-occupancy.js +6 -6
- package/toast/toast.d.ts.map +1 -1
- package/toast.js +58 -54
- package/toggle/toggle-option.js +11 -11
- package/toggle-check.js +5 -5
- package/train/train.js +28 -28
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement, ReactiveController } from 'lit';
|
|
2
|
+
import { SbbDatepickerElement } from '../datepicker/datepicker.js';
|
|
3
|
+
export interface SbbDatepickerControl<T> extends LitElement {
|
|
4
|
+
datepicker: SbbDatepickerElement<T> | null;
|
|
5
|
+
}
|
|
6
|
+
export declare class SbbDatepickerAssociationHostController<T> implements ReactiveController {
|
|
7
|
+
private _host;
|
|
8
|
+
private _context?;
|
|
9
|
+
constructor(_host: SbbDatepickerElement<T>);
|
|
10
|
+
hostConnected(): void;
|
|
11
|
+
hostDisconnected(): void;
|
|
12
|
+
updateControls(): void;
|
|
13
|
+
}
|
|
14
|
+
export declare class SbbDatepickerAssociationControlController<T> implements ReactiveController {
|
|
15
|
+
private _host;
|
|
16
|
+
private _context?;
|
|
17
|
+
constructor(_host: SbbDatepickerControl<T>);
|
|
18
|
+
hostConnected(): void;
|
|
19
|
+
hostDisconnected(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=datepicker-association-controllers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datepicker-association-controllers.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/common/datepicker-association-controllers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,UAAU;IACzD,UAAU,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC5C;AAiCD,qBAAa,sCAAsC,CAAC,CAAC,CAAE,YAAW,kBAAkB;IAG/D,OAAO,CAAC,KAAK;IAFhC,OAAO,CAAC,QAAQ,CAAC,CAAqC;gBAE3B,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAIlD,aAAa,IAAI,IAAI;IAkBrB,gBAAgB,IAAI,IAAI;IAKxB,cAAc,IAAI,IAAI;CAG9B;AAED,qBAAa,yCAAyC,CAAC,CAAC,CAAE,YAAW,kBAAkB;IAGlE,OAAO,CAAC,KAAK;IAFhC,OAAO,CAAC,QAAQ,CAAC,CAAqC;gBAE3B,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAIlD,aAAa,IAAI,IAAI;IAqBrB,gBAAgB,IAAI,IAAI;CAIhC"}
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { SbbButtonBaseElement } from '../../core/base-elements.js';
|
|
3
3
|
import { SbbDatepickerElement } from '../datepicker.js';
|
|
4
|
+
import { SbbDatepickerControl } from './datepicker-association-controllers.js';
|
|
4
5
|
declare const SbbDatepickerButton_base: import('../../core/mixins.js').AbstractConstructor<import('../../core/mixins.js').SbbNegativeMixinType> & typeof SbbButtonBaseElement;
|
|
5
|
-
export declare abstract class SbbDatepickerButton<T = Date> extends SbbDatepickerButton_base {
|
|
6
|
+
export declare abstract class SbbDatepickerButton<T = Date> extends SbbDatepickerButton_base implements SbbDatepickerControl<T> {
|
|
7
|
+
/**
|
|
8
|
+
* Datepicker reference.
|
|
9
|
+
* @internal
|
|
10
|
+
* @deprecated Use property/attribute `datepicker` instead.
|
|
11
|
+
*/
|
|
12
|
+
set datePicker(value: string | SbbDatepickerElement<T> | null);
|
|
13
|
+
/** @internal */
|
|
14
|
+
get datePicker(): string | SbbDatepickerElement<T> | null;
|
|
6
15
|
/** Datepicker reference. */
|
|
7
|
-
|
|
16
|
+
set datepicker(value: SbbDatepickerElement<T> | null);
|
|
17
|
+
get datepicker(): SbbDatepickerElement<T> | null;
|
|
18
|
+
private _datepicker?;
|
|
8
19
|
/** The boundary date (min/max) as set in the date-picker's input. */
|
|
9
20
|
protected accessor boundary: string | number | null;
|
|
10
21
|
/** Whether the component is disabled due date equals to boundary date. */
|
|
11
22
|
private _disabled;
|
|
12
23
|
/** Whether the component is disabled due date-picker's input disabled. */
|
|
13
24
|
private _inputDisabled;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use datepicker instead.
|
|
27
|
+
*/
|
|
14
28
|
protected datePickerElement?: SbbDatepickerElement<T> | null;
|
|
15
29
|
private _dateAdapter;
|
|
16
|
-
private _datePickerController;
|
|
17
30
|
private _language;
|
|
18
31
|
protected abstract iconName: string;
|
|
19
32
|
protected abstract i18nOffBoundaryDay: Record<string, string>;
|
|
@@ -21,13 +34,8 @@ export declare abstract class SbbDatepickerButton<T = Date> extends SbbDatepicke
|
|
|
21
34
|
constructor();
|
|
22
35
|
protected abstract findAvailableDate(_date: T): T;
|
|
23
36
|
connectedCallback(): void;
|
|
24
|
-
willUpdate(changedProperties: PropertyValues<this>): void;
|
|
25
|
-
disconnectedCallback(): void;
|
|
26
|
-
private _setDisabledState;
|
|
37
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
27
38
|
private _handleClick;
|
|
28
|
-
private _syncUpstreamProperties;
|
|
29
|
-
private _init;
|
|
30
|
-
private _setAriaLabel;
|
|
31
39
|
private _setDisabledRenderAttributes;
|
|
32
40
|
protected renderTemplate(): TemplateResult;
|
|
33
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker-button.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/common/datepicker-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAMnE,OAAO,
|
|
1
|
+
{"version":3,"file":"datepicker-button.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/common/datepicker-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAMnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,eAAe,CAAC;;AAEvB,8BAA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,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IA2B5E,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,4BAA4B;cAYjB,cAAc,IAAI,cAAc;CAGpD"}
|
package/datepicker/common.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/elements/datepicker/common.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/elements/datepicker/common.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gDAAgD,CAAC"}
|
package/datepicker/common.js
CHANGED
|
@@ -1,118 +1,156 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var g = (a) => {
|
|
2
|
+
throw TypeError(a);
|
|
3
3
|
};
|
|
4
|
-
var A = (
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import { html as
|
|
8
|
-
import { property as
|
|
9
|
-
import { SbbButtonBaseElement as
|
|
10
|
-
import { readConfig as
|
|
11
|
-
import { SbbLanguageController as
|
|
12
|
-
import { defaultDateAdapter as
|
|
13
|
-
import { i18nToday as
|
|
14
|
-
import { SbbNegativeMixin as
|
|
15
|
-
import { getDatePicker as x, datepickerControlRegisteredEventFactory as U } from "./datepicker.js";
|
|
4
|
+
var A = (a, t, e) => t.has(a) || g("Cannot " + e);
|
|
5
|
+
var y = (a, t, e) => (A(a, t, "read from private field"), e ? e.call(a) : t.get(a)), D = (a, t, e) => t.has(a) ? g("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, e), p = (a, t, e, o) => (A(a, t, "write to private field"), o ? o.call(a, e) : t.set(a, e), e);
|
|
6
|
+
import { __esDecorate as b, __runInitializers as _ } from "tslib";
|
|
7
|
+
import { html as x } from "lit";
|
|
8
|
+
import { property as v, state as C } from "lit/decorators.js";
|
|
9
|
+
import { SbbButtonBaseElement as w } from "../core/base-elements.js";
|
|
10
|
+
import { readConfig as E } from "../core/config.js";
|
|
11
|
+
import { SbbLanguageController as S } from "../core/controllers.js";
|
|
12
|
+
import { defaultDateAdapter as P } from "../core/datetime.js";
|
|
13
|
+
import { i18nToday as I } from "../core/i18n.js";
|
|
14
|
+
import { SbbNegativeMixin as z } from "../core/mixins.js";
|
|
16
15
|
import "../icon.js";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const u = class u {
|
|
17
|
+
constructor(t) {
|
|
18
|
+
this._host = t, this.hosts = /* @__PURE__ */ new Set(), this.controls = /* @__PURE__ */ new Set();
|
|
19
|
+
}
|
|
20
|
+
static connect(t) {
|
|
21
|
+
let e = this._registry.get(t);
|
|
22
|
+
return e || (e = new u(t), this._registry.set(t, e)), e;
|
|
23
|
+
}
|
|
24
|
+
updateControls(t) {
|
|
25
|
+
Array.from(this.controls).filter((e) => e.datepicker === t).forEach((e) => e.requestUpdate());
|
|
26
|
+
}
|
|
27
|
+
deleteIfEmpty() {
|
|
28
|
+
!this.controls.size && !this.hosts.size && this.constructor._registry.delete(this._host);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
u._registry = /* @__PURE__ */ new WeakMap();
|
|
32
|
+
let h = u;
|
|
33
|
+
class V {
|
|
34
|
+
constructor(t) {
|
|
35
|
+
this._host = t, this._host.addController(this);
|
|
36
|
+
}
|
|
37
|
+
hostConnected() {
|
|
38
|
+
this._context = h.connect(this._host.getRootNode()), this._context.hosts.add(this._host);
|
|
39
|
+
const t = this._host.closest("sbb-form-field");
|
|
40
|
+
for (const e of this._context.controls) {
|
|
41
|
+
const o = e.getAttribute("datepicker") ?? e.getAttribute("date-picker");
|
|
42
|
+
(o ? o === this._host.id : e.closest("sbb-form-field") === t) && (e.datepicker = this._host);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
hostDisconnected() {
|
|
46
|
+
var t, e;
|
|
47
|
+
(t = this._context) == null || t.hosts.delete(this._host), (e = this._context) == null || e.deleteIfEmpty();
|
|
48
|
+
}
|
|
49
|
+
updateControls() {
|
|
50
|
+
var t;
|
|
51
|
+
(t = this._context) == null || t.updateControls(this._host);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
class R {
|
|
55
|
+
constructor(t) {
|
|
56
|
+
this._host = t, this._host.addController(this);
|
|
57
|
+
}
|
|
58
|
+
hostConnected() {
|
|
59
|
+
this._context = h.connect(this._host.getRootNode()), this._context.controls.add(this._host);
|
|
60
|
+
const t = this._host.closest("sbb-form-field");
|
|
61
|
+
let e = null;
|
|
62
|
+
const o = this._host.getAttribute("datepicker") ?? this._host.getAttribute("date-picker");
|
|
63
|
+
o ? e = Array.from(this._context.hosts).find((n) => n.id === o) ?? null : e = Array.from(this._context.hosts).find((n) => n.closest("sbb-form-field") === t) ?? null, e && (this._host.datepicker = e);
|
|
64
|
+
}
|
|
65
|
+
hostDisconnected() {
|
|
66
|
+
var t, e;
|
|
67
|
+
(t = this._context) == null || t.controls.delete(this._host), (e = this._context) == null || e.deleteIfEmpty();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
let W = (() => {
|
|
71
|
+
var l, d;
|
|
72
|
+
let a = z(w), t = [], e, o, n, f = [], m = [];
|
|
73
|
+
return d = class extends a {
|
|
21
74
|
constructor() {
|
|
22
|
-
var
|
|
75
|
+
var s, i;
|
|
23
76
|
super();
|
|
24
|
-
|
|
25
|
-
m(this,
|
|
26
|
-
h(this, d, b(this, r, null)), h(this, o, (b(this, c), b(this, p, null))), this._disabled = (b(this, k), !1), this._inputDisabled = !1, this.datePickerElement = null, this._dateAdapter = ((t = v().datetime) == null ? void 0 : t.dateAdapter) ?? S, this._language = new C(this).withHandler(() => this._setAriaLabel()), (e = this.addEventListener) == null || e.call(this, "click", () => this._handleClick());
|
|
77
|
+
D(this, l);
|
|
78
|
+
this._datepicker = _(this, t), p(this, l, _(this, f, null)), this._disabled = (_(this, m), !1), this._inputDisabled = !1, this.datePickerElement = null, this._dateAdapter = ((s = E().datetime) == null ? void 0 : s.dateAdapter) ?? P, this._language = new S(this), this.addController(new R(this)), (i = this.addEventListener) == null || i.call(this, "click", () => this._handleClick());
|
|
27
79
|
}
|
|
28
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Datepicker reference.
|
|
82
|
+
* @internal
|
|
83
|
+
* @deprecated Use property/attribute `datepicker` instead.
|
|
84
|
+
*/
|
|
85
|
+
set datePicker(s) {
|
|
86
|
+
this.datepicker = s;
|
|
87
|
+
}
|
|
88
|
+
/** @internal */
|
|
29
89
|
get datePicker() {
|
|
30
|
-
return
|
|
90
|
+
return this.datepicker;
|
|
31
91
|
}
|
|
32
|
-
|
|
33
|
-
|
|
92
|
+
/** Datepicker reference. */
|
|
93
|
+
set datepicker(s) {
|
|
94
|
+
var i, r, c;
|
|
95
|
+
this._datepicker = typeof s == "string" ? (
|
|
96
|
+
// In case the value is a string, it should be treated as an id reference
|
|
97
|
+
// and attempt to be resolved.
|
|
98
|
+
((c = (r = (i = this.getRootNode) == null ? void 0 : i.call(this)) == null ? void 0 : r.querySelector) == null ? void 0 : c.call(r, `#${s}`)) ?? null
|
|
99
|
+
) : s, this.datePickerElement = this._datepicker;
|
|
100
|
+
}
|
|
101
|
+
get datepicker() {
|
|
102
|
+
return this._datepicker ?? null;
|
|
34
103
|
}
|
|
35
104
|
/** The boundary date (min/max) as set in the date-picker's input. */
|
|
36
105
|
get boundary() {
|
|
37
|
-
return
|
|
106
|
+
return y(this, l);
|
|
38
107
|
}
|
|
39
|
-
set boundary(
|
|
40
|
-
|
|
108
|
+
set boundary(s) {
|
|
109
|
+
p(this, l, s);
|
|
41
110
|
}
|
|
42
111
|
connectedCallback() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
disconnectedCallback() {
|
|
49
|
-
var t;
|
|
50
|
-
super.disconnectedCallback(), (t = this._datePickerController) == null || t.abort();
|
|
112
|
+
var i, r;
|
|
113
|
+
super.connectedCallback();
|
|
114
|
+
const s = ((i = this.closest) == null ? void 0 : i.call(this, "sbb-form-field")) ?? ((r = this.closest) == null ? void 0 : r.call(this, "[data-form-field]"));
|
|
115
|
+
s && (this.negative = s.hasAttribute("negative"));
|
|
51
116
|
}
|
|
52
|
-
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this._disabled = !0, this._setDisabledRenderAttributes(!0);
|
|
117
|
+
willUpdate(s) {
|
|
118
|
+
var c, k;
|
|
119
|
+
if (super.willUpdate(s), !this.datepicker || !this._dateAdapter.isValid(this.datepicker.valueAsDate)) {
|
|
120
|
+
this._disabled = !0, this.setAttribute("aria-label", this.i18nOffBoundaryDay[this._language.current]), this._setDisabledRenderAttributes();
|
|
57
121
|
return;
|
|
58
122
|
}
|
|
59
|
-
const
|
|
60
|
-
this._disabled = this._dateAdapter.compareDate(
|
|
123
|
+
const i = this.findAvailableDate(this.datepicker.valueAsDate);
|
|
124
|
+
this._disabled = this._dateAdapter.compareDate(i, this.datepicker.valueAsDate) === 0, this._inputDisabled = (((c = this.datepicker.inputElement) == null ? void 0 : c.disabled) || ((k = this.datepicker.inputElement) == null ? void 0 : k.readOnly)) ?? !0, this._setDisabledRenderAttributes();
|
|
125
|
+
const r = this._dateAdapter.compareDate(this.datepicker.now, this.datepicker.valueAsDate) === 0 ? I[this._language.current].toLowerCase() : this._dateAdapter.getAccessibilityFormatDate(this.datepicker.valueAsDate);
|
|
126
|
+
this.setAttribute("aria-label", this.i18nSelectOffBoundaryDay(r)[this._language.current]);
|
|
61
127
|
}
|
|
62
128
|
_handleClick() {
|
|
63
|
-
if (!this.
|
|
129
|
+
if (!this.datepicker || this.hasAttribute("data-disabled"))
|
|
64
130
|
return;
|
|
65
|
-
const
|
|
66
|
-
this._dateAdapter.compareDate(
|
|
67
|
-
}
|
|
68
|
-
_syncUpstreamProperties() {
|
|
69
|
-
var e, s;
|
|
70
|
-
const t = ((e = this.closest) == null ? void 0 : e.call(this, "sbb-form-field")) ?? ((s = this.closest) == null ? void 0 : s.call(this, "[data-form-field]"));
|
|
71
|
-
if (t) {
|
|
72
|
-
this.negative = t.hasAttribute("negative");
|
|
73
|
-
const n = t.querySelector("input");
|
|
74
|
-
n && (this._inputDisabled = n.hasAttribute("disabled") || n.hasAttribute("readonly"), this._setDisabledRenderAttributes());
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
_init(t) {
|
|
78
|
-
var e, s;
|
|
79
|
-
if ((e = this._datePickerController) == null || e.abort(), this._datePickerController = new AbortController(), this.datePickerElement = x(this, t), this._setDisabledState(), !this.datePickerElement) {
|
|
80
|
-
(s = this.parentElement) == null || s.addEventListener("inputUpdated", (n) => this._init(n.target), { once: !0, signal: this._datePickerController.signal });
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
this._setAriaLabel(), this.datePickerElement.addEventListener("change", () => {
|
|
84
|
-
this._setDisabledState(), this._setAriaLabel();
|
|
85
|
-
}, { signal: this._datePickerController.signal }), this.datePickerElement.addEventListener("datePickerUpdated", () => {
|
|
86
|
-
this._setDisabledState(), this._setAriaLabel();
|
|
87
|
-
}, { signal: this._datePickerController.signal }), this.datePickerElement.addEventListener("inputUpdated", (n) => {
|
|
88
|
-
this._inputDisabled = !!(n.detail.disabled || n.detail.readonly), this._setDisabledRenderAttributes(), this._setAriaLabel(), this._setDisabledState();
|
|
89
|
-
}, { signal: this._datePickerController.signal }), this.datePickerElement.dispatchEvent(U());
|
|
90
|
-
}
|
|
91
|
-
_setAriaLabel() {
|
|
92
|
-
var s;
|
|
93
|
-
const t = (s = this.datePickerElement) == null ? void 0 : s.valueAsDate;
|
|
94
|
-
if (!t || !this._dateAdapter.isValid(t)) {
|
|
95
|
-
this.setAttribute("aria-label", this.i18nOffBoundaryDay[this._language.current]);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const e = this.datePickerElement && this._dateAdapter.compareDate(this.datePickerElement.now, t) === 0 ? L[this._language.current].toLowerCase() : this._dateAdapter.getAccessibilityFormatDate(t);
|
|
99
|
-
this.setAttribute("aria-label", this.i18nSelectOffBoundaryDay(e)[this._language.current]);
|
|
131
|
+
const s = this.datepicker.valueAsDate ?? this.datepicker.now, i = this.findAvailableDate(s);
|
|
132
|
+
this._dateAdapter.compareDate(i, s) !== 0 && (this.datepicker.valueAsDate = i);
|
|
100
133
|
}
|
|
101
|
-
_setDisabledRenderAttributes(
|
|
102
|
-
|
|
134
|
+
_setDisabledRenderAttributes() {
|
|
135
|
+
const s = this._disabled || this._inputDisabled;
|
|
136
|
+
this.toggleAttribute("data-disabled", s), s ? (this.setAttribute("aria-disabled", "true"), this.removeAttribute("tabindex")) : (this.removeAttribute("aria-disabled"), this.setAttribute("tabindex", "0"));
|
|
103
137
|
}
|
|
104
138
|
renderTemplate() {
|
|
105
|
-
return
|
|
139
|
+
return x`<sbb-icon name=${this.iconName}></sbb-icon>`;
|
|
106
140
|
}
|
|
107
|
-
},
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
} }, metadata:
|
|
112
|
-
|
|
113
|
-
} }, metadata:
|
|
114
|
-
|
|
141
|
+
}, l = new WeakMap(), (() => {
|
|
142
|
+
const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(a[Symbol.metadata] ?? null) : void 0;
|
|
143
|
+
e = [v({ attribute: "date-picker" })], o = [v({ attribute: "datepicker" })], n = [C()], b(d, null, e, { kind: "setter", name: "datePicker", static: !1, private: !1, access: { has: (i) => "datePicker" in i, set: (i, r) => {
|
|
144
|
+
i.datePicker = r;
|
|
145
|
+
} }, metadata: s }, null, t), b(d, null, o, { kind: "setter", name: "datepicker", static: !1, private: !1, access: { has: (i) => "datepicker" in i, set: (i, r) => {
|
|
146
|
+
i.datepicker = r;
|
|
147
|
+
} }, metadata: s }, null, t), b(d, null, n, { kind: "accessor", name: "boundary", static: !1, private: !1, access: { has: (i) => "boundary" in i, get: (i) => i.boundary, set: (i, r) => {
|
|
148
|
+
i.boundary = r;
|
|
149
|
+
} }, metadata: s }, f, m), s && Object.defineProperty(d, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s });
|
|
150
|
+
})(), d;
|
|
115
151
|
})();
|
|
116
152
|
export {
|
|
117
|
-
|
|
153
|
+
R as SbbDatepickerAssociationControlController,
|
|
154
|
+
V as SbbDatepickerAssociationHostController,
|
|
155
|
+
W as SbbDatepickerButton
|
|
118
156
|
};
|
|
@@ -13,8 +13,12 @@ export interface SbbInputUpdateEvent {
|
|
|
13
13
|
* it returns the related SbbDatepickerElement reference, if exists.
|
|
14
14
|
* @param element The element potentially connected to the SbbDatepickerElement.
|
|
15
15
|
* @param trigger The id or the reference of the SbbDatePicker.
|
|
16
|
+
* @deprecated No longer in use.
|
|
16
17
|
*/
|
|
17
18
|
export declare function getDatePicker<T = Date>(element: SbbDatepickerButton<T> | SbbDatepickerToggleElement<T>, trigger?: string | HTMLElement): SbbDatepickerElement<T> | null | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated No longer in use.
|
|
21
|
+
*/
|
|
18
22
|
export declare const datepickerControlRegisteredEventFactory: () => CustomEvent;
|
|
19
23
|
/**
|
|
20
24
|
* Combined with a native input, it displays the input's value as a formatted date.
|
|
@@ -37,9 +41,17 @@ export declare class SbbDatepickerElement<T = Date> extends LitElement {
|
|
|
37
41
|
accessor wide: boolean;
|
|
38
42
|
/** A function used to filter out dates. */
|
|
39
43
|
accessor dateFilter: (date: T | null) => boolean;
|
|
40
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Reference of the native input connected to the datepicker.
|
|
46
|
+
* If given a string, it will be treated as an id reference and an attempt is
|
|
47
|
+
* made to be resolved for the containing document fragment.
|
|
48
|
+
* If given a HTMLElement instance, it will be used as is.
|
|
49
|
+
*/
|
|
41
50
|
accessor input: string | HTMLElement | null;
|
|
42
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* A configured date which acts as the current date instead of the real current date.
|
|
53
|
+
* Recommended for testing purposes.
|
|
54
|
+
*/
|
|
43
55
|
set now(value: SbbDateLike<T> | null);
|
|
44
56
|
get now(): T;
|
|
45
57
|
private _now?;
|
|
@@ -47,6 +59,9 @@ export declare class SbbDatepickerElement<T = Date> extends LitElement {
|
|
|
47
59
|
set valueAsDate(value: SbbDateLike<T> | null);
|
|
48
60
|
get valueAsDate(): T | null;
|
|
49
61
|
private _valueAsDate?;
|
|
62
|
+
/** The resolved associated input element, as defined by `input`. */
|
|
63
|
+
get inputElement(): HTMLInputElement | null;
|
|
64
|
+
private accessor _inputElement;
|
|
50
65
|
/** Notifies that the connected input has changes. */
|
|
51
66
|
private _change;
|
|
52
67
|
/** Notifies that the attributes of the input connected to the datepicker have changes. */
|
|
@@ -55,15 +70,15 @@ export declare class SbbDatepickerElement<T = Date> extends LitElement {
|
|
|
55
70
|
private _datePickerUpdated;
|
|
56
71
|
/** Emits whenever the internal validation state changes. */
|
|
57
72
|
private _validationChange;
|
|
58
|
-
private accessor _inputElement;
|
|
59
73
|
private _inputElementPlaceholderMutable;
|
|
60
74
|
private _datePickerController;
|
|
61
75
|
private _inputObserver;
|
|
62
76
|
private _dateAdapter;
|
|
63
77
|
private _language;
|
|
78
|
+
private _associationController;
|
|
64
79
|
constructor();
|
|
65
80
|
connectedCallback(): void;
|
|
66
|
-
willUpdate(changedProperties: PropertyValues<this>): void;
|
|
81
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
67
82
|
disconnectedCallback(): void;
|
|
68
83
|
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
69
84
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker/datepicker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAGnB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,cAAc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,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;IAoB9B,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,mBAAmB;cAcR,MAAM,IAAI,cAAc;IAI3C;;;;OAIG;IACI,yBAAyB,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC;IAc5C;;;;OAIG;IACI,qBAAqB,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC;IAaxC;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;CAmBzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,gBAAgB,EAAE,oBAAoB,CAAC;KACxC;IAED,UAAU,2BAA2B;QACnC,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC;KAChD;CACF"}
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import { CSSResultGroup, PropertyValues, TemplateResult, LitElement } from 'lit';
|
|
2
2
|
import { CalendarView } from '../../calendar.js';
|
|
3
|
+
import { SbbDatepickerControl } from '../common.js';
|
|
3
4
|
import { SbbDatepickerElement } from '../datepicker.js';
|
|
4
5
|
declare const SbbDatepickerToggleElement_base: import('../../core/mixins.js').AbstractConstructor<import('../../core/mixins.js').SbbNegativeMixinType> & import('../../core/mixins.js').AbstractConstructor<import('../../core/mixins.js').SbbHydrationMixinType> & typeof LitElement;
|
|
5
6
|
/**
|
|
6
7
|
* Combined with a `sbb-datepicker`, it can be used to select a date from a `sbb-calendar`.
|
|
7
8
|
*/
|
|
8
|
-
export declare class SbbDatepickerToggleElement<T = Date> extends SbbDatepickerToggleElement_base {
|
|
9
|
+
export declare class SbbDatepickerToggleElement<T = Date> extends SbbDatepickerToggleElement_base implements SbbDatepickerControl<T> {
|
|
9
10
|
static styles: CSSResultGroup;
|
|
11
|
+
/**
|
|
12
|
+
* Datepicker reference.
|
|
13
|
+
* @internal
|
|
14
|
+
* @deprecated Use property/attribute `datepicker` instead.
|
|
15
|
+
*/
|
|
16
|
+
set datePicker(value: string | SbbDatepickerElement<T> | null);
|
|
17
|
+
/** @internal */
|
|
18
|
+
get datePicker(): string | SbbDatepickerElement<T> | null;
|
|
10
19
|
/** Datepicker reference. */
|
|
11
|
-
|
|
20
|
+
set datepicker(value: SbbDatepickerElement<T> | null);
|
|
21
|
+
get datepicker(): SbbDatepickerElement<T> | null;
|
|
22
|
+
private _datepicker?;
|
|
12
23
|
/** The initial view of calendar which should be displayed on opening. */
|
|
13
24
|
accessor view: CalendarView;
|
|
14
25
|
private accessor _disabled;
|
|
15
26
|
private accessor _min;
|
|
16
27
|
private accessor _max;
|
|
17
28
|
private accessor _renderCalendar;
|
|
18
|
-
private _datePickerElement;
|
|
19
29
|
private _calendarElement;
|
|
20
30
|
private _triggerElement;
|
|
21
31
|
private _popoverElement;
|
|
22
|
-
private _datePickerController;
|
|
23
32
|
private _language;
|
|
24
33
|
constructor();
|
|
25
34
|
/**
|
|
@@ -27,11 +36,8 @@ export declare class SbbDatepickerToggleElement<T = Date> extends SbbDatepickerT
|
|
|
27
36
|
*/
|
|
28
37
|
open(): void;
|
|
29
38
|
connectedCallback(): void;
|
|
30
|
-
willUpdate(changedProperties: PropertyValues<this>): void;
|
|
31
|
-
disconnectedCallback(): void;
|
|
32
|
-
private _init;
|
|
39
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
33
40
|
private _configureCalendar;
|
|
34
|
-
private _datePickerChanged;
|
|
35
41
|
private _assignCalendar;
|
|
36
42
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
37
43
|
private _nowOrNull;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker-toggle.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker-toggle/datepicker-toggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAkB,UAAU,EAAW,MAAM,KAAK,CAAC;AAK1D,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,mBAAmB,CAAC;AAO1E,OAAO,KAAK,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"datepicker-toggle.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker-toggle/datepicker-toggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAkB,UAAU,EAAW,MAAM,KAAK,CAAC;AAK1D,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,mBAAmB,CAAC;AAO1E,OAAO,EAA6C,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,mBAAmB,CAAC;AAC3B,OAAO,0BAA0B,CAAC;AAClC,OAAO,6BAA6B,CAAC;;AAErC;;GAEG;AACH,qBAKM,0BAA0B,CAAC,CAAC,GAAG,IAAI,CACvC,SAAQ,+BACR,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAElC,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;;OAIG;IACH,IACW,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,EAOnE;IACD,gBAAgB;IAChB,IAAW,UAAU,IAAI,MAAM,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,CAE/D;IAED,4BAA4B;IAC5B,IACW,UAAU,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,EAK1D;IACD,IAAW,UAAU,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,CAEtD;IACD,OAAO,CAAC,WAAW,CAAC,CAAiC;IAErD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