@mmlogic/components 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{collection/utils/cell-renderer.js → mosterdcomponents/cell-renderer-CbRwLOo8.js} +9 -3
- package/dist/mosterdcomponents/cell-renderer-CbRwLOo8.js.map +1 -0
- package/dist/{esm/index.js → mosterdcomponents/client-layout-D88nn5zf.js} +4 -1
- package/dist/mosterdcomponents/client-layout-D88nn5zf.js.map +1 -0
- package/dist/{collection/utils/format.js → mosterdcomponents/format-BAfsQfy1.js} +12 -7
- package/dist/mosterdcomponents/format-BAfsQfy1.js.map +1 -0
- package/dist/{collection/utils/i18n.js → mosterdcomponents/i18n-hoGGKbKU.js} +6 -1
- package/dist/mosterdcomponents/i18n-hoGGKbKU.js.map +1 -0
- package/dist/mosterdcomponents/index-B_tPFIvS.js +4585 -0
- package/dist/mosterdcomponents/index-B_tPFIvS.js.map +1 -0
- package/dist/mosterdcomponents/index-I5SuYv7a.js +4 -0
- package/dist/mosterdcomponents/index-I5SuYv7a.js.map +1 -0
- package/dist/mosterdcomponents/index.esm.js +5 -1
- package/dist/mosterdcomponents/index.esm.js.map +1 -0
- package/dist/mosterdcomponents/mosterdcomponents.css +180 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +50 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +1 -0
- package/dist/mosterdcomponents/mrd-boolean-field.entry.js +37 -0
- package/dist/mosterdcomponents/mrd-boolean-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-currency-field.entry.js +67 -0
- package/dist/mosterdcomponents/mrd-currency-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-date-field.entry.js +46 -0
- package/dist/mosterdcomponents/mrd-date-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-datetime-field.entry.js +78 -0
- package/dist/mosterdcomponents/mrd-datetime-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-email-field.entry.js +50 -0
- package/dist/mosterdcomponents/mrd-email-field.entry.js.map +1 -0
- package/dist/{collection/components/mrd-field/mrd-field.js → mosterdcomponents/mrd-field.entry.js} +28 -179
- package/dist/mosterdcomponents/mrd-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-file-field.entry.js +108 -0
- package/dist/mosterdcomponents/mrd-file-field.entry.js.map +1 -0
- package/dist/{collection/components/mrd-form/mrd-form.js → mosterdcomponents/mrd-form.entry.js} +31 -308
- package/dist/mosterdcomponents/mrd-form.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-hyperlink-field.entry.js +87 -0
- package/dist/mosterdcomponents/mrd-hyperlink-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-image-field.entry.js +122 -0
- package/dist/mosterdcomponents/mrd-image-field.entry.js.map +1 -0
- package/dist/{collection/components/mrd-layout-section/mrd-layout-section.js → mosterdcomponents/mrd-layout-section.entry.js} +31 -418
- package/dist/mosterdcomponents/mrd-layout-section.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-list-field.entry.js +107 -0
- package/dist/mosterdcomponents/mrd-list-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-longtext-field.entry.js +47 -0
- package/dist/mosterdcomponents/mrd-longtext-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-number-field.entry.js +87 -0
- package/dist/mosterdcomponents/mrd-number-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-relation-field.entry.js +267 -0
- package/dist/mosterdcomponents/mrd-relation-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-secret-field.entry.js +49 -0
- package/dist/mosterdcomponents/mrd-secret-field.entry.js.map +1 -0
- package/dist/{collection/components/mrd-table/mrd-table.js → mosterdcomponents/mrd-table.entry.js} +32 -394
- package/dist/mosterdcomponents/mrd-table.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-text-field.entry.js +47 -0
- package/dist/mosterdcomponents/mrd-text-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-textarea-field.entry.js +86 -0
- package/dist/mosterdcomponents/mrd-textarea-field.entry.js.map +1 -0
- package/dist/mosterdcomponents/mrd-time-field.entry.js +46 -0
- package/dist/mosterdcomponents/mrd-time-field.entry.js.map +1 -0
- package/dist/{esm/quill-CiuCgGz_.js → mosterdcomponents/quill-C9pgw_k-.js} +16282 -1397
- package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +1 -0
- package/dist/{collection/utils/validation.js → mosterdcomponents/validation-ixb43cqU.js} +12 -5
- package/dist/mosterdcomponents/validation-ixb43cqU.js.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
- package/dist/cjs/index-BPj2cBXs.js +0 -1570
- package/dist/cjs/index.cjs.js +0 -66
- package/dist/cjs/loader.cjs.js +0 -13
- package/dist/cjs/mosterdcomponents.cjs.js +0 -25
- package/dist/cjs/mrd-boolean-field_20.cjs.entry.js +0 -3961
- package/dist/cjs/quill-DmFfnC1f.js +0 -16272
- package/dist/collection/collection-manifest.json +0 -32
- package/dist/collection/components/mrd-boolean-field/mrd-boolean-field.js +0 -199
- package/dist/collection/components/mrd-boolean-field/mrd-boolean-field.scss +0 -77
- package/dist/collection/components/mrd-currency-field/mrd-currency-field.js +0 -248
- package/dist/collection/components/mrd-currency-field/mrd-currency-field.scss +0 -100
- package/dist/collection/components/mrd-date-field/mrd-date-field.js +0 -206
- package/dist/collection/components/mrd-date-field/mrd-date-field.scss +0 -66
- package/dist/collection/components/mrd-datetime-field/mrd-datetime-field.js +0 -240
- package/dist/collection/components/mrd-datetime-field/mrd-datetime-field.scss +0 -66
- package/dist/collection/components/mrd-email-field/mrd-email-field.js +0 -230
- package/dist/collection/components/mrd-email-field/mrd-email-field.scss +0 -69
- package/dist/collection/components/mrd-field/mrd-field.scss +0 -118
- package/dist/collection/components/mrd-file-field/mrd-file-field.js +0 -341
- package/dist/collection/components/mrd-file-field/mrd-file-field.scss +0 -153
- package/dist/collection/components/mrd-form/mrd-form.scss +0 -148
- package/dist/collection/components/mrd-hyperlink-field/mrd-hyperlink-field.js +0 -291
- package/dist/collection/components/mrd-hyperlink-field/mrd-hyperlink-field.scss +0 -91
- package/dist/collection/components/mrd-image-field/mrd-image-field.js +0 -356
- package/dist/collection/components/mrd-image-field/mrd-image-field.scss +0 -190
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.scss +0 -445
- package/dist/collection/components/mrd-list-field/mrd-list-field.js +0 -313
- package/dist/collection/components/mrd-list-field/mrd-list-field.scss +0 -109
- package/dist/collection/components/mrd-longtext-field/mrd-longtext-field.js +0 -227
- package/dist/collection/components/mrd-longtext-field/mrd-longtext-field.scss +0 -78
- package/dist/collection/components/mrd-number-field/mrd-number-field.js +0 -316
- package/dist/collection/components/mrd-number-field/mrd-number-field.scss +0 -77
- package/dist/collection/components/mrd-relation-field/mrd-relation-field.js +0 -707
- package/dist/collection/components/mrd-relation-field/mrd-relation-field.scss +0 -266
- package/dist/collection/components/mrd-secret-field/mrd-secret-field.js +0 -229
- package/dist/collection/components/mrd-secret-field/mrd-secret-field.scss +0 -73
- package/dist/collection/components/mrd-table/mrd-table.scss +0 -809
- package/dist/collection/components/mrd-text-field/mrd-text-field.js +0 -227
- package/dist/collection/components/mrd-text-field/mrd-text-field.scss +0 -69
- package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +0 -267
- package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.scss +0 -135
- package/dist/collection/components/mrd-time-field/mrd-time-field.js +0 -206
- package/dist/collection/components/mrd-time-field/mrd-time-field.scss +0 -66
- package/dist/collection/dev/api.js +0 -145
- package/dist/collection/dev/app.js +0 -890
- package/dist/collection/dev/auth.js +0 -156
- package/dist/collection/dev/example-data.js +0 -403
- package/dist/collection/dev/sprites.svg +0 -55
- package/dist/collection/index.js +0 -1
- package/dist/collection/types/client-layout.js +0 -64
- package/dist/collection/types/index.js +0 -1
- package/dist/components/client-layout.js +0 -1
- package/dist/components/format.js +0 -1
- package/dist/components/i18n.js +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/mrd-boolean-field.js +0 -1
- package/dist/components/mrd-boolean-field2.js +0 -1
- package/dist/components/mrd-currency-field.js +0 -1
- package/dist/components/mrd-currency-field2.js +0 -1
- package/dist/components/mrd-date-field.js +0 -1
- package/dist/components/mrd-date-field2.js +0 -1
- package/dist/components/mrd-datetime-field.js +0 -1
- package/dist/components/mrd-datetime-field2.js +0 -1
- package/dist/components/mrd-email-field.js +0 -1
- package/dist/components/mrd-email-field2.js +0 -1
- package/dist/components/mrd-field.js +0 -1
- package/dist/components/mrd-field2.js +0 -1
- package/dist/components/mrd-file-field.js +0 -1
- package/dist/components/mrd-file-field2.js +0 -1
- package/dist/components/mrd-form.js +0 -1
- package/dist/components/mrd-hyperlink-field.js +0 -1
- package/dist/components/mrd-hyperlink-field2.js +0 -1
- package/dist/components/mrd-image-field.js +0 -1
- package/dist/components/mrd-image-field2.js +0 -1
- package/dist/components/mrd-layout-section.js +0 -1
- package/dist/components/mrd-list-field.js +0 -1
- package/dist/components/mrd-list-field2.js +0 -1
- package/dist/components/mrd-longtext-field.js +0 -1
- package/dist/components/mrd-longtext-field2.js +0 -1
- package/dist/components/mrd-number-field.js +0 -1
- package/dist/components/mrd-number-field2.js +0 -1
- package/dist/components/mrd-relation-field.js +0 -1
- package/dist/components/mrd-relation-field2.js +0 -1
- package/dist/components/mrd-secret-field.js +0 -1
- package/dist/components/mrd-secret-field2.js +0 -1
- package/dist/components/mrd-table.js +0 -1
- package/dist/components/mrd-table2.js +0 -1
- package/dist/components/mrd-text-field.js +0 -1
- package/dist/components/mrd-text-field2.js +0 -1
- package/dist/components/mrd-textarea-field.js +0 -1
- package/dist/components/mrd-textarea-field2.js +0 -1
- package/dist/components/mrd-time-field.js +0 -1
- package/dist/components/mrd-time-field2.js +0 -1
- package/dist/components/quill.js +0 -1
- package/dist/components/validation.js +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/index-_tsCCkAi.js +0 -1561
- package/dist/esm/loader.js +0 -11
- package/dist/esm/mosterdcomponents.js +0 -21
- package/dist/esm/mrd-boolean-field_20.entry.js +0 -3940
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/mosterdcomponents/p-CiuCgGz_.js +0 -1
- package/dist/mosterdcomponents/p-DQuL1Twl.js +0 -1
- package/dist/mosterdcomponents/p-_tsCCkAi.js +0 -2
- package/dist/mosterdcomponents/p-e477187c.entry.js +0 -1
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { t } from "../../utils/i18n";
|
|
3
|
-
export class MrdFileField {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.name = '';
|
|
6
|
-
this.label = '';
|
|
7
|
-
this.value = null;
|
|
8
|
-
this.required = false;
|
|
9
|
-
this.disabled = false;
|
|
10
|
-
this.locale = navigator.language;
|
|
11
|
-
this.accept = '';
|
|
12
|
-
this.maxSize = 0; // bytes, 0 = no limit
|
|
13
|
-
this.fileName = '';
|
|
14
|
-
this.isDragging = false;
|
|
15
|
-
this.uploading = false;
|
|
16
|
-
this.error = '';
|
|
17
|
-
this.handleInputChange = (e) => {
|
|
18
|
-
var _a;
|
|
19
|
-
const files = e.target.files;
|
|
20
|
-
this.handleFile((_a = files === null || files === void 0 ? void 0 : files[0]) !== null && _a !== void 0 ? _a : null);
|
|
21
|
-
};
|
|
22
|
-
this.handleDragOver = (e) => {
|
|
23
|
-
e.preventDefault();
|
|
24
|
-
this.isDragging = true;
|
|
25
|
-
};
|
|
26
|
-
this.handleDragLeave = () => {
|
|
27
|
-
this.isDragging = false;
|
|
28
|
-
};
|
|
29
|
-
this.handleDrop = (e) => {
|
|
30
|
-
var _a, _b, _c;
|
|
31
|
-
e.preventDefault();
|
|
32
|
-
this.isDragging = false;
|
|
33
|
-
const file = (_c = (_b = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : null;
|
|
34
|
-
this.handleFile(file);
|
|
35
|
-
};
|
|
36
|
-
this.handleZoneClick = () => {
|
|
37
|
-
var _a;
|
|
38
|
-
if (!this.disabled && !this.uploading) {
|
|
39
|
-
(_a = this.fileInputRef) === null || _a === void 0 ? void 0 : _a.click();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
this.handleClear = (e) => {
|
|
43
|
-
e.stopPropagation();
|
|
44
|
-
this.fileName = '';
|
|
45
|
-
this.error = '';
|
|
46
|
-
this.uploading = false;
|
|
47
|
-
if (this.fileInputRef)
|
|
48
|
-
this.fileInputRef.value = '';
|
|
49
|
-
this.mrdChange.emit({ name: this.name, value: null });
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/** When the host provides a URI back via setFieldValue, the upload is done. */
|
|
53
|
-
valueChanged(newVal) {
|
|
54
|
-
if (typeof newVal === 'string' && newVal) {
|
|
55
|
-
this.uploading = false;
|
|
56
|
-
}
|
|
57
|
-
else if (!newVal) {
|
|
58
|
-
this.uploading = false;
|
|
59
|
-
this.fileName = '';
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
handleFile(file) {
|
|
63
|
-
if (!file) {
|
|
64
|
-
this.fileName = '';
|
|
65
|
-
this.uploading = false;
|
|
66
|
-
this.mrdChange.emit({ name: this.name, value: null });
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
if (this.maxSize > 0 && file.size > this.maxSize) {
|
|
70
|
-
this.error = t('file_too_large', this.locale);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
this.error = '';
|
|
74
|
-
this.fileName = file.name;
|
|
75
|
-
this.uploading = true;
|
|
76
|
-
this.mrdChange.emit({ name: this.name, value: file });
|
|
77
|
-
this.mrdUpload.emit({ name: this.name, file });
|
|
78
|
-
}
|
|
79
|
-
render() {
|
|
80
|
-
const hasFile = this.uploading || (typeof this.value === 'string' && this.value) || this.fileName;
|
|
81
|
-
const hasError = !!this.error;
|
|
82
|
-
const zoneClass = [
|
|
83
|
-
'mrd-file-field__zone',
|
|
84
|
-
this.isDragging ? 'mrd-file-field__zone--dragging' : '',
|
|
85
|
-
hasError ? 'mrd-file-field__zone--error' : '',
|
|
86
|
-
this.disabled || this.uploading ? 'mrd-file-field__zone--disabled' : '',
|
|
87
|
-
].filter(Boolean).join(' ');
|
|
88
|
-
return (h(Host, { key: '2090102df8169226c1e66f87cbc837296e4b55d4' }, h("div", { key: '7a37a09df1bfa2eaf28ed04c806ad5f7c0337bb0', class: "mrd-file-field" }, this.label && (h("label", { key: '8f1fcb8adbb66b792be902c7c548e50db99b6a53', class: `mrd-file-field__label${this.required ? ' mrd-file-field__label--required' : ''}` }, this.label)), h("div", { key: '66d992298f537b24d69ce3ead3dd229f6d124f3d', class: zoneClass, onClick: this.handleZoneClick, onDragOver: this.handleDragOver, onDragLeave: this.handleDragLeave, onDrop: this.handleDrop }, h("input", { key: '95ba6560e71ee08c6b2526802727b29a18cdc454', ref: el => (this.fileInputRef = el), class: "mrd-file-field__input", type: "file", name: this.name, accept: this.accept, disabled: this.disabled || this.uploading, required: this.required && !hasFile, onChange: this.handleInputChange }), hasFile ? (h("div", { class: "mrd-file-field__selected" }, this.uploading ? (h("span", { class: "mrd-file-field__spinner", "aria-label": t('loading', this.locale) })) : (h("svg", { class: "mrd-file-field__icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), h("polyline", { points: "14 2 14 8 20 8" }))), h("span", { class: "mrd-file-field__filename" }, this.fileName), !this.uploading && (h("button", { class: "mrd-file-field__clear", type: "button", onClick: this.handleClear, "aria-label": t('clear', this.locale) }, "\u2715")))) : (h("div", { class: "mrd-file-field__prompt" }, h("svg", { class: "mrd-file-field__upload-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { points: "16 16 12 12 8 16" }), h("line", { x1: "12", y1: "12", x2: "12", y2: "21" }), h("path", { d: "M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" })), h("span", null, t('drop_file_here', this.locale), ' ', h("span", { class: "mrd-file-field__browse" }, t('browse', this.locale)))))), hasError && h("span", { key: 'a6020e63bebb01e31a980a903f81badd486585aa', class: "mrd-file-field__error" }, this.error))));
|
|
89
|
-
}
|
|
90
|
-
static get is() { return "mrd-file-field"; }
|
|
91
|
-
static get encapsulation() { return "scoped"; }
|
|
92
|
-
static get originalStyleUrls() {
|
|
93
|
-
return {
|
|
94
|
-
"$": ["mrd-file-field.scss"]
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
static get styleUrls() {
|
|
98
|
-
return {
|
|
99
|
-
"$": ["mrd-file-field.css"]
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
static get properties() {
|
|
103
|
-
return {
|
|
104
|
-
"name": {
|
|
105
|
-
"type": "string",
|
|
106
|
-
"mutable": false,
|
|
107
|
-
"complexType": {
|
|
108
|
-
"original": "string",
|
|
109
|
-
"resolved": "string",
|
|
110
|
-
"references": {}
|
|
111
|
-
},
|
|
112
|
-
"required": false,
|
|
113
|
-
"optional": false,
|
|
114
|
-
"docs": {
|
|
115
|
-
"tags": [],
|
|
116
|
-
"text": ""
|
|
117
|
-
},
|
|
118
|
-
"getter": false,
|
|
119
|
-
"setter": false,
|
|
120
|
-
"reflect": false,
|
|
121
|
-
"attribute": "name",
|
|
122
|
-
"defaultValue": "''"
|
|
123
|
-
},
|
|
124
|
-
"label": {
|
|
125
|
-
"type": "string",
|
|
126
|
-
"mutable": false,
|
|
127
|
-
"complexType": {
|
|
128
|
-
"original": "string",
|
|
129
|
-
"resolved": "string",
|
|
130
|
-
"references": {}
|
|
131
|
-
},
|
|
132
|
-
"required": false,
|
|
133
|
-
"optional": false,
|
|
134
|
-
"docs": {
|
|
135
|
-
"tags": [],
|
|
136
|
-
"text": ""
|
|
137
|
-
},
|
|
138
|
-
"getter": false,
|
|
139
|
-
"setter": false,
|
|
140
|
-
"reflect": false,
|
|
141
|
-
"attribute": "label",
|
|
142
|
-
"defaultValue": "''"
|
|
143
|
-
},
|
|
144
|
-
"value": {
|
|
145
|
-
"type": "unknown",
|
|
146
|
-
"mutable": false,
|
|
147
|
-
"complexType": {
|
|
148
|
-
"original": "unknown",
|
|
149
|
-
"resolved": "unknown",
|
|
150
|
-
"references": {}
|
|
151
|
-
},
|
|
152
|
-
"required": false,
|
|
153
|
-
"optional": false,
|
|
154
|
-
"docs": {
|
|
155
|
-
"tags": [],
|
|
156
|
-
"text": ""
|
|
157
|
-
},
|
|
158
|
-
"getter": false,
|
|
159
|
-
"setter": false,
|
|
160
|
-
"defaultValue": "null"
|
|
161
|
-
},
|
|
162
|
-
"required": {
|
|
163
|
-
"type": "boolean",
|
|
164
|
-
"mutable": false,
|
|
165
|
-
"complexType": {
|
|
166
|
-
"original": "boolean",
|
|
167
|
-
"resolved": "boolean",
|
|
168
|
-
"references": {}
|
|
169
|
-
},
|
|
170
|
-
"required": false,
|
|
171
|
-
"optional": false,
|
|
172
|
-
"docs": {
|
|
173
|
-
"tags": [],
|
|
174
|
-
"text": ""
|
|
175
|
-
},
|
|
176
|
-
"getter": false,
|
|
177
|
-
"setter": false,
|
|
178
|
-
"reflect": false,
|
|
179
|
-
"attribute": "required",
|
|
180
|
-
"defaultValue": "false"
|
|
181
|
-
},
|
|
182
|
-
"disabled": {
|
|
183
|
-
"type": "boolean",
|
|
184
|
-
"mutable": false,
|
|
185
|
-
"complexType": {
|
|
186
|
-
"original": "boolean",
|
|
187
|
-
"resolved": "boolean",
|
|
188
|
-
"references": {}
|
|
189
|
-
},
|
|
190
|
-
"required": false,
|
|
191
|
-
"optional": false,
|
|
192
|
-
"docs": {
|
|
193
|
-
"tags": [],
|
|
194
|
-
"text": ""
|
|
195
|
-
},
|
|
196
|
-
"getter": false,
|
|
197
|
-
"setter": false,
|
|
198
|
-
"reflect": false,
|
|
199
|
-
"attribute": "disabled",
|
|
200
|
-
"defaultValue": "false"
|
|
201
|
-
},
|
|
202
|
-
"locale": {
|
|
203
|
-
"type": "string",
|
|
204
|
-
"mutable": false,
|
|
205
|
-
"complexType": {
|
|
206
|
-
"original": "string",
|
|
207
|
-
"resolved": "string",
|
|
208
|
-
"references": {}
|
|
209
|
-
},
|
|
210
|
-
"required": false,
|
|
211
|
-
"optional": false,
|
|
212
|
-
"docs": {
|
|
213
|
-
"tags": [],
|
|
214
|
-
"text": ""
|
|
215
|
-
},
|
|
216
|
-
"getter": false,
|
|
217
|
-
"setter": false,
|
|
218
|
-
"reflect": false,
|
|
219
|
-
"attribute": "locale",
|
|
220
|
-
"defaultValue": "navigator.language"
|
|
221
|
-
},
|
|
222
|
-
"accept": {
|
|
223
|
-
"type": "string",
|
|
224
|
-
"mutable": false,
|
|
225
|
-
"complexType": {
|
|
226
|
-
"original": "string",
|
|
227
|
-
"resolved": "string",
|
|
228
|
-
"references": {}
|
|
229
|
-
},
|
|
230
|
-
"required": false,
|
|
231
|
-
"optional": false,
|
|
232
|
-
"docs": {
|
|
233
|
-
"tags": [],
|
|
234
|
-
"text": ""
|
|
235
|
-
},
|
|
236
|
-
"getter": false,
|
|
237
|
-
"setter": false,
|
|
238
|
-
"reflect": false,
|
|
239
|
-
"attribute": "accept",
|
|
240
|
-
"defaultValue": "''"
|
|
241
|
-
},
|
|
242
|
-
"maxSize": {
|
|
243
|
-
"type": "number",
|
|
244
|
-
"mutable": false,
|
|
245
|
-
"complexType": {
|
|
246
|
-
"original": "number",
|
|
247
|
-
"resolved": "number",
|
|
248
|
-
"references": {}
|
|
249
|
-
},
|
|
250
|
-
"required": false,
|
|
251
|
-
"optional": false,
|
|
252
|
-
"docs": {
|
|
253
|
-
"tags": [],
|
|
254
|
-
"text": ""
|
|
255
|
-
},
|
|
256
|
-
"getter": false,
|
|
257
|
-
"setter": false,
|
|
258
|
-
"reflect": false,
|
|
259
|
-
"attribute": "max-size",
|
|
260
|
-
"defaultValue": "0"
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
static get states() {
|
|
265
|
-
return {
|
|
266
|
-
"fileName": {},
|
|
267
|
-
"isDragging": {},
|
|
268
|
-
"uploading": {},
|
|
269
|
-
"error": {}
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
static get events() {
|
|
273
|
-
return [{
|
|
274
|
-
"method": "mrdChange",
|
|
275
|
-
"name": "mrdChange",
|
|
276
|
-
"bubbles": true,
|
|
277
|
-
"cancelable": true,
|
|
278
|
-
"composed": true,
|
|
279
|
-
"docs": {
|
|
280
|
-
"tags": [],
|
|
281
|
-
"text": ""
|
|
282
|
-
},
|
|
283
|
-
"complexType": {
|
|
284
|
-
"original": "{ name: string; value: File | null }",
|
|
285
|
-
"resolved": "{ name: string; value: File | null; }",
|
|
286
|
-
"references": {
|
|
287
|
-
"File": {
|
|
288
|
-
"location": "global",
|
|
289
|
-
"id": "global::File"
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}, {
|
|
294
|
-
"method": "mrdBlur",
|
|
295
|
-
"name": "mrdBlur",
|
|
296
|
-
"bubbles": true,
|
|
297
|
-
"cancelable": true,
|
|
298
|
-
"composed": true,
|
|
299
|
-
"docs": {
|
|
300
|
-
"tags": [],
|
|
301
|
-
"text": ""
|
|
302
|
-
},
|
|
303
|
-
"complexType": {
|
|
304
|
-
"original": "{ name: string; value: File | null }",
|
|
305
|
-
"resolved": "{ name: string; value: File | null; }",
|
|
306
|
-
"references": {
|
|
307
|
-
"File": {
|
|
308
|
-
"location": "global",
|
|
309
|
-
"id": "global::File"
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}, {
|
|
314
|
-
"method": "mrdUpload",
|
|
315
|
-
"name": "mrdUpload",
|
|
316
|
-
"bubbles": true,
|
|
317
|
-
"cancelable": true,
|
|
318
|
-
"composed": true,
|
|
319
|
-
"docs": {
|
|
320
|
-
"tags": [],
|
|
321
|
-
"text": "Emitted when a file is selected and needs to be uploaded.\nHost should upload the file and call form.setFieldValue(name, uri) with the result."
|
|
322
|
-
},
|
|
323
|
-
"complexType": {
|
|
324
|
-
"original": "{ name: string; file: File }",
|
|
325
|
-
"resolved": "{ name: string; file: File; }",
|
|
326
|
-
"references": {
|
|
327
|
-
"File": {
|
|
328
|
-
"location": "global",
|
|
329
|
-
"id": "global::File"
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}];
|
|
334
|
-
}
|
|
335
|
-
static get watchers() {
|
|
336
|
-
return [{
|
|
337
|
-
"propName": "value",
|
|
338
|
-
"methodName": "valueChanged"
|
|
339
|
-
}];
|
|
340
|
-
}
|
|
341
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.mrd-file-field {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
gap: var(--mrd-space-1);
|
|
9
|
-
width: 100%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.mrd-file-field__label {
|
|
13
|
-
display: block;
|
|
14
|
-
font-family: var(--mrd-font-family);
|
|
15
|
-
font-size: var(--mrd-label-font-size);
|
|
16
|
-
font-weight: var(--mrd-label-font-weight);
|
|
17
|
-
color: var(--mrd-label-color);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.mrd-file-field__label--required::after {
|
|
21
|
-
content: ' *';
|
|
22
|
-
color: var(--mrd-color-danger);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.mrd-file-field__zone {
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
justify-content: center;
|
|
29
|
-
padding: var(--mrd-space-6);
|
|
30
|
-
border: 2px dashed var(--mrd-border-color);
|
|
31
|
-
border-radius: var(--mrd-border-radius-md);
|
|
32
|
-
background-color: var(--mrd-color-neutral-50);
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
transition: border-color var(--mrd-transition), background-color var(--mrd-transition);
|
|
35
|
-
min-height: 100px;
|
|
36
|
-
position: relative;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.mrd-file-field__zone:hover {
|
|
40
|
-
border-color: var(--mrd-color-primary);
|
|
41
|
-
background-color: var(--mrd-color-primary-light);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.mrd-file-field__zone--dragging {
|
|
45
|
-
border-color: var(--mrd-color-primary);
|
|
46
|
-
background-color: var(--mrd-color-primary-light);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.mrd-file-field__zone--error {
|
|
50
|
-
border-color: var(--mrd-border-color-error);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.mrd-file-field__zone--disabled {
|
|
54
|
-
opacity: 0.6;
|
|
55
|
-
cursor: not-allowed;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.mrd-file-field__zone--disabled:hover {
|
|
59
|
-
border-color: var(--mrd-border-color);
|
|
60
|
-
background-color: var(--mrd-color-neutral-50);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.mrd-file-field__input {
|
|
64
|
-
position: absolute;
|
|
65
|
-
inset: 0;
|
|
66
|
-
opacity: 0;
|
|
67
|
-
width: 100%;
|
|
68
|
-
height: 100%;
|
|
69
|
-
cursor: pointer;
|
|
70
|
-
pointer-events: none;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.mrd-file-field__prompt {
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-direction: column;
|
|
76
|
-
align-items: center;
|
|
77
|
-
gap: var(--mrd-space-2);
|
|
78
|
-
font-family: var(--mrd-font-family);
|
|
79
|
-
font-size: var(--mrd-font-size-sm);
|
|
80
|
-
color: var(--mrd-color-neutral-500);
|
|
81
|
-
text-align: center;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.mrd-file-field__upload-icon {
|
|
85
|
-
width: 32px;
|
|
86
|
-
height: 32px;
|
|
87
|
-
color: var(--mrd-color-neutral-400);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.mrd-file-field__browse {
|
|
91
|
-
color: var(--mrd-color-primary);
|
|
92
|
-
font-weight: var(--mrd-font-weight-medium);
|
|
93
|
-
text-decoration: underline;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.mrd-file-field__selected {
|
|
97
|
-
display: flex;
|
|
98
|
-
align-items: center;
|
|
99
|
-
gap: var(--mrd-space-2);
|
|
100
|
-
font-family: var(--mrd-font-family);
|
|
101
|
-
font-size: var(--mrd-font-size-sm);
|
|
102
|
-
color: var(--mrd-color-neutral-700);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.mrd-file-field__icon {
|
|
106
|
-
width: 20px;
|
|
107
|
-
height: 20px;
|
|
108
|
-
color: var(--mrd-color-primary);
|
|
109
|
-
flex-shrink: 0;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.mrd-file-field__filename {
|
|
113
|
-
flex: 1;
|
|
114
|
-
overflow: hidden;
|
|
115
|
-
text-overflow: ellipsis;
|
|
116
|
-
white-space: nowrap;
|
|
117
|
-
max-width: 200px;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.mrd-file-field__clear {
|
|
121
|
-
background: none;
|
|
122
|
-
border: none;
|
|
123
|
-
cursor: pointer;
|
|
124
|
-
color: var(--mrd-color-neutral-400);
|
|
125
|
-
font-size: var(--mrd-font-size-sm);
|
|
126
|
-
padding: var(--mrd-space-1);
|
|
127
|
-
border-radius: var(--mrd-border-radius-sm);
|
|
128
|
-
line-height: 1;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.mrd-file-field__clear:hover {
|
|
132
|
-
color: var(--mrd-color-danger);
|
|
133
|
-
background-color: var(--mrd-color-danger-light);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.mrd-file-field__spinner {
|
|
137
|
-
display: inline-block;
|
|
138
|
-
flex-shrink: 0;
|
|
139
|
-
width: 18px;
|
|
140
|
-
height: 18px;
|
|
141
|
-
border: 2px solid var(--mrd-color-neutral-300);
|
|
142
|
-
border-top-color: var(--mrd-color-primary);
|
|
143
|
-
border-radius: 50%;
|
|
144
|
-
animation: mrd-file-spin 0.6s linear infinite;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@keyframes mrd-file-spin { to { transform: rotate(360deg); } }
|
|
148
|
-
|
|
149
|
-
.mrd-file-field__error {
|
|
150
|
-
font-family: var(--mrd-font-family);
|
|
151
|
-
font-size: var(--mrd-error-font-size);
|
|
152
|
-
color: var(--mrd-error-color);
|
|
153
|
-
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.mrd-form {
|
|
6
|
-
font-family: var(--mrd-font-family);
|
|
7
|
-
width: 100%;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.mrd-form__title {
|
|
11
|
-
font-size: var(--mrd-font-size-2xl);
|
|
12
|
-
font-weight: var(--mrd-font-weight-bold);
|
|
13
|
-
color: var(--mrd-color-neutral-900);
|
|
14
|
-
margin: 0 0 var(--mrd-space-6) 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.mrd-form__body {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
gap: var(--mrd-space-5);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.mrd-form__field {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
gap: var(--mrd-space-1);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.mrd-form__field-error {
|
|
30
|
-
font-family: var(--mrd-font-family);
|
|
31
|
-
font-size: var(--mrd-error-font-size);
|
|
32
|
-
color: var(--mrd-error-color);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.mrd-form__section {
|
|
36
|
-
border: var(--mrd-border-width) solid var(--mrd-border-color);
|
|
37
|
-
border-radius: var(--mrd-border-radius-md);
|
|
38
|
-
padding: var(--mrd-space-4) var(--mrd-space-5);
|
|
39
|
-
margin: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.mrd-form__section-legend {
|
|
43
|
-
font-family: var(--mrd-font-family);
|
|
44
|
-
font-size: var(--mrd-font-size-base);
|
|
45
|
-
font-weight: var(--mrd-font-weight-semibold);
|
|
46
|
-
color: var(--mrd-color-neutral-700);
|
|
47
|
-
padding: 0 var(--mrd-space-2);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.mrd-form__section-body {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
gap: var(--mrd-space-4);
|
|
54
|
-
margin-top: var(--mrd-space-2);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.mrd-form__group {
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: column;
|
|
60
|
-
gap: var(--mrd-space-2);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.mrd-form__group-label {
|
|
64
|
-
font-family: var(--mrd-font-family);
|
|
65
|
-
font-size: var(--mrd-font-size-sm);
|
|
66
|
-
font-weight: var(--mrd-font-weight-semibold);
|
|
67
|
-
color: var(--mrd-color-neutral-500);
|
|
68
|
-
text-transform: uppercase;
|
|
69
|
-
letter-spacing: 0.05em;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.mrd-form__group-body {
|
|
73
|
-
display: flex;
|
|
74
|
-
flex-direction: column;
|
|
75
|
-
gap: var(--mrd-space-4);
|
|
76
|
-
padding-left: var(--mrd-space-4);
|
|
77
|
-
border-left: 3px solid var(--mrd-color-neutral-200);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.mrd-form__footer {
|
|
81
|
-
margin-top: var(--mrd-space-8);
|
|
82
|
-
padding-top: var(--mrd-space-5);
|
|
83
|
-
border-top: var(--mrd-border-width) solid var(--mrd-border-color);
|
|
84
|
-
display: flex;
|
|
85
|
-
justify-content: flex-end;
|
|
86
|
-
gap: var(--mrd-space-3);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.mrd-form__submit {
|
|
90
|
-
display: inline-flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
justify-content: center;
|
|
93
|
-
height: var(--mrd-input-height);
|
|
94
|
-
padding: 0 var(--mrd-space-6);
|
|
95
|
-
background-color: var(--mrd-color-primary);
|
|
96
|
-
color: var(--mrd-color-white);
|
|
97
|
-
font-family: var(--mrd-font-family);
|
|
98
|
-
font-size: var(--mrd-font-size-base);
|
|
99
|
-
font-weight: var(--mrd-font-weight-medium);
|
|
100
|
-
border: none;
|
|
101
|
-
border-radius: var(--mrd-border-radius);
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
transition: background-color var(--mrd-transition);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.mrd-form__submit:hover {
|
|
107
|
-
background-color: var(--mrd-color-primary-hover);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.mrd-form__submit:focus {
|
|
111
|
-
outline: none;
|
|
112
|
-
box-shadow: var(--mrd-shadow-focus);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.mrd-form__submit:active {
|
|
116
|
-
background-color: var(--mrd-color-primary-dark);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.mrd-form__cancel {
|
|
120
|
-
display: inline-flex;
|
|
121
|
-
align-items: center;
|
|
122
|
-
justify-content: center;
|
|
123
|
-
height: var(--mrd-input-height);
|
|
124
|
-
padding: 0 var(--mrd-space-6);
|
|
125
|
-
background-color: transparent;
|
|
126
|
-
color: var(--mrd-color-neutral-600);
|
|
127
|
-
font-family: var(--mrd-font-family);
|
|
128
|
-
font-size: var(--mrd-font-size-base);
|
|
129
|
-
font-weight: var(--mrd-font-weight-medium);
|
|
130
|
-
border: var(--mrd-border-width) solid var(--mrd-border-color);
|
|
131
|
-
border-radius: var(--mrd-border-radius);
|
|
132
|
-
cursor: pointer;
|
|
133
|
-
transition: background-color var(--mrd-transition), color var(--mrd-transition);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.mrd-form__cancel:hover {
|
|
137
|
-
background-color: var(--mrd-color-neutral-100);
|
|
138
|
-
color: var(--mrd-color-neutral-800);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.mrd-form__cancel:focus {
|
|
142
|
-
outline: none;
|
|
143
|
-
box-shadow: var(--mrd-shadow-focus);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.mrd-form__cancel:active {
|
|
147
|
-
background-color: var(--mrd-color-neutral-200);
|
|
148
|
-
}
|