@masterteam/components 0.0.5 → 0.0.7
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/button/index.d.ts +34 -0
- package/fesm2022/masterteam-components-button.mjs +68 -0
- package/fesm2022/masterteam-components-button.mjs.map +1 -0
- package/fesm2022/masterteam-components-checkbox-field.mjs +10 -10
- package/fesm2022/masterteam-components-checkbox-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-date-field.mjs +14 -14
- package/fesm2022/masterteam-components-date-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-field-validation.mjs +8 -8
- package/fesm2022/masterteam-components-field-validation.mjs.map +1 -1
- package/fesm2022/masterteam-components-icon-field.mjs +5 -5
- package/fesm2022/masterteam-components-icon-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-multi-select-field.mjs +19 -19
- package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-number-field.mjs +15 -15
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +20 -20
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-slider-field.mjs +20 -20
- package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-text-field.mjs +14 -14
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +13 -13
- package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +6 -0
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/field-validation/index.d.ts +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ButtonSeverity, ButtonProps } from 'primeng/button';
|
|
3
|
+
import { MTIcon } from '@masterteam/icons';
|
|
4
|
+
|
|
5
|
+
declare class Button {
|
|
6
|
+
readonly iconText: _angular_core.InputSignal<MTIcon | undefined>;
|
|
7
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
8
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
9
|
+
readonly type: _angular_core.InputSignal<string>;
|
|
10
|
+
readonly severity: _angular_core.InputSignal<ButtonSeverity>;
|
|
11
|
+
readonly badge: _angular_core.InputSignal<string | undefined>;
|
|
12
|
+
readonly variant: _angular_core.InputSignal<"text" | "outlined" | undefined>;
|
|
13
|
+
readonly badgeSeverity: _angular_core.InputSignal<"success" | "info" | "warn" | "danger" | "help" | "primary" | "secondary" | "contrast">;
|
|
14
|
+
readonly size: _angular_core.InputSignal<"small" | "large" | undefined>;
|
|
15
|
+
readonly iconPos: _angular_core.InputSignal<"top" | "bottom" | "end" | undefined>;
|
|
16
|
+
readonly autofocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
17
|
+
readonly fluid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
18
|
+
readonly raised: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
19
|
+
readonly rounded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
20
|
+
readonly text: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
21
|
+
readonly plain: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
22
|
+
readonly outlined: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
23
|
+
readonly link: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
24
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
25
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
26
|
+
readonly pInputs: _angular_core.InputSignal<Partial<ButtonProps> | undefined>;
|
|
27
|
+
onClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
28
|
+
onFocus: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
29
|
+
onBlur: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
30
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Button, never>;
|
|
31
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Button, "mt-button", never, { "iconText": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "badgeSeverity": { "alias": "badgeSeverity"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "iconPos": { "alias": "iconPos"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "raised": { "alias": "raised"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "plain": { "alias": "plain"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "pInputs": { "alias": "pInputs"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; }, never, never, true, never>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { Button };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, output, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from 'primeng/button';
|
|
4
|
+
import { ButtonModule } from 'primeng/button';
|
|
5
|
+
import { Icon } from '@masterteam/icons';
|
|
6
|
+
|
|
7
|
+
class Button {
|
|
8
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
9
|
+
iconText = input(undefined, ...(ngDevMode ? [{ debugName: "iconText", alias: 'icon' }] : [{ alias: 'icon' }]));
|
|
10
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
11
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
12
|
+
type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
13
|
+
severity = input(...(ngDevMode ? [undefined, { debugName: "severity" }] : []));
|
|
14
|
+
badge = input(...(ngDevMode ? [undefined, { debugName: "badge" }] : []));
|
|
15
|
+
variant = input(...(ngDevMode ? [undefined, { debugName: "variant" }] : []));
|
|
16
|
+
badgeSeverity = input('secondary', ...(ngDevMode ? [{ debugName: "badgeSeverity" }] : []));
|
|
17
|
+
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
18
|
+
iconPos = input(...(ngDevMode ? [undefined, { debugName: "iconPos" }] : []));
|
|
19
|
+
autofocus = input(false, ...(ngDevMode ? [{ debugName: "autofocus", transform: booleanAttribute }] : [{
|
|
20
|
+
transform: booleanAttribute,
|
|
21
|
+
}]));
|
|
22
|
+
fluid = input(false, ...(ngDevMode ? [{ debugName: "fluid", transform: booleanAttribute }] : [{
|
|
23
|
+
transform: booleanAttribute,
|
|
24
|
+
}]));
|
|
25
|
+
raised = input(false, ...(ngDevMode ? [{ debugName: "raised", transform: booleanAttribute }] : [{
|
|
26
|
+
transform: booleanAttribute,
|
|
27
|
+
}]));
|
|
28
|
+
rounded = input(false, ...(ngDevMode ? [{ debugName: "rounded", transform: booleanAttribute }] : [{
|
|
29
|
+
transform: booleanAttribute,
|
|
30
|
+
}]));
|
|
31
|
+
text = input(false, ...(ngDevMode ? [{ debugName: "text", transform: booleanAttribute }] : [{
|
|
32
|
+
transform: booleanAttribute,
|
|
33
|
+
}]));
|
|
34
|
+
plain = input(false, ...(ngDevMode ? [{ debugName: "plain", transform: booleanAttribute }] : [{
|
|
35
|
+
transform: booleanAttribute,
|
|
36
|
+
}]));
|
|
37
|
+
outlined = input(false, ...(ngDevMode ? [{ debugName: "outlined", transform: booleanAttribute }] : [{
|
|
38
|
+
transform: booleanAttribute,
|
|
39
|
+
}]));
|
|
40
|
+
link = input(false, ...(ngDevMode ? [{ debugName: "link", transform: booleanAttribute }] : [{
|
|
41
|
+
transform: booleanAttribute,
|
|
42
|
+
}]));
|
|
43
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
|
|
44
|
+
transform: booleanAttribute,
|
|
45
|
+
}]));
|
|
46
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading", transform: booleanAttribute }] : [{
|
|
47
|
+
transform: booleanAttribute,
|
|
48
|
+
}]));
|
|
49
|
+
pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : []));
|
|
50
|
+
onClick = output();
|
|
51
|
+
onFocus = output();
|
|
52
|
+
onBlur = output();
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.0", type: Button, isStandalone: true, selector: "mt-button", inputs: { iconText: { classPropertyName: "iconText", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, badgeSeverity: { classPropertyName: "badgeSeverity", publicName: "badgeSeverity", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, host: { classAttribute: "grid gap-1" }, ngImport: i0, template: "<p-button\n [fluid]=\"fluid()\"\n [severity]=\"severity()\"\n [size]=\"size()\"\n [label]=\"label()\"\n [iconPos]=\"iconPos()\"\n [type]=\"type()\"\n [badge]=\"badge()\"\n [badgeSeverity]=\"badgeSeverity()\"\n [variant]=\"variant()\"\n [loading]=\"loading()\"\n [disabled]=\"disabled()\"\n [link]=\"link()\"\n [plain]=\"plain()\"\n [text]=\"text()\"\n [raised]=\"raised()\"\n [outlined]=\"outlined()\"\n [rounded]=\"rounded()\"\n [autofocus]=\"autofocus()\"\n (onClick)=\"onClick.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n>\n <ng-template #icon>\n <mt-icon\n [class.order-1]=\"iconPos() === 'end' || iconPos() === 'bottom'\"\n [icon]=\"iconText()\"\n />\n </ng-template>\n\n <!-- <ng-template #loadingicon> -->\n <!-- <mt-icon -->\n <!-- class=\"p-icon-spin\" -->\n <!-- [class.order-1]=\"iconPos() === 'end' || iconPos() === 'bottom'\" -->\n <!-- icon=\"general.loading-01\" -->\n <!-- /> -->\n <!-- </ng-template> -->\n</p-button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }] });
|
|
55
|
+
}
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: Button, decorators: [{
|
|
57
|
+
type: Component,
|
|
58
|
+
args: [{ selector: 'mt-button', standalone: true, imports: [ButtonModule, Icon], host: {
|
|
59
|
+
class: 'grid gap-1',
|
|
60
|
+
}, template: "<p-button\n [fluid]=\"fluid()\"\n [severity]=\"severity()\"\n [size]=\"size()\"\n [label]=\"label()\"\n [iconPos]=\"iconPos()\"\n [type]=\"type()\"\n [badge]=\"badge()\"\n [badgeSeverity]=\"badgeSeverity()\"\n [variant]=\"variant()\"\n [loading]=\"loading()\"\n [disabled]=\"disabled()\"\n [link]=\"link()\"\n [plain]=\"plain()\"\n [text]=\"text()\"\n [raised]=\"raised()\"\n [outlined]=\"outlined()\"\n [rounded]=\"rounded()\"\n [autofocus]=\"autofocus()\"\n (onClick)=\"onClick.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n>\n <ng-template #icon>\n <mt-icon\n [class.order-1]=\"iconPos() === 'end' || iconPos() === 'bottom'\"\n [icon]=\"iconText()\"\n />\n </ng-template>\n\n <!-- <ng-template #loadingicon> -->\n <!-- <mt-icon -->\n <!-- class=\"p-icon-spin\" -->\n <!-- [class.order-1]=\"iconPos() === 'end' || iconPos() === 'bottom'\" -->\n <!-- icon=\"general.loading-01\" -->\n <!-- /> -->\n <!-- </ng-template> -->\n</p-button>\n" }]
|
|
61
|
+
}] });
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Generated bundle index. Do not edit.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
export { Button };
|
|
68
|
+
//# sourceMappingURL=masterteam-components-button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masterteam-components-button.mjs","sources":["../../../../packages/masterteam/components/button/button.ts","../../../../packages/masterteam/components/button/button.html","../../../../packages/masterteam/components/button/masterteam-components-button.ts"],"sourcesContent":["import { Component, input, booleanAttribute, output } from '@angular/core';\nimport { ButtonModule, ButtonProps, ButtonSeverity } from 'primeng/button';\nimport { Icon, MTIcon } from '@masterteam/icons';\n\n@Component({\n selector: 'mt-button',\n standalone: true,\n imports: [ButtonModule, Icon],\n templateUrl: './button.html',\n styleUrls: ['./button.scss'],\n host: {\n class: 'grid gap-1',\n },\n})\nexport class Button {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly iconText = input<MTIcon>(undefined, { alias: 'icon' });\n readonly label = input<string>();\n readonly class = input<string>('');\n readonly type = input<string>('button');\n readonly severity = input<ButtonSeverity>();\n readonly badge = input<string>();\n readonly variant = input<'text' | 'outlined' | undefined>();\n readonly badgeSeverity = input<\n | 'info'\n | 'success'\n | 'warn'\n | 'danger'\n | 'secondary'\n | 'contrast'\n | 'help'\n | 'primary'\n >('secondary');\n readonly size = input<'small' | 'large' | undefined>();\n readonly iconPos = input<'top' | 'bottom' | 'end' | undefined>();\n readonly autofocus = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly fluid = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly raised = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly rounded = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly text = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly plain = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly outlined = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly link = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly disabled = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly loading = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly pInputs = input<Partial<ButtonProps>>();\n\n onClick = output<MouseEvent>();\n onFocus = output<FocusEvent>();\n onBlur = output<FocusEvent>();\n}\n","<p-button\n [fluid]=\"fluid()\"\n [severity]=\"severity()\"\n [size]=\"size()\"\n [label]=\"label()\"\n [iconPos]=\"iconPos()\"\n [type]=\"type()\"\n [badge]=\"badge()\"\n [badgeSeverity]=\"badgeSeverity()\"\n [variant]=\"variant()\"\n [loading]=\"loading()\"\n [disabled]=\"disabled()\"\n [link]=\"link()\"\n [plain]=\"plain()\"\n [text]=\"text()\"\n [raised]=\"raised()\"\n [outlined]=\"outlined()\"\n [rounded]=\"rounded()\"\n [autofocus]=\"autofocus()\"\n (onClick)=\"onClick.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n>\n <ng-template #icon>\n <mt-icon\n [class.order-1]=\"iconPos() === 'end' || iconPos() === 'bottom'\"\n [icon]=\"iconText()\"\n />\n </ng-template>\n\n <!-- <ng-template #loadingicon> -->\n <!-- <mt-icon -->\n <!-- class=\"p-icon-spin\" -->\n <!-- [class.order-1]=\"iconPos() === 'end' || iconPos() === 'bottom'\" -->\n <!-- icon=\"general.loading-01\" -->\n <!-- /> -->\n <!-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iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,OAAA,EAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECdnB,ohCAsCA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED/BY,YAAY,kbAAE,IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAOjB,MAAM,EAAA,UAAA,EAAA,CAAA;kBAVlB,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,IAAI,CAAC,EAAA,IAAA,EAGvB;AACJ,wBAAA,KAAK,EAAE,YAAY;AACpB,qBAAA,EAAA,QAAA,EAAA,ohCAAA,EAAA;;;AEZH;;AAEG;;;;"}
|
|
@@ -7,16 +7,16 @@ import { CheckboxModule } from 'primeng/checkbox';
|
|
|
7
7
|
|
|
8
8
|
class CheckboxField {
|
|
9
9
|
checkbox;
|
|
10
|
-
label = input();
|
|
11
|
-
placeholder = input();
|
|
12
|
-
class = input('');
|
|
13
|
-
readonly = input(false);
|
|
14
|
-
pInputs = input();
|
|
10
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
11
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
|
|
12
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
13
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
14
|
+
pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : []));
|
|
15
15
|
onChange = output();
|
|
16
16
|
ngControl = inject(NgControl, { self: true });
|
|
17
17
|
requiredValidator = Validators.required;
|
|
18
|
-
value = signal(null);
|
|
19
|
-
disabled = signal(false);
|
|
18
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
19
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
20
20
|
onTouched = () => { };
|
|
21
21
|
onModelChange = () => { };
|
|
22
22
|
constructor() {
|
|
@@ -55,10 +55,10 @@ class CheckboxField {
|
|
|
55
55
|
setDisabledState(disabled) {
|
|
56
56
|
this.disabled.set(disabled);
|
|
57
57
|
}
|
|
58
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
59
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: CheckboxField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: CheckboxField, isStandalone: true, selector: "mt-checkbox-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { properties: { "class": "class()" } }, viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkbox"], descendants: true, static: true }], ngImport: i0, template: "<p-checkbox\n #checkbox=\"\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (onChange)=\"onChange.emit($event)\"\n (onBlur)=\"onTouched()\"\n [disabled]=\"disabled() || readonly()\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [binary]=\"true\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n class=\"leading-none\"\n></p-checkbox>\n@if (label()) {\n <label\n class=\"ms-2\"\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n", styles: [":host{display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i2.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }] });
|
|
60
60
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: CheckboxField, decorators: [{
|
|
62
62
|
type: Component,
|
|
63
63
|
args: [{ selector: 'mt-checkbox-field', standalone: true, imports: [FormsModule, CheckboxModule], host: {
|
|
64
64
|
'[class]': 'class()',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-checkbox-field.mjs","sources":["../../../../packages/masterteam/components/checkbox-field/checkbox-field.ts","../../../../packages/masterteam/components/checkbox-field/checkbox-field.html","../../../../packages/masterteam/components/checkbox-field/masterteam-components-checkbox-field.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n signal,\n input,\n effect,\n output,\n inject,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport {\n CheckboxModule,\n Checkbox,\n CheckboxChangeEvent,\n} from 'primeng/checkbox';\n\n@Component({\n selector: 'mt-checkbox-field',\n standalone: true,\n imports: [FormsModule, CheckboxModule],\n templateUrl: './checkbox-field.html',\n styleUrls: ['./checkbox-field.scss'],\n host: {\n '[class]': 'class()',\n },\n})\nexport class CheckboxField implements ControlValueAccessor {\n @ViewChild('checkbox', { static: true })\n checkbox: Checkbox;\n\n label = input<string>();\n placeholder = input<string>();\n class = input<string>('');\n readonly = input<boolean>(false);\n pInputs = input<Partial<Checkbox>>();\n\n onChange = output<CheckboxChangeEvent>();\n\n public ngControl = inject(NgControl, { self: true });\n\n requiredValidator = Validators.required;\n value = signal<boolean | null>(null);\n disabled = signal<boolean>(false);\n\n onTouched: () => void = () => {};\n onModelChange: (value: boolean | null) => void = () => {};\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n // Effect to apply pInputs reactively when the pInputs signal changes\n effect(() => {\n const currentPInputs = this.pInputs();\n // Ensure checkbox ViewChild is initialized and pInputs has a value\n // @ViewChild with static: true makes 'checkbox' available during construction/ngOnInit\n if (this.checkbox && currentPInputs) {\n this.applyInputsToCheckbox();\n }\n });\n }\n\n applyInputsToCheckbox() {\n const currentPInputs = this.pInputs();\n if (currentPInputs) {\n Object.assign(this.checkbox, currentPInputs);\n }\n }\n\n onValueChange(value: boolean | null) {\n this.onModelChange(value);\n this.value.set(value);\n }\n\n writeValue(value: boolean | null) {\n this.value.set(value);\n }\n\n registerOnChange(fn: any) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n setDisabledState(disabled: boolean) {\n this.disabled.set(disabled);\n }\n}\n","<p-checkbox\n #checkbox=\"\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (onChange)=\"onChange.emit($event)\"\n (onBlur)=\"onTouched()\"\n [disabled]=\"disabled() || readonly()\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [binary]=\"true\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n class=\"leading-none\"\n></p-checkbox>\n@if (label()) {\n <label\n class=\"ms-2\"\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA+Ba,aAAa,CAAA;AAExB,IAAA,QAAQ;IAER,KAAK,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"masterteam-components-checkbox-field.mjs","sources":["../../../../packages/masterteam/components/checkbox-field/checkbox-field.ts","../../../../packages/masterteam/components/checkbox-field/checkbox-field.html","../../../../packages/masterteam/components/checkbox-field/masterteam-components-checkbox-field.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n signal,\n input,\n effect,\n output,\n inject,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport {\n CheckboxModule,\n Checkbox,\n CheckboxChangeEvent,\n} from 'primeng/checkbox';\n\n@Component({\n selector: 'mt-checkbox-field',\n standalone: true,\n imports: [FormsModule, CheckboxModule],\n templateUrl: './checkbox-field.html',\n styleUrls: ['./checkbox-field.scss'],\n host: {\n '[class]': 'class()',\n },\n})\nexport class CheckboxField implements ControlValueAccessor {\n @ViewChild('checkbox', { static: true })\n checkbox: Checkbox;\n\n label = input<string>();\n placeholder = input<string>();\n class = input<string>('');\n readonly = input<boolean>(false);\n pInputs = input<Partial<Checkbox>>();\n\n onChange = output<CheckboxChangeEvent>();\n\n public ngControl = inject(NgControl, { self: true });\n\n requiredValidator = Validators.required;\n value = signal<boolean | null>(null);\n disabled = signal<boolean>(false);\n\n onTouched: () => void = () => {};\n onModelChange: (value: boolean | null) => void = () => {};\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n // Effect to apply pInputs reactively when the pInputs signal changes\n effect(() => {\n const currentPInputs = this.pInputs();\n // Ensure checkbox ViewChild is initialized and pInputs has a value\n // @ViewChild with static: true makes 'checkbox' available during construction/ngOnInit\n if (this.checkbox && currentPInputs) {\n this.applyInputsToCheckbox();\n }\n });\n }\n\n applyInputsToCheckbox() {\n const currentPInputs = this.pInputs();\n if (currentPInputs) {\n Object.assign(this.checkbox, currentPInputs);\n }\n }\n\n onValueChange(value: boolean | null) {\n this.onModelChange(value);\n this.value.set(value);\n }\n\n writeValue(value: boolean | null) {\n this.value.set(value);\n }\n\n registerOnChange(fn: any) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n setDisabledState(disabled: boolean) {\n this.disabled.set(disabled);\n }\n}\n","<p-checkbox\n #checkbox=\"\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (onChange)=\"onChange.emit($event)\"\n (onBlur)=\"onTouched()\"\n [disabled]=\"disabled() || readonly()\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [binary]=\"true\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n class=\"leading-none\"\n></p-checkbox>\n@if (label()) {\n <label\n class=\"ms-2\"\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA+Ba,aAAa,CAAA;AAExB,IAAA,QAAQ;IAER,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,G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A,UAAA,EAAA,SAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAO1B,aAAa,EAAA,UAAA,EAAA,CAAA;kBAVzB,SAAS;+BACE,mBAAmB,EAAA,UAAA,EACjB,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,EAAE,cAAc,CAAC,EAAA,IAAA,EAGhC;AACJ,wBAAA,SAAS,EAAE,SAAS;AACrB,qBAAA,EAAA,QAAA,EAAA,8lBAAA,EAAA,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA;wDAID,QAAQ,EAAA,CAAA;sBADP,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;AEhCzC;;AAEG;;;;"}
|
|
@@ -7,19 +7,19 @@ import { DatePickerModule } from 'primeng/datepicker';
|
|
|
7
7
|
|
|
8
8
|
class DateField {
|
|
9
9
|
calendar;
|
|
10
|
-
field = input(true);
|
|
11
|
-
label = input();
|
|
12
|
-
placeholder = input();
|
|
13
|
-
class = input('');
|
|
14
|
-
readonly = input(false);
|
|
15
|
-
showIcon = input(true);
|
|
16
|
-
showClear = input(false);
|
|
17
|
-
showTime = input(false);
|
|
18
|
-
pInputs = input();
|
|
10
|
+
field = input(true, ...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
11
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
12
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
|
|
13
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
15
|
+
showIcon = input(true, ...(ngDevMode ? [{ debugName: "showIcon" }] : []));
|
|
16
|
+
showClear = input(false, ...(ngDevMode ? [{ debugName: "showClear" }] : []));
|
|
17
|
+
showTime = input(false, ...(ngDevMode ? [{ debugName: "showTime" }] : []));
|
|
18
|
+
pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : []));
|
|
19
19
|
styleClass;
|
|
20
20
|
requiredValidator = Validators.required;
|
|
21
|
-
value = signal(null);
|
|
22
|
-
disabled = signal(false);
|
|
21
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
22
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
23
23
|
onTouched = () => { };
|
|
24
24
|
onModelChange = () => { };
|
|
25
25
|
ngControl = inject(NgControl, { self: true });
|
|
@@ -58,10 +58,10 @@ class DateField {
|
|
|
58
58
|
setDisabledState(disabled) {
|
|
59
59
|
this.disabled.set(disabled);
|
|
60
60
|
}
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
62
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0
|
|
61
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: DateField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
62
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: DateField, isStandalone: true, selector: "mt-date-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.styleClass" }, classAttribute: "grid gap-1" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label()) {\n <label\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n<p-datepicker\n #calendar\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n [disabled]=\"disabled() || readonly()\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n [baseZIndex]=\"1051\"\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\n styleClass=\"w-full\"\n [showIcon]=\"showIcon()\"\n [showClear]=\"showClear()\"\n [showTime]=\"showTime()\"\n appendTo=\"body\"\n>\n</p-datepicker>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }] });
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: DateField, decorators: [{
|
|
65
65
|
type: Component,
|
|
66
66
|
args: [{ selector: 'mt-date-field', standalone: true, imports: [FormsModule, DatePickerModule], host: {
|
|
67
67
|
class: 'grid gap-1',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-date-field.mjs","sources":["../../../../packages/masterteam/components/date-field/date-field.ts","../../../../packages/masterteam/components/date-field/date-field.html","../../../../packages/masterteam/components/date-field/masterteam-components-date-field.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n signal,\n input,\n inject,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { DatePickerModule, DatePicker } from 'primeng/datepicker';\n\n@Component({\n selector: 'mt-date-field',\n standalone: true,\n imports: [FormsModule, DatePickerModule],\n templateUrl: './date-field.html',\n styleUrls: ['./date-field.scss'],\n host: {\n class: 'grid gap-1',\n },\n})\nexport class DateField implements ControlValueAccessor, OnInit, OnChanges {\n @ViewChild('calendar', { static: true })\n calendar: DatePicker;\n\n readonly field = input<boolean>(true);\n readonly label = input<string>();\n readonly placeholder = input<string>();\n readonly class = input<string>('');\n readonly readonly = input<boolean>(false);\n readonly showIcon = input<boolean>(true);\n readonly showClear = input<boolean>(false);\n readonly showTime = input<boolean>(false);\n readonly pInputs = input<Partial<DatePicker>>();\n\n @HostBinding('class') styleClass: string;\n\n requiredValidator = Validators.required;\n value = signal<string | null>(null);\n disabled = signal<boolean>(false);\n\n onTouched: () => void = () => {};\n onModelChange: (value: string) => void = () => {};\n\n public ngControl = inject(NgControl, { self: true });\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n applyInputsToCalendar() {\n Object.assign(this.calendar, this.pInputs());\n }\n\n ngOnInit() {\n this.styleClass = this.class();\n if (this.pInputs()) {\n this.applyInputsToCalendar();\n }\n }\n onValueChange(value: string) {\n this.onModelChange(value);\n this.value.set(value);\n }\n ngOnChanges(changes: SimpleChanges) {\n if (changes['pInputs']) {\n this.applyInputsToCalendar();\n }\n }\n\n writeValue(value: string) {\n this.value.set(value);\n }\n\n registerOnChange(fn: any) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n setDisabledState(disabled: boolean) {\n this.disabled.set(disabled);\n }\n}\n","@if (label()) {\n <label\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n<p-datepicker\n #calendar\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n [disabled]=\"disabled() || readonly()\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n [baseZIndex]=\"1051\"\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\n styleClass=\"w-full\"\n [showIcon]=\"showIcon()\"\n [showClear]=\"showClear()\"\n [showTime]=\"showTime()\"\n appendTo=\"body\"\n>\n</p-datepicker>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA6Ba,SAAS,CAAA;AAEpB,IAAA,QAAQ;AAEC,IAAA,KAAK,GAAG,KAAK,CAAU,IAAI,
|
|
1
|
+
{"version":3,"file":"masterteam-components-date-field.mjs","sources":["../../../../packages/masterteam/components/date-field/date-field.ts","../../../../packages/masterteam/components/date-field/date-field.html","../../../../packages/masterteam/components/date-field/masterteam-components-date-field.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n signal,\n input,\n inject,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { DatePickerModule, DatePicker } from 'primeng/datepicker';\n\n@Component({\n selector: 'mt-date-field',\n standalone: true,\n imports: [FormsModule, DatePickerModule],\n templateUrl: './date-field.html',\n styleUrls: ['./date-field.scss'],\n host: {\n class: 'grid gap-1',\n },\n})\nexport class DateField implements ControlValueAccessor, OnInit, OnChanges {\n @ViewChild('calendar', { static: true })\n calendar: DatePicker;\n\n readonly field = input<boolean>(true);\n readonly label = input<string>();\n readonly placeholder = input<string>();\n readonly class = input<string>('');\n readonly readonly = input<boolean>(false);\n readonly showIcon = input<boolean>(true);\n readonly showClear = input<boolean>(false);\n readonly showTime = input<boolean>(false);\n readonly pInputs = input<Partial<DatePicker>>();\n\n @HostBinding('class') styleClass: string;\n\n requiredValidator = Validators.required;\n value = signal<string | null>(null);\n disabled = signal<boolean>(false);\n\n onTouched: () => void = () => {};\n onModelChange: (value: string) => void = () => {};\n\n public ngControl = inject(NgControl, { self: true });\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n applyInputsToCalendar() {\n Object.assign(this.calendar, this.pInputs());\n }\n\n ngOnInit() {\n this.styleClass = this.class();\n if (this.pInputs()) {\n this.applyInputsToCalendar();\n }\n }\n onValueChange(value: string) {\n this.onModelChange(value);\n this.value.set(value);\n }\n ngOnChanges(changes: SimpleChanges) {\n if (changes['pInputs']) {\n this.applyInputsToCalendar();\n }\n }\n\n writeValue(value: string) {\n this.value.set(value);\n }\n\n registerOnChange(fn: any) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n setDisabledState(disabled: boolean) {\n this.disabled.set(disabled);\n }\n}\n","@if (label()) {\n <label\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n<p-datepicker\n #calendar\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (onBlur)=\"onTouched()\"\n [disabled]=\"disabled() || readonly()\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n [baseZIndex]=\"1051\"\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\n styleClass=\"w-full\"\n [showIcon]=\"showIcon()\"\n [showClear]=\"showClear()\"\n [showTime]=\"showTime()\"\n appendTo=\"body\"\n>\n</p-datepicker>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA6Ba,SAAS,CAAA;AAEpB,IAAA,QAAQ;AAEC,IAAA,KAAK,GAAG,KAAK,CAAU,IAAI,iDAAC;IAC5B,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACvB,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAC7B,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAChC,I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,CAAC,WAAW,EAAE,gBAAgB,CAAC,EAAA,IAAA,EAGlC;AACJ,wBAAA,KAAK,EAAE,YAAY;AACpB,qBAAA,EAAA,QAAA,EAAA,4sBAAA,EAAA;wDAID,QAAQ,EAAA,CAAA;sBADP,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBAajB,UAAU,EAAA,CAAA;sBAA/B,WAAW;uBAAC,OAAO;;;AE3CtB;;AAEG;;;;"}
|
|
@@ -3,11 +3,11 @@ import { input, booleanAttribute, Component } from '@angular/core';
|
|
|
3
3
|
import { Message } from 'primeng/message';
|
|
4
4
|
|
|
5
5
|
class FieldValidation {
|
|
6
|
-
control = input(null);
|
|
7
|
-
touched = input(false, {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
customErrorClass = input('');
|
|
6
|
+
control = input(null, ...(ngDevMode ? [{ debugName: "control" }] : []));
|
|
7
|
+
touched = input(false, ...(ngDevMode ? [{ debugName: "touched", transform: booleanAttribute }] : [{
|
|
8
|
+
transform: booleanAttribute,
|
|
9
|
+
}]));
|
|
10
|
+
customErrorClass = input('', ...(ngDevMode ? [{ debugName: "customErrorClass" }] : []));
|
|
11
11
|
getErrorMessage() {
|
|
12
12
|
const ctrl = this.control();
|
|
13
13
|
if (!ctrl || !ctrl.errors)
|
|
@@ -69,8 +69,8 @@ class FieldValidation {
|
|
|
69
69
|
// Fallback to error key
|
|
70
70
|
return `Invalid ${firstErrorKey}`;
|
|
71
71
|
}
|
|
72
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
73
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0
|
|
72
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: FieldValidation, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: FieldValidation, isStandalone: true, selector: "mt-field-validation", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, customErrorClass: { classPropertyName: "customErrorClass", publicName: "customErrorClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
74
74
|
@if (control() && control()!.invalid && (control()!.touched || touched())) {
|
|
75
75
|
<p-message severity="error" variant="simple" size="small">
|
|
76
76
|
{{ getErrorMessage() }}</p-message
|
|
@@ -98,7 +98,7 @@ class FieldValidation {
|
|
|
98
98
|
}
|
|
99
99
|
`, isInline: true, dependencies: [{ kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] });
|
|
100
100
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: FieldValidation, decorators: [{
|
|
102
102
|
type: Component,
|
|
103
103
|
args: [{ selector: 'mt-field-validation', standalone: true, imports: [Message], template: `
|
|
104
104
|
@if (control() && control()!.invalid && (control()!.touched || touched())) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-field-validation.mjs","sources":["../../../../packages/masterteam/components/field-validation/field-validation.ts","../../../../packages/masterteam/components/field-validation/masterteam-components-field-validation.ts"],"sourcesContent":["import { booleanAttribute, Component, input } from '@angular/core';\nimport { Message } from 'primeng/message';\nimport { AbstractControl } from '@angular/forms';\n\n@Component({\n selector: 'mt-field-validation',\n standalone: true,\n imports: [Message],\n template: `\n @if (control() && control()!.invalid && (control()!.touched || touched())) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">\n {{ getErrorMessage() }}</p-message\n >\n <!-- <div -->\n <!-- class=\"text-red-500 text-sm mt-1 flex items-start gap-1\" -->\n <!-- [class]=\" -->\n <!-- customErrorClass() || -->\n <!-- 'text-red-500 text-sm mt-1 flex items-start gap-1' -->\n <!-- \" -->\n <!-- > -->\n <!-- <span -->\n <!-- class=\"inline-block w-4 h-4 flex-shrink-0 mt-0.5\" -->\n <!-- aria-hidden=\"true\" -->\n <!-- > -->\n <!-- <svg viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"w-4 h-4\"> -->\n <!-- <path -->\n <!-- fill-rule=\"evenodd\" -->\n <!-- d=\"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zM8 4a.905.905 0 0 1 .9.995l-.35 3.507a.553.553 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z\" -->\n <!-- /> -->\n <!-- </svg> -->\n <!-- </span> -->\n <!-- <span class=\"flex-1\">{{ getErrorMessage() }}</span> -->\n <!-- </div> -->\n }\n `,\n styles: [],\n})\nexport class FieldValidation {\n readonly control = input<AbstractControl | null>(null);\n readonly touched = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly customErrorClass = input<string>('');\n\n getErrorMessage(): string {\n const ctrl = this.control();\n if (!ctrl || !ctrl.errors) return '';\n\n const errors = ctrl.errors;\n\n // Handle errors with embedded messages (from ValidatorConfig)\n for (const errorKey in errors) {\n const errorValue = errors[errorKey];\n\n // If error has a message property, use it\n if (errorValue && typeof errorValue === 'object' && errorValue.message) {\n return errorValue.message;\n }\n }\n\n // // Default error messages based on error type\n // if (errors['required']) {\n // return 'This field is required';\n // }\n // if (errors['email']) {\n // return 'Please enter a valid email address';\n // }\n // if (errors['minlength']) {\n // const requiredLength = errors['minlength'].requiredLength;\n // const actualLength = errors['minlength'].actualLength;\n // return `Minimum length is ${requiredLength} characters (current: ${actualLength})`;\n // }\n // if (errors['maxlength']) {\n // const requiredLength = errors['maxlength'].requiredLength;\n // const actualLength = errors['maxlength'].actualLength;\n // return `Maximum length is ${requiredLength} characters (current: ${actualLength})`;\n // }\n // if (errors['min']) {\n // const min = errors['min'].min;\n // const actual = errors['min'].actual;\n // return `Minimum value is ${min} (current: ${actual})`;\n // }\n // if (errors['max']) {\n // const max = errors['max'].max;\n // const actual = errors['max'].actual;\n // return `Maximum value is ${max} (current: ${actual})`;\n // }\n // if (errors['pattern']) {\n // const pattern = errors['pattern'].requiredPattern;\n // return `Invalid format. Expected pattern: ${pattern}`;\n // }\n // if (errors['custom']) {\n // return errors['custom'].message || 'Invalid value';\n // }\n\n // For any other errors, try to extract meaningful information\n const firstErrorKey = Object.keys(errors)[0];\n const firstError = errors[firstErrorKey];\n\n // If it's an object with a message, use it\n if (firstError && typeof firstError === 'object' && firstError.message) {\n return firstError.message;\n }\n\n // If it's a string, use it\n if (typeof firstError === 'string') {\n return firstError;\n }\n\n // Fallback to error key\n return `Invalid ${firstErrorKey}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAqCa,eAAe,CAAA;AACjB,IAAA,OAAO,GAAG,KAAK,CAAyB,IAAI,
|
|
1
|
+
{"version":3,"file":"masterteam-components-field-validation.mjs","sources":["../../../../packages/masterteam/components/field-validation/field-validation.ts","../../../../packages/masterteam/components/field-validation/masterteam-components-field-validation.ts"],"sourcesContent":["import { booleanAttribute, Component, input } from '@angular/core';\nimport { Message } from 'primeng/message';\nimport { AbstractControl } from '@angular/forms';\n\n@Component({\n selector: 'mt-field-validation',\n standalone: true,\n imports: [Message],\n template: `\n @if (control() && control()!.invalid && (control()!.touched || touched())) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\">\n {{ getErrorMessage() }}</p-message\n >\n <!-- <div -->\n <!-- class=\"text-red-500 text-sm mt-1 flex items-start gap-1\" -->\n <!-- [class]=\" -->\n <!-- customErrorClass() || -->\n <!-- 'text-red-500 text-sm mt-1 flex items-start gap-1' -->\n <!-- \" -->\n <!-- > -->\n <!-- <span -->\n <!-- class=\"inline-block w-4 h-4 flex-shrink-0 mt-0.5\" -->\n <!-- aria-hidden=\"true\" -->\n <!-- > -->\n <!-- <svg viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"w-4 h-4\"> -->\n <!-- <path -->\n <!-- fill-rule=\"evenodd\" -->\n <!-- d=\"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zM8 4a.905.905 0 0 1 .9.995l-.35 3.507a.553.553 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z\" -->\n <!-- /> -->\n <!-- </svg> -->\n <!-- </span> -->\n <!-- <span class=\"flex-1\">{{ getErrorMessage() }}</span> -->\n <!-- </div> -->\n }\n `,\n styles: [],\n})\nexport class FieldValidation {\n readonly control = input<AbstractControl | null>(null);\n readonly touched = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly customErrorClass = input<string>('');\n\n getErrorMessage(): string {\n const ctrl = this.control();\n if (!ctrl || !ctrl.errors) return '';\n\n const errors = ctrl.errors;\n\n // Handle errors with embedded messages (from ValidatorConfig)\n for (const errorKey in errors) {\n const errorValue = errors[errorKey];\n\n // If error has a message property, use it\n if (errorValue && typeof errorValue === 'object' && errorValue.message) {\n return errorValue.message;\n }\n }\n\n // // Default error messages based on error type\n // if (errors['required']) {\n // return 'This field is required';\n // }\n // if (errors['email']) {\n // return 'Please enter a valid email address';\n // }\n // if (errors['minlength']) {\n // const requiredLength = errors['minlength'].requiredLength;\n // const actualLength = errors['minlength'].actualLength;\n // return `Minimum length is ${requiredLength} characters (current: ${actualLength})`;\n // }\n // if (errors['maxlength']) {\n // const requiredLength = errors['maxlength'].requiredLength;\n // const actualLength = errors['maxlength'].actualLength;\n // return `Maximum length is ${requiredLength} characters (current: ${actualLength})`;\n // }\n // if (errors['min']) {\n // const min = errors['min'].min;\n // const actual = errors['min'].actual;\n // return `Minimum value is ${min} (current: ${actual})`;\n // }\n // if (errors['max']) {\n // const max = errors['max'].max;\n // const actual = errors['max'].actual;\n // return `Maximum value is ${max} (current: ${actual})`;\n // }\n // if (errors['pattern']) {\n // const pattern = errors['pattern'].requiredPattern;\n // return `Invalid format. Expected pattern: ${pattern}`;\n // }\n // if (errors['custom']) {\n // return errors['custom'].message || 'Invalid value';\n // }\n\n // For any other errors, try to extract meaningful information\n const firstErrorKey = Object.keys(errors)[0];\n const firstError = errors[firstErrorKey];\n\n // If it's an object with a message, use it\n if (firstError && typeof firstError === 'object' && firstError.message) {\n return firstError.message;\n }\n\n // If it's a string, use it\n if (typeof firstError === 'string') {\n return firstError;\n }\n\n // Fallback to error key\n return `Invalid ${firstErrorKey}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAqCa,eAAe,CAAA;AACjB,IAAA,OAAO,GAAG,KAAK,CAAyB,IAAI,mDAAC;IAC7C,OAAO,GAAG,KAAK,CAAmB,KAAK,2CAC9C,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CADqB;AAChD,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAA,CAAA,CAAC;AACO,IAAA,gBAAgB,GAAG,KAAK,CAAS,EAAE,4DAAC;IAE7C,eAAe,GAAA;AACb,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE;AAC3B,QAAA,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;AAEpC,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM;;AAG1B,QAAA,KAAK,MAAM,QAAQ,IAAI,MAAM,EAAE;AAC7B,YAAA,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC;;YAGnC,IAAI,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,OAAO,EAAE;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AAA,EAAA,EAAA,QAAA,EA7BhB;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EA3BS,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,YAAA,EAAA,UAAA,EAAA,MAAA,EAAA,WAAA,EAAA,MAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FA8BN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAjC3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,cACnB,IAAI,EAAA,OAAA,EACP,CAAC,OAAO,CAAC,EAAA,QAAA,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,EAAA,CAAA,EAAA;;;AClCH;;AAEG;;;;"}
|
|
@@ -7,9 +7,9 @@ import * as mtIcons from '@masterteam/icons/assets/select-icons.json';
|
|
|
7
7
|
import { Icon } from '@masterteam/icons';
|
|
8
8
|
|
|
9
9
|
class IconField {
|
|
10
|
-
label = input('');
|
|
10
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
11
11
|
icons = mtIcons?.regular ?? [];
|
|
12
|
-
selectedIcon = signal(null);
|
|
12
|
+
selectedIcon = signal(null, ...(ngDevMode ? [{ debugName: "selectedIcon" }] : []));
|
|
13
13
|
requiredValidator = Validators.required;
|
|
14
14
|
ngControl = inject(NgControl, { self: true });
|
|
15
15
|
constructor() {
|
|
@@ -35,10 +35,10 @@ class IconField {
|
|
|
35
35
|
validate(c) {
|
|
36
36
|
return c.errors;
|
|
37
37
|
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: IconField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: IconField, isStandalone: true, selector: "mt-icon-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "grid gap-1" }, ngImport: i0, template: "@if (label()) {\n <label\n (click)=\"dropdown.show(); dropdown.focus()\"\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n<p-select\n #dropdown\n [options]=\"icons\"\n [filter]=\"false\"\n filterBy=\"name\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n appendTo=\"body\"\n (ngModelChange)=\"onChangeIcon($event)\"\n [ngModel]=\"selectedIcon()\"\n placeholder=\"Select Icon\"\n styleClass=\"w-full\"\n panelStyleClass=\"icon-select-panel\"\n>\n <ng-template let-icon #selectedItem>\n @if (icon) {\n <div class=\"flex items-center justify-center text-2xl\">\n <mt-icon [icon]=\"icon\" />\n </div>\n } @else {\n <div class=\"flex items-center justify-center\">Select Icon</div>\n }\n </ng-template>\n <ng-template let-icon #item>\n <div class=\"w-full h-full flex items-center justify-center text-lg\">\n <mt-icon [icon]=\"icon\" />\n </div>\n </ng-template>\n</p-select>\n", styles: ["::ng-deep .icon-select-panel .p-select-list-container .p-select-list{display:grid;grid-template-columns:repeat(7,1fr);padding-inline:calc(var(--spacing) * 2);gap:.5rem}::ng-deep .icon-select-panel .p-select-list-container .p-select-list .p-select-option{padding:.25rem;border-radius:var(--p-select-option-border-radius);width:2.5rem;height:2.5rem}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }] });
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: IconField, decorators: [{
|
|
42
42
|
type: Component,
|
|
43
43
|
args: [{ selector: 'mt-icon-field', imports: [FormsModule, Select, Icon], host: {
|
|
44
44
|
class: 'grid gap-1',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-icon-field.mjs","sources":["../../../../packages/masterteam/components/icon-field/icon-field.ts","../../../../packages/masterteam/components/icon-field/icon-field.html","../../../../packages/masterteam/components/icon-field/masterteam-components-icon-field.ts"],"sourcesContent":["import { Component, signal, inject, input } from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormsModule,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { Select } from 'primeng/select';\nimport * as mtIcons from '@masterteam/icons/assets/select-icons.json';\nimport { Icon, MTIcon } from '@masterteam/icons';\n\n@Component({\n selector: 'mt-icon-field',\n imports: [FormsModule, Select, Icon],\n templateUrl: './icon-field.html',\n styleUrls: ['./icon-field.scss'],\n host: {\n class: 'grid gap-1',\n },\n})\nexport class IconField implements ControlValueAccessor {\n readonly label = input<string>('');\n\n icons: MTIcon[] = (mtIcons?.regular as MTIcon[]) ?? [];\n selectedIcon = signal<string | null>(null);\n requiredValidator = Validators.required;\n\n public ngControl = inject(NgControl, { self: true });\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n private onTouched: () => void = () => {};\n private onChange: (icon: string) => void = () => {};\n\n writeValue(value: string) {\n this.selectedIcon.set(value);\n }\n\n registerOnChange(fn: any) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n onChangeIcon(icon: string) {\n this.selectedIcon.set(icon);\n this.onChange(icon);\n }\n\n public validate(c: FormControl) {\n return c.errors;\n }\n}\n","@if (label()) {\n <label\n (click)=\"dropdown.show(); dropdown.focus()\"\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n<p-select\n #dropdown\n [options]=\"icons\"\n [filter]=\"false\"\n filterBy=\"name\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n appendTo=\"body\"\n (ngModelChange)=\"onChangeIcon($event)\"\n [ngModel]=\"selectedIcon()\"\n placeholder=\"Select Icon\"\n styleClass=\"w-full\"\n panelStyleClass=\"icon-select-panel\"\n>\n <ng-template let-icon #selectedItem>\n @if (icon) {\n <div class=\"flex items-center justify-center text-2xl\">\n <mt-icon [icon]=\"icon\" />\n </div>\n } @else {\n <div class=\"flex items-center justify-center\">Select Icon</div>\n }\n </ng-template>\n <ng-template let-icon #item>\n <div class=\"w-full h-full flex items-center justify-center text-lg\">\n <mt-icon [icon]=\"icon\" />\n </div>\n </ng-template>\n</p-select>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAqBa,SAAS,CAAA;AACX,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"masterteam-components-icon-field.mjs","sources":["../../../../packages/masterteam/components/icon-field/icon-field.ts","../../../../packages/masterteam/components/icon-field/icon-field.html","../../../../packages/masterteam/components/icon-field/masterteam-components-icon-field.ts"],"sourcesContent":["import { Component, signal, inject, input } from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormsModule,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { Select } from 'primeng/select';\nimport * as mtIcons from '@masterteam/icons/assets/select-icons.json';\nimport { Icon, MTIcon } from '@masterteam/icons';\n\n@Component({\n selector: 'mt-icon-field',\n imports: [FormsModule, Select, Icon],\n templateUrl: './icon-field.html',\n styleUrls: ['./icon-field.scss'],\n host: {\n class: 'grid gap-1',\n },\n})\nexport class IconField implements ControlValueAccessor {\n readonly label = input<string>('');\n\n icons: MTIcon[] = (mtIcons?.regular as MTIcon[]) ?? [];\n selectedIcon = signal<string | null>(null);\n requiredValidator = Validators.required;\n\n public ngControl = inject(NgControl, { self: true });\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n private onTouched: () => void = () => {};\n private onChange: (icon: string) => void = () => {};\n\n writeValue(value: string) {\n this.selectedIcon.set(value);\n }\n\n registerOnChange(fn: any) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n onChangeIcon(icon: string) {\n this.selectedIcon.set(icon);\n this.onChange(icon);\n }\n\n public validate(c: FormControl) {\n return c.errors;\n }\n}\n","@if (label()) {\n <label\n (click)=\"dropdown.show(); dropdown.focus()\"\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n<p-select\n #dropdown\n [options]=\"icons\"\n [filter]=\"false\"\n filterBy=\"name\"\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n appendTo=\"body\"\n (ngModelChange)=\"onChangeIcon($event)\"\n [ngModel]=\"selectedIcon()\"\n placeholder=\"Select Icon\"\n styleClass=\"w-full\"\n panelStyleClass=\"icon-select-panel\"\n>\n <ng-template let-icon #selectedItem>\n @if (icon) {\n <div class=\"flex items-center justify-center text-2xl\">\n <mt-icon [icon]=\"icon\" />\n </div>\n } @else {\n <div class=\"flex items-center justify-center\">Select Icon</div>\n }\n </ng-template>\n <ng-template let-icon #item>\n <div class=\"w-full h-full flex items-center justify-center text-lg\">\n <mt-icon [icon]=\"icon\" />\n </div>\n </ng-template>\n</p-select>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAqBa,SAAS,CAAA;AACX,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAElC,IAAA,KAAK,GAAc,OAAO,EAAE,OAAoB,IAAI,EAAE;AACtD,IAAA,YAAY,GAAG,MAAM,CAAgB,IAAI,wDAAC;AAC1C,IAAA,iBAAiB,GAAG,UAAU,CAAC,QAAQ;IAEhC,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAEpD,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAClB,YAAA,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI;QAC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OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,MAAM,i9BAAE,IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAOxB,SAAS,EAAA,UAAA,EAAA,CAAA;kBATrB,SAAS;+BACE,eAAe,EAAA,OAAA,EAChB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAA,IAAA,EAG9B;AACJ,wBAAA,KAAK,EAAE,YAAY;AACpB,qBAAA,EAAA,QAAA,EAAA,kmCAAA,EAAA,MAAA,EAAA,CAAA,+VAAA,CAAA,EAAA;;;AEnBH;;AAEG;;;;"}
|
|
@@ -7,25 +7,25 @@ import { MultiSelectModule } from 'primeng/multiselect';
|
|
|
7
7
|
|
|
8
8
|
class MultiSelectField {
|
|
9
9
|
multiSelect;
|
|
10
|
-
field = input(true);
|
|
11
|
-
label = input();
|
|
12
|
-
placeholder = input();
|
|
13
|
-
class = input('');
|
|
14
|
-
readonly = input(false);
|
|
15
|
-
pInputs = input();
|
|
16
|
-
options = input();
|
|
17
|
-
optionValue = input();
|
|
18
|
-
optionLabel = input();
|
|
19
|
-
filter = input(false);
|
|
20
|
-
filterBy = input();
|
|
21
|
-
dataKey = input();
|
|
22
|
-
showClear = input(false);
|
|
23
|
-
display = input('chip');
|
|
10
|
+
field = input(true, ...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
11
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
12
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
|
|
13
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
15
|
+
pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : []));
|
|
16
|
+
options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
17
|
+
optionValue = input(...(ngDevMode ? [undefined, { debugName: "optionValue" }] : []));
|
|
18
|
+
optionLabel = input(...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : []));
|
|
19
|
+
filter = input(false, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
20
|
+
filterBy = input(...(ngDevMode ? [undefined, { debugName: "filterBy" }] : []));
|
|
21
|
+
dataKey = input(...(ngDevMode ? [undefined, { debugName: "dataKey" }] : []));
|
|
22
|
+
showClear = input(false, ...(ngDevMode ? [{ debugName: "showClear" }] : []));
|
|
23
|
+
display = input('chip', ...(ngDevMode ? [{ debugName: "display" }] : []));
|
|
24
24
|
onChange = new EventEmitter();
|
|
25
25
|
styleClass;
|
|
26
26
|
requiredValidator = Validators.required;
|
|
27
|
-
value = signal(null);
|
|
28
|
-
disabled = signal(false);
|
|
27
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
28
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
29
29
|
onTouched = () => { };
|
|
30
30
|
onModelChange = () => { };
|
|
31
31
|
ngControl = inject(NgControl, { self: true });
|
|
@@ -66,10 +66,10 @@ class MultiSelectField {
|
|
|
66
66
|
setDisabledState(disabled) {
|
|
67
67
|
this.disabled.set(disabled);
|
|
68
68
|
}
|
|
69
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0
|
|
70
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0
|
|
69
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: MultiSelectField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: MultiSelectField, isStandalone: true, selector: "mt-multi-select-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { properties: { "class": "this.styleClass" }, classAttribute: "grid gap-1" }, viewQueries: [{ propertyName: "multiSelect", first: true, predicate: ["multiSelect"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label()) {\n <label\n (click)=\"multiSelect?.show()\"\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >{{ label() }}</label\n >\n}\n<p-multiSelect\n #multiSelect\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n [options]=\"options()\"\n [display]=\"display()\"\n [optionLabel]=\"optionLabel()\"\n [optionValue]=\"optionValue()\"\n (onBlur)=\"onTouched()\"\n [disabled]=\"disabled() || readonly()\"\n [inputId]=\"ngControl?.name?.toString() || label()\"\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\n [filter]=\"filter()\"\n [filterBy]=\"filterBy()\"\n [dataKey]=\"dataKey()\"\n styleClass=\"w-full\"\n appendTo=\"body\"\n [showClear]=\"showClear()\"\n></p-multiSelect>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i2.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }] });
|
|
71
71
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: MultiSelectField, decorators: [{
|
|
73
73
|
type: Component,
|
|
74
74
|
args: [{ selector: 'mt-multi-select-field', standalone: true, imports: [FormsModule, MultiSelectModule], host: {
|
|
75
75
|
class: 'grid gap-1',
|