igniteui-webcomponents 7.2.2 → 7.2.4
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/CHANGELOG.md +23 -0
- package/animations/player.d.ts +4 -11
- package/animations/player.js +3 -9
- package/animations/player.js.map +1 -1
- package/animations/view-transition.d.ts +44 -0
- package/animations/view-transition.js +81 -0
- package/animations/view-transition.js.map +1 -0
- package/components/avatar/avatar.js +7 -7
- package/components/avatar/avatar.js.map +1 -1
- package/components/button/button-base.d.ts +1 -1
- package/components/button/button-base.js +7 -5
- package/components/button/button-base.js.map +1 -1
- package/components/button/icon-button.js +9 -9
- package/components/button/icon-button.js.map +1 -1
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/carousel/carousel.js +1 -2
- package/components/carousel/carousel.js.map +1 -1
- package/components/chat/chat-input.js +4 -4
- package/components/chat/chat-input.js.map +1 -1
- package/components/chat/chat.js +6 -6
- package/components/chat/chat.js.map +1 -1
- package/components/chat/message-attachments.js.map +1 -1
- package/components/chat/types.js.map +1 -1
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/combo/combo.d.ts +1 -4
- package/components/combo/combo.js +9 -1
- package/components/combo/combo.js.map +1 -1
- package/components/combo/types.d.ts +4 -0
- package/components/combo/types.js.map +1 -1
- package/components/common/context.d.ts +2 -0
- package/components/common/context.js.map +1 -1
- package/components/common/controllers/drag.d.ts +10 -0
- package/components/common/controllers/drag.js +11 -0
- package/components/common/controllers/drag.js.map +1 -1
- package/components/common/controllers/gestures.js.map +1 -1
- package/components/common/controllers/internals.d.ts +9 -0
- package/components/common/controllers/internals.js +4 -0
- package/components/common/controllers/internals.js.map +1 -1
- package/components/common/controllers/mutation-observer.d.ts +2 -2
- package/components/common/controllers/mutation-observer.js +10 -7
- package/components/common/controllers/mutation-observer.js.map +1 -1
- package/components/common/controllers/slot.d.ts +1 -1
- package/components/common/controllers/slot.js +4 -1
- package/components/common/controllers/slot.js.map +1 -1
- package/components/common/i18n/utils.js.map +1 -1
- package/components/common/mixins/forms/associated.d.ts +1 -1
- package/components/common/mixins/forms/associated.js +21 -13
- package/components/common/mixins/forms/associated.js.map +1 -1
- package/components/common/mixins/forms/types.d.ts +2 -1
- package/components/common/mixins/forms/types.js.map +1 -1
- package/components/common/templates/masked-input.d.ts +2 -0
- package/components/common/templates/masked-input.js +2 -1
- package/components/common/templates/masked-input.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +2 -1
- package/components/date-picker/date-picker.js +6 -0
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-range-picker/date-range-mask-parser.d.ts +11 -2
- package/components/date-range-picker/date-range-mask-parser.js.map +1 -1
- package/components/date-range-picker/date-range-picker.d.ts +2 -1
- package/components/date-range-picker/date-range-picker.js +10 -8
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
- package/components/date-time-input/date-part.js.map +1 -1
- package/components/date-time-input/date-time-input.base.d.ts +15 -0
- package/components/date-time-input/date-time-input.base.js +9 -1
- package/components/date-time-input/date-time-input.base.js.map +1 -1
- package/components/dialog/dialog.js +4 -4
- package/components/dialog/dialog.js.map +1 -1
- package/components/file-input/file-input.js.map +1 -1
- package/components/icon/icon-state.broadcast.js.map +1 -1
- package/components/icon/icon.d.ts +3 -2
- package/components/icon/icon.js +7 -2
- package/components/icon/icon.js.map +1 -1
- package/components/input/input-base.d.ts +15 -0
- package/components/input/input-base.js +8 -1
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.js +1 -0
- package/components/input/input.js.map +1 -1
- package/components/mask-input/mask-input.js +1 -0
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/popover/popover.d.ts +10 -1
- package/components/popover/popover.js +31 -14
- package/components/popover/popover.js.map +1 -1
- package/components/popover/themes/light/popover.base.css.js +1 -1
- package/components/popover/themes/light/popover.base.css.js.map +1 -1
- package/components/select/select.d.ts +7 -1
- package/components/select/select.js +12 -1
- package/components/select/select.js.map +1 -1
- package/components/slider/range-slider.js +5 -5
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/slider-base.js +9 -9
- package/components/slider/slider-base.js.map +1 -1
- package/components/snackbar/snackbar.js +4 -4
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/splitter/splitter.js.map +1 -1
- package/components/stepper/common/animations.js.map +1 -1
- package/components/stepper/step.js.map +1 -1
- package/components/tabs/tabs.js +29 -10
- package/components/tabs/tabs.js.map +1 -1
- package/components/textarea/textarea.js +1 -0
- package/components/textarea/textarea.js.map +1 -1
- package/components/tile-manager/tile-manager.d.ts +11 -0
- package/components/tile-manager/tile-manager.js +15 -0
- package/components/tile-manager/tile-manager.js.map +1 -1
- package/components/tile-manager/tile.js +15 -14
- package/components/tile-manager/tile.js.map +1 -1
- package/components/tooltip/tooltip.js +8 -8
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tree/tree-item.js +31 -31
- package/components/tree/tree-item.js.map +1 -1
- package/components/types.js.map +1 -1
- package/components/validation-container/validation-container.d.ts +32 -5
- package/components/validation-container/validation-container.js +74 -64
- package/components/validation-container/validation-container.js.map +1 -1
- package/custom-elements.json +809 -189
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +6 -2
- package/index.js +3 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +15 -1
- package/themes/dark/indigo.css +1 -1
- package/themes/light/indigo.css +1 -1
- package/web-types.json +1 -1
|
@@ -211,6 +211,7 @@ let IgcTextareaComponent = class IgcTextareaComponent extends FormAssociatedRequ
|
|
|
211
211
|
?required=${this.required}
|
|
212
212
|
?readonly=${this.readOnly}
|
|
213
213
|
aria-describedby=${describedBy}
|
|
214
|
+
.ariaLabelledByElements=${this._internals.labels}
|
|
214
215
|
></textarea>
|
|
215
216
|
`;
|
|
216
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.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N,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACX;AAShB;IADC,QAAQ,EAAE;iDAGV;AAkBe;IAPf,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACT,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC;YACxD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;SACnD;KACF,CAAC;wDACgC;AAU3B;IADN,QAAQ,EAAE;kDACmC;AASvC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAC3C;AAtLT,oBAAoB;IADxC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,oBAAoB,CA8ZxC;eA9ZoB,oBAAoB","sourcesContent":["import {\n html,\n LitElement,\n nothing,\n type PropertyValues,\n type TemplateResult,\n} from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { createResizeObserverController } from '../common/controllers/resize-observer.js';\nimport {\n addSlotController,\n type InferSlotNames,\n type SlotChangeCallbackParameters,\n setSlots,\n} from '../common/controllers/slot.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.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 { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport { addSafeEventListener, asNumber } from '../common/util.js';\nimport type {\n RangeTextSelectMode,\n SelectionRangeDirection,\n TextareaResize,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles as shared } from './themes/shared/textarea.common.css.js';\nimport { styles } from './themes/textarea.base.css.js';\nimport { all } from './themes/themes.js';\nimport { textAreaValidators } from './validators.js';\n\nexport interface IgcTextareaComponentEventMap {\n igcInput: CustomEvent<string>;\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\nlet nextId = 1;\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'value-missing',\n 'too-long',\n 'too-short',\n 'custom-error',\n 'invalid'\n);\n\n/**\n * This element represents a multi-line plain-text editing control,\n * useful when you want to allow users to enter a sizeable amount of free-form text,\n * for example a comment on a review or feedback form.\n *\n * @element igc-textarea\n *\n * @slot - Text content from the default slot will be used as the value of the component.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot too-long - Renders content when the maxlength validation fails.\n * @slot too-short - Renders content when the minlength validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcInput - Emitted when the control receives user input.\n * @fires igcChange - Emitted when the a change to the control value is committed by the user.\n *\n * @csspart container - The main wrapper that holds all main input elements of the textarea.\n * @csspart input - The native input element of the igc-textarea.\n * @csspart label - The native label element of the igc-textarea.\n * @csspart prefix - The prefix wrapper of the igc-textarea.\n * @csspart suffix - The suffix wrapper of the igc-textarea.\n * @csspart helper-text - The helper text wrapper of the igc-textarea.\n */\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcTextareaComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcTextareaComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-textarea';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcTextareaComponent, IgcValidationContainerComponent);\n }\n\n //#region Private properties and state\n\n private readonly _inputId = `textarea-${nextId++}`;\n\n private readonly _themes = addThemingController(this, all);\n\n private readonly _slots = addSlotController(this, {\n slots: Slots,\n onChange: this._handleSlotChange,\n });\n\n @query('textarea')\n private readonly _input!: HTMLTextAreaElement;\n\n protected override get __validators() {\n return textAreaValidators;\n }\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: '',\n });\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Specifies what if any permission the browser has to provide for automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n * Refer to [this page](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\n *\n * @attr\n */\n @property()\n public autocomplete!: string;\n\n /**\n * Controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).\n *\n * @attr\n */\n @property()\n public override autocapitalize!: string;\n\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents.\n * This allows a browser to display an appropriate virtual keyboard.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)\n *\n * @attr inputmode\n */\n @property({ attribute: 'inputmode' })\n public override inputMode!: string;\n\n /**\n * The label for the control.\n *\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The maximum number of characters (UTF-16 code units) that the user can enter.\n * If this value isn't specified, the user can enter an unlimited number of characters.\n *\n * @attr maxlength\n */\n @property({ type: Number, attribute: 'maxlength' })\n public maxLength!: number;\n\n /**\n * The minimum number of characters (UTF-16 code units) required that the user should enter.\n *\n * @attr minlength\n */\n @property({ type: Number, attribute: 'minlength' })\n public minLength!: number;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n *\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * Makes the control a readonly field.\n *\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Controls whether the control can be resized.\n * When `auto` is set, the control will try to expand and fit its content.\n *\n * @attr\n */\n @property()\n public resize: TextareaResize = 'vertical';\n\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer.\n * If it is not specified, the default value is 3.\n *\n * @attr\n */\n @property({ type: Number })\n public rows = 3;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the component\n *\n * @attr\n */\n @property()\n public set value(value: string) {\n this._formValue.setValueAndFormState(value);\n }\n\n public get value(): string {\n return this._formValue.value;\n }\n\n /**\n * Controls whether the element may be checked for spelling errors.\n *\n * @attr\n */\n @property({\n type: Boolean,\n converter: {\n fromAttribute: (value) => !(!value || value === 'false'),\n toAttribute: (value) => (value ? 'true' : 'false'),\n },\n })\n public override spellcheck = true;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)\n * for explanation of the available values.\n *\n * @attr\n */\n @property()\n public wrap: 'hard' | 'soft' | 'off' = 'soft';\n\n /**\n * Enables validation rules to be evaluated without restricting user input. This applies to the `maxLength` property\n * when it is defined.\n *\n * @attr validate-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'validate-only' })\n public validateOnly = false;\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n createResizeObserverController(this, {\n callback: this._setAreaHeight,\n });\n\n addSafeEventListener(this, 'blur', this._handleBlur);\n }\n\n protected override updated(props: PropertyValues<this>): void {\n if (props.has('rows') || props.has('resize') || props.has('value')) {\n this._setAreaHeight();\n }\n }\n\n //#endregion\n\n //#region Internal methods\n\n private _setAutoHeight(): number {\n const { borderTopWidth, borderBottomWidth } = getComputedStyle(this._input);\n return (\n this._input.scrollHeight +\n asNumber(borderTopWidth) +\n asNumber(borderBottomWidth)\n );\n }\n\n protected _setAreaHeight(): void {\n if (this.resize === 'auto') {\n this._input.style.height = 'auto';\n this._input.style.height = `${this._setAutoHeight()}px`;\n } else {\n Object.assign(this._input.style, { height: undefined });\n }\n }\n\n protected _resolvePartNames() {\n return {\n container: true,\n prefixed: this._slots.hasAssignedElements('prefix', {\n selector: ':not([hidden])',\n }),\n suffixed: this._slots.hasAssignedElements('suffix', {\n selector: ':not([hidden])',\n }),\n filled: !!this.value,\n };\n }\n\n //#endregion\n\n //#region Event handlers\n\n private _handleSlotChange({\n isDefault,\n }: SlotChangeCallbackParameters<InferSlotNames<typeof Slots>>): void {\n if (isDefault) {\n const value = this._slots\n .getAssignedNodes('[default]', true)\n .map((node) => node.textContent?.trim())\n .filter((node) => Boolean(node))\n .join('\\r\\n');\n\n if (value !== this.value) {\n this.value = value;\n }\n }\n }\n\n protected _handleInput(): void {\n this._setTouchedState();\n this.value = this._input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected _handleChange(): void {\n this._setTouchedState();\n this.value = this._input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Selects all text within the control. */\n public select(): void {\n this._input.select();\n }\n\n /* blazorSuppress */\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: SelectionRangeDirection = 'none'\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /* blazorSuppress */\n /** Replaces the selected text in the control. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: RangeTextSelectMode = 'preserve'\n ): void {\n this._input.setRangeText(replacement, start, end, selectMode);\n this.value = this._input.value;\n }\n\n /* blazorSuppress */\n public override scrollTo(options?: ScrollToOptions | undefined): void;\n /* blazorSuppress */\n public override scrollTo(x: number, y: number): void;\n public override scrollTo(x?: unknown, y?: unknown): void {\n x != null && y != null\n ? this._input.scrollTo(x as number, y as number)\n : this._input.scrollTo(x as ScrollToOptions);\n }\n\n //#endregion\n\n //#region Renderers\n\n protected _renderSlot(name: InferSlotNames<typeof Slots>) {\n const isHidden = !this._slots.hasAssignedElements(name, {\n selector: ':not([hidden])',\n });\n\n return html`\n <div part=${name} ?hidden=${isHidden}>\n <slot name=${name}></slot>\n </div>\n `;\n }\n\n protected _renderLabel() {\n return this.label\n ? html`\n <label part=\"label\" for=${this.id || this._inputId}>\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n protected _renderStandard() {\n return html`\n ${this._renderLabel()}\n <div part=${partMap(this._resolvePartNames())}>\n ${this._renderSlot('prefix')} ${this._renderInput()}\n ${this._renderSlot('suffix')}\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderMaterial() {\n return html`\n <div\n part=${partMap({\n ...this._resolvePartNames(),\n labelled: !!this.label,\n placeholder: !!this.placeholder,\n })}\n >\n <div part=\"start\">${this._renderSlot('prefix')}</div>\n ${this._renderInput()}\n <div part=\"notch\">${this._renderLabel()}</div>\n <div part=\"filler\"></div>\n <div part=\"end\">${this._renderSlot('suffix')}</div>\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderInput() {\n const describedBy = this._slots.hasAssignedElements('helper-text')\n ? 'helper-text'\n : nothing;\n\n return html`\n <slot style=\"display: none\"></slot>\n <textarea\n id=${this.id || this._inputId}\n part=\"input\"\n style=${styleMap({\n resize: this.resize === 'auto' ? 'none' : this.resize,\n })}\n @input=${this._handleInput}\n @change=${this._handleChange}\n placeholder=${ifDefined(this.placeholder)}\n .rows=${this.rows}\n .value=${live(this.value)}\n .wrap=${this.wrap}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocapitalize=${ifDefined(this.autocapitalize as any)}\n inputmode=${ifDefined(this.inputMode)}\n spellcheck=${ifDefined(this.spellcheck)}\n minlength=${ifDefined(this.minLength)}\n maxlength=${ifDefined(this.validateOnly ? undefined : this.maxLength)}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readOnly}\n aria-describedby=${describedBy}\n ></textarea>\n `;\n }\n\n protected _renderValidationContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected override render() {\n return cache(\n this._themes.theme === 'material'\n ? this._renderMaterial()\n : this._renderStandard()\n );\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-textarea': IgcTextareaComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,OAAO,GAGR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EACL,iBAAiB,EAGjB,QAAQ,GACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAA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AE,SAAS,EAAE,WAAW,EAAE,CAAC;uDACzB;AAQnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;uDACzB;AAOnB;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACnB;AAQjB;IADN,QAAQ,EAAE;yDACiB;AAQrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;sDAC1C;AASjB;IADN,QAAQ,EAAE;oDACgC;AASpC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACX;AAShB;IADC,QAAQ,EAAE;iDAGV;AAkBe;IAPf,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACT,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC;YACxD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;SACnD;KACF,CAAC;wDACgC;AAU3B;IADN,QAAQ,EAAE;kDACmC;AASvC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAC3C;AAtLT,oBAAoB;IADxC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,oBAAoB,CA+ZxC;eA/ZoB,oBAAoB","sourcesContent":["import {\n html,\n LitElement,\n nothing,\n type PropertyValues,\n type TemplateResult,\n} from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { createResizeObserverController } from '../common/controllers/resize-observer.js';\nimport {\n addSlotController,\n type InferSlotNames,\n type SlotChangeCallbackParameters,\n setSlots,\n} from '../common/controllers/slot.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.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 { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport { addSafeEventListener, asNumber } from '../common/util.js';\nimport type {\n RangeTextSelectMode,\n SelectionRangeDirection,\n TextareaResize,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles as shared } from './themes/shared/textarea.common.css.js';\nimport { styles } from './themes/textarea.base.css.js';\nimport { all } from './themes/themes.js';\nimport { textAreaValidators } from './validators.js';\n\nexport interface IgcTextareaComponentEventMap {\n igcInput: CustomEvent<string>;\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\nlet nextId = 1;\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'value-missing',\n 'too-long',\n 'too-short',\n 'custom-error',\n 'invalid'\n);\n\n/**\n * This element represents a multi-line plain-text editing control,\n * useful when you want to allow users to enter a sizeable amount of free-form text,\n * for example a comment on a review or feedback form.\n *\n * @element igc-textarea\n *\n * @slot - Text content from the default slot will be used as the value of the component.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot too-long - Renders content when the maxlength validation fails.\n * @slot too-short - Renders content when the minlength validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcInput - Emitted when the control receives user input.\n * @fires igcChange - Emitted when the a change to the control value is committed by the user.\n *\n * @csspart container - The main wrapper that holds all main input elements of the textarea.\n * @csspart input - The native input element of the igc-textarea.\n * @csspart label - The native label element of the igc-textarea.\n * @csspart prefix - The prefix wrapper of the igc-textarea.\n * @csspart suffix - The suffix wrapper of the igc-textarea.\n * @csspart helper-text - The helper text wrapper of the igc-textarea.\n */\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcTextareaComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcTextareaComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-textarea';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcTextareaComponent, IgcValidationContainerComponent);\n }\n\n //#region Private properties and state\n\n private readonly _inputId = `textarea-${nextId++}`;\n\n private readonly _themes = addThemingController(this, all);\n\n private readonly _slots = addSlotController(this, {\n slots: Slots,\n onChange: this._handleSlotChange,\n });\n\n @query('textarea')\n private readonly _input!: HTMLTextAreaElement;\n\n protected override get __validators() {\n return textAreaValidators;\n }\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: '',\n });\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Specifies what if any permission the browser has to provide for automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n * Refer to [this page](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\n *\n * @attr\n */\n @property()\n public autocomplete!: string;\n\n /**\n * Controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).\n *\n * @attr\n */\n @property()\n public override autocapitalize!: string;\n\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents.\n * This allows a browser to display an appropriate virtual keyboard.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)\n *\n * @attr inputmode\n */\n @property({ attribute: 'inputmode' })\n public override inputMode!: string;\n\n /**\n * The label for the control.\n *\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The maximum number of characters (UTF-16 code units) that the user can enter.\n * If this value isn't specified, the user can enter an unlimited number of characters.\n *\n * @attr maxlength\n */\n @property({ type: Number, attribute: 'maxlength' })\n public maxLength!: number;\n\n /**\n * The minimum number of characters (UTF-16 code units) required that the user should enter.\n *\n * @attr minlength\n */\n @property({ type: Number, attribute: 'minlength' })\n public minLength!: number;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n *\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * Makes the control a readonly field.\n *\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Controls whether the control can be resized.\n * When `auto` is set, the control will try to expand and fit its content.\n *\n * @attr\n */\n @property()\n public resize: TextareaResize = 'vertical';\n\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer.\n * If it is not specified, the default value is 3.\n *\n * @attr\n */\n @property({ type: Number })\n public rows = 3;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the component\n *\n * @attr\n */\n @property()\n public set value(value: string) {\n this._formValue.setValueAndFormState(value);\n }\n\n public get value(): string {\n return this._formValue.value;\n }\n\n /**\n * Controls whether the element may be checked for spelling errors.\n *\n * @attr\n */\n @property({\n type: Boolean,\n converter: {\n fromAttribute: (value) => !(!value || value === 'false'),\n toAttribute: (value) => (value ? 'true' : 'false'),\n },\n })\n public override spellcheck = true;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)\n * for explanation of the available values.\n *\n * @attr\n */\n @property()\n public wrap: 'hard' | 'soft' | 'off' = 'soft';\n\n /**\n * Enables validation rules to be evaluated without restricting user input. This applies to the `maxLength` property\n * when it is defined.\n *\n * @attr validate-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'validate-only' })\n public validateOnly = false;\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n createResizeObserverController(this, {\n callback: this._setAreaHeight,\n });\n\n addSafeEventListener(this, 'blur', this._handleBlur);\n }\n\n protected override updated(props: PropertyValues<this>): void {\n if (props.has('rows') || props.has('resize') || props.has('value')) {\n this._setAreaHeight();\n }\n }\n\n //#endregion\n\n //#region Internal methods\n\n private _setAutoHeight(): number {\n const { borderTopWidth, borderBottomWidth } = getComputedStyle(this._input);\n return (\n this._input.scrollHeight +\n asNumber(borderTopWidth) +\n asNumber(borderBottomWidth)\n );\n }\n\n protected _setAreaHeight(): void {\n if (this.resize === 'auto') {\n this._input.style.height = 'auto';\n this._input.style.height = `${this._setAutoHeight()}px`;\n } else {\n Object.assign(this._input.style, { height: undefined });\n }\n }\n\n protected _resolvePartNames() {\n return {\n container: true,\n prefixed: this._slots.hasAssignedElements('prefix', {\n selector: ':not([hidden])',\n }),\n suffixed: this._slots.hasAssignedElements('suffix', {\n selector: ':not([hidden])',\n }),\n filled: !!this.value,\n };\n }\n\n //#endregion\n\n //#region Event handlers\n\n private _handleSlotChange({\n isDefault,\n }: SlotChangeCallbackParameters<InferSlotNames<typeof Slots>>): void {\n if (isDefault) {\n const value = this._slots\n .getAssignedNodes('[default]', true)\n .map((node) => node.textContent?.trim())\n .filter((node) => Boolean(node))\n .join('\\r\\n');\n\n if (value !== this.value) {\n this.value = value;\n }\n }\n }\n\n protected _handleInput(): void {\n this._setTouchedState();\n this.value = this._input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected _handleChange(): void {\n this._setTouchedState();\n this.value = this._input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Selects all text within the control. */\n public select(): void {\n this._input.select();\n }\n\n /* blazorSuppress */\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: SelectionRangeDirection = 'none'\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /* blazorSuppress */\n /** Replaces the selected text in the control. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: RangeTextSelectMode = 'preserve'\n ): void {\n this._input.setRangeText(replacement, start, end, selectMode);\n this.value = this._input.value;\n }\n\n /* blazorSuppress */\n public override scrollTo(options?: ScrollToOptions | undefined): void;\n /* blazorSuppress */\n public override scrollTo(x: number, y: number): void;\n public override scrollTo(x?: unknown, y?: unknown): void {\n x != null && y != null\n ? this._input.scrollTo(x as number, y as number)\n : this._input.scrollTo(x as ScrollToOptions);\n }\n\n //#endregion\n\n //#region Renderers\n\n protected _renderSlot(name: InferSlotNames<typeof Slots>) {\n const isHidden = !this._slots.hasAssignedElements(name, {\n selector: ':not([hidden])',\n });\n\n return html`\n <div part=${name} ?hidden=${isHidden}>\n <slot name=${name}></slot>\n </div>\n `;\n }\n\n protected _renderLabel() {\n return this.label\n ? html`\n <label part=\"label\" for=${this.id || this._inputId}>\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n protected _renderStandard() {\n return html`\n ${this._renderLabel()}\n <div part=${partMap(this._resolvePartNames())}>\n ${this._renderSlot('prefix')} ${this._renderInput()}\n ${this._renderSlot('suffix')}\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderMaterial() {\n return html`\n <div\n part=${partMap({\n ...this._resolvePartNames(),\n labelled: !!this.label,\n placeholder: !!this.placeholder,\n })}\n >\n <div part=\"start\">${this._renderSlot('prefix')}</div>\n ${this._renderInput()}\n <div part=\"notch\">${this._renderLabel()}</div>\n <div part=\"filler\"></div>\n <div part=\"end\">${this._renderSlot('suffix')}</div>\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderInput() {\n const describedBy = this._slots.hasAssignedElements('helper-text')\n ? 'helper-text'\n : nothing;\n\n return html`\n <slot style=\"display: none\"></slot>\n <textarea\n id=${this.id || this._inputId}\n part=\"input\"\n style=${styleMap({\n resize: this.resize === 'auto' ? 'none' : this.resize,\n })}\n @input=${this._handleInput}\n @change=${this._handleChange}\n placeholder=${ifDefined(this.placeholder)}\n .rows=${this.rows}\n .value=${live(this.value)}\n .wrap=${this.wrap}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocapitalize=${ifDefined(this.autocapitalize as any)}\n inputmode=${ifDefined(this.inputMode)}\n spellcheck=${ifDefined(this.spellcheck)}\n minlength=${ifDefined(this.minLength)}\n maxlength=${ifDefined(this.validateOnly ? undefined : this.maxLength)}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readOnly}\n aria-describedby=${describedBy}\n .ariaLabelledByElements=${this._internals.labels}\n ></textarea>\n `;\n }\n\n protected _renderValidationContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected override render() {\n return cache(\n this._themes.theme === 'material'\n ? this._renderMaterial()\n : this._renderStandard()\n );\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-textarea': IgcTextareaComponent;\n }\n}\n"]}
|
|
@@ -86,6 +86,17 @@ export default class IgcTileManagerComponent extends LitElement {
|
|
|
86
86
|
protected updated(): void;
|
|
87
87
|
protected firstUpdated(): void;
|
|
88
88
|
private _observerCallback;
|
|
89
|
+
/**
|
|
90
|
+
* Locks/unlocks the grid container height in response to a tile's maximized state changing.
|
|
91
|
+
*
|
|
92
|
+
* @remarks
|
|
93
|
+
* Maximizing a tile removes it from the grid flow (absolute positioning), so it no longer
|
|
94
|
+
* contributes to the grid's intrinsic height. When that tile is the sole contributor to the
|
|
95
|
+
* tallest row track, the container would otherwise collapse to the remaining tiles and cut off
|
|
96
|
+
* the maximized tile's content. Capturing the current height before the layout change keeps the
|
|
97
|
+
* container stable, and it is released once no tile remains maximized.
|
|
98
|
+
*/
|
|
99
|
+
private _setMaximizedState;
|
|
89
100
|
/**
|
|
90
101
|
* Returns the properties of the current tile collections as a JSON payload.
|
|
91
102
|
*
|
|
@@ -34,6 +34,7 @@ let IgcTileManagerComponent = class IgcTileManagerComponent extends LitElement {
|
|
|
34
34
|
return {
|
|
35
35
|
instance: this,
|
|
36
36
|
grid: this._grid,
|
|
37
|
+
setMaximizedState: () => this._setMaximizedState(),
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
_setManagerContext() {
|
|
@@ -133,6 +134,20 @@ let IgcTileManagerComponent = class IgcTileManagerComponent extends LitElement {
|
|
|
133
134
|
}
|
|
134
135
|
this._tilesState.assignTiles();
|
|
135
136
|
}
|
|
137
|
+
_setMaximizedState() {
|
|
138
|
+
const grid = this._grid.value;
|
|
139
|
+
if (grid) {
|
|
140
|
+
if (this.tiles.some((tile) => tile.maximized)) {
|
|
141
|
+
if (!grid.style.minHeight) {
|
|
142
|
+
grid.style.minHeight = `${grid.offsetHeight}px`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
grid.style.minHeight = '';
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
this.requestUpdate();
|
|
150
|
+
}
|
|
136
151
|
saveLayout() {
|
|
137
152
|
return this._serializer.saveAsJSON();
|
|
138
153
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile-manager.js","sourceRoot":"","sources":["../../../src/components/tile-manager/tile-manager.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAkB,QAAQ,EAAE,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,OAAO,CAAC,KAAK,CAAC;;;;KAIxB,CAAC;IACJ,CAAC;;AA/LD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;yDAItC;AAaD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;uDAIpC;AAcD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;0DAMrD;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;6DAM3C;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;2DAMzC;AAYD;IADC,QAAQ,EAAE;kDAMV;AA9IkB,uBAAuB;IAD3C,aAAa,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;GACvB,uBAAuB,CAyP3C;eAzPoB,uBAAuB","sourcesContent":["import { ContextProvider } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { type StyleInfo, styleMap } from 'lit/directives/style-map.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport {\n type TileManagerContext,\n tileManagerContext,\n} from '../common/context.js';\nimport {\n createMutationController,\n type MutationControllerParams,\n} from '../common/controllers/mutation-observer.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport { asNumber } from '../common/util.js';\nimport type { TileManagerDragMode, TileManagerResizeMode } from '../types.js';\nimport { createTilesState } from './position.js';\nimport { createSerializer } from './serializer.js';\nimport { all } from './themes/container.js';\nimport { styles as shared } from './themes/shared/tile-manager.common.css.js';\nimport { styles } from './themes/tile-manager.base.css.js';\nimport IgcTileComponent from './tile.js';\n\n/* blazorAdditionalDependency: IgcTileComponent */\n/**\n * The tile manager component enables the dynamic arrangement, resizing, and interaction of tiles.\n *\n * @element igc-tile-manager\n *\n * @slot - Default slot for the tile manager. Only `igc-tile` elements will be projected inside the CSS grid container.\n *\n * @csspart base - The tile manager CSS Grid container.\n *\n * @cssproperty --column-count - The number of columns for the tile manager. The `column-count` attribute sets this variable.\n * @cssproperty --min-col-width - The minimum size of the columns in the tile-manager. The `min-column-width` attribute sets this variable.\n * @cssproperty --min-row-height - The minimum size of the rows in the tile-manager. The `min-row-height` attribute sets this variable.\n * @cssproperty --grid-gap - The gap size of the underlying CSS grid container. The `gap` attributes sts this variable.\n *\n */\n@shadowOptions({ slotAssignment: 'manual' })\nexport default class IgcTileManagerComponent extends LitElement {\n public static readonly tagName = 'igc-tile-manager';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcTileManagerComponent, IgcTileComponent);\n }\n\n // #region Internal state\n\n private _internalStyles: StyleInfo = {};\n private _dragMode: TileManagerDragMode = 'none';\n private _resizeMode: TileManagerResizeMode = 'none';\n private _columnCount = 0;\n private _gap?: string;\n private _minColWidth?: string;\n private _minRowHeight?: string;\n\n private _serializer = createSerializer(this);\n private _tilesState = createTilesState(this);\n\n private _grid = createRef<HTMLElement>();\n\n // #endregion\n\n // #region Context helpers\n\n private _context = new ContextProvider(this, {\n context: tileManagerContext,\n initialValue: this._createContext(),\n });\n\n private _createContext(): TileManagerContext {\n return {\n instance: this,\n grid: this._grid,\n };\n }\n\n private _setManagerContext(): void {\n this._context.setValue(this._createContext(), true);\n }\n\n // #endregion\n\n // #region Properties and Attributes\n\n /**\n * Whether resize operations are enabled.\n *\n * @attr resize-mode\n * @default none\n */\n @property({ attribute: 'resize-mode' })\n public set resizeMode(value: TileManagerResizeMode) {\n this._resizeMode = value;\n this._setManagerContext();\n }\n\n public get resizeMode(): TileManagerResizeMode {\n return this._resizeMode;\n }\n\n /**\n * Whether drag and drop operations are enabled.\n *\n * @attr drag-mode\n * @default none\n */\n @property({ attribute: 'drag-mode' })\n public set dragMode(value: TileManagerDragMode) {\n this._dragMode = value;\n this._setManagerContext();\n }\n\n public get dragMode(): TileManagerDragMode {\n return this._dragMode;\n }\n\n /**\n * Sets the number of columns for the tile manager.\n * Setting value <= than zero will trigger a responsive layout.\n *\n * @attr column-count\n * @default 0\n */\n @property({ type: Number, attribute: 'column-count' })\n public set columnCount(value: number) {\n this._columnCount = Math.max(0, asNumber(value));\n Object.assign(this._internalStyles, {\n '--column-count': this._columnCount || undefined,\n });\n }\n\n public get columnCount(): number {\n return this._columnCount;\n }\n\n /**\n * Sets the minimum width for a column unit in the tile manager.\n * @attr min-column-width\n */\n @property({ attribute: 'min-column-width' })\n public set minColumnWidth(value: string | undefined) {\n this._minColWidth = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--min-col-width': this._minColWidth,\n });\n }\n\n public get minColumnWidth(): string | undefined {\n return this._minColWidth;\n }\n\n /**\n * Sets the minimum height for a row unit in the tile manager.\n * @attr min-row-height\n */\n @property({ attribute: 'min-row-height' })\n public set minRowHeight(value: string | undefined) {\n this._minRowHeight = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--min-row-height': this._minRowHeight,\n });\n }\n\n public get minRowHeight(): string | undefined {\n return this._minRowHeight;\n }\n\n /**\n * Sets the gap size between tiles in the tile manager.\n *\n * @attr gap\n */\n @property()\n public set gap(value: string | undefined) {\n this._gap = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--grid-gap': this._gap,\n });\n }\n\n public get gap(): string | undefined {\n return this._gap;\n }\n\n /**\n * Gets the tiles sorted by their position in the layout.\n * @property\n */\n public get tiles() {\n return this._tilesState.tiles;\n }\n\n // #endregion\n\n // #region Internal API\n\n constructor() {\n super();\n\n addThemingController(this, all);\n\n createMutationController(this, {\n callback: this._observerCallback,\n filter: [IgcTileComponent.tagName],\n config: {\n childList: true,\n },\n });\n }\n\n protected override updated() {\n this._tilesState.adjustTileGridPosition();\n }\n\n protected override firstUpdated() {\n this._tilesState.assignPositions();\n this._tilesState.assignTiles();\n this._setManagerContext();\n }\n\n private _observerCallback({\n changes: { added, removed },\n }: MutationControllerParams<IgcTileComponent>) {\n const ownAdded = added.filter(\n ({ target }) => target.closest(this.tagName) === this\n );\n const ownRemoved = removed.filter(\n ({ target }) => target.closest(this.tagName) === this\n );\n\n for (const remove of ownRemoved) {\n this._tilesState.remove(remove.node);\n }\n\n for (const added of ownAdded) {\n this._tilesState.add(added.node);\n }\n\n this._tilesState.assignTiles();\n }\n\n // #endregion\n\n // #region Public API\n\n /**\n * Returns the properties of the current tile collections as a JSON payload.\n *\n * @remarks\n * The content of the tiles is not serialized or saved. Only tile properties\n * are serialized.\n */\n public saveLayout(): string {\n return this._serializer.saveAsJSON();\n }\n\n /**\n * Restores a previously serialized state produced by `saveLayout`.\n */\n public loadLayout(data: string): void {\n this._serializer.loadFromJSON(data);\n }\n\n // #endregion\n\n // #region Rendering\n\n protected override render() {\n const parts = {\n base: true,\n 'maximized-tile': this.tiles.some((tile) => tile.maximized),\n };\n\n return html`\n <div\n ${ref(this._grid)}\n style=${styleMap(this._internalStyles)}\n part=${partMap(parts)}\n >\n <slot></slot>\n </div>\n `;\n }\n\n // #endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-tile-manager': IgcTileManagerComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tile-manager.js","sourceRoot":"","sources":["../../../src/components/tile-manager/tile-manager.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAkB,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEL,kBAAkB,GACn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vB,CAAC;IAaM,UAAU;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;IACvC,CAAC;IAKM,UAAU,CAAC,IAAY;QAC5B,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAMkB,MAAM;QACvB,MAAM,KAAK,GAAG;YACZ,IAAI,EAAE,IAAI;YACV,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;SAC5D,CAAC;QAEF,OAAO,IAAI,CAAA;;UAEL,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;gBACT,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;eAC/B,OAAO,CAAC,KAAK,CAAC;;;;KAIxB,CAAC;IACJ,CAAC;;AAzND;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;yDAItC;AAaD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;uDAIpC;AAcD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;0DAMrD;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;6DAM3C;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;2DAMzC;AAYD;IADC,QAAQ,EAAE;kDAMV;AA/IkB,uBAAuB;IAD3C,aAAa,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;GACvB,uBAAuB,CAoR3C;eApRoB,uBAAuB","sourcesContent":["import { ContextProvider } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { type StyleInfo, styleMap } from 'lit/directives/style-map.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport {\n type TileManagerContext,\n tileManagerContext,\n} from '../common/context.js';\nimport {\n createMutationController,\n type MutationControllerParams,\n} from '../common/controllers/mutation-observer.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport { asNumber } from '../common/util.js';\nimport type { TileManagerDragMode, TileManagerResizeMode } from '../types.js';\nimport { createTilesState } from './position.js';\nimport { createSerializer } from './serializer.js';\nimport { all } from './themes/container.js';\nimport { styles as shared } from './themes/shared/tile-manager.common.css.js';\nimport { styles } from './themes/tile-manager.base.css.js';\nimport IgcTileComponent from './tile.js';\n\n/* blazorAdditionalDependency: IgcTileComponent */\n/**\n * The tile manager component enables the dynamic arrangement, resizing, and interaction of tiles.\n *\n * @element igc-tile-manager\n *\n * @slot - Default slot for the tile manager. Only `igc-tile` elements will be projected inside the CSS grid container.\n *\n * @csspart base - The tile manager CSS Grid container.\n *\n * @cssproperty --column-count - The number of columns for the tile manager. The `column-count` attribute sets this variable.\n * @cssproperty --min-col-width - The minimum size of the columns in the tile-manager. The `min-column-width` attribute sets this variable.\n * @cssproperty --min-row-height - The minimum size of the rows in the tile-manager. The `min-row-height` attribute sets this variable.\n * @cssproperty --grid-gap - The gap size of the underlying CSS grid container. The `gap` attributes sts this variable.\n *\n */\n@shadowOptions({ slotAssignment: 'manual' })\nexport default class IgcTileManagerComponent extends LitElement {\n public static readonly tagName = 'igc-tile-manager';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcTileManagerComponent, IgcTileComponent);\n }\n\n // #region Internal state\n\n private _internalStyles: StyleInfo = {};\n private _dragMode: TileManagerDragMode = 'none';\n private _resizeMode: TileManagerResizeMode = 'none';\n private _columnCount = 0;\n private _gap?: string;\n private _minColWidth?: string;\n private _minRowHeight?: string;\n\n private _serializer = createSerializer(this);\n private _tilesState = createTilesState(this);\n\n private _grid = createRef<HTMLElement>();\n\n // #endregion\n\n // #region Context helpers\n\n private _context = new ContextProvider(this, {\n context: tileManagerContext,\n initialValue: this._createContext(),\n });\n\n private _createContext(): TileManagerContext {\n return {\n instance: this,\n grid: this._grid,\n setMaximizedState: () => this._setMaximizedState(),\n };\n }\n\n private _setManagerContext(): void {\n this._context.setValue(this._createContext(), true);\n }\n\n // #endregion\n\n // #region Properties and Attributes\n\n /**\n * Whether resize operations are enabled.\n *\n * @attr resize-mode\n * @default none\n */\n @property({ attribute: 'resize-mode' })\n public set resizeMode(value: TileManagerResizeMode) {\n this._resizeMode = value;\n this._setManagerContext();\n }\n\n public get resizeMode(): TileManagerResizeMode {\n return this._resizeMode;\n }\n\n /**\n * Whether drag and drop operations are enabled.\n *\n * @attr drag-mode\n * @default none\n */\n @property({ attribute: 'drag-mode' })\n public set dragMode(value: TileManagerDragMode) {\n this._dragMode = value;\n this._setManagerContext();\n }\n\n public get dragMode(): TileManagerDragMode {\n return this._dragMode;\n }\n\n /**\n * Sets the number of columns for the tile manager.\n * Setting value <= than zero will trigger a responsive layout.\n *\n * @attr column-count\n * @default 0\n */\n @property({ type: Number, attribute: 'column-count' })\n public set columnCount(value: number) {\n this._columnCount = Math.max(0, asNumber(value));\n Object.assign(this._internalStyles, {\n '--column-count': this._columnCount || undefined,\n });\n }\n\n public get columnCount(): number {\n return this._columnCount;\n }\n\n /**\n * Sets the minimum width for a column unit in the tile manager.\n * @attr min-column-width\n */\n @property({ attribute: 'min-column-width' })\n public set minColumnWidth(value: string | undefined) {\n this._minColWidth = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--min-col-width': this._minColWidth,\n });\n }\n\n public get minColumnWidth(): string | undefined {\n return this._minColWidth;\n }\n\n /**\n * Sets the minimum height for a row unit in the tile manager.\n * @attr min-row-height\n */\n @property({ attribute: 'min-row-height' })\n public set minRowHeight(value: string | undefined) {\n this._minRowHeight = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--min-row-height': this._minRowHeight,\n });\n }\n\n public get minRowHeight(): string | undefined {\n return this._minRowHeight;\n }\n\n /**\n * Sets the gap size between tiles in the tile manager.\n *\n * @attr gap\n */\n @property()\n public set gap(value: string | undefined) {\n this._gap = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--grid-gap': this._gap,\n });\n }\n\n public get gap(): string | undefined {\n return this._gap;\n }\n\n /**\n * Gets the tiles sorted by their position in the layout.\n * @property\n */\n public get tiles() {\n return this._tilesState.tiles;\n }\n\n // #endregion\n\n // #region Internal API\n\n constructor() {\n super();\n\n addThemingController(this, all);\n\n createMutationController(this, {\n callback: this._observerCallback,\n filter: [IgcTileComponent.tagName],\n config: {\n childList: true,\n },\n });\n }\n\n protected override updated() {\n this._tilesState.adjustTileGridPosition();\n }\n\n protected override firstUpdated() {\n this._tilesState.assignPositions();\n this._tilesState.assignTiles();\n this._setManagerContext();\n }\n\n private _observerCallback({\n changes: { added, removed },\n }: MutationControllerParams<IgcTileComponent>) {\n const ownAdded = added.filter(\n ({ target }) => target.closest(this.tagName) === this\n );\n const ownRemoved = removed.filter(\n ({ target }) => target.closest(this.tagName) === this\n );\n\n for (const remove of ownRemoved) {\n this._tilesState.remove(remove.node);\n }\n\n for (const added of ownAdded) {\n this._tilesState.add(added.node);\n }\n\n this._tilesState.assignTiles();\n }\n\n /**\n * Locks/unlocks the grid container height in response to a tile's maximized state changing.\n *\n * @remarks\n * Maximizing a tile removes it from the grid flow (absolute positioning), so it no longer\n * contributes to the grid's intrinsic height. When that tile is the sole contributor to the\n * tallest row track, the container would otherwise collapse to the remaining tiles and cut off\n * the maximized tile's content. Capturing the current height before the layout change keeps the\n * container stable, and it is released once no tile remains maximized.\n */\n private _setMaximizedState(): void {\n const grid = this._grid.value;\n\n if (grid) {\n if (this.tiles.some((tile) => tile.maximized)) {\n if (!grid.style.minHeight) {\n grid.style.minHeight = `${grid.offsetHeight}px`;\n }\n } else {\n grid.style.minHeight = '';\n }\n }\n\n this.requestUpdate();\n }\n\n // #endregion\n\n // #region Public API\n\n /**\n * Returns the properties of the current tile collections as a JSON payload.\n *\n * @remarks\n * The content of the tiles is not serialized or saved. Only tile properties\n * are serialized.\n */\n public saveLayout(): string {\n return this._serializer.saveAsJSON();\n }\n\n /**\n * Restores a previously serialized state produced by `saveLayout`.\n */\n public loadLayout(data: string): void {\n this._serializer.loadFromJSON(data);\n }\n\n // #endregion\n\n // #region Rendering\n\n protected override render() {\n const parts = {\n base: true,\n 'maximized-tile': this.tiles.some((tile) => tile.maximized),\n };\n\n return html`\n <div\n ${ref(this._grid)}\n style=${styleMap(this._internalStyles)}\n part=${partMap(parts)}\n >\n <slot></slot>\n </div>\n `;\n }\n\n // #endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-tile-manager': IgcTileManagerComponent;\n }\n}\n"]}
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, nothing } from 'lit';
|
|
8
8
|
import { property, query, state } from 'lit/decorators.js';
|
|
9
9
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
10
|
-
import { startViewTransition } from '../../animations/
|
|
10
|
+
import { setTransitionName, startViewTransition, } from '../../animations/view-transition.js';
|
|
11
11
|
import { addThemingController } from '../../theming/theming-controller.js';
|
|
12
12
|
import IgcIconButtonComponent from '../button/icon-button.js';
|
|
13
13
|
import { tileManagerContext, } from '../common/context.js';
|
|
@@ -87,7 +87,7 @@ export default class IgcTileComponent extends EventEmitterMixin(LitElement) {
|
|
|
87
87
|
set maximized(value) {
|
|
88
88
|
this._maximized = value;
|
|
89
89
|
if (this._tileManagerCtx) {
|
|
90
|
-
this._tileManagerCtx.
|
|
90
|
+
this._tileManagerCtx.setMaximizedState();
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
get maximized() {
|
|
@@ -145,8 +145,9 @@ export default class IgcTileComponent extends EventEmitterMixin(LitElement) {
|
|
|
145
145
|
connectedCallback() {
|
|
146
146
|
super.connectedCallback();
|
|
147
147
|
this.id = this.id || `tile-${nextId++}`;
|
|
148
|
-
this.style.viewTransitionName
|
|
149
|
-
this
|
|
148
|
+
if (!this.style.viewTransitionName) {
|
|
149
|
+
setTransitionName(this, `tile-transition-${this.id}`);
|
|
150
|
+
}
|
|
150
151
|
}
|
|
151
152
|
_setDragState(state = true) {
|
|
152
153
|
this._isDragging = state;
|
|
@@ -255,7 +256,7 @@ export default class IgcTileComponent extends EventEmitterMixin(LitElement) {
|
|
|
255
256
|
await startViewTransition(() => {
|
|
256
257
|
this.colSpan = colSpan;
|
|
257
258
|
this.rowSpan = rowSpan;
|
|
258
|
-
}).
|
|
259
|
+
}).updateCallbackDone;
|
|
259
260
|
this._setResizeState(false);
|
|
260
261
|
this.emitEvent('igcTileResizeEnd', { detail: this });
|
|
261
262
|
};
|
|
@@ -274,7 +275,7 @@ export default class IgcTileComponent extends EventEmitterMixin(LitElement) {
|
|
|
274
275
|
this.style.zIndex = '1';
|
|
275
276
|
await startViewTransition(() => {
|
|
276
277
|
this.maximized = !this.maximized;
|
|
277
|
-
}).
|
|
278
|
+
}).finished;
|
|
278
279
|
this.style.zIndex = '';
|
|
279
280
|
}
|
|
280
281
|
_emitFullScreenEvent(state) {
|
|
@@ -340,17 +341,17 @@ export default class IgcTileComponent extends EventEmitterMixin(LitElement) {
|
|
|
340
341
|
<section id="tile-actions" part="actions">
|
|
341
342
|
${hasMaximizeSlot
|
|
342
343
|
? html `
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
344
|
+
<slot name="maximize-action">
|
|
345
|
+
${this._renderDefaultAction('maximize')}
|
|
346
|
+
</slot>
|
|
347
|
+
`
|
|
347
348
|
: nothing}
|
|
348
349
|
${hasFullscreenSlot
|
|
349
350
|
? html `
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
351
|
+
<slot name="fullscreen-action">
|
|
352
|
+
${this._renderDefaultAction('fullscreen')}
|
|
353
|
+
</slot>
|
|
354
|
+
`
|
|
354
355
|
: nothing}
|
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,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;gDAOlD;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;gDAOlD;AAqBD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAO1C;AAcM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;uDAC3C;AAUtB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;2DAC3C;AAU1B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;yDAC3C;AAS/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAI1B","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { startViewTransition } from '../../animations/player.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport IgcIconButtonComponent from '../button/icon-button.js';\nimport {\n type TileManagerContext,\n tileManagerContext,\n} from '../common/context.js';\nimport { createAsyncContext } from '../common/controllers/async-consumer.js';\nimport {\n addDragController,\n type DragCallbackParameters,\n} from '../common/controllers/drag.js';\nimport { addFullscreenController } from '../common/controllers/fullscreen.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.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 { partMap } from '../common/part-map.js';\nimport { asNumber, getElementFromPath, isLTR } from '../common/util.js';\nimport IgcDividerComponent from '../divider/divider.js';\nimport IgcResizeContainerComponent from '../resize-container/resize-container.js';\nimport type { ResizeCallbackParams } from '../resize-container/types.js';\nimport type { TileManagerResizeMode } from '../types.js';\nimport { createTileDragStack, swapTiles } from './position.js';\nimport { createTileResizeState } from './resize-state.js';\nimport { styles as shared } from './themes/shared/tile/tile.common.css.js';\nimport { styles } from './themes/tile.base.css.js';\nimport { all } from './themes/tile.js';\nimport { createTileDragGhost, createTileGhost } from './tile-ghost-util.js';\nimport type IgcTileManagerComponent from './tile-manager.js';\n\nexport interface IgcTileChangeStateEventArgs {\n tile: IgcTileComponent;\n state: boolean;\n}\n\ntype AdornerType = 'side' | 'corner' | 'bottom';\n\nexport interface IgcTileComponentEventMap {\n igcTileFullscreen: CustomEvent<IgcTileChangeStateEventArgs>;\n igcTileMaximize: CustomEvent<IgcTileChangeStateEventArgs>;\n igcTileDragStart: CustomEvent<IgcTileComponent>;\n igcTileDragEnd: CustomEvent<IgcTileComponent>;\n igcTileDragCancel: CustomEvent<IgcTileComponent>;\n igcTileResizeStart: CustomEvent<IgcTileComponent>;\n igcTileResizeEnd: CustomEvent<IgcTileComponent>;\n igcTileResizeCancel: CustomEvent<IgcTileComponent>;\n}\n\nlet nextId = 1;\nconst Slots = setSlots(\n 'title',\n 'maximize-action',\n 'fullscreen-action',\n 'actions',\n 'side-adorner',\n 'corner-adorner',\n 'bottom-adorner'\n);\n\n/**\n * The tile component is used within the `igc-tile-manager` as a container\n * for displaying various types of information.\n *\n * @element igc-tile\n *\n * @fires igcTileFullscreen - Fired when tile the fullscreen state changes.\n * @fires igcTileMaximize - Fired when tile the maximize state changes.\n * @fires igcTileDragStart - Fired when a drag operation on a tile is about to begin. Cancelable.\n * @fires igcTileDragEnd - Fired when a drag operation with a tile is successfully completed.\n * @fires igcTileDragCancel - Fired when a tile drag operation is canceled by the user.\n * @fires igcTileResizeStart - Fired when a resize operation on a tile is about to begin. Cancelable.\n * @fires igcTileResizeEnd - Fired when a resize operation on a tile is successfully completed.\n * @fires igcTileResizeCancel - Fired when a resize operation on a tile is canceled by the user.\n *\n * @slot - Default slot for the tile's content.\n * @slot title - Renders the title of the tile header.\n * @slot maximize-action - Renders the maximize action element of the tile header.\n * @slot fullscreen-action - Renders the fullscreen action element of the tile header.\n * @slot actions - Renders items after the default actions in the tile header.\n * @slot side-adorner - Renders the side resize handle of the tile.\n * @slot corner-adorner - Renders the corner resize handle of the tile.\n * @slot bottom-adorner - Renders the bottom resize handle of the tile.\n *\n * @csspart base - The wrapper for the entire tile content, header and content.\n * @csspart header - The container for the tile header, including title and actions.\n * @csspart title - The title container of the tile.\n * @csspart actions - The actions container of the tile header.\n * @csspart content-container - The container wrapping the tile’s main content.\n * @csspart trigger-side - The part for the side adorner of the encapsulated resize element in the tile.\n * @csspart trigger - The part for the corner adorner of the encapsulated resize element in the tile.\n * @csspart trigger-bottom - The part for the bottom adorner of the encapsulated resize element in the tile.\n */\nexport default class IgcTileComponent extends EventEmitterMixin<\n IgcTileComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-tile';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcTileComponent,\n IgcIconButtonComponent,\n IgcDividerComponent,\n IgcResizeContainerComponent\n );\n }\n\n private readonly _slots = addSlotController(this, { slots: Slots });\n\n private readonly _dragController = addDragController(this, {\n skip: this._skipDrag,\n matchTarget: this._match,\n ghost: this._createDragGhost,\n start: this._handleDragStart,\n over: this._handleDragOver,\n end: this._handleDragEnd,\n cancel: this._handleDragCancel,\n });\n\n private readonly _fullscreenController = addFullscreenController(this, {\n enter: this._emitFullScreenEvent,\n exit: this._emitFullScreenEvent,\n });\n\n private readonly _resizeState = createTileResizeState();\n private readonly _dragStack = createTileDragStack();\n\n private _colSpan = 1;\n private _rowSpan = 1;\n private _colStart: number | null = null;\n private _rowStart: number | null = null;\n private _position = -1;\n\n // Tile manager context properties and helpers\n\n /**\n * Context consumer callback that sets the updated configuration of the internal drag controller\n * based on the passed tile manager properties.\n */\n private _setDragConfiguration = ({\n instance: { dragMode },\n }: TileManagerContext) => {\n this._dragController.set({\n enabled: dragMode !== 'none',\n trigger:\n dragMode === 'tile-header' ? () => this._headerRef.value! : undefined,\n });\n };\n\n private readonly _context = createAsyncContext(\n this,\n tileManagerContext,\n this._setDragConfiguration\n );\n\n /** Returns the parent tile manager context. */\n private get _tileManagerCtx(): TileManagerContext | undefined {\n return this._context.value;\n }\n\n private get _tileManager(): IgcTileManagerComponent | undefined {\n return this._tileManagerCtx?.instance;\n }\n\n /** Returns the tile manager internal CSS grid container. */\n private get _cssContainer(): HTMLElement | undefined {\n return this._tileManagerCtx?.grid.value;\n }\n\n /** Returns the tile manager current resize mode. */\n private get _resizeMode(): TileManagerResizeMode {\n return this._tileManager?.resizeMode ?? 'none';\n }\n\n protected readonly _headerRef = createRef<HTMLElement>();\n\n @query(IgcResizeContainerComponent.tagName)\n protected readonly _resizeContainer?: IgcResizeContainerComponent;\n\n @query('[part~=\"base\"]', true)\n public _tileContent!: HTMLElement;\n\n @state()\n private _maximized = false;\n\n @state()\n private _isDragging = false;\n\n @state()\n private _isResizing = false;\n\n /** Whether to render the resize container based on tile and tile manager configuration. */\n private get _resizeDisabled(): boolean {\n return (\n this.disableResize ||\n this.maximized ||\n this.fullscreen ||\n this._resizeMode === 'none'\n );\n }\n\n /**\n * The number of columns the tile will span.\n *\n * @remarks\n * When setting a value that is less than 1, it will be\n * coerced to 1.\n *\n * @attr col-span\n * @default 1\n */\n @property({ type: Number, attribute: 'col-span' })\n public set colSpan(value: number) {\n this._colSpan = Math.max(1, asNumber(value));\n this.style.setProperty('--ig-col-span', this._colSpan.toString());\n }\n\n public get colSpan(): number {\n return this._colSpan;\n }\n\n /**\n * The number of rows the tile will span.\n *\n * @remarks\n * When setting a value that is less than 1, it will be\n * coerced to 1.\n *\n * @attr row-span\n * @default 1\n */\n @property({ type: Number, attribute: 'row-span' })\n public set rowSpan(value: number) {\n this._rowSpan = Math.max(1, asNumber(value));\n this.style.setProperty('--ig-row-span', this._rowSpan.toString());\n }\n\n public get rowSpan(): number {\n return this._rowSpan;\n }\n\n /**\n * The starting column for the tile.\n *\n * @attr col-start\n */\n @property({ type: Number, attribute: 'col-start' })\n public set colStart(value: number | null) {\n this._colStart = Math.max(0, asNumber(value)) || null;\n this.style.setProperty(\n '--ig-col-start',\n this._colStart ? this._colStart.toString() : null\n );\n }\n\n public get colStart(): number | null {\n return this._colStart;\n }\n\n /**\n * The starting row for the tile.\n *\n * @attr row-start\n */\n @property({ type: Number, attribute: 'row-start' })\n public set rowStart(value: number | null) {\n this._rowStart = Math.max(0, asNumber(value)) || null;\n this.style.setProperty(\n '--ig-row-start',\n this._rowStart ? this._rowStart.toString() : null\n );\n }\n\n public get rowStart(): number | null {\n return this._rowStart;\n }\n\n /**\n * Indicates whether the tile occupies the whole screen.\n *\n * @property\n */\n public get fullscreen(): boolean {\n return this._fullscreenController.fullscreen;\n }\n\n /**\n * Indicates whether the tile occupies all available space within the layout.\n *\n * @attr maximized\n */\n @property({ type: Boolean, reflect: true })\n public set maximized(value: boolean) {\n this._maximized = value;\n\n if (this._tileManagerCtx) {\n this._tileManagerCtx.instance.requestUpdate();\n }\n }\n\n public get maximized(): boolean {\n return this._maximized;\n }\n\n /**\n * Indicates whether to disable tile resize behavior regardless\n * ot its tile manager parent settings.\n *\n * @attr disable-resize\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'disable-resize' })\n public disableResize = false;\n\n /**\n * Whether to disable the rendering of the tile `fullscreen-action` slot and its\n * default fullscreen action button.\n *\n * @attr disable-fullscreen\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'disable-fullscreen' })\n public disableFullscreen = false;\n\n /**\n * Whether to disable the rendering of the tile `maximize-action` slot and its\n * default maximize action button.\n *\n * @attr disable-maximize\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'disable-maximize' })\n public disableMaximize = false;\n\n /**\n * Gets/sets the tile's visual position in the layout.\n * Corresponds to the CSS `order` property.\n *\n * @attr position\n */\n @property({ type: Number })\n public set position(value: number) {\n this._position = asNumber(value);\n this.style.order = this._position.toString();\n }\n\n public get position(): number {\n return this._position;\n }\n\n constructor() {\n super();\n addThemingController(this, all);\n }\n\n /** @internal */\n public override connectedCallback(): void {\n super.connectedCallback();\n this.id = this.id || `tile-${nextId++}`;\n\n this.style.viewTransitionName =\n this.style.viewTransitionName || `tile-transition-${this.id}`;\n }\n\n private _setDragState(state = true) {\n this._isDragging = state;\n this._tileContent.style.opacity = state ? '0' : '';\n this.style.pointerEvents = state ? 'none' : '';\n this.part.toggle('dragging', state);\n }\n\n private _handleDragStart() {\n if (!this._emitTileDragStart()) {\n return false;\n }\n\n this._setDragState();\n this._dragStack.push(this);\n return true;\n }\n\n private _handleDragOver({ event, state }: DragCallbackParameters): void {\n const match = state.element as IgcTileComponent;\n\n if (this._dragStack.peek() === match) {\n if (this._shouldSwap(event, state, match)) {\n this._dragStack.pop();\n this._dragStack.push(match);\n this._performSwap(match);\n }\n return;\n }\n\n this._dragStack.push(match);\n this._performSwap(match);\n }\n\n private _handleDragCancel() {\n startViewTransition(() => {\n this._dragStack.restore();\n this._dragStack.reset();\n });\n\n this._dragController.dispose();\n this._setDragState(false);\n this.emitEvent('igcTileDragCancel', { detail: this });\n }\n\n private _handleDragEnd() {\n this._setDragState(false);\n this._dragStack.reset();\n this.emitEvent('igcTileDragEnd', { detail: this });\n }\n\n private _performSwap(match: IgcTileComponent): void {\n startViewTransition(() => swapTiles(this, match));\n }\n\n private _shouldSwap(\n { clientX, clientY }: PointerEvent,\n state: DragCallbackParameters['state'],\n match: IgcTileComponent\n ): boolean {\n const LTR = isLTR(this);\n const direction = state.pointerState.direction;\n\n const { left, top, width, height } = match.getBoundingClientRect();\n const relativeX = (clientX - left) / width;\n const relativeY = (clientY - top) / height;\n\n switch (direction) {\n case 'start':\n return (\n this.position > match.position &&\n (LTR ? relativeX <= 0.25 : relativeX >= 0.75)\n );\n case 'end':\n return (\n this.position < match.position &&\n (LTR ? relativeX >= 0.75 : relativeX <= 0.25)\n );\n case 'top':\n return this.position > match.position && relativeY <= 0.25;\n case 'bottom':\n return this.position < match.position && relativeY >= 0.75;\n default:\n return false;\n }\n }\n\n private _skipDrag(event: PointerEvent): boolean {\n if (this._maximized || this.fullscreen) {\n return true;\n }\n\n return Boolean(\n getElementFromPath(\n (e) => e.matches('[part*=trigger]') || e.matches('#tile-actions'),\n event\n )\n );\n }\n\n private _match(element: Element): element is IgcTileComponent {\n return element !== this && IgcTileComponent.tagName === element.localName;\n }\n\n private _createDragGhost(): IgcTileComponent {\n return createTileDragGhost(this);\n }\n\n private _createResizeGhost = (): HTMLElement => {\n return createTileGhost(this);\n };\n\n private _setResizeState(state = true) {\n this._isResizing = state;\n this.style.zIndex = state ? '1' : '';\n this.part.toggle('resizing', state);\n }\n\n private _handleResizeStart(event: CustomEvent<ResizeCallbackParams>) {\n if (!this._emitTileResizeStart()) {\n event.preventDefault();\n return;\n }\n\n this._resizeState.updateState(\n event.detail.state.initial,\n this,\n this._cssContainer!\n );\n this._setResizeState();\n }\n\n private _handleResize({\n detail: { state },\n }: CustomEvent<ResizeCallbackParams>) {\n const trigger = state.trigger!;\n\n const isWidthResize = trigger.matches('[part*=\"side\"], [part=\"trigger\"]');\n const isHeightResize = trigger.matches(\n '[part*=\"bottom\"], [part=\"trigger\"]'\n );\n\n if (isWidthResize) {\n state.current.width = this._resizeState.calculateSnappedWidth(state);\n }\n\n if (isHeightResize) {\n state.current.height = this._resizeState.calculateSnappedHeight(state);\n }\n }\n\n private _handleResizeEnd({\n detail: { state },\n }: CustomEvent<ResizeCallbackParams>) {\n const { colSpan, rowSpan } = this._resizeState.calculateResizedGridPosition(\n state.current\n );\n\n state.commit = async () => {\n await startViewTransition(() => {\n this.colSpan = colSpan;\n this.rowSpan = rowSpan;\n }).transition?.updateCallbackDone;\n\n this._setResizeState(false);\n this.emitEvent('igcTileResizeEnd', { detail: this });\n };\n }\n\n private _handleResizeCancel() {\n this._setResizeState(false);\n this.emitEvent('igcTileResizeCancel', { detail: this });\n }\n\n private _handleFullscreen() {\n this._fullscreenController.setState(!this.fullscreen);\n }\n\n private async _handleMaximize() {\n if (!this._emitMaximizedEvent()) {\n return;\n }\n\n this.style.zIndex = '1';\n\n await startViewTransition(() => {\n this.maximized = !this.maximized;\n }).transition?.finished;\n\n this.style.zIndex = '';\n }\n\n private _emitFullScreenEvent(state: boolean) {\n this.requestUpdate();\n\n return this.emitEvent('igcTileFullscreen', {\n detail: { tile: this, state },\n cancelable: true,\n });\n }\n\n private _emitMaximizedEvent() {\n return this.emitEvent('igcTileMaximize', {\n detail: { tile: this, state: !this.maximized },\n cancelable: true,\n });\n }\n\n private _emitTileDragStart() {\n return this.emitEvent('igcTileDragStart', {\n detail: this,\n cancelable: true,\n });\n }\n\n private _emitTileResizeStart() {\n return this.emitEvent('igcTileResizeStart', {\n detail: this,\n cancelable: true,\n });\n }\n\n protected _renderDefaultAction(type: 'maximize' | 'fullscreen') {\n const [icon, listener] =\n type === 'fullscreen'\n ? [\n this.fullscreen ? 'fullscreen_exit' : 'fullscreen',\n this._handleFullscreen,\n ]\n : [\n this._maximized ? 'collapse_content' : 'expand_content',\n this._handleMaximize,\n ];\n\n return html`\n <igc-icon-button\n variant=\"flat\"\n collection=\"default\"\n exportparts=\"icon\"\n name=${icon}\n aria-label=${icon}\n @click=${listener}\n ></igc-icon-button>\n `;\n }\n\n protected _renderHeader() {\n const hasTitle = this._slots.hasAssignedElements('title');\n const hasActions = this._slots.hasAssignedElements('actions');\n\n const hideHeader =\n !hasTitle &&\n !hasActions &&\n this.disableMaximize &&\n this.disableFullscreen;\n\n const hasMaximizeSlot = !(this.disableMaximize || this.fullscreen);\n const hasFullscreenSlot = !this.disableFullscreen;\n\n return html`\n <section part=\"header\" ?hidden=${hideHeader} ${ref(this._headerRef)}>\n <header part=\"title\">\n <slot name=\"title\"></slot>\n </header>\n <section id=\"tile-actions\" part=\"actions\">\n ${hasMaximizeSlot\n ? html`\n <slot name=\"maximize-action\">\n ${this._renderDefaultAction('maximize')}\n </slot>\n `\n : nothing}\n ${hasFullscreenSlot\n ? html`\n <slot name=\"fullscreen-action\">\n ${this._renderDefaultAction('fullscreen')}\n </slot>\n `\n : nothing}\n\n <slot name=\"actions\"></slot>\n </section>\n </section>\n <igc-divider></igc-divider>\n `;\n }\n\n protected _renderContent() {\n const parts = {\n base: true,\n draggable: this._tileManager?.dragMode !== 'none',\n fullscreen: this.fullscreen,\n dragging: this._isDragging,\n resizable:\n !this.disableResize && this._tileManager?.resizeMode !== 'none',\n resizing: this._isResizing,\n maximized: this.maximized,\n };\n\n return html`\n <div part=${partMap(parts)}>\n ${this._renderHeader()}\n <div part=\"content-container\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n private _renderAdornerSlot(name: AdornerType) {\n return html`<slot name=\"${name}-adorner\" slot=\"${name}-adorner\"></slot>`;\n }\n\n protected override render() {\n const isActive = this._resizeMode === 'always';\n\n return this._resizeDisabled\n ? this._renderContent()\n : html`\n <igc-resize\n part=${partMap({\n resize: true,\n 'side-adorner': this._slots.hasAssignedElements('side-adorner'),\n 'corner-adorner':\n this._slots.hasAssignedElements('corner-adorner'),\n 'bottom-adorner':\n this._slots.hasAssignedElements('bottom-adorner'),\n })}\n exportparts=\"trigger-side, trigger, trigger-bottom\"\n mode=\"deferred\"\n ?active=${isActive}\n .ghostFactory=${this._createResizeGhost}\n @igcResizeStart=${this._handleResizeStart}\n @igcResize=${this._handleResize}\n @igcResizeEnd=${this._handleResizeEnd}\n @igcResizeCancel=${this._handleResizeCancel}\n >\n ${this._renderContent()} ${this._renderAdornerSlot('side')}\n ${this._renderAdornerSlot('corner')}\n ${this._renderAdornerSlot('bottom')}\n </igc-resize>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-tile': IgcTileComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,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AOlD;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;gDAOlD;AAqBD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAO1C;AAcM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;uDAC3C;AAUtB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;2DAC3C;AAU1B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;yDAC3C;AAS/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAI1B","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport {\n setTransitionName,\n startViewTransition,\n} from '../../animations/view-transition.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport IgcIconButtonComponent from '../button/icon-button.js';\nimport {\n type TileManagerContext,\n tileManagerContext,\n} from '../common/context.js';\nimport { createAsyncContext } from '../common/controllers/async-consumer.js';\nimport {\n addDragController,\n type DragCallbackParameters,\n} from '../common/controllers/drag.js';\nimport { addFullscreenController } from '../common/controllers/fullscreen.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.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 { partMap } from '../common/part-map.js';\nimport { asNumber, getElementFromPath, isLTR } from '../common/util.js';\nimport IgcDividerComponent from '../divider/divider.js';\nimport IgcResizeContainerComponent from '../resize-container/resize-container.js';\nimport type { ResizeCallbackParams } from '../resize-container/types.js';\nimport type { TileManagerResizeMode } from '../types.js';\nimport { createTileDragStack, swapTiles } from './position.js';\nimport { createTileResizeState } from './resize-state.js';\nimport { styles as shared } from './themes/shared/tile/tile.common.css.js';\nimport { styles } from './themes/tile.base.css.js';\nimport { all } from './themes/tile.js';\nimport { createTileDragGhost, createTileGhost } from './tile-ghost-util.js';\nimport type IgcTileManagerComponent from './tile-manager.js';\n\nexport interface IgcTileChangeStateEventArgs {\n tile: IgcTileComponent;\n state: boolean;\n}\n\ntype AdornerType = 'side' | 'corner' | 'bottom';\n\nexport interface IgcTileComponentEventMap {\n igcTileFullscreen: CustomEvent<IgcTileChangeStateEventArgs>;\n igcTileMaximize: CustomEvent<IgcTileChangeStateEventArgs>;\n igcTileDragStart: CustomEvent<IgcTileComponent>;\n igcTileDragEnd: CustomEvent<IgcTileComponent>;\n igcTileDragCancel: CustomEvent<IgcTileComponent>;\n igcTileResizeStart: CustomEvent<IgcTileComponent>;\n igcTileResizeEnd: CustomEvent<IgcTileComponent>;\n igcTileResizeCancel: CustomEvent<IgcTileComponent>;\n}\n\nlet nextId = 1;\nconst Slots = setSlots(\n 'title',\n 'maximize-action',\n 'fullscreen-action',\n 'actions',\n 'side-adorner',\n 'corner-adorner',\n 'bottom-adorner'\n);\n\n/**\n * The tile component is used within the `igc-tile-manager` as a container\n * for displaying various types of information.\n *\n * @element igc-tile\n *\n * @fires igcTileFullscreen - Fired when tile the fullscreen state changes.\n * @fires igcTileMaximize - Fired when tile the maximize state changes.\n * @fires igcTileDragStart - Fired when a drag operation on a tile is about to begin. Cancelable.\n * @fires igcTileDragEnd - Fired when a drag operation with a tile is successfully completed.\n * @fires igcTileDragCancel - Fired when a tile drag operation is canceled by the user.\n * @fires igcTileResizeStart - Fired when a resize operation on a tile is about to begin. Cancelable.\n * @fires igcTileResizeEnd - Fired when a resize operation on a tile is successfully completed.\n * @fires igcTileResizeCancel - Fired when a resize operation on a tile is canceled by the user.\n *\n * @slot - Default slot for the tile's content.\n * @slot title - Renders the title of the tile header.\n * @slot maximize-action - Renders the maximize action element of the tile header.\n * @slot fullscreen-action - Renders the fullscreen action element of the tile header.\n * @slot actions - Renders items after the default actions in the tile header.\n * @slot side-adorner - Renders the side resize handle of the tile.\n * @slot corner-adorner - Renders the corner resize handle of the tile.\n * @slot bottom-adorner - Renders the bottom resize handle of the tile.\n *\n * @csspart base - The wrapper for the entire tile content, header and content.\n * @csspart header - The container for the tile header, including title and actions.\n * @csspart title - The title container of the tile.\n * @csspart actions - The actions container of the tile header.\n * @csspart content-container - The container wrapping the tile’s main content.\n * @csspart trigger-side - The part for the side adorner of the encapsulated resize element in the tile.\n * @csspart trigger - The part for the corner adorner of the encapsulated resize element in the tile.\n * @csspart trigger-bottom - The part for the bottom adorner of the encapsulated resize element in the tile.\n */\nexport default class IgcTileComponent extends EventEmitterMixin<\n IgcTileComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-tile';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcTileComponent,\n IgcIconButtonComponent,\n IgcDividerComponent,\n IgcResizeContainerComponent\n );\n }\n\n private readonly _slots = addSlotController(this, { slots: Slots });\n\n private readonly _dragController = addDragController(this, {\n skip: this._skipDrag,\n matchTarget: this._match,\n ghost: this._createDragGhost,\n start: this._handleDragStart,\n over: this._handleDragOver,\n end: this._handleDragEnd,\n cancel: this._handleDragCancel,\n });\n\n private readonly _fullscreenController = addFullscreenController(this, {\n enter: this._emitFullScreenEvent,\n exit: this._emitFullScreenEvent,\n });\n\n private readonly _resizeState = createTileResizeState();\n private readonly _dragStack = createTileDragStack();\n\n private _colSpan = 1;\n private _rowSpan = 1;\n private _colStart: number | null = null;\n private _rowStart: number | null = null;\n private _position = -1;\n\n // Tile manager context properties and helpers\n\n /**\n * Context consumer callback that sets the updated configuration of the internal drag controller\n * based on the passed tile manager properties.\n */\n private _setDragConfiguration = ({\n instance: { dragMode },\n }: TileManagerContext) => {\n this._dragController.set({\n enabled: dragMode !== 'none',\n trigger:\n dragMode === 'tile-header' ? () => this._headerRef.value! : undefined,\n });\n };\n\n private readonly _context = createAsyncContext(\n this,\n tileManagerContext,\n this._setDragConfiguration\n );\n\n /** Returns the parent tile manager context. */\n private get _tileManagerCtx(): TileManagerContext | undefined {\n return this._context.value;\n }\n\n private get _tileManager(): IgcTileManagerComponent | undefined {\n return this._tileManagerCtx?.instance;\n }\n\n /** Returns the tile manager internal CSS grid container. */\n private get _cssContainer(): HTMLElement | undefined {\n return this._tileManagerCtx?.grid.value;\n }\n\n /** Returns the tile manager current resize mode. */\n private get _resizeMode(): TileManagerResizeMode {\n return this._tileManager?.resizeMode ?? 'none';\n }\n\n protected readonly _headerRef = createRef<HTMLElement>();\n\n @query(IgcResizeContainerComponent.tagName)\n protected readonly _resizeContainer?: IgcResizeContainerComponent;\n\n @query('[part~=\"base\"]', true)\n public _tileContent!: HTMLElement;\n\n @state()\n private _maximized = false;\n\n @state()\n private _isDragging = false;\n\n @state()\n private _isResizing = false;\n\n /** Whether to render the resize container based on tile and tile manager configuration. */\n private get _resizeDisabled(): boolean {\n return (\n this.disableResize ||\n this.maximized ||\n this.fullscreen ||\n this._resizeMode === 'none'\n );\n }\n\n /**\n * The number of columns the tile will span.\n *\n * @remarks\n * When setting a value that is less than 1, it will be\n * coerced to 1.\n *\n * @attr col-span\n * @default 1\n */\n @property({ type: Number, attribute: 'col-span' })\n public set colSpan(value: number) {\n this._colSpan = Math.max(1, asNumber(value));\n this.style.setProperty('--ig-col-span', this._colSpan.toString());\n }\n\n public get colSpan(): number {\n return this._colSpan;\n }\n\n /**\n * The number of rows the tile will span.\n *\n * @remarks\n * When setting a value that is less than 1, it will be\n * coerced to 1.\n *\n * @attr row-span\n * @default 1\n */\n @property({ type: Number, attribute: 'row-span' })\n public set rowSpan(value: number) {\n this._rowSpan = Math.max(1, asNumber(value));\n this.style.setProperty('--ig-row-span', this._rowSpan.toString());\n }\n\n public get rowSpan(): number {\n return this._rowSpan;\n }\n\n /**\n * The starting column for the tile.\n *\n * @attr col-start\n */\n @property({ type: Number, attribute: 'col-start' })\n public set colStart(value: number | null) {\n this._colStart = Math.max(0, asNumber(value)) || null;\n this.style.setProperty(\n '--ig-col-start',\n this._colStart ? this._colStart.toString() : null\n );\n }\n\n public get colStart(): number | null {\n return this._colStart;\n }\n\n /**\n * The starting row for the tile.\n *\n * @attr row-start\n */\n @property({ type: Number, attribute: 'row-start' })\n public set rowStart(value: number | null) {\n this._rowStart = Math.max(0, asNumber(value)) || null;\n this.style.setProperty(\n '--ig-row-start',\n this._rowStart ? this._rowStart.toString() : null\n );\n }\n\n public get rowStart(): number | null {\n return this._rowStart;\n }\n\n /**\n * Indicates whether the tile occupies the whole screen.\n *\n * @property\n */\n public get fullscreen(): boolean {\n return this._fullscreenController.fullscreen;\n }\n\n /**\n * Indicates whether the tile occupies all available space within the layout.\n *\n * @attr maximized\n */\n @property({ type: Boolean, reflect: true })\n public set maximized(value: boolean) {\n this._maximized = value;\n\n if (this._tileManagerCtx) {\n this._tileManagerCtx.setMaximizedState();\n }\n }\n\n public get maximized(): boolean {\n return this._maximized;\n }\n\n /**\n * Indicates whether to disable tile resize behavior regardless\n * ot its tile manager parent settings.\n *\n * @attr disable-resize\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'disable-resize' })\n public disableResize = false;\n\n /**\n * Whether to disable the rendering of the tile `fullscreen-action` slot and its\n * default fullscreen action button.\n *\n * @attr disable-fullscreen\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'disable-fullscreen' })\n public disableFullscreen = false;\n\n /**\n * Whether to disable the rendering of the tile `maximize-action` slot and its\n * default maximize action button.\n *\n * @attr disable-maximize\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'disable-maximize' })\n public disableMaximize = false;\n\n /**\n * Gets/sets the tile's visual position in the layout.\n * Corresponds to the CSS `order` property.\n *\n * @attr position\n */\n @property({ type: Number })\n public set position(value: number) {\n this._position = asNumber(value);\n this.style.order = this._position.toString();\n }\n\n public get position(): number {\n return this._position;\n }\n\n constructor() {\n super();\n addThemingController(this, all);\n }\n\n /** @internal */\n public override connectedCallback(): void {\n super.connectedCallback();\n this.id = this.id || `tile-${nextId++}`;\n if (!this.style.viewTransitionName) {\n setTransitionName(this, `tile-transition-${this.id}`);\n }\n }\n\n private _setDragState(state = true) {\n this._isDragging = state;\n this._tileContent.style.opacity = state ? '0' : '';\n this.style.pointerEvents = state ? 'none' : '';\n this.part.toggle('dragging', state);\n }\n\n private _handleDragStart() {\n if (!this._emitTileDragStart()) {\n return false;\n }\n\n this._setDragState();\n this._dragStack.push(this);\n return true;\n }\n\n private _handleDragOver({ event, state }: DragCallbackParameters): void {\n const match = state.element as IgcTileComponent;\n\n if (this._dragStack.peek() === match) {\n if (this._shouldSwap(event, state, match)) {\n this._dragStack.pop();\n this._dragStack.push(match);\n this._performSwap(match);\n }\n return;\n }\n\n this._dragStack.push(match);\n this._performSwap(match);\n }\n\n private _handleDragCancel() {\n startViewTransition(() => {\n this._dragStack.restore();\n this._dragStack.reset();\n });\n\n this._dragController.dispose();\n this._setDragState(false);\n this.emitEvent('igcTileDragCancel', { detail: this });\n }\n\n private _handleDragEnd() {\n this._setDragState(false);\n this._dragStack.reset();\n this.emitEvent('igcTileDragEnd', { detail: this });\n }\n\n private _performSwap(match: IgcTileComponent): void {\n startViewTransition(() => swapTiles(this, match));\n }\n\n private _shouldSwap(\n { clientX, clientY }: PointerEvent,\n state: DragCallbackParameters['state'],\n match: IgcTileComponent\n ): boolean {\n const LTR = isLTR(this);\n const direction = state.pointerState.direction;\n\n const { left, top, width, height } = match.getBoundingClientRect();\n const relativeX = (clientX - left) / width;\n const relativeY = (clientY - top) / height;\n\n switch (direction) {\n case 'start':\n return (\n this.position > match.position &&\n (LTR ? relativeX <= 0.25 : relativeX >= 0.75)\n );\n case 'end':\n return (\n this.position < match.position &&\n (LTR ? relativeX >= 0.75 : relativeX <= 0.25)\n );\n case 'top':\n return this.position > match.position && relativeY <= 0.25;\n case 'bottom':\n return this.position < match.position && relativeY >= 0.75;\n default:\n return false;\n }\n }\n\n private _skipDrag(event: PointerEvent): boolean {\n if (this._maximized || this.fullscreen) {\n return true;\n }\n\n return Boolean(\n getElementFromPath(\n (e) => e.matches('[part*=trigger]') || e.matches('#tile-actions'),\n event\n )\n );\n }\n\n private _match(element: Element): element is IgcTileComponent {\n return element !== this && IgcTileComponent.tagName === element.localName;\n }\n\n private _createDragGhost(): IgcTileComponent {\n return createTileDragGhost(this);\n }\n\n private _createResizeGhost = (): HTMLElement => {\n return createTileGhost(this);\n };\n\n private _setResizeState(state = true) {\n this._isResizing = state;\n this.style.zIndex = state ? '1' : '';\n this.part.toggle('resizing', state);\n }\n\n private _handleResizeStart(event: CustomEvent<ResizeCallbackParams>) {\n if (!this._emitTileResizeStart()) {\n event.preventDefault();\n return;\n }\n\n this._resizeState.updateState(\n event.detail.state.initial,\n this,\n this._cssContainer!\n );\n this._setResizeState();\n }\n\n private _handleResize({\n detail: { state },\n }: CustomEvent<ResizeCallbackParams>) {\n const trigger = state.trigger!;\n\n const isWidthResize = trigger.matches('[part*=\"side\"], [part=\"trigger\"]');\n const isHeightResize = trigger.matches(\n '[part*=\"bottom\"], [part=\"trigger\"]'\n );\n\n if (isWidthResize) {\n state.current.width = this._resizeState.calculateSnappedWidth(state);\n }\n\n if (isHeightResize) {\n state.current.height = this._resizeState.calculateSnappedHeight(state);\n }\n }\n\n private _handleResizeEnd({\n detail: { state },\n }: CustomEvent<ResizeCallbackParams>) {\n const { colSpan, rowSpan } = this._resizeState.calculateResizedGridPosition(\n state.current\n );\n\n state.commit = async () => {\n await startViewTransition(() => {\n this.colSpan = colSpan;\n this.rowSpan = rowSpan;\n }).updateCallbackDone;\n\n this._setResizeState(false);\n this.emitEvent('igcTileResizeEnd', { detail: this });\n };\n }\n\n private _handleResizeCancel() {\n this._setResizeState(false);\n this.emitEvent('igcTileResizeCancel', { detail: this });\n }\n\n private _handleFullscreen() {\n this._fullscreenController.setState(!this.fullscreen);\n }\n\n private async _handleMaximize() {\n if (!this._emitMaximizedEvent()) {\n return;\n }\n\n this.style.zIndex = '1';\n\n await startViewTransition(() => {\n this.maximized = !this.maximized;\n }).finished;\n\n this.style.zIndex = '';\n }\n\n private _emitFullScreenEvent(state: boolean) {\n this.requestUpdate();\n\n return this.emitEvent('igcTileFullscreen', {\n detail: { tile: this, state },\n cancelable: true,\n });\n }\n\n private _emitMaximizedEvent() {\n return this.emitEvent('igcTileMaximize', {\n detail: { tile: this, state: !this.maximized },\n cancelable: true,\n });\n }\n\n private _emitTileDragStart() {\n return this.emitEvent('igcTileDragStart', {\n detail: this,\n cancelable: true,\n });\n }\n\n private _emitTileResizeStart() {\n return this.emitEvent('igcTileResizeStart', {\n detail: this,\n cancelable: true,\n });\n }\n\n protected _renderDefaultAction(type: 'maximize' | 'fullscreen') {\n const [icon, listener] =\n type === 'fullscreen'\n ? [\n this.fullscreen ? 'fullscreen_exit' : 'fullscreen',\n this._handleFullscreen,\n ]\n : [\n this._maximized ? 'collapse_content' : 'expand_content',\n this._handleMaximize,\n ];\n\n return html`\n <igc-icon-button\n variant=\"flat\"\n collection=\"default\"\n exportparts=\"icon\"\n name=${icon}\n aria-label=${icon}\n @click=${listener}\n ></igc-icon-button>\n `;\n }\n\n protected _renderHeader() {\n const hasTitle = this._slots.hasAssignedElements('title');\n const hasActions = this._slots.hasAssignedElements('actions');\n\n const hideHeader =\n !hasTitle &&\n !hasActions &&\n this.disableMaximize &&\n this.disableFullscreen;\n\n const hasMaximizeSlot = !(this.disableMaximize || this.fullscreen);\n const hasFullscreenSlot = !this.disableFullscreen;\n\n return html`\n <section part=\"header\" ?hidden=${hideHeader} ${ref(this._headerRef)}>\n <header part=\"title\">\n <slot name=\"title\"></slot>\n </header>\n <section id=\"tile-actions\" part=\"actions\">\n ${\n hasMaximizeSlot\n ? html`\n <slot name=\"maximize-action\">\n ${this._renderDefaultAction('maximize')}\n </slot>\n `\n : nothing\n }\n ${\n hasFullscreenSlot\n ? html`\n <slot name=\"fullscreen-action\">\n ${this._renderDefaultAction('fullscreen')}\n </slot>\n `\n : nothing\n }\n\n <slot name=\"actions\"></slot>\n </section>\n </section>\n <igc-divider></igc-divider>\n `;\n }\n\n protected _renderContent() {\n const parts = {\n base: true,\n draggable: this._tileManager?.dragMode !== 'none',\n fullscreen: this.fullscreen,\n dragging: this._isDragging,\n resizable:\n !this.disableResize && this._tileManager?.resizeMode !== 'none',\n resizing: this._isResizing,\n maximized: this.maximized,\n };\n\n return html`\n <div part=${partMap(parts)}>\n ${this._renderHeader()}\n <div part=\"content-container\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n private _renderAdornerSlot(name: AdornerType) {\n return html`<slot name=\"${name}-adorner\" slot=\"${name}-adorner\"></slot>`;\n }\n\n protected override render() {\n const isActive = this._resizeMode === 'always';\n\n return this._resizeDisabled\n ? this._renderContent()\n : html`\n <igc-resize\n part=${partMap({\n resize: true,\n 'side-adorner': this._slots.hasAssignedElements('side-adorner'),\n 'corner-adorner':\n this._slots.hasAssignedElements('corner-adorner'),\n 'bottom-adorner':\n this._slots.hasAssignedElements('bottom-adorner'),\n })}\n exportparts=\"trigger-side, trigger, trigger-bottom\"\n mode=\"deferred\"\n ?active=${isActive}\n .ghostFactory=${this._createResizeGhost}\n @igcResizeStart=${this._handleResizeStart}\n @igcResize=${this._handleResize}\n @igcResizeEnd=${this._handleResizeEnd}\n @igcResizeCancel=${this._handleResizeCancel}\n >\n ${this._renderContent()} ${this._renderAdornerSlot('side')}\n ${this._renderAdornerSlot('corner')}\n ${this._renderAdornerSlot('bottom')}\n </igc-resize>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-tile': IgcTileComponent;\n }\n}\n"]}
|
|
@@ -234,14 +234,14 @@ export default class IgcTooltipComponent extends EventEmitterMixin(LitElement) {
|
|
|
234
234
|
<slot>${this.message}</slot>
|
|
235
235
|
${this.sticky
|
|
236
236
|
? html `
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
237
|
+
<slot name="close-button" @click=${this._setAutoHide}>
|
|
238
|
+
<igc-icon
|
|
239
|
+
name="input_clear"
|
|
240
|
+
collection="default"
|
|
241
|
+
aria-hidden="true"
|
|
242
|
+
></igc-icon>
|
|
243
|
+
</slot>
|
|
244
|
+
`
|
|
245
245
|
: nothing}
|
|
246
246
|
${this.withArrow ? html `<div id="arrow"></div>` : nothing}
|
|
247
247
|
</div>
|