@molecule/app-ui-angular 1.5.1 → 1.10.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 +780 -362
- package/dist/components/checkbox.component.d.ts +5 -1
- package/dist/components/checkbox.component.d.ts.map +1 -1
- package/dist/components/checkbox.component.js +14 -3
- package/dist/components/checkbox.component.js.map +1 -1
- package/dist/components/confirm-button.component.d.ts +1 -5
- package/dist/components/confirm-button.component.d.ts.map +1 -1
- package/dist/components/confirm-button.component.js +15 -11
- package/dist/components/confirm-button.component.js.map +1 -1
- package/dist/components/confirm-dialog.component.d.ts +1 -5
- package/dist/components/confirm-dialog.component.d.ts.map +1 -1
- package/dist/components/confirm-dialog.component.js +5 -3
- package/dist/components/confirm-dialog.component.js.map +1 -1
- package/dist/components/dropdown.component.d.ts +3 -11
- package/dist/components/dropdown.component.d.ts.map +1 -1
- package/dist/components/dropdown.component.js +54 -97
- package/dist/components/dropdown.component.js.map +1 -1
- package/dist/components/file-field.component.d.ts +42 -0
- package/dist/components/file-field.component.d.ts.map +1 -0
- package/dist/components/file-field.component.js +121 -0
- package/dist/components/file-field.component.js.map +1 -0
- package/dist/components/floating-input.component.d.ts +21 -3
- package/dist/components/floating-input.component.d.ts.map +1 -1
- package/dist/components/floating-input.component.js +34 -4
- package/dist/components/floating-input.component.js.map +1 -1
- package/dist/components/form.component.d.ts.map +1 -1
- package/dist/components/form.component.js +11 -6
- package/dist/components/form.component.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/input.component.d.ts +18 -2
- package/dist/components/input.component.d.ts.map +1 -1
- package/dist/components/input.component.js +37 -11
- package/dist/components/input.component.js.map +1 -1
- package/dist/components/language-picker.component.d.ts +9 -1
- package/dist/components/language-picker.component.d.ts.map +1 -1
- package/dist/components/language-picker.component.js +15 -8
- package/dist/components/language-picker.component.js.map +1 -1
- package/dist/components/load-error-banner.component.d.ts +21 -3
- package/dist/components/load-error-banner.component.d.ts.map +1 -1
- package/dist/components/load-error-banner.component.js +33 -5
- package/dist/components/load-error-banner.component.js.map +1 -1
- package/dist/components/modal.component.d.ts +27 -48
- package/dist/components/modal.component.d.ts.map +1 -1
- package/dist/components/modal.component.js +85 -184
- package/dist/components/modal.component.js.map +1 -1
- package/dist/components/molecule/input.component.d.ts +7 -0
- package/dist/components/molecule/input.component.d.ts.map +1 -1
- package/dist/components/molecule/input.component.js +13 -5
- package/dist/components/molecule/input.component.js.map +1 -1
- package/dist/components/molecule/select.component.d.ts +7 -0
- package/dist/components/molecule/select.component.d.ts.map +1 -1
- package/dist/components/molecule/select.component.js +13 -5
- package/dist/components/molecule/select.component.js.map +1 -1
- package/dist/components/page-header.component.d.ts.map +1 -1
- package/dist/components/page-header.component.js +22 -21
- package/dist/components/page-header.component.js.map +1 -1
- package/dist/components/prompt-dialog.component.d.ts +6 -30
- package/dist/components/prompt-dialog.component.d.ts.map +1 -1
- package/dist/components/prompt-dialog.component.js +25 -56
- package/dist/components/prompt-dialog.component.js.map +1 -1
- package/dist/components/responsive-app-shell.component.d.ts +16 -34
- package/dist/components/responsive-app-shell.component.d.ts.map +1 -1
- package/dist/components/responsive-app-shell.component.js +58 -141
- package/dist/components/responsive-app-shell.component.js.map +1 -1
- package/dist/components/select.component.d.ts +9 -1
- package/dist/components/select.component.d.ts.map +1 -1
- package/dist/components/select.component.js +16 -7
- package/dist/components/select.component.js.map +1 -1
- package/dist/components/sidebar-user-card.component.d.ts +5 -1
- package/dist/components/sidebar-user-card.component.d.ts.map +1 -1
- package/dist/components/sidebar-user-card.component.js +11 -7
- package/dist/components/sidebar-user-card.component.js.map +1 -1
- package/dist/components/switch.component.d.ts +3 -1
- package/dist/components/switch.component.d.ts.map +1 -1
- package/dist/components/switch.component.js +9 -2
- package/dist/components/switch.component.js.map +1 -1
- package/dist/components/textarea.component.d.ts +15 -9
- package/dist/components/textarea.component.d.ts.map +1 -1
- package/dist/components/textarea.component.js +33 -19
- package/dist/components/textarea.component.js.map +1 -1
- package/dist/components/theme-toggle.component.d.ts +14 -1
- package/dist/components/theme-toggle.component.d.ts.map +1 -1
- package/dist/components/theme-toggle.component.js +27 -6
- package/dist/components/theme-toggle.component.js.map +1 -1
- package/dist/components/toast.component.d.ts +13 -18
- package/dist/components/toast.component.d.ts.map +1 -1
- package/dist/components/toast.component.js +47 -63
- package/dist/components/toast.component.js.map +1 -1
- package/dist/components/tooltip.component.d.ts +17 -2
- package/dist/components/tooltip.component.d.ts.map +1 -1
- package/dist/components/tooltip.component.js +52 -92
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/components/user-menu-popover.component.d.ts +16 -8
- package/dist/components/user-menu-popover.component.d.ts.map +1 -1
- package/dist/components/user-menu-popover.component.js +40 -48
- package/dist/components/user-menu-popover.component.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/utilities/element-props.d.ts +1 -1
- package/dist/utilities/element-props.d.ts.map +1 -1
- package/dist/utilities/element-props.js +3 -13
- package/dist/utilities/element-props.js.map +1 -1
- package/dist/utilities/element.d.ts +10 -0
- package/dist/utilities/element.d.ts.map +1 -1
- package/dist/utilities/element.js +13 -0
- package/dist/utilities/element.js.map +1 -1
- package/dist/utilities/style.d.ts +6 -16
- package/dist/utilities/style.d.ts.map +1 -1
- package/dist/utilities/style.js +38 -117
- package/dist/utilities/style.js.map +1 -1
- package/dist/web-drag.directive.d.ts +25 -0
- package/dist/web-drag.directive.d.ts.map +1 -0
- package/dist/web-drag.directive.js +43 -0
- package/dist/web-drag.directive.js.map +1 -0
- package/dist/web-hover.directive.d.ts +24 -0
- package/dist/web-hover.directive.d.ts.map +1 -0
- package/dist/web-hover.directive.js +42 -0
- package/dist/web-hover.directive.js.map +1 -0
- package/dist/web-wheel-zoom.directive.d.ts +18 -0
- package/dist/web-wheel-zoom.directive.d.ts.map +1 -0
- package/dist/web-wheel-zoom.directive.js +28 -0
- package/dist/web-wheel-zoom.directive.js.map +1 -0
- package/package.json +13 -5
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { Component, ElementRef, EventEmitter, inject, Output, signal, ViewChild, } from '@angular/core';
|
|
7
7
|
import { getClassMap } from '@molecule/app-ui';
|
|
8
8
|
import { nextInstanceId } from '../utilities/ids.js';
|
|
9
|
-
import { moveRestAttributes } from '../utilities/rest-attrs.js';
|
|
9
|
+
import { adoptHostDataMolId, moveRestAttributes } from '../utilities/rest-attrs.js';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
const _c0 = ["inputEl"];
|
|
12
12
|
function FloatingInput_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -39,6 +39,10 @@ export class FloatingInput {
|
|
|
39
39
|
defaultValue;
|
|
40
40
|
/** Explicit input id. */
|
|
41
41
|
id;
|
|
42
|
+
/** `data-mol-id` automation id (React's `automationId`). */
|
|
43
|
+
automationId;
|
|
44
|
+
/** A `data-mol-id` given as a plain rest attribute (React's `rootProps` precedence). */
|
|
45
|
+
dataMolId;
|
|
42
46
|
/** React's `onFocus`, which React spreads onto the <input>: its `currentTarget` is that element. */
|
|
43
47
|
onFocus;
|
|
44
48
|
/** React's `onBlur`, which React spreads onto the <input>: its `currentTarget` is that element. */
|
|
@@ -62,6 +66,8 @@ export class FloatingInput {
|
|
|
62
66
|
/** The per-instance id used when the caller gives none (React's `useId`). */
|
|
63
67
|
generatedId = nextInstanceId();
|
|
64
68
|
internalValue = '';
|
|
69
|
+
/** The `data-mol-id` a caller bound on the host (React spreads it onto the input). */
|
|
70
|
+
externalMolId;
|
|
65
71
|
/**
|
|
66
72
|
* The current class map.
|
|
67
73
|
* @returns The UIClassMap.
|
|
@@ -77,6 +83,13 @@ export class FloatingInput {
|
|
|
77
83
|
inputId() {
|
|
78
84
|
return this.id || this.generatedId;
|
|
79
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* The `data-mol-id` value (`automationId` wins over a rest `data-mol-id`).
|
|
88
|
+
* @returns The attribute value.
|
|
89
|
+
*/
|
|
90
|
+
molId() {
|
|
91
|
+
return this.automationId ?? this.dataMolId ?? this.externalMolId;
|
|
92
|
+
}
|
|
80
93
|
/**
|
|
81
94
|
* Computes the input class list.
|
|
82
95
|
* @returns The class string.
|
|
@@ -131,8 +144,22 @@ export class FloatingInput {
|
|
|
131
144
|
* spread puts them.
|
|
132
145
|
*/
|
|
133
146
|
ngAfterViewInit() {
|
|
147
|
+
this.adoptHostMolId();
|
|
134
148
|
moveRestAttributes(this.host.nativeElement, this.inputEl?.nativeElement);
|
|
135
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Puts a `data-mol-id` bound on the host onto the input in the pass that bound it (the host
|
|
152
|
+
* attribute is written after this component's view is checked).
|
|
153
|
+
*/
|
|
154
|
+
ngAfterViewChecked() {
|
|
155
|
+
this.adoptHostMolId();
|
|
156
|
+
}
|
|
157
|
+
/** Takes a `data-mol-id` off the host and keeps it for the input's binding. */
|
|
158
|
+
adoptHostMolId() {
|
|
159
|
+
adoptHostDataMolId(this.host.nativeElement, this.inputEl?.nativeElement, (id) => {
|
|
160
|
+
this.externalMolId = id;
|
|
161
|
+
}, () => this.molId());
|
|
162
|
+
}
|
|
136
163
|
static ɵfac = function FloatingInput_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FloatingInput)(); };
|
|
137
164
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FloatingInput, selectors: [["span", "mol-floating-input", ""]], viewQuery: function FloatingInput_Query(rf, ctx) { if (rf & 1) {
|
|
138
165
|
i0.ɵɵviewQuery(_c0, 5);
|
|
@@ -141,14 +168,14 @@ export class FloatingInput {
|
|
|
141
168
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputElQuery = _t.first);
|
|
142
169
|
} }, hostVars: 2, hostBindings: function FloatingInput_HostBindings(rf, ctx) { if (rf & 2) {
|
|
143
170
|
i0.ɵɵclassMap(ctx.cm().floatingInputWrapper);
|
|
144
|
-
} }, inputs: { placeholder: "placeholder", className: "className", value: "value", defaultValue: "defaultValue", id: "id", onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown" }, outputs: { change: "change" }, decls: 3, vars:
|
|
171
|
+
} }, inputs: { placeholder: "placeholder", className: "className", value: "value", defaultValue: "defaultValue", id: "id", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"], onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown" }, outputs: { change: "change" }, decls: 3, vars: 7, consts: [["inputEl", ""], [3, "input", "change", "focusin", "focusout", "keydown"], [3, "class"]], template: function FloatingInput_Template(rf, ctx) { if (rf & 1) {
|
|
145
172
|
i0.ɵɵdomElementStart(0, "input", 1, 0);
|
|
146
173
|
i0.ɵɵdomListener("input", function FloatingInput_Template_input_input_0_listener($event) { return ctx.handleInput($event); })("change", function FloatingInput_Template_input_change_0_listener($event) { return ctx.stopPropagation($event); })("focusin", function FloatingInput_Template_input_focusin_0_listener($event) { return ctx.onFocus?.($event); })("focusout", function FloatingInput_Template_input_focusout_0_listener($event) { return ctx.onBlur?.($event); })("keydown", function FloatingInput_Template_input_keydown_0_listener($event) { return ctx.onKeyDown?.($event); });
|
|
147
174
|
i0.ɵɵdomElementEnd();
|
|
148
175
|
i0.ɵɵconditionalCreate(2, FloatingInput_Conditional_2_Template, 2, 4, "label", 2);
|
|
149
176
|
} if (rf & 2) {
|
|
150
177
|
i0.ɵɵclassMap(ctx.classes());
|
|
151
|
-
i0.ɵɵattribute("id", ctx.inputId())("placeholder", ctx.placeholder)("value", ctx.currentValue());
|
|
178
|
+
i0.ɵɵattribute("id", ctx.inputId())("placeholder", ctx.placeholder)("value", ctx.currentValue())("data-mol-id", ctx.molId());
|
|
152
179
|
i0.ɵɵadvance(2);
|
|
153
180
|
i0.ɵɵconditional(ctx.placeholder ? 2 : -1);
|
|
154
181
|
} }, encapsulation: 2 });
|
|
@@ -164,6 +191,8 @@ export class FloatingInput {
|
|
|
164
191
|
'value',
|
|
165
192
|
'defaultValue',
|
|
166
193
|
'id',
|
|
194
|
+
'automationId',
|
|
195
|
+
'dataMolId: data-mol-id',
|
|
167
196
|
'onFocus',
|
|
168
197
|
'onBlur',
|
|
169
198
|
'onKeyDown',
|
|
@@ -176,6 +205,7 @@ export class FloatingInput {
|
|
|
176
205
|
[attr.placeholder]="placeholder"
|
|
177
206
|
[class]="classes()"
|
|
178
207
|
[attr.value]="currentValue()"
|
|
208
|
+
[attr.data-mol-id]="molId()"
|
|
179
209
|
(input)="handleInput($event)"
|
|
180
210
|
(change)="stopPropagation($event)"
|
|
181
211
|
(focusin)="onFocus?.($event)"
|
|
@@ -193,5 +223,5 @@ export class FloatingInput {
|
|
|
193
223
|
type: ViewChild,
|
|
194
224
|
args: ['inputEl']
|
|
195
225
|
}] }); })();
|
|
196
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FloatingInput, { className: "FloatingInput", filePath: "components/floating-input.component.ts", lineNumber:
|
|
226
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FloatingInput, { className: "FloatingInput", filePath: "components/floating-input.component.ts", lineNumber: 70 }); })();
|
|
197
227
|
//# sourceMappingURL=floating-input.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-input.component.js","sourceRoot":"","sources":["../../src/components/floating-input.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"floating-input.component.js","sourceRoot":"","sources":["../../src/components/floating-input.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EAEN,MAAM,EACN,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,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;;;;;OAWG;IACH,IAAI,WAAW,IAAI,cAAc,CAAC,aAAa,CAAC,CAE/C;IAED;;;;OAIG;IACH,IAAI,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,aAAa,CAAC,EAGnD;IAED;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;IAExC;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B;;;OAGG;IACH,KAAK,IAAI,MAAM,GAAG,SAAS;IAS3B;;;OAGG;IACH,QAAQ,IAAI,MAAM,EAAE;IAkBpB;;;;;OAKG;IACG,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAwC/C;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;yCA/KpB,IAAI;2CAAJ,IAAI;CAkLhB"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { Component, ElementRef, inject, signal } from '@angular/core';
|
|
6
|
+
import { Component, ElementRef, inject, isDevMode, signal } from '@angular/core';
|
|
7
7
|
import { useTranslation } from '@molecule/app-angular';
|
|
8
8
|
import { getClassMap } from '@molecule/app-ui';
|
|
9
9
|
import { hostElement } from '../utilities/element.js';
|
|
@@ -176,11 +176,16 @@ export class Form {
|
|
|
176
176
|
const form = event.currentTarget instanceof HTMLFormElement ? event.currentTarget : null;
|
|
177
177
|
if (this.onFormSubmit) {
|
|
178
178
|
event.preventDefault();
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
const entries = Array.from(new FormData(form ?? undefined));
|
|
180
|
+
// `Object.fromEntries` defines every name as an own key: a repeated name
|
|
181
|
+
// keeps its last value, and `__proto__` stays an ordinary field instead
|
|
182
|
+
// of replacing the object's prototype.
|
|
183
|
+
const data = Object.fromEntries(entries);
|
|
184
|
+
// React reads `process.env.NODE_ENV`; Angular's CLI defines no such
|
|
185
|
+
// global, and `isDevMode()` is false in its optimized (production) builds.
|
|
186
|
+
if (isDevMode() && Object.keys(data).length < entries.length) {
|
|
187
|
+
console.error("Form.onFormSubmit received repeated field names and keeps only their last values. Use the form's onSubmit handler for repeated entries.");
|
|
188
|
+
}
|
|
184
189
|
call(() => this.onFormSubmit?.(data));
|
|
185
190
|
}
|
|
186
191
|
call(() => this.onSubmit?.(event));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.component.js","sourceRoot":"","sources":["../../src/components/form.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"form.component.js","sourceRoot":"","sources":["../../src/components/form.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAmB,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;;;;IAuDvC,6BAAI;IAAA,YAAa;IAAA,oBAAK;;;IAAlB,cAAa;IAAb,gCAAa;;;IAFrB,gCAA0C;IACxC,sGAEC;IACH,oBAAK;;;IAJY,oCAAwB;IACvC,cAEC;IAFD,cAAA,iBAAU,CAET;;AAzCT;;;;;;;GAOG;AA4CH,MAAM,OAAO,IAAI;IACf,mEAAmE;IACnE,YAAY,CAAiC;IAC7C,sDAAsD;IACt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C,CAAA;QACvD,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,KAAY;QACtB,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAA;IACvB,CAAC;8FAjLU,IAAI;6DAAJ,IAAI;YAAJ,iFAAA,wBAAoB,IAAhB,kEAAJ,uBAAmB,IAAf;;qEAAJ,WAAO,0BAAG,IAAI,yDAAJ,IAAI,iCAAD,EAAE,GAAG,IAAI;YAAtB,cAAA,eAAW,CAAP;YAAJ,4BAAI;;;YAdJ,qEAA6B;YAOtC,mCAGC;YACC,kBAAyB;YAC3B,oBAAW;;YAZF,oDAMR;YAEC,cAAmC;YAAnC,4CAAmC;;;;iFAM5B,IAAI;cA3ChB,SAAS;eAAC;gBACT,QAAQ,EAAE,gBAAgB;gBAC1B,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE;oBACN,cAAc;oBACd,UAAU;oBACV,SAAS;oBACT,YAAY;oBACZ,aAAa;oBACb,QAAQ;oBACR,QAAQ;oBACR,YAAY;oBACZ,WAAW;oBACX,OAAO;oBACP,QAAQ;oBACR,cAAc;oBACd,wBAAwB;iBACzB;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,SAAS,EAAE,aAAa;oBACxB,oBAAoB,EAAE,QAAQ;oBAC9B,oBAAoB,EAAE,SAAS;oBAC/B,eAAe,EAAE,gBAAgB;oBACjC,eAAe,EAAE,gBAAgB;oBACjC,mBAAmB,EAAE,wBAAwB;oBAC7C,UAAU,EAAE,sBAAsB;oBAClC,SAAS,EAAE,qBAAqB;iBACjC;gBACD,QAAQ,EAAE;;;;;;;;;;;;gBAYI;aACf;;kFACY,IAAI"}
|
|
@@ -19,6 +19,7 @@ export * from './confirm-button.component.js';
|
|
|
19
19
|
export * from './confirm-dialog.component.js';
|
|
20
20
|
export * from './dropdown.component.js';
|
|
21
21
|
export * from './empty-state.component.js';
|
|
22
|
+
export * from './file-field.component.js';
|
|
22
23
|
export * from './floating-input.component.js';
|
|
23
24
|
export * from './form.component.js';
|
|
24
25
|
export * from './form-field.component.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,uBAAuB,CAAA;AACrC,cAAc,kCAAkC,CAAA;AAChD,cAAc,sBAAsB,CAAA;AACpC,cAAc,yCAAyC,CAAA;AACvD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qCAAqC,CAAA;AACnD,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kCAAkC,CAAA;AAChD,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAA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AA;AAChD,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kCAAkC,CAAA;AAEhD;;;;;;;;;;GAUG;AACH,cAAc,qBAAqB,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export * from './confirm-button.component.js';
|
|
|
19
19
|
export * from './confirm-dialog.component.js';
|
|
20
20
|
export * from './dropdown.component.js';
|
|
21
21
|
export * from './empty-state.component.js';
|
|
22
|
+
export * from './file-field.component.js';
|
|
22
23
|
export * from './floating-input.component.js';
|
|
23
24
|
export * from './form.component.js';
|
|
24
25
|
export * from './form-field.component.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAA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AAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,uBAAuB,CAAA;AACrC,cAAc,kCAAkC,CAAA;AAChD,cAAc,sBAAsB,CAAA;AACpC,cAAc,yCAAyC,CAAA;AACvD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qCAAqC,CAAA;AACnD,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kCAAkC,CAAA;AAChD,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kCAAkC,CAAA;AAEhD;;;;;;;;;;GAUG;AACH,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AfterViewChecked, ElementRef, EventEmitter, TemplateRef } from '@angular/core';
|
|
2
2
|
import type { FocusEventHandler, KeyboardEventHandler, Size, UIClassMap } from '@molecule/app-ui';
|
|
3
|
+
import { fieldLayout } from '@molecule/app-ui';
|
|
3
4
|
import type { HasElement } from '../utilities/element.js';
|
|
4
5
|
import type { FormFieldContext } from '../utilities/form-field-context.js';
|
|
5
6
|
import { type ResolvedIcon } from '../utilities/render-icon.js';
|
|
@@ -8,7 +9,8 @@ import * as i1 from "@molecule/app-angular";
|
|
|
8
9
|
/**
|
|
9
10
|
* Input component.
|
|
10
11
|
*
|
|
11
|
-
* The host is the
|
|
12
|
+
* The host is the field's outer wrapper React renders (the shared field layout's
|
|
13
|
+
* `root`, a flex column). React's text-input
|
|
12
14
|
* `onChange` fires on `input` events; a controlled `value` is restored after
|
|
13
15
|
* user input exactly like React's controlled-input state restore.
|
|
14
16
|
*
|
|
@@ -70,6 +72,8 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
70
72
|
onKeyDown?: KeyboardEventHandler;
|
|
71
73
|
/** Fires the raw `input` event (React's text-input onChange). */
|
|
72
74
|
readonly change: EventEmitter<Event>;
|
|
75
|
+
/** Fires with the edited text or an empty string when the clear button is clicked. */
|
|
76
|
+
readonly valueChange: EventEmitter<string>;
|
|
73
77
|
/** Fires the clear button's click event. */
|
|
74
78
|
readonly clear: EventEmitter<Event>;
|
|
75
79
|
/** The native input (React's `...rest` spread target). */
|
|
@@ -109,6 +113,12 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
109
113
|
* @returns The UIClassMap.
|
|
110
114
|
*/
|
|
111
115
|
cm(): UIClassMap;
|
|
116
|
+
/**
|
|
117
|
+
* The classes of the field's two wrappers, from the shared field layout: `root` for the
|
|
118
|
+
* host, `inner` for the row that holds the control and its adornments.
|
|
119
|
+
* @returns The outer wrapper's classes and the control row's classes.
|
|
120
|
+
*/
|
|
121
|
+
field(): ReturnType<typeof fieldLayout>;
|
|
112
122
|
/**
|
|
113
123
|
* The input id (`id`, `name`, or a stable generated id; the DOM normalizer
|
|
114
124
|
* renumbers generated ids in order of appearance, like React's `useId`).
|
|
@@ -163,6 +173,12 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
163
173
|
* @param event - The native input event.
|
|
164
174
|
*/
|
|
165
175
|
handleInput(event: Event): void;
|
|
176
|
+
/**
|
|
177
|
+
* Reports the clear action and the empty value.
|
|
178
|
+
*
|
|
179
|
+
* @param event - The clear button's click event.
|
|
180
|
+
*/
|
|
181
|
+
handleClear(event: MouseEvent): void;
|
|
166
182
|
/**
|
|
167
183
|
* The native change event never reaches the host (its `change` output
|
|
168
184
|
* binding would record it a second time; React's onChange already fired on
|
|
@@ -212,6 +228,6 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
212
228
|
*/
|
|
213
229
|
private isGiven;
|
|
214
230
|
static ɵfac: i0.ɵɵFactoryDeclaration<Input, never>;
|
|
215
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Input, "div[mol-input]", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "align": { "alias": "align"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "leftElement": { "alias": "leftElement"; "required": false; }; "rightElement": { "alias": "rightElement"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearLabel": { "alias": "clearLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; "dataMolId": { "alias": "data-mol-id"; "required": false; }; "onFocus": { "alias": "onFocus"; "required": false; }; "onBlur": { "alias": "onBlur"; "required": false; }; "onKeyDown": { "alias": "onKeyDown"; "required": false; }; }, { "change": "change"; "clear": "clear"; }, never, ["[slot=leftElement]", "[slot=rightElement]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
|
|
231
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Input, "div[mol-input]", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "align": { "alias": "align"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "leftElement": { "alias": "leftElement"; "required": false; }; "rightElement": { "alias": "rightElement"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearLabel": { "alias": "clearLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; "dataMolId": { "alias": "data-mol-id"; "required": false; }; "onFocus": { "alias": "onFocus"; "required": false; }; "onBlur": { "alias": "onBlur"; "required": false; }; "onKeyDown": { "alias": "onKeyDown"; "required": false; }; }, { "change": "change"; "valueChange": "valueChange"; "clear": "clear"; }, never, ["[slot=leftElement]", "[slot=rightElement]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
|
|
216
232
|
}
|
|
217
233
|
//# sourceMappingURL=input.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,gBAAgB,EAErB,UAAU,EACV,YAAY,EAIZ,WAAW,EAEZ,MAAM,eAAe,CAAA;AAStB,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,gBAAgB,EAEr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IAwCjB;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI;IAIvD;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAI9B;;;;;OAKG;IACH,OAAO,CAAC,OAAO;yCAtWJ,KAAK;2CAAL,KAAK;CAyWjB"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
7
7
|
import { Component, ElementRef, EventEmitter, inject, Output, signal, TemplateRef, ViewChild, } from '@angular/core';
|
|
8
8
|
import { MolPlacement, setElementPresent, usePlacement, useTranslation, } from '@molecule/app-angular';
|
|
9
|
-
import { getClassMap } from '@molecule/app-ui';
|
|
9
|
+
import { fieldLayout, getClassMap } from '@molecule/app-ui';
|
|
10
10
|
import { fieldContext } from '../utilities/form-field-context.js';
|
|
11
11
|
import { nextInstanceId } from '../utilities/ids.js';
|
|
12
12
|
import { MolIconSvg, resolveIcon } from '../utilities/render-icon.js';
|
|
@@ -46,13 +46,14 @@ function Input_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
46
46
|
function Input_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
47
47
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
48
48
|
i0.ɵɵelementStart(0, "button", 8);
|
|
49
|
-
i0.ɵɵlistener("click", function Input_Conditional_11_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.
|
|
49
|
+
i0.ɵɵlistener("click", function Input_Conditional_11_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.handleClear($event)); });
|
|
50
50
|
i0.ɵɵnamespaceSVG();
|
|
51
51
|
i0.ɵɵelement(1, "svg", 9);
|
|
52
52
|
i0.ɵɵelementEnd();
|
|
53
53
|
} if (rf & 2) {
|
|
54
54
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
55
55
|
i0.ɵɵclassMap(ctx_r0.cm().inputClearButton);
|
|
56
|
+
i0.ɵɵproperty("disabled", ctx_r0.disabled);
|
|
56
57
|
i0.ɵɵattribute("aria-label", ctx_r0.clearText());
|
|
57
58
|
i0.ɵɵadvance();
|
|
58
59
|
i0.ɵɵproperty("data", ctx_r0.clearIcon());
|
|
@@ -93,7 +94,8 @@ function Input_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
|
93
94
|
/**
|
|
94
95
|
* Input component.
|
|
95
96
|
*
|
|
96
|
-
* The host is the
|
|
97
|
+
* The host is the field's outer wrapper React renders (the shared field layout's
|
|
98
|
+
* `root`, a flex column). React's text-input
|
|
97
99
|
* `onChange` fires on `input` events; a controlled `value` is restored after
|
|
98
100
|
* user input exactly like React's controlled-input state restore.
|
|
99
101
|
*
|
|
@@ -155,6 +157,8 @@ export class Input {
|
|
|
155
157
|
onKeyDown;
|
|
156
158
|
/** Fires the raw `input` event (React's text-input onChange). */
|
|
157
159
|
change = new EventEmitter();
|
|
160
|
+
/** Fires with the edited text or an empty string when the clear button is clicked. */
|
|
161
|
+
valueChange = new EventEmitter();
|
|
158
162
|
/** Fires the clear button's click event. */
|
|
159
163
|
clear = new EventEmitter();
|
|
160
164
|
/** The native input (React's `...rest` spread target). */
|
|
@@ -204,6 +208,14 @@ export class Input {
|
|
|
204
208
|
cm() {
|
|
205
209
|
return getClassMap();
|
|
206
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* The classes of the field's two wrappers, from the shared field layout: `root` for the
|
|
213
|
+
* host, `inner` for the row that holds the control and its adornments.
|
|
214
|
+
* @returns The outer wrapper's classes and the control row's classes.
|
|
215
|
+
*/
|
|
216
|
+
field() {
|
|
217
|
+
return fieldLayout(this.cm());
|
|
218
|
+
}
|
|
207
219
|
/**
|
|
208
220
|
* The input id (`id`, `name`, or a stable generated id; the DOM normalizer
|
|
209
221
|
* renumbers generated ids in order of appearance, like React's `useId`).
|
|
@@ -290,9 +302,20 @@ export class Input {
|
|
|
290
302
|
event.stopPropagation();
|
|
291
303
|
this.change.emit(event);
|
|
292
304
|
const input = this.inputEl?.nativeElement;
|
|
305
|
+
if (input)
|
|
306
|
+
this.valueChange.emit(input.value);
|
|
293
307
|
if (this.value !== undefined && input && input.value !== String(this.value))
|
|
294
308
|
input.value = String(this.value);
|
|
295
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* Reports the clear action and the empty value.
|
|
312
|
+
*
|
|
313
|
+
* @param event - The clear button's click event.
|
|
314
|
+
*/
|
|
315
|
+
handleClear(event) {
|
|
316
|
+
this.clear.emit(event);
|
|
317
|
+
this.valueChange.emit('');
|
|
318
|
+
}
|
|
296
319
|
/**
|
|
297
320
|
* The native change event never reaches the host (its `change` output
|
|
298
321
|
* binding would record it a second time; React's onChange already fired on
|
|
@@ -407,8 +430,8 @@ export class Input {
|
|
|
407
430
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rightSlot = _t.first);
|
|
408
431
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rightInner = _t.first);
|
|
409
432
|
} }, hostVars: 2, hostBindings: function Input_HostBindings(rf, ctx) { if (rf & 2) {
|
|
410
|
-
i0.ɵɵclassMap(ctx.
|
|
411
|
-
} }, inputs: { type: "type", size: "size", align: "align", label: "label", error: "error", hint: "hint", leftElement: "leftElement", rightElement: "rightElement", clearable: "clearable", clearLabel: "clearLabel", className: "className", style: "style", testId: "testId", disabled: "disabled", required: "required", value: "value", defaultValue: "defaultValue", placeholder: "placeholder", name: "name", id: "id", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"], onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown" }, outputs: { change: "change", clear: "clear" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], ngContentSelectors: _c5, decls: 19, vars: 28, consts: [["leftSlot", ""], ["inputEl", ""], ["rightSlot", ""], ["rightInner", ""], [3, "class"], [3, "ngTemplateOutlet"], [3, "input", "change", "focusin", "focusout", "keydown", "disabled"], ["type", "button", 3, "class"], ["type", "button", 3, "click"], ["mol-icon", "", 3, "data"]], template: function Input_Template(rf, ctx) { if (rf & 1) {
|
|
433
|
+
i0.ɵɵclassMap(ctx.field().root);
|
|
434
|
+
} }, inputs: { type: "type", size: "size", align: "align", label: "label", error: "error", hint: "hint", leftElement: "leftElement", rightElement: "rightElement", clearable: "clearable", clearLabel: "clearLabel", className: "className", style: "style", testId: "testId", disabled: "disabled", required: "required", value: "value", defaultValue: "defaultValue", placeholder: "placeholder", name: "name", id: "id", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"], onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown" }, outputs: { change: "change", valueChange: "valueChange", clear: "clear" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], ngContentSelectors: _c5, decls: 19, vars: 28, consts: [["leftSlot", ""], ["inputEl", ""], ["rightSlot", ""], ["rightInner", ""], [3, "class"], [3, "ngTemplateOutlet"], [3, "input", "change", "focusin", "focusout", "keydown", "disabled"], ["type", "button", 3, "disabled", "class"], ["type", "button", 3, "click", "disabled"], ["mol-icon", "", 3, "data"]], template: function Input_Template(rf, ctx) { if (rf & 1) {
|
|
412
435
|
i0.ɵɵprojectionDef(_c4);
|
|
413
436
|
i0.ɵɵconditionalCreate(0, Input_Conditional_0_Template, 2, 6, "label", 4);
|
|
414
437
|
i0.ɵɵelementStart(1, "div")(2, "div", null, 0);
|
|
@@ -419,7 +442,7 @@ export class Input {
|
|
|
419
442
|
i0.ɵɵlistener("input", function Input_Template_input_input_7_listener($event) { return ctx.handleInput($event); })("change", function Input_Template_input_change_7_listener($event) { return ctx.handleChange($event); })("focusin", function Input_Template_input_focusin_7_listener($event) { return ctx.onFocus?.($event); })("focusout", function Input_Template_input_focusout_7_listener($event) { return ctx.onBlur?.($event); })("keydown", function Input_Template_input_keydown_7_listener($event) { return ctx.onKeyDown?.($event); });
|
|
420
443
|
i0.ɵɵelementEnd();
|
|
421
444
|
i0.ɵɵelementStart(9, "div", null, 2);
|
|
422
|
-
i0.ɵɵconditionalCreate(11, Input_Conditional_11_Template, 2,
|
|
445
|
+
i0.ɵɵconditionalCreate(11, Input_Conditional_11_Template, 2, 5, "button", 7);
|
|
423
446
|
i0.ɵɵelementStart(12, "span", null, 3);
|
|
424
447
|
i0.ɵɵprojection(14, 1);
|
|
425
448
|
i0.ɵɵconditionalCreate(15, Input_Conditional_15_Template, 1, 1, "ng-container", 5)(16, Input_Conditional_16_Template, 1, 1);
|
|
@@ -431,7 +454,7 @@ export class Input {
|
|
|
431
454
|
let tmp_24_0;
|
|
432
455
|
i0.ɵɵconditional(ctx.label ? 0 : -1);
|
|
433
456
|
i0.ɵɵadvance();
|
|
434
|
-
i0.ɵɵclassMap(ctx.
|
|
457
|
+
i0.ɵɵclassMap(ctx.field().inner);
|
|
435
458
|
i0.ɵɵadvance();
|
|
436
459
|
i0.ɵɵclassMap(ctx.cm().inputLeftElement);
|
|
437
460
|
i0.ɵɵadvance(3);
|
|
@@ -489,7 +512,7 @@ export class Input {
|
|
|
489
512
|
'onKeyDown',
|
|
490
513
|
],
|
|
491
514
|
host: {
|
|
492
|
-
'[class]': '
|
|
515
|
+
'[class]': 'field().root',
|
|
493
516
|
},
|
|
494
517
|
template: `@if (label) {
|
|
495
518
|
<label
|
|
@@ -498,7 +521,7 @@ export class Input {
|
|
|
498
521
|
>{{ label }}</label
|
|
499
522
|
>
|
|
500
523
|
}
|
|
501
|
-
<div [class]="
|
|
524
|
+
<div [class]="field().inner">
|
|
502
525
|
<div [class]="cm().inputLeftElement" #leftSlot>
|
|
503
526
|
<ng-content select="[slot=leftElement]"></ng-content>
|
|
504
527
|
@if (asTemplate(leftElement); as tpl) {
|
|
@@ -532,7 +555,8 @@ export class Input {
|
|
|
532
555
|
@if (clearable && value) {
|
|
533
556
|
<button
|
|
534
557
|
type="button"
|
|
535
|
-
|
|
558
|
+
[disabled]="disabled"
|
|
559
|
+
(click)="handleClear($event)"
|
|
536
560
|
[class]="cm().inputClearButton"
|
|
537
561
|
[attr.aria-label]="clearText()"
|
|
538
562
|
>
|
|
@@ -558,6 +582,8 @@ export class Input {
|
|
|
558
582
|
}]
|
|
559
583
|
}], () => [], { change: [{
|
|
560
584
|
type: Output
|
|
585
|
+
}], valueChange: [{
|
|
586
|
+
type: Output
|
|
561
587
|
}], clear: [{
|
|
562
588
|
type: Output
|
|
563
589
|
}], inputElQuery: [{
|
|
@@ -573,5 +599,5 @@ export class Input {
|
|
|
573
599
|
type: ViewChild,
|
|
574
600
|
args: ['rightInner']
|
|
575
601
|
}] }); })();
|
|
576
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Input, { className: "Input", filePath: "components/input.component.ts", lineNumber:
|
|
602
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Input, { className: "Input", filePath: "components/input.component.ts", lineNumber: 156 }); })();
|
|
577
603
|
//# sourceMappingURL=input.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.component.js","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAEL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EACN,MAAM,EACN,MAAM,EACN,WAAW,EACX,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,YAAY,EACZ,iBAAiB,EAEjB,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"input.component.js","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"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AI;gBAChB,cAAc,EAAE,CAAC,YAAY,CAAC;gBAC9B,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;gBACvC,MAAM,EAAE;oBACN,MAAM;oBACN,MAAM;oBACN,OAAO;oBACP,OAAO;oBACP,OAAO;oBACP,MAAM;oBACN,aAAa;oBACb,cAAc;oBACd,WAAW;oBACX,YAAY;oBACZ,WAAW;oBACX,OAAO;oBACP,QAAQ;oBACR,UAAU;oBACV,UAAU;oBACV,OAAO;oBACP,cAAc;oBACd,aAAa;oBACb,MAAM;oBACN,IAAI;oBACJ,cAAc;oBACd,wBAAwB;oBACxB,SAAS;oBACT,QAAQ;oBACR,WAAW;iBACZ;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,cAAc;iBAC1B;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgEN;aACL;;kBAuDE,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAKN,SAAS;mBAAC,SAAS;;kBAUnB,SAAS;mBAAC,UAAU;;kBAEpB,SAAS;mBAAC,WAAW;;kBAErB,SAAS;mBAAC,YAAY;;kFA7EZ,KAAK"}
|
|
@@ -37,6 +37,10 @@ export interface LanguagePickerProps {
|
|
|
37
37
|
className?: string;
|
|
38
38
|
/** Inline style object for the trigger button (React camelCase). */
|
|
39
39
|
style?: Record<string, unknown>;
|
|
40
|
+
/** `data-testid` for the trigger button. */
|
|
41
|
+
testId?: string;
|
|
42
|
+
/** `data-mol-id` for the trigger button (React's `automationId`; default `language-picker-trigger`). */
|
|
43
|
+
automationId?: string;
|
|
40
44
|
/** Optional trigger replacement (a node value rendered as a template). */
|
|
41
45
|
renderTrigger?: TemplateRef<unknown>;
|
|
42
46
|
}
|
|
@@ -69,6 +73,10 @@ export declare class LanguagePicker {
|
|
|
69
73
|
className?: LanguagePickerProps['className'];
|
|
70
74
|
/** Inline style object for the trigger button (React camelCase). */
|
|
71
75
|
style?: LanguagePickerProps['style'];
|
|
76
|
+
/** `data-testid` for the trigger button. */
|
|
77
|
+
testId?: LanguagePickerProps['testId'];
|
|
78
|
+
/** `data-mol-id` for the trigger button (React's `automationId`). */
|
|
79
|
+
automationId?: LanguagePickerProps['automationId'];
|
|
72
80
|
/** Optional trigger replacement (a node value rendered as a template). */
|
|
73
81
|
renderTrigger?: LanguagePickerProps['renderTrigger'];
|
|
74
82
|
/**
|
|
@@ -152,6 +160,6 @@ export declare class LanguagePicker {
|
|
|
152
160
|
*/
|
|
153
161
|
pick(code: string): Promise<void>;
|
|
154
162
|
static ɵfac: i0.ɵɵFactoryDeclaration<LanguagePicker, never>;
|
|
155
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LanguagePicker, "mol-language-picker", never, { "labelKey": { "alias": "labelKey"; "required": false; }; "labelDefault": { "alias": "labelDefault"; "required": false; }; "modalTitleKey": { "alias": "modalTitleKey"; "required": false; }; "modalTitleDefault": { "alias": "modalTitleDefault"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "display": { "alias": "display"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "renderTrigger": { "alias": "renderTrigger"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
|
|
163
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LanguagePicker, "mol-language-picker", never, { "labelKey": { "alias": "labelKey"; "required": false; }; "labelDefault": { "alias": "labelDefault"; "required": false; }; "modalTitleKey": { "alias": "modalTitleKey"; "required": false; }; "modalTitleDefault": { "alias": "modalTitleDefault"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "display": { "alias": "display"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; "renderTrigger": { "alias": "renderTrigger"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
|
|
156
164
|
}
|
|
157
165
|
//# sourceMappingURL=language-picker.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-picker.component.d.ts","sourceRoot":"","sources":["../../src/components/language-picker.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAa,UAAU,EAAkB,WAAW,EAAa,MAAM,eAAe,CAAA;AAU7F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;;AAQlD;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,mFAAmF;IACnF,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mEAAmE;IACnE,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IAClC,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,0EAA0E;IAC1E,aAAa,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CACrC;AAED;;;;;;;;;GASG;AACH,
|
|
1
|
+
{"version":3,"file":"language-picker.component.d.ts","sourceRoot":"","sources":["../../src/components/language-picker.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;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