@lucca-front/ng 22.0.5 → 22.0.6-rc.1
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/README.md +6 -0
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs +5 -4
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +22 -15
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +4 -4
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll.mjs +2 -3
- package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
- package/llms/SKILL.md +248 -0
- package/llms/references/components/activity-feed/activity-feed.component.md +292 -0
- package/llms/references/components/activity-feed/activity-feed.md +90 -0
- package/llms/references/components/animations/animations.component.md +11 -0
- package/llms/references/components/animations/animations.md +7 -0
- package/llms/references/components/api-select/api-select.md +40 -0
- package/llms/references/components/app-layout/app-layout.component.md +65 -0
- package/llms/references/components/app-layout/app-layout.md +81 -0
- package/llms/references/components/approbation-inbox/approbation-inbox.component.md +960 -0
- package/llms/references/components/approbation-inbox/approbation-inbox.md +135 -0
- package/llms/references/components/avatar/avatar.component.md +563 -0
- package/llms/references/components/avatar/avatar.md +93 -0
- package/llms/references/components/box/box.component.md +119 -0
- package/llms/references/components/box/box.md +88 -0
- package/llms/references/components/breadcrumbs/breadcrumbs.component.md +59 -0
- package/llms/references/components/breadcrumbs/breadcrumbs.md +87 -0
- package/llms/references/components/bubble-icon/bubble-icon.component.md +56 -0
- package/llms/references/components/bubble-icon/bubble-icon.md +72 -0
- package/llms/references/components/bubble-illustration/bubble-illustration.component.md +54 -0
- package/llms/references/components/bubble-illustration/bubble-illustration.md +77 -0
- package/llms/references/components/button/button.component.md +252 -0
- package/llms/references/components/button/button.md +124 -0
- package/llms/references/components/calendar/calendar.component.md +708 -0
- package/llms/references/components/calendar/calendar.md +104 -0
- package/llms/references/components/calendar2/calendar2.md +64 -0
- package/llms/references/components/callout/callout.component.md +237 -0
- package/llms/references/components/callout/callout.md +243 -0
- package/llms/references/components/callout-disclosure/callout-disclosure.component.md +230 -0
- package/llms/references/components/callout-disclosure/callout-disclosure.md +196 -0
- package/llms/references/components/callout-popover/callout-popover.component.md +170 -0
- package/llms/references/components/callout-popover/callout-popover.md +201 -0
- package/llms/references/components/card/card.component.md +62 -0
- package/llms/references/components/card/card.md +8 -0
- package/llms/references/components/checkbox/checkbox.component.md +50 -0
- package/llms/references/components/checkbox/checkbox.md +74 -0
- package/llms/references/components/chip/chip.component.md +131 -0
- package/llms/references/components/chip/chip.md +95 -0
- package/llms/references/components/clear/clear.component.md +38 -0
- package/llms/references/components/clear/clear.md +79 -0
- package/llms/references/components/code/code.component.md +33 -0
- package/llms/references/components/code/code.md +47 -0
- package/llms/references/components/color/color.md +32 -0
- package/llms/references/components/color-input/color-input.md +33 -0
- package/llms/references/components/color-picker/color-picker.component.md +29 -0
- package/llms/references/components/color-picker/color-picker.md +25 -0
- package/llms/references/components/comment/comment.component.md +436 -0
- package/llms/references/components/comment/comment.md +125 -0
- package/llms/references/components/container/container.component.md +41 -0
- package/llms/references/components/container/container.md +74 -0
- package/llms/references/components/core-select-department/core-select-department.md +37 -0
- package/llms/references/components/core-select-establishment/core-select-establishment.md +40 -0
- package/llms/references/components/core-select-job-qualification/core-select-job-qualification.md +25 -0
- package/llms/references/components/core-select-occupation-category/core-select-occupation-category.md +25 -0
- package/llms/references/components/core-select-user/core-select-user.md +75 -0
- package/llms/references/components/data-presentation/data-presentation.component.md +47 -0
- package/llms/references/components/data-presentation/data-presentation.md +49 -0
- package/llms/references/components/data-table/data-table.component.md +1603 -0
- package/llms/references/components/data-table/data-table.md +290 -0
- package/llms/references/components/date/date.component.md +31 -0
- package/llms/references/components/date/date.md +140 -0
- package/llms/references/components/dateinput/dateinput.component.md +99 -0
- package/llms/references/components/dateinput/dateinput.md +198 -0
- package/llms/references/components/daterangeinput/daterangeinput.component.md +49 -0
- package/llms/references/components/daterangeinput/daterangeinput.md +186 -0
- package/llms/references/components/departmentselect/departmentselect.component.md +43 -0
- package/llms/references/components/departmentselect/departmentselect.md +43 -0
- package/llms/references/components/dialog/dialog.component.md +462 -0
- package/llms/references/components/dialog/dialog.md +335 -0
- package/llms/references/components/divider/divider.component.md +35 -0
- package/llms/references/components/divider/divider.md +88 -0
- package/llms/references/components/dropdown/dropdown.component.md +272 -0
- package/llms/references/components/dropdown/dropdown.md +172 -0
- package/llms/references/components/duration-picker/duration-picker.md +155 -0
- package/llms/references/components/empty-state/empty-state.component.md +226 -0
- package/llms/references/components/empty-state/empty-state.md +62 -0
- package/llms/references/components/errorpage/errorpage.component.md +57 -0
- package/llms/references/components/errorpage/errorpage.md +75 -0
- package/llms/references/components/establishmentselect/establishmentselect.component.md +30 -0
- package/llms/references/components/establishmentselect/establishmentselect.md +42 -0
- package/llms/references/components/fancy-dialog/fancy-dialog.component.md +9 -0
- package/llms/references/components/fancy-dialog/fancy-dialog.md +107 -0
- package/llms/references/components/fancybox/fancybox.component.md +48 -0
- package/llms/references/components/fancybox/fancybox.md +75 -0
- package/llms/references/components/fieldset/fieldset.component.md +86 -0
- package/llms/references/components/fieldset/fieldset.md +119 -0
- package/llms/references/components/filedropzone/filedropzone.component.md +16 -0
- package/llms/references/components/filedropzone/filedropzone.md +61 -0
- package/llms/references/components/fileentry/fileentry.component.md +58 -0
- package/llms/references/components/fileentry/fileentry.md +246 -0
- package/llms/references/components/fileupload/fileupload.component.md +91 -0
- package/llms/references/components/fileupload/fileupload.md +246 -0
- package/llms/references/components/filterbar/filterbar.component.md +302 -0
- package/llms/references/components/filterbar/filterbar.md +134 -0
- package/llms/references/components/filterpills/filterpills.component.md +60 -0
- package/llms/references/components/filterpills/filterpills.md +180 -0
- package/llms/references/components/footer/footer.component.md +66 -0
- package/llms/references/components/footer/footer.md +115 -0
- package/llms/references/components/form/form.md +37 -0
- package/llms/references/components/form-field/form-field.component.md +46 -0
- package/llms/references/components/form-field/form-field.md +231 -0
- package/llms/references/components/form-header/form-header.md +29 -0
- package/llms/references/components/form-label/form-label.component.md +106 -0
- package/llms/references/components/form-label/form-label.md +98 -0
- package/llms/references/components/gauge/gauge.component.md +55 -0
- package/llms/references/components/gauge/gauge.md +73 -0
- package/llms/references/components/grid/grid.component.md +15 -0
- package/llms/references/components/grid/grid.md +112 -0
- package/llms/references/components/highlight-data/highlight-data.component.md +279 -0
- package/llms/references/components/highlight-data/highlight-data.md +115 -0
- package/llms/references/components/highlight-section/highlight-section.component.md +185 -0
- package/llms/references/components/highlight-section/highlight-section.md +48 -0
- package/llms/references/components/highlight-text/highlight-text.component.md +49 -0
- package/llms/references/components/highlight-text/highlight-text.md +29 -0
- package/llms/references/components/horizontalnavigation/horizontalnavigation.component.md +232 -0
- package/llms/references/components/horizontalnavigation/horizontalnavigation.md +95 -0
- package/llms/references/components/icons/icons.component.md +59 -0
- package/llms/references/components/icons/icons.md +185 -0
- package/llms/references/components/impersonation/impersonation.component.md +52 -0
- package/llms/references/components/impersonation/impersonation.md +52 -0
- package/llms/references/components/index-table/index-table.component.md +2528 -0
- package/llms/references/components/index-table/index-table.md +243 -0
- package/llms/references/components/inlinemessage/inlinemessage.component.md +58 -0
- package/llms/references/components/inlinemessage/inlinemessage.md +57 -0
- package/llms/references/components/input-framed/input-framed.component.md +714 -0
- package/llms/references/components/input-framed/input-framed.md +50 -0
- package/llms/references/components/link/link.component.md +153 -0
- package/llms/references/components/link/link.md +124 -0
- package/llms/references/components/listbox/listbox.component.md +11 -0
- package/llms/references/components/listbox/listbox.md +101 -0
- package/llms/references/components/listing/listing.component.md +366 -0
- package/llms/references/components/listing/listing.md +105 -0
- package/llms/references/components/loading/loading.component.md +37 -0
- package/llms/references/components/loading/loading.md +91 -0
- package/llms/references/components/main-layout/main-layout.component.md +146 -0
- package/llms/references/components/main-layout/main-layout.md +78 -0
- package/llms/references/components/mobile-push/mobile-push.component.md +62 -0
- package/llms/references/components/mobile-push/mobile-push.md +70 -0
- package/llms/references/components/mobileheader/mobileheader.component.md +31 -0
- package/llms/references/components/mobileheader/mobileheader.md +8 -0
- package/llms/references/components/mobilenavigation/mobilenavigation.component.md +43 -0
- package/llms/references/components/mobilenavigation/mobilenavigation.md +8 -0
- package/llms/references/components/modal/modal.component.md +37 -0
- package/llms/references/components/modal/modal.md +61 -0
- package/llms/references/components/multi-select/multi-select.component.md +39 -0
- package/llms/references/components/multi-select/multi-select.md +426 -0
- package/llms/references/components/multilanguagefield/multilanguagefield.component.md +84 -0
- package/llms/references/components/multilanguagefield/multilanguagefield.md +362 -0
- package/llms/references/components/newbadge/newbadge.component.md +23 -0
- package/llms/references/components/newbadge/newbadge.md +38 -0
- package/llms/references/components/number-format-input/number-format-input.md +46 -0
- package/llms/references/components/number-input/number-input.md +49 -0
- package/llms/references/components/numbers/numbers.component.md +46 -0
- package/llms/references/components/numbers/numbers.md +7 -0
- package/llms/references/components/numericbadge/numericbadge.component.md +66 -0
- package/llms/references/components/numericbadge/numericbadge.md +84 -0
- package/llms/references/components/onboarding-empty-state/onboarding-empty-state.md +47 -0
- package/llms/references/components/pageheader/pageheader.component.md +389 -0
- package/llms/references/components/pageheader/pageheader.md +144 -0
- package/llms/references/components/pagination/pagination.component.md +96 -0
- package/llms/references/components/pagination/pagination.md +107 -0
- package/llms/references/components/phonenumberfield/phonenumberfield.component.md +35 -0
- package/llms/references/components/phonenumberfield/phonenumberfield.md +131 -0
- package/llms/references/components/plg-push/plg-push.component.md +91 -0
- package/llms/references/components/plg-push/plg-push.md +82 -0
- package/llms/references/components/popover/popover.component.md +130 -0
- package/llms/references/components/popover/popover.md +235 -0
- package/llms/references/components/popover2/popover2.component.md +103 -0
- package/llms/references/components/popover2/popover2.md +89 -0
- package/llms/references/components/progress-bar/progress-bar.component.md +33 -0
- package/llms/references/components/progress-bar/progress-bar.md +51 -0
- package/llms/references/components/progress-stepper/progress-stepper.component.md +281 -0
- package/llms/references/components/progress-stepper/progress-stepper.md +70 -0
- package/llms/references/components/radiofield/radiofield.component.md +295 -0
- package/llms/references/components/radiofield/radiofield.md +122 -0
- package/llms/references/components/readmore/readmore.component.md +60 -0
- package/llms/references/components/readmore/readmore.md +88 -0
- package/llms/references/components/resource-card/resource-card.component.md +216 -0
- package/llms/references/components/resource-card/resource-card.md +106 -0
- package/llms/references/components/richtextinput/richtextinput.component.md +298 -0
- package/llms/references/components/richtextinput/richtextinput.md +275 -0
- package/llms/references/components/scroll/scroll.md +45 -0
- package/llms/references/components/scrollbox/scrollbox.component.md +63 -0
- package/llms/references/components/scrollbox/scrollbox.md +49 -0
- package/llms/references/components/section-empty-state/section-empty-state.component.md +9 -0
- package/llms/references/components/section-empty-state/section-empty-state.md +41 -0
- package/llms/references/components/segmented-control-tabs/segmented-control-tabs.md +50 -0
- package/llms/references/components/segmentedcontrol/segmentedcontrol.component.md +198 -0
- package/llms/references/components/segmentedcontrol/segmentedcontrol.md +108 -0
- package/llms/references/components/select/select.component.md +237 -0
- package/llms/references/components/select/select.md +57 -0
- package/llms/references/components/select-templating/select-templating.md +117 -0
- package/llms/references/components/sidepanel/sidepanel.component.md +56 -0
- package/llms/references/components/sidepanel/sidepanel.md +7 -0
- package/llms/references/components/simple-select/simple-select.component.md +39 -0
- package/llms/references/components/simple-select/simple-select.md +291 -0
- package/llms/references/components/skeleton/skeleton.component.md +133 -0
- package/llms/references/components/skeleton/skeleton.md +212 -0
- package/llms/references/components/skiplinks/skiplinks.component.md +91 -0
- package/llms/references/components/skiplinks/skiplinks.md +73 -0
- package/llms/references/components/software-icon/software-icon.component.md +61 -0
- package/llms/references/components/software-icon/software-icon.md +107 -0
- package/llms/references/components/sortable-list/sortable-list.component.md +141 -0
- package/llms/references/components/sortable-list/sortable-list.md +84 -0
- package/llms/references/components/statusbadge/statusbadge.component.md +56 -0
- package/llms/references/components/statusbadge/statusbadge.md +63 -0
- package/llms/references/components/switchfield/switchfield.component.md +114 -0
- package/llms/references/components/switchfield/switchfield.md +56 -0
- package/llms/references/components/tableofcontent/tableofcontent.component.md +55 -0
- package/llms/references/components/tableofcontent/tableofcontent.md +41 -0
- package/llms/references/components/tags/tags.component.md +112 -0
- package/llms/references/components/tags/tags.md +115 -0
- package/llms/references/components/text-flow/text-flow.component.md +71 -0
- package/llms/references/components/text-flow/text-flow.md +63 -0
- package/llms/references/components/textareafield/textareafield.component.md +69 -0
- package/llms/references/components/textareafield/textareafield.md +113 -0
- package/llms/references/components/textfield/textfield.component.md +617 -0
- package/llms/references/components/textfield/textfield.md +161 -0
- package/llms/references/components/tile/tile.component.md +91 -0
- package/llms/references/components/tile/tile.md +92 -0
- package/llms/references/components/time/time.component.md +270 -0
- package/llms/references/components/time/time.md +127 -0
- package/llms/references/components/time-picker/time-picker.md +63 -0
- package/llms/references/components/timelines/timelines.component.md +159 -0
- package/llms/references/components/timelines/timelines.md +8 -0
- package/llms/references/components/title-and-text/title-and-text.component.md +14 -0
- package/llms/references/components/title-and-text/title-and-text.md +60 -0
- package/llms/references/components/toasts/toasts.component.md +54 -0
- package/llms/references/components/toasts/toasts.md +112 -0
- package/llms/references/components/tooltip/tooltip.component.md +86 -0
- package/llms/references/components/tooltip/tooltip.md +217 -0
- package/llms/references/components/treeselect/treeselect.component.md +62 -0
- package/llms/references/components/treeselect/treeselect.md +58 -0
- package/llms/references/components/user-select/user-select.md +52 -0
- package/llms/references/components/userpopover/userpopover.component.md +50 -0
- package/llms/references/components/userpopover/userpopover.md +136 -0
- package/llms/references/components/verticalnavigation/verticalnavigation.component.md +236 -0
- package/llms/references/components/verticalnavigation/verticalnavigation.md +115 -0
- package/llms/references/migrations.md +32 -0
- package/llms/references/tools/angular-api.md +337 -0
- package/llms/references/tools/animations.md +173 -0
- package/llms/references/tools/mixins.md +106 -0
- package/llms/references/tools/numbers.md +81 -0
- package/llms/references/tools/scrollbox.md +59 -0
- package/llms/references/tools/utilitaires.md +951 -0
- package/llms/references/types/BubbleIllustration.md +5 -0
- package/llms/references/types/DecorativePalette.md +5 -0
- package/llms/references/types/Gap.md +5 -0
- package/llms/references/types/HighlightDataIllustration.md +5 -0
- package/llms/references/types/HighlightSectionIllustration.md +5 -0
- package/llms/references/types/LuccaIcon.md +5 -0
- package/llms/references/types/MainLayoutIllustrationEndStart.md +5 -0
- package/llms/references/types/MainLayoutIllustrationStartEnd.md +5 -0
- package/llms.txt +221 -0
- package/package.json +12 -6
- package/types/lucca-front-ng-approbation-inbox.d.ts +3 -3
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# fileupload — Code & Implementation
|
|
2
|
+
|
|
3
|
+
📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-file-fileupload-angular-basic--docs)
|
|
4
|
+
|
|
5
|
+
## Angular
|
|
6
|
+
|
|
7
|
+
Les stories "Single file" et "Multiple files" simulent un usage avec Lucca Files. Consultez la section Mise en place en bas de page pour vous aider lors de l'implémentation.
|
|
8
|
+
|
|
9
|
+
## Mise en place
|
|
10
|
+
|
|
11
|
+
FileUpload is a component designed to manage file uploads. It aims to standardize both the technical and visual
|
|
12
|
+
approaches to file uploads.
|
|
13
|
+
|
|
14
|
+
### Utilisation
|
|
15
|
+
|
|
16
|
+
For the purely visual and interactive part, you'll need `lu-single-file-upload` if you only want to manage
|
|
17
|
+
one file at a time, or `lu-multiple-file-upload` if you want to manage multiple files at once.
|
|
18
|
+
|
|
19
|
+
Both of these components come from `@lucca-front/ng/file-upload`.
|
|
20
|
+
|
|
21
|
+
In both components, simply connect to the `filePicked` event to retrieve the files sent by the user, these are of
|
|
22
|
+
the native Javascript File type, and each file will emit an event. In the case of multiple selections, an event
|
|
23
|
+
will be emitted per file.
|
|
24
|
+
|
|
25
|
+
Then, you'll just need to manage the upload of these files via LuccaFiles for most cases.
|
|
26
|
+
|
|
27
|
+
Once the files are sent, the display management changes depending on the approach, single or multi.
|
|
28
|
+
|
|
29
|
+
### Details
|
|
30
|
+
|
|
31
|
+
In both cases, `fileUploadFeature` is simply the SignalStore provided by `@lucca/cdk` for interactions with LuccaFiles,
|
|
32
|
+
`luFileEntry` is a pipe that transforms a `FileUpload` into a `LuccaFileEntry`.
|
|
33
|
+
|
|
34
|
+
It's also possible to specify a list of accepted files, solely for UX purposes, as the file type is not enforced by the
|
|
35
|
+
browser in any way, this list is an `Array<{ format: string; name?: string; }>`, `name` being used for display only.
|
|
36
|
+
|
|
37
|
+
### Basic
|
|
38
|
+
|
|
39
|
+
Component selector : `lu-single-file-upload`
|
|
40
|
+
|
|
41
|
+
Component selector : `lu-multi-file-upload`
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
import { SingleFileUploadComponent } from '@lucca-front/ng/file-upload';
|
|
45
|
+
import { MultiFileUploadComponent } from '@lucca-front/ng/file-upload';
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<lu-form-field label="Label">
|
|
50
|
+
<lu-multi-file-upload
|
|
51
|
+
fileMaxSize="5000000"
|
|
52
|
+
illustration="paper"
|
|
53
|
+
(filePicked)="fileUploadFeature.uploadFiles([$event])"
|
|
54
|
+
/>
|
|
55
|
+
</lu-form-field>
|
|
56
|
+
<lu-file-entry-wrapper>
|
|
57
|
+
@for (fileUpload of fileUploadFeature.fileUploads(); track $index) {
|
|
58
|
+
<lu-file-entry
|
|
59
|
+
[entry]="fileUpload | fileUploadToLFEntry"
|
|
60
|
+
[state]="fileUpload.state"
|
|
61
|
+
[previewUrl]="getPreviewUrl(fileUpload)"
|
|
62
|
+
[inlineMessageError]="fileUpload.error?.detail"
|
|
63
|
+
(deleteFile)="deleteFile(fileUpload)"
|
|
64
|
+
/>
|
|
65
|
+
}
|
|
66
|
+
</lu-file-entry-wrapper>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
@let fileUpload = fileUploadFeature.fileUploads()[0];
|
|
71
|
+
<lu-form-field label="Label">
|
|
72
|
+
@if (fileUpload) {
|
|
73
|
+
<lu-file-entry-wrapper>
|
|
74
|
+
<lu-file-entry
|
|
75
|
+
size="L"
|
|
76
|
+
[entry]="fileUpload | fileUploadToLFEntry"
|
|
77
|
+
[state]="fileUpload.state"
|
|
78
|
+
[previewUrl]="getPreviewUrl(fileUpload)"
|
|
79
|
+
[inlineMessageError]="fileUpload.error?.detail"
|
|
80
|
+
(deleteFile)="deleteFile(fileUpload)"
|
|
81
|
+
/>
|
|
82
|
+
</lu-file-entry-wrapper>
|
|
83
|
+
} @else {
|
|
84
|
+
<lu-single-file-upload
|
|
85
|
+
fileMaxSize="5000000"
|
|
86
|
+
[accept]="accept"
|
|
87
|
+
(filePicked)="fileUploadFeature.uploadFiles([$event])"
|
|
88
|
+
/>
|
|
89
|
+
}
|
|
90
|
+
</lu-form-field>
|
|
91
|
+
```
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# fileupload
|
|
2
|
+
|
|
3
|
+
## Import
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { FileDropzoneComponent, FileEntryComponent, FileEntryWrapperComponent, MultiFileUploadComponent, SingleFileUploadComponent } from '@lucca-front/ng/file-upload';
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Basic Usage
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<lu-form-field label="Label"> <lu-multi-file-upload fileMaxSize="5000000" illustration="paper" (filePicked)="fileUploadFeature.uploadFiles([$event])" /> </lu-form-field> <lu-file-entry-wrapper> @for(fileUpload of fileUploadFeature.fileUploads(); track $index) { <lu-file-entry [entry]="fileUpload | fileUploadToLFEntry" [state]="fileUpload.state" [previewUrl]="getPreviewUrl(fileUpload)" [inlineMessageError]="fileUpload.error?.detail" (deleteFile)="deleteFile(fileUpload)" /> } </lu-file-entry-wrapper>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## API Reference
|
|
16
|
+
|
|
17
|
+
### FileDropzoneComponent (component)
|
|
18
|
+
|
|
19
|
+
**Selector:** `lu-file-dropzone`
|
|
20
|
+
|
|
21
|
+
#### Inputs
|
|
22
|
+
|
|
23
|
+
| Property | Binding name | Type | Default | Required | Transform | Description |
|
|
24
|
+
|----------|-------------|------|---------|----------|-----------|-------------|
|
|
25
|
+
| `intl` | `intl` | `unknown` | — | — | — | — |
|
|
26
|
+
| `accept` | `accept` | `Array<{
|
|
27
|
+
format: string;
|
|
28
|
+
name?: string;
|
|
29
|
+
}>` | `[]` | — | — | Liste des formats de fichiers acceptés. |
|
|
30
|
+
| `structure` | `structure` | `boolean` | `false` | — | `luBooleanAttribute` | Augmente le border-radius du champ pour l’utiliser en élément de structure. |
|
|
31
|
+
| `fileMaxSize` | `fileMaxSize` | `unknown` | `80 * MEGA_BYTE` | — | `luNumberAttribute` | Limite le poids des fichiers importables (en octets). |
|
|
32
|
+
| `size` | `size` | `FileUploadSize \| null` | `null` | — | — | Modifie la taille du composant. |
|
|
33
|
+
| `password` | `password` | `boolean` | `false` | — | `luBooleanAttribute` | — |
|
|
34
|
+
| `illustration` | `illustration` | `/** @deprecated use 'invoice' instead */
|
|
35
|
+
'paper' \| 'picture' \| 'invoice'` | `'invoice'` | — | — | Modifie l’illustration de l’icône dans la zone de drop. |
|
|
36
|
+
| `required` | `required` | `boolean` | `false` | — | `luBooleanAttribute` | — |
|
|
37
|
+
| `buttonFilled` | `buttonFilled` | `boolean` | `false` | — | `luBooleanAttribute` | Affiche le bouton comme action principale de la page. |
|
|
38
|
+
|
|
39
|
+
#### Outputs
|
|
40
|
+
|
|
41
|
+
| Property | Binding name | Type | Notes |
|
|
42
|
+
|----------|-------------|------|-------|
|
|
43
|
+
| `filePicked` | `filePicked` | `File` | — |
|
|
44
|
+
|
|
45
|
+
### FileEntryComponent (component)
|
|
46
|
+
|
|
47
|
+
**Selector:** `lu-file-entry`
|
|
48
|
+
|
|
49
|
+
#### Inputs
|
|
50
|
+
|
|
51
|
+
| Property | Binding name | Type | Default | Required | Transform | Description |
|
|
52
|
+
|----------|-------------|------|---------|----------|-----------|-------------|
|
|
53
|
+
| `intl` | `intl` | `unknown` | — | — | — | — |
|
|
54
|
+
| `state` | `state` | `'success' \| 'loading' \| 'error' \| 'default'` | `'default'` | — | — | — |
|
|
55
|
+
| `displayFileName` | `displayFileName` | `boolean` | `false` | — | `luBooleanAttribute` | Affiche le nom des fichiers importés sous l’image en vue media. |
|
|
56
|
+
| `structure` | `structure` | `boolean` | `false` | — | `luBooleanAttribute` | Augmente le border-radius du champ pour l’utiliser en élément de structure. |
|
|
57
|
+
| `inlineMessageError` | `inlineMessageError` | `string \| null` | `null` | — | — | — |
|
|
58
|
+
| `entry` | `entry` | `FileEntry` | — | ✅ | — | — |
|
|
59
|
+
| `size` | `size` | `FileEntrySize \| null` | `null` | — | — | Modifie la taille du composant. |
|
|
60
|
+
| `iconOverride` | `iconOverride` | `string` | `''` | — | — | — |
|
|
61
|
+
| `downloadURL` | `downloadURL` | `string` | `''` | — | — | — |
|
|
62
|
+
| `openInNewTab` | `openInNewTab` | `boolean` | `false` | — | `luBooleanAttribute` | — |
|
|
63
|
+
| `password` | `password` | `string` | `''` | — | — | — |
|
|
64
|
+
| `media` | `media` | `boolean` | `false` | — | `luBooleanAttribute` | Affiche les fichiers importés avec une mise en forme adaptée aux visuels. |
|
|
65
|
+
| `previewUrl` | `previewUrl` | `string` | `''` | — | — | — |
|
|
66
|
+
|
|
67
|
+
#### Outputs
|
|
68
|
+
|
|
69
|
+
| Property | Binding name | Type | Notes |
|
|
70
|
+
|----------|-------------|------|-------|
|
|
71
|
+
| `passwordChange` | `passwordChange` | `void` | — |
|
|
72
|
+
| `deleteFile` | `deleteFile` | `void` | — |
|
|
73
|
+
|
|
74
|
+
### FileEntryWrapperComponent (component)
|
|
75
|
+
|
|
76
|
+
**Selector:** `lu-file-entry-wrapper`
|
|
77
|
+
|
|
78
|
+
### MultiFileUploadComponent (component)
|
|
79
|
+
|
|
80
|
+
**Selector:** `lu-multi-file-upload`
|
|
81
|
+
|
|
82
|
+
#### Inputs
|
|
83
|
+
|
|
84
|
+
| Property | Binding name | Type | Default | Required | Transform | Description |
|
|
85
|
+
|----------|-------------|------|---------|----------|-----------|-------------|
|
|
86
|
+
| `intl` | `intl` | `unknown` | — | — | — | — |
|
|
87
|
+
| `accept` | `accept` | `Array<{
|
|
88
|
+
format: string;
|
|
89
|
+
name?: string;
|
|
90
|
+
}>` | `[]` | — | — | Liste des formats de fichiers acceptés. |
|
|
91
|
+
| `structure` | `structure` | `boolean` | `false` | — | `luBooleanAttribute` | Augmente le border-radius du champ pour l’utiliser en élément de structure. |
|
|
92
|
+
| `fileMaxSize` | `fileMaxSize` | `unknown` | `80 * MEGA_BYTE` | — | `luNumberAttribute` | Limite le poids des fichiers importables (en octets). |
|
|
93
|
+
| `size` | `size` | `FileUploadSize \| null` | `null` | — | — | Modifie la taille du composant. |
|
|
94
|
+
| `password` | `password` | `boolean` | `false` | — | `luBooleanAttribute` | — |
|
|
95
|
+
| `illustration` | `illustration` | `/** @deprecated use 'invoice' instead */
|
|
96
|
+
'paper' \| 'picture' \| 'invoice'` | `'invoice'` | — | — | Modifie l’illustration de l’icône dans la zone de drop. |
|
|
97
|
+
| `required` | `required` | `boolean` | `false` | — | `luBooleanAttribute` | — |
|
|
98
|
+
| `buttonFilled` | `buttonFilled` | `boolean` | `false` | — | `luBooleanAttribute` | Affiche le bouton comme action principale de la page. |
|
|
99
|
+
|
|
100
|
+
#### Outputs
|
|
101
|
+
|
|
102
|
+
| Property | Binding name | Type | Notes |
|
|
103
|
+
|----------|-------------|------|-------|
|
|
104
|
+
| `filePicked` | `filePicked` | `File` | — |
|
|
105
|
+
|
|
106
|
+
### SingleFileUploadComponent (component)
|
|
107
|
+
|
|
108
|
+
**Selector:** `lu-single-file-upload`
|
|
109
|
+
|
|
110
|
+
#### Inputs
|
|
111
|
+
|
|
112
|
+
| Property | Binding name | Type | Default | Required | Transform | Description |
|
|
113
|
+
|----------|-------------|------|---------|----------|-----------|-------------|
|
|
114
|
+
| `intl` | `intl` | `unknown` | — | — | — | — |
|
|
115
|
+
| `accept` | `accept` | `Array<{
|
|
116
|
+
format: string;
|
|
117
|
+
name?: string;
|
|
118
|
+
}>` | `[]` | — | — | Liste des formats de fichiers acceptés. |
|
|
119
|
+
| `structure` | `structure` | `boolean` | `false` | — | `luBooleanAttribute` | Augmente le border-radius du champ pour l’utiliser en élément de structure. |
|
|
120
|
+
| `fileMaxSize` | `fileMaxSize` | `unknown` | `80 * MEGA_BYTE` | — | `luNumberAttribute` | Limite le poids des fichiers importables (en octets). |
|
|
121
|
+
| `size` | `size` | `FileUploadSize \| null` | `null` | — | — | Modifie la taille du composant. |
|
|
122
|
+
| `password` | `password` | `boolean` | `false` | — | `luBooleanAttribute` | — |
|
|
123
|
+
| `illustration` | `illustration` | `/** @deprecated use 'invoice' instead */
|
|
124
|
+
'paper' \| 'picture' \| 'invoice'` | `'invoice'` | — | — | Modifie l’illustration de l’icône dans la zone de drop. |
|
|
125
|
+
| `required` | `required` | `boolean` | `false` | — | `luBooleanAttribute` | — |
|
|
126
|
+
| `buttonFilled` | `buttonFilled` | `boolean` | `false` | — | `luBooleanAttribute` | Affiche le bouton comme action principale de la page. |
|
|
127
|
+
| `entry` | `entry` | `FileEntry \| null` | `null` | — | — | — |
|
|
128
|
+
| `state` | `state` | `'loading' \| 'success' \| 'error' \| 'default'` | `'default'` | — | — | — |
|
|
129
|
+
| `inlineMessageError` | `inlineMessageError` | `string \| null` | `null` | — | — | — |
|
|
130
|
+
| `previewUrl` | `previewUrl` | `string \| null` | `null` | — | — | — |
|
|
131
|
+
| `displayFileName` | `displayFileName` | `boolean` | `false` | — | `luBooleanAttribute` | Affiche le nom des fichiers importés sous l’image en vue media. |
|
|
132
|
+
|
|
133
|
+
#### Outputs
|
|
134
|
+
|
|
135
|
+
| Property | Binding name | Type | Notes |
|
|
136
|
+
|----------|-------------|------|-------|
|
|
137
|
+
| `filePicked` | `filePicked` | `File` | — |
|
|
138
|
+
| `deleteFile` | `deleteFile` | `void` | — |
|
|
139
|
+
|
|
140
|
+
## Related files
|
|
141
|
+
|
|
142
|
+
- 📝 [Code & implementation](./fileupload.component.md)
|
|
143
|
+
- 🎨 [Design guidelines](https://lucca-front.lucca.io/v22.0.6-rc.1/storybook/llms/references/components/fileupload/fileupload.design.md)
|
|
144
|
+
- 🎯 [Figma design tokens](https://lucca-front.lucca.io/v22.0.6-rc.1/storybook/llms/references/components/fileupload/fileupload.figma.md)
|
|
145
|
+
- 📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-file-fileupload-angular-basic--docs)
|
|
146
|
+
|
|
147
|
+
## Changelog
|
|
148
|
+
|
|
149
|
+
> Diff structurel de l'API (selectors, inputs, outputs, models) entre versions stables, depuis `v21.4.2` jusqu'à `v22.0.0`. Les versions sans changement d'API sont omises.
|
|
150
|
+
|
|
151
|
+
### 22.0.0
|
|
152
|
+
|
|
153
|
+
+ component `FileEntryWrapperComponent` (lu-file-entry-wrapper)
|
|
154
|
+
`FileDropzoneComponent` :
|
|
155
|
+
~ `structure` : transform booleanAttribute → luBooleanAttribute
|
|
156
|
+
~ `fileMaxSize` : number → unknown, transform ∅ → luNumberAttribute
|
|
157
|
+
~ `password` : transform booleanAttribute → luBooleanAttribute
|
|
158
|
+
~ `required` : transform booleanAttribute → luBooleanAttribute
|
|
159
|
+
~ `buttonFilled` : transform booleanAttribute → luBooleanAttribute
|
|
160
|
+
`FileEntryComponent` :
|
|
161
|
+
+ `structure` : boolean
|
|
162
|
+
~ `displayFileName` : transform booleanAttribute → luBooleanAttribute
|
|
163
|
+
~ `openInNewTab` : transform booleanAttribute → luBooleanAttribute
|
|
164
|
+
~ `media` : transform booleanAttribute → luBooleanAttribute
|
|
165
|
+
`MultiFileUploadComponent` :
|
|
166
|
+
~ `structure` : transform booleanAttribute → luBooleanAttribute
|
|
167
|
+
~ `fileMaxSize` : number → unknown, transform ∅ → luNumberAttribute
|
|
168
|
+
~ `password` : transform booleanAttribute → luBooleanAttribute
|
|
169
|
+
~ `required` : transform booleanAttribute → luBooleanAttribute
|
|
170
|
+
~ `buttonFilled` : transform booleanAttribute → luBooleanAttribute
|
|
171
|
+
`SingleFileUploadComponent` :
|
|
172
|
+
~ `structure` : transform booleanAttribute → luBooleanAttribute
|
|
173
|
+
~ `fileMaxSize` : number → unknown, transform ∅ → luNumberAttribute
|
|
174
|
+
~ `password` : transform booleanAttribute → luBooleanAttribute
|
|
175
|
+
~ `required` : transform booleanAttribute → luBooleanAttribute
|
|
176
|
+
~ `buttonFilled` : transform booleanAttribute → luBooleanAttribute
|
|
177
|
+
~ `displayFileName` : transform booleanAttribute → luBooleanAttribute
|
|
178
|
+
|
|
179
|
+
### Notes de release (ZeroHeight)
|
|
180
|
+
|
|
181
|
+
#### 21.3.1
|
|
182
|
+
|
|
183
|
+
##### Added
|
|
184
|
+
|
|
185
|
+
- `openInNewTab` input on `lu-file-entry` to open the `downloadURL` in a new tab.
|
|
186
|
+
|
|
187
|
+
##### Fixed
|
|
188
|
+
|
|
189
|
+
- Icon preview of `lu-file-entry`.
|
|
190
|
+
|
|
191
|
+
#### 21.3.0
|
|
192
|
+
|
|
193
|
+
##### Added
|
|
194
|
+
|
|
195
|
+
- `FILE_ENTRY_STATE`, `FILE_ENTRY_SIZE`, `FILE_UPLOAD_STATE` and `FILE_UPLOAD_SIZE` constants, together with their matching types, are now publicly exported and used to type the `state` and `size` inputs.
|
|
196
|
+
|
|
197
|
+
#### 21.2.2
|
|
198
|
+
|
|
199
|
+
##### Fixed
|
|
200
|
+
|
|
201
|
+
- File size is displayed even when it equals `0`.
|
|
202
|
+
|
|
203
|
+
#### 21.2.0
|
|
204
|
+
|
|
205
|
+
##### Added
|
|
206
|
+
|
|
207
|
+
- Content slot to display a tag next to the file.
|
|
208
|
+
- `media` and `size` of a `lu-file-entry` can now be left undefined.
|
|
209
|
+
|
|
210
|
+
#### 21.1.4
|
|
211
|
+
|
|
212
|
+
##### Fixed
|
|
213
|
+
|
|
214
|
+
- Divider rendering between file entries.
|
|
215
|
+
|
|
216
|
+
#### 21.1.2
|
|
217
|
+
|
|
218
|
+
##### Added
|
|
219
|
+
|
|
220
|
+
- `buttonFilled` input to render the upload button with the filled style instead of the outlined one.
|
|
221
|
+
|
|
222
|
+
#### 21.1.0
|
|
223
|
+
|
|
224
|
+
##### Added
|
|
225
|
+
|
|
226
|
+
- `formatFileSize` function is now publicly exported.
|
|
227
|
+
|
|
228
|
+
##### Changed
|
|
229
|
+
|
|
230
|
+
- `intl` input now accepts partial overrides that are merged with the default translations.
|
|
231
|
+
|
|
232
|
+
##### Fixed
|
|
233
|
+
|
|
234
|
+
- The displayed file type now matches the actual file.
|
|
235
|
+
|
|
236
|
+
#### 20.3.1
|
|
237
|
+
|
|
238
|
+
##### Fixed
|
|
239
|
+
|
|
240
|
+
- Typing of the `state` input.
|
|
241
|
+
|
|
242
|
+
#### 19.3.0
|
|
243
|
+
|
|
244
|
+
##### Added
|
|
245
|
+
|
|
246
|
+
- `lu-single-file-upload`, `lu-multi-file-upload`, `lu-file-dropzone` and `lu-file-entry` components, with the `accept`, `fileMaxSize`, `required`, `state`, `size`, `illustration`, `iconOverride`, `displayFileName`, `downloadURL`, `previewUrl`, `password`, `inlineMessageError` and `intl` inputs, plus the `filePicked`, `deleteFile` and `passwordChange` outputs.
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# filterbar — Code & Implementation
|
|
2
|
+
|
|
3
|
+
📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-forms-filterspills-filterbar-angular--docs)
|
|
4
|
+
|
|
5
|
+
## Angular
|
|
6
|
+
|
|
7
|
+
Component selector : `lu-filter-bar`
|
|
8
|
+
|
|
9
|
+
### Filter pills optionnelles
|
|
10
|
+
|
|
11
|
+
`optional` permet de conditionner l'affichage d'une filter pill. Elle sera masquée par défaut et accessible depuis le bouton filtre.
|
|
12
|
+
|
|
13
|
+
Une filter pill optionnelle doit obligatoirement contenir un attribut `name` (dont la valeur est libre) afin de pouvoir être affichée.
|
|
14
|
+
|
|
15
|
+
### luFilterPillAddonBefore et luFilterPillAddonAfter
|
|
16
|
+
|
|
17
|
+
Deux directives structurelles permettent de projeter du contenu aux extrémités de la FilterBar.
|
|
18
|
+
|
|
19
|
+
| **`*`**`luFilterPillAddonBefore` | Placé **avant** les pills, dans la zone scrollable, avec un séparateur vertical automatique. Exemple : un SegmentedControl ou un sélecteur de vues. |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| **`*`**`luFilterPillAddonAfter` | Placé **après** les pills, aligné à droite. Exemple : un bouton d'export. |
|
|
22
|
+
|
|
23
|
+
### Bar save
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
27
|
+
import { LOCALE_ID } from '@angular/core';
|
|
28
|
+
import { FormsModule } from '@angular/forms';
|
|
29
|
+
import { ButtonComponent } from '@lucca-front/ng/button';
|
|
30
|
+
import { LuCoreSelectApiV4Directive } from '@lucca-front/ng/core-select/api';
|
|
31
|
+
import { DateInputComponent, DateRangeInputComponent } from '@lucca-front/ng/date2';
|
|
32
|
+
import { DividerComponent } from '@lucca-front/ng/divider';
|
|
33
|
+
import { DropdownActionComponent, DropdownItemComponent, DropdownMenuComponent, LuDropdownTriggerDirective } from '@lucca-front/ng/dropdown';
|
|
34
|
+
import { FilterBarComponent, FilterPillAddonAfterDirective, FilterPillAddonBeforeDirective, FilterPillComponent } from '@lucca-front/ng/filter-pills';
|
|
35
|
+
import { FormFieldComponent } from '@lucca-front/ng/form-field';
|
|
36
|
+
import { CheckboxInputComponent, TextInputComponent } from '@lucca-front/ng/forms';
|
|
37
|
+
import { LuMultiSelectInputComponent } from '@lucca-front/ng/multi-select';
|
|
38
|
+
import { NumericBadgeComponent } from '@lucca-front/ng/numeric-badge';
|
|
39
|
+
import { SegmentedControlComponent, SegmentedControlFilterComponent } from '@lucca-front/ng/segmented-control';
|
|
40
|
+
import { LuSimpleSelectInputComponent } from '@lucca-front/ng/simple-select';
|
|
41
|
+
import { LuTooltipTriggerDirective } from '@lucca-front/ng/tooltip';
|
|
42
|
+
import { IconComponent } from '@lucca/prisme/icon';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<lu-filter-bar>
|
|
47
|
+
<lu-segmented-control class="filterBar-segmentedControl" *luFilterPillAddonBefore [(ngModel)]="example">
|
|
48
|
+
<ng-template #label0>
|
|
49
|
+
Tous
|
|
50
|
+
<lu-numeric-badge [value]="12" />
|
|
51
|
+
</ng-template>
|
|
52
|
+
<ng-template #label1>
|
|
53
|
+
En cours d’approbation
|
|
54
|
+
<lu-numeric-badge [value]="5" />
|
|
55
|
+
</ng-template>
|
|
56
|
+
<ng-template #label2>
|
|
57
|
+
Approuvés
|
|
58
|
+
<lu-numeric-badge [value]="3" />
|
|
59
|
+
</ng-template>
|
|
60
|
+
<ng-template #label3>
|
|
61
|
+
Clos
|
|
62
|
+
<lu-numeric-badge [value]="4" />
|
|
63
|
+
</ng-template>
|
|
64
|
+
<ng-template #label4>
|
|
65
|
+
Produit
|
|
66
|
+
<button type="button" size="XS" luButton="ghost" aria-expanded="false" disclosure [luDropdown]="optionsDropdown">
|
|
67
|
+
<lu-icon alt="Options" icon="menuDots" />
|
|
68
|
+
</button>
|
|
69
|
+
<ng-template #optionsDropdown>
|
|
70
|
+
<lu-dropdown-menu>
|
|
71
|
+
<lu-dropdown-item>
|
|
72
|
+
<button lu-dropdown-action type="button">
|
|
73
|
+
<lu-icon icon="edit" />
|
|
74
|
+
Modifier le nom
|
|
75
|
+
</button>
|
|
76
|
+
</lu-dropdown-item>
|
|
77
|
+
<lu-dropdown-item>
|
|
78
|
+
<button lu-dropdown-action type="button" critical>
|
|
79
|
+
<lu-icon icon="trash" />
|
|
80
|
+
Supprimer
|
|
81
|
+
</button>
|
|
82
|
+
</lu-dropdown-item>
|
|
83
|
+
</lu-dropdown-menu>
|
|
84
|
+
</ng-template>
|
|
85
|
+
</ng-template>
|
|
86
|
+
<lu-segmented-control-filter [label]="label0" value="0" />
|
|
87
|
+
<lu-segmented-control-filter [label]="label1" value="1" />
|
|
88
|
+
<lu-segmented-control-filter [label]="label2" value="2" />
|
|
89
|
+
<lu-segmented-control-filter [label]="label3" value="3" />
|
|
90
|
+
<lu-segmented-control-filter [label]="label4" value="4" />
|
|
91
|
+
</lu-segmented-control>
|
|
92
|
+
<lu-filter-pill label="Inclure les collaborateurs partis" optional name="includeFormerEmployees">
|
|
93
|
+
<lu-checkbox-input [ngModel]="false" />
|
|
94
|
+
</lu-filter-pill>
|
|
95
|
+
<lu-filter-pill label="Date de début" optional name="startingDate">
|
|
96
|
+
<lu-date-input [(ngModel)]="example1" />
|
|
97
|
+
</lu-filter-pill>
|
|
98
|
+
<lu-filter-pill label="Période">
|
|
99
|
+
<lu-date-range-input [(ngModel)]="examplePeriod" />
|
|
100
|
+
</lu-filter-pill>
|
|
101
|
+
<lu-filter-pill label="Multi ApiV4" optional name="multiv4">
|
|
102
|
+
<lu-multi-select
|
|
103
|
+
[ngModel]="[]"
|
|
104
|
+
apiV4="/organization/structure/api/establishments"
|
|
105
|
+
filterPillLabelPlural="établissements"
|
|
106
|
+
/>
|
|
107
|
+
</lu-filter-pill>
|
|
108
|
+
<lu-form-field label="Test" hiddenLabel>
|
|
109
|
+
<lu-text-input [ngModel]="example2" [ngModelOptions]="{ standalone: true }" hasSearchIcon hasClearer />
|
|
110
|
+
</lu-form-field>
|
|
111
|
+
<ng-container *luFilterPillAddonAfter>
|
|
112
|
+
<button
|
|
113
|
+
type="button"
|
|
114
|
+
size="S"
|
|
115
|
+
luButton="outlined"
|
|
116
|
+
palette="product"
|
|
117
|
+
disclosure
|
|
118
|
+
aria-expanded="false"
|
|
119
|
+
[luDropdown]="saveDropdown"
|
|
120
|
+
>
|
|
121
|
+
<!--Enregistrer en tant que nouvelle vue-->
|
|
122
|
+
Enregistrer la vue
|
|
123
|
+
<lu-icon icon="arrowChevronBottom" />
|
|
124
|
+
</button>
|
|
125
|
+
<button type="submit" size="S" luButton="outlined">Exporter</button>
|
|
126
|
+
</ng-container>
|
|
127
|
+
</lu-filter-bar>
|
|
128
|
+
<ng-template #saveDropdown>
|
|
129
|
+
<lu-dropdown-menu>
|
|
130
|
+
<lu-dropdown-item>
|
|
131
|
+
<button lu-dropdown-action type="button">
|
|
132
|
+
<lu-icon icon="save" />
|
|
133
|
+
Enregistrer les modifications
|
|
134
|
+
</button>
|
|
135
|
+
</lu-dropdown-item>
|
|
136
|
+
<lu-dropdown-item>
|
|
137
|
+
<button
|
|
138
|
+
lu-dropdown-action
|
|
139
|
+
type="button"
|
|
140
|
+
aria-disabled="true"
|
|
141
|
+
class="is-disabled"
|
|
142
|
+
luTooltip="Supprimer des vues pour en créer des nouvelles"
|
|
143
|
+
>
|
|
144
|
+
<lu-icon icon="mathsPlus" />
|
|
145
|
+
Enregistrer en tant que nouvelle vue
|
|
146
|
+
</button>
|
|
147
|
+
</lu-dropdown-item>
|
|
148
|
+
</lu-dropdown-menu>
|
|
149
|
+
</ng-template>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Bar
|
|
153
|
+
|
|
154
|
+
```js
|
|
155
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
156
|
+
import { LOCALE_ID } from '@angular/core';
|
|
157
|
+
import { FormsModule } from '@angular/forms';
|
|
158
|
+
import { ButtonComponent } from '@lucca-front/ng/button';
|
|
159
|
+
import { LuCoreSelectApiV4Directive } from '@lucca-front/ng/core-select/api';
|
|
160
|
+
import { DateInputComponent, DateRangeInputComponent } from '@lucca-front/ng/date2';
|
|
161
|
+
import { DividerComponent } from '@lucca-front/ng/divider';
|
|
162
|
+
import { FilterBarComponent, FilterPillAddonAfterDirective, FilterPillAddonBeforeDirective, FilterPillComponent } from '@lucca-front/ng/filter-pills';
|
|
163
|
+
import { FormFieldComponent } from '@lucca-front/ng/form-field';
|
|
164
|
+
import { CheckboxInputComponent, TextInputComponent } from '@lucca-front/ng/forms';
|
|
165
|
+
import { LuMultiSelectInputComponent } from '@lucca-front/ng/multi-select';
|
|
166
|
+
import { NumericBadgeComponent } from '@lucca-front/ng/numeric-badge';
|
|
167
|
+
import { SegmentedControlComponent, SegmentedControlFilterComponent } from '@lucca-front/ng/segmented-control';
|
|
168
|
+
import { LuSimpleSelectInputComponent } from '@lucca-front/ng/simple-select';
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
```html
|
|
172
|
+
<lu-filter-bar>
|
|
173
|
+
<lu-segmented-control *luFilterPillAddonBefore [(ngModel)]="example">
|
|
174
|
+
<ng-template #label0>
|
|
175
|
+
Tous
|
|
176
|
+
<lu-numeric-badge [value]="12" />
|
|
177
|
+
</ng-template>
|
|
178
|
+
<ng-template #label1>
|
|
179
|
+
En cours d’approbation
|
|
180
|
+
<lu-numeric-badge [value]="5" />
|
|
181
|
+
</ng-template>
|
|
182
|
+
<ng-template #label2>
|
|
183
|
+
Approuvés
|
|
184
|
+
<lu-numeric-badge [value]="3" />
|
|
185
|
+
</ng-template>
|
|
186
|
+
<ng-template #label3>
|
|
187
|
+
Clos
|
|
188
|
+
<lu-numeric-badge [value]="4" />
|
|
189
|
+
</ng-template>
|
|
190
|
+
<lu-segmented-control-filter [label]="label0" value="0" />
|
|
191
|
+
<lu-segmented-control-filter [label]="label1" value="1" />
|
|
192
|
+
<lu-segmented-control-filter [label]="label2" value="2" />
|
|
193
|
+
<lu-segmented-control-filter [label]="label3" value="3" />
|
|
194
|
+
</lu-segmented-control>
|
|
195
|
+
<lu-filter-pill label="Inclure les collaborateurs partis" optional name="includeFormerEmployees">
|
|
196
|
+
<lu-checkbox-input [ngModel]="false" />
|
|
197
|
+
</lu-filter-pill>
|
|
198
|
+
<lu-filter-pill label="Date de début" optional name="startingDate">
|
|
199
|
+
<lu-date-input [(ngModel)]="example1" />
|
|
200
|
+
</lu-filter-pill>
|
|
201
|
+
<lu-filter-pill label="Période">
|
|
202
|
+
<lu-date-range-input [(ngModel)]="examplePeriod" />
|
|
203
|
+
</lu-filter-pill>
|
|
204
|
+
<lu-filter-pill label="Multi ApiV4" optional name="multiv4">
|
|
205
|
+
<lu-multi-select
|
|
206
|
+
[ngModel]="[]"
|
|
207
|
+
apiV4="/organization/structure/api/establishments"
|
|
208
|
+
filterPillLabelPlural="établissements"
|
|
209
|
+
/>
|
|
210
|
+
</lu-filter-pill>
|
|
211
|
+
<lu-form-field label="Test" hiddenLabel>
|
|
212
|
+
<lu-text-input [ngModel]="example2" [ngModelOptions]="{ standalone: true }" hasSearchIcon hasClearer />
|
|
213
|
+
</lu-form-field>
|
|
214
|
+
<button *luFilterPillAddonAfter type="submit" size="S" luButton="outlined">Exporter</button>
|
|
215
|
+
</lu-filter-bar>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## HTML/CSS
|
|
219
|
+
|
|
220
|
+
### Bar
|
|
221
|
+
|
|
222
|
+
```css
|
|
223
|
+
@forward '@lucca-front/scss/src/components/filterBar';
|
|
224
|
+
@forward '@lucca-front/scss/src/components/button';
|
|
225
|
+
@forward '@lucca-front/scss/src/components/clear';
|
|
226
|
+
@forward '@lucca-front/scss/src/components/divider';
|
|
227
|
+
@forward '@lucca-front/scss/src/components/filterPill';
|
|
228
|
+
@forward '@lucca-front/scss/src/components/numericBadge';
|
|
229
|
+
@forward '@lucca-front/scss/src/components/segmentedControl';
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
```html
|
|
233
|
+
<form>
|
|
234
|
+
<div class="filterBar">
|
|
235
|
+
<lu-scroll-box class="filterBar-scrollBox">
|
|
236
|
+
<div class="filterBar-scrollBox-group">
|
|
237
|
+
<ul class="segmentedControl filterBar-segmentedControl" role="presentation">
|
|
238
|
+
<li class="segmentedControl-item">
|
|
239
|
+
<input type="radio" class="segmentedControl-item-input" name="tab" id="tab1" checked="checked" />
|
|
240
|
+
<label for="tab1" class="segmentedControl-item-action">Tous</label>
|
|
241
|
+
</li>
|
|
242
|
+
<li class="segmentedControl-item">
|
|
243
|
+
<input type="radio" class="segmentedControl-item-input" name="tab" id="tab2" />
|
|
244
|
+
<label for="tab2" class="segmentedControl-item-action">
|
|
245
|
+
En cours d’approbation @if (withNumericBadge) {
|
|
246
|
+
<span class="numericBadge">8</span>
|
|
247
|
+
}
|
|
248
|
+
</label>
|
|
249
|
+
</li>
|
|
250
|
+
<li class="segmentedControl-item">
|
|
251
|
+
<input type="radio" class="segmentedControl-item-input" name="tab" id="tab3" />
|
|
252
|
+
<label for="tab3" class="segmentedControl-item-action">
|
|
253
|
+
Approuvés @if (withNumericBadge) {
|
|
254
|
+
<span class="numericBadge">88</span>
|
|
255
|
+
}
|
|
256
|
+
</label>
|
|
257
|
+
</li>
|
|
258
|
+
<li class="segmentedControl-item">
|
|
259
|
+
<input type="radio" class="segmentedControl-item-input" name="tab" id="tab4" />
|
|
260
|
+
<label for="tab4" class="segmentedControl-item-action">Clos</label>
|
|
261
|
+
</li>
|
|
262
|
+
</ul>
|
|
263
|
+
|
|
264
|
+
<div class="divider filterBar-divider"></div>
|
|
265
|
+
|
|
266
|
+
<button type="button" class="filterPill mod-checkbox">
|
|
267
|
+
<span class="filterPill-checkbox">
|
|
268
|
+
<span class="filterPill-checkbox-input"></span>
|
|
269
|
+
<span class="filterPill-checkbox-icon" aria-hidden="true">
|
|
270
|
+
<span class="filterPill-checkbox-icon-check"></span>
|
|
271
|
+
</span>
|
|
272
|
+
</span>
|
|
273
|
+
<span class="filterPill-label" luTooltip="Inclure les collaborateurs partis" luTooltipWhenEllipsis>
|
|
274
|
+
Inclure les collaborateurs partis
|
|
275
|
+
<span
|
|
276
|
+
class="filterPill-label-placeholder"
|
|
277
|
+
aria-hidden="true"
|
|
278
|
+
data-content-before="Inclure les collaborateurs partis"
|
|
279
|
+
></span>
|
|
280
|
+
</span>
|
|
281
|
+
</button>
|
|
282
|
+
|
|
283
|
+
<div class="filterPillWrapper">
|
|
284
|
+
<button type="button" class="filterPill" aria-expanded="false" aria-controls="panel">
|
|
285
|
+
<span class="filterPill-label">Département</span>
|
|
286
|
+
<span class="filterPill-value"></span>
|
|
287
|
+
<span class="filterPill-toggle">
|
|
288
|
+
<span class="lucca-icon icon-arrowChevronBottom mod-S"></span>
|
|
289
|
+
</span>
|
|
290
|
+
</button>
|
|
291
|
+
<button type="button" class="filterPill_clear clear"><span class="pr-u-mask">Vider ce champ</span></button>
|
|
292
|
+
</div>
|
|
293
|
+
|
|
294
|
+
<button type="submit" class="button mod-ghost mod-S palette-product">Appliquer les filtres</button>
|
|
295
|
+
</div>
|
|
296
|
+
<div class="filterBar-scrollBox-export">
|
|
297
|
+
<button type="submit" class="button mod-S mod-outlined">Exporter</button>
|
|
298
|
+
</div>
|
|
299
|
+
</lu-scroll-box>
|
|
300
|
+
</div>
|
|
301
|
+
</form>
|
|
302
|
+
```
|