@anguless/angulux 22.3.0 → 22.4.0
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/README.md +8 -6
- package/fesm2022/anguless-angulux-baseeditableholder.mjs +42 -3
- package/fesm2022/anguless-angulux-baseeditableholder.mjs.map +1 -1
- package/fesm2022/anguless-angulux-baseinput.mjs +38 -9
- package/fesm2022/anguless-angulux-baseinput.mjs.map +1 -1
- package/fesm2022/anguless-angulux-checkbox.mjs +7 -5
- package/fesm2022/anguless-angulux-checkbox.mjs.map +1 -1
- package/fesm2022/anguless-angulux-colorpicker.mjs +2 -0
- package/fesm2022/anguless-angulux-colorpicker.mjs.map +1 -1
- package/fesm2022/anguless-angulux-datepicker.mjs +33 -19
- package/fesm2022/anguless-angulux-datepicker.mjs.map +1 -1
- package/fesm2022/anguless-angulux-inputnumber.mjs +14 -14
- package/fesm2022/anguless-angulux-inputnumber.mjs.map +1 -1
- package/fesm2022/anguless-angulux-inputtext.mjs +36 -6
- package/fesm2022/anguless-angulux-inputtext.mjs.map +1 -1
- package/fesm2022/anguless-angulux-multiselect.mjs +8 -6
- package/fesm2022/anguless-angulux-multiselect.mjs.map +1 -1
- package/fesm2022/anguless-angulux-password.mjs +9 -8
- package/fesm2022/anguless-angulux-password.mjs.map +1 -1
- package/fesm2022/anguless-angulux-radiobutton.mjs +7 -5
- package/fesm2022/anguless-angulux-radiobutton.mjs.map +1 -1
- package/fesm2022/anguless-angulux-select.mjs +7 -3
- package/fesm2022/anguless-angulux-select.mjs.map +1 -1
- package/fesm2022/anguless-angulux-selectbutton.mjs +4 -3
- package/fesm2022/anguless-angulux-selectbutton.mjs.map +1 -1
- package/fesm2022/anguless-angulux-table.mjs +19 -5
- package/fesm2022/anguless-angulux-table.mjs.map +1 -1
- package/fesm2022/anguless-angulux-textarea.mjs +41 -10
- package/fesm2022/anguless-angulux-textarea.mjs.map +1 -1
- package/fesm2022/anguless-angulux-togglebutton.mjs +4 -3
- package/fesm2022/anguless-angulux-togglebutton.mjs.map +1 -1
- package/fesm2022/anguless-angulux-toggleswitch.mjs +5 -3
- package/fesm2022/anguless-angulux-toggleswitch.mjs.map +1 -1
- package/fesm2022/anguless-angulux-treetable.mjs +7 -7
- package/fesm2022/anguless-angulux-treetable.mjs.map +1 -1
- package/package.json +1 -1
- package/types/anguless-angulux-baseeditableholder.d.ts +21 -1
- package/types/anguless-angulux-baseinput.d.ts +9 -6
- package/types/anguless-angulux-inputtext.d.ts +18 -1
- package/types/anguless-angulux-textarea.d.ts +31 -14
package/README.md
CHANGED
|
@@ -98,18 +98,20 @@ closes a class of failure that has already happened in this repository.
|
|
|
98
98
|
npm run check # all eighteen, no build needed
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
anything to inspect until there is a build to inspect.
|
|
103
|
-
the source it came from:
|
|
101
|
+
Three further checks run after the build rather than inside that suite, because none has
|
|
102
|
+
anything to inspect until there is a build to inspect. All three look at the artifact instead
|
|
103
|
+
of the source it came from:
|
|
104
104
|
|
|
105
105
|
| Check | What it refuses to let ship |
|
|
106
106
|
|---|---|
|
|
107
107
|
| `check:publishable` | packs every package and reads `package.json` back **out of the tarball**, so what gets inspected is the exact bytes npm would receive. It exists because a guard that read the source tree instead once passed while three packages were about to publish an uninstallable `workspace:` dependency |
|
|
108
108
|
| `check:dts` | compiles the **emitted `.d.ts`** with `skipLibCheck: false`. Every tsconfig here sets it to `true`, which means our own declarations are the one thing no build in this repository type-checks — a consumer who turns it off compiles them for real, and if they do not stand up alone that consumer's build breaks while ours stays green |
|
|
109
|
+
| `check:signal-forms` | compiles Signal Forms' `[formField]` on **every form control** against the built package, with `strictTemplates` on. `[formField]` binds a field's state into inputs by *name* — `min` typed as the field's value, `pattern` as `readonly RegExp[]` — so a narrower input is a type error in every consumer's template. Four controls shipped that way, invisible here: the library builds with `strictTemplates` off and the specs compile just in time. The form controls are read from the corpus, so a newly shipped one must join the fixture |
|
|
109
110
|
|
|
110
|
-
|
|
111
|
-
after a deliberately broken
|
|
112
|
-
|
|
111
|
+
All three refuse to run against nothing, and two go further: `check:dts` and
|
|
112
|
+
`check:signal-forms` report success only after a deliberately broken file has been put through
|
|
113
|
+
the same program and rejected for the reason it was written for. A type-check aimed at zero
|
|
114
|
+
files does not say "I found nothing" — it says "no errors".
|
|
113
115
|
|
|
114
116
|
Two of them — `check:license` and `check:catalog` — **also run daily on a schedule**, and
|
|
115
117
|
that is not redundancy. A pull-request run only proves the tree was clean *at our last
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { booleanAttribute, input, signal, computed, Directive } from '@angular/core';
|
|
3
3
|
import { BaseModelHolder } from '@anguless/angulux/basemodelholder';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* `booleanAttribute`, except that "not set" — `undefined` or `null` — stays `undefined` instead
|
|
7
|
+
* of becoming `false`.
|
|
8
|
+
*
|
|
9
|
+
* `touched` and `dirty` need that third state. It is what tells a form layer that reports
|
|
10
|
+
* neither — Reactive Forms, ngModel, a bare `[invalid]` binding — apart from one that reports
|
|
11
|
+
* "not yet", and only the second may hold the invalid style back.
|
|
12
|
+
*/
|
|
13
|
+
function interactionState(value) {
|
|
14
|
+
return value === null || value === undefined ? undefined : booleanAttribute(value);
|
|
15
|
+
}
|
|
5
16
|
class BaseEditableHolder extends BaseModelHolder {
|
|
6
17
|
/**
|
|
7
18
|
* There must be a value (if set).
|
|
@@ -15,6 +26,21 @@ class BaseEditableHolder extends BaseModelHolder {
|
|
|
15
26
|
* @group Props
|
|
16
27
|
*/
|
|
17
28
|
invalid = input(undefined, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
29
|
+
/**
|
|
30
|
+
* Whether the user has visited the control. Once this or `dirty` is set, the invalid state
|
|
31
|
+
* style waits for interaction: it appears when the control is touched or dirty. Signal Forms'
|
|
32
|
+
* `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both
|
|
33
|
+
* unset and `invalid` alone decides.
|
|
34
|
+
* @defaultValue undefined
|
|
35
|
+
* @group Props
|
|
36
|
+
*/
|
|
37
|
+
touched = input(undefined, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: interactionState });
|
|
38
|
+
/**
|
|
39
|
+
* Whether the user has changed the value. See `touched`.
|
|
40
|
+
* @defaultValue undefined
|
|
41
|
+
* @group Props
|
|
42
|
+
*/
|
|
43
|
+
dirty = input(undefined, { ...(ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {}), transform: interactionState });
|
|
18
44
|
/**
|
|
19
45
|
* When present, it specifies that the component should have disabled state style.
|
|
20
46
|
* @defaultValue false
|
|
@@ -32,6 +58,19 @@ class BaseEditableHolder extends BaseModelHolder {
|
|
|
32
58
|
...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
33
59
|
$disabled = computed(() => this.disabled() || this._disabled(), /* @ts-ignore */
|
|
34
60
|
...(ngDevMode ? [{ debugName: "$disabled" }] : /* istanbul ignore next */ []));
|
|
61
|
+
/**
|
|
62
|
+
* Whether the invalid state is shown: `invalid`, held back until the control is touched or
|
|
63
|
+
* dirty when the form layer reports either. The style and `aria-invalid` both read this.
|
|
64
|
+
*/
|
|
65
|
+
$invalid = computed(() => {
|
|
66
|
+
if (!this.invalid()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const touched = this.touched();
|
|
70
|
+
const dirty = this.dirty();
|
|
71
|
+
return (touched === undefined && dirty === undefined) || !!touched || !!dirty;
|
|
72
|
+
}, /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "$invalid" }] : /* istanbul ignore next */ []));
|
|
35
74
|
onModelChange = () => { };
|
|
36
75
|
onModelTouched = () => { };
|
|
37
76
|
writeDisabledState(value) {
|
|
@@ -55,12 +94,12 @@ class BaseEditableHolder extends BaseModelHolder {
|
|
|
55
94
|
this.cd.markForCheck();
|
|
56
95
|
}
|
|
57
96
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BaseEditableHolder, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
58
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: BaseEditableHolder, isStandalone: true, inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
97
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: BaseEditableHolder, isStandalone: true, inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
59
98
|
}
|
|
60
99
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BaseEditableHolder, decorators: [{
|
|
61
100
|
type: Directive,
|
|
62
101
|
args: [{ standalone: true }]
|
|
63
|
-
}], propDecorators: { required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] } });
|
|
102
|
+
}], propDecorators: { required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] } });
|
|
64
103
|
|
|
65
104
|
/**
|
|
66
105
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anguless-angulux-baseeditableholder.mjs","sources":["../../src/baseeditableholder/baseeditableholder.ts","../../src/baseeditableholder/anguless-angulux-baseeditableholder.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { BaseModelHolder } from '@anguless/angulux/basemodelholder';\n\n@Directive({ standalone: true })\nexport class BaseEditableHolder<PT = any> extends BaseModelHolder<PT> implements ControlValueAccessor {\n /**\n * There must be a value (if set).\n * @defaultValue false\n * @group Props\n */\n required = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the component should have invalid state style.\n * @defaultValue false\n * @group Props\n */\n invalid = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the component should have disabled state style.\n * @defaultValue false\n * @group Props\n */\n disabled = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the name of the input.\n * @defaultValue undefined\n * @group Props\n */\n name = input<string | undefined>();\n\n _disabled = signal<boolean>(false);\n\n $disabled = computed(() => this.disabled() || this._disabled());\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n writeDisabledState(value: boolean) {\n this._disabled.set(value);\n }\n\n writeControlValue(value: any, setModelValue?: (value: any) => void) {\n // NOOP - this method should be overridden in the derived classes\n }\n\n /**** Angular ControlValueAccessors ****/\n writeValue(value: any) {\n this.writeControlValue(value, this.writeModelValue.bind(this));\n }\n\n registerOnChange(fn: Function) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean) {\n this.writeDisabledState(val);\n this.cd.markForCheck();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"anguless-angulux-baseeditableholder.mjs","sources":["../../src/baseeditableholder/baseeditableholder.ts","../../src/baseeditableholder/anguless-angulux-baseeditableholder.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { BaseModelHolder } from '@anguless/angulux/basemodelholder';\n\n/**\n * `booleanAttribute`, except that \"not set\" — `undefined` or `null` — stays `undefined` instead\n * of becoming `false`.\n *\n * `touched` and `dirty` need that third state. It is what tells a form layer that reports\n * neither — Reactive Forms, ngModel, a bare `[invalid]` binding — apart from one that reports\n * \"not yet\", and only the second may hold the invalid style back.\n */\nfunction interactionState(value: unknown): boolean | undefined {\n return value === null || value === undefined ? undefined : booleanAttribute(value);\n}\n\n@Directive({ standalone: true })\nexport class BaseEditableHolder<PT = any> extends BaseModelHolder<PT> implements ControlValueAccessor {\n /**\n * There must be a value (if set).\n * @defaultValue false\n * @group Props\n */\n required = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the component should have invalid state style.\n * @defaultValue false\n * @group Props\n */\n invalid = input(undefined, { transform: booleanAttribute });\n /**\n * Whether the user has visited the control. Once this or `dirty` is set, the invalid state\n * style waits for interaction: it appears when the control is touched or dirty. Signal Forms'\n * `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both\n * unset and `invalid` alone decides.\n * @defaultValue undefined\n * @group Props\n */\n touched = input<boolean | undefined, unknown>(undefined, { transform: interactionState });\n /**\n * Whether the user has changed the value. See `touched`.\n * @defaultValue undefined\n * @group Props\n */\n dirty = input<boolean | undefined, unknown>(undefined, { transform: interactionState });\n /**\n * When present, it specifies that the component should have disabled state style.\n * @defaultValue false\n * @group Props\n */\n disabled = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the name of the input.\n * @defaultValue undefined\n * @group Props\n */\n name = input<string | undefined>();\n\n _disabled = signal<boolean>(false);\n\n $disabled = computed(() => this.disabled() || this._disabled());\n\n /**\n * Whether the invalid state is shown: `invalid`, held back until the control is touched or\n * dirty when the form layer reports either. The style and `aria-invalid` both read this.\n */\n $invalid = computed(() => {\n if (!this.invalid()) {\n return false;\n }\n\n const touched = this.touched();\n const dirty = this.dirty();\n\n return (touched === undefined && dirty === undefined) || !!touched || !!dirty;\n });\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n writeDisabledState(value: boolean) {\n this._disabled.set(value);\n }\n\n writeControlValue(value: any, setModelValue?: (value: any) => void) {\n // NOOP - this method should be overridden in the derived classes\n }\n\n /**** Angular ControlValueAccessors ****/\n writeValue(value: any) {\n this.writeControlValue(value, this.writeModelValue.bind(this));\n }\n\n registerOnChange(fn: Function) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean) {\n this.writeDisabledState(val);\n this.cd.markForCheck();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAIA;;;;;;;AAOG;AACH,SAAS,gBAAgB,CAAC,KAAc,EAAA;AACpC,IAAA,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC;AACtF;AAGM,MAAO,kBAA6B,SAAQ,eAAmB,CAAA;AACjE;;;;AA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A,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;mBAAC,EAAE,UAAU,EAAE,IAAI,EAAE;;;AChB/B;;AAEG;;;;"}
|
|
@@ -3,6 +3,35 @@ import { inject, input, booleanAttribute, computed, Directive } from '@angular/c
|
|
|
3
3
|
import { BaseEditableHolder } from '@anguless/angulux/baseeditableholder';
|
|
4
4
|
import { Fluid } from '@anguless/angulux/fluid';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* `min` / `max` as this library reads them: a number, or no limit at all.
|
|
8
|
+
*
|
|
9
|
+
* Signal Forms' `[formField]` writes a field's own limits into every input of the element that
|
|
10
|
+
* is NAMED `min` or `max`, typed as the field's value — a `Date` for a date field, a string for
|
|
11
|
+
* a text field, whatever the model holds. Only InputNumber reads these, and only as numbers, so
|
|
12
|
+
* anything that is not one means "no limit" here rather than a comparison against a Date.
|
|
13
|
+
*
|
|
14
|
+
* A numeric string is read as the number it spells. That is what a static `min="5"` attribute
|
|
15
|
+
* delivers, and passed through unconverted it reached the form model: InputNumber clamps to
|
|
16
|
+
* `min()`, so a value below the limit was replaced by the string "5".
|
|
17
|
+
*/
|
|
18
|
+
function toLimit(value) {
|
|
19
|
+
if (value === null || value === undefined) {
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
const limit = typeof value === 'string' && value.trim() !== '' ? Number(value) : value;
|
|
23
|
+
return typeof limit === 'number' && Number.isFinite(limit) ? limit : undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The native `pattern` attribute: a string, or none.
|
|
27
|
+
*
|
|
28
|
+
* `[formField]` writes the field's pattern validators here as `readonly RegExp[]`. Signal Forms
|
|
29
|
+
* runs those itself and never sets a native `pattern` attribute, and a RegExp cannot round-trip
|
|
30
|
+
* into one: the empty list rendered `pattern=""`, which rejects every non-empty value.
|
|
31
|
+
*/
|
|
32
|
+
function toPattern(value) {
|
|
33
|
+
return typeof value === 'string' || value === null || value === undefined ? value : undefined;
|
|
34
|
+
}
|
|
6
35
|
class BaseInput extends BaseEditableHolder {
|
|
7
36
|
pcFluid = inject(Fluid, { optional: true, host: true, skipSelf: true });
|
|
8
37
|
/**
|
|
@@ -33,26 +62,26 @@ class BaseInput extends BaseEditableHolder {
|
|
|
33
62
|
inputSize = input(/* @ts-ignore */
|
|
34
63
|
...(ngDevMode ? [undefined, { debugName: "inputSize" }] : /* istanbul ignore next */ []));
|
|
35
64
|
/**
|
|
36
|
-
* Specifies the value must match the pattern.
|
|
65
|
+
* Specifies the value must match the pattern. A list of regular expressions — what Signal
|
|
66
|
+
* Forms binds through `[formField]` — is ignored, because the form validates those itself.
|
|
37
67
|
* @defaultValue undefined
|
|
38
68
|
* @group Props
|
|
39
69
|
*/
|
|
40
|
-
pattern = input(/*
|
|
41
|
-
...(ngDevMode ? [undefined, { debugName: "pattern" }] : /* istanbul ignore next */ []));
|
|
70
|
+
pattern = input(undefined, { ...(ngDevMode ? { debugName: "pattern" } : /* istanbul ignore next */ {}), transform: toPattern });
|
|
42
71
|
/**
|
|
43
|
-
* The value must be greater than or equal to the value.
|
|
72
|
+
* The value must be greater than or equal to the value. A numeric string is read as a number;
|
|
73
|
+
* anything else that is not a finite number, such as the `Date` limit of a date field, is ignored.
|
|
44
74
|
* @defaultValue undefined
|
|
45
75
|
* @group Props
|
|
46
76
|
*/
|
|
47
|
-
min = input(/*
|
|
48
|
-
...(ngDevMode ? [undefined, { debugName: "min" }] : /* istanbul ignore next */ []));
|
|
77
|
+
min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: toLimit });
|
|
49
78
|
/**
|
|
50
|
-
* The value must be less than or equal to the value.
|
|
79
|
+
* The value must be less than or equal to the value. A numeric string is read as a number;
|
|
80
|
+
* anything else that is not a finite number, such as the `Date` limit of a date field, is ignored.
|
|
51
81
|
* @defaultValue undefined
|
|
52
82
|
* @group Props
|
|
53
83
|
*/
|
|
54
|
-
max = input(/*
|
|
55
|
-
...(ngDevMode ? [undefined, { debugName: "max" }] : /* istanbul ignore next */ []));
|
|
84
|
+
max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: toLimit });
|
|
56
85
|
/**
|
|
57
86
|
* Unless the step is set to the any literal, the value must be min + an integral multiple of the step.
|
|
58
87
|
* @defaultValue undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anguless-angulux-baseinput.mjs","sources":["../../src/baseinput/baseinput.ts","../../src/baseinput/anguless-angulux-baseinput.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';\nimport { BaseEditableHolder } from '@anguless/angulux/baseeditableholder';\nimport { Fluid } from '@anguless/angulux/fluid';\n\n@Directive({ standalone: true })\nexport class BaseInput<PT = any> extends BaseEditableHolder<PT> {\n pcFluid: Fluid | null = inject(Fluid, { optional: true, host: true, skipSelf: true });\n\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue false\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * Specifies the input variant of the component.\n * @defaultValue 'outlined'\n * @group Props\n */\n variant = input<'filled' | 'outlined' | undefined>();\n /**\n * Specifies the size of the component.\n * @defaultValue undefined\n * @group Props\n */\n size = input<'large' | 'small' | undefined>();\n /**\n * Specifies the visible width of the input element in characters.\n * @defaultValue undefined\n * @group Props\n */\n inputSize = input<number | null | undefined>();\n /**\n * Specifies the value must match the pattern.\n * @defaultValue undefined\n * @group Props\n */\n pattern = input<string | null | undefined>();\n /**\n * The value must be greater than or equal to the value.\n * @defaultValue undefined\n * @group Props\n */\n min = input<number | null | undefined>();\n /**\n * The value must be less than or equal to the value.\n * @defaultValue undefined\n * @group Props\n */\n max = input<number | null | undefined>();\n /**\n * Unless the step is set to the any literal, the value must be min + an integral multiple of the step.\n * @defaultValue undefined\n * @group Props\n */\n step = input<number | null | undefined>();\n /**\n * The number of characters (code points) must not be less than the value of the attribute, if non-empty.\n * @defaultValue undefined\n * @group Props\n */\n minlength = input<number | null | undefined>();\n /**\n * The number of characters (code points) must not exceed the value of the attribute.\n * @defaultValue undefined\n * @group Props\n */\n maxlength = input<number | null | undefined>();\n\n $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant());\n\n get hasFluid() {\n return this.fluid() ?? !!this.pcFluid;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"anguless-angulux-baseinput.mjs","sources":["../../src/baseinput/baseinput.ts","../../src/baseinput/anguless-angulux-baseinput.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';\nimport { BaseEditableHolder } from '@anguless/angulux/baseeditableholder';\nimport { Fluid } from '@anguless/angulux/fluid';\n\n/**\n * `min` / `max` as this library reads them: a number, or no limit at all.\n *\n * Signal Forms' `[formField]` writes a field's own limits into every input of the element that\n * is NAMED `min` or `max`, typed as the field's value — a `Date` for a date field, a string for\n * a text field, whatever the model holds. Only InputNumber reads these, and only as numbers, so\n * anything that is not one means \"no limit\" here rather than a comparison against a Date.\n *\n * A numeric string is read as the number it spells. That is what a static `min=\"5\"` attribute\n * delivers, and passed through unconverted it reached the form model: InputNumber clamps to\n * `min()`, so a value below the limit was replaced by the string \"5\".\n */\nfunction toLimit(value: unknown): number | null | undefined {\n if (value === null || value === undefined) {\n return value;\n }\n\n const limit = typeof value === 'string' && value.trim() !== '' ? Number(value) : value;\n\n return typeof limit === 'number' && Number.isFinite(limit) ? limit : undefined;\n}\n\n/**\n * The native `pattern` attribute: a string, or none.\n *\n * `[formField]` writes the field's pattern validators here as `readonly RegExp[]`. Signal Forms\n * runs those itself and never sets a native `pattern` attribute, and a RegExp cannot round-trip\n * into one: the empty list rendered `pattern=\"\"`, which rejects every non-empty value.\n */\nfunction toPattern(value: string | readonly RegExp[] | null | undefined): string | null | undefined {\n return typeof value === 'string' || value === null || value === undefined ? value : undefined;\n}\n\n@Directive({ standalone: true })\nexport class BaseInput<PT = any> extends BaseEditableHolder<PT> {\n pcFluid: Fluid | null = inject(Fluid, { optional: true, host: true, skipSelf: true });\n\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue false\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * Specifies the input variant of the component.\n * @defaultValue 'outlined'\n * @group Props\n */\n variant = input<'filled' | 'outlined' | undefined>();\n /**\n * Specifies the size of the component.\n * @defaultValue undefined\n * @group Props\n */\n size = input<'large' | 'small' | undefined>();\n /**\n * Specifies the visible width of the input element in characters.\n * @defaultValue undefined\n * @group Props\n */\n inputSize = input<number | null | undefined>();\n /**\n * Specifies the value must match the pattern. A list of regular expressions — what Signal\n * Forms binds through `[formField]` — is ignored, because the form validates those itself.\n * @defaultValue undefined\n * @group Props\n */\n pattern = input<string | null | undefined, string | readonly RegExp[] | null | undefined>(undefined, { transform: toPattern });\n /**\n * The value must be greater than or equal to the value. A numeric string is read as a number;\n * anything else that is not a finite number, such as the `Date` limit of a date field, is ignored.\n * @defaultValue undefined\n * @group Props\n */\n min = input<number | null | undefined, unknown>(undefined, { transform: toLimit });\n /**\n * The value must be less than or equal to the value. A numeric string is read as a number;\n * anything else that is not a finite number, such as the `Date` limit of a date field, is ignored.\n * @defaultValue undefined\n * @group Props\n */\n max = input<number | null | undefined, unknown>(undefined, { transform: toLimit });\n /**\n * Unless the step is set to the any literal, the value must be min + an integral multiple of the step.\n * @defaultValue undefined\n * @group Props\n */\n step = input<number | null | undefined>();\n /**\n * The number of characters (code points) must not be less than the value of the attribute, if non-empty.\n * @defaultValue undefined\n * @group Props\n */\n minlength = input<number | null | undefined>();\n /**\n * The number of characters (code points) must not exceed the value of the attribute.\n * @defaultValue undefined\n * @group Props\n */\n maxlength = input<number | null | undefined>();\n\n $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant());\n\n get hasFluid() {\n return this.fluid() ?? !!this.pcFluid;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAIA;;;;;;;;;;;AAWG;AACH,SAAS,OAAO,CAAC,KAAc,EAAA;IAC3B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AACvC,QAAA,OAAO,KAAK;IAChB;IAEA,MAAM,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK;AAEtF,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,SAAS;AAClF;AAEA;;;;;;AAMG;AACH,SAAS,SAAS,CAAC,KAAoD,EAAA;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,GAAG,KAAK,GAAG,SAAS;AACjG;AAGM,MAAO,SAAoB,SAAQ,kBAAsB,CAAA;AAC3D,IAAA,OAAO,GAAiB,MAAM,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAErF;;;;AAIG;IACH,KAAK,GAAG,KAAK,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AAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBADrB,SAAS;mBAAC,EAAE,UAAU,EAAE,IAAI,EAAE;;;ACrC/B;;AAEG;;;;"}
|
|
@@ -19,9 +19,9 @@ const style = /*css*/ `
|
|
|
19
19
|
${style$1}
|
|
20
20
|
|
|
21
21
|
/* For AnguluxConfig */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
agl-checkBox.ng-invalid.ng-dirty .p-checkbox-box,
|
|
23
|
+
agl-check-box.ng-invalid.ng-dirty .p-checkbox-box,
|
|
24
|
+
agl-checkbox.ng-invalid.ng-dirty .p-checkbox-box {
|
|
25
25
|
border-color: dt('checkbox.invalid.border.color');
|
|
26
26
|
}
|
|
27
27
|
`;
|
|
@@ -31,7 +31,7 @@ const classes = {
|
|
|
31
31
|
{
|
|
32
32
|
'p-checkbox-checked p-highlight': instance.checked,
|
|
33
33
|
'p-disabled': instance.$disabled(),
|
|
34
|
-
'p-invalid': instance
|
|
34
|
+
'p-invalid': instance.$invalid(),
|
|
35
35
|
'p-variant-filled': instance.$variant() === 'filled',
|
|
36
36
|
'p-checkbox-sm p-inputfield-sm': instance.size() === 'small',
|
|
37
37
|
'p-checkbox-lg p-inputfield-lg': instance.size() === 'large'
|
|
@@ -288,7 +288,7 @@ class Checkbox extends BaseEditableHolder {
|
|
|
288
288
|
}
|
|
289
289
|
get dataP() {
|
|
290
290
|
return this.cn({
|
|
291
|
-
invalid: this
|
|
291
|
+
invalid: this.$invalid(),
|
|
292
292
|
checked: this.checked,
|
|
293
293
|
disabled: this.$disabled(),
|
|
294
294
|
filled: this.$variant() === 'filled',
|
|
@@ -308,6 +308,7 @@ class Checkbox extends BaseEditableHolder {
|
|
|
308
308
|
[attr.required]="required() ? '' : undefined"
|
|
309
309
|
[attr.readonly]="readonly ? '' : undefined"
|
|
310
310
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
311
|
+
[attr.aria-invalid]="$invalid() || undefined"
|
|
311
312
|
[attr.aria-labelledby]="ariaLabelledBy"
|
|
312
313
|
[attr.aria-label]="ariaLabel"
|
|
313
314
|
[style]="inputStyle"
|
|
@@ -347,6 +348,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
347
348
|
[attr.required]="required() ? '' : undefined"
|
|
348
349
|
[attr.readonly]="readonly ? '' : undefined"
|
|
349
350
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
351
|
+
[attr.aria-invalid]="$invalid() || undefined"
|
|
350
352
|
[attr.aria-labelledby]="ariaLabelledBy"
|
|
351
353
|
[attr.aria-label]="ariaLabel"
|
|
352
354
|
[style]="inputStyle"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anguless-angulux-checkbox.mjs","sources":["../../src/checkbox/style/checkboxstyle.ts","../../src/checkbox/checkbox.ts","../../src/checkbox/anguless-angulux-checkbox.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as checkbox_style } from '@anguless/angulux-styles/checkbox';\nimport { BaseStyle } from '@anguless/angulux/base';\n\nconst style = /*css*/ `\n ${checkbox_style}\n\n /* For AnguluxConfig */\n p-checkBox.ng-invalid.ng-dirty .p-checkbox-box,\n p-check-box.ng-invalid.ng-dirty .p-checkbox-box,\n p-checkbox.ng-invalid.ng-dirty .p-checkbox-box {\n border-color: dt('checkbox.invalid.border.color');\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-checkbox p-component',\n {\n 'p-checkbox-checked p-highlight': instance.checked,\n 'p-disabled': instance.$disabled(),\n 'p-invalid': instance.invalid(),\n 'p-variant-filled': instance.$variant() === 'filled',\n 'p-checkbox-sm p-inputfield-sm': instance.size() === 'small',\n 'p-checkbox-lg p-inputfield-lg': instance.size() === 'large'\n }\n ],\n box: 'p-checkbox-box',\n input: 'p-checkbox-input',\n icon: 'p-checkbox-icon'\n};\n\n@Injectable()\nexport class CheckboxStyle extends BaseStyle {\n name = 'checkbox';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * Checkbox is an extension to standard checkbox element with theming.\n *\n * @module checkboxstyle\n *\n */\nexport enum CheckboxClasses {\n /**\n * Class name of the root element\n */\n root = 'p-checkbox',\n /**\n * Class name of the box element\n */\n box = 'p-checkbox-box',\n /**\n * Class name of the input element\n */\n input = 'p-checkbox-input',\n /**\n * Class name of the icon element\n */\n icon = 'p-checkbox-icon'\n}\n\nexport interface CheckboxStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild, ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n InjectionToken,\n input,\n Input,\n NgModule,\n numberAttribute,\n Output,\n signal,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { FormControl, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';\nimport { contains, equals } from '@anguless/angulux-utils';\nimport { SharedModule } from '@anguless/angulux/api';\nimport { PARENT_INSTANCE } from '@anguless/angulux/basecomponent';\nimport { BaseEditableHolder } from '@anguless/angulux/baseeditableholder';\nimport { Bind, BindModule } from '@anguless/angulux/bind';\nimport { CheckIcon } from '@anguless/angulux/icons/check';\nimport { MinusIcon } from '@anguless/angulux/icons/minus';\nimport { Nullable } from '@anguless/angulux/ts-helpers';\nimport { CheckboxChangeEvent, CheckboxIconTemplateContext, CheckboxPassThrough } from '@anguless/angulux/types/checkbox';\nimport { CheckboxStyle } from './style/checkboxstyle';\n\nconst CHECKBOX_INSTANCE = new InjectionToken<Checkbox>('CHECKBOX_INSTANCE');\n\nexport const CHECKBOX_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Checkbox),\n multi: true\n};\n/**\n * Checkbox is an extension to standard checkbox element with theming.\n * @group Components\n */\n@Component({\n selector: 'agl-checkbox, agl-checkBox, agl-check-box',\n standalone: true,\n imports: [CommonModule, SharedModule, CheckIcon, MinusIcon, BindModule],\n template: `\n <input\n #input\n [attr.id]=\"inputId\"\n type=\"checkbox\"\n [attr.value]=\"value\"\n [attr.name]=\"name()\"\n [checked]=\"checked\"\n [attr.tabindex]=\"tabindex\"\n [attr.required]=\"required() ? '' : undefined\"\n [attr.readonly]=\"readonly ? '' : undefined\"\n [attr.disabled]=\"$disabled() ? '' : undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-label]=\"ariaLabel\"\n [style]=\"inputStyle\"\n [class]=\"cn(cx('input'), inputClass)\"\n [aglBind]=\"ptm('input')\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (change)=\"handleChange($event)\"\n />\n <div [class]=\"cx('box')\" [aglBind]=\"ptm('box')\" [attr.data-p]=\"dataP\">\n <ng-container *ngIf=\"!checkboxIconTemplate()\">\n <ng-container *ngIf=\"checked\">\n <span *ngIf=\"checkboxIcon\" [class]=\"cx('icon')\" [ngClass]=\"checkboxIcon\" [aglBind]=\"ptm('icon')\" [attr.data-p]=\"dataP\"></span>\n <svg data-p-icon=\"check\" *ngIf=\"!checkboxIcon\" [class]=\"cx('icon')\" [aglBind]=\"ptm('icon')\" [attr.data-p]=\"dataP\" />\n </ng-container>\n <svg data-p-icon=\"minus\" *ngIf=\"_indeterminate()\" [class]=\"cx('icon')\" [aglBind]=\"ptm('icon')\" [attr.data-p]=\"dataP\" />\n </ng-container>\n <ng-template *ngTemplateOutlet=\"checkboxIconTemplate(); context: { checked: checked, class: cx('icon'), dataP: dataP }\"></ng-template>\n </div>\n `,\n providers: [CHECKBOX_VALUE_ACCESSOR, CheckboxStyle, { provide: CHECKBOX_INSTANCE, useExisting: Checkbox }, { provide: PARENT_INSTANCE, useExisting: Checkbox }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cn(cx('root'), styleClass)\",\n '[attr.data-p-highlight]': 'checked',\n '[attr.data-p-checked]': 'checked',\n '[attr.data-p-disabled]': '$disabled()',\n '[attr.data-p]': 'dataP'\n },\n hostDirectives: [Bind]\n})\nexport class Checkbox extends BaseEditableHolder<CheckboxPassThrough> {\n componentName = 'Checkbox';\n\n @Input() hostName: any = '';\n /**\n * Value of the checkbox.\n * @group Props\n */\n @Input() value: any;\n /**\n * Allows to select a boolean value instead of multiple values.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) binary: boolean | undefined;\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n @Input() ariaLabelledBy: string | undefined;\n /**\n * Used to define a string that labels the input element.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n @Input({ transform: numberAttribute }) tabindex: number | undefined;\n /**\n * Identifier of the focus input to match a label defined for the component.\n * @group Props\n */\n @Input() inputId: string | undefined;\n /**\n * Inline style of the input element.\n * @group Props\n */\n @Input() inputStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the component.\n * @deprecated since v20.0.0, use `class` instead.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Style class of the input element.\n * @group Props\n */\n @Input() inputClass: string | undefined;\n /**\n * When present, it specifies input state as indeterminate.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) indeterminate: boolean = false;\n /**\n * Form control value.\n * @group Props\n */\n @Input() formControl: FormControl | undefined;\n /**\n * Icon class of the checkbox icon.\n * @group Props\n */\n @Input() checkboxIcon: string | undefined;\n /**\n * When present, it specifies that the component cannot be edited.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) readonly: boolean | undefined;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Value in checked state.\n * @group Props\n */\n @Input() trueValue: any = true;\n /**\n * Value in unchecked state.\n * @group Props\n */\n @Input() falseValue: any = false;\n /**\n * Specifies the input variant of the component.\n * @defaultValue undefined\n * @group Props\n */\n variant = input<'filled' | 'outlined' | undefined>();\n /**\n * Specifies the size of the component.\n * @defaultValue undefined\n * @group Props\n */\n size = input<'large' | 'small' | undefined>();\n /**\n * Callback to invoke on value change.\n * @param {CheckboxChangeEvent} event - Custom value change event.\n * @group Emits\n */\n @Output() onChange: EventEmitter<CheckboxChangeEvent> = new EventEmitter();\n /**\n * Callback to invoke when the receives focus.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onFocus: EventEmitter<Event> = new EventEmitter<Event>();\n /**\n * Callback to invoke when the loses focus.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onBlur: EventEmitter<Event> = new EventEmitter<Event>();\n\n @ViewChild('input') inputViewChild: Nullable<ElementRef>;\n\n get checked() {\n return this._indeterminate() ? false : this.binary ? this.modelValue() === this.trueValue : contains(this.value, this.modelValue());\n }\n\n _indeterminate = signal<any>(undefined);\n /**\n * Custom checkbox icon template.\n * @group Templates\n */\n checkboxIconTemplate = contentChild<TemplateRef<CheckboxIconTemplateContext>>('icon', { descendants: false });\n\n focused: boolean = false;\n\n _componentStyle = inject(CheckboxStyle);\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n $pcCheckbox: Checkbox | undefined = inject(CHECKBOX_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant());\n\n onChanges(changes: SimpleChanges) {\n if (changes.indeterminate) {\n this._indeterminate.set(changes.indeterminate.currentValue);\n }\n }\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n\n updateModel(event) {\n let newModelValue;\n\n /*\n * When `formControlName` or `formControl` is used - `writeValue` is not called after control changes.\n * Otherwise it is causing multiple references to the actual value: there is one array reference inside the component and another one in the control value.\n * `selfControl` is the source of truth of references, it is made to avoid reference loss.\n * */\n const selfControl = this.injector.get<NgControl | null>(NgControl, null, { optional: true, self: true });\n\n const currentModelValue = selfControl && !this.formControl ? selfControl.value : this.modelValue();\n\n if (!this.binary) {\n if (this.checked || this._indeterminate()) newModelValue = currentModelValue.filter((val) => !equals(val, this.value));\n else newModelValue = currentModelValue ? [...currentModelValue, this.value] : [this.value];\n\n this.onModelChange(newModelValue);\n this.writeModelValue(newModelValue);\n\n if (this.formControl) {\n this.formControl.setValue(newModelValue);\n }\n } else {\n newModelValue = this._indeterminate() ? this.trueValue : this.checked ? this.falseValue : this.trueValue;\n this.writeModelValue(newModelValue);\n this.onModelChange(newModelValue);\n }\n\n if (this._indeterminate()) {\n this._indeterminate.set(false);\n }\n\n this.onChange.emit({ checked: newModelValue, originalEvent: event });\n }\n\n handleChange(event) {\n if (!this.readonly) {\n this.updateModel(event);\n }\n }\n\n onInputFocus(event) {\n this.focused = true;\n this.onFocus.emit(event);\n }\n\n onInputBlur(event) {\n this.focused = false;\n this.onBlur.emit(event);\n this.onModelTouched();\n }\n\n focus() {\n this.inputViewChild?.nativeElement.focus();\n }\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any, setModelValue: (value: any) => void): void {\n setModelValue(value);\n this.cd.markForCheck();\n }\n\n get dataP() {\n return this.cn({\n invalid: this.invalid(),\n checked: this.checked,\n disabled: this.$disabled(),\n filled: this.$variant() === 'filled',\n [this.size() as string]: this.size()\n });\n }\n}\n\n@NgModule({\n imports: [Checkbox, SharedModule],\n exports: [Checkbox, SharedModule]\n})\nexport class CheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["checkbox_style"],"mappings":";;;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAc;;;;;;;;CAQnB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,E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CAAA,EAAA,CAAA;;2FAEvB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;AACjC,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,YAAY;AACnC,iBAAA;;;ACnUD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"anguless-angulux-checkbox.mjs","sources":["../../src/checkbox/style/checkboxstyle.ts","../../src/checkbox/checkbox.ts","../../src/checkbox/anguless-angulux-checkbox.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as checkbox_style } from '@anguless/angulux-styles/checkbox';\nimport { BaseStyle } from '@anguless/angulux/base';\n\nconst style = /*css*/ `\n ${checkbox_style}\n\n /* For AnguluxConfig */\n agl-checkBox.ng-invalid.ng-dirty .p-checkbox-box,\n agl-check-box.ng-invalid.ng-dirty .p-checkbox-box,\n agl-checkbox.ng-invalid.ng-dirty .p-checkbox-box {\n border-color: dt('checkbox.invalid.border.color');\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-checkbox p-component',\n {\n 'p-checkbox-checked p-highlight': instance.checked,\n 'p-disabled': instance.$disabled(),\n 'p-invalid': instance.$invalid(),\n 'p-variant-filled': instance.$variant() === 'filled',\n 'p-checkbox-sm p-inputfield-sm': instance.size() === 'small',\n 'p-checkbox-lg p-inputfield-lg': instance.size() === 'large'\n }\n ],\n box: 'p-checkbox-box',\n input: 'p-checkbox-input',\n icon: 'p-checkbox-icon'\n};\n\n@Injectable()\nexport class CheckboxStyle extends BaseStyle {\n name = 'checkbox';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * Checkbox is an extension to standard checkbox element with theming.\n *\n * @module checkboxstyle\n *\n */\nexport enum CheckboxClasses {\n /**\n * Class name of the root element\n */\n root = 'p-checkbox',\n /**\n * Class name of the box element\n */\n box = 'p-checkbox-box',\n /**\n * Class name of the input element\n */\n input = 'p-checkbox-input',\n /**\n * Class name of the icon element\n */\n icon = 'p-checkbox-icon'\n}\n\nexport interface CheckboxStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild, ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n InjectionToken,\n input,\n Input,\n NgModule,\n numberAttribute,\n Output,\n signal,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { FormControl, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';\nimport { contains, equals } from '@anguless/angulux-utils';\nimport { SharedModule } from '@anguless/angulux/api';\nimport { PARENT_INSTANCE } from '@anguless/angulux/basecomponent';\nimport { BaseEditableHolder } from '@anguless/angulux/baseeditableholder';\nimport { Bind, BindModule } from '@anguless/angulux/bind';\nimport { CheckIcon } from '@anguless/angulux/icons/check';\nimport { MinusIcon } from '@anguless/angulux/icons/minus';\nimport { Nullable } from '@anguless/angulux/ts-helpers';\nimport { CheckboxChangeEvent, CheckboxIconTemplateContext, CheckboxPassThrough } from '@anguless/angulux/types/checkbox';\nimport { CheckboxStyle } from './style/checkboxstyle';\n\nconst CHECKBOX_INSTANCE = new InjectionToken<Checkbox>('CHECKBOX_INSTANCE');\n\nexport const CHECKBOX_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Checkbox),\n multi: true\n};\n/**\n * Checkbox is an extension to standard checkbox element with theming.\n * @group Components\n */\n@Component({\n selector: 'agl-checkbox, agl-checkBox, agl-check-box',\n standalone: true,\n imports: [CommonModule, SharedModule, CheckIcon, MinusIcon, BindModule],\n template: `\n <input\n #input\n [attr.id]=\"inputId\"\n type=\"checkbox\"\n [attr.value]=\"value\"\n [attr.name]=\"name()\"\n [checked]=\"checked\"\n [attr.tabindex]=\"tabindex\"\n [attr.required]=\"required() ? '' : undefined\"\n [attr.readonly]=\"readonly ? '' : undefined\"\n [attr.disabled]=\"$disabled() ? '' : undefined\"\n [attr.aria-invalid]=\"$invalid() || undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-label]=\"ariaLabel\"\n [style]=\"inputStyle\"\n [class]=\"cn(cx('input'), inputClass)\"\n [aglBind]=\"ptm('input')\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (change)=\"handleChange($event)\"\n />\n <div [class]=\"cx('box')\" [aglBind]=\"ptm('box')\" [attr.data-p]=\"dataP\">\n <ng-container *ngIf=\"!checkboxIconTemplate()\">\n <ng-container *ngIf=\"checked\">\n <span *ngIf=\"checkboxIcon\" [class]=\"cx('icon')\" [ngClass]=\"checkboxIcon\" [aglBind]=\"ptm('icon')\" [attr.data-p]=\"dataP\"></span>\n <svg data-p-icon=\"check\" *ngIf=\"!checkboxIcon\" [class]=\"cx('icon')\" [aglBind]=\"ptm('icon')\" [attr.data-p]=\"dataP\" />\n </ng-container>\n <svg data-p-icon=\"minus\" *ngIf=\"_indeterminate()\" [class]=\"cx('icon')\" [aglBind]=\"ptm('icon')\" [attr.data-p]=\"dataP\" />\n </ng-container>\n <ng-template *ngTemplateOutlet=\"checkboxIconTemplate(); context: { checked: checked, class: cx('icon'), dataP: dataP }\"></ng-template>\n </div>\n `,\n providers: [CHECKBOX_VALUE_ACCESSOR, CheckboxStyle, { provide: CHECKBOX_INSTANCE, useExisting: Checkbox }, { provide: PARENT_INSTANCE, useExisting: Checkbox }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cn(cx('root'), styleClass)\",\n '[attr.data-p-highlight]': 'checked',\n '[attr.data-p-checked]': 'checked',\n '[attr.data-p-disabled]': '$disabled()',\n '[attr.data-p]': 'dataP'\n },\n hostDirectives: [Bind]\n})\nexport class Checkbox extends BaseEditableHolder<CheckboxPassThrough> {\n componentName = 'Checkbox';\n\n @Input() hostName: any = '';\n /**\n * Value of the checkbox.\n * @group Props\n */\n @Input() value: any;\n /**\n * Allows to select a boolean value instead of multiple values.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) binary: boolean | undefined;\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n @Input() ariaLabelledBy: string | undefined;\n /**\n * Used to define a string that labels the input element.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n @Input({ transform: numberAttribute }) tabindex: number | undefined;\n /**\n * Identifier of the focus input to match a label defined for the component.\n * @group Props\n */\n @Input() inputId: string | undefined;\n /**\n * Inline style of the input element.\n * @group Props\n */\n @Input() inputStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the component.\n * @deprecated since v20.0.0, use `class` instead.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Style class of the input element.\n * @group Props\n */\n @Input() inputClass: string | undefined;\n /**\n * When present, it specifies input state as indeterminate.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) indeterminate: boolean = false;\n /**\n * Form control value.\n * @group Props\n */\n @Input() formControl: FormControl | undefined;\n /**\n * Icon class of the checkbox icon.\n * @group Props\n */\n @Input() checkboxIcon: string | undefined;\n /**\n * When present, it specifies that the component cannot be edited.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) readonly: boolean | undefined;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Value in checked state.\n * @group Props\n */\n @Input() trueValue: any = true;\n /**\n * Value in unchecked state.\n * @group Props\n */\n @Input() falseValue: any = false;\n /**\n * Specifies the input variant of the component.\n * @defaultValue undefined\n * @group Props\n */\n variant = input<'filled' | 'outlined' | undefined>();\n /**\n * Specifies the size of the component.\n * @defaultValue undefined\n * @group Props\n */\n size = input<'large' | 'small' | undefined>();\n /**\n * Callback to invoke on value change.\n * @param {CheckboxChangeEvent} event - Custom value change event.\n * @group Emits\n */\n @Output() onChange: EventEmitter<CheckboxChangeEvent> = new EventEmitter();\n /**\n * Callback to invoke when the receives focus.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onFocus: EventEmitter<Event> = new EventEmitter<Event>();\n /**\n * Callback to invoke when the loses focus.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onBlur: EventEmitter<Event> = new EventEmitter<Event>();\n\n @ViewChild('input') inputViewChild: Nullable<ElementRef>;\n\n get checked() {\n return this._indeterminate() ? false : this.binary ? this.modelValue() === this.trueValue : contains(this.value, this.modelValue());\n }\n\n _indeterminate = signal<any>(undefined);\n /**\n * Custom checkbox icon template.\n * @group Templates\n */\n checkboxIconTemplate = contentChild<TemplateRef<CheckboxIconTemplateContext>>('icon', { descendants: false });\n\n focused: boolean = false;\n\n _componentStyle = inject(CheckboxStyle);\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n $pcCheckbox: Checkbox | undefined = inject(CHECKBOX_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant());\n\n onChanges(changes: SimpleChanges) {\n if (changes.indeterminate) {\n this._indeterminate.set(changes.indeterminate.currentValue);\n }\n }\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n\n updateModel(event) {\n let newModelValue;\n\n /*\n * When `formControlName` or `formControl` is used - `writeValue` is not called after control changes.\n * Otherwise it is causing multiple references to the actual value: there is one array reference inside the component and another one in the control value.\n * `selfControl` is the source of truth of references, it is made to avoid reference loss.\n * */\n const selfControl = this.injector.get<NgControl | null>(NgControl, null, { optional: true, self: true });\n\n const currentModelValue = selfControl && !this.formControl ? selfControl.value : this.modelValue();\n\n if (!this.binary) {\n if (this.checked || this._indeterminate()) newModelValue = currentModelValue.filter((val) => !equals(val, this.value));\n else newModelValue = currentModelValue ? [...currentModelValue, this.value] : [this.value];\n\n this.onModelChange(newModelValue);\n this.writeModelValue(newModelValue);\n\n if (this.formControl) {\n this.formControl.setValue(newModelValue);\n }\n } else {\n newModelValue = this._indeterminate() ? this.trueValue : this.checked ? this.falseValue : this.trueValue;\n this.writeModelValue(newModelValue);\n this.onModelChange(newModelValue);\n }\n\n if (this._indeterminate()) {\n this._indeterminate.set(false);\n }\n\n this.onChange.emit({ checked: newModelValue, originalEvent: event });\n }\n\n handleChange(event) {\n if (!this.readonly) {\n this.updateModel(event);\n }\n }\n\n onInputFocus(event) {\n this.focused = true;\n this.onFocus.emit(event);\n }\n\n onInputBlur(event) {\n this.focused = false;\n this.onBlur.emit(event);\n this.onModelTouched();\n }\n\n focus() {\n this.inputViewChild?.nativeElement.focus();\n }\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any, setModelValue: (value: any) => void): void {\n setModelValue(value);\n this.cd.markForCheck();\n }\n\n get dataP() {\n return this.cn({\n invalid: this.$invalid(),\n checked: this.checked,\n disabled: this.$disabled(),\n filled: this.$variant() === 'filled',\n [this.size() as string]: this.size()\n });\n }\n}\n\n@NgModule({\n imports: [Checkbox, SharedModule],\n exports: [Checkbox, SharedModule]\n})\nexport class CheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["checkbox_style"],"mappings":";;;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAc;;;;;;;;CAQnB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,wBAAwB;AACxB,QAAA;YACI,gCAAgC,EAAE,QAAQ,CAAC,OAAO;AAClD,YAAA,YAAY,EAAE,QAAQ,CAAC,SAAS,EAAE;AAClC,YAAA,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;AAChC,YAAA,kBAAkB,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,QAAQ;AACpD,YAAA,+BAA+B,EAAE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ableHolder {
|
|
|
632
632
|
readonly
|
|
633
633
|
[attr.tabindex]="tabindex"
|
|
634
634
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
635
|
+
[attr.aria-invalid]="$invalid() || undefined"
|
|
635
636
|
(click)="onInputClick()"
|
|
636
637
|
(keydown)="onInputKeydown($event)"
|
|
637
638
|
(focus)="onInputFocus()"
|
|
@@ -690,6 +691,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
690
691
|
readonly
|
|
691
692
|
[attr.tabindex]="tabindex"
|
|
692
693
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
694
|
+
[attr.aria-invalid]="$invalid() || undefined"
|
|
693
695
|
(click)="onInputClick()"
|
|
694
696
|
(keydown)="onInputKeydown($event)"
|
|
695
697
|
(focus)="onInputFocus()"
|