@elasticias/ui 1.0.4 → 1.0.6

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.
@@ -4731,57 +4731,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
4731
4731
  }]
4732
4732
  }], propDecorators: { darkIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "darkIcon", required: false }] }], lightIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "lightIcon", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }] } });
4733
4733
 
4734
- /**
4735
- * Which build is running, for a footer or an about box.
4736
- *
4737
- * Reads `EF_BUILD_INFO` optionally and renders nothing when the app has not
4738
- * provided it, so a consumer that never wired a build stamp shows no empty
4739
- * line. The commit and branch go in the tooltip rather than the label: the
4740
- * date is what a person recognises, the hash is what you paste into an issue.
4741
- *
4742
- * ```html
4743
- * <ef-build-stamp owner="Elasticias" />
4744
- * ```
4745
- */
4746
- class EfBuildStampComponent {
4747
- /** Copyright holder shown before the build. Omit for the build alone. */
4748
- owner = input('', ...(ngDevMode ? [{ debugName: "owner" }] : /* istanbul ignore next */ []));
4749
- info = inject(EF_BUILD_INFO, { optional: true });
4750
- year = new Date().getFullYear();
4751
- detail = computed(() => this.info ? `${this.info.commit} · ${this.info.branch} · v${this.info.version}` : '', ...(ngDevMode ? [{ debugName: "detail" }] : /* istanbul ignore next */ []));
4752
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EfBuildStampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4753
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: EfBuildStampComponent, isStandalone: true, selector: "ef-build-stamp", inputs: { owner: { classPropertyName: "owner", publicName: "owner", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
4754
- @if (info) {
4755
- <span class="ef-build-stamp" [attr.title]="detail()">
4756
- @if (owner()) {
4757
- <span class="ef-build-stamp__owner">© {{ year }} {{ owner() }}</span>
4758
- <span class="ef-build-stamp__sep" aria-hidden="true">·</span>
4759
- }
4760
- <span class="ef-build-stamp__build">build {{ info.date }}</span>
4761
- </span>
4762
- }
4763
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4764
- }
4765
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EfBuildStampComponent, decorators: [{
4766
- type: Component,
4767
- args: [{
4768
- selector: 'ef-build-stamp',
4769
- standalone: true,
4770
- template: `
4771
- @if (info) {
4772
- <span class="ef-build-stamp" [attr.title]="detail()">
4773
- @if (owner()) {
4774
- <span class="ef-build-stamp__owner">© {{ year }} {{ owner() }}</span>
4775
- <span class="ef-build-stamp__sep" aria-hidden="true">·</span>
4776
- }
4777
- <span class="ef-build-stamp__build">build {{ info.date }}</span>
4778
- </span>
4779
- }
4780
- `,
4781
- changeDetection: ChangeDetectionStrategy.OnPush,
4782
- }]
4783
- }], propDecorators: { owner: [{ type: i0.Input, args: [{ isSignal: true, alias: "owner", required: false }] }] } });
4784
-
4785
4734
  /**
4786
4735
  * Comptoir-skinned tooltip.
4787
4736
  *
@@ -4828,6 +4777,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
4828
4777
  }]
4829
4778
  }] });
4830
4779
 
4780
+ /**
4781
+ * Which build is running, for a footer or an about box.
4782
+ *
4783
+ * Reads `EF_BUILD_INFO` optionally and renders nothing when the app has not
4784
+ * provided it, so a consumer that never wired a build stamp shows no empty
4785
+ * line. The commit and branch go in the tooltip rather than the label: the
4786
+ * date is what a person recognises, the hash is what you paste into an issue.
4787
+ *
4788
+ * ```html
4789
+ * <ef-build-stamp owner="Elasticias" />
4790
+ * ```
4791
+ */
4792
+ class EfBuildStampComponent {
4793
+ /** Copyright holder shown before the build. Omit for the build alone. */
4794
+ owner = input('', ...(ngDevMode ? [{ debugName: "owner" }] : /* istanbul ignore next */ []));
4795
+ info = inject(EF_BUILD_INFO, { optional: true });
4796
+ year = new Date().getFullYear();
4797
+ /**
4798
+ * A released build is known by its version; an unreleased one has no
4799
+ * version to be known by, so it shows what actually identifies it.
4800
+ *
4801
+ * That is not a cosmetic split. Only production is cut from a tag, so
4802
+ * only production has a number a person can repeat back to you. On
4803
+ * develop and staging the honest answer is where it came from and when.
4804
+ */
4805
+ label = computed(() => {
4806
+ if (!this.info)
4807
+ return '';
4808
+ if (this.info.version)
4809
+ return `v${this.info.version}`;
4810
+ return [this.info.environment, this.info.commit, this.info.date]
4811
+ .filter(Boolean)
4812
+ .join(' · ');
4813
+ }, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
4814
+ /** The rest of the identity, for when the label is only a version. */
4815
+ detail = computed(() => {
4816
+ if (!this.info)
4817
+ return '';
4818
+ return [this.info.commit, this.info.environment, this.info.date]
4819
+ .filter(Boolean)
4820
+ .join(' · ');
4821
+ }, ...(ngDevMode ? [{ debugName: "detail" }] : /* istanbul ignore next */ []));
4822
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EfBuildStampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4823
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: EfBuildStampComponent, isStandalone: true, selector: "ef-build-stamp", inputs: { owner: { classPropertyName: "owner", publicName: "owner", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
4824
+ @if (info) {
4825
+ <span class="ef-build-stamp" [efTooltip]="detail()" efTooltipPosition="bottom">
4826
+ @if (owner()) {
4827
+ <span class="ef-build-stamp__owner">© {{ year }} {{ owner() }}</span>
4828
+ <span class="ef-build-stamp__sep" aria-hidden="true">·</span>
4829
+ }
4830
+ <span class="ef-build-stamp__build">{{ label() }}</span>
4831
+ </span>
4832
+ }
4833
+ `, isInline: true, dependencies: [{ kind: "directive", type: EfTooltipDirective, selector: "[efTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4834
+ }
4835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EfBuildStampComponent, decorators: [{
4836
+ type: Component,
4837
+ args: [{
4838
+ selector: 'ef-build-stamp',
4839
+ standalone: true,
4840
+ imports: [EfTooltipDirective],
4841
+ template: `
4842
+ @if (info) {
4843
+ <span class="ef-build-stamp" [efTooltip]="detail()" efTooltipPosition="bottom">
4844
+ @if (owner()) {
4845
+ <span class="ef-build-stamp__owner">© {{ year }} {{ owner() }}</span>
4846
+ <span class="ef-build-stamp__sep" aria-hidden="true">·</span>
4847
+ }
4848
+ <span class="ef-build-stamp__build">{{ label() }}</span>
4849
+ </span>
4850
+ }
4851
+ `,
4852
+ changeDetection: ChangeDetectionStrategy.OnPush,
4853
+ }]
4854
+ }], propDecorators: { owner: [{ type: i0.Input, args: [{ isSignal: true, alias: "owner", required: false }] }] } });
4855
+
4831
4856
  class EfFieldsetComponent {
4832
4857
  /** Direct legend text (not translated) */
4833
4858
  legend;