@magmonium/one 0.2.79 → 0.2.80
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/assets/i18n/en.json +10 -1
- package/assets/index.json +1 -1
- package/assets/options/file_accept.json +89 -0
- package/assets/patterns/aspect-ratio.json +5 -0
- package/fesm2022/magmonium-one-image-editor-DleCJcan.mjs +290 -0
- package/fesm2022/magmonium-one-image-editor-DleCJcan.mjs.map +1 -0
- package/fesm2022/{magmonium-one-magmonium-one-CVuP1oHe.mjs → magmonium-one-magmonium-one-DpJYXHAK.mjs} +730 -63
- package/fesm2022/magmonium-one-magmonium-one-DpJYXHAK.mjs.map +1 -0
- package/fesm2022/{magmonium-one-otp-T4eYO6SM.mjs → magmonium-one-otp-6WQxmRKG.mjs} +2 -2
- package/fesm2022/{magmonium-one-otp-T4eYO6SM.mjs.map → magmonium-one-otp-6WQxmRKG.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-rGcfKu8z.mjs → magmonium-one-password-49sBxeSV.mjs} +2 -2
- package/fesm2022/{magmonium-one-password-rGcfKu8z.mjs.map → magmonium-one-password-49sBxeSV.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-toggle-DBQMTJ6O.mjs → magmonium-one-toggle-Ds_jl5Lz.mjs} +2 -2
- package/fesm2022/{magmonium-one-toggle-DBQMTJ6O.mjs.map → magmonium-one-toggle-Ds_jl5Lz.mjs.map} +1 -1
- package/fesm2022/magmonium-one.mjs +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +111 -11
- package/fesm2022/magmonium-one-magmonium-one-CVuP1oHe.mjs.map +0 -1
|
@@ -10,7 +10,7 @@ import { io } from 'socket.io-client';
|
|
|
10
10
|
import { DefaultUrlSerializer, UrlSerializer, Router, NavigationEnd, RouterModule, RouterLink, provideRouter, withComponentInputBinding, withRouterConfig, RouterOutlet } from '@angular/router';
|
|
11
11
|
import * as i1 from '@angular/common';
|
|
12
12
|
import { APP_BASE_HREF, Location, NgOptimizedImage, IMAGE_LOADER, NgTemplateOutlet, CommonModule, NgComponentOutlet, DecimalPipe, NgClass, DatePipe, NgStyle } from '@angular/common';
|
|
13
|
-
import { FormField, email, required, minLength, maxLength, min, max,
|
|
13
|
+
import { FormField, email, required, validate, minLength, maxLength, min, max, apply, form } from '@angular/forms/signals';
|
|
14
14
|
import { createCustomElement } from '@angular/elements';
|
|
15
15
|
import { bootstrapApplication, DomSanitizer } from '@angular/platform-browser';
|
|
16
16
|
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
@@ -6765,6 +6765,16 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
6765
6765
|
isCheckboxVisible = input(...(ngDevMode ? [undefined, { debugName: "isCheckboxVisible" }] : /* istanbul ignore next */ []));
|
|
6766
6766
|
enlarge = input(...(ngDevMode ? [undefined, { debugName: "enlarge" }] : /* istanbul ignore next */ []));
|
|
6767
6767
|
optionsAsset = input(...(ngDevMode ? [undefined, { debugName: "optionsAsset" }] : /* istanbul ignore next */ []));
|
|
6768
|
+
// A `file` Field's settings. `accept` is one comma-separated scalar, the
|
|
6769
|
+
// spelling the native attribute already takes, so it rides on the tag the way
|
|
6770
|
+
// `patterns` does below rather than as a list (ADR 0010).
|
|
6771
|
+
accept = input(...(ngDevMode ? [undefined, { debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
6772
|
+
maxSize = input(...(ngDevMode ? [undefined, { debugName: "maxSize" }] : /* istanbul ignore next */ []));
|
|
6773
|
+
dropZone = input(...(ngDevMode ? [undefined, { debugName: "dropZone" }] : /* istanbul ignore next */ []));
|
|
6774
|
+
readAs = input(...(ngDevMode ? [undefined, { debugName: "readAs" }] : /* istanbul ignore next */ []));
|
|
6775
|
+
editor = input(...(ngDevMode ? [undefined, { debugName: "editor" }] : /* istanbul ignore next */ []));
|
|
6776
|
+
ratio = input(...(ngDevMode ? [undefined, { debugName: "ratio" }] : /* istanbul ignore next */ []));
|
|
6777
|
+
width = input(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
6768
6778
|
// The shapes this Field's value may take, named on the tag the way every
|
|
6769
6779
|
// other setting is (ADR 0010). One scalar rather than a list: the names are
|
|
6770
6780
|
// comma-separated and resolved into rules here, so the markup says which
|
|
@@ -6819,6 +6829,13 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
6819
6829
|
put('iconOnly', toAttrBool(this.iconOnly()));
|
|
6820
6830
|
put('isCheckboxVisible', toAttrBool(this.isCheckboxVisible()));
|
|
6821
6831
|
put('enlarge', toAttrBool(this.enlarge()));
|
|
6832
|
+
put('accept', this.accept());
|
|
6833
|
+
put('maxSize', toAttrNumber(this.maxSize()));
|
|
6834
|
+
put('dropZone', toAttrBool(this.dropZone()));
|
|
6835
|
+
put('readAs', this.readAs());
|
|
6836
|
+
put('editor', toAttrBool(this.editor()));
|
|
6837
|
+
put('ratio', this.ratio());
|
|
6838
|
+
put('width', toAttrNumber(this.width()));
|
|
6822
6839
|
// An OptionsSource on the tag outranks the asset's own key, and the plain
|
|
6823
6840
|
// attribute outranks both — same order every other key follows.
|
|
6824
6841
|
put('optionsAsset', this.optionsAsset() ?? this.optionsSource?.name());
|
|
@@ -7033,7 +7050,7 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
7033
7050
|
break;
|
|
7034
7051
|
}
|
|
7035
7052
|
case InputType.TOGGLE: {
|
|
7036
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
7053
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-Ds_jl5Lz.mjs');
|
|
7037
7054
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
7038
7055
|
break;
|
|
7039
7056
|
}
|
|
@@ -7045,12 +7062,12 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
7045
7062
|
break;
|
|
7046
7063
|
}
|
|
7047
7064
|
case InputType.PASSWORD: {
|
|
7048
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
7065
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-49sBxeSV.mjs');
|
|
7049
7066
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
7050
7067
|
break;
|
|
7051
7068
|
}
|
|
7052
7069
|
case InputType.OTP: {
|
|
7053
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
7070
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-6WQxmRKG.mjs');
|
|
7054
7071
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
7055
7072
|
break;
|
|
7056
7073
|
}
|
|
@@ -7122,6 +7139,12 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
7122
7139
|
]);
|
|
7123
7140
|
break;
|
|
7124
7141
|
}
|
|
7142
|
+
case InputType.FILE:
|
|
7143
|
+
case InputType.FOLDER: {
|
|
7144
|
+
const { FileUploadInputComponent } = await Promise.resolve().then(function () { return fileUploadInput; });
|
|
7145
|
+
this.createDynamicComponent(seq, FileUploadInputComponent);
|
|
7146
|
+
break;
|
|
7147
|
+
}
|
|
7125
7148
|
default: {
|
|
7126
7149
|
const { TextInputComponent } = await Promise.resolve().then(function () { return text; });
|
|
7127
7150
|
this.createDynamicComponent(seq, TextInputComponent);
|
|
@@ -7134,7 +7157,7 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
7134
7157
|
}
|
|
7135
7158
|
};
|
|
7136
7159
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SectionFormItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: SectionFormItemComponent, isStandalone: true, selector: "m-section-form-item, m-one-section-form-item", inputs: { span: { classPropertyName: "span", publicName: "span", isSignal: true, isRequired: false, transformFunction: null }, labelOrientation: { classPropertyName: "labelOrientation", publicName: "labelOrientation", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, aclResolver: { classPropertyName: "aclResolver", publicName: "aclResolver", isSignal: true, isRequired: false, transformFunction: null }, formValues: { classPropertyName: "formValues", publicName: "formValues", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, button: { classPropertyName: "button", publicName: "button", isSignal: true, isRequired: false, transformFunction: null }, buttonAction: { classPropertyName: "buttonAction", publicName: "buttonAction", isSignal: true, isRequired: false, transformFunction: null }, buttonAcl: { classPropertyName: "buttonAcl", publicName: "buttonAcl", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, acl: { classPropertyName: "acl", publicName: "acl", isSignal: true, isRequired: false, transformFunction: null }, testid: { classPropertyName: "testid", publicName: "testid", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, equalWidth: { classPropertyName: "equalWidth", publicName: "equalWidth", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, isCheckboxVisible: { classPropertyName: "isCheckboxVisible", publicName: "isCheckboxVisible", isSignal: true, isRequired: false, transformFunction: null }, enlarge: { classPropertyName: "enlarge", publicName: "enlarge", isSignal: true, isRequired: false, transformFunction: null }, optionsAsset: { classPropertyName: "optionsAsset", publicName: "optionsAsset", isSignal: true, isRequired: false, transformFunction: null }, patterns: { classPropertyName: "patterns", publicName: "patterns", isSignal: true, isRequired: false, transformFunction: null }, patternMessage: { classPropertyName: "patternMessage", publicName: "patternMessage", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", act: "act", fieldKey: "fieldKey" }, host: { properties: { "class": "spanClass()", "style.display": "isVisible() ? null : \"none\"" } }, queries: [{ propertyName: "projectedTemplate", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dynamicInput", first: true, predicate: ["dynamicInput"], descendants: true, read: ViewContainerRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
7160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: SectionFormItemComponent, isStandalone: true, selector: "m-section-form-item, m-one-section-form-item", inputs: { span: { classPropertyName: "span", publicName: "span", isSignal: true, isRequired: false, transformFunction: null }, labelOrientation: { classPropertyName: "labelOrientation", publicName: "labelOrientation", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, aclResolver: { classPropertyName: "aclResolver", publicName: "aclResolver", isSignal: true, isRequired: false, transformFunction: null }, formValues: { classPropertyName: "formValues", publicName: "formValues", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, button: { classPropertyName: "button", publicName: "button", isSignal: true, isRequired: false, transformFunction: null }, buttonAction: { classPropertyName: "buttonAction", publicName: "buttonAction", isSignal: true, isRequired: false, transformFunction: null }, buttonAcl: { classPropertyName: "buttonAcl", publicName: "buttonAcl", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, acl: { classPropertyName: "acl", publicName: "acl", isSignal: true, isRequired: false, transformFunction: null }, testid: { classPropertyName: "testid", publicName: "testid", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, equalWidth: { classPropertyName: "equalWidth", publicName: "equalWidth", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, isCheckboxVisible: { classPropertyName: "isCheckboxVisible", publicName: "isCheckboxVisible", isSignal: true, isRequired: false, transformFunction: null }, enlarge: { classPropertyName: "enlarge", publicName: "enlarge", isSignal: true, isRequired: false, transformFunction: null }, optionsAsset: { classPropertyName: "optionsAsset", publicName: "optionsAsset", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, dropZone: { classPropertyName: "dropZone", publicName: "dropZone", isSignal: true, isRequired: false, transformFunction: null }, readAs: { classPropertyName: "readAs", publicName: "readAs", isSignal: true, isRequired: false, transformFunction: null }, editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: false, transformFunction: null }, ratio: { classPropertyName: "ratio", publicName: "ratio", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, patterns: { classPropertyName: "patterns", publicName: "patterns", isSignal: true, isRequired: false, transformFunction: null }, patternMessage: { classPropertyName: "patternMessage", publicName: "patternMessage", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", act: "act", fieldKey: "fieldKey" }, host: { properties: { "class": "spanClass()", "style.display": "isVisible() ? null : \"none\"" } }, queries: [{ propertyName: "projectedTemplate", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dynamicInput", first: true, predicate: ["dynamicInput"], descendants: true, read: ViewContainerRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
7138
7161
|
<div
|
|
7139
7162
|
[class]="itemClass()"
|
|
7140
7163
|
[style.--sfi-gap.px]="gap()"
|
|
@@ -7167,7 +7190,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
7167
7190
|
'[class]': 'spanClass()',
|
|
7168
7191
|
'[style.display]': 'isVisible() ? null : "none"',
|
|
7169
7192
|
}, styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;flex:1 1 100%;min-width:0}.section-form-item{display:flex;flex-direction:column;gap:var(--sfi-gap, .5em );min-width:0;width:100%}.section-form-item.--horizontal{flex-direction:row;align-items:center}.section-form-item.--horizontal .section-form-item__input{flex:1;min-width:0}.section-form-item.--vertical{flex-direction:column}.section-form-item.--vertical .section-form-item__input{width:100%}.section-form-item__input{display:flex;flex-direction:column;min-width:0;width:100%}.section-form-item__input>*{width:100%}\n"] }]
|
|
7170
|
-
}], ctorParameters: () => [], propDecorators: { span: [{ type: i0.Input, args: [{ isSignal: true, alias: "span", required: false }] }], labelOrientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOrientation", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], focused: [{ type: i0.Input, args: [{ isSignal: true, alias: "focused", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], element: [{ type: i0.Input, args: [{ isSignal: true, alias: "element", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }], projectedTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], aclResolver: [{ type: i0.Input, args: [{ isSignal: true, alias: "aclResolver", required: false }] }], formValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "formValues", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], params: [{ type: i0.Input, args: [{ isSignal: true, alias: "params", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], button: [{ type: i0.Input, args: [{ isSignal: true, alias: "button", required: false }] }], buttonAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonAction", required: false }] }], buttonAcl: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonAcl", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], acl: [{ type: i0.Input, args: [{ isSignal: true, alias: "acl", required: false }] }], testid: [{ type: i0.Input, args: [{ isSignal: true, alias: "testid", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], multiSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelect", required: false }] }], equalWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "equalWidth", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], isCheckboxVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCheckboxVisible", required: false }] }], enlarge: [{ type: i0.Input, args: [{ isSignal: true, alias: "enlarge", required: false }] }], optionsAsset: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsAsset", required: false }] }], patterns: [{ type: i0.Input, args: [{ isSignal: true, alias: "patterns", required: false }] }], patternMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "patternMessage", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], act: [{ type: i0.Output, args: ["act"] }], fieldKey: [{ type: i0.Output, args: ["fieldKey"] }], dynamicInput: [{ type: i0.ViewChild, args: ['dynamicInput', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
7193
|
+
}], ctorParameters: () => [], propDecorators: { span: [{ type: i0.Input, args: [{ isSignal: true, alias: "span", required: false }] }], labelOrientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOrientation", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], focused: [{ type: i0.Input, args: [{ isSignal: true, alias: "focused", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], element: [{ type: i0.Input, args: [{ isSignal: true, alias: "element", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }], projectedTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], aclResolver: [{ type: i0.Input, args: [{ isSignal: true, alias: "aclResolver", required: false }] }], formValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "formValues", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], params: [{ type: i0.Input, args: [{ isSignal: true, alias: "params", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], button: [{ type: i0.Input, args: [{ isSignal: true, alias: "button", required: false }] }], buttonAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonAction", required: false }] }], buttonAcl: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonAcl", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], acl: [{ type: i0.Input, args: [{ isSignal: true, alias: "acl", required: false }] }], testid: [{ type: i0.Input, args: [{ isSignal: true, alias: "testid", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], multiSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelect", required: false }] }], equalWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "equalWidth", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], isCheckboxVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCheckboxVisible", required: false }] }], enlarge: [{ type: i0.Input, args: [{ isSignal: true, alias: "enlarge", required: false }] }], optionsAsset: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsAsset", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }], dropZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropZone", required: false }] }], readAs: [{ type: i0.Input, args: [{ isSignal: true, alias: "readAs", required: false }] }], editor: [{ type: i0.Input, args: [{ isSignal: true, alias: "editor", required: false }] }], ratio: [{ type: i0.Input, args: [{ isSignal: true, alias: "ratio", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], patterns: [{ type: i0.Input, args: [{ isSignal: true, alias: "patterns", required: false }] }], patternMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "patternMessage", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], act: [{ type: i0.Output, args: ["act"] }], fieldKey: [{ type: i0.Output, args: ["fieldKey"] }], dynamicInput: [{ type: i0.ViewChild, args: ['dynamicInput', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
7171
7194
|
|
|
7172
7195
|
function formatDate(date, format) {
|
|
7173
7196
|
if (!date) {
|
|
@@ -7219,9 +7242,19 @@ function isValidDateString(dateString, format) {
|
|
|
7219
7242
|
const emailValidation = (schemaPath) => email(schemaPath, {
|
|
7220
7243
|
message: 'not-a-valid-email',
|
|
7221
7244
|
});
|
|
7222
|
-
const requiredValidation = (s, paths) => paths.forEach((path) =>
|
|
7223
|
-
|
|
7224
|
-
|
|
7245
|
+
const requiredValidation = (s, paths) => paths.forEach((path) => {
|
|
7246
|
+
required(s[path], {
|
|
7247
|
+
message: 'this-field-is-required',
|
|
7248
|
+
});
|
|
7249
|
+
// `required` counts an empty list as a value. A multiselect or a `file`
|
|
7250
|
+
// Field holding `multiple` files is empty at `[]`, so that is refused too.
|
|
7251
|
+
validate(s[path], (ctx) => {
|
|
7252
|
+
const value = ctx.value();
|
|
7253
|
+
return Array.isArray(value) && value.length === 0
|
|
7254
|
+
? { kind: 'required', message: 'this-field-is-required' }
|
|
7255
|
+
: null;
|
|
7256
|
+
});
|
|
7257
|
+
});
|
|
7225
7258
|
const minLengthValidation = (s, paths, len) => paths.forEach((path) => minLength(s[path], len, {
|
|
7226
7259
|
message: `min-length?len=${len}`,
|
|
7227
7260
|
}));
|
|
@@ -16843,7 +16876,7 @@ class AuthActivityPageComponent {
|
|
|
16843
16876
|
wrongPassword: this.authStore.wrongPassword,
|
|
16844
16877
|
});
|
|
16845
16878
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AuthActivityPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16846
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AuthActivityPageComponent, isStandalone: true, selector: "m-auth-activity", ngImport: i0, template: "<m-section>\n <m-flex direction=\"column\" justify=\"center\" alignItems=\"center\" gap=\"2em\" minHeight=\"400px\">\n <m-logo color=\"mm\" width=\"5em\" padding=\"10px\" variant=\"grained\" />\n @if (authStore.variant().busy) {\n <m-icon color=\"mm\" size=\"4em\" name=\"loading-bars\" [one]=\"true\" />\n } @else if (!authStore.variant().identity_exiest && !authStore.variant().many_identifications) {\n <m-text-output [noTranslate]=\"false\" label=\"welcome-to-app?app=Magmonium\" />\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n [data]=\"emailData!\"\n (submitted)=\"authStore.patch({ email: $event.email }); authStore.createAuthEmail({ identity: $event.email })\"\n >\n <m-section-form-item\n name=\"email\"\n patterns=\"email\"\n type=\"text\"\n label=\"e-mail\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"next\"\n icon=\"chevron-right\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"mm\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n </m-section-form>\n } @else if (!authStore.variant().identity_exiest && authStore.variant().many_identifications) {\n <m-text-output [noTranslate]=\"false\" label=\"welcome-to-app?app=Magmonium\" />\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n (dataChange)=\"selectUserCard($event.user)\"\n >\n <m-section-form-item\n name=\"user\"\n [span]=\"1\"\n patterns=\"email\"\n type=\"selectable_card\"\n label=\"select-user\"\n placeholder=\"type-text\"\n [required]=\"true\"\n [multiSelect]=\"false\"\n [vertical]=\"true\"\n [isCheckboxVisible]=\"false\"\n [data]=\"userCards()\"\n >\n <ng-template let-item=\"row\" let-index=\"index\">\n <m-user [firstName]=\"item.firstName\" [lastName]=\"item.lastName\">\n <m-text-output [label]=\"item.identity\" noTranslate />\n </m-user>\n </ng-template>\n </m-section-form-item>\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"or-try-new-user\"\n icon=\"chevron-left\"\n color=\"mm\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n (clicked)=\"authStore.patch({ identity: undefined, email: undefined })\"\n />\n </m-section-button-group>\n </m-section-form>\n } @else if (authStore.variant().with_show_term && !authStore.variant().create_new_user) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n (submitted)=\"authStore.createSignUpOtp()\"\n >\n <m-text-output\n align=\"center\"\n variant=\"footer\"\n label=\"by-signing-in-you-agree-to-magmonium-s-terms-of-service-terms-and-acknowledge-our-privacy-policy-privacy\"\n [params]=\"activityTranslateParams()\"\n />\n <m-section-form-item name=\"field_1\" type=\"checkbox\" label=\"i-agree\" placeholder=\"type-text\" [required]=\"true\" />\n <m-button\n label=\"confirm\"\n icon=\"check\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"success\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"back\"\n icon=\"chevron-left\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"\n authStore.patch({\n identity: undefined,\n otp: undefined,\n otpCounter: undefined,\n registerNewUser: undefined,\n resetPassword: undefined,\n showTerms: undefined,\n signUp: undefined,\n })\n \"\n />\n </m-section-button-group>\n </m-section-form>\n } @else if (authStore.variant().with_otp && authStore.variant().create_new_user) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n [data]=\"eMailData!\"\n (submitted)=\"authStore.updateAuthOtp({ code: $event.otp })\"\n >\n <m-section-form-item\n name=\"otp\"\n type=\"one-time-password\"\n label=\"one-time-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"next\"\n icon=\"chevron-right\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"mm\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"resend\"\n icon=\"corner-left-up\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"authStore.createAuthOtp()\"\n />\n <m-button\n label=\"back\"\n icon=\"chevron-left\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"\n authStore.patch({\n identity: undefined,\n otp: undefined,\n otpCounter: undefined,\n registerNewUser: undefined,\n resetPassword: undefined,\n showTerms: undefined,\n signUp: undefined,\n })\n \"\n />\n </m-section-button-group>\n </m-section-form>\n } @else if (\n authStore.variant().identity_exiest && !authStore.variant().reset_password && !authStore.variant().create_new_user\n ) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n [validation]=\"signInValidation\"\n [data]=\"signInData!\"\n (formInitialized)=\"authStore.patch({ wrongPassword: undefined })\"\n (submitted)=\"authStore.updateAuthPassword({ password: btoa($event.password) })\"\n >\n <m-text-output label=\"signing-in-as\" [params]=\"activityTranslateParams()\" />\n <m-section-form-item\n name=\"password\"\n type=\"password\"\n label=\"password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"sign-in\"\n icon=\"check\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"success\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"back\"\n icon=\"chevron-left\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"authStore.patch({ identity: undefined })\"\n />\n <m-button\n label=\"reset\"\n icon=\"chevron-right\"\n [isRightIcon]=\"true\"\n color=\"textSecondary\"\n variant=\"ghost\"\n (clicked)=\"authStore.createAuthOtp()\"\n />\n </m-section-button-group>\n </m-section-form>\n } @else if (authStore.variant().reset_password && authStore.variant().with_otp) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n [validation]=\"passwordValidation\"\n [data]=\"passwordData!\"\n (submitted)=\"authStore.createAuthPassword({ password: $event.confirm, code: $event.code })\"\n >\n <m-section-form-item\n name=\"code\"\n type=\"one-time-password\"\n label=\"one-time-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"resend\"\n icon=\"corner-left-up\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"authStore.createAuthOtp()\"\n />\n </m-section-button-group>\n <m-section-form-item\n name=\"password\"\n type=\"password\"\n label=\"new-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-section-form-item\n name=\"confirm\"\n type=\"password\"\n label=\"confirm-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"reset\"\n icon=\"check\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"mm\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n </m-section-form>\n } @else if (authStore.variant().create_new_user && authStore.variant().identity_exiest) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n [data]=\"signupData!\"\n (submitted)=\"\n authStore.createAuthSignup({\n firstName: $event.firstname,\n lastName: $event.lastname,\n dob: $event.dob,\n sex: $event.sex,\n password: btoa($event.password),\n })\n \"\n >\n <m-text-output label=\"signing-up-as\" [params]=\"activityTranslateParams()\" />\n <m-section-form-item\n name=\"firstname\"\n type=\"text\"\n label=\"first-name\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-section-form-item name=\"lastname\" type=\"text\" label=\"last-name\" placeholder=\"type-text\" [required]=\"true\" />\n <m-section-form-item name=\"dob\" type=\"date\" label=\"date-of-birth\" placeholder=\"type-text\" [required]=\"true\" />\n <m-section-form-item\n name=\"sex\"\n type=\"toggle_radio\"\n label=\"sex\"\n placeholder=\"type-text\"\n [required]=\"true\"\n value=\"male\"\n mOptions=\"sex\"\n />\n <m-section-form-item\n name=\"password\"\n type=\"password\"\n label=\"password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-section-form-item\n name=\"repassword\"\n type=\"password\"\n label=\"confirm-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"sign-up\"\n icon=\"check\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"success\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"back\"\n icon=\"chevron-left\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"\n authStore.patch({\n identity: undefined,\n otp: undefined,\n otpCounter: undefined,\n registerNewUser: undefined,\n resetPassword: undefined,\n showTerms: undefined,\n signUp: undefined,\n })\n \"\n />\n </m-section-button-group>\n </m-section-form>\n }\n </m-flex>\n</m-section>\n", styles: [":host{display:block;width:100%;box-sizing:border-box;padding-block:clamp(1.5rem,6vh,4rem)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "m-button,m-one-button", inputs: ["config", "color", "labelClass", "fullWidth", "nav", "navParams", "href", "disabled", "variant", "name", "baseUrl", "one", "remote", "label", "noTranslate", "params", "noNative", "icon", "isRightIcon", "iconOnly", "stacked", "imgSrc", "nonClickable", "inverted", "isSubmit", "tabindex"], outputs: ["configChange", "clicked"] }, { kind: "component", type: FlexComponent, selector: "m-flex", inputs: ["direction", "justify", "alignItems", "variant", "gap", "padding", "paddingX", "paddingY", "wrap", "inline", "fullHeight", "minHeight", "minWidth", "maxHeight", "maxWidth"] }, { kind: "component", type: IconComponent, selector: "m-icon, m-one-icon", inputs: ["config", "name", "color", "size", "one", "baseUrl", "remote"], outputs: ["configChange"] }, { kind: "component", type: LogoComponent, selector: "m-logo", inputs: ["animation", "alive", "variant", "interactive", "width", "padding", "border", "color"] }, { kind: "directive", type: OptionsSourceDirective, selector: "[mOptions]", inputs: ["mOptions"] }, { kind: "component", type: SectionButtonGroupComponent, selector: "m-section-button-group", inputs: ["vertical", "align", "variant", "size", "fullWidth"] }, { kind: "component", type: SectionComponent, selector: "m-section", inputs: ["variant", "maxWidth", "heightMode", "maxHeight", "height", "align", "alignX", "alignY", "size"], outputs: ["inView"] }, { kind: "component", type: SectionFormComponent, selector: "m-section-form, m-one-section-form", inputs: ["variant", "maxWidth", "heightMode", "maxHeight", "height", "align", "size", "autofocus", "data", "validation", "disabled", "fieldConfigs", "fieldRenderIds"], outputs: ["dataChange", "submitted", "formInitialized"] }, { kind: "component", type: SectionFormItemComponent, selector: "m-section-form-item, m-one-section-form-item", inputs: ["span", "labelOrientation", "gap", "readonly", "focused", "form", "options", "dir", "element", "data", "template", "aclResolver", "formValues", "type", "label", "placeholder", "params", "required", "disabled", "icon", "prefix", "suffix", "button", "buttonAction", "buttonAcl", "maxWidth", "acl", "testid", "color", "variant", "min", "max", "step", "length", "debounce", "dateFormat", "searchLabel", "vertical", "multiple", "multiSelect", "equalWidth", "iconOnly", "isCheckboxVisible", "enlarge", "optionsAsset", "patterns", "patternMessage", "value"], outputs: ["valueChange", "act", "fieldKey"] }, { kind: "component", type: TextOutputComponent, selector: "m-text-output", inputs: ["config", "align", "variant", "color", "fontWeight", "label", "noTranslate", "params"], outputs: ["configChange", "clicked"] }, { kind: "component", type: UserComponent, selector: "m-user", inputs: ["id", "user", "firstName", "lastName", "profilePic"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16879
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AuthActivityPageComponent, isStandalone: true, selector: "m-auth-activity", ngImport: i0, template: "<m-section>\n <m-flex direction=\"column\" justify=\"center\" alignItems=\"center\" gap=\"2em\" minHeight=\"400px\">\n <m-logo color=\"mm\" width=\"5em\" padding=\"10px\" variant=\"grained\" />\n @if (authStore.variant().busy) {\n <m-icon color=\"mm\" size=\"4em\" name=\"loading-bars\" [one]=\"true\" />\n } @else if (!authStore.variant().identity_exiest && !authStore.variant().many_identifications) {\n <m-text-output [noTranslate]=\"false\" label=\"welcome-to-app?app=Magmonium\" />\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n [data]=\"emailData!\"\n (submitted)=\"authStore.patch({ email: $event.email }); authStore.createAuthEmail({ identity: $event.email })\"\n >\n <m-section-form-item\n name=\"email\"\n patterns=\"email\"\n type=\"text\"\n label=\"e-mail\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"next\"\n icon=\"chevron-right\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"mm\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n </m-section-form>\n } @else if (!authStore.variant().identity_exiest && authStore.variant().many_identifications) {\n <m-text-output [noTranslate]=\"false\" label=\"welcome-to-app?app=Magmonium\" />\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n (dataChange)=\"selectUserCard($event.user)\"\n >\n <m-section-form-item\n name=\"user\"\n [span]=\"1\"\n patterns=\"email\"\n type=\"selectable_card\"\n label=\"select-user\"\n placeholder=\"type-text\"\n [required]=\"true\"\n [multiSelect]=\"false\"\n [vertical]=\"true\"\n [isCheckboxVisible]=\"false\"\n [data]=\"userCards()\"\n >\n <ng-template let-item=\"row\" let-index=\"index\">\n <m-user [firstName]=\"item.firstName\" [lastName]=\"item.lastName\">\n <m-text-output [label]=\"item.identity\" noTranslate />\n </m-user>\n </ng-template>\n </m-section-form-item>\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"or-try-new-user\"\n icon=\"chevron-left\"\n color=\"mm\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n (clicked)=\"authStore.patch({ identity: undefined, email: undefined })\"\n />\n </m-section-button-group>\n </m-section-form>\n } @else if (authStore.variant().with_show_term && !authStore.variant().create_new_user) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n (submitted)=\"authStore.createSignUpOtp()\"\n >\n <m-text-output\n align=\"center\"\n variant=\"footer\"\n label=\"by-signing-in-you-agree-to-magmonium-s-terms-of-service-terms-and-acknowledge-our-privacy-policy-privacy\"\n [params]=\"activityTranslateParams()\"\n />\n <m-section-form-item name=\"field_1\" type=\"checkbox\" label=\"i-agree\" placeholder=\"type-text\" [required]=\"true\" />\n <m-button\n label=\"confirm\"\n icon=\"check\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"success\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"back\"\n icon=\"chevron-left\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"\n authStore.patch({\n identity: undefined,\n otp: undefined,\n otpCounter: undefined,\n registerNewUser: undefined,\n resetPassword: undefined,\n showTerms: undefined,\n signUp: undefined,\n })\n \"\n />\n </m-section-button-group>\n </m-section-form>\n } @else if (authStore.variant().with_otp && authStore.variant().create_new_user) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n [data]=\"eMailData!\"\n (submitted)=\"authStore.updateAuthOtp({ code: $event.otp })\"\n >\n <m-section-form-item\n name=\"otp\"\n type=\"one-time-password\"\n label=\"one-time-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"next\"\n icon=\"chevron-right\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"mm\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"resend\"\n icon=\"corner-left-up\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"authStore.createAuthOtp()\"\n />\n <m-button\n label=\"back\"\n icon=\"chevron-left\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"\n authStore.patch({\n identity: undefined,\n otp: undefined,\n otpCounter: undefined,\n registerNewUser: undefined,\n resetPassword: undefined,\n showTerms: undefined,\n signUp: undefined,\n })\n \"\n />\n </m-section-button-group>\n </m-section-form>\n } @else if (\n authStore.variant().identity_exiest && !authStore.variant().reset_password && !authStore.variant().create_new_user\n ) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n [validation]=\"signInValidation\"\n [data]=\"signInData!\"\n (formInitialized)=\"authStore.patch({ wrongPassword: undefined })\"\n (submitted)=\"authStore.updateAuthPassword({ password: btoa($event.password) })\"\n >\n <m-text-output label=\"signing-in-as\" [params]=\"activityTranslateParams()\" />\n <m-section-form-item\n name=\"password\"\n type=\"password\"\n label=\"password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"sign-in\"\n icon=\"check\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"success\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"back\"\n icon=\"chevron-left\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"authStore.patch({ identity: undefined })\"\n />\n <m-button\n label=\"reset\"\n icon=\"chevron-right\"\n [isRightIcon]=\"true\"\n color=\"textSecondary\"\n variant=\"ghost\"\n (clicked)=\"authStore.createAuthOtp()\"\n />\n </m-section-button-group>\n </m-section-form>\n } @else if (authStore.variant().reset_password && authStore.variant().with_otp) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n [validation]=\"passwordValidation\"\n [data]=\"passwordData!\"\n (submitted)=\"authStore.createAuthPassword({ password: $event.confirm, code: $event.code })\"\n >\n <m-section-form-item\n name=\"code\"\n type=\"one-time-password\"\n label=\"one-time-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"resend\"\n icon=\"corner-left-up\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"authStore.createAuthOtp()\"\n />\n </m-section-button-group>\n <m-section-form-item\n name=\"password\"\n type=\"password\"\n label=\"new-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-section-form-item\n name=\"confirm\"\n type=\"password\"\n label=\"confirm-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"reset\"\n icon=\"check\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"mm\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n </m-section-form>\n } @else if (authStore.variant().create_new_user && authStore.variant().identity_exiest) {\n <m-section-form\n minWidth=\"320px\"\n maxWidth=\"320px\"\n label=\"e-mail\"\n subtitle=\"type-text\"\n align=\"center\"\n [data]=\"signupData!\"\n (submitted)=\"\n authStore.createAuthSignup({\n firstName: $event.firstname,\n lastName: $event.lastname,\n dob: $event.dob,\n sex: $event.sex,\n password: btoa($event.password),\n })\n \"\n >\n <m-text-output label=\"signing-up-as\" [params]=\"activityTranslateParams()\" />\n <m-section-form-item\n name=\"firstname\"\n type=\"text\"\n label=\"first-name\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-section-form-item name=\"lastname\" type=\"text\" label=\"last-name\" placeholder=\"type-text\" [required]=\"true\" />\n <m-section-form-item name=\"dob\" type=\"date\" label=\"date-of-birth\" placeholder=\"type-text\" [required]=\"true\" />\n <m-section-form-item\n name=\"sex\"\n type=\"toggle_radio\"\n label=\"sex\"\n placeholder=\"type-text\"\n [required]=\"true\"\n value=\"male\"\n mOptions=\"sex\"\n />\n <m-section-form-item\n name=\"password\"\n type=\"password\"\n label=\"password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-section-form-item\n name=\"repassword\"\n type=\"password\"\n label=\"confirm-password\"\n placeholder=\"type-text\"\n [required]=\"true\"\n />\n <m-button\n label=\"sign-up\"\n icon=\"check\"\n isSubmit\n [isRightIcon]=\"true\"\n color=\"success\"\n [fullWidth]=\"true\"\n variant=\"primary\"\n />\n <m-section-button-group [fullWidth]=\"true\">\n <m-button\n label=\"back\"\n icon=\"chevron-left\"\n color=\"mm\"\n variant=\"ghost\"\n (clicked)=\"\n authStore.patch({\n identity: undefined,\n otp: undefined,\n otpCounter: undefined,\n registerNewUser: undefined,\n resetPassword: undefined,\n showTerms: undefined,\n signUp: undefined,\n })\n \"\n />\n </m-section-button-group>\n </m-section-form>\n }\n </m-flex>\n</m-section>\n", styles: [":host{display:block;width:100%;box-sizing:border-box;padding-block:clamp(1.5rem,6vh,4rem)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "m-button,m-one-button", inputs: ["config", "color", "labelClass", "fullWidth", "nav", "navParams", "href", "disabled", "variant", "name", "baseUrl", "one", "remote", "label", "noTranslate", "params", "noNative", "icon", "isRightIcon", "iconOnly", "stacked", "imgSrc", "nonClickable", "inverted", "isSubmit", "tabindex"], outputs: ["configChange", "clicked"] }, { kind: "component", type: FlexComponent, selector: "m-flex", inputs: ["direction", "justify", "alignItems", "variant", "gap", "padding", "paddingX", "paddingY", "wrap", "inline", "fullHeight", "minHeight", "minWidth", "maxHeight", "maxWidth"] }, { kind: "component", type: IconComponent, selector: "m-icon, m-one-icon", inputs: ["config", "name", "color", "size", "one", "baseUrl", "remote"], outputs: ["configChange"] }, { kind: "component", type: LogoComponent, selector: "m-logo", inputs: ["animation", "alive", "variant", "interactive", "width", "padding", "border", "color"] }, { kind: "directive", type: OptionsSourceDirective, selector: "[mOptions]", inputs: ["mOptions"] }, { kind: "component", type: SectionButtonGroupComponent, selector: "m-section-button-group", inputs: ["vertical", "align", "variant", "size", "fullWidth"] }, { kind: "component", type: SectionComponent, selector: "m-section", inputs: ["variant", "maxWidth", "heightMode", "maxHeight", "height", "align", "alignX", "alignY", "size"], outputs: ["inView"] }, { kind: "component", type: SectionFormComponent, selector: "m-section-form, m-one-section-form", inputs: ["variant", "maxWidth", "heightMode", "maxHeight", "height", "align", "size", "autofocus", "data", "validation", "disabled", "fieldConfigs", "fieldRenderIds"], outputs: ["dataChange", "submitted", "formInitialized"] }, { kind: "component", type: SectionFormItemComponent, selector: "m-section-form-item, m-one-section-form-item", inputs: ["span", "labelOrientation", "gap", "readonly", "focused", "form", "options", "dir", "element", "data", "template", "aclResolver", "formValues", "type", "label", "placeholder", "params", "required", "disabled", "icon", "prefix", "suffix", "button", "buttonAction", "buttonAcl", "maxWidth", "acl", "testid", "color", "variant", "min", "max", "step", "length", "debounce", "dateFormat", "searchLabel", "vertical", "multiple", "multiSelect", "equalWidth", "iconOnly", "isCheckboxVisible", "enlarge", "optionsAsset", "accept", "maxSize", "dropZone", "readAs", "editor", "ratio", "width", "patterns", "patternMessage", "value"], outputs: ["valueChange", "act", "fieldKey"] }, { kind: "component", type: TextOutputComponent, selector: "m-text-output", inputs: ["config", "align", "variant", "color", "fontWeight", "label", "noTranslate", "params"], outputs: ["configChange", "clicked"] }, { kind: "component", type: UserComponent, selector: "m-user", inputs: ["id", "user", "firstName", "lastName", "profilePic"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16847
16880
|
}
|
|
16848
16881
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AuthActivityPageComponent, decorators: [{
|
|
16849
16882
|
type: Component,
|
|
@@ -20937,7 +20970,7 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
20937
20970
|
break;
|
|
20938
20971
|
}
|
|
20939
20972
|
case InputType.TOGGLE: {
|
|
20940
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
20973
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-Ds_jl5Lz.mjs');
|
|
20941
20974
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
20942
20975
|
break;
|
|
20943
20976
|
}
|
|
@@ -20949,12 +20982,12 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
20949
20982
|
break;
|
|
20950
20983
|
}
|
|
20951
20984
|
case InputType.PASSWORD: {
|
|
20952
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
20985
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-49sBxeSV.mjs');
|
|
20953
20986
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
20954
20987
|
break;
|
|
20955
20988
|
}
|
|
20956
20989
|
case InputType.OTP: {
|
|
20957
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
20990
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-6WQxmRKG.mjs');
|
|
20958
20991
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
20959
20992
|
break;
|
|
20960
20993
|
}
|
|
@@ -22120,25 +22153,365 @@ function truncateMiddlePath(path, maxLength = 48) {
|
|
|
22120
22153
|
return trimmed.slice(0, headLen) + '...' + trimmed.slice(-tailLen);
|
|
22121
22154
|
}
|
|
22122
22155
|
|
|
22123
|
-
|
|
22156
|
+
/**
|
|
22157
|
+
* A Field's `accept` as a list. On a tag it is one comma-separated scalar — the
|
|
22158
|
+
* spelling the native `accept` attribute already uses (ADR 0010) — and in a
|
|
22159
|
+
* `fields/<name>.yml` a list, so both arrive here.
|
|
22160
|
+
*/
|
|
22161
|
+
const parseAccept = (accept) => {
|
|
22162
|
+
const parts = typeof accept === 'string' ? accept.split(',') : accept ?? [];
|
|
22163
|
+
return parts.map((part) => part.trim().toLowerCase()).filter(Boolean);
|
|
22164
|
+
};
|
|
22165
|
+
/**
|
|
22166
|
+
* A Field's `accept` as the text it shows in place of a placeholder: `.png`
|
|
22167
|
+
* reads `PNG`, `image/*` reads `IMAGE`, `image/svg+xml` reads `SVG`. Entries
|
|
22168
|
+
* that read alike are shown once, and the rest are joined with ` / `.
|
|
22169
|
+
*/
|
|
22170
|
+
const formatAccept = (accept) => {
|
|
22171
|
+
const names = accept
|
|
22172
|
+
.filter((rule) => rule !== '*' && rule !== '*/*')
|
|
22173
|
+
.map((rule) => {
|
|
22174
|
+
if (rule.startsWith('.'))
|
|
22175
|
+
return rule.slice(1);
|
|
22176
|
+
const [type, subtype = ''] = rule.split('/');
|
|
22177
|
+
return subtype === '*' || !subtype ? type : subtype.split('+')[0];
|
|
22178
|
+
})
|
|
22179
|
+
.map((name) => name.toUpperCase());
|
|
22180
|
+
return [...new Set(names)].join(' / ');
|
|
22181
|
+
};
|
|
22182
|
+
/** A file name's extension, lower-cased and without its dot; empty if none. */
|
|
22183
|
+
const fileExtension = (name) => {
|
|
22184
|
+
const dot = name.lastIndexOf('.');
|
|
22185
|
+
return dot > 0 ? name.slice(dot + 1).toLowerCase() : '';
|
|
22186
|
+
};
|
|
22187
|
+
const ICON_BY_EXTENSION = {
|
|
22188
|
+
png: 'file-image',
|
|
22189
|
+
jpg: 'file-image',
|
|
22190
|
+
jpeg: 'file-image',
|
|
22191
|
+
gif: 'file-image',
|
|
22192
|
+
webp: 'file-image',
|
|
22193
|
+
svg: 'file-image',
|
|
22194
|
+
csv: 'file-data',
|
|
22195
|
+
json: 'file-data',
|
|
22196
|
+
xlsx: 'file-data',
|
|
22197
|
+
html: 'file-markup',
|
|
22198
|
+
xml: 'file-markup',
|
|
22199
|
+
css: 'file-style',
|
|
22200
|
+
sass: 'file-style',
|
|
22201
|
+
scss: 'file-style',
|
|
22202
|
+
js: 'file-code',
|
|
22203
|
+
ts: 'file-code',
|
|
22204
|
+
};
|
|
22205
|
+
/** The `file-*` icon a tile draws for a file it has no preview of. */
|
|
22206
|
+
const fileIcon = (name) => ICON_BY_EXTENSION[fileExtension(name)] ?? 'file-text';
|
|
22207
|
+
/** Mirrors the picker's own matching: `.ext`, `type/*` or an exact MIME type. */
|
|
22208
|
+
const fileMatchesAccept = (file, accept) => {
|
|
22209
|
+
if (!accept.length)
|
|
22210
|
+
return true;
|
|
22211
|
+
const name = file.name.toLowerCase();
|
|
22212
|
+
const mime = (file.type ?? '').toLowerCase();
|
|
22213
|
+
return accept.some((rule) => {
|
|
22214
|
+
if (rule === '*' || rule === '*/*')
|
|
22215
|
+
return true;
|
|
22216
|
+
if (rule.startsWith('.'))
|
|
22217
|
+
return name.endsWith(rule);
|
|
22218
|
+
if (rule.endsWith('/*'))
|
|
22219
|
+
return mime.startsWith(rule.slice(0, -1));
|
|
22220
|
+
return mime === rule;
|
|
22221
|
+
});
|
|
22222
|
+
};
|
|
22223
|
+
/**
|
|
22224
|
+
* Splits picked or dropped files into the ones the Field keeps and the ones it
|
|
22225
|
+
* reports. A drop never passes the native picker, so this is where `accept` and
|
|
22226
|
+
* `maxSize` are enforced rather than merely suggested (CONTEXT.md DropZone).
|
|
22227
|
+
*/
|
|
22228
|
+
const screenFiles = (files, accept, maxSize) => {
|
|
22229
|
+
const accepted = [];
|
|
22230
|
+
const rejected = [];
|
|
22231
|
+
for (const file of files) {
|
|
22232
|
+
if (!fileMatchesAccept(file, accept)) {
|
|
22233
|
+
rejected.push({ name: file.name, reason: 'type' });
|
|
22234
|
+
}
|
|
22235
|
+
else if (maxSize && file.size > maxSize) {
|
|
22236
|
+
rejected.push({ name: file.name, reason: 'size' });
|
|
22237
|
+
}
|
|
22238
|
+
else {
|
|
22239
|
+
accepted.push(file);
|
|
22240
|
+
}
|
|
22241
|
+
}
|
|
22242
|
+
return { accepted, rejected };
|
|
22243
|
+
};
|
|
22244
|
+
const sameFile = (a, b) => a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
|
|
22245
|
+
/** Appends `incoming` to `current`, skipping a file already held. */
|
|
22246
|
+
const mergeFiles = (current, incoming) => incoming.reduce((held, file) => held.some((existing) => sameFile(existing, file))
|
|
22247
|
+
? held
|
|
22248
|
+
: [...held, file], [...current]);
|
|
22249
|
+
const UNITS = ['B', 'KB', 'MB', 'GB'];
|
|
22250
|
+
const formatFileSize = (bytes) => {
|
|
22251
|
+
let size = bytes;
|
|
22252
|
+
let unit = 0;
|
|
22253
|
+
while (size >= 1024 && unit < UNITS.length - 1) {
|
|
22254
|
+
size /= 1024;
|
|
22255
|
+
unit++;
|
|
22256
|
+
}
|
|
22257
|
+
const figure = unit === 0 || size >= 10 ? Math.round(size) : size.toFixed(1);
|
|
22258
|
+
return `${figure} ${UNITS[unit]}`;
|
|
22259
|
+
};
|
|
22260
|
+
|
|
22261
|
+
const MIN_ZOOM = 1;
|
|
22262
|
+
const MAX_ZOOM = 4;
|
|
22263
|
+
/** Only raster images a canvas decodes everywhere enter the ImageEditor. */
|
|
22264
|
+
const EDITABLE_TYPES = ['image/png', 'image/jpeg', 'image/webp'];
|
|
22265
|
+
const isEditableImage = (file) => EDITABLE_TYPES.includes(file.type.toLowerCase());
|
|
22266
|
+
/** `'16:9'` as `16 / 9`; undefined for anything but two positive figures. */
|
|
22267
|
+
const parseRatio = (ratio) => {
|
|
22268
|
+
if (typeof ratio !== 'string')
|
|
22269
|
+
return undefined;
|
|
22270
|
+
const match = /^\s*(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)\s*$/.exec(ratio);
|
|
22271
|
+
if (!match)
|
|
22272
|
+
return undefined;
|
|
22273
|
+
const width = Number(match[1]);
|
|
22274
|
+
const height = Number(match[2]);
|
|
22275
|
+
return width > 0 && height > 0 ? width / height : undefined;
|
|
22276
|
+
};
|
|
22277
|
+
/**
|
|
22278
|
+
* The exact pixels an edited image comes out at: the Field's `width`, and the
|
|
22279
|
+
* height its `ratio` derives. Undefined when either is missing or malformed —
|
|
22280
|
+
* a Field without both has no ImageEditor.
|
|
22281
|
+
*/
|
|
22282
|
+
const outputSize = (ratio, width) => {
|
|
22283
|
+
const aspect = parseRatio(ratio);
|
|
22284
|
+
const pixels = Math.round(Number(width));
|
|
22285
|
+
if (!aspect || !Number.isFinite(pixels) || pixels < 1)
|
|
22286
|
+
return undefined;
|
|
22287
|
+
return { width: pixels, height: Math.max(1, Math.round(pixels / aspect)) };
|
|
22288
|
+
};
|
|
22289
|
+
/** The largest box of this aspect that fits inside the image. */
|
|
22290
|
+
const coverCrop = (image, aspect) => image.width / image.height > aspect
|
|
22291
|
+
? { width: image.height * aspect, height: image.height }
|
|
22292
|
+
: { width: image.width, height: image.width / aspect };
|
|
22293
|
+
const initialFraming = (image) => ({
|
|
22294
|
+
cx: image.width / 2,
|
|
22295
|
+
cy: image.height / 2,
|
|
22296
|
+
zoom: MIN_ZOOM,
|
|
22297
|
+
});
|
|
22298
|
+
const clamp$1 = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
22299
|
+
/**
|
|
22300
|
+
* The framing pulled back inside the picture: zoom between the cover fit and
|
|
22301
|
+
* MAX_ZOOM, and the centre far enough in that the box never shows past an edge.
|
|
22302
|
+
*/
|
|
22303
|
+
const clampFraming = (image, aspect, framing) => {
|
|
22304
|
+
const zoom = clamp$1(framing.zoom, MIN_ZOOM, MAX_ZOOM);
|
|
22305
|
+
const cover = coverCrop(image, aspect);
|
|
22306
|
+
const halfW = cover.width / zoom / 2;
|
|
22307
|
+
const halfH = cover.height / zoom / 2;
|
|
22308
|
+
return {
|
|
22309
|
+
zoom,
|
|
22310
|
+
cx: clamp$1(framing.cx, halfW, image.width - halfW),
|
|
22311
|
+
cy: clamp$1(framing.cy, halfH, image.height - halfH),
|
|
22312
|
+
};
|
|
22313
|
+
};
|
|
22314
|
+
/** The part of the source the box holds, in source pixels. */
|
|
22315
|
+
const cropRect = (image, aspect, framing) => {
|
|
22316
|
+
const { cx, cy, zoom } = clampFraming(image, aspect, framing);
|
|
22317
|
+
const cover = coverCrop(image, aspect);
|
|
22318
|
+
const width = cover.width / zoom;
|
|
22319
|
+
const height = cover.height / zoom;
|
|
22320
|
+
return { x: cx - width / 2, y: cy - height / 2, width, height };
|
|
22321
|
+
};
|
|
22322
|
+
/** `avatar.png` holding a WebP is `avatar.webp`. */
|
|
22323
|
+
const renameForType = (name, type) => {
|
|
22324
|
+
const extension = type === 'image/jpeg' ? 'jpg' : type.split('/')[1] ?? 'bin';
|
|
22325
|
+
const dot = name.lastIndexOf('.');
|
|
22326
|
+
const base = dot > 0 ? name.slice(0, dot) : name;
|
|
22327
|
+
return `${base}.${extension}`;
|
|
22328
|
+
};
|
|
22329
|
+
const createCanvas = (size) => {
|
|
22330
|
+
const canvas = document.createElement('canvas');
|
|
22331
|
+
canvas.width = Math.max(1, Math.round(size.width));
|
|
22332
|
+
canvas.height = Math.max(1, Math.round(size.height));
|
|
22333
|
+
return canvas;
|
|
22334
|
+
};
|
|
22335
|
+
const smoothContext = (canvas) => {
|
|
22336
|
+
const context = canvas.getContext('2d');
|
|
22337
|
+
if (!context)
|
|
22338
|
+
throw new Error('2d canvas unavailable');
|
|
22339
|
+
context.imageSmoothingEnabled = true;
|
|
22340
|
+
context.imageSmoothingQuality = 'high';
|
|
22341
|
+
return context;
|
|
22342
|
+
};
|
|
22343
|
+
/**
|
|
22344
|
+
* The crop drawn at exactly `output` pixels. A shrink past half is taken in
|
|
22345
|
+
* halving steps — one pass that drops more than every other pixel aliases —
|
|
22346
|
+
* and a grow is one smoothed pass.
|
|
22347
|
+
*/
|
|
22348
|
+
const drawFramed = (source, rect, output) => {
|
|
22349
|
+
let from = source;
|
|
22350
|
+
let area = rect;
|
|
22351
|
+
while (area.width >= output.width * 2 &&
|
|
22352
|
+
area.height >= output.height * 2) {
|
|
22353
|
+
const step = createCanvas({
|
|
22354
|
+
width: area.width / 2,
|
|
22355
|
+
height: area.height / 2,
|
|
22356
|
+
});
|
|
22357
|
+
smoothContext(step).drawImage(from, area.x, area.y, area.width, area.height, 0, 0, step.width, step.height);
|
|
22358
|
+
from = step;
|
|
22359
|
+
area = { x: 0, y: 0, width: step.width, height: step.height };
|
|
22360
|
+
}
|
|
22361
|
+
const canvas = createCanvas(output);
|
|
22362
|
+
smoothContext(canvas).drawImage(from, area.x, area.y, area.width, area.height, 0, 0, canvas.width, canvas.height);
|
|
22363
|
+
return canvas;
|
|
22364
|
+
};
|
|
22365
|
+
const ENCODE_QUALITY = 0.9;
|
|
22366
|
+
const toBlob = (canvas, type) => new Promise((resolve) => canvas.toBlob(resolve, type, ENCODE_QUALITY));
|
|
22367
|
+
const hasTransparency = (canvas) => {
|
|
22368
|
+
const { data } = smoothContext(canvas).getImageData(0, 0, canvas.width, canvas.height);
|
|
22369
|
+
for (let i = 3; i < data.length; i += 4) {
|
|
22370
|
+
if (data[i] < 255)
|
|
22371
|
+
return true;
|
|
22372
|
+
}
|
|
22373
|
+
return false;
|
|
22374
|
+
};
|
|
22375
|
+
/**
|
|
22376
|
+
* WebP, the smallest file at this quality. A browser that cannot encode WebP
|
|
22377
|
+
* hands back a PNG under the WebP request without saying so, so the blob's own
|
|
22378
|
+
* type is what is checked: then an opaque picture goes JPEG and one with
|
|
22379
|
+
* transparency PNG, the smallest that keeps what it shows.
|
|
22380
|
+
*/
|
|
22381
|
+
const encodeFramed = async (canvas) => {
|
|
22382
|
+
const webp = await toBlob(canvas, 'image/webp');
|
|
22383
|
+
if (webp?.type === 'image/webp')
|
|
22384
|
+
return webp;
|
|
22385
|
+
const type = hasTransparency(canvas) ? 'image/png' : 'image/jpeg';
|
|
22386
|
+
const fallback = await toBlob(canvas, type);
|
|
22387
|
+
if (!fallback)
|
|
22388
|
+
throw new Error('canvas encode failed');
|
|
22389
|
+
return fallback;
|
|
22390
|
+
};
|
|
22391
|
+
|
|
22392
|
+
const isTrue = (value) => value === true || value === 'true';
|
|
22393
|
+
class FileUploadInputComponent extends BaseInputComponent {
|
|
22124
22394
|
config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
|
|
22395
|
+
value = model();
|
|
22125
22396
|
files = inject(FileService);
|
|
22397
|
+
translate = inject(TranslateService);
|
|
22126
22398
|
folderPickListener = inject(FOLDER_PICK_LISTENER, {
|
|
22127
22399
|
optional: true,
|
|
22128
22400
|
});
|
|
22129
|
-
|
|
22130
|
-
|
|
22131
|
-
|
|
22132
|
-
|
|
22133
|
-
|
|
22134
|
-
|
|
22135
|
-
|
|
22401
|
+
modalStore = inject(MODAL_STORE_REF, { optional: true });
|
|
22402
|
+
/**
|
|
22403
|
+
* Names of what `readAs: text` read, and of a folder picked. The value holds
|
|
22404
|
+
* the text or the folder's name, so the file names survive only here.
|
|
22405
|
+
*/
|
|
22406
|
+
pickedNames = signal([], ...(ngDevMode ? [{ debugName: "pickedNames" }] : /* istanbul ignore next */ []));
|
|
22407
|
+
rejections = signal([], ...(ngDevMode ? [{ debugName: "rejections" }] : /* istanbul ignore next */ []));
|
|
22408
|
+
isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
|
|
22409
|
+
// A value emptied from outside — a FormReset, a model reseeded — takes the
|
|
22410
|
+
// names read into it along, and the complaints about the last pick with them.
|
|
22411
|
+
syncPickedNames = effect(() => {
|
|
22412
|
+
if (this.isEmpty(this.value())) {
|
|
22413
|
+
this.pickedNames.set([]);
|
|
22414
|
+
this.rejections.set([]);
|
|
22415
|
+
}
|
|
22416
|
+
}, ...(ngDevMode ? [{ debugName: "syncPickedNames" }] : /* istanbul ignore next */ []));
|
|
22136
22417
|
isFolderMode = computed(() => this.config()?.type === InputType.FOLDER ||
|
|
22137
22418
|
this.config()?.mode === 'folder', ...(ngDevMode ? [{ debugName: "isFolderMode" }] : /* istanbul ignore next */ []));
|
|
22419
|
+
isMultiple = computed(() => !this.isFolderMode() && isTrue(this.config()?.multiple), ...(ngDevMode ? [{ debugName: "isMultiple" }] : /* istanbul ignore next */ []));
|
|
22420
|
+
hasDropZone = computed(() => !this.isFolderMode() && isTrue(this.config()?.dropZone), ...(ngDevMode ? [{ debugName: "hasDropZone" }] : /* istanbul ignore next */ []));
|
|
22421
|
+
readsText = computed(() => this.config()?.readAs === 'text', ...(ngDevMode ? [{ debugName: "readsText" }] : /* istanbul ignore next */ []));
|
|
22422
|
+
accept = computed(() => parseAccept(this.config()?.accept), ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
22423
|
+
/**
|
|
22424
|
+
* The pixels the ImageEditor frames to, or undefined when this Field has no
|
|
22425
|
+
* ImageEditor: `editor` off, `ratio` or `width` missing, a text read or a
|
|
22426
|
+
* folder — none of which hold a picture to frame.
|
|
22427
|
+
*/
|
|
22428
|
+
editorSize = computed(() => {
|
|
22429
|
+
const fieldConfig = this.config();
|
|
22430
|
+
if (!isTrue(fieldConfig?.editor))
|
|
22431
|
+
return undefined;
|
|
22432
|
+
if (this.isFolderMode() || this.readsText())
|
|
22433
|
+
return undefined;
|
|
22434
|
+
return outputSize(fieldConfig?.ratio, fieldConfig?.width);
|
|
22435
|
+
}, ...(ngDevMode ? [{ debugName: "editorSize" }] : /* istanbul ignore next */ []));
|
|
22436
|
+
maxSize = computed(() => {
|
|
22437
|
+
const size = Number(this.config()?.maxSize);
|
|
22438
|
+
return Number.isFinite(size) && size > 0 ? size : undefined;
|
|
22439
|
+
}, ...(ngDevMode ? [{ debugName: "maxSize" }] : /* istanbul ignore next */ []));
|
|
22440
|
+
isLocked = computed(() => {
|
|
22441
|
+
const fieldConfig = this.config();
|
|
22442
|
+
return (isTrue(this.disabled()) ||
|
|
22443
|
+
isTrue(this.readonly()) ||
|
|
22444
|
+
isTrue(fieldConfig?.disabled) ||
|
|
22445
|
+
isTrue(fieldConfig?.readonly));
|
|
22446
|
+
}, ...(ngDevMode ? [{ debugName: "isLocked" }] : /* istanbul ignore next */ []));
|
|
22447
|
+
/** Object URLs of the previews on show, keyed by what the value holds. */
|
|
22448
|
+
previews = new Map();
|
|
22449
|
+
heldFiles = computed(() => {
|
|
22450
|
+
const value = this.value();
|
|
22451
|
+
if (this.readsText()) {
|
|
22452
|
+
const texts = Array.isArray(value) ? value : [value];
|
|
22453
|
+
return this.pickedNames().map((name, index) => {
|
|
22454
|
+
const text = texts[index];
|
|
22455
|
+
// Only an SVG's text is still an image; any other read is not.
|
|
22456
|
+
const preview = typeof text === 'string' && fileExtension(name) === 'svg'
|
|
22457
|
+
? this.previewFor(text, () => new Blob([text], { type: 'image/svg+xml' }))
|
|
22458
|
+
: undefined;
|
|
22459
|
+
return this.toHeld(name, text, preview);
|
|
22460
|
+
});
|
|
22461
|
+
}
|
|
22462
|
+
const list = Array.isArray(value) ? value : value ? [value] : [];
|
|
22463
|
+
return list
|
|
22464
|
+
.filter((item) => item instanceof File)
|
|
22465
|
+
.map((file) => this.toHeld(file.name, file, file.type.startsWith('image/')
|
|
22466
|
+
? this.previewFor(file, () => file)
|
|
22467
|
+
: undefined));
|
|
22468
|
+
}, ...(ngDevMode ? [{ debugName: "heldFiles" }] : /* istanbul ignore next */ []));
|
|
22469
|
+
// A preview outlives its file only until the file leaves the value.
|
|
22470
|
+
releasePreviews = effect(() => {
|
|
22471
|
+
const held = new Set(this.heldFiles().map((file) => file.source));
|
|
22472
|
+
for (const [source, url] of this.previews) {
|
|
22473
|
+
if (held.has(source))
|
|
22474
|
+
continue;
|
|
22475
|
+
URL.revokeObjectURL(url);
|
|
22476
|
+
this.previews.delete(source);
|
|
22477
|
+
}
|
|
22478
|
+
}, ...(ngDevMode ? [{ debugName: "releasePreviews" }] : /* istanbul ignore next */ []));
|
|
22479
|
+
releaseAllPreviews = inject(DestroyRef).onDestroy(() => {
|
|
22480
|
+
this.previews.forEach((url) => URL.revokeObjectURL(url));
|
|
22481
|
+
this.previews.clear();
|
|
22482
|
+
});
|
|
22483
|
+
/** A `file` Field has no placeholder: it names the types it takes instead. */
|
|
22484
|
+
acceptLabel = computed(() => formatAccept(this.accept()), ...(ngDevMode ? [{ debugName: "acceptLabel" }] : /* istanbul ignore next */ []));
|
|
22485
|
+
dropPlaceholder = computed(() => this.acceptLabel() || this.translate.translate('drop-files-or-click'), ...(ngDevMode ? [{ debugName: "dropPlaceholder" }] : /* istanbul ignore next */ []));
|
|
22486
|
+
removeButton = computed(() => ({
|
|
22487
|
+
label: 'remove-file',
|
|
22488
|
+
icon: 'x',
|
|
22489
|
+
iconOnly: true,
|
|
22490
|
+
variant: 'ghost',
|
|
22491
|
+
one: true,
|
|
22492
|
+
type: 'button',
|
|
22493
|
+
disabled: this.isLocked(),
|
|
22494
|
+
}), ...(ngDevMode ? [{ debugName: "removeButton" }] : /* istanbul ignore next */ []));
|
|
22495
|
+
rejectionMessages = computed(() => {
|
|
22496
|
+
const max = formatFileSize(this.maxSize() ?? 0);
|
|
22497
|
+
return this.rejections().map((rejection) => {
|
|
22498
|
+
if (rejection.reason === 'size') {
|
|
22499
|
+
return {
|
|
22500
|
+
key: 'file-too-large',
|
|
22501
|
+
params: { name: rejection.name, max },
|
|
22502
|
+
};
|
|
22503
|
+
}
|
|
22504
|
+
if (rejection.reason === 'unreadable') {
|
|
22505
|
+
return { key: 'image-not-readable', params: { name: rejection.name } };
|
|
22506
|
+
}
|
|
22507
|
+
return { key: 'file-type-not-allowed', params: { name: rejection.name } };
|
|
22508
|
+
});
|
|
22509
|
+
}, ...(ngDevMode ? [{ debugName: "rejectionMessages" }] : /* istanbul ignore next */ []));
|
|
22138
22510
|
buttonConfig = computed(() => {
|
|
22139
22511
|
const fieldConfig = this.config();
|
|
22140
22512
|
if (this.isFolderMode()) {
|
|
22141
|
-
const
|
|
22513
|
+
const value = this.value();
|
|
22514
|
+
const folderPath = typeof value === 'string' ? value.trim() : '';
|
|
22142
22515
|
const hasFolderSelection = !!folderPath;
|
|
22143
22516
|
const placeholder = fieldConfig?.placeholder ?? 'select-folder';
|
|
22144
22517
|
return {
|
|
@@ -22155,71 +22528,246 @@ class FileUploadInputComponent extends BaseTextInputComponent {
|
|
|
22155
22528
|
type: 'button',
|
|
22156
22529
|
icon: hasFolderSelection ? undefined : fieldConfig?.icon ?? 'folder',
|
|
22157
22530
|
fullWidth: hasFolderSelection,
|
|
22158
|
-
disabled: this.disabled()
|
|
22159
|
-
|
|
22160
|
-
fieldConfig?.disabled === true ||
|
|
22161
|
-
fieldConfig?.disabled + '' === 'true' ||
|
|
22531
|
+
disabled: isTrue(this.disabled()) ||
|
|
22532
|
+
isTrue(fieldConfig?.disabled) ||
|
|
22162
22533
|
!this.files.folderPickSupported(),
|
|
22163
22534
|
};
|
|
22164
22535
|
}
|
|
22165
|
-
|
|
22166
|
-
|
|
22536
|
+
// What is picked is drawn beneath the button as tiles, so the button keeps
|
|
22537
|
+
// naming the types it takes.
|
|
22538
|
+
const value = this.value();
|
|
22539
|
+
const fallbackLabel = !this.isMultiple() &&
|
|
22540
|
+
!this.heldFiles().length &&
|
|
22541
|
+
typeof value === 'string' &&
|
|
22542
|
+
value.trim()
|
|
22543
|
+
? value
|
|
22544
|
+
: '';
|
|
22545
|
+
const label = fallbackLabel || this.acceptLabel();
|
|
22167
22546
|
return {
|
|
22168
|
-
label: label ||
|
|
22169
|
-
noTranslate: !!label
|
|
22547
|
+
label: label || 'choose-file',
|
|
22548
|
+
noTranslate: !!label,
|
|
22170
22549
|
variant: 'secondary',
|
|
22171
22550
|
one: true,
|
|
22172
22551
|
// In-Field trigger, not the form's submit — otherwise it greys out
|
|
22173
22552
|
// whenever the form is invalid.
|
|
22174
22553
|
type: 'button',
|
|
22175
|
-
icon: label
|
|
22554
|
+
icon: label ? undefined : fieldConfig?.icon ?? 'upload',
|
|
22176
22555
|
fullWidth: true,
|
|
22177
|
-
disabled: this.disabled()
|
|
22178
|
-
this.disabled() + '' === 'true' ||
|
|
22179
|
-
fieldConfig?.disabled === true ||
|
|
22180
|
-
fieldConfig?.disabled + '' === 'true',
|
|
22556
|
+
disabled: isTrue(this.disabled()) || isTrue(fieldConfig?.disabled),
|
|
22181
22557
|
};
|
|
22182
22558
|
}, ...(ngDevMode ? [{ debugName: "buttonConfig" }] : /* istanbul ignore next */ []));
|
|
22183
22559
|
openPicker = () => {
|
|
22184
|
-
|
|
22185
|
-
const isDisabled = this.disabled() === true ||
|
|
22186
|
-
this.disabled() + '' === 'true' ||
|
|
22187
|
-
fieldConfig?.disabled === true ||
|
|
22188
|
-
fieldConfig?.disabled + '' === 'true';
|
|
22189
|
-
const isReadonly = this.readonly() === true ||
|
|
22190
|
-
this.readonly() + '' === 'true' ||
|
|
22191
|
-
fieldConfig?.readonly === true ||
|
|
22192
|
-
fieldConfig?.readonly + '' === 'true';
|
|
22193
|
-
if (isDisabled || isReadonly)
|
|
22560
|
+
if (this.isLocked())
|
|
22194
22561
|
return;
|
|
22195
22562
|
if (this.isFolderMode()) {
|
|
22196
22563
|
void this.pickFolder();
|
|
22197
22564
|
return;
|
|
22198
22565
|
}
|
|
22199
|
-
void this.
|
|
22566
|
+
void this.pickFiles();
|
|
22200
22567
|
};
|
|
22201
|
-
|
|
22202
|
-
|
|
22568
|
+
onSpace = (event) => {
|
|
22569
|
+
event.preventDefault();
|
|
22570
|
+
this.openPicker();
|
|
22571
|
+
};
|
|
22572
|
+
onDragOver = (event) => {
|
|
22573
|
+
event.preventDefault();
|
|
22574
|
+
if (this.isLocked())
|
|
22575
|
+
return;
|
|
22576
|
+
if (event.dataTransfer)
|
|
22577
|
+
event.dataTransfer.dropEffect = 'copy';
|
|
22578
|
+
this.isDragging.set(true);
|
|
22579
|
+
};
|
|
22580
|
+
onDrop = (event) => {
|
|
22581
|
+
event.preventDefault();
|
|
22582
|
+
this.isDragging.set(false);
|
|
22583
|
+
if (this.isLocked())
|
|
22584
|
+
return;
|
|
22585
|
+
const dropped = Array.from(event.dataTransfer?.files ?? []);
|
|
22586
|
+
// One file for a single Field: the first dropped, the rest ignored, the way
|
|
22587
|
+
// the picker itself would have refused a second selection.
|
|
22588
|
+
void this.take(this.isMultiple() ? dropped : dropped.slice(0, 1));
|
|
22589
|
+
};
|
|
22590
|
+
removeAt = (index, event) => {
|
|
22591
|
+
// Inside the DropZone the removal would otherwise also open the picker.
|
|
22592
|
+
event.stopPropagation();
|
|
22593
|
+
if (this.isLocked())
|
|
22594
|
+
return;
|
|
22595
|
+
this.rejections.set([]);
|
|
22596
|
+
const value = this.value();
|
|
22597
|
+
if (this.isMultiple() && Array.isArray(value)) {
|
|
22598
|
+
const next = [...value];
|
|
22599
|
+
next.splice(index, 1);
|
|
22600
|
+
this.pickedNames.update((names) => names.filter((_, i) => i !== index));
|
|
22601
|
+
this.setValue(next);
|
|
22602
|
+
return;
|
|
22603
|
+
}
|
|
22604
|
+
this.pickedNames.set([]);
|
|
22605
|
+
this.setValue(undefined);
|
|
22606
|
+
};
|
|
22607
|
+
pickFiles = async () => {
|
|
22203
22608
|
const { files } = await this.files.getFiles({
|
|
22204
|
-
accept:
|
|
22609
|
+
accept: this.accept(),
|
|
22610
|
+
multiple: this.isMultiple(),
|
|
22205
22611
|
});
|
|
22206
|
-
|
|
22207
|
-
|
|
22612
|
+
await this.take(files);
|
|
22613
|
+
};
|
|
22614
|
+
take = async (incoming) => {
|
|
22615
|
+
if (!incoming.length)
|
|
22616
|
+
return;
|
|
22617
|
+
const { accepted, rejected } = await this.screen(incoming);
|
|
22618
|
+
this.rejections.set(rejected);
|
|
22619
|
+
if (!accepted.length) {
|
|
22620
|
+
this.touched.set(true);
|
|
22621
|
+
return;
|
|
22622
|
+
}
|
|
22623
|
+
if (this.readsText()) {
|
|
22624
|
+
const texts = await Promise.all(accepted.map((file) => file.text()));
|
|
22625
|
+
const names = accepted.map((file) => file.name);
|
|
22626
|
+
if (this.isMultiple()) {
|
|
22627
|
+
const current = this.value();
|
|
22628
|
+
this.pickedNames.update((held) => [...held, ...names]);
|
|
22629
|
+
const held = Array.isArray(current) ? current : [];
|
|
22630
|
+
this.setValue([...held, ...texts]);
|
|
22631
|
+
}
|
|
22632
|
+
else {
|
|
22633
|
+
this.pickedNames.set(names.slice(0, 1));
|
|
22634
|
+
this.setValue(texts[0]);
|
|
22635
|
+
}
|
|
22208
22636
|
return;
|
|
22209
|
-
|
|
22210
|
-
this.
|
|
22211
|
-
|
|
22637
|
+
}
|
|
22638
|
+
if (this.isMultiple()) {
|
|
22639
|
+
const current = this.value();
|
|
22640
|
+
const held = Array.isArray(current)
|
|
22641
|
+
? current.filter((item) => item instanceof File)
|
|
22642
|
+
: [];
|
|
22643
|
+
this.setValue(mergeFiles(held, accepted));
|
|
22644
|
+
}
|
|
22645
|
+
else {
|
|
22646
|
+
this.setValue(accepted[0]);
|
|
22647
|
+
}
|
|
22648
|
+
};
|
|
22649
|
+
/**
|
|
22650
|
+
* The files this Field keeps. Without an ImageEditor, `accept` and `maxSize`
|
|
22651
|
+
* in one pass. With one, each raster image is framed first and the size limit
|
|
22652
|
+
* judged on what the framing produced, since that is what gets uploaded.
|
|
22653
|
+
*/
|
|
22654
|
+
screen = async (incoming) => {
|
|
22655
|
+
const size = this.editorSize();
|
|
22656
|
+
if (!size || !this.modalStore) {
|
|
22657
|
+
return screenFiles(incoming, this.accept(), this.maxSize());
|
|
22658
|
+
}
|
|
22659
|
+
const typed = screenFiles(incoming, this.accept(), undefined);
|
|
22660
|
+
const edited = [];
|
|
22661
|
+
const rejected = [...typed.rejected];
|
|
22662
|
+
// One ImageEditor at a time, in pick order. A cancel drops that image only.
|
|
22663
|
+
for (const file of typed.accepted) {
|
|
22664
|
+
if (!isEditableImage(file)) {
|
|
22665
|
+
edited.push(file);
|
|
22666
|
+
continue;
|
|
22667
|
+
}
|
|
22668
|
+
const result = await this.openEditor(file, size);
|
|
22669
|
+
if (result?.file)
|
|
22670
|
+
edited.push(result.file);
|
|
22671
|
+
else if (result?.unreadable) {
|
|
22672
|
+
rejected.push({ name: file.name, reason: 'unreadable' });
|
|
22673
|
+
}
|
|
22674
|
+
}
|
|
22675
|
+
const sized = screenFiles(edited, [], this.maxSize());
|
|
22676
|
+
return {
|
|
22677
|
+
accepted: sized.accepted,
|
|
22678
|
+
rejected: [...rejected, ...sized.rejected],
|
|
22679
|
+
};
|
|
22680
|
+
};
|
|
22681
|
+
openEditor = async (file, size) => {
|
|
22682
|
+
const modalStore = this.modalStore;
|
|
22683
|
+
if (!modalStore)
|
|
22684
|
+
return undefined;
|
|
22685
|
+
const { ImageEditorComponent } = await import('./magmonium-one-image-editor-DleCJcan.mjs');
|
|
22686
|
+
const ratio = String(this.config()?.ratio ?? '');
|
|
22687
|
+
return new Promise((resolve) => {
|
|
22688
|
+
const modalRef = new ModalRef();
|
|
22689
|
+
const modalId = modalStore.open({
|
|
22690
|
+
component: ImageEditorComponent,
|
|
22691
|
+
providers: [{ provide: MODAL_REF, useValue: modalRef }],
|
|
22692
|
+
bindings: [
|
|
22693
|
+
inputBinding('file', () => file),
|
|
22694
|
+
inputBinding('ratio', () => ratio),
|
|
22695
|
+
inputBinding('width', () => size.width),
|
|
22696
|
+
],
|
|
22697
|
+
// Wider than a confirm's default 440px, so the stage is big enough to
|
|
22698
|
+
// frame in; the editor fills whatever width the modal gives it.
|
|
22699
|
+
config: { maxWidth: '560px' },
|
|
22700
|
+
});
|
|
22701
|
+
modalRef.onClose((result) => {
|
|
22702
|
+
resolve(result);
|
|
22703
|
+
modalStore.close(modalId);
|
|
22704
|
+
});
|
|
22705
|
+
});
|
|
22212
22706
|
};
|
|
22213
22707
|
pickFolder = async () => {
|
|
22214
22708
|
const picked = await this.files.pickFolder();
|
|
22215
22709
|
if (!picked)
|
|
22216
22710
|
return;
|
|
22217
|
-
this.
|
|
22711
|
+
this.pickedNames.set([picked.name]);
|
|
22218
22712
|
this.setValue(picked.name);
|
|
22219
22713
|
this.folderPickListener?.(picked.handle, picked.name);
|
|
22220
22714
|
};
|
|
22715
|
+
previewFor = (source, blob) => {
|
|
22716
|
+
if (typeof URL.createObjectURL !== 'function')
|
|
22717
|
+
return undefined;
|
|
22718
|
+
let url = this.previews.get(source);
|
|
22719
|
+
if (!url) {
|
|
22720
|
+
url = URL.createObjectURL(blob());
|
|
22721
|
+
this.previews.set(source, url);
|
|
22722
|
+
}
|
|
22723
|
+
return url;
|
|
22724
|
+
};
|
|
22725
|
+
toHeld = (name, source, preview) => ({
|
|
22726
|
+
name,
|
|
22727
|
+
source,
|
|
22728
|
+
kind: fileExtension(name).toUpperCase() || 'FILE',
|
|
22729
|
+
icon: fileIcon(name),
|
|
22730
|
+
preview,
|
|
22731
|
+
});
|
|
22732
|
+
setValue = (value) => {
|
|
22733
|
+
this.value.set(value);
|
|
22734
|
+
this.touched.set(true);
|
|
22735
|
+
};
|
|
22736
|
+
isEmpty = (value) => value === undefined ||
|
|
22737
|
+
value === null ||
|
|
22738
|
+
value === '' ||
|
|
22739
|
+
(Array.isArray(value) && value.length === 0);
|
|
22221
22740
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FileUploadInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
22222
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: FileUploadInputComponent, isStandalone: true, selector: "m-file-upload-input", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
22741
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: FileUploadInputComponent, isStandalone: true, selector: "m-file-upload-input", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, usesInheritance: true, ngImport: i0, template: `
|
|
22742
|
+
<ng-template #fileList>
|
|
22743
|
+
<ul class="file-tiles" [class.file-tiles--below]="!hasDropZone()">
|
|
22744
|
+
@for (held of heldFiles(); track $index) {
|
|
22745
|
+
<li class="file-tile" [attr.title]="held.name">
|
|
22746
|
+
<div class="file-tile__box">
|
|
22747
|
+
@if (held.preview) {
|
|
22748
|
+
<img
|
|
22749
|
+
class="file-tile__preview"
|
|
22750
|
+
[src]="held.preview"
|
|
22751
|
+
[alt]="held.name"
|
|
22752
|
+
/>
|
|
22753
|
+
} @else {
|
|
22754
|
+
<div class="file-tile__type">
|
|
22755
|
+
<m-icon [name]="held.icon" color="mm" [one]="true" />
|
|
22756
|
+
<span class="file-tile__kind">{{ held.kind }}</span>
|
|
22757
|
+
</div>
|
|
22758
|
+
}
|
|
22759
|
+
<span class="file-tile__remove">
|
|
22760
|
+
<m-button
|
|
22761
|
+
[config]="removeButton()"
|
|
22762
|
+
(click)="removeAt($index, $event)"
|
|
22763
|
+
/>
|
|
22764
|
+
</span>
|
|
22765
|
+
</div>
|
|
22766
|
+
<span class="file-tile__name">{{ held.name }}</span>
|
|
22767
|
+
</li>
|
|
22768
|
+
}
|
|
22769
|
+
</ul>
|
|
22770
|
+
</ng-template>
|
|
22223
22771
|
@if (config(); as fieldConfig) {
|
|
22224
22772
|
@if (fieldConfig.label) {
|
|
22225
22773
|
<m-label
|
|
@@ -22229,7 +22777,49 @@ class FileUploadInputComponent extends BaseTextInputComponent {
|
|
|
22229
22777
|
[disabled]="disabled()"
|
|
22230
22778
|
/>
|
|
22231
22779
|
}
|
|
22232
|
-
|
|
22780
|
+
@if (hasDropZone()) {
|
|
22781
|
+
<div
|
|
22782
|
+
class="drop-zone"
|
|
22783
|
+
role="button"
|
|
22784
|
+
[attr.tabindex]="isLocked() ? -1 : 0"
|
|
22785
|
+
[attr.aria-disabled]="isLocked()"
|
|
22786
|
+
[class.drop-zone--dragging]="isDragging()"
|
|
22787
|
+
[class.drop-zone--locked]="isLocked()"
|
|
22788
|
+
[class.error]="showErrors() || rejections().length > 0"
|
|
22789
|
+
(click)="openPicker()"
|
|
22790
|
+
(keydown.enter)="openPicker()"
|
|
22791
|
+
(keydown.space)="onSpace($event)"
|
|
22792
|
+
(dragover)="onDragOver($event)"
|
|
22793
|
+
(dragleave)="isDragging.set(false)"
|
|
22794
|
+
(drop)="onDrop($event)"
|
|
22795
|
+
>
|
|
22796
|
+
@if (heldFiles().length) {
|
|
22797
|
+
<ng-container *ngTemplateOutlet="fileList" />
|
|
22798
|
+
} @else {
|
|
22799
|
+
<div class="drop-zone__empty">
|
|
22800
|
+
<m-icon
|
|
22801
|
+
[name]="fieldConfig.icon ?? 'upload'"
|
|
22802
|
+
color="mm"
|
|
22803
|
+
[one]="true"
|
|
22804
|
+
/>
|
|
22805
|
+
<span>{{ dropPlaceholder() }}</span>
|
|
22806
|
+
</div>
|
|
22807
|
+
}
|
|
22808
|
+
</div>
|
|
22809
|
+
} @else {
|
|
22810
|
+
<m-button (click)="openPicker()" [config]="buttonConfig()" />
|
|
22811
|
+
@if (heldFiles().length) {
|
|
22812
|
+
<ng-container *ngTemplateOutlet="fileList" />
|
|
22813
|
+
}
|
|
22814
|
+
}
|
|
22815
|
+
@for (rejection of rejectionMessages(); track $index) {
|
|
22816
|
+
<m-text-output
|
|
22817
|
+
variant="footer"
|
|
22818
|
+
color="error"
|
|
22819
|
+
[label]="rejection.key"
|
|
22820
|
+
[params]="rejection.params"
|
|
22821
|
+
/>
|
|
22822
|
+
}
|
|
22233
22823
|
@if (showErrors()) {
|
|
22234
22824
|
@for (error of errors(); track $index) {
|
|
22235
22825
|
<m-text-output
|
|
@@ -22240,11 +22830,40 @@ class FileUploadInputComponent extends BaseTextInputComponent {
|
|
|
22240
22830
|
}
|
|
22241
22831
|
}
|
|
22242
22832
|
}
|
|
22243
|
-
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "m-button,m-one-button", inputs: ["config", "color", "labelClass", "fullWidth", "nav", "navParams", "href", "disabled", "variant", "name", "baseUrl", "one", "remote", "label", "noTranslate", "params", "noNative", "icon", "isRightIcon", "iconOnly", "stacked", "imgSrc", "nonClickable", "inverted", "isSubmit", "tabindex"], outputs: ["configChange", "clicked"] }, { kind: "component", type: LabelComponent, selector: "m-label", inputs: ["for", "placeholder", "params", "required", "disabled", "color"] }, { kind: "component", type: TextOutputComponent, selector: "m-text-output", inputs: ["config", "align", "variant", "color", "fontWeight", "label", "noTranslate", "params"], outputs: ["configChange", "clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22833
|
+
`, isInline: true, styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block}.drop-zone{display:flex;align-items:center;background:var(--m-background);height:calc(var(--input-size, 1em) * 2);min-height:calc(var(--input-size, 1em) * 2);border-width:max(1px,var(--input-size, 1em) * .0625);border-radius:calc(var(--input-size, 1em) * .4);padding:calc(var(--input-size, 1em) * .5) calc(var(--input-size, 1em) * .5);gap:calc(var(--input-size, 1em) * .375);font-size:var(--input-size, 1em);border-width:var(--m-input-border-width, 2px);border-radius:var(--m-input-radius, 4px);height:calc(var(--input-size, 1em) * 2.25);min-height:calc(var(--input-size, 1em) * 2.25);padding-top:0;padding-bottom:0;border-color:var(--m-input-color, var(--m-mm));transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease,opacity .2s ease}.drop-zone:hover:not(:disabled){background-color:color-mix(in srgb,var(--m-input-color, var(--m-mm)) 6%,transparent)}.drop-zone:disabled{opacity:.6;cursor:not-allowed}.drop-zone{border-style:solid;backdrop-filter:var(--m-text-input-backdrop-filter, none);-webkit-backdrop-filter:var(--m-text-input-backdrop-filter, none);box-shadow:var(--m-text-input-shadow, none)}.drop-zone:has(>m-one-button,>m-button,>.input-indicator,>.input-suffix,>m-icon:last-child){padding-right:0}.drop-zone:focus-visible:not(:disabled),.drop-zone:focus-within:not(:disabled){border-color:var(--m-text-input-focus-border, color-mix(in srgb, var(--m-focus) 45%, transparent));box-shadow:var(--m-text-input-shadow, none)}.drop-zone:has(.error){border-color:var(--m-error);box-shadow:none}.drop-zone:has(.error):focus-within{border-color:var(--m-error);box-shadow:none}.drop-zone input,.drop-zone textarea{flex:1;border:none;outline:none;background:transparent;color:var(--m-text);font-family:inherit;font-size:inherit;padding:0}.drop-zone input:focus,.drop-zone textarea:focus{border-color:transparent;box-shadow:none}.drop-zone{flex-direction:column;align-items:stretch;justify-content:center;width:100%;height:auto;min-height:calc(var(--m-textarea-input-height, 4.5em) + 1.5em);padding:.75em;border-style:dashed;cursor:pointer}.drop-zone--dragging{border-color:var(--m-focus);background:var(--m-focus-bg)}.drop-zone--locked{cursor:not-allowed;opacity:.6}.drop-zone.error{border-color:var(--m-error)}.drop-zone__empty{display:flex;flex-direction:column;align-items:center;gap:.5em;color:var(--m-mm);text-align:center}.file-tiles{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:.75em}.file-tiles--below{margin-top:.75em}.file-tile{--m-file-tile-size: 150px;display:flex;flex-direction:column;gap:.25em;width:var(--m-file-tile-size);max-width:100%}.file-tile__box{position:relative;width:100%;aspect-ratio:1;border:1px solid var(--m-border);border-radius:var(--m-input-radius, 4px);background:var(--m-background-lite);overflow:hidden}.file-tile__preview{display:block;width:100%;height:100%;object-fit:cover}.file-tile__type{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5em;height:100%;color:var(--m-mm)}.file-tile__kind{font-weight:600;letter-spacing:.05em}.file-tile__remove{position:absolute;top:.25em;right:.25em;display:flex;border-radius:50%;background:var(--m-background)}.file-tile__name{text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.85em;color:var(--m-text)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "m-button,m-one-button", inputs: ["config", "color", "labelClass", "fullWidth", "nav", "navParams", "href", "disabled", "variant", "name", "baseUrl", "one", "remote", "label", "noTranslate", "params", "noNative", "icon", "isRightIcon", "iconOnly", "stacked", "imgSrc", "nonClickable", "inverted", "isSubmit", "tabindex"], outputs: ["configChange", "clicked"] }, { kind: "component", type: IconComponent, selector: "m-icon, m-one-icon", inputs: ["config", "name", "color", "size", "one", "baseUrl", "remote"], outputs: ["configChange"] }, { kind: "component", type: LabelComponent, selector: "m-label", inputs: ["for", "placeholder", "params", "required", "disabled", "color"] }, { kind: "component", type: TextOutputComponent, selector: "m-text-output", inputs: ["config", "align", "variant", "color", "fontWeight", "label", "noTranslate", "params"], outputs: ["configChange", "clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22244
22834
|
}
|
|
22245
22835
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FileUploadInputComponent, decorators: [{
|
|
22246
22836
|
type: Component,
|
|
22247
22837
|
args: [{ selector: 'm-file-upload-input', template: `
|
|
22838
|
+
<ng-template #fileList>
|
|
22839
|
+
<ul class="file-tiles" [class.file-tiles--below]="!hasDropZone()">
|
|
22840
|
+
@for (held of heldFiles(); track $index) {
|
|
22841
|
+
<li class="file-tile" [attr.title]="held.name">
|
|
22842
|
+
<div class="file-tile__box">
|
|
22843
|
+
@if (held.preview) {
|
|
22844
|
+
<img
|
|
22845
|
+
class="file-tile__preview"
|
|
22846
|
+
[src]="held.preview"
|
|
22847
|
+
[alt]="held.name"
|
|
22848
|
+
/>
|
|
22849
|
+
} @else {
|
|
22850
|
+
<div class="file-tile__type">
|
|
22851
|
+
<m-icon [name]="held.icon" color="mm" [one]="true" />
|
|
22852
|
+
<span class="file-tile__kind">{{ held.kind }}</span>
|
|
22853
|
+
</div>
|
|
22854
|
+
}
|
|
22855
|
+
<span class="file-tile__remove">
|
|
22856
|
+
<m-button
|
|
22857
|
+
[config]="removeButton()"
|
|
22858
|
+
(click)="removeAt($index, $event)"
|
|
22859
|
+
/>
|
|
22860
|
+
</span>
|
|
22861
|
+
</div>
|
|
22862
|
+
<span class="file-tile__name">{{ held.name }}</span>
|
|
22863
|
+
</li>
|
|
22864
|
+
}
|
|
22865
|
+
</ul>
|
|
22866
|
+
</ng-template>
|
|
22248
22867
|
@if (config(); as fieldConfig) {
|
|
22249
22868
|
@if (fieldConfig.label) {
|
|
22250
22869
|
<m-label
|
|
@@ -22254,7 +22873,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
22254
22873
|
[disabled]="disabled()"
|
|
22255
22874
|
/>
|
|
22256
22875
|
}
|
|
22257
|
-
|
|
22876
|
+
@if (hasDropZone()) {
|
|
22877
|
+
<div
|
|
22878
|
+
class="drop-zone"
|
|
22879
|
+
role="button"
|
|
22880
|
+
[attr.tabindex]="isLocked() ? -1 : 0"
|
|
22881
|
+
[attr.aria-disabled]="isLocked()"
|
|
22882
|
+
[class.drop-zone--dragging]="isDragging()"
|
|
22883
|
+
[class.drop-zone--locked]="isLocked()"
|
|
22884
|
+
[class.error]="showErrors() || rejections().length > 0"
|
|
22885
|
+
(click)="openPicker()"
|
|
22886
|
+
(keydown.enter)="openPicker()"
|
|
22887
|
+
(keydown.space)="onSpace($event)"
|
|
22888
|
+
(dragover)="onDragOver($event)"
|
|
22889
|
+
(dragleave)="isDragging.set(false)"
|
|
22890
|
+
(drop)="onDrop($event)"
|
|
22891
|
+
>
|
|
22892
|
+
@if (heldFiles().length) {
|
|
22893
|
+
<ng-container *ngTemplateOutlet="fileList" />
|
|
22894
|
+
} @else {
|
|
22895
|
+
<div class="drop-zone__empty">
|
|
22896
|
+
<m-icon
|
|
22897
|
+
[name]="fieldConfig.icon ?? 'upload'"
|
|
22898
|
+
color="mm"
|
|
22899
|
+
[one]="true"
|
|
22900
|
+
/>
|
|
22901
|
+
<span>{{ dropPlaceholder() }}</span>
|
|
22902
|
+
</div>
|
|
22903
|
+
}
|
|
22904
|
+
</div>
|
|
22905
|
+
} @else {
|
|
22906
|
+
<m-button (click)="openPicker()" [config]="buttonConfig()" />
|
|
22907
|
+
@if (heldFiles().length) {
|
|
22908
|
+
<ng-container *ngTemplateOutlet="fileList" />
|
|
22909
|
+
}
|
|
22910
|
+
}
|
|
22911
|
+
@for (rejection of rejectionMessages(); track $index) {
|
|
22912
|
+
<m-text-output
|
|
22913
|
+
variant="footer"
|
|
22914
|
+
color="error"
|
|
22915
|
+
[label]="rejection.key"
|
|
22916
|
+
[params]="rejection.params"
|
|
22917
|
+
/>
|
|
22918
|
+
}
|
|
22258
22919
|
@if (showErrors()) {
|
|
22259
22920
|
@for (error of errors(); track $index) {
|
|
22260
22921
|
<m-text-output
|
|
@@ -22265,8 +22926,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
22265
22926
|
}
|
|
22266
22927
|
}
|
|
22267
22928
|
}
|
|
22268
|
-
`, imports: [
|
|
22269
|
-
|
|
22929
|
+
`, imports: [
|
|
22930
|
+
NgTemplateOutlet,
|
|
22931
|
+
ButtonComponent,
|
|
22932
|
+
IconComponent,
|
|
22933
|
+
LabelComponent,
|
|
22934
|
+
TextOutputComponent,
|
|
22935
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block}.drop-zone{display:flex;align-items:center;background:var(--m-background);height:calc(var(--input-size, 1em) * 2);min-height:calc(var(--input-size, 1em) * 2);border-width:max(1px,var(--input-size, 1em) * .0625);border-radius:calc(var(--input-size, 1em) * .4);padding:calc(var(--input-size, 1em) * .5) calc(var(--input-size, 1em) * .5);gap:calc(var(--input-size, 1em) * .375);font-size:var(--input-size, 1em);border-width:var(--m-input-border-width, 2px);border-radius:var(--m-input-radius, 4px);height:calc(var(--input-size, 1em) * 2.25);min-height:calc(var(--input-size, 1em) * 2.25);padding-top:0;padding-bottom:0;border-color:var(--m-input-color, var(--m-mm));transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease,opacity .2s ease}.drop-zone:hover:not(:disabled){background-color:color-mix(in srgb,var(--m-input-color, var(--m-mm)) 6%,transparent)}.drop-zone:disabled{opacity:.6;cursor:not-allowed}.drop-zone{border-style:solid;backdrop-filter:var(--m-text-input-backdrop-filter, none);-webkit-backdrop-filter:var(--m-text-input-backdrop-filter, none);box-shadow:var(--m-text-input-shadow, none)}.drop-zone:has(>m-one-button,>m-button,>.input-indicator,>.input-suffix,>m-icon:last-child){padding-right:0}.drop-zone:focus-visible:not(:disabled),.drop-zone:focus-within:not(:disabled){border-color:var(--m-text-input-focus-border, color-mix(in srgb, var(--m-focus) 45%, transparent));box-shadow:var(--m-text-input-shadow, none)}.drop-zone:has(.error){border-color:var(--m-error);box-shadow:none}.drop-zone:has(.error):focus-within{border-color:var(--m-error);box-shadow:none}.drop-zone input,.drop-zone textarea{flex:1;border:none;outline:none;background:transparent;color:var(--m-text);font-family:inherit;font-size:inherit;padding:0}.drop-zone input:focus,.drop-zone textarea:focus{border-color:transparent;box-shadow:none}.drop-zone{flex-direction:column;align-items:stretch;justify-content:center;width:100%;height:auto;min-height:calc(var(--m-textarea-input-height, 4.5em) + 1.5em);padding:.75em;border-style:dashed;cursor:pointer}.drop-zone--dragging{border-color:var(--m-focus);background:var(--m-focus-bg)}.drop-zone--locked{cursor:not-allowed;opacity:.6}.drop-zone.error{border-color:var(--m-error)}.drop-zone__empty{display:flex;flex-direction:column;align-items:center;gap:.5em;color:var(--m-mm);text-align:center}.file-tiles{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:.75em}.file-tiles--below{margin-top:.75em}.file-tile{--m-file-tile-size: 150px;display:flex;flex-direction:column;gap:.25em;width:var(--m-file-tile-size);max-width:100%}.file-tile__box{position:relative;width:100%;aspect-ratio:1;border:1px solid var(--m-border);border-radius:var(--m-input-radius, 4px);background:var(--m-background-lite);overflow:hidden}.file-tile__preview{display:block;width:100%;height:100%;object-fit:cover}.file-tile__type{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5em;height:100%;color:var(--m-mm)}.file-tile__kind{font-weight:600;letter-spacing:.05em}.file-tile__remove{position:absolute;top:.25em;right:.25em;display:flex;border-radius:50%;background:var(--m-background)}.file-tile__name{text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.85em;color:var(--m-text)}\n"] }]
|
|
22936
|
+
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
22270
22937
|
|
|
22271
22938
|
var fileUploadInput = /*#__PURE__*/Object.freeze({
|
|
22272
22939
|
__proto__: null,
|
|
@@ -35546,5 +36213,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
35546
36213
|
* Generated bundle index. Do not edit.
|
|
35547
36214
|
*/
|
|
35548
36215
|
|
|
35549
|
-
export { DEFAULT_FILTER_RANGE_MODE as $, ACCESS_DOMAINS as A, BaseInputComponent as B, COMPONENT_INPUT_REGISTRY as C, CardComponent as D, CardWrapperComponent as E, CarouselComponent as F, ChartComponent as G, ChatBubbleComponent as H, IS_DESIGN_MODE as I, CheckboxInputComponent as J, ClearableInputComponent as K, LabelComponent as L, ColComponent as M, ColorPickerInputComponent as N, CommentItemComponent as O, CommentsApiService as P, CommentsComponent as Q, CommentsStore as R, CompactNumberPipe as S, TranslatePipe as T, ComponentInputComponent as U, ComponentStepperComponent as V, ConfigComponent as W, ConfirmComponent as X, ContextMenuComponent as Y, CustomIconClass as Z, CustomIconEditComponent as _, BaseTextInputComponent as a, MoneyPipe as a$, DEFAULT_FILTER_VARIANT as a0, DEFAULT_NAV_PARAM as a1, DEFAULT_NAV_SEGMENT as a2, DEFAULT_SIZE as a3, DashboardCardComponent as a4, DateInputComponent as a5, DatePickerComponent as a6, DeviceService as a7, DomService as a8, Domain as a9, IconComponent as aA, ImgComponent as aB, InputType as aC, InstrumentScoreComponent as aD, InterceptorObservables as aE, JumbotronComponent as aF, KeyValueComponent as aG, LAYOUT_ASSET_FOLDER as aH, LOGIN_COMPONENT as aI, LOGIN_STORE as aJ, LanguageComponent as aK, ListComponent as aL, LogoComponent as aM, MAG_SOCKET_EVENT as aN, MHeroColorDirective as aO, MHeroComponent as aP, MODAL_REF as aQ, MODAL_STORE_REF as aR, MRefDirective as aS, MStepComponent as aT, MURL_PARAM as aU, MURL_SEP as aV, ManifestEnrichmentService as aW, MenuComponent as aX, ModalDirective as aY, ModalRef as aZ, ModalStore as a_, DotGridComponent as aa, DragListDirective as ab, DragListItemDirective as ac, DraggableDirective as ad, DropdownInputComponent as ae, FILTER_GROUP_CONTEXT as af, FILTER_RANGE_MODES as ag, FILTER_VARIANTS as ah, FLEX_VARIANTS as ai, FOLDER_PICK_LISTENER as aj, FORM_ASSET_FOLDER as ak, FileService as al, FileUploadDirective as am, FileUploadInputComponent as an, FlexComponent as ao, FlexItemComponent as ap, FormGroupComponent as aq, FrameComponent as ar, FreezeService as as, GRID_BREAKPOINTS as at, GetNavService as au, HeaderComponent$1 as av, HighlightDirective as aw, HttpService as ax, ICON_SOURCE as ay, IS_SIDE_PANEL as az, TextOutputComponent as b, SearchUserPanelComponent as b$, MultiRangeInputComponent as b0, MurlUrlSerializer as b1, NAV_DEFAULT_MURL as b2, NAV_ID_SEP as b3, NAV_MAIN_BUTTONS as b4, NAV_SEGMENT_RE as b5, NAV_STORE_REF as b6, NAV_WC_COMPONENTS as b7, NAV_WIDGET_MAP as b8, NavComponent as b9, PanelComponent as bA, PercentagePipe as bB, PlaygroundComponent as bC, PositionDirective as bD, PwaInstallComponent as bE, ROOT_NAV$1 as bF, RadioGroupComponent as bG, RadioInputComponent as bH, RangeInputComponent as bI, RatingInputComponent as bJ, ReactiveElementComponent as bK, RemoteComponent as bL, RemoteLoaderService as bM, ResizeElementComponent as bN, RouteContainer as bO, RowComponent as bP, SEARCH_QUERY as bQ, SEARCH_RESULTS_EVENT as bR, SECTION_ACCORDION_GROUP as bS, SECTION_FORM_CONTEXT as bT, SHARED_ICONS as bU, SIZE_CONTEXT as bV, ScoreComponent as bW, ScrollComponent as bX, ScrollService as bY, SearchPanelComponent as bZ, SearchStore as b_, NavDetailsComponent as ba, NavHeaderComponent as bb, NavMenuComponent as bc, NavStore as bd, NavTrailComponent as be, NothingComponent as bf, NotificationElementComponent as bg, NotificationGroupComponent as bh, NotificationPopupComponent as bi, NotificationService as bj, NotificationStore as bk, NotificationType as bl, NotificationWidgetComponent as bm, ONE_ASSET_BASE_URL as bn, OPTIONS_SOURCE as bo, OVERLAY_WIDGETS as bp, OneApp as bq, OptionsSourceDirective as br, OverlayBodyComponent as bs, OverlayRef as bt, OverlayService as bu, PLATFORM_BUTTON_NAV_IDS as bv, PLATFORM_EXTENSIBLE_NAV_IDS as bw, PLATFORM_NAV_MAP as bx, PLATFORM_ROOT_CHILDREN as by, PaginationComponent as bz, ButtonComponent as c, TreeGridComponent as c$, SectionAccordionDirective as c0, SectionAccordionGroupDirective as c1, SectionBackComponent as c2, SectionBadgesComponent as c3, SectionButtonGroupComponent as c4, SectionCardComponent as c5, SectionCarouselComponent as c6, SectionComponent as c7, SectionFilterComponent as c8, SectionFilterGroupComponent as c9, StepperComponent as cA, StepsComponent as cB, StorageService as cC, StrokeLinecap as cD, StrokeLinejoin as cE, SummaryComponent as cF, SvgGeneratorComponent as cG, SvgGeneratorService as cH, SvgService as cI, TOTAL_COLUMNS as cJ, TRANSLATION_SOURCE as cK, TableComponent as cL, TechnicalMeterComponent as cM, TextInputComponent as cN, TextareaInputComponent as cO, ThemeComponent as cP, ThemeDataService as cQ, ThemeService as cR, ThemeStore as cS, TimeAgoPipe as cT, TimelineComponent as cU, ToggleButtonComponent as cV, ToggleInputComponent as cW, ToggleRadioInputComponent as cX, ToolTipDirective as cY, TooltipComponent as cZ, TranslateService as c_, SectionFilterMenuComponent as ca, SectionFilterPanelComponent as cb, SectionFilterRangePanelComponent as cc, SectionFooterComponent as cd, SectionFormComponent as ce, SectionFormItemComponent as cf, SectionHeaderComponent as cg, SectionHeroComponent as ch, SectionPaginationComponent as ci, SectionSearchComponent as cj, SectionStepperComponent as ck, SectionTabsComponent as cl, SectionToggleComponent as cm, SectionToggleItemDirective as cn, SelectableCardInputComponent as co, SelectorDirective as cp, SettingsSearchBarComponent as cq, SettingsSearchService as cr, ShapeComponent as cs, SharedStoreRegistry as ct, SidePanelDirective as cu, Size as cv, SocketStore as cw, SortComponent as cx, StatComponent as cy, StepComponent as cz, APP_CONTEXT_REF as d, getScrollParent as d$, URL_SEP as d0, USER_STORE_REF as d1, USER_TAB_MAP as d2, UniverseComponent as d3, UserApiService as d4, UserAvatarComponent as d5, UserComponent as d6, UserNavComponent as d7, UserSettingsComponent as d8, UserStore as d9, deriveContrastColor as dA, deriveOppositeColor as dB, derivePropertyName as dC, emailValidation as dD, evaluate as dE, evaluateBool as dF, filterHoldsList as dG, filterHoldsOneBound as dH, filterHoldsOptions as dI, filterHoldsRange as dJ, filterList as dK, filterNumber as dL, filterNumberList as dM, filterOne as dN, filterPanelOf as dO, filterPanelWidth as dP, filterRange as dQ, filterTreeGridRows as dR, filterValueList as dS, filterValues as dT, flattenTreeGridRows as dU, formatBadgeCount as dV, fullName as dW, generateClipPath as dX, generateTransform as dY, getClassList as dZ, getProperty as d_, WC_ROUTE_CHANGED_EVENT as da, WC_SEARCH_GROUPS as db, WIN_USER_TAB_HOOK as dc, WIN_USER_TAB_KEY as dd, WatermarkComponent as de, WcRouterStore as df, WrapperInputComponent as dg, anchorNavId as dh, applyColorsToElement as di, assetOptions as dj, bootstrapMagApp as dk, bootstrapPwaInstall as dl, buildWcBaseUrl as dm, calculateLuminance as dn, calculateRanks as dp, cellText as dq, checkFilterCondition as dr, childNavId as ds, classListSignal as dt, coerceSize as du, cornerEdge as dv, cornerSide as dw, createMap as dx, createPlatformNavMap as dy, deriveAvatarGradient as dz, ASSET_BASE_URL as e, processImageToSvg as e$, getTierFromPreviewPath as e0, getTreeGridRow as e1, getUniqueId as e2, getValue as e3, hasErrorComputed as e4, hexToRgb as e5, hslToRgb$1 as e6, initMagmoniumApp as e7, initialNotificationState as e8, initialState$2 as e9, matchFieldValidation as eA, maxLengthValidation as eB, maxValidation as eC, mergePlatformNav as eD, mergeUnique as eE, mergeUniqueBy as eF, mergeUniqueWith as eG, minAgeValidation as eH, minLengthValidation as eI, minValidation as eJ, miniMarkToHtml as eK, navIdChain as eL, navIdFor as eM, navIdSegment as eN, navIdToRoutePath as eO, navIdToSegments as eP, navParamOf as eQ, navToId as eR, normalizeAssetOptions as eS, parentNavId as eT, parseAddress as eU, parseColor as eV, parsePatternNames as eW, patternValidation as eX, patternsValidation as eY, platformNavWidgets as eZ, privateGuard as e_, initials as ea, injectAuthenticate as eb, injectInstallApp as ec, injectParentSize as ed, injectScrollSticky as ee, isButtonName as ef, isCancelledComputed as eg, isExtensiblePlatformNavId as eh, isJson as ei, isLoadingComputed as ej, isLocalhost as ek, isNavInstanceConfig as el, isNavMenuConfig as em, isNavRowsConfig as en, isPlatformNavId as eo, isSize as ep, isTierPreview as eq, isUrlLocalhost as er, isValidNavId as es, isValidNavSegment as et, isWebComponent as eu, linkToId as ev, linkToNav as ew, loadingActions as ex, mInterceptor as ey, manualValidation as ez, AccordionBodyDirective as f, provideAppContext as f0, provideMagAppConfig as f1, provideMagWcConfig as f2, provideMagWcRoutes as f3, provideModalComponents as f4, provideMurlUrlSerializer as f5, provideNavWidgets as f6, provideOverlayWidgets as f7, providePlatformNavWidgets as f8, provideSearch as f9, toHostNavId as fA, toLength$1 as fB, toLocalNavId as fC, toggleTreeGridRow as fD, unfetchedPlatformNav as fE, urlValidation as fF, provideSizeContext as fa, provideUserTabs as fb, publicGuard as fc, readFieldPatterns as fd, renderAddress as fe, requiredValidation as ff, resolveConfigAsset as fg, resolveIconSize as fh, resolvePallet as fi, resolvePatternRules as fj, resolveSize as fk, rgbToHex as fl, rgbToHsl as fm, rowHasChildren as fn, samePatterns as fo, segmentsToNavId as fp, setProperty as fq, setTreeGridChildren as fr, settingsWidgets as fs, shouldShowBadge as ft, splitNavId as fu, splitOnMatch as fv, stringToColor as fw, toAttrBool as fx, toAttrNumber as fy, toCssLength as fz, AccordionComponent as g, AccordionGroupComponent as h, ActionComponent as i, AnimatedGraphsComponent as j, AppCardComponent as k, AppRelationType as l, AppTileComponent as m, AssetStore as n, AssetUrlPipe as o, Assets as p, AuthActivityPageComponent as q, AuthApiService as r, AuthStore as s, AutosizeDirective as t, BadgeComponent as u, BandingComponent as v, BaseArrayInputComponent as w, BaseRootWebComponent as x, BaseWebComponent as y, ButtonGroupComponent as z };
|
|
35550
|
-
//# sourceMappingURL=magmonium-one-magmonium-one-
|
|
36216
|
+
export { ColComponent as $, ACCESS_DOMAINS as A, ButtonComponent as B, Assets as C, AuthActivityPageComponent as D, AuthApiService as E, AuthStore as F, AutosizeDirective as G, HeaderComponent$1 as H, InputType as I, BadgeComponent as J, BandingComponent as K, LabelComponent as L, MODAL_REF as M, BaseArrayInputComponent as N, BaseRootWebComponent as O, BaseWebComponent as P, ButtonGroupComponent as Q, RangeInputComponent as R, COMPONENT_INPUT_REGISTRY as S, TranslatePipe as T, CardComponent as U, CardWrapperComponent as V, CarouselComponent as W, ChartComponent as X, ChatBubbleComponent as Y, CheckboxInputComponent as Z, ClearableInputComponent as _, MIN_ZOOM as a, MHeroComponent as a$, ColorPickerInputComponent as a0, CommentItemComponent as a1, CommentsApiService as a2, CommentsComponent as a3, CommentsStore as a4, CompactNumberPipe as a5, ComponentInputComponent as a6, ComponentStepperComponent as a7, ConfigComponent as a8, ConfirmComponent as a9, FileUploadDirective as aA, FileUploadInputComponent as aB, FlexComponent as aC, FlexItemComponent as aD, FormGroupComponent as aE, FrameComponent as aF, FreezeService as aG, GRID_BREAKPOINTS as aH, GetNavService as aI, HighlightDirective as aJ, HttpService as aK, ICON_SOURCE as aL, IS_SIDE_PANEL as aM, IconComponent as aN, ImgComponent as aO, InstrumentScoreComponent as aP, InterceptorObservables as aQ, JumbotronComponent as aR, KeyValueComponent as aS, LAYOUT_ASSET_FOLDER as aT, LOGIN_COMPONENT as aU, LOGIN_STORE as aV, LanguageComponent as aW, ListComponent as aX, LogoComponent as aY, MAG_SOCKET_EVENT as aZ, MHeroColorDirective as a_, ContextMenuComponent as aa, CustomIconClass as ab, CustomIconEditComponent as ac, DEFAULT_FILTER_RANGE_MODE as ad, DEFAULT_FILTER_VARIANT as ae, DEFAULT_NAV_PARAM as af, DEFAULT_NAV_SEGMENT as ag, DEFAULT_SIZE as ah, DashboardCardComponent as ai, DateInputComponent as aj, DatePickerComponent as ak, DeviceService as al, DomService as am, Domain as an, DotGridComponent as ao, DragListDirective as ap, DragListItemDirective as aq, DraggableDirective as ar, DropdownInputComponent as as, FILTER_GROUP_CONTEXT as at, FILTER_RANGE_MODES as au, FILTER_VARIANTS as av, FLEX_VARIANTS as aw, FOLDER_PICK_LISTENER as ax, FORM_ASSET_FOLDER as ay, FileService as az, MAX_ZOOM as b, SEARCH_RESULTS_EVENT as b$, MODAL_STORE_REF as b0, MRefDirective as b1, MStepComponent as b2, MURL_PARAM as b3, MURL_SEP as b4, ManifestEnrichmentService as b5, MenuComponent as b6, ModalDirective as b7, ModalRef as b8, ModalStore as b9, OVERLAY_WIDGETS as bA, OneApp as bB, OptionsSourceDirective as bC, OverlayBodyComponent as bD, OverlayRef as bE, OverlayService as bF, PLATFORM_BUTTON_NAV_IDS as bG, PLATFORM_EXTENSIBLE_NAV_IDS as bH, PLATFORM_NAV_MAP as bI, PLATFORM_ROOT_CHILDREN as bJ, PaginationComponent as bK, PanelComponent as bL, PercentagePipe as bM, PlaygroundComponent as bN, PositionDirective as bO, PwaInstallComponent as bP, ROOT_NAV$1 as bQ, RadioGroupComponent as bR, RadioInputComponent as bS, RatingInputComponent as bT, ReactiveElementComponent as bU, RemoteComponent as bV, RemoteLoaderService as bW, ResizeElementComponent as bX, RouteContainer as bY, RowComponent as bZ, SEARCH_QUERY as b_, MoneyPipe as ba, MultiRangeInputComponent as bb, MurlUrlSerializer as bc, NAV_DEFAULT_MURL as bd, NAV_ID_SEP as be, NAV_MAIN_BUTTONS as bf, NAV_SEGMENT_RE as bg, NAV_STORE_REF as bh, NAV_WC_COMPONENTS as bi, NAV_WIDGET_MAP as bj, NavComponent as bk, NavDetailsComponent as bl, NavHeaderComponent as bm, NavMenuComponent as bn, NavStore as bo, NavTrailComponent as bp, NothingComponent as bq, NotificationElementComponent as br, NotificationGroupComponent as bs, NotificationPopupComponent as bt, NotificationService as bu, NotificationStore as bv, NotificationType as bw, NotificationWidgetComponent as bx, ONE_ASSET_BASE_URL as by, OPTIONS_SOURCE as bz, cropRect as c, ThemeService as c$, SECTION_ACCORDION_GROUP as c0, SECTION_FORM_CONTEXT as c1, SHARED_ICONS as c2, SIZE_CONTEXT as c3, ScoreComponent as c4, ScrollComponent as c5, ScrollService as c6, SearchPanelComponent as c7, SearchStore as c8, SearchUserPanelComponent as c9, SettingsSearchBarComponent as cA, SettingsSearchService as cB, ShapeComponent as cC, SharedStoreRegistry as cD, SidePanelDirective as cE, Size as cF, SocketStore as cG, SortComponent as cH, StatComponent as cI, StepComponent as cJ, StepperComponent as cK, StepsComponent as cL, StorageService as cM, StrokeLinecap as cN, StrokeLinejoin as cO, SummaryComponent as cP, SvgGeneratorComponent as cQ, SvgGeneratorService as cR, SvgService as cS, TOTAL_COLUMNS as cT, TRANSLATION_SOURCE as cU, TableComponent as cV, TechnicalMeterComponent as cW, TextInputComponent as cX, TextareaInputComponent as cY, ThemeComponent as cZ, ThemeDataService as c_, SectionAccordionDirective as ca, SectionAccordionGroupDirective as cb, SectionBackComponent as cc, SectionBadgesComponent as cd, SectionButtonGroupComponent as ce, SectionCardComponent as cf, SectionCarouselComponent as cg, SectionComponent as ch, SectionFilterComponent as ci, SectionFilterGroupComponent as cj, SectionFilterMenuComponent as ck, SectionFilterPanelComponent as cl, SectionFilterRangePanelComponent as cm, SectionFooterComponent as cn, SectionFormComponent as co, SectionFormItemComponent as cp, SectionHeaderComponent as cq, SectionHeroComponent as cr, SectionPaginationComponent as cs, SectionSearchComponent as ct, SectionStepperComponent as cu, SectionTabsComponent as cv, SectionToggleComponent as cw, SectionToggleItemDirective as cx, SelectableCardInputComponent as cy, SelectorDirective as cz, drawFramed as d, filterTreeGridRows as d$, ThemeStore as d0, TimeAgoPipe as d1, TimelineComponent as d2, ToggleButtonComponent as d3, ToggleInputComponent as d4, ToggleRadioInputComponent as d5, ToolTipDirective as d6, TooltipComponent as d7, TranslateService as d8, TreeGridComponent as d9, cellText as dA, checkFilterCondition as dB, childNavId as dC, classListSignal as dD, coerceSize as dE, cornerEdge as dF, cornerSide as dG, createMap as dH, createPlatformNavMap as dI, deriveAvatarGradient as dJ, deriveContrastColor as dK, deriveOppositeColor as dL, derivePropertyName as dM, emailValidation as dN, evaluate as dO, evaluateBool as dP, filterHoldsList as dQ, filterHoldsOneBound as dR, filterHoldsOptions as dS, filterHoldsRange as dT, filterList as dU, filterNumber as dV, filterNumberList as dW, filterOne as dX, filterPanelOf as dY, filterPanelWidth as dZ, filterRange as d_, URL_SEP as da, USER_STORE_REF as db, USER_TAB_MAP as dc, UniverseComponent as dd, UserApiService as de, UserAvatarComponent as df, UserComponent as dg, UserNavComponent as dh, UserSettingsComponent as di, UserStore as dj, WC_ROUTE_CHANGED_EVENT as dk, WC_SEARCH_GROUPS as dl, WIN_USER_TAB_HOOK as dm, WIN_USER_TAB_KEY as dn, WatermarkComponent as dp, WcRouterStore as dq, WrapperInputComponent as dr, anchorNavId as ds, applyColorsToElement as dt, assetOptions as du, bootstrapMagApp as dv, bootstrapPwaInstall as dw, buildWcBaseUrl as dx, calculateLuminance as dy, calculateRanks as dz, encodeFramed as e, navToId as e$, filterValueList as e0, filterValues as e1, flattenTreeGridRows as e2, formatBadgeCount as e3, fullName as e4, generateClipPath as e5, generateTransform as e6, getClassList as e7, getProperty as e8, getScrollParent as e9, isTierPreview as eA, isUrlLocalhost as eB, isValidNavId as eC, isValidNavSegment as eD, isWebComponent as eE, linkToId as eF, linkToNav as eG, loadingActions as eH, mInterceptor as eI, manualValidation as eJ, matchFieldValidation as eK, maxLengthValidation as eL, maxValidation as eM, mergePlatformNav as eN, mergeUnique as eO, mergeUniqueBy as eP, mergeUniqueWith as eQ, minAgeValidation as eR, minLengthValidation as eS, minValidation as eT, miniMarkToHtml as eU, navIdChain as eV, navIdFor as eW, navIdSegment as eX, navIdToRoutePath as eY, navIdToSegments as eZ, navParamOf as e_, getTierFromPreviewPath as ea, getTreeGridRow as eb, getUniqueId as ec, getValue as ed, hasErrorComputed as ee, hexToRgb as ef, hslToRgb$1 as eg, initMagmoniumApp as eh, initialNotificationState as ei, initialState$2 as ej, initials as ek, injectAuthenticate as el, injectInstallApp as em, injectParentSize as en, injectScrollSticky as eo, isButtonName as ep, isCancelledComputed as eq, isExtensiblePlatformNavId as er, isJson as es, isLoadingComputed as et, isLocalhost as eu, isNavInstanceConfig as ev, isNavMenuConfig as ew, isNavRowsConfig as ex, isPlatformNavId as ey, isSize as ez, clampFraming as f, normalizeAssetOptions as f0, parentNavId as f1, parseAddress as f2, parseColor as f3, parsePatternNames as f4, patternValidation as f5, patternsValidation as f6, platformNavWidgets as f7, privateGuard as f8, processImageToSvg as f9, setProperty as fA, setTreeGridChildren as fB, settingsWidgets as fC, shouldShowBadge as fD, splitNavId as fE, splitOnMatch as fF, stringToColor as fG, toAttrBool as fH, toAttrNumber as fI, toCssLength as fJ, toHostNavId as fK, toLength$1 as fL, toLocalNavId as fM, toggleTreeGridRow as fN, unfetchedPlatformNav as fO, urlValidation as fP, provideAppContext as fa, provideMagAppConfig as fb, provideMagWcConfig as fc, provideMagWcRoutes as fd, provideModalComponents as fe, provideMurlUrlSerializer as ff, provideNavWidgets as fg, provideOverlayWidgets as fh, providePlatformNavWidgets as fi, provideSearch as fj, provideSizeContext as fk, provideUserTabs as fl, publicGuard as fm, readFieldPatterns as fn, renderAddress as fo, requiredValidation as fp, resolveConfigAsset as fq, resolveIconSize as fr, resolvePallet as fs, resolvePatternRules as ft, resolveSize as fu, rgbToHex as fv, rgbToHsl as fw, rowHasChildren as fx, samePatterns as fy, segmentsToNavId as fz, BaseInputComponent as g, BaseTextInputComponent as h, initialFraming as i, TextOutputComponent as j, IS_DESIGN_MODE as k, APP_CONTEXT_REF as l, ASSET_BASE_URL as m, AccordionBodyDirective as n, outputSize as o, parseRatio as p, AccordionComponent as q, renameForType as r, AccordionGroupComponent as s, ActionComponent as t, AnimatedGraphsComponent as u, AppCardComponent as v, AppRelationType as w, AppTileComponent as x, AssetStore as y, AssetUrlPipe as z };
|
|
36217
|
+
//# sourceMappingURL=magmonium-one-magmonium-one-DpJYXHAK.mjs.map
|