@wirekyt/angular 0.0.20 → 0.0.22
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-format.mjs +245 -0
- package/dist/fesm2022/wirekyt-angular-format.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-frame.mjs +196 -0
- package/dist/fesm2022/wirekyt-angular-frame.mjs.map +1 -0
- package/dist/package.json +9 -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-format.d.ts +101 -0
- package/dist/types/wirekyt-angular-format.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-frame.d.ts +50 -0
- package/dist/types/wirekyt-angular-frame.d.ts.map +1 -0
- package/package.json +10 -2
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectLocale } from '@wirekyt/angular';
|
|
4
|
+
import { formatBytes, formatNumber, formatRelativeTime, formatTime } from '@wirekyt/dom/i18n-utils';
|
|
5
|
+
|
|
6
|
+
class FormatByte {
|
|
7
|
+
value = input.required(/* @ts-ignore */
|
|
8
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
9
|
+
locale = input(undefined, /* @ts-ignore */
|
|
10
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
11
|
+
unit = input("byte", /* @ts-ignore */
|
|
12
|
+
...(ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []));
|
|
13
|
+
unitDisplay = input("short", /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "unitDisplay" }] : /* istanbul ignore next */ []));
|
|
15
|
+
unitSystem = input(undefined, /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "unitSystem" }] : /* istanbul ignore next */ []));
|
|
17
|
+
precision = input(undefined, /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "precision" }] : /* istanbul ignore next */ []));
|
|
19
|
+
localeContext = injectLocale();
|
|
20
|
+
formatted = computed(() => {
|
|
21
|
+
return formatBytes(this.value(), this.locale() ?? this.localeContext.locale, compactOptions$2({
|
|
22
|
+
precision: this.precision(),
|
|
23
|
+
unit: this.unit(),
|
|
24
|
+
unitDisplay: this.unitDisplay(),
|
|
25
|
+
unitSystem: this.unitSystem(),
|
|
26
|
+
}));
|
|
27
|
+
}, /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "formatted" }] : /* istanbul ignore next */ []));
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FormatByte, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: FormatByte, isStandalone: true, selector: "format-byte", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, unitDisplay: { classPropertyName: "unitDisplay", publicName: "unitDisplay", isSignal: true, isRequired: false, transformFunction: null }, unitSystem: { classPropertyName: "unitSystem", publicName: "unitSystem", isSignal: true, isRequired: false, transformFunction: null }, precision: { classPropertyName: "precision", publicName: "precision", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: ` {{ formatted() }} `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FormatByte, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{
|
|
35
|
+
selector: "format-byte",
|
|
36
|
+
standalone: true,
|
|
37
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
38
|
+
host: { style: "display: contents" },
|
|
39
|
+
template: ` {{ formatted() }} `,
|
|
40
|
+
}]
|
|
41
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], unitDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "unitDisplay", required: false }] }], unitSystem: [{ type: i0.Input, args: [{ isSignal: true, alias: "unitSystem", required: false }] }], precision: [{ type: i0.Input, args: [{ isSignal: true, alias: "precision", required: false }] }] } });
|
|
42
|
+
function compactOptions$2(options) {
|
|
43
|
+
return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== undefined));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
class FormatNumber {
|
|
47
|
+
value = input.required(/* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
49
|
+
locale = input(undefined, /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
51
|
+
options = input(undefined, /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
53
|
+
localeMatcher = input(undefined, /* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [{ debugName: "localeMatcher" }] : /* istanbul ignore next */ []));
|
|
55
|
+
numberingSystem = input(undefined, /* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [{ debugName: "numberingSystem" }] : /* istanbul ignore next */ []));
|
|
57
|
+
style = input(undefined, /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
59
|
+
currency = input(undefined, /* @ts-ignore */
|
|
60
|
+
...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
61
|
+
currencyDisplay = input(undefined, /* @ts-ignore */
|
|
62
|
+
...(ngDevMode ? [{ debugName: "currencyDisplay" }] : /* istanbul ignore next */ []));
|
|
63
|
+
currencySign = input(undefined, /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "currencySign" }] : /* istanbul ignore next */ []));
|
|
65
|
+
unit = input(undefined, /* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []));
|
|
67
|
+
unitDisplay = input(undefined, /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "unitDisplay" }] : /* istanbul ignore next */ []));
|
|
69
|
+
notation = input(undefined, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "notation" }] : /* istanbul ignore next */ []));
|
|
71
|
+
compactDisplay = input(undefined, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "compactDisplay" }] : /* istanbul ignore next */ []));
|
|
73
|
+
useGrouping = input(undefined, /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "useGrouping" }] : /* istanbul ignore next */ []));
|
|
75
|
+
minimumIntegerDigits = input(undefined, /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "minimumIntegerDigits" }] : /* istanbul ignore next */ []));
|
|
77
|
+
minimumFractionDigits = input(undefined, /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "minimumFractionDigits" }] : /* istanbul ignore next */ []));
|
|
79
|
+
maximumFractionDigits = input(undefined, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "maximumFractionDigits" }] : /* istanbul ignore next */ []));
|
|
81
|
+
minimumSignificantDigits = input(undefined, /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "minimumSignificantDigits" }] : /* istanbul ignore next */ []));
|
|
83
|
+
maximumSignificantDigits = input(undefined, /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "maximumSignificantDigits" }] : /* istanbul ignore next */ []));
|
|
85
|
+
signDisplay = input(undefined, /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "signDisplay" }] : /* istanbul ignore next */ []));
|
|
87
|
+
roundingPriority = input(undefined, /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "roundingPriority" }] : /* istanbul ignore next */ []));
|
|
89
|
+
roundingIncrement = input(undefined, /* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "roundingIncrement" }] : /* istanbul ignore next */ []));
|
|
91
|
+
roundingMode = input(undefined, /* @ts-ignore */
|
|
92
|
+
...(ngDevMode ? [{ debugName: "roundingMode" }] : /* istanbul ignore next */ []));
|
|
93
|
+
trailingZeroDisplay = input(undefined, /* @ts-ignore */
|
|
94
|
+
...(ngDevMode ? [{ debugName: "trailingZeroDisplay" }] : /* istanbul ignore next */ []));
|
|
95
|
+
localeContext = injectLocale();
|
|
96
|
+
formatted = computed(() => {
|
|
97
|
+
return formatNumber(this.value(), this.locale() ?? this.localeContext.locale, this.intlOptions());
|
|
98
|
+
}, /* @ts-ignore */
|
|
99
|
+
...(ngDevMode ? [{ debugName: "formatted" }] : /* istanbul ignore next */ []));
|
|
100
|
+
intlOptions() {
|
|
101
|
+
return compactOptions$1({
|
|
102
|
+
...this.options(),
|
|
103
|
+
...compactOptions$1({
|
|
104
|
+
localeMatcher: this.localeMatcher(),
|
|
105
|
+
numberingSystem: this.numberingSystem(),
|
|
106
|
+
style: this.style(),
|
|
107
|
+
currency: this.currency(),
|
|
108
|
+
currencyDisplay: this.currencyDisplay(),
|
|
109
|
+
currencySign: this.currencySign(),
|
|
110
|
+
unit: this.unit(),
|
|
111
|
+
unitDisplay: this.unitDisplay(),
|
|
112
|
+
notation: this.notation(),
|
|
113
|
+
compactDisplay: this.compactDisplay(),
|
|
114
|
+
useGrouping: this.useGrouping(),
|
|
115
|
+
minimumIntegerDigits: this.minimumIntegerDigits(),
|
|
116
|
+
minimumFractionDigits: this.minimumFractionDigits(),
|
|
117
|
+
maximumFractionDigits: this.maximumFractionDigits(),
|
|
118
|
+
minimumSignificantDigits: this.minimumSignificantDigits(),
|
|
119
|
+
maximumSignificantDigits: this.maximumSignificantDigits(),
|
|
120
|
+
signDisplay: this.signDisplay(),
|
|
121
|
+
roundingPriority: this.roundingPriority(),
|
|
122
|
+
roundingIncrement: this.roundingIncrement(),
|
|
123
|
+
roundingMode: this.roundingMode(),
|
|
124
|
+
trailingZeroDisplay: this.trailingZeroDisplay(),
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FormatNumber, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: FormatNumber, isStandalone: true, selector: "format-number", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, localeMatcher: { classPropertyName: "localeMatcher", publicName: "localeMatcher", isSignal: true, isRequired: false, transformFunction: null }, numberingSystem: { classPropertyName: "numberingSystem", publicName: "numberingSystem", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, currencyDisplay: { classPropertyName: "currencyDisplay", publicName: "currencyDisplay", isSignal: true, isRequired: false, transformFunction: null }, currencySign: { classPropertyName: "currencySign", publicName: "currencySign", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, unitDisplay: { classPropertyName: "unitDisplay", publicName: "unitDisplay", isSignal: true, isRequired: false, transformFunction: null }, notation: { classPropertyName: "notation", publicName: "notation", isSignal: true, isRequired: false, transformFunction: null }, compactDisplay: { classPropertyName: "compactDisplay", publicName: "compactDisplay", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minimumIntegerDigits: { classPropertyName: "minimumIntegerDigits", publicName: "minimumIntegerDigits", isSignal: true, isRequired: false, transformFunction: null }, minimumFractionDigits: { classPropertyName: "minimumFractionDigits", publicName: "minimumFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maximumFractionDigits: { classPropertyName: "maximumFractionDigits", publicName: "maximumFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, minimumSignificantDigits: { classPropertyName: "minimumSignificantDigits", publicName: "minimumSignificantDigits", isSignal: true, isRequired: false, transformFunction: null }, maximumSignificantDigits: { classPropertyName: "maximumSignificantDigits", publicName: "maximumSignificantDigits", isSignal: true, isRequired: false, transformFunction: null }, signDisplay: { classPropertyName: "signDisplay", publicName: "signDisplay", isSignal: true, isRequired: false, transformFunction: null }, roundingPriority: { classPropertyName: "roundingPriority", publicName: "roundingPriority", isSignal: true, isRequired: false, transformFunction: null }, roundingIncrement: { classPropertyName: "roundingIncrement", publicName: "roundingIncrement", isSignal: true, isRequired: false, transformFunction: null }, roundingMode: { classPropertyName: "roundingMode", publicName: "roundingMode", isSignal: true, isRequired: false, transformFunction: null }, trailingZeroDisplay: { classPropertyName: "trailingZeroDisplay", publicName: "trailingZeroDisplay", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: ` {{ formatted() }} `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
130
|
+
}
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FormatNumber, decorators: [{
|
|
132
|
+
type: Component,
|
|
133
|
+
args: [{
|
|
134
|
+
selector: "format-number",
|
|
135
|
+
standalone: true,
|
|
136
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
137
|
+
host: { style: "display: contents" },
|
|
138
|
+
template: ` {{ formatted() }} `,
|
|
139
|
+
}]
|
|
140
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], localeMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "localeMatcher", required: false }] }], numberingSystem: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberingSystem", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], currencyDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencyDisplay", required: false }] }], currencySign: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencySign", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], unitDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "unitDisplay", required: false }] }], notation: [{ type: i0.Input, args: [{ isSignal: true, alias: "notation", required: false }] }], compactDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactDisplay", required: false }] }], useGrouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "useGrouping", required: false }] }], minimumIntegerDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimumIntegerDigits", required: false }] }], minimumFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimumFractionDigits", required: false }] }], maximumFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximumFractionDigits", required: false }] }], minimumSignificantDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimumSignificantDigits", required: false }] }], maximumSignificantDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximumSignificantDigits", required: false }] }], signDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "signDisplay", required: false }] }], roundingPriority: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundingPriority", required: false }] }], roundingIncrement: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundingIncrement", required: false }] }], roundingMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundingMode", required: false }] }], trailingZeroDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingZeroDisplay", required: false }] }] } });
|
|
141
|
+
function compactOptions$1(options) {
|
|
142
|
+
return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== undefined));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
class FormatRelativeTime {
|
|
146
|
+
value = input.required(/* @ts-ignore */
|
|
147
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
148
|
+
unit = input("day", /* @ts-ignore */
|
|
149
|
+
...(ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []));
|
|
150
|
+
locale = input(undefined, /* @ts-ignore */
|
|
151
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
152
|
+
options = input(undefined, /* @ts-ignore */
|
|
153
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
154
|
+
localeMatcher = input(undefined, /* @ts-ignore */
|
|
155
|
+
...(ngDevMode ? [{ debugName: "localeMatcher" }] : /* istanbul ignore next */ []));
|
|
156
|
+
numeric = input(undefined, /* @ts-ignore */
|
|
157
|
+
...(ngDevMode ? [{ debugName: "numeric" }] : /* istanbul ignore next */ []));
|
|
158
|
+
style = input(undefined, /* @ts-ignore */
|
|
159
|
+
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
160
|
+
localeContext = injectLocale();
|
|
161
|
+
formatted = computed(() => {
|
|
162
|
+
const locale = this.locale() ?? this.localeContext.locale;
|
|
163
|
+
const options = compactOptions({
|
|
164
|
+
...this.options(),
|
|
165
|
+
...compactOptions({
|
|
166
|
+
localeMatcher: this.localeMatcher(),
|
|
167
|
+
numeric: this.numeric(),
|
|
168
|
+
style: this.style(),
|
|
169
|
+
}),
|
|
170
|
+
});
|
|
171
|
+
const value = this.value();
|
|
172
|
+
if (value instanceof Date) {
|
|
173
|
+
return formatRelativeTime(value, locale, options);
|
|
174
|
+
}
|
|
175
|
+
return new Intl.RelativeTimeFormat(locale, options).format(value, this.unit());
|
|
176
|
+
}, /* @ts-ignore */
|
|
177
|
+
...(ngDevMode ? [{ debugName: "formatted" }] : /* istanbul ignore next */ []));
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FormatRelativeTime, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: FormatRelativeTime, isStandalone: true, selector: "format-relative-time", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, localeMatcher: { classPropertyName: "localeMatcher", publicName: "localeMatcher", isSignal: true, isRequired: false, transformFunction: null }, numeric: { classPropertyName: "numeric", publicName: "numeric", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: ` {{ formatted() }} `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
180
|
+
}
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FormatRelativeTime, decorators: [{
|
|
182
|
+
type: Component,
|
|
183
|
+
args: [{
|
|
184
|
+
selector: "format-relative-time",
|
|
185
|
+
standalone: true,
|
|
186
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
187
|
+
host: { style: "display: contents" },
|
|
188
|
+
template: ` {{ formatted() }} `,
|
|
189
|
+
}]
|
|
190
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], localeMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "localeMatcher", required: false }] }], numeric: [{ type: i0.Input, args: [{ isSignal: true, alias: "numeric", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }] } });
|
|
191
|
+
function compactOptions(options) {
|
|
192
|
+
return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== undefined));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
class FormatTime {
|
|
196
|
+
value = input.required(/* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
198
|
+
locale = input(undefined, /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
200
|
+
format = input(undefined, /* @ts-ignore */
|
|
201
|
+
...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
|
|
202
|
+
amLabel = input(undefined, /* @ts-ignore */
|
|
203
|
+
...(ngDevMode ? [{ debugName: "amLabel" }] : /* istanbul ignore next */ []));
|
|
204
|
+
pmLabel = input(undefined, /* @ts-ignore */
|
|
205
|
+
...(ngDevMode ? [{ debugName: "pmLabel" }] : /* istanbul ignore next */ []));
|
|
206
|
+
withSeconds = input(undefined, /* @ts-ignore */
|
|
207
|
+
...(ngDevMode ? [{ debugName: "withSeconds" }] : /* istanbul ignore next */ []));
|
|
208
|
+
localeContext = injectLocale();
|
|
209
|
+
formatted = computed(() => {
|
|
210
|
+
return (formatTime(this.value(), this.locale() ?? this.localeContext.locale, {
|
|
211
|
+
format: this.format(),
|
|
212
|
+
amLabel: this.amLabel(),
|
|
213
|
+
pmLabel: this.pmLabel(),
|
|
214
|
+
withSeconds: this.withSeconds(),
|
|
215
|
+
}) ?? "");
|
|
216
|
+
}, /* @ts-ignore */
|
|
217
|
+
...(ngDevMode ? [{ debugName: "formatted" }] : /* istanbul ignore next */ []));
|
|
218
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FormatTime, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
219
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: FormatTime, isStandalone: true, selector: "format-time", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, amLabel: { classPropertyName: "amLabel", publicName: "amLabel", isSignal: true, isRequired: false, transformFunction: null }, pmLabel: { classPropertyName: "pmLabel", publicName: "pmLabel", isSignal: true, isRequired: false, transformFunction: null }, withSeconds: { classPropertyName: "withSeconds", publicName: "withSeconds", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: ` {{ formatted() }} `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
220
|
+
}
|
|
221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FormatTime, decorators: [{
|
|
222
|
+
type: Component,
|
|
223
|
+
args: [{
|
|
224
|
+
selector: "format-time",
|
|
225
|
+
standalone: true,
|
|
226
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
227
|
+
host: { style: "display: contents" },
|
|
228
|
+
template: ` {{ formatted() }} `,
|
|
229
|
+
}]
|
|
230
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], amLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "amLabel", required: false }] }], pmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "pmLabel", required: false }] }], withSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "withSeconds", required: false }] }] } });
|
|
231
|
+
|
|
232
|
+
var format = /*#__PURE__*/Object.freeze({
|
|
233
|
+
__proto__: null,
|
|
234
|
+
Byte: FormatByte,
|
|
235
|
+
Number: FormatNumber,
|
|
236
|
+
RelativeTime: FormatRelativeTime,
|
|
237
|
+
Time: FormatTime
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Generated bundle index. Do not edit.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
export { format as Format, FormatByte, FormatNumber, FormatRelativeTime, FormatTime };
|
|
245
|
+
//# sourceMappingURL=wirekyt-angular-format.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-format.mjs","sources":["../../src/components/format/byte.ts","../../src/components/format/number.ts","../../src/components/format/relative-time.ts","../../src/components/format/time.ts","../../src/components/format/wirekyt-angular-format.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from \"@angular/core\";\nimport { injectLocale } from \"@wirekyt/angular\";\nimport { type FormatBytesOptions, formatBytes } from \"@wirekyt/dom/i18n-utils\";\n\nexport interface FormatByteProps extends FormatBytesOptions {\n value: number;\n locale?: string;\n}\n\n@Component({\n selector: \"format-byte\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: \"display: contents\" },\n template: ` {{ formatted() }} `,\n})\nexport class FormatByte {\n readonly value = input.required<number>();\n readonly locale = input<string | undefined>(undefined);\n readonly unit = input<FormatBytesOptions[\"unit\"]>(\"byte\");\n readonly unitDisplay = input<FormatBytesOptions[\"unitDisplay\"]>(\"short\");\n readonly unitSystem = input<FormatBytesOptions[\"unitSystem\"] | undefined>(undefined);\n readonly precision = input<number | undefined>(undefined);\n\n private readonly localeContext = injectLocale();\n protected readonly formatted = computed(() => {\n return formatBytes(\n this.value(),\n this.locale() ?? this.localeContext.locale,\n compactOptions({\n precision: this.precision(),\n unit: this.unit(),\n unitDisplay: this.unitDisplay(),\n unitSystem: this.unitSystem(),\n }),\n );\n });\n}\n\nfunction compactOptions<T extends Record<string, unknown>>(options: T): T {\n return Object.fromEntries(\n Object.entries(options).filter(([, value]) => value !== undefined),\n ) as T;\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from \"@angular/core\";\nimport { injectLocale } from \"@wirekyt/angular\";\nimport { formatNumber } from \"@wirekyt/dom/i18n-utils\";\n\nexport interface FormatNumberProps extends Intl.NumberFormatOptions {\n value: number;\n locale?: string;\n}\n\n@Component({\n selector: \"format-number\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: \"display: contents\" },\n template: ` {{ formatted() }} `,\n})\nexport class FormatNumber {\n readonly value = input.required<number>();\n readonly locale = input<string | undefined>(undefined);\n readonly options = input<Intl.NumberFormatOptions | undefined>(undefined);\n readonly localeMatcher = input<Intl.NumberFormatOptions[\"localeMatcher\"] | undefined>(undefined);\n readonly numberingSystem = input<Intl.NumberFormatOptions[\"numberingSystem\"] | undefined>(\n undefined,\n );\n readonly style = input<Intl.NumberFormatOptions[\"style\"] | undefined>(undefined);\n readonly currency = input<string | undefined>(undefined);\n readonly currencyDisplay = input<Intl.NumberFormatOptions[\"currencyDisplay\"] | undefined>(\n undefined,\n );\n readonly currencySign = input<Intl.NumberFormatOptions[\"currencySign\"] | undefined>(undefined);\n readonly unit = input<string | undefined>(undefined);\n readonly unitDisplay = input<Intl.NumberFormatOptions[\"unitDisplay\"] | undefined>(undefined);\n readonly notation = input<Intl.NumberFormatOptions[\"notation\"] | undefined>(undefined);\n readonly compactDisplay = input<Intl.NumberFormatOptions[\"compactDisplay\"] | undefined>(\n undefined,\n );\n readonly useGrouping = input<Intl.NumberFormatOptions[\"useGrouping\"] | undefined>(undefined);\n readonly minimumIntegerDigits = input<number | undefined>(undefined);\n readonly minimumFractionDigits = input<number | undefined>(undefined);\n readonly maximumFractionDigits = input<number | undefined>(undefined);\n readonly minimumSignificantDigits = input<number | undefined>(undefined);\n readonly maximumSignificantDigits = input<number | undefined>(undefined);\n readonly signDisplay = input<Intl.NumberFormatOptions[\"signDisplay\"] | undefined>(undefined);\n readonly roundingPriority = input<Intl.NumberFormatOptions[\"roundingPriority\"] | undefined>(\n undefined,\n );\n readonly roundingIncrement = input<Intl.NumberFormatOptions[\"roundingIncrement\"] | undefined>(\n undefined,\n );\n readonly roundingMode = input<Intl.NumberFormatOptions[\"roundingMode\"] | undefined>(undefined);\n readonly trailingZeroDisplay = input<Intl.NumberFormatOptions[\"trailingZeroDisplay\"] | undefined>(\n undefined,\n );\n\n private readonly localeContext = injectLocale();\n protected readonly formatted = computed(() => {\n return formatNumber(\n this.value(),\n this.locale() ?? this.localeContext.locale,\n this.intlOptions(),\n );\n });\n\n private intlOptions(): Intl.NumberFormatOptions {\n return compactOptions({\n ...this.options(),\n ...compactOptions({\n localeMatcher: this.localeMatcher(),\n numberingSystem: this.numberingSystem(),\n style: this.style(),\n currency: this.currency(),\n currencyDisplay: this.currencyDisplay(),\n currencySign: this.currencySign(),\n unit: this.unit(),\n unitDisplay: this.unitDisplay(),\n notation: this.notation(),\n compactDisplay: this.compactDisplay(),\n useGrouping: this.useGrouping(),\n minimumIntegerDigits: this.minimumIntegerDigits(),\n minimumFractionDigits: this.minimumFractionDigits(),\n maximumFractionDigits: this.maximumFractionDigits(),\n minimumSignificantDigits: this.minimumSignificantDigits(),\n maximumSignificantDigits: this.maximumSignificantDigits(),\n signDisplay: this.signDisplay(),\n roundingPriority: this.roundingPriority(),\n roundingIncrement: this.roundingIncrement(),\n roundingMode: this.roundingMode(),\n trailingZeroDisplay: this.trailingZeroDisplay(),\n }),\n });\n }\n}\n\nfunction compactOptions<T extends Record<string, unknown>>(options: T): T {\n return Object.fromEntries(\n Object.entries(options).filter(([, value]) => value !== undefined),\n ) as T;\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from \"@angular/core\";\nimport { injectLocale } from \"@wirekyt/angular\";\nimport { formatRelativeTime } from \"@wirekyt/dom/i18n-utils\";\n\nexport interface FormatRelativeTimeProps extends Intl.RelativeTimeFormatOptions {\n value: Date | number;\n unit?: Intl.RelativeTimeFormatUnit;\n locale?: string;\n}\n\n@Component({\n selector: \"format-relative-time\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: \"display: contents\" },\n template: ` {{ formatted() }} `,\n})\nexport class FormatRelativeTime {\n readonly value = input.required<Date | number>();\n readonly unit = input<Intl.RelativeTimeFormatUnit>(\"day\");\n readonly locale = input<string | undefined>(undefined);\n readonly options = input<Intl.RelativeTimeFormatOptions | undefined>(undefined);\n readonly localeMatcher = input<Intl.RelativeTimeFormatOptions[\"localeMatcher\"] | undefined>(\n undefined,\n );\n readonly numeric = input<Intl.RelativeTimeFormatOptions[\"numeric\"] | undefined>(undefined);\n readonly style = input<Intl.RelativeTimeFormatOptions[\"style\"] | undefined>(undefined);\n\n private readonly localeContext = injectLocale();\n protected readonly formatted = computed(() => {\n const locale = this.locale() ?? this.localeContext.locale;\n const options = compactOptions({\n ...this.options(),\n ...compactOptions({\n localeMatcher: this.localeMatcher(),\n numeric: this.numeric(),\n style: this.style(),\n }),\n });\n const value = this.value();\n if (value instanceof Date) {\n return formatRelativeTime(value, locale, options);\n }\n return new Intl.RelativeTimeFormat(locale, options).format(value, this.unit());\n });\n}\n\nfunction compactOptions<T extends Record<string, unknown>>(options: T): T {\n return Object.fromEntries(\n Object.entries(options).filter(([, value]) => value !== undefined),\n ) as T;\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from \"@angular/core\";\nimport { injectLocale } from \"@wirekyt/angular\";\nimport { type FormatTimeOptions, formatTime } from \"@wirekyt/dom/i18n-utils\";\n\nexport interface FormatTimeProps extends FormatTimeOptions {\n value: string | Date;\n locale?: string;\n}\n\n@Component({\n selector: \"format-time\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: \"display: contents\" },\n template: ` {{ formatted() }} `,\n})\nexport class FormatTime {\n readonly value = input.required<string | Date>();\n readonly locale = input<string | undefined>(undefined);\n readonly format = input<FormatTimeOptions[\"format\"] | undefined>(undefined);\n readonly amLabel = input<string | undefined>(undefined);\n readonly pmLabel = input<string | undefined>(undefined);\n readonly withSeconds = input<boolean | undefined>(undefined);\n\n private readonly localeContext = injectLocale();\n protected readonly formatted = computed(() => {\n return (\n formatTime(this.value(), this.locale() ?? this.localeContext.locale, {\n format: this.format(),\n amLabel: this.amLabel(),\n pmLabel: this.pmLabel(),\n withSeconds: this.withSeconds(),\n }) ?? \"\"\n );\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["compactOptions"],"mappings":";;;;;MAgBa,UAAU,CAAA;IACZ,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU;IAChC,MAAM,GAAG,KAAK,CAAqB,SAAS;+EAAC;IAC7C,IAAI,GAAG,KAAK,CAA6B,MAAM;6EAAC;IAChD,WAAW,GAAG,KAAK,CAAoC,OAAO;oFAAC;IAC/D,UAAU,GAAG,KAAK,CAA+C,SAAS;mFAAC;IAC3E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AI,CAAC,WAAW,EAAE;SAChC,CAAC,IAAI,EAAE;IAEZ,CAAC;kFAAC;uGAlBS,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,q3BAFX,CAAA,mBAAA,CAAqB,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEpB,UAAU,EAAA,UAAA,EAAA,CAAA;kBAPtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE;AACpC,oBAAA,QAAQ,EAAE,CAAA,mBAAA,CAAqB;AAChC,iBAAA;;;;;;;;;;;ACfD;;AAEG;;;;"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, output, viewChild, inject, ViewContainerRef, Injector, signal, computed, afterNextRender, effect, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { ENVIRONMENT_TOKEN } from '@wirekyt/angular';
|
|
4
|
+
|
|
5
|
+
const resetStyle = "<style>*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }</style>";
|
|
6
|
+
const initialFrameSrcdoc = `<html><head>${resetStyle}</head><body><div class="frame-root"></div></body></html>`;
|
|
7
|
+
let frameId = 0;
|
|
8
|
+
const createDefaultTitle = () => {
|
|
9
|
+
const randomId = globalThis.crypto?.randomUUID?.();
|
|
10
|
+
return `frame:${randomId ?? ++frameId}`;
|
|
11
|
+
};
|
|
12
|
+
class Frame {
|
|
13
|
+
srcdoc = input(initialFrameSrcdoc, /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "srcdoc" }] : /* istanbul ignore next */ []));
|
|
15
|
+
title = input(undefined, /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
17
|
+
name = input(undefined, /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
19
|
+
head = input(null, /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "head" }] : /* istanbul ignore next */ []));
|
|
21
|
+
mount = output();
|
|
22
|
+
unmount = output();
|
|
23
|
+
frameElement = viewChild.required("frame", /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "frameElement" }] : /* istanbul ignore next */ []));
|
|
25
|
+
contentTpl = viewChild.required("content", /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "contentTpl" }] : /* istanbul ignore next */ []));
|
|
27
|
+
vcRef = inject(ViewContainerRef);
|
|
28
|
+
injector = inject(Injector);
|
|
29
|
+
defaultTitle = createDefaultTitle();
|
|
30
|
+
ready = signal(false, /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
|
|
32
|
+
frameDocument = signal(undefined, /* @ts-ignore */
|
|
33
|
+
...(ngDevMode ? [{ debugName: "frameDocument" }] : /* istanbul ignore next */ []));
|
|
34
|
+
frameRevision = signal(0, /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "frameRevision" }] : /* istanbul ignore next */ []));
|
|
36
|
+
contentView;
|
|
37
|
+
headView;
|
|
38
|
+
resizeCleanup;
|
|
39
|
+
mounted = false;
|
|
40
|
+
environment = {
|
|
41
|
+
getRootNode: () => this.frameDocument(),
|
|
42
|
+
};
|
|
43
|
+
resolvedTitle = computed(() => this.title() ?? this.defaultTitle, /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "resolvedTitle" }] : /* istanbul ignore next */ []));
|
|
45
|
+
constructor() {
|
|
46
|
+
afterNextRender(() => {
|
|
47
|
+
this.ready.set(true);
|
|
48
|
+
});
|
|
49
|
+
effect(() => {
|
|
50
|
+
const srcdoc = this.srcdoc() ?? initialFrameSrcdoc;
|
|
51
|
+
if (!this.ready())
|
|
52
|
+
return;
|
|
53
|
+
this.mountFrame(srcdoc);
|
|
54
|
+
});
|
|
55
|
+
effect(() => {
|
|
56
|
+
const head = this.head();
|
|
57
|
+
const doc = this.frameDocument();
|
|
58
|
+
this.frameRevision();
|
|
59
|
+
if (!this.ready() || !doc)
|
|
60
|
+
return;
|
|
61
|
+
this.mountHead(head, doc);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
ngOnDestroy() {
|
|
65
|
+
this.destroyViews();
|
|
66
|
+
this.resizeCleanup?.();
|
|
67
|
+
if (this.mounted) {
|
|
68
|
+
this.mounted = false;
|
|
69
|
+
this.unmount.emit();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
mountFrame(srcdoc) {
|
|
73
|
+
const frame = this.frameElement().nativeElement;
|
|
74
|
+
const doc = frame.contentDocument ?? frame.contentWindow?.document;
|
|
75
|
+
if (!doc)
|
|
76
|
+
return;
|
|
77
|
+
this.resizeCleanup?.();
|
|
78
|
+
this.resizeCleanup = undefined;
|
|
79
|
+
if (this.mounted) {
|
|
80
|
+
this.mounted = false;
|
|
81
|
+
this.unmount.emit();
|
|
82
|
+
}
|
|
83
|
+
this.destroyViews();
|
|
84
|
+
doc.open();
|
|
85
|
+
doc.write(srcdoc);
|
|
86
|
+
doc.close();
|
|
87
|
+
this.frameDocument.set(doc);
|
|
88
|
+
this.frameRevision.update((revision) => revision + 1);
|
|
89
|
+
const mountNode = doc.body.querySelector(".frame-root") ?? doc.body;
|
|
90
|
+
const frameInjector = this.createFrameInjector(doc);
|
|
91
|
+
this.contentView = this.vcRef.createEmbeddedView(this.contentTpl(), undefined, {
|
|
92
|
+
injector: frameInjector,
|
|
93
|
+
});
|
|
94
|
+
this.contentView.detectChanges();
|
|
95
|
+
for (const node of this.contentView.rootNodes) {
|
|
96
|
+
mountNode.appendChild(node);
|
|
97
|
+
}
|
|
98
|
+
this.observeSize(frame, mountNode, doc);
|
|
99
|
+
this.mounted = true;
|
|
100
|
+
this.mount.emit();
|
|
101
|
+
}
|
|
102
|
+
mountHead(head, doc) {
|
|
103
|
+
this.destroyView(this.headView);
|
|
104
|
+
this.headView = undefined;
|
|
105
|
+
if (!head)
|
|
106
|
+
return;
|
|
107
|
+
this.headView = this.vcRef.createEmbeddedView(head, undefined, {
|
|
108
|
+
injector: this.createFrameInjector(doc),
|
|
109
|
+
});
|
|
110
|
+
this.headView.detectChanges();
|
|
111
|
+
for (const node of this.headView.rootNodes) {
|
|
112
|
+
doc.head.appendChild(node);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
destroyViews() {
|
|
116
|
+
for (const view of [this.contentView, this.headView]) {
|
|
117
|
+
this.destroyView(view);
|
|
118
|
+
}
|
|
119
|
+
this.contentView = undefined;
|
|
120
|
+
this.headView = undefined;
|
|
121
|
+
}
|
|
122
|
+
destroyView(view) {
|
|
123
|
+
if (!view)
|
|
124
|
+
return;
|
|
125
|
+
for (const node of view.rootNodes) {
|
|
126
|
+
node.parentNode?.removeChild(node);
|
|
127
|
+
}
|
|
128
|
+
view.destroy();
|
|
129
|
+
}
|
|
130
|
+
createFrameInjector(doc) {
|
|
131
|
+
return Injector.create({
|
|
132
|
+
providers: [
|
|
133
|
+
{
|
|
134
|
+
provide: ENVIRONMENT_TOKEN,
|
|
135
|
+
useValue: { getRootNode: () => doc },
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
parent: this.injector,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
observeSize(frame, mountNode, doc) {
|
|
142
|
+
this.resizeCleanup?.();
|
|
143
|
+
const win = doc.defaultView;
|
|
144
|
+
if (!win?.ResizeObserver)
|
|
145
|
+
return;
|
|
146
|
+
const updateSize = () => {
|
|
147
|
+
win.requestAnimationFrame(() => {
|
|
148
|
+
if (!frame.contentDocument?.documentElement)
|
|
149
|
+
return;
|
|
150
|
+
frame.style.setProperty("--width", `${mountNode.scrollWidth}px`);
|
|
151
|
+
frame.style.setProperty("--height", `${mountNode.scrollHeight}px`);
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
const observer = new win.ResizeObserver(updateSize);
|
|
155
|
+
observer.observe(mountNode);
|
|
156
|
+
updateSize();
|
|
157
|
+
this.resizeCleanup = () => observer.disconnect();
|
|
158
|
+
}
|
|
159
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: Frame, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.3", type: Frame, isStandalone: true, selector: "frame", inputs: { srcdoc: { classPropertyName: "srcdoc", publicName: "srcdoc", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, head: { classPropertyName: "head", publicName: "head", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { mount: "mount", unmount: "unmount" }, host: { styleAttribute: "display: block;" }, providers: [
|
|
161
|
+
{
|
|
162
|
+
provide: ENVIRONMENT_TOKEN,
|
|
163
|
+
useFactory: (frame) => frame.environment,
|
|
164
|
+
deps: [forwardRef(() => Frame)],
|
|
165
|
+
},
|
|
166
|
+
], viewQueries: [{ propertyName: "frameElement", first: true, predicate: ["frame"], descendants: true, isSignal: true }, { propertyName: "contentTpl", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
167
|
+
<iframe #frame [attr.title]="resolvedTitle()" [attr.name]="name()"></iframe>
|
|
168
|
+
<ng-template #content>
|
|
169
|
+
<ng-content></ng-content>
|
|
170
|
+
</ng-template>
|
|
171
|
+
`, isInline: true, styles: ["iframe{border:0;display:block;height:100%;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
172
|
+
}
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: Frame, decorators: [{
|
|
174
|
+
type: Component,
|
|
175
|
+
args: [{ selector: "frame", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
176
|
+
style: "display: block;",
|
|
177
|
+
}, providers: [
|
|
178
|
+
{
|
|
179
|
+
provide: ENVIRONMENT_TOKEN,
|
|
180
|
+
useFactory: (frame) => frame.environment,
|
|
181
|
+
deps: [forwardRef(() => Frame)],
|
|
182
|
+
},
|
|
183
|
+
], template: `
|
|
184
|
+
<iframe #frame [attr.title]="resolvedTitle()" [attr.name]="name()"></iframe>
|
|
185
|
+
<ng-template #content>
|
|
186
|
+
<ng-content></ng-content>
|
|
187
|
+
</ng-template>
|
|
188
|
+
`, styles: ["iframe{border:0;display:block;height:100%;width:100%}\n"] }]
|
|
189
|
+
}], ctorParameters: () => [], propDecorators: { srcdoc: [{ type: i0.Input, args: [{ isSignal: true, alias: "srcdoc", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], head: [{ type: i0.Input, args: [{ isSignal: true, alias: "head", required: false }] }], mount: [{ type: i0.Output, args: ["mount"] }], unmount: [{ type: i0.Output, args: ["unmount"] }], frameElement: [{ type: i0.ViewChild, args: ["frame", { isSignal: true }] }], contentTpl: [{ type: i0.ViewChild, args: ["content", { isSignal: true }] }] } });
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Generated bundle index. Do not edit.
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
export { Frame };
|
|
196
|
+
//# sourceMappingURL=wirekyt-angular-frame.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-frame.mjs","sources":["../../src/components/frame/frame.ts","../../src/components/frame/wirekyt-angular-frame.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Injector,\n type ElementRef,\n type EmbeddedViewRef,\n type OnDestroy,\n type TemplateRef,\n ViewContainerRef,\n afterNextRender,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { ENVIRONMENT_TOKEN, type EnvironmentContext } from \"@wirekyt/angular\";\n\nexport interface FrameBaseProps {\n head?: TemplateRef<unknown> | null;\n onMount?: (() => void) | undefined;\n onUnmount?: (() => void) | undefined;\n}\n\nexport interface FrameProps extends FrameBaseProps {\n srcdoc?: string;\n title?: string;\n name?: string;\n}\n\nconst resetStyle =\n \"<style>*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }</style>\";\nconst initialFrameSrcdoc = `<html><head>${resetStyle}</head><body><div class=\"frame-root\"></div></body></html>`;\nlet frameId = 0;\n\nconst createDefaultTitle = (): string => {\n const randomId = globalThis.crypto?.randomUUID?.();\n return `frame:${randomId ?? ++frameId}`;\n};\n\n@Component({\n selector: \"frame\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: \"display: block;\",\n },\n providers: [\n {\n provide: ENVIRONMENT_TOKEN,\n useFactory: (frame: Frame) => frame.environment,\n deps: [forwardRef(() => Frame)],\n },\n ],\n template: `\n <iframe #frame [attr.title]=\"resolvedTitle()\" [attr.name]=\"name()\"></iframe>\n <ng-template #content>\n <ng-content></ng-content>\n </ng-template>\n `,\n styles: [\n `\n iframe {\n border: 0;\n display: block;\n height: 100%;\n width: 100%;\n }\n `,\n ],\n})\nexport class Frame implements OnDestroy {\n readonly srcdoc = input<string | undefined>(initialFrameSrcdoc);\n readonly title = input<string | undefined>(undefined);\n readonly name = input<string | undefined>(undefined);\n readonly head = input<TemplateRef<unknown> | null>(null);\n readonly mount = output<void>();\n readonly unmount = output<void>();\n readonly frameElement = viewChild.required<ElementRef<HTMLIFrameElement>>(\"frame\");\n\n private readonly contentTpl = viewChild.required<TemplateRef<unknown>>(\"content\");\n private readonly vcRef = inject(ViewContainerRef);\n private readonly injector = inject(Injector);\n private readonly defaultTitle = createDefaultTitle();\n private readonly ready = signal(false);\n private readonly frameDocument = signal<Document | undefined>(undefined);\n private readonly frameRevision = signal(0);\n private contentView: EmbeddedViewRef<unknown> | undefined;\n private headView: EmbeddedViewRef<unknown> | undefined;\n private resizeCleanup: (() => void) | undefined;\n private mounted = false;\n\n readonly environment: EnvironmentContext = {\n getRootNode: () => this.frameDocument(),\n };\n\n protected readonly resolvedTitle = computed(() => this.title() ?? this.defaultTitle);\n\n constructor() {\n afterNextRender(() => {\n this.ready.set(true);\n });\n\n effect(() => {\n const srcdoc = this.srcdoc() ?? initialFrameSrcdoc;\n if (!this.ready()) return;\n this.mountFrame(srcdoc);\n });\n\n effect(() => {\n const head = this.head();\n const doc = this.frameDocument();\n this.frameRevision();\n if (!this.ready() || !doc) return;\n this.mountHead(head, doc);\n });\n }\n\n ngOnDestroy(): void {\n this.destroyViews();\n this.resizeCleanup?.();\n if (this.mounted) {\n this.mounted = false;\n this.unmount.emit();\n }\n }\n\n private mountFrame(srcdoc: string): void {\n const frame = this.frameElement().nativeElement;\n const doc = frame.contentDocument ?? frame.contentWindow?.document;\n if (!doc) return;\n\n this.resizeCleanup?.();\n this.resizeCleanup = undefined;\n if (this.mounted) {\n this.mounted = false;\n this.unmount.emit();\n }\n this.destroyViews();\n\n doc.open();\n doc.write(srcdoc);\n doc.close();\n this.frameDocument.set(doc);\n this.frameRevision.update((revision) => revision + 1);\n\n const mountNode = doc.body.querySelector<HTMLElement>(\".frame-root\") ?? doc.body;\n const frameInjector = this.createFrameInjector(doc);\n\n this.contentView = this.vcRef.createEmbeddedView(this.contentTpl(), undefined, {\n injector: frameInjector,\n });\n this.contentView.detectChanges();\n for (const node of this.contentView.rootNodes as Node[]) {\n mountNode.appendChild(node);\n }\n\n this.observeSize(frame, mountNode, doc);\n this.mounted = true;\n this.mount.emit();\n }\n\n private mountHead(head: TemplateRef<unknown> | null, doc: Document): void {\n this.destroyView(this.headView);\n this.headView = undefined;\n if (!head) return;\n\n this.headView = this.vcRef.createEmbeddedView(head, undefined, {\n injector: this.createFrameInjector(doc),\n });\n this.headView.detectChanges();\n for (const node of this.headView.rootNodes as Node[]) {\n doc.head.appendChild(node);\n }\n }\n\n private destroyViews(): void {\n for (const view of [this.contentView, this.headView]) {\n this.destroyView(view);\n }\n this.contentView = undefined;\n this.headView = undefined;\n }\n\n private destroyView(view: EmbeddedViewRef<unknown> | undefined): void {\n if (!view) return;\n for (const node of view.rootNodes as Node[]) {\n node.parentNode?.removeChild(node);\n }\n view.destroy();\n }\n\n private createFrameInjector(doc: Document): Injector {\n return Injector.create({\n providers: [\n {\n provide: ENVIRONMENT_TOKEN,\n useValue: { getRootNode: () => doc } satisfies EnvironmentContext,\n },\n ],\n parent: this.injector,\n });\n }\n\n private observeSize(frame: HTMLIFrameElement, mountNode: HTMLElement, doc: Document): void {\n this.resizeCleanup?.();\n const win = doc.defaultView as (Window & typeof globalThis) | null;\n if (!win?.ResizeObserver) return;\n\n const updateSize = () => {\n win.requestAnimationFrame(() => {\n if (!frame.contentDocument?.documentElement) return;\n frame.style.setProperty(\"--width\", `${mountNode.scrollWidth}px`);\n frame.style.setProperty(\"--height\", `${mountNode.scrollHeight}px`);\n });\n };\n const observer = new win.ResizeObserver(updateSize);\n observer.observe(mountNode);\n updateSize();\n this.resizeCleanup = () => observer.disconnect();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAiCA,MAAM,UAAU,GACd,wFAAwF;AAC1F,MAAM,kBAAkB,GAAG,CAAA,YAAA,EAAe,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AA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,OAAO,oEAEV,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACnFlF;;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.22",
|
|
4
4
|
"description": "Angular adapter for Wirekyt",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -95,6 +95,14 @@
|
|
|
95
95
|
"types": "./types/wirekyt-angular-focus-trap.d.ts",
|
|
96
96
|
"default": "./fesm2022/wirekyt-angular-focus-trap.mjs"
|
|
97
97
|
},
|
|
98
|
+
"./format": {
|
|
99
|
+
"types": "./types/wirekyt-angular-format.d.ts",
|
|
100
|
+
"default": "./fesm2022/wirekyt-angular-format.mjs"
|
|
101
|
+
},
|
|
102
|
+
"./frame": {
|
|
103
|
+
"types": "./types/wirekyt-angular-frame.d.ts",
|
|
104
|
+
"default": "./fesm2022/wirekyt-angular-frame.mjs"
|
|
105
|
+
},
|
|
98
106
|
"./presence": {
|
|
99
107
|
"types": "./types/wirekyt-angular-presence.d.ts",
|
|
100
108
|
"default": "./fesm2022/wirekyt-angular-presence.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" | "indicator" | "label" | "control" | "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" | "label" | "control" | "content" | "area" | "trigger" | "positioner" | "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" | "list" | "item" | "label" | "control" | "content" | "input" | "trigger" | "positioner" | "clearTrigger" | "itemIndicator" | "itemGroup" | "itemText" | "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" | "label" | "control" | "content" | "input" | "table" | "view" | "trigger" | "positioner" | "clearTrigger" | "prevTrigger" | "nextTrigger" | "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,101 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _wirekyt_dom_i18n_utils from '@wirekyt/dom/i18n-utils';
|
|
3
|
+
import { FormatBytesOptions, FormatTimeOptions } from '@wirekyt/dom/i18n-utils';
|
|
4
|
+
|
|
5
|
+
interface FormatByteProps extends FormatBytesOptions {
|
|
6
|
+
value: number;
|
|
7
|
+
locale?: string;
|
|
8
|
+
}
|
|
9
|
+
declare class FormatByte {
|
|
10
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
11
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
12
|
+
readonly unit: _angular_core.InputSignal<"bit" | "byte" | undefined>;
|
|
13
|
+
readonly unitDisplay: _angular_core.InputSignal<"long" | "short" | "narrow" | undefined>;
|
|
14
|
+
readonly unitSystem: _angular_core.InputSignal<"binary" | "decimal" | undefined>;
|
|
15
|
+
readonly precision: _angular_core.InputSignal<number | undefined>;
|
|
16
|
+
private readonly localeContext;
|
|
17
|
+
protected readonly formatted: _angular_core.Signal<string>;
|
|
18
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormatByte, never>;
|
|
19
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormatByte, "format-byte", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "unitDisplay": { "alias": "unitDisplay"; "required": false; "isSignal": true; }; "unitSystem": { "alias": "unitSystem"; "required": false; "isSignal": true; }; "precision": { "alias": "precision"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface FormatNumberProps extends Intl.NumberFormatOptions {
|
|
23
|
+
value: number;
|
|
24
|
+
locale?: string;
|
|
25
|
+
}
|
|
26
|
+
declare class FormatNumber {
|
|
27
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
28
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
29
|
+
readonly options: _angular_core.InputSignal<Intl.NumberFormatOptions | undefined>;
|
|
30
|
+
readonly localeMatcher: _angular_core.InputSignal<"lookup" | "best fit" | undefined>;
|
|
31
|
+
readonly numberingSystem: _angular_core.InputSignal<string | undefined>;
|
|
32
|
+
readonly style: _angular_core.InputSignal<keyof Intl.NumberFormatOptionsStyleRegistry | undefined>;
|
|
33
|
+
readonly currency: _angular_core.InputSignal<string | undefined>;
|
|
34
|
+
readonly currencyDisplay: _angular_core.InputSignal<keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry | undefined>;
|
|
35
|
+
readonly currencySign: _angular_core.InputSignal<"standard" | "accounting" | undefined>;
|
|
36
|
+
readonly unit: _angular_core.InputSignal<string | undefined>;
|
|
37
|
+
readonly unitDisplay: _angular_core.InputSignal<"long" | "short" | "narrow" | undefined>;
|
|
38
|
+
readonly notation: _angular_core.InputSignal<"standard" | "scientific" | "engineering" | "compact" | undefined>;
|
|
39
|
+
readonly compactDisplay: _angular_core.InputSignal<"long" | "short" | undefined>;
|
|
40
|
+
readonly useGrouping: _angular_core.InputSignal<boolean | keyof Intl.NumberFormatOptionsUseGroupingRegistry | "true" | "false" | undefined>;
|
|
41
|
+
readonly minimumIntegerDigits: _angular_core.InputSignal<number | undefined>;
|
|
42
|
+
readonly minimumFractionDigits: _angular_core.InputSignal<number | undefined>;
|
|
43
|
+
readonly maximumFractionDigits: _angular_core.InputSignal<number | undefined>;
|
|
44
|
+
readonly minimumSignificantDigits: _angular_core.InputSignal<number | undefined>;
|
|
45
|
+
readonly maximumSignificantDigits: _angular_core.InputSignal<number | undefined>;
|
|
46
|
+
readonly signDisplay: _angular_core.InputSignal<keyof Intl.NumberFormatOptionsSignDisplayRegistry | undefined>;
|
|
47
|
+
readonly roundingPriority: _angular_core.InputSignal<"auto" | "morePrecision" | "lessPrecision" | undefined>;
|
|
48
|
+
readonly roundingIncrement: _angular_core.InputSignal<2 | 1 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined>;
|
|
49
|
+
readonly roundingMode: _angular_core.InputSignal<"ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined>;
|
|
50
|
+
readonly trailingZeroDisplay: _angular_core.InputSignal<"auto" | "stripIfInteger" | undefined>;
|
|
51
|
+
private readonly localeContext;
|
|
52
|
+
protected readonly formatted: _angular_core.Signal<string>;
|
|
53
|
+
private intlOptions;
|
|
54
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormatNumber, never>;
|
|
55
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormatNumber, "format-number", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "localeMatcher": { "alias": "localeMatcher"; "required": false; "isSignal": true; }; "numberingSystem": { "alias": "numberingSystem"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "currency": { "alias": "currency"; "required": false; "isSignal": true; }; "currencyDisplay": { "alias": "currencyDisplay"; "required": false; "isSignal": true; }; "currencySign": { "alias": "currencySign"; "required": false; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "unitDisplay": { "alias": "unitDisplay"; "required": false; "isSignal": true; }; "notation": { "alias": "notation"; "required": false; "isSignal": true; }; "compactDisplay": { "alias": "compactDisplay"; "required": false; "isSignal": true; }; "useGrouping": { "alias": "useGrouping"; "required": false; "isSignal": true; }; "minimumIntegerDigits": { "alias": "minimumIntegerDigits"; "required": false; "isSignal": true; }; "minimumFractionDigits": { "alias": "minimumFractionDigits"; "required": false; "isSignal": true; }; "maximumFractionDigits": { "alias": "maximumFractionDigits"; "required": false; "isSignal": true; }; "minimumSignificantDigits": { "alias": "minimumSignificantDigits"; "required": false; "isSignal": true; }; "maximumSignificantDigits": { "alias": "maximumSignificantDigits"; "required": false; "isSignal": true; }; "signDisplay": { "alias": "signDisplay"; "required": false; "isSignal": true; }; "roundingPriority": { "alias": "roundingPriority"; "required": false; "isSignal": true; }; "roundingIncrement": { "alias": "roundingIncrement"; "required": false; "isSignal": true; }; "roundingMode": { "alias": "roundingMode"; "required": false; "isSignal": true; }; "trailingZeroDisplay": { "alias": "trailingZeroDisplay"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface FormatRelativeTimeProps extends Intl.RelativeTimeFormatOptions {
|
|
59
|
+
value: Date | number;
|
|
60
|
+
unit?: Intl.RelativeTimeFormatUnit;
|
|
61
|
+
locale?: string;
|
|
62
|
+
}
|
|
63
|
+
declare class FormatRelativeTime {
|
|
64
|
+
readonly value: _angular_core.InputSignal<number | Date>;
|
|
65
|
+
readonly unit: _angular_core.InputSignal<Intl.RelativeTimeFormatUnit>;
|
|
66
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
67
|
+
readonly options: _angular_core.InputSignal<Intl.RelativeTimeFormatOptions | undefined>;
|
|
68
|
+
readonly localeMatcher: _angular_core.InputSignal<Intl.RelativeTimeFormatLocaleMatcher | undefined>;
|
|
69
|
+
readonly numeric: _angular_core.InputSignal<Intl.RelativeTimeFormatNumeric | undefined>;
|
|
70
|
+
readonly style: _angular_core.InputSignal<Intl.RelativeTimeFormatStyle | undefined>;
|
|
71
|
+
private readonly localeContext;
|
|
72
|
+
protected readonly formatted: _angular_core.Signal<string>;
|
|
73
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormatRelativeTime, never>;
|
|
74
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormatRelativeTime, "format-relative-time", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "localeMatcher": { "alias": "localeMatcher"; "required": false; "isSignal": true; }; "numeric": { "alias": "numeric"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface FormatTimeProps extends FormatTimeOptions {
|
|
78
|
+
value: string | Date;
|
|
79
|
+
locale?: string;
|
|
80
|
+
}
|
|
81
|
+
declare class FormatTime {
|
|
82
|
+
readonly value: _angular_core.InputSignal<string | Date>;
|
|
83
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
84
|
+
readonly format: _angular_core.InputSignal<_wirekyt_dom_i18n_utils.TimeFormat | undefined>;
|
|
85
|
+
readonly amLabel: _angular_core.InputSignal<string | undefined>;
|
|
86
|
+
readonly pmLabel: _angular_core.InputSignal<string | undefined>;
|
|
87
|
+
readonly withSeconds: _angular_core.InputSignal<boolean | undefined>;
|
|
88
|
+
private readonly localeContext;
|
|
89
|
+
protected readonly formatted: _angular_core.Signal<string>;
|
|
90
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormatTime, never>;
|
|
91
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormatTime, "format-time", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "amLabel": { "alias": "amLabel"; "required": false; "isSignal": true; }; "pmLabel": { "alias": "pmLabel"; "required": false; "isSignal": true; }; "withSeconds": { "alias": "withSeconds"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare namespace format_d {
|
|
95
|
+
export { FormatByte as Byte, FormatNumber as Number, FormatRelativeTime as RelativeTime, FormatTime as Time };
|
|
96
|
+
export type { FormatByteProps as ByteProps, FormatNumberProps as NumberProps, FormatRelativeTimeProps as RelativeTimeProps, FormatTimeProps as TimeProps };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { format_d as Format, FormatByte, FormatNumber, FormatRelativeTime, FormatTime };
|
|
100
|
+
export type { FormatByteProps, FormatNumberProps, FormatRelativeTimeProps, FormatTimeProps };
|
|
101
|
+
//# sourceMappingURL=wirekyt-angular-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-format.d.ts","sources":["../../src/components/format/byte.ts","../../src/components/format/number.ts","../../src/components/format/relative-time.ts","../../src/components/format/time.ts"],"mappings":";;;;AAIM,UAAW,eAAgB,SAAQ,kBAAkB;;;AAG1D;AAED,cAOa,UAAU;oBACP,aAAA,CAAA,WAAA;qBACC,aAAA,CAAA,WAAA;mBACF,aAAA,CAAA,WAAA;0BACO,aAAA,CAAA,WAAA;yBACD,aAAA,CAAA,WAAA;wBACD,aAAA,CAAA,WAAA;AAElB;AACA,kCAA4B,aAAA,CAAA,MAAA;oDATjB,UAAU;sDAAV,UAAU;AAqBtB;;ACjCK,UAAW,iBAAkB,SAAQ,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ACF,aAAA,CAAA,WAAA,CAAA,IAAA,CAAA,uBAAA;AAEd;AACA,kCAA4B,aAAA,CAAA,MAAA;oDAZjB,kBAAkB;sDAAlB,kBAAkB;AA4B9B;;ACzCK,UAAW,eAAgB,SAAQ,iBAAiB;AACxD,oBAAgB,IAAI;;AAErB;AAED,cAOa,UAAU;oBACP,aAAA,CAAA,WAAA,UAAA,IAAA;qBACC,aAAA,CAAA,WAAA;qBACA,aAAA,CAAA,WAAA,CAAA,uBAAA,CAAA,UAAA;sBACC,aAAA,CAAA,WAAA;sBACA,aAAA,CAAA,WAAA;0BACI,aAAA,CAAA,WAAA;AAEpB;AACA,kCAA4B,aAAA,CAAA,MAAA;oDATjB,UAAU;sDAAV,UAAU;AAmBtB;;;;;;;;;;;;;;;;","names":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy, TemplateRef, ElementRef } from '@angular/core';
|
|
3
|
+
import { EnvironmentContext } from '@wirekyt/angular';
|
|
4
|
+
|
|
5
|
+
interface FrameBaseProps {
|
|
6
|
+
head?: TemplateRef<unknown> | null;
|
|
7
|
+
onMount?: (() => void) | undefined;
|
|
8
|
+
onUnmount?: (() => void) | undefined;
|
|
9
|
+
}
|
|
10
|
+
interface FrameProps extends FrameBaseProps {
|
|
11
|
+
srcdoc?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
}
|
|
15
|
+
declare class Frame implements OnDestroy {
|
|
16
|
+
readonly srcdoc: _angular_core.InputSignal<string | undefined>;
|
|
17
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
18
|
+
readonly name: _angular_core.InputSignal<string | undefined>;
|
|
19
|
+
readonly head: _angular_core.InputSignal<TemplateRef<unknown> | null>;
|
|
20
|
+
readonly mount: _angular_core.OutputEmitterRef<void>;
|
|
21
|
+
readonly unmount: _angular_core.OutputEmitterRef<void>;
|
|
22
|
+
readonly frameElement: _angular_core.Signal<ElementRef<HTMLIFrameElement>>;
|
|
23
|
+
private readonly contentTpl;
|
|
24
|
+
private readonly vcRef;
|
|
25
|
+
private readonly injector;
|
|
26
|
+
private readonly defaultTitle;
|
|
27
|
+
private readonly ready;
|
|
28
|
+
private readonly frameDocument;
|
|
29
|
+
private readonly frameRevision;
|
|
30
|
+
private contentView;
|
|
31
|
+
private headView;
|
|
32
|
+
private resizeCleanup;
|
|
33
|
+
private mounted;
|
|
34
|
+
readonly environment: EnvironmentContext;
|
|
35
|
+
protected readonly resolvedTitle: _angular_core.Signal<string>;
|
|
36
|
+
constructor();
|
|
37
|
+
ngOnDestroy(): void;
|
|
38
|
+
private mountFrame;
|
|
39
|
+
private mountHead;
|
|
40
|
+
private destroyViews;
|
|
41
|
+
private destroyView;
|
|
42
|
+
private createFrameInjector;
|
|
43
|
+
private observeSize;
|
|
44
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Frame, never>;
|
|
45
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Frame, "frame", never, { "srcdoc": { "alias": "srcdoc"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "head": { "alias": "head"; "required": false; "isSignal": true; }; }, { "mount": "mount"; "unmount": "unmount"; }, never, ["*"], true, never>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { Frame };
|
|
49
|
+
export type { FrameBaseProps, FrameProps };
|
|
50
|
+
//# sourceMappingURL=wirekyt-angular-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-frame.d.ts","sources":["../../src/components/frame/frame.ts"],"mappings":";;;;UAqBiB,cAAc;WACtB,WAAW;;;AAGnB;AAEK,UAAW,UAAW,SAAQ,cAAc;;;;AAIjD;AAYD,cA+Ba,KAAM,YAAW,SAAS;qBACtB,aAAA,CAAA,WAAA;oBACD,aAAA,CAAA,WAAA;mBACD,aAAA,CAAA,WAAA;mBACA,aAAA,CAAA,WAAA,CAAA,WAAA;oBACC,aAAA,CAAA,gBAAA;sBACE,aAAA,CAAA,gBAAA;2BACK,aAAA,CAAA,MAAA,CAAA,UAAA,CAAA,iBAAA;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAMA,0BAAsB,kBAAkB;AAIxC,sCAAgC,aAAA,CAAA,MAAA;;AAsBhC;AASA;AAmCA;AAcA;AAQA;AAQA;AAYA;oDArIW,KAAK;sDAAL,KAAK;AAsJjB;;;;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirekyt/angular",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "Angular adapter for Wirekyt",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -95,6 +95,14 @@
|
|
|
95
95
|
"types": "./dist/types/wirekyt-angular-focus-trap.d.ts",
|
|
96
96
|
"default": "./dist/fesm2022/wirekyt-angular-focus-trap.mjs"
|
|
97
97
|
},
|
|
98
|
+
"./format": {
|
|
99
|
+
"types": "./dist/types/wirekyt-angular-format.d.ts",
|
|
100
|
+
"default": "./dist/fesm2022/wirekyt-angular-format.mjs"
|
|
101
|
+
},
|
|
102
|
+
"./frame": {
|
|
103
|
+
"types": "./dist/types/wirekyt-angular-frame.d.ts",
|
|
104
|
+
"default": "./dist/fesm2022/wirekyt-angular-frame.mjs"
|
|
105
|
+
},
|
|
98
106
|
"./presence": {
|
|
99
107
|
"types": "./dist/types/wirekyt-angular-presence.d.ts",
|
|
100
108
|
"default": "./dist/fesm2022/wirekyt-angular-presence.mjs"
|
|
@@ -108,7 +116,7 @@
|
|
|
108
116
|
"dependencies": {
|
|
109
117
|
"@internationalized/date": "^3.12.3",
|
|
110
118
|
"@internationalized/number": "^3.6.7",
|
|
111
|
-
"@wirekyt/dom": "0.0.
|
|
119
|
+
"@wirekyt/dom": "0.0.22",
|
|
112
120
|
"tslib": "^2.8.1"
|
|
113
121
|
},
|
|
114
122
|
"peerDependencies": {
|