@runic-artifex/angular 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +130 -23
  2. package/dist/fesm2022/runic-artifex-angular-experimental.mjs +285 -0
  3. package/dist/fesm2022/runic-artifex-angular-experimental.mjs.map +1 -0
  4. package/dist/fesm2022/runic-artifex-angular-forms.mjs +246 -0
  5. package/dist/fesm2022/runic-artifex-angular-forms.mjs.map +1 -0
  6. package/dist/fesm2022/runic-artifex-angular.mjs +975 -0
  7. package/dist/fesm2022/runic-artifex-angular.mjs.map +1 -0
  8. package/dist/types/runic-artifex-angular-experimental.d.ts +85 -0
  9. package/dist/types/runic-artifex-angular-forms.d.ts +72 -0
  10. package/dist/types/runic-artifex-angular.d.ts +626 -0
  11. package/package.json +20 -17
  12. package/dist/esm/experimental.d.ts +0 -39
  13. package/dist/esm/experimental.js +0 -64
  14. package/dist/esm/forms/index.d.ts +0 -2
  15. package/dist/esm/forms/index.js +0 -2
  16. package/dist/esm/forms/runic-field.directive.d.ts +0 -48
  17. package/dist/esm/forms/runic-field.directive.js +0 -195
  18. package/dist/esm/forms/signal-forms.d.ts +0 -19
  19. package/dist/esm/forms/signal-forms.js +0 -29
  20. package/dist/esm/index.d.ts +0 -24
  21. package/dist/esm/index.js +0 -25
  22. package/dist/esm/inject-appearance.d.ts +0 -19
  23. package/dist/esm/inject-appearance.js +0 -28
  24. package/dist/esm/inject-bridge-connection.d.ts +0 -22
  25. package/dist/esm/inject-bridge-connection.js +0 -26
  26. package/dist/esm/inject-collection-viewport.d.ts +0 -13
  27. package/dist/esm/inject-collection-viewport.js +0 -31
  28. package/dist/esm/inject-command.d.ts +0 -35
  29. package/dist/esm/inject-command.js +0 -33
  30. package/dist/esm/inject-field.d.ts +0 -66
  31. package/dist/esm/inject-field.js +0 -58
  32. package/dist/esm/inject-form.d.ts +0 -40
  33. package/dist/esm/inject-form.js +0 -48
  34. package/dist/esm/inject-latest-operation.d.ts +0 -25
  35. package/dist/esm/inject-latest-operation.js +0 -35
  36. package/dist/esm/inject-menu-bar.d.ts +0 -32
  37. package/dist/esm/inject-menu-bar.js +0 -39
  38. package/dist/esm/inject-operation.d.ts +0 -23
  39. package/dist/esm/inject-operation.js +0 -33
  40. package/dist/esm/inject-query-collection.d.ts +0 -29
  41. package/dist/esm/inject-query-collection.js +0 -64
  42. package/dist/esm/inject-text-field.d.ts +0 -55
  43. package/dist/esm/inject-text-field.js +0 -51
  44. package/dist/esm/inject-text.d.ts +0 -57
  45. package/dist/esm/inject-text.js +0 -107
  46. package/dist/esm/inject-view-resource.d.ts +0 -39
  47. package/dist/esm/inject-view-resource.js +0 -98
  48. package/dist/esm/inject-view.d.ts +0 -41
  49. package/dist/esm/inject-view.js +0 -67
  50. package/dist/esm/instance.d.ts +0 -34
  51. package/dist/esm/instance.js +0 -48
  52. package/dist/esm/view-outlet.d.ts +0 -101
  53. package/dist/esm/view-outlet.js +0 -177
@@ -0,0 +1,246 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Directive, ElementRef, Injector, afterRenderEffect, computed, effect, forwardRef, inject, input, linkedSignal, untracked } from "@angular/core";
3
+ import { NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl } from "@angular/forms";
4
+ import { validate } from "@angular/forms/signals";
5
+ const unsynced = Symbol("unsynced");
6
+ var RunicFieldDirective = class RunicFieldDirective {
7
+ runicField = input.required(...ngDevMode ? [{ debugName: "runicField" }] : /* istanbul ignore next */ []);
8
+ invalid = computed(() => {
9
+ const field = this.runicField();
10
+ return field.error() !== void 0 || field.errors().length !== 0;
11
+ }, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
12
+ element = inject(ElementRef).nativeElement;
13
+ injector = inject(Injector);
14
+ composing = false;
15
+ changed;
16
+ touched;
17
+ validatorChanged;
18
+ validated;
19
+ synced = unsynced;
20
+ constructor() {
21
+ afterRenderEffect({ write: () => {
22
+ const field = this.runicField();
23
+ const value = field.value();
24
+ const text = field.text();
25
+ if (this.composing) return;
26
+ const element = this.element;
27
+ switch (this.wiring()) {
28
+ case "checkbox": {
29
+ const checkbox = element;
30
+ if (checkbox.checked !== (value === true)) checkbox.checked = value === true;
31
+ checkbox.indeterminate = value === null || value === void 0;
32
+ break;
33
+ }
34
+ case "radio": {
35
+ const radio = element;
36
+ if (radio.checked !== (radio.value === text)) radio.checked = radio.value === text;
37
+ break;
38
+ }
39
+ default: if (element.value !== text) element.value = text;
40
+ }
41
+ } });
42
+ effect(() => {
43
+ this.runicField().value();
44
+ untracked(() => this.syncControl());
45
+ });
46
+ effect(() => {
47
+ const errors = this.runicField().errors();
48
+ untracked(() => {
49
+ if (this.validated !== void 0 && errors !== this.validated) this.validatorChanged?.();
50
+ });
51
+ });
52
+ }
53
+ wiring() {
54
+ const element = this.element;
55
+ if (element.tagName === "SELECT") return "select";
56
+ if (element.tagName === "INPUT") {
57
+ const type = element.type;
58
+ if (type === "checkbox" || type === "radio") return type;
59
+ }
60
+ return "text";
61
+ }
62
+ control() {
63
+ return this.injector.get(NgControl, null, {
64
+ self: true,
65
+ optional: true
66
+ })?.control ?? void 0;
67
+ }
68
+ syncControl() {
69
+ const control = this.control();
70
+ if (control === void 0) return;
71
+ this.synced = control;
72
+ const value = this.runicField().value();
73
+ if (!Object.is(control.value, value)) control.setValue(value, {
74
+ emitEvent: false,
75
+ emitModelToViewChange: false
76
+ });
77
+ }
78
+ changedByUser() {
79
+ this.changed?.(this.runicField().value());
80
+ }
81
+ onInput() {
82
+ if (this.wiring() !== "text") return;
83
+ this.runicField().inputText(this.element.value);
84
+ if (!this.composing) this.changedByUser();
85
+ }
86
+ onChange() {
87
+ const field = this.runicField();
88
+ switch (this.wiring()) {
89
+ case "checkbox":
90
+ field.input(this.element.checked);
91
+ break;
92
+ case "radio":
93
+ if (!this.element.checked) return;
94
+ field.inputText(this.element.value);
95
+ break;
96
+ case "select":
97
+ field.inputText(this.element.value);
98
+ break;
99
+ default: return;
100
+ }
101
+ this.changedByUser();
102
+ }
103
+ onCompositionStart() {
104
+ this.composing = true;
105
+ this.runicField().compositionStart();
106
+ }
107
+ onCompositionEnd() {
108
+ this.composing = false;
109
+ this.runicField().compositionEnd(this.element.value);
110
+ this.changedByUser();
111
+ }
112
+ onBlur() {
113
+ this.runicField().commit();
114
+ this.touched?.();
115
+ }
116
+ writeValue(value) {
117
+ const control = this.control();
118
+ if (this.changed === void 0 || control !== this.synced) {
119
+ queueMicrotask(() => this.syncControl());
120
+ return;
121
+ }
122
+ const field = this.runicField();
123
+ if (Object.is(value, untracked(field.value))) return;
124
+ if ((value === null || value === void 0) && !field.field.nullable) {
125
+ queueMicrotask(() => this.syncControl());
126
+ return;
127
+ }
128
+ field.input(value);
129
+ }
130
+ registerOnChange(fn) {
131
+ this.changed = fn;
132
+ }
133
+ registerOnTouched(fn) {
134
+ this.touched = fn;
135
+ }
136
+ setDisabledState(disabled) {
137
+ this.element.disabled = disabled;
138
+ }
139
+ validate(_control) {
140
+ const errors = untracked(this.runicField().errors);
141
+ this.validated = errors;
142
+ return errors.length === 0 ? null : { runic: errors };
143
+ }
144
+ registerOnValidatorChange(fn) {
145
+ this.validatorChanged = fn;
146
+ }
147
+ static ɵfac = i0.ɵɵngDeclareFactory({
148
+ minVersion: "12.0.0",
149
+ version: "22.2.3",
150
+ ngImport: i0,
151
+ type: RunicFieldDirective,
152
+ deps: [],
153
+ target: i0.ɵɵFactoryTarget.Directive
154
+ });
155
+ static ɵdir = i0.ɵɵngDeclareDirective({
156
+ minVersion: "17.1.0",
157
+ version: "22.2.3",
158
+ type: RunicFieldDirective,
159
+ isStandalone: true,
160
+ selector: "[runicField]",
161
+ inputs: { runicField: {
162
+ classPropertyName: "runicField",
163
+ publicName: "runicField",
164
+ isSignal: true,
165
+ isRequired: true,
166
+ transformFunction: null
167
+ } },
168
+ host: {
169
+ listeners: {
170
+ "input": "onInput()",
171
+ "change": "onChange()",
172
+ "compositionstart": "onCompositionStart()",
173
+ "compositionend": "onCompositionEnd()",
174
+ "blur": "onBlur()"
175
+ },
176
+ properties: { "attr.aria-invalid": "invalid() ? 'true' : null" }
177
+ },
178
+ providers: [{
179
+ provide: NG_VALUE_ACCESSOR,
180
+ useExisting: forwardRef(() => RunicFieldDirective),
181
+ multi: true
182
+ }, {
183
+ provide: NG_VALIDATORS,
184
+ useExisting: forwardRef(() => RunicFieldDirective),
185
+ multi: true
186
+ }],
187
+ ngImport: i0
188
+ });
189
+ };
190
+ i0.ɵɵngDeclareClassMetadata({
191
+ minVersion: "12.0.0",
192
+ version: "22.2.3",
193
+ ngImport: i0,
194
+ type: RunicFieldDirective,
195
+ decorators: [{
196
+ type: Directive,
197
+ args: [{
198
+ selector: "[runicField]",
199
+ standalone: true,
200
+ providers: [{
201
+ provide: NG_VALUE_ACCESSOR,
202
+ useExisting: forwardRef(() => RunicFieldDirective),
203
+ multi: true
204
+ }, {
205
+ provide: NG_VALIDATORS,
206
+ useExisting: forwardRef(() => RunicFieldDirective),
207
+ multi: true
208
+ }],
209
+ host: {
210
+ "(input)": "onInput()",
211
+ "(change)": "onChange()",
212
+ "(compositionstart)": "onCompositionStart()",
213
+ "(compositionend)": "onCompositionEnd()",
214
+ "(blur)": "onBlur()",
215
+ "[attr.aria-invalid]": "invalid() ? 'true' : null"
216
+ }
217
+ }]
218
+ }],
219
+ ctorParameters: () => [],
220
+ propDecorators: { runicField: [{
221
+ type: i0.Input,
222
+ args: [{
223
+ isSignal: true,
224
+ alias: "runicField",
225
+ required: true
226
+ }]
227
+ }] }
228
+ });
229
+ function runicFieldModel(handle) {
230
+ const model = linkedSignal(() => handle.value(), ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
231
+ model.set = (value) => handle.input(value);
232
+ model.update = (update) => handle.input(update(untracked(handle.value)));
233
+ return model;
234
+ }
235
+ function validateRunicField(path, handle) {
236
+ validate(path, () => {
237
+ const errors = handle.errors();
238
+ return errors.length === 0 ? void 0 : errors.map((message) => ({
239
+ kind: "runic",
240
+ message
241
+ }));
242
+ });
243
+ }
244
+ export { RunicFieldDirective, runicFieldModel, validateRunicField };
245
+
246
+ //# sourceMappingURL=runic-artifex-angular-forms.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runic-artifex-angular-forms.mjs","names":[],"sources":["../../src/forms/runic-field.directive.ts","../../src/forms/signal-forms.ts"],"sourcesContent":["import { afterRenderEffect, computed, Directive, effect, ElementRef, forwardRef, inject, Injector, input, untracked } from \"@angular/core\";\nimport {\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n NgControl,\n type AbstractControl,\n type ControlValueAccessor,\n type ValidationErrors,\n type Validator,\n} from \"@angular/forms\";\nimport type { FieldHandle } from \"@runic-artifex/angular\";\n\ntype Wiring = \"text\" | \"checkbox\" | \"radio\" | \"select\";\n\n// No control synced yet: the first `writeValue` of a control is its setup, not a change by the form.\nconst unsynced: unique symbol = Symbol(\"unsynced\");\n\n/**\n * Wires an `<input>`, `<textarea>` or `<select>` to an {@link injectField} handle: `<input [runicField]=\"title\">`.\n *\n * Alone, it writes what the user types (`input`; `change` for checkboxes, radios and selects), holds writes during IME\n * composition, commits on blur, keeps the element's `value` (or `checked`) equal to the field without moving the\n * caret, and sets `aria-invalid` while the field has an `error` or `errors`.\n *\n * It is also the `ControlValueAccessor` and `Validator` of a `formControl` or `formControlName` on the same element:\n * the View's value flows into the control without marking it dirty or emitting `valueChanges`, the user's input\n * reaches it as usual, `patchValue` and `reset` write through to the View when they change the value, `disable()`\n * disables the element, and the control is invalid with `{ runic: errors }` while the View reports `errors`.\n */\n@Directive({\n selector: \"[runicField]\",\n standalone: true,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => RunicFieldDirective), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => RunicFieldDirective), multi: true },\n ],\n host: {\n \"(input)\": \"onInput()\",\n \"(change)\": \"onChange()\",\n \"(compositionstart)\": \"onCompositionStart()\",\n \"(compositionend)\": \"onCompositionEnd()\",\n \"(blur)\": \"onBlur()\",\n \"[attr.aria-invalid]\": \"invalid() ? 'true' : null\",\n },\n})\nexport class RunicFieldDirective implements ControlValueAccessor, Validator {\n /** The field to wire, from {@link injectField}. */\n readonly runicField = input.required<FieldHandle<unknown>>();\n\n protected readonly invalid = computed(() => {\n const field = this.runicField();\n return field.error() !== undefined || field.errors().length !== 0;\n });\n\n private readonly element = inject<ElementRef<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>>(ElementRef).nativeElement;\n // NgControl injects this directive as its accessor, so it is looked up when needed rather than injected.\n private readonly injector = inject(Injector);\n private composing = false;\n private changed: ((value: unknown) => void) | undefined;\n private touched: (() => void) | undefined;\n private validatorChanged: (() => void) | undefined;\n private validated: readonly string[] | undefined;\n private synced: AbstractControl | undefined | typeof unsynced = unsynced;\n\n constructor() {\n afterRenderEffect({\n write: () => {\n const field = this.runicField();\n const value = field.value();\n const text = field.text();\n if (this.composing) return;\n const element = this.element;\n switch (this.wiring()) {\n case \"checkbox\": {\n const checkbox = element as HTMLInputElement;\n if (checkbox.checked !== (value === true)) checkbox.checked = value === true;\n checkbox.indeterminate = value === null || value === undefined;\n break;\n }\n case \"radio\": {\n const radio = element as HTMLInputElement;\n if (radio.checked !== (radio.value === text)) radio.checked = radio.value === text;\n break;\n }\n default:\n // Only a changed value is assigned, which keeps the caret where it is.\n if (element.value !== text) element.value = text;\n }\n },\n });\n // The View's value, and the user's while a draft exists, flows into the control without dirtying it.\n effect(() => {\n this.runicField().value();\n untracked(() => this.syncControl());\n });\n effect(() => {\n const errors = this.runicField().errors();\n untracked(() => {\n if (this.validated !== undefined && errors !== this.validated) this.validatorChanged?.();\n });\n });\n }\n\n private wiring(): Wiring {\n const element = this.element;\n if (element.tagName === \"SELECT\") return \"select\";\n if (element.tagName === \"INPUT\") {\n const type = (element as HTMLInputElement).type;\n if (type === \"checkbox\" || type === \"radio\") return type;\n }\n return \"text\";\n }\n\n private control(): AbstractControl | undefined {\n return this.injector.get(NgControl, null, { self: true, optional: true })?.control ?? undefined;\n }\n\n private syncControl(): void {\n const control = this.control();\n if (control === undefined) return;\n this.synced = control;\n const value = this.runicField().value();\n if (!Object.is(control.value, value)) control.setValue(value, { emitEvent: false, emitModelToViewChange: false });\n }\n\n private changedByUser(): void {\n this.changed?.(this.runicField().value());\n }\n\n protected onInput(): void {\n if (this.wiring() !== \"text\") return;\n this.runicField().inputText(this.element.value);\n if (!this.composing) this.changedByUser();\n }\n\n protected onChange(): void {\n const field = this.runicField();\n switch (this.wiring()) {\n case \"checkbox\": field.input((this.element as HTMLInputElement).checked); break;\n case \"radio\": if (!(this.element as HTMLInputElement).checked) return; field.inputText(this.element.value); break;\n case \"select\": field.inputText(this.element.value); break;\n default: return;\n }\n this.changedByUser();\n }\n\n protected onCompositionStart(): void {\n this.composing = true;\n this.runicField().compositionStart();\n }\n\n protected onCompositionEnd(): void {\n this.composing = false;\n this.runicField().compositionEnd(this.element.value);\n this.changedByUser();\n }\n\n protected onBlur(): void {\n void this.runicField().commit();\n this.touched?.();\n }\n\n /** A value set by the form (`setValue`, `patchValue`, `reset`): written to the View when it differs from the field's. */\n writeValue(value: unknown): void {\n const control = this.control();\n // Setting up a control writes its value first: the View's value is the one to keep.\n if (this.changed === undefined || control !== this.synced) {\n queueMicrotask(() => this.syncControl());\n return;\n }\n const field = this.runicField();\n if (Object.is(value, untracked(field.value))) return;\n if ((value === null || value === undefined) && !field.field.nullable) {\n // `reset()` of a nullable control: a non-nullable field keeps its value, and the control shows it again.\n queueMicrotask(() => this.syncControl());\n return;\n }\n field.input(value);\n }\n\n registerOnChange(fn: (value: unknown) => void): void { this.changed = fn; }\n\n registerOnTouched(fn: () => void): void { this.touched = fn; }\n\n setDisabledState(disabled: boolean): void { this.element.disabled = disabled; }\n\n /** `{ runic: errors }` while the View reports validation messages for the field. */\n validate(_control?: AbstractControl): ValidationErrors | null {\n const errors = untracked(this.runicField().errors);\n this.validated = errors;\n return errors.length === 0 ? null : { runic: errors };\n }\n\n registerOnValidatorChange(fn: () => void): void { this.validatorChanged = fn; }\n}\n","import { linkedSignal, untracked, type WritableSignal } from \"@angular/core\";\nimport { validate, type PathKind, type SchemaPath, type SchemaPathRules, type ValidationError } from \"@angular/forms/signals\";\nimport type { FieldHandle } from \"@runic-artifex/angular\";\n\n/**\n * A `WritableSignal` over an {@link injectField} handle, for a Signal Forms `form()`: it reads the field's `value`,\n * and `set` and `update` write through the field (`input`), so the form's `[formField]` edits the View.\n *\n * ```ts\n * readonly title = injectField(this.editor, EditorFields.title);\n * readonly titleForm = form(runicFieldModel(this.title), path => validateRunicField(path, this.title));\n * // <input [formField]=\"titleForm\" (blur)=\"title.commit()\">\n * ```\n */\nexport function runicFieldModel<TValue>(handle: FieldHandle<TValue>): WritableSignal<TValue> {\n const model = linkedSignal(() => handle.value());\n model.set = value => handle.input(value);\n model.update = update => handle.input(update(untracked(handle.value)));\n return model;\n}\n\n/**\n * Adds the field's validation messages (`errors()`) to a Signal Forms schema path as errors of kind `runic`, each\n * with its message.\n */\nexport function validateRunicField<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n handle: Pick<FieldHandle<unknown>, \"errors\">,\n): void {\n validate(path, () => {\n const errors = handle.errors();\n return errors.length === 0 ? undefined : errors.map((message): ValidationError.WithoutFieldTree => ({ kind: \"runic\", message }));\n });\n}\n"],"mappings":";;;;AAeA,MAAM,WAA0B,OAAO,UAAU;AA8BjD,IAAa,sBAAb,MAAa,oBAAmB;CAErB,aAAa,MAAM,SAAgC,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAEzC,UAAU,eAAc;EACzC,MAAM,QAAQ,KAAK,WAAU;EAC7B,OAAO,MAAM,MAAK,MAAO,UAAa,MAAM,OAAM,CAAE,CAAC,WAAW;CAClE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+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