@mmlogic/components 0.3.8 → 0.3.10
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/cjs/index.cjs.js +13 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mosterdcomponents.cjs.js +1 -1
- package/dist/cjs/{mrd-boolean-field_20.cjs.entry.js → mrd-boolean-field_23.cjs.entry.js} +1059 -23
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/mrd-boolean-field/mrd-boolean-field.js +1 -1
- package/dist/collection/components/mrd-currency-field/mrd-currency-field.js +1 -1
- package/dist/collection/components/mrd-date-field/mrd-date-field.js +1 -1
- package/dist/collection/components/mrd-datetime-field/mrd-datetime-field.js +1 -1
- package/dist/collection/components/mrd-document-container/mrd-document-container.js +375 -0
- package/dist/collection/components/mrd-document-container/mrd-document-container.scss +79 -0
- package/dist/collection/components/mrd-document-list/mrd-document-list.js +1129 -0
- package/dist/collection/components/mrd-document-list/mrd-document-list.scss +181 -0
- package/dist/collection/components/mrd-document-view/mrd-document-view.js +177 -0
- package/dist/collection/components/mrd-document-view/mrd-document-view.scss +121 -0
- package/dist/collection/components/mrd-email-field/mrd-email-field.js +1 -1
- package/dist/collection/components/mrd-file-field/mrd-file-field.js +1 -1
- package/dist/collection/components/mrd-image-field/mrd-image-field.js +1 -1
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.js +288 -14
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.scss +2 -3
- package/dist/collection/components/mrd-longtext-field/mrd-longtext-field.js +1 -1
- package/dist/collection/components/mrd-number-field/mrd-number-field.js +1 -1
- package/dist/collection/components/mrd-secret-field/mrd-secret-field.js +2 -2
- package/dist/collection/components/mrd-text-field/mrd-text-field.js +1 -1
- package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +1 -1
- package/dist/collection/components/mrd-time-field/mrd-time-field.js +1 -1
- package/dist/collection/dev/app.js +66 -2
- package/dist/collection/types/client-layout.js +10 -0
- package/dist/collection/utils/i18n.js +34 -0
- package/dist/components/client-layout.js +1 -1
- package/dist/components/format.js +1 -1
- package/dist/components/i18n.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/mrd-boolean-field2.js +1 -1
- package/dist/components/mrd-currency-field2.js +1 -1
- package/dist/components/mrd-date-field2.js +1 -1
- package/dist/components/mrd-datetime-field2.js +1 -1
- package/dist/components/mrd-document-container.d.ts +11 -0
- package/dist/components/mrd-document-container.js +1 -0
- package/dist/components/mrd-document-container2.js +1 -0
- package/dist/components/mrd-document-list.d.ts +11 -0
- package/dist/components/mrd-document-list.js +1 -0
- package/dist/components/mrd-document-list2.js +1 -0
- package/dist/components/mrd-document-view.d.ts +11 -0
- package/dist/components/mrd-document-view.js +1 -0
- package/dist/components/mrd-document-view2.js +1 -0
- package/dist/components/mrd-email-field2.js +1 -1
- package/dist/components/mrd-file-field2.js +1 -1
- package/dist/components/mrd-image-field2.js +1 -1
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-longtext-field2.js +1 -1
- package/dist/components/mrd-number-field2.js +1 -1
- package/dist/components/mrd-secret-field2.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/components/mrd-text-field2.js +1 -1
- package/dist/components/mrd-textarea-field2.js +1 -1
- package/dist/components/mrd-time-field2.js +1 -1
- package/dist/esm/index.js +11 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mosterdcomponents.js +1 -1
- package/dist/esm/{mrd-boolean-field_20.entry.js → mrd-boolean-field_23.entry.js} +1058 -25
- package/dist/mosterdcomponents/{cell-renderer-CbRwLOo8.js.map → cell-renderer-B-AJDBcj.js.map} +1 -1
- package/dist/mosterdcomponents/{client-layout-D88nn5zf.js.map → client-layout-ChqRA3AF.js.map} +1 -1
- package/dist/mosterdcomponents/i18n-s1XrKcD2.js.map +1 -0
- package/dist/mosterdcomponents/index-DkY-NQj0.js.map +1 -0
- package/dist/mosterdcomponents/index-DwF_Sp__.js.map +1 -0
- package/dist/mosterdcomponents/index.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.css +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/p-69452249.entry.js +1 -0
- package/dist/mosterdcomponents/{validation-ixb43cqU.js.map → validation-Br9k2Ztw.js.map} +1 -1
- package/dist/types/components/mrd-document-container/mrd-document-container.d.ts +94 -0
- package/dist/types/components/mrd-document-list/mrd-document-list.d.ts +210 -0
- package/dist/types/components/mrd-document-view/mrd-document-view.d.ts +36 -0
- package/dist/types/components/mrd-layout-section/mrd-layout-section.d.ts +57 -6
- package/dist/types/components.d.ts +507 -15
- package/dist/types/types/client-layout.d.ts +38 -0
- package/package.json +1 -1
- package/dist/mosterdcomponents/i18n-hoGGKbKU.js.map +0 -1
- package/dist/mosterdcomponents/index-6yQUNVww.js.map +0 -1
- package/dist/mosterdcomponents/index-I5SuYv7a.js.map +0 -1
- package/dist/mosterdcomponents/p-7bfaee51.entry.js +0 -1
|
@@ -32,6 +32,9 @@ const translations = {
|
|
|
32
32
|
table_filter_clear_all: 'Alle filters wissen',
|
|
33
33
|
table_new_record: 'Nieuw record',
|
|
34
34
|
table_export_excel: 'Exporteer naar Excel',
|
|
35
|
+
doc_view_switch: 'Weergave wisselen',
|
|
36
|
+
doc_view_tree: 'Boomweergave',
|
|
37
|
+
doc_view_list: 'Lijstweergave',
|
|
35
38
|
// mrd-table filter popup
|
|
36
39
|
filter_sorting: 'Sortering',
|
|
37
40
|
filter_ascending: 'Oplopend',
|
|
@@ -61,6 +64,11 @@ const translations = {
|
|
|
61
64
|
history_until: 'tot',
|
|
62
65
|
history_badge_tooltip: 'Vorige waarden',
|
|
63
66
|
hyperlink_name: 'Linktekst (optioneel)',
|
|
67
|
+
// mrd-document-list
|
|
68
|
+
new_folder: 'Nieuwe folder',
|
|
69
|
+
folder_name_placeholder: 'Foldernaam',
|
|
70
|
+
folder_no_slash: "Een foldernaam mag geen '/' bevatten",
|
|
71
|
+
folder_duplicate: 'Er bestaat al een folder met deze naam',
|
|
64
72
|
},
|
|
65
73
|
en: {
|
|
66
74
|
required: 'This field is required',
|
|
@@ -95,6 +103,9 @@ const translations = {
|
|
|
95
103
|
table_filter_clear_all: 'Clear all filters',
|
|
96
104
|
table_new_record: 'New record',
|
|
97
105
|
table_export_excel: 'Export to Excel',
|
|
106
|
+
doc_view_switch: 'Switch view',
|
|
107
|
+
doc_view_tree: 'Tree view',
|
|
108
|
+
doc_view_list: 'List view',
|
|
98
109
|
// mrd-table filter popup
|
|
99
110
|
filter_sorting: 'Sorting',
|
|
100
111
|
filter_ascending: 'Ascending',
|
|
@@ -124,6 +135,11 @@ const translations = {
|
|
|
124
135
|
history_until: 'until',
|
|
125
136
|
history_badge_tooltip: 'Previous values',
|
|
126
137
|
hyperlink_name: 'Link text (optional)',
|
|
138
|
+
// mrd-document-list
|
|
139
|
+
new_folder: 'New folder',
|
|
140
|
+
folder_name_placeholder: 'Folder name',
|
|
141
|
+
folder_no_slash: "A folder name cannot contain '/'",
|
|
142
|
+
folder_duplicate: 'A folder with this name already exists',
|
|
127
143
|
},
|
|
128
144
|
ar: {
|
|
129
145
|
required: 'هذا الحقل مطلوب',
|
|
@@ -158,6 +174,9 @@ const translations = {
|
|
|
158
174
|
table_filter_clear_all: 'مسح جميع الفلاتر',
|
|
159
175
|
table_new_record: 'سجل جديد',
|
|
160
176
|
table_export_excel: 'تصدير إلى Excel',
|
|
177
|
+
doc_view_switch: 'تبديل العرض',
|
|
178
|
+
doc_view_tree: 'عرض شجري',
|
|
179
|
+
doc_view_list: 'عرض القائمة',
|
|
161
180
|
// mrd-table filter popup
|
|
162
181
|
filter_sorting: 'الترتيب',
|
|
163
182
|
filter_ascending: 'تصاعدي',
|
|
@@ -221,6 +240,9 @@ const translations = {
|
|
|
221
240
|
table_filter_clear_all: 'Effacer tous les filtres',
|
|
222
241
|
table_new_record: 'Nouvel enregistrement',
|
|
223
242
|
table_export_excel: 'Exporter vers Excel',
|
|
243
|
+
doc_view_switch: 'Changer de vue',
|
|
244
|
+
doc_view_tree: 'Vue arborescente',
|
|
245
|
+
doc_view_list: 'Vue liste',
|
|
224
246
|
// mrd-table filter popup
|
|
225
247
|
filter_sorting: 'Tri',
|
|
226
248
|
filter_ascending: 'Croissant',
|
|
@@ -284,6 +306,9 @@ const translations = {
|
|
|
284
306
|
table_filter_clear_all: 'Alle Filter löschen',
|
|
285
307
|
table_new_record: 'Neuer Eintrag',
|
|
286
308
|
table_export_excel: 'Als Excel exportieren',
|
|
309
|
+
doc_view_switch: 'Ansicht wechseln',
|
|
310
|
+
doc_view_tree: 'Baumansicht',
|
|
311
|
+
doc_view_list: 'Listenansicht',
|
|
287
312
|
// mrd-table filter popup
|
|
288
313
|
filter_sorting: 'Sortierung',
|
|
289
314
|
filter_ascending: 'Aufsteigend',
|
|
@@ -347,6 +372,9 @@ const translations = {
|
|
|
347
372
|
table_filter_clear_all: 'Borrar todos los filtros',
|
|
348
373
|
table_new_record: 'Nuevo registro',
|
|
349
374
|
table_export_excel: 'Exportar a Excel',
|
|
375
|
+
doc_view_switch: 'Cambiar vista',
|
|
376
|
+
doc_view_tree: 'Vista de árbol',
|
|
377
|
+
doc_view_list: 'Vista de lista',
|
|
350
378
|
// mrd-table filter popup
|
|
351
379
|
filter_sorting: 'Ordenación',
|
|
352
380
|
filter_ascending: 'Ascendente',
|
|
@@ -410,6 +438,9 @@ const translations = {
|
|
|
410
438
|
table_filter_clear_all: 'Cancella tutti i filtri',
|
|
411
439
|
table_new_record: 'Nuovo record',
|
|
412
440
|
table_export_excel: 'Esporta in Excel',
|
|
441
|
+
doc_view_switch: 'Cambia vista',
|
|
442
|
+
doc_view_tree: 'Vista ad albero',
|
|
443
|
+
doc_view_list: 'Vista elenco',
|
|
413
444
|
// mrd-table filter popup
|
|
414
445
|
filter_sorting: 'Ordinamento',
|
|
415
446
|
filter_ascending: 'Crescente',
|
|
@@ -473,6 +504,9 @@ const translations = {
|
|
|
473
504
|
table_filter_clear_all: 'Очистити всі фільтри',
|
|
474
505
|
table_new_record: 'Новий запис',
|
|
475
506
|
table_export_excel: 'Експортувати до Excel',
|
|
507
|
+
doc_view_switch: 'Змінити вигляд',
|
|
508
|
+
doc_view_tree: 'Деревоподібний вигляд',
|
|
509
|
+
doc_view_list: 'Список',
|
|
476
510
|
// mrd-table filter popup
|
|
477
511
|
filter_sorting: 'Сортування',
|
|
478
512
|
filter_ascending: 'За зростанням',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var E,A,T,O,R;!function(E){E.OBJECT_FORM_DASHBOARD="OBJECT_FORM_DASHBOARD",E.CLASS_DASHBOARD="CLASS_DASHBOARD",E.GENERAL_DASHBOARD="GENERAL_DASHBOARD",E.NAVIGATION_PANE="NAVIGATION_PANE"}(E||(E={})),function(E){E.FIELD="FIELD",E.RELATION="RELATION",E.SECTION="SECTION",E.GROUP="GROUP",E.HEADER="HEADER",E.TEXT="TEXT",E.NAVIGATE="NAVIGATE",E.ACTION="ACTION",E.SEARCH="SEARCH",E.VIEW="VIEW",E.RELATED_VIEW="RELATED_VIEW",E.RELATED_OBJECT="RELATED_OBJECT"}(A||(A={})),function(E){E.TEXT="TEXT",E.TEXTBLOCK="TEXTBLOCK",E.INTEGER="INTEGER",E.DECIMAL="DECIMAL",E.PERCENTAGE="PERCENTAGE",E.CURRENCY="CURRENCY",E.BOOLEAN="BOOLEAN",E.DATE="DATE",E.DATETIME="DATETIME",E.TIME="TIME",E.EMAIL="EMAIL",E.HYPERLINK="HYPERLINK",E.LIST="LIST",E.FILE="FILE",E.IMAGE="IMAGE",E.LONGTEXT="LONGTEXT",E.JSON="JSON",E.SECRET="SECRET"}(T||(T={})),function(E){E.SEARCH="SEARCH",E.DROPDOWN="DROPDOWN",E.CHECKBOX="CHECKBOX"}(O||(O={})),function(E){E.SEARCH="SEARCH",E.DROPDOWN="DROPDOWN",E.CHECKBOX="CHECKBOX"}(R||(R={}));export{E as C,A as a,T as b,O as c,R as d}
|
|
1
|
+
var E,A,T,O,R;!function(E){E.OBJECT_FORM_DASHBOARD="OBJECT_FORM_DASHBOARD",E.CLASS_DASHBOARD="CLASS_DASHBOARD",E.GENERAL_DASHBOARD="GENERAL_DASHBOARD",E.NAVIGATION_PANE="NAVIGATION_PANE"}(E||(E={})),function(E){E.FIELD="FIELD",E.RELATION="RELATION",E.SECTION="SECTION",E.GROUP="GROUP",E.HEADER="HEADER",E.TEXT="TEXT",E.NAVIGATE="NAVIGATE",E.ACTION="ACTION",E.SEARCH="SEARCH",E.VIEW="VIEW",E.RELATED_VIEW="RELATED_VIEW",E.RELATED_OBJECT="RELATED_OBJECT"}(A||(A={})),function(E){E.TEXT="TEXT",E.TEXTBLOCK="TEXTBLOCK",E.INTEGER="INTEGER",E.DECIMAL="DECIMAL",E.PERCENTAGE="PERCENTAGE",E.CURRENCY="CURRENCY",E.BOOLEAN="BOOLEAN",E.DATE="DATE",E.DATETIME="DATETIME",E.TIME="TIME",E.EMAIL="EMAIL",E.HYPERLINK="HYPERLINK",E.LIST="LIST",E.FILE="FILE",E.IMAGE="IMAGE",E.LONGTEXT="LONGTEXT",E.JSON="JSON",E.SECRET="SECRET"}(T||(T={})),function(E){E.SEARCH="SEARCH",E.DROPDOWN="DROPDOWN",E.CHECKBOX="CHECKBOX"}(O||(O={})),function(E){E.SEARCH="SEARCH",E.DROPDOWN="DROPDOWN",E.CHECKBOX="CHECKBOX"}(R||(R={}));const C="commons.document";function I(E,A){return(null!=E?E:[]).find((E=>E.archetype===A))}export{C as A,E as C,A as a,T as b,O as c,R as d,I as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function n(n,i,t){return null==n||isNaN(n)?"":new Intl.NumberFormat(i,t).format(n)}function i(n,i,t){return null==n||isNaN(n)?"":new Intl.NumberFormat(t,{style:"currency",currency:i,minimumFractionDigits:2,maximumFractionDigits:2}).format(n)}function t(n,i,t=2){return null==n||isNaN(n)?"":new Intl.NumberFormat(i,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}).format(n)}function e(n,i){if(!n)return"";const t="string"==typeof n?new Date(n):n;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}function r(n,i){if(!n)return"";const t="string"==typeof n?new Date(n):n;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function u(n,i){if(!n)return"";const[t,e]=n.split(":").map(Number),r=new Date;return r.setHours(t,e,0,0),new Intl.DateTimeFormat(i,{hour:"2-digit",minute:"2-digit"}).format(r)}function a(n,i){var t,e,r,u;if(!n||!n.trim())return null;const a=new Intl.NumberFormat(i).formatToParts(1234567.89),o=null!==(e=null===(t=a.find((n=>"group"===n.type)))||void 0===t?void 0:t.value)&&void 0!==e?e:",",l=null!==(u=null===(r=a.find((n=>"decimal"===n.type)))||void 0===r?void 0:r.value)&&void 0!==u?u:".",s=n.replace(new RegExp(`\\${o}`,"g"),"").replace(new RegExp(`\\${l}`),".").replace("%","").trim(),c=parseFloat(s);return isNaN(c)?null:c}export{
|
|
1
|
+
function n(n,i,t){return null==n||isNaN(n)?"":new Intl.NumberFormat(i,t).format(n)}function i(n,i,t){return null==n||isNaN(n)?"":new Intl.NumberFormat(t,{style:"currency",currency:i,minimumFractionDigits:2,maximumFractionDigits:2}).format(n)}function t(n,i,t=2){return null==n||isNaN(n)?"":new Intl.NumberFormat(i,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}).format(n)}function e(n,i){if(!n)return"";const t="string"==typeof n?new Date(n):n;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}function r(n,i){if(!n)return"";const t="string"==typeof n?new Date(n):n;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function u(n,i){if(!n)return"";const[t,e]=n.split(":").map(Number),r=new Date;return r.setHours(t,e,0,0),new Intl.DateTimeFormat(i,{hour:"2-digit",minute:"2-digit"}).format(r)}function a(n,i){var t,e,r,u;if(!n||!n.trim())return null;const a=new Intl.NumberFormat(i).formatToParts(1234567.89),o=null!==(e=null===(t=a.find((n=>"group"===n.type)))||void 0===t?void 0:t.value)&&void 0!==e?e:",",l=null!==(u=null===(r=a.find((n=>"decimal"===n.type)))||void 0===r?void 0:r.value)&&void 0!==u?u:".",s=n.replace(new RegExp(`\\${o}`,"g"),"").replace(new RegExp(`\\${l}`),".").replace("%","").trim(),c=parseFloat(s);return isNaN(c)?null:c}export{n as a,u as b,r as c,i as d,t as e,e as f,a as p}
|
package/dist/components/i18n.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={nl:{required:"Dit veld is verplicht",select_placeholder:"Selecteer een optie",search_placeholder:"Zoeken...",upload_file:"Bestand uploaden",choose_file:"Bestand kiezen",clear:"Wissen",today:"Vandaag",invalid_email:"Voer een geldig e-mailadres in",invalid_url:"Voer een geldige URL in",invalid_number:"Voer een geldig getal in",drop_file_here:"Sleep bestand hierheen of",browse:"bladeren",file_too_large:"Bestand is te groot",search_results:"Zoekresultaten",no_results:"Geen resultaten gevonden",loading:"Laden...",submit:"Opslaan",cancel:"Annuleren",remove:"Verwijderen",add:"Toevoegen",yes:"Ja",no:"Nee",table_of:"van",download:"Downloaden",table_filter:"Filteren",table_filter_hide:"Filter verbergen",table_filter_active:"actief",table_filter_clear_all:"Alle filters wissen",table_new_record:"Nieuw record",table_export_excel:"Exporteer naar Excel",filter_sorting:"Sortering",filter_ascending:"Oplopend",filter_descending:"Aflopend",filter_section:"Filter",filter_apply:"Toepassen",filter_clear:"Wissen",filter_contains:"Bevat",filter_starts_with:"Begint met",filter_equals:"Gelijk aan",filter_has_value:"Heeft waarde",filter_is_empty:"Is leeg",filter_is_not_empty:"Is niet leeg",filter_exact:"Exact",filter_range:"Bereik",filter_from:"Van",filter_to:"Tot",filter_all:"Alle",filter_select_all:"Alles",filter_select_none:"Geen",filter_search_value:"Zoekwaarde...",filter_no_support:"Geen filtering beschikbaar voor dit veldtype.",textblock_show_more:"Meer tonen",close:"Sluiten",history_until:"tot",history_badge_tooltip:"Vorige waarden",hyperlink_name:"Linktekst (optioneel)"},en:{required:"This field is required",select_placeholder:"Select an option",search_placeholder:"Search...",upload_file:"Upload file",choose_file:"Choose file",clear:"Clear",today:"Today",invalid_email:"Please enter a valid email address",invalid_url:"Please enter a valid URL",invalid_number:"Please enter a valid number",drop_file_here:"Drop file here or",browse:"browse",file_too_large:"File is too large",search_results:"Search results",no_results:"No results found",loading:"Loading...",submit:"Save",cancel:"Cancel",remove:"Remove",add:"Add",yes:"Yes",no:"No",table_of:"of",download:"Download",table_filter:"Filter",table_filter_hide:"Hide filter",table_filter_active:"active",table_filter_clear_all:"Clear all filters",table_new_record:"New record",table_export_excel:"Export to Excel",filter_sorting:"Sorting",filter_ascending:"Ascending",filter_descending:"Descending",filter_section:"Filter",filter_apply:"Apply",filter_clear:"Clear",filter_contains:"Contains",filter_starts_with:"Starts with",filter_equals:"Equals",filter_has_value:"Has value",filter_is_empty:"Is empty",filter_is_not_empty:"Is not empty",filter_exact:"Exact",filter_range:"Range",filter_from:"From",filter_to:"To",filter_all:"All",filter_select_all:"All",filter_select_none:"None",filter_search_value:"Search value...",filter_no_support:"Filtering is not available for this field type.",textblock_show_more:"Show more",close:"Close",history_until:"until",history_badge_tooltip:"Previous values",hyperlink_name:"Link text (optional)"},ar:{required:"هذا الحقل مطلوب",select_placeholder:"اختر خياراً",search_placeholder:"بحث...",upload_file:"رفع ملف",choose_file:"اختر ملفاً",clear:"مسح",today:"اليوم",invalid_email:"يرجى إدخال عنوان بريد إلكتروني صحيح",invalid_url:"يرجى إدخال رابط صحيح",invalid_number:"يرجى إدخال رقم صحيح",drop_file_here:"اسحب الملف هنا أو",browse:"تصفح",file_too_large:"الملف كبير جداً",search_results:"نتائج البحث",no_results:"لم يتم العثور على نتائج",loading:"جار التحميل...",submit:"حفظ",cancel:"إلغاء",remove:"إزالة",add:"إضافة",yes:"نعم",no:"لا",table_of:"من أصل",download:"تنزيل",table_filter:"تصفية",table_filter_hide:"إخفاء التصفية",table_filter_active:"نشط",table_filter_clear_all:"مسح جميع الفلاتر",table_new_record:"سجل جديد",table_export_excel:"تصدير إلى Excel",filter_sorting:"الترتيب",filter_ascending:"تصاعدي",filter_descending:"تنازلي",filter_section:"تصفية",filter_apply:"تطبيق",filter_clear:"مسح",filter_contains:"يحتوي على",filter_starts_with:"يبدأ بـ",filter_equals:"يساوي",filter_has_value:"له قيمة",filter_is_empty:"فارغ",filter_is_not_empty:"ليس فارغاً",filter_exact:"دقيق",filter_range:"نطاق",filter_from:"من",filter_to:"إلى",filter_all:"الكل",filter_select_all:"الكل",filter_select_none:"لا شيء",filter_search_value:"قيمة البحث...",filter_no_support:"التصفية غير متاحة لهذا النوع من الحقول.",textblock_show_more:"عرض المزيد",close:"إغلاق",history_until:"حتى",history_badge_tooltip:"القيم السابقة",hyperlink_name:"نص الرابط (اختياري)"},fr:{required:"Ce champ est obligatoire",select_placeholder:"Sélectionner une option",search_placeholder:"Rechercher...",upload_file:"Télécharger un fichier",choose_file:"Choisir un fichier",clear:"Effacer",today:"Aujourd'hui",invalid_email:"Veuillez saisir une adresse e-mail valide",invalid_url:"Veuillez saisir une URL valide",invalid_number:"Veuillez saisir un nombre valide",drop_file_here:"Déposez le fichier ici ou",browse:"parcourir",file_too_large:"Le fichier est trop volumineux",search_results:"Résultats de recherche",no_results:"Aucun résultat trouvé",loading:"Chargement...",submit:"Enregistrer",cancel:"Annuler",remove:"Supprimer",add:"Ajouter",yes:"Oui",no:"Non",table_of:"sur",download:"Télécharger",table_filter:"Filtrer",table_filter_hide:"Masquer le filtre",table_filter_active:"actif",table_filter_clear_all:"Effacer tous les filtres",table_new_record:"Nouvel enregistrement",table_export_excel:"Exporter vers Excel",filter_sorting:"Tri",filter_ascending:"Croissant",filter_descending:"Décroissant",filter_section:"Filtre",filter_apply:"Appliquer",filter_clear:"Effacer",filter_contains:"Contient",filter_starts_with:"Commence par",filter_equals:"Égal à",filter_has_value:"A une valeur",filter_is_empty:"Est vide",filter_is_not_empty:"N'est pas vide",filter_exact:"Exact",filter_range:"Plage",filter_from:"De",filter_to:"À",filter_all:"Tous",filter_select_all:"Tous",filter_select_none:"Aucun",filter_search_value:"Valeur de recherche...",filter_no_support:"Le filtrage n'est pas disponible pour ce type de champ.",textblock_show_more:"Voir plus",close:"Fermer",history_until:"jusqu'au",history_badge_tooltip:"Valeurs précédentes",hyperlink_name:"Texte du lien (optionnel)"},de:{required:"Dieses Feld ist erforderlich",select_placeholder:"Option auswählen",search_placeholder:"Suchen...",upload_file:"Datei hochladen",choose_file:"Datei auswählen",clear:"Löschen",today:"Heute",invalid_email:"Bitte geben Sie eine gültige E-Mail-Adresse ein",invalid_url:"Bitte geben Sie eine gültige URL ein",invalid_number:"Bitte geben Sie eine gültige Zahl ein",drop_file_here:"Datei hier ablegen oder",browse:"durchsuchen",file_too_large:"Datei ist zu groß",search_results:"Suchergebnisse",no_results:"Keine Ergebnisse gefunden",loading:"Laden...",submit:"Speichern",cancel:"Abbrechen",remove:"Entfernen",add:"Hinzufügen",yes:"Ja",no:"Nein",table_of:"von",download:"Herunterladen",table_filter:"Filtern",table_filter_hide:"Filter ausblenden",table_filter_active:"aktiv",table_filter_clear_all:"Alle Filter löschen",table_new_record:"Neuer Eintrag",table_export_excel:"Als Excel exportieren",filter_sorting:"Sortierung",filter_ascending:"Aufsteigend",filter_descending:"Absteigend",filter_section:"Filter",filter_apply:"Anwenden",filter_clear:"Löschen",filter_contains:"Enthält",filter_starts_with:"Beginnt mit",filter_equals:"Gleich",filter_has_value:"Hat Wert",filter_is_empty:"Ist leer",filter_is_not_empty:"Ist nicht leer",filter_exact:"Genau",filter_range:"Bereich",filter_from:"Von",filter_to:"Bis",filter_all:"Alle",filter_select_all:"Alle",filter_select_none:"Keine",filter_search_value:"Suchwert...",filter_no_support:"Filterung ist für diesen Feldtyp nicht verfügbar.",textblock_show_more:"Mehr anzeigen",close:"Schließen",history_until:"bis",history_badge_tooltip:"Vorherige Werte",hyperlink_name:"Linktext (optional)"},es:{required:"Este campo es obligatorio",select_placeholder:"Seleccionar una opción",search_placeholder:"Buscar...",upload_file:"Subir archivo",choose_file:"Elegir archivo",clear:"Borrar",today:"Hoy",invalid_email:"Por favor, introduzca una dirección de correo electrónico válida",invalid_url:"Por favor, introduzca una URL válida",invalid_number:"Por favor, introduzca un número válido",drop_file_here:"Suelte el archivo aquí o",browse:"explorar",file_too_large:"El archivo es demasiado grande",search_results:"Resultados de búsqueda",no_results:"No se encontraron resultados",loading:"Cargando...",submit:"Guardar",cancel:"Cancelar",remove:"Eliminar",add:"Añadir",yes:"Sí",no:"No",table_of:"de",download:"Descargar",table_filter:"Filtrar",table_filter_hide:"Ocultar filtro",table_filter_active:"activo",table_filter_clear_all:"Borrar todos los filtros",table_new_record:"Nuevo registro",table_export_excel:"Exportar a Excel",filter_sorting:"Ordenación",filter_ascending:"Ascendente",filter_descending:"Descendente",filter_section:"Filtro",filter_apply:"Aplicar",filter_clear:"Borrar",filter_contains:"Contiene",filter_starts_with:"Empieza por",filter_equals:"Igual a",filter_has_value:"Tiene valor",filter_is_empty:"Está vacío",filter_is_not_empty:"No está vacío",filter_exact:"Exacto",filter_range:"Rango",filter_from:"Desde",filter_to:"Hasta",filter_all:"Todos",filter_select_all:"Todos",filter_select_none:"Ninguno",filter_search_value:"Valor de búsqueda...",filter_no_support:"El filtrado no está disponible para este tipo de campo.",textblock_show_more:"Mostrar más",close:"Cerrar",history_until:"hasta",history_badge_tooltip:"Valores anteriores",hyperlink_name:"Texto del enlace (opcional)"},it:{required:"Questo campo è obbligatorio",select_placeholder:"Seleziona un'opzione",search_placeholder:"Cerca...",upload_file:"Carica file",choose_file:"Scegli file",clear:"Cancella",today:"Oggi",invalid_email:"Inserisci un indirizzo email valido",invalid_url:"Inserisci un URL valido",invalid_number:"Inserisci un numero valido",drop_file_here:"Trascina il file qui o",browse:"sfoglia",file_too_large:"Il file è troppo grande",search_results:"Risultati della ricerca",no_results:"Nessun risultato trovato",loading:"Caricamento...",submit:"Salva",cancel:"Annulla",remove:"Rimuovi",add:"Aggiungi",yes:"Sì",no:"No",table_of:"di",download:"Scarica",table_filter:"Filtra",table_filter_hide:"Nascondi filtro",table_filter_active:"attivo",table_filter_clear_all:"Cancella tutti i filtri",table_new_record:"Nuovo record",table_export_excel:"Esporta in Excel",filter_sorting:"Ordinamento",filter_ascending:"Crescente",filter_descending:"Decrescente",filter_section:"Filtro",filter_apply:"Applica",filter_clear:"Cancella",filter_contains:"Contiene",filter_starts_with:"Inizia con",filter_equals:"Uguale a",filter_has_value:"Ha valore",filter_is_empty:"È vuoto",filter_is_not_empty:"Non è vuoto",filter_exact:"Esatto",filter_range:"Intervallo",filter_from:"Da",filter_to:"A",filter_all:"Tutti",filter_select_all:"Tutti",filter_select_none:"Nessuno",filter_search_value:"Valore di ricerca...",filter_no_support:"Il filtro non è disponibile per questo tipo di campo.",textblock_show_more:"Mostra altro",close:"Chiudi",history_until:"fino a",history_badge_tooltip:"Valori precedenti",hyperlink_name:"Testo del collegamento (opzionale)"},uk:{required:"Це поле обов'язкове",select_placeholder:"Виберіть варіант",search_placeholder:"Пошук...",upload_file:"Завантажити файл",choose_file:"Вибрати файл",clear:"Очистити",today:"Сьогодні",invalid_email:"Будь ласка, введіть дійсну адресу електронної пошти",invalid_url:"Будь ласка, введіть дійсну URL-адресу",invalid_number:"Будь ласка, введіть дійсне число",drop_file_here:"Перетягніть файл сюди або",browse:"огляд",file_too_large:"Файл занадто великий",search_results:"Результати пошуку",no_results:"Результатів не знайдено",loading:"Завантаження...",submit:"Зберегти",cancel:"Скасувати",remove:"Видалити",add:"Додати",yes:"Так",no:"Ні",table_of:"з",download:"Завантажити",table_filter:"Фільтрувати",table_filter_hide:"Сховати фільтр",table_filter_active:"активний",table_filter_clear_all:"Очистити всі фільтри",table_new_record:"Новий запис",table_export_excel:"Експортувати до Excel",filter_sorting:"Сортування",filter_ascending:"За зростанням",filter_descending:"За спаданням",filter_section:"Фільтр",filter_apply:"Застосувати",filter_clear:"Очистити",filter_contains:"Містить",filter_starts_with:"Починається з",filter_equals:"Дорівнює",filter_has_value:"Має значення",filter_is_empty:"Порожнє",filter_is_not_empty:"Не порожнє",filter_exact:"Точно",filter_range:"Діапазон",filter_from:"Від",filter_to:"До",filter_all:"Всі",filter_select_all:"Всі",filter_select_none:"Жодного",filter_search_value:"Значення для пошуку...",filter_no_support:"Фільтрування недоступне для цього типу поля.",textblock_show_more:"Показати більше",close:"Закрити",history_until:"до",history_badge_tooltip:"Попередні значення",hyperlink_name:"Текст посилання (необов'язково)"}};function l(l,r){var i,t,a;const o=(null!=r?r:"en").split("-")[0].toLowerCase();return null!==(a=null!==(t=(null!==(i=e[o])&&void 0!==i?i:e.en)[l])&&void 0!==t?t:e.en[l])&&void 0!==a?a:l}export{l as t}
|
|
1
|
+
const e={nl:{required:"Dit veld is verplicht",select_placeholder:"Selecteer een optie",search_placeholder:"Zoeken...",upload_file:"Bestand uploaden",choose_file:"Bestand kiezen",clear:"Wissen",today:"Vandaag",invalid_email:"Voer een geldig e-mailadres in",invalid_url:"Voer een geldige URL in",invalid_number:"Voer een geldig getal in",drop_file_here:"Sleep bestand hierheen of",browse:"bladeren",file_too_large:"Bestand is te groot",search_results:"Zoekresultaten",no_results:"Geen resultaten gevonden",loading:"Laden...",submit:"Opslaan",cancel:"Annuleren",remove:"Verwijderen",add:"Toevoegen",yes:"Ja",no:"Nee",table_of:"van",download:"Downloaden",table_filter:"Filteren",table_filter_hide:"Filter verbergen",table_filter_active:"actief",table_filter_clear_all:"Alle filters wissen",table_new_record:"Nieuw record",table_export_excel:"Exporteer naar Excel",doc_view_switch:"Weergave wisselen",doc_view_tree:"Boomweergave",doc_view_list:"Lijstweergave",filter_sorting:"Sortering",filter_ascending:"Oplopend",filter_descending:"Aflopend",filter_section:"Filter",filter_apply:"Toepassen",filter_clear:"Wissen",filter_contains:"Bevat",filter_starts_with:"Begint met",filter_equals:"Gelijk aan",filter_has_value:"Heeft waarde",filter_is_empty:"Is leeg",filter_is_not_empty:"Is niet leeg",filter_exact:"Exact",filter_range:"Bereik",filter_from:"Van",filter_to:"Tot",filter_all:"Alle",filter_select_all:"Alles",filter_select_none:"Geen",filter_search_value:"Zoekwaarde...",filter_no_support:"Geen filtering beschikbaar voor dit veldtype.",textblock_show_more:"Meer tonen",close:"Sluiten",history_until:"tot",history_badge_tooltip:"Vorige waarden",hyperlink_name:"Linktekst (optioneel)",new_folder:"Nieuwe folder",folder_name_placeholder:"Foldernaam",folder_no_slash:"Een foldernaam mag geen '/' bevatten",folder_duplicate:"Er bestaat al een folder met deze naam"},en:{required:"This field is required",select_placeholder:"Select an option",search_placeholder:"Search...",upload_file:"Upload file",choose_file:"Choose file",clear:"Clear",today:"Today",invalid_email:"Please enter a valid email address",invalid_url:"Please enter a valid URL",invalid_number:"Please enter a valid number",drop_file_here:"Drop file here or",browse:"browse",file_too_large:"File is too large",search_results:"Search results",no_results:"No results found",loading:"Loading...",submit:"Save",cancel:"Cancel",remove:"Remove",add:"Add",yes:"Yes",no:"No",table_of:"of",download:"Download",table_filter:"Filter",table_filter_hide:"Hide filter",table_filter_active:"active",table_filter_clear_all:"Clear all filters",table_new_record:"New record",table_export_excel:"Export to Excel",doc_view_switch:"Switch view",doc_view_tree:"Tree view",doc_view_list:"List view",filter_sorting:"Sorting",filter_ascending:"Ascending",filter_descending:"Descending",filter_section:"Filter",filter_apply:"Apply",filter_clear:"Clear",filter_contains:"Contains",filter_starts_with:"Starts with",filter_equals:"Equals",filter_has_value:"Has value",filter_is_empty:"Is empty",filter_is_not_empty:"Is not empty",filter_exact:"Exact",filter_range:"Range",filter_from:"From",filter_to:"To",filter_all:"All",filter_select_all:"All",filter_select_none:"None",filter_search_value:"Search value...",filter_no_support:"Filtering is not available for this field type.",textblock_show_more:"Show more",close:"Close",history_until:"until",history_badge_tooltip:"Previous values",hyperlink_name:"Link text (optional)",new_folder:"New folder",folder_name_placeholder:"Folder name",folder_no_slash:"A folder name cannot contain '/'",folder_duplicate:"A folder with this name already exists"},ar:{required:"هذا الحقل مطلوب",select_placeholder:"اختر خياراً",search_placeholder:"بحث...",upload_file:"رفع ملف",choose_file:"اختر ملفاً",clear:"مسح",today:"اليوم",invalid_email:"يرجى إدخال عنوان بريد إلكتروني صحيح",invalid_url:"يرجى إدخال رابط صحيح",invalid_number:"يرجى إدخال رقم صحيح",drop_file_here:"اسحب الملف هنا أو",browse:"تصفح",file_too_large:"الملف كبير جداً",search_results:"نتائج البحث",no_results:"لم يتم العثور على نتائج",loading:"جار التحميل...",submit:"حفظ",cancel:"إلغاء",remove:"إزالة",add:"إضافة",yes:"نعم",no:"لا",table_of:"من أصل",download:"تنزيل",table_filter:"تصفية",table_filter_hide:"إخفاء التصفية",table_filter_active:"نشط",table_filter_clear_all:"مسح جميع الفلاتر",table_new_record:"سجل جديد",table_export_excel:"تصدير إلى Excel",doc_view_switch:"تبديل العرض",doc_view_tree:"عرض شجري",doc_view_list:"عرض القائمة",filter_sorting:"الترتيب",filter_ascending:"تصاعدي",filter_descending:"تنازلي",filter_section:"تصفية",filter_apply:"تطبيق",filter_clear:"مسح",filter_contains:"يحتوي على",filter_starts_with:"يبدأ بـ",filter_equals:"يساوي",filter_has_value:"له قيمة",filter_is_empty:"فارغ",filter_is_not_empty:"ليس فارغاً",filter_exact:"دقيق",filter_range:"نطاق",filter_from:"من",filter_to:"إلى",filter_all:"الكل",filter_select_all:"الكل",filter_select_none:"لا شيء",filter_search_value:"قيمة البحث...",filter_no_support:"التصفية غير متاحة لهذا النوع من الحقول.",textblock_show_more:"عرض المزيد",close:"إغلاق",history_until:"حتى",history_badge_tooltip:"القيم السابقة",hyperlink_name:"نص الرابط (اختياري)"},fr:{required:"Ce champ est obligatoire",select_placeholder:"Sélectionner une option",search_placeholder:"Rechercher...",upload_file:"Télécharger un fichier",choose_file:"Choisir un fichier",clear:"Effacer",today:"Aujourd'hui",invalid_email:"Veuillez saisir une adresse e-mail valide",invalid_url:"Veuillez saisir une URL valide",invalid_number:"Veuillez saisir un nombre valide",drop_file_here:"Déposez le fichier ici ou",browse:"parcourir",file_too_large:"Le fichier est trop volumineux",search_results:"Résultats de recherche",no_results:"Aucun résultat trouvé",loading:"Chargement...",submit:"Enregistrer",cancel:"Annuler",remove:"Supprimer",add:"Ajouter",yes:"Oui",no:"Non",table_of:"sur",download:"Télécharger",table_filter:"Filtrer",table_filter_hide:"Masquer le filtre",table_filter_active:"actif",table_filter_clear_all:"Effacer tous les filtres",table_new_record:"Nouvel enregistrement",table_export_excel:"Exporter vers Excel",doc_view_switch:"Changer de vue",doc_view_tree:"Vue arborescente",doc_view_list:"Vue liste",filter_sorting:"Tri",filter_ascending:"Croissant",filter_descending:"Décroissant",filter_section:"Filtre",filter_apply:"Appliquer",filter_clear:"Effacer",filter_contains:"Contient",filter_starts_with:"Commence par",filter_equals:"Égal à",filter_has_value:"A une valeur",filter_is_empty:"Est vide",filter_is_not_empty:"N'est pas vide",filter_exact:"Exact",filter_range:"Plage",filter_from:"De",filter_to:"À",filter_all:"Tous",filter_select_all:"Tous",filter_select_none:"Aucun",filter_search_value:"Valeur de recherche...",filter_no_support:"Le filtrage n'est pas disponible pour ce type de champ.",textblock_show_more:"Voir plus",close:"Fermer",history_until:"jusqu'au",history_badge_tooltip:"Valeurs précédentes",hyperlink_name:"Texte du lien (optionnel)"},de:{required:"Dieses Feld ist erforderlich",select_placeholder:"Option auswählen",search_placeholder:"Suchen...",upload_file:"Datei hochladen",choose_file:"Datei auswählen",clear:"Löschen",today:"Heute",invalid_email:"Bitte geben Sie eine gültige E-Mail-Adresse ein",invalid_url:"Bitte geben Sie eine gültige URL ein",invalid_number:"Bitte geben Sie eine gültige Zahl ein",drop_file_here:"Datei hier ablegen oder",browse:"durchsuchen",file_too_large:"Datei ist zu groß",search_results:"Suchergebnisse",no_results:"Keine Ergebnisse gefunden",loading:"Laden...",submit:"Speichern",cancel:"Abbrechen",remove:"Entfernen",add:"Hinzufügen",yes:"Ja",no:"Nein",table_of:"von",download:"Herunterladen",table_filter:"Filtern",table_filter_hide:"Filter ausblenden",table_filter_active:"aktiv",table_filter_clear_all:"Alle Filter löschen",table_new_record:"Neuer Eintrag",table_export_excel:"Als Excel exportieren",doc_view_switch:"Ansicht wechseln",doc_view_tree:"Baumansicht",doc_view_list:"Listenansicht",filter_sorting:"Sortierung",filter_ascending:"Aufsteigend",filter_descending:"Absteigend",filter_section:"Filter",filter_apply:"Anwenden",filter_clear:"Löschen",filter_contains:"Enthält",filter_starts_with:"Beginnt mit",filter_equals:"Gleich",filter_has_value:"Hat Wert",filter_is_empty:"Ist leer",filter_is_not_empty:"Ist nicht leer",filter_exact:"Genau",filter_range:"Bereich",filter_from:"Von",filter_to:"Bis",filter_all:"Alle",filter_select_all:"Alle",filter_select_none:"Keine",filter_search_value:"Suchwert...",filter_no_support:"Filterung ist für diesen Feldtyp nicht verfügbar.",textblock_show_more:"Mehr anzeigen",close:"Schließen",history_until:"bis",history_badge_tooltip:"Vorherige Werte",hyperlink_name:"Linktext (optional)"},es:{required:"Este campo es obligatorio",select_placeholder:"Seleccionar una opción",search_placeholder:"Buscar...",upload_file:"Subir archivo",choose_file:"Elegir archivo",clear:"Borrar",today:"Hoy",invalid_email:"Por favor, introduzca una dirección de correo electrónico válida",invalid_url:"Por favor, introduzca una URL válida",invalid_number:"Por favor, introduzca un número válido",drop_file_here:"Suelte el archivo aquí o",browse:"explorar",file_too_large:"El archivo es demasiado grande",search_results:"Resultados de búsqueda",no_results:"No se encontraron resultados",loading:"Cargando...",submit:"Guardar",cancel:"Cancelar",remove:"Eliminar",add:"Añadir",yes:"Sí",no:"No",table_of:"de",download:"Descargar",table_filter:"Filtrar",table_filter_hide:"Ocultar filtro",table_filter_active:"activo",table_filter_clear_all:"Borrar todos los filtros",table_new_record:"Nuevo registro",table_export_excel:"Exportar a Excel",doc_view_switch:"Cambiar vista",doc_view_tree:"Vista de árbol",doc_view_list:"Vista de lista",filter_sorting:"Ordenación",filter_ascending:"Ascendente",filter_descending:"Descendente",filter_section:"Filtro",filter_apply:"Aplicar",filter_clear:"Borrar",filter_contains:"Contiene",filter_starts_with:"Empieza por",filter_equals:"Igual a",filter_has_value:"Tiene valor",filter_is_empty:"Está vacío",filter_is_not_empty:"No está vacío",filter_exact:"Exacto",filter_range:"Rango",filter_from:"Desde",filter_to:"Hasta",filter_all:"Todos",filter_select_all:"Todos",filter_select_none:"Ninguno",filter_search_value:"Valor de búsqueda...",filter_no_support:"El filtrado no está disponible para este tipo de campo.",textblock_show_more:"Mostrar más",close:"Cerrar",history_until:"hasta",history_badge_tooltip:"Valores anteriores",hyperlink_name:"Texto del enlace (opcional)"},it:{required:"Questo campo è obbligatorio",select_placeholder:"Seleziona un'opzione",search_placeholder:"Cerca...",upload_file:"Carica file",choose_file:"Scegli file",clear:"Cancella",today:"Oggi",invalid_email:"Inserisci un indirizzo email valido",invalid_url:"Inserisci un URL valido",invalid_number:"Inserisci un numero valido",drop_file_here:"Trascina il file qui o",browse:"sfoglia",file_too_large:"Il file è troppo grande",search_results:"Risultati della ricerca",no_results:"Nessun risultato trovato",loading:"Caricamento...",submit:"Salva",cancel:"Annulla",remove:"Rimuovi",add:"Aggiungi",yes:"Sì",no:"No",table_of:"di",download:"Scarica",table_filter:"Filtra",table_filter_hide:"Nascondi filtro",table_filter_active:"attivo",table_filter_clear_all:"Cancella tutti i filtri",table_new_record:"Nuovo record",table_export_excel:"Esporta in Excel",doc_view_switch:"Cambia vista",doc_view_tree:"Vista ad albero",doc_view_list:"Vista elenco",filter_sorting:"Ordinamento",filter_ascending:"Crescente",filter_descending:"Decrescente",filter_section:"Filtro",filter_apply:"Applica",filter_clear:"Cancella",filter_contains:"Contiene",filter_starts_with:"Inizia con",filter_equals:"Uguale a",filter_has_value:"Ha valore",filter_is_empty:"È vuoto",filter_is_not_empty:"Non è vuoto",filter_exact:"Esatto",filter_range:"Intervallo",filter_from:"Da",filter_to:"A",filter_all:"Tutti",filter_select_all:"Tutti",filter_select_none:"Nessuno",filter_search_value:"Valore di ricerca...",filter_no_support:"Il filtro non è disponibile per questo tipo di campo.",textblock_show_more:"Mostra altro",close:"Chiudi",history_until:"fino a",history_badge_tooltip:"Valori precedenti",hyperlink_name:"Testo del collegamento (opzionale)"},uk:{required:"Це поле обов'язкове",select_placeholder:"Виберіть варіант",search_placeholder:"Пошук...",upload_file:"Завантажити файл",choose_file:"Вибрати файл",clear:"Очистити",today:"Сьогодні",invalid_email:"Будь ласка, введіть дійсну адресу електронної пошти",invalid_url:"Будь ласка, введіть дійсну URL-адресу",invalid_number:"Будь ласка, введіть дійсне число",drop_file_here:"Перетягніть файл сюди або",browse:"огляд",file_too_large:"Файл занадто великий",search_results:"Результати пошуку",no_results:"Результатів не знайдено",loading:"Завантаження...",submit:"Зберегти",cancel:"Скасувати",remove:"Видалити",add:"Додати",yes:"Так",no:"Ні",table_of:"з",download:"Завантажити",table_filter:"Фільтрувати",table_filter_hide:"Сховати фільтр",table_filter_active:"активний",table_filter_clear_all:"Очистити всі фільтри",table_new_record:"Новий запис",table_export_excel:"Експортувати до Excel",doc_view_switch:"Змінити вигляд",doc_view_tree:"Деревоподібний вигляд",doc_view_list:"Список",filter_sorting:"Сортування",filter_ascending:"За зростанням",filter_descending:"За спаданням",filter_section:"Фільтр",filter_apply:"Застосувати",filter_clear:"Очистити",filter_contains:"Містить",filter_starts_with:"Починається з",filter_equals:"Дорівнює",filter_has_value:"Має значення",filter_is_empty:"Порожнє",filter_is_not_empty:"Не порожнє",filter_exact:"Точно",filter_range:"Діапазон",filter_from:"Від",filter_to:"До",filter_all:"Всі",filter_select_all:"Всі",filter_select_none:"Жодного",filter_search_value:"Значення для пошуку...",filter_no_support:"Фільтрування недоступне для цього типу поля.",textblock_show_more:"Показати більше",close:"Закрити",history_until:"до",history_badge_tooltip:"Попередні значення",hyperlink_name:"Текст посилання (необов'язково)"}};function l(l,i){var r,t,a;const o=(null!=i?i:"en").split("-")[0].toLowerCase();return null!==(a=null!==(t=(null!==(r=e[o])&&void 0!==r?r:e.en)[l])&&void 0!==t?t:e.en[l])&&void 0!==a?a:l}export{l as t}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getAssetPath,render,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";export{b as ClientLayoutItemFieldDataType,c as ClientLayoutItemRelationDisplayType,d as ClientLayoutItemRelationEditBehavior,a as ClientLayoutItemType,C as ClientLayoutType}from"./client-layout.js";
|
|
1
|
+
export{getAssetPath,render,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";export{A as ARCHETYPE_DOCUMENT,b as ClientLayoutItemFieldDataType,c as ClientLayoutItemRelationDisplayType,d as ClientLayoutItemRelationEditBehavior,a as ClientLayoutItemType,C as ClientLayoutType,r as resolveArchetype}from"./client-layout.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as o,createEvent as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as o,createEvent as d,h as l,Host as r,transformTag as a}from"@stencil/core/internal/client";const i=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.mrdChange=d(this,"mrdChange",7),this.mrdBlur=d(this,"mrdBlur",7),this.name="",this.label="",this.value=!1,this.required=!1,this.disabled=!1,this.locale=navigator.language,this.checked=!1,this.handleChange=e=>{this.checked=e.target.checked,this.mrdChange.emit({name:this.name,value:this.checked})},this.handleBlur=()=>{this.mrdBlur.emit({name:this.name,value:this.checked})}}componentWillLoad(){this.checked=!!this.value}render(){return l(r,{key:"38e65a1c7971912f8259d09281b272d7cbd446f2"},l("div",{key:"e10919998731d744cc2a13130c5f355c9b8fc9aa",class:"mrd-boolean-field"},l("label",{key:"db85a2c80cc62fdfd25237e3f5c7750bf1666819",class:"mrd-boolean-field__toggle-label"},l("input",{key:"cddd7004593fa4671abb89f4f805c4a009db99ef",class:"mrd-boolean-field__checkbox",type:"checkbox",name:this.name,checked:this.checked,disabled:this.disabled,onChange:this.handleChange,onBlur:this.handleBlur}),l("span",{key:"f90f0ed6d74d6688e51b8d85a5397a0597d95ad8",class:"mrd-boolean-field__toggle","aria-hidden":"true"}),this.label&&l("span",{key:"7e4582b1d9a5b08c00c220bec53baa6c14cbfe43",class:"mrd-boolean-field__text"+(this.required?" mrd-boolean-field__text--required":"")},this.label))))}static get style(){return".sc-mrd-boolean-field-h{display:block}.mrd-boolean-field.sc-mrd-boolean-field{display:flex;align-items:center;width:100%}.mrd-boolean-field__toggle-label.sc-mrd-boolean-field{display:flex;align-items:center;gap:var(--mrd-space-3);cursor:pointer;user-select:none}.mrd-boolean-field__checkbox.sc-mrd-boolean-field{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:checked+.mrd-boolean-field__toggle.sc-mrd-boolean-field{background-color:var(--mrd-color-primary)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:checked+.mrd-boolean-field__toggle.sc-mrd-boolean-field::after{transform:translateX(20px)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:focus+.mrd-boolean-field__toggle.sc-mrd-boolean-field{box-shadow:var(--mrd-shadow-focus)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:disabled+.mrd-boolean-field__toggle.sc-mrd-boolean-field{opacity:0.5;cursor:not-allowed}.mrd-boolean-field__toggle.sc-mrd-boolean-field{position:relative;display:inline-block;width:44px;height:24px;background-color:var(--mrd-color-neutral-300);border-radius:var(--mrd-border-radius-full);transition:background-color var(--mrd-transition);flex-shrink:0}.mrd-boolean-field__toggle.sc-mrd-boolean-field::after{content:'';position:absolute;top:2px;left:2px;width:20px;height:20px;background-color:var(--mrd-color-white);border-radius:50%;transition:transform var(--mrd-transition);box-shadow:var(--mrd-shadow-sm)}.mrd-boolean-field__text.sc-mrd-boolean-field{font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-color-neutral-800)}.mrd-boolean-field__text--required.sc-mrd-boolean-field::after{content:' *';color:var(--mrd-color-danger)}"}},[2,"mrd-boolean-field",{name:[1],label:[1],value:[4],required:[4],disabled:[4],locale:[1],checked:[32]}]);function t(){"undefined"!=typeof customElements&&["mrd-boolean-field"].forEach((e=>{"mrd-boolean-field"===e&&(customElements.get(a(e))||customElements.define(a(e),i))}))}export{i as M,t as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as r,HTMLElement as e,createEvent as d,h as c,Host as i,transformTag as o}from"@stencil/core/internal/client";import{t as a}from"./i18n.js";import{v as t}from"./validation.js";import{p as n}from"./format.js";const s=["EUR","USD","GBP","CHF","JPY","CNY","AUD","CAD","SEK","NOK","DKK","NZD","SGD","HKD","PLN","CZK","HUF","MXN","BRL","INR","TRY","ZAR","AED","SAR"],l=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.mrdChange=d(this,"mrdChange",7),this.mrdBlur=d(this,"mrdBlur",7),this.name="",this.label="",this.value={amount:null,currency:"EUR"},this.required=!1,this.disabled=!1,this.locale=navigator.language,this.amountDisplay="",this.currency="EUR",this.error="",this.handleAmountInput=r=>{this.amountDisplay=r.target.value},this.handleAmountBlur=r=>{const e=r.target.value,d=n(e,this.locale);this.error=this.required&&!t(e)?a("required",this.locale):"";const c={amount:d,currency:this.currency};this.mrdChange.emit({name:this.name,value:c}),this.mrdBlur.emit({name:this.name,value:c})},this.handleCurrencyChange=r=>{this.currency=r.target.value;const e=n(this.amountDisplay,this.locale);this.mrdChange.emit({name:this.name,value:{amount:e,currency:this.currency}})}}componentWillLoad(){this.value&&(this.currency=this.value.currency||"EUR",this.amountDisplay=null!==this.value.amount?String(this.value.amount):"")}render(){const r=!!this.error;return c(i,{key:"
|
|
1
|
+
import{proxyCustomElement as r,HTMLElement as e,createEvent as d,h as c,Host as i,transformTag as o}from"@stencil/core/internal/client";import{t as a}from"./i18n.js";import{v as t}from"./validation.js";import{p as n}from"./format.js";const s=["EUR","USD","GBP","CHF","JPY","CNY","AUD","CAD","SEK","NOK","DKK","NZD","SGD","HKD","PLN","CZK","HUF","MXN","BRL","INR","TRY","ZAR","AED","SAR"],l=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.mrdChange=d(this,"mrdChange",7),this.mrdBlur=d(this,"mrdBlur",7),this.name="",this.label="",this.value={amount:null,currency:"EUR"},this.required=!1,this.disabled=!1,this.locale=navigator.language,this.amountDisplay="",this.currency="EUR",this.error="",this.handleAmountInput=r=>{this.amountDisplay=r.target.value},this.handleAmountBlur=r=>{const e=r.target.value,d=n(e,this.locale);this.error=this.required&&!t(e)?a("required",this.locale):"";const c={amount:d,currency:this.currency};this.mrdChange.emit({name:this.name,value:c}),this.mrdBlur.emit({name:this.name,value:c})},this.handleCurrencyChange=r=>{this.currency=r.target.value;const e=n(this.amountDisplay,this.locale);this.mrdChange.emit({name:this.name,value:{amount:e,currency:this.currency}})}}componentWillLoad(){this.value&&(this.currency=this.value.currency||"EUR",this.amountDisplay=null!==this.value.amount?String(this.value.amount):"")}render(){const r=!!this.error;return c(i,{key:"fe3520c44d831caf36b388cb5968a9518b16cb8b"},c("div",{key:"50c1fd2d53038e46da575d3e46e1ec26c2da423b",class:"mrd-currency-field"},this.label&&c("label",{key:"a2649d41bf6e3765c8a62ba6559c64c41615027a",class:"mrd-currency-field__label"+(this.required?" mrd-currency-field__label--required":"")},this.label),c("div",{key:"952b51f315b4a5c05a8373ce3a3f1041086ba8b8",class:"mrd-currency-field__row"},c("input",{key:"137a72ffc5d79fc8e0a8cf44c012d84a50c26d5b",class:"mrd-currency-field__amount"+(r?" mrd-currency-field__amount--error":""),type:"text",inputMode:"decimal",name:`${this.name}_amount`,value:this.amountDisplay,placeholder:"0.00",required:this.required,disabled:this.disabled,onInput:this.handleAmountInput,onBlur:this.handleAmountBlur}),c("select",{key:"1755854ca9b76dc4b41ad84b6b788685931ace36",class:"mrd-currency-field__currency",disabled:this.disabled,onChange:this.handleCurrencyChange},s.map((r=>c("option",{key:r,value:r,selected:r===this.currency},r))))),r&&c("span",{key:"0f10eb98c2e6444651d79d1de92acd0dbcc7133b",class:"mrd-currency-field__error"},this.error)))}static get style(){return".sc-mrd-currency-field-h{display:block}.mrd-currency-field.sc-mrd-currency-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-currency-field__label.sc-mrd-currency-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-currency-field__label--required.sc-mrd-currency-field::after{content:' *';color:var(--mrd-color-danger)}.mrd-currency-field__row.sc-mrd-currency-field{display:flex;gap:var(--mrd-space-2);align-items:stretch}.mrd-currency-field__amount.sc-mrd-currency-field{flex:1;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-input-padding-x);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-input-color);background-color:var(--mrd-input-bg);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);transition:border-color var(--mrd-transition), box-shadow var(--mrd-transition);outline:none;appearance:none;text-align:right;box-sizing:border-box}.mrd-currency-field__amount.sc-mrd-currency-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-currency-field__amount.sc-mrd-currency-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-currency-field__amount--error.sc-mrd-currency-field{border-color:var(--mrd-border-color-error)}.mrd-currency-field__amount--error.sc-mrd-currency-field:focus{box-shadow:var(--mrd-shadow-focus-error)}.mrd-currency-field__currency.sc-mrd-currency-field{width:90px;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-space-2);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);font-weight:var(--mrd-font-weight-medium);color:var(--mrd-input-color);background-color:var(--mrd-color-neutral-50);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);outline:none;cursor:pointer;box-sizing:border-box;appearance:none;text-align:center}.mrd-currency-field__currency.sc-mrd-currency-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-currency-field__currency.sc-mrd-currency-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-currency-field__error.sc-mrd-currency-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}"}},[2,"mrd-currency-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],amountDisplay:[32],currency:[32],error:[32]}]);function m(){"undefined"!=typeof customElements&&["mrd-currency-field"].forEach((r=>{"mrd-currency-field"===r&&(customElements.get(o(r))||customElements.define(o(r),l))}))}export{l as M,m as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as r,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as r,HTMLElement as d,createEvent as e,h as a,Host as t,transformTag as i}from"@stencil/core/internal/client";import{t as o}from"./i18n.js";import{v as s}from"./validation.js";const l=r(class extends d{constructor(r){super(),!1!==r&&this.__registerHost(),this.mrdChange=e(this,"mrdChange",7),this.mrdBlur=e(this,"mrdBlur",7),this.name="",this.label="",this.value="",this.required=!1,this.disabled=!1,this.locale=navigator.language,this.error="",this.handleChange=r=>{const d=r.target.value;this.error=this.required&&!s(d)?o("required",this.locale):"",this.mrdChange.emit({name:this.name,value:d})},this.handleBlur=r=>{this.mrdBlur.emit({name:this.name,value:r.target.value})}}render(){const r=!!this.error;return a(t,{key:"2c0dc2311068a5c759fe8efe58a98a71a9cf4b7b"},a("div",{key:"ee1cc0e9a2943cc42439825b8f21cd3492eaca05",class:"mrd-date-field"},this.label&&a("label",{key:"3f836a991e676b6070a8b3800edfce00cc0d3b3d",class:"mrd-date-field__label"+(this.required?" mrd-date-field__label--required":"")},this.label),a("input",{key:"575185661987eea3dc91950f51995b2cc75debea",class:"mrd-date-field__input"+(r?" mrd-date-field__input--error":""),type:"date",name:this.name,value:this.value,required:this.required,disabled:this.disabled,onChange:this.handleChange,onBlur:this.handleBlur}),r&&a("span",{key:"480ec99200989f3dc543d9afc648d83d31992b3c",class:"mrd-date-field__error"},this.error)))}static get style(){return".sc-mrd-date-field-h{display:block}.mrd-date-field.sc-mrd-date-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-date-field__label.sc-mrd-date-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-date-field__label--required.sc-mrd-date-field::after{content:' *';color:var(--mrd-color-danger)}.mrd-date-field__input.sc-mrd-date-field{display:block;width:100%;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-input-padding-x);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-input-color);background-color:var(--mrd-input-bg);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);transition:border-color var(--mrd-transition), box-shadow var(--mrd-transition);outline:none;appearance:none;box-sizing:border-box;cursor:pointer}.mrd-date-field__input.sc-mrd-date-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-date-field__input.sc-mrd-date-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-date-field__input--error.sc-mrd-date-field{border-color:var(--mrd-border-color-error)}.mrd-date-field__input--error.sc-mrd-date-field:focus{box-shadow:var(--mrd-shadow-focus-error)}.mrd-date-field__error.sc-mrd-date-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}"}},[2,"mrd-date-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32]}]);function n(){"undefined"!=typeof customElements&&["mrd-date-field"].forEach((r=>{"mrd-date-field"===r&&(customElements.get(i(r))||customElements.define(i(r),l))}))}export{l as M,n as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as r,createEvent as t,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as r,createEvent as t,h as d,Host as i,transformTag as a}from"@stencil/core/internal/client";import{t as o}from"./i18n.js";import{v as s}from"./validation.js";const l=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.mrdChange=t(this,"mrdChange",7),this.mrdBlur=t(this,"mrdBlur",7),this.name="",this.label="",this.value="",this.required=!1,this.disabled=!1,this.locale=navigator.language,this.error="",this.localValue="",this.handleChange=e=>{const r=e.target.value;this.localValue=r,this.error=this.required&&!s(r)?o("required",this.locale):"",this.mrdChange.emit({name:this.name,value:this.localToUtc(r)})},this.handleBlur=e=>{this.mrdBlur.emit({name:this.name,value:this.localToUtc(e.target.value)})}}componentWillLoad(){this.localValue=this.utcToLocal(this.value)}valueChanged(e){this.localValue=this.utcToLocal(e)}utcToLocal(e){if(!e)return"";const r=new Date(e);if(isNaN(r.getTime()))return"";const t=e=>String(e).padStart(2,"0");return`${r.getFullYear()}-${t(r.getMonth()+1)}-${t(r.getDate())}T${t(r.getHours())}:${t(r.getMinutes())}`}localToUtc(e){if(!e)return"";const r=new Date(e);return isNaN(r.getTime())?"":r.toISOString().replace(/\.\d{3}Z$/,"Z")}render(){const e=!!this.error;return d(i,{key:"ea8b3b68100ffdb316bc5048f82d85d238bb2e4b"},d("div",{key:"c192c6998ee474aaf4df7b3b97ae0bd61f6d624d",class:"mrd-datetime-field"},this.label&&d("label",{key:"1fbd66c17d76508f0d698a2c258be6779e98d85e",class:"mrd-datetime-field__label"+(this.required?" mrd-datetime-field__label--required":"")},this.label),d("input",{key:"fc9612c062a1cab5076a06598cabf227adce996c",class:"mrd-datetime-field__input"+(e?" mrd-datetime-field__input--error":""),type:"datetime-local",name:this.name,value:this.localValue,required:this.required,disabled:this.disabled,onChange:this.handleChange,onBlur:this.handleBlur}),e&&d("span",{key:"8788ac01739302f6ad61010b238ff38d45e1b68a",class:"mrd-datetime-field__error"},this.error)))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return".sc-mrd-datetime-field-h{display:block}.mrd-datetime-field.sc-mrd-datetime-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-datetime-field__label.sc-mrd-datetime-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-datetime-field__label--required.sc-mrd-datetime-field::after{content:' *';color:var(--mrd-color-danger)}.mrd-datetime-field__input.sc-mrd-datetime-field{display:block;width:100%;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-input-padding-x);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-input-color);background-color:var(--mrd-input-bg);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);transition:border-color var(--mrd-transition), box-shadow var(--mrd-transition);outline:none;appearance:none;box-sizing:border-box;cursor:pointer}.mrd-datetime-field__input.sc-mrd-datetime-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-datetime-field__input.sc-mrd-datetime-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-datetime-field__input--error.sc-mrd-datetime-field{border-color:var(--mrd-border-color-error)}.mrd-datetime-field__input--error.sc-mrd-datetime-field:focus{box-shadow:var(--mrd-shadow-focus-error)}.mrd-datetime-field__error.sc-mrd-datetime-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}"}},[2,"mrd-datetime-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32],localValue:[32]},void 0,{value:[{valueChanged:0}]}]);function m(){"undefined"!=typeof customElements&&["mrd-datetime-field"].forEach((e=>{"mrd-datetime-field"===e&&(customElements.get(a(e))||customElements.define(a(e),l))}))}export{l as M,m as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface MrdDocumentContainer extends Components.MrdDocumentContainer, HTMLElement {}
|
|
4
|
+
export const MrdDocumentContainer: {
|
|
5
|
+
prototype: MrdDocumentContainer;
|
|
6
|
+
new (): MrdDocumentContainer;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as o,d as r}from"./mrd-document-container2.js";const t=o,m=r;export{t as MrdDocumentContainer,m as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as r,HTMLElement as t,createEvent as e,h as o,Host as i,transformTag as n}from"@stencil/core/internal/client";import{t as d}from"./i18n.js";import{d as a}from"./mrd-document-list2.js";import{d as s}from"./mrd-table2.js";const c=r(class extends t{constructor(r){super(),!1!==r&&this.__registerHost(),this.mrdLoadPage=e(this,"mrdLoadPage",7),this.mrdLoadDistinct=e(this,"mrdLoadDistinct",7),this.mrdLoadAggregations=e(this,"mrdLoadAggregations",7),this.mrdNavigate=e(this,"mrdNavigate",7),this.mrdAction=e(this,"mrdAction",7),this.mrdUpdateObject=e(this,"mrdUpdateObject",7),this.mrdUpload=e(this,"mrdUpload",7),this.mrdCreateObject=e(this,"mrdCreateObject",7),this.item=null,this.parentId="",this.viewKey="",this.locale=navigator.language,this.mode="tree",this.canCreate=!1,this.tableInited=!1,this.createFolder=()=>{var r,t;null===(t=null===(r=this.listEl)||void 0===r?void 0:r.createFolder)||void 0===t||t.call(r)}}componentDidRender(){var r;if("list"===this.mode&&this.tableEl&&!this.tableInited){this.tableInited=!0;const t=this.tableEl;Promise.resolve(null===(r=t.componentOnReady)||void 0===r?void 0:r.call(t)).then((()=>{var r;return null===(r=t.init)||void 0===r?void 0:r.call(t)}))}}setMode(r){r!==this.mode&&(this.canCreate=!1,this.tableInited=!1,this.mode=r)}renderToolbar(){return o("div",{class:"mrd-document-container__toolbar"},"tree"===this.mode&&o("button",{type:"button",class:"mrd-document-container__action",disabled:!this.canCreate,onClick:this.createFolder},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},o("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),o("path",{d:"M12 11v4M10 13h4"})),d("new_folder",this.locale)),o("div",{class:"mrd-document-container__seg",role:"group","aria-label":d("doc_view_switch",this.locale)},o("button",{class:"mrd-document-container__seg-btn","aria-pressed":String("tree"===this.mode),title:d("doc_view_tree",this.locale),"aria-label":d("doc_view_tree",this.locale),onClick:()=>this.setMode("tree")},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},o("path",{d:"M3 5h6M3 12h9M3 19h6"}),o("circle",{cx:"18",cy:"5",r:"1.6"}),o("circle",{cx:"18",cy:"19",r:"1.6"}),o("path",{d:"M16 12h4"}))),o("button",{class:"mrd-document-container__seg-btn","aria-pressed":String("list"===this.mode),title:d("doc_view_list",this.locale),"aria-label":d("doc_view_list",this.locale),onClick:()=>this.setMode("list")},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},o("path",{d:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"})))))}renderTree(){return o("mrd-document-list",{"data-doclist":this.viewKey,ref:r=>this.listEl=r,item:this.item,archetype:this.archetype,parentId:this.parentId,locale:this.locale,onMrdLoadDistinct:r=>{r.stopPropagation(),this.mrdLoadDistinct.emit(r.detail)},onMrdLoadPage:r=>{r.stopPropagation(),this.mrdLoadPage.emit(r.detail)},onMrdNavigate:r=>{r.stopPropagation(),this.mrdNavigate.emit(r.detail)},onMrdCanCreate:r=>{r.stopPropagation(),this.canCreate=r.detail},onMrdUpdateObject:r=>{r.stopPropagation(),this.mrdUpdateObject.emit(r.detail)},onMrdUpload:r=>{r.stopPropagation(),this.mrdUpload.emit(r.detail)},onMrdCreateObject:r=>{r.stopPropagation(),this.mrdCreateObject.emit(r.detail)}})}renderList(){return o("mrd-table",{"data-view":this.viewKey,ref:r=>this.tableEl=r,item:this.item,parentId:this.parentId,locale:this.locale,onMrdLoadPage:r=>{r.stopPropagation(),this.mrdLoadPage.emit(r.detail)},onMrdLoadAggregations:r=>{r.stopPropagation(),this.mrdLoadAggregations.emit(r.detail)},onMrdRowClick:r=>{var t,e,o;r.stopPropagation();const i=r.detail;this.mrdNavigate.emit({href:null===(e=null===(t=null==i?void 0:i._links)||void 0===t?void 0:t.self)||void 0===e?void 0:e.href,label:null!==(o=null==i?void 0:i.name)&&void 0!==o?o:""})},onMrdAction:r=>{r.stopPropagation(),this.mrdAction.emit(r.detail)}})}render(){return o(i,{key:"a5393d484bdc202b57c6d32d9ce917e760aff95a"},this.renderToolbar(),o("div",{key:"52f82de8f7734e13f34d323e3e831e6de5676f46",class:"mrd-document-container__body"},"tree"===this.mode?this.renderTree():this.renderList()))}get el(){return this}static get style(){return".sc-mrd-document-container-h{display:block}.mrd-document-container__toolbar.sc-mrd-document-container{display:flex;align-items:center;justify-content:flex-end;gap:var(--mrd-space-2);padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:1px solid var(--mrd-color-neutral-100)}.mrd-document-container__action.sc-mrd-document-container{display:inline-flex;align-items:center;gap:var(--mrd-space-2);height:1.625rem;padding:0 var(--mrd-space-3);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-700);background:var(--mrd-color-white);border:1px solid var(--mrd-color-neutral-200);border-radius:var(--mrd-border-radius);cursor:pointer;transition:background var(--mrd-transition-fast), border-color var(--mrd-transition-fast)}.mrd-document-container__action.sc-mrd-document-container svg.sc-mrd-document-container{width:1rem;height:1rem;color:#d9a441}.mrd-document-container__action.sc-mrd-document-container:hover:not(:disabled){background:var(--mrd-color-neutral-50);border-color:var(--mrd-color-neutral-300)}.mrd-document-container__action.sc-mrd-document-container:disabled{opacity:0.5;cursor:not-allowed}.mrd-document-container__seg.sc-mrd-document-container{display:inline-flex;gap:2px;padding:2px;background:var(--mrd-color-neutral-100);border-radius:var(--mrd-border-radius)}.mrd-document-container__seg-btn.sc-mrd-document-container{width:1.875rem;height:1.625rem;display:grid;place-items:center;border:none;background:none;border-radius:var(--mrd-border-radius-sm);color:var(--mrd-color-neutral-500);cursor:pointer;transition:color var(--mrd-transition-fast), background var(--mrd-transition-fast)}.mrd-document-container__seg-btn.sc-mrd-document-container:hover{color:var(--mrd-color-neutral-800)}.mrd-document-container__seg-btn[aria-pressed='true'].sc-mrd-document-container{background:var(--mrd-color-white);color:var(--mrd-color-primary-dark);box-shadow:var(--mrd-shadow-sm)}.mrd-document-container__seg-btn.sc-mrd-document-container svg.sc-mrd-document-container{width:1rem;height:1rem}"}},[2,"mrd-document-container",{item:[16],archetype:[16],parentId:[1,"parent-id"],viewKey:[1,"view-key"],locale:[1],mode:[32],canCreate:[32]}]);function m(){"undefined"!=typeof customElements&&["mrd-document-container","mrd-document-list","mrd-table"].forEach((r=>{switch(r){case"mrd-document-container":customElements.get(n(r))||customElements.define(n(r),c);break;case"mrd-document-list":customElements.get(n(r))||a();break;case"mrd-table":customElements.get(n(r))||s()}}))}export{c as M,m as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface MrdDocumentList extends Components.MrdDocumentList, HTMLElement {}
|
|
4
|
+
export const MrdDocumentList: {
|
|
5
|
+
prototype: MrdDocumentList;
|
|
6
|
+
new (): MrdDocumentList;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as o,d as s}from"./mrd-document-list2.js";const t=o,m=s;export{t as MrdDocumentList,m as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,createEvent as s,h as r,Host as o,transformTag as e}from"@stencil/core/internal/client";import{a as n}from"./client-layout.js";import{t as d}from"./i18n.js";import{f as l}from"./format.js";const c=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.mrdLoadDistinct=s(this,"mrdLoadDistinct",7),this.mrdLoadPage=s(this,"mrdLoadPage",7),this.mrdNavigate=s(this,"mrdNavigate",7),this.mrdCanCreate=s(this,"mrdCanCreate",7),this.mrdUpdateObject=s(this,"mrdUpdateObject",7),this.mrdUpload=s(this,"mrdUpload",7),this.mrdCreateObject=s(this,"mrdCreateObject",7),this.item=null,this.parentId="",this.locale=navigator.language,this.containers=[],this.rootLoading=!0,this.singleContainer=!1,this.selectedId=null,this.dropTargetId=null,this.uploadingNodeId=null,this.nodeIndex=new Map,this.pendingNode=null,this.pendingParent=null,this.pendingContainer=null,this.pendingName="",this.pendingInputEl=null,this.pendingNeedsFocus=!1,this.newFolderSeq=0,this.lastCanCreate=!1,this.dragDoc=null,this.dragFromId=null,this.pendingUpload=null,this.lastOptimisticDoc=null,this.startCreateFolder=()=>{const t=this.resolveTarget();if(!t||this.pendingNode)return;const{target:i,container:s}=t,r=`${s.id}/__new__${this.newFolderSeq++}`,o=this.makeFolderNode(r,"",s.id);o.pending=!0,o.editing=!0,i.children=[...i.children,o],i.open=!0,this.nodeIndex.set(o.id,o),this.pendingNode=o,this.pendingParent=i,this.pendingContainer=s,this.pendingName="",this.pendingNeedsFocus=!0,this.bump()},this.onPendingInput=t=>{var i;this.pendingName=t.target.value,(null===(i=this.pendingNode)||void 0===i?void 0:i.error)&&(this.pendingNode.error=void 0,this.bump())},this.onPendingKeyDown=t=>{"Enter"===t.key?(t.preventDefault(),this.commitFolder()):"Escape"===t.key&&(t.preventDefault(),this.cancelFolder())},this.onDocDragStart=(t,i,s)=>{var r,o,e;this.dragDoc=i,this.dragFromId=s.id,t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",null!==(e=null===(o=null===(r=null==i?void 0:i._links)||void 0===r?void 0:r.self)||void 0===o?void 0:o.href)&&void 0!==e?e:""))},this.onDocDragEnd=()=>{this.dragDoc=null,this.dragFromId=null,null!==this.dropTargetId&&(this.dropTargetId=null)},this.onNodeDragOver=(t,i)=>{const s=this.isFileDrag(t);if(!this.dragDoc&&!s)return;t.preventDefault(),t.stopPropagation(),t.dataTransfer&&(t.dataTransfer.dropEffect=s?"copy":"move");const r=s||i.id!==this.dragFromId?i.id:null;this.dropTargetId!==r&&(this.dropTargetId=r)},this.onNodeDragLeave=t=>{this.dropTargetId===t.id&&(this.dropTargetId=null)},this.onNodeDrop=(t,i,s)=>{if(this.isFileDrag(t))return t.preventDefault(),t.stopPropagation(),void this.startFileUpload(t,i,s);this.dragDoc&&(t.preventDefault(),t.stopPropagation(),this.moveDocument(i,s),this.onDocDragEnd())},this.onRootDragOver=t=>{if(!this.singleContainer)return;const i=this.isFileDrag(t);(this.dragDoc||i)&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=i?"copy":"move"))},this.onRootDrop=t=>{if(!this.singleContainer)return;const i=this.containers[0];if(this.isFileDrag(t))return t.preventDefault(),void this.startFileUpload(t,i,i);this.dragDoc&&(t.preventDefault(),this.moveDocument(i,i),this.onDocDragEnd())}}componentDidLoad(){this.emitContainerDistinct()}componentDidRender(){this.pendingNeedsFocus&&this.pendingInputEl&&(this.pendingInputEl.focus(),this.pendingInputEl.select(),this.pendingNeedsFocus=!1);const t=this.canCreateFolder;t!==this.lastCanCreate&&(this.lastCanCreate=t,this.mrdCanCreate.emit(t))}get containerField(){var t,i,s;return null!==(s=null===(i=null===(t=this.archetype)||void 0===t?void 0:t.slots)||void 0===i?void 0:i.container)&&void 0!==s?s:"container"}get folderField(){var t,i,s;return null!==(s=null===(i=null===(t=this.archetype)||void 0===t?void 0:t.slots)||void 0===i?void 0:i.folder)&&void 0!==s?s:"folder"}get titleField(){var t,i,s;return null!==(s=null===(i=null===(t=this.archetype)||void 0===t?void 0:t.slots)||void 0===i?void 0:i.title)&&void 0!==s?s:"name"}get fileField(){var t,i,s;return null!==(s=null===(i=null===(t=this.archetype)||void 0===t?void 0:t.slots)||void 0===i?void 0:i.file)&&void 0!==s?s:"file"}get dateField(){var t,i;return null===(i=null===(t=this.archetype)||void 0===t?void 0:t.slots)||void 0===i?void 0:i.date}buildDataPath(){var t,i,s;const r=this.item,o=null!==(i=null!==(t=null==r?void 0:r.dataClass)&&void 0!==t?t:null==r?void 0:r.relatedClass)&&void 0!==i?i:"";return(null==r?void 0:r.type)===n.RELATED_VIEW?`/${null!==(s=r.fromClass)&&void 0!==s?s:""}/${this.parentId}/${o}`:`/${o}`}baseParams(){var t,i,s,r,o,e,n;const d=new URLSearchParams,l=null===(t=this.item)||void 0===t?void 0:t.filterClass;l&&d.set("type",l);for(const t of null!==(r=null===(s=null===(i=this.item)||void 0===i?void 0:i.view)||void 0===s?void 0:s.filter)&&void 0!==r?r:[])t.name&&("EMPTY"!==t.operator?"NOT_EMPTY"!==t.operator?"STARTS_WITH"!==t.operator?"FROM"!==t.operator?"TO"!==t.operator?null!=t.value&&d.set(t.name,String(t.value)):d.set(t.name+"_to",String(null!==(n=t.value)&&void 0!==n?n:"")):d.set(t.name+"_from",String(null!==(e=t.value)&&void 0!==e?e:"")):d.set(t.name+"_startswith",String(null!==(o=t.value)&&void 0!==o?o:"")):d.set(t.name+"_notempty","true"):d.set(t.name,""));return d}emitContainerDistinct(){const i=this.baseParams();i.set("distinct",this.containerField),this.mrdLoadDistinct.emit({nodeId:t.ROOT,distinct:this.containerField,path:this.buildDataPath()+"/distinct",qs:i.toString()})}emitFolderDistinct(t){var i;const s=this.baseParams();s.set("distinct",this.folderField),s.set(this.containerField+"_href",null!==(i=t.href)&&void 0!==i?i:""),t.loading=!0,this.mrdLoadDistinct.emit({nodeId:t.id,distinct:this.folderField,path:this.buildDataPath()+"/distinct",qs:s.toString()})}emitDocuments(t,i){var s,r;const o=this.baseParams();o.set(this.containerField+"_href",null!==(s=t.href)&&void 0!==s?s:""),o.set(this.folderField,null!==(r=i.fullPath)&&void 0!==r?r:""),i.loading=!0,this.mrdLoadPage.emit({nodeId:i.id,page:0,sort:"",path:this.buildDataPath(),qs:o.toString()})}async setDistinct(i,s){i===t.ROOT?this.applyContainers(s):this.applyFolders(i,s)}async setDocuments(t,i){const s=this.nodeIndex.get(t);s&&(s.docs=null!=i?i:[],s.docsLoaded=!0,s.loading=!1,this.bump())}applyContainers(t){const i=[];for(const s of t){if(!s.value||"object"!=typeof s.value)continue;const t=this.makeContainerNode(s.value.href,s.value.name,s.count);i.push(t),this.nodeIndex.set(t.id,t)}if(this.containers=i,this.rootLoading=!1,this.singleContainer=1===i.length,this.singleContainer){const t=i[0];t.open=!0,this.emitFolderDistinct(t)}}applyFolders(t,i){const s=this.nodeIndex.get(t);if(s){s.children=[],s.hasDocs=!1,s.docCount=0;for(const t of i){const i="string"==typeof t.value?t.value:null==t.value?"":String(t.value),r=this.splitFolder(i);if(0===r.length){s.hasDocs=!0,s.docCount=t.count,s.fullPath=i;continue}let o=s;const e=[];for(const t of r){e.push(t);let i=o.children.find((i=>i.label===t));i||(i=this.makeFolderNode(s.id+"/"+e.join("/"),t,s.id),o.children.push(i),this.nodeIndex.set(i.id,i)),o=i}o.hasDocs=!0,o.docCount=t.count,o.fullPath=i}this.computeTotals(s),s.foldersLoaded=!0,s.loading=!1,s.hasDocs&&!s.docsLoaded&&this.emitDocuments(s,s),this.bump()}}splitFolder(t){if(null==t)return[];const i=String(t).trim();return""===i||"/"===i?[]:i.split("/").map((t=>t.trim())).filter(Boolean)}makeContainerNode(t,i,s){return{id:"c:"+t,kind:"container",label:i,href:t,hasDocs:!1,docCount:0,totalCount:s,children:[],open:!1,loading:!1,foldersLoaded:!1,docsLoaded:!1,docs:[]}}makeFolderNode(t,i,s){return{id:t,kind:"folder",label:i,containerId:s,hasDocs:!1,docCount:0,totalCount:0,children:[],open:!1,loading:!1,foldersLoaded:!1,docsLoaded:!1,docs:[]}}computeTotals(t){let i=t.docCount;for(const s of t.children)i+=this.computeTotals(s);return t.totalCount=i,i}bump(){this.containers=[...this.containers]}toggleContainer(t){this.selectedId=t.id,t.open=!t.open,!t.open||t.foldersLoaded||t.loading||this.emitFolderDistinct(t),this.bump()}toggleFolder(t,i){this.selectedId=i.id,i.open=!i.open,i.open&&i.hasDocs&&!i.docsLoaded&&!i.loading&&this.emitDocuments(t,i),this.bump()}resolveTarget(){if(this.selectedId){const t=this.nodeIndex.get(this.selectedId);if(t&&"container"===t.kind)return{target:t,container:t};if(t&&"folder"===t.kind){const i=t.containerId?this.nodeIndex.get(t.containerId):void 0;if(i)return{target:t,container:i}}}if(this.singleContainer&&this.containers[0]){const t=this.containers[0];return{target:t,container:t}}return null}get canCreateFolder(){return!this.pendingNode&&null!==this.resolveTarget()}async createFolder(){this.startCreateFolder()}segmentsOf(t,i){if("container"===t.kind)return[];const s=i.id+"/",r=t.id.startsWith(s)?t.id.slice(s.length):"";return r?r.split("/"):[]}commitFolder(){const t=this.pendingNode,i=this.pendingParent,s=this.pendingContainer;if(!t||!i||!s)return;const r=this.pendingName.trim();if(!r)return void this.cancelFolder();if(r.includes("/"))return t.error=d("folder_no_slash",this.locale),void this.bump();if(i.children.some((i=>i!==t&&i.label.toLowerCase()===r.toLowerCase())))return t.error=d("folder_duplicate",this.locale),void this.bump();const o=[...this.segmentsOf(i,s),r];this.nodeIndex.delete(t.id),t.id=s.id+"/"+o.join("/"),t.fullPath="/"+o.join("/"),t.label=r,t.editing=!1,t.error=void 0,t.open=!0,this.nodeIndex.set(t.id,t),this.selectedId=t.id,this.clearPending(),this.bump()}cancelFolder(){const t=this.pendingNode,i=this.pendingParent;t&&i&&(i.children=i.children.filter((i=>i!==t)),this.nodeIndex.delete(t.id)),this.clearPending(),this.bump()}clearPending(){this.pendingNode=null,this.pendingParent=null,this.pendingContainer=null,this.pendingName="",this.pendingInputEl=null,this.pendingNeedsFocus=!1}isFileDrag(t){return!this.dragDoc&&!!t.dataTransfer&&Array.from(t.dataTransfer.types).includes("Files")}startFileUpload(t,i,s){var r,o;const e=null===(o=null===(r=t.dataTransfer)||void 0===r?void 0:r.files)||void 0===o?void 0:o[0];this.dropTargetId=null,e&&(this.pendingUpload={file:e,node:i,container:s},i.open=!0,this.uploadingNodeId=i.id,this.bump(),this.mrdUpload.emit({file:e}))}stripExtension(t){return t.replace(/\.[^./\\]+$/,"")}async setFileReference(t){const i=this.pendingUpload;if(!i)return;const{file:s,node:r,container:o}=i,e=this.folderStringOf(r,o),n={[this.fileField]:t,[this.titleField]:this.stripExtension(s.name),[this.folderField]:e,[this.containerField]:o.href};this.mrdCreateObject.emit({path:this.buildDataPath(),values:n});const d={[this.titleField]:this.stripExtension(s.name),_optimistic:!0},l=!r.docsLoaded&&0===r.docCount;r.hasDocs=!0,r.pending=!1,r.docCount+=1,l?(r.docsLoaded=!0,r.docs=[d]):r.docsLoaded&&(r.docs=[...r.docs,d]),this.recomputeContainerTotals(o,1),this.lastOptimisticDoc=d,this.pendingUpload=null,this.uploadingNodeId=null,this.bump()}async setCreatedHref(t){var i;const s=this.lastOptimisticDoc;s&&t&&(s._links=Object.assign(Object.assign({},null!==(i=s._links)&&void 0!==i?i:{}),{self:{href:t}}),s._optimistic=!1,this.lastOptimisticDoc=null,this.bump())}folderStringOf(t,i){if("container"===t.kind)return null;if(null!=t.fullPath&&""!==t.fullPath)return t.fullPath;const s=this.segmentsOf(t,i);return s.length?"/"+s.join("/"):null}moveDocument(t,i){var s,r;const o=this.dragDoc,e=this.dragFromId?this.nodeIndex.get(this.dragFromId):void 0;if(!o||!e)return;const n="container"===e.kind?e:e.containerId?this.nodeIndex.get(e.containerId):void 0;if(!n)return;const d=this.folderStringOf(t,i),l=this.folderStringOf(e,n),c=i===n;if(t===e||c&&d===l)return;e.docs=e.docs.filter((t=>t!==o)),e.docCount=Math.max(0,e.docCount-1),e.docsLoaded&&(e.hasDocs=e.docs.length>0),t.hasDocs=!0,t.pending=!1,t.docCount+=1,"folder"===t.kind&&(t.fullPath=null!=d?d:""),t.docsLoaded&&(t.docs=[...t.docs,o]),this.recomputeContainerTotals(n,-1),c||this.recomputeContainerTotals(i,1);const a=null===(r=null===(s=null==o?void 0:o._links)||void 0===s?void 0:s.self)||void 0===r?void 0:r.href;if(a){const t={[this.folderField]:d};c||(t[this.containerField]=i.href),this.mrdUpdateObject.emit({href:a,values:t})}this.bump()}recomputeContainerTotals(t,i){t.foldersLoaded?this.computeTotals(t):t.totalCount=Math.max(0,t.totalCount+i)}openDoc(t){var i,s,r,o;const e=null===(s=null===(i=null==t?void 0:t._links)||void 0===i?void 0:i.self)||void 0===s?void 0:s.href,n=null!==(o=null!==(r=null==t?void 0:t[this.titleField])&&void 0!==r?r:null==t?void 0:t.name)&&void 0!==o?o:"";this.mrdNavigate.emit({href:e,label:n})}renderChevron(t,i){return r("span",{class:`mrd-document-list__chev${i?" mrd-document-list__chev--leaf":""}${t?" mrd-document-list__chev--open":""}`},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M9 6l6 6-6 6"})))}renderDossierIcon(){return r("svg",{class:"mrd-document-list__icon mrd-document-list__icon--dossier",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}))}renderFolderIcon(){return r("svg",{class:"mrd-document-list__icon mrd-document-list__icon--folder",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}))}renderDocIcon(){return r("svg",{class:"mrd-document-list__icon mrd-document-list__icon--doc",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),r("path",{d:"M14 2v6h6"}))}indent(t){return r("span",{class:"mrd-document-list__indent",style:{width:18*t+"px"}})}renderDocRow(t,i,s,o){var e,n,d,c,a;const h=null!==(n=null!==(e=null==t?void 0:t[this.titleField])&&void 0!==e?e:null==t?void 0:t.name)&&void 0!==n?n:"",m=this.dateField?null==t?void 0:t[this.dateField]:void 0,u=m?l(m,this.locale):"";return r("div",{class:"mrd-document-list__row mrd-document-list__row--doc",key:null!==(a=null===(c=null===(d=null==t?void 0:t._links)||void 0===d?void 0:d.self)||void 0===c?void 0:c.href)&&void 0!==a?a:h,draggable:!0,onClick:()=>this.openDoc(t),onDragStart:s=>this.onDocDragStart(s,t,i),onDragEnd:this.onDocDragEnd,onDragOver:t=>this.onNodeDragOver(t,i),onDragLeave:()=>this.onNodeDragLeave(i),onDrop:t=>this.onNodeDrop(t,i,s)},this.indent(o),this.renderChevron(!1,!0),this.renderDocIcon(),r("span",{class:"mrd-document-list__label"},h),u&&r("span",{class:"mrd-document-list__date"},u))}renderLoadingRow(t){return r("div",{class:"mrd-document-list__loading",key:"loading"},this.indent(t),r("span",{class:"mrd-document-list__spinner"}),d("loading",this.locale))}renderChildren(t,i,s){const r=[];if(i.hasDocs)if(i.docsLoaded)for(const o of i.docs)r.push(this.renderDocRow(o,i,t,s));else i.loading&&r.push(this.renderLoadingRow(s));for(const o of i.children)r.push(this.renderFolderNode(t,o,s));return i.id===this.uploadingNodeId&&r.push(this.renderUploadingRow(s)),r}renderUploadingRow(t){return r("div",{class:"mrd-document-list__loading",key:"uploading"},this.indent(t),r("span",{class:"mrd-document-list__spinner"}),d("upload_file",this.locale))}renderFolderEditRow(t,i){return r("div",{class:"mrd-document-list__node",key:t.id},r("div",{class:"mrd-document-list__row mrd-document-list__row--edit"},this.indent(i),this.renderChevron(!1,!0),this.renderFolderIcon(),r("input",{class:"mrd-document-list__name-input",type:"text",placeholder:d("folder_name_placeholder",this.locale),ref:t=>this.pendingInputEl=t,onInput:this.onPendingInput,onKeyDown:this.onPendingKeyDown,onBlur:()=>this.cancelFolder()})),t.error&&r("div",{class:"mrd-document-list__error",style:{paddingLeft:18*i+52+"px"}},t.error))}renderFolderNode(t,i,s){if(i.editing)return this.renderFolderEditRow(i,s);const o=0===i.children.length&&!i.hasDocs;return r("div",{class:"mrd-document-list__node",key:i.id},r("div",{class:"mrd-document-list__row"+(i.id===this.selectedId?" mrd-document-list__row--selected":"")+(i.pending?" mrd-document-list__row--pending":"")+(i.id===this.dropTargetId?" mrd-document-list__row--drop":""),onClick:()=>this.toggleFolder(t,i),onDragOver:t=>this.onNodeDragOver(t,i),onDragLeave:()=>this.onNodeDragLeave(i),onDrop:s=>this.onNodeDrop(s,i,t)},this.indent(s),this.renderChevron(i.open,o),this.renderFolderIcon(),r("span",{class:"mrd-document-list__label"},i.label),r("span",{class:"mrd-document-list__count"},i.totalCount)),i.open&&r("div",{class:"mrd-document-list__kids"},this.renderChildren(t,i,s+1)))}renderContainerNode(t,i){return r("div",{class:"mrd-document-list__node",key:t.id},r("div",{class:"mrd-document-list__row mrd-document-list__row--dossier"+(t.id===this.selectedId?" mrd-document-list__row--selected":"")+(t.id===this.dropTargetId?" mrd-document-list__row--drop":""),onClick:()=>this.toggleContainer(t),onDragOver:i=>this.onNodeDragOver(i,t),onDragLeave:()=>this.onNodeDragLeave(t),onDrop:i=>this.onNodeDrop(i,t,t)},this.indent(i),this.renderChevron(t.open,!1),this.renderDossierIcon(),r("span",{class:"mrd-document-list__label"},t.label),r("span",{class:"mrd-document-list__count"},t.totalCount)),t.open&&r("div",{class:"mrd-document-list__kids"},t.loading&&!t.foldersLoaded?this.renderLoadingRow(i+1):this.renderChildren(t,t,i+1)))}render(){let t;if(this.rootLoading)t=this.renderLoadingRow(0);else if(0===this.containers.length)t=r("div",{key:"b8c3297cd7cff5bf79ce694d2ee1a64c570df5ce",class:"mrd-document-list__empty"},d("no_results",this.locale));else if(this.singleContainer){const i=this.containers[0];t=i.loading&&!i.foldersLoaded?this.renderLoadingRow(0):this.renderChildren(i,i,0)}else t=this.containers.map((t=>this.renderContainerNode(t,0)));return r(o,{key:"ff3b024a79ba2270aa28861923bc6406f98061aa"},r("div",{key:"9db121e5336a4e3c82443257f6424db5ab4f0baf",class:"mrd-document-list",onDragOver:this.onRootDragOver,onDrop:this.onRootDrop},t))}get el(){return this}static get style(){return".sc-mrd-document-list-h{display:block}.mrd-document-list.sc-mrd-document-list{padding:var(--mrd-space-2) 0}.mrd-document-list__row.sc-mrd-document-list{display:flex;align-items:center;gap:var(--mrd-space-2);height:2.125rem;padding:0 var(--mrd-space-4);cursor:pointer;user-select:none;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-document-list__row.sc-mrd-document-list:hover{background:var(--mrd-color-neutral-50)}.mrd-document-list__row--selected.sc-mrd-document-list{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--selected.sc-mrd-document-list:hover{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--pending.sc-mrd-document-list .mrd-document-list__label.sc-mrd-document-list{font-style:italic;color:var(--mrd-color-neutral-500)}.mrd-document-list__row--doc.sc-mrd-document-list{cursor:grab}.mrd-document-list__row--doc.sc-mrd-document-list:active{cursor:grabbing}.mrd-document-list__row--drop.sc-mrd-document-list{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1));box-shadow:inset 0 0 0 1px var(--mrd-color-primary)}.mrd-document-list__row--drop.sc-mrd-document-list:hover{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--edit.sc-mrd-document-list{cursor:default}.mrd-document-list__name-input.sc-mrd-document-list{flex:1;min-width:0;height:1.625rem;padding:0 var(--mrd-space-2);font-size:var(--mrd-font-size-sm);font-family:inherit;color:var(--mrd-color-neutral-800);border:1px solid var(--mrd-color-primary);border-radius:var(--mrd-border-radius);outline:none;box-shadow:var(--mrd-shadow-focus)}.mrd-document-list__error.sc-mrd-document-list{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-danger, #dc2626);padding-top:0.125rem;padding-bottom:0.25rem}.mrd-document-list__row--dossier.sc-mrd-document-list .mrd-document-list__label.sc-mrd-document-list{font-weight:var(--mrd-font-weight-semibold)}.mrd-document-list__indent.sc-mrd-document-list{flex:none}.mrd-document-list__chev.sc-mrd-document-list{width:1rem;height:1rem;flex:none;display:grid;place-items:center;color:var(--mrd-color-neutral-400);transition:transform var(--mrd-transition-fast)}.mrd-document-list__chev.sc-mrd-document-list svg.sc-mrd-document-list{width:0.6875rem;height:0.6875rem}.mrd-document-list__chev--open.sc-mrd-document-list{transform:rotate(90deg)}.mrd-document-list__chev--leaf.sc-mrd-document-list{visibility:hidden}.mrd-document-list__icon.sc-mrd-document-list{width:1.0625rem;height:1.0625rem;flex:none}.mrd-document-list__icon--dossier.sc-mrd-document-list{color:var(--mrd-color-primary)}.mrd-document-list__icon--folder.sc-mrd-document-list{color:#d9a441}.mrd-document-list__icon--doc.sc-mrd-document-list{color:var(--mrd-color-neutral-400)}.mrd-document-list__label.sc-mrd-document-list{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mrd-document-list__count.sc-mrd-document-list{flex:none;font-family:var(--mrd-font-family-mono);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);background:var(--mrd-color-neutral-100);border-radius:var(--mrd-border-radius-full);padding:0.0625rem 0.5rem}.mrd-document-list__date.sc-mrd-document-list{flex:none;font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-400);font-variant-numeric:tabular-nums}.mrd-document-list__loading.sc-mrd-document-list{display:flex;align-items:center;gap:var(--mrd-space-2);height:1.875rem;padding:0 var(--mrd-space-4);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-400)}.mrd-document-list__spinner.sc-mrd-document-list{width:0.75rem;height:0.75rem;border:2px solid var(--mrd-color-neutral-300);border-top-color:var(--mrd-color-primary);border-radius:50%;animation:mrd-document-list-spin 0.7s linear infinite}@keyframes mrd-document-list-spin{to{transform:rotate(360deg)}}.mrd-document-list__empty.sc-mrd-document-list{padding:var(--mrd-space-8) var(--mrd-space-4);text-align:center;color:var(--mrd-color-neutral-400);font-size:var(--mrd-font-size-sm)}"}},[2,"mrd-document-list",{item:[16],archetype:[16],parentId:[1,"parent-id"],locale:[1],containers:[32],rootLoading:[32],singleContainer:[32],selectedId:[32],dropTargetId:[32],uploadingNodeId:[32],setDistinct:[64],setDocuments:[64],createFolder:[64],setFileReference:[64],setCreatedHref:[64]}]);function a(){"undefined"!=typeof customElements&&["mrd-document-list"].forEach((t=>{"mrd-document-list"===t&&(customElements.get(e(t))||customElements.define(e(t),c))}))}c.ROOT="__root__";export{c as M,a as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface MrdDocumentView extends Components.MrdDocumentView, HTMLElement {}
|
|
4
|
+
export const MrdDocumentView: {
|
|
5
|
+
prototype: MrdDocumentView;
|
|
6
|
+
new (): MrdDocumentView;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as o,d as m}from"./mrd-document-view2.js";const r=o,s=m;export{r as MrdDocumentView,s as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as r,HTMLElement as e,createEvent as d,h as o,Host as i,transformTag as t}from"@stencil/core/internal/client";import{t as m}from"./i18n.js";import{f as n}from"./format.js";const a=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.mrdNavigate=d(this,"mrdNavigate",7),this.mrdDownload=d(this,"mrdDownload",7),this.data={},this.locale=navigator.language}slotValue(r){var e,d;const o=null===(d=null===(e=this.archetype)||void 0===e?void 0:e.slots)||void 0===d?void 0:d[r];if(o)return this.data[o]}slotLink(r){var e,d,o,i;const t=null===(d=null===(e=this.archetype)||void 0===e?void 0:e.slots)||void 0===d?void 0:d[r];if(t)return(null!==(i=null===(o=this.data)||void 0===o?void 0:o._links)&&void 0!==i?i:{})[t]}renderContainer(){const r=this.slotLink("container");return(null==r?void 0:r.href)&&r.name?o("button",{class:"mrd-document-view__crumb",onClick:()=>this.mrdNavigate.emit({href:r.href,label:r.name})},o("svg",{class:"mrd-document-view__crumb-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},o("path",{d:"M19 12H5M12 19l-7-7 7-7"})),r.name):null}renderFile(){var r,e;const d=this.slotValue("file");if(!d)return null;const i=null!==(r=null==d?void 0:d.href)&&void 0!==r?r:"",t=null!==(e=null==d?void 0:d.fileName)&&void 0!==e?e:String(d);return o("div",{class:"mrd-document-view__file"},o("div",{class:"mrd-document-view__file-preview","aria-hidden":"true"},o("svg",{viewBox:"0 0 24 24",fill:"currentColor"},o("path",{d:"M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6H6zm7 1.5L18.5 9H13V3.5z"}))),o("div",{class:"mrd-document-view__file-meta"},o("span",{class:"mrd-document-view__file-name"},t)),i&&o("button",{class:"mrd-document-view__download",onClick:()=>this.mrdDownload.emit({href:i,fileName:t})},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},o("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M4 21h16"})),m("download",this.locale)))}render(){const r=this.slotValue("title"),e=null!=r&&""!==r?String(r):null,d=this.slotValue("date"),t=null!=d&&""!==d?n(d,this.locale):null,m=this.slotValue("summary"),a=null!=m&&""!==m?String(m):null;return o(i,{key:"0a2071925ecdb21738376d66fa4babf4590e694c"},o("div",{key:"a2d29c0b6e211cab142adc780466bc885a602e96",class:"mrd-document-view"},this.renderContainer(),e&&o("h1",{key:"7f5ac202c21bc8a70f0dd15e2e1fa06e651b5bce",class:"mrd-document-view__title"},e),t&&o("p",{key:"b1dce94d5fd8bfd5e078644f631a38f91b87e7ff",class:"mrd-document-view__date"},t),this.renderFile(),a&&o("div",{key:"588b9ca40a49ae9ea303852620bde75333b440ab",class:"mrd-document-view__summary"},o("div",{key:"d3b8adb85ac346b72451e789c10aedd539c966de",class:"mrd-document-view__summary-body",innerHTML:a}))))}static get style(){return".sc-mrd-document-view-h{display:block}.mrd-document-view.sc-mrd-document-view{max-width:720px}.mrd-document-view__crumb.sc-mrd-document-view{display:inline-flex;align-items:center;gap:var(--mrd-space-2);margin-bottom:var(--mrd-space-4);padding:var(--mrd-space-1) var(--mrd-space-3);background:var(--mrd-color-primary-light);border:1px solid transparent;border-radius:var(--mrd-border-radius);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-primary-dark);cursor:pointer}.mrd-document-view__crumb.sc-mrd-document-view:hover{border-color:var(--mrd-color-primary)}.mrd-document-view__crumb-icon.sc-mrd-document-view{width:0.875rem;height:0.875rem;flex-shrink:0}.mrd-document-view__title.sc-mrd-document-view{font-size:var(--mrd-font-size-2xl);font-weight:var(--mrd-font-weight-bold);color:var(--mrd-color-neutral-900);letter-spacing:-0.02em;margin:0 0 var(--mrd-space-1) 0}.mrd-document-view__date.sc-mrd-document-view{font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-400);font-variant-numeric:tabular-nums;margin:0 0 var(--mrd-space-6) 0}.mrd-document-view__file.sc-mrd-document-view{display:flex;align-items:center;gap:var(--mrd-space-4);padding:var(--mrd-space-4);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius-md);background:var(--mrd-color-neutral-50);margin-bottom:var(--mrd-space-6)}.mrd-document-view__file-preview.sc-mrd-document-view{width:2.875rem;height:3.625rem;flex-shrink:0;display:grid;place-items:center;border-radius:var(--mrd-border-radius-sm);background:var(--mrd-color-white);border:1px solid var(--mrd-border-color);color:var(--mrd-color-danger);box-shadow:var(--mrd-shadow-sm)}.mrd-document-view__file-preview.sc-mrd-document-view svg.sc-mrd-document-view{width:1.5rem;height:1.5rem}.mrd-document-view__file-meta.sc-mrd-document-view{flex:1;min-width:0}.mrd-document-view__file-name.sc-mrd-document-view{font-weight:var(--mrd-font-weight-semibold);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800);word-break:break-word}.mrd-document-view__download.sc-mrd-document-view{display:inline-flex;align-items:center;gap:var(--mrd-space-2);flex-shrink:0;height:2rem;padding:0 var(--mrd-space-3);background:var(--mrd-color-white);border:1px solid var(--mrd-color-neutral-300);border-radius:var(--mrd-border-radius);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);font-weight:var(--mrd-font-weight-medium);color:var(--mrd-color-neutral-700);cursor:pointer}.mrd-document-view__download.sc-mrd-document-view:hover{background:var(--mrd-color-neutral-100);color:var(--mrd-color-neutral-900)}.mrd-document-view__download.sc-mrd-document-view svg.sc-mrd-document-view{width:0.9375rem;height:0.9375rem}.mrd-document-view__summary-body.sc-mrd-document-view{font-size:var(--mrd-font-size-base);color:var(--mrd-color-neutral-700);line-height:var(--mrd-line-height-relaxed)}"}},[2,"mrd-document-view",{archetype:[16],data:[16],locale:[1]}]);function c(){"undefined"!=typeof customElements&&["mrd-document-view"].forEach((r=>{"mrd-document-view"===r&&(customElements.get(t(r))||customElements.define(t(r),a))}))}export{a as M,c as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as r,HTMLElement as e,createEvent as i,h as d,Host as
|
|
1
|
+
import{proxyCustomElement as r,HTMLElement as e,createEvent as i,h as d,Host as l,transformTag as a}from"@stencil/core/internal/client";import{t as o}from"./i18n.js";import{v as m,a as t}from"./validation.js";const s=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.mrdChange=i(this,"mrdChange",7),this.mrdBlur=i(this,"mrdBlur",7),this.name="",this.label="",this.value="",this.placeholder="",this.required=!1,this.disabled=!1,this.locale=navigator.language,this.error="",this.handleInput=r=>{this.mrdChange.emit({name:this.name,value:r.target.value})},this.handleBlur=r=>{const e=r.target.value;this.error=this.required&&!m(e)?o("required",this.locale):e&&!t(e)?o("invalid_email",this.locale):"",this.mrdBlur.emit({name:this.name,value:e})}}render(){const r=!!this.error;return d(l,{key:"0d442ab2a711c26c83fcdbf0fd8cd006d8dd8649"},d("div",{key:"ceb2a80679514c4c5b888fe096c90ed6cc973f64",class:"mrd-email-field"},this.label&&d("label",{key:"663f95eff1002ee56cfc3104514bf31b47e26750",class:"mrd-email-field__label"+(this.required?" mrd-email-field__label--required":"")},this.label),d("input",{key:"42dbdec25a47b37cfd68d00d0b8a481f96fe8241",class:"mrd-email-field__input"+(r?" mrd-email-field__input--error":""),type:"email",name:this.name,value:this.value,placeholder:this.placeholder||"name@example.com",required:this.required,disabled:this.disabled,onInput:this.handleInput,onBlur:this.handleBlur}),r&&d("span",{key:"626ee856ceaa7051fb9dd1de8b7cbd708e83f617",class:"mrd-email-field__error"},this.error)))}static get style(){return".sc-mrd-email-field-h{display:block}.mrd-email-field.sc-mrd-email-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-email-field__label.sc-mrd-email-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-email-field__label--required.sc-mrd-email-field::after{content:' *';color:var(--mrd-color-danger)}.mrd-email-field__input.sc-mrd-email-field{display:block;width:100%;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-input-padding-x);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-input-color);background-color:var(--mrd-input-bg);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);transition:border-color var(--mrd-transition), box-shadow var(--mrd-transition);outline:none;appearance:none;box-sizing:border-box}.mrd-email-field__input.sc-mrd-email-field::placeholder{color:var(--mrd-input-placeholder-color)}.mrd-email-field__input.sc-mrd-email-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-email-field__input.sc-mrd-email-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-email-field__input--error.sc-mrd-email-field{border-color:var(--mrd-border-color-error)}.mrd-email-field__input--error.sc-mrd-email-field:focus{box-shadow:var(--mrd-shadow-focus-error)}.mrd-email-field__error.sc-mrd-email-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}"}},[2,"mrd-email-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}]);function n(){"undefined"!=typeof customElements&&["mrd-email-field"].forEach((r=>{"mrd-email-field"===r&&(customElements.get(a(r))||customElements.define(a(r),s))}))}export{s as M,n as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as i,createEvent as r,h as l,Host as d,transformTag as o}from"@stencil/core/internal/client";import{t}from"./i18n.js";const s=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.mrdChange=r(this,"mrdChange",7),this.mrdBlur=r(this,"mrdBlur",7),this.mrdUpload=r(this,"mrdUpload",7),this.name="",this.label="",this.value=null,this.required=!1,this.disabled=!1,this.locale=navigator.language,this.accept="",this.maxSize=0,this.fileName="",this.isDragging=!1,this.uploading=!1,this.error="",this.handleInputChange=e=>{var i;const r=e.target.files;this.handleFile(null!==(i=null==r?void 0:r[0])&&void 0!==i?i:null)},this.handleDragOver=e=>{e.preventDefault(),this.isDragging=!0},this.handleDragLeave=()=>{this.isDragging=!1},this.handleDrop=e=>{var i,r,l;e.preventDefault(),this.isDragging=!1;const d=null!==(l=null===(r=null===(i=e.dataTransfer)||void 0===i?void 0:i.files)||void 0===r?void 0:r[0])&&void 0!==l?l:null;this.handleFile(d)},this.handleZoneClick=()=>{var e;this.disabled||this.uploading||null===(e=this.fileInputRef)||void 0===e||e.click()},this.handleClear=e=>{e.stopPropagation(),this.fileName="",this.error="",this.uploading=!1,this.fileInputRef&&(this.fileInputRef.value=""),this.mrdChange.emit({name:this.name,value:null})}}valueChanged(e){"string"==typeof e&&e?this.uploading=!1:e||(this.uploading=!1,this.fileName="")}handleFile(e){if(!e)return this.fileName="",this.uploading=!1,void this.mrdChange.emit({name:this.name,value:null});this.maxSize>0&&e.size>this.maxSize?this.error=t("file_too_large",this.locale):(this.error="",this.fileName=e.name,this.uploading=!0,this.mrdChange.emit({name:this.name,value:e}),this.mrdUpload.emit({name:this.name,file:e}))}render(){const e=this.uploading||"string"==typeof this.value&&this.value||this.fileName,i=!!this.error,r=["mrd-file-field__zone",this.isDragging?"mrd-file-field__zone--dragging":"",i?"mrd-file-field__zone--error":"",this.disabled||this.uploading?"mrd-file-field__zone--disabled":""].filter(Boolean).join(" ");return l(d,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as i,createEvent as r,h as l,Host as d,transformTag as o}from"@stencil/core/internal/client";import{t}from"./i18n.js";const s=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.mrdChange=r(this,"mrdChange",7),this.mrdBlur=r(this,"mrdBlur",7),this.mrdUpload=r(this,"mrdUpload",7),this.name="",this.label="",this.value=null,this.required=!1,this.disabled=!1,this.locale=navigator.language,this.accept="",this.maxSize=0,this.fileName="",this.isDragging=!1,this.uploading=!1,this.error="",this.handleInputChange=e=>{var i;const r=e.target.files;this.handleFile(null!==(i=null==r?void 0:r[0])&&void 0!==i?i:null)},this.handleDragOver=e=>{e.preventDefault(),this.isDragging=!0},this.handleDragLeave=()=>{this.isDragging=!1},this.handleDrop=e=>{var i,r,l;e.preventDefault(),this.isDragging=!1;const d=null!==(l=null===(r=null===(i=e.dataTransfer)||void 0===i?void 0:i.files)||void 0===r?void 0:r[0])&&void 0!==l?l:null;this.handleFile(d)},this.handleZoneClick=()=>{var e;this.disabled||this.uploading||null===(e=this.fileInputRef)||void 0===e||e.click()},this.handleClear=e=>{e.stopPropagation(),this.fileName="",this.error="",this.uploading=!1,this.fileInputRef&&(this.fileInputRef.value=""),this.mrdChange.emit({name:this.name,value:null})}}valueChanged(e){"string"==typeof e&&e?this.uploading=!1:e||(this.uploading=!1,this.fileName="")}handleFile(e){if(!e)return this.fileName="",this.uploading=!1,void this.mrdChange.emit({name:this.name,value:null});this.maxSize>0&&e.size>this.maxSize?this.error=t("file_too_large",this.locale):(this.error="",this.fileName=e.name,this.uploading=!0,this.mrdChange.emit({name:this.name,value:e}),this.mrdUpload.emit({name:this.name,file:e}))}render(){const e=this.uploading||"string"==typeof this.value&&this.value||this.fileName,i=!!this.error,r=["mrd-file-field__zone",this.isDragging?"mrd-file-field__zone--dragging":"",i?"mrd-file-field__zone--error":"",this.disabled||this.uploading?"mrd-file-field__zone--disabled":""].filter(Boolean).join(" ");return l(d,{key:"095bb39f3cb1680cf5e7e51bdfd06d8eb087f237"},l("div",{key:"7e5b5fe6e63b6530221083c8bcb82bcac59a5fe7",class:"mrd-file-field"},this.label&&l("label",{key:"c34723f4199371d6fe8ea87463d878b89c038590",class:"mrd-file-field__label"+(this.required?" mrd-file-field__label--required":"")},this.label),l("div",{key:"4727667345d3cd4a5c65a431744a09f366943c13",class:r,onClick:this.handleZoneClick,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},l("input",{key:"45ed41c0f094dbe269561c8586e473f908cdf4a4",ref:e=>this.fileInputRef=e,class:"mrd-file-field__input",type:"file",name:this.name,accept:this.accept,disabled:this.disabled||this.uploading,required:this.required&&!e,onChange:this.handleInputChange}),e?l("div",{class:"mrd-file-field__selected"},this.uploading?l("span",{class:"mrd-file-field__spinner","aria-label":t("loading",this.locale)}):l("svg",{class:"mrd-file-field__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},l("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),l("polyline",{points:"14 2 14 8 20 8"})),l("span",{class:"mrd-file-field__filename"},this.fileName),!this.uploading&&l("button",{class:"mrd-file-field__clear",type:"button",onClick:this.handleClear,"aria-label":t("clear",this.locale)},"✕")):l("div",{class:"mrd-file-field__prompt"},l("svg",{class:"mrd-file-field__upload-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},l("polyline",{points:"16 16 12 12 8 16"}),l("line",{x1:"12",y1:"12",x2:"12",y2:"21"}),l("path",{d:"M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"})),l("span",null,t("drop_file_here",this.locale)," ",l("span",{class:"mrd-file-field__browse"},t("browse",this.locale))))),i&&l("span",{key:"00ce94ead3c32ed63e903cfd9d8480084a308d84",class:"mrd-file-field__error"},this.error)))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return".sc-mrd-file-field-h{display:block}.mrd-file-field.sc-mrd-file-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-file-field__label.sc-mrd-file-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-file-field__label--required.sc-mrd-file-field::after{content:' *';color:var(--mrd-color-danger)}.mrd-file-field__zone.sc-mrd-file-field{display:flex;align-items:center;justify-content:center;padding:var(--mrd-space-6);border:2px dashed var(--mrd-border-color);border-radius:var(--mrd-border-radius-md);background-color:var(--mrd-color-neutral-50);cursor:pointer;transition:border-color var(--mrd-transition), background-color var(--mrd-transition);min-height:100px;position:relative}.mrd-file-field__zone.sc-mrd-file-field:hover{border-color:var(--mrd-color-primary);background-color:var(--mrd-color-primary-light)}.mrd-file-field__zone--dragging.sc-mrd-file-field{border-color:var(--mrd-color-primary);background-color:var(--mrd-color-primary-light)}.mrd-file-field__zone--error.sc-mrd-file-field{border-color:var(--mrd-border-color-error)}.mrd-file-field__zone--disabled.sc-mrd-file-field{opacity:0.6;cursor:not-allowed}.mrd-file-field__zone--disabled.sc-mrd-file-field:hover{border-color:var(--mrd-border-color);background-color:var(--mrd-color-neutral-50)}.mrd-file-field__input.sc-mrd-file-field{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;pointer-events:none}.mrd-file-field__prompt.sc-mrd-file-field{display:flex;flex-direction:column;align-items:center;gap:var(--mrd-space-2);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-500);text-align:center}.mrd-file-field__upload-icon.sc-mrd-file-field{width:32px;height:32px;color:var(--mrd-color-neutral-400)}.mrd-file-field__browse.sc-mrd-file-field{color:var(--mrd-color-primary);font-weight:var(--mrd-font-weight-medium);text-decoration:underline}.mrd-file-field__selected.sc-mrd-file-field{display:flex;align-items:center;gap:var(--mrd-space-2);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-700)}.mrd-file-field__icon.sc-mrd-file-field{width:20px;height:20px;color:var(--mrd-color-primary);flex-shrink:0}.mrd-file-field__filename.sc-mrd-file-field{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}.mrd-file-field__clear.sc-mrd-file-field{background:none;border:none;cursor:pointer;color:var(--mrd-color-neutral-400);font-size:var(--mrd-font-size-sm);padding:var(--mrd-space-1);border-radius:var(--mrd-border-radius-sm);line-height:1}.mrd-file-field__clear.sc-mrd-file-field:hover{color:var(--mrd-color-danger);background-color:var(--mrd-color-danger-light)}.mrd-file-field__spinner.sc-mrd-file-field{display:inline-block;flex-shrink:0;width:18px;height:18px;border:2px solid var(--mrd-color-neutral-300);border-top-color:var(--mrd-color-primary);border-radius:50%;animation:mrd-file-spin 0.6s linear infinite}@keyframes mrd-file-spin{to{transform:rotate(360deg)}}.mrd-file-field__error.sc-mrd-file-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}"}},[2,"mrd-file-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],fileName:[32],isDragging:[32],uploading:[32],error:[32]},void 0,{value:[{valueChanged:0}]}]);function a(){"undefined"!=typeof customElements&&["mrd-file-field"].forEach((e=>{"mrd-file-field"===e&&(customElements.get(o(e))||customElements.define(o(e),s))}))}export{s as M,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as r,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as r,HTMLElement as i,createEvent as e,h as d,Host as a,transformTag as o}from"@stencil/core/internal/client";import{t as l}from"./i18n.js";const t=r(class extends i{constructor(r){super(),!1!==r&&this.__registerHost(),this.mrdChange=e(this,"mrdChange",7),this.mrdBlur=e(this,"mrdBlur",7),this.mrdUpload=e(this,"mrdUpload",7),this.name="",this.label="",this.value=null,this.required=!1,this.disabled=!1,this.locale=navigator.language,this.accept="image/*",this.maxSize=0,this.previewUrl="",this.fileName="",this.isDragging=!1,this.uploading=!1,this.error="",this.handleInputChange=r=>{var i;const e=r.target.files;this.handleFile(null!==(i=null==e?void 0:e[0])&&void 0!==i?i:null)},this.handleDragOver=r=>{r.preventDefault(),this.isDragging=!0},this.handleDragLeave=()=>{this.isDragging=!1},this.handleDrop=r=>{var i,e,d;r.preventDefault(),this.isDragging=!1;const a=null!==(d=null===(e=null===(i=r.dataTransfer)||void 0===i?void 0:i.files)||void 0===e?void 0:e[0])&&void 0!==d?d:null;this.handleFile(a)},this.handleZoneClick=()=>{var r;this.disabled||this.uploading||null===(r=this.fileInputRef)||void 0===r||r.click()},this.handleClear=r=>{r.stopPropagation(),this.previewUrl="",this.fileName="",this.error="",this.uploading=!1,this.fileInputRef&&(this.fileInputRef.value=""),this.mrdChange.emit({name:this.name,value:null})}}valueChanged(r){"string"==typeof r&&r?this.uploading=!1:r||(this.uploading=!1,this.previewUrl="",this.fileName="")}handleFile(r){if(!r)return this.previewUrl="",this.fileName="",this.uploading=!1,void this.mrdChange.emit({name:this.name,value:null});if(this.maxSize>0&&r.size>this.maxSize)return void(this.error=l("file_too_large",this.locale));if(!r.type.startsWith("image/"))return void(this.error="Please select an image file");this.error="",this.fileName=r.name,this.uploading=!0;const i=new FileReader;i.onload=r=>{var i;this.previewUrl=null===(i=r.target)||void 0===i?void 0:i.result},i.readAsDataURL(r),this.mrdChange.emit({name:this.name,value:r}),this.mrdUpload.emit({name:this.name,file:r})}render(){const r=!!this.error,i=["mrd-image-field__zone",this.isDragging?"mrd-image-field__zone--dragging":"",r?"mrd-image-field__zone--error":"",this.disabled||this.uploading?"mrd-image-field__zone--disabled":""].filter(Boolean).join(" ");return d(a,{key:"97db2df72839f36b7a46e153a5dd1c208c52b522"},d("div",{key:"c8f2d3d858f90d322d26082aaf5adb57acfc78f4",class:"mrd-image-field"},this.label&&d("label",{key:"6625e5031ff0b7c06f76c1ea0387f1bd5c1858a4",class:"mrd-image-field__label"+(this.required?" mrd-image-field__label--required":"")},this.label),d("div",{key:"364216e6a96e845e21c42e821fdff02bd2612ff8",class:i,onClick:this.handleZoneClick,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},d("input",{key:"0487706ddd9f48cda1cb0c2a178809d90674486b",ref:r=>this.fileInputRef=r,class:"mrd-image-field__input",type:"file",name:this.name,accept:this.accept,disabled:this.disabled||this.uploading,required:this.required&&!this.previewUrl,onChange:this.handleInputChange}),this.previewUrl?d("div",{class:"mrd-image-field__preview-container"},d("div",{class:"mrd-image-field__preview-thumb"},d("img",{class:"mrd-image-field__preview",src:this.previewUrl,alt:this.fileName}),this.uploading&&d("div",{class:"mrd-image-field__preview-overlay"},d("span",{class:"mrd-image-field__spinner"}))),d("div",{class:"mrd-image-field__preview-info"},d("span",{class:"mrd-image-field__preview-name"},this.fileName),this.uploading&&d("span",{class:"mrd-image-field__upload-status"},l("loading",this.locale))),!this.uploading&&d("button",{class:"mrd-image-field__clear",type:"button",onClick:this.handleClear,"aria-label":l("clear",this.locale)},l("remove",this.locale))):d("div",{class:"mrd-image-field__prompt"},d("svg",{class:"mrd-image-field__upload-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},d("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),d("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),d("polyline",{points:"21 15 16 10 5 21"})),d("span",null,l("drop_file_here",this.locale)," ",d("span",{class:"mrd-image-field__browse"},l("browse",this.locale))))),r&&d("span",{key:"bd505ef4f4b67c4e9138d8825c6e600f583f4cab",class:"mrd-image-field__error"},this.error)))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return".sc-mrd-image-field-h{display:block}.mrd-image-field.sc-mrd-image-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-image-field__label.sc-mrd-image-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-image-field__label--required.sc-mrd-image-field::after{content:' *';color:var(--mrd-color-danger)}.mrd-image-field__zone.sc-mrd-image-field{display:flex;align-items:center;justify-content:center;border:2px dashed var(--mrd-border-color);border-radius:var(--mrd-border-radius-md);background-color:var(--mrd-color-neutral-50);cursor:pointer;transition:border-color var(--mrd-transition), background-color var(--mrd-transition);min-height:100px;position:relative}.mrd-image-field__zone.sc-mrd-image-field:hover{border-color:var(--mrd-color-primary);background-color:var(--mrd-color-primary-light)}.mrd-image-field__zone--dragging.sc-mrd-image-field{border-color:var(--mrd-color-primary);background-color:var(--mrd-color-primary-light)}.mrd-image-field__zone--error.sc-mrd-image-field{border-color:var(--mrd-border-color-error)}.mrd-image-field__zone--disabled.sc-mrd-image-field{opacity:0.6;cursor:not-allowed}.mrd-image-field__zone--disabled.sc-mrd-image-field:hover{border-color:var(--mrd-border-color);background-color:var(--mrd-color-neutral-50)}.mrd-image-field__input.sc-mrd-image-field{position:absolute;inset:0;opacity:0;width:100%;height:100%;pointer-events:none}.mrd-image-field__prompt.sc-mrd-image-field{display:flex;flex-direction:column;align-items:center;gap:var(--mrd-space-2);padding:var(--mrd-space-6);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-500);text-align:center}.mrd-image-field__upload-icon.sc-mrd-image-field{width:40px;height:40px;color:var(--mrd-color-neutral-400)}.mrd-image-field__browse.sc-mrd-image-field{color:var(--mrd-color-primary);font-weight:var(--mrd-font-weight-medium);text-decoration:underline}.mrd-image-field__preview-container.sc-mrd-image-field{display:flex;align-items:center;gap:var(--mrd-space-4);padding:var(--mrd-space-4);width:100%}.mrd-image-field__preview-thumb.sc-mrd-image-field{flex-shrink:0;width:80px;height:80px;border-radius:var(--mrd-border-radius);overflow:hidden;border:var(--mrd-border-width) solid var(--mrd-border-color);background-color:var(--mrd-color-neutral-100)}.mrd-image-field__preview.sc-mrd-image-field{width:100%;height:100%;object-fit:cover;display:block}.mrd-image-field__preview-info.sc-mrd-image-field{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--mrd-space-1)}.mrd-image-field__preview-name.sc-mrd-image-field{font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);font-weight:var(--mrd-font-weight-medium);color:var(--mrd-color-neutral-800);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mrd-image-field__preview-overlay.sc-mrd-image-field{position:absolute;inset:0;background:rgb(255 255 255 / 0.7);display:flex;align-items:center;justify-content:center;border-radius:var(--mrd-border-radius)}.mrd-image-field__spinner.sc-mrd-image-field{display:inline-block;width:24px;height:24px;border:2px solid var(--mrd-color-neutral-300);border-top-color:var(--mrd-color-primary);border-radius:50%;animation:mrd-image-spin 0.6s linear infinite}@keyframes mrd-image-spin{to{transform:rotate(360deg)}}.mrd-image-field__upload-status.sc-mrd-image-field{font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500)}.mrd-image-field__clear.sc-mrd-image-field{flex-shrink:0;background-color:var(--mrd-color-white);color:var(--mrd-color-danger);border:var(--mrd-border-width) solid var(--mrd-color-danger);border-radius:var(--mrd-border-radius);padding:var(--mrd-space-1) var(--mrd-space-3);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-sm);font-weight:var(--mrd-font-weight-medium);cursor:pointer;transition:background-color var(--mrd-transition), color var(--mrd-transition)}.mrd-image-field__clear.sc-mrd-image-field:hover{background-color:var(--mrd-color-danger);color:var(--mrd-color-white)}.mrd-image-field__error.sc-mrd-image-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}"}},[2,"mrd-image-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],previewUrl:[32],fileName:[32],isDragging:[32],uploading:[32],error:[32]},void 0,{value:[{valueChanged:0}]}]);function s(){"undefined"!=typeof customElements&&["mrd-image-field"].forEach((r=>{"mrd-image-field"===r&&(customElements.get(o(r))||customElements.define(o(r),t))}))}export{t as M,s as d}
|