@ember-eui/core 13.0.4 → 13.0.5
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/declarations/components/eui-call-out.d.ts +1 -0
- package/declarations/components/eui-call-out.d.ts.map +1 -1
- package/declarations/components/eui-file-picker.d.ts.map +1 -1
- package/declarations/components/eui-stat.d.ts +2 -2
- package/declarations/components/eui-stat.d.ts.map +1 -1
- package/declarations/modifiers/resize-observer.d.ts.map +1 -1
- package/dist/components/eui-call-out.js +1 -1
- package/dist/components/eui-call-out.js.map +1 -1
- package/dist/components/eui-combo-box/create-option.js +1 -1
- package/dist/components/eui-combo-box/create-option.js.map +1 -1
- package/dist/components/eui-file-picker.js +3 -1
- package/dist/components/eui-file-picker.js.map +1 -1
- package/dist/components/eui-page-header-content.js +1 -1
- package/dist/components/eui-page-header-content.js.map +1 -1
- package/dist/components/eui-stat.js.map +1 -1
- package/dist/modifiers/resize-observer.js +1 -1
- package/dist/modifiers/resize-observer.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-call-out.d.ts","sourceRoot":"","sources":["../../src/components/eui-call-out.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACZ,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC,SAAS,CA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AC,OAAO,CAAC,CAAC;QAC9C,QAAQ,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KAC7C,CAAC;IACF,MAAM,EAAE;QACN,KAAK,CAAC,EAAE,EAAE,CAAC;QACX,IAAI,CAAC,EAAE,EAAE,CAAC;QACV,OAAO,CAAC,EAAE,EAAE,CAAC;KACd,CAAC;CACH;AAED,QAAA,MAAM,UAAU,EAAE,qBAAqB,CAAC,mBAAmB,CAqEzD,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-file-picker.d.ts","sourceRoot":"","sources":["../../src/components/eui-file-picker.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"eui-file-picker.d.ts","sourceRoot":"","sources":["../../src/components/eui-file-picker.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAmB3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,cAAc,CAAC;AAE/D;;GAEG;AACH,KAAK,aAAa,GAAG;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,sBAAsB,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IAC1E,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAC1C,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAQ;IAC7C,cAAc,UAAS;IAEyB,iBAAiB,EACtE,SAAS,GACT,MAAM,GACN,IAAI,CAAC;IAEqB,UAAU,EAAG,OAAO,CAAC;IACxB,OAAO,EAAG,MAAM,CAAC;IAG5C,QAAQ,IAAI,IAAI;IAOhB,QAAQ,IAAI,IAAI;IAKhB,YAAY,IAAI,IAAI;IAyBpB,WAAW,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAajC,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAKhD,WAAW,IAAI,IAAI;CA0IpB"}
|
|
@@ -7,8 +7,8 @@ export interface EuiStatSignature {
|
|
|
7
7
|
Element: HTMLDivElement;
|
|
8
8
|
Args: {
|
|
9
9
|
textAlign?: keyof typeof textAlignMapping;
|
|
10
|
-
title
|
|
11
|
-
description
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
12
|
titleColor?: keyof typeof colorMapping;
|
|
13
13
|
titleSize?: EuiStatTitleSignature['Args']['titleSize'];
|
|
14
14
|
isLoading?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-stat.d.ts","sourceRoot":"","sources":["../../src/components/eui-stat.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAIjE,OAAO,KAAK,EAAC,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,OAAO,gBAAgB,CAAC;QAC1C,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"eui-stat.d.ts","sourceRoot":"","sources":["../../src/components/eui-stat.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAIjE,OAAO,KAAK,EAAC,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,OAAO,gBAAgB,CAAC;QAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC;QACvC,SAAS,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC;QACvD,SAAS,CAAC,E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CAAQ;IAC/B,KAAK,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,CAAQ;IAC9D,UAAU,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,GAAG,IAAI,CAAQ;IAGxE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAgB5D,MAAM,CACJ,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,YAAK,EAC9D,KAAK,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;IASjD,MAAM;IAiCN,SAAS;CAOV"}
|
|
@@ -8,7 +8,7 @@ import { precompileTemplate } from '@ember/template-compilation';
|
|
|
8
8
|
import { setComponentTemplate } from '@ember/component';
|
|
9
9
|
import templateOnly from '@ember/component/template-only';
|
|
10
10
|
|
|
11
|
-
const EuiCallOut = setComponentTemplate(precompileTemplate("\n <div class={{classNames componentName=\"EuiCallOut\" size=(argOrDefault @size \"m\") color=(argOrDefault @color \"primary\")}} ...attributes>\n {{#if (or @title (has-block \"title\"))}}\n <div class=\"euiCallOutHeader\">\n {{#if @iconType}}\n <EuiIcon @iconClasses=\"euiCallOutHeader__icon\" @type={{@iconType}} @size={{argOrDefault @iconSize \"m\"}} aria-hidden=\"true\" @color=\"inherit\" />\n {{/if}}\n {{#if @heading}}\n <TextBlock @tagName={{@heading}} class=\"euiCallOutHeader__title\">\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n </TextBlock>\n {{else}}\n <span class=\"euiCallOutHeader__title\">\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n {{#if (has-block \"body\")}}\n <EuiText @size={{if (eq @size \"s\") \"xs\" \"s\"}} @color={{@textColor}}>\n {{yield to=\"body\"}}\n </EuiText>\n {{/if}}\n </div>\n", {
|
|
11
|
+
const EuiCallOut = setComponentTemplate(precompileTemplate("\n <div class={{classNames componentName=\"EuiCallOut\" size=(argOrDefault @size \"m\") color=(argOrDefault @color \"primary\")}} ...attributes>\n {{#if (or @title (has-block \"title\"))}}\n <div class=\"euiCallOutHeader\">\n {{#if @iconType}}\n <EuiIcon @iconClasses=\"euiCallOutHeader__icon\" @type={{@iconType}} @size={{argOrDefault @iconSize \"m\"}} aria-hidden=\"true\" @color=\"inherit\" />\n {{/if}}\n {{#if @heading}}\n <TextBlock @tagName={{@heading}} class=\"euiCallOutHeader__title\">\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n </TextBlock>\n {{else}}\n <span class=\"euiCallOutHeader__title\">\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n {{#if (or (has-block \"body\") (has-block))}}\n <EuiText @size={{if (eq @size \"s\") \"xs\" \"s\"}} @color={{@textColor}}>\n {{#if (has-block \"body\")}}\n {{yield to=\"body\"}}\n {{else}}\n {{yield}}\n {{/if}}\n </EuiText>\n {{/if}}\n </div>\n", {
|
|
12
12
|
strictMode: true,
|
|
13
13
|
scope: () => ({
|
|
14
14
|
classNames,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-call-out.js","sources":["../../src/components/eui-call-out.gts"],"sourcesContent":["import { eq, or } from 'ember-truth-helpers';\n\nimport argOrDefault from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport EuiIcon from './eui-icon.gts';\nimport EuiText from './eui-text.gts';\nimport TextBlock from './text-block.gts';\n\nimport type {\n colorMapping,\n sizeMapping\n} from '../utils/css-mappings/eui-call-out.ts';\nimport type { EuiIconSignature } from './eui-icon';\nimport type { EuiTextSignature } from './eui-text';\nimport type { TextBlockSignature } from './text-block';\nimport type { TemplateOnlyComponent } from '@ember/component/template-only';\n\nexport interface EuiCallOutSignature {\n Element: HTMLDivElement;\n Args: {\n title?: string;\n heading?: TextBlockSignature['Args']['tagName'];\n iconType?: EuiIconSignature['Args']['type'];\n size?: keyof typeof sizeMapping;\n color?: keyof typeof colorMapping;\n textColor?: EuiTextSignature['Args']['color'];\n iconSize?: EuiIconSignature['Args']['size'];\n };\n Blocks: {\n title?: [];\n body?: [];\n };\n}\n\nconst EuiCallOut: TemplateOnlyComponent<EuiCallOutSignature> = <template>\n <div\n class={{classNames\n componentName=\"EuiCallOut\"\n size=(argOrDefault @size \"m\")\n color=(argOrDefault @color \"primary\")\n }}\n ...attributes\n >\n {{#if (or @title (has-block \"title\"))}}\n <div class=\"euiCallOutHeader\">\n {{#if @iconType}}\n <EuiIcon\n @iconClasses=\"euiCallOutHeader__icon\"\n @type={{@iconType}}\n @size={{argOrDefault @iconSize \"m\"}}\n aria-hidden=\"true\"\n @color=\"inherit\"\n />\n {{/if}}\n {{#if @heading}}\n <TextBlock @tagName={{@heading}} class=\"euiCallOutHeader__title\">\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n </TextBlock>\n {{else}}\n <span class=\"euiCallOutHeader__title\">\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n {{#if (has-block \"body\")}}\n <EuiText @size={{if (eq @size \"s\") \"xs\" \"s\"}} @color={{@textColor}}>\n {{yield to=\"body\"}}\n </EuiText>\n {{/if}}\n </div>\n</template>;\n\nexport default EuiCallOut;\n"],"names":["EuiCallOut","setComponentTemplate","precompileTemplate","strictMode","scope","classNames","argOrDefault","or","EuiIcon","TextBlock","EuiText","eq","templateOnly"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"eui-call-out.js","sources":["../../src/components/eui-call-out.gts"],"sourcesContent":["import { eq, or } from 'ember-truth-helpers';\n\nimport argOrDefault from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport EuiIcon from './eui-icon.gts';\nimport EuiText from './eui-text.gts';\nimport TextBlock from './text-block.gts';\n\nimport type {\n colorMapping,\n sizeMapping\n} from '../utils/css-mappings/eui-call-out.ts';\nimport type { EuiIconSignature } from './eui-icon';\nimport type { EuiTextSignature } from './eui-text';\nimport type { TextBlockSignature } from './text-block';\nimport type { TemplateOnlyComponent } from '@ember/component/template-only';\n\nexport interface EuiCallOutSignature {\n Element: HTMLDivElement;\n Args: {\n title?: string;\n heading?: TextBlockSignature['Args']['tagName'];\n iconType?: EuiIconSignature['Args']['type'];\n size?: keyof typeof sizeMapping;\n color?: keyof typeof colorMapping;\n textColor?: EuiTextSignature['Args']['color'];\n iconSize?: EuiIconSignature['Args']['size'];\n };\n Blocks: {\n title?: [];\n body?: [];\n default?: [];\n };\n}\n\nconst EuiCallOut: TemplateOnlyComponent<EuiCallOutSignature> = <template>\n <div\n class={{classNames\n componentName=\"EuiCallOut\"\n size=(argOrDefault @size \"m\")\n color=(argOrDefault @color \"primary\")\n }}\n ...attributes\n >\n {{#if (or @title (has-block \"title\"))}}\n <div class=\"euiCallOutHeader\">\n {{#if @iconType}}\n <EuiIcon\n @iconClasses=\"euiCallOutHeader__icon\"\n @type={{@iconType}}\n @size={{argOrDefault @iconSize \"m\"}}\n aria-hidden=\"true\"\n @color=\"inherit\"\n />\n {{/if}}\n {{#if @heading}}\n <TextBlock @tagName={{@heading}} class=\"euiCallOutHeader__title\">\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n </TextBlock>\n {{else}}\n <span class=\"euiCallOutHeader__title\">\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n {{#if (or (has-block \"body\") (has-block))}}\n <EuiText @size={{if (eq @size \"s\") \"xs\" \"s\"}} @color={{@textColor}}>\n {{#if (has-block \"body\")}}\n {{yield to=\"body\"}}\n {{else}}\n {{yield}}\n {{/if}}\n </EuiText>\n {{/if}}\n </div>\n</template>;\n\nexport default EuiCallOut;\n"],"names":["EuiCallOut","setComponentTemplate","precompileTemplate","strictMode","scope","classNames","argOrDefault","or","EuiIcon","TextBlock","EuiText","eq","templateOnly"],"mappings":";;;;;;;;;;AAmCA,MAAMA,UAAyD,GAAAC,oBAAA,CAAAC,kBAAA,CAiD/D,yxCAAA,EAAA;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;IAAAC,UAAA;IAAAC,YAAA;IAAAC,EAAA;IAAAC,OAAA;IAAAC,SAAA;aAAAC,gBAAA;AAAAC,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;;;;"}
|
|
@@ -60,7 +60,7 @@ class EuiComboBoxCreateOptionComponent extends Component {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
static {
|
|
63
|
-
setComponentTemplate(precompileTemplate("\n <div class=\"euiComboBoxOptionsList__rowWrap\" {{style this.extraStyling.container}} {{!--template-lint-disable no-invalid-interactive--}} {{on \"
|
|
63
|
+
setComponentTemplate(precompileTemplate("\n <div class=\"euiComboBoxOptionsList__rowWrap\" {{style this.extraStyling.container}} {{!--template-lint-disable no-invalid-interactive--}} {{on \"pointerup\" @onCreateOption}}>\n <EuiText class=\"euiComboBoxOptionsList__empty\" @size=\"xs\" {{style this.extraStyling.content}}>\n <div class=\"euiComboBoxOption__contentWrapper\">\n <p class=\"euiComboBoxOption__emptyStateText\">\n {{this.formattedString}}\n </p>\n\n <EuiBadge class=\"euiComboBoxOption__enterBadge\" @color=\"hollow\" @iconType={{unless @alwaysShow \"returnKey\"}}>\n {{#if @alwaysShow}}\n {{this.createLabel}}\n {{/if}}\n </EuiBadge>\n </div>\n </EuiText>\n </div>\n ", {
|
|
64
64
|
strictMode: true,
|
|
65
65
|
scope: () => ({
|
|
66
66
|
style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-option.js","sources":["../../../src/components/eui-combo-box/create-option.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { on } from '@ember/modifier';\nimport { get } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe, isHTMLSafe } from '@ember/template';\n\nimport style from 'ember-style-modifier/modifiers/style';\n\nimport EuiBadge from '../eui-badge.gts';\nimport EuiText from '../eui-text.gts';\n\nimport type EuiI18n from '../../services/eui-i18n';\n\nfunction unwrap(input: string) {\n if (isHTMLSafe(input)) {\n return input.toString();\n }\n\n return input;\n}\n\nexport interface EuiComboBoxCreateOptionSignature {\n Args: {\n customOptionText?: string;\n select: { searchText: string };\n onCreateOption: () => void;\n alwaysShow?: boolean;\n };\n}\n\nexport default class EuiComboBoxCreateOptionComponent extends Component<EuiComboBoxCreateOptionSignature> {\n @service declare euiI18n: EuiI18n;\n\n _regex = /\\{\\s*(.*?)\\s*\\}/g;\n\n get createLabel() {\n return this.euiI18n.lookupToken('euiComboBox.createLabel', 'Create');\n }\n\n get formattedString(): ReturnType<typeof htmlSafe> {\n if (\n this.args.customOptionText &&\n typeof this.args.customOptionText === 'string'\n ) {\n let str = unwrap(this.args.customOptionText);\n\n let context = {\n searchText: this.args.select.searchText\n };\n\n return htmlSafe(\n str.replace(this._regex, (_s, p1, p2) => {\n return get(context, p1 || p2);\n })\n );\n } else {\n let str = unwrap(\n this.euiI18n.lookupToken(\n 'euiComboBox.customOptionText',\n 'Add <strong>{searchText}</strong> as custom option',\n {\n searchText: this.args.select.searchText\n }\n )\n );\n\n return htmlSafe(str);\n }\n }\n\n get extraStyling() {\n if (this.args.alwaysShow) {\n return {\n container: {\n padding: '4px 12px',\n cursor: 'pointer'\n },\n content: {\n padding: '0px'\n }\n };\n }\n\n return {\n container: {\n cursor: 'pointer'\n }\n };\n }\n\n <template>\n <div\n class=\"euiComboBoxOptionsList__rowWrap\"\n {{style this.extraStyling.container}}\n {{!template-lint-disable no-invalid-interactive}}\n {{on \"
|
|
1
|
+
{"version":3,"file":"create-option.js","sources":["../../../src/components/eui-combo-box/create-option.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { on } from '@ember/modifier';\nimport { get } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe, isHTMLSafe } from '@ember/template';\n\nimport style from 'ember-style-modifier/modifiers/style';\n\nimport EuiBadge from '../eui-badge.gts';\nimport EuiText from '../eui-text.gts';\n\nimport type EuiI18n from '../../services/eui-i18n';\n\nfunction unwrap(input: string) {\n if (isHTMLSafe(input)) {\n return input.toString();\n }\n\n return input;\n}\n\nexport interface EuiComboBoxCreateOptionSignature {\n Args: {\n customOptionText?: string;\n select: { searchText: string };\n onCreateOption: () => void;\n alwaysShow?: boolean;\n };\n}\n\nexport default class EuiComboBoxCreateOptionComponent extends Component<EuiComboBoxCreateOptionSignature> {\n @service declare euiI18n: EuiI18n;\n\n _regex = /\\{\\s*(.*?)\\s*\\}/g;\n\n get createLabel() {\n return this.euiI18n.lookupToken('euiComboBox.createLabel', 'Create');\n }\n\n get formattedString(): ReturnType<typeof htmlSafe> {\n if (\n this.args.customOptionText &&\n typeof this.args.customOptionText === 'string'\n ) {\n let str = unwrap(this.args.customOptionText);\n\n let context = {\n searchText: this.args.select.searchText\n };\n\n return htmlSafe(\n str.replace(this._regex, (_s, p1, p2) => {\n return get(context, p1 || p2);\n })\n );\n } else {\n let str = unwrap(\n this.euiI18n.lookupToken(\n 'euiComboBox.customOptionText',\n 'Add <strong>{searchText}</strong> as custom option',\n {\n searchText: this.args.select.searchText\n }\n )\n );\n\n return htmlSafe(str);\n }\n }\n\n get extraStyling() {\n if (this.args.alwaysShow) {\n return {\n container: {\n padding: '4px 12px',\n cursor: 'pointer'\n },\n content: {\n padding: '0px'\n }\n };\n }\n\n return {\n container: {\n cursor: 'pointer'\n }\n };\n }\n\n <template>\n <div\n class=\"euiComboBoxOptionsList__rowWrap\"\n {{style this.extraStyling.container}}\n {{!template-lint-disable no-invalid-interactive}}\n {{on \"pointerup\" @onCreateOption}}\n >\n <EuiText\n class=\"euiComboBoxOptionsList__empty\"\n @size=\"xs\"\n {{style this.extraStyling.content}}\n >\n <div class=\"euiComboBoxOption__contentWrapper\">\n <p class=\"euiComboBoxOption__emptyStateText\">\n {{this.formattedString}}\n </p>\n\n <EuiBadge\n class=\"euiComboBoxOption__enterBadge\"\n @color=\"hollow\"\n @iconType={{unless @alwaysShow \"returnKey\"}}\n >\n {{#if @alwaysShow}}\n {{this.createLabel}}\n {{/if}}\n </EuiBadge>\n </div>\n </EuiText>\n </div>\n </template>\n}\n"],"names":["unwrap","input","isHTMLSafe","toString","EuiComboBoxCreateOptionComponent","Component","g","prototype","service","i","void 0","_regex","createLabel","euiI18n","lookupToken","formattedString","args","customOptionText","str","context","searchText","select","htmlSafe","replace","_s","p1","p2","get","extraStyling","alwaysShow","container","padding","cursor","content","setComponentTemplate","precompileTemplate","strictMode","scope","style","on","EuiText","EuiBadge"],"mappings":";;;;;;;;;;;;AAaA,SAASA,MAAAA,CAAOC,KAAa,EAAA;AAC3B,EAAA,IAAIC,WAAWD,KAAQ,CAAA,EAAA;AACrB,IAAA,OAAOA,MAAME,QAAQ,EAAA;AACvB;AAEA,EAAA,OAAOF,KAAA;AACT;AAWe,MAAMG,yCAAyCC,SAAU,CAAA;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,SAAA,EAAA,CACrEC,MAAA,CAAA,CAAA;AAAA;AAAA,EAAA,QAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,SAAA,CAAA,EAAAC,MAAA;AAEDC,EAAAA,MAAA,GAAS,kBAAmB;EAE5B,IAAIC,WAAcA,GAAA;IAChB,OAAO,IAAI,CAACC,OAAO,CAACC,WAAW,CAAC,yBAA2B,EAAA,QAA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AAA,EAAAA,OAAA;QAAAC,KAAA;QAAAC,EAAA;iBAAAC,gBAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -10,6 +10,7 @@ import argOrDefault, { argOrDefaultDecorator } from '../helpers/arg-or-default.j
|
|
|
10
10
|
import classNames from '../helpers/class-names.js';
|
|
11
11
|
import validatableControl from '../modifiers/validatable-control.js';
|
|
12
12
|
import EuiButtonEmpty from './eui-button-empty.js';
|
|
13
|
+
import EuiI18nComponent from './eui-i18n.js';
|
|
13
14
|
import EuiIcon from './eui-icon.js';
|
|
14
15
|
import EuiLoadingSpinner from './eui-loading-spinner.js';
|
|
15
16
|
import EuiProgress from './eui-progress.js';
|
|
@@ -111,7 +112,7 @@ class EuiFilePickerComponent extends Component {
|
|
|
111
112
|
this.fileInput = null;
|
|
112
113
|
}
|
|
113
114
|
static {
|
|
114
|
-
setComponentTemplate(precompileTemplate("\n {{#let (classNames (if @compressed \"euiFilePicker--compressed\") (if @fullWidth \"euiFilePicker--fullWidth\") (if @isInvalid \"euiFilePicker--isInvalid\") (if @isLoading \"euiFilePicker--isLoading\") display=this.display componentName=\"EuiFilePicker\") (argOrDefault @id (randomId)) as |classes inputId|}}\n {{#let (if inputId (concat inputId \"-filePicker__prompt\") (randomId)) (notEq this.promptText null) (eq this.display \"default\") as |promptId isOverridingInitialPrompt normalFormControl|}}\n <div class
|
|
115
|
+
setComponentTemplate(precompileTemplate("\n {{#let (classNames (if @compressed \"euiFilePicker--compressed\") (if @fullWidth \"euiFilePicker--fullWidth\") (if @isInvalid \"euiFilePicker--isInvalid\") (if @isLoading \"euiFilePicker--isLoading\") display=this.display componentName=\"EuiFilePicker\") (argOrDefault @id (randomId)) as |classes inputId|}}\n {{#let (if inputId (concat inputId \"-filePicker__prompt\") (randomId)) (notEq this.promptText null) (eq this.display \"default\") as |promptId isOverridingInitialPrompt normalFormControl|}}\n <div class={{classNames classes (if this.isHoveringDrop \"euiFilePicker__showDrop\") (if isOverridingInitialPrompt \"euiFilePicker--hasFiles\")}}>\n <div class=\"euiFilePicker__wrap\">\n <input type=\"file\" id={{inputId}} name={{@name}} class=\"euiFilePicker__input\" disabled={{@disabled}} aria-describedby={{promptId}} multiple={{@multiple}} {{on \"dragover\" this.showDrop}} {{on \"dragleave\" this.hideDrop}} {{on \"drop\" this.hideDrop}} {{on \"change\" this.handleChange}} {{didInsert this.didInsertInput}} {{validatableControl @isInvalid}} ...attributes />\n <div class=\"euiFilePicker__prompt\" id={{promptId}}>\n <EuiIcon @iconClasses=\"euiFilePicker__icon\" @type=\"importAction\" @size={{if true \"m\" \"l\"}} aria-hidden=\"true\" />\n <div class=\"euiFilePicker__promptText\">\n {{if this.promptText this.promptText this.initialPromptText}}\n </div>\n {{#if (and @isLoading normalFormControl)}}\n <EuiLoadingSpinner class=\"euiFilePicker__loadingSpinner\" />\n {{else if isOverridingInitialPrompt}}\n {{#if normalFormControl}}\n <button type=\"button\" aria-label=\"Clear selected files\" class=\"euiFilePicker__clearButton\" {{on \"click\" this.removeFiles}}>\n <EuiIcon @iconClasses=\"euiFilePicker__clearIcon\" @type=\"cross\" />\n </button>\n {{else}}\n <EuiButtonEmpty aria-label=\"Clear selected files\" class=\"euiFilePicker__clearButton\" @size=\"xs\" {{on \"click\" this.removeFiles}}>\n <EuiI18n @token=\"euiFilePicker.removeFiles\" @default=\"Remove\" as |Token|>\n <Token as |value|>\n {{value}}\n </Token>\n </EuiI18n>\n </EuiButtonEmpty>\n {{/if}}\n {{/if}}\n {{#if (and (not normalFormControl) @isLoading)}}\n <EuiProgress @size=\"xs\" @color=\"accent\" position=\"absolute\" />\n {{/if}}\n </div>\n </div>\n </div>\n {{/let}}\n {{/let}}\n ", {
|
|
115
116
|
strictMode: true,
|
|
116
117
|
scope: () => ({
|
|
117
118
|
classNames,
|
|
@@ -127,6 +128,7 @@ class EuiFilePickerComponent extends Component {
|
|
|
127
128
|
and,
|
|
128
129
|
EuiLoadingSpinner,
|
|
129
130
|
EuiButtonEmpty,
|
|
131
|
+
EuiI18n: EuiI18nComponent,
|
|
130
132
|
not,
|
|
131
133
|
EuiProgress
|
|
132
134
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-file-picker.js","sources":["../../src/components/eui-file-picker.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { concat } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\n\nimport { and, eq, not, notEq, or } from 'ember-truth-helpers';\n\nimport randomId from '../-private/random-id.ts';\nimport argOrDefault, { argOrDefaultDecorator } from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport validatableControl from '../modifiers/validatable-control.ts';\nimport EuiButtonEmpty from './eui-button-empty.gts';\nimport EuiIcon from './eui-icon.gts';\nimport EuiLoadingSpinner from './eui-loading-spinner.gts';\nimport EuiProgress from './eui-progress.gts';\n\nimport type { displayMapping } from '../utils/css-mappings/eui-file-picker.ts';\n\nexport type EuiFilePickerDisplay = keyof typeof displayMapping;\n\n/**\n * You can find more typing on the template\n */\ntype EuiFilePicker = {\n id?: string;\n name?: string;\n class?: string;\n /**\n * The content that appears in the dropzone if no file is attached\n */\n initialPromptText?: Component | string | null;\n /**\n * Use as a callback to access the HTML FileList API\n */\n onChange?: (files: FileList | null) => void;\n /**\n * Reduces the size to a typical (compressed) input\n */\n compressed?: boolean;\n /**\n * Size or type of display;\n * `default` for normal height, similar to other controls;\n * `large` for taller size\n */\n display?: EuiFilePickerDisplay;\n fullWidth?: boolean;\n isInvalid?: boolean;\n isLoading?: boolean;\n disabled?: boolean;\n multiple?: boolean;\n\n /**\n * Optionally pass a fn to get the instance of the component to access it programatically\n */\n ref?: (c: typeof EuiFilePickerComponent) => void;\n};\n\nexport interface EuiFilePickerSignature {\n Element: HTMLInputElement;\n Args: EuiFilePicker;\n Blocks: {\n default: [];\n };\n}\n\nexport default class EuiFilePickerComponent extends Component<EuiFilePickerSignature> {\n @tracked fileInput: HTMLInputElement | null = null;\n @tracked promptText: string | null | undefined = null;\n @tracked isHoveringDrop = false;\n\n @argOrDefaultDecorator('Select or drag and drop a file') initialPromptText!:\n | Component\n | string\n | null;\n\n @argOrDefaultDecorator(false) compressed!: boolean;\n @argOrDefaultDecorator('') display!: string;\n\n @action\n showDrop(): void {\n if (!this.args.disabled) {\n this.isHoveringDrop = true;\n }\n }\n\n @action\n hideDrop(): void {\n this.isHoveringDrop = false;\n }\n\n @action\n handleChange(): void {\n if (!this.fileInput) return;\n\n if (this.fileInput.files && this.fileInput.files.length > 1) {\n this.promptText = `${this.fileInput.files.length} files selected`;\n // TODO: Change when EuiI18n is available\n // <EuiI18n\n // token=\"euiFilePicker.filesSelected\"\n // default=\"{fileCount} files selected\"\n // values={{ fileCount: this.fileInput.files.length }}\n // />\n } else if (this.fileInput.files && this.fileInput.files.length === 0) {\n this.promptText = null;\n } else {\n this.promptText = this.fileInput.value.split('\\\\').pop();\n }\n\n const { onChange } = this.args;\n\n if (onChange) {\n onChange(this.fileInput.files);\n }\n }\n\n @action\n removeFiles(e?: MouseEvent): void {\n if (e) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n if (!this.fileInput) return;\n\n this.fileInput.value = '';\n this.handleChange();\n }\n\n @action\n didInsertInput(inputRef: HTMLInputElement): void {\n this.fileInput = inputRef;\n this.args.ref?.(this as any as typeof EuiFilePickerComponent);\n }\n\n willDestroy(): void {\n super.willDestroy();\n\n this.fileInput = null;\n }\n\n <template>\n {{#let\n (classNames\n (if @compressed \"euiFilePicker--compressed\")\n (if @fullWidth \"euiFilePicker--fullWidth\")\n (if @isInvalid \"euiFilePicker--isInvalid\")\n (if @isLoading \"euiFilePicker--isLoading\")\n display=this.display\n componentName=\"EuiFilePicker\"\n )\n (argOrDefault @id (randomId))\n as |classes inputId|\n }}\n {{#let\n (if inputId (concat inputId \"-filePicker__prompt\") (randomId))\n (notEq this.promptText null)\n (eq this.display \"default\")\n as |promptId isOverridingInitialPrompt normalFormControl|\n }}\n <div\n class=\"{{classes}}\n {{if this.isHoveringDrop 'euiFilePicker__showDrop'}}\n {{if isOverridingInitialPrompt 'euiFilePicker--hasFiles'}}\"\n >\n <div class=\"euiFilePicker__wrap\">\n <input\n type=\"file\"\n id={{inputId}}\n name={{@name}}\n class=\"euiFilePicker__input\"\n disabled={{@disabled}}\n aria-describedby={{promptId}}\n multiple={{@multiple}}\n {{on \"dragover\" this.showDrop}}\n {{on \"dragleave\" this.hideDrop}}\n {{on \"drop\" this.hideDrop}}\n {{on \"change\" this.handleChange}}\n {{didInsert this.didInsertInput}}\n {{validatableControl @isInvalid}}\n ...attributes\n />\n <div class=\"euiFilePicker__prompt\" id={{promptId}}>\n <EuiIcon\n @iconClasses=\"euiFilePicker__icon\"\n @type=\"importAction\"\n @size={{if true \"m\" \"l\"}}\n aria-hidden=\"true\"\n />\n <div class=\"euiFilePicker__promptText\">\n {{if this.promptText this.promptText this.initialPromptText}}\n </div>\n {{#if (and @isLoading normalFormControl)}}\n <EuiLoadingSpinner class=\"euiFilePicker__loadingSpinner\" />\n {{else if isOverridingInitialPrompt}}\n {{#if normalFormControl}}\n <button\n type=\"button\"\n aria-label=\"Clear selected files\"\n class=\"euiFilePicker__clearButton\"\n {{on \"click\" this.removeFiles}}\n >\n <EuiIcon\n @iconClasses=\"euiFilePicker__clearIcon\"\n @type=\"cross\"\n />\n </button>\n {{else}}\n <EuiButtonEmpty\n aria-label=\"Clear selected files\"\n class=\"euiFilePicker__clearButton\"\n @size=\"xs\"\n {{on \"click\" this.removeFiles}}\n >\n Remove\n </EuiButtonEmpty>\n {{/if}}\n {{/if}}\n {{#if (and (not normalFormControl) @isLoading)}}\n <EuiProgress @size=\"xs\" @color=\"accent\" position=\"absolute\" />\n {{/if}}\n </div>\n </div>\n </div>\n {{/let}}\n {{/let}}\n </template>\n}\n"],"names":["EuiFilePickerComponent","Component","g","prototype","tracked","i","void 0","argOrDefaultDecorator","showDrop","args","disabled","isHoveringDrop","n","action","hideDrop","handleChange","fileInput","files","length","promptText","value","split","pop","onChange","removeFiles","e","stopPropagation","preventDefault","didInsertInput","inputRef","ref","willDestroy","setComponentTemplate","precompileTemplate","strictMode","scope","classNames","argOrDefault","randomId","concat","notEq","eq","on","didInsert","validatableControl","EuiIcon","and","EuiLoadingSpinner","EuiButtonEmpty","not","EuiProgress"],"mappings":";;;;;;;;;;;;;;;;;;;AAmEe,MAAMA,+BAA+BC,SAAU,CAAA;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,WAAA,EAAA,CAC3DC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAA6C,IAAK;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,UAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,WAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;IAAAJ,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,YAAA,EAAA,CAClDC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAgD,IAAK;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,WAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,YAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;IAAAJ,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,gBAAA,EAAA,CACrDC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAyB,KAAM;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,eAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,gBAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;AAAAJ,IAAAA,CAAA,MAAAC,SAAA,EAAA,mBAAA,EAAA,CAE/BI,qBAAsB,CAAA,gCAAA,CAAA,CAAA,CAAA;AAAA;AAAA,EAAA,kBAAA,IAAAF,CAAA,CAAA,IAAA,EAAA,mBAAA,CAAA,EAAAC,MA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MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,UAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,MAAA;QAAAC,KAAA;QAAAC,EAAA;QAAAC,EAAA;QAAAC,SAAA;QAAAC,kBAAA;QAAAC,OAAA;QAAAC,GAAA;QAAAC,iBAAA;QAAAC,cAAA;QAAAC,GAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
1
|
+
{"version":3,"file":"eui-file-picker.js","sources":["../../src/components/eui-file-picker.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { concat } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\n\nimport { and, eq, not, notEq, or } from 'ember-truth-helpers';\n\nimport randomId from '../-private/random-id.ts';\nimport argOrDefault, { argOrDefaultDecorator } from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport validatableControl from '../modifiers/validatable-control.ts';\nimport EuiButtonEmpty from './eui-button-empty.gts';\nimport EuiI18n from './eui-i18n.gts';\nimport EuiIcon from './eui-icon.gts';\nimport EuiLoadingSpinner from './eui-loading-spinner.gts';\nimport EuiProgress from './eui-progress.gts';\n\nimport type { displayMapping } from '../utils/css-mappings/eui-file-picker.ts';\n\nexport type EuiFilePickerDisplay = keyof typeof displayMapping;\n\n/**\n * You can find more typing on the template\n */\ntype EuiFilePicker = {\n id?: string;\n name?: string;\n class?: string;\n /**\n * The content that appears in the dropzone if no file is attached\n */\n initialPromptText?: Component | string | null;\n /**\n * Use as a callback to access the HTML FileList API\n */\n onChange?: (files: FileList | null) => void;\n /**\n * Reduces the size to a typical (compressed) input\n */\n compressed?: boolean;\n /**\n * Size or type of display;\n * `default` for normal height, similar to other controls;\n * `large` for taller size\n */\n display?: EuiFilePickerDisplay;\n fullWidth?: boolean;\n isInvalid?: boolean;\n isLoading?: boolean;\n disabled?: boolean;\n multiple?: boolean;\n\n /**\n * Optionally pass a fn to get the instance of the component to access it programatically\n */\n ref?: (c: typeof EuiFilePickerComponent) => void;\n};\n\nexport interface EuiFilePickerSignature {\n Element: HTMLInputElement;\n Args: EuiFilePicker;\n Blocks: {\n default: [];\n };\n}\n\nexport default class EuiFilePickerComponent extends Component<EuiFilePickerSignature> {\n @tracked fileInput: HTMLInputElement | null = null;\n @tracked promptText: string | null | undefined = null;\n @tracked isHoveringDrop = false;\n\n @argOrDefaultDecorator('Select or drag and drop a file') initialPromptText!:\n | Component\n | string\n | null;\n\n @argOrDefaultDecorator(false) compressed!: boolean;\n @argOrDefaultDecorator('') display!: string;\n\n @action\n showDrop(): void {\n if (!this.args.disabled) {\n this.isHoveringDrop = true;\n }\n }\n\n @action\n hideDrop(): void {\n this.isHoveringDrop = false;\n }\n\n @action\n handleChange(): void {\n if (!this.fileInput) return;\n\n if (this.fileInput.files && this.fileInput.files.length > 1) {\n this.promptText = `${this.fileInput.files.length} files selected`;\n // TODO: Change when EuiI18n is available\n // <EuiI18n\n // token=\"euiFilePicker.filesSelected\"\n // default=\"{fileCount} files selected\"\n // values={{ fileCount: this.fileInput.files.length }}\n // />\n } else if (this.fileInput.files && this.fileInput.files.length === 0) {\n this.promptText = null;\n } else {\n this.promptText = this.fileInput.value.split('\\\\').pop();\n }\n\n const { onChange } = this.args;\n\n if (onChange) {\n onChange(this.fileInput.files);\n }\n }\n\n @action\n removeFiles(e?: MouseEvent): void {\n if (e) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n if (!this.fileInput) return;\n\n this.fileInput.value = '';\n this.handleChange();\n }\n\n @action\n didInsertInput(inputRef: HTMLInputElement): void {\n this.fileInput = inputRef;\n this.args.ref?.(this as any as typeof EuiFilePickerComponent);\n }\n\n willDestroy(): void {\n super.willDestroy();\n\n this.fileInput = null;\n }\n\n <template>\n {{#let\n (classNames\n (if @compressed \"euiFilePicker--compressed\")\n (if @fullWidth \"euiFilePicker--fullWidth\")\n (if @isInvalid \"euiFilePicker--isInvalid\")\n (if @isLoading \"euiFilePicker--isLoading\")\n display=this.display\n componentName=\"EuiFilePicker\"\n )\n (argOrDefault @id (randomId))\n as |classes inputId|\n }}\n {{#let\n (if inputId (concat inputId \"-filePicker__prompt\") (randomId))\n (notEq this.promptText null)\n (eq this.display \"default\")\n as |promptId isOverridingInitialPrompt normalFormControl|\n }}\n <div\n class={{classNames\n classes\n (if this.isHoveringDrop \"euiFilePicker__showDrop\")\n (if isOverridingInitialPrompt \"euiFilePicker--hasFiles\")\n }}\n >\n <div class=\"euiFilePicker__wrap\">\n <input\n type=\"file\"\n id={{inputId}}\n name={{@name}}\n class=\"euiFilePicker__input\"\n disabled={{@disabled}}\n aria-describedby={{promptId}}\n multiple={{@multiple}}\n {{on \"dragover\" this.showDrop}}\n {{on \"dragleave\" this.hideDrop}}\n {{on \"drop\" this.hideDrop}}\n {{on \"change\" this.handleChange}}\n {{didInsert this.didInsertInput}}\n {{validatableControl @isInvalid}}\n ...attributes\n />\n <div class=\"euiFilePicker__prompt\" id={{promptId}}>\n <EuiIcon\n @iconClasses=\"euiFilePicker__icon\"\n @type=\"importAction\"\n @size={{if true \"m\" \"l\"}}\n aria-hidden=\"true\"\n />\n <div class=\"euiFilePicker__promptText\">\n {{if this.promptText this.promptText this.initialPromptText}}\n </div>\n {{#if (and @isLoading normalFormControl)}}\n <EuiLoadingSpinner class=\"euiFilePicker__loadingSpinner\" />\n {{else if isOverridingInitialPrompt}}\n {{#if normalFormControl}}\n <button\n type=\"button\"\n aria-label=\"Clear selected files\"\n class=\"euiFilePicker__clearButton\"\n {{on \"click\" this.removeFiles}}\n >\n <EuiIcon\n @iconClasses=\"euiFilePicker__clearIcon\"\n @type=\"cross\"\n />\n </button>\n {{else}}\n <EuiButtonEmpty\n aria-label=\"Clear selected files\"\n class=\"euiFilePicker__clearButton\"\n @size=\"xs\"\n {{on \"click\" this.removeFiles}}\n >\n <EuiI18n\n @token=\"euiFilePicker.removeFiles\"\n @default=\"Remove\"\n as |Token|\n >\n <Token as |value|>\n {{value}}\n </Token>\n </EuiI18n>\n </EuiButtonEmpty>\n {{/if}}\n {{/if}}\n {{#if (and (not normalFormControl) @isLoading)}}\n <EuiProgress @size=\"xs\" @color=\"accent\" position=\"absolute\" />\n {{/if}}\n </div>\n </div>\n </div>\n {{/let}}\n {{/let}}\n </template>\n}\n"],"names":["EuiFilePickerComponent","Component","g","prototype","tracked","i","void 0","argOrDefaultDecorator","showDrop","args","disabled","isHoveringDrop","n","action","hideDrop","handleChange","fileInput","files","length","promptText","value","split","pop","onChange","removeFiles","e","stopPropagation","preventDefault","didInsertInput","inputRef","ref","willDestroy","setComponentTemplate","precompileTemplate","strictMode","scope","classNames","argOrDefault","randomId","concat","notEq","eq","on","didInsert","validatableControl","EuiIcon","and","EuiLoadingSpinner","EuiButtonEmpty","EuiI18n","not","EuiProgress"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoEe,MAAMA,+BAA+BC,SAAU,CAAA;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,WAAA,EAAA,CAC3DC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAA6C,IAAK;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,UAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,WAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;IAAAJ,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,YAAA,EAAA,CAClDC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAgD,IAAK;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,WAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,YAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;IAAAJ,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,gBAAA,EAAA,CACrDC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,O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AACqB,GAAG,GAAG,IAAsB,CAAA;AACxC;AAAA,EAAA;IAAAlB,CAAA,CAAA,IAAA,CAAAT,SAAA,EAAA,gBAAA,EAAA,CAJCU,MAAA,CAAA,CAAA;AAAA;AAMDkB,EAAAA,WAAAA,GAAoB;IAClB,KAAK,CAACA,WAAA,EAAA;IAEN,IAAI,CAACf,SAAS,GAAG,IAAA;AACnB;AAEA,EAAA;IAAAgB,oBAAA,CAAAC,kBAAA,CA+FA,srFAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,UAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,MAAA;QAAAC,KAAA;QAAAC,EAAA;QAAAC,EAAA;QAAAC,SAAA;QAAAC,kBAAA;QAAAC,OAAA;QAAAC,GAAA;QAAAC,iBAAA;QAAAC,cAAA;iBAAAC,gBAAA;QAAAC,GAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -46,7 +46,7 @@ class EuiPageHeaderContent extends Component {
|
|
|
46
46
|
return this.template === 'default' || this.template === 'empty';
|
|
47
47
|
}
|
|
48
48
|
static {
|
|
49
|
-
setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @responsive true) (argOrDefault @alignItems \"top\") (useState false) (and (argOrDefault @hasDescriptionBlock true) (has-block \"description\")) (and (argOrDefault @hasRightSideItemsBlock true) (has-block \"rightSideItems\")) (or (and (argOrDefault @hasPageTitleBlock true) (has-block \"pageTitle\")) @pageTitle) (and (argOrDefault @hasDefaultBlock true) (has-block \"default\")) as |responsive alignItems isResponsiveBreakpoint hasDescriptionBlock hasRightSideItemsBlock hasPageTitleBlock hasDefaultBlock|}}\n <div class={{classNames \"euiPageHeaderContent\" (if @restrictWidth \"euiPanel--restrictWidth-custom\" \"\")}} {{style (inlineStyles width=@restrictWidth)}} {{useIsWithinBreakpoints sizes=(array \"xs\" \"s\") isActive=(not (not responsive)) setIsWithinBreakpointsValue=isResponsiveBreakpoint.setState}} ...attributes>\n {{#if @breadcrumbs}}\n <EuiBreadcrumbs @breadcrumbs={{@breadcrumbs}} class={{@breadcrumbProps.className}} />\n <EuiSpacer @size=\"s\" />\n {{/if}}\n {{#if (or (eq alignItems \"top\") isResponsiveBreakpoint.value)}}\n <EuiFlexGroup class=\"euiPageHeaderContent__top\" @responsive={{not (not responsive)}} @alignItems={{if hasPageTitleBlock \"flexStart\" \"baseline\"}} @gutterSize=\"l\">\n {{#if (and isResponsiveBreakpoint.value (eq responsive \"reverse\"))}}\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup @wrap={{true}} @responsive={{false}} class={{classNames \"euiPageHeaderContent__rightSideItems\" @rightSideGroupProps.className}}>\n {{yield (component EuiFlexItem grow=false) to=\"rightSideItems\"}}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs @size=\"xl\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle class={{@pageTitleProps.className}} @size=\"l\" @tagName=\"h1\">\n {{#if @iconType}}\n <EuiIcon @size=\"xl\" @type={{@iconType}} @iconClasses={{classNames \"euiPageHeaderContent__titleIcon\" @iconProps.className}} />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n </EuiFlexItem>\n {{else}}\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs @size=\"xl\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle class={{@pageTitleProps.className}} @size=\"l\" @tagName=\"h1\">\n {{#if @iconType}}\n <EuiIcon @size=\"xl\" @type={{@iconType}} @iconClasses={{classNames \"euiPageHeaderContent__titleIcon\" @iconProps.className}} />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n </EuiFlexItem>\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup @wrap={{true}} @responsive={{false}} class={{classNames \"euiPageHeaderContent__rightSideItems\" @rightSideGroupProps.className}}>\n {{yield (component EuiFlexItem grow=false) to=\"rightSideItems\"}}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n {{/if}}\n </EuiFlexGroup>\n {{#if (or hasDefaultBlock (and hasPageTitleBlock @tabs))}}\n <div class=\"euiPageHeaderContent__bottom\">\n <EuiSpacer />\n {{yield to=\"default\"}}\n {{#if hasPageTitleBlock}}\n <EuiTabs @size=\"l\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n </div>\n {{/if}}\n {{else}}\n <EuiFlexGroup class=\"euiPageHeaderContent__top\" @responsive={{not (not responsive)}} {{!--@glint-expect-error--}} @alignItems={{if (eq alignItems \"bottom\") \"flexEnd\" alignItems}} @gutterSize=\"l\">\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs @size=\"xl\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle class={{@pageTitleProps.className}} @size=\"l\" @tagName=\"h1\">\n {{#if @iconType}}\n <EuiIcon @size=\"xl\" @type={{@iconType}} @iconClasses={{classNames \"euiPageHeaderContent__titleIcon\" @iconProps.className}} />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n {{#if (or hasDefaultBlock (and hasPageTitleBlock @tabs))}}\n <div class=\"euiPageHeaderContent__bottom\">\n <EuiSpacer />\n {{yield to=\"default\"}}\n {{#if hasPageTitleBlock}}\n <EuiTabs @size=\"l\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n </div>\n {{/if}}\n </EuiFlexItem>\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup @wrap={{true}} @responsive={{false}} class={{classNames \"euiPageHeaderContent__rightSideItems\" @rightSideGroupProps.className}}>\n {{yield (component EuiFlexItem grow=false) to=\"rightSideItems\"}}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n </EuiFlexGroup>\n {{/if}}\n </div>\n {{/let}}\n ", {
|
|
49
|
+
setComponentTemplate(precompileTemplate("\n {{#let (argOrDefault @responsive true) (argOrDefault @alignItems \"top\") (useState false) (and (argOrDefault @hasDescriptionBlock true) (has-block \"description\")) (and (argOrDefault @hasRightSideItemsBlock true) (has-block \"rightSideItems\")) (or (and (argOrDefault @hasPageTitleBlock true) (has-block \"pageTitle\")) @pageTitle) (and (argOrDefault @hasDefaultBlock true) (has-block \"default\")) as |responsive alignItems isResponsiveBreakpoint hasDescriptionBlock hasRightSideItemsBlock hasPageTitleBlock hasDefaultBlock|}}\n <div class={{classNames \"euiPageHeaderContent\" (if @restrictWidth \"euiPanel--restrictWidth-custom\" \"\")}} {{style (inlineStyles width=@restrictWidth)}} {{useIsWithinBreakpoints sizes=(array \"xs\" \"s\") isActive=(not (not responsive)) setIsWithinBreakpointsValue=isResponsiveBreakpoint.setState}} ...attributes>\n {{#if @breadcrumbs}}\n <EuiBreadcrumbs @breadcrumbs={{@breadcrumbs}} class={{@breadcrumbProps.className}} />\n <EuiSpacer @size=\"s\" />\n {{/if}}\n {{#if (or (eq alignItems \"top\") isResponsiveBreakpoint.value)}}\n <EuiFlexGroup class=\"euiPageHeaderContent__top\" @responsive={{not (not responsive)}} @alignItems={{if hasPageTitleBlock \"flexStart\" \"baseline\"}} @gutterSize=\"l\">\n {{#if (and isResponsiveBreakpoint.value (eq responsive \"reverse\"))}}\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup @wrap={{true}} @responsive={{false}} class={{classNames \"euiPageHeaderContent__rightSideItems\" @rightSideGroupProps.className}}>\n {{yield (component EuiFlexItem grow=false) to=\"rightSideItems\"}}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs @size=\"xl\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle class={{@pageTitleProps.className}} @size=\"l\" @tagName=\"h1\">\n {{#if @iconType}}\n <EuiIcon @size=\"xl\" @type={{@iconType}} @iconClasses={{classNames \"euiPageHeaderContent__titleIcon\" @iconProps.className}} />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n </EuiFlexItem>\n {{else}}\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs @size=\"xl\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle class={{@pageTitleProps.className}} @size=\"l\" @tagName=\"h1\">\n {{#if @iconType}}\n <EuiIcon @size=\"xl\" @type={{@iconType}} @iconClasses={{classNames \"euiPageHeaderContent__titleIcon\" @iconProps.className}} />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n </EuiFlexItem>\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup @wrap={{true}} @responsive={{false}} class={{classNames \"euiPageHeaderContent__rightSideItems\" @rightSideGroupProps.className}}>\n {{yield (component EuiFlexItem grow=false) to=\"rightSideItems\"}}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n {{/if}}\n </EuiFlexGroup>\n {{#if (or hasDefaultBlock (and hasPageTitleBlock @tabs))}}\n <div class=\"euiPageHeaderContent__bottom\">\n <EuiSpacer />\n {{yield to=\"default\"}}\n {{#if hasPageTitleBlock}}\n <EuiTabs @size=\"l\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n </div>\n {{/if}}\n {{else}}\n <EuiFlexGroup class=\"euiPageHeaderContent__top\" @responsive={{not (not responsive)}} {{!--@glint-expect-error--}} @alignItems={{if (eq alignItems \"bottom\") \"flexEnd\" alignItems}} @gutterSize=\"l\">\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs @size=\"xl\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle class={{@pageTitleProps.className}} @size=\"l\" @tagName=\"h1\">\n {{#if @iconType}}\n <EuiIcon @size=\"xl\" @type={{@iconType}} @iconClasses={{classNames \"euiPageHeaderContent__titleIcon\" @iconProps.className}} />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n {{#if (or hasDefaultBlock (and hasPageTitleBlock @tabs))}}\n <div class=\"euiPageHeaderContent__bottom\">\n <EuiSpacer />\n {{yield to=\"default\"}}\n {{#if hasPageTitleBlock}}\n <EuiTabs @size=\"l\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab @id={{tab.id}} @disabled={{tab.disabled}} @isSelected={{tab.isSelected}} @href={{tab.href}} {{on \"click\" (optional tab.onClick)}}>\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n </div>\n {{/if}}\n </EuiFlexItem>\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup @wrap={{true}} @responsive={{false}} @gutterSize=\"m\" class={{classNames \"euiPageHeaderContent__rightSideItems\" @rightSideGroupProps.className}}>\n {{yield (component EuiFlexItem grow=false) to=\"rightSideItems\"}}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n </EuiFlexGroup>\n {{/if}}\n </div>\n {{/let}}\n ", {
|
|
50
50
|
strictMode: true,
|
|
51
51
|
scope: () => ({
|
|
52
52
|
argOrDefault,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-page-header-content.js","sources":["../../src/components/eui-page-header-content.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { array } from '@ember/helper';\nimport { on } from '@ember/modifier';\n\nimport optional from '@nullvoxpopuli/ember-composable-helpers/helpers/optional';\nimport style from 'ember-style-modifier/modifiers/style';\nimport { and, eq, not, or } from 'ember-truth-helpers';\n\nimport argOrDefault, {\n argOrDefaultDecorator\n} from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport inlineStyles from '../helpers/inline-styles.ts';\nimport useState from '../helpers/use-state.ts';\nimport useIsWithinBreakpoints from '../modifiers/use-is-within-breakpoints.ts';\nimport EuiBreadcrumbs from './eui-breadcrumbs.gts';\nimport EuiFlexGroup from './eui-flex-group.gts';\nimport EuiFlexItem from './eui-flex-item.gts';\nimport EuiIcon from './eui-icon.gts';\nimport EuiSpacer from './eui-spacer.gts';\nimport EuiTab from './eui-tab.gts';\nimport EuiTabs from './eui-tabs.gts';\nimport EuiText from './eui-text.gts';\nimport EuiTitle from './eui-title.gts';\n\nimport type { paddingSizeMapping } from '../utils/css-mappings/eui-page-content-body.ts';\nimport type { EuiButtomBarArgs } from './eui-bottom-bar';\nimport type { EuiBreadcrumbsSignature } from './eui-breadcrumbs';\nimport type { EuiIconSignature } from './eui-icon';\nimport type { IEuiTab } from './eui-tab';\nimport type { WithBoundArgs } from '@glint/template';\n\nexport const TEMPLATES = [\n 'default',\n 'centeredBody',\n 'centeredContent',\n 'empty'\n] as const;\n\ntype Tab = IEuiTab & {\n label?: string;\n onClick?: () => void;\n};\n\nexport type EuiPageHeaderContentProps = {\n template?: (typeof TEMPLATES)[number];\n /**\n * Gets passed along to the #EuiBottomBar component if `bottomBar` has contents\n */\n bottomBarProps?: EuiButtomBarArgs;\n /* Stretches or restricts the height to 100% of the parent;\n * `true`: scrolls the EuiPageContentBody;\n * `noscroll`: removes all scroll ability;\n * Only works when `template = 'default | empty'` and breakpoint is `m` and above\n */\n fullHeight?: boolean;\n /**\n * Minimum height in which to enforce scrolling\n */\n minHeight?: number;\n\n /**\n * Restrict the width of the page content body\n */\n restrictWidth?: boolean | string;\n\n /**\n * Adds a bottom border to the page header\n */\n bottomBorder?: boolean;\n\n /**\n * Adds a bottom border to the page content body\n */\n bodyBottomBorder?: boolean;\n\n /**\n * Adds a bottom border to the page content body\n */\n bodyProps?: {\n /**\n * Adds padding to the page content body\n */\n paddingSize?: keyof typeof paddingSizeMapping;\n };\n /**\n * Adds a bottom border to the page content body\n */\n contentProps?: {\n /**\n * Adds padding to the page content body\n */\n paddingSize?: keyof typeof paddingSizeMapping;\n };\n\n alignItems?: 'top' | 'bottom' | 'center' | 'stretch';\n\n responsive?: boolean | 'reverse';\n\n hasDescriptionBlock?: boolean;\n\n hasRightSideItemsBlock?: boolean;\n\n hasPageTitleBlock?: boolean;\n\n hasDefaultBlock?: boolean;\n\n pageTitle?: string;\n\n breadcrumbs?: EuiBreadcrumbsSignature['Args']['breadcrumbs'];\n\n breadcrumbProps?: {\n className?: string;\n };\n\n rightSideGroupProps?: {\n className?: string;\n };\n\n pageTitleProps?: {\n className?: string;\n };\n\n iconType?: EuiIconSignature['Args']['type'];\n\n description?: string;\n\n iconProps?: {\n className?: string;\n };\n\n tabs?: Tab[];\n};\n\nexport interface EuiPageHeaderContentSignature {\n Element: HTMLDivElement;\n Args: EuiPageHeaderContentProps;\n Blocks: {\n default: [];\n pageTitle: [];\n description: [];\n rightSideItems: [WithBoundArgs<typeof EuiFlexItem, 'grow'>?];\n };\n}\n\nexport default class EuiPageHeaderContent extends Component<EuiPageHeaderContentSignature> {\n // Defaults\n @argOrDefaultDecorator(460) minHeight!: number;\n @argOrDefaultDecorator(false) fullHeight!: boolean;\n @argOrDefaultDecorator('default') template!: (typeof TEMPLATES)[number];\n\n get classes() {\n return 'euiPageTemplate '.concat(this.fullHeightClass);\n }\n\n get fullHeightClass() {\n return this.fullHeight && this.canFullHeight\n ? 'eui-fullHeight eui-yScroll'\n : '';\n }\n\n get canFullHeight() {\n return this.template === 'default' || this.template === 'empty';\n }\n\n <template>\n {{#let\n (argOrDefault @responsive true)\n (argOrDefault @alignItems \"top\")\n (useState false)\n (and (argOrDefault @hasDescriptionBlock true) (has-block \"description\"))\n (and\n (argOrDefault @hasRightSideItemsBlock true) (has-block \"rightSideItems\")\n )\n (or\n (and (argOrDefault @hasPageTitleBlock true) (has-block \"pageTitle\"))\n @pageTitle\n )\n (and (argOrDefault @hasDefaultBlock true) (has-block \"default\"))\n as |responsive alignItems isResponsiveBreakpoint hasDescriptionBlock hasRightSideItemsBlock hasPageTitleBlock hasDefaultBlock|\n }}\n <div\n class={{classNames\n \"euiPageHeaderContent\"\n (if @restrictWidth \"euiPanel--restrictWidth-custom\" \"\")\n }}\n {{style (inlineStyles width=@restrictWidth)}}\n {{useIsWithinBreakpoints\n sizes=(array \"xs\" \"s\")\n isActive=(not (not responsive))\n setIsWithinBreakpointsValue=isResponsiveBreakpoint.setState\n }}\n ...attributes\n >\n {{#if @breadcrumbs}}\n <EuiBreadcrumbs\n @breadcrumbs={{@breadcrumbs}}\n class={{@breadcrumbProps.className}}\n />\n <EuiSpacer @size=\"s\" />\n {{/if}}\n {{#if (or (eq alignItems \"top\") isResponsiveBreakpoint.value)}}\n <EuiFlexGroup\n class=\"euiPageHeaderContent__top\"\n @responsive={{not (not responsive)}}\n @alignItems={{if hasPageTitleBlock \"flexStart\" \"baseline\"}}\n @gutterSize=\"l\"\n >\n {{#if (and isResponsiveBreakpoint.value (eq responsive \"reverse\"))}}\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup\n @wrap={{true}}\n @responsive={{false}}\n class={{classNames\n \"euiPageHeaderContent__rightSideItems\"\n @rightSideGroupProps.className\n }}\n >\n {{yield\n (component EuiFlexItem grow=false)\n to=\"rightSideItems\"\n }}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs\n @size=\"xl\"\n @display=\"condensed\"\n @bottomBorder={{false}}\n >\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle\n class={{@pageTitleProps.className}}\n @size=\"l\"\n @tagName=\"h1\"\n >\n {{#if @iconType}}\n <EuiIcon\n @size=\"xl\"\n @type={{@iconType}}\n @iconClasses={{classNames\n \"euiPageHeaderContent__titleIcon\"\n @iconProps.className\n }}\n />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n </EuiFlexItem>\n {{else}}\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs\n @size=\"xl\"\n @display=\"condensed\"\n @bottomBorder={{false}}\n >\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle\n class={{@pageTitleProps.className}}\n @size=\"l\"\n @tagName=\"h1\"\n >\n {{#if @iconType}}\n <EuiIcon\n @size=\"xl\"\n @type={{@iconType}}\n @iconClasses={{classNames\n \"euiPageHeaderContent__titleIcon\"\n @iconProps.className\n }}\n />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n </EuiFlexItem>\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup\n @wrap={{true}}\n @responsive={{false}}\n class={{classNames\n \"euiPageHeaderContent__rightSideItems\"\n @rightSideGroupProps.className\n }}\n >\n {{yield\n (component EuiFlexItem grow=false)\n to=\"rightSideItems\"\n }}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n {{/if}}\n </EuiFlexGroup>\n {{#if (or hasDefaultBlock (and hasPageTitleBlock @tabs))}}\n <div class=\"euiPageHeaderContent__bottom\">\n <EuiSpacer />\n {{yield to=\"default\"}}\n {{#if hasPageTitleBlock}}\n <EuiTabs @size=\"l\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n </div>\n {{/if}}\n {{else}}\n <EuiFlexGroup\n class=\"euiPageHeaderContent__top\"\n @responsive={{not (not responsive)}}\n {{!@glint-expect-error}}\n @alignItems={{if (eq alignItems \"bottom\") \"flexEnd\" alignItems}}\n @gutterSize=\"l\"\n >\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs\n @size=\"xl\"\n @display=\"condensed\"\n @bottomBorder={{false}}\n >\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle\n class={{@pageTitleProps.className}}\n @size=\"l\"\n @tagName=\"h1\"\n >\n {{#if @iconType}}\n <EuiIcon\n @size=\"xl\"\n @type={{@iconType}}\n @iconClasses={{classNames\n \"euiPageHeaderContent__titleIcon\"\n @iconProps.className\n }}\n />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n {{#if (or hasDefaultBlock (and hasPageTitleBlock @tabs))}}\n <div class=\"euiPageHeaderContent__bottom\">\n <EuiSpacer />\n {{yield to=\"default\"}}\n {{#if hasPageTitleBlock}}\n <EuiTabs\n @size=\"l\"\n @display=\"condensed\"\n @bottomBorder={{false}}\n >\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n </div>\n {{/if}}\n </EuiFlexItem>\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup\n @wrap={{true}}\n @responsive={{false}}\n class={{classNames\n \"euiPageHeaderContent__rightSideItems\"\n @rightSideGroupProps.className\n }}\n >\n {{yield\n (component EuiFlexItem grow=false)\n to=\"rightSideItems\"\n }}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n </EuiFlexGroup>\n {{/if}}\n </div>\n {{/let}}\n </template>\n}\n"],"names":["TEMPLATES","EuiPageHeaderContent","Component","g","prototype","argOrDefaultDecorator","i","void 0","classes","concat","fullHeightClass","fullHeight","canFullHeight","template","setComponentTemplate","precompileTemplate","strictMode","scope","argOrDefault","useState","and","or","classNames","style","inlineStyles","useIsWithinBreakpoints","array","not","EuiBreadcrumbs","EuiSpacer","eq","EuiFlexGroup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,YAAA;QAAAC,QAAA;QAAAC,GAAA;QAAAC,EAAA;QAAAC,UAAA;QAAAC,KAAA;QAAAC,YAAA;QAAAC,sBAAA;QAAAC,KAAA;QAAAC,GAAA;QAAAC,cAAA;QAAAC,SAAA;QAAAC,EAAA;QAAAC,YAAA;QAAAC,WAAA;QAAAC,OAAA;QAAAC,MAAA;QAAAC,EAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,OAAA;AAAAC,iBAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
1
|
+
{"version":3,"file":"eui-page-header-content.js","sources":["../../src/components/eui-page-header-content.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { array } from '@ember/helper';\nimport { on } from '@ember/modifier';\n\nimport optional from '@nullvoxpopuli/ember-composable-helpers/helpers/optional';\nimport style from 'ember-style-modifier/modifiers/style';\nimport { and, eq, not, or } from 'ember-truth-helpers';\n\nimport argOrDefault, {\n argOrDefaultDecorator\n} from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport inlineStyles from '../helpers/inline-styles.ts';\nimport useState from '../helpers/use-state.ts';\nimport useIsWithinBreakpoints from '../modifiers/use-is-within-breakpoints.ts';\nimport EuiBreadcrumbs from './eui-breadcrumbs.gts';\nimport EuiFlexGroup from './eui-flex-group.gts';\nimport EuiFlexItem from './eui-flex-item.gts';\nimport EuiIcon from './eui-icon.gts';\nimport EuiSpacer from './eui-spacer.gts';\nimport EuiTab from './eui-tab.gts';\nimport EuiTabs from './eui-tabs.gts';\nimport EuiText from './eui-text.gts';\nimport EuiTitle from './eui-title.gts';\n\nimport type { paddingSizeMapping } from '../utils/css-mappings/eui-page-content-body.ts';\nimport type { EuiButtomBarArgs } from './eui-bottom-bar';\nimport type { EuiBreadcrumbsSignature } from './eui-breadcrumbs';\nimport type { EuiIconSignature } from './eui-icon';\nimport type { IEuiTab } from './eui-tab';\nimport type { WithBoundArgs } from '@glint/template';\n\nexport const TEMPLATES = [\n 'default',\n 'centeredBody',\n 'centeredContent',\n 'empty'\n] as const;\n\ntype Tab = IEuiTab & {\n label?: string;\n onClick?: () => void;\n};\n\nexport type EuiPageHeaderContentProps = {\n template?: (typeof TEMPLATES)[number];\n /**\n * Gets passed along to the #EuiBottomBar component if `bottomBar` has contents\n */\n bottomBarProps?: EuiButtomBarArgs;\n /* Stretches or restricts the height to 100% of the parent;\n * `true`: scrolls the EuiPageContentBody;\n * `noscroll`: removes all scroll ability;\n * Only works when `template = 'default | empty'` and breakpoint is `m` and above\n */\n fullHeight?: boolean;\n /**\n * Minimum height in which to enforce scrolling\n */\n minHeight?: number;\n\n /**\n * Restrict the width of the page content body\n */\n restrictWidth?: boolean | string;\n\n /**\n * Adds a bottom border to the page header\n */\n bottomBorder?: boolean;\n\n /**\n * Adds a bottom border to the page content body\n */\n bodyBottomBorder?: boolean;\n\n /**\n * Adds a bottom border to the page content body\n */\n bodyProps?: {\n /**\n * Adds padding to the page content body\n */\n paddingSize?: keyof typeof paddingSizeMapping;\n };\n /**\n * Adds a bottom border to the page content body\n */\n contentProps?: {\n /**\n * Adds padding to the page content body\n */\n paddingSize?: keyof typeof paddingSizeMapping;\n };\n\n alignItems?: 'top' | 'bottom' | 'center' | 'stretch';\n\n responsive?: boolean | 'reverse';\n\n hasDescriptionBlock?: boolean;\n\n hasRightSideItemsBlock?: boolean;\n\n hasPageTitleBlock?: boolean;\n\n hasDefaultBlock?: boolean;\n\n pageTitle?: string;\n\n breadcrumbs?: EuiBreadcrumbsSignature['Args']['breadcrumbs'];\n\n breadcrumbProps?: {\n className?: string;\n };\n\n rightSideGroupProps?: {\n className?: string;\n };\n\n pageTitleProps?: {\n className?: string;\n };\n\n iconType?: EuiIconSignature['Args']['type'];\n\n description?: string;\n\n iconProps?: {\n className?: string;\n };\n\n tabs?: Tab[];\n};\n\nexport interface EuiPageHeaderContentSignature {\n Element: HTMLDivElement;\n Args: EuiPageHeaderContentProps;\n Blocks: {\n default: [];\n pageTitle: [];\n description: [];\n rightSideItems: [WithBoundArgs<typeof EuiFlexItem, 'grow'>?];\n };\n}\n\nexport default class EuiPageHeaderContent extends Component<EuiPageHeaderContentSignature> {\n // Defaults\n @argOrDefaultDecorator(460) minHeight!: number;\n @argOrDefaultDecorator(false) fullHeight!: boolean;\n @argOrDefaultDecorator('default') template!: (typeof TEMPLATES)[number];\n\n get classes() {\n return 'euiPageTemplate '.concat(this.fullHeightClass);\n }\n\n get fullHeightClass() {\n return this.fullHeight && this.canFullHeight\n ? 'eui-fullHeight eui-yScroll'\n : '';\n }\n\n get canFullHeight() {\n return this.template === 'default' || this.template === 'empty';\n }\n\n <template>\n {{#let\n (argOrDefault @responsive true)\n (argOrDefault @alignItems \"top\")\n (useState false)\n (and (argOrDefault @hasDescriptionBlock true) (has-block \"description\"))\n (and\n (argOrDefault @hasRightSideItemsBlock true) (has-block \"rightSideItems\")\n )\n (or\n (and (argOrDefault @hasPageTitleBlock true) (has-block \"pageTitle\"))\n @pageTitle\n )\n (and (argOrDefault @hasDefaultBlock true) (has-block \"default\"))\n as |responsive alignItems isResponsiveBreakpoint hasDescriptionBlock hasRightSideItemsBlock hasPageTitleBlock hasDefaultBlock|\n }}\n <div\n class={{classNames\n \"euiPageHeaderContent\"\n (if @restrictWidth \"euiPanel--restrictWidth-custom\" \"\")\n }}\n {{style (inlineStyles width=@restrictWidth)}}\n {{useIsWithinBreakpoints\n sizes=(array \"xs\" \"s\")\n isActive=(not (not responsive))\n setIsWithinBreakpointsValue=isResponsiveBreakpoint.setState\n }}\n ...attributes\n >\n {{#if @breadcrumbs}}\n <EuiBreadcrumbs\n @breadcrumbs={{@breadcrumbs}}\n class={{@breadcrumbProps.className}}\n />\n <EuiSpacer @size=\"s\" />\n {{/if}}\n {{#if (or (eq alignItems \"top\") isResponsiveBreakpoint.value)}}\n <EuiFlexGroup\n class=\"euiPageHeaderContent__top\"\n @responsive={{not (not responsive)}}\n @alignItems={{if hasPageTitleBlock \"flexStart\" \"baseline\"}}\n @gutterSize=\"l\"\n >\n {{#if (and isResponsiveBreakpoint.value (eq responsive \"reverse\"))}}\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup\n @wrap={{true}}\n @responsive={{false}}\n class={{classNames\n \"euiPageHeaderContent__rightSideItems\"\n @rightSideGroupProps.className\n }}\n >\n {{yield\n (component EuiFlexItem grow=false)\n to=\"rightSideItems\"\n }}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs\n @size=\"xl\"\n @display=\"condensed\"\n @bottomBorder={{false}}\n >\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle\n class={{@pageTitleProps.className}}\n @size=\"l\"\n @tagName=\"h1\"\n >\n {{#if @iconType}}\n <EuiIcon\n @size=\"xl\"\n @type={{@iconType}}\n @iconClasses={{classNames\n \"euiPageHeaderContent__titleIcon\"\n @iconProps.className\n }}\n />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n </EuiFlexItem>\n {{else}}\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs\n @size=\"xl\"\n @display=\"condensed\"\n @bottomBorder={{false}}\n >\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle\n class={{@pageTitleProps.className}}\n @size=\"l\"\n @tagName=\"h1\"\n >\n {{#if @iconType}}\n <EuiIcon\n @size=\"xl\"\n @type={{@iconType}}\n @iconClasses={{classNames\n \"euiPageHeaderContent__titleIcon\"\n @iconProps.className\n }}\n />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n </EuiFlexItem>\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup\n @wrap={{true}}\n @responsive={{false}}\n class={{classNames\n \"euiPageHeaderContent__rightSideItems\"\n @rightSideGroupProps.className\n }}\n >\n {{yield\n (component EuiFlexItem grow=false)\n to=\"rightSideItems\"\n }}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n {{/if}}\n </EuiFlexGroup>\n {{#if (or hasDefaultBlock (and hasPageTitleBlock @tabs))}}\n <div class=\"euiPageHeaderContent__bottom\">\n <EuiSpacer />\n {{yield to=\"default\"}}\n {{#if hasPageTitleBlock}}\n <EuiTabs @size=\"l\" @display=\"condensed\" @bottomBorder={{false}}>\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n </div>\n {{/if}}\n {{else}}\n <EuiFlexGroup\n class=\"euiPageHeaderContent__top\"\n @responsive={{not (not responsive)}}\n {{!@glint-expect-error}}\n @alignItems={{if (eq alignItems \"bottom\") \"flexEnd\" alignItems}}\n @gutterSize=\"l\"\n >\n <EuiFlexItem>\n {{#if (and (not hasPageTitleBlock) @tabs)}}\n <EuiTabs\n @size=\"xl\"\n @display=\"condensed\"\n @bottomBorder={{false}}\n >\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n {{#if hasPageTitleBlock}}\n <EuiTitle\n class={{@pageTitleProps.className}}\n @size=\"l\"\n @tagName=\"h1\"\n >\n {{#if @iconType}}\n <EuiIcon\n @size=\"xl\"\n @type={{@iconType}}\n @iconClasses={{classNames\n \"euiPageHeaderContent__titleIcon\"\n @iconProps.className\n }}\n />\n {{/if}}\n\n {{@pageTitle}}\n {{yield to=\"pageTitle\"}}\n </EuiTitle>\n {{/if}}\n\n {{#if hasDescriptionBlock}}\n {{#if (or hasPageTitleBlock @tabs)}}\n <EuiSpacer />\n {{/if}}\n <EuiText @grow={{false}}>\n {{@description}}\n {{yield to=\"description\"}}\n </EuiText>\n {{/if}}\n {{#if (or hasDefaultBlock (and hasPageTitleBlock @tabs))}}\n <div class=\"euiPageHeaderContent__bottom\">\n <EuiSpacer />\n {{yield to=\"default\"}}\n {{#if hasPageTitleBlock}}\n <EuiTabs\n @size=\"l\"\n @display=\"condensed\"\n @bottomBorder={{false}}\n >\n {{#each @tabs as |tab|}}\n <EuiTab\n @id={{tab.id}}\n @disabled={{tab.disabled}}\n @isSelected={{tab.isSelected}}\n @href={{tab.href}}\n {{on \"click\" (optional tab.onClick)}}\n >\n {{tab.label}}\n </EuiTab>\n {{/each}}\n </EuiTabs>\n {{/if}}\n </div>\n {{/if}}\n </EuiFlexItem>\n {{#if hasRightSideItemsBlock}}\n <EuiFlexItem @grow={{false}}>\n <EuiFlexGroup\n @wrap={{true}}\n @responsive={{false}}\n @gutterSize=\"m\"\n class={{classNames\n \"euiPageHeaderContent__rightSideItems\"\n @rightSideGroupProps.className\n }}\n >\n {{yield\n (component EuiFlexItem grow=false)\n to=\"rightSideItems\"\n }}\n </EuiFlexGroup>\n </EuiFlexItem>\n {{/if}}\n </EuiFlexGroup>\n {{/if}}\n </div>\n {{/let}}\n </template>\n}\n"],"names":["TEMPLATES","EuiPageHeaderContent","Component","g","prototype","argOrDefaultDecorator","i","void 0","classes","concat","fullHeightClass","fullHeight","canFullHeight","template","setComponentTemplate","precompileTemplate","strictMode","scope","argOrDefault","useState","and","or","classNames","style","inlineStyles","useIsWithinBreakpoints","array","not","EuiBreadcrumbs","EuiSpacer","eq","EuiFlexGroup","EuiFlexItem","EuiTabs","EuiTab","on","optional","EuiTitle","EuiIcon","EuiText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgCO,MAAMA,SAAY,GAAA,CACvB,SAAA,EACA,cAAA,EACA,iBAAA,EACA,OAAA;AA6Ga,MAAMC,6BAA6BC,SAAU,CAAA;AAAA,EAAA;AAAAC,IAAAA,CAAA,MAAAC,SAAA,EAAA,WAAA,EAAA,CAEzDC,qBAAsB,CAAA,GAAA,CAAA,CAAA,CAAA;AAAA;AAAA,EAAA,UAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,WAAA,CAAA,EAAAC,MAAA,EADvB;AAAA,EAAA;AAAAJ,IAAAA,CAAA,MAAAC,SAAA,EAAA,YAAA,EAAA,CAECC,qBAAsB,CAAA,KAAA,CAAA,CAAA,CAAA;AAAA;AAAA,EAAA,WAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,YAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;AAAAJ,IAAAA,CAAA,MAAAC,SAAA,EAAA,UAAA,EAAA,CACtBC,qBAAsB,CAAA,SAAA,CAAA,CAAA,CAAA;AAAA;AAAA,EAAA,SAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,UAAA,CAAA,EAAAC,MAAA;EAEvB,IAAIC,OAAUA,GAAA;AACZ,IAAA,OAAO,kBAAmB,CAAAC,MAAM,CAAC,IAAI,CAACC,eAAe,CAAA;AACvD;EAEA,IAAIA,eAAkBA,GAAA;IACpB,OAAO,IAAI,CAACC,UAAU,IAAI,IAAI,CAACC,aAAa,GACxC,4BACA,GAAA,EAAA;AACN;EAEA,IAAIA,aAAgBA,GAAA;IAClB,OAAO,IAAI,CAACC,QAAQ,KAAK,aAAa,IAAI,CAACA,QAAQ,KAAK,OAAA;AAC1D;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CA0TA,+lRAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,YAAA;QAAAC,QAAA;QAAAC,GAAA;QAAAC,EAAA;QAAAC,UAAA;QAAAC,KAAA;QAAAC,YAAA;QAAAC,sBAAA;QAAAC,KAAA;QAAAC,GAAA;QAAAC,cAAA;QAAAC,SAAA;QAAAC,EAAA;QAAAC,YAAA;QAAAC,WAAA;QAAAC,OAAA;QAAAC,MAAA;QAAAC,EAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,OAAA;AAAAC,iBAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-stat.js","sources":["../../src/components/eui-stat.gts"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nimport argOrDefault from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport screenReaderOnly from '../modifiers/screen-reader-only.ts';\nimport { colorMapping } from '../utils/css-mappings/eui-stat.ts';\nimport EuiStatDescription from './eui-stat/description.gts';\nimport EuiStatTitle from './eui-stat/title.gts';\n\nimport type {textAlignMapping } from '../utils/css-mappings/eui-stat.ts';\nimport type { EuiStatDescriptionSignature } from './eui-stat/description';\nimport type { EuiStatTitleSignature } from './eui-stat/title';\nimport type { TemplateOnlyComponent } from '@ember/component/template-only';\n\nexport interface EuiStatSignature {\n Element: HTMLDivElement;\n Args: {\n textAlign?: keyof typeof textAlignMapping;\n title
|
|
1
|
+
{"version":3,"file":"eui-stat.js","sources":["../../src/components/eui-stat.gts"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nimport argOrDefault from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport screenReaderOnly from '../modifiers/screen-reader-only.ts';\nimport { colorMapping } from '../utils/css-mappings/eui-stat.ts';\nimport EuiStatDescription from './eui-stat/description.gts';\nimport EuiStatTitle from './eui-stat/title.gts';\n\nimport type {textAlignMapping } from '../utils/css-mappings/eui-stat.ts';\nimport type { EuiStatDescriptionSignature } from './eui-stat/description';\nimport type { EuiStatTitleSignature } from './eui-stat/title';\nimport type { TemplateOnlyComponent } from '@ember/component/template-only';\n\nexport interface EuiStatSignature {\n Element: HTMLDivElement;\n Args: {\n textAlign?: keyof typeof textAlignMapping;\n title?: string;\n description?: string;\n titleColor?: keyof typeof colorMapping;\n titleSize?: EuiStatTitleSignature['Args']['titleSize'];\n isLoading?: boolean;\n reverse?: boolean;\n screenReader?: boolean;\n titleElement?: string;\n descriptionElement?: EuiStatDescriptionSignature['Args']['descriptionElement'];\n };\n Blocks: {\n title: [];\n description: [];\n default: [];\n };\n}\n\nconst isColorClass = helper(([input]: [string | undefined]) => {\n if (!input) return false;\n\n return colorMapping.hasOwnProperty(input);\n});\n\nconst useScreenReader = helper(\n ([title, description]: [string | undefined, string | undefined]) => {\n return typeof title === 'string' && typeof description === 'string';\n }\n);\n\nconst EuiStat: TemplateOnlyComponent<EuiStatSignature> = <template>\n {{#let\n (classNames\n textAlign=(argOrDefault @textAlign \"left\") componentName=\"EuiStat\"\n )\n (classNames\n \"euiStat__title\"\n (if @isLoading \"euiStat__title-isLoading\")\n color=(argOrDefault @titleColor \"default\")\n addBase=false\n componentName=\"EuiStat\"\n )\n (argOrDefault @reverse false)\n (argOrDefault @titleSize \"l\")\n as |classes titleClasses reverse titleSize|\n }}\n <div class={{classes}} ...attributes>\n {{#if reverse}}\n <EuiStatTitle\n class={{titleClasses}}\n @titleElement={{@titleElement}}\n @titleSize={{titleSize}}\n @isColorClass={{isColorClass @titleColor}}\n >\n {{#if @isLoading}}\n --\n {{else}}\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n {{/if}}\n </EuiStatTitle>\n <EuiStatDescription @descriptionElement={{@descriptionElement}}>\n {{#if (has-block \"description\")}}\n {{yield to=\"description\"}}\n {{else}}\n {{@description}}\n {{/if}}\n </EuiStatDescription>\n {{else}}\n <EuiStatDescription @descriptionElement={{@descriptionElement}}>\n {{#if (has-block \"description\")}}\n {{yield to=\"description\"}}\n {{else}}\n {{@description}}\n {{/if}}\n </EuiStatDescription>\n <EuiStatTitle\n class={{titleClasses}}\n @titleElement={{@titleElement}}\n @titleSize={{titleSize}}\n @isColorClass={{isColorClass @titleColor}}\n >\n {{#if @isLoading}}\n --\n {{else}}\n {{#if (has-block \"title\")}}\n {{yield to=\"title\"}}\n {{else}}\n {{@title}}\n {{/if}}\n {{/if}}\n </EuiStatTitle>\n {{/if}}\n {{#if (useScreenReader @title @description)}}\n <p {{screenReaderOnly}}>\n {{#if reverse}}\n {{@title}}\n {{@description}}\n {{else}}\n {{@description}}\n {{@title}}\n {{/if}}\n </p>\n {{/if}}\n {{yield}}\n </div>\n {{/let}}\n</template>;\n\nexport default EuiStat;\n"],"names":["isColorClass","helper","input","colorMapping","hasOwnProperty","useScreenReader","title","description","EuiStat","setComponentTemplate","precompileTemplate","strictMode","scope","classNames","argOrDefault","EuiStatTitle","EuiStatDescription","screenReaderOnly","templateOnly"],"mappings":";;;;;;;;;;;AAmCA,MAAMA,YAAA,GAAeC,OAAO,CAAC,CAACC,MAA4B,KAAA;AACxD,EAAA,IAAI,CAACA,OAAO,OAAO,KAAA;AAEnB,EAAA,OAAOC,YAAA,CAAaC,cAAc,CAACF,KAAA,CAAA;AACrC,CAAA,CAAA;AAEA,MAAMG,eAAkB,GAAAJ,MAAA,CACtB,CAAC,CAACK,KAAO,EAAAC,WAAA,CAAsD,KAAA;EAC7D,OAAO,OAAOD,KAAA,KAAU,QAAY,IAAA,OAAOC,WAAgB,KAAA,QAAA;AAC7D,CAAA,CAAA;AAGF,MAAMC,OAAmD,GAAAC,oBAAA,CAAAC,kBAAA,CAgFzD,wlEAAA,EAAA;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;IAAAC,UAAA;IAAAC,YAAA;IAAAC,YAAA;IAAAf,YAAA;IAAAgB,kBAAA;IAAAX,eAAA;AAAAY,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;;;;"}
|
|
@@ -48,7 +48,7 @@ class ResizeObserver extends Modifier {
|
|
|
48
48
|
width,
|
|
49
49
|
height
|
|
50
50
|
}) {
|
|
51
|
-
let [dimension] = this.positional;
|
|
51
|
+
let [dimension] = this.positional || [];
|
|
52
52
|
const doesWidthMatter = dimension !== 'height';
|
|
53
53
|
const doesHeightMatter = dimension !== 'width';
|
|
54
54
|
if (doesWidthMatter && width !== this.width || doesHeightMatter && height !== this.height) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-observer.js","sources":["../../src/modifiers/resize-observer.ts"],"sourcesContent":["import { registerDestructor } from '@ember/destroyable';\nimport { action } from '@ember/object';\n\nimport Modifier from 'ember-modifier';\n\n// IE11 and Safari don't support the `ResizeObserver` API at the time of writing\nconst hasResizeObserver =\n typeof window !== 'undefined' &&\n typeof (window as any).ResizeObserver !== 'undefined';\n\nexport interface Observer {\n disconnect: () => void;\n observe: (element: Element, options?: { [key: string]: any }) => void;\n}\n\nconst mutationObserverOptions = {\n // [MutationObserverInit](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserverInit)\n attributes: true, // Account for style changes from `className` or `style`\n characterData: true, // Account for text content size differences\n childList: true, // Account for adding/removing child nodes\n subtree: true // Account for deep child nodes\n};\n\ninterface ResizeObserverSignature {\n Element: Element;\n Args: {\n Positional: ['width' | 'height'] | [];\n Named: {\n onResize: (dimensions: { height: number; width: number }) => void;\n };\n };\n}\n\nconst makeCompatibleObserver = (node: Element, callback: () => void) => {\n const observer = new MutationObserver(callback);\n //eslint-disable-next-line\n observer.observe(node, mutationObserverOptions);\n\n window.addEventListener('resize', callback);\n\n const _disconnect = observer.disconnect.bind(observer);\n\n observer.disconnect = () => {\n _disconnect();\n window.removeEventListener('resize', callback);\n };\n\n return observer;\n};\n\nconst makeResizeObserver = (node: Element, callback: () => void) => {\n let observer: Observer | undefined;\n\n if (hasResizeObserver) {\n observer = new (window as any).ResizeObserver(callback);\n observer!.observe(node);\n } else {\n observer = makeCompatibleObserver(node, callback);\n requestAnimationFrame(callback); // Mimic ResizeObserver behavior of triggering a resize event on init\n }\n\n return observer;\n};\n\nexport default class ResizeObserver extends Modifier<ResizeObserverSignature> {\n height: number = 0;\n width: number = 0;\n observer: Observer | null = null;\n\n element: Element | null = null;\n named: ResizeObserverSignature['Args']['Named'] | null = null;\n positional: ResizeObserverSignature['Args']['Positional'] | null = null;\n\n @action\n setSize({ width, height }: { width: number; height: number }) {\n let [dimension] = this.positional
|
|
1
|
+
{"version":3,"file":"resize-observer.js","sources":["../../src/modifiers/resize-observer.ts"],"sourcesContent":["import { registerDestructor } from '@ember/destroyable';\nimport { action } from '@ember/object';\n\nimport Modifier from 'ember-modifier';\n\n// IE11 and Safari don't support the `ResizeObserver` API at the time of writing\nconst hasResizeObserver =\n typeof window !== 'undefined' &&\n typeof (window as any).ResizeObserver !== 'undefined';\n\nexport interface Observer {\n disconnect: () => void;\n observe: (element: Element, options?: { [key: string]: any }) => void;\n}\n\nconst mutationObserverOptions = {\n // [MutationObserverInit](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserverInit)\n attributes: true, // Account for style changes from `className` or `style`\n characterData: true, // Account for text content size differences\n childList: true, // Account for adding/removing child nodes\n subtree: true // Account for deep child nodes\n};\n\ninterface ResizeObserverSignature {\n Element: Element;\n Args: {\n Positional: ['width' | 'height'] | [];\n Named: {\n onResize: (dimensions: { height: number; width: number }) => void;\n };\n };\n}\n\nconst makeCompatibleObserver = (node: Element, callback: () => void) => {\n const observer = new MutationObserver(callback);\n //eslint-disable-next-line\n observer.observe(node, mutationObserverOptions);\n\n window.addEventListener('resize', callback);\n\n const _disconnect = observer.disconnect.bind(observer);\n\n observer.disconnect = () => {\n _disconnect();\n window.removeEventListener('resize', callback);\n };\n\n return observer;\n};\n\nconst makeResizeObserver = (node: Element, callback: () => void) => {\n let observer: Observer | undefined;\n\n if (hasResizeObserver) {\n observer = new (window as any).ResizeObserver(callback);\n observer!.observe(node);\n } else {\n observer = makeCompatibleObserver(node, callback);\n requestAnimationFrame(callback); // Mimic ResizeObserver behavior of triggering a resize event on init\n }\n\n return observer;\n};\n\nexport default class ResizeObserver extends Modifier<ResizeObserverSignature> {\n height: number = 0;\n width: number = 0;\n observer: Observer | null = null;\n\n element: Element | null = null;\n named: ResizeObserverSignature['Args']['Named'] | null = null;\n positional: ResizeObserverSignature['Args']['Positional'] | null = null;\n\n @action\n setSize({ width, height }: { width: number; height: number }) {\n let [dimension] = this.positional || [];\n\n const doesWidthMatter = dimension !== 'height';\n const doesHeightMatter = dimension !== 'width';\n\n if (\n (doesWidthMatter && width !== this.width) ||\n (doesHeightMatter && height !== this.height)\n ) {\n this.width = width;\n this.height = height;\n this.named?.onResize({ width, height });\n }\n }\n\n modify(\n element: Element,\n positional: ResizeObserverSignature['Args']['Positional'] = [],\n named: ResizeObserverSignature['Args']['Named']\n ) {\n this.element = element;\n this.named = named;\n this.positional = positional;\n this._setup();\n registerDestructor(this, () => this._teardown());\n }\n\n _setup() {\n let { setSize, element } = this;\n\n if (element != null) {\n // ResizeObserver's first call to the observation callback is scheduled in the future\n // so find the element's initial dimensions now\n const boundingRect = element.getBoundingClientRect();\n\n setSize({\n width: boundingRect.width,\n height: boundingRect.height\n });\n\n this.observer = makeResizeObserver(element, () => {\n if (!element) {\n return;\n }\n\n const boundingRect = element.getBoundingClientRect();\n\n setSize({\n width: boundingRect.width,\n height: boundingRect.height\n });\n })!;\n } else {\n setSize({\n width: 0,\n height: 0\n });\n }\n }\n\n _teardown() {\n this.observer?.disconnect();\n this.observer = null;\n this.element = null;\n this.named = null;\n this.positional = null;\n }\n}\n"],"names":["hasResizeObserver","window","ResizeObserver","mutationObserverOptions","attributes","characterData","childList","subtree","makeCompatibleObserver","node","callback","observer","MutationObserver","observe","addEventListener","_disconnect","disconnect","bind","removeEventListener","makeResizeObserver","requestAnimationFrame","Modifier","height","width","element","named","positional","setSize","dimension","doesWidthMatter","doesHeightMatter","onResize","n","prototype","action","modify","_setup","registerDestructor","_teardown","boundingRect","getBoundingClientRect"],"mappings":";;;;;AAMA,MAAMA,iBAAiB,GACrB,OAAOC,MAAM,KAAK,WAAW,IAC7B,OAAQA,MAAM,CAASC,cAAc,KAAK,WAAW;AAOvD,MAAMC,uBAAuB,GAAG;AAC9B;AACAC,EAAAA,UAAU,EAAE,IAAI;AAAE;AAClBC,EAAAA,aAAa,EAAE,IAAI;AAAE;AACrBC,EAAAA,SAAS,EAAE,IAAI;AAAE;EACjBC,OAAO,EAAE,IAAI;AACf,CAAC;AAYD,MAAMC,sBAAsB,GAAGA,CAACC,IAAa,EAAEC,QAAoB,KAAK;AACtE,EAAA,MAAMC,QAAQ,GAAG,IAAIC,gBAAgB,CAACF,QAAQ,CAAC;AAC/C;AACAC,EAAAA,QAAQ,CAACE,OAAO,CAACJ,IAAI,EAAEN,uBAAuB,CAAC;AAE/CF,EAAAA,MAAM,CAACa,gBAAgB,CAAC,QAAQ,EAAEJ,QAAQ,CAAC;EAE3C,MAAMK,WAAW,GAAGJ,QAAQ,CAACK,UAAU,CAACC,IAAI,CAACN,QAAQ,CAAC;EAEtDA,QAAQ,CAACK,UAAU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