@anguless/angulux 22.2.3 → 22.3.1

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.
@@ -0,0 +1,97 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { Injectable, InjectionToken, inject, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
4
+ import { RouterModule } from '@angular/router';
5
+ import { SharedModule } from '@anguless/angulux/api';
6
+ import { BaseComponent, PARENT_INSTANCE } from '@anguless/angulux/basecomponent';
7
+ import * as i1 from '@anguless/angulux/bind';
8
+ import { Bind, BindModule } from '@anguless/angulux/bind';
9
+ import { style as style$1 } from '@anguless/angulux-styles/iftalabel';
10
+ import { BaseStyle } from '@anguless/angulux/base';
11
+
12
+ const style = /*css*/ `
13
+ ${style$1}
14
+
15
+ .p-iftalabel:has(.ng-invalid.ng-dirty) label {
16
+ color: dt('iftalabel.invalid.color');
17
+ }
18
+ `;
19
+ const classes = {
20
+ root: 'p-iftalabel'
21
+ };
22
+ class IftaLabelStyle extends BaseStyle {
23
+ name = 'iftalabel';
24
+ style = style;
25
+ classes = classes;
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
27
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelStyle });
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelStyle, decorators: [{
30
+ type: Injectable
31
+ }] });
32
+ /**
33
+ *
34
+ * IftaLabel visually integrates a label within its form element.
35
+ *
36
+ * @module iftalabelstyle
37
+ *
38
+ */
39
+ var IftaLabelClasses;
40
+ (function (IftaLabelClasses) {
41
+ /**
42
+ * Class name of the root element
43
+ */
44
+ IftaLabelClasses["root"] = "p-iftalabel";
45
+ })(IftaLabelClasses || (IftaLabelClasses = {}));
46
+
47
+ const IFTALABEL_INSTANCE = new InjectionToken('IFTALABEL_INSTANCE');
48
+ /**
49
+ * IftaLabel is used to create infield top aligned labels.
50
+ * @group Components
51
+ */
52
+ class IftaLabel extends BaseComponent {
53
+ componentName = 'IftaLabel';
54
+ _componentStyle = inject(IftaLabelStyle);
55
+ $pcIftaLabel = inject(IFTALABEL_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
56
+ bindDirectiveInstance = inject(Bind, { self: true });
57
+ onAfterViewChecked() {
58
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
59
+ }
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabel, deps: null, target: i0.ɵɵFactoryTarget.Component });
61
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: IftaLabel, isStandalone: true, selector: "agl-iftalabel, agl-iftaLabel, agl-ifta-label", host: { properties: { "class": "cx('root')" } }, providers: [IftaLabelStyle, { provide: IFTALABEL_INSTANCE, useExisting: IftaLabel }, { provide: PARENT_INSTANCE, useExisting: IftaLabel }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, dependencies: [{ kind: "ngmodule", type: BindModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
62
+ }
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabel, decorators: [{
64
+ type: Component,
65
+ args: [{
66
+ selector: 'agl-iftalabel, agl-iftaLabel, agl-ifta-label',
67
+ standalone: true,
68
+ imports: [BindModule],
69
+ template: ` <ng-content></ng-content> `,
70
+ changeDetection: ChangeDetectionStrategy.OnPush,
71
+ encapsulation: ViewEncapsulation.None,
72
+ providers: [IftaLabelStyle, { provide: IFTALABEL_INSTANCE, useExisting: IftaLabel }, { provide: PARENT_INSTANCE, useExisting: IftaLabel }],
73
+ hostDirectives: [Bind],
74
+ host: {
75
+ '[class]': "cx('root')"
76
+ }
77
+ }]
78
+ }] });
79
+ class IftaLabelModule {
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
81
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelModule, imports: [IftaLabel, CommonModule, SharedModule, RouterModule], exports: [IftaLabel, SharedModule] });
82
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelModule, imports: [IftaLabel, CommonModule, SharedModule, RouterModule, SharedModule] });
83
+ }
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelModule, decorators: [{
85
+ type: NgModule,
86
+ args: [{
87
+ imports: [IftaLabel, CommonModule, SharedModule, RouterModule],
88
+ exports: [IftaLabel, SharedModule]
89
+ }]
90
+ }] });
91
+
92
+ /**
93
+ * Generated bundle index. Do not edit.
94
+ */
95
+
96
+ export { IftaLabel, IftaLabelClasses, IftaLabelModule, IftaLabelStyle };
97
+ //# sourceMappingURL=anguless-angulux-iftalabel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anguless-angulux-iftalabel.mjs","sources":["../../src/iftalabel/style/iftalabelstyle.ts","../../src/iftalabel/iftalabel.ts","../../src/iftalabel/anguless-angulux-iftalabel.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as iftalabel_style } from '@anguless/angulux-styles/iftalabel';\nimport { BaseStyle } from '@anguless/angulux/base';\n\nconst style = /*css*/ `\n ${iftalabel_style}\n\n .p-iftalabel:has(.ng-invalid.ng-dirty) label {\n color: dt('iftalabel.invalid.color');\n }\n`;\n\nconst classes = {\n root: 'p-iftalabel'\n};\n\n@Injectable()\nexport class IftaLabelStyle extends BaseStyle {\n name = 'iftalabel';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * IftaLabel visually integrates a label within its form element.\n *\n * @module iftalabelstyle\n *\n */\nexport enum IftaLabelClasses {\n /**\n * Class name of the root element\n */\n root = 'p-iftalabel'\n}\n\nexport interface IftaLabelStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { AfterViewChecked, ChangeDetectionStrategy, Component, inject, InjectionToken, NgModule, ViewEncapsulation } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@anguless/angulux/api';\nimport { BaseComponent, PARENT_INSTANCE } from '@anguless/angulux/basecomponent';\nimport { Bind, BindModule } from '@anguless/angulux/bind';\nimport { IftaLabelPassThrough } from '@anguless/angulux/types/iftalabel';\nimport { IftaLabelStyle } from './style/iftalabelstyle';\n\nconst IFTALABEL_INSTANCE = new InjectionToken<IftaLabel>('IFTALABEL_INSTANCE');\n\n/**\n * IftaLabel is used to create infield top aligned labels.\n * @group Components\n */\n@Component({\n selector: 'agl-iftalabel, agl-iftaLabel, agl-ifta-label',\n standalone: true,\n imports: [BindModule],\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [IftaLabelStyle, { provide: IFTALABEL_INSTANCE, useExisting: IftaLabel }, { provide: PARENT_INSTANCE, useExisting: IftaLabel }],\n hostDirectives: [Bind],\n host: {\n '[class]': \"cx('root')\"\n }\n})\nexport class IftaLabel extends BaseComponent<IftaLabelPassThrough> implements AfterViewChecked {\n componentName = 'IftaLabel';\n\n _componentStyle = inject(IftaLabelStyle);\n\n $pcIftaLabel: IftaLabel | undefined = inject(IFTALABEL_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n}\n\n@NgModule({\n imports: [IftaLabel, CommonModule, SharedModule, RouterModule],\n exports: [IftaLabel, SharedModule]\n})\nexport class IftaLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["iftalabel_style"],"mappings":";;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAe;;;;;CAKpB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE;CACT;AAGK,MAAO,cAAe,SAAQ,SAAS,CAAA;IACzC,IAAI,GAAG,WAAW;IAElB,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAd,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B;;AASD;;;;;;AAMG;IACS;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AACxB;;AAEG;AACH,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,aAAoB;AACxB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;ACvB5B,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAAY,oBAAoB,CAAC;AAE9E;;;AAGG;AAcG,MAAO,SAAU,SAAQ,aAAmC,CAAA;IAC9D,aAAa,GAAG,WAAW;AAE3B,IAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;AAExC,IAAA,YAAY,GAA0B,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,SAAS;IAEjH,qBAAqB,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAEpD,kBAAkB,GAAA;AACd,QAAA,IAAI,CAAC,q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AAE,kBAAkB,EAAE,WAAW,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAA,SAAW,EAAE,CAAC;oBAC1I,cAAc,EAAE,CAAC,IAAI,CAAC;AACtB,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;MAmBY,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAf,eAAe,EAAA,OAAA,EAAA,CAlBf,SAAS,EAeG,YAAY,EAAE,YAAY,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAfpD,SAAS,EAgBG,YAAY,CAAA,EAAA,CAAA;wGAExB,eAAe,EAAA,OAAA,EAAA,CAHd,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EACxC,YAAY,CAAA,EAAA,CAAA;;2FAExB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY;AACpC,iBAAA;;;AC7CD;;AAEG;;;;"}
@@ -1306,7 +1306,21 @@ class Table extends BaseComponent {
1306
1306
  }
1307
1307
  }
1308
1308
  onChanges(simpleChange) {
1309
- if (simpleChange.totalRecords && simpleChange.totalRecords.firstChange) {
1309
+ // Mirror EVERY change, not just the first.
1310
+ //
1311
+ // `totalRecords` is a plain @Input copied into `_totalRecords`, and the copy used to
1312
+ // happen only when `firstChange` was true — so every later value an application
1313
+ // supplied was dropped on the floor. Line 1212 below then wrote the stale copy back
1314
+ // OVER the input Angular had just set, and because the binding expression itself had
1315
+ // not changed on the next pass, Angular never corrected it. An application that
1316
+ // refetched and declared a new count kept the FIRST count forever: no error, no
1317
+ // warning, and a paginator sizing itself against a number that no longer described
1318
+ // the data underneath it.
1319
+ //
1320
+ // Measured in the browser (e2e/upstream-repro.spec.ts): shrinking five rows to two
1321
+ // and declaring two left the paginator rendering three pages. The four readers of
1322
+ // `_totalRecords` (:1212, :2064, :2132, :2209) all already assume it tracks the input.
1323
+ if (simpleChange.totalRecords) {
1310
1324
  this._totalRecords = simpleChange.totalRecords.currentValue;
1311
1325
  }
1312
1326
  if (simpleChange.value) {