igniteui-webcomponents 5.2.0 → 5.3.0-alpha.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/components/carousel/carousel-indicator.js +1 -1
- package/components/carousel/carousel-indicator.js.map +1 -1
- package/components/carousel/carousel-slide.js +1 -1
- package/components/carousel/carousel-slide.js.map +1 -1
- package/components/carousel/carousel.js +1 -1
- package/components/carousel/carousel.js.map +1 -1
- package/components/common/context.d.ts +22 -0
- package/components/common/context.js +6 -0
- package/components/common/context.js.map +1 -0
- package/components/common/util.d.ts +1 -0
- package/components/common/util.js +8 -0
- package/components/common/util.js.map +1 -1
- package/components/icon/icon-references.js +46 -0
- package/components/icon/icon-references.js.map +1 -1
- package/components/icon/internal-icons-lib.js +47 -0
- package/components/icon/internal-icons-lib.js.map +1 -1
- package/components/tile-manager/controllers/fullscreen.d.ts +15 -0
- package/components/tile-manager/controllers/fullscreen.js +43 -0
- package/components/tile-manager/controllers/fullscreen.js.map +1 -0
- package/components/tile-manager/controllers/tile-dnd.d.ts +24 -0
- package/components/tile-manager/controllers/tile-dnd.js +46 -0
- package/components/tile-manager/controllers/tile-dnd.js.map +1 -0
- package/components/tile-manager/position.d.ts +20 -0
- package/components/tile-manager/position.js +61 -0
- package/components/tile-manager/position.js.map +1 -0
- package/components/tile-manager/resize-controller.d.ts +52 -0
- package/components/tile-manager/resize-controller.js +157 -0
- package/components/tile-manager/resize-controller.js.map +1 -0
- package/components/tile-manager/resize-element.d.ts +41 -0
- package/components/tile-manager/resize-element.js +107 -0
- package/components/tile-manager/resize-element.js.map +1 -0
- package/components/tile-manager/serializer.d.ts +24 -0
- package/components/tile-manager/serializer.js +52 -0
- package/components/tile-manager/serializer.js.map +1 -0
- package/components/tile-manager/themes/container.d.ts +2 -0
- package/components/tile-manager/themes/container.js +47 -0
- package/components/tile-manager/themes/container.js.map +1 -0
- package/components/tile-manager/themes/dark/tile-manager.bootstrap.css.d.ts +1 -0
- package/components/tile-manager/themes/dark/tile-manager.bootstrap.css.js +3 -0
- package/components/tile-manager/themes/dark/tile-manager.bootstrap.css.js.map +1 -0
- package/components/tile-manager/themes/dark/tile-manager.fluent.css.d.ts +1 -0
- package/components/tile-manager/themes/dark/tile-manager.fluent.css.js +3 -0
- package/components/tile-manager/themes/dark/tile-manager.fluent.css.js.map +1 -0
- package/components/tile-manager/themes/dark/tile-manager.indigo.css.d.ts +1 -0
- package/components/tile-manager/themes/dark/tile-manager.indigo.css.js +3 -0
- package/components/tile-manager/themes/dark/tile-manager.indigo.css.js.map +1 -0
- package/components/tile-manager/themes/dark/tile-manager.material.css.d.ts +1 -0
- package/components/tile-manager/themes/dark/tile-manager.material.css.js +3 -0
- package/components/tile-manager/themes/dark/tile-manager.material.css.js.map +1 -0
- package/components/tile-manager/themes/dark/tile-manager.shared.css.d.ts +1 -0
- package/components/tile-manager/themes/dark/tile-manager.shared.css.js +3 -0
- package/components/tile-manager/themes/dark/tile-manager.shared.css.js.map +1 -0
- package/components/tile-manager/themes/header.d.ts +2 -0
- package/components/tile-manager/themes/header.js +28 -0
- package/components/tile-manager/themes/header.js.map +1 -0
- package/components/tile-manager/themes/light/tile-manager.bootstrap.css.d.ts +1 -0
- package/components/tile-manager/themes/light/tile-manager.bootstrap.css.js +3 -0
- package/components/tile-manager/themes/light/tile-manager.bootstrap.css.js.map +1 -0
- package/components/tile-manager/themes/light/tile-manager.fluent.css.d.ts +1 -0
- package/components/tile-manager/themes/light/tile-manager.fluent.css.js +3 -0
- package/components/tile-manager/themes/light/tile-manager.fluent.css.js.map +1 -0
- package/components/tile-manager/themes/light/tile-manager.indigo.css.d.ts +1 -0
- package/components/tile-manager/themes/light/tile-manager.indigo.css.js +3 -0
- package/components/tile-manager/themes/light/tile-manager.indigo.css.js.map +1 -0
- package/components/tile-manager/themes/light/tile-manager.material.css.d.ts +1 -0
- package/components/tile-manager/themes/light/tile-manager.material.css.js +3 -0
- package/components/tile-manager/themes/light/tile-manager.material.css.js.map +1 -0
- package/components/tile-manager/themes/light/tile-manager.shared.css.d.ts +1 -0
- package/components/tile-manager/themes/light/tile-manager.shared.css.js +3 -0
- package/components/tile-manager/themes/light/tile-manager.shared.css.js.map +1 -0
- package/components/tile-manager/themes/resize.base.css.d.ts +1 -0
- package/components/tile-manager/themes/resize.base.css.js +3 -0
- package/components/tile-manager/themes/resize.base.css.js.map +1 -0
- package/components/tile-manager/themes/shared/header/tile-header.bootstrap.css.d.ts +1 -0
- package/components/tile-manager/themes/shared/header/tile-header.bootstrap.css.js +3 -0
- package/components/tile-manager/themes/shared/header/tile-header.bootstrap.css.js.map +1 -0
- package/components/tile-manager/themes/shared/header/tile-header.common.css.d.ts +1 -0
- package/components/tile-manager/themes/shared/header/tile-header.common.css.js +3 -0
- package/components/tile-manager/themes/shared/header/tile-header.common.css.js.map +1 -0
- package/components/tile-manager/themes/shared/header/tile-header.fluent.css.d.ts +1 -0
- package/components/tile-manager/themes/shared/header/tile-header.fluent.css.js +3 -0
- package/components/tile-manager/themes/shared/header/tile-header.fluent.css.js.map +1 -0
- package/components/tile-manager/themes/shared/header/tile-header.indigo.css.d.ts +1 -0
- package/components/tile-manager/themes/shared/header/tile-header.indigo.css.js +3 -0
- package/components/tile-manager/themes/shared/header/tile-header.indigo.css.js.map +1 -0
- package/components/tile-manager/themes/shared/resize.common.css.d.ts +1 -0
- package/components/tile-manager/themes/shared/resize.common.css.js +3 -0
- package/components/tile-manager/themes/shared/resize.common.css.js.map +1 -0
- package/components/tile-manager/themes/shared/tile/tile.common.css.d.ts +1 -0
- package/components/tile-manager/themes/shared/tile/tile.common.css.js +3 -0
- package/components/tile-manager/themes/shared/tile/tile.common.css.js.map +1 -0
- package/components/tile-manager/themes/shared/tile/tile.indigo.css.d.ts +1 -0
- package/components/tile-manager/themes/shared/tile/tile.indigo.css.js +3 -0
- package/components/tile-manager/themes/shared/tile/tile.indigo.css.js.map +1 -0
- package/components/tile-manager/themes/shared/tile-manager.common.css.d.ts +1 -0
- package/components/tile-manager/themes/shared/tile-manager.common.css.js +3 -0
- package/components/tile-manager/themes/shared/tile-manager.common.css.js.map +1 -0
- package/components/tile-manager/themes/tile-header.base.css.d.ts +1 -0
- package/components/tile-manager/themes/tile-header.base.css.js +3 -0
- package/components/tile-manager/themes/tile-header.base.css.js.map +1 -0
- package/components/tile-manager/themes/tile-manager.base.css.d.ts +1 -0
- package/components/tile-manager/themes/tile-manager.base.css.js +3 -0
- package/components/tile-manager/themes/tile-manager.base.css.js.map +1 -0
- package/components/tile-manager/themes/tile.base.css.d.ts +1 -0
- package/components/tile-manager/themes/tile.base.css.js +3 -0
- package/components/tile-manager/themes/tile.base.css.js.map +1 -0
- package/components/tile-manager/themes/tile.d.ts +2 -0
- package/components/tile-manager/themes/tile.js +14 -0
- package/components/tile-manager/themes/tile.js.map +1 -0
- package/components/tile-manager/tile-header.d.ts +34 -0
- package/components/tile-manager/tile-header.js +106 -0
- package/components/tile-manager/tile-header.js.map +1 -0
- package/components/tile-manager/tile-manager.d.ts +83 -0
- package/components/tile-manager/tile-manager.js +188 -0
- package/components/tile-manager/tile-manager.js.map +1 -0
- package/components/tile-manager/tile-util.d.ts +6 -0
- package/components/tile-manager/tile-util.js +70 -0
- package/components/tile-manager/tile-util.js.map +1 -0
- package/components/tile-manager/tile.d.ts +128 -0
- package/components/tile-manager/tile.js +467 -0
- package/components/tile-manager/tile.js.map +1 -0
- package/custom-elements.json +5623 -3417
- package/igniteui-webcomponents.css-data.json +1 -1
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +2 -2
- package/components/carousel/context.d.ts +0 -4
- package/components/carousel/context.js +0 -3
- package/components/carousel/context.js.map +0 -1
|
@@ -8,9 +8,9 @@ import { consume } from '@lit/context';
|
|
|
8
8
|
import { LitElement, html } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
11
|
+
import { carouselContext } from '../common/context.js';
|
|
11
12
|
import { registerComponent } from '../common/definitions/register.js';
|
|
12
13
|
import { formatString } from '../common/util.js';
|
|
13
|
-
import { carouselContext } from './context.js';
|
|
14
14
|
import { styles } from './themes/carousel-indicator.base.css.js';
|
|
15
15
|
class IgcCarouselIndicatorComponent extends LitElement {
|
|
16
16
|
static register() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-indicator.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel-indicator.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"carousel-indicator.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel-indicator.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAcjE,MAAqB,6BAA8B,SAAQ,UAAU;IAK5D,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,6BAA6B,CAAC,CAAC;IACnD,CAAC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,CAAC,CAAC,SAAS,CAAC;QAEpD,OAAO,IAAI,CAAA;;;gBAGC,QAAQ,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;;;;2CAIP,QAAQ,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;;;KAGvE,CAAC;IACJ,CAAC;;AAlEsB,qCAAO,GAAG,wBAAwB,AAA3B,CAA4B;AACnC,oCAAM,GAAG,MAAM,AAAT,CAAU;eAFpB,6BAA6B;AAaxC;IADP,OAAO,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gEACd;AAQzC;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2DAK9B;AAQM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DACd","sourcesContent":["import { consume } from '@lit/context';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { carouselContext } from '../common/context.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { formatString } from '../common/util.js';\nimport type IgcCarouselComponent from './carousel.js';\nimport { styles } from './themes/carousel-indicator.base.css.js';\n\n/**\n * Used when a custom indicator needs to be passed to the `igc-carousel` component.\n *\n * @element igc-carousel-indicator\n *\n * @slot - Default slot for projected inactive indicator.\n * @slot active - Default slot for projected active indicator.\n *\n * @csspart indicator - The wrapping container of the carousel dot indicator.\n * @csspart inactive - The wrapping container of the inactive dot indicator.\n * @csspart active - The wrapping container of the active dot indicator.\n */\nexport default class IgcCarouselIndicatorComponent extends LitElement {\n public static readonly tagName = 'igc-carousel-indicator';\n public static override styles = styles;\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcCarouselIndicatorComponent);\n }\n\n private _active = false;\n private _internals: ElementInternals;\n\n @consume({ context: carouselContext, subscribe: true })\n private _carousel?: IgcCarouselComponent;\n\n protected get _labelFormat() {\n return this._carousel ? this._carousel.indicatorsLabelFormat : '';\n }\n\n /* blazorSuppress */\n @property({ attribute: false })\n public set active(value: boolean) {\n this._active = Boolean(value);\n this.tabIndex = this._active ? 0 : -1;\n this._internals.ariaSelected = this._active.toString();\n }\n\n public get active(): boolean {\n return this._active;\n }\n\n /* blazorSuppress */\n @property({ attribute: false })\n public index = 0;\n\n constructor() {\n super();\n\n this._internals = this.attachInternals();\n this._internals.role = 'tab';\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n this.role = 'tab';\n this.slot = this.slot || 'indicator';\n }\n\n protected override willUpdate(): void {\n this._internals.ariaLabel = formatString(this._labelFormat, this.index + 1);\n }\n\n protected override render() {\n const forward = this.active ? 'visible' : 'hidden';\n const backward = this.active ? 'hidden' : 'visible';\n\n return html`\n <div\n part=\"indicator inactive\"\n style=${styleMap({ visibility: backward })}\n >\n <slot></slot>\n </div>\n <div part=\"indicator active\" style=${styleMap({ visibility: forward })}>\n <slot name=\"active\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-carousel-indicator': IgcCarouselIndicatorComponent;\n }\n}\n"]}
|
|
@@ -10,10 +10,10 @@ import { property } from 'lit/decorators.js';
|
|
|
10
10
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
11
11
|
import { EaseInOut } from '../../animations/easings.js';
|
|
12
12
|
import { addAnimationController } from '../../animations/player.js';
|
|
13
|
+
import { carouselContext } from '../common/context.js';
|
|
13
14
|
import { registerComponent } from '../common/definitions/register.js';
|
|
14
15
|
import { createCounter, formatString, partNameMap } from '../common/util.js';
|
|
15
16
|
import { animations } from './animations.js';
|
|
16
|
-
import { carouselContext } from './context.js';
|
|
17
17
|
import { styles } from './themes/carousel-slide.base.css.js';
|
|
18
18
|
class IgcCarouselSlideComponent extends LitElement {
|
|
19
19
|
static register() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-slide.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel-slide.ts"],"names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,CAAU;AAChB,iCAAO,GAAG,oBAAoB,AAAvB,CAAwB;AAO9B,mCAAS,GAAG,aAAa,EAAE,AAAlB,CAAmB;eATjC,yBAAyB;AAgBpC;IADP,OAAO,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;4DACd;AA6BlC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yDACrB;AAIf;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2DACP","sourcesContent":["import { consume } from '@lit/context';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\nimport { EaseInOut } from '../../animations/easings.js';\nimport { addAnimationController } from '../../animations/player.js';\nimport { carouselContext } from '../common/context.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { createCounter, formatString, partNameMap } from '../common/util.js';\nimport { animations } from './animations.js';\nimport type IgcCarouselComponent from './carousel.js';\nimport { styles } from './themes/carousel-slide.base.css.js';\n\n/**\n * A single content container within a set of containers used in the context of an `igc-carousel`.\n *\n * @element igc-carousel-slide\n *\n * @slot Default slot for the carousel slide.\n *\n * @csspart base - The base wrapper of the carousel slide.\n */\n\nexport default class IgcCarouselSlideComponent extends LitElement {\n public static override styles = styles;\n public static readonly tagName = 'igc-carousel-slide';\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcCarouselSlideComponent);\n }\n\n private static readonly increment = createCounter();\n\n private _internals: ElementInternals;\n private _slideRef: Ref<HTMLElement> = createRef();\n private _animationPlayer = addAnimationController(this, this._slideRef);\n\n @consume({ context: carouselContext, subscribe: true })\n private _carousel?: IgcCarouselComponent;\n\n protected get _index() {\n return this._carousel ? this._carousel.slides.indexOf(this) : 0;\n }\n\n protected get _total() {\n return this._carousel ? this._carousel.slides.length : 0;\n }\n\n protected get _animation() {\n const animation = this._carousel?.animationType ?? 'slide';\n\n if (animation === 'slide') {\n return this._carousel?.vertical ? 'slideVer' : 'slideHor';\n }\n\n return animation;\n }\n\n protected get _labelFormat() {\n return this._carousel ? this._carousel.slidesLabelFormat : '';\n }\n\n /**\n * The current active slide for the carousel component.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public active = false;\n\n /* blazorSuppress */\n @property({ attribute: false })\n public previous = false;\n\n public async toggleAnimation(\n type: 'in' | 'out',\n direction: 'normal' | 'reverse' = 'normal'\n ) {\n const animation = animations.get(this._animation)!.get(type)!;\n\n const options: KeyframeAnimationOptions = {\n duration: 320,\n easing: EaseInOut.Quad,\n direction,\n };\n\n const [_, event] = await Promise.all([\n this._animationPlayer.stopAll(),\n this._animationPlayer.play(animation(options)),\n ]);\n\n return event.type === 'finish';\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n\n this._internals.role = 'tabpanel';\n this._internals.ariaRoleDescription = 'slide';\n }\n\n protected override willUpdate(): void {\n this._internals.ariaLabel = formatString(\n this._labelFormat,\n this._index + 1,\n this._total\n );\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n\n this.id =\n this.id || `igc-carousel-slide-${IgcCarouselSlideComponent.increment()}`;\n }\n\n protected override render() {\n const parts = partNameMap({\n base: true,\n current: this.active,\n previous: this.previous,\n });\n\n return html`\n <div ${ref(this._slideRef)} part=${parts}>\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-carousel-slide': IgcCarouselSlideComponent;\n }\n}\n"]}
|
|
@@ -12,6 +12,7 @@ import { createRef, ref } from 'lit/directives/ref.js';
|
|
|
12
12
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
13
13
|
import { themes } from '../../theming/theming-decorator.js';
|
|
14
14
|
import IgcButtonComponent from '../button/button.js';
|
|
15
|
+
import { carouselContext } from '../common/context.js';
|
|
15
16
|
import { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';
|
|
16
17
|
import { addGesturesController, } from '../common/controllers/gestures.js';
|
|
17
18
|
import { addKeybindings, arrowLeft, arrowRight, endKey, homeKey, } from '../common/controllers/key-bindings.js';
|
|
@@ -24,7 +25,6 @@ import IgcIconComponent from '../icon/icon.js';
|
|
|
24
25
|
import IgcCarouselIndicatorContainerComponent from './carousel-indicator-container.js';
|
|
25
26
|
import IgcCarouselIndicatorComponent from './carousel-indicator.js';
|
|
26
27
|
import IgcCarouselSlideComponent from './carousel-slide.js';
|
|
27
|
-
import { carouselContext } from './context.js';
|
|
28
28
|
import { styles } from './themes/carousel.base.css.js';
|
|
29
29
|
import { all } from './themes/container.js';
|
|
30
30
|
import { styles as shared } from './themes/shared/carousel.common.css.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEL,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,SAAS,EACT,UAAU,EACV,MAAM,EACN,OAAO,GACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,wBAAwB,GACzB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,KAA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IADT,KAAK,CAAC,UAAU,CAAC;0DAOjB;AAzOkB,oBAAoB;IADxC,MAAM,CAAC,GAAG,CAAC;GACS,oBAAoB,CA6sBxC;eA7sBoB,oBAAoB","sourcesContent":["import { ContextProvider } from '@lit/context';\nimport { LitElement, html, nothing } from 'lit';\nimport {\n property,\n queryAll,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\n\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport IgcButtonComponent from '../button/button.js';\nimport { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';\nimport {\n type SwipeEvent,\n addGesturesController,\n} from '../common/controllers/gestures.js';\nimport {\n addKeybindings,\n arrowLeft,\n arrowRight,\n endKey,\n homeKey,\n} from '../common/controllers/key-bindings.js';\nimport {\n type MutationControllerParams,\n createMutationController,\n} from '../common/controllers/mutation-observer.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport {\n asNumber,\n createCounter,\n findElementFromEventPath,\n first,\n formatString,\n isLTR,\n last,\n partNameMap,\n wrap,\n} from '../common/util.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcCarouselIndicatorContainerComponent from './carousel-indicator-container.js';\nimport IgcCarouselIndicatorComponent from './carousel-indicator.js';\nimport IgcCarouselSlideComponent from './carousel-slide.js';\nimport { carouselContext } from './context.js';\nimport { styles } from './themes/carousel.base.css.js';\nimport { all } from './themes/container.js';\nimport { styles as shared } from './themes/shared/carousel.common.css.js';\n\nexport interface IgcCarouselComponentEventMap {\n igcSlideChanged: CustomEvent<number>;\n igcPlaying: CustomEvent<void>;\n igcPaused: CustomEvent<void>;\n}\n\n/**\n * The `igc-carousel` presents a set of `igc-carousel-slide`s by sequentially displaying a subset of one or more slides.\n *\n * @element igc-carousel\n *\n * @slot Default slot for the carousel. Any projected `igc-carousel-slide` components should be projected here.\n * @slot previous-button - Renders content inside the previous button.\n * @slot next-button - Renders content inside the next button.\n *\n * @fires igcSlideChanged - Emitted when the current active slide is changed either by user interaction or by the interval callback.\n * @fires igcPlaying - Emitted when the carousel enters playing state by a user interaction.\n * @fires igcPaused - Emitted when the carousel enters paused state by a user interaction.\n *\n * @csspart navigation - The wrapper container of each carousel navigation button.\n * @csspart previous - The wrapper container of the carousel previous navigation button.\n * @csspart next - The wrapper container of the carousel next navigation button.\n * @csspart dot - The carousel dot indicator container.\n * @csspart active - The carousel active dot indicator container.\n * @csspart label - The label container of the carousel indicators.\n * @csspart start - The wrapping container of all carousel indicators when indicators-orientation is set to start.\n */\n\n@themes(all)\nexport default class IgcCarouselComponent extends EventEmitterMixin<\n IgcCarouselComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static styles = [styles, shared];\n public static readonly tagName = 'igc-carousel';\n\n /* blazorSuppress */\n public static register() {\n registerComponent(\n IgcCarouselComponent,\n IgcCarouselIndicatorComponent,\n IgcCarouselIndicatorContainerComponent,\n IgcCarouselSlideComponent,\n IgcIconComponent,\n IgcButtonComponent\n );\n }\n\n private static readonly increment = createCounter();\n private _carouselId = `igc-carousel-${IgcCarouselComponent.increment()}`;\n private _carouselKeyboardInteractionFocus = addKeyboardFocusRing(this);\n\n private _internals: ElementInternals;\n private _lastInterval!: ReturnType<typeof setInterval> | null;\n private _hasKeyboardInteractionOnIndicators = false;\n private _hasMouseStop = false;\n\n private _context = new ContextProvider(this, {\n context: carouselContext,\n initialValue: this,\n });\n\n private _carouselSlidesContainerRef: Ref<HTMLDivElement> = createRef();\n private _indicatorsContainerRef: Ref<HTMLDivElement> = createRef();\n private _prevButtonRef: Ref<IgcButtonComponent> = createRef();\n private _nextButtonRef: Ref<IgcButtonComponent> = createRef();\n\n private get hasProjectedIndicators(): boolean {\n return this._projectedIndicators.length > 0;\n }\n\n private get showIndicatorsLabel(): boolean {\n return this.total > this.maximumIndicatorsCount;\n }\n\n private get nextIndex(): number {\n return wrap(0, this.total - 1, this.current + 1);\n }\n\n private get prevIndex(): number {\n return wrap(0, this.total - 1, this.current - 1);\n }\n\n @queryAll(IgcCarouselIndicatorComponent.tagName)\n private _defaultIndicators!: NodeListOf<IgcCarouselIndicatorComponent>;\n\n @queryAssignedElements({\n selector: IgcCarouselIndicatorComponent.tagName,\n slot: 'indicator',\n })\n private _projectedIndicators!: Array<IgcCarouselIndicatorComponent>;\n\n @state()\n private _activeSlide!: IgcCarouselSlideComponent;\n\n @state()\n private _playing = false;\n\n @state()\n private _paused = false;\n\n private _observerCallback({\n changes: { added, attributes },\n }: MutationControllerParams<IgcCarouselSlideComponent>) {\n const activeSlides = this.slides.filter((slide) => slide.active);\n\n if (activeSlides.length <= 1) {\n return;\n }\n const idx = this.slides.indexOf(\n added.length ? last(added).node : last(attributes)\n );\n\n for (const [i, slide] of this.slides.entries()) {\n if (slide.active && i !== idx) {\n slide.active = false;\n }\n }\n\n this.activateSlide(this.slides[idx]);\n }\n\n /**\n * Whether the carousel should skip rotating to the first slide after it reaches the last.\n * @attr disable-loop\n */\n @property({ type: Boolean, reflect: true, attribute: 'disable-loop' })\n public disableLoop = false;\n\n /**\n * Whether the carousel should ignore use interactions and not pause on them.\n * @attr disable-pause-on-interaction\n */\n @property({\n type: Boolean,\n reflect: true,\n attribute: 'disable-pause-on-interaction',\n })\n public disablePauseOnInteraction = false;\n\n /**\n * Whether the carousel should skip rendering of the default navigation buttons.\n * @attr hide-navigation\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-navigation' })\n public hideNavigation = false;\n\n /**\n * Whether the carousel should render the indicator controls (dots).\n * @attr hide-indicators\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-indicators' })\n public hideIndicators = false;\n\n /**\n * Whether the carousel has vertical alignment.\n * @attr vertical\n */\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n /**\n * Sets the orientation of the indicator controls (dots).\n * @attr indicators-orientation\n */\n @property({ reflect: false, attribute: 'indicators-orientation' })\n public indicatorsOrientation: 'start' | 'end' = 'end';\n\n /**\n * The format used to set the aria-label on the carousel indicators.\n * Instances of '{0}' will be replaced with the index of the corresponding slide.\n *\n * @attr indicators-label-format\n */\n @property({ attribute: 'indicators-label-format' })\n public indicatorsLabelFormat = 'Slide {0}';\n\n /**\n * The format used to set the aria-label on the carousel slides and the text displayed\n * when the number of indicators is greater than tha maximum indicator count.\n * Instances of '{0}' will be replaced with the index of the corresponding slide.\n * Instances of '{1}' will be replaced with the total amount of slides.\n *\n * @attr slides-label-format\n */\n @property({ attribute: 'slides-label-format' })\n public slidesLabelFormat = '{0} of {1}';\n\n /**\n * The duration in milliseconds between changing the active slide.\n * @attr interval\n */\n @property({ type: Number, reflect: false })\n public interval: number | undefined;\n\n /**\n * Controls the maximum indicator controls (dots) that can be shown. Default value is `10`.\n * @attr maximum-indicators-count\n */\n @property({\n type: Number,\n reflect: false,\n attribute: 'maximum-indicators-count',\n })\n public maximumIndicatorsCount = 10;\n\n /**\n * The animation type.\n * @attr animation-type\n */\n @property({ attribute: 'animation-type' })\n public animationType: 'slide' | 'fade' | 'none' = 'slide';\n\n /* blazorSuppress */\n /**\n * The slides of the carousel.\n */\n @queryAssignedElements({ selector: IgcCarouselSlideComponent.tagName })\n public slides!: Array<IgcCarouselSlideComponent>;\n\n /**\n * The total number of slides.\n */\n public get total(): number {\n return this.slides.length;\n }\n\n /**\n * The index of the current active slide.\n */\n public get current(): number {\n return Math.max(0, this.slides.indexOf(this._activeSlide));\n }\n\n /**\n * Whether the carousel is in playing state.\n */\n public get isPlaying(): boolean {\n return this._playing;\n }\n\n /**\n * Whether the carousel in in paused state.\n */\n public get isPaused(): boolean {\n return this._paused;\n }\n\n @watch('animationType')\n @watch('slidesLabelFormat')\n @watch('indicatorsLabelFormat')\n protected contextChanged() {\n this._context.setValue(this, true);\n }\n\n @watch('interval')\n protected intervalChange() {\n if (!this.isPlaying) {\n this._playing = true;\n }\n\n this.restartInterval();\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n\n this._internals.role = 'region';\n this._internals.ariaRoleDescription = 'carousel';\n\n this.addEventListener('pointerdown', this.handlePointerDown);\n this.addEventListener('pointerenter', this.handlePointerEnter);\n this.addEventListener('pointerleave', this.handlePointerLeave);\n\n addGesturesController(this, {\n ref: this._carouselSlidesContainerRef,\n touchOnly: true,\n })\n .set('swipe-left', this.handleHorizontalSwipe)\n .set('swipe-right', this.handleHorizontalSwipe)\n .set('swipe-up', this.handleVerticalSwipe)\n .set('swipe-down', this.handleVerticalSwipe);\n\n addKeybindings(this, {\n ref: this._indicatorsContainerRef,\n bindingDefaults: { preventDefault: true },\n })\n .set(arrowLeft, this.handleArrowLeft)\n .set(arrowRight, this.handleArrowRight)\n .set(homeKey, this.handleHomeKey)\n .set(endKey, this.handleEndKey);\n\n addKeybindings(this, {\n ref: this._prevButtonRef,\n bindingDefaults: { preventDefault: true },\n }).setActivateHandler(this.handleNavigationInteractionPrevious);\n\n addKeybindings(this, {\n ref: this._nextButtonRef,\n bindingDefaults: { preventDefault: true },\n }).setActivateHandler(this.handleNavigationInteractionNext);\n\n createMutationController(this, {\n callback: this._observerCallback,\n filter: [IgcCarouselSlideComponent.tagName],\n config: {\n attributeFilter: ['active'],\n childList: true,\n subtree: true,\n },\n });\n }\n\n private handleSlotChange(): void {\n if (this.total) {\n this.activateSlide(\n this.slides.findLast((slide) => slide.active) ?? first(this.slides)\n );\n }\n }\n\n private handleIndicatorSlotChange(): void {\n this.requestUpdate();\n }\n\n private handlePointerDown(): void {\n if (this._carouselKeyboardInteractionFocus.focused) {\n this._carouselKeyboardInteractionFocus.reset();\n }\n }\n\n private handlePointerEnter(): void {\n this._hasMouseStop = true;\n if (this._carouselKeyboardInteractionFocus.focused) {\n return;\n }\n this.handlePauseOnInteraction();\n }\n\n private handlePointerLeave(): void {\n this._hasMouseStop = false;\n if (this._carouselKeyboardInteractionFocus.focused) {\n return;\n }\n this.handlePauseOnInteraction();\n }\n\n private handleFocusIn(): void {\n if (this._carouselKeyboardInteractionFocus.focused || this._hasMouseStop) {\n return;\n }\n this.handlePauseOnInteraction();\n }\n\n private handleFocusOut(event: FocusEvent): void {\n const node = event.relatedTarget as Node;\n\n if (this.contains(node) || this.renderRoot.contains(node)) {\n return;\n }\n\n if (this._carouselKeyboardInteractionFocus.focused) {\n this._carouselKeyboardInteractionFocus.reset();\n\n if (!this._hasMouseStop) {\n this.handlePauseOnInteraction();\n }\n }\n }\n\n private handlePauseOnInteraction(): void {\n if (!this.interval || this.disablePauseOnInteraction) return;\n\n if (this.isPlaying) {\n this.pause();\n this.emitEvent('igcPaused');\n } else {\n this.play();\n this.emitEvent('igcPlaying');\n }\n }\n\n private async handleArrowLeft(): Promise<void> {\n this._hasKeyboardInteractionOnIndicators = true;\n this.handleInteraction(isLTR(this) ? this.prev : this.next);\n }\n\n private async handleArrowRight(): Promise<void> {\n this._hasKeyboardInteractionOnIndicators = true;\n this.handleInteraction(isLTR(this) ? this.next : this.prev);\n }\n\n private async handleHomeKey(): Promise<void> {\n this._hasKeyboardInteractionOnIndicators = true;\n this.handleInteraction(() =>\n this.select(isLTR(this) ? first(this.slides) : last(this.slides))\n );\n }\n\n private async handleEndKey(): Promise<void> {\n this._hasKeyboardInteractionOnIndicators = true;\n this.handleInteraction(() =>\n this.select(isLTR(this) ? last(this.slides) : first(this.slides))\n );\n }\n\n private handleVerticalSwipe({ data: { direction } }: SwipeEvent) {\n if (this.vertical) {\n this.handleInteraction(direction === 'up' ? this.next : this.prev);\n }\n }\n\n private handleHorizontalSwipe({ data: { direction } }: SwipeEvent) {\n if (!this.vertical) {\n this.handleInteraction(async () => {\n if (isLTR(this)) {\n direction === 'left' ? await this.next() : await this.prev();\n } else {\n direction === 'left' ? await this.prev() : await this.next();\n }\n });\n }\n }\n\n private async handleIndicatorClick(event: PointerEvent): Promise<void> {\n const indicator = findElementFromEventPath<IgcCarouselIndicatorComponent>(\n IgcCarouselIndicatorComponent.tagName,\n event\n )!;\n\n const index = this.hasProjectedIndicators\n ? this._projectedIndicators.indexOf(indicator)\n : Array.from(this._defaultIndicators).indexOf(indicator);\n\n this.handleInteraction(() =>\n this.select(this.slides[index], index > this.current ? 'next' : 'prev')\n );\n }\n\n private handleNavigationInteractionNext() {\n this.handleInteraction(this.next);\n }\n\n private handleNavigationInteractionPrevious() {\n this.handleInteraction(this.prev);\n }\n\n private async handleInteraction(\n callback: () => Promise<unknown>\n ): Promise<void> {\n if (this.interval) {\n this.resetInterval();\n }\n\n await callback.call(this);\n this.emitEvent('igcSlideChanged', { detail: this.current });\n\n if (this.interval) {\n this.restartInterval();\n }\n }\n\n private activateSlide(slide: IgcCarouselSlideComponent): void {\n if (this._activeSlide) {\n this._activeSlide.active = false;\n }\n\n this._activeSlide = slide;\n this._activeSlide.active = true;\n\n if (this._hasKeyboardInteractionOnIndicators) {\n this.hasProjectedIndicators\n ? this._projectedIndicators[this.current].focus()\n : this._defaultIndicators[this.current].focus();\n\n this._hasKeyboardInteractionOnIndicators = false;\n }\n }\n\n private updateProjectedIndicators(): void {\n for (const [idx, slide] of this.slides.entries()) {\n const indicator = this._projectedIndicators[idx];\n indicator.active = slide.active;\n indicator.index = idx;\n\n this.setAttribute('aria-controls', slide.id);\n }\n }\n\n private resetInterval(): void {\n if (this._lastInterval) {\n clearInterval(this._lastInterval);\n this._lastInterval = null;\n }\n }\n\n private restartInterval(): void {\n this.resetInterval();\n\n if (asNumber(this.interval) > 0) {\n this._lastInterval = setInterval(() => {\n if (this.isPlaying && this.total) {\n this.next();\n this.emitEvent('igcSlideChanged', { detail: this.current });\n } else {\n this.pause();\n }\n }, this.interval);\n }\n }\n\n private async animateSlides(\n nextSlide: IgcCarouselSlideComponent,\n currentSlide: IgcCarouselSlideComponent,\n dir: 'next' | 'prev'\n ): Promise<void> {\n if (dir === 'next') {\n // Animate slides in next direction\n currentSlide.previous = true;\n currentSlide.toggleAnimation('out');\n this.activateSlide(nextSlide);\n await nextSlide.toggleAnimation('in');\n currentSlide.previous = false;\n } else {\n // Animate slides in previous direction\n currentSlide.previous = true;\n currentSlide.toggleAnimation('in', 'reverse');\n this.activateSlide(nextSlide);\n await nextSlide.toggleAnimation('out', 'reverse');\n currentSlide.previous = false;\n }\n }\n\n /**\n * Resumes playing of the carousel slides.\n */\n public play(): void {\n if (!this.isPlaying) {\n this._paused = false;\n this._playing = true;\n this.restartInterval();\n }\n }\n\n /**\n * Pauses the carousel rotation of slides.\n */\n public pause(): void {\n if (this.isPlaying) {\n this._playing = false;\n this._paused = true;\n this.resetInterval();\n }\n }\n\n /**\n * Switches to the next slide, runs any animations, and returns if the operation was successful.\n */\n public async next(): Promise<boolean> {\n if (this.disableLoop && this.nextIndex === 0) {\n this.pause();\n return false;\n }\n\n return await this.select(this.slides[this.nextIndex], 'next');\n }\n\n /**\n * Switches to the previous slide, runs any animations, and returns if the operation was successful.\n */\n public async prev(): Promise<boolean> {\n if (this.disableLoop && this.prevIndex === this.total - 1) {\n this.pause();\n return false;\n }\n\n return await this.select(this.slides[this.prevIndex], 'prev');\n }\n\n /* blazorSuppress */\n /**\n * Switches to the passed-in slide, runs any animations, and returns if the operation was successful.\n */\n public async select(\n slide: IgcCarouselSlideComponent,\n animationDirection?: 'next' | 'prev'\n ): Promise<boolean>;\n /**\n * Switches to slide by index, runs any animations, and returns if the operation was successful.\n */\n public async select(\n index: number,\n animationDirection?: 'next' | 'prev'\n ): Promise<boolean>;\n public async select(\n slideOrIndex: IgcCarouselSlideComponent | number,\n animationDirection?: 'next' | 'prev'\n ): Promise<boolean> {\n let index: number;\n let slide: IgcCarouselSlideComponent | undefined;\n\n if (typeof slideOrIndex === 'number') {\n index = slideOrIndex;\n slide = this.slides.at(index);\n } else {\n slide = slideOrIndex;\n index = this.slides.indexOf(slide);\n }\n\n if (index === this.current || index === -1 || !slide) {\n return false;\n }\n\n const dir = animationDirection ?? (index > this.current ? 'next' : 'prev');\n\n await this.animateSlides(slide, this._activeSlide, dir);\n return true;\n }\n\n private navigationTemplate() {\n return html`\n <igc-button\n ${ref(this._prevButtonRef)}\n type=\"button\"\n part=\"navigation previous\"\n aria-label=\"Previous slide\"\n aria-controls=${this._carouselId}\n ?disabled=${this.disableLoop && this.current === 0}\n @click=${this.handleNavigationInteractionPrevious}\n >\n <slot name=\"previous-button\">\n <igc-icon\n name=\"carousel_prev\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </igc-button>\n <igc-button\n ${ref(this._nextButtonRef)}\n type=\"button\"\n part=\"navigation next\"\n aria-label=\"Next slide\"\n aria-controls=${this._carouselId}\n ?disabled=${this.disableLoop && this.current === this.total - 1}\n @click=${this.handleNavigationInteractionNext}\n >\n <slot name=\"next-button\">\n <igc-icon\n name=\"carousel_next\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </igc-button>\n `;\n }\n\n protected *renderIndicators() {\n for (const [i, slide] of this.slides.entries()) {\n const forward = slide.active ? 'visible' : 'hidden';\n const backward = slide.active ? 'hidden' : 'visible';\n\n yield html`\n <igc-carousel-indicator\n exportparts=\"indicator, active, inactive\"\n .active=${slide.active}\n .index=${i}\n >\n <div\n part=\"dot\"\n style=${styleMap({ visibility: backward, zIndex: 1 })}\n ></div>\n <div\n part=\"dot active\"\n slot=\"active\"\n style=${styleMap({ visibility: forward })}\n ></div>\n </igc-carousel-indicator>\n `;\n }\n }\n\n private indicatorTemplate() {\n const parts = partNameMap({\n indicators: true,\n start: this.indicatorsOrientation === 'start',\n });\n\n return html`\n <igc-carousel-indicator-container>\n <div ${ref(this._indicatorsContainerRef)} role=\"tablist\" part=${parts}>\n <slot\n name=\"indicator\"\n @slotchange=${this.handleIndicatorSlotChange}\n @click=${this.handleIndicatorClick}\n >\n ${this.hasProjectedIndicators\n ? this.updateProjectedIndicators()\n : this.renderIndicators()}\n </slot>\n </div>\n </igc-carousel-indicator-container>\n `;\n }\n\n private labelTemplate() {\n const parts = partNameMap({\n label: true,\n indicators: true,\n start: this.indicatorsOrientation === 'start',\n });\n const value = formatString(\n this.slidesLabelFormat,\n this.current + 1,\n this.total\n );\n\n return html`\n <div part=${parts}>\n <span>${value}</span>\n </div>\n `;\n }\n\n protected override render() {\n return html`\n <section @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut}>\n ${this.hideNavigation ? nothing : this.navigationTemplate()}\n ${this.hideIndicators || this.showIndicatorsLabel\n ? nothing\n : this.indicatorTemplate()}\n ${!this.hideIndicators && this.showIndicatorsLabel\n ? this.labelTemplate()\n : nothing}\n <div\n ${ref(this._carouselSlidesContainerRef)}\n id=${this._carouselId}\n aria-live=${this.interval && this.isPlaying ? 'off' : 'polite'}\n >\n <slot @slotchange=${this.handleSlotChange}></slot>\n </div>\n </section>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-carousel': IgcCarouselComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEL,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;A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AiCvC;IAHT,KAAK,CAAC,eAAe,CAAC;IACtB,KAAK,CAAC,mBAAmB,CAAC;IAC1B,KAAK,CAAC,uBAAuB,CAAC;0DAG9B;AAGS;IADT,KAAK,CAAC,UAAU,CAAC;0DAOjB;AAzOkB,oBAAoB;IADxC,MAAM,CAAC,GAAG,CAAC;GACS,oBAAoB,CA6sBxC;eA7sBoB,oBAAoB","sourcesContent":["import { ContextProvider } from '@lit/context';\nimport { LitElement, html, nothing } from 'lit';\nimport {\n property,\n queryAll,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\n\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport IgcButtonComponent from '../button/button.js';\nimport { carouselContext } from '../common/context.js';\nimport { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';\nimport {\n type SwipeEvent,\n addGesturesController,\n} from '../common/controllers/gestures.js';\nimport {\n addKeybindings,\n arrowLeft,\n arrowRight,\n endKey,\n homeKey,\n} from '../common/controllers/key-bindings.js';\nimport {\n type MutationControllerParams,\n createMutationController,\n} from '../common/controllers/mutation-observer.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport {\n asNumber,\n createCounter,\n findElementFromEventPath,\n first,\n formatString,\n isLTR,\n last,\n partNameMap,\n wrap,\n} from '../common/util.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcCarouselIndicatorContainerComponent from './carousel-indicator-container.js';\nimport IgcCarouselIndicatorComponent from './carousel-indicator.js';\nimport IgcCarouselSlideComponent from './carousel-slide.js';\nimport { styles } from './themes/carousel.base.css.js';\nimport { all } from './themes/container.js';\nimport { styles as shared } from './themes/shared/carousel.common.css.js';\n\nexport interface IgcCarouselComponentEventMap {\n igcSlideChanged: CustomEvent<number>;\n igcPlaying: CustomEvent<void>;\n igcPaused: CustomEvent<void>;\n}\n\n/**\n * The `igc-carousel` presents a set of `igc-carousel-slide`s by sequentially displaying a subset of one or more slides.\n *\n * @element igc-carousel\n *\n * @slot Default slot for the carousel. Any projected `igc-carousel-slide` components should be projected here.\n * @slot previous-button - Renders content inside the previous button.\n * @slot next-button - Renders content inside the next button.\n *\n * @fires igcSlideChanged - Emitted when the current active slide is changed either by user interaction or by the interval callback.\n * @fires igcPlaying - Emitted when the carousel enters playing state by a user interaction.\n * @fires igcPaused - Emitted when the carousel enters paused state by a user interaction.\n *\n * @csspart navigation - The wrapper container of each carousel navigation button.\n * @csspart previous - The wrapper container of the carousel previous navigation button.\n * @csspart next - The wrapper container of the carousel next navigation button.\n * @csspart dot - The carousel dot indicator container.\n * @csspart active - The carousel active dot indicator container.\n * @csspart label - The label container of the carousel indicators.\n * @csspart start - The wrapping container of all carousel indicators when indicators-orientation is set to start.\n */\n\n@themes(all)\nexport default class IgcCarouselComponent extends EventEmitterMixin<\n IgcCarouselComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static styles = [styles, shared];\n public static readonly tagName = 'igc-carousel';\n\n /* blazorSuppress */\n public static register() {\n registerComponent(\n IgcCarouselComponent,\n IgcCarouselIndicatorComponent,\n IgcCarouselIndicatorContainerComponent,\n IgcCarouselSlideComponent,\n IgcIconComponent,\n IgcButtonComponent\n );\n }\n\n private static readonly increment = createCounter();\n private _carouselId = `igc-carousel-${IgcCarouselComponent.increment()}`;\n private _carouselKeyboardInteractionFocus = addKeyboardFocusRing(this);\n\n private _internals: ElementInternals;\n private _lastInterval!: ReturnType<typeof setInterval> | null;\n private _hasKeyboardInteractionOnIndicators = false;\n private _hasMouseStop = false;\n\n private _context = new ContextProvider(this, {\n context: carouselContext,\n initialValue: this,\n });\n\n private _carouselSlidesContainerRef: Ref<HTMLDivElement> = createRef();\n private _indicatorsContainerRef: Ref<HTMLDivElement> = createRef();\n private _prevButtonRef: Ref<IgcButtonComponent> = createRef();\n private _nextButtonRef: Ref<IgcButtonComponent> = createRef();\n\n private get hasProjectedIndicators(): boolean {\n return this._projectedIndicators.length > 0;\n }\n\n private get showIndicatorsLabel(): boolean {\n return this.total > this.maximumIndicatorsCount;\n }\n\n private get nextIndex(): number {\n return wrap(0, this.total - 1, this.current + 1);\n }\n\n private get prevIndex(): number {\n return wrap(0, this.total - 1, this.current - 1);\n }\n\n @queryAll(IgcCarouselIndicatorComponent.tagName)\n private _defaultIndicators!: NodeListOf<IgcCarouselIndicatorComponent>;\n\n @queryAssignedElements({\n selector: IgcCarouselIndicatorComponent.tagName,\n slot: 'indicator',\n })\n private _projectedIndicators!: Array<IgcCarouselIndicatorComponent>;\n\n @state()\n private _activeSlide!: IgcCarouselSlideComponent;\n\n @state()\n private _playing = false;\n\n @state()\n private _paused = false;\n\n private _observerCallback({\n changes: { added, attributes },\n }: MutationControllerParams<IgcCarouselSlideComponent>) {\n const activeSlides = this.slides.filter((slide) => slide.active);\n\n if (activeSlides.length <= 1) {\n return;\n }\n const idx = this.slides.indexOf(\n added.length ? last(added).node : last(attributes)\n );\n\n for (const [i, slide] of this.slides.entries()) {\n if (slide.active && i !== idx) {\n slide.active = false;\n }\n }\n\n this.activateSlide(this.slides[idx]);\n }\n\n /**\n * Whether the carousel should skip rotating to the first slide after it reaches the last.\n * @attr disable-loop\n */\n @property({ type: Boolean, reflect: true, attribute: 'disable-loop' })\n public disableLoop = false;\n\n /**\n * Whether the carousel should ignore use interactions and not pause on them.\n * @attr disable-pause-on-interaction\n */\n @property({\n type: Boolean,\n reflect: true,\n attribute: 'disable-pause-on-interaction',\n })\n public disablePauseOnInteraction = false;\n\n /**\n * Whether the carousel should skip rendering of the default navigation buttons.\n * @attr hide-navigation\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-navigation' })\n public hideNavigation = false;\n\n /**\n * Whether the carousel should render the indicator controls (dots).\n * @attr hide-indicators\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-indicators' })\n public hideIndicators = false;\n\n /**\n * Whether the carousel has vertical alignment.\n * @attr vertical\n */\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n /**\n * Sets the orientation of the indicator controls (dots).\n * @attr indicators-orientation\n */\n @property({ reflect: false, attribute: 'indicators-orientation' })\n public indicatorsOrientation: 'start' | 'end' = 'end';\n\n /**\n * The format used to set the aria-label on the carousel indicators.\n * Instances of '{0}' will be replaced with the index of the corresponding slide.\n *\n * @attr indicators-label-format\n */\n @property({ attribute: 'indicators-label-format' })\n public indicatorsLabelFormat = 'Slide {0}';\n\n /**\n * The format used to set the aria-label on the carousel slides and the text displayed\n * when the number of indicators is greater than tha maximum indicator count.\n * Instances of '{0}' will be replaced with the index of the corresponding slide.\n * Instances of '{1}' will be replaced with the total amount of slides.\n *\n * @attr slides-label-format\n */\n @property({ attribute: 'slides-label-format' })\n public slidesLabelFormat = '{0} of {1}';\n\n /**\n * The duration in milliseconds between changing the active slide.\n * @attr interval\n */\n @property({ type: Number, reflect: false })\n public interval: number | undefined;\n\n /**\n * Controls the maximum indicator controls (dots) that can be shown. Default value is `10`.\n * @attr maximum-indicators-count\n */\n @property({\n type: Number,\n reflect: false,\n attribute: 'maximum-indicators-count',\n })\n public maximumIndicatorsCount = 10;\n\n /**\n * The animation type.\n * @attr animation-type\n */\n @property({ attribute: 'animation-type' })\n public animationType: 'slide' | 'fade' | 'none' = 'slide';\n\n /* blazorSuppress */\n /**\n * The slides of the carousel.\n */\n @queryAssignedElements({ selector: IgcCarouselSlideComponent.tagName })\n public slides!: Array<IgcCarouselSlideComponent>;\n\n /**\n * The total number of slides.\n */\n public get total(): number {\n return this.slides.length;\n }\n\n /**\n * The index of the current active slide.\n */\n public get current(): number {\n return Math.max(0, this.slides.indexOf(this._activeSlide));\n }\n\n /**\n * Whether the carousel is in playing state.\n */\n public get isPlaying(): boolean {\n return this._playing;\n }\n\n /**\n * Whether the carousel in in paused state.\n */\n public get isPaused(): boolean {\n return this._paused;\n }\n\n @watch('animationType')\n @watch('slidesLabelFormat')\n @watch('indicatorsLabelFormat')\n protected contextChanged() {\n this._context.setValue(this, true);\n }\n\n @watch('interval')\n protected intervalChange() {\n if (!this.isPlaying) {\n this._playing = true;\n }\n\n this.restartInterval();\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n\n this._internals.role = 'region';\n this._internals.ariaRoleDescription = 'carousel';\n\n this.addEventListener('pointerdown', this.handlePointerDown);\n this.addEventListener('pointerenter', this.handlePointerEnter);\n this.addEventListener('pointerleave', this.handlePointerLeave);\n\n addGesturesController(this, {\n ref: this._carouselSlidesContainerRef,\n touchOnly: true,\n })\n .set('swipe-left', this.handleHorizontalSwipe)\n .set('swipe-right', this.handleHorizontalSwipe)\n .set('swipe-up', this.handleVerticalSwipe)\n .set('swipe-down', this.handleVerticalSwipe);\n\n addKeybindings(this, {\n ref: this._indicatorsContainerRef,\n bindingDefaults: { preventDefault: true },\n })\n .set(arrowLeft, this.handleArrowLeft)\n .set(arrowRight, this.handleArrowRight)\n .set(homeKey, this.handleHomeKey)\n .set(endKey, this.handleEndKey);\n\n addKeybindings(this, {\n ref: this._prevButtonRef,\n bindingDefaults: { preventDefault: true },\n }).setActivateHandler(this.handleNavigationInteractionPrevious);\n\n addKeybindings(this, {\n ref: this._nextButtonRef,\n bindingDefaults: { preventDefault: true },\n }).setActivateHandler(this.handleNavigationInteractionNext);\n\n createMutationController(this, {\n callback: this._observerCallback,\n filter: [IgcCarouselSlideComponent.tagName],\n config: {\n attributeFilter: ['active'],\n childList: true,\n subtree: true,\n },\n });\n }\n\n private handleSlotChange(): void {\n if (this.total) {\n this.activateSlide(\n this.slides.findLast((slide) => slide.active) ?? first(this.slides)\n );\n }\n }\n\n private handleIndicatorSlotChange(): void {\n this.requestUpdate();\n }\n\n private handlePointerDown(): void {\n if (this._carouselKeyboardInteractionFocus.focused) {\n this._carouselKeyboardInteractionFocus.reset();\n }\n }\n\n private handlePointerEnter(): void {\n this._hasMouseStop = true;\n if (this._carouselKeyboardInteractionFocus.focused) {\n return;\n }\n this.handlePauseOnInteraction();\n }\n\n private handlePointerLeave(): void {\n this._hasMouseStop = false;\n if (this._carouselKeyboardInteractionFocus.focused) {\n return;\n }\n this.handlePauseOnInteraction();\n }\n\n private handleFocusIn(): void {\n if (this._carouselKeyboardInteractionFocus.focused || this._hasMouseStop) {\n return;\n }\n this.handlePauseOnInteraction();\n }\n\n private handleFocusOut(event: FocusEvent): void {\n const node = event.relatedTarget as Node;\n\n if (this.contains(node) || this.renderRoot.contains(node)) {\n return;\n }\n\n if (this._carouselKeyboardInteractionFocus.focused) {\n this._carouselKeyboardInteractionFocus.reset();\n\n if (!this._hasMouseStop) {\n this.handlePauseOnInteraction();\n }\n }\n }\n\n private handlePauseOnInteraction(): void {\n if (!this.interval || this.disablePauseOnInteraction) return;\n\n if (this.isPlaying) {\n this.pause();\n this.emitEvent('igcPaused');\n } else {\n this.play();\n this.emitEvent('igcPlaying');\n }\n }\n\n private async handleArrowLeft(): Promise<void> {\n this._hasKeyboardInteractionOnIndicators = true;\n this.handleInteraction(isLTR(this) ? this.prev : this.next);\n }\n\n private async handleArrowRight(): Promise<void> {\n this._hasKeyboardInteractionOnIndicators = true;\n this.handleInteraction(isLTR(this) ? this.next : this.prev);\n }\n\n private async handleHomeKey(): Promise<void> {\n this._hasKeyboardInteractionOnIndicators = true;\n this.handleInteraction(() =>\n this.select(isLTR(this) ? first(this.slides) : last(this.slides))\n );\n }\n\n private async handleEndKey(): Promise<void> {\n this._hasKeyboardInteractionOnIndicators = true;\n this.handleInteraction(() =>\n this.select(isLTR(this) ? last(this.slides) : first(this.slides))\n );\n }\n\n private handleVerticalSwipe({ data: { direction } }: SwipeEvent) {\n if (this.vertical) {\n this.handleInteraction(direction === 'up' ? this.next : this.prev);\n }\n }\n\n private handleHorizontalSwipe({ data: { direction } }: SwipeEvent) {\n if (!this.vertical) {\n this.handleInteraction(async () => {\n if (isLTR(this)) {\n direction === 'left' ? await this.next() : await this.prev();\n } else {\n direction === 'left' ? await this.prev() : await this.next();\n }\n });\n }\n }\n\n private async handleIndicatorClick(event: PointerEvent): Promise<void> {\n const indicator = findElementFromEventPath<IgcCarouselIndicatorComponent>(\n IgcCarouselIndicatorComponent.tagName,\n event\n )!;\n\n const index = this.hasProjectedIndicators\n ? this._projectedIndicators.indexOf(indicator)\n : Array.from(this._defaultIndicators).indexOf(indicator);\n\n this.handleInteraction(() =>\n this.select(this.slides[index], index > this.current ? 'next' : 'prev')\n );\n }\n\n private handleNavigationInteractionNext() {\n this.handleInteraction(this.next);\n }\n\n private handleNavigationInteractionPrevious() {\n this.handleInteraction(this.prev);\n }\n\n private async handleInteraction(\n callback: () => Promise<unknown>\n ): Promise<void> {\n if (this.interval) {\n this.resetInterval();\n }\n\n await callback.call(this);\n this.emitEvent('igcSlideChanged', { detail: this.current });\n\n if (this.interval) {\n this.restartInterval();\n }\n }\n\n private activateSlide(slide: IgcCarouselSlideComponent): void {\n if (this._activeSlide) {\n this._activeSlide.active = false;\n }\n\n this._activeSlide = slide;\n this._activeSlide.active = true;\n\n if (this._hasKeyboardInteractionOnIndicators) {\n this.hasProjectedIndicators\n ? this._projectedIndicators[this.current].focus()\n : this._defaultIndicators[this.current].focus();\n\n this._hasKeyboardInteractionOnIndicators = false;\n }\n }\n\n private updateProjectedIndicators(): void {\n for (const [idx, slide] of this.slides.entries()) {\n const indicator = this._projectedIndicators[idx];\n indicator.active = slide.active;\n indicator.index = idx;\n\n this.setAttribute('aria-controls', slide.id);\n }\n }\n\n private resetInterval(): void {\n if (this._lastInterval) {\n clearInterval(this._lastInterval);\n this._lastInterval = null;\n }\n }\n\n private restartInterval(): void {\n this.resetInterval();\n\n if (asNumber(this.interval) > 0) {\n this._lastInterval = setInterval(() => {\n if (this.isPlaying && this.total) {\n this.next();\n this.emitEvent('igcSlideChanged', { detail: this.current });\n } else {\n this.pause();\n }\n }, this.interval);\n }\n }\n\n private async animateSlides(\n nextSlide: IgcCarouselSlideComponent,\n currentSlide: IgcCarouselSlideComponent,\n dir: 'next' | 'prev'\n ): Promise<void> {\n if (dir === 'next') {\n // Animate slides in next direction\n currentSlide.previous = true;\n currentSlide.toggleAnimation('out');\n this.activateSlide(nextSlide);\n await nextSlide.toggleAnimation('in');\n currentSlide.previous = false;\n } else {\n // Animate slides in previous direction\n currentSlide.previous = true;\n currentSlide.toggleAnimation('in', 'reverse');\n this.activateSlide(nextSlide);\n await nextSlide.toggleAnimation('out', 'reverse');\n currentSlide.previous = false;\n }\n }\n\n /**\n * Resumes playing of the carousel slides.\n */\n public play(): void {\n if (!this.isPlaying) {\n this._paused = false;\n this._playing = true;\n this.restartInterval();\n }\n }\n\n /**\n * Pauses the carousel rotation of slides.\n */\n public pause(): void {\n if (this.isPlaying) {\n this._playing = false;\n this._paused = true;\n this.resetInterval();\n }\n }\n\n /**\n * Switches to the next slide, runs any animations, and returns if the operation was successful.\n */\n public async next(): Promise<boolean> {\n if (this.disableLoop && this.nextIndex === 0) {\n this.pause();\n return false;\n }\n\n return await this.select(this.slides[this.nextIndex], 'next');\n }\n\n /**\n * Switches to the previous slide, runs any animations, and returns if the operation was successful.\n */\n public async prev(): Promise<boolean> {\n if (this.disableLoop && this.prevIndex === this.total - 1) {\n this.pause();\n return false;\n }\n\n return await this.select(this.slides[this.prevIndex], 'prev');\n }\n\n /* blazorSuppress */\n /**\n * Switches to the passed-in slide, runs any animations, and returns if the operation was successful.\n */\n public async select(\n slide: IgcCarouselSlideComponent,\n animationDirection?: 'next' | 'prev'\n ): Promise<boolean>;\n /**\n * Switches to slide by index, runs any animations, and returns if the operation was successful.\n */\n public async select(\n index: number,\n animationDirection?: 'next' | 'prev'\n ): Promise<boolean>;\n public async select(\n slideOrIndex: IgcCarouselSlideComponent | number,\n animationDirection?: 'next' | 'prev'\n ): Promise<boolean> {\n let index: number;\n let slide: IgcCarouselSlideComponent | undefined;\n\n if (typeof slideOrIndex === 'number') {\n index = slideOrIndex;\n slide = this.slides.at(index);\n } else {\n slide = slideOrIndex;\n index = this.slides.indexOf(slide);\n }\n\n if (index === this.current || index === -1 || !slide) {\n return false;\n }\n\n const dir = animationDirection ?? (index > this.current ? 'next' : 'prev');\n\n await this.animateSlides(slide, this._activeSlide, dir);\n return true;\n }\n\n private navigationTemplate() {\n return html`\n <igc-button\n ${ref(this._prevButtonRef)}\n type=\"button\"\n part=\"navigation previous\"\n aria-label=\"Previous slide\"\n aria-controls=${this._carouselId}\n ?disabled=${this.disableLoop && this.current === 0}\n @click=${this.handleNavigationInteractionPrevious}\n >\n <slot name=\"previous-button\">\n <igc-icon\n name=\"carousel_prev\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </igc-button>\n <igc-button\n ${ref(this._nextButtonRef)}\n type=\"button\"\n part=\"navigation next\"\n aria-label=\"Next slide\"\n aria-controls=${this._carouselId}\n ?disabled=${this.disableLoop && this.current === this.total - 1}\n @click=${this.handleNavigationInteractionNext}\n >\n <slot name=\"next-button\">\n <igc-icon\n name=\"carousel_next\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </igc-button>\n `;\n }\n\n protected *renderIndicators() {\n for (const [i, slide] of this.slides.entries()) {\n const forward = slide.active ? 'visible' : 'hidden';\n const backward = slide.active ? 'hidden' : 'visible';\n\n yield html`\n <igc-carousel-indicator\n exportparts=\"indicator, active, inactive\"\n .active=${slide.active}\n .index=${i}\n >\n <div\n part=\"dot\"\n style=${styleMap({ visibility: backward, zIndex: 1 })}\n ></div>\n <div\n part=\"dot active\"\n slot=\"active\"\n style=${styleMap({ visibility: forward })}\n ></div>\n </igc-carousel-indicator>\n `;\n }\n }\n\n private indicatorTemplate() {\n const parts = partNameMap({\n indicators: true,\n start: this.indicatorsOrientation === 'start',\n });\n\n return html`\n <igc-carousel-indicator-container>\n <div ${ref(this._indicatorsContainerRef)} role=\"tablist\" part=${parts}>\n <slot\n name=\"indicator\"\n @slotchange=${this.handleIndicatorSlotChange}\n @click=${this.handleIndicatorClick}\n >\n ${this.hasProjectedIndicators\n ? this.updateProjectedIndicators()\n : this.renderIndicators()}\n </slot>\n </div>\n </igc-carousel-indicator-container>\n `;\n }\n\n private labelTemplate() {\n const parts = partNameMap({\n label: true,\n indicators: true,\n start: this.indicatorsOrientation === 'start',\n });\n const value = formatString(\n this.slidesLabelFormat,\n this.current + 1,\n this.total\n );\n\n return html`\n <div part=${parts}>\n <span>${value}</span>\n </div>\n `;\n }\n\n protected override render() {\n return html`\n <section @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut}>\n ${this.hideNavigation ? nothing : this.navigationTemplate()}\n ${this.hideIndicators || this.showIndicatorsLabel\n ? nothing\n : this.indicatorTemplate()}\n ${!this.hideIndicators && this.showIndicatorsLabel\n ? this.labelTemplate()\n : nothing}\n <div\n ${ref(this._carouselSlidesContainerRef)}\n id=${this._carouselId}\n aria-live=${this.interval && this.isPlaying ? 'off' : 'polite'}\n >\n <slot @slotchange=${this.handleSlotChange}></slot>\n </div>\n </section>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-carousel': IgcCarouselComponent;\n }\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type IgcCarouselComponent from '../carousel/carousel.js';
|
|
2
|
+
import type IgcTileManagerComponent from '../tile-manager/tile-manager.js';
|
|
3
|
+
import type IgcTileComponent from '../tile-manager/tile.js';
|
|
4
|
+
export type TileManagerContext = {
|
|
5
|
+
instance: IgcTileManagerComponent;
|
|
6
|
+
draggedItem: IgcTileComponent | null;
|
|
7
|
+
lastSwapTile: IgcTileComponent | null;
|
|
8
|
+
};
|
|
9
|
+
export type TileContext = {
|
|
10
|
+
instance: IgcTileComponent;
|
|
11
|
+
setFullscreenState: (fullscreen: boolean, isUserTriggered?: boolean) => unknown;
|
|
12
|
+
};
|
|
13
|
+
declare const carouselContext: {
|
|
14
|
+
__context__: IgcCarouselComponent;
|
|
15
|
+
};
|
|
16
|
+
declare const tileContext: {
|
|
17
|
+
__context__: TileContext;
|
|
18
|
+
};
|
|
19
|
+
declare const tileManagerContext: {
|
|
20
|
+
__context__: TileManagerContext;
|
|
21
|
+
};
|
|
22
|
+
export { carouselContext, tileContext, tileManagerContext };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createContext } from '@lit/context';
|
|
2
|
+
const carouselContext = createContext(Symbol('carousel-context'));
|
|
3
|
+
const tileContext = createContext(Symbol('tile-context'));
|
|
4
|
+
const tileManagerContext = createContext(Symbol('tile-manager-context'));
|
|
5
|
+
export { carouselContext, tileContext, tileManagerContext };
|
|
6
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/components/common/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAmB7C,MAAM,eAAe,GAAG,aAAa,CACnC,MAAM,CAAC,kBAAkB,CAAC,CAC3B,CAAC;AAEF,MAAM,WAAW,GAAG,aAAa,CAAc,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;AAEvE,MAAM,kBAAkB,GAAG,aAAa,CACtC,MAAM,CAAC,sBAAsB,CAAC,CAC/B,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["import { createContext } from '@lit/context';\nimport type IgcCarouselComponent from '../carousel/carousel.js';\nimport type IgcTileManagerComponent from '../tile-manager/tile-manager.js';\nimport type IgcTileComponent from '../tile-manager/tile.js';\n\nexport type TileManagerContext = {\n instance: IgcTileManagerComponent;\n draggedItem: IgcTileComponent | null;\n lastSwapTile: IgcTileComponent | null;\n};\n\nexport type TileContext = {\n instance: IgcTileComponent;\n setFullscreenState: (\n fullscreen: boolean,\n isUserTriggered?: boolean\n ) => unknown;\n};\n\nconst carouselContext = createContext<IgcCarouselComponent>(\n Symbol('carousel-context')\n);\n\nconst tileContext = createContext<TileContext>(Symbol('tile-context'));\n\nconst tileManagerContext = createContext<TileManagerContext>(\n Symbol('tile-manager-context')\n);\n\nexport { carouselContext, tileContext, tileManagerContext };\n"]}
|
|
@@ -108,3 +108,4 @@ export declare function isString(value: unknown): value is string;
|
|
|
108
108
|
*/
|
|
109
109
|
export declare function isEmpty<T, U extends string>(x: ArrayLike<T> | Set<T> | Map<U, T>): boolean;
|
|
110
110
|
export declare function asArray<T>(value?: T | T[]): T[];
|
|
111
|
+
export declare function partition<T>(array: T[], isTruthy: (value: T) => boolean): [truthy: T[], falsy: T[]];
|
|
@@ -160,4 +160,12 @@ export function asArray(value) {
|
|
|
160
160
|
return [];
|
|
161
161
|
return Array.isArray(value) ? value : [value];
|
|
162
162
|
}
|
|
163
|
+
export function partition(array, isTruthy) {
|
|
164
|
+
const truthy = [];
|
|
165
|
+
const falsy = [];
|
|
166
|
+
for (const item of array) {
|
|
167
|
+
(isTruthy(item) ? truthy : falsy).push(item);
|
|
168
|
+
}
|
|
169
|
+
return [truthy, falsy];
|
|
170
|
+
}
|
|
163
171
|
//# sourceMappingURL=util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/components/common/util.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAA0B,EAAE,EAAE;IACxD,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC;SAC7B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;SAClC,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,UAAU,IAAI,KAAI,CAAC;AAEzB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC;AAE/E,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,MAAc,EAAE,GAAW,EAAE,GAAW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AY;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC1B,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAKD,MAAM,UAAU,OAAO,CACrB,CAAoC;IAEpC,OAAO,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,OAAO,CAAI,KAAe;IACxC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC","sourcesContent":["export interface PartNameInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nexport const partNameMap = (partNameInfo: PartNameInfo) => {\n return Object.keys(partNameInfo)\n .filter((key) => partNameInfo[key])\n .join(' ');\n};\n\nexport function noop() {}\n\nexport const asPercent = (part: number, whole: number) => (part / whole) * 100;\n\nexport const clamp = (number: number, min: number, max: number) =>\n Math.max(min, Math.min(number, max));\n\nexport function numberOfDecimals(number: number): number {\n const decimals = last(number.toString().split('.'));\n return decimals ? decimals.length : 0;\n}\n\nexport function roundPrecise(number: number, magnitude = 1): number {\n const factor = 10 ** magnitude;\n return Math.round(number * factor) / factor;\n}\n\nexport function numberInRangeInclusive(\n value: number,\n min: number,\n max: number\n) {\n return value >= min && value <= max;\n}\n\nexport function sameObject(a: object, b: object) {\n return JSON.stringify(a) === JSON.stringify(b);\n}\n\n/**\n *\n * Returns an element's offset relative to its parent. Similar to element.offsetTop and element.offsetLeft, except the\n * parent doesn't have to be positioned relative or absolute.\n *\n * Work around for the following issues in Chromium based browsers:\n *\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1330819\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1334556\n *\n */\nexport function getOffset(element: HTMLElement, parent: HTMLElement) {\n const { top, left, bottom, right } = element.getBoundingClientRect();\n const {\n top: pTop,\n left: pLeft,\n bottom: pBottom,\n right: pRight,\n } = parent.getBoundingClientRect();\n\n return {\n top: Math.round(top - pTop),\n left: Math.round(left - pLeft),\n right: Math.round(right - pRight),\n bottom: Math.round(bottom - pBottom),\n };\n}\n\nexport function createCounter() {\n let i = 0;\n return () => {\n i++;\n return i;\n };\n}\n\n/**\n * Returns whether an element has a Left-to-Right directionality.\n */\nexport function isLTR(element: HTMLElement) {\n return element.matches(':dir(ltr)');\n}\n\n/**\n * Builds a string from format specifiers and replacement parameters.\n * Will coerce non-string parameters to their string representations.\n *\n * @example\n * ```typescript\n * formatString('{0} says \"{1}\".', 'John', 'Hello'); // 'John says \"Hello\".'\n * formatString('{1} is greater than {0}', 0, 1); // '1 is greater than 0'\n * ```\n */\nexport function formatString(template: string, ...params: unknown[]): string {\n const length = params.length;\n\n return template.replace(/{(\\d+)}/g, (match: string, index: number) =>\n index >= length ? match : `${params[index]}`\n );\n}\n\n/**\n * Parse the passed `value` as a number or return the `fallback` if it can't be done.\n *\n * @example\n * ```typescript\n * asNumber('5'); // 5\n * asNumber('3.14'); // 3.14\n * asNumber('five'); // 0\n * asNUmber('five', 5); // 5\n * ```\n */\nexport function asNumber(value: unknown, fallback = 0) {\n const parsed = Number.parseFloat(value as string);\n return Number.isNaN(parsed) ? fallback : parsed;\n}\n\n/**\n * Returns the value wrapped between the min and max bounds.\n *\n * If the value is greater than max, returns the min and vice-versa.\n * If the value is between the bounds, it is returned unchanged.\n *\n * @example\n * ```typescript\n * wrap(1, 4, 2); // 2\n * wrap(1, 4, 5); // 1\n * wrap(1, 4, -1); // 4\n * ```\n */\nexport function wrap(min: number, max: number, value: number) {\n if (value < min) {\n return max;\n }\n if (value > max) {\n return min;\n }\n\n return value;\n}\n\nexport function isDefined<T = unknown>(value: T) {\n return value !== undefined;\n}\n\nexport function* iterNodes<T = Node>(\n root: Node,\n whatToShow?: keyof typeof NodeFilter,\n filter?: (node: T) => boolean\n): Generator<T> {\n if (!isDefined(globalThis.document)) {\n return;\n }\n\n const iter = globalThis.document.createTreeWalker(\n root,\n NodeFilter[whatToShow ?? 'SHOW_ALL']\n );\n\n let node = iter.nextNode() as T;\n\n while (node) {\n if (filter) {\n if (filter(node)) {\n yield node;\n }\n } else {\n yield node;\n }\n\n node = iter.nextNode() as T;\n }\n}\n\nexport function getElementByIdFromRoot(root: HTMLElement, id: string) {\n return (root.getRootNode() as Document | ShadowRoot).getElementById(id);\n}\n\nexport function isElement(node: unknown): node is Element {\n return node instanceof Node && node.nodeType === Node.ELEMENT_NODE;\n}\n\nexport function getElementsFromEventPath<T extends Element>(event: Event) {\n return event.composedPath().filter((item) => isElement(item)) as T[];\n}\n\nexport function findElementFromEventPath<T extends Element>(\n predicate: string | ((element: Element) => boolean),\n event: Event\n) {\n const func = isString(predicate)\n ? (e: Element) => e.matches(predicate)\n : (e: Element) => predicate(e);\n\n return getElementsFromEventPath(event).find(func) as T | undefined;\n}\n\nexport function groupBy<T>(array: T[], key: keyof T | ((item: T) => any)) {\n const result: Record<string, T[]> = {};\n const _get = isFunction(key) ? key : (item: T) => item[key];\n\n for (const item of array) {\n const category = _get(item);\n const group = result[category];\n\n if (Array.isArray(group)) {\n group.push(item);\n } else {\n result[category] = [item];\n }\n }\n\n return result;\n}\n\nexport function first<T>(arr: T[]) {\n return arr.at(0) as T;\n}\n\nexport function last<T>(arr: T[]) {\n return arr.at(-1) as T;\n}\n\nexport function modulo(n: number, d: number) {\n return ((n % d) + d) % d;\n}\n\n/**\n * Creates an array of `n` elements from a given iterator.\n *\n */\nexport function take<T>(iterable: IterableIterator<T>, n: number) {\n const result: T[] = [];\n let i = 0;\n let current = iterable.next();\n\n while (i < n && !current.done) {\n result.push(current.value);\n current = iterable.next();\n i++;\n }\n\n return result;\n}\n\n/**\n * Splits an array into chunks of length `size` and returns a generator\n * yielding each chunk.\n * The last chunk may contain less than `size` elements.\n *\n * @example\n * ```typescript\n * const arr = [0,1,2,3,4,5,6,7,8,9];\n *\n * Array.from(chunk(arr, 2)) // [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]]\n * Array.from(chunk(arr, 3)) // [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]\n * Array.from(chunk([], 3)) // []\n * Array.from(chunk(arr, -3)) // Error\n * ```\n */\nexport function* chunk<T>(arr: T[], size: number) {\n if (size < 1) {\n throw new Error('size must be an integer >= 1');\n }\n for (let i = 0; i < arr.length; i += size) {\n yield arr.slice(i, i + size);\n }\n}\n\nexport function splitToWords(text: string) {\n const input = text.replaceAll(/[^a-zA-Z0-9\\s-_]/g, '');\n if (/[\\s-_]+/.test(input)) return input.split(/[\\s-_]+/);\n return input.split(/(?=[A-Z])+/);\n}\n\nexport function toKebabCase(text: string): string {\n const input = text.trim();\n return splitToWords(input).join('-').toLocaleLowerCase();\n}\n\nexport function isFunction(value: unknown): value is CallableFunction {\n return typeof value === 'function';\n}\n\nexport function isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\n/**\n * Returns whether a given collection has at least one member.\n */\nexport function isEmpty<T, U extends string>(\n x: ArrayLike<T> | Set<T> | Map<U, T>\n): boolean {\n return 'length' in x ? x.length < 1 : x.size < 1;\n}\n\nexport function asArray<T>(value?: T | T[]): T[] {\n if (!isDefined(value)) return [];\n return Array.isArray(value) ? value : [value];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/components/common/util.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAA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AS,CACvB,KAAU,EACV,QAA+B;IAE/B,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,MAAM,KAAK,GAAQ,EAAE,CAAC;IAEtB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzB,CAAC","sourcesContent":["export interface PartNameInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nexport const partNameMap = (partNameInfo: PartNameInfo) => {\n return Object.keys(partNameInfo)\n .filter((key) => partNameInfo[key])\n .join(' ');\n};\n\nexport function noop() {}\n\nexport const asPercent = (part: number, whole: number) => (part / whole) * 100;\n\nexport const clamp = (number: number, min: number, max: number) =>\n Math.max(min, Math.min(number, max));\n\nexport function numberOfDecimals(number: number): number {\n const decimals = last(number.toString().split('.'));\n return decimals ? decimals.length : 0;\n}\n\nexport function roundPrecise(number: number, magnitude = 1): number {\n const factor = 10 ** magnitude;\n return Math.round(number * factor) / factor;\n}\n\nexport function numberInRangeInclusive(\n value: number,\n min: number,\n max: number\n) {\n return value >= min && value <= max;\n}\n\nexport function sameObject(a: object, b: object) {\n return JSON.stringify(a) === JSON.stringify(b);\n}\n\n/**\n *\n * Returns an element's offset relative to its parent. Similar to element.offsetTop and element.offsetLeft, except the\n * parent doesn't have to be positioned relative or absolute.\n *\n * Work around for the following issues in Chromium based browsers:\n *\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1330819\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1334556\n *\n */\nexport function getOffset(element: HTMLElement, parent: HTMLElement) {\n const { top, left, bottom, right } = element.getBoundingClientRect();\n const {\n top: pTop,\n left: pLeft,\n bottom: pBottom,\n right: pRight,\n } = parent.getBoundingClientRect();\n\n return {\n top: Math.round(top - pTop),\n left: Math.round(left - pLeft),\n right: Math.round(right - pRight),\n bottom: Math.round(bottom - pBottom),\n };\n}\n\nexport function createCounter() {\n let i = 0;\n return () => {\n i++;\n return i;\n };\n}\n\n/**\n * Returns whether an element has a Left-to-Right directionality.\n */\nexport function isLTR(element: HTMLElement) {\n return element.matches(':dir(ltr)');\n}\n\n/**\n * Builds a string from format specifiers and replacement parameters.\n * Will coerce non-string parameters to their string representations.\n *\n * @example\n * ```typescript\n * formatString('{0} says \"{1}\".', 'John', 'Hello'); // 'John says \"Hello\".'\n * formatString('{1} is greater than {0}', 0, 1); // '1 is greater than 0'\n * ```\n */\nexport function formatString(template: string, ...params: unknown[]): string {\n const length = params.length;\n\n return template.replace(/{(\\d+)}/g, (match: string, index: number) =>\n index >= length ? match : `${params[index]}`\n );\n}\n\n/**\n * Parse the passed `value` as a number or return the `fallback` if it can't be done.\n *\n * @example\n * ```typescript\n * asNumber('5'); // 5\n * asNumber('3.14'); // 3.14\n * asNumber('five'); // 0\n * asNUmber('five', 5); // 5\n * ```\n */\nexport function asNumber(value: unknown, fallback = 0) {\n const parsed = Number.parseFloat(value as string);\n return Number.isNaN(parsed) ? fallback : parsed;\n}\n\n/**\n * Returns the value wrapped between the min and max bounds.\n *\n * If the value is greater than max, returns the min and vice-versa.\n * If the value is between the bounds, it is returned unchanged.\n *\n * @example\n * ```typescript\n * wrap(1, 4, 2); // 2\n * wrap(1, 4, 5); // 1\n * wrap(1, 4, -1); // 4\n * ```\n */\nexport function wrap(min: number, max: number, value: number) {\n if (value < min) {\n return max;\n }\n if (value > max) {\n return min;\n }\n\n return value;\n}\n\nexport function isDefined<T = unknown>(value: T) {\n return value !== undefined;\n}\n\nexport function* iterNodes<T = Node>(\n root: Node,\n whatToShow?: keyof typeof NodeFilter,\n filter?: (node: T) => boolean\n): Generator<T> {\n if (!isDefined(globalThis.document)) {\n return;\n }\n\n const iter = globalThis.document.createTreeWalker(\n root,\n NodeFilter[whatToShow ?? 'SHOW_ALL']\n );\n\n let node = iter.nextNode() as T;\n\n while (node) {\n if (filter) {\n if (filter(node)) {\n yield node;\n }\n } else {\n yield node;\n }\n\n node = iter.nextNode() as T;\n }\n}\n\nexport function getElementByIdFromRoot(root: HTMLElement, id: string) {\n return (root.getRootNode() as Document | ShadowRoot).getElementById(id);\n}\n\nexport function isElement(node: unknown): node is Element {\n return node instanceof Node && node.nodeType === Node.ELEMENT_NODE;\n}\n\nexport function getElementsFromEventPath<T extends Element>(event: Event) {\n return event.composedPath().filter((item) => isElement(item)) as T[];\n}\n\nexport function findElementFromEventPath<T extends Element>(\n predicate: string | ((element: Element) => boolean),\n event: Event\n) {\n const func = isString(predicate)\n ? (e: Element) => e.matches(predicate)\n : (e: Element) => predicate(e);\n\n return getElementsFromEventPath(event).find(func) as T | undefined;\n}\n\nexport function groupBy<T>(array: T[], key: keyof T | ((item: T) => any)) {\n const result: Record<string, T[]> = {};\n const _get = isFunction(key) ? key : (item: T) => item[key];\n\n for (const item of array) {\n const category = _get(item);\n const group = result[category];\n\n if (Array.isArray(group)) {\n group.push(item);\n } else {\n result[category] = [item];\n }\n }\n\n return result;\n}\n\nexport function first<T>(arr: T[]) {\n return arr.at(0) as T;\n}\n\nexport function last<T>(arr: T[]) {\n return arr.at(-1) as T;\n}\n\nexport function modulo(n: number, d: number) {\n return ((n % d) + d) % d;\n}\n\n/**\n * Creates an array of `n` elements from a given iterator.\n *\n */\nexport function take<T>(iterable: IterableIterator<T>, n: number) {\n const result: T[] = [];\n let i = 0;\n let current = iterable.next();\n\n while (i < n && !current.done) {\n result.push(current.value);\n current = iterable.next();\n i++;\n }\n\n return result;\n}\n\n/**\n * Splits an array into chunks of length `size` and returns a generator\n * yielding each chunk.\n * The last chunk may contain less than `size` elements.\n *\n * @example\n * ```typescript\n * const arr = [0,1,2,3,4,5,6,7,8,9];\n *\n * Array.from(chunk(arr, 2)) // [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]]\n * Array.from(chunk(arr, 3)) // [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]\n * Array.from(chunk([], 3)) // []\n * Array.from(chunk(arr, -3)) // Error\n * ```\n */\nexport function* chunk<T>(arr: T[], size: number) {\n if (size < 1) {\n throw new Error('size must be an integer >= 1');\n }\n for (let i = 0; i < arr.length; i += size) {\n yield arr.slice(i, i + size);\n }\n}\n\nexport function splitToWords(text: string) {\n const input = text.replaceAll(/[^a-zA-Z0-9\\s-_]/g, '');\n if (/[\\s-_]+/.test(input)) return input.split(/[\\s-_]+/);\n return input.split(/(?=[A-Z])+/);\n}\n\nexport function toKebabCase(text: string): string {\n const input = text.trim();\n return splitToWords(input).join('-').toLocaleLowerCase();\n}\n\nexport function isFunction(value: unknown): value is CallableFunction {\n return typeof value === 'function';\n}\n\nexport function isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\n/**\n * Returns whether a given collection has at least one member.\n */\nexport function isEmpty<T, U extends string>(\n x: ArrayLike<T> | Set<T> | Map<U, T>\n): boolean {\n return 'length' in x ? x.length < 1 : x.size < 1;\n}\n\nexport function asArray<T>(value?: T | T[]): T[] {\n if (!isDefined(value)) return [];\n return Array.isArray(value) ? value : [value];\n}\n\nexport function partition<T>(\n array: T[],\n isTruthy: (value: T) => boolean\n): [truthy: T[], falsy: T[]] {\n const truthy: T[] = [];\n const falsy: T[] = [];\n\n for (const item of array) {\n (isTruthy(item) ? truthy : falsy).push(item);\n }\n\n return [truthy, falsy];\n}\n"]}
|
|
@@ -236,4 +236,50 @@ addIcon('error', {
|
|
|
236
236
|
collection: 'internal',
|
|
237
237
|
},
|
|
238
238
|
});
|
|
239
|
+
addIcon('fullscreen', {
|
|
240
|
+
default: {
|
|
241
|
+
name: 'fullscreen',
|
|
242
|
+
collection: 'internal',
|
|
243
|
+
},
|
|
244
|
+
indigo: {
|
|
245
|
+
name: 'indigo_fullscreen',
|
|
246
|
+
collection: 'internal',
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
addIcon('fullscreen_exit', {
|
|
250
|
+
default: {
|
|
251
|
+
name: 'fullscreen_exit',
|
|
252
|
+
collection: 'internal',
|
|
253
|
+
},
|
|
254
|
+
indigo: {
|
|
255
|
+
name: 'indigo_fullscreen_exit',
|
|
256
|
+
collection: 'internal',
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
addIcon('expand_content', {
|
|
260
|
+
default: {
|
|
261
|
+
name: 'expand_content',
|
|
262
|
+
collection: 'internal',
|
|
263
|
+
},
|
|
264
|
+
indigo: {
|
|
265
|
+
name: 'indigo_expand_content',
|
|
266
|
+
collection: 'internal',
|
|
267
|
+
},
|
|
268
|
+
});
|
|
269
|
+
addIcon('collapse_content', {
|
|
270
|
+
default: {
|
|
271
|
+
name: 'collapse_content',
|
|
272
|
+
collection: 'internal',
|
|
273
|
+
},
|
|
274
|
+
indigo: {
|
|
275
|
+
name: 'indigo_collapse_content',
|
|
276
|
+
collection: 'internal',
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
addIcon('resize', {
|
|
280
|
+
default: {
|
|
281
|
+
name: 'resize',
|
|
282
|
+
collection: 'internal',
|
|
283
|
+
},
|
|
284
|
+
});
|
|
239
285
|
//# sourceMappingURL=icon-references.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-references.js","sourceRoot":"","sources":["../../../src/components/icon/icon-references.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAC,MAAM,cAAc,GAAoB,EAAE,CAAC;AAClD,MAAM,YAAY,GAAG,CAAC,KAAW,EAAE,EAAE;IACnC,OAAO,IAAI,GAAG,CACZ,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACjC,OAAO,IAAuC,CAAC;IACjD,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,MAAY,EAAE,EAAE;IAC7C,MAAM,IAAI,GAAG;QACX,KAAK,EAAE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QACP,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,eAAe,EAAE;IACvB,OAAO,EAAE;QACP,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,eAAe,EAAE;IACvB,OAAO,EAAE;QACP,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,OAAO,EAAE;IACf,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC","sourcesContent":["/** READ BEFORE YOU MODIFY THIS FILE!\n *\n * Before you add/modify an icon reference, please think about the semantics of the icon you are adding/modifying.\n *\n * Icon aliases have sematic meaning depending on the context in which they are used.\n * For instance, if your component handles toggling between expanded and collapsed states,\n * you may want to use the already existing `expand` and `collapse` aliases that point to\n * the `expand_more` and `expand_less` icons in the material font set.\n *\n * It may so happen, however, that the design of your component requires you to use the `chevron_right` for the\n * expand icon and the `expand_more` for the collapse icon. In this case the `tree_expand` and `tree_collapse` aliases\n * would be appropriate.\n * This distinction is important when choosing which icon to use for your component as it will have an impact\n * when a user decides to rewire the `expand`/`collapse` icons to some other icons.\n *\n * Likewise, modifying existing references should be handled with caution as many component in the framework already\n * share icons that have equivalent semantic meaning. For example, the `Paginator`, `Grid Filtering Row`,\n * and `Tabs` components in Ignite UI for Angular all use the `prev` and `next` icons for navigating between pages\n * or lists of items. Changing the underlying target for those icons should be done in a way that suits all components.\n *\n * Keep in mind that icon aliases and their underlying names are shared between Ignite UI component frameworks\n * and changing an alias name here should be reflected in the other frameworks as well.\n *\n * To get acquainted with which component uses what icon, please make sure to read the\n * [docs](https://infragistics.com/products/ignite-ui-angular/Angular/components/icon-service#internal-usage).\n */\nimport type {\n IconMeta,\n IconReference,\n IconThemeKey,\n} from './registry/types.js';\n\ntype Icon = { [key in IconThemeKey]?: IconMeta };\n\nexport const iconReferences: IconReference[] = [];\nconst makeIconRefs = (icons: Icon) => {\n return new Map(\n Object.entries(icons).map((icon) => {\n return icon as [theme: IconThemeKey, IconMeta];\n })\n );\n};\n\nconst addIcon = (name: string, target: Icon) => {\n const icon = {\n alias: {\n name,\n collection: 'default',\n },\n target: makeIconRefs(target),\n };\n\n iconReferences.push(icon as IconReference);\n};\n\naddIcon('expand', {\n default: {\n name: 'keyboard_arrow_down',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_down',\n collection: 'internal',\n },\n});\naddIcon('collapse', {\n default: {\n name: 'keyboard_arrow_up',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_up',\n collection: 'internal',\n },\n});\naddIcon('arrow_prev', {\n default: {\n name: 'navigate_before',\n collection: 'internal',\n },\n fluent: {\n name: 'arrow_upward',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_left',\n collection: 'internal',\n },\n});\naddIcon('arrow_next', {\n default: {\n name: 'navigate_next',\n collection: 'internal',\n },\n fluent: {\n name: 'arrow_downward',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('selected', {\n default: {\n name: 'chip_select',\n collection: 'internal',\n },\n});\naddIcon('remove', {\n default: {\n name: 'chip_cancel',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_cancel',\n collection: 'internal',\n },\n});\naddIcon('input_clear', {\n default: {\n name: 'clear',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_clear',\n collection: 'internal',\n },\n});\naddIcon('input_expand', {\n default: {\n name: 'keyboard_arrow_down',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_down',\n collection: 'internal',\n },\n});\naddIcon('input_collapse', {\n default: {\n name: 'keyboard_arrow_up',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_up',\n collection: 'internal',\n },\n});\naddIcon('chevron_right', {\n default: {\n name: 'keyboard_arrow_right',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('chevron_left', {\n default: {\n name: 'navigate_before',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_left',\n collection: 'internal',\n },\n});\naddIcon('case_sensitive', {\n default: {\n name: 'case_sensitive',\n collection: 'internal',\n },\n});\naddIcon('today', {\n default: {\n name: 'calendar_today',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_calendar_today',\n collection: 'internal',\n },\n});\naddIcon('clock', {\n default: {\n name: 'access_time',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_access_time',\n collection: 'internal',\n },\n});\naddIcon('star_filled', {\n default: {\n name: 'star',\n collection: 'internal',\n },\n});\naddIcon('star_outlined', {\n default: {\n name: 'star_border',\n collection: 'internal',\n },\n});\naddIcon('prev', {\n default: {\n name: 'navigate_before',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_left',\n collection: 'internal',\n },\n});\naddIcon('next', {\n default: {\n name: 'navigate_next',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('tree_expand', {\n default: {\n name: 'keyboard_arrow_right',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('tree_collapse', {\n default: {\n name: 'keyboard_arrow_down',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_down',\n collection: 'internal',\n },\n});\naddIcon('carousel_prev', {\n default: {\n name: 'keyboard_arrow_left',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_left',\n collection: 'internal',\n },\n});\naddIcon('carousel_next', {\n default: {\n name: 'keyboard_arrow_right',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('error', {\n default: {\n name: 'error',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_error',\n collection: 'internal',\n },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"icon-references.js","sourceRoot":"","sources":["../../../src/components/icon/icon-references.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAC,MAAM,cAAc,GAAoB,EAAE,CAAC;AAClD,MAAM,YAAY,GAAG,CAAC,KAAW,EAAE,EAAE;IACnC,OAAO,IAAI,GAAG,CACZ,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACjC,OAAO,IAAuC,CAAC;IACjD,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,MAAY,EAAE,EAAE;IAC7C,MAAM,IAAI,GAAG;QACX,KAAK,EAAE;YACL,IAAI;YACJ,UAAU,EAAE,SAAS;SACtB;QACD,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC;KAC7B,CAAC;IAEF,cAAc,CAAC,IAAI,CAAC,IAAqB,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,OAAO,CAAC,QAAQ,EAAE;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,UAAU,EAAE;IAClB,OAAO,EAAE;QACP,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,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AE,sBAAsB;QAC5B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,OAAO,EAAE;IACf,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,YAAY,EAAE;IACpB,OAAO,EAAE;QACP,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,iBAAiB,EAAE;IACzB,OAAO,EAAE;QACP,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,wBAAwB;QAC9B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,gBAAgB,EAAE;IACxB,OAAO,EAAE;QACP,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,uBAAuB;QAC7B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,kBAAkB,EAAE;IAC1B,OAAO,EAAE;QACP,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE,UAAU;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,yBAAyB;QAC/B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AACH,OAAO,CAAC,QAAQ,EAAE;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC","sourcesContent":["/** READ BEFORE YOU MODIFY THIS FILE!\n *\n * Before you add/modify an icon reference, please think about the semantics of the icon you are adding/modifying.\n *\n * Icon aliases have sematic meaning depending on the context in which they are used.\n * For instance, if your component handles toggling between expanded and collapsed states,\n * you may want to use the already existing `expand` and `collapse` aliases that point to\n * the `expand_more` and `expand_less` icons in the material font set.\n *\n * It may so happen, however, that the design of your component requires you to use the `chevron_right` for the\n * expand icon and the `expand_more` for the collapse icon. In this case the `tree_expand` and `tree_collapse` aliases\n * would be appropriate.\n * This distinction is important when choosing which icon to use for your component as it will have an impact\n * when a user decides to rewire the `expand`/`collapse` icons to some other icons.\n *\n * Likewise, modifying existing references should be handled with caution as many component in the framework already\n * share icons that have equivalent semantic meaning. For example, the `Paginator`, `Grid Filtering Row`,\n * and `Tabs` components in Ignite UI for Angular all use the `prev` and `next` icons for navigating between pages\n * or lists of items. Changing the underlying target for those icons should be done in a way that suits all components.\n *\n * Keep in mind that icon aliases and their underlying names are shared between Ignite UI component frameworks\n * and changing an alias name here should be reflected in the other frameworks as well.\n *\n * To get acquainted with which component uses what icon, please make sure to read the\n * [docs](https://infragistics.com/products/ignite-ui-angular/Angular/components/icon-service#internal-usage).\n */\nimport type {\n IconMeta,\n IconReference,\n IconThemeKey,\n} from './registry/types.js';\n\ntype Icon = { [key in IconThemeKey]?: IconMeta };\n\nexport const iconReferences: IconReference[] = [];\nconst makeIconRefs = (icons: Icon) => {\n return new Map(\n Object.entries(icons).map((icon) => {\n return icon as [theme: IconThemeKey, IconMeta];\n })\n );\n};\n\nconst addIcon = (name: string, target: Icon) => {\n const icon = {\n alias: {\n name,\n collection: 'default',\n },\n target: makeIconRefs(target),\n };\n\n iconReferences.push(icon as IconReference);\n};\n\naddIcon('expand', {\n default: {\n name: 'keyboard_arrow_down',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_down',\n collection: 'internal',\n },\n});\naddIcon('collapse', {\n default: {\n name: 'keyboard_arrow_up',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_up',\n collection: 'internal',\n },\n});\naddIcon('arrow_prev', {\n default: {\n name: 'navigate_before',\n collection: 'internal',\n },\n fluent: {\n name: 'arrow_upward',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_left',\n collection: 'internal',\n },\n});\naddIcon('arrow_next', {\n default: {\n name: 'navigate_next',\n collection: 'internal',\n },\n fluent: {\n name: 'arrow_downward',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('selected', {\n default: {\n name: 'chip_select',\n collection: 'internal',\n },\n});\naddIcon('remove', {\n default: {\n name: 'chip_cancel',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_cancel',\n collection: 'internal',\n },\n});\naddIcon('input_clear', {\n default: {\n name: 'clear',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_clear',\n collection: 'internal',\n },\n});\naddIcon('input_expand', {\n default: {\n name: 'keyboard_arrow_down',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_down',\n collection: 'internal',\n },\n});\naddIcon('input_collapse', {\n default: {\n name: 'keyboard_arrow_up',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_up',\n collection: 'internal',\n },\n});\naddIcon('chevron_right', {\n default: {\n name: 'keyboard_arrow_right',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('chevron_left', {\n default: {\n name: 'navigate_before',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_left',\n collection: 'internal',\n },\n});\naddIcon('case_sensitive', {\n default: {\n name: 'case_sensitive',\n collection: 'internal',\n },\n});\naddIcon('today', {\n default: {\n name: 'calendar_today',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_calendar_today',\n collection: 'internal',\n },\n});\naddIcon('clock', {\n default: {\n name: 'access_time',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_access_time',\n collection: 'internal',\n },\n});\naddIcon('star_filled', {\n default: {\n name: 'star',\n collection: 'internal',\n },\n});\naddIcon('star_outlined', {\n default: {\n name: 'star_border',\n collection: 'internal',\n },\n});\naddIcon('prev', {\n default: {\n name: 'navigate_before',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_left',\n collection: 'internal',\n },\n});\naddIcon('next', {\n default: {\n name: 'navigate_next',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('tree_expand', {\n default: {\n name: 'keyboard_arrow_right',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('tree_collapse', {\n default: {\n name: 'keyboard_arrow_down',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_down',\n collection: 'internal',\n },\n});\naddIcon('carousel_prev', {\n default: {\n name: 'keyboard_arrow_left',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_left',\n collection: 'internal',\n },\n});\naddIcon('carousel_next', {\n default: {\n name: 'keyboard_arrow_right',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_chevron_right',\n collection: 'internal',\n },\n});\naddIcon('error', {\n default: {\n name: 'error',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_error',\n collection: 'internal',\n },\n});\naddIcon('fullscreen', {\n default: {\n name: 'fullscreen',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_fullscreen',\n collection: 'internal',\n },\n});\naddIcon('fullscreen_exit', {\n default: {\n name: 'fullscreen_exit',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_fullscreen_exit',\n collection: 'internal',\n },\n});\naddIcon('expand_content', {\n default: {\n name: 'expand_content',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_expand_content',\n collection: 'internal',\n },\n});\naddIcon('collapse_content', {\n default: {\n name: 'collapse_content',\n collection: 'internal',\n },\n indigo: {\n name: 'indigo_collapse_content',\n collection: 'internal',\n },\n});\naddIcon('resize', {\n default: {\n name: 'resize',\n collection: 'internal',\n },\n});\n"]}
|