@sneat/components 0.27.21 → 0.27.22

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.
@@ -1,19 +1,26 @@
1
- import { Component, ChangeDetectionStrategy } from '@angular/core';
2
- import { IonInput } from '@ionic/angular/ion-input';
1
+ import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
3
2
  import { IonItem } from '@ionic/angular/ion-item';
4
3
  import { IonItemDivider } from '@ionic/angular/ion-item-divider';
5
4
  import { IonLabel } from '@ionic/angular/ion-label';
6
- import { buildInfo } from './build-info';
5
+ import { IonNote } from '@ionic/angular/ion-note';
6
+ import { BUILD_INFO } from '@sneat/core-public';
7
+ import { buildInfo as placeholderBuildInfo } from './build-info';
7
8
  import * as i0 from "@angular/core";
8
9
  export class AppVersionComponent {
9
10
  constructor() {
10
- this.buildInfo = buildInfo;
11
+ // BUILD_INFO is optional so @sneat/components keeps working, unchanged,
12
+ // for every consumer that has not called provideBuildInfo() yet — it
13
+ // falls back to the never-restamped placeholders committed to
14
+ // ./build-info.ts. See @sneat/core-public's build-info.ts for why this is
15
+ // a runtime DI contract rather than a compile-time import.
16
+ this.buildInfo = inject(BUILD_INFO, { optional: true }) ?? placeholderBuildInfo;
17
+ this.shortGitHash = this.buildInfo.gitHash.substring(0, 7);
11
18
  }
12
19
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AppVersionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: AppVersionComponent, isStandalone: true, selector: "sneat-app-version", ngImport: i0, template: "<ion-item-divider color=\"light\">\n <ion-label>App version</ion-label>\n</ion-item-divider>\n<ion-item>\n <ion-input\n label=\"Build:\"\n color=\"medium\"\n readonly=\"true\"\n disabled=\"true\"\n [value]=\"\n buildInfo.gitHash.substring(0, 7) + ' @ ' + buildInfo.buildTimestamp\n \"\n [title]=\"buildInfo.gitHash\"\n />\n</ion-item>\n", dependencies: [{ kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: AppVersionComponent, isStandalone: true, selector: "sneat-app-version", ngImport: i0, template: "<ion-item-divider color=\"light\">\n <ion-label>App version</ion-label>\n</ion-item-divider>\n<ion-item lines=\"none\">\n <ion-label>Version</ion-label>\n <ion-note slot=\"end\" data-testid=\"build-info-version\">{{\n buildInfo.version\n }}</ion-note>\n</ion-item>\n<ion-item lines=\"none\">\n <ion-label>Build</ion-label>\n <ion-note\n slot=\"end\"\n data-testid=\"build-info-hash\"\n [title]=\"buildInfo.gitHash\"\n >{{ shortGitHash }} @ {{ buildInfo.buildTimestamp }}</ion-note\n >\n</ion-item>\n", dependencies: [{ kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14
21
  }
15
22
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AppVersionComponent, decorators: [{
16
23
  type: Component,
17
- args: [{ selector: 'sneat-app-version', changeDetection: ChangeDetectionStrategy.OnPush, imports: [IonItemDivider, IonLabel, IonItem, IonInput], template: "<ion-item-divider color=\"light\">\n <ion-label>App version</ion-label>\n</ion-item-divider>\n<ion-item>\n <ion-input\n label=\"Build:\"\n color=\"medium\"\n readonly=\"true\"\n disabled=\"true\"\n [value]=\"\n buildInfo.gitHash.substring(0, 7) + ' @ ' + buildInfo.buildTimestamp\n \"\n [title]=\"buildInfo.gitHash\"\n />\n</ion-item>\n" }]
24
+ args: [{ selector: 'sneat-app-version', changeDetection: ChangeDetectionStrategy.OnPush, imports: [IonItemDivider, IonLabel, IonItem, IonNote], template: "<ion-item-divider color=\"light\">\n <ion-label>App version</ion-label>\n</ion-item-divider>\n<ion-item lines=\"none\">\n <ion-label>Version</ion-label>\n <ion-note slot=\"end\" data-testid=\"build-info-version\">{{\n buildInfo.version\n }}</ion-note>\n</ion-item>\n<ion-item lines=\"none\">\n <ion-label>Build</ion-label>\n <ion-note\n slot=\"end\"\n data-testid=\"build-info-hash\"\n [title]=\"buildInfo.gitHash\"\n >{{ shortGitHash }} @ {{ buildInfo.buildTimestamp }}</ion-note\n >\n</ion-item>\n" }]
18
25
  }] });
19
26
  //# sourceMappingURL=app-version.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-version.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/app-version/app-version.component.ts","../../../../../../libs/components/src/lib/app-version/app-version.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAQzC,MAAM,OAAO,mBAAmB;IANhC;QAOqB,cAAS,GAAG,SAAS,CAAC;KAC1C;8GAFY,mBAAmB;kGAAnB,mBAAmB,6ECbhC,+WAeA,4CDJY,cAAc,kGAAE,QAAQ,6FAAE,OAAO,0NAAE,QAAQ;;2FAE1C,mBAAmB;kBAN/B,SAAS;+BACE,mBAAmB,mBAEZ,uBAAuB,CAAC,MAAM,WACtC,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC","sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { IonInput } from '@ionic/angular/ion-input';\nimport { IonItem } from '@ionic/angular/ion-item';\nimport { IonItemDivider } from '@ionic/angular/ion-item-divider';\nimport { IonLabel } from '@ionic/angular/ion-label';\nimport { buildInfo } from './build-info';\n\n@Component({\n selector: 'sneat-app-version',\n templateUrl: 'app-version.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [IonItemDivider, IonLabel, IonItem, IonInput],\n})\nexport class AppVersionComponent {\n protected readonly buildInfo = buildInfo;\n}\n","<ion-item-divider color=\"light\">\n <ion-label>App version</ion-label>\n</ion-item-divider>\n<ion-item>\n <ion-input\n label=\"Build:\"\n color=\"medium\"\n readonly=\"true\"\n disabled=\"true\"\n [value]=\"\n buildInfo.gitHash.substring(0, 7) + ' @ ' + buildInfo.buildTimestamp\n \"\n [title]=\"buildInfo.gitHash\"\n />\n</ion-item>\n"]}
1
+ {"version":3,"file":"app-version.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/app-version/app-version.component.ts","../../../../../../libs/components/src/lib/app-version/app-version.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAc,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,SAAS,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAC;;AAQjE,MAAM,OAAO,mBAAmB;IANhC;QAOE,wEAAwE;QACxE,qEAAqE;QACrE,8DAA8D;QAC9D,0EAA0E;QAC1E,2DAA2D;QACxC,cAAS,GAC1B,MAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,oBAAoB,CAAC;QAC9C,iBAAY,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KAC1E;8GATY,mBAAmB;kGAAnB,mBAAmB,6ECdhC,2gBAkBA,4CDNY,cAAc,kGAAE,QAAQ,6FAAE,OAAO,0NAAE,OAAO;;2FAEzC,mBAAmB;kBAN/B,SAAS;+BACE,mBAAmB,mBAEZ,uBAAuB,CAAC,MAAM,WACtC,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC","sourcesContent":["import { Component, ChangeDetectionStrategy, inject } from '@angular/core';\nimport { IonItem } from '@ionic/angular/ion-item';\nimport { IonItemDivider } from '@ionic/angular/ion-item-divider';\nimport { IonLabel } from '@ionic/angular/ion-label';\nimport { IonNote } from '@ionic/angular/ion-note';\nimport { BUILD_INFO, IBuildInfo } from '@sneat/core-public';\nimport { buildInfo as placeholderBuildInfo } from './build-info';\n\n@Component({\n selector: 'sneat-app-version',\n templateUrl: 'app-version.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [IonItemDivider, IonLabel, IonItem, IonNote],\n})\nexport class AppVersionComponent {\n // BUILD_INFO is optional so @sneat/components keeps working, unchanged,\n // for every consumer that has not called provideBuildInfo() yet — it\n // falls back to the never-restamped placeholders committed to\n // ./build-info.ts. See @sneat/core-public's build-info.ts for why this is\n // a runtime DI contract rather than a compile-time import.\n protected readonly buildInfo: IBuildInfo =\n inject(BUILD_INFO, { optional: true }) ?? placeholderBuildInfo;\n protected readonly shortGitHash = this.buildInfo.gitHash.substring(0, 7);\n}\n","<ion-item-divider color=\"light\">\n <ion-label>App version</ion-label>\n</ion-item-divider>\n<ion-item lines=\"none\">\n <ion-label>Version</ion-label>\n <ion-note slot=\"end\" data-testid=\"build-info-version\">{{\n buildInfo.version\n }}</ion-note>\n</ion-item>\n<ion-item lines=\"none\">\n <ion-label>Build</ion-label>\n <ion-note\n slot=\"end\"\n data-testid=\"build-info-hash\"\n [title]=\"buildInfo.gitHash\"\n >{{ shortGitHash }} @ {{ buildInfo.buildTimestamp }}</ion-note\n >\n</ion-item>\n"]}
@@ -1,4 +1,16 @@
1
+ // Fallback shown by AppVersionComponent when no app has called
2
+ // `provideBuildInfo()` (see @sneat/core-public's build-info.ts for the
3
+ // runtime contract). This file's own values are placeholders baked into
4
+ // the published @sneat/components package at *sneat-libs'* own build — they
5
+ // never reflect a consuming app's real git hash, so they only render when
6
+ // nothing overrides BUILD_INFO. A consuming app gets its own real values by
7
+ // running `sneat-stamp-build-info` (published as @sneat/build-info) against
8
+ // its own `build-info.ts` and calling `provideBuildInfo(buildInfo)` at
9
+ // bootstrap — see libs/build-info/README.md for the full recipe.
10
+ //
11
+ // TODO: Needs pre-commit hook to check gitHash and buildTimestamp are NOT changed.
1
12
  export const buildInfo = {
13
+ version: 'version t0be$et',
2
14
  gitHash: 'gitHash t0be$et',
3
15
  buildTimestamp: 'timestamp t0be$et',
4
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"build-info.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/app-version/build-info.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAIlB;IACF,OAAO,EAAE,iBAAiB;IAC1B,cAAc,EAAE,mBAAmB;CACpC,CAAC","sourcesContent":["export const buildInfo: {\n // TODO: Needs pre-commit hook to check gitHash and buildTimestamp are NOT changed.\n readonly gitHash: string;\n readonly buildTimestamp: string;\n} = {\n gitHash: 'gitHash t0be$et',\n buildTimestamp: 'timestamp t0be$et',\n};\n"]}
1
+ {"version":3,"file":"build-info.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/app-version/build-info.ts"],"names":[],"mappings":"AAEA,+DAA+D;AAC/D,uEAAuE;AACvE,wEAAwE;AACxE,4EAA4E;AAC5E,0EAA0E;AAC1E,4EAA4E;AAC5E,4EAA4E;AAC5E,uEAAuE;AACvE,iEAAiE;AACjE,EAAE;AACF,mFAAmF;AACnF,MAAM,CAAC,MAAM,SAAS,GAAe;IACnC,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,iBAAiB;IAC1B,cAAc,EAAE,mBAAmB;CACpC,CAAC","sourcesContent":["import { IBuildInfo } from '@sneat/core-public';\n\n// Fallback shown by AppVersionComponent when no app has called\n// `provideBuildInfo()` (see @sneat/core-public's build-info.ts for the\n// runtime contract). This file's own values are placeholders baked into\n// the published @sneat/components package at *sneat-libs'* own build — they\n// never reflect a consuming app's real git hash, so they only render when\n// nothing overrides BUILD_INFO. A consuming app gets its own real values by\n// running `sneat-stamp-build-info` (published as @sneat/build-info) against\n// its own `build-info.ts` and calling `provideBuildInfo(buildInfo)` at\n// bootstrap — see libs/build-info/README.md for the full recipe.\n//\n// TODO: Needs pre-commit hook to check gitHash and buildTimestamp are NOT changed.\nexport const buildInfo: IBuildInfo = {\n version: 'version t0be$et',\n gitHash: 'gitHash t0be$et',\n buildTimestamp: 'timestamp t0be$et',\n};\n"]}
@@ -1,9 +1,8 @@
1
+ import { IBuildInfo } from '@sneat/core-public';
1
2
  import * as i0 from "@angular/core";
2
3
  export declare class AppVersionComponent {
3
- protected readonly buildInfo: {
4
- readonly gitHash: string;
5
- readonly buildTimestamp: string;
6
- };
4
+ protected readonly buildInfo: IBuildInfo;
5
+ protected readonly shortGitHash: string;
7
6
  static ɵfac: i0.ɵɵFactoryDeclaration<AppVersionComponent, never>;
8
7
  static ɵcmp: i0.ɵɵComponentDeclaration<AppVersionComponent, "sneat-app-version", never, {}, {}, never, never, true, never>;
9
8
  }
@@ -1,4 +1,2 @@
1
- export declare const buildInfo: {
2
- readonly gitHash: string;
3
- readonly buildTimestamp: string;
4
- };
1
+ import { IBuildInfo } from '@sneat/core-public';
2
+ export declare const buildInfo: IBuildInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sneat/components",
3
- "version": "0.27.21",
3
+ "version": "0.27.22",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,7 +20,8 @@
20
20
  "peerDependencies": {
21
21
  "@angular/common": ">=22.0.0 <23.0.0",
22
22
  "@angular/core": ">=22.0.0 <23.0.0",
23
- "@ionic/angular": ">=9.0.0 <10.0.0"
23
+ "@ionic/angular": ">=9.0.0 <10.0.0",
24
+ "@sneat/core-public": "^0.27.0"
24
25
  },
25
26
  "dependencies": {
26
27
  "tslib": "2.8.1"