@wirekyt/angular 0.0.32 → 0.0.34

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 (43) hide show
  1. package/dist/fesm2022/wirekyt-angular-field.mjs +1 -1
  2. package/dist/fesm2022/wirekyt-angular-field.mjs.map +1 -1
  3. package/dist/fesm2022/wirekyt-angular-image-cropper.mjs +336 -0
  4. package/dist/fesm2022/wirekyt-angular-image-cropper.mjs.map +1 -0
  5. package/dist/fesm2022/wirekyt-angular-json-tree-view.mjs +768 -0
  6. package/dist/fesm2022/wirekyt-angular-json-tree-view.mjs.map +1 -0
  7. package/dist/fesm2022/wirekyt-angular-marquee.mjs +296 -0
  8. package/dist/fesm2022/wirekyt-angular-marquee.mjs.map +1 -0
  9. package/dist/fesm2022/wirekyt-angular-navigation-menu.mjs +777 -0
  10. package/dist/fesm2022/wirekyt-angular-navigation-menu.mjs.map +1 -0
  11. package/dist/fesm2022/wirekyt-angular-pagination.mjs +321 -0
  12. package/dist/fesm2022/wirekyt-angular-pagination.mjs.map +1 -0
  13. package/dist/fesm2022/wirekyt-angular-portal.mjs +98 -0
  14. package/dist/fesm2022/wirekyt-angular-portal.mjs.map +1 -0
  15. package/dist/fesm2022/wirekyt-angular-qr-code.mjs +308 -0
  16. package/dist/fesm2022/wirekyt-angular-qr-code.mjs.map +1 -0
  17. package/dist/fesm2022/wirekyt-angular-tree-view.mjs +858 -0
  18. package/dist/fesm2022/wirekyt-angular-tree-view.mjs.map +1 -0
  19. package/dist/fesm2022/wirekyt-angular.mjs +12 -4
  20. package/dist/fesm2022/wirekyt-angular.mjs.map +1 -1
  21. package/dist/package.json +33 -1
  22. package/dist/types/wirekyt-angular-checkbox.d.ts +1 -1
  23. package/dist/types/wirekyt-angular-color-picker.d.ts +1 -1
  24. package/dist/types/wirekyt-angular-combobox.d.ts +1 -1
  25. package/dist/types/wirekyt-angular-date-picker.d.ts +1 -1
  26. package/dist/types/wirekyt-angular-image-cropper.d.ts +122 -0
  27. package/dist/types/wirekyt-angular-image-cropper.d.ts.map +1 -0
  28. package/dist/types/wirekyt-angular-json-tree-view.d.ts +173 -0
  29. package/dist/types/wirekyt-angular-json-tree-view.d.ts.map +1 -0
  30. package/dist/types/wirekyt-angular-marquee.d.ts +111 -0
  31. package/dist/types/wirekyt-angular-marquee.d.ts.map +1 -0
  32. package/dist/types/wirekyt-angular-navigation-menu.d.ts +187 -0
  33. package/dist/types/wirekyt-angular-navigation-menu.d.ts.map +1 -0
  34. package/dist/types/wirekyt-angular-pagination.d.ts +114 -0
  35. package/dist/types/wirekyt-angular-pagination.d.ts.map +1 -0
  36. package/dist/types/wirekyt-angular-portal.d.ts +30 -0
  37. package/dist/types/wirekyt-angular-portal.d.ts.map +1 -0
  38. package/dist/types/wirekyt-angular-qr-code.d.ts +109 -0
  39. package/dist/types/wirekyt-angular-qr-code.d.ts.map +1 -0
  40. package/dist/types/wirekyt-angular-tree-view.d.ts +278 -0
  41. package/dist/types/wirekyt-angular-tree-view.d.ts.map +1 -0
  42. package/dist/types/wirekyt-angular.d.ts +1 -1
  43. package/package.json +34 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-portal.mjs","sources":["../../src/components/portal/portal.ts","../../src/components/portal/wirekyt-angular-portal.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n type EmbeddedViewRef,\n Injector,\n type TemplateRef,\n ViewContainerRef,\n afterNextRender,\n booleanAttribute,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { injectEnvironment } from \"@wirekyt/angular\";\n\nexport interface PortalProps {\n disabled?: boolean | undefined;\n container?: HTMLElement | null | undefined;\n originInjector?: Injector | null;\n}\n\n@Component({\n selector: \"portal\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: \"display: contents\" },\n template: `\n <ng-template #content>\n <ng-content></ng-content>\n </ng-template>\n `,\n})\nexport class Portal {\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly container = input<PortalProps[\"container\"]>(undefined);\n readonly originInjector = input<PortalProps[\"originInjector\"]>(undefined);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly vcRef = inject(ViewContainerRef);\n private readonly contentTpl = viewChild.required<TemplateRef<unknown>>(\"content\");\n private readonly elementInjector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly environment = injectEnvironment();\n private readonly view = signal<EmbeddedViewRef<unknown> | null>(null);\n private parkingFragment: DocumentFragment | undefined;\n\n constructor() {\n afterNextRender(() => {\n const view = this.vcRef.createEmbeddedView(this.contentTpl(), undefined, {\n injector: this.originInjector() ?? this.elementInjector,\n });\n view.detectChanges();\n this.view.set(view);\n this.destroyRef.onDestroy(() => {\n for (const node of view.rootNodes as Node[]) {\n node.parentNode?.removeChild(node);\n }\n view.destroy();\n });\n });\n\n effect(() => {\n const view = this.view();\n if (!view) return;\n const mountNode = this.resolveContainer(view);\n if (!mountNode) return;\n for (const node of view.rootNodes as Node[]) {\n mountNode.appendChild(node);\n }\n });\n }\n\n private resolveContainer(view: EmbeddedViewRef<unknown>): HTMLElement | DocumentFragment | null {\n if (this.disabled()) return this.host.nativeElement;\n const container = this.container();\n if (container) return container;\n const root = this.environment.getRootNode();\n if (!root) return this.getParkingFragment(view);\n if (\"body\" in root) return root.body;\n return root;\n }\n\n private getParkingFragment(view: EmbeddedViewRef<unknown>): DocumentFragment | null {\n if (this.parkingFragment) return this.parkingFragment;\n const ownerDocument =\n (view.rootNodes as Node[]).find((node) => node.ownerDocument)?.ownerDocument ??\n this.environment.getRootNode()?.ownerDocument ??\n null;\n if (!ownerDocument) return null;\n this.parkingFragment = ownerDocument.createDocumentFragment();\n return this.parkingFragment;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAoCa,MAAM,CAAA;IACR,QAAQ,GAAG,KAAK,CAAC,KAAK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,EAAE,KAAK,EAAE,mBAAmB,EAAE;AACpC,oBAAA,QAAQ,EAAE;;;;AAIT,EAAA,CAAA;AACF,iBAAA;gZAQwE,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC3ClF;;AAEG;;;;"}
@@ -0,0 +1,308 @@
1
+ import * as qrCode from '@wirekyt/dom/machines/qr-code';
2
+ export { anatomy as qrCodeAnatomy } from '@wirekyt/dom/machines/qr-code';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, inject, input, model, output, DestroyRef, Renderer2, ElementRef, forwardRef, Directive, computed, effect, TemplateRef, ViewContainerRef } from '@angular/core';
5
+ import { injectLocale, injectEnvironment, createId, useMachine, bindProps } from '@wirekyt/angular';
6
+
7
+ const QR_CODE_CONTEXT = new InjectionToken("WIREKYT.QR_CODE_CONTEXT");
8
+ function injectQrCodeContext() {
9
+ return inject(QR_CODE_CONTEXT);
10
+ }
11
+
12
+ function useQrCode(options) {
13
+ const locale = injectLocale();
14
+ const environment = injectEnvironment();
15
+ const fallbackId = createId();
16
+ return useMachine({
17
+ machine: qrCode.machine,
18
+ context: () => {
19
+ const props = options.context();
20
+ return {
21
+ ...props,
22
+ dir: locale.dir,
23
+ getRootNode: environment.getRootNode,
24
+ id: props.id ?? fallbackId,
25
+ };
26
+ },
27
+ connect: (service, normalize) => qrCode.connect(service, normalize),
28
+ });
29
+ }
30
+
31
+ class QrCodeRoot {
32
+ /** The unique identifier of the QR code. */
33
+ id = input(undefined, /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
35
+ /** The ids of the QR code elements. Useful for composition. */
36
+ ids = input(undefined, /* @ts-ignore */
37
+ ...(ngDevMode ? [{ debugName: "ids" }] : /* istanbul ignore next */ []));
38
+ /** The controlled value to encode. */
39
+ value = model(undefined, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
41
+ /** The initial value to encode when uncontrolled. */
42
+ defaultValue = input(undefined, /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
44
+ /** The QR code encoding options. */
45
+ encoding = input(undefined, /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "encoding" }] : /* istanbul ignore next */ []));
47
+ /** The pixel size of the QR code. */
48
+ pixelSize = input(undefined, /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "pixelSize" }] : /* istanbul ignore next */ []));
50
+ /** Details emitted when the encoded value changes. */
51
+ valueDetailsChange = output();
52
+ machine = useQrCode({
53
+ context: () => ({
54
+ id: this.id(),
55
+ ids: this.ids(),
56
+ value: this.value(),
57
+ defaultValue: this.defaultValue(),
58
+ encoding: this.encoding(),
59
+ pixelSize: this.pixelSize(),
60
+ onValueChange: (details) => {
61
+ if (this.value() !== details.value)
62
+ this.value.set(details.value);
63
+ this.valueDetailsChange.emit(details);
64
+ },
65
+ }),
66
+ });
67
+ state = this.machine.state;
68
+ api = this.machine.api;
69
+ service = this.machine.service;
70
+ send = this.machine.send;
71
+ constructor() {
72
+ bindProps({
73
+ elementRef: inject(ElementRef),
74
+ renderer: inject(Renderer2),
75
+ destroyRef: inject(DestroyRef),
76
+ props: () => this.api().getRootProps(),
77
+ });
78
+ }
79
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
80
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: QrCodeRoot, isStandalone: true, selector: "[qr-code-root]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ids: { classPropertyName: "ids", 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 }, encoding: { classPropertyName: "encoding", publicName: "encoding", isSignal: true, isRequired: false, transformFunction: null }, pixelSize: { classPropertyName: "pixelSize", publicName: "pixelSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueDetailsChange: "valueDetailsChange" }, providers: [{ provide: QR_CODE_CONTEXT, useExisting: forwardRef(() => QrCodeRoot) }], exportAs: ["qrCodeRoot"], ngImport: i0 });
81
+ }
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeRoot, decorators: [{
83
+ type: Directive,
84
+ args: [{
85
+ selector: "[qr-code-root]",
86
+ standalone: true,
87
+ exportAs: "qrCodeRoot",
88
+ providers: [{ provide: QR_CODE_CONTEXT, useExisting: forwardRef(() => QrCodeRoot) }],
89
+ }]
90
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ids: [{ 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 }] }], encoding: [{ type: i0.Input, args: [{ isSignal: true, alias: "encoding", required: false }] }], pixelSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pixelSize", required: false }] }], valueDetailsChange: [{ type: i0.Output, args: ["valueDetailsChange"] }] } });
91
+
92
+ class QrCodeRootProvider {
93
+ /** The QR code machine returned by useQrCode(). */
94
+ value = input.required(/* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
96
+ state = computed(() => this.value().state(), /* @ts-ignore */
97
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
98
+ api = computed(() => this.value().api(), /* @ts-ignore */
99
+ ...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
100
+ send = (event) => this.value().send(event);
101
+ get service() {
102
+ return this.value().service;
103
+ }
104
+ resolveValue() {
105
+ return this.value();
106
+ }
107
+ constructor() {
108
+ bindProps({
109
+ elementRef: inject(ElementRef),
110
+ renderer: inject(Renderer2),
111
+ destroyRef: inject(DestroyRef),
112
+ props: () => this.api().getRootProps(),
113
+ });
114
+ }
115
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeRootProvider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
116
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: QrCodeRootProvider, isStandalone: true, selector: "[qr-code-root-provider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: QR_CODE_CONTEXT, useExisting: forwardRef(() => QrCodeRootProvider) }], exportAs: ["qrCodeRootProvider"], ngImport: i0 });
117
+ }
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeRootProvider, decorators: [{
119
+ type: Directive,
120
+ args: [{
121
+ selector: "[qr-code-root-provider]",
122
+ standalone: true,
123
+ exportAs: "qrCodeRootProvider",
124
+ providers: [{ provide: QR_CODE_CONTEXT, useExisting: forwardRef(() => QrCodeRootProvider) }],
125
+ }]
126
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
127
+
128
+ const SVG_ATTRIBUTE_KEYS = new Set(["d", "viewBox", "xmlns"]);
129
+ function omitQrCodeSvgAttributes(props) {
130
+ const next = { ...props };
131
+ for (const key of SVG_ATTRIBUTE_KEYS) {
132
+ delete next[key];
133
+ }
134
+ return next;
135
+ }
136
+ function applyQrCodeSvgAttributes(elementRef, renderer, destroyRef, props) {
137
+ const applied = new Set();
138
+ effect(() => {
139
+ const next = props() ?? {};
140
+ for (const key of SVG_ATTRIBUTE_KEYS) {
141
+ const value = next[key];
142
+ if (value == null || value === false) {
143
+ if (applied.has(key)) {
144
+ renderer.removeAttribute(elementRef.nativeElement, key);
145
+ applied.delete(key);
146
+ }
147
+ continue;
148
+ }
149
+ renderer.setAttribute(elementRef.nativeElement, key, String(value));
150
+ applied.add(key);
151
+ }
152
+ });
153
+ destroyRef.onDestroy(() => {
154
+ for (const key of applied) {
155
+ renderer.removeAttribute(elementRef.nativeElement, key);
156
+ }
157
+ applied.clear();
158
+ });
159
+ }
160
+
161
+ class QrCodeFrame {
162
+ constructor() {
163
+ const context = injectQrCodeContext();
164
+ const elementRef = inject(ElementRef);
165
+ const renderer = inject(Renderer2);
166
+ const destroyRef = inject(DestroyRef);
167
+ const props = () => context.api().getFrameProps();
168
+ bindProps({
169
+ elementRef: elementRef,
170
+ renderer,
171
+ destroyRef,
172
+ props: () => omitQrCodeSvgAttributes(props()),
173
+ });
174
+ applyQrCodeSvgAttributes(elementRef, renderer, destroyRef, props);
175
+ }
176
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeFrame, deps: [], target: i0.ɵɵFactoryTarget.Directive });
177
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: QrCodeFrame, isStandalone: true, selector: "svg[qr-code-frame]", exportAs: ["qrCodeFrame"], ngImport: i0 });
178
+ }
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeFrame, decorators: [{
180
+ type: Directive,
181
+ args: [{
182
+ selector: "svg[qr-code-frame]",
183
+ standalone: true,
184
+ exportAs: "qrCodeFrame",
185
+ }]
186
+ }], ctorParameters: () => [] });
187
+
188
+ class QrCodePattern {
189
+ constructor() {
190
+ const context = injectQrCodeContext();
191
+ const elementRef = inject(ElementRef);
192
+ const renderer = inject(Renderer2);
193
+ const destroyRef = inject(DestroyRef);
194
+ const props = () => context.api().getPatternProps();
195
+ bindProps({
196
+ elementRef: elementRef,
197
+ renderer,
198
+ destroyRef,
199
+ props: () => omitQrCodeSvgAttributes(props()),
200
+ });
201
+ applyQrCodeSvgAttributes(elementRef, renderer, destroyRef, props);
202
+ }
203
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodePattern, deps: [], target: i0.ɵɵFactoryTarget.Directive });
204
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: QrCodePattern, isStandalone: true, selector: "path[qr-code-pattern]", exportAs: ["qrCodePattern"], ngImport: i0 });
205
+ }
206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodePattern, decorators: [{
207
+ type: Directive,
208
+ args: [{
209
+ selector: "path[qr-code-pattern]",
210
+ standalone: true,
211
+ exportAs: "qrCodePattern",
212
+ }]
213
+ }], ctorParameters: () => [] });
214
+
215
+ class QrCodeOverlay {
216
+ constructor() {
217
+ const context = injectQrCodeContext();
218
+ bindProps({
219
+ elementRef: inject(ElementRef),
220
+ renderer: inject(Renderer2),
221
+ destroyRef: inject(DestroyRef),
222
+ props: () => context.api().getOverlayProps(),
223
+ });
224
+ }
225
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeOverlay, deps: [], target: i0.ɵɵFactoryTarget.Directive });
226
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: QrCodeOverlay, isStandalone: true, selector: "[qr-code-overlay]", exportAs: ["qrCodeOverlay"], ngImport: i0 });
227
+ }
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeOverlay, decorators: [{
229
+ type: Directive,
230
+ args: [{
231
+ selector: "[qr-code-overlay]",
232
+ standalone: true,
233
+ exportAs: "qrCodeOverlay",
234
+ }]
235
+ }], ctorParameters: () => [] });
236
+
237
+ class QrCodeDownloadTrigger {
238
+ /** The mime type of the image. */
239
+ mimeType = input.required(/* @ts-ignore */
240
+ ...(ngDevMode ? [{ debugName: "mimeType" }] : /* istanbul ignore next */ []));
241
+ /** The quality of the image. */
242
+ quality = input(undefined, /* @ts-ignore */
243
+ ...(ngDevMode ? [{ debugName: "quality" }] : /* istanbul ignore next */ []));
244
+ /** The name of the file. */
245
+ fileName = input.required(/* @ts-ignore */
246
+ ...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
247
+ constructor() {
248
+ const context = injectQrCodeContext();
249
+ bindProps({
250
+ elementRef: inject(ElementRef),
251
+ renderer: inject(Renderer2),
252
+ destroyRef: inject(DestroyRef),
253
+ props: () => context.api().getDownloadTriggerProps({
254
+ mimeType: this.mimeType(),
255
+ quality: this.quality(),
256
+ fileName: this.fileName(),
257
+ }),
258
+ });
259
+ }
260
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeDownloadTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
261
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: QrCodeDownloadTrigger, isStandalone: true, selector: "button[qr-code-download-trigger]", inputs: { mimeType: { classPropertyName: "mimeType", publicName: "mimeType", isSignal: true, isRequired: true, transformFunction: null }, quality: { classPropertyName: "quality", publicName: "quality", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["qrCodeDownloadTrigger"], ngImport: i0 });
262
+ }
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeDownloadTrigger, decorators: [{
264
+ type: Directive,
265
+ args: [{
266
+ selector: "button[qr-code-download-trigger]",
267
+ standalone: true,
268
+ exportAs: "qrCodeDownloadTrigger",
269
+ }]
270
+ }], ctorParameters: () => [], propDecorators: { mimeType: [{ type: i0.Input, args: [{ isSignal: true, alias: "mimeType", required: true }] }], quality: [{ type: i0.Input, args: [{ isSignal: true, alias: "quality", required: false }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: true }] }] } });
271
+
272
+ class QrCodeContext {
273
+ static ngTemplateContextGuard(_directive, context) {
274
+ void context;
275
+ return true;
276
+ }
277
+ qrCode = injectQrCodeContext();
278
+ templateRef = inject(TemplateRef);
279
+ viewContainer = inject(ViewContainerRef);
280
+ constructor() {
281
+ const view = this.viewContainer.createEmbeddedView(this.templateRef, {
282
+ $implicit: this.qrCode.api,
283
+ api: this.qrCode.api,
284
+ });
285
+ effect(() => {
286
+ this.qrCode.api();
287
+ view.detectChanges();
288
+ });
289
+ inject(DestroyRef).onDestroy(() => view.destroy());
290
+ }
291
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
292
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: QrCodeContext, isStandalone: true, selector: "[qr-code-context]", exportAs: ["qrCodeContext"], ngImport: i0 });
293
+ }
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QrCodeContext, decorators: [{
295
+ type: Directive,
296
+ args: [{
297
+ selector: "[qr-code-context]",
298
+ standalone: true,
299
+ exportAs: "qrCodeContext",
300
+ }]
301
+ }], ctorParameters: () => [] });
302
+
303
+ /**
304
+ * Generated bundle index. Do not edit.
305
+ */
306
+
307
+ export { QR_CODE_CONTEXT, QrCodeContext, QrCodeDownloadTrigger, QrCodeFrame, QrCodeOverlay, QrCodePattern, QrCodeRoot, QrCodeRootProvider, injectQrCodeContext, useQrCode };
308
+ //# sourceMappingURL=wirekyt-angular-qr-code.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-qr-code.mjs","sources":["../../src/components/qr-code/use-context.ts","../../src/components/qr-code/use.ts","../../src/components/qr-code/root.ts","../../src/components/qr-code/root-provider.ts","../../src/components/qr-code/svg-props.ts","../../src/components/qr-code/frame.ts","../../src/components/qr-code/pattern.ts","../../src/components/qr-code/overlay.ts","../../src/components/qr-code/download-trigger.ts","../../src/components/qr-code/context.ts","../../src/components/qr-code/wirekyt-angular-qr-code.ts"],"sourcesContent":["import { InjectionToken, inject } from \"@angular/core\";\n\nimport type { UseQrCodeReturn } from \"./use\";\n\nexport const QR_CODE_CONTEXT = new InjectionToken<UseQrCodeReturn>(\"WIREKYT.QR_CODE_CONTEXT\");\n\nexport function injectQrCodeContext(): UseQrCodeReturn {\n return inject(QR_CODE_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 * as qrCode from \"@wirekyt/dom/machines/qr-code\";\n\ntype OptionalId<T extends { id: string }> = Omit<T, \"id\"> & { id?: string };\n\nexport interface UseQrCodeProps extends OptionalId<Omit<qrCode.Props, \"dir\" | \"getRootNode\">> {}\n\nexport type UseQrCodeReturn = UseMachineReturn<qrCode.Service[\"state\"], qrCode.Api, qrCode.Service>;\n\nexport interface UseQrCodeOptions {\n context: () => UseQrCodeProps;\n}\n\ntype QrCodeContext = Record<string, unknown>;\ntype QrCodeSchema = qrCode.Machine extends Machine<infer TSchema> ? TSchema : never;\n\nexport function useQrCode(options: UseQrCodeOptions): UseQrCodeReturn {\n const locale = injectLocale();\n const environment = injectEnvironment();\n const fallbackId = createId();\n\n return useMachine<QrCodeSchema, qrCode.Api>({\n machine: qrCode.machine,\n context: () => {\n const props = options.context();\n return {\n ...props,\n dir: locale.dir,\n getRootNode: environment.getRootNode,\n id: props.id ?? fallbackId,\n } as QrCodeContext;\n },\n connect: (service, normalize) => qrCode.connect(service, normalize),\n });\n}\n","import type * as qrCode from \"@wirekyt/dom/machines/qr-code\";\n\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n forwardRef,\n inject,\n input,\n model,\n output,\n type InputSignal,\n type ModelSignal,\n type OutputEmitterRef,\n type Signal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { QrCodeElementIds, QrCodeGenerateOptions, QrCodeValueChangeDetails } from \"./types\";\n\nimport { useQrCode, type UseQrCodeReturn } from \"./use\";\nimport { QR_CODE_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[qr-code-root]\",\n standalone: true,\n exportAs: \"qrCodeRoot\",\n providers: [{ provide: QR_CODE_CONTEXT, useExisting: forwardRef(() => QrCodeRoot) }],\n})\nexport class QrCodeRoot implements UseQrCodeReturn {\n /** The unique identifier of the QR code. */\n readonly id: InputSignal<string | undefined> = input<string | undefined>(undefined);\n /** The ids of the QR code elements. Useful for composition. */\n readonly ids: InputSignal<QrCodeElementIds | undefined> = input<QrCodeElementIds | undefined>(\n undefined,\n );\n /** The controlled value to encode. */\n readonly value: ModelSignal<string | undefined> = model<string | undefined>(undefined);\n /** The initial value to encode when uncontrolled. */\n readonly defaultValue: InputSignal<string | undefined> = input<string | undefined>(undefined);\n /** The QR code encoding options. */\n readonly encoding: InputSignal<QrCodeGenerateOptions | undefined> = input<\n QrCodeGenerateOptions | undefined\n >(undefined);\n /** The pixel size of the QR code. */\n readonly pixelSize: InputSignal<number | undefined> = input<number | undefined>(undefined);\n /** Details emitted when the encoded value changes. */\n readonly valueDetailsChange: OutputEmitterRef<QrCodeValueChangeDetails> =\n output<QrCodeValueChangeDetails>();\n\n private readonly machine = useQrCode({\n context: () => ({\n id: this.id(),\n ids: this.ids(),\n value: this.value(),\n defaultValue: this.defaultValue(),\n encoding: this.encoding(),\n pixelSize: this.pixelSize(),\n onValueChange: (details) => {\n if (this.value() !== details.value) this.value.set(details.value);\n this.valueDetailsChange.emit(details);\n },\n }),\n });\n\n readonly state: Signal<qrCode.Service[\"state\"]> = this.machine.state;\n readonly api: Signal<qrCode.Api> = this.machine.api;\n readonly service: qrCode.Service = this.machine.service;\n readonly send: qrCode.Service[\"send\"] = this.machine.send;\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.api().getRootProps(),\n });\n }\n}\n","import type * as qrCode from \"@wirekyt/dom/machines/qr-code\";\n\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n type InputSignal,\n type Signal,\n computed,\n forwardRef,\n inject,\n input,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { UseQrCodeReturn } from \"./use\";\n\nimport { QR_CODE_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[qr-code-root-provider]\",\n standalone: true,\n exportAs: \"qrCodeRootProvider\",\n providers: [{ provide: QR_CODE_CONTEXT, useExisting: forwardRef(() => QrCodeRootProvider) }],\n})\nexport class QrCodeRootProvider implements UseQrCodeReturn {\n /** The QR code machine returned by useQrCode(). */\n readonly value: InputSignal<UseQrCodeReturn> = input.required<UseQrCodeReturn>();\n readonly state: Signal<qrCode.Service[\"state\"]> = computed(() => this.value().state());\n readonly api: Signal<qrCode.Api> = computed(() => this.value().api());\n readonly send: qrCode.Service[\"send\"] = (event) => this.value().send(event);\n\n get service(): qrCode.Service {\n return this.value().service;\n }\n\n resolveValue(): UseQrCodeReturn {\n return this.value();\n }\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.api().getRootProps(),\n });\n }\n}\n","import { type DestroyRef, type ElementRef, type Renderer2, effect } from \"@angular/core\";\n\nconst SVG_ATTRIBUTE_KEYS = new Set([\"d\", \"viewBox\", \"xmlns\"]);\n\nexport function omitQrCodeSvgAttributes(props: Record<string, unknown>): Record<string, unknown> {\n const next = { ...props };\n for (const key of SVG_ATTRIBUTE_KEYS) {\n delete next[key];\n }\n return next;\n}\n\nexport function applyQrCodeSvgAttributes(\n elementRef: ElementRef<SVGElement>,\n renderer: Renderer2,\n destroyRef: DestroyRef,\n props: () => Record<string, unknown> | undefined,\n): void {\n const applied = new Set<string>();\n\n effect(() => {\n const next = props() ?? {};\n for (const key of SVG_ATTRIBUTE_KEYS) {\n const value = next[key];\n if (value == null || value === false) {\n if (applied.has(key)) {\n renderer.removeAttribute(elementRef.nativeElement, key);\n applied.delete(key);\n }\n continue;\n }\n renderer.setAttribute(elementRef.nativeElement, key, String(value));\n applied.add(key);\n }\n });\n\n destroyRef.onDestroy(() => {\n for (const key of applied) {\n renderer.removeAttribute(elementRef.nativeElement, key);\n }\n applied.clear();\n });\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { applyQrCodeSvgAttributes, omitQrCodeSvgAttributes } from \"./svg-props\";\nimport { injectQrCodeContext } from \"./use-context\";\n\n@Directive({\n selector: \"svg[qr-code-frame]\",\n standalone: true,\n exportAs: \"qrCodeFrame\",\n})\nexport class QrCodeFrame {\n constructor() {\n const context = injectQrCodeContext();\n const elementRef = inject<ElementRef<SVGSVGElement>>(ElementRef);\n const renderer = inject(Renderer2);\n const destroyRef = inject(DestroyRef);\n const props = () => context.api().getFrameProps() as Record<string, unknown>;\n\n bindProps({\n elementRef: elementRef as unknown as ElementRef<HTMLElement>,\n renderer,\n destroyRef,\n props: () => omitQrCodeSvgAttributes(props()),\n });\n applyQrCodeSvgAttributes(\n elementRef as unknown as ElementRef<SVGElement>,\n renderer,\n destroyRef,\n props,\n );\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { applyQrCodeSvgAttributes, omitQrCodeSvgAttributes } from \"./svg-props\";\nimport { injectQrCodeContext } from \"./use-context\";\n\n@Directive({\n selector: \"path[qr-code-pattern]\",\n standalone: true,\n exportAs: \"qrCodePattern\",\n})\nexport class QrCodePattern {\n constructor() {\n const context = injectQrCodeContext();\n const elementRef = inject<ElementRef<SVGPathElement>>(ElementRef);\n const renderer = inject(Renderer2);\n const destroyRef = inject(DestroyRef);\n const props = () => context.api().getPatternProps() as Record<string, unknown>;\n\n bindProps({\n elementRef: elementRef as unknown as ElementRef<HTMLElement>,\n renderer,\n destroyRef,\n props: () => omitQrCodeSvgAttributes(props()),\n });\n applyQrCodeSvgAttributes(\n elementRef as unknown as ElementRef<SVGElement>,\n renderer,\n destroyRef,\n props,\n );\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectQrCodeContext } from \"./use-context\";\n\n@Directive({\n selector: \"[qr-code-overlay]\",\n standalone: true,\n exportAs: \"qrCodeOverlay\",\n})\nexport class QrCodeOverlay {\n constructor() {\n const context = injectQrCodeContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getOverlayProps(),\n });\n }\n}\n","import type { DataUrlType } from \"@wirekyt/dom/dom-query\";\n\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n inject,\n input,\n type InputSignal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectQrCodeContext } from \"./use-context\";\n\n@Directive({\n selector: \"button[qr-code-download-trigger]\",\n standalone: true,\n exportAs: \"qrCodeDownloadTrigger\",\n})\nexport class QrCodeDownloadTrigger {\n /** The mime type of the image. */\n readonly mimeType: InputSignal<DataUrlType> = input.required<DataUrlType>();\n /** The quality of the image. */\n readonly quality: InputSignal<number | undefined> = input<number | undefined>(undefined);\n /** The name of the file. */\n readonly fileName: InputSignal<string> = input.required<string>();\n\n constructor() {\n const context = injectQrCodeContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () =>\n context.api().getDownloadTriggerProps({\n mimeType: this.mimeType(),\n quality: this.quality(),\n fileName: this.fileName(),\n }),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n} from \"@angular/core\";\n\nimport type { UseQrCodeReturn } from \"./use\";\n\nimport { injectQrCodeContext } from \"./use-context\";\n\nexport interface QrCodeContextTemplate {\n $implicit: UseQrCodeReturn[\"api\"];\n api: UseQrCodeReturn[\"api\"];\n}\n\n@Directive({\n selector: \"[qr-code-context]\",\n standalone: true,\n exportAs: \"qrCodeContext\",\n})\nexport class QrCodeContext {\n static ngTemplateContextGuard(\n _directive: QrCodeContext,\n context: unknown,\n ): context is QrCodeContextTemplate {\n void context;\n return true;\n }\n\n private readonly qrCode = injectQrCodeContext();\n private readonly templateRef = inject<TemplateRef<QrCodeContextTemplate>>(TemplateRef);\n private readonly viewContainer = inject(ViewContainerRef);\n\n constructor() {\n const view = this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: this.qrCode.api,\n api: this.qrCode.api,\n });\n\n effect(() => {\n this.qrCode.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,eAAe,GAAG,IAAI,cAAc,CAAkB,yBAAyB;SAE5E,mBAAmB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,eAAe,CAAC;AAChC;;ACgBM,SAAU,SAAS,CAAC,OAAyB,EAAA;AACjD,IAAA,MAAM,MAAM,GAAG,YAAY,EAAE;AAC7B,IAAA,MAAM,WAAW,GAAG,iBAAiB,EAAE;AACvC,IAAA,MAAM,UAAU,GAAG,QAAQ,EAAE;AAE7B,IAAA,OAAO,UAAU,CAA2B;QAC1C,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE,MAAK;AACZ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