ud-components 0.7.8 → 0.7.9
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.
|
@@ -5651,6 +5651,205 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
5651
5651
|
type: Input
|
|
5652
5652
|
}] } });
|
|
5653
5653
|
|
|
5654
|
+
/**
|
|
5655
|
+
* Money as decimal strings, never JS numbers (UC-23). `0.1 + 0.2` is
|
|
5656
|
+
* `0.30000000000000004`; an amount that went through a float can reach the API
|
|
5657
|
+
* a cent off. Everything here works on the digits of the string, and the only
|
|
5658
|
+
* arithmetic is on whole cents.
|
|
5659
|
+
*/
|
|
5660
|
+
/**
|
|
5661
|
+
* Reads what a person typed or pasted: "1,234.5", "$1234.50", " 12 ", "CA$ 3".
|
|
5662
|
+
* Currency symbols, letters, spaces and thousands commas are dropped; at most
|
|
5663
|
+
* {@link decimals} decimals are allowed; the result is padded to exactly that
|
|
5664
|
+
* many ("12" → "12.00").
|
|
5665
|
+
*/
|
|
5666
|
+
function parseMoney(raw, decimals = 2, allowNegative = false) {
|
|
5667
|
+
if (raw === null || raw === undefined) {
|
|
5668
|
+
return { value: null };
|
|
5669
|
+
}
|
|
5670
|
+
const text = String(raw).trim();
|
|
5671
|
+
if (text === '') {
|
|
5672
|
+
return { value: null };
|
|
5673
|
+
}
|
|
5674
|
+
const negative = text.includes('-');
|
|
5675
|
+
const cleaned = text.replace(/[^0-9.]/g, '');
|
|
5676
|
+
if (!/^\d*\.?\d*$/.test(cleaned) || !/\d/.test(cleaned)) {
|
|
5677
|
+
return { error: 'format' };
|
|
5678
|
+
}
|
|
5679
|
+
if (negative && !allowNegative) {
|
|
5680
|
+
return { error: 'negative' };
|
|
5681
|
+
}
|
|
5682
|
+
const [whole, fraction = ''] = cleaned.split('.');
|
|
5683
|
+
if (fraction.length > decimals) {
|
|
5684
|
+
return { error: 'decimals' };
|
|
5685
|
+
}
|
|
5686
|
+
const integer = whole.replace(/^0+(?=\d)/, '') || '0';
|
|
5687
|
+
const padded = decimals > 0 ? '.' + fraction.padEnd(decimals, '0') : '';
|
|
5688
|
+
const value = integer + padded;
|
|
5689
|
+
return { value: negative && /[1-9]/.test(value) ? '-' + value : value };
|
|
5690
|
+
}
|
|
5691
|
+
/** Whole cents of a normalised 2-decimal string: "1234.50" → 123450. */
|
|
5692
|
+
function moneyToCents(value) {
|
|
5693
|
+
const negative = value.startsWith('-');
|
|
5694
|
+
const [whole, fraction = ''] = value.replace('-', '').split('.');
|
|
5695
|
+
const cents = Number(whole) * 100 + Number(fraction.padEnd(2, '0').slice(0, 2));
|
|
5696
|
+
return negative ? -cents : cents;
|
|
5697
|
+
}
|
|
5698
|
+
/** The inverse of {@link moneyToCents}: 123450 → "1234.50". Rounds nothing; give it whole cents. */
|
|
5699
|
+
function centsToMoney(cents) {
|
|
5700
|
+
const negative = cents < 0;
|
|
5701
|
+
const abs = Math.abs(Math.trunc(cents));
|
|
5702
|
+
const value = `${Math.floor(abs / 100)}.${String(abs % 100).padStart(2, '0')}`;
|
|
5703
|
+
return negative ? '-' + value : value;
|
|
5704
|
+
}
|
|
5705
|
+
/** For display only: "1234.50" → "1,234.50". Never parse this back as a number. */
|
|
5706
|
+
function groupThousands(value) {
|
|
5707
|
+
const negative = value.startsWith('-');
|
|
5708
|
+
const [whole, fraction] = value.replace('-', '').split('.');
|
|
5709
|
+
const grouped = whole.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
5710
|
+
return (negative ? '-' : '') + grouped + (fraction !== undefined ? '.' + fraction : '');
|
|
5711
|
+
}
|
|
5712
|
+
|
|
5713
|
+
/**
|
|
5714
|
+
* An amount of money, or a percentage, as a decimal string (UC-23).
|
|
5715
|
+
*
|
|
5716
|
+
* <p>Same conventions as the other form fields: bound by {@code controlName}
|
|
5717
|
+
* inside a parent FormGroup. The control's value is a normalised decimal
|
|
5718
|
+
* string ({@code "412.30"}), never a number, so float error never reaches an
|
|
5719
|
+
* API. Paste-tolerant ({@code "$1,234.5"}), shown with thousands separators
|
|
5720
|
+
* once the field loses focus. While the text cannot be read, the control holds
|
|
5721
|
+
* the raw text and carries a {@code udMoney} error.
|
|
5722
|
+
*
|
|
5723
|
+
* <p>Percent mode: a {@code %} suffix, 0 to 100 unless min / max say
|
|
5724
|
+
* otherwise, still two decimals.
|
|
5725
|
+
*/
|
|
5726
|
+
class MoneyInputComponent {
|
|
5727
|
+
controlName;
|
|
5728
|
+
label = '';
|
|
5729
|
+
placeholder = '0.00';
|
|
5730
|
+
/** Shown before the amount, e.g. "$" or "CAD". Ignored in percent mode. */
|
|
5731
|
+
currency = '';
|
|
5732
|
+
mode = 'amount';
|
|
5733
|
+
/** Decimal strings, inclusive. Percent mode defaults to 0 and 100. */
|
|
5734
|
+
min;
|
|
5735
|
+
max;
|
|
5736
|
+
allowNegative = false;
|
|
5737
|
+
disabled = false;
|
|
5738
|
+
hint = '';
|
|
5739
|
+
size = 'medium';
|
|
5740
|
+
text = signal('');
|
|
5741
|
+
focused = signal(false);
|
|
5742
|
+
controlContainer = inject(ControlContainer);
|
|
5743
|
+
destroyRef = inject(DestroyRef);
|
|
5744
|
+
validator = (control) => this.validate(control.value);
|
|
5745
|
+
get control() {
|
|
5746
|
+
return this.controlContainer.control.get(this.controlName);
|
|
5747
|
+
}
|
|
5748
|
+
get error() {
|
|
5749
|
+
const kind = this.control.errors?.['udMoney'];
|
|
5750
|
+
switch (kind) {
|
|
5751
|
+
case 'format': return 'Enter a number, such as 12.50.';
|
|
5752
|
+
case 'decimals': return 'Use at most 2 decimals.';
|
|
5753
|
+
case 'negative': return 'Must be 0 or more.';
|
|
5754
|
+
case 'min': return `Must be at least ${this.effectiveMin}.`;
|
|
5755
|
+
case 'max': return `Must be at most ${this.effectiveMax}.`;
|
|
5756
|
+
default: return null;
|
|
5757
|
+
}
|
|
5758
|
+
}
|
|
5759
|
+
ngOnInit() {
|
|
5760
|
+
this.control.addValidators(this.validator);
|
|
5761
|
+
this.control.updateValueAndValidity({ emitEvent: false });
|
|
5762
|
+
this.showValue(this.control.value);
|
|
5763
|
+
this.control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(value => {
|
|
5764
|
+
if (!this.focused()) {
|
|
5765
|
+
this.showValue(value);
|
|
5766
|
+
}
|
|
5767
|
+
});
|
|
5768
|
+
}
|
|
5769
|
+
ngOnChanges(changes) {
|
|
5770
|
+
if (changes['disabled'] && this.controlName) {
|
|
5771
|
+
this.disabled ? this.control.disable() : this.control.enable();
|
|
5772
|
+
}
|
|
5773
|
+
if ((changes['min'] || changes['max'] || changes['mode']) && this.controlName && this.controlContainer.control) {
|
|
5774
|
+
this.control.updateValueAndValidity({ emitEvent: false });
|
|
5775
|
+
}
|
|
5776
|
+
}
|
|
5777
|
+
onInput(raw) {
|
|
5778
|
+
this.text.set(raw);
|
|
5779
|
+
const parsed = parseMoney(raw, 2, this.allowNegative);
|
|
5780
|
+
this.control.setValue(parsed.error ? raw : parsed.value);
|
|
5781
|
+
this.control.markAsDirty();
|
|
5782
|
+
}
|
|
5783
|
+
onBlur() {
|
|
5784
|
+
this.focused.set(false);
|
|
5785
|
+
this.control.markAsTouched();
|
|
5786
|
+
this.showValue(this.control.value);
|
|
5787
|
+
}
|
|
5788
|
+
showValue(value) {
|
|
5789
|
+
const parsed = parseMoney(value, 2, true);
|
|
5790
|
+
if (parsed.error || parsed.value === null || parsed.value === undefined) {
|
|
5791
|
+
this.text.set(value === null || value === undefined ? '' : String(value));
|
|
5792
|
+
}
|
|
5793
|
+
else {
|
|
5794
|
+
this.text.set(this.mode === 'percent' ? parsed.value : groupThousands(parsed.value));
|
|
5795
|
+
}
|
|
5796
|
+
}
|
|
5797
|
+
get effectiveMin() {
|
|
5798
|
+
return this.min ?? (this.mode === 'percent' ? '0' : undefined);
|
|
5799
|
+
}
|
|
5800
|
+
get effectiveMax() {
|
|
5801
|
+
return this.max ?? (this.mode === 'percent' ? '100' : undefined);
|
|
5802
|
+
}
|
|
5803
|
+
validate(value) {
|
|
5804
|
+
const parsed = parseMoney(value, 2, this.allowNegative);
|
|
5805
|
+
if (parsed.error) {
|
|
5806
|
+
return { udMoney: parsed.error };
|
|
5807
|
+
}
|
|
5808
|
+
if (parsed.value === null || parsed.value === undefined) {
|
|
5809
|
+
return null;
|
|
5810
|
+
}
|
|
5811
|
+
const cents = moneyToCents(parsed.value);
|
|
5812
|
+
const min = this.effectiveMin;
|
|
5813
|
+
const max = this.effectiveMax;
|
|
5814
|
+
if (min !== undefined && cents < moneyToCents(parseMoney(min, 2, true).value ?? '0')) {
|
|
5815
|
+
return { udMoney: 'min' };
|
|
5816
|
+
}
|
|
5817
|
+
if (max !== undefined && cents > moneyToCents(parseMoney(max, 2, true).value ?? '0')) {
|
|
5818
|
+
return { udMoney: 'max' };
|
|
5819
|
+
}
|
|
5820
|
+
return null;
|
|
5821
|
+
}
|
|
5822
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: MoneyInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5823
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: MoneyInputComponent, isStandalone: true, selector: "ud-money-input", inputs: { controlName: "controlName", label: "label", placeholder: "placeholder", currency: "currency", mode: "mode", min: "min", max: "max", allowNegative: "allowNegative", disabled: "disabled", hint: "hint", size: "size" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"ud-input\"\n [class]=\"'ud-input--' + size\"\n [class.ud-input--focused]=\"focused()\"\n [class.ud-input--disabled]=\"control.disabled\"\n [class.ud-input--error]=\"control.invalid && control.touched\">\n @if (label) {\n <label class=\"ud-input__label\" [for]=\"'ud-money-' + controlName\">{{ label }}</label>\n }\n <div class=\"ud-input__wrapper\">\n @if (mode === 'amount' && currency) {\n <span class=\"ud-money__affix\">{{ currency }}</span>\n }\n <input\n class=\"ud-input__field ud-money__field\"\n [id]=\"'ud-money-' + controlName\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n [placeholder]=\"placeholder\"\n [disabled]=\"control.disabled\"\n [value]=\"text()\"\n (input)=\"onInput($any($event.target).value)\"\n (focus)=\"focused.set(true)\"\n (blur)=\"onBlur()\" />\n @if (mode === 'percent') {\n <span class=\"ud-money__affix\">%</span>\n }\n </div>\n @if (control.invalid && control.touched && error) {\n <span class=\"ud-input__hint ud-money__error\">{{ error }}</span>\n } @else if (hint) {\n <span class=\"ud-input__hint\">{{ hint }}</span>\n }\n</div>\n", styles: [":host{display:block;width:100%}.ud-input{display:flex;flex-direction:column;gap:5px;width:100%}.ud-input__label{font-family:DM Sans,system-ui,sans-serif;font-size:13px;font-weight:500;color:var(--eu-text, #2a3548);line-height:1}.ud-input__wrapper--no-right-pad{padding-right:0!important}.ud-input__wrapper{display:flex;align-items:center;background:#f8fafc;border:1px solid var(--eu-border-mid, #d8dde6);transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;overflow:hidden}.ud-input--focused .ud-input__wrapper{border-color:var(--eu-navy, #1b2535);box-shadow:0 0 0 3px #1b253514;background:#fff}.ud-input--error .ud-input__wrapper{border-color:#e53935;box-shadow:0 0 0 3px #e539351a}.ud-input--error.ud-input--focused .ud-input__wrapper{border-color:#e53935}.ud-input--disabled .ud-input__wrapper{background:var(--eu-bg, #f4f5f7);border-color:var(--eu-border-light, #e8eaef);cursor:not-allowed;opacity:.6}.ud-input__icon{flex-shrink:0;color:var(--eu-muted, #6b7585);transition:color .18s ease;line-height:1}.ud-input--focused .ud-input__icon{color:var(--eu-navy, #1b2535)}.ud-input__field{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:DM Sans,system-ui,sans-serif;color:var(--eu-text, #2a3548);width:100%}.ud-input__field::placeholder{color:var(--eu-muted, #9099a8)}.ud-input__field:disabled{cursor:not-allowed;color:var(--eu-muted, #9099a8)}.ud-input__field[type=number]{-moz-appearance:textfield}.ud-input__field[type=number]::-webkit-outer-spin-button,.ud-input__field[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.ud-input__suffix{flex-shrink:0;color:var(--eu-muted, #6b7585)}.ud-input__loading{animation:ud-spin .8s linear infinite}@keyframes ud-spin{to{transform:rotate(360deg)}}.ud-input__clear-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--eu-muted, #6b7585);border-radius:50%;transition:color .15s ease,background .15s ease}.ud-input__clear-btn mat-icon{font-size:16px;width:16px;height:16px}.ud-input__clear-btn:hover{color:var(--eu-navy, #1b2535);background:#1b25350f}.ud-input__hint{font-family:DM Sans,system-ui,sans-serif;font-size:12px;color:var(--eu-muted, #6b7585);line-height:1.3}.ud-number-arrows{display:flex;flex-direction:column;align-self:stretch;border-left:1px solid var(--eu-border-mid, #d8dde6);width:28px;overflow:hidden;flex-shrink:0}.ud-arrow-btn{flex:1;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:var(--eu-muted, #6b7585);transition:background .15s ease,color .15s ease}.ud-arrow-btn:first-child{border-bottom:1px solid var(--eu-border-mid, #d8dde6)}.ud-arrow-btn:hover{background:#1b253512;color:var(--eu-navy, #1b2535)}.ud-arrow-btn:active{background:#1b253521}.ud-arrow-btn .mat-icon{font-size:14px;width:14px;height:14px;line-height:14px}.ud-input--small .ud-input__wrapper{height:32px;border-radius:7px;padding:0 10px;gap:6px}.ud-input--small .ud-input__field{font-size:13px}.ud-input--small .ud-input__icon,.ud-input--small .ud-input__suffix{font-size:16px;width:16px;height:16px}.ud-input--small .ud-input__label{padding-left:1px}.ud-input--medium .ud-input__wrapper{height:40px;border-radius:8px;padding:0 12px;gap:7px}.ud-input--medium .ud-input__field{font-size:14px}.ud-input--medium .ud-input__icon,.ud-input--medium .ud-input__suffix{font-size:18px;width:18px;height:18px}.ud-input--medium .ud-input__label{padding-left:1px}.ud-input--large .ud-input__wrapper{height:48px;border-radius:9px;padding:0 14px;gap:8px}.ud-input--large .ud-input__field{font-size:15px}.ud-input--large .ud-input__icon,.ud-input--large .ud-input__suffix{font-size:20px;width:20px;height:20px}.ud-input--large .ud-input__label{padding-left:1px}\n", ".ud-money__affix{flex-shrink:0;font-family:DM Sans,system-ui,sans-serif;font-size:13px;font-weight:500;color:var(--eu-text-muted, #6b7585)}.ud-money__field{text-align:right;font-variant-numeric:tabular-nums}.ud-money__error{color:#e53935}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }], viewProviders: [{ provide: ControlContainer, useFactory: () => inject(ControlContainer, { skipSelf: true }) }] });
|
|
5824
|
+
}
|
|
5825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: MoneyInputComponent, decorators: [{
|
|
5826
|
+
type: Component,
|
|
5827
|
+
args: [{ selector: 'ud-money-input', standalone: true, imports: [CommonModule, ReactiveFormsModule], viewProviders: [{ provide: ControlContainer, useFactory: () => inject(ControlContainer, { skipSelf: true }) }], template: "<div\n class=\"ud-input\"\n [class]=\"'ud-input--' + size\"\n [class.ud-input--focused]=\"focused()\"\n [class.ud-input--disabled]=\"control.disabled\"\n [class.ud-input--error]=\"control.invalid && control.touched\">\n @if (label) {\n <label class=\"ud-input__label\" [for]=\"'ud-money-' + controlName\">{{ label }}</label>\n }\n <div class=\"ud-input__wrapper\">\n @if (mode === 'amount' && currency) {\n <span class=\"ud-money__affix\">{{ currency }}</span>\n }\n <input\n class=\"ud-input__field ud-money__field\"\n [id]=\"'ud-money-' + controlName\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n [placeholder]=\"placeholder\"\n [disabled]=\"control.disabled\"\n [value]=\"text()\"\n (input)=\"onInput($any($event.target).value)\"\n (focus)=\"focused.set(true)\"\n (blur)=\"onBlur()\" />\n @if (mode === 'percent') {\n <span class=\"ud-money__affix\">%</span>\n }\n </div>\n @if (control.invalid && control.touched && error) {\n <span class=\"ud-input__hint ud-money__error\">{{ error }}</span>\n } @else if (hint) {\n <span class=\"ud-input__hint\">{{ hint }}</span>\n }\n</div>\n", styles: [":host{display:block;width:100%}.ud-input{display:flex;flex-direction:column;gap:5px;width:100%}.ud-input__label{font-family:DM Sans,system-ui,sans-serif;font-size:13px;font-weight:500;color:var(--eu-text, #2a3548);line-height:1}.ud-input__wrapper--no-right-pad{padding-right:0!important}.ud-input__wrapper{display:flex;align-items:center;background:#f8fafc;border:1px solid var(--eu-border-mid, #d8dde6);transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;overflow:hidden}.ud-input--focused .ud-input__wrapper{border-color:var(--eu-navy, #1b2535);box-shadow:0 0 0 3px #1b253514;background:#fff}.ud-input--error .ud-input__wrapper{border-color:#e53935;box-shadow:0 0 0 3px #e539351a}.ud-input--error.ud-input--focused .ud-input__wrapper{border-color:#e53935}.ud-input--disabled .ud-input__wrapper{background:var(--eu-bg, #f4f5f7);border-color:var(--eu-border-light, #e8eaef);cursor:not-allowed;opacity:.6}.ud-input__icon{flex-shrink:0;color:var(--eu-muted, #6b7585);transition:color .18s ease;line-height:1}.ud-input--focused .ud-input__icon{color:var(--eu-navy, #1b2535)}.ud-input__field{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:DM Sans,system-ui,sans-serif;color:var(--eu-text, #2a3548);width:100%}.ud-input__field::placeholder{color:var(--eu-muted, #9099a8)}.ud-input__field:disabled{cursor:not-allowed;color:var(--eu-muted, #9099a8)}.ud-input__field[type=number]{-moz-appearance:textfield}.ud-input__field[type=number]::-webkit-outer-spin-button,.ud-input__field[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.ud-input__suffix{flex-shrink:0;color:var(--eu-muted, #6b7585)}.ud-input__loading{animation:ud-spin .8s linear infinite}@keyframes ud-spin{to{transform:rotate(360deg)}}.ud-input__clear-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--eu-muted, #6b7585);border-radius:50%;transition:color .15s ease,background .15s ease}.ud-input__clear-btn mat-icon{font-size:16px;width:16px;height:16px}.ud-input__clear-btn:hover{color:var(--eu-navy, #1b2535);background:#1b25350f}.ud-input__hint{font-family:DM Sans,system-ui,sans-serif;font-size:12px;color:var(--eu-muted, #6b7585);line-height:1.3}.ud-number-arrows{display:flex;flex-direction:column;align-self:stretch;border-left:1px solid var(--eu-border-mid, #d8dde6);width:28px;overflow:hidden;flex-shrink:0}.ud-arrow-btn{flex:1;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:var(--eu-muted, #6b7585);transition:background .15s ease,color .15s ease}.ud-arrow-btn:first-child{border-bottom:1px solid var(--eu-border-mid, #d8dde6)}.ud-arrow-btn:hover{background:#1b253512;color:var(--eu-navy, #1b2535)}.ud-arrow-btn:active{background:#1b253521}.ud-arrow-btn .mat-icon{font-size:14px;width:14px;height:14px;line-height:14px}.ud-input--small .ud-input__wrapper{height:32px;border-radius:7px;padding:0 10px;gap:6px}.ud-input--small .ud-input__field{font-size:13px}.ud-input--small .ud-input__icon,.ud-input--small .ud-input__suffix{font-size:16px;width:16px;height:16px}.ud-input--small .ud-input__label{padding-left:1px}.ud-input--medium .ud-input__wrapper{height:40px;border-radius:8px;padding:0 12px;gap:7px}.ud-input--medium .ud-input__field{font-size:14px}.ud-input--medium .ud-input__icon,.ud-input--medium .ud-input__suffix{font-size:18px;width:18px;height:18px}.ud-input--medium .ud-input__label{padding-left:1px}.ud-input--large .ud-input__wrapper{height:48px;border-radius:9px;padding:0 14px;gap:8px}.ud-input--large .ud-input__field{font-size:15px}.ud-input--large .ud-input__icon,.ud-input--large .ud-input__suffix{font-size:20px;width:20px;height:20px}.ud-input--large .ud-input__label{padding-left:1px}\n", ".ud-money__affix{flex-shrink:0;font-family:DM Sans,system-ui,sans-serif;font-size:13px;font-weight:500;color:var(--eu-text-muted, #6b7585)}.ud-money__field{text-align:right;font-variant-numeric:tabular-nums}.ud-money__error{color:#e53935}\n"] }]
|
|
5828
|
+
}], propDecorators: { controlName: [{
|
|
5829
|
+
type: Input,
|
|
5830
|
+
args: [{ required: true }]
|
|
5831
|
+
}], label: [{
|
|
5832
|
+
type: Input
|
|
5833
|
+
}], placeholder: [{
|
|
5834
|
+
type: Input
|
|
5835
|
+
}], currency: [{
|
|
5836
|
+
type: Input
|
|
5837
|
+
}], mode: [{
|
|
5838
|
+
type: Input
|
|
5839
|
+
}], min: [{
|
|
5840
|
+
type: Input
|
|
5841
|
+
}], max: [{
|
|
5842
|
+
type: Input
|
|
5843
|
+
}], allowNegative: [{
|
|
5844
|
+
type: Input
|
|
5845
|
+
}], disabled: [{
|
|
5846
|
+
type: Input
|
|
5847
|
+
}], hint: [{
|
|
5848
|
+
type: Input
|
|
5849
|
+
}], size: [{
|
|
5850
|
+
type: Input
|
|
5851
|
+
}] } });
|
|
5852
|
+
|
|
5654
5853
|
class CalendarComponent {
|
|
5655
5854
|
slots = input([]);
|
|
5656
5855
|
mode = input('admin');
|
|
@@ -7032,5 +7231,5 @@ const generateTimeOptions = (start, end, intervalMinutes = 5) => {
|
|
|
7032
7231
|
* Generated bundle index. Do not edit.
|
|
7033
7232
|
*/
|
|
7034
7233
|
|
|
7035
|
-
export { ApplicationStatus, AutocompleteComponent, CalendarComponent, CalendarSlotColor, CapitalizePipe, CarouselComponent, CheckboxComponent, ChipInputComponent, ColumnVisibilityModalComponent, CustomInputComponent, CustomSnackbarComponent, CustomTableComponent, DateInputComponent, DateOperator, DateRangeInputComponent, DynamicComponentComponent, EditViewComponent, EditViewSectionDirective, FeatureFlagKey, FileInputComponent, FilterType, GROUP_ROW_HEIGHT, IconColor, KpiComponent, KpiDataType, KpiPillType, KpiProgressBarType, KpiVariant, LoadingStatus, ModalComponent, ModalInputType, MultiSelectComponent, MultiSelectMatchMode, NumberOperator, OCCUPANCY_GRID_HEADER_HEIGHT, OccupancyGridComponent, PhoneInputComponent, PillComponent, PillToggleComponent, PluralizePipe, ProgressBarComponent, SafePipe, SingularPipe, SnackbarType, StringOperator, SummaryViewComponent, TableDisplayColumnType, TabsComponent, TelInputComponent, TextInputComponent, TextareaComponent, TimePickerComponent, ToObservablePipe, ToggleComponent, ToggleOptionComponent, TranslateWrapperService, UD_COMPONENTS_TRANSLATIONS, UdButtonComponent, UdButtonToggleComponent, UdPreviewContainerComponent, UdStepContentDirective, UdStepperComponent, UdTooltipComponent, UdTooltipDirective, addDays, assignLanes, barGeometry, buildRows, capitalize, clampToClosures, closureGeometry, dateAtOffset, dayColumns, dayOfMonth, daysBetween, epochDay, formatLocalDate, formatLocalDateTime, formatLocalDateTimeLongForm, formatLocalTime, formatLocalTimeWithMinutes, formatLocalTimeWithMinutesAmPm, formatMonthYear, formatPhoneNumber, formatStringDate, formatStringDateTime, generateTimeOptions, inListValidator, isIsoDate, laneForSpan, laneNeighborBound, maxIso, minIso, monthOf, monthSegments, overbooksRoom, overlapsClosure, overlapsRoom, parseLocalDate, pluralize, positionRows, rowHeight, spaceCase, takenOn, totalHeight, udComponentsOnlyTranslateLoader, udComponentsTranslationsFor, updateArray, visibleRange, weekday, weekendOffsetDays, withLoadingState, withUdComponentsTranslations, yearOf };
|
|
7234
|
+
export { ApplicationStatus, AutocompleteComponent, CalendarComponent, CalendarSlotColor, CapitalizePipe, CarouselComponent, CheckboxComponent, ChipInputComponent, ColumnVisibilityModalComponent, CustomInputComponent, CustomSnackbarComponent, CustomTableComponent, DateInputComponent, DateOperator, DateRangeInputComponent, DynamicComponentComponent, EditViewComponent, EditViewSectionDirective, FeatureFlagKey, FileInputComponent, FilterType, GROUP_ROW_HEIGHT, IconColor, KpiComponent, KpiDataType, KpiPillType, KpiProgressBarType, KpiVariant, LoadingStatus, ModalComponent, ModalInputType, MoneyInputComponent, MultiSelectComponent, MultiSelectMatchMode, NumberOperator, OCCUPANCY_GRID_HEADER_HEIGHT, OccupancyGridComponent, PhoneInputComponent, PillComponent, PillToggleComponent, PluralizePipe, ProgressBarComponent, SafePipe, SingularPipe, SnackbarType, StringOperator, SummaryViewComponent, TableDisplayColumnType, TabsComponent, TelInputComponent, TextInputComponent, TextareaComponent, TimePickerComponent, ToObservablePipe, ToggleComponent, ToggleOptionComponent, TranslateWrapperService, UD_COMPONENTS_TRANSLATIONS, UdButtonComponent, UdButtonToggleComponent, UdPreviewContainerComponent, UdStepContentDirective, UdStepperComponent, UdTooltipComponent, UdTooltipDirective, addDays, assignLanes, barGeometry, buildRows, capitalize, centsToMoney, clampToClosures, closureGeometry, dateAtOffset, dayColumns, dayOfMonth, daysBetween, epochDay, formatLocalDate, formatLocalDateTime, formatLocalDateTimeLongForm, formatLocalTime, formatLocalTimeWithMinutes, formatLocalTimeWithMinutesAmPm, formatMonthYear, formatPhoneNumber, formatStringDate, formatStringDateTime, generateTimeOptions, groupThousands, inListValidator, isIsoDate, laneForSpan, laneNeighborBound, maxIso, minIso, moneyToCents, monthOf, monthSegments, overbooksRoom, overlapsClosure, overlapsRoom, parseLocalDate, parseMoney, pluralize, positionRows, rowHeight, spaceCase, takenOn, totalHeight, udComponentsOnlyTranslateLoader, udComponentsTranslationsFor, updateArray, visibleRange, weekday, weekendOffsetDays, withLoadingState, withUdComponentsTranslations, yearOf };
|
|
7036
7235
|
//# sourceMappingURL=ud-components.mjs.map
|