origam 2.38.1 → 2.38.2
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/CHANGELOG.md +24 -0
- package/dist/src/assets/locales/en.json +1 -1
- package/dist/src/assets/locales/fr.json +2 -2
- package/dist/src/components/Alert/OrigamAlert.vue +739 -165
- package/dist/src/components/App/OrigamApp.vue +95 -19
- package/dist/src/components/App/OrigamAppBar.vue +751 -158
- package/dist/src/components/Audio/OrigamAudio.vue +1288 -346
- package/dist/src/components/Audio/OrigamAudioWaveform.vue +63 -7
- package/dist/src/components/Avatar/OrigamAvatar.vue +678 -126
- package/dist/src/components/Avatar/OrigamAvatarGroup.vue +700 -153
- package/dist/src/components/Badge/OrigamBadge.vue +548 -135
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +698 -140
- package/dist/src/components/BottomNav/OrigamBottomNav.vue +864 -156
- package/dist/src/components/Bracket/OrigamBracket.vue +1013 -380
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +674 -154
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +663 -163
- package/dist/src/components/Bracket/OrigamBracketRound.vue +116 -34
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +654 -119
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +292 -54
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +657 -126
- package/dist/src/components/Btn/OrigamBtn.vue +928 -249
- package/dist/src/components/Btn/OrigamBtnGroup.vue +658 -141
- package/dist/src/components/Btn/OrigamBtnToggle.vue +578 -91
- package/dist/src/components/Calendar/OrigamCalendar.vue +1142 -484
- package/dist/src/components/Card/OrigamCard.vue +938 -194
- package/dist/src/components/Card/OrigamCardHeader.vue +593 -104
- package/dist/src/components/Card/OrigamCardText.vue +536 -84
- package/dist/src/components/Carousel/OrigamCarousel.vue +778 -202
- package/dist/src/components/Carousel/OrigamCarouselItem.vue +660 -109
- package/dist/src/components/Chart/OrigamChart.vue +942 -452
- package/dist/src/components/Chart/OrigamChartAxis.vue +111 -19
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +713 -297
- package/dist/src/components/Chart/OrigamChartBullet.vue +701 -286
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +663 -243
- package/dist/src/components/Chart/OrigamChartCartesian.vue +1055 -487
- package/dist/src/components/Chart/OrigamChartGauge.vue +563 -164
- package/dist/src/components/Chart/OrigamChartHeatmap.vue +677 -251
- package/dist/src/components/Chart/OrigamChartHoneycomb.vue +700 -288
- package/dist/src/components/Chart/OrigamChartLegend.vue +108 -16
- package/dist/src/components/Chart/OrigamChartMap.vue +723 -299
- package/dist/src/components/Chart/OrigamChartPareto.vue +721 -276
- package/dist/src/components/Chart/OrigamChartPictorial.vue +777 -355
- package/dist/src/components/Chart/OrigamChartPolar.vue +603 -210
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +674 -271
- package/dist/src/components/Chart/OrigamChartPyramid.vue +685 -250
- package/dist/src/components/Chart/OrigamChartRadar.vue +515 -165
- package/dist/src/components/Chart/OrigamChartRangeSelector.vue +50 -25
- package/dist/src/components/Chart/OrigamChartSankey.vue +913 -467
- package/dist/src/components/Chart/OrigamChartSparkline.vue +711 -268
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +810 -368
- package/dist/src/components/Chart/OrigamChartSunburst.vue +779 -368
- package/dist/src/components/Chart/OrigamChartTooltip.vue +78 -19
- package/dist/src/components/Chart/OrigamChartTreemap.vue +750 -288
- package/dist/src/components/Chart/OrigamChartVariwide.vue +679 -251
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +674 -265
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +781 -136
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +465 -81
- package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +824 -137
- package/dist/src/components/Chip/OrigamChip.vue +867 -202
- package/dist/src/components/Chip/OrigamChipGroup.vue +633 -121
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +30 -4
- package/dist/src/components/Clipboard/OrigamClipboard.vue +624 -105
- package/dist/src/components/Code/OrigamCode.vue +844 -206
- package/dist/src/components/CodeGroup/OrigamCodeGroup.vue +494 -83
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +777 -159
- package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +295 -181
- package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +108 -45
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +131 -46
- package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +128 -39
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1123 -258
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +415 -162
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +389 -145
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +852 -147
- package/dist/src/components/Counter/OrigamCounter.vue +588 -96
- package/dist/src/components/DataList/OrigamDataList.vue +619 -113
- package/dist/src/components/DataList/OrigamDataText.vue +295 -65
- package/dist/src/components/DataList/OrigamDataTitle.vue +295 -65
- package/dist/src/components/DataTable/OrigamDataTable.vue +934 -222
- package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +196 -51
- package/dist/src/components/DataTable/OrigamDataTableFooter.vue +319 -78
- package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +124 -44
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +181 -70
- package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +155 -46
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +145 -27
- package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +126 -43
- package/dist/src/components/DataTable/OrigamDataTableRow.vue +151 -73
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +261 -106
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +1048 -261
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +155 -51
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +147 -46
- package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +312 -134
- package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +151 -61
- package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +154 -67
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1147 -306
- package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +74 -14
- package/dist/src/components/Dialog/OrigamDialog.vue +953 -196
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +886 -148
- package/dist/src/components/Divider/OrigamDivider.vue +210 -50
- package/dist/src/components/Drawer/OrigamDrawer.vue +909 -207
- package/dist/src/components/EmptyState/OrigamEmptyState.vue +146 -35
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +746 -159
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +591 -95
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +663 -143
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +675 -134
- package/dist/src/components/Field/OrigamField.vue +1118 -306
- package/dist/src/components/FileField/OrigamFileField.vue +1188 -311
- package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +155 -36
- package/dist/src/components/FileField/OrigamFileFieldListItem.vue +155 -36
- package/dist/src/components/Form/OrigamForm.vue +197 -74
- package/dist/src/components/Grid/OrigamGrid.vue +707 -147
- package/dist/src/components/Grid/OrigamGridItem.vue +110 -37
- package/dist/src/components/Grids/OrigamCol.vue +593 -110
- package/dist/src/components/Grids/OrigamContainer.vue +461 -80
- package/dist/src/components/Grids/OrigamRow.vue +573 -112
- package/dist/src/components/Grids/OrigamSpacer.vue +54 -17
- package/dist/src/components/Icon/OrigamClassIcon.vue +573 -98
- package/dist/src/components/Icon/OrigamComponentIcon.vue +561 -101
- package/dist/src/components/Icon/OrigamIcon.vue +561 -98
- package/dist/src/components/Icon/OrigamLigatureIcon.vue +558 -98
- package/dist/src/components/Icon/OrigamSvgIcon.vue +593 -100
- package/dist/src/components/Img/OrigamImg.vue +869 -228
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +319 -111
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +80 -17
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +476 -140
- package/dist/src/components/Input/OrigamInput.vue +747 -180
- package/dist/src/components/ItemGroup/OrigamItemGroup.vue +112 -36
- package/dist/src/components/ItemGroup/OrigamItemGroupItem.vue +80 -29
- package/dist/src/components/Kbd/OrigamKbd.vue +450 -75
- package/dist/src/components/Label/OrigamLabel.vue +584 -95
- package/dist/src/components/Layout/OrigamLayout.vue +563 -94
- package/dist/src/components/Lazy/OrigamLazy.vue +131 -34
- package/dist/src/components/List/OrigamList.vue +755 -170
- package/dist/src/components/List/OrigamListChildren.vue +59 -19
- package/dist/src/components/List/OrigamListGroup.vue +631 -134
- package/dist/src/components/List/OrigamListGroupActivator.vue +45 -17
- package/dist/src/components/List/OrigamListItem.vue +890 -224
- package/dist/src/components/List/OrigamListItemWrapper.vue +20 -10
- package/dist/src/components/List/OrigamListSubheader.vue +542 -93
- package/dist/src/components/Loader/OrigamLoader.vue +110 -25
- package/dist/src/components/Main/OrigamMain.vue +565 -96
- package/dist/src/components/Masonry/OrigamMasonry.vue +799 -187
- package/dist/src/components/Media/OrigamMediaController.vue +465 -182
- package/dist/src/components/Media/OrigamMediaScrubber.vue +389 -152
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +174 -44
- package/dist/src/components/Menu/OrigamMenu.vue +1079 -255
- package/dist/src/components/Messages/OrigamMessages.vue +606 -97
- package/dist/src/components/NumberField/OrigamNumberField.vue +1208 -333
- package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +177 -57
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1016 -272
- package/dist/src/components/Overlay/OrigamOverlay.vue +446 -158
- package/dist/src/components/Overlay/OrigamOverlayScrim.vue +122 -30
- package/dist/src/components/Pagination/OrigamPagination.vue +982 -313
- package/dist/src/components/Parallax/OrigamParallax.vue +800 -259
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +694 -178
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +132 -47
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +1098 -265
- package/dist/src/components/Picker/OrigamPicker.vue +655 -108
- package/dist/src/components/Picker/OrigamPickerTitle.vue +108 -26
- package/dist/src/components/Progress/OrigamProgress.vue +436 -70
- package/dist/src/components/Progress/OrigamProgressCircular.vue +399 -82
- package/dist/src/components/Progress/OrigamProgressLinear.vue +468 -115
- package/dist/src/components/QrCode/OrigamQrCode.vue +642 -126
- package/dist/src/components/Radio/OrigamRadio.vue +772 -132
- package/dist/src/components/Radio/OrigamRadioBtn.vue +446 -71
- package/dist/src/components/Radio/OrigamRadioGroup.vue +808 -135
- package/dist/src/components/RatingField/OrigamRatingField.vue +963 -194
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +657 -106
- package/dist/src/components/Responsive/OrigamResponsive.vue +548 -91
- package/dist/src/components/Select/OrigamSelect.vue +1639 -567
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +564 -151
- package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +178 -62
- package/dist/src/components/Sheet/OrigamSheet.vue +773 -199
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +249 -46
- package/dist/src/components/Skeleton/OrigamSkeletonGroup.vue +66 -11
- package/dist/src/components/Slide/OrigamSlideGroup.vue +772 -257
- package/dist/src/components/SliderField/OrigamSliderField.vue +1157 -335
- package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +236 -112
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +871 -214
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +218 -51
- package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +175 -43
- package/dist/src/components/Stepper/OrigamStepper.vue +618 -126
- package/dist/src/components/Stepper/OrigamStepperItem.vue +98 -37
- package/dist/src/components/Switch/OrigamSwitch.vue +879 -156
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +431 -78
- package/dist/src/components/SystemBar/OrigamSystemBar.vue +517 -87
- package/dist/src/components/Table/OrigamTable.vue +585 -124
- package/dist/src/components/Tabs/OrigamTab.vue +239 -73
- package/dist/src/components/Tabs/OrigamTabPanel.vue +125 -39
- package/dist/src/components/Tabs/OrigamTabPanels.vue +148 -57
- package/dist/src/components/Tabs/OrigamTabs.vue +381 -109
- package/dist/src/components/TextField/OrigamTextField.vue +1077 -258
- package/dist/src/components/TextMask/OrigamTextMask.vue +150 -43
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +1162 -310
- package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +77 -79
- package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +44 -9
- package/dist/src/components/Timeline/OrigamTimeline.vue +113 -43
- package/dist/src/components/Timeline/OrigamTimelineItem.vue +163 -76
- package/dist/src/components/Title/OrigamTitle.vue +505 -82
- package/dist/src/components/Toolbar/OrigamToolbar.vue +679 -142
- package/dist/src/components/Tooltip/OrigamTooltip.vue +288 -72
- package/dist/src/components/Transition/OrigamExpandX.vue +219 -106
- package/dist/src/components/Transition/OrigamExpandY.vue +219 -106
- package/dist/src/components/Transition/OrigamFade.vue +47 -9
- package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamScaleRotate.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideX.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideY.vue +52 -10
- package/dist/src/components/Transition/OrigamSnack.vue +52 -10
- package/dist/src/components/Transition/OrigamTransition.vue +40 -12
- package/dist/src/components/Transition/OrigamTranslateBottom.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslateScale.vue +209 -97
- package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowXTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYTranslate.vue +40 -7
- package/dist/src/components/Treeview/OrigamTreeview.vue +258 -118
- package/dist/src/components/Treeview/OrigamTreeviewNode.vue +126 -88
- package/dist/src/components/Video/OrigamVideo.vue +1178 -331
- package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +147 -55
- package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +94 -19
- package/dist/src/components/Watermark/OrigamWatermark.vue +224 -124
- package/dist/src/components/Window/OrigamWindow.vue +745 -175
- package/dist/src/components/Window/OrigamWindowItem.vue +162 -69
- package/dist/src/composables/Commons/display.composable.cjs +2 -0
- package/dist/src/composables/Commons/display.composable.js +1 -1
- package/dist/src/interfaces/Pagination/pagination.interface.d.ts +1 -1
- package/package.json +6 -6
|
@@ -403,416 +403,1293 @@ import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
|
403
403
|
import { filterInputAttrs } from "../../utils/Input/input.util";
|
|
404
404
|
import { forwardRefs } from "../../utils/Commons/forwardRefs.util";
|
|
405
405
|
import { humanReadableFileSize, wrapInArray } from "../../utils/Commons/commons.util";
|
|
406
|
+
/*********************************************************
|
|
407
|
+
* Global
|
|
408
|
+
*
|
|
409
|
+
* @description
|
|
410
|
+
* Props for the `IFileFieldProps` interface used in the component.
|
|
411
|
+
* Contains default values provided via the `withDefaults` utility.
|
|
412
|
+
* Emits an event. The `defineEmits` function can be used in Vue 3 to declare emitted events.
|
|
413
|
+
* This variable serves as a declaration point for all events that the component can emit.
|
|
414
|
+
* Slots for the component.
|
|
415
|
+
********************************************************/
|
|
406
416
|
const props = defineProps({
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
417
|
+
chips: {
|
|
418
|
+
type: Boolean,
|
|
419
|
+
required: false
|
|
420
|
+
},
|
|
421
|
+
counter: {
|
|
422
|
+
type: Boolean,
|
|
423
|
+
required: false
|
|
424
|
+
},
|
|
425
|
+
counterSizeString: {
|
|
426
|
+
type: String,
|
|
427
|
+
required: false,
|
|
428
|
+
default: "origam.file_field.counter_size"
|
|
429
|
+
},
|
|
430
|
+
counterString: {
|
|
431
|
+
type: String,
|
|
432
|
+
required: false,
|
|
433
|
+
default: "origam.file_field.counter"
|
|
434
|
+
},
|
|
435
|
+
placeholder: {
|
|
436
|
+
type: String,
|
|
437
|
+
required: false
|
|
438
|
+
},
|
|
439
|
+
persistentPlaceholder: {
|
|
440
|
+
type: Boolean,
|
|
441
|
+
required: false
|
|
442
|
+
},
|
|
443
|
+
persistentCounter: {
|
|
444
|
+
type: Boolean,
|
|
445
|
+
required: false
|
|
446
|
+
},
|
|
447
|
+
multiple: {
|
|
448
|
+
type: Boolean,
|
|
449
|
+
required: false
|
|
450
|
+
},
|
|
451
|
+
showSize: {
|
|
452
|
+
type: [Boolean, Number],
|
|
453
|
+
required: false,
|
|
454
|
+
default: false
|
|
455
|
+
},
|
|
456
|
+
modelValue: {
|
|
457
|
+
type: null,
|
|
458
|
+
required: false
|
|
459
|
+
},
|
|
460
|
+
chipProps: {
|
|
461
|
+
type: Object,
|
|
462
|
+
required: false
|
|
463
|
+
},
|
|
464
|
+
maxFileSize: {
|
|
465
|
+
type: Number,
|
|
466
|
+
required: false
|
|
467
|
+
},
|
|
468
|
+
dragndrop: {
|
|
469
|
+
type: Boolean,
|
|
470
|
+
required: false
|
|
471
|
+
},
|
|
472
|
+
dragndropIcon: {
|
|
473
|
+
type: String,
|
|
474
|
+
required: false,
|
|
475
|
+
default: MDI_ICONS.CLOUD_UPLOAD_OUTLINE
|
|
476
|
+
},
|
|
477
|
+
fileIcon: {
|
|
478
|
+
type: String,
|
|
479
|
+
required: false,
|
|
480
|
+
default: MDI_ICONS.FILE
|
|
481
|
+
},
|
|
482
|
+
removeIcon: {
|
|
483
|
+
type: String,
|
|
484
|
+
required: false,
|
|
485
|
+
default: MDI_ICONS.CLOSE
|
|
486
|
+
},
|
|
487
|
+
downloadIcon: {
|
|
488
|
+
type: String,
|
|
489
|
+
required: false,
|
|
490
|
+
default: MDI_ICONS.DOWNLOAD
|
|
491
|
+
},
|
|
492
|
+
downloadable: {
|
|
493
|
+
type: Boolean,
|
|
494
|
+
required: false
|
|
495
|
+
},
|
|
496
|
+
progress: {
|
|
497
|
+
type: Array,
|
|
498
|
+
required: false
|
|
499
|
+
},
|
|
500
|
+
dropzoneTitle: {
|
|
501
|
+
type: String,
|
|
502
|
+
required: false,
|
|
503
|
+
default: "origam.file_field.dropzone_title"
|
|
504
|
+
},
|
|
505
|
+
dropzoneSubtitle: {
|
|
506
|
+
type: String,
|
|
507
|
+
required: false,
|
|
508
|
+
default: "origam.file_field.dropzone_subtitle"
|
|
509
|
+
},
|
|
510
|
+
maxFileSizeErrorString: {
|
|
511
|
+
type: String,
|
|
512
|
+
required: false,
|
|
513
|
+
default: "origam.validation.max_size_error"
|
|
514
|
+
},
|
|
515
|
+
display: {
|
|
516
|
+
type: null,
|
|
517
|
+
required: false,
|
|
518
|
+
default: "list"
|
|
519
|
+
},
|
|
520
|
+
dropzone: {
|
|
521
|
+
type: Boolean,
|
|
522
|
+
required: false
|
|
523
|
+
},
|
|
524
|
+
id: {
|
|
525
|
+
type: String,
|
|
526
|
+
required: false
|
|
527
|
+
},
|
|
528
|
+
class: {
|
|
529
|
+
type: [
|
|
530
|
+
String,
|
|
531
|
+
Array,
|
|
532
|
+
Object
|
|
533
|
+
],
|
|
534
|
+
required: false
|
|
535
|
+
},
|
|
536
|
+
style: {
|
|
537
|
+
type: [
|
|
538
|
+
String,
|
|
539
|
+
Array,
|
|
540
|
+
Object,
|
|
541
|
+
Boolean,
|
|
542
|
+
null
|
|
543
|
+
],
|
|
544
|
+
required: false,
|
|
545
|
+
skipCheck: true
|
|
546
|
+
},
|
|
547
|
+
color: {
|
|
548
|
+
type: [
|
|
549
|
+
String,
|
|
550
|
+
Object,
|
|
551
|
+
Boolean,
|
|
552
|
+
null
|
|
553
|
+
],
|
|
554
|
+
required: false,
|
|
555
|
+
skipCheck: true
|
|
556
|
+
},
|
|
557
|
+
density: {
|
|
558
|
+
type: null,
|
|
559
|
+
required: false,
|
|
560
|
+
default: DENSITY.DEFAULT
|
|
561
|
+
},
|
|
562
|
+
centerAffix: {
|
|
563
|
+
type: Boolean,
|
|
564
|
+
required: false,
|
|
565
|
+
default: true
|
|
566
|
+
},
|
|
567
|
+
dirty: {
|
|
568
|
+
type: Boolean,
|
|
569
|
+
required: false
|
|
570
|
+
},
|
|
571
|
+
disabled: {
|
|
572
|
+
type: Boolean,
|
|
573
|
+
required: false
|
|
574
|
+
},
|
|
575
|
+
error: {
|
|
576
|
+
type: [String, Boolean],
|
|
577
|
+
required: false
|
|
578
|
+
},
|
|
579
|
+
inline: {
|
|
580
|
+
type: Boolean,
|
|
581
|
+
required: false
|
|
582
|
+
},
|
|
583
|
+
label: {
|
|
584
|
+
type: String,
|
|
585
|
+
required: false
|
|
586
|
+
},
|
|
587
|
+
prefix: {
|
|
588
|
+
type: String,
|
|
589
|
+
required: false
|
|
590
|
+
},
|
|
591
|
+
suffix: {
|
|
592
|
+
type: String,
|
|
593
|
+
required: false
|
|
594
|
+
},
|
|
595
|
+
persistentClear: {
|
|
596
|
+
type: Boolean,
|
|
597
|
+
required: false
|
|
598
|
+
},
|
|
599
|
+
singleLine: {
|
|
600
|
+
type: Boolean,
|
|
601
|
+
required: false
|
|
602
|
+
},
|
|
603
|
+
required: {
|
|
604
|
+
type: Boolean,
|
|
605
|
+
required: false
|
|
606
|
+
},
|
|
607
|
+
loading: {
|
|
608
|
+
type: [
|
|
609
|
+
Boolean,
|
|
610
|
+
Number,
|
|
611
|
+
Object
|
|
612
|
+
],
|
|
613
|
+
required: false
|
|
614
|
+
},
|
|
615
|
+
loadingText: {
|
|
616
|
+
type: String,
|
|
617
|
+
required: false
|
|
618
|
+
},
|
|
619
|
+
tag: {
|
|
620
|
+
type: String,
|
|
621
|
+
required: false
|
|
622
|
+
},
|
|
623
|
+
bgColor: {
|
|
624
|
+
type: [
|
|
625
|
+
String,
|
|
626
|
+
Object,
|
|
627
|
+
Boolean,
|
|
628
|
+
null
|
|
629
|
+
],
|
|
630
|
+
required: false,
|
|
631
|
+
skipCheck: true
|
|
632
|
+
},
|
|
633
|
+
appendInnerAvatar: {
|
|
634
|
+
type: String,
|
|
635
|
+
required: false
|
|
636
|
+
},
|
|
637
|
+
appendInnerIcon: {
|
|
638
|
+
type: null,
|
|
639
|
+
required: false
|
|
640
|
+
},
|
|
641
|
+
prependInnerAvatar: {
|
|
642
|
+
type: String,
|
|
643
|
+
required: false
|
|
644
|
+
},
|
|
645
|
+
prependInnerIcon: {
|
|
646
|
+
type: null,
|
|
647
|
+
required: false,
|
|
648
|
+
default: MDI_ICONS.PAPERCLIP
|
|
649
|
+
},
|
|
650
|
+
clearIcon: {
|
|
651
|
+
type: null,
|
|
652
|
+
required: false
|
|
653
|
+
},
|
|
654
|
+
clearable: {
|
|
655
|
+
type: Boolean,
|
|
656
|
+
required: false,
|
|
657
|
+
default: true
|
|
658
|
+
},
|
|
659
|
+
prependInnerAriaLabel: {
|
|
660
|
+
type: String,
|
|
661
|
+
required: false
|
|
662
|
+
},
|
|
663
|
+
appendInnerAriaLabel: {
|
|
664
|
+
type: String,
|
|
665
|
+
required: false
|
|
666
|
+
},
|
|
667
|
+
border: {
|
|
668
|
+
type: [
|
|
669
|
+
Boolean,
|
|
670
|
+
Number,
|
|
671
|
+
String,
|
|
672
|
+
Array
|
|
673
|
+
],
|
|
674
|
+
required: false,
|
|
675
|
+
skipCheck: true,
|
|
676
|
+
default: true
|
|
677
|
+
},
|
|
678
|
+
borderTop: {
|
|
679
|
+
type: [
|
|
680
|
+
Boolean,
|
|
681
|
+
Number,
|
|
682
|
+
String
|
|
683
|
+
],
|
|
684
|
+
required: false
|
|
685
|
+
},
|
|
686
|
+
borderLeft: {
|
|
687
|
+
type: [
|
|
688
|
+
Boolean,
|
|
689
|
+
Number,
|
|
690
|
+
String
|
|
691
|
+
],
|
|
692
|
+
required: false
|
|
693
|
+
},
|
|
694
|
+
borderBottom: {
|
|
695
|
+
type: [
|
|
696
|
+
Boolean,
|
|
697
|
+
Number,
|
|
698
|
+
String
|
|
699
|
+
],
|
|
700
|
+
required: false
|
|
701
|
+
},
|
|
702
|
+
borderRight: {
|
|
703
|
+
type: [
|
|
704
|
+
Boolean,
|
|
705
|
+
Number,
|
|
706
|
+
String
|
|
707
|
+
],
|
|
708
|
+
required: false
|
|
709
|
+
},
|
|
710
|
+
borderBlock: {
|
|
711
|
+
type: [
|
|
712
|
+
Boolean,
|
|
713
|
+
Number,
|
|
714
|
+
String
|
|
715
|
+
],
|
|
716
|
+
required: false
|
|
717
|
+
},
|
|
718
|
+
borderInline: {
|
|
719
|
+
type: [
|
|
720
|
+
Boolean,
|
|
721
|
+
Number,
|
|
722
|
+
String
|
|
723
|
+
],
|
|
724
|
+
required: false
|
|
725
|
+
},
|
|
726
|
+
borderInlineStart: {
|
|
727
|
+
type: [
|
|
728
|
+
Boolean,
|
|
729
|
+
Number,
|
|
730
|
+
String
|
|
731
|
+
],
|
|
732
|
+
required: false
|
|
733
|
+
},
|
|
734
|
+
borderInlineEnd: {
|
|
735
|
+
type: [
|
|
736
|
+
Boolean,
|
|
737
|
+
Number,
|
|
738
|
+
String
|
|
739
|
+
],
|
|
740
|
+
required: false
|
|
741
|
+
},
|
|
742
|
+
borderBlockStart: {
|
|
743
|
+
type: [
|
|
744
|
+
Boolean,
|
|
745
|
+
Number,
|
|
746
|
+
String
|
|
747
|
+
],
|
|
748
|
+
required: false
|
|
749
|
+
},
|
|
750
|
+
borderBlockEnd: {
|
|
751
|
+
type: [
|
|
752
|
+
Boolean,
|
|
753
|
+
Number,
|
|
754
|
+
String
|
|
755
|
+
],
|
|
756
|
+
required: false
|
|
757
|
+
},
|
|
758
|
+
borderColor: {
|
|
759
|
+
type: String,
|
|
760
|
+
required: false
|
|
761
|
+
},
|
|
762
|
+
borderStyle: {
|
|
763
|
+
type: String,
|
|
764
|
+
required: false
|
|
765
|
+
},
|
|
766
|
+
borderTopColor: {
|
|
767
|
+
type: [
|
|
768
|
+
String,
|
|
769
|
+
Object,
|
|
770
|
+
Boolean,
|
|
771
|
+
null
|
|
772
|
+
],
|
|
773
|
+
required: false,
|
|
774
|
+
skipCheck: true
|
|
775
|
+
},
|
|
776
|
+
borderRightColor: {
|
|
777
|
+
type: [
|
|
778
|
+
String,
|
|
779
|
+
Object,
|
|
780
|
+
Boolean,
|
|
781
|
+
null
|
|
782
|
+
],
|
|
783
|
+
required: false,
|
|
784
|
+
skipCheck: true
|
|
785
|
+
},
|
|
786
|
+
borderBottomColor: {
|
|
787
|
+
type: [
|
|
788
|
+
String,
|
|
789
|
+
Object,
|
|
790
|
+
Boolean,
|
|
791
|
+
null
|
|
792
|
+
],
|
|
793
|
+
required: false,
|
|
794
|
+
skipCheck: true
|
|
795
|
+
},
|
|
796
|
+
borderLeftColor: {
|
|
797
|
+
type: [
|
|
798
|
+
String,
|
|
799
|
+
Object,
|
|
800
|
+
Boolean,
|
|
801
|
+
null
|
|
802
|
+
],
|
|
803
|
+
required: false,
|
|
804
|
+
skipCheck: true
|
|
805
|
+
},
|
|
806
|
+
borderInlineStartColor: {
|
|
807
|
+
type: [
|
|
808
|
+
String,
|
|
809
|
+
Object,
|
|
810
|
+
Boolean,
|
|
811
|
+
null
|
|
812
|
+
],
|
|
813
|
+
required: false,
|
|
814
|
+
skipCheck: true
|
|
815
|
+
},
|
|
816
|
+
borderInlineEndColor: {
|
|
817
|
+
type: [
|
|
818
|
+
String,
|
|
819
|
+
Object,
|
|
820
|
+
Boolean,
|
|
821
|
+
null
|
|
822
|
+
],
|
|
823
|
+
required: false,
|
|
824
|
+
skipCheck: true
|
|
825
|
+
},
|
|
826
|
+
borderBlockStartColor: {
|
|
827
|
+
type: [
|
|
828
|
+
String,
|
|
829
|
+
Object,
|
|
830
|
+
Boolean,
|
|
831
|
+
null
|
|
832
|
+
],
|
|
833
|
+
required: false,
|
|
834
|
+
skipCheck: true
|
|
835
|
+
},
|
|
836
|
+
borderBlockEndColor: {
|
|
837
|
+
type: [
|
|
838
|
+
String,
|
|
839
|
+
Object,
|
|
840
|
+
Boolean,
|
|
841
|
+
null
|
|
842
|
+
],
|
|
843
|
+
required: false,
|
|
844
|
+
skipCheck: true
|
|
845
|
+
},
|
|
846
|
+
focused: {
|
|
847
|
+
type: Boolean,
|
|
848
|
+
required: false
|
|
849
|
+
},
|
|
850
|
+
text: {
|
|
851
|
+
type: String,
|
|
852
|
+
required: false
|
|
853
|
+
},
|
|
854
|
+
floating: {
|
|
855
|
+
type: Boolean,
|
|
856
|
+
required: false
|
|
857
|
+
},
|
|
858
|
+
name: {
|
|
859
|
+
type: String,
|
|
860
|
+
required: false
|
|
861
|
+
},
|
|
862
|
+
margin: {
|
|
863
|
+
type: [
|
|
864
|
+
Boolean,
|
|
865
|
+
Number,
|
|
866
|
+
String
|
|
867
|
+
],
|
|
868
|
+
required: false
|
|
869
|
+
},
|
|
870
|
+
marginTop: {
|
|
871
|
+
type: [
|
|
872
|
+
Boolean,
|
|
873
|
+
Number,
|
|
874
|
+
String
|
|
875
|
+
],
|
|
876
|
+
required: false
|
|
877
|
+
},
|
|
878
|
+
marginLeft: {
|
|
879
|
+
type: [
|
|
880
|
+
Boolean,
|
|
881
|
+
Number,
|
|
882
|
+
String
|
|
883
|
+
],
|
|
884
|
+
required: false
|
|
885
|
+
},
|
|
886
|
+
marginBottom: {
|
|
887
|
+
type: [
|
|
888
|
+
Boolean,
|
|
889
|
+
Number,
|
|
890
|
+
String
|
|
891
|
+
],
|
|
892
|
+
required: false
|
|
893
|
+
},
|
|
894
|
+
marginRight: {
|
|
895
|
+
type: [
|
|
896
|
+
Boolean,
|
|
897
|
+
Number,
|
|
898
|
+
String
|
|
899
|
+
],
|
|
900
|
+
required: false
|
|
901
|
+
},
|
|
902
|
+
marginBlock: {
|
|
903
|
+
type: [
|
|
904
|
+
Boolean,
|
|
905
|
+
Number,
|
|
906
|
+
String
|
|
907
|
+
],
|
|
908
|
+
required: false
|
|
909
|
+
},
|
|
910
|
+
marginInline: {
|
|
911
|
+
type: [
|
|
912
|
+
Boolean,
|
|
913
|
+
Number,
|
|
914
|
+
String
|
|
915
|
+
],
|
|
916
|
+
required: false
|
|
917
|
+
},
|
|
918
|
+
marginInlineStart: {
|
|
919
|
+
type: [
|
|
920
|
+
Boolean,
|
|
921
|
+
Number,
|
|
922
|
+
String
|
|
923
|
+
],
|
|
924
|
+
required: false
|
|
925
|
+
},
|
|
926
|
+
marginInlineEnd: {
|
|
927
|
+
type: [
|
|
928
|
+
Boolean,
|
|
929
|
+
Number,
|
|
930
|
+
String
|
|
931
|
+
],
|
|
932
|
+
required: false
|
|
933
|
+
},
|
|
934
|
+
marginBlockStart: {
|
|
935
|
+
type: [
|
|
936
|
+
Boolean,
|
|
937
|
+
Number,
|
|
938
|
+
String
|
|
939
|
+
],
|
|
940
|
+
required: false
|
|
941
|
+
},
|
|
942
|
+
marginBlockEnd: {
|
|
943
|
+
type: [
|
|
944
|
+
Boolean,
|
|
945
|
+
Number,
|
|
946
|
+
String
|
|
947
|
+
],
|
|
948
|
+
required: false
|
|
949
|
+
},
|
|
950
|
+
padding: {
|
|
951
|
+
type: [
|
|
952
|
+
Boolean,
|
|
953
|
+
Number,
|
|
954
|
+
String
|
|
955
|
+
],
|
|
956
|
+
required: false
|
|
957
|
+
},
|
|
958
|
+
paddingTop: {
|
|
959
|
+
type: [
|
|
960
|
+
Boolean,
|
|
961
|
+
Number,
|
|
962
|
+
String
|
|
963
|
+
],
|
|
964
|
+
required: false
|
|
965
|
+
},
|
|
966
|
+
paddingLeft: {
|
|
967
|
+
type: [
|
|
968
|
+
Boolean,
|
|
969
|
+
Number,
|
|
970
|
+
String
|
|
971
|
+
],
|
|
972
|
+
required: false
|
|
973
|
+
},
|
|
974
|
+
paddingBottom: {
|
|
975
|
+
type: [
|
|
976
|
+
Boolean,
|
|
977
|
+
Number,
|
|
978
|
+
String
|
|
979
|
+
],
|
|
980
|
+
required: false
|
|
981
|
+
},
|
|
982
|
+
paddingRight: {
|
|
983
|
+
type: [
|
|
984
|
+
Boolean,
|
|
985
|
+
Number,
|
|
986
|
+
String
|
|
987
|
+
],
|
|
988
|
+
required: false
|
|
989
|
+
},
|
|
990
|
+
paddingBlock: {
|
|
991
|
+
type: [
|
|
992
|
+
Boolean,
|
|
993
|
+
Number,
|
|
994
|
+
String
|
|
995
|
+
],
|
|
996
|
+
required: false
|
|
997
|
+
},
|
|
998
|
+
paddingInline: {
|
|
999
|
+
type: [
|
|
1000
|
+
Boolean,
|
|
1001
|
+
Number,
|
|
1002
|
+
String
|
|
1003
|
+
],
|
|
1004
|
+
required: false
|
|
1005
|
+
},
|
|
1006
|
+
paddingInlineStart: {
|
|
1007
|
+
type: [
|
|
1008
|
+
Boolean,
|
|
1009
|
+
Number,
|
|
1010
|
+
String
|
|
1011
|
+
],
|
|
1012
|
+
required: false
|
|
1013
|
+
},
|
|
1014
|
+
paddingInlineEnd: {
|
|
1015
|
+
type: [
|
|
1016
|
+
Boolean,
|
|
1017
|
+
Number,
|
|
1018
|
+
String
|
|
1019
|
+
],
|
|
1020
|
+
required: false
|
|
1021
|
+
},
|
|
1022
|
+
paddingBlockStart: {
|
|
1023
|
+
type: [
|
|
1024
|
+
Boolean,
|
|
1025
|
+
Number,
|
|
1026
|
+
String
|
|
1027
|
+
],
|
|
1028
|
+
required: false
|
|
1029
|
+
},
|
|
1030
|
+
paddingBlockEnd: {
|
|
1031
|
+
type: [
|
|
1032
|
+
Boolean,
|
|
1033
|
+
Number,
|
|
1034
|
+
String
|
|
1035
|
+
],
|
|
1036
|
+
required: false
|
|
1037
|
+
},
|
|
1038
|
+
rounded: {
|
|
1039
|
+
type: [
|
|
1040
|
+
Boolean,
|
|
1041
|
+
Number,
|
|
1042
|
+
String,
|
|
1043
|
+
null
|
|
1044
|
+
],
|
|
1045
|
+
required: false,
|
|
1046
|
+
skipCheck: true,
|
|
1047
|
+
default: true
|
|
1048
|
+
},
|
|
1049
|
+
roundedTopRight: {
|
|
1050
|
+
type: [
|
|
1051
|
+
Boolean,
|
|
1052
|
+
Number,
|
|
1053
|
+
String
|
|
1054
|
+
],
|
|
1055
|
+
required: false
|
|
1056
|
+
},
|
|
1057
|
+
roundedTopLeft: {
|
|
1058
|
+
type: [
|
|
1059
|
+
Boolean,
|
|
1060
|
+
Number,
|
|
1061
|
+
String
|
|
1062
|
+
],
|
|
1063
|
+
required: false
|
|
1064
|
+
},
|
|
1065
|
+
roundedBottomLeft: {
|
|
1066
|
+
type: [
|
|
1067
|
+
Boolean,
|
|
1068
|
+
Number,
|
|
1069
|
+
String
|
|
1070
|
+
],
|
|
1071
|
+
required: false
|
|
1072
|
+
},
|
|
1073
|
+
roundedBottomRight: {
|
|
1074
|
+
type: [
|
|
1075
|
+
Boolean,
|
|
1076
|
+
Number,
|
|
1077
|
+
String
|
|
1078
|
+
],
|
|
1079
|
+
required: false
|
|
1080
|
+
},
|
|
1081
|
+
roundedStartStart: {
|
|
1082
|
+
type: [
|
|
1083
|
+
Boolean,
|
|
1084
|
+
Number,
|
|
1085
|
+
String
|
|
1086
|
+
],
|
|
1087
|
+
required: false
|
|
1088
|
+
},
|
|
1089
|
+
roundedStartEnd: {
|
|
1090
|
+
type: [
|
|
1091
|
+
Boolean,
|
|
1092
|
+
Number,
|
|
1093
|
+
String
|
|
1094
|
+
],
|
|
1095
|
+
required: false
|
|
1096
|
+
},
|
|
1097
|
+
roundedEndStart: {
|
|
1098
|
+
type: [
|
|
1099
|
+
Boolean,
|
|
1100
|
+
Number,
|
|
1101
|
+
String
|
|
1102
|
+
],
|
|
1103
|
+
required: false
|
|
1104
|
+
},
|
|
1105
|
+
roundedEndEnd: {
|
|
1106
|
+
type: [
|
|
1107
|
+
Boolean,
|
|
1108
|
+
Number,
|
|
1109
|
+
String
|
|
1110
|
+
],
|
|
1111
|
+
required: false
|
|
1112
|
+
},
|
|
1113
|
+
fontSize: {
|
|
1114
|
+
type: null,
|
|
1115
|
+
required: false
|
|
1116
|
+
},
|
|
1117
|
+
fontWeight: {
|
|
1118
|
+
type: null,
|
|
1119
|
+
required: false
|
|
1120
|
+
},
|
|
1121
|
+
lineHeight: {
|
|
1122
|
+
type: null,
|
|
1123
|
+
required: false
|
|
1124
|
+
},
|
|
1125
|
+
letterSpacing: {
|
|
1126
|
+
type: null,
|
|
1127
|
+
required: false
|
|
1128
|
+
},
|
|
1129
|
+
active: {
|
|
1130
|
+
type: [Boolean, Object],
|
|
1131
|
+
required: false
|
|
1132
|
+
},
|
|
1133
|
+
activeClass: {
|
|
1134
|
+
type: String,
|
|
1135
|
+
required: false
|
|
1136
|
+
},
|
|
1137
|
+
variant: {
|
|
1138
|
+
type: null,
|
|
1139
|
+
required: false
|
|
1140
|
+
},
|
|
1141
|
+
elevation: {
|
|
1142
|
+
type: [Number, String],
|
|
1143
|
+
required: false
|
|
1144
|
+
},
|
|
1145
|
+
size: {
|
|
1146
|
+
type: null,
|
|
1147
|
+
required: false
|
|
1148
|
+
},
|
|
1149
|
+
hideDetails: {
|
|
1150
|
+
type: [Boolean, String],
|
|
1151
|
+
required: false
|
|
1152
|
+
},
|
|
1153
|
+
hideSpinButtons: {
|
|
1154
|
+
type: Boolean,
|
|
1155
|
+
required: false
|
|
1156
|
+
},
|
|
1157
|
+
hint: {
|
|
1158
|
+
type: String,
|
|
1159
|
+
required: false
|
|
1160
|
+
},
|
|
1161
|
+
persistentHint: {
|
|
1162
|
+
type: Boolean,
|
|
1163
|
+
required: false
|
|
1164
|
+
},
|
|
1165
|
+
messages: {
|
|
1166
|
+
type: [Array, String],
|
|
1167
|
+
required: false
|
|
1168
|
+
},
|
|
1169
|
+
height: {
|
|
1170
|
+
type: [Number, String],
|
|
1171
|
+
required: false
|
|
1172
|
+
},
|
|
1173
|
+
maxHeight: {
|
|
1174
|
+
type: [Number, String],
|
|
1175
|
+
required: false
|
|
1176
|
+
},
|
|
1177
|
+
maxWidth: {
|
|
1178
|
+
type: [Number, String],
|
|
1179
|
+
required: false
|
|
1180
|
+
},
|
|
1181
|
+
minHeight: {
|
|
1182
|
+
type: [Number, String],
|
|
1183
|
+
required: false
|
|
1184
|
+
},
|
|
1185
|
+
minWidth: {
|
|
1186
|
+
type: [Number, String],
|
|
1187
|
+
required: false
|
|
1188
|
+
},
|
|
1189
|
+
width: {
|
|
1190
|
+
type: [Number, String],
|
|
1191
|
+
required: false
|
|
1192
|
+
},
|
|
1193
|
+
direction: {
|
|
1194
|
+
type: null,
|
|
1195
|
+
required: false
|
|
1196
|
+
},
|
|
1197
|
+
errorMessages: {
|
|
1198
|
+
type: [Array, String],
|
|
1199
|
+
required: false
|
|
1200
|
+
},
|
|
1201
|
+
maxErrors: {
|
|
1202
|
+
type: [Number, String],
|
|
1203
|
+
required: false
|
|
1204
|
+
},
|
|
1205
|
+
readonly: {
|
|
1206
|
+
type: Boolean,
|
|
1207
|
+
required: false
|
|
1208
|
+
},
|
|
1209
|
+
rules: {
|
|
1210
|
+
type: Array,
|
|
1211
|
+
required: false
|
|
1212
|
+
},
|
|
1213
|
+
validateOn: {
|
|
1214
|
+
type: null,
|
|
1215
|
+
required: false
|
|
1216
|
+
},
|
|
1217
|
+
validationValue: {
|
|
1218
|
+
type: null,
|
|
1219
|
+
required: false
|
|
1220
|
+
},
|
|
1221
|
+
appendAvatar: {
|
|
1222
|
+
type: String,
|
|
1223
|
+
required: false
|
|
1224
|
+
},
|
|
1225
|
+
appendIcon: {
|
|
1226
|
+
type: null,
|
|
1227
|
+
required: false
|
|
1228
|
+
},
|
|
1229
|
+
prependAvatar: {
|
|
1230
|
+
type: String,
|
|
1231
|
+
required: false
|
|
1232
|
+
},
|
|
1233
|
+
prependIcon: {
|
|
1234
|
+
type: null,
|
|
1235
|
+
required: false
|
|
1236
|
+
},
|
|
1237
|
+
prependAriaLabel: {
|
|
1238
|
+
type: String,
|
|
1239
|
+
required: false
|
|
1240
|
+
},
|
|
1241
|
+
appendAriaLabel: {
|
|
1242
|
+
type: String,
|
|
1243
|
+
required: false
|
|
1244
|
+
}
|
|
548
1245
|
});
|
|
1246
|
+
/*********************************************************
|
|
1247
|
+
* PDF P3 — display + dropzone aliasing + error
|
|
1248
|
+
*
|
|
1249
|
+
* @description
|
|
1250
|
+
* - `dropzone` is the new public alias for the legacy `dragndrop`
|
|
1251
|
+
* prop; both feed the same internal flag so existing consumers
|
|
1252
|
+
* aren't broken.
|
|
1253
|
+
* - `display` selects the multi-file rendering strategy: 'list',
|
|
1254
|
+
* 'chips', or 'counter'. Backward-compat: if the legacy `chips`
|
|
1255
|
+
* boolean is set it forces 'chips' regardless of `display`.
|
|
1256
|
+
* - `error` accepts `boolean | string`. The boolean value is forwarded
|
|
1257
|
+
* to `<OrigamField error>`; the string (when present) is rendered as
|
|
1258
|
+
* the dropzone error message and exposed via `errorMessage`.
|
|
1259
|
+
********************************************************/
|
|
549
1260
|
const isDropzoneMode = computed(() => Boolean(props.dropzone || props.dragndrop));
|
|
550
1261
|
const displayMode = computed(() => {
|
|
551
|
-
|
|
552
|
-
|
|
1262
|
+
if (props.chips) return FILE_FIELD_DISPLAY.CHIPS;
|
|
1263
|
+
return props.display ?? FILE_FIELD_DISPLAY.LIST;
|
|
553
1264
|
});
|
|
554
1265
|
const isErrored = computed(() => Boolean(props.error));
|
|
555
1266
|
const errorMessage = computed(() => typeof props.error === "string" ? props.error : "");
|
|
1267
|
+
// Concrete array of files used by the v-for sites below. Going
|
|
1268
|
+
// through a dedicated computed (rather than reading `model.value`
|
|
1269
|
+
// directly in the template) sidesteps a Vue compiler quirk where
|
|
1270
|
+
// re-binding `<v-for="(file, index) in model">` failed to invalidate
|
|
1271
|
+
// when the model was updated via the synthetic `change` event the
|
|
1272
|
+
// tests dispatch. The variable name `(item, idx)` is also used in
|
|
1273
|
+
// the templates for the same reason — `(file, …)` collided with the
|
|
1274
|
+
// implicit `file` reactive ref in the slot scope.
|
|
556
1275
|
const fileList = computed(() => {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
1276
|
+
const mv = props.modelValue;
|
|
1277
|
+
if (Array.isArray(mv)) return mv;
|
|
1278
|
+
if (mv instanceof File) return [mv];
|
|
1279
|
+
const m = model.value;
|
|
1280
|
+
return Array.isArray(m) ? m : [];
|
|
562
1281
|
});
|
|
563
|
-
const emits = defineEmits([
|
|
1282
|
+
const emits = defineEmits([
|
|
1283
|
+
"click:control",
|
|
1284
|
+
"mousedown:control",
|
|
1285
|
+
"click:remove",
|
|
1286
|
+
"click:download",
|
|
1287
|
+
"drop",
|
|
1288
|
+
"error:max-size",
|
|
1289
|
+
"update:focused",
|
|
1290
|
+
"click:appendInner",
|
|
1291
|
+
"click:prependInner",
|
|
1292
|
+
"click:clear",
|
|
1293
|
+
"update:modelValue",
|
|
1294
|
+
"click:append",
|
|
1295
|
+
"click:prepend"
|
|
1296
|
+
]);
|
|
564
1297
|
defineSlots();
|
|
565
1298
|
const slots = useSlots();
|
|
566
1299
|
const attrs = useAttrs();
|
|
567
1300
|
const { t } = useLocale();
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
1301
|
+
/*********************************************************
|
|
1302
|
+
* Value
|
|
1303
|
+
********************************************************/
|
|
1304
|
+
const model = useVModel(props, "modelValue", () => props.multiple ? [] : null, (val) => wrapInArray(val), (val) => props.multiple || Array.isArray(props.modelValue) ? val : val[0] ?? null);
|
|
1305
|
+
/*********************************************************
|
|
1306
|
+
* Adjacent
|
|
1307
|
+
*
|
|
1308
|
+
* @description
|
|
1309
|
+
* Handles click events for prepend/append and inner icons.
|
|
1310
|
+
********************************************************/
|
|
1311
|
+
/*********************************************************
|
|
1312
|
+
* Icon
|
|
1313
|
+
********************************************************/
|
|
1314
|
+
/*********************************************************
|
|
1315
|
+
* Composables
|
|
1316
|
+
********************************************************/
|
|
1317
|
+
const { onClickPrepend, onClickAppend: handleClickAppend } = useAdjacent(props, toRef(props, "prependIcon"), toRef(props, "appendIcon"));
|
|
1318
|
+
const { onClickPrependInner: handleClickPrependInner, onClickAppendInner: handleClickAppendInner } = useAdjacentInner(props);
|
|
1319
|
+
/*********************************************************
|
|
1320
|
+
* Reference Html
|
|
1321
|
+
*
|
|
1322
|
+
* @description
|
|
1323
|
+
* References to the underlying HTML elements and child components.
|
|
1324
|
+
********************************************************/
|
|
583
1325
|
const origamInputRef = ref();
|
|
584
1326
|
const origamFieldRef = ref();
|
|
585
1327
|
const inputRef = ref();
|
|
1328
|
+
/*********************************************************
|
|
1329
|
+
* Events & controls
|
|
1330
|
+
*
|
|
1331
|
+
* @description
|
|
1332
|
+
* Focus management, control clicks, clear, and input change handlers.
|
|
1333
|
+
********************************************************/
|
|
1334
|
+
/*********************************************************
|
|
1335
|
+
* Effect
|
|
1336
|
+
********************************************************/
|
|
586
1337
|
const { isFocused, onFocus, onBlur: handleBlur } = useFocus(props);
|
|
1338
|
+
/*********************************************************
|
|
1339
|
+
* isActive
|
|
1340
|
+
*
|
|
1341
|
+
* @description
|
|
1342
|
+
* #418 — `persistentPlaceholder` etait declaree dans l'interface et
|
|
1343
|
+
* absente du `.vue`. Elle n'etait pas non plus TRANSMISSIBLE : ni
|
|
1344
|
+
* `IInputProps` ni `IFieldProps` ne la declarent, donc `filterProps`,
|
|
1345
|
+
* qui filtre sur les cles de l'interface enfant, ne pouvait pas la faire
|
|
1346
|
+
* descendre. Elle se consomme ici, exactement comme chez les trois
|
|
1347
|
+
* freres (TextField, TextareaField, PasswordField) : elle force l'etat
|
|
1348
|
+
* actif du champ pour que le placeholder reste visible hors focus.
|
|
1349
|
+
********************************************************/
|
|
587
1350
|
const isActive = computed(() => {
|
|
588
|
-
|
|
1351
|
+
return props.persistentPlaceholder || isFocused.value || props.active;
|
|
589
1352
|
});
|
|
1353
|
+
/*********************************************************
|
|
1354
|
+
* Event handlers
|
|
1355
|
+
********************************************************/
|
|
590
1356
|
const handleFocus = () => {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
1357
|
+
nextTick(() => {
|
|
1358
|
+
const input = inputRef.value;
|
|
1359
|
+
if (input && input !== document.activeElement) {
|
|
1360
|
+
input.focus();
|
|
1361
|
+
}
|
|
1362
|
+
});
|
|
1363
|
+
if (!isFocused.value) onFocus();
|
|
598
1364
|
};
|
|
599
1365
|
const handleClickPrepend = (e) => {
|
|
600
|
-
|
|
601
|
-
|
|
1366
|
+
onClickPrepend(e);
|
|
1367
|
+
inputRef.value?.click();
|
|
602
1368
|
};
|
|
603
1369
|
const handleControlMousedown = (e) => {
|
|
604
|
-
|
|
1370
|
+
emits("mousedown:control", e);
|
|
605
1371
|
};
|
|
606
1372
|
const handleControlClick = (e) => {
|
|
607
|
-
|
|
608
|
-
|
|
1373
|
+
inputRef.value?.click();
|
|
1374
|
+
emits("click:control", e);
|
|
609
1375
|
};
|
|
610
1376
|
const handleClear = (e) => {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
1377
|
+
e.stopPropagation();
|
|
1378
|
+
handleFocus();
|
|
1379
|
+
nextTick(() => {
|
|
1380
|
+
model.value = [];
|
|
1381
|
+
emits("click:clear", e);
|
|
1382
|
+
});
|
|
617
1383
|
};
|
|
618
1384
|
const handleClick = (e, isReadonly) => {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
1385
|
+
e.stopPropagation();
|
|
1386
|
+
if (isReadonly.value) e.preventDefault();
|
|
1387
|
+
onFocus();
|
|
622
1388
|
};
|
|
623
1389
|
const handleChange = (e) => {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
1390
|
+
if (!e.target) return;
|
|
1391
|
+
const target = e.target;
|
|
1392
|
+
const files = filterBySize([...target.files ?? []]);
|
|
1393
|
+
if (props.dragndrop && props.multiple && hasFiles.value) {
|
|
1394
|
+
model.value = [...model.value ?? [], ...files];
|
|
1395
|
+
} else {
|
|
1396
|
+
model.value = files;
|
|
1397
|
+
}
|
|
632
1398
|
};
|
|
1399
|
+
/*********************************************************
|
|
1400
|
+
* Drag & Drop
|
|
1401
|
+
*
|
|
1402
|
+
* @description
|
|
1403
|
+
* Drag and drop event handlers for the dropzone mode.
|
|
1404
|
+
********************************************************/
|
|
633
1405
|
const isDragging = ref(false);
|
|
634
1406
|
const handleBrowseClick = () => {
|
|
635
|
-
|
|
1407
|
+
inputRef.value?.click();
|
|
636
1408
|
};
|
|
637
1409
|
const handleDragEnter = () => {
|
|
638
|
-
|
|
639
|
-
|
|
1410
|
+
if (props.disabled || props.readonly) return;
|
|
1411
|
+
isDragging.value = true;
|
|
640
1412
|
};
|
|
641
1413
|
const handleDragOver = (e) => {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
1414
|
+
if (props.disabled || props.readonly) return;
|
|
1415
|
+
if (e.dataTransfer) e.dataTransfer.dropEffect = "copy";
|
|
1416
|
+
isDragging.value = true;
|
|
645
1417
|
};
|
|
646
1418
|
const handleDragLeave = (e) => {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
1419
|
+
const currentTarget = e.currentTarget;
|
|
1420
|
+
const related = e.relatedTarget;
|
|
1421
|
+
if (currentTarget && related && currentTarget.contains(related)) return;
|
|
1422
|
+
isDragging.value = false;
|
|
651
1423
|
};
|
|
652
1424
|
const handleDrop = (e) => {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
1425
|
+
isDragging.value = false;
|
|
1426
|
+
if (props.disabled || props.readonly) return;
|
|
1427
|
+
const dropped = Array.from(e.dataTransfer?.files ?? []);
|
|
1428
|
+
const filtered = filterBySize(dropped);
|
|
1429
|
+
const limited = props.multiple ? filtered : filtered.slice(0, 1);
|
|
1430
|
+
if (props.multiple && hasFiles.value) {
|
|
1431
|
+
model.value = [...model.value ?? [], ...limited];
|
|
1432
|
+
} else {
|
|
1433
|
+
model.value = limited;
|
|
1434
|
+
}
|
|
1435
|
+
emits("drop", {
|
|
1436
|
+
files: limited,
|
|
1437
|
+
event: e
|
|
1438
|
+
});
|
|
664
1439
|
};
|
|
1440
|
+
/*********************************************************
|
|
1441
|
+
* File management
|
|
1442
|
+
*
|
|
1443
|
+
* @description
|
|
1444
|
+
* File size validation, remove and download handlers.
|
|
1445
|
+
********************************************************/
|
|
665
1446
|
const filterBySize = (files) => {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
return accepted;
|
|
1447
|
+
if (!props.maxFileSize) return files;
|
|
1448
|
+
const accepted = [];
|
|
1449
|
+
const rejected = [];
|
|
1450
|
+
for (const file of files) {
|
|
1451
|
+
if (file.size <= props.maxFileSize) {
|
|
1452
|
+
accepted.push(file);
|
|
1453
|
+
} else {
|
|
1454
|
+
rejected.push(file);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
if (rejected.length > 0) {
|
|
1458
|
+
emits("error:max-size", {
|
|
1459
|
+
files: rejected,
|
|
1460
|
+
maxFileSize: props.maxFileSize,
|
|
1461
|
+
message: rejected.map((file) => t(props.maxFileSizeErrorString, [file.name, humanReadableFileSize(props.maxFileSize, base.value)]))
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
return accepted;
|
|
687
1465
|
};
|
|
688
1466
|
const handleRemove = (index) => {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
1467
|
+
const files = [...model.value ?? []];
|
|
1468
|
+
const [removed] = files.splice(index, 1);
|
|
1469
|
+
model.value = files;
|
|
1470
|
+
emits("click:remove", {
|
|
1471
|
+
file: removed,
|
|
1472
|
+
index
|
|
1473
|
+
});
|
|
693
1474
|
};
|
|
694
1475
|
const handleDownload = (index, file) => {
|
|
695
|
-
|
|
1476
|
+
emits("click:download", {
|
|
1477
|
+
file,
|
|
1478
|
+
index
|
|
1479
|
+
});
|
|
696
1480
|
};
|
|
1481
|
+
/*********************************************************
|
|
1482
|
+
* Watcher
|
|
1483
|
+
*
|
|
1484
|
+
* @description
|
|
1485
|
+
* Resets the native input value when the model is cleared.
|
|
1486
|
+
********************************************************/
|
|
697
1487
|
watch(model, (newValue) => {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
1488
|
+
const hasModelReset = !Array.isArray(newValue) || !newValue.length;
|
|
1489
|
+
if (hasModelReset && inputRef.value) {
|
|
1490
|
+
inputRef.value.value = "";
|
|
1491
|
+
}
|
|
702
1492
|
});
|
|
1493
|
+
/*********************************************************
|
|
1494
|
+
* Counter & details
|
|
1495
|
+
*
|
|
1496
|
+
* @description
|
|
1497
|
+
* File counter, file size display, and details slot visibility.
|
|
1498
|
+
********************************************************/
|
|
703
1499
|
const base = computed(() => {
|
|
704
|
-
|
|
1500
|
+
return typeof props.showSize !== "boolean" ? props.showSize : undefined;
|
|
705
1501
|
});
|
|
706
1502
|
const totalBytes = computed(() => {
|
|
707
|
-
|
|
1503
|
+
return (model.value ?? []).reduce((bytes, { size = 0 }) => bytes + size, 0);
|
|
708
1504
|
});
|
|
709
1505
|
const totalBytesReadable = computed(() => {
|
|
710
|
-
|
|
1506
|
+
return humanReadableFileSize(totalBytes.value, base.value);
|
|
711
1507
|
});
|
|
712
1508
|
const fileNames = computed(() => {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
1509
|
+
return (model.value ?? []).map((file) => {
|
|
1510
|
+
const { name = "", size = 0 } = file;
|
|
1511
|
+
return !props.showSize ? name : `${name} (${humanReadableFileSize(size, base.value)})`;
|
|
1512
|
+
});
|
|
717
1513
|
});
|
|
718
1514
|
const selectionText = computed(() => {
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
1515
|
+
if (!hasFiles.value) return "";
|
|
1516
|
+
if (props.multiple) {
|
|
1517
|
+
return t(props.counterString, model.value?.length ?? 0);
|
|
1518
|
+
}
|
|
1519
|
+
return fileNames.value[0] ?? "";
|
|
724
1520
|
});
|
|
725
1521
|
const counterValue = computed(() => {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
1522
|
+
const fileCount = model.value?.length ?? 0;
|
|
1523
|
+
if (props.showSize) {
|
|
1524
|
+
return t(props.counterSizeString, fileCount, totalBytesReadable.value);
|
|
1525
|
+
}
|
|
1526
|
+
return t(props.counterString, fileCount);
|
|
731
1527
|
});
|
|
732
1528
|
const hasFiles = computed(() => {
|
|
733
|
-
|
|
1529
|
+
return Array.isArray(model.value) && model.value.length > 0;
|
|
734
1530
|
});
|
|
735
1531
|
const hasCounter = computed(() => {
|
|
736
|
-
|
|
1532
|
+
return slots.counter || props.counter;
|
|
737
1533
|
});
|
|
738
1534
|
const hasDetails = computed(() => {
|
|
739
|
-
|
|
1535
|
+
return slots.details || hasCounter.value;
|
|
740
1536
|
});
|
|
741
1537
|
const hasChips = computed(() => {
|
|
742
|
-
|
|
1538
|
+
return displayMode.value === FILE_FIELD_DISPLAY.CHIPS || slots.chip;
|
|
743
1539
|
});
|
|
744
1540
|
const hasInlineCounter = computed(() => {
|
|
745
|
-
|
|
1541
|
+
return displayMode.value === FILE_FIELD_DISPLAY.COUNTER && hasFiles.value && props.multiple;
|
|
746
1542
|
});
|
|
747
1543
|
const inlineCounterValue = computed(() => {
|
|
748
|
-
|
|
1544
|
+
return model.value?.length ?? 0;
|
|
749
1545
|
});
|
|
1546
|
+
/*********************************************************
|
|
1547
|
+
* resolvedChipProps
|
|
1548
|
+
*
|
|
1549
|
+
* @description
|
|
1550
|
+
* #418 — ce computed s'appelait `chipProps`, exactement comme la prop
|
|
1551
|
+
* publique du meme nom. Le compilateur SFC resout un identifiant du
|
|
1552
|
+
* template vers le binding `setup-ref` en priorite : `v-bind="chipProps"`
|
|
1553
|
+
* lisait donc le computed, et `props.chipProps` n'a jamais ete lue depuis
|
|
1554
|
+
* sa creation (`git log -S "props.chipProps"` : vide). L'audit statique
|
|
1555
|
+
* des props non consommees ne pouvait pas le voir non plus, l'identifiant
|
|
1556
|
+
* etant bien present dans le template.
|
|
1557
|
+
* @description
|
|
1558
|
+
* Le patron correct est celui d'`OrigamSelect` : les valeurs internes
|
|
1559
|
+
* d'abord, la prop du consommateur etalee EN DERNIER pour qu'elle puisse
|
|
1560
|
+
* surcharger.
|
|
1561
|
+
********************************************************/
|
|
750
1562
|
const resolvedChipProps = computed(() => {
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
1563
|
+
return {
|
|
1564
|
+
closable: !props.disabled && !props.readonly,
|
|
1565
|
+
color: props.color,
|
|
1566
|
+
...props.chipProps
|
|
1567
|
+
};
|
|
756
1568
|
});
|
|
757
1569
|
const getProgress = (index) => {
|
|
758
|
-
|
|
1570
|
+
return props.progress?.[index] ?? 0;
|
|
759
1571
|
};
|
|
1572
|
+
/*********************************************************
|
|
1573
|
+
* Dropzone text
|
|
1574
|
+
*
|
|
1575
|
+
* @description
|
|
1576
|
+
* Translated text for the dropzone title and subtitle.
|
|
1577
|
+
********************************************************/
|
|
760
1578
|
const dropzoneTitleText = computed(() => {
|
|
761
|
-
|
|
1579
|
+
return t(props.dropzoneTitle);
|
|
762
1580
|
});
|
|
763
1581
|
const dropzoneSubtitleText = computed(() => {
|
|
764
|
-
|
|
1582
|
+
return t(props.dropzoneSubtitle);
|
|
765
1583
|
});
|
|
1584
|
+
/*********************************************************
|
|
1585
|
+
* Props
|
|
1586
|
+
*
|
|
1587
|
+
* @description
|
|
1588
|
+
* Filtered props for the underlying origam-input and origam-field components.
|
|
1589
|
+
********************************************************/
|
|
766
1590
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
1591
|
+
/*********************************************************
|
|
1592
|
+
* Forwarded props
|
|
1593
|
+
********************************************************/
|
|
1594
|
+
/*********************************************************
|
|
1595
|
+
* inputProps
|
|
1596
|
+
*
|
|
1597
|
+
* @description
|
|
1598
|
+
* #421 — `id` is deliberately NOT filtered out: OrigamInput needs it to
|
|
1599
|
+
* build `<id>-messages`, the target of its own `aria-describedby`, and
|
|
1600
|
+
* to feed its default slot's `id` (consumed by OrigamField, then the
|
|
1601
|
+
* real `<input type="file">`). Filtering it forced OrigamInput to
|
|
1602
|
+
* invent an id, so a consumer passing `id` got an input unreachable by
|
|
1603
|
+
* `getElementById` and a `<label for>` pointing nowhere — same fix as
|
|
1604
|
+
* OrigamTextField (ce365b10).
|
|
1605
|
+
********************************************************/
|
|
767
1606
|
const inputProps = computed(() => {
|
|
768
|
-
|
|
1607
|
+
/*********************************************************
|
|
1608
|
+
* Border withheld — #726
|
|
1609
|
+
*
|
|
1610
|
+
* @description
|
|
1611
|
+
* Withheld from the INPUT (no notch, its top edge crosses the floating
|
|
1612
|
+
* label) and handed to the FIELD's notched outline instead.
|
|
1613
|
+
********************************************************/
|
|
1614
|
+
return filterPropsOf(OrigamInput, props, [
|
|
1615
|
+
"modelValue",
|
|
1616
|
+
"class",
|
|
1617
|
+
"style",
|
|
1618
|
+
"focused",
|
|
1619
|
+
...BORDER_PROP_KEYS
|
|
1620
|
+
]);
|
|
769
1621
|
});
|
|
770
1622
|
const fieldProps = computed(() => {
|
|
771
|
-
|
|
1623
|
+
return filterPropsOf(OrigamField, props, [
|
|
1624
|
+
"class",
|
|
1625
|
+
"style",
|
|
1626
|
+
"id",
|
|
1627
|
+
"active",
|
|
1628
|
+
"dirty",
|
|
1629
|
+
"disabled",
|
|
1630
|
+
"focused",
|
|
1631
|
+
"error"
|
|
1632
|
+
]);
|
|
772
1633
|
});
|
|
1634
|
+
/*********************************************************
|
|
1635
|
+
* Class & Style
|
|
1636
|
+
*
|
|
1637
|
+
* @description
|
|
1638
|
+
* fileFieldClasses is a computed property that returns an array of classes for the fileField element.
|
|
1639
|
+
* fileFieldStyles is a computed property that returns an array of styles for the fileField element.
|
|
1640
|
+
********************************************************/
|
|
773
1641
|
const fileFieldStyles = computed(() => {
|
|
774
|
-
|
|
775
|
-
props.style
|
|
776
|
-
];
|
|
1642
|
+
return [props.style];
|
|
777
1643
|
});
|
|
778
1644
|
const fileFieldClasses = computed(() => {
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
1645
|
+
return [
|
|
1646
|
+
"origam-file-field",
|
|
1647
|
+
{
|
|
1648
|
+
"origam-file-field--chips": props.chips,
|
|
1649
|
+
"origam-file-field--dragndrop": props.dragndrop
|
|
1650
|
+
},
|
|
1651
|
+
props.class
|
|
1652
|
+
];
|
|
787
1653
|
});
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
1654
|
+
// Phase 3 (Vague B) — class-first companion alongside inline styles.
|
|
1655
|
+
// `dropzoneColorClasses` carries `.origam--bg-{intent}` /
|
|
1656
|
+
// `.origam--color-{intent}` for tokenised intents on the dropzone;
|
|
1657
|
+
// `dropzoneColorStyles` keeps the legacy fallback for raw colors.
|
|
1658
|
+
/*********************************************************
|
|
1659
|
+
* Color
|
|
1660
|
+
********************************************************/
|
|
1661
|
+
const { colorClasses: dropzoneColorClasses, colorStyles: dropzoneColorStyles } = useBothColor(toRef(props, "bgColor"), toRef(props, "color"));
|
|
792
1662
|
const { densityClasses: dropzoneDensityClasses } = useDensity(props, "origam-file-field__dropzone");
|
|
793
1663
|
const dropzoneClasses = computed(() => {
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
1664
|
+
return [
|
|
1665
|
+
"origam-file-field__dropzone",
|
|
1666
|
+
{
|
|
1667
|
+
"origam-file-field__dropzone--dragging": isDragging.value,
|
|
1668
|
+
"origam-file-field__dropzone--disabled": props.disabled,
|
|
1669
|
+
"origam-file-field__dropzone--readonly": props.readonly,
|
|
1670
|
+
"origam-file-field__dropzone--has-file": !props.multiple && hasFiles.value,
|
|
1671
|
+
"origam-file-field__dropzone--error": isErrored.value
|
|
1672
|
+
},
|
|
1673
|
+
dropzoneColorClasses.value,
|
|
1674
|
+
dropzoneDensityClasses.value
|
|
1675
|
+
];
|
|
806
1676
|
});
|
|
1677
|
+
/*********************************************************
|
|
1678
|
+
* Expose
|
|
1679
|
+
*
|
|
1680
|
+
* @description
|
|
1681
|
+
* Exposes functions and components to the world.
|
|
1682
|
+
* filterProps is a function that filters out props that are not defined in the `IFileFieldProps` interface.
|
|
1683
|
+
********************************************************/
|
|
807
1684
|
const { filterProps } = useProps(props);
|
|
808
1685
|
const { id, css, load, isLoaded, unload } = useStyle(fileFieldStyles);
|
|
809
1686
|
defineExpose(forwardRefs({
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
1687
|
+
filterProps,
|
|
1688
|
+
css,
|
|
1689
|
+
id,
|
|
1690
|
+
load,
|
|
1691
|
+
unload,
|
|
1692
|
+
isLoaded
|
|
816
1693
|
}, origamInputRef, origamFieldRef, inputRef));
|
|
817
1694
|
</script>
|
|
818
1695
|
|