@wirekyt/angular 0.0.24 → 0.0.26
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/dist/fesm2022/wirekyt-angular-editable.mjs +527 -0
- package/dist/fesm2022/wirekyt-angular-editable.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-field.mjs +1 -2
- package/dist/fesm2022/wirekyt-angular-field.mjs.map +1 -1
- package/dist/package.json +5 -1
- package/dist/types/wirekyt-angular-checkbox.d.ts +1 -1
- package/dist/types/wirekyt-angular-color-picker.d.ts +1 -1
- package/dist/types/wirekyt-angular-combobox.d.ts +1 -1
- package/dist/types/wirekyt-angular-date-picker.d.ts +1 -1
- package/dist/types/wirekyt-angular-editable.d.ts +181 -0
- package/dist/types/wirekyt-angular-editable.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-field.d.ts.map +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import * as editable from '@wirekyt/dom/machines/editable';
|
|
2
|
+
export { anatomy as editableAnatomy } from '@wirekyt/dom/machines/editable';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, inject, input, model, booleanAttribute, output, signal, effect, DestroyRef, Renderer2, ElementRef, forwardRef, Directive, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
5
|
+
import { injectLocale, injectEnvironment, createId, useMachine, createCvaController, bindProps } from '@wirekyt/angular';
|
|
6
|
+
import { injectFieldContextOptional } from '@wirekyt/angular/field';
|
|
7
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
+
|
|
9
|
+
const EDITABLE_CONTEXT = new InjectionToken("WIREKYT.EDITABLE_CONTEXT");
|
|
10
|
+
function injectEditableContext() {
|
|
11
|
+
return inject(EDITABLE_CONTEXT);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function useEditable(options = { context: () => ({}) }) {
|
|
15
|
+
const locale = injectLocale();
|
|
16
|
+
const environment = injectEnvironment();
|
|
17
|
+
const field = injectFieldContextOptional();
|
|
18
|
+
const fallbackId = createId();
|
|
19
|
+
return useMachine({
|
|
20
|
+
machine: editable.machine,
|
|
21
|
+
context: () => {
|
|
22
|
+
const props = options.context();
|
|
23
|
+
const merged = {
|
|
24
|
+
dir: locale.dir,
|
|
25
|
+
getRootNode: environment.getRootNode,
|
|
26
|
+
...props,
|
|
27
|
+
id: props.id ?? fallbackId,
|
|
28
|
+
};
|
|
29
|
+
if (field) {
|
|
30
|
+
const fieldIds = field.ids;
|
|
31
|
+
merged["ids"] = {
|
|
32
|
+
label: fieldIds.label,
|
|
33
|
+
input: fieldIds.control,
|
|
34
|
+
...props.ids,
|
|
35
|
+
};
|
|
36
|
+
merged["disabled"] = Boolean(props.disabled) || field.disabled() || undefined;
|
|
37
|
+
merged["invalid"] = Boolean(props.invalid) || field.invalid() || undefined;
|
|
38
|
+
merged["readOnly"] = Boolean(props.readOnly) || field.readOnly() || undefined;
|
|
39
|
+
merged["required"] = Boolean(props.required) || field.required() || undefined;
|
|
40
|
+
}
|
|
41
|
+
return merged;
|
|
42
|
+
},
|
|
43
|
+
connect: (service, normalize) => editable.connect(service, normalize),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
class EditableRoot {
|
|
48
|
+
/** The id of the editable. */
|
|
49
|
+
id = input(undefined, /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
51
|
+
/** The element ids for the editable parts. */
|
|
52
|
+
elementIds = input(undefined, { ...(ngDevMode ? { debugName: "elementIds" } : /* istanbul ignore next */ {}), alias: "ids" });
|
|
53
|
+
/** The controlled value of the editable. */
|
|
54
|
+
value = model(undefined, /* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
56
|
+
/** The initial value of the editable when uncontrolled. */
|
|
57
|
+
defaultValue = input(undefined, /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
59
|
+
/** The controlled edit state of the editable. */
|
|
60
|
+
edit = model(undefined, /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "edit" }] : /* istanbul ignore next */ []));
|
|
62
|
+
/** The initial edit state of the editable when uncontrolled. */
|
|
63
|
+
defaultEdit = input(false, { ...(ngDevMode ? { debugName: "defaultEdit" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
64
|
+
/** Whether the editable is disabled. */
|
|
65
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
66
|
+
/** Whether the editable is read-only. */
|
|
67
|
+
readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
68
|
+
/** Whether the editable is invalid. */
|
|
69
|
+
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
70
|
+
/** Whether the editable is required. */
|
|
71
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
72
|
+
/** The placeholder text for the editable. */
|
|
73
|
+
placeholder = input(undefined, /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
75
|
+
/** The name attribute of the editable input. */
|
|
76
|
+
name = input(undefined, /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
78
|
+
/** The form attribute of the editable input. */
|
|
79
|
+
form = input(undefined, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
81
|
+
/** The maximum number of characters allowed. */
|
|
82
|
+
maxLength = input(undefined, /* @ts-ignore */
|
|
83
|
+
...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
|
|
84
|
+
/** The activation mode for the preview element. */
|
|
85
|
+
activationMode = input(undefined, /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "activationMode" }] : /* istanbul ignore next */ []));
|
|
87
|
+
/** The action that triggers submit in edit mode. */
|
|
88
|
+
submitMode = input(undefined, /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "submitMode" }] : /* istanbul ignore next */ []));
|
|
90
|
+
/** Whether the editable should auto-resize to fit content. */
|
|
91
|
+
autoResize = input(false, { ...(ngDevMode ? { debugName: "autoResize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
92
|
+
/** Whether to select the text in the input when focused. */
|
|
93
|
+
selectOnFocus = input(true, { ...(ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
94
|
+
/** The translations for the editable. */
|
|
95
|
+
translations = input(undefined, /* @ts-ignore */
|
|
96
|
+
...(ngDevMode ? [{ debugName: "translations" }] : /* istanbul ignore next */ []));
|
|
97
|
+
/** The element that should receive focus when edit mode exits. */
|
|
98
|
+
finalFocusEl = input(undefined, /* @ts-ignore */
|
|
99
|
+
...(ngDevMode ? [{ debugName: "finalFocusEl" }] : /* istanbul ignore next */ []));
|
|
100
|
+
/** Emits the details when the edit state changes. */
|
|
101
|
+
editDetailsChange = output();
|
|
102
|
+
/** Emits the details when the editable value changes. */
|
|
103
|
+
valueDetailsChange = output();
|
|
104
|
+
/** Emits when the editable value is committed. */
|
|
105
|
+
valueCommit = output();
|
|
106
|
+
/** Emits when the editable value is reverted. */
|
|
107
|
+
valueRevert = output();
|
|
108
|
+
/** Emits when focus moves outside the editable while editing. */
|
|
109
|
+
focusOutside = output();
|
|
110
|
+
/** Emits when pointer down happens outside the editable while editing. */
|
|
111
|
+
pointerDownOutside = output();
|
|
112
|
+
/** Emits when an interaction happens outside the editable while editing. */
|
|
113
|
+
interactOutside = output();
|
|
114
|
+
_disabledFromForm = signal(false, /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "_disabledFromForm" }] : /* istanbul ignore next */ []));
|
|
116
|
+
_pendingInternalWrites = 0;
|
|
117
|
+
_hasExternalBinding = false;
|
|
118
|
+
_hasReceivedFormWrite = false;
|
|
119
|
+
cva = createCvaController({
|
|
120
|
+
value: this.value,
|
|
121
|
+
setDisabled: (disabled) => this._disabledFromForm.set(disabled),
|
|
122
|
+
componentName: "EditableRoot",
|
|
123
|
+
hasExternalModelBinding: () => this._hasExternalBinding,
|
|
124
|
+
});
|
|
125
|
+
machine = useEditable({
|
|
126
|
+
context: () => ({
|
|
127
|
+
id: this.id(),
|
|
128
|
+
ids: this.elementIds(),
|
|
129
|
+
value: this.value(),
|
|
130
|
+
defaultValue: this.defaultValue(),
|
|
131
|
+
edit: this.edit(),
|
|
132
|
+
defaultEdit: this.defaultEdit(),
|
|
133
|
+
disabled: this.disabled() || this._disabledFromForm(),
|
|
134
|
+
readOnly: this.readOnly(),
|
|
135
|
+
invalid: this.invalid(),
|
|
136
|
+
required: this.required(),
|
|
137
|
+
placeholder: this.placeholder(),
|
|
138
|
+
name: this.name(),
|
|
139
|
+
form: this.form(),
|
|
140
|
+
maxLength: this.maxLength(),
|
|
141
|
+
activationMode: this.activationMode(),
|
|
142
|
+
submitMode: this.submitMode(),
|
|
143
|
+
autoResize: this.autoResize(),
|
|
144
|
+
selectOnFocus: this.selectOnFocus(),
|
|
145
|
+
translations: this.translations(),
|
|
146
|
+
finalFocusEl: this.finalFocusEl(),
|
|
147
|
+
onValueChange: (details) => {
|
|
148
|
+
if (this.value() !== details.value) {
|
|
149
|
+
this._pendingInternalWrites++;
|
|
150
|
+
this.value.set(details.value);
|
|
151
|
+
}
|
|
152
|
+
this.cva.notifyValueChange(details.value);
|
|
153
|
+
this.valueDetailsChange.emit(details);
|
|
154
|
+
},
|
|
155
|
+
onValueCommit: (details) => {
|
|
156
|
+
this.valueCommit.emit(details);
|
|
157
|
+
this.cva.markTouched();
|
|
158
|
+
},
|
|
159
|
+
onValueRevert: (details) => {
|
|
160
|
+
this.valueRevert.emit(details);
|
|
161
|
+
},
|
|
162
|
+
onEditChange: (details) => {
|
|
163
|
+
this.edit.set(details.edit);
|
|
164
|
+
this.editDetailsChange.emit(details);
|
|
165
|
+
if (!details.edit) {
|
|
166
|
+
this.cva.markTouched();
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
onFocusOutside: (event) => this.focusOutside.emit(event),
|
|
170
|
+
onPointerDownOutside: (event) => this.pointerDownOutside.emit(event),
|
|
171
|
+
onInteractOutside: (event) => this.interactOutside.emit(event),
|
|
172
|
+
}),
|
|
173
|
+
});
|
|
174
|
+
state = this.machine.state;
|
|
175
|
+
api = this.machine.api;
|
|
176
|
+
service = this.machine.service;
|
|
177
|
+
send = this.machine.send;
|
|
178
|
+
constructor() {
|
|
179
|
+
let firstRun = true;
|
|
180
|
+
effect(() => {
|
|
181
|
+
void this.value();
|
|
182
|
+
if (firstRun) {
|
|
183
|
+
firstRun = false;
|
|
184
|
+
this._pendingInternalWrites = 0;
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (this._pendingInternalWrites > 0) {
|
|
188
|
+
this._pendingInternalWrites--;
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
this._hasExternalBinding = true;
|
|
192
|
+
});
|
|
193
|
+
bindProps({
|
|
194
|
+
elementRef: inject(ElementRef),
|
|
195
|
+
renderer: inject(Renderer2),
|
|
196
|
+
destroyRef: inject(DestroyRef),
|
|
197
|
+
props: () => this.api().getRootProps(),
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
writeValue(value) {
|
|
201
|
+
const next = value === null ? undefined : value;
|
|
202
|
+
const current = this.value();
|
|
203
|
+
if (!this._hasReceivedFormWrite && current !== undefined) {
|
|
204
|
+
this._hasExternalBinding = true;
|
|
205
|
+
}
|
|
206
|
+
this._hasReceivedFormWrite = true;
|
|
207
|
+
if (current !== next) {
|
|
208
|
+
this._pendingInternalWrites++;
|
|
209
|
+
}
|
|
210
|
+
this.cva.writeValue(value);
|
|
211
|
+
}
|
|
212
|
+
registerOnChange(fn) {
|
|
213
|
+
this.cva.registerOnChange(fn);
|
|
214
|
+
}
|
|
215
|
+
registerOnTouched(fn) {
|
|
216
|
+
this.cva.registerOnTouched(fn);
|
|
217
|
+
}
|
|
218
|
+
setDisabledState(disabled) {
|
|
219
|
+
this.cva.setDisabledState(disabled);
|
|
220
|
+
}
|
|
221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
222
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: EditableRoot, isStandalone: true, selector: "[editable-root]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, elementIds: { classPropertyName: "elementIds", publicName: "ids", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, edit: { classPropertyName: "edit", publicName: "edit", isSignal: true, isRequired: false, transformFunction: null }, defaultEdit: { classPropertyName: "defaultEdit", publicName: "defaultEdit", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, activationMode: { classPropertyName: "activationMode", publicName: "activationMode", isSignal: true, isRequired: false, transformFunction: null }, submitMode: { classPropertyName: "submitMode", publicName: "submitMode", isSignal: true, isRequired: false, transformFunction: null }, autoResize: { classPropertyName: "autoResize", publicName: "autoResize", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, translations: { classPropertyName: "translations", publicName: "translations", isSignal: true, isRequired: false, transformFunction: null }, finalFocusEl: { classPropertyName: "finalFocusEl", publicName: "finalFocusEl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", edit: "editChange", editDetailsChange: "editDetailsChange", valueDetailsChange: "valueDetailsChange", valueCommit: "valueCommit", valueRevert: "valueRevert", focusOutside: "focusOutside", pointerDownOutside: "pointerDownOutside", interactOutside: "interactOutside" }, providers: [
|
|
223
|
+
{ provide: EDITABLE_CONTEXT, useExisting: forwardRef(() => EditableRoot) },
|
|
224
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EditableRoot), multi: true },
|
|
225
|
+
], exportAs: ["editableRoot"], ngImport: i0 });
|
|
226
|
+
}
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableRoot, decorators: [{
|
|
228
|
+
type: Directive,
|
|
229
|
+
args: [{
|
|
230
|
+
selector: "[editable-root]",
|
|
231
|
+
standalone: true,
|
|
232
|
+
exportAs: "editableRoot",
|
|
233
|
+
providers: [
|
|
234
|
+
{ provide: EDITABLE_CONTEXT, useExisting: forwardRef(() => EditableRoot) },
|
|
235
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EditableRoot), multi: true },
|
|
236
|
+
],
|
|
237
|
+
}]
|
|
238
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], elementIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "ids", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], edit: [{ type: i0.Input, args: [{ isSignal: true, alias: "edit", required: false }] }, { type: i0.Output, args: ["editChange"] }], defaultEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultEdit", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], activationMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "activationMode", required: false }] }], submitMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitMode", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], translations: [{ type: i0.Input, args: [{ isSignal: true, alias: "translations", required: false }] }], finalFocusEl: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalFocusEl", required: false }] }], editDetailsChange: [{ type: i0.Output, args: ["editDetailsChange"] }], valueDetailsChange: [{ type: i0.Output, args: ["valueDetailsChange"] }], valueCommit: [{ type: i0.Output, args: ["valueCommit"] }], valueRevert: [{ type: i0.Output, args: ["valueRevert"] }], focusOutside: [{ type: i0.Output, args: ["focusOutside"] }], pointerDownOutside: [{ type: i0.Output, args: ["pointerDownOutside"] }], interactOutside: [{ type: i0.Output, args: ["interactOutside"] }] } });
|
|
239
|
+
|
|
240
|
+
class EditableRootProvider {
|
|
241
|
+
/** The editable primitive returned by useEditable(). */
|
|
242
|
+
value = input.required(/* @ts-ignore */
|
|
243
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
244
|
+
get state() {
|
|
245
|
+
return this.value().state;
|
|
246
|
+
}
|
|
247
|
+
get api() {
|
|
248
|
+
return this.value().api;
|
|
249
|
+
}
|
|
250
|
+
get service() {
|
|
251
|
+
return this.value().service;
|
|
252
|
+
}
|
|
253
|
+
get send() {
|
|
254
|
+
return this.value().send;
|
|
255
|
+
}
|
|
256
|
+
constructor() {
|
|
257
|
+
bindProps({
|
|
258
|
+
elementRef: inject(ElementRef),
|
|
259
|
+
renderer: inject(Renderer2),
|
|
260
|
+
destroyRef: inject(DestroyRef),
|
|
261
|
+
props: () => this.value().api().getRootProps(),
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableRootProvider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
265
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: EditableRootProvider, isStandalone: true, selector: "[editable-root-provider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: EDITABLE_CONTEXT, useExisting: forwardRef(() => EditableRootProvider) }], exportAs: ["editableRootProvider"], ngImport: i0 });
|
|
266
|
+
}
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableRootProvider, decorators: [{
|
|
268
|
+
type: Directive,
|
|
269
|
+
args: [{
|
|
270
|
+
selector: "[editable-root-provider]",
|
|
271
|
+
standalone: true,
|
|
272
|
+
exportAs: "editableRootProvider",
|
|
273
|
+
providers: [{ provide: EDITABLE_CONTEXT, useExisting: forwardRef(() => EditableRootProvider) }],
|
|
274
|
+
}]
|
|
275
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
|
|
276
|
+
|
|
277
|
+
class EditableArea {
|
|
278
|
+
constructor() {
|
|
279
|
+
const context = injectEditableContext();
|
|
280
|
+
bindProps({
|
|
281
|
+
elementRef: inject(ElementRef),
|
|
282
|
+
renderer: inject(Renderer2),
|
|
283
|
+
destroyRef: inject(DestroyRef),
|
|
284
|
+
props: () => context.api().getAreaProps(),
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableArea, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
288
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditableArea, isStandalone: true, selector: "[editable-area]", exportAs: ["editableArea"], ngImport: i0 });
|
|
289
|
+
}
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableArea, decorators: [{
|
|
291
|
+
type: Directive,
|
|
292
|
+
args: [{
|
|
293
|
+
selector: "[editable-area]",
|
|
294
|
+
standalone: true,
|
|
295
|
+
exportAs: "editableArea",
|
|
296
|
+
}]
|
|
297
|
+
}], ctorParameters: () => [] });
|
|
298
|
+
|
|
299
|
+
class EditableInput {
|
|
300
|
+
constructor() {
|
|
301
|
+
const context = injectEditableContext();
|
|
302
|
+
const field = injectFieldContextOptional();
|
|
303
|
+
const elementRef = inject(ElementRef);
|
|
304
|
+
const renderer = inject(Renderer2);
|
|
305
|
+
const destroyRef = inject(DestroyRef);
|
|
306
|
+
bindProps({
|
|
307
|
+
elementRef,
|
|
308
|
+
renderer,
|
|
309
|
+
destroyRef,
|
|
310
|
+
props: () => {
|
|
311
|
+
const props = context.api().getInputProps();
|
|
312
|
+
const { defaultValue: _defaultValue, ...rest } = props;
|
|
313
|
+
const describedBy = field?.ariaDescribedby();
|
|
314
|
+
if (describedBy) {
|
|
315
|
+
rest["aria-describedby"] = describedBy;
|
|
316
|
+
}
|
|
317
|
+
return rest;
|
|
318
|
+
},
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
322
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditableInput, isStandalone: true, selector: "[editable-input]", exportAs: ["editableInput"], ngImport: i0 });
|
|
323
|
+
}
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableInput, decorators: [{
|
|
325
|
+
type: Directive,
|
|
326
|
+
args: [{
|
|
327
|
+
selector: "[editable-input]",
|
|
328
|
+
standalone: true,
|
|
329
|
+
exportAs: "editableInput",
|
|
330
|
+
}]
|
|
331
|
+
}], ctorParameters: () => [] });
|
|
332
|
+
|
|
333
|
+
class EditablePreview {
|
|
334
|
+
ownsTextContent = signal(false, /* @ts-ignore */
|
|
335
|
+
...(ngDevMode ? [{ debugName: "ownsTextContent" }] : /* istanbul ignore next */ []));
|
|
336
|
+
elementRef = inject(ElementRef);
|
|
337
|
+
constructor() {
|
|
338
|
+
const context = injectEditableContext();
|
|
339
|
+
const elementRef = this.elementRef;
|
|
340
|
+
const renderer = inject(Renderer2);
|
|
341
|
+
const destroyRef = inject(DestroyRef);
|
|
342
|
+
bindProps({
|
|
343
|
+
elementRef,
|
|
344
|
+
renderer,
|
|
345
|
+
destroyRef,
|
|
346
|
+
props: () => {
|
|
347
|
+
const props = context.api().getPreviewProps();
|
|
348
|
+
const { children: _children, onDoubleClick, ...rest } = props;
|
|
349
|
+
if (typeof onDoubleClick === "function") {
|
|
350
|
+
const remapped = rest;
|
|
351
|
+
remapped.onDblClick = onDoubleClick;
|
|
352
|
+
}
|
|
353
|
+
return rest;
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
effect(() => {
|
|
357
|
+
if (!this.ownsTextContent())
|
|
358
|
+
return;
|
|
359
|
+
const el = elementRef.nativeElement;
|
|
360
|
+
if (!el)
|
|
361
|
+
return;
|
|
362
|
+
const text = context.api().valueText;
|
|
363
|
+
renderer.setProperty(el, "textContent", text);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
ngAfterContentInit() {
|
|
367
|
+
this.ownsTextContent.set(this.elementRef.nativeElement.childNodes.length === 0);
|
|
368
|
+
}
|
|
369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditablePreview, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
370
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditablePreview, isStandalone: true, selector: "[editable-preview]", exportAs: ["editablePreview"], ngImport: i0 });
|
|
371
|
+
}
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditablePreview, decorators: [{
|
|
373
|
+
type: Directive,
|
|
374
|
+
args: [{
|
|
375
|
+
selector: "[editable-preview]",
|
|
376
|
+
standalone: true,
|
|
377
|
+
exportAs: "editablePreview",
|
|
378
|
+
}]
|
|
379
|
+
}], ctorParameters: () => [] });
|
|
380
|
+
|
|
381
|
+
class EditableLabel {
|
|
382
|
+
constructor() {
|
|
383
|
+
const context = injectEditableContext();
|
|
384
|
+
bindProps({
|
|
385
|
+
elementRef: inject(ElementRef),
|
|
386
|
+
renderer: inject(Renderer2),
|
|
387
|
+
destroyRef: inject(DestroyRef),
|
|
388
|
+
props: () => context.api().getLabelProps(),
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
392
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditableLabel, isStandalone: true, selector: "[editable-label]", exportAs: ["editableLabel"], ngImport: i0 });
|
|
393
|
+
}
|
|
394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableLabel, decorators: [{
|
|
395
|
+
type: Directive,
|
|
396
|
+
args: [{
|
|
397
|
+
selector: "[editable-label]",
|
|
398
|
+
standalone: true,
|
|
399
|
+
exportAs: "editableLabel",
|
|
400
|
+
}]
|
|
401
|
+
}], ctorParameters: () => [] });
|
|
402
|
+
|
|
403
|
+
class EditableControl {
|
|
404
|
+
constructor() {
|
|
405
|
+
const context = injectEditableContext();
|
|
406
|
+
bindProps({
|
|
407
|
+
elementRef: inject(ElementRef),
|
|
408
|
+
renderer: inject(Renderer2),
|
|
409
|
+
destroyRef: inject(DestroyRef),
|
|
410
|
+
props: () => context.api().getControlProps(),
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
414
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditableControl, isStandalone: true, selector: "[editable-control]", exportAs: ["editableControl"], ngImport: i0 });
|
|
415
|
+
}
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableControl, decorators: [{
|
|
417
|
+
type: Directive,
|
|
418
|
+
args: [{
|
|
419
|
+
selector: "[editable-control]",
|
|
420
|
+
standalone: true,
|
|
421
|
+
exportAs: "editableControl",
|
|
422
|
+
}]
|
|
423
|
+
}], ctorParameters: () => [] });
|
|
424
|
+
|
|
425
|
+
class EditableEditTrigger {
|
|
426
|
+
constructor() {
|
|
427
|
+
const context = injectEditableContext();
|
|
428
|
+
bindProps({
|
|
429
|
+
elementRef: inject(ElementRef),
|
|
430
|
+
renderer: inject(Renderer2),
|
|
431
|
+
destroyRef: inject(DestroyRef),
|
|
432
|
+
props: () => context.api().getEditTriggerProps(),
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableEditTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
436
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditableEditTrigger, isStandalone: true, selector: "[editable-edit-trigger]", exportAs: ["editableEditTrigger"], ngImport: i0 });
|
|
437
|
+
}
|
|
438
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableEditTrigger, decorators: [{
|
|
439
|
+
type: Directive,
|
|
440
|
+
args: [{
|
|
441
|
+
selector: "[editable-edit-trigger]",
|
|
442
|
+
standalone: true,
|
|
443
|
+
exportAs: "editableEditTrigger",
|
|
444
|
+
}]
|
|
445
|
+
}], ctorParameters: () => [] });
|
|
446
|
+
|
|
447
|
+
class EditableSubmitTrigger {
|
|
448
|
+
constructor() {
|
|
449
|
+
const context = injectEditableContext();
|
|
450
|
+
bindProps({
|
|
451
|
+
elementRef: inject(ElementRef),
|
|
452
|
+
renderer: inject(Renderer2),
|
|
453
|
+
destroyRef: inject(DestroyRef),
|
|
454
|
+
props: () => context.api().getSubmitTriggerProps(),
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableSubmitTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
458
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditableSubmitTrigger, isStandalone: true, selector: "[editable-submit-trigger]", exportAs: ["editableSubmitTrigger"], ngImport: i0 });
|
|
459
|
+
}
|
|
460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableSubmitTrigger, decorators: [{
|
|
461
|
+
type: Directive,
|
|
462
|
+
args: [{
|
|
463
|
+
selector: "[editable-submit-trigger]",
|
|
464
|
+
standalone: true,
|
|
465
|
+
exportAs: "editableSubmitTrigger",
|
|
466
|
+
}]
|
|
467
|
+
}], ctorParameters: () => [] });
|
|
468
|
+
|
|
469
|
+
class EditableCancelTrigger {
|
|
470
|
+
constructor() {
|
|
471
|
+
const context = injectEditableContext();
|
|
472
|
+
bindProps({
|
|
473
|
+
elementRef: inject(ElementRef),
|
|
474
|
+
renderer: inject(Renderer2),
|
|
475
|
+
destroyRef: inject(DestroyRef),
|
|
476
|
+
props: () => context.api().getCancelTriggerProps(),
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableCancelTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
480
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditableCancelTrigger, isStandalone: true, selector: "[editable-cancel-trigger]", exportAs: ["editableCancelTrigger"], ngImport: i0 });
|
|
481
|
+
}
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableCancelTrigger, decorators: [{
|
|
483
|
+
type: Directive,
|
|
484
|
+
args: [{
|
|
485
|
+
selector: "[editable-cancel-trigger]",
|
|
486
|
+
standalone: true,
|
|
487
|
+
exportAs: "editableCancelTrigger",
|
|
488
|
+
}]
|
|
489
|
+
}], ctorParameters: () => [] });
|
|
490
|
+
|
|
491
|
+
class EditableContext {
|
|
492
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
493
|
+
void context;
|
|
494
|
+
return true;
|
|
495
|
+
}
|
|
496
|
+
editable = injectEditableContext();
|
|
497
|
+
templateRef = inject(TemplateRef);
|
|
498
|
+
viewContainer = inject(ViewContainerRef);
|
|
499
|
+
constructor() {
|
|
500
|
+
const view = this.viewContainer.createEmbeddedView(this.templateRef, {
|
|
501
|
+
$implicit: this.editable.api,
|
|
502
|
+
api: this.editable.api,
|
|
503
|
+
});
|
|
504
|
+
effect(() => {
|
|
505
|
+
this.editable.api();
|
|
506
|
+
view.detectChanges();
|
|
507
|
+
});
|
|
508
|
+
inject(DestroyRef).onDestroy(() => view.destroy());
|
|
509
|
+
}
|
|
510
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
511
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: EditableContext, isStandalone: true, selector: "[editable-context]", exportAs: ["editableContext"], ngImport: i0 });
|
|
512
|
+
}
|
|
513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EditableContext, decorators: [{
|
|
514
|
+
type: Directive,
|
|
515
|
+
args: [{
|
|
516
|
+
selector: "[editable-context]",
|
|
517
|
+
standalone: true,
|
|
518
|
+
exportAs: "editableContext",
|
|
519
|
+
}]
|
|
520
|
+
}], ctorParameters: () => [] });
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Generated bundle index. Do not edit.
|
|
524
|
+
*/
|
|
525
|
+
|
|
526
|
+
export { EDITABLE_CONTEXT, EditableArea, EditableCancelTrigger, EditableContext, EditableControl, EditableEditTrigger, EditableInput, EditableLabel, EditablePreview, EditableRoot, EditableRootProvider, EditableSubmitTrigger, injectEditableContext, useEditable };
|
|
527
|
+
//# sourceMappingURL=wirekyt-angular-editable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-editable.mjs","sources":["../../src/components/editable/use-context.ts","../../src/components/editable/use.ts","../../src/components/editable/root.ts","../../src/components/editable/root-provider.ts","../../src/components/editable/area.ts","../../src/components/editable/input.ts","../../src/components/editable/preview.ts","../../src/components/editable/label.ts","../../src/components/editable/control.ts","../../src/components/editable/edit-trigger.ts","../../src/components/editable/submit-trigger.ts","../../src/components/editable/cancel-trigger.ts","../../src/components/editable/context.ts","../../src/components/editable/wirekyt-angular-editable.ts"],"sourcesContent":["import { InjectionToken, inject } from \"@angular/core\";\n\nimport type { UseEditableReturn } from \"./use\";\n\nexport const EDITABLE_CONTEXT = new InjectionToken<UseEditableReturn>(\"WIREKYT.EDITABLE_CONTEXT\");\n\nexport function injectEditableContext(): UseEditableReturn {\n return inject(EDITABLE_CONTEXT);\n}\n","import type { Machine } from \"@wirekyt/dom\";\n\nimport {\n createId,\n injectEnvironment,\n injectLocale,\n useMachine,\n type UseMachineReturn,\n} from \"@wirekyt/angular\";\nimport { injectFieldContextOptional } from \"@wirekyt/angular/field\";\nimport * as editable from \"@wirekyt/dom/machines/editable\";\n\nimport type { EditableMachineProps } from \"./types\";\n\ntype OptionalId<T extends { id: string }> = Omit<T, \"id\"> & { id?: string };\n\nexport interface UseEditableProps extends OptionalId<\n Omit<EditableMachineProps, \"dir\" | \"getRootNode\">\n> {}\n\nexport type UseEditableReturn = UseMachineReturn<\n editable.Service[\"state\"],\n editable.Api,\n editable.Service\n>;\n\nexport interface UseEditableOptions {\n context: () => UseEditableProps;\n}\n\ntype EditableContext = Record<string, unknown>;\ntype EditableSchema = editable.Machine extends Machine<infer TSchema> ? TSchema : never;\n\nexport function useEditable(\n options: UseEditableOptions = { context: () => ({}) },\n): UseEditableReturn {\n const locale = injectLocale();\n const environment = injectEnvironment();\n const field = injectFieldContextOptional();\n const fallbackId = createId();\n\n return useMachine<EditableSchema, editable.Api>({\n machine: editable.machine,\n context: () => {\n const props = options.context();\n const merged: Record<string, unknown> = {\n dir: locale.dir,\n getRootNode: environment.getRootNode,\n ...props,\n id: props.id ?? fallbackId,\n };\n if (field) {\n const fieldIds = field.ids;\n merged[\"ids\"] = {\n label: fieldIds.label,\n input: fieldIds.control,\n ...props.ids,\n };\n merged[\"disabled\"] = Boolean(props.disabled) || field.disabled() || undefined;\n merged[\"invalid\"] = Boolean(props.invalid) || field.invalid() || undefined;\n merged[\"readOnly\"] = Boolean(props.readOnly) || field.readOnly() || undefined;\n merged[\"required\"] = Boolean(props.required) || field.required() || undefined;\n }\n return merged as EditableContext;\n },\n connect: (service, normalize) => editable.connect(service, normalize),\n });\n}\n","import type * as editable from \"@wirekyt/dom/machines/editable\";\n\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n booleanAttribute,\n effect,\n forwardRef,\n inject,\n input,\n model,\n output,\n signal,\n type InputSignal,\n type InputSignalWithTransform,\n type ModelSignal,\n type OutputEmitterRef,\n type Signal,\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR, type ControlValueAccessor } from \"@angular/forms\";\nimport { bindProps, createCvaController } from \"@wirekyt/angular\";\n\nimport type {\n EditableEditChangeDetails,\n EditableElementIds,\n EditableFocusOutsideEvent,\n EditableInteractOutsideEvent,\n EditablePointerDownOutsideEvent,\n EditableValueChangeDetails,\n} from \"./types\";\n\nimport { useEditable, type UseEditableReturn } from \"./use\";\nimport { EDITABLE_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-root]\",\n standalone: true,\n exportAs: \"editableRoot\",\n providers: [\n { provide: EDITABLE_CONTEXT, useExisting: forwardRef(() => EditableRoot) },\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EditableRoot), multi: true },\n ],\n})\nexport class EditableRoot implements ControlValueAccessor, UseEditableReturn {\n /** The id of the editable. */\n readonly id: InputSignal<string | undefined> = input<string | undefined>(undefined);\n /** The element ids for the editable parts. */\n readonly elementIds: InputSignal<EditableElementIds | undefined> = input<\n EditableElementIds | undefined\n >(undefined, {\n alias: \"ids\",\n });\n /** The controlled value of the editable. */\n readonly value: ModelSignal<string | undefined> = model<string | undefined>(undefined);\n /** The initial value of the editable when uncontrolled. */\n readonly defaultValue: InputSignal<string | undefined> = input<string | undefined>(undefined);\n /** The controlled edit state of the editable. */\n readonly edit: ModelSignal<boolean | undefined> = model<boolean | undefined>(undefined);\n /** The initial edit state of the editable when uncontrolled. */\n readonly defaultEdit: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** Whether the editable is disabled. */\n readonly disabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** Whether the editable is read-only. */\n readonly readOnly: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** Whether the editable is invalid. */\n readonly invalid: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** Whether the editable is required. */\n readonly required: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** The placeholder text for the editable. */\n readonly placeholder: InputSignal<string | { edit: string; preview: string } | undefined> = input<\n string | { edit: string; preview: string } | undefined\n >(undefined);\n /** The name attribute of the editable input. */\n readonly name: InputSignal<string | undefined> = input<string | undefined>(undefined);\n /** The form attribute of the editable input. */\n readonly form: InputSignal<string | undefined> = input<string | undefined>(undefined);\n /** The maximum number of characters allowed. */\n readonly maxLength: InputSignal<number | undefined> = input<number | undefined>(undefined);\n /** The activation mode for the preview element. */\n readonly activationMode: InputSignal<editable.ActivationMode | undefined> = input<\n editable.ActivationMode | undefined\n >(undefined);\n /** The action that triggers submit in edit mode. */\n readonly submitMode: InputSignal<editable.SubmitMode | undefined> = input<\n editable.SubmitMode | undefined\n >(undefined);\n /** Whether the editable should auto-resize to fit content. */\n readonly autoResize: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** Whether to select the text in the input when focused. */\n readonly selectOnFocus: InputSignalWithTransform<boolean, unknown> = input(true, {\n transform: booleanAttribute,\n });\n /** The translations for the editable. */\n readonly translations: InputSignal<editable.IntlTranslations | undefined> = input<\n editable.IntlTranslations | undefined\n >(undefined);\n /** The element that should receive focus when edit mode exits. */\n readonly finalFocusEl: InputSignal<(() => HTMLElement | null) | undefined> = input<\n (() => HTMLElement | null) | undefined\n >(undefined);\n\n /** Emits the details when the edit state changes. */\n readonly editDetailsChange: OutputEmitterRef<EditableEditChangeDetails> =\n output<EditableEditChangeDetails>();\n /** Emits the details when the editable value changes. */\n readonly valueDetailsChange: OutputEmitterRef<EditableValueChangeDetails> =\n output<EditableValueChangeDetails>();\n /** Emits when the editable value is committed. */\n readonly valueCommit: OutputEmitterRef<EditableValueChangeDetails> =\n output<EditableValueChangeDetails>();\n /** Emits when the editable value is reverted. */\n readonly valueRevert: OutputEmitterRef<EditableValueChangeDetails> =\n output<EditableValueChangeDetails>();\n /** Emits when focus moves outside the editable while editing. */\n readonly focusOutside: OutputEmitterRef<EditableFocusOutsideEvent> =\n output<EditableFocusOutsideEvent>();\n /** Emits when pointer down happens outside the editable while editing. */\n readonly pointerDownOutside: OutputEmitterRef<EditablePointerDownOutsideEvent> =\n output<EditablePointerDownOutsideEvent>();\n /** Emits when an interaction happens outside the editable while editing. */\n readonly interactOutside: OutputEmitterRef<EditableInteractOutsideEvent> =\n output<EditableInteractOutsideEvent>();\n\n private readonly _disabledFromForm = signal(false);\n private _pendingInternalWrites = 0;\n private _hasExternalBinding = false;\n private _hasReceivedFormWrite = false;\n\n private readonly cva = createCvaController<string>({\n value: this.value,\n setDisabled: (disabled) => this._disabledFromForm.set(disabled),\n componentName: \"EditableRoot\",\n hasExternalModelBinding: () => this._hasExternalBinding,\n });\n\n private readonly machine = useEditable({\n context: () => ({\n id: this.id(),\n ids: this.elementIds(),\n value: this.value(),\n defaultValue: this.defaultValue(),\n edit: this.edit(),\n defaultEdit: this.defaultEdit(),\n disabled: this.disabled() || this._disabledFromForm(),\n readOnly: this.readOnly(),\n invalid: this.invalid(),\n required: this.required(),\n placeholder: this.placeholder(),\n name: this.name(),\n form: this.form(),\n maxLength: this.maxLength(),\n activationMode: this.activationMode(),\n submitMode: this.submitMode(),\n autoResize: this.autoResize(),\n selectOnFocus: this.selectOnFocus(),\n translations: this.translations(),\n finalFocusEl: this.finalFocusEl(),\n onValueChange: (details) => {\n if (this.value() !== details.value) {\n this._pendingInternalWrites++;\n this.value.set(details.value);\n }\n this.cva.notifyValueChange(details.value);\n this.valueDetailsChange.emit(details);\n },\n onValueCommit: (details) => {\n this.valueCommit.emit(details);\n this.cva.markTouched();\n },\n onValueRevert: (details) => {\n this.valueRevert.emit(details);\n },\n onEditChange: (details) => {\n this.edit.set(details.edit);\n this.editDetailsChange.emit(details);\n if (!details.edit) {\n this.cva.markTouched();\n }\n },\n onFocusOutside: (event) => this.focusOutside.emit(event),\n onPointerDownOutside: (event) => this.pointerDownOutside.emit(event),\n onInteractOutside: (event) => this.interactOutside.emit(event),\n }),\n });\n\n readonly state: Signal<editable.Service[\"state\"]> = this.machine.state;\n readonly api: Signal<editable.Api> = this.machine.api;\n readonly service: editable.Service = this.machine.service;\n readonly send: editable.Service[\"send\"] = this.machine.send;\n\n constructor() {\n let firstRun = true;\n effect(() => {\n void this.value();\n if (firstRun) {\n firstRun = false;\n this._pendingInternalWrites = 0;\n return;\n }\n if (this._pendingInternalWrites > 0) {\n this._pendingInternalWrites--;\n return;\n }\n this._hasExternalBinding = true;\n });\n\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.api().getRootProps(),\n });\n }\n\n writeValue(value: string | null): void {\n const next = value === null ? undefined : value;\n const current = this.value();\n if (!this._hasReceivedFormWrite && current !== undefined) {\n this._hasExternalBinding = true;\n }\n this._hasReceivedFormWrite = true;\n if (current !== next) {\n this._pendingInternalWrites++;\n }\n this.cva.writeValue(value);\n }\n\n registerOnChange(fn: (value: string | undefined) => void): void {\n this.cva.registerOnChange(fn);\n }\n\n registerOnTouched(fn: () => void): void {\n this.cva.registerOnTouched(fn);\n }\n\n setDisabledState(disabled: boolean): void {\n this.cva.setDisabledState(disabled);\n }\n}\n","import type * as editable from \"@wirekyt/dom/machines/editable\";\n\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n forwardRef,\n inject,\n input,\n type InputSignal,\n type Signal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { UseEditableReturn } from \"./use\";\n\nimport { EDITABLE_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-root-provider]\",\n standalone: true,\n exportAs: \"editableRootProvider\",\n providers: [{ provide: EDITABLE_CONTEXT, useExisting: forwardRef(() => EditableRootProvider) }],\n})\nexport class EditableRootProvider implements UseEditableReturn {\n /** The editable primitive returned by useEditable(). */\n readonly value: InputSignal<UseEditableReturn> = input.required<UseEditableReturn>();\n\n get state(): Signal<editable.Service[\"state\"]> {\n return this.value().state;\n }\n get api(): Signal<editable.Api> {\n return this.value().api;\n }\n get service(): editable.Service {\n return this.value().service;\n }\n get send(): editable.Service[\"send\"] {\n return this.value().send;\n }\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.value().api().getRootProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectEditableContext } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-area]\",\n standalone: true,\n exportAs: \"editableArea\",\n})\nexport class EditableArea {\n constructor() {\n const context = injectEditableContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getAreaProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\nimport { injectFieldContextOptional } from \"@wirekyt/angular/field\";\n\nimport { injectEditableContext } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-input]\",\n standalone: true,\n exportAs: \"editableInput\",\n})\nexport class EditableInput {\n constructor() {\n const context = injectEditableContext();\n const field = injectFieldContextOptional();\n const elementRef = inject(ElementRef);\n const renderer = inject(Renderer2);\n const destroyRef = inject(DestroyRef);\n\n bindProps({\n elementRef,\n renderer,\n destroyRef,\n props: () => {\n const props = context.api().getInputProps() as Record<string, unknown>;\n const { defaultValue: _defaultValue, ...rest } = props;\n const describedBy = field?.ariaDescribedby();\n if (describedBy) {\n rest[\"aria-describedby\"] = describedBy;\n }\n return rest;\n },\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n effect,\n inject,\n signal,\n type AfterContentInit,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectEditableContext } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-preview]\",\n standalone: true,\n exportAs: \"editablePreview\",\n})\nexport class EditablePreview implements AfterContentInit {\n private readonly ownsTextContent = signal(false);\n private readonly elementRef = inject(ElementRef);\n\n constructor() {\n const context = injectEditableContext();\n const elementRef = this.elementRef;\n const renderer = inject(Renderer2);\n const destroyRef = inject(DestroyRef);\n\n bindProps({\n elementRef,\n renderer,\n destroyRef,\n props: () => {\n const props = context.api().getPreviewProps() as Record<string, unknown>;\n const { children: _children, onDoubleClick, ...rest } = props;\n if (typeof onDoubleClick === \"function\") {\n const remapped = rest as { onDblClick?: unknown };\n remapped.onDblClick = onDoubleClick;\n }\n return rest;\n },\n });\n\n effect(() => {\n if (!this.ownsTextContent()) return;\n const el = elementRef.nativeElement as HTMLElement;\n if (!el) return;\n const text = context.api().valueText;\n renderer.setProperty(el, \"textContent\", text);\n });\n }\n\n ngAfterContentInit(): void {\n this.ownsTextContent.set(this.elementRef.nativeElement.childNodes.length === 0);\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectEditableContext } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-label]\",\n standalone: true,\n exportAs: \"editableLabel\",\n})\nexport class EditableLabel {\n constructor() {\n const context = injectEditableContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getLabelProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectEditableContext } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-control]\",\n standalone: true,\n exportAs: \"editableControl\",\n})\nexport class EditableControl {\n constructor() {\n const context = injectEditableContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getControlProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectEditableContext } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-edit-trigger]\",\n standalone: true,\n exportAs: \"editableEditTrigger\",\n})\nexport class EditableEditTrigger {\n constructor() {\n const context = injectEditableContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getEditTriggerProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectEditableContext } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-submit-trigger]\",\n standalone: true,\n exportAs: \"editableSubmitTrigger\",\n})\nexport class EditableSubmitTrigger {\n constructor() {\n const context = injectEditableContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getSubmitTriggerProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectEditableContext } from \"./use-context\";\n\n@Directive({\n selector: \"[editable-cancel-trigger]\",\n standalone: true,\n exportAs: \"editableCancelTrigger\",\n})\nexport class EditableCancelTrigger {\n constructor() {\n const context = injectEditableContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getCancelTriggerProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n} from \"@angular/core\";\n\nimport type { UseEditableReturn } from \"./use\";\n\nimport { injectEditableContext } from \"./use-context\";\n\nexport interface EditableContextTemplate {\n $implicit: UseEditableReturn[\"api\"];\n api: UseEditableReturn[\"api\"];\n}\n\n@Directive({\n selector: \"[editable-context]\",\n standalone: true,\n exportAs: \"editableContext\",\n})\nexport class EditableContext {\n static ngTemplateContextGuard(\n _directive: EditableContext,\n context: unknown,\n ): context is EditableContextTemplate {\n void context;\n return true;\n }\n\n private readonly editable = injectEditableContext();\n private readonly templateRef = inject<TemplateRef<EditableContextTemplate>>(TemplateRef);\n private readonly viewContainer = inject(ViewContainerRef);\n\n constructor() {\n const view = this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: this.editable.api,\n api: this.editable.api,\n });\n\n effect(() => {\n this.editable.api();\n view.detectChanges();\n });\n\n inject(DestroyRef).onDestroy(() => view.destroy());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAIa,g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G,MAAM,CAAC,gBAAgB,CAAC;AAEzD,IAAA,WAAA,GAAA;QACE,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE;AACnE,YAAA,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG;AAC5B,YAAA,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG;AACvB,SAAA,CAAC;QAEF,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACnB,IAAI,CAAC,aAAa,EAAE;AACtB,QAAA,CAAC,CAAC;AAEF,QAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACpD;uGAzBW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,iBAAiB;AAC5B,iBAAA;;;ACtBD;;AAEG;;;;"}
|
|
@@ -3,6 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { InjectionToken, inject, computed, signal, input, booleanAttribute, DestroyRef, Renderer2, ElementRef, forwardRef, Directive, PLATFORM_ID, effect, untracked } from '@angular/core';
|
|
4
4
|
import { createId, bindProps } from '@wirekyt/angular';
|
|
5
5
|
import { injectFieldsetContextOptional } from '@wirekyt/angular/fieldset';
|
|
6
|
+
import { dataAttr, ariaAttr } from '@wirekyt/dom/dom-query';
|
|
6
7
|
import { isPlatformBrowser } from '@angular/common';
|
|
7
8
|
import { autoresizeTextarea } from '@wirekyt/dom/auto-resize';
|
|
8
9
|
|
|
@@ -17,8 +18,6 @@ function injectFieldContextOptional() {
|
|
|
17
18
|
return inject(FIELD_CONTEXT, { optional: true });
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
const dataAttr = (value) => (value ? "" : undefined);
|
|
21
|
-
const ariaAttr = (value) => (value ? "true" : undefined);
|
|
22
21
|
function useField(options) {
|
|
23
22
|
const fallbackId = createId();
|
|
24
23
|
const fieldsetContext = injectFieldsetContextOptional();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirekyt-angular-field.mjs","sources":["../../src/components/field/anatomy.ts","../../src/components/field/use-context.ts","../../src/components/field/use-field.ts","../../src/components/field/root.ts","../../src/components/field/root-provider.ts","../../src/components/field/label.ts","../../src/components/field/input.ts","../../src/components/field/textarea.ts","../../src/components/field/select.ts","../../src/components/field/helper-text.ts","../../src/components/field/error-text.ts","../../src/components/field/required-indicator.ts","../../src/components/field/item.ts","../../src/components/field/wirekyt-angular-field.ts"],"sourcesContent":["import { createAnatomy } from \"@wirekyt/dom/anatomy\";\n\nexport const fieldAnatomy = createAnatomy(\"field\").parts(\n \"root\",\n \"errorText\",\n \"helperText\",\n \"input\",\n \"label\",\n \"select\",\n \"textarea\",\n \"requiredIndicator\",\n);\n\nexport const fieldParts = fieldAnatomy.build();\n","import { InjectionToken, inject } from \"@angular/core\";\n\nimport type { UseFieldReturn } from \"./use-field\";\n\nexport const FIELD_CONTEXT = new InjectionToken<UseFieldReturn>(\"WIREKYT.FIELD_CONTEXT\");\n\nexport function injectFieldContext(): UseFieldReturn {\n return inject(FIELD_CONTEXT);\n}\n\nexport function injectFieldContextOptional(): UseFieldReturn | null {\n return inject(FIELD_CONTEXT, { optional: true });\n}\n","import { type Signal, computed, signal } from \"@angular/core\";\nimport { createId } from \"@wirekyt/angular\";\nimport { injectFieldsetContextOptional } from \"@wirekyt/angular/fieldset\";\n\nimport type { FieldElementIds, FieldResolvedIds } from \"./types\";\n\nimport { fieldParts } from \"./anatomy\";\n\nexport interface UseFieldProps {\n id?: string;\n ids?: FieldElementIds;\n required?: boolean;\n disabled?: boolean;\n invalid?: boolean;\n readOnly?: boolean;\n target?: string;\n}\n\nexport interface UseFieldReturn {\n ids: FieldResolvedIds;\n disabled: Signal<boolean>;\n invalid: Signal<boolean>;\n readOnly: Signal<boolean>;\n required: Signal<boolean>;\n hasErrorText: Signal<boolean>;\n hasHelperText: Signal<boolean>;\n ariaDescribedby: Signal<string | undefined>;\n setHasErrorText(value: boolean): void;\n setHasHelperText(value: boolean): void;\n registerErrorText(): () => void;\n registerHelperText(): () => void;\n getRootProps(): Record<string, unknown>;\n getControlProps(): Record<string, unknown>;\n getLabelProps(): Record<string, unknown>;\n getInputProps(): Record<string, unknown>;\n getTextareaProps(): Record<string, unknown>;\n getSelectProps(): Record<string, unknown>;\n getHelperTextProps(): Record<string, unknown>;\n getErrorTextProps(): Record<string, unknown>;\n getRequiredIndicatorProps(): Record<string, unknown>;\n getItemControlId(value: string): string;\n getItemLabelId(value: string): string;\n}\n\nexport interface UseFieldOptions {\n context: () => UseFieldProps;\n}\n\nconst dataAttr = (value: boolean | undefined): string | undefined => (value ? \"\" : undefined);\nconst ariaAttr = (value: boolean | undefined): \"true\" | undefined => (value ? \"true\" : undefined);\n\nexport function useField(options: UseFieldOptions): UseFieldReturn {\n const fallbackId = createId();\n const fieldsetContext = injectFieldsetContextOptional();\n\n const propsSignal = computed(() => options.context());\n\n const id = computed(() => propsSignal().id ?? fallbackId);\n const ids = computed<FieldResolvedIds>(() => {\n const provided = propsSignal().ids;\n const baseId = id();\n return {\n root: provided?.root ?? `field:${baseId}`,\n control: provided?.control ?? baseId,\n label: provided?.label ?? `field:${baseId}:label`,\n errorText: provided?.errorText ?? `field:${baseId}:error-text`,\n helperText: provided?.helperText ?? `field:${baseId}:helper-text`,\n };\n });\n\n const disabled = computed(() => {\n if (propsSignal().disabled) return true;\n return fieldsetContext ? fieldsetContext.disabled() : false;\n });\n const invalid = computed(() => {\n if (propsSignal().invalid) return true;\n return fieldsetContext ? fieldsetContext.invalid() : false;\n });\n const readOnly = computed(() => Boolean(propsSignal().readOnly));\n const required = computed(() => Boolean(propsSignal().required));\n\n const errorTextCount = signal(0);\n const helperTextCount = signal(0);\n const explicitHasErrorText = signal(false);\n const explicitHasHelperText = signal(false);\n const hasErrorTextSignal = computed(() => explicitHasErrorText() || errorTextCount() > 0);\n const hasHelperTextSignal = computed(() => explicitHasHelperText() || helperTextCount() > 0);\n\n const ariaDescribedby = computed<string | undefined>(() => {\n return hasHelperTextSignal() ? ids().helperText : undefined;\n });\n\n const ariaErrormessage = computed<string | undefined>(() => {\n return hasErrorTextSignal() && invalid() ? ids().errorText : undefined;\n });\n\n const targetControlId = computed<string | undefined>(() => {\n const t = propsSignal().target;\n return t ? `field:${id()}:item:${t}` : undefined;\n });\n\n const getRootProps = (): Record<string, unknown> => ({\n ...fieldParts.root.attrs,\n id: ids().root,\n role: \"group\",\n \"data-disabled\": dataAttr(disabled()),\n \"data-invalid\": dataAttr(invalid()),\n \"data-readonly\": dataAttr(readOnly()),\n });\n\n const getLabelProps = (): Record<string, unknown> => ({\n ...fieldParts.label.attrs,\n id: ids().label,\n \"data-disabled\": dataAttr(disabled()),\n \"data-invalid\": dataAttr(invalid()),\n \"data-readonly\": dataAttr(readOnly()),\n \"data-required\": dataAttr(required()),\n htmlFor: targetControlId() ?? ids().control,\n });\n\n const getControlProps = (): Record<string, unknown> => ({\n \"aria-describedby\": ariaDescribedby(),\n \"aria-errormessage\": ariaErrormessage(),\n \"aria-invalid\": ariaAttr(invalid()),\n \"data-invalid\": dataAttr(invalid()),\n \"data-required\": dataAttr(required()),\n \"data-readonly\": dataAttr(readOnly()),\n id: ids().control,\n required: required() || undefined,\n disabled: disabled() || undefined,\n readOnly: readOnly() || undefined,\n });\n\n const getInputProps = (): Record<string, unknown> => ({\n ...getControlProps(),\n ...fieldParts.input.attrs,\n });\n\n const getTextareaProps = (): Record<string, unknown> => ({\n ...getControlProps(),\n ...fieldParts.textarea.attrs,\n });\n\n const getSelectProps = (): Record<string, unknown> => ({\n ...getControlProps(),\n ...fieldParts.select.attrs,\n });\n\n const getHelperTextProps = (): Record<string, unknown> => ({\n ...fieldParts.helperText.attrs,\n id: ids().helperText,\n \"data-disabled\": dataAttr(disabled()),\n });\n\n const getErrorTextProps = (): Record<string, unknown> => ({\n ...fieldParts.errorText.attrs,\n id: ids().errorText,\n \"aria-live\": \"polite\",\n hidden: !invalid() || undefined,\n });\n\n const getRequiredIndicatorProps = (): Record<string, unknown> => ({\n ...fieldParts.requiredIndicator.attrs,\n \"aria-hidden\": \"true\",\n hidden: !required() || undefined,\n });\n\n return {\n get ids(): FieldResolvedIds {\n return ids();\n },\n disabled,\n invalid,\n readOnly,\n required,\n hasErrorText: hasErrorTextSignal,\n hasHelperText: hasHelperTextSignal,\n ariaDescribedby,\n setHasErrorText: (value: boolean) => explicitHasErrorText.set(value),\n setHasHelperText: (value: boolean) => explicitHasHelperText.set(value),\n registerErrorText: () => {\n errorTextCount.update((count) => count + 1);\n return () => errorTextCount.update((count) => Math.max(0, count - 1));\n },\n registerHelperText: () => {\n helperTextCount.update((count) => count + 1);\n return () => helperTextCount.update((count) => Math.max(0, count - 1));\n },\n getRootProps,\n getControlProps,\n getLabelProps,\n getInputProps,\n getTextareaProps,\n getSelectProps,\n getHelperTextProps,\n getErrorTextProps,\n getRequiredIndicatorProps,\n getItemControlId: (value: string) => `field:${id()}:item:${value}`,\n getItemLabelId: (value: string) => `field:${id()}:item:${value}:label`,\n };\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n type InputSignal,\n type InputSignalWithTransform,\n type Signal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { FieldElementIds, FieldResolvedIds } from \"./types\";\n\nimport { FIELD_CONTEXT } from \"./use-context\";\nimport { type UseFieldReturn, useField } from \"./use-field\";\n\n@Directive({\n selector: \"[field-root]\",\n standalone: true,\n exportAs: \"fieldRoot\",\n providers: [{ provide: FIELD_CONTEXT, useExisting: forwardRef(() => FieldRoot) }],\n})\nexport class FieldRoot implements UseFieldReturn {\n readonly id: InputSignal<string | undefined> = input<string | undefined>(undefined);\n readonly elementIds: InputSignal<FieldElementIds | undefined> = input<\n FieldElementIds | undefined\n >(undefined, {\n alias: \"ids\",\n });\n readonly required: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly disabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly invalid: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly readOnly: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly target: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n private readonly field: UseFieldReturn = useField({\n context: () => ({\n id: this.id(),\n ids: this.elementIds(),\n required: this.required(),\n disabled: this.disabled(),\n invalid: this.invalid(),\n readOnly: this.readOnly(),\n target: this.target(),\n }),\n });\n\n get ids(): FieldResolvedIds {\n return this.field.ids;\n }\n\n get hasErrorText(): Signal<boolean> {\n return this.field.hasErrorText;\n }\n\n get hasHelperText(): Signal<boolean> {\n return this.field.hasHelperText;\n }\n\n get ariaDescribedby(): Signal<string | undefined> {\n return this.field.ariaDescribedby;\n }\n\n setHasErrorText(value: boolean): void {\n this.field.setHasErrorText(value);\n }\n\n setHasHelperText(value: boolean): void {\n this.field.setHasHelperText(value);\n }\n\n registerErrorText(): () => void {\n return this.field.registerErrorText();\n }\n\n registerHelperText(): () => void {\n return this.field.registerHelperText();\n }\n\n getRootProps(): Record<string, unknown> {\n return this.field.getRootProps();\n }\n getControlProps(): Record<string, unknown> {\n return this.field.getControlProps();\n }\n getLabelProps(): Record<string, unknown> {\n return this.field.getLabelProps();\n }\n getInputProps(): Record<string, unknown> {\n return this.field.getInputProps();\n }\n getTextareaProps(): Record<string, unknown> {\n return this.field.getTextareaProps();\n }\n getSelectProps(): Record<string, unknown> {\n return this.field.getSelectProps();\n }\n getHelperTextProps(): Record<string, unknown> {\n return this.field.getHelperTextProps();\n }\n getErrorTextProps(): Record<string, unknown> {\n return this.field.getErrorTextProps();\n }\n getRequiredIndicatorProps(): Record<string, unknown> {\n return this.field.getRequiredIndicatorProps();\n }\n getItemControlId(value: string): string {\n return this.field.getItemControlId(value);\n }\n getItemLabelId(value: string): string {\n return this.field.getItemLabelId(value);\n }\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.field.getRootProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n computed,\n forwardRef,\n inject,\n input,\n type InputSignal,\n type Signal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { FieldResolvedIds } from \"./types\";\nimport type { UseFieldReturn } from \"./use-field\";\n\nimport { FIELD_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[field-root-provider]\",\n standalone: true,\n exportAs: \"fieldRootProvider\",\n providers: [{ provide: FIELD_CONTEXT, useExisting: forwardRef(() => FieldRootProvider) }],\n})\nexport class FieldRootProvider implements UseFieldReturn {\n readonly value: InputSignal<UseFieldReturn> = input.required<UseFieldReturn>();\n\n readonly disabled: Signal<boolean> = computed(() => this.value().disabled());\n readonly invalid: Signal<boolean> = computed(() => this.value().invalid());\n readonly readOnly: Signal<boolean> = computed(() => this.value().readOnly());\n readonly required: Signal<boolean> = computed(() => this.value().required());\n readonly hasErrorText: Signal<boolean> = computed(() => this.value().hasErrorText());\n readonly hasHelperText: Signal<boolean> = computed(() => this.value().hasHelperText());\n readonly ariaDescribedby: Signal<string | undefined> = computed(() =>\n this.value().ariaDescribedby(),\n );\n\n get ids(): FieldResolvedIds {\n return this.value().ids;\n }\n\n setHasErrorText(value: boolean): void {\n this.value().setHasErrorText(value);\n }\n\n setHasHelperText(value: boolean): void {\n this.value().setHasHelperText(value);\n }\n\n registerErrorText(): () => void {\n return this.value().registerErrorText();\n }\n\n registerHelperText(): () => void {\n return this.value().registerHelperText();\n }\n\n getRootProps(): Record<string, unknown> {\n return this.value().getRootProps();\n }\n getControlProps(): Record<string, unknown> {\n return this.value().getControlProps();\n }\n getLabelProps(): Record<string, unknown> {\n return this.value().getLabelProps();\n }\n getInputProps(): Record<string, unknown> {\n return this.value().getInputProps();\n }\n getTextareaProps(): Record<string, unknown> {\n return this.value().getTextareaProps();\n }\n getSelectProps(): Record<string, unknown> {\n return this.value().getSelectProps();\n }\n getHelperTextProps(): Record<string, unknown> {\n return this.value().getHelperTextProps();\n }\n getErrorTextProps(): Record<string, unknown> {\n return this.value().getErrorTextProps();\n }\n getRequiredIndicatorProps(): Record<string, unknown> {\n return this.value().getRequiredIndicatorProps();\n }\n getItemControlId(value: string): string {\n return this.value().getItemControlId(value);\n }\n getItemLabelId(value: string): string {\n return this.value().getItemLabelId(value);\n }\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.value().getRootProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-label]\",\n standalone: true,\n exportAs: \"fieldLabel\",\n})\nexport class FieldLabel {\n constructor() {\n const context = injectFieldContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getLabelProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-input]\",\n standalone: true,\n exportAs: \"fieldInput\",\n})\nexport class FieldInput {\n constructor() {\n const context = injectFieldContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getInputProps(),\n });\n }\n}\n","import { isPlatformBrowser } from \"@angular/common\";\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n PLATFORM_ID,\n Renderer2,\n booleanAttribute,\n effect,\n inject,\n input,\n type InputSignalWithTransform,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\nimport { autoresizeTextarea } from \"@wirekyt/dom/auto-resize\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-textarea]\",\n standalone: true,\n exportAs: \"fieldTextarea\",\n})\nexport class FieldTextarea {\n readonly autoresize: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n constructor() {\n const context = injectFieldContext();\n const elementRef = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n const destroyRef = inject(DestroyRef);\n const isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n bindProps({\n elementRef,\n renderer: inject(Renderer2),\n destroyRef,\n props: () => ({\n ...context.getTextareaProps(),\n style: this.autoresize() ? { resize: \"none\" } : undefined,\n }),\n });\n\n if (!isBrowser) return;\n\n effect((onCleanup) => {\n if (!this.autoresize()) return;\n\n const cleanup = autoresizeTextarea(elementRef.nativeElement);\n onCleanup(() => {\n cleanup?.();\n });\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-select]\",\n standalone: true,\n exportAs: \"fieldSelect\",\n})\nexport class FieldSelect {\n constructor() {\n const context = injectFieldContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getSelectProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n effect,\n inject,\n untracked,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-helper-text]\",\n standalone: true,\n exportAs: \"fieldHelperText\",\n})\nexport class FieldHelperText {\n constructor() {\n const context = injectFieldContext();\n\n effect((onCleanup) => {\n const unregister = untracked(() => context.registerHelperText());\n onCleanup(unregister);\n });\n\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getHelperTextProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n effect,\n inject,\n untracked,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-error-text]\",\n standalone: true,\n exportAs: \"fieldErrorText\",\n})\nexport class FieldErrorText {\n constructor() {\n const context = injectFieldContext();\n\n effect((onCleanup) => {\n const unregister = untracked(() => context.registerErrorText());\n onCleanup(unregister);\n });\n\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getErrorTextProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-required-indicator]\",\n standalone: true,\n exportAs: \"fieldRequiredIndicator\",\n})\nexport class FieldRequiredIndicator {\n constructor() {\n const context = injectFieldContext();\n\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getRequiredIndicatorProps(),\n });\n }\n}\n","import {\n Directive,\n computed,\n forwardRef,\n inject,\n input,\n type InputSignal,\n type Signal,\n} from \"@angular/core\";\n\nimport type { FieldResolvedIds } from \"./types\";\nimport type { UseFieldReturn } from \"./use-field\";\n\nimport { fieldParts } from \"./anatomy\";\nimport { FIELD_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[field-item]\",\n standalone: true,\n exportAs: \"fieldItem\",\n providers: [{ provide: FIELD_CONTEXT, useExisting: forwardRef(() => FieldItem) }],\n})\nexport class FieldItem implements UseFieldReturn {\n readonly value: InputSignal<string> = input.required<string>();\n\n private readonly parent: UseFieldReturn = inject(FIELD_CONTEXT, { skipSelf: true });\n\n readonly disabled: Signal<boolean> = computed(() => this.parent.disabled());\n readonly invalid: Signal<boolean> = computed(() => this.parent.invalid());\n readonly readOnly: Signal<boolean> = computed(() => this.parent.readOnly());\n readonly required: Signal<boolean> = computed(() => this.parent.required());\n readonly hasErrorText: Signal<boolean> = computed(() => this.parent.hasErrorText());\n readonly hasHelperText: Signal<boolean> = computed(() => this.parent.hasHelperText());\n readonly ariaDescribedby: Signal<string | undefined> = computed(() =>\n this.parent.ariaDescribedby(),\n );\n\n private readonly controlIdSignal = computed(() => this.parent.getItemControlId(this.value()));\n private readonly labelIdSignal = computed(() => this.parent.getItemLabelId(this.value()));\n\n get ids(): FieldResolvedIds {\n const parentIds = this.parent.ids;\n return {\n ...parentIds,\n control: this.controlIdSignal(),\n label: this.labelIdSignal(),\n };\n }\n\n setHasErrorText(value: boolean): void {\n this.parent.setHasErrorText(value);\n }\n\n setHasHelperText(value: boolean): void {\n this.parent.setHasHelperText(value);\n }\n\n registerErrorText(): () => void {\n return this.parent.registerErrorText();\n }\n\n registerHelperText(): () => void {\n return this.parent.registerHelperText();\n }\n\n getRootProps(): Record<string, unknown> {\n return this.parent.getRootProps();\n }\n\n getControlProps(): Record<string, unknown> {\n return {\n ...this.parent.getControlProps(),\n id: this.controlIdSignal(),\n };\n }\n\n getLabelProps(): Record<string, unknown> {\n return {\n ...this.parent.getLabelProps(),\n id: this.labelIdSignal(),\n htmlFor: this.controlIdSignal(),\n };\n }\n\n getInputProps(): Record<string, unknown> {\n return {\n ...this.getControlProps(),\n ...fieldParts.input.attrs,\n };\n }\n\n getTextareaProps(): Record<string, unknown> {\n return {\n ...this.getControlProps(),\n ...fieldParts.textarea.attrs,\n };\n }\n\n getSelectProps(): Record<string, unknown> {\n return {\n ...this.getControlProps(),\n ...fieldParts.select.attrs,\n };\n }\n\n getHelperTextProps(): Record<string, unknown> {\n return this.parent.getHelperTextProps();\n }\n\n getErrorTextProps(): Record<string, unknown> {\n return this.parent.getErrorTextProps();\n }\n\n getRequiredIndicatorProps(): Record<string, unknown> {\n return this.parent.getRequiredIndicatorProps();\n }\n\n getItemControlId(value: string): string {\n return this.parent.getItemControlId(value);\n }\n\n getItemLabelId(value: string): string {\n return this.parent.getItemLabelId(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEO,MAAM,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,CACtD,MAAM,EACN,WAAW,EACX,YAAY,EACZ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,UAAU,EACV,mBAAmB;AAGd,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE;;MCTjC,aAAa,GAAG,IAAI,cAAc,CAAiB,uBAAuB;SAEvE,kBAAkB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC;AAC9B;SAEgB,0BAA0B,GAAA;IACxC,OAAO,MAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAClD;;ACoCA,MAAM,QAAQ,GAAG,CAAC,KAA0B,MAA0B,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AAC7F,MAAM,QAAQ,GAAG,CAAC,KAA0B,MAA0B,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3F,SAAU,QAAQ,CAAC,OAAwB,EAAA;AAC/C,IAAA,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AAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,8LAFT,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAEtE,SAAS,EAAA,UAAA,EAAA,CAAA;kBANrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,SAAU,CAAC,EAAE,CAAC;AAClF,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-field.mjs","sources":["../../src/components/field/anatomy.ts","../../src/components/field/use-context.ts","../../src/components/field/use.ts","../../src/components/field/root.ts","../../src/components/field/root-provider.ts","../../src/components/field/label.ts","../../src/components/field/input.ts","../../src/components/field/textarea.ts","../../src/components/field/select.ts","../../src/components/field/helper-text.ts","../../src/components/field/error-text.ts","../../src/components/field/required-indicator.ts","../../src/components/field/item.ts","../../src/components/field/wirekyt-angular-field.ts"],"sourcesContent":["import { createAnatomy } from \"@wirekyt/dom/anatomy\";\n\nexport const fieldAnatomy = createAnatomy(\"field\").parts(\n \"root\",\n \"errorText\",\n \"helperText\",\n \"input\",\n \"label\",\n \"select\",\n \"textarea\",\n \"requiredIndicator\",\n);\n\nexport const fieldParts = fieldAnatomy.build();\n","import { InjectionToken, inject } from \"@angular/core\";\n\nimport type { UseFieldReturn } from \"./use\";\n\nexport const FIELD_CONTEXT = new InjectionToken<UseFieldReturn>(\"WIREKYT.FIELD_CONTEXT\");\n\nexport function injectFieldContext(): UseFieldReturn {\n return inject(FIELD_CONTEXT);\n}\n\nexport function injectFieldContextOptional(): UseFieldReturn | null {\n return inject(FIELD_CONTEXT, { optional: true });\n}\n","import { type Signal, computed, signal } from \"@angular/core\";\nimport { createId } from \"@wirekyt/angular\";\nimport { injectFieldsetContextOptional } from \"@wirekyt/angular/fieldset\";\nimport { ariaAttr, dataAttr } from \"@wirekyt/dom/dom-query\";\n\nimport type { FieldElementIds, FieldResolvedIds } from \"./types\";\n\nimport { fieldParts } from \"./anatomy\";\n\nexport interface UseFieldProps {\n id?: string;\n ids?: FieldElementIds;\n required?: boolean;\n disabled?: boolean;\n invalid?: boolean;\n readOnly?: boolean;\n target?: string;\n}\n\nexport interface UseFieldReturn {\n ids: FieldResolvedIds;\n disabled: Signal<boolean>;\n invalid: Signal<boolean>;\n readOnly: Signal<boolean>;\n required: Signal<boolean>;\n hasErrorText: Signal<boolean>;\n hasHelperText: Signal<boolean>;\n ariaDescribedby: Signal<string | undefined>;\n setHasErrorText(value: boolean): void;\n setHasHelperText(value: boolean): void;\n registerErrorText(): () => void;\n registerHelperText(): () => void;\n getRootProps(): Record<string, unknown>;\n getControlProps(): Record<string, unknown>;\n getLabelProps(): Record<string, unknown>;\n getInputProps(): Record<string, unknown>;\n getTextareaProps(): Record<string, unknown>;\n getSelectProps(): Record<string, unknown>;\n getHelperTextProps(): Record<string, unknown>;\n getErrorTextProps(): Record<string, unknown>;\n getRequiredIndicatorProps(): Record<string, unknown>;\n getItemControlId(value: string): string;\n getItemLabelId(value: string): string;\n}\n\nexport interface UseFieldOptions {\n context: () => UseFieldProps;\n}\n\nexport function useField(options: UseFieldOptions): UseFieldReturn {\n const fallbackId = createId();\n const fieldsetContext = injectFieldsetContextOptional();\n\n const propsSignal = computed(() => options.context());\n\n const id = computed(() => propsSignal().id ?? fallbackId);\n const ids = computed<FieldResolvedIds>(() => {\n const provided = propsSignal().ids;\n const baseId = id();\n return {\n root: provided?.root ?? `field:${baseId}`,\n control: provided?.control ?? baseId,\n label: provided?.label ?? `field:${baseId}:label`,\n errorText: provided?.errorText ?? `field:${baseId}:error-text`,\n helperText: provided?.helperText ?? `field:${baseId}:helper-text`,\n };\n });\n\n const disabled = computed(() => {\n if (propsSignal().disabled) return true;\n return fieldsetContext ? fieldsetContext.disabled() : false;\n });\n const invalid = computed(() => {\n if (propsSignal().invalid) return true;\n return fieldsetContext ? fieldsetContext.invalid() : false;\n });\n const readOnly = computed(() => Boolean(propsSignal().readOnly));\n const required = computed(() => Boolean(propsSignal().required));\n\n const errorTextCount = signal(0);\n const helperTextCount = signal(0);\n const explicitHasErrorText = signal(false);\n const explicitHasHelperText = signal(false);\n const hasErrorTextSignal = computed(() => explicitHasErrorText() || errorTextCount() > 0);\n const hasHelperTextSignal = computed(() => explicitHasHelperText() || helperTextCount() > 0);\n\n const ariaDescribedby = computed<string | undefined>(() => {\n return hasHelperTextSignal() ? ids().helperText : undefined;\n });\n\n const ariaErrormessage = computed<string | undefined>(() => {\n return hasErrorTextSignal() && invalid() ? ids().errorText : undefined;\n });\n\n const targetControlId = computed<string | undefined>(() => {\n const t = propsSignal().target;\n return t ? `field:${id()}:item:${t}` : undefined;\n });\n\n const getRootProps = (): Record<string, unknown> => ({\n ...fieldParts.root.attrs,\n id: ids().root,\n role: \"group\",\n \"data-disabled\": dataAttr(disabled()),\n \"data-invalid\": dataAttr(invalid()),\n \"data-readonly\": dataAttr(readOnly()),\n });\n\n const getLabelProps = (): Record<string, unknown> => ({\n ...fieldParts.label.attrs,\n id: ids().label,\n \"data-disabled\": dataAttr(disabled()),\n \"data-invalid\": dataAttr(invalid()),\n \"data-readonly\": dataAttr(readOnly()),\n \"data-required\": dataAttr(required()),\n htmlFor: targetControlId() ?? ids().control,\n });\n\n const getControlProps = (): Record<string, unknown> => ({\n \"aria-describedby\": ariaDescribedby(),\n \"aria-errormessage\": ariaErrormessage(),\n \"aria-invalid\": ariaAttr(invalid()),\n \"data-invalid\": dataAttr(invalid()),\n \"data-required\": dataAttr(required()),\n \"data-readonly\": dataAttr(readOnly()),\n id: ids().control,\n required: required() || undefined,\n disabled: disabled() || undefined,\n readOnly: readOnly() || undefined,\n });\n\n const getInputProps = (): Record<string, unknown> => ({\n ...getControlProps(),\n ...fieldParts.input.attrs,\n });\n\n const getTextareaProps = (): Record<string, unknown> => ({\n ...getControlProps(),\n ...fieldParts.textarea.attrs,\n });\n\n const getSelectProps = (): Record<string, unknown> => ({\n ...getControlProps(),\n ...fieldParts.select.attrs,\n });\n\n const getHelperTextProps = (): Record<string, unknown> => ({\n ...fieldParts.helperText.attrs,\n id: ids().helperText,\n \"data-disabled\": dataAttr(disabled()),\n });\n\n const getErrorTextProps = (): Record<string, unknown> => ({\n ...fieldParts.errorText.attrs,\n id: ids().errorText,\n \"aria-live\": \"polite\",\n hidden: !invalid() || undefined,\n });\n\n const getRequiredIndicatorProps = (): Record<string, unknown> => ({\n ...fieldParts.requiredIndicator.attrs,\n \"aria-hidden\": \"true\",\n hidden: !required() || undefined,\n });\n\n return {\n get ids(): FieldResolvedIds {\n return ids();\n },\n disabled,\n invalid,\n readOnly,\n required,\n hasErrorText: hasErrorTextSignal,\n hasHelperText: hasHelperTextSignal,\n ariaDescribedby,\n setHasErrorText: (value: boolean) => explicitHasErrorText.set(value),\n setHasHelperText: (value: boolean) => explicitHasHelperText.set(value),\n registerErrorText: () => {\n errorTextCount.update((count) => count + 1);\n return () => errorTextCount.update((count) => Math.max(0, count - 1));\n },\n registerHelperText: () => {\n helperTextCount.update((count) => count + 1);\n return () => helperTextCount.update((count) => Math.max(0, count - 1));\n },\n getRootProps,\n getControlProps,\n getLabelProps,\n getInputProps,\n getTextareaProps,\n getSelectProps,\n getHelperTextProps,\n getErrorTextProps,\n getRequiredIndicatorProps,\n getItemControlId: (value: string) => `field:${id()}:item:${value}`,\n getItemLabelId: (value: string) => `field:${id()}:item:${value}:label`,\n };\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n type InputSignal,\n type InputSignalWithTransform,\n type Signal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { FieldElementIds, FieldResolvedIds } from \"./types\";\n\nimport { type UseFieldReturn, useField } from \"./use\";\nimport { FIELD_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[field-root]\",\n standalone: true,\n exportAs: \"fieldRoot\",\n providers: [{ provide: FIELD_CONTEXT, useExisting: forwardRef(() => FieldRoot) }],\n})\nexport class FieldRoot implements UseFieldReturn {\n readonly id: InputSignal<string | undefined> = input<string | undefined>(undefined);\n readonly elementIds: InputSignal<FieldElementIds | undefined> = input<\n FieldElementIds | undefined\n >(undefined, {\n alias: \"ids\",\n });\n readonly required: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly disabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly invalid: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly readOnly: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly target: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n private readonly field: UseFieldReturn = useField({\n context: () => ({\n id: this.id(),\n ids: this.elementIds(),\n required: this.required(),\n disabled: this.disabled(),\n invalid: this.invalid(),\n readOnly: this.readOnly(),\n target: this.target(),\n }),\n });\n\n get ids(): FieldResolvedIds {\n return this.field.ids;\n }\n\n get hasErrorText(): Signal<boolean> {\n return this.field.hasErrorText;\n }\n\n get hasHelperText(): Signal<boolean> {\n return this.field.hasHelperText;\n }\n\n get ariaDescribedby(): Signal<string | undefined> {\n return this.field.ariaDescribedby;\n }\n\n setHasErrorText(value: boolean): void {\n this.field.setHasErrorText(value);\n }\n\n setHasHelperText(value: boolean): void {\n this.field.setHasHelperText(value);\n }\n\n registerErrorText(): () => void {\n return this.field.registerErrorText();\n }\n\n registerHelperText(): () => void {\n return this.field.registerHelperText();\n }\n\n getRootProps(): Record<string, unknown> {\n return this.field.getRootProps();\n }\n getControlProps(): Record<string, unknown> {\n return this.field.getControlProps();\n }\n getLabelProps(): Record<string, unknown> {\n return this.field.getLabelProps();\n }\n getInputProps(): Record<string, unknown> {\n return this.field.getInputProps();\n }\n getTextareaProps(): Record<string, unknown> {\n return this.field.getTextareaProps();\n }\n getSelectProps(): Record<string, unknown> {\n return this.field.getSelectProps();\n }\n getHelperTextProps(): Record<string, unknown> {\n return this.field.getHelperTextProps();\n }\n getErrorTextProps(): Record<string, unknown> {\n return this.field.getErrorTextProps();\n }\n getRequiredIndicatorProps(): Record<string, unknown> {\n return this.field.getRequiredIndicatorProps();\n }\n getItemControlId(value: string): string {\n return this.field.getItemControlId(value);\n }\n getItemLabelId(value: string): string {\n return this.field.getItemLabelId(value);\n }\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.field.getRootProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n computed,\n forwardRef,\n inject,\n input,\n type InputSignal,\n type Signal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { FieldResolvedIds } from \"./types\";\nimport type { UseFieldReturn } from \"./use\";\n\nimport { FIELD_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[field-root-provider]\",\n standalone: true,\n exportAs: \"fieldRootProvider\",\n providers: [{ provide: FIELD_CONTEXT, useExisting: forwardRef(() => FieldRootProvider) }],\n})\nexport class FieldRootProvider implements UseFieldReturn {\n readonly value: InputSignal<UseFieldReturn> = input.required<UseFieldReturn>();\n\n readonly disabled: Signal<boolean> = computed(() => this.value().disabled());\n readonly invalid: Signal<boolean> = computed(() => this.value().invalid());\n readonly readOnly: Signal<boolean> = computed(() => this.value().readOnly());\n readonly required: Signal<boolean> = computed(() => this.value().required());\n readonly hasErrorText: Signal<boolean> = computed(() => this.value().hasErrorText());\n readonly hasHelperText: Signal<boolean> = computed(() => this.value().hasHelperText());\n readonly ariaDescribedby: Signal<string | undefined> = computed(() =>\n this.value().ariaDescribedby(),\n );\n\n get ids(): FieldResolvedIds {\n return this.value().ids;\n }\n\n setHasErrorText(value: boolean): void {\n this.value().setHasErrorText(value);\n }\n\n setHasHelperText(value: boolean): void {\n this.value().setHasHelperText(value);\n }\n\n registerErrorText(): () => void {\n return this.value().registerErrorText();\n }\n\n registerHelperText(): () => void {\n return this.value().registerHelperText();\n }\n\n getRootProps(): Record<string, unknown> {\n return this.value().getRootProps();\n }\n getControlProps(): Record<string, unknown> {\n return this.value().getControlProps();\n }\n getLabelProps(): Record<string, unknown> {\n return this.value().getLabelProps();\n }\n getInputProps(): Record<string, unknown> {\n return this.value().getInputProps();\n }\n getTextareaProps(): Record<string, unknown> {\n return this.value().getTextareaProps();\n }\n getSelectProps(): Record<string, unknown> {\n return this.value().getSelectProps();\n }\n getHelperTextProps(): Record<string, unknown> {\n return this.value().getHelperTextProps();\n }\n getErrorTextProps(): Record<string, unknown> {\n return this.value().getErrorTextProps();\n }\n getRequiredIndicatorProps(): Record<string, unknown> {\n return this.value().getRequiredIndicatorProps();\n }\n getItemControlId(value: string): string {\n return this.value().getItemControlId(value);\n }\n getItemLabelId(value: string): string {\n return this.value().getItemLabelId(value);\n }\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.value().getRootProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-label]\",\n standalone: true,\n exportAs: \"fieldLabel\",\n})\nexport class FieldLabel {\n constructor() {\n const context = injectFieldContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getLabelProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-input]\",\n standalone: true,\n exportAs: \"fieldInput\",\n})\nexport class FieldInput {\n constructor() {\n const context = injectFieldContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getInputProps(),\n });\n }\n}\n","import { isPlatformBrowser } from \"@angular/common\";\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n PLATFORM_ID,\n Renderer2,\n booleanAttribute,\n effect,\n inject,\n input,\n type InputSignalWithTransform,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\nimport { autoresizeTextarea } from \"@wirekyt/dom/auto-resize\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-textarea]\",\n standalone: true,\n exportAs: \"fieldTextarea\",\n})\nexport class FieldTextarea {\n readonly autoresize: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n constructor() {\n const context = injectFieldContext();\n const elementRef = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n const destroyRef = inject(DestroyRef);\n const isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n bindProps({\n elementRef,\n renderer: inject(Renderer2),\n destroyRef,\n props: () => ({\n ...context.getTextareaProps(),\n style: this.autoresize() ? { resize: \"none\" } : undefined,\n }),\n });\n\n if (!isBrowser) return;\n\n effect((onCleanup) => {\n if (!this.autoresize()) return;\n\n const cleanup = autoresizeTextarea(elementRef.nativeElement);\n onCleanup(() => {\n cleanup?.();\n });\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-select]\",\n standalone: true,\n exportAs: \"fieldSelect\",\n})\nexport class FieldSelect {\n constructor() {\n const context = injectFieldContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getSelectProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n effect,\n inject,\n untracked,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-helper-text]\",\n standalone: true,\n exportAs: \"fieldHelperText\",\n})\nexport class FieldHelperText {\n constructor() {\n const context = injectFieldContext();\n\n effect((onCleanup) => {\n const unregister = untracked(() => context.registerHelperText());\n onCleanup(unregister);\n });\n\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getHelperTextProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n effect,\n inject,\n untracked,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-error-text]\",\n standalone: true,\n exportAs: \"fieldErrorText\",\n})\nexport class FieldErrorText {\n constructor() {\n const context = injectFieldContext();\n\n effect((onCleanup) => {\n const unregister = untracked(() => context.registerErrorText());\n onCleanup(unregister);\n });\n\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getErrorTextProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFieldContext } from \"./use-context\";\n\n@Directive({\n selector: \"[field-required-indicator]\",\n standalone: true,\n exportAs: \"fieldRequiredIndicator\",\n})\nexport class FieldRequiredIndicator {\n constructor() {\n const context = injectFieldContext();\n\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.getRequiredIndicatorProps(),\n });\n }\n}\n","import {\n Directive,\n computed,\n forwardRef,\n inject,\n input,\n type InputSignal,\n type Signal,\n} from \"@angular/core\";\n\nimport type { FieldResolvedIds } from \"./types\";\nimport type { UseFieldReturn } from \"./use\";\n\nimport { fieldParts } from \"./anatomy\";\nimport { FIELD_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[field-item]\",\n standalone: true,\n exportAs: \"fieldItem\",\n providers: [{ provide: FIELD_CONTEXT, useExisting: forwardRef(() => FieldItem) }],\n})\nexport class FieldItem implements UseFieldReturn {\n readonly value: InputSignal<string> = input.required<string>();\n\n private readonly parent: UseFieldReturn = inject(FIELD_CONTEXT, { skipSelf: true });\n\n readonly disabled: Signal<boolean> = computed(() => this.parent.disabled());\n readonly invalid: Signal<boolean> = computed(() => this.parent.invalid());\n readonly readOnly: Signal<boolean> = computed(() => this.parent.readOnly());\n readonly required: Signal<boolean> = computed(() => this.parent.required());\n readonly hasErrorText: Signal<boolean> = computed(() => this.parent.hasErrorText());\n readonly hasHelperText: Signal<boolean> = computed(() => this.parent.hasHelperText());\n readonly ariaDescribedby: Signal<string | undefined> = computed(() =>\n this.parent.ariaDescribedby(),\n );\n\n private readonly controlIdSignal = computed(() => this.parent.getItemControlId(this.value()));\n private readonly labelIdSignal = computed(() => this.parent.getItemLabelId(this.value()));\n\n get ids(): FieldResolvedIds {\n const parentIds = this.parent.ids;\n return {\n ...parentIds,\n control: this.controlIdSignal(),\n label: this.labelIdSignal(),\n };\n }\n\n setHasErrorText(value: boolean): void {\n this.parent.setHasErrorText(value);\n }\n\n setHasHelperText(value: boolean): void {\n this.parent.setHasHelperText(value);\n }\n\n registerErrorText(): () => void {\n return this.parent.registerErrorText();\n }\n\n registerHelperText(): () => void {\n return this.parent.registerHelperText();\n }\n\n getRootProps(): Record<string, unknown> {\n return this.parent.getRootProps();\n }\n\n getControlProps(): Record<string, unknown> {\n return {\n ...this.parent.getControlProps(),\n id: this.controlIdSignal(),\n };\n }\n\n getLabelProps(): Record<string, unknown> {\n return {\n ...this.parent.getLabelProps(),\n id: this.labelIdSignal(),\n htmlFor: this.controlIdSignal(),\n };\n }\n\n getInputProps(): Record<string, unknown> {\n return {\n ...this.getControlProps(),\n ...fieldParts.input.attrs,\n };\n }\n\n getTextareaProps(): Record<string, unknown> {\n return {\n ...this.getControlProps(),\n ...fieldParts.textarea.attrs,\n };\n }\n\n getSelectProps(): Record<string, unknown> {\n return {\n ...this.getControlProps(),\n ...fieldParts.select.attrs,\n };\n }\n\n getHelperTextProps(): Record<string, unknown> {\n return this.parent.getHelperTextProps();\n }\n\n getErrorTextProps(): Record<string, unknown> {\n return this.parent.getErrorTextProps();\n }\n\n getRequiredIndicatorProps(): Record<string, unknown> {\n return this.parent.getRequiredIndicatorProps();\n }\n\n getItemControlId(value: string): string {\n return this.parent.getItemControlId(value);\n }\n\n getItemLabelId(value: string): string {\n return this.parent.getItemLabelId(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEO,MAAM,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,CACtD,MAAM,EACN,WAAW,EACX,YAAY,EACZ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,UAAU,EACV,mBAAmB;AAGd,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE;;MCTjC,aAAa,GAAG,IAAI,cAAc,CAAiB,uBAAuB;SAEvE,kBAAkB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC;AAC9B;SAEgB,0BAA0B,GAAA;IACxC,OAAO,MAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAClD;;ACqCM,SAAU,QAAQ,CAAC,OAAwB,EAAA;AAC/C,IAAA,MAAM,UAAU,GAAG,QAAQ,EAAE;AAC7B,IAAA,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AA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,8LAFT,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAEtE,SAAS,EAAA,UAAA,EAAA,CAAA;kBANrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,SAAU,CAAC,EAAE,CAAC;AAClF,iBAAA;;;ACrBD;;AAEG;;;;"}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirekyt/angular",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "Angular adapter for Wirekyt",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"types": "./types/wirekyt-angular-drawer.d.ts",
|
|
80
80
|
"default": "./fesm2022/wirekyt-angular-drawer.mjs"
|
|
81
81
|
},
|
|
82
|
+
"./editable": {
|
|
83
|
+
"types": "./types/wirekyt-angular-editable.d.ts",
|
|
84
|
+
"default": "./fesm2022/wirekyt-angular-editable.mjs"
|
|
85
|
+
},
|
|
82
86
|
"./field": {
|
|
83
87
|
"types": "./types/wirekyt-angular-field.d.ts",
|
|
84
88
|
"default": "./fesm2022/wirekyt-angular-field.mjs"
|
|
@@ -7,7 +7,7 @@ import * as i0 from '@angular/core';
|
|
|
7
7
|
import { Signal, InputSignal, ModelSignal, InputSignalWithTransform, OutputEmitterRef, InjectionToken } from '@angular/core';
|
|
8
8
|
import { ControlValueAccessor } from '@angular/forms';
|
|
9
9
|
|
|
10
|
-
declare const checkboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "
|
|
10
|
+
declare const checkboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "control" | "label" | "indicator" | "group">;
|
|
11
11
|
|
|
12
12
|
type OptionalId<T extends {
|
|
13
13
|
id: string;
|
|
@@ -9,7 +9,7 @@ import { PresenceBase } from '@wirekyt/angular/presence';
|
|
|
9
9
|
import { ControlValueAccessor } from '@angular/forms';
|
|
10
10
|
import { ColorStringFormat } from '@wirekyt/dom/color-utils';
|
|
11
11
|
|
|
12
|
-
declare const colorPickerAnatomy: _wirekyt_dom_anatomy.Anatomy<"root" | "
|
|
12
|
+
declare const colorPickerAnatomy: _wirekyt_dom_anatomy.Anatomy<"root" | "control" | "label" | "trigger" | "positioner" | "content" | "area" | "valueText" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
|
|
13
13
|
|
|
14
14
|
declare class ColorPickerArea {
|
|
15
15
|
readonly xChannel: InputSignal<colorPicker.ColorChannel | undefined>;
|
|
@@ -13,7 +13,7 @@ import { PresenceBase } from '@wirekyt/angular/presence';
|
|
|
13
13
|
import { ControlValueAccessor } from '@angular/forms';
|
|
14
14
|
import * as _wirekyt_angular_combobox from '@wirekyt/angular/combobox';
|
|
15
15
|
|
|
16
|
-
declare const comboboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "
|
|
16
|
+
declare const comboboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "control" | "label" | "clearTrigger" | "item" | "trigger" | "positioner" | "content" | "input" | "itemText" | "itemGroup" | "list" | "itemIndicator" | "itemGroupLabel" | "empty">;
|
|
17
17
|
|
|
18
18
|
type ComboboxSchema<T extends CollectionItem = CollectionItem> = Machine<T> extends Machine$1<infer S> ? S : never;
|
|
19
19
|
|
|
@@ -9,7 +9,7 @@ import * as _wirekyt_angular_presence from '@wirekyt/angular/presence';
|
|
|
9
9
|
import { PresenceBase } from '@wirekyt/angular/presence';
|
|
10
10
|
import { ControlValueAccessor } from '@angular/forms';
|
|
11
11
|
|
|
12
|
-
declare const datePickerAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "
|
|
12
|
+
declare const datePickerAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "control" | "label" | "clearTrigger" | "trigger" | "positioner" | "content" | "input" | "view" | "table" | "nextTrigger" | "prevTrigger" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect" | "valueText">;
|
|
13
13
|
|
|
14
14
|
type OptionalId<T extends {
|
|
15
15
|
id?: string | undefined;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import * as editable from '@wirekyt/dom/machines/editable';
|
|
2
|
+
import { Props, ElementIds, EditChangeDetails, ValueChangeDetails, FocusOutsideEvent, PointerDownOutsideEvent, InteractOutsideEvent } from '@wirekyt/dom/machines/editable';
|
|
3
|
+
export { ActivationMode as EditableActivationMode, Api as EditableApi, EditChangeDetails as EditableEditChangeDetails, ElementIds as EditableElementIds, FocusOutsideEvent as EditableFocusOutsideEvent, InteractOutsideEvent as EditableInteractOutsideEvent, IntlTranslations as EditableIntlTranslations, Machine as EditableMachine, Props as EditableMachineProps, PointerDownOutsideEvent as EditablePointerDownOutsideEvent, Service as EditableService, SubmitMode as EditableSubmitMode, ValueChangeDetails as EditableValueChangeDetails, anatomy as editableAnatomy } from '@wirekyt/dom/machines/editable';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { InjectionToken, InputSignal, ModelSignal, InputSignalWithTransform, OutputEmitterRef, Signal, AfterContentInit } from '@angular/core';
|
|
6
|
+
import { UseMachineReturn } from '@wirekyt/angular';
|
|
7
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
8
|
+
|
|
9
|
+
type OptionalId<T extends {
|
|
10
|
+
id: string;
|
|
11
|
+
}> = Omit<T, "id"> & {
|
|
12
|
+
id?: string;
|
|
13
|
+
};
|
|
14
|
+
interface UseEditableProps extends OptionalId<Omit<Props, "dir" | "getRootNode">> {
|
|
15
|
+
}
|
|
16
|
+
type UseEditableReturn = UseMachineReturn<editable.Service["state"], editable.Api, editable.Service>;
|
|
17
|
+
interface UseEditableOptions {
|
|
18
|
+
context: () => UseEditableProps;
|
|
19
|
+
}
|
|
20
|
+
declare function useEditable(options?: UseEditableOptions): UseEditableReturn;
|
|
21
|
+
|
|
22
|
+
declare const EDITABLE_CONTEXT: InjectionToken<UseEditableReturn>;
|
|
23
|
+
declare function injectEditableContext(): UseEditableReturn;
|
|
24
|
+
|
|
25
|
+
declare class EditableRoot implements ControlValueAccessor, UseEditableReturn {
|
|
26
|
+
/** The id of the editable. */
|
|
27
|
+
readonly id: InputSignal<string | undefined>;
|
|
28
|
+
/** The element ids for the editable parts. */
|
|
29
|
+
readonly elementIds: InputSignal<ElementIds | undefined>;
|
|
30
|
+
/** The controlled value of the editable. */
|
|
31
|
+
readonly value: ModelSignal<string | undefined>;
|
|
32
|
+
/** The initial value of the editable when uncontrolled. */
|
|
33
|
+
readonly defaultValue: InputSignal<string | undefined>;
|
|
34
|
+
/** The controlled edit state of the editable. */
|
|
35
|
+
readonly edit: ModelSignal<boolean | undefined>;
|
|
36
|
+
/** The initial edit state of the editable when uncontrolled. */
|
|
37
|
+
readonly defaultEdit: InputSignalWithTransform<boolean, unknown>;
|
|
38
|
+
/** Whether the editable is disabled. */
|
|
39
|
+
readonly disabled: InputSignalWithTransform<boolean, unknown>;
|
|
40
|
+
/** Whether the editable is read-only. */
|
|
41
|
+
readonly readOnly: InputSignalWithTransform<boolean, unknown>;
|
|
42
|
+
/** Whether the editable is invalid. */
|
|
43
|
+
readonly invalid: InputSignalWithTransform<boolean, unknown>;
|
|
44
|
+
/** Whether the editable is required. */
|
|
45
|
+
readonly required: InputSignalWithTransform<boolean, unknown>;
|
|
46
|
+
/** The placeholder text for the editable. */
|
|
47
|
+
readonly placeholder: InputSignal<string | {
|
|
48
|
+
edit: string;
|
|
49
|
+
preview: string;
|
|
50
|
+
} | undefined>;
|
|
51
|
+
/** The name attribute of the editable input. */
|
|
52
|
+
readonly name: InputSignal<string | undefined>;
|
|
53
|
+
/** The form attribute of the editable input. */
|
|
54
|
+
readonly form: InputSignal<string | undefined>;
|
|
55
|
+
/** The maximum number of characters allowed. */
|
|
56
|
+
readonly maxLength: InputSignal<number | undefined>;
|
|
57
|
+
/** The activation mode for the preview element. */
|
|
58
|
+
readonly activationMode: InputSignal<editable.ActivationMode | undefined>;
|
|
59
|
+
/** The action that triggers submit in edit mode. */
|
|
60
|
+
readonly submitMode: InputSignal<editable.SubmitMode | undefined>;
|
|
61
|
+
/** Whether the editable should auto-resize to fit content. */
|
|
62
|
+
readonly autoResize: InputSignalWithTransform<boolean, unknown>;
|
|
63
|
+
/** Whether to select the text in the input when focused. */
|
|
64
|
+
readonly selectOnFocus: InputSignalWithTransform<boolean, unknown>;
|
|
65
|
+
/** The translations for the editable. */
|
|
66
|
+
readonly translations: InputSignal<editable.IntlTranslations | undefined>;
|
|
67
|
+
/** The element that should receive focus when edit mode exits. */
|
|
68
|
+
readonly finalFocusEl: InputSignal<(() => HTMLElement | null) | undefined>;
|
|
69
|
+
/** Emits the details when the edit state changes. */
|
|
70
|
+
readonly editDetailsChange: OutputEmitterRef<EditChangeDetails>;
|
|
71
|
+
/** Emits the details when the editable value changes. */
|
|
72
|
+
readonly valueDetailsChange: OutputEmitterRef<ValueChangeDetails>;
|
|
73
|
+
/** Emits when the editable value is committed. */
|
|
74
|
+
readonly valueCommit: OutputEmitterRef<ValueChangeDetails>;
|
|
75
|
+
/** Emits when the editable value is reverted. */
|
|
76
|
+
readonly valueRevert: OutputEmitterRef<ValueChangeDetails>;
|
|
77
|
+
/** Emits when focus moves outside the editable while editing. */
|
|
78
|
+
readonly focusOutside: OutputEmitterRef<FocusOutsideEvent>;
|
|
79
|
+
/** Emits when pointer down happens outside the editable while editing. */
|
|
80
|
+
readonly pointerDownOutside: OutputEmitterRef<PointerDownOutsideEvent>;
|
|
81
|
+
/** Emits when an interaction happens outside the editable while editing. */
|
|
82
|
+
readonly interactOutside: OutputEmitterRef<InteractOutsideEvent>;
|
|
83
|
+
private readonly _disabledFromForm;
|
|
84
|
+
private _pendingInternalWrites;
|
|
85
|
+
private _hasExternalBinding;
|
|
86
|
+
private _hasReceivedFormWrite;
|
|
87
|
+
private readonly cva;
|
|
88
|
+
private readonly machine;
|
|
89
|
+
readonly state: Signal<editable.Service["state"]>;
|
|
90
|
+
readonly api: Signal<editable.Api>;
|
|
91
|
+
readonly service: editable.Service;
|
|
92
|
+
readonly send: editable.Service["send"];
|
|
93
|
+
constructor();
|
|
94
|
+
writeValue(value: string | null): void;
|
|
95
|
+
registerOnChange(fn: (value: string | undefined) => void): void;
|
|
96
|
+
registerOnTouched(fn: () => void): void;
|
|
97
|
+
setDisabledState(disabled: boolean): void;
|
|
98
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableRoot, never>;
|
|
99
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableRoot, "[editable-root]", ["editableRoot"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "elementIds": { "alias": "ids"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "edit": { "alias": "edit"; "required": false; "isSignal": true; }; "defaultEdit": { "alias": "defaultEdit"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "activationMode": { "alias": "activationMode"; "required": false; "isSignal": true; }; "submitMode": { "alias": "submitMode"; "required": false; "isSignal": true; }; "autoResize": { "alias": "autoResize"; "required": false; "isSignal": true; }; "selectOnFocus": { "alias": "selectOnFocus"; "required": false; "isSignal": true; }; "translations": { "alias": "translations"; "required": false; "isSignal": true; }; "finalFocusEl": { "alias": "finalFocusEl"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "edit": "editChange"; "editDetailsChange": "editDetailsChange"; "valueDetailsChange": "valueDetailsChange"; "valueCommit": "valueCommit"; "valueRevert": "valueRevert"; "focusOutside": "focusOutside"; "pointerDownOutside": "pointerDownOutside"; "interactOutside": "interactOutside"; }, never, never, true, never>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
declare class EditableRootProvider implements UseEditableReturn {
|
|
103
|
+
/** The editable primitive returned by useEditable(). */
|
|
104
|
+
readonly value: InputSignal<UseEditableReturn>;
|
|
105
|
+
get state(): Signal<editable.Service["state"]>;
|
|
106
|
+
get api(): Signal<editable.Api>;
|
|
107
|
+
get service(): editable.Service;
|
|
108
|
+
get send(): editable.Service["send"];
|
|
109
|
+
constructor();
|
|
110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableRootProvider, never>;
|
|
111
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableRootProvider, "[editable-root-provider]", ["editableRootProvider"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
declare class EditableArea {
|
|
115
|
+
constructor();
|
|
116
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableArea, never>;
|
|
117
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableArea, "[editable-area]", ["editableArea"], {}, {}, never, never, true, never>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare class EditableInput {
|
|
121
|
+
constructor();
|
|
122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableInput, never>;
|
|
123
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableInput, "[editable-input]", ["editableInput"], {}, {}, never, never, true, never>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare class EditablePreview implements AfterContentInit {
|
|
127
|
+
private readonly ownsTextContent;
|
|
128
|
+
private readonly elementRef;
|
|
129
|
+
constructor();
|
|
130
|
+
ngAfterContentInit(): void;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditablePreview, never>;
|
|
132
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditablePreview, "[editable-preview]", ["editablePreview"], {}, {}, never, never, true, never>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare class EditableLabel {
|
|
136
|
+
constructor();
|
|
137
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableLabel, never>;
|
|
138
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableLabel, "[editable-label]", ["editableLabel"], {}, {}, never, never, true, never>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare class EditableControl {
|
|
142
|
+
constructor();
|
|
143
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableControl, never>;
|
|
144
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableControl, "[editable-control]", ["editableControl"], {}, {}, never, never, true, never>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare class EditableEditTrigger {
|
|
148
|
+
constructor();
|
|
149
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableEditTrigger, never>;
|
|
150
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableEditTrigger, "[editable-edit-trigger]", ["editableEditTrigger"], {}, {}, never, never, true, never>;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare class EditableSubmitTrigger {
|
|
154
|
+
constructor();
|
|
155
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableSubmitTrigger, never>;
|
|
156
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableSubmitTrigger, "[editable-submit-trigger]", ["editableSubmitTrigger"], {}, {}, never, never, true, never>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
declare class EditableCancelTrigger {
|
|
160
|
+
constructor();
|
|
161
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableCancelTrigger, never>;
|
|
162
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableCancelTrigger, "[editable-cancel-trigger]", ["editableCancelTrigger"], {}, {}, never, never, true, never>;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
interface EditableContextTemplate {
|
|
166
|
+
$implicit: UseEditableReturn["api"];
|
|
167
|
+
api: UseEditableReturn["api"];
|
|
168
|
+
}
|
|
169
|
+
declare class EditableContext {
|
|
170
|
+
static ngTemplateContextGuard(_directive: EditableContext, context: unknown): context is EditableContextTemplate;
|
|
171
|
+
private readonly editable;
|
|
172
|
+
private readonly templateRef;
|
|
173
|
+
private readonly viewContainer;
|
|
174
|
+
constructor();
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableContext, never>;
|
|
176
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableContext, "[editable-context]", ["editableContext"], {}, {}, never, never, true, never>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export { EDITABLE_CONTEXT, EditableArea, EditableCancelTrigger, EditableContext, EditableControl, EditableEditTrigger, EditableInput, EditableLabel, EditablePreview, EditableRoot, EditableRootProvider, EditableSubmitTrigger, injectEditableContext, useEditable };
|
|
180
|
+
export type { EditableContextTemplate, UseEditableOptions, UseEditableProps, UseEditableReturn };
|
|
181
|
+
//# sourceMappingURL=wirekyt-angular-editable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-editable.d.ts","sources":["../../src/components/editable/use.ts","../../src/components/editable/use-context.ts","../../src/components/editable/root.ts","../../src/components/editable/root-provider.ts","../../src/components/editable/area.ts","../../src/components/editable/input.ts","../../src/components/editable/preview.ts","../../src/components/editable/label.ts","../../src/components/editable/control.ts","../../src/components/editable/edit-trigger.ts","../../src/components/editable/submit-trigger.ts","../../src/components/editable/cancel-trigger.ts","../../src/components/editable/context.ts"],"mappings":";;;;;;;;AAcA,KAAK,UAAU;;AAAyB,KAAI,IAAI;;;AAE1C,UAAW,gBAAiB,SAAQ,UAAU,CAClD,IAAI,CAACA,KAAoB;AACvB;AAEE,KAAM,iBAAiB,GAAG,gBAAgB,CAC9C,QAAQ,CAAC,OAAO,WAChB,QAAQ,CAAC,GAAG,EACZ,QAAQ,CAAC,OAAO;UAGD,kBAAkB;mBAClB,gBAAgB;AAChC;AAKD,iBAAgB,WAAW,WAChB,kBAA4C,GACpD,iBAAiB;;AC/BpB,cAAa,gBAAgB,EAAA,cAAA,CAAA,iBAAA;AAE7B,iBAAgB,qBAAqB,IAAI,iBAAiB;;AC8B1D,cASa,YAAa,YAAW,oBAAoB,EAAE,iBAAiB;;iBAE7D,WAAW;;yBAEH,WAAW,CAACC,UAAkB;;oBAMnC,WAAW;;2BAEJ,WAAW;;mBAEnB,WAAW;;0BAEJ,wBAAwB;;uBAI3B,wBAAwB;;uBAIxB,wBAAwB;;sBAIzB,wBAAwB;;uBAIvB,wBAAwB;;AAI3C,0BAAsB,WAAW;;;;;mBAIlB,WAAW;;mBAEX,WAAW;;wBAEN,WAAW;;6BAEN,WAAW,CAAC,QAAQ,CAAC,cAAc;;yBAIvC,WAAW,CAAC,QAAQ,CAAC,UAAU;;yBAI/B,wBAAwB;;4BAIrB,wBAAwB;;2BAIzB,WAAW,CAAC,QAAQ,CAA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CAArB,qBAAqB;AAUjC;;ACfD,cAKa,qBAAqB;;yCAArB,qBAAqB;2CAArB,qBAAqB;AAUjC;;UCPgB,uBAAuB;AACtC,eAAW,iBAAiB;AAC5B,SAAK,iBAAiB;AACvB;AAED,cAKa,eAAe;AAC1B,8CACc,eAAe,gCAEf,uBAAuB;AAKrC;AACA;AACA;;yCAXW,eAAe;2CAAf,eAAe;AA0B3B;;;;","names":["EditableMachineProps","EditableElementIds","EditableEditChangeDetails","EditableValueChangeDetails","EditableFocusOutsideEvent","EditablePointerDownOutsideEvent","EditableInteractOutsideEvent"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirekyt-angular-field.d.ts","sources":["../../src/components/field/anatomy.ts","../../src/components/field/types.ts","../../src/components/field/use
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-field.d.ts","sources":["../../src/components/field/anatomy.ts","../../src/components/field/types.ts","../../src/components/field/use.ts","../../src/components/field/use-context.ts","../../src/components/field/root.ts","../../src/components/field/root-provider.ts","../../src/components/field/label.ts","../../src/components/field/input.ts","../../src/components/field/textarea.ts","../../src/components/field/select.ts","../../src/components/field/helper-text.ts","../../src/components/field/error-text.ts","../../src/components/field/required-indicator.ts","../../src/components/field/item.ts"],"mappings":";;;;AAEA,cAAa,YAAY,EAAA,oBAAA,CAAA,eAAA;;UCFR,eAAe;;;;;;AAM/B;UAEgB,gBAAgB;;;;;;AAMhC;;UCLgB,aAAa;;UAEtB,eAAe;;;;;;AAMtB;UAEgB,cAAc;SACxB,gBAAgB;AACrB,cAAU,MAAM;AAChB,aAAS,MAAM;AACf,cAAU,MAAM;AAChB,cAAU,MAAM;AAChB,kBAAc,MAAM;AACpB,mBAAe,MAAM;AACrB,qBAAiB,MAAM;AACvB;AACA;;;AAGA,oBAAgB,MAAM;AACtB,uBAAmB,MAAM;AACzB,qBAAiB,MAAM;AACvB,qBAAiB,MAAM;AACvB,wBAAoB,MAAM;AAC1B,sBAAkB,MAAM;AACxB,0BAA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AA2E7B;;AC/FD,cAKa,UAAU;;yCAAV,UAAU;2CAAV,UAAU;AAUtB;;ACfD,cAKa,UAAU;;yCAAV,UAAU;2CAAV,UAAU;AAUtB;;ACFD,cAKa,aAAa;yBACH,wBAAwB;;yCADlC,aAAa;2CAAb,aAAa;AAgCzB;;AClDD,cAKa,WAAW;;yCAAX,WAAW;2CAAX,WAAW;AAUvB;;ACPD,cAKa,eAAe;;yCAAf,eAAe;2CAAf,eAAe;AAgB3B;;ACrBD,cAKa,cAAc;;yCAAd,cAAc;2CAAd,cAAc;AAgB1B;;AC7BD,cAKa,sBAAsB;;yCAAtB,sBAAsB;2CAAtB,sBAAsB;AAWlC;;ACLD,cAMa,SAAU,YAAW,cAAc;AAC9C,oBAAgB,WAAW;AAE3B;AAEA,uBAAmB,MAAM;AACzB,sBAAkB,MAAM;AACxB,uBAAmB,MAAM;AACzB,uBAAmB,MAAM;AACzB,2BAAuB,MAAM;AAC7B,4BAAwB,MAAM;8BACJ,MAAM;AAIhC;AACA;eAEW,gBAAgB;AAS3B;AAIA;;;AAYA,oBAAgB,MAAM;AAItB,uBAAmB,MAAM;AAOzB,qBAAiB,MAAM;AAQvB,qBAAiB,MAAM;AAOvB,wBAAoB,MAAM;AAO1B,sBAAkB,MAAM;AAOxB,0BAAsB,MAAM;AAI5B,yBAAqB,MAAM;AAI3B,iCAA6B,MAAM;AAInC;AAIA;yCAnGW,SAAS;2CAAT,SAAS;AAsGrB;;;;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirekyt/angular",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "Angular adapter for Wirekyt",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"types": "./dist/types/wirekyt-angular-drawer.d.ts",
|
|
80
80
|
"default": "./dist/fesm2022/wirekyt-angular-drawer.mjs"
|
|
81
81
|
},
|
|
82
|
+
"./editable": {
|
|
83
|
+
"types": "./dist/types/wirekyt-angular-editable.d.ts",
|
|
84
|
+
"default": "./dist/fesm2022/wirekyt-angular-editable.mjs"
|
|
85
|
+
},
|
|
82
86
|
"./field": {
|
|
83
87
|
"types": "./dist/types/wirekyt-angular-field.d.ts",
|
|
84
88
|
"default": "./dist/fesm2022/wirekyt-angular-field.mjs"
|
|
@@ -128,7 +132,7 @@
|
|
|
128
132
|
"dependencies": {
|
|
129
133
|
"@internationalized/date": "^3.12.3",
|
|
130
134
|
"@internationalized/number": "^3.6.7",
|
|
131
|
-
"@wirekyt/dom": "0.0.
|
|
135
|
+
"@wirekyt/dom": "0.0.26",
|
|
132
136
|
"tslib": "^2.8.1"
|
|
133
137
|
},
|
|
134
138
|
"peerDependencies": {
|