@wizishop/angular-components 0.0.167 → 14.0.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/angular-components.scss +4851 -5485
- package/{esm2015/lib/animations/in-out/in-out-x.animation.js → esm2020/lib/animations/in-out/in-out-x.animation.mjs} +0 -0
- package/{esm2015/lib/animations/in-out/in-out-y.animation.js → esm2020/lib/animations/in-out/in-out-y.animation.mjs} +0 -0
- package/esm2020/lib/components/alert/alert.component.mjs +30 -0
- package/esm2020/lib/components/alert-popup/alert-popup-module.mjs +21 -0
- package/esm2020/lib/components/alert-popup/alert-popup.component.mjs +41 -0
- package/esm2020/lib/components/alert-popup/alert-popup.service.mjs +30 -0
- package/esm2020/lib/components/back/back.component.mjs +12 -0
- package/esm2020/lib/components/block/block.component.mjs +44 -0
- package/esm2020/lib/components/button/button.component.mjs +155 -0
- package/esm2020/lib/components/calendar/calendar.component.mjs +196 -0
- package/esm2020/lib/components/checkbox/checkbox.component.mjs +70 -0
- package/esm2020/lib/components/checkbox/checkbox.module.mjs +25 -0
- package/esm2020/lib/components/delete/delete.component.mjs +12 -0
- package/esm2020/lib/components/dropdown/dropdown.component.mjs +26 -0
- package/esm2020/lib/components/edit-in-place/edit-in-place.component.mjs +202 -0
- package/{esm2015/lib/components/filters/filter-item.dto.js → esm2020/lib/components/filters/filter-item.dto.mjs} +0 -0
- package/esm2020/lib/components/filters/filters.component.mjs +41 -0
- package/esm2020/lib/components/free-popin/free-popin.component.mjs +63 -0
- package/esm2020/lib/components/header-page/header-page.component.mjs +24 -0
- package/esm2020/lib/components/hn/h1/h1.component.mjs +18 -0
- package/esm2020/lib/components/hn/h2/h2.component.mjs +13 -0
- package/esm2020/lib/components/hn/h3/h3.component.mjs +18 -0
- package/esm2020/lib/components/hn/h4/h4.component.mjs +18 -0
- package/esm2020/lib/components/image/image.component.mjs +15 -0
- package/esm2020/lib/components/info/info.component.mjs +12 -0
- package/esm2020/lib/components/inputs/input/input.component.mjs +162 -0
- package/esm2020/lib/components/inputs/input/input.module.mjs +37 -0
- package/esm2020/lib/components/inputs/input-search/input-search.component.mjs +54 -0
- package/esm2020/lib/components/inputs/input-search/input-search.module.mjs +33 -0
- package/esm2020/lib/components/inputs/input-with-select/input-with-select.component.mjs +62 -0
- package/{esm2015/lib/components/inputs/input-with-select/option-item.dto.js → esm2020/lib/components/inputs/input-with-select/option-item.dto.mjs} +0 -0
- package/esm2020/lib/components/label/label.component.mjs +34 -0
- package/esm2020/lib/components/link/link.component.mjs +51 -0
- package/esm2020/lib/components/loader/loader.component.mjs +20 -0
- package/esm2020/lib/components/loader/loader.module.mjs +25 -0
- package/esm2020/lib/components/logo/logo.component.mjs +17 -0
- package/esm2020/lib/components/multiple-search/multiple-search.component.mjs +115 -0
- package/esm2020/lib/components/multiple-search-plus/multiple-search-plus.component.mjs +93 -0
- package/{esm2015/lib/components/multiple-search-plus/shared/multiple-search-plus-option.model.js → esm2020/lib/components/multiple-search-plus/shared/multiple-search-plus-option.model.mjs} +0 -0
- package/{esm2015/lib/components/multiple-search-plus/shared/multiple-search-plus-results.model.js → esm2020/lib/components/multiple-search-plus/shared/multiple-search-plus-results.model.mjs} +0 -0
- package/esm2020/lib/components/pagination/pagination.component.mjs +50 -0
- package/esm2020/lib/components/pagination/pagination.module.mjs +33 -0
- package/esm2020/lib/components/pagination/pipes/array-pages.pipe.mjs +28 -0
- package/esm2020/lib/components/pagination/pipes/custom-text.pipe.mjs +34 -0
- package/esm2020/lib/components/pagination/pipes/is-last-page.pipe.mjs +25 -0
- package/esm2020/lib/components/popin/popin.component.mjs +67 -0
- package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +74 -0
- package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +25 -0
- package/esm2020/lib/components/radio/radio.component.mjs +57 -0
- package/esm2020/lib/components/search/search.component.mjs +86 -0
- package/{esm2015/lib/components/search/shared/search-option.model.js → esm2020/lib/components/search/shared/search-option.model.mjs} +0 -0
- package/esm2020/lib/components/selected-list/selected-list.component.mjs +62 -0
- package/{esm2015/lib/components/selected-list/shared/selected-list-option.model.js → esm2020/lib/components/selected-list/shared/selected-list-option.model.mjs} +0 -0
- package/{esm2015/lib/components/selects/call-to-action.model.js → esm2020/lib/components/selects/call-to-action.model.mjs} +0 -0
- package/esm2020/lib/components/selects/select/select.component.mjs +133 -0
- package/esm2020/lib/components/selects/select-in-text/select-in-text.component.mjs +102 -0
- package/{esm2015/lib/components/selects/select-items.dto.js → esm2020/lib/components/selects/select-items.dto.mjs} +0 -0
- package/esm2020/lib/components/separator/separator.component.mjs +17 -0
- package/esm2020/lib/components/settings/settings.component.mjs +12 -0
- package/esm2020/lib/components/shared-components.module.mjs +301 -0
- package/esm2020/lib/components/snackbar/snackbar.component.mjs +84 -0
- package/esm2020/lib/components/state/state.component.mjs +16 -0
- package/esm2020/lib/components/switch/switch.component.mjs +54 -0
- package/esm2020/lib/components/tab/tab.component.mjs +33 -0
- package/esm2020/lib/components/table/directives/checkBoxRow.directive.mjs +95 -0
- package/{esm2015/lib/components/table/directives/column.directive.js → esm2020/lib/components/table/directives/column.directive.mjs} +20 -17
- package/esm2020/lib/components/table/directives/columnHeader.directive.mjs +205 -0
- package/esm2020/lib/components/table/directives/raw.directive.mjs +30 -0
- package/esm2020/lib/components/table/shared/filters-table.service.mjs +68 -0
- package/esm2020/lib/components/table/shared/table-checkbox-id.service.mjs +20 -0
- package/{esm2015/lib/components/table/shared/table-filters-group.model.js → esm2020/lib/components/table/shared/table-filters-group.model.mjs} +0 -0
- package/{esm2015/lib/components/table/shared/table-filters.model.js → esm2020/lib/components/table/shared/table-filters.model.mjs} +0 -0
- package/esm2020/lib/components/table/table.component.mjs +147 -0
- package/esm2020/lib/components/table/table.module.mjs +46 -0
- package/esm2020/lib/components/tag/tag.component.mjs +35 -0
- package/esm2020/lib/components/text/text.component.mjs +15 -0
- package/esm2020/lib/components/text-area/text-area.component.mjs +73 -0
- package/esm2020/lib/components/tooltip/tooltip.component.mjs +30 -0
- package/esm2020/lib/components/tooltip/tooltip.module.mjs +25 -0
- package/esm2020/lib/components/tree/tree.component.mjs +23 -0
- package/{esm2015/lib/components/tree/tree.dto.js → esm2020/lib/components/tree/tree.dto.mjs} +0 -0
- package/esm2020/lib/components/tree/tree.module.mjs +29 -0
- package/esm2020/lib/components/upload/upload.component.mjs +36 -0
- package/esm2020/lib/components/wrapper/wrapper.component.mjs +18 -0
- package/esm2020/lib/components/wrapper-blocs/wrapper-blocs.component.mjs +19 -0
- package/esm2020/lib/directives/abstract-debounce/abstract-debounce.directive.mjs +37 -0
- package/esm2020/lib/directives/abstract-debounce/debounce-keyup.directive.mjs +24 -0
- package/esm2020/lib/directives/auto-hide/auto-hide.directive.mjs +50 -0
- package/esm2020/lib/directives/keyboard-events/keypress-enter.directive.mjs +25 -0
- package/esm2020/lib/directives/ng-var.directive.mjs +32 -0
- package/esm2020/lib/directives/shared-directives.module.mjs +25 -0
- package/esm2020/lib/directives/zindex-toggle/zindex-toggle.directive.mjs +44 -0
- package/esm2020/lib/pipes/select/select-filters.pipe.mjs +19 -0
- package/esm2020/lib/pipes/selected-list/are-all-options-selected.pipe.mjs +17 -0
- package/esm2020/lib/pipes/shared-pipes.module.mjs +29 -0
- package/esm2020/lib/pipes/tree/format-object-to-recursif-tree.pipe.mjs +41 -0
- package/esm2020/lib/pipes/tree/format-object-to-simple-tree.pipe.mjs +49 -0
- package/esm2020/lib/services/dom.service.mjs +59 -0
- package/esm2020/lib/services/multiple-selection.service.mjs +62 -0
- package/{esm2015/lib/utils/html-container.class.js → esm2020/lib/utils/html-container.class.mjs} +0 -0
- package/{esm2015/lib/utils/slection-item.interface.js → esm2020/lib/utils/slection-item.interface.mjs} +0 -0
- package/esm2020/lib/wizi-components.module.mjs +34 -0
- package/esm2020/public-api.mjs +90 -0
- package/esm2020/wizishop-angular-components.mjs +5 -0
- package/fesm2015/wizishop-angular-components.mjs +4219 -0
- package/fesm2015/wizishop-angular-components.mjs.map +1 -0
- package/fesm2020/wizishop-angular-components.mjs +4209 -0
- package/fesm2020/wizishop-angular-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/alert/alert.component.d.ts +3 -0
- package/lib/components/alert-popup/alert-popup-module.d.ts +6 -0
- package/lib/components/alert-popup/alert-popup.component.d.ts +3 -0
- package/lib/components/alert-popup/alert-popup.service.d.ts +3 -0
- package/lib/components/back/back.component.d.ts +3 -0
- package/lib/components/block/block.component.d.ts +3 -0
- package/lib/components/button/button.component.d.ts +3 -2
- package/lib/components/calendar/calendar.component.d.ts +3 -0
- package/lib/components/checkbox/checkbox.component.d.ts +3 -0
- package/lib/components/checkbox/checkbox.module.d.ts +7 -0
- package/lib/components/delete/delete.component.d.ts +3 -0
- package/lib/components/dropdown/dropdown.component.d.ts +3 -0
- package/lib/components/edit-in-place/edit-in-place.component.d.ts +3 -0
- package/lib/components/filters/filters.component.d.ts +3 -0
- package/lib/components/free-popin/free-popin.component.d.ts +3 -0
- package/lib/components/header-page/header-page.component.d.ts +3 -1
- package/lib/components/hn/h1/h1.component.d.ts +3 -2
- package/lib/components/hn/h2/h2.component.d.ts +3 -0
- package/lib/components/hn/h3/h3.component.d.ts +3 -0
- package/lib/components/hn/h4/h4.component.d.ts +3 -0
- package/lib/components/image/image.component.d.ts +3 -0
- package/lib/components/info/info.component.d.ts +3 -0
- package/lib/components/inputs/input/input.component.d.ts +3 -0
- package/lib/components/inputs/input/input.module.d.ts +10 -0
- package/lib/components/inputs/input-search/input-search.component.d.ts +3 -0
- package/lib/components/inputs/input-search/input-search.module.d.ts +9 -0
- package/lib/components/inputs/input-with-select/input-with-select.component.d.ts +3 -0
- package/lib/components/label/label.component.d.ts +3 -0
- package/lib/components/link/link.component.d.ts +3 -0
- package/lib/components/loader/loader.component.d.ts +3 -0
- package/lib/components/loader/loader.module.d.ts +7 -0
- package/lib/components/logo/logo.component.d.ts +3 -0
- package/lib/components/multiple-search/multiple-search.component.d.ts +3 -0
- package/lib/components/multiple-search-plus/multiple-search-plus.component.d.ts +3 -0
- package/lib/components/pagination/pagination.component.d.ts +3 -0
- package/lib/components/pagination/pagination.module.d.ts +11 -0
- package/lib/components/pagination/pipes/array-pages.pipe.d.ts +3 -0
- package/lib/components/pagination/pipes/custom-text.pipe.d.ts +3 -0
- package/lib/components/pagination/pipes/is-last-page.pipe.d.ts +3 -0
- package/lib/components/popin/popin.component.d.ts +3 -0
- package/lib/components/progress-bar/progress-bar.component.d.ts +3 -0
- package/lib/components/progress-bar/progress-bar.module.d.ts +7 -0
- package/lib/components/radio/radio.component.d.ts +3 -0
- package/lib/components/search/search.component.d.ts +3 -0
- package/lib/components/selected-list/selected-list.component.d.ts +3 -0
- package/lib/components/selects/select/select.component.d.ts +3 -0
- package/lib/components/selects/select-in-text/select-in-text.component.d.ts +3 -0
- package/lib/components/separator/separator.component.d.ts +3 -0
- package/lib/components/settings/settings.component.d.ts +3 -0
- package/lib/components/shared-components.module.d.ts +78 -0
- package/lib/components/snackbar/snackbar.component.d.ts +3 -0
- package/lib/components/state/state.component.d.ts +3 -0
- package/lib/components/switch/switch.component.d.ts +3 -0
- package/lib/components/tab/tab.component.d.ts +3 -0
- package/lib/components/table/directives/checkBoxRow.directive.d.ts +3 -0
- package/lib/components/table/directives/column.directive.d.ts +3 -0
- package/lib/components/table/directives/columnHeader.directive.d.ts +3 -0
- package/lib/components/table/directives/raw.directive.d.ts +3 -0
- package/lib/components/table/shared/filters-table.service.d.ts +3 -0
- package/lib/components/table/shared/table-checkbox-id.service.d.ts +3 -0
- package/lib/components/table/table.component.d.ts +3 -0
- package/lib/components/table/table.module.d.ts +15 -0
- package/lib/components/tag/tag.component.d.ts +3 -0
- package/lib/components/text/text.component.d.ts +3 -0
- package/lib/components/text-area/text-area.component.d.ts +3 -2
- package/lib/components/tooltip/tooltip.component.d.ts +3 -0
- package/lib/components/tooltip/tooltip.module.d.ts +7 -0
- package/lib/components/tree/tree.component.d.ts +3 -0
- package/lib/components/tree/tree.module.d.ts +8 -0
- package/lib/components/upload/upload.component.d.ts +3 -0
- package/lib/components/wrapper/wrapper.component.d.ts +3 -0
- package/lib/components/wrapper-blocs/wrapper-blocs.component.d.ts +3 -0
- package/lib/directives/abstract-debounce/abstract-debounce.directive.d.ts +3 -0
- package/lib/directives/abstract-debounce/debounce-keyup.directive.d.ts +3 -0
- package/lib/directives/auto-hide/auto-hide.directive.d.ts +3 -0
- package/lib/directives/keyboard-events/keypress-enter.directive.d.ts +3 -0
- package/lib/directives/ng-var.directive.d.ts +3 -0
- package/lib/directives/shared-directives.module.d.ts +12 -0
- package/lib/directives/zindex-toggle/zindex-toggle.directive.d.ts +3 -0
- package/lib/pipes/select/select-filters.pipe.d.ts +3 -0
- package/lib/pipes/selected-list/are-all-options-selected.pipe.d.ts +3 -0
- package/lib/pipes/shared-pipes.module.d.ts +10 -0
- package/lib/pipes/tree/format-object-to-recursif-tree.pipe.d.ts +3 -0
- package/lib/pipes/tree/format-object-to-simple-tree.pipe.d.ts +3 -0
- package/lib/services/dom.service.d.ts +3 -0
- package/lib/services/multiple-selection.service.d.ts +3 -0
- package/lib/wizi-components.module.d.ts +9 -0
- package/package.json +20 -8
- package/public-api.d.ts +0 -7
- package/wizishop-angular-components-14.0.1.tgz +0 -0
- package/bundles/wizishop-angular-components.umd.js +0 -4674
- package/bundles/wizishop-angular-components.umd.js.map +0 -1
- package/bundles/wizishop-angular-components.umd.min.js +0 -16
- package/bundles/wizishop-angular-components.umd.min.js.map +0 -1
- package/esm2015/lib/components/alert/alert.component.js +0 -26
- package/esm2015/lib/components/alert-popup/alert-popup-module.js +0 -16
- package/esm2015/lib/components/alert-popup/alert-popup.component.js +0 -41
- package/esm2015/lib/components/alert-popup/alert-popup.service.js +0 -30
- package/esm2015/lib/components/back/back.component.js +0 -12
- package/esm2015/lib/components/block/block.component.js +0 -35
- package/esm2015/lib/components/block-with-checkbox/block-with-checkbox.component.js +0 -51
- package/esm2015/lib/components/breadcrumbs/breadcrumbs.component.js +0 -25
- package/esm2015/lib/components/breadcrumbs/breadcrumbs.dto.js +0 -2
- package/esm2015/lib/components/button/button.component.js +0 -134
- package/esm2015/lib/components/calendar/calendar.component.js +0 -185
- package/esm2015/lib/components/card-price/card-price.component.js +0 -37
- package/esm2015/lib/components/checkbox/checkbox.component.js +0 -62
- package/esm2015/lib/components/checkbox/checkbox.module.js +0 -18
- package/esm2015/lib/components/confirm-delete/confirm-delete.component.js +0 -36
- package/esm2015/lib/components/delete/delete.component.js +0 -12
- package/esm2015/lib/components/dropdown/dropdown.component.js +0 -24
- package/esm2015/lib/components/edit-in-place/edit-in-place.component.js +0 -190
- package/esm2015/lib/components/filters/filters.component.js +0 -39
- package/esm2015/lib/components/free-popin/free-popin.component.js +0 -55
- package/esm2015/lib/components/header-page/header-page.component.js +0 -22
- package/esm2015/lib/components/hn/h1/h1.component.js +0 -22
- package/esm2015/lib/components/hn/h2/h2.component.js +0 -13
- package/esm2015/lib/components/hn/h3/h3.component.js +0 -18
- package/esm2015/lib/components/hn/h4/h4.component.js +0 -18
- package/esm2015/lib/components/image/image.component.js +0 -15
- package/esm2015/lib/components/info/info.component.js +0 -12
- package/esm2015/lib/components/inputs/input/input.component.js +0 -128
- package/esm2015/lib/components/inputs/input/input.module.js +0 -24
- package/esm2015/lib/components/inputs/input-search/input-search.component.js +0 -49
- package/esm2015/lib/components/inputs/input-search/input-search.module.js +0 -22
- package/esm2015/lib/components/inputs/input-with-select/input-with-select.component.js +0 -54
- package/esm2015/lib/components/label/label.component.js +0 -33
- package/esm2015/lib/components/link/link.component.js +0 -48
- package/esm2015/lib/components/loader/loader.component.js +0 -19
- package/esm2015/lib/components/loader/loader.module.js +0 -18
- package/esm2015/lib/components/logo/logo.component.js +0 -17
- package/esm2015/lib/components/mosaic/mosaic.component.js +0 -41
- package/esm2015/lib/components/multiple-search/multiple-search.component.js +0 -113
- package/esm2015/lib/components/multiple-search-plus/multiple-search-plus.component.js +0 -83
- package/esm2015/lib/components/pagination/pagination.component.js +0 -44
- package/esm2015/lib/components/pagination/pagination.module.js +0 -24
- package/esm2015/lib/components/pagination/pipes/array-pages.pipe.js +0 -24
- package/esm2015/lib/components/pagination/pipes/custom-text.pipe.js +0 -33
- package/esm2015/lib/components/pagination/pipes/is-last-page.pipe.js +0 -21
- package/esm2015/lib/components/popin/popin.component.js +0 -56
- package/esm2015/lib/components/progress-bar/progress-bar.component.js +0 -74
- package/esm2015/lib/components/progress-bar/progress-bar.module.js +0 -18
- package/esm2015/lib/components/radio/radio.component.js +0 -51
- package/esm2015/lib/components/search/search.component.js +0 -75
- package/esm2015/lib/components/selected-list/selected-list.component.js +0 -51
- package/esm2015/lib/components/selects/select/select.component.js +0 -117
- package/esm2015/lib/components/selects/select-in-text/select-in-text.component.js +0 -89
- package/esm2015/lib/components/separator/separator.component.js +0 -18
- package/esm2015/lib/components/settings/settings.component.js +0 -13
- package/esm2015/lib/components/shared-components.module.js +0 -181
- package/esm2015/lib/components/snackbar/snackbar.component.js +0 -63
- package/esm2015/lib/components/state/state.component.js +0 -18
- package/esm2015/lib/components/switch/switch.component.js +0 -44
- package/esm2015/lib/components/tab/tab.component.js +0 -30
- package/esm2015/lib/components/table/directives/checkBoxRow.directive.js +0 -92
- package/esm2015/lib/components/table/directives/columnHeader.directive.js +0 -192
- package/esm2015/lib/components/table/directives/raw.directive.js +0 -29
- package/esm2015/lib/components/table/shared/filters-table.service.js +0 -70
- package/esm2015/lib/components/table/shared/table-checkbox-id.service.js +0 -18
- package/esm2015/lib/components/table/table.component.js +0 -130
- package/esm2015/lib/components/table/table.module.js +0 -31
- package/esm2015/lib/components/tag/tag.component.js +0 -30
- package/esm2015/lib/components/text/text.component.js +0 -16
- package/esm2015/lib/components/text-area/text-area.component.js +0 -67
- package/esm2015/lib/components/token-check/token-check.component.js +0 -21
- package/esm2015/lib/components/tooltip/tooltip.component.js +0 -27
- package/esm2015/lib/components/tooltip/tooltip.module.js +0 -18
- package/esm2015/lib/components/tree/tree.component.js +0 -20
- package/esm2015/lib/components/tree/tree.module.js +0 -20
- package/esm2015/lib/components/upload/upload.component.js +0 -31
- package/esm2015/lib/components/wrapper/wrapper.component.js +0 -18
- package/esm2015/lib/components/wrapper-blocs/wrapper-blocs.component.js +0 -19
- package/esm2015/lib/components/wrapper-sidebar/wrapper-sidebar.component.js +0 -19
- package/esm2015/lib/directives/abstract-debounce/abstract-debounce.directive.js +0 -34
- package/esm2015/lib/directives/abstract-debounce/debounce-keyup.directive.js +0 -21
- package/esm2015/lib/directives/auto-hide/auto-hide.directive.js +0 -48
- package/esm2015/lib/directives/keyboard-events/keypress-enter.directive.js +0 -21
- package/esm2015/lib/directives/ng-var.directive.js +0 -33
- package/esm2015/lib/directives/shared-directives.module.js +0 -20
- package/esm2015/lib/directives/zindex-toggle/zindex-toggle.directive.js +0 -43
- package/esm2015/lib/pipes/select/select-filters.pipe.js +0 -15
- package/esm2015/lib/pipes/selected-list/are-all-options-selected.pipe.js +0 -13
- package/esm2015/lib/pipes/shared-pipes.module.js +0 -22
- package/esm2015/lib/pipes/tree/format-object-to-recursif-tree.pipe.js +0 -37
- package/esm2015/lib/pipes/tree/format-object-to-simple-tree.pipe.js +0 -45
- package/esm2015/lib/services/dom.service.js +0 -64
- package/esm2015/lib/services/multiple-selection.service.js +0 -61
- package/esm2015/lib/wizi-components.module.js +0 -21
- package/esm2015/public-api.js +0 -97
- package/esm2015/wizishop-angular-components.js +0 -21
- package/fesm2015/wizishop-angular-components.js +0 -4035
- package/fesm2015/wizishop-angular-components.js.map +0 -1
- package/lib/components/block-with-checkbox/block-with-checkbox.component.d.ts +0 -19
- package/lib/components/breadcrumbs/breadcrumbs.component.d.ts +0 -10
- package/lib/components/breadcrumbs/breadcrumbs.dto.d.ts +0 -5
- package/lib/components/card-price/card-price.component.d.ts +0 -18
- package/lib/components/confirm-delete/confirm-delete.component.d.ts +0 -14
- package/lib/components/mosaic/mosaic.component.d.ts +0 -15
- package/lib/components/token-check/token-check.component.d.ts +0 -9
- package/lib/components/wrapper-sidebar/wrapper-sidebar.component.d.ts +0 -6
- package/wizishop-angular-components-0.0.167.tgz +0 -0
- package/wizishop-angular-components.d.ts +0 -20
- package/wizishop-angular-components.metadata.json +0 -1
|
@@ -0,0 +1,4219 @@
|
|
|
1
|
+
import * as i1$2 from '@wizishop/ng-wizi-bulma';
|
|
2
|
+
import { NwbAllModule, NwbFilterGroup } from '@wizishop/ng-wizi-bulma';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Component, ViewEncapsulation, Input, EventEmitter, Directive, Output, HostListener, Injectable, NgModule, Inject, Pipe, ContentChildren, ViewChild } from '@angular/core';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
7
|
+
import * as i2 from '@angular/forms';
|
|
8
|
+
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import * as i4 from 'ngx-perfect-scrollbar';
|
|
10
|
+
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
|
11
|
+
import { Subject, merge, fromEvent, ReplaySubject, interval } from 'rxjs';
|
|
12
|
+
import { takeUntil, debounceTime, distinctUntilChanged, tap, map, takeWhile } from 'rxjs/operators';
|
|
13
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
14
|
+
import { CdkTableModule } from '@angular/cdk/table';
|
|
15
|
+
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
16
|
+
import { TagInputModule } from 'ngx-chips';
|
|
17
|
+
import * as i1$3 from '@ngx-translate/core';
|
|
18
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
19
|
+
import * as i2$1 from '@angular/router';
|
|
20
|
+
import { RouterModule } from '@angular/router';
|
|
21
|
+
|
|
22
|
+
class LoaderComponent {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.text = '';
|
|
25
|
+
this.small = false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: LoaderComponent, selector: "wac-loader", inputs: { text: "text", small: "small" }, ngImport: i0, template: "<div class=\"wac-loader\" [ngClass]=\"{ 'is-small': small }\">\n <div class=\"loader loader1\">\n <div>\n <div>\n <div>\n <div>\n <div>\n <div></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <p class=\"is-textcentered\" *ngIf=\"text != ''\" [innerHTML]=\"text\"></p>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{ selector: 'wac-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"wac-loader\" [ngClass]=\"{ 'is-small': small }\">\n <div class=\"loader loader1\">\n <div>\n <div>\n <div>\n <div>\n <div>\n <div></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <p class=\"is-textcentered\" *ngIf=\"text != ''\" [innerHTML]=\"text\"></p>\n</div>\n" }]
|
|
33
|
+
}], propDecorators: { text: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], small: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}] } });
|
|
38
|
+
|
|
39
|
+
class AbstractDebounceDirective {
|
|
40
|
+
constructor() {
|
|
41
|
+
this.debounceTime = 500;
|
|
42
|
+
this.onEventChange = new EventEmitter();
|
|
43
|
+
this.emitEvent$ = new Subject();
|
|
44
|
+
this.subscription$ = new Subject();
|
|
45
|
+
}
|
|
46
|
+
ngOnInit() {
|
|
47
|
+
this.emitEvent$
|
|
48
|
+
.pipe(takeUntil(this.subscription$), debounceTime(this.debounceTime), distinctUntilChanged(), tap(value => this.emitChange(value)))
|
|
49
|
+
.subscribe();
|
|
50
|
+
}
|
|
51
|
+
emitChange(value) {
|
|
52
|
+
this.onEventChange.emit(value);
|
|
53
|
+
}
|
|
54
|
+
ngOnDestroy() {
|
|
55
|
+
this.subscription$.next();
|
|
56
|
+
this.subscription$.complete();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
AbstractDebounceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AbstractDebounceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
60
|
+
AbstractDebounceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: AbstractDebounceDirective, selector: "AbstractDebounceDirective", inputs: { debounceTime: "debounceTime" }, outputs: { onEventChange: "onEventChange" }, ngImport: i0 });
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AbstractDebounceDirective, decorators: [{
|
|
62
|
+
type: Directive,
|
|
63
|
+
args: [{
|
|
64
|
+
selector: 'AbstractDebounceDirective'
|
|
65
|
+
}]
|
|
66
|
+
}], ctorParameters: function () { return []; }, propDecorators: { debounceTime: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], onEventChange: [{
|
|
69
|
+
type: Output
|
|
70
|
+
}] } });
|
|
71
|
+
|
|
72
|
+
class DebounceKeyupDirective extends AbstractDebounceDirective {
|
|
73
|
+
constructor() {
|
|
74
|
+
super();
|
|
75
|
+
}
|
|
76
|
+
onKeyUp(event) {
|
|
77
|
+
event.preventDefault();
|
|
78
|
+
this.emitEvent$.next(event);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
DebounceKeyupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DebounceKeyupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
82
|
+
DebounceKeyupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]", host: { listeners: { "keyup": "onKeyUp($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DebounceKeyupDirective, decorators: [{
|
|
84
|
+
type: Directive,
|
|
85
|
+
args: [{
|
|
86
|
+
selector: 'input[debounceKeyUp]'
|
|
87
|
+
}]
|
|
88
|
+
}], ctorParameters: function () { return []; }, propDecorators: { onKeyUp: [{
|
|
89
|
+
type: HostListener,
|
|
90
|
+
args: ['keyup', ['$event']]
|
|
91
|
+
}] } });
|
|
92
|
+
|
|
93
|
+
class InputSearchComponent {
|
|
94
|
+
constructor() {
|
|
95
|
+
this.placeholder = '';
|
|
96
|
+
this.smallPadding = false; // todo Try to be more flexible like changing type : export type PaddingConfig = "default" | "small" | "big" | "no-padding";
|
|
97
|
+
this.innerValue = '';
|
|
98
|
+
this.changeDebounced = new EventEmitter(); // debounced
|
|
99
|
+
this.onTouchedCallback = () => { };
|
|
100
|
+
this.onChangeCallback = () => { };
|
|
101
|
+
}
|
|
102
|
+
get value() {
|
|
103
|
+
return this.innerValue;
|
|
104
|
+
}
|
|
105
|
+
set value(v) {
|
|
106
|
+
if (v !== this.innerValue) {
|
|
107
|
+
this.innerValue = v;
|
|
108
|
+
this.onChangeCallback(v);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
writeValue(value) {
|
|
112
|
+
if (value !== this.innerValue) {
|
|
113
|
+
this.innerValue = value;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
registerOnChange(fn) {
|
|
117
|
+
this.onChangeCallback = fn;
|
|
118
|
+
}
|
|
119
|
+
registerOnTouched(fn) {
|
|
120
|
+
this.onTouchedCallback = fn;
|
|
121
|
+
}
|
|
122
|
+
handleDebouncedKeyUp() {
|
|
123
|
+
this.changeDebounced.emit(this.value);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
InputSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
127
|
+
InputSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: InputSearchComponent, selector: "wac-input-search", inputs: { placeholder: "placeholder", smallPadding: "smallPadding", id: "id" }, outputs: { changeDebounced: "changeDebounced" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: InputSearchComponent, multi: true }], ngImport: i0, template: "<div class=\"wac-field-input-search\" [ngClass]=\"smallPadding ? 'small-padding' : ''\">\n <p class=\"control has-icons-left has-icons-right\">\n <input\n [placeholder]=\"placeholder\"\n value=\"\"\n class=\"input\"\n type=\"text\"\n [attr.id]=\"id\"\n [(ngModel)]=\"value\"\n debounceKeyUp\n [debounceTime]=\"1000\"\n (onEventChange)=\"handleDebouncedKeyUp()\"\n />\n <i class=\"icon fal fa-search\"></i>\n </p>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]" }] });
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputSearchComponent, decorators: [{
|
|
129
|
+
type: Component,
|
|
130
|
+
args: [{ selector: 'wac-input-search', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: InputSearchComponent, multi: true }], template: "<div class=\"wac-field-input-search\" [ngClass]=\"smallPadding ? 'small-padding' : ''\">\n <p class=\"control has-icons-left has-icons-right\">\n <input\n [placeholder]=\"placeholder\"\n value=\"\"\n class=\"input\"\n type=\"text\"\n [attr.id]=\"id\"\n [(ngModel)]=\"value\"\n debounceKeyUp\n [debounceTime]=\"1000\"\n (onEventChange)=\"handleDebouncedKeyUp()\"\n />\n <i class=\"icon fal fa-search\"></i>\n </p>\n</div>\n" }]
|
|
131
|
+
}], propDecorators: { placeholder: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], smallPadding: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], id: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], changeDebounced: [{
|
|
138
|
+
type: Output
|
|
139
|
+
}] } });
|
|
140
|
+
|
|
141
|
+
class DomService {
|
|
142
|
+
constructor(componentFactoryResolver, appRef, injector, overlayContainer) {
|
|
143
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
144
|
+
this.appRef = appRef;
|
|
145
|
+
this.injector = injector;
|
|
146
|
+
this.overlayContainer = overlayContainer;
|
|
147
|
+
this.documentEventSource = new Subject();
|
|
148
|
+
this.documentEventDone = this.documentEventSource.asObservable();
|
|
149
|
+
this.eventInitialisation = true;
|
|
150
|
+
this.documentScrollSource = new Subject();
|
|
151
|
+
this.documentScrollDone = this.documentScrollSource.asObservable();
|
|
152
|
+
}
|
|
153
|
+
documentEvent() {
|
|
154
|
+
this.setDocumentEventListener();
|
|
155
|
+
return this.documentEventDone;
|
|
156
|
+
}
|
|
157
|
+
setDocumentEventListener() {
|
|
158
|
+
if (!this.eventInitialisation) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
this.eventInitialisation = false;
|
|
162
|
+
document.body.addEventListener('click', event => {
|
|
163
|
+
this.documentEventSource.next(event.target);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
documentScroll() {
|
|
167
|
+
return this.documentScrollDone;
|
|
168
|
+
}
|
|
169
|
+
setScrollEventListener() {
|
|
170
|
+
window.onscroll = () => {
|
|
171
|
+
this.documentScrollSource.next(window);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
attachComponentPortal(component, injector) {
|
|
175
|
+
const componentRef = this.componentFactoryResolver
|
|
176
|
+
.resolveComponentFactory(component)
|
|
177
|
+
.create(injector ? injector : this.injector);
|
|
178
|
+
this.appRef.attachView(componentRef.hostView);
|
|
179
|
+
this.overlayContainer.getContainerElement().appendChild(this._getComponentRootNode(componentRef));
|
|
180
|
+
return componentRef;
|
|
181
|
+
}
|
|
182
|
+
/** Gets the root HTMLElement for an instantiated component. */
|
|
183
|
+
_getComponentRootNode(componentRef) {
|
|
184
|
+
return componentRef.hostView.rootNodes[0];
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
DomService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DomService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i1$1.OverlayContainer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
188
|
+
DomService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DomService, providedIn: 'root' });
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DomService, decorators: [{
|
|
190
|
+
type: Injectable,
|
|
191
|
+
args: [{
|
|
192
|
+
providedIn: 'root'
|
|
193
|
+
}]
|
|
194
|
+
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i1$1.OverlayContainer }]; } });
|
|
195
|
+
|
|
196
|
+
class AutoHideDirective {
|
|
197
|
+
constructor(_elementRef, domService) {
|
|
198
|
+
this._elementRef = _elementRef;
|
|
199
|
+
this.domService = domService;
|
|
200
|
+
this.forceOn = null;
|
|
201
|
+
this.clickOutside = new EventEmitter();
|
|
202
|
+
}
|
|
203
|
+
ngAfterViewInit() {
|
|
204
|
+
this.subscription = this.domService.documentEvent().subscribe((targetElement) => {
|
|
205
|
+
const clickedInside = this._elementRef.nativeElement.contains(targetElement);
|
|
206
|
+
const classNameFromElement = targetElement.getAttribute('class');
|
|
207
|
+
if (!clickedInside && (classNameFromElement === null || !classNameFromElement.includes(this.triggerElement))) {
|
|
208
|
+
this.clickOutside.emit(null);
|
|
209
|
+
}
|
|
210
|
+
if (this.forceOn != null && classNameFromElement !== null) {
|
|
211
|
+
let needToClose = true;
|
|
212
|
+
this.forceOn.forEach(v => {
|
|
213
|
+
if (!classNameFromElement.includes(v)) {
|
|
214
|
+
needToClose = false;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
if (needToClose) {
|
|
218
|
+
this.clickOutside.emit(null);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
ngOnDestroy() {
|
|
224
|
+
this.subscription.unsubscribe();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
AutoHideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AutoHideDirective, deps: [{ token: i0.ElementRef }, { token: DomService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
228
|
+
AutoHideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: { triggerElement: "triggerElement", forceOn: "forceOn" }, outputs: { clickOutside: "clickOutside" }, ngImport: i0 });
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AutoHideDirective, decorators: [{
|
|
230
|
+
type: Directive,
|
|
231
|
+
args: [{
|
|
232
|
+
selector: '[wzAutoHide]'
|
|
233
|
+
}]
|
|
234
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DomService }]; }, propDecorators: { triggerElement: [{
|
|
235
|
+
type: Input
|
|
236
|
+
}], forceOn: [{
|
|
237
|
+
type: Input
|
|
238
|
+
}], clickOutside: [{
|
|
239
|
+
type: Output,
|
|
240
|
+
args: ['clickOutside']
|
|
241
|
+
}] } });
|
|
242
|
+
|
|
243
|
+
class ZindexToggleDirective {
|
|
244
|
+
constructor(currentElement, renderer) {
|
|
245
|
+
this.currentElement = currentElement;
|
|
246
|
+
this.renderer = renderer;
|
|
247
|
+
this.isActived = false;
|
|
248
|
+
}
|
|
249
|
+
set isActive(value) {
|
|
250
|
+
this.isActived = value;
|
|
251
|
+
this.switchToggle();
|
|
252
|
+
}
|
|
253
|
+
get isActive() {
|
|
254
|
+
return this.isActived;
|
|
255
|
+
}
|
|
256
|
+
ngOnInit() {
|
|
257
|
+
}
|
|
258
|
+
switchToggle() {
|
|
259
|
+
if (this.isActived) {
|
|
260
|
+
this.renderer.addClass(this.currentElement.nativeElement.parentElement.parentNode, 'zindexToggle');
|
|
261
|
+
this.renderer.addClass(this.currentElement.nativeElement.parentElement.parentNode.parentNode, 'zindexToggle');
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
this.renderer.removeClass(this.currentElement.nativeElement.parentElement.parentNode, 'zindexToggle');
|
|
265
|
+
this.renderer.removeClass(this.currentElement.nativeElement.parentElement.parentNode.parentNode, 'zindexToggle');
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
ngOnDestroy() {
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
ZindexToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ZindexToggleDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
272
|
+
ZindexToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: { isActive: ["zIndexToggle", "isActive"] }, outputs: { onEventChange: "onEventChange" }, ngImport: i0 });
|
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ZindexToggleDirective, decorators: [{
|
|
274
|
+
type: Directive,
|
|
275
|
+
args: [{
|
|
276
|
+
selector: '[zIndexToggle]'
|
|
277
|
+
}]
|
|
278
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { onEventChange: [{
|
|
279
|
+
type: Output
|
|
280
|
+
}], isActive: [{
|
|
281
|
+
type: Input,
|
|
282
|
+
args: ['zIndexToggle']
|
|
283
|
+
}] } });
|
|
284
|
+
|
|
285
|
+
class VarDirective {
|
|
286
|
+
constructor(templateRef, vcRef) {
|
|
287
|
+
this.templateRef = templateRef;
|
|
288
|
+
this.vcRef = vcRef;
|
|
289
|
+
this.context = {
|
|
290
|
+
$implicit: null,
|
|
291
|
+
ngVar: null,
|
|
292
|
+
};
|
|
293
|
+
this.hasView = false;
|
|
294
|
+
}
|
|
295
|
+
// https://stackoverflow.com/questions/38582293/how-to-declare-a-variable-in-a-template-in-angular
|
|
296
|
+
set ngVar(context) {
|
|
297
|
+
this.context.$implicit = this.context.ngVar = context;
|
|
298
|
+
if (!this.hasView) {
|
|
299
|
+
this.vcRef.createEmbeddedView(this.templateRef, this.context);
|
|
300
|
+
this.hasView = true;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
VarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: VarDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
305
|
+
VarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: VarDirective, selector: "[ngVar]", inputs: { ngVar: "ngVar" }, ngImport: i0 });
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: VarDirective, decorators: [{
|
|
307
|
+
type: Directive,
|
|
308
|
+
args: [{
|
|
309
|
+
selector: '[ngVar]',
|
|
310
|
+
}]
|
|
311
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { ngVar: [{
|
|
312
|
+
type: Input
|
|
313
|
+
}] } });
|
|
314
|
+
|
|
315
|
+
class KeypressEnterDirective {
|
|
316
|
+
constructor() {
|
|
317
|
+
this.KEYPRESS_ENTER = "Enter";
|
|
318
|
+
this.keypressEnter = new EventEmitter();
|
|
319
|
+
}
|
|
320
|
+
onKeypress(event) {
|
|
321
|
+
if (event.key === this.KEYPRESS_ENTER) {
|
|
322
|
+
this.keypressEnter.next(true);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
KeypressEnterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: KeypressEnterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
327
|
+
KeypressEnterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: KeypressEnterDirective, selector: "[keypressEnter]", outputs: { keypressEnter: "keypressEnter" }, host: { listeners: { "keypress": "onKeypress($event)" } }, ngImport: i0 });
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: KeypressEnterDirective, decorators: [{
|
|
329
|
+
type: Directive,
|
|
330
|
+
args: [{ selector: '[keypressEnter]' }]
|
|
331
|
+
}], ctorParameters: function () { return []; }, propDecorators: { onKeypress: [{
|
|
332
|
+
type: HostListener,
|
|
333
|
+
args: ['keypress', ['$event']]
|
|
334
|
+
}], keypressEnter: [{
|
|
335
|
+
type: Output
|
|
336
|
+
}] } });
|
|
337
|
+
|
|
338
|
+
const directives$1 = [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective];
|
|
339
|
+
class SharedDirectives {
|
|
340
|
+
}
|
|
341
|
+
SharedDirectives.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
342
|
+
SharedDirectives.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, declarations: [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective], imports: [CommonModule, FormsModule], exports: [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective] });
|
|
343
|
+
SharedDirectives.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, imports: [CommonModule, FormsModule] });
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, decorators: [{
|
|
345
|
+
type: NgModule,
|
|
346
|
+
args: [{
|
|
347
|
+
imports: [CommonModule, FormsModule],
|
|
348
|
+
declarations: directives$1,
|
|
349
|
+
exports: directives$1
|
|
350
|
+
}]
|
|
351
|
+
}] });
|
|
352
|
+
|
|
353
|
+
const inOutY = trigger('inOutYAnimation', [
|
|
354
|
+
transition(':enter', [
|
|
355
|
+
style({ transform: 'scaleY(0)', height: 0, opacity: 0 }),
|
|
356
|
+
animate('.3s ease-out', style({ transform: 'scaleY(1)', height: 'auto', opacity: 1 }))
|
|
357
|
+
]),
|
|
358
|
+
transition(':leave', [
|
|
359
|
+
style({ transform: 'scaleY(1)', height: 'auto', opacity: 1 }),
|
|
360
|
+
animate('.3s ease-in', style({ transform: 'scaleY(0)', height: 0, opacity: 0 }))
|
|
361
|
+
])
|
|
362
|
+
]);
|
|
363
|
+
|
|
364
|
+
class CheckboxComponent {
|
|
365
|
+
constructor() {
|
|
366
|
+
this.label = '';
|
|
367
|
+
this.alone = false;
|
|
368
|
+
this.checked = false;
|
|
369
|
+
this.hasInput = false;
|
|
370
|
+
this.inputPlaceholder = '';
|
|
371
|
+
this.id = '';
|
|
372
|
+
this.whiteSpace = true;
|
|
373
|
+
this.disabled = false;
|
|
374
|
+
}
|
|
375
|
+
registerOnChange(fn) {
|
|
376
|
+
this._onChange = fn;
|
|
377
|
+
}
|
|
378
|
+
registerOnTouched(fn) {
|
|
379
|
+
this._onTouched = fn;
|
|
380
|
+
}
|
|
381
|
+
setDisabledState(isDisabled) {
|
|
382
|
+
this.disabled = isDisabled;
|
|
383
|
+
}
|
|
384
|
+
writeValue(obj) {
|
|
385
|
+
this.value = obj;
|
|
386
|
+
}
|
|
387
|
+
onChange(value) {
|
|
388
|
+
if (this._onChange) {
|
|
389
|
+
this._onChange(value);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
onTextInputChange(value) {
|
|
393
|
+
if (this._onTextInputChange) {
|
|
394
|
+
this._onTextInputChange(value);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
inputClick($event) {
|
|
398
|
+
$event.stopPropagation();
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
402
|
+
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CheckboxComponent, selector: "wac-checkbox", inputs: { label: "label", value: "value", type: "type", alone: "alone", checked: "checked", hasInput: "hasInput", inputPlaceholder: "inputPlaceholder", id: "id", name: "name", whiteSpace: "whiteSpace" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], ngImport: i0, template: "<div class=\"wac-field-checkbox\" [ngClass]=\"{ 'wac-field-checkbox--nowrap': type === 'column', 'disable-wt' : !whiteSpace, alone: alone }\">\n <div class=\"wac-field-checkbox__row\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [checked]=\"checked\"\n (ngModelChange)=\"onChange($event)\"\n />\n <label [attr.for]=\"id\"><span [innerHTML]=\"label\"></span></label>\n </div>\n <input\n *ngIf=\"hasInput && checked\"\n [@inOutYAnimation]\n type=\"text\"\n [placeholder]=\"inputPlaceholder\"\n (click)=\"inputClick($event)\"\n />\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [inOutY] });
|
|
403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
404
|
+
type: Component,
|
|
405
|
+
args: [{ selector: 'wac-checkbox', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], animations: [inOutY], template: "<div class=\"wac-field-checkbox\" [ngClass]=\"{ 'wac-field-checkbox--nowrap': type === 'column', 'disable-wt' : !whiteSpace, alone: alone }\">\n <div class=\"wac-field-checkbox__row\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [checked]=\"checked\"\n (ngModelChange)=\"onChange($event)\"\n />\n <label [attr.for]=\"id\"><span [innerHTML]=\"label\"></span></label>\n </div>\n <input\n *ngIf=\"hasInput && checked\"\n [@inOutYAnimation]\n type=\"text\"\n [placeholder]=\"inputPlaceholder\"\n (click)=\"inputClick($event)\"\n />\n</div>\n" }]
|
|
406
|
+
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
407
|
+
type: Input
|
|
408
|
+
}], value: [{
|
|
409
|
+
type: Input
|
|
410
|
+
}], type: [{
|
|
411
|
+
type: Input
|
|
412
|
+
}], alone: [{
|
|
413
|
+
type: Input
|
|
414
|
+
}], checked: [{
|
|
415
|
+
type: Input
|
|
416
|
+
}], hasInput: [{
|
|
417
|
+
type: Input
|
|
418
|
+
}], inputPlaceholder: [{
|
|
419
|
+
type: Input
|
|
420
|
+
}], id: [{
|
|
421
|
+
type: Input
|
|
422
|
+
}], name: [{
|
|
423
|
+
type: Input
|
|
424
|
+
}], whiteSpace: [{
|
|
425
|
+
type: Input
|
|
426
|
+
}] } });
|
|
427
|
+
|
|
428
|
+
class HtmlContainer {
|
|
429
|
+
constructor(hostElement, appRef, componentFactoryResolver, injector) {
|
|
430
|
+
this.hostElement = hostElement;
|
|
431
|
+
this.appRef = appRef;
|
|
432
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
433
|
+
this.injector = injector;
|
|
434
|
+
this.attached = false;
|
|
435
|
+
}
|
|
436
|
+
attach(component) {
|
|
437
|
+
if (this.attached) {
|
|
438
|
+
throw new Error('component has already been attached');
|
|
439
|
+
}
|
|
440
|
+
this.attached = true;
|
|
441
|
+
const childComponentFactory = this.componentFactoryResolver.resolveComponentFactory(component);
|
|
442
|
+
let componentRef = childComponentFactory.create(this.injector);
|
|
443
|
+
this.appRef.attachView(componentRef.hostView);
|
|
444
|
+
this.disposeFn = () => {
|
|
445
|
+
this.appRef.detachView(componentRef.hostView);
|
|
446
|
+
componentRef.destroy();
|
|
447
|
+
};
|
|
448
|
+
this.hostElement.appendChild(componentRef.hostView.rootNodes[0]);
|
|
449
|
+
return componentRef;
|
|
450
|
+
}
|
|
451
|
+
dispose() {
|
|
452
|
+
if (this.attached) {
|
|
453
|
+
this.disposeFn();
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
class TableCheckboxIdService {
|
|
459
|
+
constructor() {
|
|
460
|
+
this.nbCheckboxInstances = 0;
|
|
461
|
+
TableCheckboxIdService.tableInstance++;
|
|
462
|
+
this.currentTableInstance = TableCheckboxIdService.tableInstance;
|
|
463
|
+
}
|
|
464
|
+
getUniqueId() {
|
|
465
|
+
this.nbCheckboxInstances++;
|
|
466
|
+
return `wac-table-${this.currentTableInstance}-${this.nbCheckboxInstances}`;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
TableCheckboxIdService.tableInstance = 0;
|
|
470
|
+
TableCheckboxIdService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableCheckboxIdService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
471
|
+
TableCheckboxIdService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableCheckboxIdService });
|
|
472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableCheckboxIdService, decorators: [{
|
|
473
|
+
type: Injectable
|
|
474
|
+
}], ctorParameters: function () { return []; } });
|
|
475
|
+
|
|
476
|
+
class CheckBoxRow {
|
|
477
|
+
constructor(currentRow, appRef, renderer, document, resolver, injector, tableCheckboxIdService) {
|
|
478
|
+
this.currentRow = currentRow;
|
|
479
|
+
this.appRef = appRef;
|
|
480
|
+
this.renderer = renderer;
|
|
481
|
+
this.document = document;
|
|
482
|
+
this.resolver = resolver;
|
|
483
|
+
this.injector = injector;
|
|
484
|
+
this.tableCheckboxIdService = tableCheckboxIdService;
|
|
485
|
+
this.checkBoxValueChange = new EventEmitter();
|
|
486
|
+
}
|
|
487
|
+
set checkBoxValue(value) {
|
|
488
|
+
this._value = value;
|
|
489
|
+
if (this.checkboxComponentRef) {
|
|
490
|
+
this.setCheckBoxValue();
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
get checkBoxValue() {
|
|
494
|
+
return this._value;
|
|
495
|
+
}
|
|
496
|
+
ngOnInit() {
|
|
497
|
+
this.createCheckBoxComponent();
|
|
498
|
+
this.handleChecboxInputs();
|
|
499
|
+
this.handleCheckboxOutputs();
|
|
500
|
+
}
|
|
501
|
+
createCheckBoxComponent() {
|
|
502
|
+
// Create the container
|
|
503
|
+
this.checkBoxElement = document.createElement('div');
|
|
504
|
+
this.checkBoxElement.className = 'wac-table__body__line__cell wac-table__body__line__cell--checkbox';
|
|
505
|
+
// Insert divCheckBox in the DOM as the first child of the row
|
|
506
|
+
this.renderer.insertBefore(this.currentRow.nativeElement, this.checkBoxElement, this.currentRow.nativeElement.firstChild);
|
|
507
|
+
// Insert the CheckBoxComponent inside the container (DOM and Angular DOM)
|
|
508
|
+
this.htmlContainer = new HtmlContainer(this.checkBoxElement, this.appRef, this.resolver, this.injector);
|
|
509
|
+
this.checkboxComponentRef = this.htmlContainer.attach(CheckboxComponent);
|
|
510
|
+
}
|
|
511
|
+
handleChecboxInputs() {
|
|
512
|
+
this.checkboxComponentRef.instance.id = this.checkBoxId ? '' + this.checkBoxId : this.tableCheckboxIdService.getUniqueId();
|
|
513
|
+
this.checkboxComponentRef.instance.name = this.checkBoxName ? this.checkBoxName : undefined;
|
|
514
|
+
this.checkboxComponentRef.instance.alone = true;
|
|
515
|
+
this.setCheckBoxValue();
|
|
516
|
+
}
|
|
517
|
+
setCheckBoxValue() {
|
|
518
|
+
this.checkboxComponentRef.instance.value = this.checkBoxValue;
|
|
519
|
+
}
|
|
520
|
+
handleCheckboxOutputs() {
|
|
521
|
+
// Detect checkbox changes
|
|
522
|
+
this.checkboxComponentRef.instance.registerOnChange(() => {
|
|
523
|
+
this._toggleCheckbox();
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
_toggleCheckbox() {
|
|
527
|
+
this.checkBoxValueChange.emit(this.checkBoxValue);
|
|
528
|
+
}
|
|
529
|
+
getElement() {
|
|
530
|
+
return this.checkBoxElement.querySelector('.wac-field-checkbox');
|
|
531
|
+
}
|
|
532
|
+
isActive() {
|
|
533
|
+
return !!this.checkboxComponentRef.instance.value;
|
|
534
|
+
}
|
|
535
|
+
setActive(isActive) {
|
|
536
|
+
this.checkboxComponentRef.instance.value = isActive; //? does not trigger output
|
|
537
|
+
}
|
|
538
|
+
ngOnDestroy() {
|
|
539
|
+
this.htmlContainer.dispose();
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
CheckBoxRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckBoxRow, deps: [{ token: i0.ElementRef }, { token: i0.ApplicationRef }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: TableCheckboxIdService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
543
|
+
CheckBoxRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: CheckBoxRow, selector: "[checkBoxRow]", inputs: { checkBoxId: "checkBoxId", checkBoxName: "checkBoxName", checkBoxValue: "checkBoxValue" }, outputs: { checkBoxValueChange: "checkBoxValueChange" }, ngImport: i0 });
|
|
544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckBoxRow, decorators: [{
|
|
545
|
+
type: Directive,
|
|
546
|
+
args: [{
|
|
547
|
+
selector: '[checkBoxRow]'
|
|
548
|
+
}]
|
|
549
|
+
}], ctorParameters: function () {
|
|
550
|
+
return [{ type: i0.ElementRef }, { type: i0.ApplicationRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
551
|
+
type: Inject,
|
|
552
|
+
args: [DOCUMENT]
|
|
553
|
+
}] }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: TableCheckboxIdService }];
|
|
554
|
+
}, propDecorators: { checkBoxId: [{
|
|
555
|
+
type: Input,
|
|
556
|
+
args: ['checkBoxId']
|
|
557
|
+
}], checkBoxName: [{
|
|
558
|
+
type: Input,
|
|
559
|
+
args: ['checkBoxName']
|
|
560
|
+
}], checkBoxValue: [{
|
|
561
|
+
type: Input,
|
|
562
|
+
args: ['checkBoxValue']
|
|
563
|
+
}], checkBoxValueChange: [{
|
|
564
|
+
type: Output
|
|
565
|
+
}] } });
|
|
566
|
+
|
|
567
|
+
class MultiSelectionService {
|
|
568
|
+
constructor() {
|
|
569
|
+
this.activeChanges = new Subject();
|
|
570
|
+
this.activeChanges$ = this.activeChanges.asObservable();
|
|
571
|
+
}
|
|
572
|
+
handle(items, toggleSingleItem = false) {
|
|
573
|
+
if (!items || !items.first) {
|
|
574
|
+
this.destroy();
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
this.destroy(); // close previous subsciption
|
|
578
|
+
this.items = items;
|
|
579
|
+
const clicks$ = this.getListeners();
|
|
580
|
+
this.subscription = merge(...clicks$).subscribe(({ component, isShift: isShiftKeyPressed, index }) => {
|
|
581
|
+
if (!isShiftKeyPressed) {
|
|
582
|
+
if (toggleSingleItem) {
|
|
583
|
+
component.setActive(!component.isActive());
|
|
584
|
+
}
|
|
585
|
+
this.activeChanges.next([index]);
|
|
586
|
+
this.lastIndex = index;
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
const start = index;
|
|
590
|
+
const end = this.lastIndex;
|
|
591
|
+
const [first, last] = [Math.min(start, end), Math.max(start, end) + 1];
|
|
592
|
+
const itemsSelection = this.items.toArray().slice(first, last);
|
|
593
|
+
const isBeginnerItemActive = this.items.get(end).isActive();
|
|
594
|
+
itemsSelection.forEach(current => current.setActive(isBeginnerItemActive));
|
|
595
|
+
window.getSelection().removeAllRanges(); // remove text selection
|
|
596
|
+
const indexInRange = Array.from({ length: last - first }, (x, i) => i + first);
|
|
597
|
+
this.activeChanges.next(indexInRange);
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
getListeners() {
|
|
601
|
+
return this.items.map((item, index) => {
|
|
602
|
+
return fromEvent(item.getElement(), 'click').pipe(map((event) => {
|
|
603
|
+
return {
|
|
604
|
+
index,
|
|
605
|
+
isShift: event.shiftKey,
|
|
606
|
+
component: item
|
|
607
|
+
};
|
|
608
|
+
}))
|
|
609
|
+
.pipe(debounceTime(100)); // debounced, because when clicking on a wac-checkbox it is emitted twice and can not find why
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
getActives() {
|
|
613
|
+
return this.items.filter(item => item.isActive());
|
|
614
|
+
}
|
|
615
|
+
destroy() {
|
|
616
|
+
var _a;
|
|
617
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
MultiSelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: MultiSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
621
|
+
MultiSelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: MultiSelectionService });
|
|
622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: MultiSelectionService, decorators: [{
|
|
623
|
+
type: Injectable
|
|
624
|
+
}], ctorParameters: function () { return []; } });
|
|
625
|
+
|
|
626
|
+
class TableRow {
|
|
627
|
+
constructor(currentCell, renderer, document) {
|
|
628
|
+
this.currentCell = currentCell;
|
|
629
|
+
this.renderer = renderer;
|
|
630
|
+
this.document = document;
|
|
631
|
+
}
|
|
632
|
+
ngAfterViewInit() {
|
|
633
|
+
this.applyCustomStylesOnCell();
|
|
634
|
+
}
|
|
635
|
+
applyCustomStylesOnCell() {
|
|
636
|
+
this.renderer.addClass(this.currentCell.nativeElement, 'wac-table__body__line');
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
TableRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableRow, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
640
|
+
TableRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: TableRow, selector: "[tableRow]", ngImport: i0 });
|
|
641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableRow, decorators: [{
|
|
642
|
+
type: Directive,
|
|
643
|
+
args: [{
|
|
644
|
+
// The selector has the same name as the tableRaw selector in table.component.html
|
|
645
|
+
selector: '[tableRow]'
|
|
646
|
+
}]
|
|
647
|
+
}], ctorParameters: function () {
|
|
648
|
+
return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
649
|
+
type: Inject,
|
|
650
|
+
args: [DOCUMENT]
|
|
651
|
+
}] }];
|
|
652
|
+
} });
|
|
653
|
+
|
|
654
|
+
class FiltersTableService {
|
|
655
|
+
constructor(filterRoutingBuilder) {
|
|
656
|
+
this.filterRoutingBuilder = filterRoutingBuilder;
|
|
657
|
+
this.filterGroups = new Map();
|
|
658
|
+
this.sortSubject = new Subject();
|
|
659
|
+
}
|
|
660
|
+
getTableFilterGroup(dataTableName) {
|
|
661
|
+
if (this.filterGroups.has(dataTableName)) {
|
|
662
|
+
return this.filterGroups.get(dataTableName);
|
|
663
|
+
}
|
|
664
|
+
const dataTableFilters = {
|
|
665
|
+
sort: undefined,
|
|
666
|
+
order: undefined,
|
|
667
|
+
searchValue: undefined,
|
|
668
|
+
totalItems: 0,
|
|
669
|
+
itemsPerPage: 0,
|
|
670
|
+
currentPage: 0
|
|
671
|
+
};
|
|
672
|
+
const filterGroup = this.filterRoutingBuilder.group(dataTableFilters, dataTableName);
|
|
673
|
+
filterGroup.tableFiltersValuesChange$ = new ReplaySubject(1);
|
|
674
|
+
filterGroup.tableFiltersValuesDebouncedChange$ = filterGroup.tableFiltersValuesChange$.pipe(debounceTime(300));
|
|
675
|
+
this.filterGroups.set(dataTableName, filterGroup);
|
|
676
|
+
return filterGroup;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Use to reset the others sorts of the table
|
|
680
|
+
* @param dataTableName
|
|
681
|
+
* @param sortName
|
|
682
|
+
* @param order
|
|
683
|
+
*/
|
|
684
|
+
emitSortChange(dataTableName, sortName, order) {
|
|
685
|
+
this.sortSubject.next({ dataTableName, sortName, order });
|
|
686
|
+
}
|
|
687
|
+
getSortChangeListner() {
|
|
688
|
+
return this.sortSubject.asObservable();
|
|
689
|
+
}
|
|
690
|
+
setPaginationFilters(dataTableName, totalItems, itemsPerPage, currentPage) {
|
|
691
|
+
const filterGroup = this.getTableFilterGroup(dataTableName);
|
|
692
|
+
filterGroup.setValues({
|
|
693
|
+
itemsPerPage,
|
|
694
|
+
currentPage
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
/*
|
|
698
|
+
Add defaults filters in the URL if they not exists.
|
|
699
|
+
*/
|
|
700
|
+
setInitialPaginationFiltersIfNotExist(dataTableName, itemsPerPage, currentPage) {
|
|
701
|
+
const filterGroup = this.getTableFilterGroup(dataTableName);
|
|
702
|
+
filterGroup.setValues({
|
|
703
|
+
itemsPerPage: filterGroup.get('itemsPerPage') ? parseInt(filterGroup.get('itemsPerPage')) : itemsPerPage,
|
|
704
|
+
currentPage: filterGroup.get('currentPage') ? parseInt(filterGroup.get('currentPage')) : currentPage
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
FiltersTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FiltersTableService, deps: [{ token: i1$2.NwbFilterRoutingBuilder }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
709
|
+
FiltersTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FiltersTableService, providedIn: 'root' });
|
|
710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FiltersTableService, decorators: [{
|
|
711
|
+
type: Injectable,
|
|
712
|
+
args: [{
|
|
713
|
+
providedIn: 'root'
|
|
714
|
+
}]
|
|
715
|
+
}], ctorParameters: function () { return [{ type: i1$2.NwbFilterRoutingBuilder }]; } });
|
|
716
|
+
|
|
717
|
+
class PagniationIsLastPage {
|
|
718
|
+
/**
|
|
719
|
+
* Return true, if the current page is the last page. Otherwise, return false.
|
|
720
|
+
* @param currentPage
|
|
721
|
+
* @param totalItems
|
|
722
|
+
* @param itemsPerPage
|
|
723
|
+
*/
|
|
724
|
+
transform(currentPage, totalItems, itemsPerPage) {
|
|
725
|
+
if (!(currentPage >= 0 && totalItems >= 0 && itemsPerPage >= 0)) {
|
|
726
|
+
throw new Error('currentPage or totalItems or itemsPerPage is/are missing in PagniationIsLastPage pipe.');
|
|
727
|
+
}
|
|
728
|
+
return currentPage === Math.ceil(totalItems / itemsPerPage);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
PagniationIsLastPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PagniationIsLastPage, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
732
|
+
PagniationIsLastPage.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: PagniationIsLastPage, name: "IsLastPage" });
|
|
733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PagniationIsLastPage, decorators: [{
|
|
734
|
+
type: Pipe,
|
|
735
|
+
args: [{
|
|
736
|
+
name: 'IsLastPage'
|
|
737
|
+
}]
|
|
738
|
+
}] });
|
|
739
|
+
|
|
740
|
+
class PagniationArrayTotalPages {
|
|
741
|
+
/**
|
|
742
|
+
* Return an incremental array corresponding with the number page
|
|
743
|
+
* [ 1, 2, 3 ..., last page number ]
|
|
744
|
+
* @param totalItems
|
|
745
|
+
* @param itemsPerPage
|
|
746
|
+
*/
|
|
747
|
+
transform(totalItems, itemsPerPage) {
|
|
748
|
+
if (!(totalItems >= 0 && itemsPerPage >= 0)) {
|
|
749
|
+
throw new Error('totalItems or itemsPerPage missing in ArrayTotalPages pipe.');
|
|
750
|
+
}
|
|
751
|
+
const arrayLength = Math.ceil(totalItems / itemsPerPage);
|
|
752
|
+
return Array.apply(null, { length: arrayLength })
|
|
753
|
+
.map(Number.call, Number)
|
|
754
|
+
.map(x => x + 1);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
PagniationArrayTotalPages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PagniationArrayTotalPages, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
758
|
+
PagniationArrayTotalPages.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: PagniationArrayTotalPages, name: "ArrayTotalPages" });
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PagniationArrayTotalPages, decorators: [{
|
|
760
|
+
type: Pipe,
|
|
761
|
+
args: [{
|
|
762
|
+
name: 'ArrayTotalPages'
|
|
763
|
+
}]
|
|
764
|
+
}] });
|
|
765
|
+
|
|
766
|
+
class PagniationText {
|
|
767
|
+
constructor(translateService) {
|
|
768
|
+
this.translateService = translateService;
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Update pagination text if at least one entrie change
|
|
772
|
+
* @param currentPage
|
|
773
|
+
* @param totalItems
|
|
774
|
+
* @param itemsPerPage
|
|
775
|
+
*/
|
|
776
|
+
transform(currentPage, totalItems, itemsPerPage) {
|
|
777
|
+
let currentItemsLow = 0, currentItemsHigh = 0;
|
|
778
|
+
if (totalItems) {
|
|
779
|
+
currentItemsLow = (parseInt(currentPage) - 1) * parseInt(itemsPerPage) + 1;
|
|
780
|
+
currentItemsHigh = parseInt(currentPage) * parseInt(itemsPerPage);
|
|
781
|
+
}
|
|
782
|
+
if (currentItemsHigh > totalItems) {
|
|
783
|
+
currentItemsHigh = totalItems;
|
|
784
|
+
}
|
|
785
|
+
return this.translateService.get('wac.PaginationComponent.on', { low: currentItemsLow, high: currentItemsHigh, total: totalItems });
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
PagniationText.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PagniationText, deps: [{ token: i1$3.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
789
|
+
PagniationText.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: PagniationText, name: "customPagniationText" });
|
|
790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PagniationText, decorators: [{
|
|
791
|
+
type: Pipe,
|
|
792
|
+
args: [{
|
|
793
|
+
name: 'customPagniationText'
|
|
794
|
+
}]
|
|
795
|
+
}], ctorParameters: function () { return [{ type: i1$3.TranslateService }]; } });
|
|
796
|
+
|
|
797
|
+
class PaginationComponent {
|
|
798
|
+
constructor() {
|
|
799
|
+
this.pageChange = new EventEmitter();
|
|
800
|
+
}
|
|
801
|
+
set pagination(pagination) {
|
|
802
|
+
this._pagination = pagination;
|
|
803
|
+
}
|
|
804
|
+
get pagination() {
|
|
805
|
+
return this._pagination;
|
|
806
|
+
}
|
|
807
|
+
decrementPage() {
|
|
808
|
+
if (this.pagination.currentPage <= 1) {
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
this.pagination.currentPage--;
|
|
812
|
+
this.pageChange.emit(this.pagination);
|
|
813
|
+
}
|
|
814
|
+
incrementPage() {
|
|
815
|
+
const isLastPage = new PagniationIsLastPage().transform(this.pagination.currentPage, this.pagination.totalItems, this.pagination.itemsPerPage);
|
|
816
|
+
if (isLastPage) {
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
this.pagination.currentPage++;
|
|
820
|
+
this.pageChange.emit(this.pagination);
|
|
821
|
+
}
|
|
822
|
+
onGotoPageChange(event) {
|
|
823
|
+
this.pagination.currentPage = parseInt(event.target.value);
|
|
824
|
+
this.pageChange.emit(this.pagination);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
828
|
+
PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: PaginationComponent, selector: "wac-pagination", inputs: { pagination: "pagination" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"wac-pagination\" *ngIf=\"pagination && pagination.itemsPerPage\">\n <div class=\"wac-pagination__wrapper\">\n <div class=\"wac-pagination__wrapper__page\">\n <p>{{ 'wac.PaginationComponent.page' | translate }}</p>\n\n <select name=\"page\" (change)=\"onGotoPageChange($event)\">\n <ng-container *ngFor=\"let pageIndex of pagination.totalItems | ArrayTotalPages: pagination.itemsPerPage\">\n <option [selected]=\"pageIndex === pagination.currentPage\" [value]=\"pageIndex\">\n {{ pageIndex }}\n </option>\n </ng-container>\n </select>\n </div>\n\n <div class=\"wac-pagination__wrapper__elements\">\n <p>{{ pagination.currentPage | customPagniationText: pagination.totalItems:pagination.itemsPerPage | async}}</p>\n </div>\n\n <div class=\"wac-pagination__wrapper__arrows\">\n <div\n (click)=\"decrementPage()\"\n class=\"wac-pagination__wrapper__arrows__arrow wac-pagination__wrapper__arrows__arrow--left\"\n [ngClass]=\"{ 'wac-pagination__wrapper__arrows__arrow--disabled': pagination.currentPage === 1 }\"\n >\n <span class=\"wac-pagination__wrapper__arrows__arrow__icon\"></span>\n </div>\n <div\n (click)=\"incrementPage()\"\n class=\"wac-pagination__wrapper__arrows__arrow wac-pagination__wrapper__arrows__arrow--right\"\n [ngClass]=\"{\n 'wac-pagination__wrapper__arrows__arrow--disabled':\n pagination.currentPage | IsLastPage: pagination.totalItems:pagination.itemsPerPage\n }\"\n >\n <span class=\"wac-pagination__wrapper__arrows__arrow__icon\"></span>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }, { kind: "pipe", type: PagniationArrayTotalPages, name: "ArrayTotalPages" }, { kind: "pipe", type: PagniationIsLastPage, name: "IsLastPage" }, { kind: "pipe", type: PagniationText, name: "customPagniationText" }] });
|
|
829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
830
|
+
type: Component,
|
|
831
|
+
args: [{ selector: 'wac-pagination', template: "<div class=\"wac-pagination\" *ngIf=\"pagination && pagination.itemsPerPage\">\n <div class=\"wac-pagination__wrapper\">\n <div class=\"wac-pagination__wrapper__page\">\n <p>{{ 'wac.PaginationComponent.page' | translate }}</p>\n\n <select name=\"page\" (change)=\"onGotoPageChange($event)\">\n <ng-container *ngFor=\"let pageIndex of pagination.totalItems | ArrayTotalPages: pagination.itemsPerPage\">\n <option [selected]=\"pageIndex === pagination.currentPage\" [value]=\"pageIndex\">\n {{ pageIndex }}\n </option>\n </ng-container>\n </select>\n </div>\n\n <div class=\"wac-pagination__wrapper__elements\">\n <p>{{ pagination.currentPage | customPagniationText: pagination.totalItems:pagination.itemsPerPage | async}}</p>\n </div>\n\n <div class=\"wac-pagination__wrapper__arrows\">\n <div\n (click)=\"decrementPage()\"\n class=\"wac-pagination__wrapper__arrows__arrow wac-pagination__wrapper__arrows__arrow--left\"\n [ngClass]=\"{ 'wac-pagination__wrapper__arrows__arrow--disabled': pagination.currentPage === 1 }\"\n >\n <span class=\"wac-pagination__wrapper__arrows__arrow__icon\"></span>\n </div>\n <div\n (click)=\"incrementPage()\"\n class=\"wac-pagination__wrapper__arrows__arrow wac-pagination__wrapper__arrows__arrow--right\"\n [ngClass]=\"{\n 'wac-pagination__wrapper__arrows__arrow--disabled':\n pagination.currentPage | IsLastPage: pagination.totalItems:pagination.itemsPerPage\n }\"\n >\n <span class=\"wac-pagination__wrapper__arrows__arrow__icon\"></span>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
832
|
+
}], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
|
|
833
|
+
type: Input
|
|
834
|
+
}], pageChange: [{
|
|
835
|
+
type: Output
|
|
836
|
+
}] } });
|
|
837
|
+
|
|
838
|
+
class TableComponent {
|
|
839
|
+
constructor(filtersTableService, tableCheckboxIdService, multiSelectionService) {
|
|
840
|
+
this.filtersTableService = filtersTableService;
|
|
841
|
+
this.tableCheckboxIdService = tableCheckboxIdService;
|
|
842
|
+
this.multiSelectionService = multiSelectionService;
|
|
843
|
+
this.tableFiltersChange = new EventEmitter();
|
|
844
|
+
this.placeholder = '';
|
|
845
|
+
/// Input/Output of checkbox ///
|
|
846
|
+
/** Pass to true to display checkbox in the header table */
|
|
847
|
+
this.checkbox = false;
|
|
848
|
+
this.toggleAllCheckBox = new EventEmitter(); // todo replace by checkBoxSelectionChange
|
|
849
|
+
this.checkBoxSelectionChange = new EventEmitter(); // todo add to doc
|
|
850
|
+
/// Input to disable section ///
|
|
851
|
+
/** Pass to true to hide search input */
|
|
852
|
+
this.disableSearch = false;
|
|
853
|
+
/** Pass to true to hide the pagniator */
|
|
854
|
+
this.disablePagniation = false;
|
|
855
|
+
/// Input for loader on table body ///
|
|
856
|
+
this.isLoading = false;
|
|
857
|
+
}
|
|
858
|
+
ngOnInit() {
|
|
859
|
+
this.headerCheckBoxId = this.tableCheckboxIdService.getUniqueId(); // Create checkbox unique id
|
|
860
|
+
/* Handle routing filters */
|
|
861
|
+
if (this.tableRoutingName) {
|
|
862
|
+
this.filtersTableService.setInitialPaginationFiltersIfNotExist(this.tableRoutingName, this.tableFilters.itemsPerPage, this.tableFilters.currentPage);
|
|
863
|
+
this._tableFiltersGroup = this.filtersTableService.getTableFilterGroup(this.tableRoutingName);
|
|
864
|
+
this.setTablesFilters();
|
|
865
|
+
// Listen to filters changes with debounced time to limit multiple api calls
|
|
866
|
+
this.filterGroupChangeSub = this._tableFiltersGroup.valuesChange$.subscribe(() => {
|
|
867
|
+
this.setTablesFilters();
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
this.multiSelectionService.activeChanges$.subscribe(selectionIndexRawCheckChange => {
|
|
871
|
+
this.checkBoxSelectionChange.emit(selectionIndexRawCheckChange);
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
ngAfterViewInit() {
|
|
875
|
+
this.multiSelectionService.handle(this.checkBoxRows);
|
|
876
|
+
this.checkBoxRows.changes.subscribe(() => {
|
|
877
|
+
this.multiSelectionService.handle(this.checkBoxRows);
|
|
878
|
+
});
|
|
879
|
+
console.log('this.tableRows', this.tableRows);
|
|
880
|
+
}
|
|
881
|
+
onToggleAllCheckBox(event) {
|
|
882
|
+
this.toggleAllCheckBox.emit(event.target.checked);
|
|
883
|
+
}
|
|
884
|
+
searchChange() {
|
|
885
|
+
// Reset table filters
|
|
886
|
+
this.tableFilters.sort = undefined;
|
|
887
|
+
this.tableFilters.order = undefined;
|
|
888
|
+
this.tableFilters.currentPage = 1;
|
|
889
|
+
this.tableFiltersChange.emit(this.tableFilters);
|
|
890
|
+
// Reset routing filters
|
|
891
|
+
if (this._tableFiltersGroup) {
|
|
892
|
+
this._tableFiltersGroup.setValues({
|
|
893
|
+
searchValue: this.tableFilters.searchValue,
|
|
894
|
+
sort: undefined,
|
|
895
|
+
order: undefined,
|
|
896
|
+
currentPage: 1
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
pageChange() {
|
|
901
|
+
this.tableFiltersChange.emit(this.tableFilters);
|
|
902
|
+
if (this._tableFiltersGroup) {
|
|
903
|
+
this._tableFiltersGroup.setValues({
|
|
904
|
+
itemsPerPage: this.tableFilters.itemsPerPage,
|
|
905
|
+
currentPage: this.tableFilters.currentPage
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Set tableFilters from routing data existing in the url
|
|
911
|
+
* */
|
|
912
|
+
setTablesFilters() {
|
|
913
|
+
this.tableFilters = {
|
|
914
|
+
sort: this._tableFiltersGroup.get('sort'),
|
|
915
|
+
order: this._tableFiltersGroup.get('order') ? this._tableFiltersGroup.get('order') === 'true' : undefined,
|
|
916
|
+
searchValue: this._tableFiltersGroup.get('searchValue'),
|
|
917
|
+
itemsPerPage: this._tableFiltersGroup.get('itemsPerPage') ? parseInt(this._tableFiltersGroup.get('itemsPerPage')) : 0,
|
|
918
|
+
currentPage: this._tableFiltersGroup.get('currentPage') ? parseInt(this._tableFiltersGroup.get('currentPage')) : 0,
|
|
919
|
+
totalItems: this.tableFilters.totalItems
|
|
920
|
+
};
|
|
921
|
+
this.tableFiltersChange.emit(this.tableFilters);
|
|
922
|
+
this._tableFiltersGroup.tableFiltersValuesChange$.next(this.tableFilters);
|
|
923
|
+
}
|
|
924
|
+
ngOnDestroy() {
|
|
925
|
+
if (this.filterGroupChangeSub) {
|
|
926
|
+
this.filterGroupChangeSub.unsubscribe();
|
|
927
|
+
}
|
|
928
|
+
this.multiSelectionService.destroy();
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableComponent, deps: [{ token: FiltersTableService }, { token: TableCheckboxIdService }, { token: MultiSelectionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
932
|
+
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TableComponent, selector: "wac-table", inputs: { tableFilters: "tableFilters", tableRoutingName: "tableRoutingName", placeholder: "placeholder", checkbox: "checkbox", disableSearch: "disableSearch", disablePagniation: "disablePagniation", isLoading: "isLoading" }, outputs: { tableFiltersChange: "tableFiltersChange", toggleAllCheckBox: "toggleAllCheckBox", checkBoxSelectionChange: "checkBoxSelectionChange" }, providers: [
|
|
933
|
+
TableCheckboxIdService,
|
|
934
|
+
MultiSelectionService
|
|
935
|
+
], queries: [{ propertyName: "checkBoxRows", predicate: CheckBoxRow }, { propertyName: "tableRows", predicate: TableRow }], ngImport: i0, template: "<div class=\"wac-table\">\n <!-- Header section -->\n <div class=\"wac-table__head\" id=\"headerTable\">\n <div *ngIf=\"checkbox\" class=\"wac-table__head__cell wac-table__head__cell--checkbox\">\n <wac-checkbox [id]=\"headerCheckBoxId\" (change)=\"onToggleAllCheckBox($event)\" [alone]=\"true\"></wac-checkbox>\n </div>\n\n <!-- Header contents are added with the headerCell directive -->\n <ng-content select=\"[headerCell]\"></ng-content>\n </div>\n\n <!-- Search section -->\n <div *ngIf=\"!disableSearch\" class=\"wac-table__search\">\n <wac-input-search\n [(ngModel)]=\"tableFilters.searchValue\"\n (changeDebounced)=\"searchChange()\"\n [placeholder]=\"placeholder\"\n [smallPadding]=\"true\"\n ></wac-input-search>\n </div>\n\n <!-- Body section -->\n <div class=\"wac-table__body\">\n <!-- Loader on body -->\n <div class=\"wac-table__body__loader\" *ngIf=\"isLoading\">\n <wac-loader [small]=\"true\"></wac-loader>\n </div>\n <!-- Body contents are added with the tableRow directive -->\n <ng-content select=\".complex-table\" *ngIf=\"!isLoading\"></ng-content>\n <ng-content select=\"[tableRow]\" *ngIf=\"!isLoading\"></ng-content>\n </div>\n\n <!-- Pagination section -->\n <wac-pagination *ngIf=\"!disablePagniation\" [pagination]=\"tableFilters\" (pageChange)=\"pageChange()\"></wac-pagination>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: InputSearchComponent, selector: "wac-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: LoaderComponent, selector: "wac-loader", inputs: ["text", "small"] }, { kind: "component", type: CheckboxComponent, selector: "wac-checkbox", inputs: ["label", "value", "type", "alone", "checked", "hasInput", "inputPlaceholder", "id", "name", "whiteSpace"] }, { kind: "component", type: PaginationComponent, selector: "wac-pagination", inputs: ["pagination"], outputs: ["pageChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableComponent, decorators: [{
|
|
937
|
+
type: Component,
|
|
938
|
+
args: [{ selector: 'wac-table', encapsulation: ViewEncapsulation.None, providers: [
|
|
939
|
+
TableCheckboxIdService,
|
|
940
|
+
MultiSelectionService
|
|
941
|
+
], template: "<div class=\"wac-table\">\n <!-- Header section -->\n <div class=\"wac-table__head\" id=\"headerTable\">\n <div *ngIf=\"checkbox\" class=\"wac-table__head__cell wac-table__head__cell--checkbox\">\n <wac-checkbox [id]=\"headerCheckBoxId\" (change)=\"onToggleAllCheckBox($event)\" [alone]=\"true\"></wac-checkbox>\n </div>\n\n <!-- Header contents are added with the headerCell directive -->\n <ng-content select=\"[headerCell]\"></ng-content>\n </div>\n\n <!-- Search section -->\n <div *ngIf=\"!disableSearch\" class=\"wac-table__search\">\n <wac-input-search\n [(ngModel)]=\"tableFilters.searchValue\"\n (changeDebounced)=\"searchChange()\"\n [placeholder]=\"placeholder\"\n [smallPadding]=\"true\"\n ></wac-input-search>\n </div>\n\n <!-- Body section -->\n <div class=\"wac-table__body\">\n <!-- Loader on body -->\n <div class=\"wac-table__body__loader\" *ngIf=\"isLoading\">\n <wac-loader [small]=\"true\"></wac-loader>\n </div>\n <!-- Body contents are added with the tableRow directive -->\n <ng-content select=\".complex-table\" *ngIf=\"!isLoading\"></ng-content>\n <ng-content select=\"[tableRow]\" *ngIf=\"!isLoading\"></ng-content>\n </div>\n\n <!-- Pagination section -->\n <wac-pagination *ngIf=\"!disablePagniation\" [pagination]=\"tableFilters\" (pageChange)=\"pageChange()\"></wac-pagination>\n</div>\n" }]
|
|
942
|
+
}], ctorParameters: function () { return [{ type: FiltersTableService }, { type: TableCheckboxIdService }, { type: MultiSelectionService }]; }, propDecorators: { checkBoxRows: [{
|
|
943
|
+
type: ContentChildren,
|
|
944
|
+
args: [CheckBoxRow]
|
|
945
|
+
}], tableRows: [{
|
|
946
|
+
type: ContentChildren,
|
|
947
|
+
args: [TableRow]
|
|
948
|
+
}], tableFilters: [{
|
|
949
|
+
type: Input
|
|
950
|
+
}], tableFiltersChange: [{
|
|
951
|
+
type: Output
|
|
952
|
+
}], tableRoutingName: [{
|
|
953
|
+
type: Input
|
|
954
|
+
}], placeholder: [{
|
|
955
|
+
type: Input
|
|
956
|
+
}], checkbox: [{
|
|
957
|
+
type: Input
|
|
958
|
+
}], toggleAllCheckBox: [{
|
|
959
|
+
type: Output
|
|
960
|
+
}], checkBoxSelectionChange: [{
|
|
961
|
+
type: Output
|
|
962
|
+
}], disableSearch: [{
|
|
963
|
+
type: Input
|
|
964
|
+
}], disablePagniation: [{
|
|
965
|
+
type: Input
|
|
966
|
+
}], isLoading: [{
|
|
967
|
+
type: Input
|
|
968
|
+
}] } });
|
|
969
|
+
|
|
970
|
+
class TagComponent {
|
|
971
|
+
constructor() {
|
|
972
|
+
this.label = '';
|
|
973
|
+
this.hasClose = false;
|
|
974
|
+
this.big = false;
|
|
975
|
+
this.isOpen = true;
|
|
976
|
+
this.isOpenChange = new EventEmitter();
|
|
977
|
+
}
|
|
978
|
+
toggleTag() {
|
|
979
|
+
this.isOpen = !this.isOpen;
|
|
980
|
+
this.isOpenChange.next(this.isOpen);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
TagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
984
|
+
TagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TagComponent, selector: "wac-tag", inputs: { label: "label", class: "class", hasClose: "hasClose", big: "big", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngImport: i0, template: "<div class=\"wac-tag\" [classList]=\"'wac-tag--' + class\" [ngClass]=\"{ hover: hasClose, 'big': big }\">\n {{ label }}\n <span class=\"wac-tag__close\" *ngIf=\"hasClose\" (click)=\"toggleTag()\"><i class=\"fas fa-times\"></i></span>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TagComponent, decorators: [{
|
|
986
|
+
type: Component,
|
|
987
|
+
args: [{ selector: 'wac-tag', template: "<div class=\"wac-tag\" [classList]=\"'wac-tag--' + class\" [ngClass]=\"{ hover: hasClose, 'big': big }\">\n {{ label }}\n <span class=\"wac-tag__close\" *ngIf=\"hasClose\" (click)=\"toggleTag()\"><i class=\"fas fa-times\"></i></span>\n</div>\n" }]
|
|
988
|
+
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
989
|
+
type: Input
|
|
990
|
+
}], class: [{
|
|
991
|
+
type: Input
|
|
992
|
+
}], hasClose: [{
|
|
993
|
+
type: Input
|
|
994
|
+
}], big: [{
|
|
995
|
+
type: Input
|
|
996
|
+
}], isOpen: [{
|
|
997
|
+
type: Input
|
|
998
|
+
}], isOpenChange: [{
|
|
999
|
+
type: Output
|
|
1000
|
+
}] } });
|
|
1001
|
+
|
|
1002
|
+
class TabComponent {
|
|
1003
|
+
constructor() {
|
|
1004
|
+
this.underline = false;
|
|
1005
|
+
this.button = false;
|
|
1006
|
+
this.tabs = [];
|
|
1007
|
+
this.index = 0;
|
|
1008
|
+
this.indexChange = new EventEmitter();
|
|
1009
|
+
}
|
|
1010
|
+
valueChanged(i) {
|
|
1011
|
+
this.index = i;
|
|
1012
|
+
this.indexChange.emit(this.index);
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
TabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1016
|
+
TabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TabComponent, selector: "wac-tab", inputs: { underline: "underline", button: "button", tabs: "tabs", index: "index" }, outputs: { indexChange: "indexChange" }, ngImport: i0, template: "<div class=\"wac-tab\" [ngClass]=\"{'wac-tab--underline': underline, 'wac-tab--button' : button}\">\n <div class=\"wac-tab__wrapper\">\n <a\n *ngFor=\"let tab of tabs\"\n class=\"wac-tab__wrapper__tab\"\n [ngClass]=\"index === tab.index ? 'wac-tab__wrapper__tab--selected' : ''\"\n (click)=\"valueChanged(tab.index)\"\n >\n {{ tab.label }}\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TabComponent, decorators: [{
|
|
1018
|
+
type: Component,
|
|
1019
|
+
args: [{ selector: 'wac-tab', encapsulation: ViewEncapsulation.None, template: "<div class=\"wac-tab\" [ngClass]=\"{'wac-tab--underline': underline, 'wac-tab--button' : button}\">\n <div class=\"wac-tab__wrapper\">\n <a\n *ngFor=\"let tab of tabs\"\n class=\"wac-tab__wrapper__tab\"\n [ngClass]=\"index === tab.index ? 'wac-tab__wrapper__tab--selected' : ''\"\n (click)=\"valueChanged(tab.index)\"\n >\n {{ tab.label }}\n </a>\n </div>\n</div>\n" }]
|
|
1020
|
+
}], ctorParameters: function () { return []; }, propDecorators: { underline: [{
|
|
1021
|
+
type: Input
|
|
1022
|
+
}], button: [{
|
|
1023
|
+
type: Input
|
|
1024
|
+
}], tabs: [{
|
|
1025
|
+
type: Input
|
|
1026
|
+
}], index: [{
|
|
1027
|
+
type: Input
|
|
1028
|
+
}], indexChange: [{
|
|
1029
|
+
type: Output
|
|
1030
|
+
}] } });
|
|
1031
|
+
|
|
1032
|
+
class ButtonComponent {
|
|
1033
|
+
constructor() {
|
|
1034
|
+
this.extraClasses = 'is-info'; // todo make a list of existing class
|
|
1035
|
+
this.label = '';
|
|
1036
|
+
this.icon = '';
|
|
1037
|
+
this.widthAuto = false;
|
|
1038
|
+
this.contentHorizontalPosition = 'center';
|
|
1039
|
+
this.iconFontSize = 12;
|
|
1040
|
+
this.hasLoader = false;
|
|
1041
|
+
this.disabled = false;
|
|
1042
|
+
this.whiteSpaceNowrap = false;
|
|
1043
|
+
this.opacity = false;
|
|
1044
|
+
// TODO MAKE ANNIMATION AVAILABLE FOR MOBILE as CONFIRM DELETE DO (because, its doeant show the text and trigger click)
|
|
1045
|
+
this.animation = false;
|
|
1046
|
+
this.animationRight = false;
|
|
1047
|
+
this.animationText = '';
|
|
1048
|
+
this.confirmDelete = false;
|
|
1049
|
+
this.confirmDeleteText = '';
|
|
1050
|
+
this.confirmDeletePosition = 'right';
|
|
1051
|
+
this.click = new EventEmitter();
|
|
1052
|
+
this.isLoadingChange = new EventEmitter();
|
|
1053
|
+
this._isLoading = false;
|
|
1054
|
+
this.interval = null;
|
|
1055
|
+
this.waitForConfirmDelete = false;
|
|
1056
|
+
this.buttonMaxWidth = '0px';
|
|
1057
|
+
this.buttonWidth = '0px';
|
|
1058
|
+
this.buttonMaxWidthDelete = '0px';
|
|
1059
|
+
this.buttonWidthDelete = '0px';
|
|
1060
|
+
this.currentLoading = 0;
|
|
1061
|
+
}
|
|
1062
|
+
set isLoading(isLoading) {
|
|
1063
|
+
this._isLoading = isLoading;
|
|
1064
|
+
this.isLoadingChange.next(isLoading);
|
|
1065
|
+
this.toggleLoading();
|
|
1066
|
+
}
|
|
1067
|
+
get isLoading() {
|
|
1068
|
+
return this._isLoading;
|
|
1069
|
+
}
|
|
1070
|
+
ngOnInit() {
|
|
1071
|
+
if (this.confirmDelete) {
|
|
1072
|
+
this.waitForConfirmDelete = true;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
toggleLoading() {
|
|
1076
|
+
this.currentLoading = this.isLoading ? 10 : 100;
|
|
1077
|
+
interval(200).pipe(takeWhile(time => this.isLoading)).subscribe(() => {
|
|
1078
|
+
if (this.currentLoading < 85) {
|
|
1079
|
+
this.currentLoading += Math.floor(Math.random() * 15);
|
|
1080
|
+
}
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
addMaxWidth() {
|
|
1084
|
+
this.buttonMaxWidth = this.buttonWidth + 'px';
|
|
1085
|
+
}
|
|
1086
|
+
resetMaxWidth() {
|
|
1087
|
+
this.buttonMaxWidth = '0px';
|
|
1088
|
+
}
|
|
1089
|
+
addMaxWidthDelete() {
|
|
1090
|
+
this.buttonMaxWidthDelete = this.buttonWidthDelete + 'px';
|
|
1091
|
+
}
|
|
1092
|
+
resetMaxWidthDelete() {
|
|
1093
|
+
this.buttonMaxWidthDelete = '0px';
|
|
1094
|
+
this.waitForConfirmDelete = true;
|
|
1095
|
+
}
|
|
1096
|
+
onButtonClick(event) {
|
|
1097
|
+
event.stopPropagation();
|
|
1098
|
+
if (this.disabled) {
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
if (this.hasLoader) {
|
|
1102
|
+
this.isLoading = false;
|
|
1103
|
+
setTimeout(() => {
|
|
1104
|
+
this.isLoading = true;
|
|
1105
|
+
}, 0);
|
|
1106
|
+
}
|
|
1107
|
+
if (!this.waitForConfirmDelete) {
|
|
1108
|
+
this.click.emit(event);
|
|
1109
|
+
if (this.confirmDelete) {
|
|
1110
|
+
this.resetMaxWidthDelete();
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
else {
|
|
1114
|
+
this.waitForConfirmDelete = false;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
ngAfterViewInit() {
|
|
1118
|
+
setTimeout(() => {
|
|
1119
|
+
if (this.animation) {
|
|
1120
|
+
this.buttonWidth = this.calculWidth.nativeElement.offsetWidth;
|
|
1121
|
+
}
|
|
1122
|
+
if (this.confirmDelete) {
|
|
1123
|
+
this.buttonWidthDelete = this.calculWidthDelete.nativeElement.offsetWidth;
|
|
1124
|
+
}
|
|
1125
|
+
}, 1000);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1129
|
+
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: ButtonComponent, selector: "wac-button", inputs: { extraClasses: "extraClasses", label: "label", icon: "icon", iconNext: "iconNext", widthAuto: "widthAuto", contentHorizontalPosition: "contentHorizontalPosition", iconFontSize: "iconFontSize", hasLoader: "hasLoader", disabled: "disabled", whiteSpaceNowrap: "whiteSpaceNowrap", opacity: "opacity", animation: "animation", animationRight: "animationRight", animationText: "animationText", confirmDelete: "confirmDelete", confirmDeleteText: "confirmDeleteText", confirmDeletePosition: "confirmDeletePosition", isLoading: "isLoading" }, outputs: { click: "click", isLoadingChange: "isLoadingChange" }, viewQueries: [{ propertyName: "calculWidth", first: true, predicate: ["calculWidth"], descendants: true }, { propertyName: "calculWidthDelete", first: true, predicate: ["calculWidthDelete"], descendants: true }], ngImport: i0, template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"confirmDelete && waitForConfirmDelete ? addMaxWidthDelete() : '';onButtonClick($event);\"\n (mouseleave)=\"animation ? resetMaxWidth() : '';\"\n (mouseenter)=\"animation ? addMaxWidth() : '';\"\n wzAutoHide (clickOutside)=\"confirmDelete && !waitForConfirmDelete ? resetMaxWidthDelete() : ''\"\n [ngClass]=\"[\n label === '' ? 'alone' : '',\n animationRight ? 'animation-right' : '',\n animation ? 'animationText' : '',\n isLoading ? 'is-loading' : '',\n opacity ? 'opacity' : '',\n disabled ? 'disabled' : '',\n widthAuto ? 'width-auto' : '',\n whiteSpaceNowrap ? 'white-space-no-wrap' : '',\n !waitForConfirmDelete && confirmDelete ? 'step-delete' : '',\n confirmDelete ? 'deletePosition-' + confirmDeletePosition : ''\n ]\"\n [ngStyle]=\"{\n 'text-align': contentHorizontalPosition\n }\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span class=\"wac-button__animation\" [style.maxWidth]=\"buttonMaxWidth\" [style.width]=\"buttonWidth + 'px'\">\n <span #calculWidth class=\"wac-button__animation__text\" [innerHTML]=\"animationText\"></span>\n </span>\n <span class=\"wac-button__confirmDelete\" [style.maxWidth]=\"buttonMaxWidthDelete\" [style.width]=\"buttonWidthDelete + 'px'\">\n <span #calculWidthDelete class=\"wac-button__confirmDelete__text\" [innerHTML]=\"confirmDeleteText\"></span>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n\n </span>\n</a>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }] });
|
|
1130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
1131
|
+
type: Component,
|
|
1132
|
+
args: [{ selector: 'wac-button', template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"confirmDelete && waitForConfirmDelete ? addMaxWidthDelete() : '';onButtonClick($event);\"\n (mouseleave)=\"animation ? resetMaxWidth() : '';\"\n (mouseenter)=\"animation ? addMaxWidth() : '';\"\n wzAutoHide (clickOutside)=\"confirmDelete && !waitForConfirmDelete ? resetMaxWidthDelete() : ''\"\n [ngClass]=\"[\n label === '' ? 'alone' : '',\n animationRight ? 'animation-right' : '',\n animation ? 'animationText' : '',\n isLoading ? 'is-loading' : '',\n opacity ? 'opacity' : '',\n disabled ? 'disabled' : '',\n widthAuto ? 'width-auto' : '',\n whiteSpaceNowrap ? 'white-space-no-wrap' : '',\n !waitForConfirmDelete && confirmDelete ? 'step-delete' : '',\n confirmDelete ? 'deletePosition-' + confirmDeletePosition : ''\n ]\"\n [ngStyle]=\"{\n 'text-align': contentHorizontalPosition\n }\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span class=\"wac-button__animation\" [style.maxWidth]=\"buttonMaxWidth\" [style.width]=\"buttonWidth + 'px'\">\n <span #calculWidth class=\"wac-button__animation__text\" [innerHTML]=\"animationText\"></span>\n </span>\n <span class=\"wac-button__confirmDelete\" [style.maxWidth]=\"buttonMaxWidthDelete\" [style.width]=\"buttonWidthDelete + 'px'\">\n <span #calculWidthDelete class=\"wac-button__confirmDelete__text\" [innerHTML]=\"confirmDeleteText\"></span>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n\n </span>\n</a>\n" }]
|
|
1133
|
+
}], ctorParameters: function () { return []; }, propDecorators: { extraClasses: [{
|
|
1134
|
+
type: Input
|
|
1135
|
+
}], label: [{
|
|
1136
|
+
type: Input
|
|
1137
|
+
}], icon: [{
|
|
1138
|
+
type: Input
|
|
1139
|
+
}], iconNext: [{
|
|
1140
|
+
type: Input
|
|
1141
|
+
}], widthAuto: [{
|
|
1142
|
+
type: Input
|
|
1143
|
+
}], contentHorizontalPosition: [{
|
|
1144
|
+
type: Input
|
|
1145
|
+
}], iconFontSize: [{
|
|
1146
|
+
type: Input
|
|
1147
|
+
}], hasLoader: [{
|
|
1148
|
+
type: Input
|
|
1149
|
+
}], disabled: [{
|
|
1150
|
+
type: Input
|
|
1151
|
+
}], whiteSpaceNowrap: [{
|
|
1152
|
+
type: Input
|
|
1153
|
+
}], opacity: [{
|
|
1154
|
+
type: Input
|
|
1155
|
+
}], animation: [{
|
|
1156
|
+
type: Input
|
|
1157
|
+
}], animationRight: [{
|
|
1158
|
+
type: Input
|
|
1159
|
+
}], animationText: [{
|
|
1160
|
+
type: Input
|
|
1161
|
+
}], confirmDelete: [{
|
|
1162
|
+
type: Input
|
|
1163
|
+
}], confirmDeleteText: [{
|
|
1164
|
+
type: Input
|
|
1165
|
+
}], confirmDeletePosition: [{
|
|
1166
|
+
type: Input
|
|
1167
|
+
}], click: [{
|
|
1168
|
+
type: Output
|
|
1169
|
+
}], isLoading: [{
|
|
1170
|
+
type: Input
|
|
1171
|
+
}], isLoadingChange: [{
|
|
1172
|
+
type: Output
|
|
1173
|
+
}], calculWidth: [{
|
|
1174
|
+
type: ViewChild,
|
|
1175
|
+
args: ['calculWidth']
|
|
1176
|
+
}], calculWidthDelete: [{
|
|
1177
|
+
type: ViewChild,
|
|
1178
|
+
args: ['calculWidthDelete']
|
|
1179
|
+
}] } });
|
|
1180
|
+
|
|
1181
|
+
class InfoComponent {
|
|
1182
|
+
constructor() { }
|
|
1183
|
+
}
|
|
1184
|
+
InfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1185
|
+
InfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: InfoComponent, selector: "wac-info", ngImport: i0, template: "<div class=\"wac-info\">\n <div class=\"wac-info__wrapper\">\n <i class=\"fas fa-info-circle\"></i>\n <div class=\"wac-info__wrapper__sublevel\">\n <div class=\"wac-info__wrapper__sublevel__container\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n" });
|
|
1186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InfoComponent, decorators: [{
|
|
1187
|
+
type: Component,
|
|
1188
|
+
args: [{ selector: 'wac-info', template: "<div class=\"wac-info\">\n <div class=\"wac-info__wrapper\">\n <i class=\"fas fa-info-circle\"></i>\n <div class=\"wac-info__wrapper__sublevel\">\n <div class=\"wac-info__wrapper__sublevel__container\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
1189
|
+
}], ctorParameters: function () { return []; } });
|
|
1190
|
+
|
|
1191
|
+
class SettingsComponent {
|
|
1192
|
+
constructor() { }
|
|
1193
|
+
}
|
|
1194
|
+
SettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1195
|
+
SettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SettingsComponent, selector: "wac-settings", ngImport: i0, template: "<div class=\"wac-settings\">\n <div class=\"wac-settings__wrapper\">\n <i class=\"fas fa-cog\"></i>\n </div>\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
1196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SettingsComponent, decorators: [{
|
|
1197
|
+
type: Component,
|
|
1198
|
+
args: [{ selector: 'wac-settings', encapsulation: ViewEncapsulation.None, template: "<div class=\"wac-settings\">\n <div class=\"wac-settings__wrapper\">\n <i class=\"fas fa-cog\"></i>\n </div>\n</div>\n" }]
|
|
1199
|
+
}], ctorParameters: function () { return []; } });
|
|
1200
|
+
|
|
1201
|
+
class DeleteComponent {
|
|
1202
|
+
constructor() { }
|
|
1203
|
+
}
|
|
1204
|
+
DeleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DeleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1205
|
+
DeleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: DeleteComponent, selector: "wac-delete", ngImport: i0, template: "<div class=\"wac-delete\">\n <div class=\"wac-delete__wrapper\">\n <i class=\"fas fa-trash\"></i>\n </div>\n</div>\n" });
|
|
1206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DeleteComponent, decorators: [{
|
|
1207
|
+
type: Component,
|
|
1208
|
+
args: [{ selector: 'wac-delete', template: "<div class=\"wac-delete\">\n <div class=\"wac-delete__wrapper\">\n <i class=\"fas fa-trash\"></i>\n </div>\n</div>\n" }]
|
|
1209
|
+
}], ctorParameters: function () { return []; } });
|
|
1210
|
+
|
|
1211
|
+
class DropdownComponent {
|
|
1212
|
+
constructor() {
|
|
1213
|
+
this.hasIcons = false;
|
|
1214
|
+
this.items = [];
|
|
1215
|
+
this.userInput = new EventEmitter();
|
|
1216
|
+
}
|
|
1217
|
+
onUserInput(itemIndex) {
|
|
1218
|
+
this.userInput.emit(itemIndex);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1222
|
+
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: DropdownComponent, selector: "wac-dropdown", inputs: { hasIcons: "hasIcons", items: "items" }, outputs: { userInput: "userInput" }, ngImport: i0, template: "<div class=\"wac-dropdown\">\n <div class=\"wac-dropdown__wrapper\">\n <i class=\"wac-dropdown__wrapper__icon far fa-ellipsis-v\"></i>\n <div class=\"wac-dropdown__wrapper__sublevel\">\n <ul class=\"wac-dropdown__wrapper__sublevel__container\">\n <li\n *ngFor=\"let item of items\"\n class=\"wac-dropdown__wrapper__sublevel__container__item\"\n (click)=\"onUserInput(item.index)\"\n >\n <i\n *ngIf=\"hasIcons\"\n [class]=\"item.icon\"\n [style.font-size.px]=\"item.iconFontSize ? item.iconFontSize : '14'\"\n ></i>\n <span>{{ item.label }}</span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
1224
|
+
type: Component,
|
|
1225
|
+
args: [{ selector: 'wac-dropdown', template: "<div class=\"wac-dropdown\">\n <div class=\"wac-dropdown__wrapper\">\n <i class=\"wac-dropdown__wrapper__icon far fa-ellipsis-v\"></i>\n <div class=\"wac-dropdown__wrapper__sublevel\">\n <ul class=\"wac-dropdown__wrapper__sublevel__container\">\n <li\n *ngFor=\"let item of items\"\n class=\"wac-dropdown__wrapper__sublevel__container__item\"\n (click)=\"onUserInput(item.index)\"\n >\n <i\n *ngIf=\"hasIcons\"\n [class]=\"item.icon\"\n [style.font-size.px]=\"item.iconFontSize ? item.iconFontSize : '14'\"\n ></i>\n <span>{{ item.label }}</span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n" }]
|
|
1226
|
+
}], ctorParameters: function () { return []; }, propDecorators: { hasIcons: [{
|
|
1227
|
+
type: Input
|
|
1228
|
+
}], items: [{
|
|
1229
|
+
type: Input
|
|
1230
|
+
}], userInput: [{
|
|
1231
|
+
type: Output
|
|
1232
|
+
}] } });
|
|
1233
|
+
|
|
1234
|
+
class ImageComponent {
|
|
1235
|
+
constructor() { }
|
|
1236
|
+
}
|
|
1237
|
+
ImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1238
|
+
ImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: ImageComponent, selector: "wac-image", inputs: { src: "src" }, ngImport: i0, template: "<div class=\"wac-image\">\n <div class=\"wac-image__wrapper\" [ngClass]=\"src === '' ? 'empty' : ''\" [style.background-image]=\"'url(' + src + ')'\">\n <i class=\"fal fa-images\" *ngIf=\"src === ''\"></i>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ImageComponent, decorators: [{
|
|
1240
|
+
type: Component,
|
|
1241
|
+
args: [{ selector: 'wac-image', template: "<div class=\"wac-image\">\n <div class=\"wac-image__wrapper\" [ngClass]=\"src === '' ? 'empty' : ''\" [style.background-image]=\"'url(' + src + ')'\">\n <i class=\"fal fa-images\" *ngIf=\"src === ''\"></i>\n </div>\n</div>\n" }]
|
|
1242
|
+
}], ctorParameters: function () { return []; }, propDecorators: { src: [{
|
|
1243
|
+
type: Input
|
|
1244
|
+
}] } });
|
|
1245
|
+
|
|
1246
|
+
class BackComponent {
|
|
1247
|
+
constructor() { }
|
|
1248
|
+
}
|
|
1249
|
+
BackComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: BackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1250
|
+
BackComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: BackComponent, selector: "wac-back", ngImport: i0, template: "<div class=\"wac-back\">\n <div class=\"wac-back__wrapper\">\n <i class=\"fas fa-chevron-left\"></i>\n </div>\n</div>\n" });
|
|
1251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: BackComponent, decorators: [{
|
|
1252
|
+
type: Component,
|
|
1253
|
+
args: [{ selector: 'wac-back', template: "<div class=\"wac-back\">\n <div class=\"wac-back__wrapper\">\n <i class=\"fas fa-chevron-left\"></i>\n </div>\n</div>\n" }]
|
|
1254
|
+
}], ctorParameters: function () { return []; } });
|
|
1255
|
+
|
|
1256
|
+
class SeparatorComponent {
|
|
1257
|
+
constructor() {
|
|
1258
|
+
this.dashed = false;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
SeparatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1262
|
+
SeparatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SeparatorComponent, selector: "wac-separator", inputs: { dashed: "dashed" }, ngImport: i0, template: "<div class=\"wac-separator\" [ngClass]=\"dashed ? 'dashed' : ''\"></div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SeparatorComponent, decorators: [{
|
|
1264
|
+
type: Component,
|
|
1265
|
+
args: [{ selector: 'wac-separator', encapsulation: ViewEncapsulation.None, template: "<div class=\"wac-separator\" [ngClass]=\"dashed ? 'dashed' : ''\"></div>\n" }]
|
|
1266
|
+
}], ctorParameters: function () { return []; }, propDecorators: { dashed: [{
|
|
1267
|
+
type: Input
|
|
1268
|
+
}] } });
|
|
1269
|
+
|
|
1270
|
+
class LogoComponent {
|
|
1271
|
+
constructor() { }
|
|
1272
|
+
}
|
|
1273
|
+
LogoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1274
|
+
LogoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: LogoComponent, selector: "wac-logo", inputs: { isDropizi: "isDropizi", isWhite: "isWhite" }, ngImport: i0, template: "<div class=\"wac-logo\">\n <div class=\"wac-logo__wrapper\" [ngClass]=\"isWhite ? 'white' : ''\" *ngIf=\"isDropizi\">\n <svg id=\"Calque_1\" data-name=\"Calque 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 102.33 40\">\n <defs>\n <style>\n .cls-0 {\n fill: #fa096a;\n }\n </style>\n </defs>\n <title>Logo_Dropizi</title>\n <path\n id=\"Logo_Dropizi-2\"\n data-name=\"Logo Dropizi-2\"\n class=\"cls-0\"\n d=\"M83,44.94a4.87,4.87,0,0,1-4.36-7,3.81,3.81,0,0,1-.72-2l-.3-5.69a9.61,9.61,0,0,1-3.43,2,13.51,13.51,0,0,1-3.34.63l-1.06,0L70,36.29a3.75,3.75,0,0,1-3.54,3.94l-2.25.11H64a3.69,3.69,0,0,1-3-1.56,12.82,12.82,0,0,1-7.68,2.61,13.45,13.45,0,0,1-5.37-1.14,3.67,3.67,0,0,1-2.46,1.09l-2.15.12h-.2a3.76,3.76,0,0,1-3.17-1.74l-3.29-5.25L36.84,38a3.78,3.78,0,0,1-1,2.7A3.74,3.74,0,0,1,33.28,42L31,42.09h-.19a3.77,3.77,0,0,1-3.06-1.58,12.62,12.62,0,0,1-1.62.87,15,15,0,0,1-5.35,1.24L13.49,43H13.3a3.76,3.76,0,0,1-3.74-3.54L8.5,19.3A3.75,3.75,0,0,1,12,15.36L19.37,15c.3,0,.59,0,.88,0a14.67,14.67,0,0,1,4.56.7,13.17,13.17,0,0,1,1.74.7,3.73,3.73,0,0,1,3.06-1.91l7.14-.37c.35,0,.69,0,1,0,3.65,0,6,1.12,7.41,2.57A13.29,13.29,0,0,1,49,14.33a12.05,12.05,0,0,1,4.44-.82c.23,0,.45,0,.69,0a13.63,13.63,0,0,1,5.2,1.35l.22.11a3.75,3.75,0,0,1,3.25-2.29l5.32-.27c.7,0,1.38-.06,2-.06.92,0,1.78,0,2.57.11a10.17,10.17,0,0,1,4.16,1.26l.37.24a3.78,3.78,0,0,1,3.22-2.2l2.18-.12h.2a3.89,3.89,0,0,1,2,.57,3.63,3.63,0,0,1,2.07-.79l12.9-.67h.11c0-.24-.07-.47-.09-.71a4.88,4.88,0,0,1,4.62-5.12h.25a4.86,4.86,0,0,1,4.88,4.62v.26A4.89,4.89,0,0,1,109,12a3.62,3.62,0,0,1,.72,2l1.06,20.14,0,0a3.75,3.75,0,0,1-3.54,3.94l-2.18.11h-.2a3.83,3.83,0,0,1-2-.57,3.54,3.54,0,0,1-2.06.78l-12.9.68h-.1c0,.24.07.47.09.71a4.87,4.87,0,0,1-1.25,3.51,4.82,4.82,0,0,1-3.37,1.6Zm-2-4.87v.11a2,2,0,0,0,2.1,1.9h0a2,2,0,0,0,1.9-2V40a2,2,0,0,0-2-1.9H83A2,2,0,0,0,81.05,40.07ZM19.54,17.84l-7.34.39a.89.89,0,0,0-.84.93l1.06,20.17a.89.89,0,0,0,.92.83l7.33-.39a11.89,11.89,0,0,0,4.32-1,9.7,9.7,0,0,0,3.3-2.36,8.91,8.91,0,0,0,1.46-2.14L30,38.4a.88.88,0,0,0,.92.84l2.25-.12A.88.88,0,0,0,34,38.2h0l-.34-6.38a.88.88,0,0,1,.84-.93h0l2.67-.14a.89.89,0,0,1,.8.41l4.41,7a.92.92,0,0,0,.8.42l2.17-.12a.88.88,0,0,0,.72-1.34l-4.25-7A.88.88,0,0,1,42,29c.22-.18.44-.37.64-.56a10.07,10.07,0,0,0,.5,3,9.65,9.65,0,0,0,2,3.45,11.39,11.39,0,0,0,3.45,2.5,10,10,0,0,0,8.09.47,11,11,0,0,0,6.08-6l.08-.18.26,4.91a.89.89,0,0,0,.92.84l2.25-.12a.89.89,0,0,0,.84-.92L66.86,31a.87.87,0,0,1,.83-.92h0l3-.16a10.49,10.49,0,0,0,2.6-.5A6.87,6.87,0,0,0,75.75,28a6.67,6.67,0,0,0,1.68-2.36l0-.12A8.77,8.77,0,0,0,78,21.73a9,9,0,0,0-.77-3.49,4.1,4.1,0,0,0-.22-.41,4.71,4.71,0,0,0-1.63-1.63,7.28,7.28,0,0,0-3-.87,28.9,28.9,0,0,0-4.16,0l-5.33.28a.86.86,0,0,0-.61.29.9.9,0,0,0-.22.63L62.33,21a10.85,10.85,0,0,0-.8-1A11.54,11.54,0,0,0,54,16.38,9.3,9.3,0,0,0,50,17a10.46,10.46,0,0,0-3.46,2.22,11.5,11.5,0,0,0-1.92,2.41q-1-5.05-7.73-4.7l-7.14.37a.88.88,0,0,0-.84.93l.22,4.15a9.5,9.5,0,0,0-5.19-4,12.2,12.2,0,0,0-3.65-.56C20.05,17.82,19.79,17.82,19.54,17.84Zm63.22-3.31-2.17.12a.9.9,0,0,0-.61.29.87.87,0,0,0-.23.64l1.06,20.15a.88.88,0,0,0,.93.84L84,36.45a.83.83,0,0,0,.61-.29.87.87,0,0,0,.23-.63l-1-20.09a1,1,0,0,0-1-.9Zm11.48,3.85a.9.9,0,0,1,.07.87L86.94,35a.88.88,0,0,0,.06.86.85.85,0,0,0,.76.4l12.9-.67h0a.76.76,0,0,0,.72-.8h0l-.13-2.48a.75.75,0,0,0-.8-.72l-6.21.33a.89.89,0,0,1-.84-1.26l7.37-15.74a.9.9,0,0,0-.07-.87.87.87,0,0,0-.78-.39L87,14.31a.75.75,0,0,0-.71.8l.13,2.49a.74.74,0,0,0,.25.52.75.75,0,0,0,.55.2L93.46,18h.05A.89.89,0,0,1,94.24,18.38ZM106,13.31l-2.24.12a.89.89,0,0,0-.85.93l.85,16.15v.1l.2,3.83a1,1,0,0,0,1,.91l2.18-.11h0a.9.9,0,0,0,.83-.93l-1.06-20.16a.88.88,0,0,0-.88-.84Zm-3.32-3.5v.1a2,2,0,0,0,4-.1V9.7a2,2,0,0,0-2-1.9h-.1a2,2,0,0,0-1.91,2ZM16.25,35.28l-.66-12.51a.87.87,0,0,1,.23-.64.83.83,0,0,1,.61-.29l3.3-.18a6,6,0,0,1,4.87,1.62,7.74,7.74,0,0,1,1.92,5.19,7.71,7.71,0,0,1-1.37,5.35A6,6,0,0,1,20.47,36l-3.31.17h0a.88.88,0,0,1-.88-.84Zm36.61-.55A6.9,6.9,0,0,1,48,32.44a5.3,5.3,0,0,1-1.12-2.17,6.7,6.7,0,0,1-.09-2.6,11,11,0,0,1,2.57-5.41,6.42,6.42,0,0,1,2.07-1.58,5.52,5.52,0,0,1,2.4-.52,6.36,6.36,0,0,1,2.64.66,5.45,5.45,0,0,1,3.3,3.78A8.32,8.32,0,0,1,59,30.1a10.69,10.69,0,0,1-1.66,2.54,6.76,6.76,0,0,1-2.07,1.57,5.42,5.42,0,0,1-2.31.52.27.27,0,0,1-.09,0Zm-19.2-7.84a.83.83,0,0,1-.29-.61l-.26-4.91a.87.87,0,0,1,.83-.92l2.22-.12a5.2,5.2,0,0,1,3.39.63,3.08,3.08,0,0,1,1,2.41,3.29,3.29,0,0,1-.8,2.6,5.23,5.23,0,0,1-3.43,1l-2.07.11h0a.89.89,0,0,1-.59-.23Zm32.93-1.41-.31-5.84a.9.9,0,0,1,.23-.64.86.86,0,0,1,.61-.29l2.4-.12a8.81,8.81,0,0,1,2,.09,3.1,3.1,0,0,1,1.33.57,2.58,2.58,0,0,1,.75,1.09A6.22,6.22,0,0,1,73.94,22a4.16,4.16,0,0,1-.79,3.14A4.63,4.63,0,0,1,70,26.19l-2.51.13h0a.9.9,0,0,1-.89-.84Z\"\n transform=\"translate(-8.49 -4.94)\"\n />\n </svg>\n </div>\n <div class=\"wac-logo__wrapper\" [ngClass]=\"isWhite ? 'white' : ''\" *ngIf=\"!isDropizi\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 128.044 40\">\n <defs>\n <style>\n .cls-1 {\n fill: #a4c445;\n }\n .cls-2 {\n fill: #52aecd;\n }\n </style>\n </defs>\n <g id=\"Logo_WiziShop\" transform=\"translate(0.024 0)\">\n <path\n id=\"Shop\"\n class=\"cls-1\"\n d=\"M50.812,38.431V12.3a2.468,2.468,0,0,1,2.452-1.643A2.307,2.307,0,0,1,55.446,12a7.058,7.058,0,0,1,4.107-1.348A5.245,5.245,0,0,1,63.218,12,6.1,6.1,0,0,1,64.7,16.365v7.208h-.012q0,7.282-5.835,7.282a8.453,8.453,0,0,1-3.224-.674v8.25A2.471,2.471,0,0,1,53.178,40,2.419,2.419,0,0,1,50.812,38.431Zm4.805-21.845V26a7.046,7.046,0,0,0,2.709.834c1.1-.012,1.655-1.091,1.655-3.248V15.912c0-.65-.4-.981-1.226-.981A3.59,3.59,0,0,0,55.617,16.586ZM33.858,19.614q0-9.727,7.159-9.721,4.1,0,5.762,3.065a15.8,15.8,0,0,1,1.067,6.656q0,4.56-1.226,6.8-1.655,3.144-6.031,3.138Q33.858,29.556,33.858,19.614Zm4.462,0c0,3.947.846,5.909,2.538,5.909,1.741.012,2.623-1.961,2.623-5.909q0-5.682-2.538-5.688Q38.315,13.926,38.321,19.614Zm-35.8,8.4A5.577,5.577,0,0,1,.172,23.917L0,22.262l4.536-.6a12.942,12.942,0,0,0,.613,2.317,1.976,1.976,0,0,0,2.01,1.189,1.375,1.375,0,0,0,1.226-.674A4.161,4.161,0,0,0,9,22.4c0-1.2-.736-2.623-2.219-4.266s-2.954-3.273-4.4-4.867A10,10,0,0,1,.025,7.2a9.322,9.322,0,0,1,.441-2.77Q1.955.012,6.84.012a7.629,7.629,0,0,1,4.585,1.5,5.555,5.555,0,0,1,2.317,4.131l.172,1.655-4.585.588a12.943,12.943,0,0,0-.613-2.317,1.976,1.976,0,0,0-2.01-1.189c-.7,0-1.189.429-1.483,1.275A3.756,3.756,0,0,0,4.965,7q0,2.537,4.622,7.416t4.622,8.017a7.691,7.691,0,0,1-1.876,4.72,6.225,6.225,0,0,1-5.185,2.39A7.665,7.665,0,0,1,2.525,28.011Zm23.488-.368V15.3c0-.552-.343-.821-1.042-.821a3.356,3.356,0,0,0-2.954,1.569v11.6a2.629,2.629,0,0,1-2.538,1.716,2.589,2.589,0,0,1-2.452-1.728V1.729A2.578,2.578,0,0,1,19.479,0a2.641,2.641,0,0,1,2.538,1.729v9.292a7.611,7.611,0,0,1,3.751-1.042,5.039,5.039,0,0,1,3.665,1.459,5.748,5.748,0,0,1,1.483,4.3V27.631a2.548,2.548,0,0,1-2.366,1.728l-.136,0A2.521,2.521,0,0,1,26.013,27.643Z\"\n transform=\"translate(63.32 0)\"\n />\n <path\n id=\"Wizi\"\n class=\"cls-2\"\n d=\"M13.341,28.661,12.2,22.617l-1.226,6.044a2.9,2.9,0,0,1-2.353,1.189,3.26,3.26,0,0,1-2.44-1.1L.064,2.55A1.793,1.793,0,0,1,.591.674,2.977,2.977,0,0,1,2.6,0c1.287,0,2.047.478,2.28,1.422L8.535,18.707l1.312-6.055a2.228,2.228,0,0,1,2.524-1.876,2.035,2.035,0,0,1,2.183,1.876l1.213,6.142Q16.816,12.6,18,6.3c.785-4.2,2.06-6.3,3.8-6.3a2.717,2.717,0,0,1,1.054.221,1.774,1.774,0,0,1,1.41,2.329l-6.032,26.1a2.881,2.881,0,0,1-2.354,1.2A3.247,3.247,0,0,1,13.341,28.661Zm39.816-.356V11.67c.293-.6,1.139-.895,2.537-.895,1.336,0,2.182.294,2.538.895V28.305c-.355.65-1.2.968-2.538.968C54.3,29.273,53.451,28.955,53.157,28.305Zm-15.667.968c-1.287-.147-1.924-.772-1.924-1.863a2.936,2.936,0,0,1,.343-1.5l7.16-10.984H37.33a2.307,2.307,0,0,1-1.765-2.182,2.226,2.226,0,0,1,1.778-2.182h10.1a2.144,2.144,0,0,1,1.679,2.1q0,1.8-2.574,5.529-2.483,3.366-4.879,6.73h5.7v-.013a2.235,2.235,0,0,1,0,4.364Zm-11.5-.968V11.67c.294-.6,1.14-.895,2.538-.895,1.336,0,2.182.294,2.537.895V28.305c-.355.65-1.2.968-2.537.968C27.131,29.273,26.285,28.955,25.991,28.305ZM53.9,8.054a2,2,0,0,1-.747-1.544A1.858,1.858,0,0,1,53.9,5a2.969,2.969,0,0,1,3.58,0,1.859,1.859,0,0,1,.748,1.508,1.962,1.962,0,0,1-.748,1.544,2.833,2.833,0,0,1-3.58,0Zm-27.165,0a2,2,0,0,1-.748-1.544A1.859,1.859,0,0,1,26.739,5a2.968,2.968,0,0,1,3.579,0,1.892,1.892,0,0,1,.748,1.508,1.959,1.959,0,0,1-.748,1.544,2.832,2.832,0,0,1-3.579,0Z\"\n transform=\"translate(-0.024 0.086)\"\n />\n </g>\n </svg>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LogoComponent, decorators: [{
|
|
1276
|
+
type: Component,
|
|
1277
|
+
args: [{ selector: 'wac-logo', encapsulation: ViewEncapsulation.None, template: "<div class=\"wac-logo\">\n <div class=\"wac-logo__wrapper\" [ngClass]=\"isWhite ? 'white' : ''\" *ngIf=\"isDropizi\">\n <svg id=\"Calque_1\" data-name=\"Calque 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 102.33 40\">\n <defs>\n <style>\n .cls-0 {\n fill: #fa096a;\n }\n </style>\n </defs>\n <title>Logo_Dropizi</title>\n <path\n id=\"Logo_Dropizi-2\"\n data-name=\"Logo Dropizi-2\"\n class=\"cls-0\"\n d=\"M83,44.94a4.87,4.87,0,0,1-4.36-7,3.81,3.81,0,0,1-.72-2l-.3-5.69a9.61,9.61,0,0,1-3.43,2,13.51,13.51,0,0,1-3.34.63l-1.06,0L70,36.29a3.75,3.75,0,0,1-3.54,3.94l-2.25.11H64a3.69,3.69,0,0,1-3-1.56,12.82,12.82,0,0,1-7.68,2.61,13.45,13.45,0,0,1-5.37-1.14,3.67,3.67,0,0,1-2.46,1.09l-2.15.12h-.2a3.76,3.76,0,0,1-3.17-1.74l-3.29-5.25L36.84,38a3.78,3.78,0,0,1-1,2.7A3.74,3.74,0,0,1,33.28,42L31,42.09h-.19a3.77,3.77,0,0,1-3.06-1.58,12.62,12.62,0,0,1-1.62.87,15,15,0,0,1-5.35,1.24L13.49,43H13.3a3.76,3.76,0,0,1-3.74-3.54L8.5,19.3A3.75,3.75,0,0,1,12,15.36L19.37,15c.3,0,.59,0,.88,0a14.67,14.67,0,0,1,4.56.7,13.17,13.17,0,0,1,1.74.7,3.73,3.73,0,0,1,3.06-1.91l7.14-.37c.35,0,.69,0,1,0,3.65,0,6,1.12,7.41,2.57A13.29,13.29,0,0,1,49,14.33a12.05,12.05,0,0,1,4.44-.82c.23,0,.45,0,.69,0a13.63,13.63,0,0,1,5.2,1.35l.22.11a3.75,3.75,0,0,1,3.25-2.29l5.32-.27c.7,0,1.38-.06,2-.06.92,0,1.78,0,2.57.11a10.17,10.17,0,0,1,4.16,1.26l.37.24a3.78,3.78,0,0,1,3.22-2.2l2.18-.12h.2a3.89,3.89,0,0,1,2,.57,3.63,3.63,0,0,1,2.07-.79l12.9-.67h.11c0-.24-.07-.47-.09-.71a4.88,4.88,0,0,1,4.62-5.12h.25a4.86,4.86,0,0,1,4.88,4.62v.26A4.89,4.89,0,0,1,109,12a3.62,3.62,0,0,1,.72,2l1.06,20.14,0,0a3.75,3.75,0,0,1-3.54,3.94l-2.18.11h-.2a3.83,3.83,0,0,1-2-.57,3.54,3.54,0,0,1-2.06.78l-12.9.68h-.1c0,.24.07.47.09.71a4.87,4.87,0,0,1-1.25,3.51,4.82,4.82,0,0,1-3.37,1.6Zm-2-4.87v.11a2,2,0,0,0,2.1,1.9h0a2,2,0,0,0,1.9-2V40a2,2,0,0,0-2-1.9H83A2,2,0,0,0,81.05,40.07ZM19.54,17.84l-7.34.39a.89.89,0,0,0-.84.93l1.06,20.17a.89.89,0,0,0,.92.83l7.33-.39a11.89,11.89,0,0,0,4.32-1,9.7,9.7,0,0,0,3.3-2.36,8.91,8.91,0,0,0,1.46-2.14L30,38.4a.88.88,0,0,0,.92.84l2.25-.12A.88.88,0,0,0,34,38.2h0l-.34-6.38a.88.88,0,0,1,.84-.93h0l2.67-.14a.89.89,0,0,1,.8.41l4.41,7a.92.92,0,0,0,.8.42l2.17-.12a.88.88,0,0,0,.72-1.34l-4.25-7A.88.88,0,0,1,42,29c.22-.18.44-.37.64-.56a10.07,10.07,0,0,0,.5,3,9.65,9.65,0,0,0,2,3.45,11.39,11.39,0,0,0,3.45,2.5,10,10,0,0,0,8.09.47,11,11,0,0,0,6.08-6l.08-.18.26,4.91a.89.89,0,0,0,.92.84l2.25-.12a.89.89,0,0,0,.84-.92L66.86,31a.87.87,0,0,1,.83-.92h0l3-.16a10.49,10.49,0,0,0,2.6-.5A6.87,6.87,0,0,0,75.75,28a6.67,6.67,0,0,0,1.68-2.36l0-.12A8.77,8.77,0,0,0,78,21.73a9,9,0,0,0-.77-3.49,4.1,4.1,0,0,0-.22-.41,4.71,4.71,0,0,0-1.63-1.63,7.28,7.28,0,0,0-3-.87,28.9,28.9,0,0,0-4.16,0l-5.33.28a.86.86,0,0,0-.61.29.9.9,0,0,0-.22.63L62.33,21a10.85,10.85,0,0,0-.8-1A11.54,11.54,0,0,0,54,16.38,9.3,9.3,0,0,0,50,17a10.46,10.46,0,0,0-3.46,2.22,11.5,11.5,0,0,0-1.92,2.41q-1-5.05-7.73-4.7l-7.14.37a.88.88,0,0,0-.84.93l.22,4.15a9.5,9.5,0,0,0-5.19-4,12.2,12.2,0,0,0-3.65-.56C20.05,17.82,19.79,17.82,19.54,17.84Zm63.22-3.31-2.17.12a.9.9,0,0,0-.61.29.87.87,0,0,0-.23.64l1.06,20.15a.88.88,0,0,0,.93.84L84,36.45a.83.83,0,0,0,.61-.29.87.87,0,0,0,.23-.63l-1-20.09a1,1,0,0,0-1-.9Zm11.48,3.85a.9.9,0,0,1,.07.87L86.94,35a.88.88,0,0,0,.06.86.85.85,0,0,0,.76.4l12.9-.67h0a.76.76,0,0,0,.72-.8h0l-.13-2.48a.75.75,0,0,0-.8-.72l-6.21.33a.89.89,0,0,1-.84-1.26l7.37-15.74a.9.9,0,0,0-.07-.87.87.87,0,0,0-.78-.39L87,14.31a.75.75,0,0,0-.71.8l.13,2.49a.74.74,0,0,0,.25.52.75.75,0,0,0,.55.2L93.46,18h.05A.89.89,0,0,1,94.24,18.38ZM106,13.31l-2.24.12a.89.89,0,0,0-.85.93l.85,16.15v.1l.2,3.83a1,1,0,0,0,1,.91l2.18-.11h0a.9.9,0,0,0,.83-.93l-1.06-20.16a.88.88,0,0,0-.88-.84Zm-3.32-3.5v.1a2,2,0,0,0,4-.1V9.7a2,2,0,0,0-2-1.9h-.1a2,2,0,0,0-1.91,2ZM16.25,35.28l-.66-12.51a.87.87,0,0,1,.23-.64.83.83,0,0,1,.61-.29l3.3-.18a6,6,0,0,1,4.87,1.62,7.74,7.74,0,0,1,1.92,5.19,7.71,7.71,0,0,1-1.37,5.35A6,6,0,0,1,20.47,36l-3.31.17h0a.88.88,0,0,1-.88-.84Zm36.61-.55A6.9,6.9,0,0,1,48,32.44a5.3,5.3,0,0,1-1.12-2.17,6.7,6.7,0,0,1-.09-2.6,11,11,0,0,1,2.57-5.41,6.42,6.42,0,0,1,2.07-1.58,5.52,5.52,0,0,1,2.4-.52,6.36,6.36,0,0,1,2.64.66,5.45,5.45,0,0,1,3.3,3.78A8.32,8.32,0,0,1,59,30.1a10.69,10.69,0,0,1-1.66,2.54,6.76,6.76,0,0,1-2.07,1.57,5.42,5.42,0,0,1-2.31.52.27.27,0,0,1-.09,0Zm-19.2-7.84a.83.83,0,0,1-.29-.61l-.26-4.91a.87.87,0,0,1,.83-.92l2.22-.12a5.2,5.2,0,0,1,3.39.63,3.08,3.08,0,0,1,1,2.41,3.29,3.29,0,0,1-.8,2.6,5.23,5.23,0,0,1-3.43,1l-2.07.11h0a.89.89,0,0,1-.59-.23Zm32.93-1.41-.31-5.84a.9.9,0,0,1,.23-.64.86.86,0,0,1,.61-.29l2.4-.12a8.81,8.81,0,0,1,2,.09,3.1,3.1,0,0,1,1.33.57,2.58,2.58,0,0,1,.75,1.09A6.22,6.22,0,0,1,73.94,22a4.16,4.16,0,0,1-.79,3.14A4.63,4.63,0,0,1,70,26.19l-2.51.13h0a.9.9,0,0,1-.89-.84Z\"\n transform=\"translate(-8.49 -4.94)\"\n />\n </svg>\n </div>\n <div class=\"wac-logo__wrapper\" [ngClass]=\"isWhite ? 'white' : ''\" *ngIf=\"!isDropizi\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 128.044 40\">\n <defs>\n <style>\n .cls-1 {\n fill: #a4c445;\n }\n .cls-2 {\n fill: #52aecd;\n }\n </style>\n </defs>\n <g id=\"Logo_WiziShop\" transform=\"translate(0.024 0)\">\n <path\n id=\"Shop\"\n class=\"cls-1\"\n d=\"M50.812,38.431V12.3a2.468,2.468,0,0,1,2.452-1.643A2.307,2.307,0,0,1,55.446,12a7.058,7.058,0,0,1,4.107-1.348A5.245,5.245,0,0,1,63.218,12,6.1,6.1,0,0,1,64.7,16.365v7.208h-.012q0,7.282-5.835,7.282a8.453,8.453,0,0,1-3.224-.674v8.25A2.471,2.471,0,0,1,53.178,40,2.419,2.419,0,0,1,50.812,38.431Zm4.805-21.845V26a7.046,7.046,0,0,0,2.709.834c1.1-.012,1.655-1.091,1.655-3.248V15.912c0-.65-.4-.981-1.226-.981A3.59,3.59,0,0,0,55.617,16.586ZM33.858,19.614q0-9.727,7.159-9.721,4.1,0,5.762,3.065a15.8,15.8,0,0,1,1.067,6.656q0,4.56-1.226,6.8-1.655,3.144-6.031,3.138Q33.858,29.556,33.858,19.614Zm4.462,0c0,3.947.846,5.909,2.538,5.909,1.741.012,2.623-1.961,2.623-5.909q0-5.682-2.538-5.688Q38.315,13.926,38.321,19.614Zm-35.8,8.4A5.577,5.577,0,0,1,.172,23.917L0,22.262l4.536-.6a12.942,12.942,0,0,0,.613,2.317,1.976,1.976,0,0,0,2.01,1.189,1.375,1.375,0,0,0,1.226-.674A4.161,4.161,0,0,0,9,22.4c0-1.2-.736-2.623-2.219-4.266s-2.954-3.273-4.4-4.867A10,10,0,0,1,.025,7.2a9.322,9.322,0,0,1,.441-2.77Q1.955.012,6.84.012a7.629,7.629,0,0,1,4.585,1.5,5.555,5.555,0,0,1,2.317,4.131l.172,1.655-4.585.588a12.943,12.943,0,0,0-.613-2.317,1.976,1.976,0,0,0-2.01-1.189c-.7,0-1.189.429-1.483,1.275A3.756,3.756,0,0,0,4.965,7q0,2.537,4.622,7.416t4.622,8.017a7.691,7.691,0,0,1-1.876,4.72,6.225,6.225,0,0,1-5.185,2.39A7.665,7.665,0,0,1,2.525,28.011Zm23.488-.368V15.3c0-.552-.343-.821-1.042-.821a3.356,3.356,0,0,0-2.954,1.569v11.6a2.629,2.629,0,0,1-2.538,1.716,2.589,2.589,0,0,1-2.452-1.728V1.729A2.578,2.578,0,0,1,19.479,0a2.641,2.641,0,0,1,2.538,1.729v9.292a7.611,7.611,0,0,1,3.751-1.042,5.039,5.039,0,0,1,3.665,1.459,5.748,5.748,0,0,1,1.483,4.3V27.631a2.548,2.548,0,0,1-2.366,1.728l-.136,0A2.521,2.521,0,0,1,26.013,27.643Z\"\n transform=\"translate(63.32 0)\"\n />\n <path\n id=\"Wizi\"\n class=\"cls-2\"\n d=\"M13.341,28.661,12.2,22.617l-1.226,6.044a2.9,2.9,0,0,1-2.353,1.189,3.26,3.26,0,0,1-2.44-1.1L.064,2.55A1.793,1.793,0,0,1,.591.674,2.977,2.977,0,0,1,2.6,0c1.287,0,2.047.478,2.28,1.422L8.535,18.707l1.312-6.055a2.228,2.228,0,0,1,2.524-1.876,2.035,2.035,0,0,1,2.183,1.876l1.213,6.142Q16.816,12.6,18,6.3c.785-4.2,2.06-6.3,3.8-6.3a2.717,2.717,0,0,1,1.054.221,1.774,1.774,0,0,1,1.41,2.329l-6.032,26.1a2.881,2.881,0,0,1-2.354,1.2A3.247,3.247,0,0,1,13.341,28.661Zm39.816-.356V11.67c.293-.6,1.139-.895,2.537-.895,1.336,0,2.182.294,2.538.895V28.305c-.355.65-1.2.968-2.538.968C54.3,29.273,53.451,28.955,53.157,28.305Zm-15.667.968c-1.287-.147-1.924-.772-1.924-1.863a2.936,2.936,0,0,1,.343-1.5l7.16-10.984H37.33a2.307,2.307,0,0,1-1.765-2.182,2.226,2.226,0,0,1,1.778-2.182h10.1a2.144,2.144,0,0,1,1.679,2.1q0,1.8-2.574,5.529-2.483,3.366-4.879,6.73h5.7v-.013a2.235,2.235,0,0,1,0,4.364Zm-11.5-.968V11.67c.294-.6,1.14-.895,2.538-.895,1.336,0,2.182.294,2.537.895V28.305c-.355.65-1.2.968-2.537.968C27.131,29.273,26.285,28.955,25.991,28.305ZM53.9,8.054a2,2,0,0,1-.747-1.544A1.858,1.858,0,0,1,53.9,5a2.969,2.969,0,0,1,3.58,0,1.859,1.859,0,0,1,.748,1.508,1.962,1.962,0,0,1-.748,1.544,2.833,2.833,0,0,1-3.58,0Zm-27.165,0a2,2,0,0,1-.748-1.544A1.859,1.859,0,0,1,26.739,5a2.968,2.968,0,0,1,3.579,0,1.892,1.892,0,0,1,.748,1.508,1.959,1.959,0,0,1-.748,1.544,2.832,2.832,0,0,1-3.579,0Z\"\n transform=\"translate(-0.024 0.086)\"\n />\n </g>\n </svg>\n </div>\n</div>\n" }]
|
|
1278
|
+
}], ctorParameters: function () { return []; }, propDecorators: { isDropizi: [{
|
|
1279
|
+
type: Input
|
|
1280
|
+
}], isWhite: [{
|
|
1281
|
+
type: Input
|
|
1282
|
+
}] } });
|
|
1283
|
+
|
|
1284
|
+
class RadioComponent {
|
|
1285
|
+
constructor() {
|
|
1286
|
+
this.label = '';
|
|
1287
|
+
this.id = '';
|
|
1288
|
+
this.alone = false;
|
|
1289
|
+
this.changeInput = new EventEmitter();
|
|
1290
|
+
this.disabled = false;
|
|
1291
|
+
}
|
|
1292
|
+
registerOnChange(fn) {
|
|
1293
|
+
this._onChange = fn;
|
|
1294
|
+
}
|
|
1295
|
+
registerOnTouched(fn) {
|
|
1296
|
+
this._onTouched = fn;
|
|
1297
|
+
}
|
|
1298
|
+
setDisabledState(isDisabled) {
|
|
1299
|
+
this.disabled = isDisabled;
|
|
1300
|
+
}
|
|
1301
|
+
writeValue(obj) {
|
|
1302
|
+
this.value = obj;
|
|
1303
|
+
}
|
|
1304
|
+
onChange(value) {
|
|
1305
|
+
if (this._onChange) {
|
|
1306
|
+
this._onChange(value);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
valueInput(value) {
|
|
1310
|
+
this.changeInput.emit(value);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
RadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: RadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1314
|
+
RadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: RadioComponent, selector: "wac-radio", inputs: { label: "label", options: "options", value: "value", type: "type", id: "id", name: "name", alone: "alone" }, outputs: { changeInput: "changeInput" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }], ngImport: i0, template: "<div class=\"wac-radio\" *ngFor=\"let option of options\" [ngClass]=\"{ 'wac-radio--nowrap': type === 'column', alone: alone }\">\n <div class=\"wac-radio__row\">\n <input\n type=\"radio\"\n [id]=\"option.id\"\n class=\"is-checkradio\"\n [name]=\"option.name\"\n [value]=\"option.value\"\n [disabled]=\"option.disabled\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n />\n <label [attr.for]=\"option.id\">{{ option.label }}</label>\n <div class=\"wac-radio__input\" *ngIf=\"value && option.value && option.hasInput\">\n <input type=\"text\" [placeholder]=\"option.placeholderInput\" (blur)=\"valueInput($event)\" />\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: RadioComponent, decorators: [{
|
|
1316
|
+
type: Component,
|
|
1317
|
+
args: [{ selector: 'wac-radio', encapsulation: ViewEncapsulation.None, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }], template: "<div class=\"wac-radio\" *ngFor=\"let option of options\" [ngClass]=\"{ 'wac-radio--nowrap': type === 'column', alone: alone }\">\n <div class=\"wac-radio__row\">\n <input\n type=\"radio\"\n [id]=\"option.id\"\n class=\"is-checkradio\"\n [name]=\"option.name\"\n [value]=\"option.value\"\n [disabled]=\"option.disabled\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n />\n <label [attr.for]=\"option.id\">{{ option.label }}</label>\n <div class=\"wac-radio__input\" *ngIf=\"value && option.value && option.hasInput\">\n <input type=\"text\" [placeholder]=\"option.placeholderInput\" (blur)=\"valueInput($event)\" />\n </div>\n </div>\n</div>\n" }]
|
|
1318
|
+
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
1319
|
+
type: Input
|
|
1320
|
+
}], options: [{
|
|
1321
|
+
type: Input
|
|
1322
|
+
}], value: [{
|
|
1323
|
+
type: Input
|
|
1324
|
+
}], type: [{
|
|
1325
|
+
type: Input
|
|
1326
|
+
}], id: [{
|
|
1327
|
+
type: Input
|
|
1328
|
+
}], name: [{
|
|
1329
|
+
type: Input
|
|
1330
|
+
}], alone: [{
|
|
1331
|
+
type: Input
|
|
1332
|
+
}], changeInput: [{
|
|
1333
|
+
type: Output
|
|
1334
|
+
}] } });
|
|
1335
|
+
|
|
1336
|
+
class StateComponent {
|
|
1337
|
+
constructor() {
|
|
1338
|
+
this.state = 'success';
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
StateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: StateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1342
|
+
StateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: StateComponent, selector: "wac-state", inputs: { state: "state" }, ngImport: i0, template: "<div [class]=\"'wac-state ' + state\"></div>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
1343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: StateComponent, decorators: [{
|
|
1344
|
+
type: Component,
|
|
1345
|
+
args: [{ selector: 'wac-state', encapsulation: ViewEncapsulation.None, template: "<div [class]=\"'wac-state ' + state\"></div>\n" }]
|
|
1346
|
+
}], ctorParameters: function () { return []; }, propDecorators: { state: [{
|
|
1347
|
+
type: Input
|
|
1348
|
+
}] } });
|
|
1349
|
+
|
|
1350
|
+
const inOutX = trigger('inOutXAnimation', [
|
|
1351
|
+
transition(':enter', [
|
|
1352
|
+
style({ zIndex: -1, transform: 'scaleX(0)', width: 0, opacity: 0 }),
|
|
1353
|
+
animate('.3s ease-out', style({ zIndex: 1, transform: 'scaleX(1)', width: 'auto', opacity: 1 }))
|
|
1354
|
+
]),
|
|
1355
|
+
transition(':leave', [
|
|
1356
|
+
style({ zIndex: 1, transform: 'scaleX(1)', width: 'auto', opacity: 1 }),
|
|
1357
|
+
animate('.3s ease-in', style({ zIndex: -1, transform: 'scaleX(0)', width: 0, opacity: 0 }))
|
|
1358
|
+
])
|
|
1359
|
+
]);
|
|
1360
|
+
|
|
1361
|
+
class LabelComponent {
|
|
1362
|
+
constructor() {
|
|
1363
|
+
this.index = 0;
|
|
1364
|
+
this.label = '';
|
|
1365
|
+
this.deleted = false;
|
|
1366
|
+
this.onDeleteLabel = new EventEmitter();
|
|
1367
|
+
}
|
|
1368
|
+
deleteLabel() {
|
|
1369
|
+
this.deleted = true;
|
|
1370
|
+
this.onDeleteLabel.emit({
|
|
1371
|
+
index: this.index,
|
|
1372
|
+
label: this.label
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
LabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1377
|
+
LabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: LabelComponent, selector: "wac-label", inputs: { index: "index", label: "label", deleted: "deleted" }, outputs: { onDeleteLabel: "onDeleteLabel" }, ngImport: i0, template: "<div *ngIf=\"!deleted\" [@inOutXAnimation] class=\"wac-label\">\n <div class=\"wac-label__wrapper\">\n {{ label }}\n <i class=\"far fa-times\" (click)=\"deleteLabel()\"></i>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [inOutX], encapsulation: i0.ViewEncapsulation.None });
|
|
1378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LabelComponent, decorators: [{
|
|
1379
|
+
type: Component,
|
|
1380
|
+
args: [{ selector: 'wac-label', encapsulation: ViewEncapsulation.None, animations: [inOutX], template: "<div *ngIf=\"!deleted\" [@inOutXAnimation] class=\"wac-label\">\n <div class=\"wac-label__wrapper\">\n {{ label }}\n <i class=\"far fa-times\" (click)=\"deleteLabel()\"></i>\n </div>\n</div>\n" }]
|
|
1381
|
+
}], ctorParameters: function () { return []; }, propDecorators: { index: [{
|
|
1382
|
+
type: Input
|
|
1383
|
+
}], label: [{
|
|
1384
|
+
type: Input
|
|
1385
|
+
}], deleted: [{
|
|
1386
|
+
type: Input
|
|
1387
|
+
}], onDeleteLabel: [{
|
|
1388
|
+
type: Output
|
|
1389
|
+
}] } });
|
|
1390
|
+
|
|
1391
|
+
class CalendarComponent {
|
|
1392
|
+
constructor() {
|
|
1393
|
+
this.type = 'input';
|
|
1394
|
+
this.options = {
|
|
1395
|
+
displayMode: 'inline',
|
|
1396
|
+
showHeader: false,
|
|
1397
|
+
showFooter: true,
|
|
1398
|
+
showButton: true
|
|
1399
|
+
};
|
|
1400
|
+
this.position = 'bottom';
|
|
1401
|
+
this.dateSelected = new Date();
|
|
1402
|
+
this.typeDate = 'datetime-local';
|
|
1403
|
+
this.noMargin = false;
|
|
1404
|
+
this.selected = new EventEmitter();
|
|
1405
|
+
this.changeData = new EventEmitter();
|
|
1406
|
+
this.open = false;
|
|
1407
|
+
this.startLabel = '';
|
|
1408
|
+
this.endLabel = '';
|
|
1409
|
+
}
|
|
1410
|
+
changeDate(event) {
|
|
1411
|
+
this.currentDate = new Date(new Date(event.startDate).setHours(0, 0, 0, 0));
|
|
1412
|
+
this.dateSelected = new Date(new Date(new Date(event.startDate).setHours(0, 0, 0, 0)).getTime() +
|
|
1413
|
+
parseInt(this.currentHours, 0) * 60 * 60 * 1000 +
|
|
1414
|
+
parseInt(this.currentMinutes, 0) * 60000);
|
|
1415
|
+
this.triggerChange({
|
|
1416
|
+
startDate: this.dateSelected,
|
|
1417
|
+
endDate: this.dateSelected
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
triggerChange(event) {
|
|
1421
|
+
this.changeData.emit(event);
|
|
1422
|
+
}
|
|
1423
|
+
openCalendar(value = null) {
|
|
1424
|
+
if (value === 'close') {
|
|
1425
|
+
if (this.open) {
|
|
1426
|
+
this.open = false;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
else {
|
|
1430
|
+
this.open = !this.open;
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
ngOnInit() {
|
|
1434
|
+
if (this.type === 'edit' && this.label) {
|
|
1435
|
+
const splitLabel = this.label.split('{x}');
|
|
1436
|
+
if (splitLabel.length > 1) {
|
|
1437
|
+
this.startLabel = splitLabel[0];
|
|
1438
|
+
this.endLabel = splitLabel[1];
|
|
1439
|
+
}
|
|
1440
|
+
else {
|
|
1441
|
+
this.startLabel = this.label;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
this.currentHours =
|
|
1445
|
+
new Date(this.dateSelected).getHours() < 10 ? '0' + new Date(this.dateSelected).getHours() : new Date(this.dateSelected).getHours();
|
|
1446
|
+
this.currentMinutes =
|
|
1447
|
+
new Date(this.dateSelected).getMinutes() < 10
|
|
1448
|
+
? '0' + new Date(this.dateSelected).getMinutes()
|
|
1449
|
+
: new Date(this.dateSelected).getMinutes();
|
|
1450
|
+
this.currentDate = new Date(this.dateSelected).setHours(0, 0, 0, 0);
|
|
1451
|
+
if (this.typeDate === 'date') {
|
|
1452
|
+
this.currentHours = '00';
|
|
1453
|
+
this.currentMinutes = '00';
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
verifKeyup(events) {
|
|
1457
|
+
events.target.value = events.target.value.replace(/\D+/g, '');
|
|
1458
|
+
}
|
|
1459
|
+
verifHours(events) {
|
|
1460
|
+
const value = parseInt(events.target.value, 0);
|
|
1461
|
+
events.target.value = this.currentHours = value < 24 ? (value < 10 ? '0' + value : value) : 23;
|
|
1462
|
+
const dateData = new Date(new Date(new Date(this.currentDate).setHours(0, 0, 0, 0)).getTime() +
|
|
1463
|
+
parseInt(this.currentHours, 0) * 60 * 60 * 1000 +
|
|
1464
|
+
parseInt(this.currentMinutes, 0) * 60000);
|
|
1465
|
+
this.dateSelected = dateData;
|
|
1466
|
+
this.triggerChange({
|
|
1467
|
+
startDate: dateData,
|
|
1468
|
+
endDate: dateData
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
verifMinutes(events) {
|
|
1472
|
+
const value = parseInt(events.target.value, 0);
|
|
1473
|
+
events.target.value = this.currentMinutes = value < 60 ? (value < 10 ? '0' + value : value) : 59;
|
|
1474
|
+
const dateData = new Date(new Date(new Date(this.currentDate).setHours(0, 0, 0, 0)).getTime() +
|
|
1475
|
+
parseInt(this.currentHours, 0) * 60 * 60 * 1000 +
|
|
1476
|
+
parseInt(this.currentMinutes, 0) * 60000);
|
|
1477
|
+
this.dateSelected = dateData;
|
|
1478
|
+
this.triggerChange({
|
|
1479
|
+
startDate: dateData,
|
|
1480
|
+
endDate: dateData
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
addHours(target) {
|
|
1484
|
+
target.value = this.currentHours =
|
|
1485
|
+
parseInt(target.value, 0) + 1 < 24
|
|
1486
|
+
? parseInt(target.value, 0) + 1 < 10
|
|
1487
|
+
? '0' + (parseInt(target.value, 0) + 1)
|
|
1488
|
+
: parseInt(target.value, 0) + 1
|
|
1489
|
+
: parseInt(target.value, 0) < 10
|
|
1490
|
+
? '0' + parseInt(target.value, 0)
|
|
1491
|
+
: parseInt(target.value, 0);
|
|
1492
|
+
const dateData = new Date(new Date(new Date(this.currentDate).setHours(0, 0, 0, 0)).getTime() +
|
|
1493
|
+
parseInt(this.currentHours, 0) * 60 * 60 * 1000 +
|
|
1494
|
+
parseInt(this.currentMinutes, 0) * 60000);
|
|
1495
|
+
this.dateSelected = dateData;
|
|
1496
|
+
this.triggerChange({
|
|
1497
|
+
startDate: dateData,
|
|
1498
|
+
endDate: dateData
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1501
|
+
removeHours(target) {
|
|
1502
|
+
target.value = this.currentHours =
|
|
1503
|
+
parseInt(target.value, 0) - 1 > -1
|
|
1504
|
+
? parseInt(target.value, 0) - 1 < 10
|
|
1505
|
+
? '0' + (parseInt(target.value, 0) - 1)
|
|
1506
|
+
: parseInt(target.value, 0) - 1
|
|
1507
|
+
: parseInt(target.value, 0) < 10
|
|
1508
|
+
? '0' + parseInt(target.value, 0)
|
|
1509
|
+
: parseInt(target.value, 0);
|
|
1510
|
+
const dateData = new Date(new Date(new Date(this.currentDate).setHours(0, 0, 0, 0)).getTime() +
|
|
1511
|
+
parseInt(this.currentHours, 0) * 60 * 60 * 1000 +
|
|
1512
|
+
parseInt(this.currentMinutes, 0) * 60000);
|
|
1513
|
+
this.dateSelected = dateData;
|
|
1514
|
+
this.triggerChange({
|
|
1515
|
+
startDate: dateData,
|
|
1516
|
+
endDate: dateData
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1519
|
+
addMinutes(target) {
|
|
1520
|
+
target.value = this.currentMinutes =
|
|
1521
|
+
parseInt(target.value, 0) + 1 < 60
|
|
1522
|
+
? parseInt(target.value, 0) + 1 < 10
|
|
1523
|
+
? '0' + (parseInt(target.value, 0) + 1)
|
|
1524
|
+
: parseInt(target.value, 0) + 1
|
|
1525
|
+
: parseInt(target.value, 0) < 10
|
|
1526
|
+
? '0' + parseInt(target.value, 0)
|
|
1527
|
+
: parseInt(target.value, 0);
|
|
1528
|
+
const dateData = new Date(new Date(new Date(this.currentDate).setHours(0, 0, 0, 0)).getTime() +
|
|
1529
|
+
parseInt(this.currentHours, 0) * 60 * 60 * 1000 +
|
|
1530
|
+
parseInt(this.currentMinutes, 0) * 60000);
|
|
1531
|
+
this.dateSelected = dateData;
|
|
1532
|
+
this.triggerChange({
|
|
1533
|
+
startDate: dateData,
|
|
1534
|
+
endDate: dateData
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
removeMinutes(target) {
|
|
1538
|
+
target.value = this.currentMinutes =
|
|
1539
|
+
parseInt(target.value, 0) - 1 > -1
|
|
1540
|
+
? parseInt(target.value, 0) - 1 < 10
|
|
1541
|
+
? '0' + (parseInt(target.value, 0) - 1)
|
|
1542
|
+
: parseInt(target.value, 0) - 1
|
|
1543
|
+
: parseInt(target.value, 0) < 10
|
|
1544
|
+
? '0' + parseInt(target.value, 0)
|
|
1545
|
+
: parseInt(target.value, 0);
|
|
1546
|
+
const dateData = new Date(new Date(new Date(this.currentDate).setHours(0, 0, 0, 0)).getTime() +
|
|
1547
|
+
parseInt(this.currentHours, 0) * 60 * 60 * 1000 +
|
|
1548
|
+
parseInt(this.currentMinutes, 0) * 60000);
|
|
1549
|
+
this.dateSelected = dateData;
|
|
1550
|
+
this.triggerChange({
|
|
1551
|
+
startDate: dateData,
|
|
1552
|
+
endDate: dateData
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1557
|
+
CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CalendarComponent, selector: "wac-calendar", inputs: { label: "label", type: "type", options: "options", position: "position", dateSelected: "dateSelected", typeDate: "typeDate", noMargin: "noMargin" }, outputs: { selected: "selected", changeData: "changeData" }, ngImport: i0, template: "<div\n class=\"wac-calendar\"\n [ngClass]=\"{\n 'wac-calendar--input': type === 'input',\n 'wac-calendar--edit': type === 'edit',\n 'wac-calendar--select': type === 'select',\n 'wac-calendar--no-margin': noMargin,\n 'wac-calendar--open': open\n }\"\n [zIndexToggle]=\"open\"\n>\n <p class=\"wac-calendar__label\" *ngIf=\"label && (type === 'input' || type === 'select')\" (click)=\"openCalendar()\">{{ label }}</p>\n <p class=\"wac-calendar__startLabel\" *ngIf=\"type === 'edit'\">{{ startLabel }}</p>\n <div class=\"wac-calendar__autoHide\" wzAutoHide (clickOutside)=\"openCalendar('close')\">\n <div class=\"wac-calendar__wrapper\">\n <div class=\"wac-calendar__wrapper__input\" *ngIf=\"type === 'input'\" (click)=\"openCalendar()\">\n <div class=\"wac-calendar__wrapper__input__icon\">\n <i class=\"far fa-calendar-alt\"></i>\n </div>\n <div class=\"wac-calendar__wrapper__input__date\">\n {{ dateSelected | date: 'dd/MM/yyyy' }}\n </div>\n <div class=\"wac-calendar__wrapper__input__time\">\n {{ dateSelected | date: 'HH:mm' }}\n </div>\n </div>\n <div class=\"wac-calendar__wrapper__editInPlace\" *ngIf=\"type === 'edit'\" (click)=\"openCalendar()\">\n <div class=\"wac-calendar__wrapper__editInPlace__icon\">\n <i class=\"fal fa-calendar-alt\"></i>\n </div>\n <div class=\"wac-calendar__wrapper__editInPlace__date\">\n {{ dateSelected | date: 'dd/MM/yyyy HH:mm' }}\n </div>\n </div>\n <div class=\"wac-calendar__wrapper__select\" *ngIf=\"type === 'select'\" (click)=\"openCalendar()\">\n <div class=\"wac-calendar__wrapper__select__icon\">\n <i class=\"fal fa-calendar-alt\"></i>\n </div>\n <div class=\"wac-calendar__wrapper__select__date\">\n {{ dateSelected | date: 'dd/MM/yyyy HH:mm' }}\n </div>\n </div>\n </div>\n <div\n class=\"wac-calendar__absolute\"\n [ngClass]=\"{\n top: position === 'top',\n bottom: position === 'bottom',\n left: position === 'left',\n right: position === 'right',\n 'right-top': position === 'right-top',\n 'right-bottom': position === 'right-bottom',\n 'left-top': position === 'left-top',\n 'left-bottom': position === 'left-bottom',\n 'with-time': typeDate === 'datetime-local' || typeDate === 'datetime'\n }\"\n >\n <nwb-date-picker #datePicker (change)=\"changeDate($event)\" [options]=\"options\">\n <input [nwbDatepickerStart]=\"datePicker\" type=\"date\" [value]=\"dateSelected\" />\n </nwb-date-picker>\n <div class=\"wac-calendar__absolute__time\" *ngIf=\"typeDate === 'datetime-local' || typeDate === 'datetime'\">\n <div class=\"wac-calendar__absolute__time__wrapper\">\n <div class=\"wac-calendar__absolute__time__wrapper__hours\">\n <div class=\"wac-calendar__absolute__time__wrapper__hours__left\">\n <button class=\"wac-calendar__absolute__time__wrapper__hours__btn\" (click)=\"addHours(hours)\">\n <i class=\"fas fa-plus\"></i>\n </button>\n <button class=\"wac-calendar__absolute__time__wrapper__hours__btn\" (click)=\"removeHours(hours)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </div>\n <div class=\"wac-calendar__absolute__time__wrapper__hours__right\">\n <input #hours type=\"text\" value=\"{{ currentHours }}\" (keyup)=\"verifKeyup($event)\" (blur)=\"verifHours($event)\" />\n </div>\n </div>\n <div class=\"wac-calendar__absolute__time__wrapper__minutes\">\n <div class=\"wac-calendar__absolute__time__wrapper__minutes__left\">\n <input #minutes type=\"text\" value=\"{{ currentMinutes }}\" (keyup)=\"verifKeyup($event)\" (blur)=\"verifMinutes($event)\" />\n </div>\n <div class=\"wac-calendar__absolute__time__wrapper__minutes__right\">\n <button class=\"wac-calendar__absolute__time__wrapper__minutes__btn\" (click)=\"addMinutes(minutes)\">\n <i class=\"fas fa-plus\"></i>\n </button>\n <button class=\"wac-calendar__absolute__time__wrapper__minutes__btn\" (click)=\"removeMinutes(minutes)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <p class=\"wac-calendar__endLabel\" *ngIf=\"type === 'edit'\">{{ endLabel }}</p>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.NwbDatePickerComponent, selector: "nwb-date-picker", inputs: ["options"], outputs: ["change", "clear"] }, { kind: "directive", type: i1$2.NwbDatePickerInputStartDirective, selector: "input[nwbDatepickerStart]", inputs: ["nwbDatepickerStart"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
1558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
1559
|
+
type: Component,
|
|
1560
|
+
args: [{ selector: 'wac-calendar', template: "<div\n class=\"wac-calendar\"\n [ngClass]=\"{\n 'wac-calendar--input': type === 'input',\n 'wac-calendar--edit': type === 'edit',\n 'wac-calendar--select': type === 'select',\n 'wac-calendar--no-margin': noMargin,\n 'wac-calendar--open': open\n }\"\n [zIndexToggle]=\"open\"\n>\n <p class=\"wac-calendar__label\" *ngIf=\"label && (type === 'input' || type === 'select')\" (click)=\"openCalendar()\">{{ label }}</p>\n <p class=\"wac-calendar__startLabel\" *ngIf=\"type === 'edit'\">{{ startLabel }}</p>\n <div class=\"wac-calendar__autoHide\" wzAutoHide (clickOutside)=\"openCalendar('close')\">\n <div class=\"wac-calendar__wrapper\">\n <div class=\"wac-calendar__wrapper__input\" *ngIf=\"type === 'input'\" (click)=\"openCalendar()\">\n <div class=\"wac-calendar__wrapper__input__icon\">\n <i class=\"far fa-calendar-alt\"></i>\n </div>\n <div class=\"wac-calendar__wrapper__input__date\">\n {{ dateSelected | date: 'dd/MM/yyyy' }}\n </div>\n <div class=\"wac-calendar__wrapper__input__time\">\n {{ dateSelected | date: 'HH:mm' }}\n </div>\n </div>\n <div class=\"wac-calendar__wrapper__editInPlace\" *ngIf=\"type === 'edit'\" (click)=\"openCalendar()\">\n <div class=\"wac-calendar__wrapper__editInPlace__icon\">\n <i class=\"fal fa-calendar-alt\"></i>\n </div>\n <div class=\"wac-calendar__wrapper__editInPlace__date\">\n {{ dateSelected | date: 'dd/MM/yyyy HH:mm' }}\n </div>\n </div>\n <div class=\"wac-calendar__wrapper__select\" *ngIf=\"type === 'select'\" (click)=\"openCalendar()\">\n <div class=\"wac-calendar__wrapper__select__icon\">\n <i class=\"fal fa-calendar-alt\"></i>\n </div>\n <div class=\"wac-calendar__wrapper__select__date\">\n {{ dateSelected | date: 'dd/MM/yyyy HH:mm' }}\n </div>\n </div>\n </div>\n <div\n class=\"wac-calendar__absolute\"\n [ngClass]=\"{\n top: position === 'top',\n bottom: position === 'bottom',\n left: position === 'left',\n right: position === 'right',\n 'right-top': position === 'right-top',\n 'right-bottom': position === 'right-bottom',\n 'left-top': position === 'left-top',\n 'left-bottom': position === 'left-bottom',\n 'with-time': typeDate === 'datetime-local' || typeDate === 'datetime'\n }\"\n >\n <nwb-date-picker #datePicker (change)=\"changeDate($event)\" [options]=\"options\">\n <input [nwbDatepickerStart]=\"datePicker\" type=\"date\" [value]=\"dateSelected\" />\n </nwb-date-picker>\n <div class=\"wac-calendar__absolute__time\" *ngIf=\"typeDate === 'datetime-local' || typeDate === 'datetime'\">\n <div class=\"wac-calendar__absolute__time__wrapper\">\n <div class=\"wac-calendar__absolute__time__wrapper__hours\">\n <div class=\"wac-calendar__absolute__time__wrapper__hours__left\">\n <button class=\"wac-calendar__absolute__time__wrapper__hours__btn\" (click)=\"addHours(hours)\">\n <i class=\"fas fa-plus\"></i>\n </button>\n <button class=\"wac-calendar__absolute__time__wrapper__hours__btn\" (click)=\"removeHours(hours)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </div>\n <div class=\"wac-calendar__absolute__time__wrapper__hours__right\">\n <input #hours type=\"text\" value=\"{{ currentHours }}\" (keyup)=\"verifKeyup($event)\" (blur)=\"verifHours($event)\" />\n </div>\n </div>\n <div class=\"wac-calendar__absolute__time__wrapper__minutes\">\n <div class=\"wac-calendar__absolute__time__wrapper__minutes__left\">\n <input #minutes type=\"text\" value=\"{{ currentMinutes }}\" (keyup)=\"verifKeyup($event)\" (blur)=\"verifMinutes($event)\" />\n </div>\n <div class=\"wac-calendar__absolute__time__wrapper__minutes__right\">\n <button class=\"wac-calendar__absolute__time__wrapper__minutes__btn\" (click)=\"addMinutes(minutes)\">\n <i class=\"fas fa-plus\"></i>\n </button>\n <button class=\"wac-calendar__absolute__time__wrapper__minutes__btn\" (click)=\"removeMinutes(minutes)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <p class=\"wac-calendar__endLabel\" *ngIf=\"type === 'edit'\">{{ endLabel }}</p>\n</div>\n" }]
|
|
1561
|
+
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
1562
|
+
type: Input
|
|
1563
|
+
}], type: [{
|
|
1564
|
+
type: Input
|
|
1565
|
+
}], options: [{
|
|
1566
|
+
type: Input
|
|
1567
|
+
}], position: [{
|
|
1568
|
+
type: Input
|
|
1569
|
+
}], dateSelected: [{
|
|
1570
|
+
type: Input
|
|
1571
|
+
}], typeDate: [{
|
|
1572
|
+
type: Input
|
|
1573
|
+
}], noMargin: [{
|
|
1574
|
+
type: Input
|
|
1575
|
+
}], selected: [{
|
|
1576
|
+
type: Output
|
|
1577
|
+
}], changeData: [{
|
|
1578
|
+
type: Output
|
|
1579
|
+
}] } });
|
|
1580
|
+
|
|
1581
|
+
class WzEditInPlaceComponent {
|
|
1582
|
+
constructor() {
|
|
1583
|
+
this.config = {};
|
|
1584
|
+
this.customChange = new EventEmitter();
|
|
1585
|
+
this.objectKeys = Object.keys;
|
|
1586
|
+
this.editing = false;
|
|
1587
|
+
this.onChange = Function.prototype;
|
|
1588
|
+
this.onTouched = Function.prototype;
|
|
1589
|
+
}
|
|
1590
|
+
get value() {
|
|
1591
|
+
return this.currentValue;
|
|
1592
|
+
}
|
|
1593
|
+
set value(v) {
|
|
1594
|
+
if (v !== this.currentValue) {
|
|
1595
|
+
this.currentValue = v;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
writeValue(value) {
|
|
1599
|
+
if (value !== null) {
|
|
1600
|
+
if (this.config.currency) {
|
|
1601
|
+
this.currentValue = this.parseValueToNumber(value);
|
|
1602
|
+
if (this.config.separator !== '.') {
|
|
1603
|
+
this.currentValue = this.parseValueToSeparator(this.currentValue);
|
|
1604
|
+
}
|
|
1605
|
+
this.currentValue += this.config.currency;
|
|
1606
|
+
}
|
|
1607
|
+
else {
|
|
1608
|
+
this.currentValue = value;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
registerOnChange(fn) {
|
|
1613
|
+
this.onChange = fn;
|
|
1614
|
+
}
|
|
1615
|
+
registerOnTouched(fn) {
|
|
1616
|
+
this.onTouched = fn;
|
|
1617
|
+
}
|
|
1618
|
+
_setValue(v) {
|
|
1619
|
+
if (this.type === 'select') {
|
|
1620
|
+
this.onChange(v);
|
|
1621
|
+
}
|
|
1622
|
+
else if (typeof this.config.currency === 'string') {
|
|
1623
|
+
v = this.parseValueToNumber(v);
|
|
1624
|
+
this.onChange(v);
|
|
1625
|
+
if (this.config.separator !== '.') {
|
|
1626
|
+
v = this.parseValueToSeparator(v);
|
|
1627
|
+
}
|
|
1628
|
+
v = v + this.config.currency;
|
|
1629
|
+
this.customChange.emit(v);
|
|
1630
|
+
}
|
|
1631
|
+
else {
|
|
1632
|
+
this.onChange(v);
|
|
1633
|
+
}
|
|
1634
|
+
this.writeValue(v);
|
|
1635
|
+
this.value = v;
|
|
1636
|
+
}
|
|
1637
|
+
ngAfterViewChecked() {
|
|
1638
|
+
if (this.input && this.editing) {
|
|
1639
|
+
this.input.nativeElement.focus();
|
|
1640
|
+
if (this.config.selectTextUponClick && this.firstEdit && this.preValue && this.input.nativeElement.value) {
|
|
1641
|
+
this.input.nativeElement.select();
|
|
1642
|
+
this.firstEdit = false;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
this.initialized = true;
|
|
1646
|
+
}
|
|
1647
|
+
startEditing() {
|
|
1648
|
+
if (!this.editing) {
|
|
1649
|
+
this.editing = true;
|
|
1650
|
+
this.currentValue = this.checkAndRemoveCurrency(this.currentValue);
|
|
1651
|
+
this.firstEdit = true;
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
edit() {
|
|
1655
|
+
this.preValue = this.currentValue;
|
|
1656
|
+
this.editing = true;
|
|
1657
|
+
}
|
|
1658
|
+
onSubmit() {
|
|
1659
|
+
this.editing = false;
|
|
1660
|
+
if (this.currentValue !== this.preValue) {
|
|
1661
|
+
if (typeof this.config.handler === 'function') {
|
|
1662
|
+
this.isLoading = true;
|
|
1663
|
+
this.config.handler(this.currentValue, this.config.data).subscribe(data => {
|
|
1664
|
+
let hasChanged;
|
|
1665
|
+
this.isLoading = false;
|
|
1666
|
+
if (typeof data !== 'boolean') {
|
|
1667
|
+
this.currentValue = data.value;
|
|
1668
|
+
hasChanged = data.success;
|
|
1669
|
+
}
|
|
1670
|
+
else {
|
|
1671
|
+
hasChanged = data;
|
|
1672
|
+
}
|
|
1673
|
+
if (hasChanged) {
|
|
1674
|
+
this._setValue(this.currentValue);
|
|
1675
|
+
}
|
|
1676
|
+
else {
|
|
1677
|
+
this._setValue(this.preValue);
|
|
1678
|
+
}
|
|
1679
|
+
}, () => {
|
|
1680
|
+
this.isLoading = false;
|
|
1681
|
+
this._setValue(this.preValue);
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
else {
|
|
1685
|
+
this._setValue(this.currentValue);
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
else {
|
|
1689
|
+
if (typeof this.config.currency === 'string') {
|
|
1690
|
+
this.currentValue = this.currentValue + this.config.currency;
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
checkAndRemoveCurrency(value) {
|
|
1695
|
+
if (typeof this.config.currency === 'string') {
|
|
1696
|
+
return value.slice(0, -1);
|
|
1697
|
+
}
|
|
1698
|
+
return value;
|
|
1699
|
+
}
|
|
1700
|
+
parseValueToNumber(value) {
|
|
1701
|
+
if (!isNaN(value) && value !== '') {
|
|
1702
|
+
return parseFloat(value);
|
|
1703
|
+
}
|
|
1704
|
+
if (typeof this.config.currency === 'string') {
|
|
1705
|
+
const indexComma = value.indexOf(',');
|
|
1706
|
+
const indexDot = value.indexOf('.');
|
|
1707
|
+
if (indexComma > 0 && indexDot === -1) {
|
|
1708
|
+
const parsedValue = value.replace(',', '.');
|
|
1709
|
+
if (!isNaN(parsedValue)) {
|
|
1710
|
+
return parseFloat(parsedValue);
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
if (indexDot > 0 && indexComma === -1) {
|
|
1714
|
+
if (!isNaN(value)) {
|
|
1715
|
+
return parseFloat(value);
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
return 0;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
parseValueToSeparator(value) {
|
|
1722
|
+
if (typeof this.config.separator === 'string') {
|
|
1723
|
+
value = parseFloat(value).toFixed(2);
|
|
1724
|
+
return value.replace('.', this.config.separator);
|
|
1725
|
+
}
|
|
1726
|
+
return value;
|
|
1727
|
+
}
|
|
1728
|
+
ngOnChanges(changes) {
|
|
1729
|
+
if (this.initialized) {
|
|
1730
|
+
this.currentValue = this.checkAndRemoveCurrency(this.currentValue) + this.config.currency;
|
|
1731
|
+
this.customChange.emit(this.value);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
selectOption(event) {
|
|
1735
|
+
this.currentValue = event.target.innerText;
|
|
1736
|
+
this.closeSelect(event);
|
|
1737
|
+
event.stopPropagation();
|
|
1738
|
+
this.customChange.emit(event.target.value);
|
|
1739
|
+
}
|
|
1740
|
+
closeSelect(event) {
|
|
1741
|
+
this.editing = false;
|
|
1742
|
+
this.isLoading = false;
|
|
1743
|
+
event.stopPropagation();
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
WzEditInPlaceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WzEditInPlaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1747
|
+
WzEditInPlaceComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: WzEditInPlaceComponent, selector: "wac-edit-in-place", inputs: { type: "type", nwbOptions: "nwbOptions", config: "config", label: "label" }, outputs: { customChange: "customChange" }, providers: [
|
|
1748
|
+
{
|
|
1749
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1750
|
+
useExisting: WzEditInPlaceComponent,
|
|
1751
|
+
multi: true
|
|
1752
|
+
}
|
|
1753
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [class.nwb-wrapper--editable]=\"type === 'select' || (!editing && !isLoading)\" class=\"wac-edit-in-place nwb-wrapper\" (click)=\"startEditing()\">\n <span\n data-text=\"dd\"\n [class.nwb-is-loading]=\"type === 'select' ? '' : isLoading\"\n [class.nwb-editing]=\"type === 'select' ? '' : editing\"\n [ngClass]=\"type === 'select' ? 'nwbSelect' : ''\"\n >\n {{ currentValue }}\n </span>\n\n <input\n #input\n *ngIf=\"type !== 'select' && editing\"\n [class.nwb-editable]=\"!editing\"\n [class.nwb-editing]=\"editing\"\n [class.nwb-is-loading]=\"isLoading\"\n type=\"text\"\n [(ngModel)]=\"value\"\n (focus)=\"edit()\"\n (blur)=\"onSubmit()\"\n (keyup.enter)=\"onSubmit()\"\n [ngStyle]=\"{ 'width.px': inputWidth }\"\n />\n <div class=\"nwbSelect__container\" *ngIf=\"type === 'select' && editing\">\n <div class=\"nwbSelect__background\" (click)=\"closeSelect($event)\"></div>\n <ng-container *ngFor=\"let nwbOption of objectKeys(nwbOptions)\">\n <button\n *ngIf=\"nwbOptions[nwbOption]\"\n [ngClass]=\"\n nwbOptions[nwbOption].label === currentValue\n ? 'nwbSelect__container__item nwbSelect__container__item--selected'\n : 'nwbSelect__container__item'\n \"\n (click)=\"selectOption($event)\"\n [value]=\"nwbOptions[nwbOption].value\"\n >\n {{ nwbOptions[nwbOption].label ? nwbOptions[nwbOption].label : nwbOptions[nwbOption].value }}\n </button>\n </ng-container>\n </div>\n\n <span class=\"nwb-loader\" [class.nwb-is-loading]=\"type === 'select' ? '' : isLoading\"></span>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WzEditInPlaceComponent, decorators: [{
|
|
1755
|
+
type: Component,
|
|
1756
|
+
args: [{ selector: 'wac-edit-in-place', encapsulation: ViewEncapsulation.None, providers: [
|
|
1757
|
+
{
|
|
1758
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1759
|
+
useExisting: WzEditInPlaceComponent,
|
|
1760
|
+
multi: true
|
|
1761
|
+
}
|
|
1762
|
+
], template: "<div [class.nwb-wrapper--editable]=\"type === 'select' || (!editing && !isLoading)\" class=\"wac-edit-in-place nwb-wrapper\" (click)=\"startEditing()\">\n <span\n data-text=\"dd\"\n [class.nwb-is-loading]=\"type === 'select' ? '' : isLoading\"\n [class.nwb-editing]=\"type === 'select' ? '' : editing\"\n [ngClass]=\"type === 'select' ? 'nwbSelect' : ''\"\n >\n {{ currentValue }}\n </span>\n\n <input\n #input\n *ngIf=\"type !== 'select' && editing\"\n [class.nwb-editable]=\"!editing\"\n [class.nwb-editing]=\"editing\"\n [class.nwb-is-loading]=\"isLoading\"\n type=\"text\"\n [(ngModel)]=\"value\"\n (focus)=\"edit()\"\n (blur)=\"onSubmit()\"\n (keyup.enter)=\"onSubmit()\"\n [ngStyle]=\"{ 'width.px': inputWidth }\"\n />\n <div class=\"nwbSelect__container\" *ngIf=\"type === 'select' && editing\">\n <div class=\"nwbSelect__background\" (click)=\"closeSelect($event)\"></div>\n <ng-container *ngFor=\"let nwbOption of objectKeys(nwbOptions)\">\n <button\n *ngIf=\"nwbOptions[nwbOption]\"\n [ngClass]=\"\n nwbOptions[nwbOption].label === currentValue\n ? 'nwbSelect__container__item nwbSelect__container__item--selected'\n : 'nwbSelect__container__item'\n \"\n (click)=\"selectOption($event)\"\n [value]=\"nwbOptions[nwbOption].value\"\n >\n {{ nwbOptions[nwbOption].label ? nwbOptions[nwbOption].label : nwbOptions[nwbOption].value }}\n </button>\n </ng-container>\n </div>\n\n <span class=\"nwb-loader\" [class.nwb-is-loading]=\"type === 'select' ? '' : isLoading\"></span>\n</div>\n" }]
|
|
1763
|
+
}], propDecorators: { type: [{
|
|
1764
|
+
type: Input
|
|
1765
|
+
}], nwbOptions: [{
|
|
1766
|
+
type: Input
|
|
1767
|
+
}], config: [{
|
|
1768
|
+
type: Input
|
|
1769
|
+
}], label: [{
|
|
1770
|
+
type: Input
|
|
1771
|
+
}], customChange: [{
|
|
1772
|
+
type: Output
|
|
1773
|
+
}], input: [{
|
|
1774
|
+
type: ViewChild,
|
|
1775
|
+
args: ['input']
|
|
1776
|
+
}] } });
|
|
1777
|
+
|
|
1778
|
+
class ProgressBarComponent {
|
|
1779
|
+
constructor(translateService) {
|
|
1780
|
+
this.translateService = translateService;
|
|
1781
|
+
this.valueLength = null;
|
|
1782
|
+
this.min = null;
|
|
1783
|
+
this.max = null;
|
|
1784
|
+
}
|
|
1785
|
+
progressBarClass(spanNumber = -1) {
|
|
1786
|
+
const length = this.valueLength;
|
|
1787
|
+
const min = this.min;
|
|
1788
|
+
const max = this.max;
|
|
1789
|
+
if (spanNumber === 1) {
|
|
1790
|
+
return {
|
|
1791
|
+
'is-danger': length > max,
|
|
1792
|
+
'is-success': length >= min && length <= max
|
|
1793
|
+
};
|
|
1794
|
+
}
|
|
1795
|
+
else if (spanNumber === 2) {
|
|
1796
|
+
return {
|
|
1797
|
+
'is-success': length === max,
|
|
1798
|
+
'is-danger': length > max
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1801
|
+
else {
|
|
1802
|
+
return {
|
|
1803
|
+
'is-warning': length < min,
|
|
1804
|
+
'is-danger': length > max,
|
|
1805
|
+
'is-success': length >= min && length <= max
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
progressBarSpanPosition(index) {
|
|
1810
|
+
const min = this.min;
|
|
1811
|
+
const max = this.max;
|
|
1812
|
+
const maxSize = this.progressBarGetMaxSize(max);
|
|
1813
|
+
const successMin = (min / maxSize) * 100;
|
|
1814
|
+
const successMax = (max / maxSize) * 100;
|
|
1815
|
+
return index === 1 ? successMin : successMax;
|
|
1816
|
+
}
|
|
1817
|
+
progressBarGetMaxSize(max) {
|
|
1818
|
+
return max + max / 4;
|
|
1819
|
+
}
|
|
1820
|
+
progressBarGetTextInfo() {
|
|
1821
|
+
const length = this.valueLength;
|
|
1822
|
+
const min = this.min;
|
|
1823
|
+
const max = this.max;
|
|
1824
|
+
if (length < min) {
|
|
1825
|
+
return this.translateService.instant('wac.input.progressbar.information.too.short');
|
|
1826
|
+
}
|
|
1827
|
+
else if (length > max) {
|
|
1828
|
+
return this.translateService.instant('wac.input.progressbar.information.too.long');
|
|
1829
|
+
}
|
|
1830
|
+
else {
|
|
1831
|
+
return this.translateService.instant('wac.input.progressbar.information.good');
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i1$3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1836
|
+
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: ProgressBarComponent, selector: "wac-progress-bar", inputs: { valueLength: "valueLength", min: "min", max: "max" }, ngImport: i0, template: "<div class=\"wac-progressBarContent\">\n <div class=\"progressBar\">\n <progress class=\"progress\" [ngClass]=\"progressBarClass()\" [max]=\"progressBarGetMaxSize(max)\" [value]=\"valueLength\"></progress>\n <span [ngClass]=\"progressBarClass(1)\" [ngStyle]=\"{ 'left.%': progressBarSpanPosition(1) }\"></span>\n <span [ngClass]=\"progressBarClass(2)\" [ngStyle]=\"{ 'left.%': progressBarSpanPosition(2) }\"></span>\n </div>\n <div class=\"size\">\n <span class=\"is-size-7 wac-input__size\">\n <span *ngIf=\"valueLength\">\n <span [ngClass]=\"progressBarClass()\">{{ progressBarGetTextInfo() }}</span> -\n </span>\n <strong>{{ valueLength }}</strong> / {{ max }}\n </span>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
1838
|
+
type: Component,
|
|
1839
|
+
args: [{ selector: 'wac-progress-bar', template: "<div class=\"wac-progressBarContent\">\n <div class=\"progressBar\">\n <progress class=\"progress\" [ngClass]=\"progressBarClass()\" [max]=\"progressBarGetMaxSize(max)\" [value]=\"valueLength\"></progress>\n <span [ngClass]=\"progressBarClass(1)\" [ngStyle]=\"{ 'left.%': progressBarSpanPosition(1) }\"></span>\n <span [ngClass]=\"progressBarClass(2)\" [ngStyle]=\"{ 'left.%': progressBarSpanPosition(2) }\"></span>\n </div>\n <div class=\"size\">\n <span class=\"is-size-7 wac-input__size\">\n <span *ngIf=\"valueLength\">\n <span [ngClass]=\"progressBarClass()\">{{ progressBarGetTextInfo() }}</span> -\n </span>\n <strong>{{ valueLength }}</strong> / {{ max }}\n </span>\n </div>\n</div>\n" }]
|
|
1840
|
+
}], ctorParameters: function () { return [{ type: i1$3.TranslateService }]; }, propDecorators: { valueLength: [{
|
|
1841
|
+
type: Input
|
|
1842
|
+
}], min: [{
|
|
1843
|
+
type: Input
|
|
1844
|
+
}], max: [{
|
|
1845
|
+
type: Input
|
|
1846
|
+
}] } });
|
|
1847
|
+
|
|
1848
|
+
class TextAreaComponent {
|
|
1849
|
+
constructor() {
|
|
1850
|
+
// todo simplify and improve progress bar
|
|
1851
|
+
this.label = '';
|
|
1852
|
+
this.value = '';
|
|
1853
|
+
this.placeholder = '';
|
|
1854
|
+
this.textInfo = null;
|
|
1855
|
+
this.textError = null;
|
|
1856
|
+
this.size = null;
|
|
1857
|
+
this.min = null;
|
|
1858
|
+
this.max = null;
|
|
1859
|
+
this.progressBar = false;
|
|
1860
|
+
this.disabled = false;
|
|
1861
|
+
this.id = 'wac-textarea__' +
|
|
1862
|
+
Math.random()
|
|
1863
|
+
.toString(36)
|
|
1864
|
+
.substr(2, 9);
|
|
1865
|
+
}
|
|
1866
|
+
registerOnChange(fn) {
|
|
1867
|
+
this._onChange = fn;
|
|
1868
|
+
}
|
|
1869
|
+
registerOnTouched(fn) {
|
|
1870
|
+
this._onTouched = fn;
|
|
1871
|
+
}
|
|
1872
|
+
setDisabledState(isDisabled) {
|
|
1873
|
+
this.disabled = isDisabled;
|
|
1874
|
+
}
|
|
1875
|
+
writeValue(obj) {
|
|
1876
|
+
this.value = obj;
|
|
1877
|
+
}
|
|
1878
|
+
onChange(value) {
|
|
1879
|
+
if (this._onChange) {
|
|
1880
|
+
this._onChange(value);
|
|
1881
|
+
this.writeValue(value);
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
onBlur() {
|
|
1885
|
+
if (this._onTouched) {
|
|
1886
|
+
this._onTouched();
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
TextAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TextAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1891
|
+
TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TextAreaComponent, selector: "wac-text-area", inputs: { label: "label", value: "value", placeholder: "placeholder", textInfo: "textInfo", textError: "textError", size: "size", min: "min", max: "max", progressBar: "progressBar" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextAreaComponent, multi: true }], ngImport: i0, template: "<div class=\"field wac-text-area\">\n <div class=\"field-label is-normal has-text-left\">\n <label class=\"label has-text-weight-normal\" [innerHTML]=\"label\" [for]=\"id\"></label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p class=\"control\" [ngClass]=\"{ 'has-icons-right': textError }\">\n <textarea\n class=\"textarea\"\n [id]=\"id\"\n [ngClass]=\"{ 'is-danger': textError, 'has-help-text': textInfo != '' || size }\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n ></textarea>\n\n <span *ngIf=\"textError\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n <span\n *ngIf=\"textInfo && (textError === null || textError === '')\"\n class=\"is-size-7 wac-text-area__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n <span *ngIf=\"textError\" class=\"is-size-7 wac-text-area__error has-text-danger\" [innerHtml]=\"textError\"></span>\n <span\n *ngIf=\"size && !progressBar\"\n class=\"is-size-7 wac-text-area__size\"\n [ngClass]=\"value && value.length > size ? 'has-text-danger' : ''\"\n >{{ value ? value.length : 0 }}/{{ size }}</span\n >\n </p>\n <wac-progress-bar *ngIf=\"progressBar && value\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ProgressBarComponent, selector: "wac-progress-bar", inputs: ["valueLength", "min", "max"] }] });
|
|
1892
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TextAreaComponent, decorators: [{
|
|
1893
|
+
type: Component,
|
|
1894
|
+
args: [{ selector: 'wac-text-area', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextAreaComponent, multi: true }], template: "<div class=\"field wac-text-area\">\n <div class=\"field-label is-normal has-text-left\">\n <label class=\"label has-text-weight-normal\" [innerHTML]=\"label\" [for]=\"id\"></label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p class=\"control\" [ngClass]=\"{ 'has-icons-right': textError }\">\n <textarea\n class=\"textarea\"\n [id]=\"id\"\n [ngClass]=\"{ 'is-danger': textError, 'has-help-text': textInfo != '' || size }\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n ></textarea>\n\n <span *ngIf=\"textError\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n <span\n *ngIf=\"textInfo && (textError === null || textError === '')\"\n class=\"is-size-7 wac-text-area__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n <span *ngIf=\"textError\" class=\"is-size-7 wac-text-area__error has-text-danger\" [innerHtml]=\"textError\"></span>\n <span\n *ngIf=\"size && !progressBar\"\n class=\"is-size-7 wac-text-area__size\"\n [ngClass]=\"value && value.length > size ? 'has-text-danger' : ''\"\n >{{ value ? value.length : 0 }}/{{ size }}</span\n >\n </p>\n <wac-progress-bar *ngIf=\"progressBar && value\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n" }]
|
|
1895
|
+
}], propDecorators: { label: [{
|
|
1896
|
+
type: Input
|
|
1897
|
+
}], value: [{
|
|
1898
|
+
type: Input
|
|
1899
|
+
}], placeholder: [{
|
|
1900
|
+
type: Input
|
|
1901
|
+
}], textInfo: [{
|
|
1902
|
+
type: Input
|
|
1903
|
+
}], textError: [{
|
|
1904
|
+
type: Input
|
|
1905
|
+
}], size: [{
|
|
1906
|
+
type: Input
|
|
1907
|
+
}], min: [{
|
|
1908
|
+
type: Input
|
|
1909
|
+
}], max: [{
|
|
1910
|
+
type: Input
|
|
1911
|
+
}], progressBar: [{
|
|
1912
|
+
type: Input
|
|
1913
|
+
}] } });
|
|
1914
|
+
|
|
1915
|
+
class H1Component {
|
|
1916
|
+
constructor() {
|
|
1917
|
+
this.withImg = false;
|
|
1918
|
+
}
|
|
1919
|
+
ngOnInit() { }
|
|
1920
|
+
}
|
|
1921
|
+
H1Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: H1Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1922
|
+
H1Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: H1Component, selector: "wac-h1", inputs: { withImg: "withImg" }, ngImport: i0, template: "<h1 class=\"wac-h1\" [ngClass]=\"{'with-img': withImg}\"><ng-content></ng-content></h1>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: H1Component, decorators: [{
|
|
1924
|
+
type: Component,
|
|
1925
|
+
args: [{ selector: 'wac-h1', template: "<h1 class=\"wac-h1\" [ngClass]=\"{'with-img': withImg}\"><ng-content></ng-content></h1>\n" }]
|
|
1926
|
+
}], ctorParameters: function () { return []; }, propDecorators: { withImg: [{
|
|
1927
|
+
type: Input
|
|
1928
|
+
}] } });
|
|
1929
|
+
|
|
1930
|
+
class H2Component {
|
|
1931
|
+
constructor() { }
|
|
1932
|
+
ngOnInit() { }
|
|
1933
|
+
}
|
|
1934
|
+
H2Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: H2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1935
|
+
H2Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: H2Component, selector: "wac-h2", ngImport: i0, template: "<h2 class=\"wac-h2\"><ng-content></ng-content></h2>\n" });
|
|
1936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: H2Component, decorators: [{
|
|
1937
|
+
type: Component,
|
|
1938
|
+
args: [{ selector: 'wac-h2', template: "<h2 class=\"wac-h2\"><ng-content></ng-content></h2>\n" }]
|
|
1939
|
+
}], ctorParameters: function () { return []; } });
|
|
1940
|
+
|
|
1941
|
+
class H3Component {
|
|
1942
|
+
constructor() {
|
|
1943
|
+
this.grey = false;
|
|
1944
|
+
}
|
|
1945
|
+
ngOnInit() { }
|
|
1946
|
+
}
|
|
1947
|
+
H3Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: H3Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1948
|
+
H3Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: H3Component, selector: "wac-h3", inputs: { grey: "grey" }, ngImport: i0, template: "<h3 class=\"wac-h3\" [ngClass]=\"{ grey: grey }\"><ng-content></ng-content></h3>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: H3Component, decorators: [{
|
|
1950
|
+
type: Component,
|
|
1951
|
+
args: [{ selector: 'wac-h3', template: "<h3 class=\"wac-h3\" [ngClass]=\"{ grey: grey }\"><ng-content></ng-content></h3>\n" }]
|
|
1952
|
+
}], ctorParameters: function () { return []; }, propDecorators: { grey: [{
|
|
1953
|
+
type: Input
|
|
1954
|
+
}] } });
|
|
1955
|
+
|
|
1956
|
+
class HeaderPageComponent {
|
|
1957
|
+
constructor() {
|
|
1958
|
+
this.withImg = false;
|
|
1959
|
+
}
|
|
1960
|
+
ngOnInit() { }
|
|
1961
|
+
}
|
|
1962
|
+
HeaderPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HeaderPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1963
|
+
HeaderPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: HeaderPageComponent, selector: "wac-header-page", inputs: { title: "title", linkBack: "linkBack", withImg: "withImg" }, ngImport: i0, template: "<div class=\"wac-header-page\">\n <div class=\"wac-header-page__maxWidth\">\n <div class=\"wac-header-page__maxWidth__top\">\n <div class=\"wac-header-page__maxWidth__top__left\">\n <!-- TODO Hard to use when only want a button and not a router link -->\n <a *ngIf=\"linkBack\" [routerLink]=\"linkBack\"><i class=\"fas fa-chevron-left\"></i></a>\n <wac-h1 [withImg]=\"withImg\">{{ title }}<ng-content select=\"[role=header]\"></ng-content></wac-h1>\n </div>\n <div class=\"wac-header-page__maxWidth__top__right\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: H1Component, selector: "wac-h1", inputs: ["withImg"] }] });
|
|
1964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HeaderPageComponent, decorators: [{
|
|
1965
|
+
type: Component,
|
|
1966
|
+
args: [{ selector: 'wac-header-page', template: "<div class=\"wac-header-page\">\n <div class=\"wac-header-page__maxWidth\">\n <div class=\"wac-header-page__maxWidth__top\">\n <div class=\"wac-header-page__maxWidth__top__left\">\n <!-- TODO Hard to use when only want a button and not a router link -->\n <a *ngIf=\"linkBack\" [routerLink]=\"linkBack\"><i class=\"fas fa-chevron-left\"></i></a>\n <wac-h1 [withImg]=\"withImg\">{{ title }}<ng-content select=\"[role=header]\"></ng-content></wac-h1>\n </div>\n <div class=\"wac-header-page__maxWidth__top__right\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
1967
|
+
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
1968
|
+
type: Input
|
|
1969
|
+
}], linkBack: [{
|
|
1970
|
+
type: Input
|
|
1971
|
+
}], withImg: [{
|
|
1972
|
+
type: Input
|
|
1973
|
+
}] } });
|
|
1974
|
+
|
|
1975
|
+
class TooltipComponent {
|
|
1976
|
+
constructor() {
|
|
1977
|
+
this.tooltipText = '';
|
|
1978
|
+
this.tooltipLink = '';
|
|
1979
|
+
this.tooltipUrl = '#';
|
|
1980
|
+
}
|
|
1981
|
+
ngOnInit() {
|
|
1982
|
+
if (this.tooltipIcon === '') {
|
|
1983
|
+
this.tooltipIcon = 'fas fa-info-circle';
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1988
|
+
TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TooltipComponent, selector: "wac-tooltip", inputs: { tooltipIcon: "tooltipIcon", tooltipText: "tooltipText", tooltipLink: "tooltipLink", tooltipUrl: "tooltipUrl" }, ngImport: i0, template: "<span class=\"wac-tooltip\">\n <i [class]=\"tooltipIcon\"></i>\n <span class=\"tooltip-content\"\n >{{ tooltipText }}\n <span *ngIf=\"tooltipUrl\"\n ><a [href]=\"tooltipUrl\" target=\"_blank\">{{ tooltipLink }}</a></span\n >\n </span>\n</span>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
1990
|
+
type: Component,
|
|
1991
|
+
args: [{ selector: 'wac-tooltip', template: "<span class=\"wac-tooltip\">\n <i [class]=\"tooltipIcon\"></i>\n <span class=\"tooltip-content\"\n >{{ tooltipText }}\n <span *ngIf=\"tooltipUrl\"\n ><a [href]=\"tooltipUrl\" target=\"_blank\">{{ tooltipLink }}</a></span\n >\n </span>\n</span>\n" }]
|
|
1992
|
+
}], ctorParameters: function () { return []; }, propDecorators: { tooltipIcon: [{
|
|
1993
|
+
type: Input
|
|
1994
|
+
}], tooltipText: [{
|
|
1995
|
+
type: Input
|
|
1996
|
+
}], tooltipLink: [{
|
|
1997
|
+
type: Input
|
|
1998
|
+
}], tooltipUrl: [{
|
|
1999
|
+
type: Input
|
|
2000
|
+
}] } });
|
|
2001
|
+
|
|
2002
|
+
class InputComponent {
|
|
2003
|
+
constructor() {
|
|
2004
|
+
this.label = '';
|
|
2005
|
+
this.value = '';
|
|
2006
|
+
this.type = 'text';
|
|
2007
|
+
this.placeholder = '';
|
|
2008
|
+
this.textInfo = null;
|
|
2009
|
+
this.textError = null;
|
|
2010
|
+
this.size = null;
|
|
2011
|
+
this.isNumber = null;
|
|
2012
|
+
this.withoutBlock = false;
|
|
2013
|
+
this.icon = '';
|
|
2014
|
+
this.big = false;
|
|
2015
|
+
this.medium = false;
|
|
2016
|
+
this.boldLabel = 'false';
|
|
2017
|
+
this.min = null;
|
|
2018
|
+
this.max = null;
|
|
2019
|
+
this.disableMargin = false;
|
|
2020
|
+
this.textPrepend = null;
|
|
2021
|
+
this.textAppend = null;
|
|
2022
|
+
this.progressBar = false;
|
|
2023
|
+
this.extraClasses = '';
|
|
2024
|
+
this.keyPreventDefault = [];
|
|
2025
|
+
this.showTooltip = false;
|
|
2026
|
+
this.textTooltip = '';
|
|
2027
|
+
this.iconTooltip = '';
|
|
2028
|
+
this.urlTooltip = '';
|
|
2029
|
+
this.linkTooltip = '';
|
|
2030
|
+
this.padding = false;
|
|
2031
|
+
this.disabled = false;
|
|
2032
|
+
this.indication = false;
|
|
2033
|
+
this.success = false;
|
|
2034
|
+
this.indicationLeft = false;
|
|
2035
|
+
this.keypressEnter = new EventEmitter();
|
|
2036
|
+
this.KEYPRESS_ENTER = "Enter";
|
|
2037
|
+
this.id = 'wz-input_' +
|
|
2038
|
+
Math.random()
|
|
2039
|
+
.toString(36)
|
|
2040
|
+
.substr(2, 9);
|
|
2041
|
+
}
|
|
2042
|
+
registerOnChange(fn) {
|
|
2043
|
+
this._onChange = fn;
|
|
2044
|
+
}
|
|
2045
|
+
registerOnTouched(fn) {
|
|
2046
|
+
this._onTouched = fn;
|
|
2047
|
+
}
|
|
2048
|
+
setDisabledState(isDisabled) {
|
|
2049
|
+
this.disabled = isDisabled;
|
|
2050
|
+
}
|
|
2051
|
+
writeValue(obj) {
|
|
2052
|
+
this.value = obj;
|
|
2053
|
+
}
|
|
2054
|
+
onChange(value) {
|
|
2055
|
+
if (this._onChange) {
|
|
2056
|
+
this._onChange(value);
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
onBlur() {
|
|
2060
|
+
if (this._onTouched) {
|
|
2061
|
+
this._onTouched();
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
checkNumberValue(value) {
|
|
2065
|
+
if (this.min && this.min > value) {
|
|
2066
|
+
this.value = this.min;
|
|
2067
|
+
}
|
|
2068
|
+
if (this.max && this.max < value) {
|
|
2069
|
+
this.value = this.max;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
onFocusOut() {
|
|
2073
|
+
if (this.type === 'number') {
|
|
2074
|
+
this.checkNumberValue(this.value);
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
keyPress(event) {
|
|
2078
|
+
if (this.keyPreventDefault.includes(event.key)) {
|
|
2079
|
+
event.preventDefault();
|
|
2080
|
+
}
|
|
2081
|
+
if (event.key === this.KEYPRESS_ENTER) {
|
|
2082
|
+
this.keypressEnter.next(true);
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2087
|
+
InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: InputComponent, selector: "wac-input", inputs: { label: "label", value: "value", type: "type", placeholder: "placeholder", textInfo: "textInfo", textError: "textError", size: "size", isNumber: "isNumber", withoutBlock: "withoutBlock", icon: "icon", big: "big", medium: "medium", boldLabel: "boldLabel", min: "min", max: "max", disableMargin: "disableMargin", textPrepend: "textPrepend", textAppend: "textAppend", progressBar: "progressBar", extraClasses: "extraClasses", keyPreventDefault: "keyPreventDefault", showTooltip: "showTooltip", textTooltip: "textTooltip", iconTooltip: "iconTooltip", urlTooltip: "urlTooltip", linkTooltip: "linkTooltip", padding: "padding", disabled: "disabled", indication: "indication", success: "success", indicationLeft: "indicationLeft" }, outputs: { keypressEnter: "keypressEnter" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: InputComponent, multi: true }], ngImport: i0, template: "<div\n class=\"field wac-input\"\n [ngClass]=\"{ 'has-no-block': withoutBlock, 'is-big': big, 'is-medium': medium, 'with-padding': padding, 'indication-left': indicationLeft, 'with-progress-bar': progressBar }\"\n>\n <div class=\"field-label is-normal has-text-left\" *ngIf=\"!withoutBlock\">\n <label\n [ngClass]=\"[boldLabel == 'true' ? 'label has-text-weight-bold' : 'label has-text-weight-normal', showTooltip ? 'label-inline' : '']\"\n [innerHTML]=\"label\"\n [for]=\"id\"\n ></label>\n <wac-tooltip\n *ngIf=\"showTooltip\"\n [tooltipIcon]=\"iconTooltip\"\n [tooltipText]=\"textTooltip\"\n [tooltipLink]=\"linkTooltip\"\n [tooltipUrl]=\"urlTooltip\"\n ></wac-tooltip>\n <!-- Size -->\n <span *ngIf=\"value && size && !progressBar\" class=\"is-size-7 wac-input__size\">\n <strong>{{ value.toString().length }}</strong> / {{ size }}\n </span>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p\n class=\"control\"\n [ngClass]=\"{ 'has-icons-right': textError || success, 'has-icons-left': icon !== '', 'has-input-group': textAppend || textPrepend }\"\n >\n <!-- Text Prepend -->\n <span *ngIf=\"textPrepend\" class=\"has-input-group\">\n <span class=\"has-input-group-text prepend\">{{ textPrepend }}</span>\n <span *ngIf=\"icon !== ''\" class=\"icon is-small is-left\">\n <i [class]=\"icon\"></i>\n </span>\n </span>\n\n <!-- Input -->\n <input\n [class]=\"'input ' + extraClasses\"\n [id]=\"id\"\n [ngClass]=\"{\n 'is-danger': textError,\n 'is-large': big,\n 'is-number': isNumber,\n 'remove-margin': disableMargin,\n 'text-append': textAppend\n }\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n (focusout)=\"onFocusOut()\"\n [min]=\"min\"\n [max]=\"max\"\n (keypress)=\"keyPress($event)\"\n />\n\n <!-- Indication at the end of the input -->\n <span class=\"indication\" *ngIf=\"indication\" [ngClass]=\"{'reverse': indicationLeft}\">\n <span [innerHTML]=\"indication\"></span>\n </span>\n\n <!-- Text Append -->\n <span *ngIf=\"textAppend && !indicationLeft\" class=\"has-input-group\">\n <span class=\"has-input-group-text append\">{{ textAppend }}</span>\n <!-- error if text append not empty -->\n <span *ngIf=\"textError\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n </span>\n\n <!-- Icon Left -->\n <span *ngIf=\"icon !== '' && !textPrepend && !indicationLeft\" class=\"icon is-small is-left\">\n <i [class]=\"icon\"></i>\n </span>\n\n <!-- Icon error if textAppend empty -->\n <span *ngIf=\"textError && !textAppend && !indicationLeft\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n\n <!-- Icon success -->\n <span *ngIf=\"success\" class=\"icon is-small is-right\">\n <i class=\"fas fa-check has-text-success\"></i>\n </span>\n\n <!-- Text Info -->\n <span\n *ngIf=\"textInfo && (textError === null || textError === '') && !progressBar && !indicationLeft\"\n class=\"is-size-7 wac-input__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n\n <!-- Text Error -->\n <span *ngIf=\"textError && !progressBar && !indicationLeft\" class=\"is-size-7 wac-input__error has-text-danger\" [innerHtml]=\"textError\"></span>\n </p>\n\n <!-- Progress Bar -->\n <wac-progress-bar *ngIf=\"progressBar && !indicationLeft\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TooltipComponent, selector: "wac-tooltip", inputs: ["tooltipIcon", "tooltipText", "tooltipLink", "tooltipUrl"] }, { kind: "component", type: ProgressBarComponent, selector: "wac-progress-bar", inputs: ["valueLength", "min", "max"] }] });
|
|
2088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputComponent, decorators: [{
|
|
2089
|
+
type: Component,
|
|
2090
|
+
args: [{ selector: 'wac-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: InputComponent, multi: true }], template: "<div\n class=\"field wac-input\"\n [ngClass]=\"{ 'has-no-block': withoutBlock, 'is-big': big, 'is-medium': medium, 'with-padding': padding, 'indication-left': indicationLeft, 'with-progress-bar': progressBar }\"\n>\n <div class=\"field-label is-normal has-text-left\" *ngIf=\"!withoutBlock\">\n <label\n [ngClass]=\"[boldLabel == 'true' ? 'label has-text-weight-bold' : 'label has-text-weight-normal', showTooltip ? 'label-inline' : '']\"\n [innerHTML]=\"label\"\n [for]=\"id\"\n ></label>\n <wac-tooltip\n *ngIf=\"showTooltip\"\n [tooltipIcon]=\"iconTooltip\"\n [tooltipText]=\"textTooltip\"\n [tooltipLink]=\"linkTooltip\"\n [tooltipUrl]=\"urlTooltip\"\n ></wac-tooltip>\n <!-- Size -->\n <span *ngIf=\"value && size && !progressBar\" class=\"is-size-7 wac-input__size\">\n <strong>{{ value.toString().length }}</strong> / {{ size }}\n </span>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p\n class=\"control\"\n [ngClass]=\"{ 'has-icons-right': textError || success, 'has-icons-left': icon !== '', 'has-input-group': textAppend || textPrepend }\"\n >\n <!-- Text Prepend -->\n <span *ngIf=\"textPrepend\" class=\"has-input-group\">\n <span class=\"has-input-group-text prepend\">{{ textPrepend }}</span>\n <span *ngIf=\"icon !== ''\" class=\"icon is-small is-left\">\n <i [class]=\"icon\"></i>\n </span>\n </span>\n\n <!-- Input -->\n <input\n [class]=\"'input ' + extraClasses\"\n [id]=\"id\"\n [ngClass]=\"{\n 'is-danger': textError,\n 'is-large': big,\n 'is-number': isNumber,\n 'remove-margin': disableMargin,\n 'text-append': textAppend\n }\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n (focusout)=\"onFocusOut()\"\n [min]=\"min\"\n [max]=\"max\"\n (keypress)=\"keyPress($event)\"\n />\n\n <!-- Indication at the end of the input -->\n <span class=\"indication\" *ngIf=\"indication\" [ngClass]=\"{'reverse': indicationLeft}\">\n <span [innerHTML]=\"indication\"></span>\n </span>\n\n <!-- Text Append -->\n <span *ngIf=\"textAppend && !indicationLeft\" class=\"has-input-group\">\n <span class=\"has-input-group-text append\">{{ textAppend }}</span>\n <!-- error if text append not empty -->\n <span *ngIf=\"textError\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n </span>\n\n <!-- Icon Left -->\n <span *ngIf=\"icon !== '' && !textPrepend && !indicationLeft\" class=\"icon is-small is-left\">\n <i [class]=\"icon\"></i>\n </span>\n\n <!-- Icon error if textAppend empty -->\n <span *ngIf=\"textError && !textAppend && !indicationLeft\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n\n <!-- Icon success -->\n <span *ngIf=\"success\" class=\"icon is-small is-right\">\n <i class=\"fas fa-check has-text-success\"></i>\n </span>\n\n <!-- Text Info -->\n <span\n *ngIf=\"textInfo && (textError === null || textError === '') && !progressBar && !indicationLeft\"\n class=\"is-size-7 wac-input__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n\n <!-- Text Error -->\n <span *ngIf=\"textError && !progressBar && !indicationLeft\" class=\"is-size-7 wac-input__error has-text-danger\" [innerHtml]=\"textError\"></span>\n </p>\n\n <!-- Progress Bar -->\n <wac-progress-bar *ngIf=\"progressBar && !indicationLeft\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n" }]
|
|
2091
|
+
}], propDecorators: { label: [{
|
|
2092
|
+
type: Input
|
|
2093
|
+
}], value: [{
|
|
2094
|
+
type: Input
|
|
2095
|
+
}], type: [{
|
|
2096
|
+
type: Input
|
|
2097
|
+
}], placeholder: [{
|
|
2098
|
+
type: Input
|
|
2099
|
+
}], textInfo: [{
|
|
2100
|
+
type: Input
|
|
2101
|
+
}], textError: [{
|
|
2102
|
+
type: Input
|
|
2103
|
+
}], size: [{
|
|
2104
|
+
type: Input
|
|
2105
|
+
}], isNumber: [{
|
|
2106
|
+
type: Input
|
|
2107
|
+
}], withoutBlock: [{
|
|
2108
|
+
type: Input
|
|
2109
|
+
}], icon: [{
|
|
2110
|
+
type: Input
|
|
2111
|
+
}], big: [{
|
|
2112
|
+
type: Input
|
|
2113
|
+
}], medium: [{
|
|
2114
|
+
type: Input
|
|
2115
|
+
}], boldLabel: [{
|
|
2116
|
+
type: Input
|
|
2117
|
+
}], min: [{
|
|
2118
|
+
type: Input
|
|
2119
|
+
}], max: [{
|
|
2120
|
+
type: Input
|
|
2121
|
+
}], disableMargin: [{
|
|
2122
|
+
type: Input
|
|
2123
|
+
}], textPrepend: [{
|
|
2124
|
+
type: Input
|
|
2125
|
+
}], textAppend: [{
|
|
2126
|
+
type: Input
|
|
2127
|
+
}], progressBar: [{
|
|
2128
|
+
type: Input
|
|
2129
|
+
}], extraClasses: [{
|
|
2130
|
+
type: Input
|
|
2131
|
+
}], keyPreventDefault: [{
|
|
2132
|
+
type: Input
|
|
2133
|
+
}], showTooltip: [{
|
|
2134
|
+
type: Input
|
|
2135
|
+
}], textTooltip: [{
|
|
2136
|
+
type: Input
|
|
2137
|
+
}], iconTooltip: [{
|
|
2138
|
+
type: Input
|
|
2139
|
+
}], urlTooltip: [{
|
|
2140
|
+
type: Input
|
|
2141
|
+
}], linkTooltip: [{
|
|
2142
|
+
type: Input
|
|
2143
|
+
}], padding: [{
|
|
2144
|
+
type: Input
|
|
2145
|
+
}], disabled: [{
|
|
2146
|
+
type: Input
|
|
2147
|
+
}], indication: [{
|
|
2148
|
+
type: Input
|
|
2149
|
+
}], success: [{
|
|
2150
|
+
type: Input
|
|
2151
|
+
}], indicationLeft: [{
|
|
2152
|
+
type: Input
|
|
2153
|
+
}], keypressEnter: [{
|
|
2154
|
+
type: Output
|
|
2155
|
+
}] } });
|
|
2156
|
+
|
|
2157
|
+
class LinkComponent {
|
|
2158
|
+
constructor(renderer2) {
|
|
2159
|
+
this.renderer2 = renderer2;
|
|
2160
|
+
this.target = '_self';
|
|
2161
|
+
}
|
|
2162
|
+
set href(link) {
|
|
2163
|
+
this._link = link;
|
|
2164
|
+
this.setAttributesLink();
|
|
2165
|
+
}
|
|
2166
|
+
get href() {
|
|
2167
|
+
return this._link;
|
|
2168
|
+
}
|
|
2169
|
+
ngOnInit() { }
|
|
2170
|
+
ngAfterViewInit() {
|
|
2171
|
+
this.setAttributesLink();
|
|
2172
|
+
}
|
|
2173
|
+
setAttributesLink() {
|
|
2174
|
+
if (!this.linkComponent) {
|
|
2175
|
+
return;
|
|
2176
|
+
}
|
|
2177
|
+
if (this.href) {
|
|
2178
|
+
this.renderer2.setAttribute(this.linkComponent.nativeElement, "href", this.href);
|
|
2179
|
+
this.renderer2.setAttribute(this.linkComponent.nativeElement, "target", this.target);
|
|
2180
|
+
}
|
|
2181
|
+
else {
|
|
2182
|
+
this.renderer2.removeAttribute(this.linkComponent.nativeElement, "href");
|
|
2183
|
+
this.renderer2.removeAttribute(this.linkComponent.nativeElement, "target");
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
LinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LinkComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2188
|
+
LinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: LinkComponent, selector: "wac-link", inputs: { href: "href", target: "target", id: "id", class: "class" }, viewQueries: [{ propertyName: "linkComponent", first: true, predicate: ["linkComponent"], descendants: true }], ngImport: i0, template: "<a #linkComponent class=\"wac-link\" [ngClass]=\"{ class: class }\" [id]=\"{ id: id }\"><ng-content></ng-content></a>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LinkComponent, decorators: [{
|
|
2190
|
+
type: Component,
|
|
2191
|
+
args: [{ selector: 'wac-link', template: "<a #linkComponent class=\"wac-link\" [ngClass]=\"{ class: class }\" [id]=\"{ id: id }\"><ng-content></ng-content></a>\n" }]
|
|
2192
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { href: [{
|
|
2193
|
+
type: Input
|
|
2194
|
+
}], target: [{
|
|
2195
|
+
type: Input
|
|
2196
|
+
}], id: [{
|
|
2197
|
+
type: Input
|
|
2198
|
+
}], class: [{
|
|
2199
|
+
type: Input
|
|
2200
|
+
}], linkComponent: [{
|
|
2201
|
+
type: ViewChild,
|
|
2202
|
+
args: ['linkComponent']
|
|
2203
|
+
}] } });
|
|
2204
|
+
|
|
2205
|
+
class SwitchComponent {
|
|
2206
|
+
constructor() {
|
|
2207
|
+
// todo add ngmodel and review texts display (textState is mandaoty in order to display textStateEnable and textStateDisable)
|
|
2208
|
+
this.value = false;
|
|
2209
|
+
this.textState = false;
|
|
2210
|
+
this.textStateEnable = '';
|
|
2211
|
+
this.textStateDisable = '';
|
|
2212
|
+
this.showInput = false;
|
|
2213
|
+
this.danger = false;
|
|
2214
|
+
this.whiteSpace = false;
|
|
2215
|
+
this.switchChange = new EventEmitter(); // todo set emitted type
|
|
2216
|
+
this.changeInput = new EventEmitter(); // todo set emitted type
|
|
2217
|
+
}
|
|
2218
|
+
ngOnInit() {
|
|
2219
|
+
this.id = 'switch-' + Math.floor(Math.random() * Math.floor(1000));
|
|
2220
|
+
}
|
|
2221
|
+
changeValue(event) {
|
|
2222
|
+
this.switchChange.emit(event.target.checked);
|
|
2223
|
+
}
|
|
2224
|
+
triggerInput() {
|
|
2225
|
+
this.changeInput.emit(this.valueInput);
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
SwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2229
|
+
SwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SwitchComponent, selector: "wac-switch", inputs: { value: "value", textState: "textState", textStateEnable: "textStateEnable", textStateDisable: "textStateDisable", showInput: "showInput", placholderInput: "placholderInput", danger: "danger", whiteSpace: "whiteSpace" }, outputs: { switchChange: "switchChange", changeInput: "changeInput" }, ngImport: i0, template: "<div class=\"wac-switch\">\n <input type=\"checkbox\" [checked]=\"value\" (change)=\"changeValue($event)\" [id]=\"id\" [ngClass]=\"{ danger: danger }\"/>\n <label [for]=\"id\" class=\"wac-switch__label\">\n <span class=\"wac-switch__label__text\"\n ><ng-content></ng-content\n ><span\n *ngIf=\"textState\"\n [ngStyle]=\"{'whiteSpace': whiteSpace ? 'nowrap' :'normal'}\"\n >{{ textState }} <strong class=\"disable\" *ngIf=\"textStateDisable\">{{ textStateDisable }}</strong>\n <strong class=\"enable\" *ngIf=\"textStateEnable\">{{ textStateEnable }}</strong></span\n ></span\n >\n </label>\n</div>\n<div class=\"wac-show-input\" *ngIf=\"showInput && value\">\n <input [placeholder]=\"placholderInput\" type=\"text\" [(ngModel)]=\"valueInput\" (blur)=\"triggerInput()\" />\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
2230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
2231
|
+
type: Component,
|
|
2232
|
+
args: [{ selector: 'wac-switch', template: "<div class=\"wac-switch\">\n <input type=\"checkbox\" [checked]=\"value\" (change)=\"changeValue($event)\" [id]=\"id\" [ngClass]=\"{ danger: danger }\"/>\n <label [for]=\"id\" class=\"wac-switch__label\">\n <span class=\"wac-switch__label__text\"\n ><ng-content></ng-content\n ><span\n *ngIf=\"textState\"\n [ngStyle]=\"{'whiteSpace': whiteSpace ? 'nowrap' :'normal'}\"\n >{{ textState }} <strong class=\"disable\" *ngIf=\"textStateDisable\">{{ textStateDisable }}</strong>\n <strong class=\"enable\" *ngIf=\"textStateEnable\">{{ textStateEnable }}</strong></span\n ></span\n >\n </label>\n</div>\n<div class=\"wac-show-input\" *ngIf=\"showInput && value\">\n <input [placeholder]=\"placholderInput\" type=\"text\" [(ngModel)]=\"valueInput\" (blur)=\"triggerInput()\" />\n</div>\n" }]
|
|
2233
|
+
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
2234
|
+
type: Input
|
|
2235
|
+
}], textState: [{
|
|
2236
|
+
type: Input
|
|
2237
|
+
}], textStateEnable: [{
|
|
2238
|
+
type: Input
|
|
2239
|
+
}], textStateDisable: [{
|
|
2240
|
+
type: Input
|
|
2241
|
+
}], showInput: [{
|
|
2242
|
+
type: Input
|
|
2243
|
+
}], placholderInput: [{
|
|
2244
|
+
type: Input
|
|
2245
|
+
}], danger: [{
|
|
2246
|
+
type: Input
|
|
2247
|
+
}], whiteSpace: [{
|
|
2248
|
+
type: Input
|
|
2249
|
+
}], switchChange: [{
|
|
2250
|
+
type: Output
|
|
2251
|
+
}], changeInput: [{
|
|
2252
|
+
type: Output
|
|
2253
|
+
}] } });
|
|
2254
|
+
|
|
2255
|
+
class AlertComponent {
|
|
2256
|
+
constructor() {
|
|
2257
|
+
this.icon = true;
|
|
2258
|
+
this.warning = false;
|
|
2259
|
+
this.success = false;
|
|
2260
|
+
this.alert = false;
|
|
2261
|
+
this.iconClass = 'fas fa-info';
|
|
2262
|
+
}
|
|
2263
|
+
ngOnInit() { }
|
|
2264
|
+
}
|
|
2265
|
+
AlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2266
|
+
AlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: AlertComponent, selector: "wac-alert", inputs: { icon: "icon", warning: "warning", success: "success", alert: "alert", iconClass: "iconClass" }, ngImport: i0, template: "<div class=\"wac-alert\" [ngClass]=\"{ success: success, warning: warning, alert: alert }\">\n <i *ngIf=\"icon\" [ngClass]=\"iconClass\"></i>\n <p><ng-content></ng-content></p> <!-- ! Refacto : Remove p tag, attention \u00E0 wizi-admin -->\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertComponent, decorators: [{
|
|
2268
|
+
type: Component,
|
|
2269
|
+
args: [{ selector: 'wac-alert', template: "<div class=\"wac-alert\" [ngClass]=\"{ success: success, warning: warning, alert: alert }\">\n <i *ngIf=\"icon\" [ngClass]=\"iconClass\"></i>\n <p><ng-content></ng-content></p> <!-- ! Refacto : Remove p tag, attention \u00E0 wizi-admin -->\n</div>\n" }]
|
|
2270
|
+
}], ctorParameters: function () { return []; }, propDecorators: { icon: [{
|
|
2271
|
+
type: Input
|
|
2272
|
+
}], warning: [{
|
|
2273
|
+
type: Input
|
|
2274
|
+
}], success: [{
|
|
2275
|
+
type: Input
|
|
2276
|
+
}], alert: [{
|
|
2277
|
+
type: Input
|
|
2278
|
+
}], iconClass: [{
|
|
2279
|
+
type: Input
|
|
2280
|
+
}] } });
|
|
2281
|
+
|
|
2282
|
+
class TextComponent {
|
|
2283
|
+
constructor() { }
|
|
2284
|
+
ngOnInit() { }
|
|
2285
|
+
}
|
|
2286
|
+
TextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2287
|
+
TextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TextComponent, selector: "wac-text", inputs: { textClass: "textClass" }, ngImport: i0, template: "<div class=\"wac-text\" [class]=\"textClass\">\n <p><ng-content></ng-content></p>\n</div>\n" });
|
|
2288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TextComponent, decorators: [{
|
|
2289
|
+
type: Component,
|
|
2290
|
+
args: [{ selector: 'wac-text', template: "<div class=\"wac-text\" [class]=\"textClass\">\n <p><ng-content></ng-content></p>\n</div>\n" }]
|
|
2291
|
+
}], ctorParameters: function () { return []; }, propDecorators: { textClass: [{
|
|
2292
|
+
type: Input
|
|
2293
|
+
}] } });
|
|
2294
|
+
|
|
2295
|
+
const pipes$1 = [PagniationArrayTotalPages, PagniationIsLastPage, PagniationText];
|
|
2296
|
+
class PaginationModule {
|
|
2297
|
+
}
|
|
2298
|
+
PaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2299
|
+
PaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: PaginationModule, declarations: [PaginationComponent, PagniationArrayTotalPages, PagniationIsLastPage, PagniationText], imports: [CommonModule,
|
|
2300
|
+
FormsModule,
|
|
2301
|
+
TranslateModule], exports: [PaginationComponent] });
|
|
2302
|
+
PaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PaginationModule, imports: [CommonModule,
|
|
2303
|
+
FormsModule,
|
|
2304
|
+
TranslateModule] });
|
|
2305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PaginationModule, decorators: [{
|
|
2306
|
+
type: NgModule,
|
|
2307
|
+
args: [{
|
|
2308
|
+
imports: [
|
|
2309
|
+
CommonModule,
|
|
2310
|
+
FormsModule,
|
|
2311
|
+
TranslateModule
|
|
2312
|
+
],
|
|
2313
|
+
exports: [PaginationComponent],
|
|
2314
|
+
declarations: [PaginationComponent, ...pipes$1],
|
|
2315
|
+
providers: [],
|
|
2316
|
+
}]
|
|
2317
|
+
}] });
|
|
2318
|
+
|
|
2319
|
+
class CheckboxModule {
|
|
2320
|
+
}
|
|
2321
|
+
CheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2322
|
+
CheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: CheckboxModule, declarations: [CheckboxComponent], imports: [CommonModule,
|
|
2323
|
+
FormsModule], exports: [CheckboxComponent] });
|
|
2324
|
+
CheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckboxModule, imports: [CommonModule,
|
|
2325
|
+
FormsModule] });
|
|
2326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckboxModule, decorators: [{
|
|
2327
|
+
type: NgModule,
|
|
2328
|
+
args: [{
|
|
2329
|
+
imports: [
|
|
2330
|
+
CommonModule,
|
|
2331
|
+
FormsModule,
|
|
2332
|
+
],
|
|
2333
|
+
exports: [CheckboxComponent],
|
|
2334
|
+
declarations: [CheckboxComponent],
|
|
2335
|
+
providers: [],
|
|
2336
|
+
}]
|
|
2337
|
+
}] });
|
|
2338
|
+
|
|
2339
|
+
class ProgressBarModule {
|
|
2340
|
+
}
|
|
2341
|
+
ProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2342
|
+
ProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: ProgressBarModule, declarations: [ProgressBarComponent], imports: [CommonModule,
|
|
2343
|
+
FormsModule], exports: [ProgressBarComponent] });
|
|
2344
|
+
ProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ProgressBarModule, imports: [CommonModule,
|
|
2345
|
+
FormsModule] });
|
|
2346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ProgressBarModule, decorators: [{
|
|
2347
|
+
type: NgModule,
|
|
2348
|
+
args: [{
|
|
2349
|
+
imports: [
|
|
2350
|
+
CommonModule,
|
|
2351
|
+
FormsModule,
|
|
2352
|
+
],
|
|
2353
|
+
exports: [ProgressBarComponent],
|
|
2354
|
+
declarations: [ProgressBarComponent],
|
|
2355
|
+
providers: [],
|
|
2356
|
+
}]
|
|
2357
|
+
}] });
|
|
2358
|
+
|
|
2359
|
+
class TooltipModule {
|
|
2360
|
+
}
|
|
2361
|
+
TooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2362
|
+
TooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: TooltipModule, declarations: [TooltipComponent], imports: [CommonModule,
|
|
2363
|
+
FormsModule], exports: [TooltipComponent] });
|
|
2364
|
+
TooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TooltipModule, imports: [CommonModule,
|
|
2365
|
+
FormsModule] });
|
|
2366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TooltipModule, decorators: [{
|
|
2367
|
+
type: NgModule,
|
|
2368
|
+
args: [{
|
|
2369
|
+
imports: [
|
|
2370
|
+
CommonModule,
|
|
2371
|
+
FormsModule
|
|
2372
|
+
],
|
|
2373
|
+
exports: [TooltipComponent],
|
|
2374
|
+
declarations: [TooltipComponent],
|
|
2375
|
+
providers: [],
|
|
2376
|
+
}]
|
|
2377
|
+
}] });
|
|
2378
|
+
|
|
2379
|
+
class InputModule {
|
|
2380
|
+
}
|
|
2381
|
+
InputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2382
|
+
InputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: InputModule, declarations: [InputComponent], imports: [CommonModule,
|
|
2383
|
+
FormsModule,
|
|
2384
|
+
SharedDirectives,
|
|
2385
|
+
TooltipModule,
|
|
2386
|
+
ProgressBarModule], exports: [InputComponent] });
|
|
2387
|
+
InputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputModule, imports: [CommonModule,
|
|
2388
|
+
FormsModule,
|
|
2389
|
+
SharedDirectives,
|
|
2390
|
+
TooltipModule,
|
|
2391
|
+
ProgressBarModule] });
|
|
2392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputModule, decorators: [{
|
|
2393
|
+
type: NgModule,
|
|
2394
|
+
args: [{
|
|
2395
|
+
imports: [
|
|
2396
|
+
CommonModule,
|
|
2397
|
+
FormsModule,
|
|
2398
|
+
SharedDirectives,
|
|
2399
|
+
TooltipModule,
|
|
2400
|
+
ProgressBarModule
|
|
2401
|
+
],
|
|
2402
|
+
exports: [InputComponent],
|
|
2403
|
+
declarations: [InputComponent],
|
|
2404
|
+
providers: [],
|
|
2405
|
+
}]
|
|
2406
|
+
}] });
|
|
2407
|
+
|
|
2408
|
+
class InputSearchModule {
|
|
2409
|
+
}
|
|
2410
|
+
InputSearchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputSearchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2411
|
+
InputSearchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: InputSearchModule, declarations: [InputSearchComponent], imports: [CommonModule,
|
|
2412
|
+
FormsModule,
|
|
2413
|
+
InputModule,
|
|
2414
|
+
SharedDirectives], exports: [InputSearchComponent] });
|
|
2415
|
+
InputSearchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputSearchModule, imports: [CommonModule,
|
|
2416
|
+
FormsModule,
|
|
2417
|
+
InputModule,
|
|
2418
|
+
SharedDirectives] });
|
|
2419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputSearchModule, decorators: [{
|
|
2420
|
+
type: NgModule,
|
|
2421
|
+
args: [{
|
|
2422
|
+
imports: [
|
|
2423
|
+
CommonModule,
|
|
2424
|
+
FormsModule,
|
|
2425
|
+
InputModule,
|
|
2426
|
+
SharedDirectives
|
|
2427
|
+
],
|
|
2428
|
+
exports: [InputSearchComponent],
|
|
2429
|
+
declarations: [InputSearchComponent],
|
|
2430
|
+
providers: [],
|
|
2431
|
+
}]
|
|
2432
|
+
}] });
|
|
2433
|
+
|
|
2434
|
+
class LoaderModule {
|
|
2435
|
+
}
|
|
2436
|
+
LoaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2437
|
+
LoaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: LoaderModule, declarations: [LoaderComponent], imports: [CommonModule,
|
|
2438
|
+
FormsModule], exports: [LoaderComponent] });
|
|
2439
|
+
LoaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LoaderModule, imports: [CommonModule,
|
|
2440
|
+
FormsModule] });
|
|
2441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LoaderModule, decorators: [{
|
|
2442
|
+
type: NgModule,
|
|
2443
|
+
args: [{
|
|
2444
|
+
imports: [
|
|
2445
|
+
CommonModule,
|
|
2446
|
+
FormsModule,
|
|
2447
|
+
],
|
|
2448
|
+
exports: [LoaderComponent],
|
|
2449
|
+
declarations: [LoaderComponent],
|
|
2450
|
+
providers: [],
|
|
2451
|
+
}]
|
|
2452
|
+
}] });
|
|
2453
|
+
|
|
2454
|
+
class TableColumn {
|
|
2455
|
+
constructor(currentCell, renderer, document) {
|
|
2456
|
+
this.currentCell = currentCell;
|
|
2457
|
+
this.renderer = renderer;
|
|
2458
|
+
this.document = document;
|
|
2459
|
+
this.centerCellValue = ['left', 'center', 'right'];
|
|
2460
|
+
}
|
|
2461
|
+
ngAfterViewInit() {
|
|
2462
|
+
this.applyCustomStylesOnCell();
|
|
2463
|
+
}
|
|
2464
|
+
applyCustomStylesOnCell() {
|
|
2465
|
+
this.currentCell.nativeElement.style.flexGrow = typeof this.columnSize !== 'undefined' ? this.columnSize : '1';
|
|
2466
|
+
this.renderer.addClass(this.currentCell.nativeElement, 'wac-table__body__line__cell');
|
|
2467
|
+
if (this.centerCell) {
|
|
2468
|
+
if (this.centerCellValue.indexOf(this.centerCell) === -1) {
|
|
2469
|
+
throw 'Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.';
|
|
2470
|
+
}
|
|
2471
|
+
let className = 'wac-table__body__line__cell--center' + '--' + this.centerCell;
|
|
2472
|
+
this.renderer.addClass(this.currentCell.nativeElement, className);
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
TableColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableColumn, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2477
|
+
TableColumn.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: TableColumn, selector: "[tableColumn]", inputs: { columnSize: "columnSize", centerCell: "centerCell" }, ngImport: i0 });
|
|
2478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableColumn, decorators: [{
|
|
2479
|
+
type: Directive,
|
|
2480
|
+
args: [{
|
|
2481
|
+
selector: '[tableColumn]'
|
|
2482
|
+
}]
|
|
2483
|
+
}], ctorParameters: function () {
|
|
2484
|
+
return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
2485
|
+
type: Inject,
|
|
2486
|
+
args: [DOCUMENT]
|
|
2487
|
+
}] }];
|
|
2488
|
+
}, propDecorators: { columnSize: [{
|
|
2489
|
+
type: Input,
|
|
2490
|
+
args: ['columnSize']
|
|
2491
|
+
}], centerCell: [{
|
|
2492
|
+
type: Input,
|
|
2493
|
+
args: ['centerCell']
|
|
2494
|
+
}] } });
|
|
2495
|
+
|
|
2496
|
+
class TableColumnHeader {
|
|
2497
|
+
constructor(currentCell, renderer, document, filtersTableService) {
|
|
2498
|
+
this.currentCell = currentCell;
|
|
2499
|
+
this.renderer = renderer;
|
|
2500
|
+
this.document = document;
|
|
2501
|
+
this.filtersTableService = filtersTableService;
|
|
2502
|
+
this._headerName = '';
|
|
2503
|
+
this.filterRouting = false; // Optional. Set to true to use Filter Routing.
|
|
2504
|
+
this.onSortChange = new EventEmitter(); // Emit the sort value (true, false, undefuned) of the current sort icon when clicking
|
|
2505
|
+
this.tableFiltersChange = new EventEmitter();
|
|
2506
|
+
this.centerCellValue = ['left', 'center', 'right'];
|
|
2507
|
+
this.subscriptions = [];
|
|
2508
|
+
}
|
|
2509
|
+
set headerName(value) {
|
|
2510
|
+
this._headerName = value;
|
|
2511
|
+
this.setHeaderName();
|
|
2512
|
+
}
|
|
2513
|
+
get headerName() {
|
|
2514
|
+
return this._headerName;
|
|
2515
|
+
}
|
|
2516
|
+
ngOnInit() {
|
|
2517
|
+
if (this.tableName && this.sortName) {
|
|
2518
|
+
if (this.filterRouting) {
|
|
2519
|
+
this.handleSortRouting();
|
|
2520
|
+
}
|
|
2521
|
+
else {
|
|
2522
|
+
this.handleSortBasic();
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
ngAfterViewInit() {
|
|
2527
|
+
this.applyCustomStylesOnCell();
|
|
2528
|
+
this.renderHeaderColumn();
|
|
2529
|
+
}
|
|
2530
|
+
handleSortRouting() {
|
|
2531
|
+
this.filterGroup = this.filtersTableService.getTableFilterGroup(this.tableName);
|
|
2532
|
+
const filterGroupChangeSub = this.filterGroup.valuesChange$.subscribe((filters) => {
|
|
2533
|
+
if (!filters || !filters.length) {
|
|
2534
|
+
return;
|
|
2535
|
+
}
|
|
2536
|
+
const filterSort = filters.filter(filter => filter.key === 'sort')[0];
|
|
2537
|
+
if (this.sortName !== filterSort.value) {
|
|
2538
|
+
this.resetSortIcon();
|
|
2539
|
+
}
|
|
2540
|
+
});
|
|
2541
|
+
this.subscriptions.push(filterGroupChangeSub);
|
|
2542
|
+
}
|
|
2543
|
+
handleSortBasic() {
|
|
2544
|
+
const sortChangeSub = this.filtersTableService.getSortChangeListner().subscribe(sort => {
|
|
2545
|
+
if (this.tableName === sort.dataTableName && this.sortName !== sort.sortName) {
|
|
2546
|
+
// Reset the current sort icon
|
|
2547
|
+
this.resetSortIcon();
|
|
2548
|
+
}
|
|
2549
|
+
});
|
|
2550
|
+
this.subscriptions.push(sortChangeSub);
|
|
2551
|
+
}
|
|
2552
|
+
resetSortIcon() {
|
|
2553
|
+
// Replace current icon with default icon
|
|
2554
|
+
this.contentHeader.className = this.contentHeader.className.replace(this.getCurrentSortIcon(), 'idle');
|
|
2555
|
+
}
|
|
2556
|
+
applyCustomStylesOnCell() {
|
|
2557
|
+
this.currentCell.nativeElement.style.flexGrow = typeof this.columnSize !== 'undefined' ? this.columnSize : '1';
|
|
2558
|
+
this.renderer.addClass(this.currentCell.nativeElement, 'wac-table__head__cell');
|
|
2559
|
+
if (this.centerCell) {
|
|
2560
|
+
if (this.centerCellValue.indexOf(this.centerCell) === -1) {
|
|
2561
|
+
throw 'Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.';
|
|
2562
|
+
}
|
|
2563
|
+
let className = 'wac-table__head__cell--center' + '--' + this.centerCell;
|
|
2564
|
+
this.renderer.addClass(this.currentCell.nativeElement, className);
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
renderHeaderColumn() {
|
|
2568
|
+
this.createHeaderContent();
|
|
2569
|
+
this.renderer.appendChild(this.currentCell.nativeElement, this.contentHeader);
|
|
2570
|
+
}
|
|
2571
|
+
createHeaderContent() {
|
|
2572
|
+
this.contentHeader = document.createElement('a');
|
|
2573
|
+
this.contentHeader.className = 'wac-table__head__cell__search';
|
|
2574
|
+
this.setHeaderName();
|
|
2575
|
+
if (this.tableName && this.sortName) {
|
|
2576
|
+
this.handleSort();
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
setHeaderName() {
|
|
2580
|
+
if (!this.contentHeader) {
|
|
2581
|
+
return;
|
|
2582
|
+
}
|
|
2583
|
+
this.contentHeader.innerHTML = this.headerName;
|
|
2584
|
+
}
|
|
2585
|
+
handleSort() {
|
|
2586
|
+
// Set icon in the header column cell
|
|
2587
|
+
this.contentHeader.className += ' wac-table__head__cell__search--' + this.getInitialSortIcon();
|
|
2588
|
+
// On click on the content header, change the icon and emit event
|
|
2589
|
+
this.renderer.listen(this.contentHeader, 'click', () => {
|
|
2590
|
+
const currentIcon = this.getCurrentSortIcon();
|
|
2591
|
+
let newIcon;
|
|
2592
|
+
let newSort, newOrder;
|
|
2593
|
+
switch (currentIcon) {
|
|
2594
|
+
case 'idle':
|
|
2595
|
+
newIcon = 'up';
|
|
2596
|
+
newSort = this.sortName;
|
|
2597
|
+
newOrder = true;
|
|
2598
|
+
break;
|
|
2599
|
+
case 'up':
|
|
2600
|
+
newIcon = 'down';
|
|
2601
|
+
newSort = this.sortName;
|
|
2602
|
+
newOrder = false;
|
|
2603
|
+
break;
|
|
2604
|
+
case 'down':
|
|
2605
|
+
newIcon = 'idle';
|
|
2606
|
+
break;
|
|
2607
|
+
default:
|
|
2608
|
+
newIcon = 'idle';
|
|
2609
|
+
break;
|
|
2610
|
+
}
|
|
2611
|
+
// Replace the icon
|
|
2612
|
+
this.contentHeader.className = this.contentHeader.className.replace(currentIcon, newIcon);
|
|
2613
|
+
this.emitEvents(newSort, newOrder);
|
|
2614
|
+
});
|
|
2615
|
+
}
|
|
2616
|
+
getInitialSortIcon() {
|
|
2617
|
+
if (!this.filterRouting) {
|
|
2618
|
+
return 'idle';
|
|
2619
|
+
}
|
|
2620
|
+
// Get Initial Sort Icon for Routing Filter
|
|
2621
|
+
let initialSortIcon = 'idle';
|
|
2622
|
+
if (this.filterGroup.get('sort') === this.sortName) {
|
|
2623
|
+
initialSortIcon = this.filterGroup.get('order') == 'true' ? 'up' : 'down';
|
|
2624
|
+
}
|
|
2625
|
+
return initialSortIcon;
|
|
2626
|
+
}
|
|
2627
|
+
getCurrentSortIcon() {
|
|
2628
|
+
const regexp = /wac-table__head__cell__search--(?<icon>\w+)/;
|
|
2629
|
+
const { groups } = regexp.exec(this.contentHeader.className);
|
|
2630
|
+
return groups.icon;
|
|
2631
|
+
}
|
|
2632
|
+
emitEvents(newSort, newOrder) {
|
|
2633
|
+
if (this.filterRouting) {
|
|
2634
|
+
// Will send the filter routing value has changes event
|
|
2635
|
+
this.filterGroup.setValues({
|
|
2636
|
+
sort: newSort,
|
|
2637
|
+
order: newOrder,
|
|
2638
|
+
currentPage: 1
|
|
2639
|
+
});
|
|
2640
|
+
}
|
|
2641
|
+
else {
|
|
2642
|
+
// Send the event sort change
|
|
2643
|
+
this.filtersTableService.emitSortChange(this.tableName, this.sortName, newOrder);
|
|
2644
|
+
}
|
|
2645
|
+
if (this.tableFilters) {
|
|
2646
|
+
this.tableFilters.sort = this.sortName;
|
|
2647
|
+
this.tableFilters.order = newOrder;
|
|
2648
|
+
this.tableFilters.currentPage = 1;
|
|
2649
|
+
this.tableFiltersChange.emit(this.tableFilters);
|
|
2650
|
+
}
|
|
2651
|
+
this.onSortChange.emit(newOrder);
|
|
2652
|
+
}
|
|
2653
|
+
ngOnDestroy() {
|
|
2654
|
+
this.subscriptions.forEach(subscription => {
|
|
2655
|
+
subscription.unsubscribe();
|
|
2656
|
+
});
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
TableColumnHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableColumnHeader, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: FiltersTableService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2660
|
+
TableColumnHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: TableColumnHeader, selector: "[headerCell]", inputs: { headerName: "headerName", columnSize: "columnSize", filterRouting: "filterRouting", tableName: "tableName", sortName: "sortName", centerCell: "centerCell", tableFilters: "tableFilters" }, outputs: { onSortChange: "onSortChange", tableFiltersChange: "tableFiltersChange" }, ngImport: i0 });
|
|
2661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableColumnHeader, decorators: [{
|
|
2662
|
+
type: Directive,
|
|
2663
|
+
args: [{
|
|
2664
|
+
// The selector has the same name as the headerCell selector in table.component.html
|
|
2665
|
+
selector: '[headerCell]'
|
|
2666
|
+
}]
|
|
2667
|
+
}], ctorParameters: function () {
|
|
2668
|
+
return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
2669
|
+
type: Inject,
|
|
2670
|
+
args: [DOCUMENT]
|
|
2671
|
+
}] }, { type: FiltersTableService }];
|
|
2672
|
+
}, propDecorators: { headerName: [{
|
|
2673
|
+
type: Input,
|
|
2674
|
+
args: ['headerName']
|
|
2675
|
+
}], columnSize: [{
|
|
2676
|
+
type: Input,
|
|
2677
|
+
args: ['columnSize']
|
|
2678
|
+
}], filterRouting: [{
|
|
2679
|
+
type: Input,
|
|
2680
|
+
args: ['filterRouting']
|
|
2681
|
+
}], tableName: [{
|
|
2682
|
+
type: Input,
|
|
2683
|
+
args: ['tableName']
|
|
2684
|
+
}], sortName: [{
|
|
2685
|
+
type: Input,
|
|
2686
|
+
args: ['sortName']
|
|
2687
|
+
}], centerCell: [{
|
|
2688
|
+
type: Input,
|
|
2689
|
+
args: ['centerCell']
|
|
2690
|
+
}], onSortChange: [{
|
|
2691
|
+
type: Output
|
|
2692
|
+
}], tableFilters: [{
|
|
2693
|
+
type: Input
|
|
2694
|
+
}], tableFiltersChange: [{
|
|
2695
|
+
type: Output
|
|
2696
|
+
}] } });
|
|
2697
|
+
|
|
2698
|
+
const directives = [TableColumn, CheckBoxRow, TableColumnHeader, TableRow,];
|
|
2699
|
+
class TableModule {
|
|
2700
|
+
}
|
|
2701
|
+
TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2702
|
+
TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: TableModule, declarations: [TableComponent, TableColumn, CheckBoxRow, TableColumnHeader, TableRow], imports: [CommonModule,
|
|
2703
|
+
FormsModule,
|
|
2704
|
+
InputSearchModule,
|
|
2705
|
+
LoaderModule,
|
|
2706
|
+
CheckboxModule,
|
|
2707
|
+
PaginationModule], exports: [TableComponent, TableColumn, CheckBoxRow, TableColumnHeader, TableRow] });
|
|
2708
|
+
TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableModule, imports: [CommonModule,
|
|
2709
|
+
FormsModule,
|
|
2710
|
+
InputSearchModule,
|
|
2711
|
+
LoaderModule,
|
|
2712
|
+
CheckboxModule,
|
|
2713
|
+
PaginationModule] });
|
|
2714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TableModule, decorators: [{
|
|
2715
|
+
type: NgModule,
|
|
2716
|
+
args: [{
|
|
2717
|
+
imports: [
|
|
2718
|
+
CommonModule,
|
|
2719
|
+
FormsModule,
|
|
2720
|
+
InputSearchModule,
|
|
2721
|
+
LoaderModule,
|
|
2722
|
+
CheckboxModule,
|
|
2723
|
+
PaginationModule
|
|
2724
|
+
],
|
|
2725
|
+
exports: [TableComponent, ...directives],
|
|
2726
|
+
declarations: [TableComponent, ...directives],
|
|
2727
|
+
providers: [],
|
|
2728
|
+
}]
|
|
2729
|
+
}] });
|
|
2730
|
+
|
|
2731
|
+
class UploadComponent {
|
|
2732
|
+
constructor() {
|
|
2733
|
+
this.label = 'Choisir les images à importer';
|
|
2734
|
+
this.type = 'button';
|
|
2735
|
+
this.icon = 'far fa-images';
|
|
2736
|
+
this.image = 'assets/angular-components/images/upload/icon_picture.svg';
|
|
2737
|
+
this.labelImage = 'Glisser-déposer votre image ici';
|
|
2738
|
+
this.open = new EventEmitter();
|
|
2739
|
+
}
|
|
2740
|
+
ngOnInit() { }
|
|
2741
|
+
triggerEvent(event) {
|
|
2742
|
+
this.open.emit(event);
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: UploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2746
|
+
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: UploadComponent, selector: "wac-upload", inputs: { label: "label", type: "type", icon: "icon", image: "image", labelImage: "labelImage" }, outputs: { open: "open" }, ngImport: i0, template: "<div class=\"wac-upload\" [ngClass]=\"{ portrait: type === 'portrait', landscape: type === 'landscape' }\">\n <div class=\"wac-upload__wrapper\">\n <div *ngIf=\"(type === 'portrait' || type === 'landscape') && image\" class=\"wac-upload__wrapper__visual\">\n <img [src]=\"image\" />\n <strong [innerHTML]=\"labelImage\"></strong>\n </div>\n <span *ngIf=\"(type === 'portrait' || type === 'landscape') && image\">ou</span>\n <button (click)=\"triggerEvent($event)\">\n <span *ngIf=\"icon\"><i [classList]=\"icon\"></i></span>\n <span [innerHTML]=\"label\"></span>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: UploadComponent, decorators: [{
|
|
2748
|
+
type: Component,
|
|
2749
|
+
args: [{ selector: 'wac-upload', template: "<div class=\"wac-upload\" [ngClass]=\"{ portrait: type === 'portrait', landscape: type === 'landscape' }\">\n <div class=\"wac-upload__wrapper\">\n <div *ngIf=\"(type === 'portrait' || type === 'landscape') && image\" class=\"wac-upload__wrapper__visual\">\n <img [src]=\"image\" />\n <strong [innerHTML]=\"labelImage\"></strong>\n </div>\n <span *ngIf=\"(type === 'portrait' || type === 'landscape') && image\">ou</span>\n <button (click)=\"triggerEvent($event)\">\n <span *ngIf=\"icon\"><i [classList]=\"icon\"></i></span>\n <span [innerHTML]=\"label\"></span>\n </button>\n </div>\n</div>\n" }]
|
|
2750
|
+
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
2751
|
+
type: Input
|
|
2752
|
+
}], type: [{
|
|
2753
|
+
type: Input
|
|
2754
|
+
}], icon: [{
|
|
2755
|
+
type: Input
|
|
2756
|
+
}], image: [{
|
|
2757
|
+
type: Input
|
|
2758
|
+
}], labelImage: [{
|
|
2759
|
+
type: Input
|
|
2760
|
+
}], open: [{
|
|
2761
|
+
type: Output
|
|
2762
|
+
}] } });
|
|
2763
|
+
|
|
2764
|
+
class H4Component {
|
|
2765
|
+
constructor() {
|
|
2766
|
+
this.grey = false;
|
|
2767
|
+
}
|
|
2768
|
+
ngOnInit() { }
|
|
2769
|
+
}
|
|
2770
|
+
H4Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: H4Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2771
|
+
H4Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: H4Component, selector: "wac-h4", inputs: { grey: "grey" }, ngImport: i0, template: "<h4 class=\"wac-h4\" [ngClass]=\"{ grey: grey }\"><ng-content></ng-content></h4>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: H4Component, decorators: [{
|
|
2773
|
+
type: Component,
|
|
2774
|
+
args: [{ selector: 'wac-h4', template: "<h4 class=\"wac-h4\" [ngClass]=\"{ grey: grey }\"><ng-content></ng-content></h4>\n" }]
|
|
2775
|
+
}], ctorParameters: function () { return []; }, propDecorators: { grey: [{
|
|
2776
|
+
type: Input
|
|
2777
|
+
}] } });
|
|
2778
|
+
|
|
2779
|
+
class SelectInTextComponent {
|
|
2780
|
+
constructor() {
|
|
2781
|
+
this.type = 'default';
|
|
2782
|
+
this.alwaysOpen = false;
|
|
2783
|
+
this.openCategories = false;
|
|
2784
|
+
this.currentLabel = '';
|
|
2785
|
+
this.currentLabelIcon = '';
|
|
2786
|
+
this.maxWidth = '100%';
|
|
2787
|
+
this.selectValue = new EventEmitter();
|
|
2788
|
+
this.clickOnCallToAction = new EventEmitter();
|
|
2789
|
+
}
|
|
2790
|
+
set items(items) {
|
|
2791
|
+
this._items = items;
|
|
2792
|
+
this.setInitialValues();
|
|
2793
|
+
}
|
|
2794
|
+
get items() {
|
|
2795
|
+
return this._items;
|
|
2796
|
+
}
|
|
2797
|
+
ngOnInit() {
|
|
2798
|
+
this.currentLabel = this.placeholder;
|
|
2799
|
+
this.setInitialValues();
|
|
2800
|
+
}
|
|
2801
|
+
setInitialValues() {
|
|
2802
|
+
if (!this.items.length) {
|
|
2803
|
+
return;
|
|
2804
|
+
}
|
|
2805
|
+
const itemSelected = this.getItemSelected();
|
|
2806
|
+
this.setCurrentItem(itemSelected);
|
|
2807
|
+
}
|
|
2808
|
+
onClose() {
|
|
2809
|
+
this.openCategories = false;
|
|
2810
|
+
}
|
|
2811
|
+
customTB(item, index) {
|
|
2812
|
+
return `${item.id}-${index}`;
|
|
2813
|
+
}
|
|
2814
|
+
onSelectItem(index) {
|
|
2815
|
+
this.unselectAll();
|
|
2816
|
+
const itemSelected = this.items[index];
|
|
2817
|
+
this.setCurrentItem(itemSelected);
|
|
2818
|
+
this.selectValue.emit(index);
|
|
2819
|
+
}
|
|
2820
|
+
onClickCallToAction() {
|
|
2821
|
+
this.clickOnCallToAction.emit(this.callToAction.value);
|
|
2822
|
+
}
|
|
2823
|
+
getItemSelected() {
|
|
2824
|
+
let itemSelected = null;
|
|
2825
|
+
this.items.forEach(item => {
|
|
2826
|
+
if (!item.selected) {
|
|
2827
|
+
return;
|
|
2828
|
+
}
|
|
2829
|
+
itemSelected = item;
|
|
2830
|
+
});
|
|
2831
|
+
return itemSelected;
|
|
2832
|
+
}
|
|
2833
|
+
setCurrentItem(itemSelected) {
|
|
2834
|
+
if (!itemSelected) {
|
|
2835
|
+
return;
|
|
2836
|
+
}
|
|
2837
|
+
itemSelected.selected = true;
|
|
2838
|
+
this.currentLabel = itemSelected.name;
|
|
2839
|
+
this.currentLabelIcon = itemSelected.icon;
|
|
2840
|
+
}
|
|
2841
|
+
unselectAll() {
|
|
2842
|
+
this.items.forEach(item => item.selected = false);
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
SelectInTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectInTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2846
|
+
SelectInTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SelectInTextComponent, selector: "wac-select-in-text", inputs: { items: "items", placeholder: "placeholder", label: "label", maxWidthItems: "maxWidthItems", type: "type", callToAction: "callToAction", preText: "preText", postText: "postText", alwaysOpen: "alwaysOpen", maxWidth: "maxWidth" }, outputs: { selectValue: "selectValue", clickOnCallToAction: "clickOnCallToAction" }, ngImport: i0, template: "<div class=\"wac-select-in-text\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\">\n <div class=\"wac-select-in-text__prepend\" [innerHTML]=\"preText\" *ngIf=\"preText\"></div>\n <div #current class=\"wac-select-in-text__current\" (click)=\"openCategories = !openCategories\">\n <span>{{ currentLabel }}</span>\n <div\n class=\"wac-select-in-text__content\"\n [ngClass]=\"{ hidden: !openCategories && !alwaysOpen, open: type === 'open' }\"\n [ngStyle]=\"{ 'max-width': maxWidthItems }\"\n >\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"items.length > 0\">\n <div class=\"wac-select-in-text__content__item\" *ngFor=\"let item of items; trackBy: customTB; let index = index;\">\n <div [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(index)\">\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name }}\n </div>\n </div>\n </perfect-scrollbar>\n </div>\n </div>\n <div class=\"wac-select-in-text__after\" [innerHTML]=\"postText\" *ngIf=\"postText\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "component", type: i4.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }] });
|
|
2847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectInTextComponent, decorators: [{
|
|
2848
|
+
type: Component,
|
|
2849
|
+
args: [{ selector: 'wac-select-in-text', template: "<div class=\"wac-select-in-text\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\">\n <div class=\"wac-select-in-text__prepend\" [innerHTML]=\"preText\" *ngIf=\"preText\"></div>\n <div #current class=\"wac-select-in-text__current\" (click)=\"openCategories = !openCategories\">\n <span>{{ currentLabel }}</span>\n <div\n class=\"wac-select-in-text__content\"\n [ngClass]=\"{ hidden: !openCategories && !alwaysOpen, open: type === 'open' }\"\n [ngStyle]=\"{ 'max-width': maxWidthItems }\"\n >\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"items.length > 0\">\n <div class=\"wac-select-in-text__content__item\" *ngFor=\"let item of items; trackBy: customTB; let index = index;\">\n <div [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(index)\">\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name }}\n </div>\n </div>\n </perfect-scrollbar>\n </div>\n </div>\n <div class=\"wac-select-in-text__after\" [innerHTML]=\"postText\" *ngIf=\"postText\"></div>\n</div>\n" }]
|
|
2850
|
+
}], ctorParameters: function () { return []; }, propDecorators: { items: [{
|
|
2851
|
+
type: Input
|
|
2852
|
+
}], placeholder: [{
|
|
2853
|
+
type: Input
|
|
2854
|
+
}], label: [{
|
|
2855
|
+
type: Input
|
|
2856
|
+
}], maxWidthItems: [{
|
|
2857
|
+
type: Input
|
|
2858
|
+
}], type: [{
|
|
2859
|
+
type: Input
|
|
2860
|
+
}], callToAction: [{
|
|
2861
|
+
type: Input
|
|
2862
|
+
}], preText: [{
|
|
2863
|
+
type: Input
|
|
2864
|
+
}], postText: [{
|
|
2865
|
+
type: Input
|
|
2866
|
+
}], alwaysOpen: [{
|
|
2867
|
+
type: Input
|
|
2868
|
+
}], maxWidth: [{
|
|
2869
|
+
type: Input
|
|
2870
|
+
}], selectValue: [{
|
|
2871
|
+
type: Output
|
|
2872
|
+
}], clickOnCallToAction: [{
|
|
2873
|
+
type: Output
|
|
2874
|
+
}] } });
|
|
2875
|
+
|
|
2876
|
+
class SelectFiltersPipe {
|
|
2877
|
+
transform(items, filterName) {
|
|
2878
|
+
return items.filter(item => {
|
|
2879
|
+
const regexp = new RegExp(filterName, 'i');
|
|
2880
|
+
return regexp.test(item.name);
|
|
2881
|
+
});
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2884
|
+
SelectFiltersPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectFiltersPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2885
|
+
SelectFiltersPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: SelectFiltersPipe, name: "selectFilters" });
|
|
2886
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectFiltersPipe, decorators: [{
|
|
2887
|
+
type: Pipe,
|
|
2888
|
+
args: [{
|
|
2889
|
+
name: 'selectFilters'
|
|
2890
|
+
}]
|
|
2891
|
+
}] });
|
|
2892
|
+
|
|
2893
|
+
class SelectComponent {
|
|
2894
|
+
constructor(translateService) {
|
|
2895
|
+
this.translateService = translateService;
|
|
2896
|
+
this.search = false;
|
|
2897
|
+
this.searchValue = '';
|
|
2898
|
+
this.searchValueChange = new EventEmitter();
|
|
2899
|
+
this.type = 'default';
|
|
2900
|
+
this.maxWidth = '100%';
|
|
2901
|
+
this.disabled = false;
|
|
2902
|
+
this.selectValue = new EventEmitter(); // todo rename more explicit
|
|
2903
|
+
this.clickOnCallToAction = new EventEmitter();
|
|
2904
|
+
this.openCategories = false;
|
|
2905
|
+
this.indexItemSelected = -1;
|
|
2906
|
+
// ControlValueAccessor methods
|
|
2907
|
+
this.onChange = () => { };
|
|
2908
|
+
this.onTouch = () => { };
|
|
2909
|
+
}
|
|
2910
|
+
set items(items) {
|
|
2911
|
+
this._items = items;
|
|
2912
|
+
this.setIndexItemSelected();
|
|
2913
|
+
}
|
|
2914
|
+
get items() {
|
|
2915
|
+
return this._items;
|
|
2916
|
+
}
|
|
2917
|
+
set callToAction(callToAction) {
|
|
2918
|
+
this._calllToAction = callToAction;
|
|
2919
|
+
}
|
|
2920
|
+
get callToAction() {
|
|
2921
|
+
return this._calllToAction;
|
|
2922
|
+
}
|
|
2923
|
+
ngOnInit() {
|
|
2924
|
+
}
|
|
2925
|
+
onClose() {
|
|
2926
|
+
this.openCategories = false;
|
|
2927
|
+
}
|
|
2928
|
+
customTB(item, index) {
|
|
2929
|
+
return `${item.id}-${index}`;
|
|
2930
|
+
}
|
|
2931
|
+
onSelectItem(id) {
|
|
2932
|
+
this.unselectAll();
|
|
2933
|
+
this.setIndexItemSelectedById(id);
|
|
2934
|
+
const itemSelected = this.getItemSelected();
|
|
2935
|
+
itemSelected.selected = true;
|
|
2936
|
+
this.selectValue.emit(this.indexItemSelected);
|
|
2937
|
+
this.onChange(itemSelected);
|
|
2938
|
+
}
|
|
2939
|
+
onClickCallToAction() {
|
|
2940
|
+
this.onClose();
|
|
2941
|
+
this.clickOnCallToAction.emit(this.callToAction.value);
|
|
2942
|
+
}
|
|
2943
|
+
onSearcheValueChange() {
|
|
2944
|
+
this.searchValueChange.emit(this.searchValue);
|
|
2945
|
+
}
|
|
2946
|
+
getItemSelected() {
|
|
2947
|
+
return this.items[this.indexItemSelected];
|
|
2948
|
+
}
|
|
2949
|
+
showCategories() {
|
|
2950
|
+
this.openCategories = true;
|
|
2951
|
+
setTimeout(() => {
|
|
2952
|
+
var _a;
|
|
2953
|
+
(_a = this.searchElement.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
2954
|
+
}, 0);
|
|
2955
|
+
}
|
|
2956
|
+
unselectAll() {
|
|
2957
|
+
this.items.forEach(item => item.selected = false);
|
|
2958
|
+
}
|
|
2959
|
+
setIndexItemSelectedById(id) {
|
|
2960
|
+
this.indexItemSelected = this.items.findIndex(item => item.id === id);
|
|
2961
|
+
}
|
|
2962
|
+
setIndexItemSelected() {
|
|
2963
|
+
this.indexItemSelected = this.items.findIndex(item => item.selected);
|
|
2964
|
+
}
|
|
2965
|
+
writeValue(selectItem) {
|
|
2966
|
+
if (!selectItem) {
|
|
2967
|
+
return;
|
|
2968
|
+
}
|
|
2969
|
+
this.unselectAll();
|
|
2970
|
+
selectItem.selected = true;
|
|
2971
|
+
this.setIndexItemSelectedById(selectItem.id);
|
|
2972
|
+
}
|
|
2973
|
+
registerOnChange(fn) {
|
|
2974
|
+
this.onChange = fn;
|
|
2975
|
+
}
|
|
2976
|
+
registerOnTouched(fn) {
|
|
2977
|
+
this.onTouch = fn;
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectComponent, deps: [{ token: i1$3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2981
|
+
SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SelectComponent, selector: "wac-select", inputs: { items: "items", placeholder: "placeholder", label: "label", maxWidthItems: "maxWidthItems", search: "search", searchValue: "searchValue", type: "type", callToAction: "callToAction", maxWidth: "maxWidth", disabled: "disabled" }, outputs: { searchValueChange: "searchValueChange", selectValue: "selectValue", clickOnCallToAction: "clickOnCallToAction" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }], viewQueries: [{ propertyName: "searchElement", first: true, predicate: ["search"], descendants: true }], ngImport: i0, template: "<p *ngIf=\"label\" [innerHTML]=\"label\" class=\"wac-select__label\"></p>\n\n<div class=\"wac-select\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\" [zIndexToggle]=\"openCategories\">\n\n <div class=\"wac-select__current\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && openCategories = !openCategories\" *ngIf=\"!search\">\n <span *ngIf=\"indexItemSelected !== -1\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span [innerHTML]=\"indexItemSelected !== -1 ? items[indexItemSelected].name : placeholder\"></span><span><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__current wac-select__current--withSearch\" [ngClass]=\"{ 'select-disabled' : disabled, 'open-search': openCategories }\" *ngIf=\"search\">\n <div class=\"wac-select__current__search\" *ngIf=\"openCategories && !disabled\">\n <i class=\"far fa-search\"></i>\n <input #search type=\"text\" [(ngModel)]=\"searchValue\" (ngModelChange)=\"onSearcheValueChange()\" (keypressEnter)=\"onClickCallToAction()\"/>\n </div>\n <span (click)=\"openCategories = !openCategories;\" *ngIf=\"items[indexItemSelected]?.icon && !openCategories\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span (click)=\"showCategories()\" [innerHTML]=\"items[indexItemSelected]?.name ? items[indexItemSelected].name : placeholder\"></span>\n <span (click)=\"openCategories = !openCategories;\"><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openCategories, open: type === 'open' }\" [ngStyle]=\"{ 'max-width': maxWidthItems }\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"items.length\">\n\n <div *ngIf=\"callToAction\" class=\"wac-select__content__cta\">\n <div (click)=\"onClickCallToAction()\">\n <i *ngIf=\"callToAction.icon\" [classList]=\"callToAction.icon\"></i><strong *ngIf=\"callToAction.boldText\">{{ callToAction.boldText }}</strong\n ><span>{{ callToAction?.name }}</span>\n </div>\n </div>\n\n <div\n *ngFor=\"let item of items | selectFilters: searchValue; let index = index;\"\n (click)=\"onClose()\"\n class=\"wac-select__content__item\"\n >\n <div [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(item.id)\">\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name }}\n </div>\n </div>\n\n </perfect-scrollbar>\n\n <div *ngIf=\"!(items | selectFilters: searchValue)?.length\" class=\"wac-select__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "directive", type: KeypressEnterDirective, selector: "[keypressEnter]", outputs: ["keypressEnter"] }, { kind: "component", type: i4.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }, { kind: "pipe", type: SelectFiltersPipe, name: "selectFilters" }] });
|
|
2982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectComponent, decorators: [{
|
|
2983
|
+
type: Component,
|
|
2984
|
+
args: [{ selector: 'wac-select', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }], template: "<p *ngIf=\"label\" [innerHTML]=\"label\" class=\"wac-select__label\"></p>\n\n<div class=\"wac-select\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\" [zIndexToggle]=\"openCategories\">\n\n <div class=\"wac-select__current\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && openCategories = !openCategories\" *ngIf=\"!search\">\n <span *ngIf=\"indexItemSelected !== -1\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span [innerHTML]=\"indexItemSelected !== -1 ? items[indexItemSelected].name : placeholder\"></span><span><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__current wac-select__current--withSearch\" [ngClass]=\"{ 'select-disabled' : disabled, 'open-search': openCategories }\" *ngIf=\"search\">\n <div class=\"wac-select__current__search\" *ngIf=\"openCategories && !disabled\">\n <i class=\"far fa-search\"></i>\n <input #search type=\"text\" [(ngModel)]=\"searchValue\" (ngModelChange)=\"onSearcheValueChange()\" (keypressEnter)=\"onClickCallToAction()\"/>\n </div>\n <span (click)=\"openCategories = !openCategories;\" *ngIf=\"items[indexItemSelected]?.icon && !openCategories\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span (click)=\"showCategories()\" [innerHTML]=\"items[indexItemSelected]?.name ? items[indexItemSelected].name : placeholder\"></span>\n <span (click)=\"openCategories = !openCategories;\"><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openCategories, open: type === 'open' }\" [ngStyle]=\"{ 'max-width': maxWidthItems }\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"items.length\">\n\n <div *ngIf=\"callToAction\" class=\"wac-select__content__cta\">\n <div (click)=\"onClickCallToAction()\">\n <i *ngIf=\"callToAction.icon\" [classList]=\"callToAction.icon\"></i><strong *ngIf=\"callToAction.boldText\">{{ callToAction.boldText }}</strong\n ><span>{{ callToAction?.name }}</span>\n </div>\n </div>\n\n <div\n *ngFor=\"let item of items | selectFilters: searchValue; let index = index;\"\n (click)=\"onClose()\"\n class=\"wac-select__content__item\"\n >\n <div [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(item.id)\">\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name }}\n </div>\n </div>\n\n </perfect-scrollbar>\n\n <div *ngIf=\"!(items | selectFilters: searchValue)?.length\" class=\"wac-select__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>" }]
|
|
2985
|
+
}], ctorParameters: function () { return [{ type: i1$3.TranslateService }]; }, propDecorators: { items: [{
|
|
2986
|
+
type: Input
|
|
2987
|
+
}], placeholder: [{
|
|
2988
|
+
type: Input
|
|
2989
|
+
}], label: [{
|
|
2990
|
+
type: Input
|
|
2991
|
+
}], maxWidthItems: [{
|
|
2992
|
+
type: Input
|
|
2993
|
+
}], search: [{
|
|
2994
|
+
type: Input
|
|
2995
|
+
}], searchValue: [{
|
|
2996
|
+
type: Input
|
|
2997
|
+
}], searchValueChange: [{
|
|
2998
|
+
type: Output
|
|
2999
|
+
}], type: [{
|
|
3000
|
+
type: Input
|
|
3001
|
+
}], callToAction: [{
|
|
3002
|
+
type: Input
|
|
3003
|
+
}], maxWidth: [{
|
|
3004
|
+
type: Input
|
|
3005
|
+
}], disabled: [{
|
|
3006
|
+
type: Input
|
|
3007
|
+
}], selectValue: [{
|
|
3008
|
+
type: Output
|
|
3009
|
+
}], clickOnCallToAction: [{
|
|
3010
|
+
type: Output
|
|
3011
|
+
}], searchElement: [{
|
|
3012
|
+
type: ViewChild,
|
|
3013
|
+
args: ['search']
|
|
3014
|
+
}] } });
|
|
3015
|
+
|
|
3016
|
+
class MultipleSearchComponent {
|
|
3017
|
+
constructor(translateService) {
|
|
3018
|
+
this.translateService = translateService;
|
|
3019
|
+
this.options = {};
|
|
3020
|
+
this.alwaysOpen = false;
|
|
3021
|
+
this.label = '';
|
|
3022
|
+
this.placeholder = '';
|
|
3023
|
+
this.icon = '';
|
|
3024
|
+
this.query = '';
|
|
3025
|
+
this.search = '';
|
|
3026
|
+
this.openSelect = false;
|
|
3027
|
+
this.error = 'wac.simpleSearchComponent.error';
|
|
3028
|
+
this.showError = false;
|
|
3029
|
+
}
|
|
3030
|
+
ngOnInit() {
|
|
3031
|
+
this.setPlaceholder();
|
|
3032
|
+
this.setLabel();
|
|
3033
|
+
this.setQuery();
|
|
3034
|
+
this.setIcon();
|
|
3035
|
+
}
|
|
3036
|
+
setSearchValueToQuery(value) {
|
|
3037
|
+
if (value.code !== 'Enter') {
|
|
3038
|
+
this.search = encodeURI(value.target.value);
|
|
3039
|
+
}
|
|
3040
|
+
else {
|
|
3041
|
+
this.submitForm();
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
submitForm() {
|
|
3045
|
+
if (this.search) {
|
|
3046
|
+
if (this.search.length > 0) {
|
|
3047
|
+
window.location.href = this.query.replace('{s}', this.search);
|
|
3048
|
+
}
|
|
3049
|
+
else {
|
|
3050
|
+
this.displayError();
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
else {
|
|
3054
|
+
this.displayError();
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
setPlaceholder(value) {
|
|
3058
|
+
if (value) {
|
|
3059
|
+
this.placeholder = this.options[value].placeholder;
|
|
3060
|
+
}
|
|
3061
|
+
else {
|
|
3062
|
+
this.placeholder = this.options[0].placeholder;
|
|
3063
|
+
}
|
|
3064
|
+
}
|
|
3065
|
+
setLabel(value) {
|
|
3066
|
+
if (value) {
|
|
3067
|
+
this.label = this.options[value].label;
|
|
3068
|
+
}
|
|
3069
|
+
else {
|
|
3070
|
+
this.label = this.options[0].label;
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
setQuery(value) {
|
|
3074
|
+
if (value) {
|
|
3075
|
+
this.query = this.options[value].queries;
|
|
3076
|
+
}
|
|
3077
|
+
else {
|
|
3078
|
+
this.query = this.options[0].queries;
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
displayError() {
|
|
3082
|
+
this.showError = true;
|
|
3083
|
+
setTimeout(() => {
|
|
3084
|
+
this.hideError();
|
|
3085
|
+
}, 2000);
|
|
3086
|
+
}
|
|
3087
|
+
hideError() {
|
|
3088
|
+
this.showError = false;
|
|
3089
|
+
}
|
|
3090
|
+
setIcon(value) {
|
|
3091
|
+
if (value) {
|
|
3092
|
+
this.icon = this.options[value].icon;
|
|
3093
|
+
}
|
|
3094
|
+
else {
|
|
3095
|
+
this.icon = this.options[0].icon;
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
openFuncSelect() {
|
|
3099
|
+
this.openSelect = !this.openSelect;
|
|
3100
|
+
}
|
|
3101
|
+
closeSelect() {
|
|
3102
|
+
this.openSelect = false;
|
|
3103
|
+
}
|
|
3104
|
+
resetAllVue(value) {
|
|
3105
|
+
this.setPlaceholder(value);
|
|
3106
|
+
this.setLabel(value);
|
|
3107
|
+
this.setQuery(value);
|
|
3108
|
+
this.setIcon(value);
|
|
3109
|
+
this.search = '';
|
|
3110
|
+
this.closeSelect();
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
MultipleSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: MultipleSearchComponent, deps: [{ token: i1$3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3114
|
+
MultipleSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: MultipleSearchComponent, selector: "wac-multiple-search", inputs: { options: "options", alwaysOpen: "alwaysOpen" }, ngImport: i0, template: "<div class=\"wac-multiple-search\" [ngClass]=\"{ open: openSelect || alwaysOpen }\" [zIndexToggle]=\"openSelect\">\n <div class=\"wac-multiple-search__wrapper\">\n <div class=\"wac-multiple-search__wrapper__left\" [ngClass]=\"{ open: openSelect || alwaysOpen }\" wzAutoHide (clickOutside)=\"closeSelect()\">\n <span>{{ label }}</span>\n <i class=\"fal fa-chevron-down\"></i>\n <div class=\"wac-multiple-search__wrapper__left__background\" (click)=\"openFuncSelect()\"></div>\n <div class=\"wac-multiple-search__wrapper__left__select\" *ngIf=\"openSelect || alwaysOpen\">\n <div\n class=\"wac-multiple-search__wrapper__left__select__item\"\n *ngFor=\"let option of options; let i = index\"\n [attr.data-index]=\"i\"\n (click)=\"resetAllVue(i); inputSearch.value = ''\"\n >\n <i [ngClass]=\"option.icon\"></i>\n <span>{{ option.label }}</span>\n <input type=\"hidden\" value=\"\" />\n </div>\n </div>\n </div>\n <div class=\"wac-multiple-search__wrapper__right\">\n <form [action]=\"query\" method=\"get\">\n <button type=\"submit\" (click)=\"submitForm()\"><i class=\"fal fa-search\"></i></button>\n <input #inputSearch type=\"text\" required [placeholder]=\"placeholder\" (keyup)=\"setSearchValueToQuery($event)\" />\n </form>\n </div>\n </div>\n <div class=\"wac-multiple-search__error\" *ngIf=\"showError\">{{ error | translate}}</div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
|
|
3115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: MultipleSearchComponent, decorators: [{
|
|
3116
|
+
type: Component,
|
|
3117
|
+
args: [{ selector: 'wac-multiple-search', template: "<div class=\"wac-multiple-search\" [ngClass]=\"{ open: openSelect || alwaysOpen }\" [zIndexToggle]=\"openSelect\">\n <div class=\"wac-multiple-search__wrapper\">\n <div class=\"wac-multiple-search__wrapper__left\" [ngClass]=\"{ open: openSelect || alwaysOpen }\" wzAutoHide (clickOutside)=\"closeSelect()\">\n <span>{{ label }}</span>\n <i class=\"fal fa-chevron-down\"></i>\n <div class=\"wac-multiple-search__wrapper__left__background\" (click)=\"openFuncSelect()\"></div>\n <div class=\"wac-multiple-search__wrapper__left__select\" *ngIf=\"openSelect || alwaysOpen\">\n <div\n class=\"wac-multiple-search__wrapper__left__select__item\"\n *ngFor=\"let option of options; let i = index\"\n [attr.data-index]=\"i\"\n (click)=\"resetAllVue(i); inputSearch.value = ''\"\n >\n <i [ngClass]=\"option.icon\"></i>\n <span>{{ option.label }}</span>\n <input type=\"hidden\" value=\"\" />\n </div>\n </div>\n </div>\n <div class=\"wac-multiple-search__wrapper__right\">\n <form [action]=\"query\" method=\"get\">\n <button type=\"submit\" (click)=\"submitForm()\"><i class=\"fal fa-search\"></i></button>\n <input #inputSearch type=\"text\" required [placeholder]=\"placeholder\" (keyup)=\"setSearchValueToQuery($event)\" />\n </form>\n </div>\n </div>\n <div class=\"wac-multiple-search__error\" *ngIf=\"showError\">{{ error | translate}}</div>\n</div>\n" }]
|
|
3118
|
+
}], ctorParameters: function () { return [{ type: i1$3.TranslateService }]; }, propDecorators: { options: [{
|
|
3119
|
+
type: Input
|
|
3120
|
+
}], alwaysOpen: [{
|
|
3121
|
+
type: Input
|
|
3122
|
+
}] } });
|
|
3123
|
+
|
|
3124
|
+
class MultipleSearchPlusComponent {
|
|
3125
|
+
constructor() {
|
|
3126
|
+
this.label = '';
|
|
3127
|
+
this.placeholder = '';
|
|
3128
|
+
this.openSelect = false;
|
|
3129
|
+
this.openSearchResults = false;
|
|
3130
|
+
this.isLoading = true;
|
|
3131
|
+
this.searchValue = new EventEmitter();
|
|
3132
|
+
this.optionsChange = new EventEmitter();
|
|
3133
|
+
}
|
|
3134
|
+
ngOnInit() {
|
|
3135
|
+
this.setCurrentOption();
|
|
3136
|
+
this.setPlaceholder();
|
|
3137
|
+
this.setLabel();
|
|
3138
|
+
}
|
|
3139
|
+
setSearchValue(value) {
|
|
3140
|
+
if (value.target.value != '') {
|
|
3141
|
+
this.openSearchResults = true;
|
|
3142
|
+
}
|
|
3143
|
+
else {
|
|
3144
|
+
this.openSearchResults = false;
|
|
3145
|
+
}
|
|
3146
|
+
this.searchValue.emit({ currentOption: this.options[this.currentOption].code, value: value.target.value });
|
|
3147
|
+
}
|
|
3148
|
+
setCurrentOption(value) {
|
|
3149
|
+
this.currentOption = value || 0;
|
|
3150
|
+
}
|
|
3151
|
+
setPlaceholder(value) {
|
|
3152
|
+
this.placeholder = value ? this.options[value].placeholder : this.options[0].placeholder;
|
|
3153
|
+
}
|
|
3154
|
+
setLabel(value) {
|
|
3155
|
+
this.label = value ? this.options[value].label : this.options[0].label;
|
|
3156
|
+
}
|
|
3157
|
+
onToggleSelect() {
|
|
3158
|
+
this.openSelect = !this.openSelect;
|
|
3159
|
+
}
|
|
3160
|
+
closeSelect() {
|
|
3161
|
+
this.openSelect = false;
|
|
3162
|
+
}
|
|
3163
|
+
closeSearchResults() {
|
|
3164
|
+
this.openSearchResults = false;
|
|
3165
|
+
}
|
|
3166
|
+
resetAllVue(value) {
|
|
3167
|
+
this.searchResults = undefined;
|
|
3168
|
+
this.setCurrentOption(value);
|
|
3169
|
+
this.setPlaceholder(value);
|
|
3170
|
+
this.setLabel(value);
|
|
3171
|
+
this.openSearchResults = false;
|
|
3172
|
+
this.closeSelect();
|
|
3173
|
+
}
|
|
3174
|
+
addResult(index) {
|
|
3175
|
+
let alreadyExist = false;
|
|
3176
|
+
this.options[this.currentOption].table.forEach(elem => {
|
|
3177
|
+
if (elem.id == this.searchResults[index].id) {
|
|
3178
|
+
alreadyExist = true;
|
|
3179
|
+
}
|
|
3180
|
+
});
|
|
3181
|
+
if (!alreadyExist) {
|
|
3182
|
+
this.options[this.currentOption].table.push(this.searchResults[index]);
|
|
3183
|
+
}
|
|
3184
|
+
this.resetAllVue(this.currentOption);
|
|
3185
|
+
this.optionsChange.emit({ currentOption: this.options[this.currentOption].code, action: 'add' });
|
|
3186
|
+
}
|
|
3187
|
+
deleteResult(indexItem, index) {
|
|
3188
|
+
this.options[index].table.splice(indexItem, 1);
|
|
3189
|
+
this.optionsChange.emit({ currentOption: this.options[index].code, action: 'delete' });
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
MultipleSearchPlusComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: MultipleSearchPlusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3193
|
+
MultipleSearchPlusComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: MultipleSearchPlusComponent, selector: "wac-multiple-search-plus", inputs: { options: "options", searchResults: "searchResults" }, outputs: { searchValue: "searchValue", optionsChange: "optionsChange" }, ngImport: i0, template: "<div class=\"wac-multiple-search-plus\" [zIndexToggle]=\"openSelect || openSearchResults\">\n <!-- Multiple select with search input -->\n <div class=\"wac-multiple-search\" [ngClass]=\"{ open: openSelect }\">\n <div class=\"wac-multiple-search__wrapper\">\n <div class=\"wac-multiple-search__wrapper__left\" *ngIf=\"options.length > 1\" [ngClass]=\"{ open: openSelect }\" wzAutoHide (clickOutside)=\"closeSelect()\">\n <span>{{ label }}</span>\n <i class=\"fal fa-chevron-down\"></i>\n <div class=\"wac-multiple-search__wrapper__left__background\" (click)=\"onToggleSelect()\"></div>\n <div class=\"wac-multiple-search__wrapper__left__select\" *ngIf=\"openSelect\">\n <div\n class=\"wac-multiple-search__wrapper__left__select__item\"\n *ngFor=\"let option of options; let i = index\"\n [attr.data-index]=\"i\"\n (click)=\"resetAllVue(i); inputSearch.value = ''\"\n >\n <span>{{ option.label }}</span>\n <input type=\"hidden\" value=\"\" />\n </div>\n </div>\n </div>\n <div class=\"wac-multiple-search__wrapper__right\" wzAutoHide (clickOutside)=\"closeSearchResults()\">\n <button><i class=\"fal fa-search\"></i></button>\n <input\n #inputSearch\n type=\"text\"\n [placeholder]=\"placeholder\"\n debounceKeyUp\n [debounceTime]=\"500\"\n (onEventChange)=\"setSearchValue($event)\"\n />\n <div class=\"wac-multiple-search__wrapper__left__select\" *ngIf=\"openSearchResults\">\n <div\n class=\"wac-multiple-search__wrapper__left__select__item\"\n *ngFor=\"let res of searchResults; let i = index\"\n (click)=\"addResult(i); inputSearch.value = ''\"\n >\n <wac-image *ngIf=\"res.image\" [src]=\"res.image\"></wac-image>\n <wac-text>#{{ res.id }} {{ res.name }}</wac-text>\n </div>\n <div class=\"wac-table__body__loader\" *ngIf=\"isLoading && !searchResults\">\n <wac-loader [small]=\"true\"></wac-loader>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Results checked -->\n <div *ngFor=\"let option of options; let i = index\">\n <div class=\"wac-multiple-search-plus__wrapper\" *ngIf=\"option.table.length\">\n <wac-h3>{{ option.title }}</wac-h3>\n <div class=\"wac-multiple-search-plus__wrapper__block hover default\" *ngFor=\"let item of option.table; let indexItem = index\">\n <wac-image *ngIf=\"item.image\" [src]=\"item.image\"></wac-image>\n <wac-text>{{ item.name }}</wac-text>\n <span (click)=\"deleteResult(indexItem, i)\"><i class=\"fas fa-times\"></i></span>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]" }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "component", type: LoaderComponent, selector: "wac-loader", inputs: ["text", "small"] }, { kind: "component", type: ImageComponent, selector: "wac-image", inputs: ["src"] }, { kind: "component", type: H3Component, selector: "wac-h3", inputs: ["grey"] }, { kind: "component", type: TextComponent, selector: "wac-text", inputs: ["textClass"] }] });
|
|
3194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: MultipleSearchPlusComponent, decorators: [{
|
|
3195
|
+
type: Component,
|
|
3196
|
+
args: [{ selector: 'wac-multiple-search-plus', template: "<div class=\"wac-multiple-search-plus\" [zIndexToggle]=\"openSelect || openSearchResults\">\n <!-- Multiple select with search input -->\n <div class=\"wac-multiple-search\" [ngClass]=\"{ open: openSelect }\">\n <div class=\"wac-multiple-search__wrapper\">\n <div class=\"wac-multiple-search__wrapper__left\" *ngIf=\"options.length > 1\" [ngClass]=\"{ open: openSelect }\" wzAutoHide (clickOutside)=\"closeSelect()\">\n <span>{{ label }}</span>\n <i class=\"fal fa-chevron-down\"></i>\n <div class=\"wac-multiple-search__wrapper__left__background\" (click)=\"onToggleSelect()\"></div>\n <div class=\"wac-multiple-search__wrapper__left__select\" *ngIf=\"openSelect\">\n <div\n class=\"wac-multiple-search__wrapper__left__select__item\"\n *ngFor=\"let option of options; let i = index\"\n [attr.data-index]=\"i\"\n (click)=\"resetAllVue(i); inputSearch.value = ''\"\n >\n <span>{{ option.label }}</span>\n <input type=\"hidden\" value=\"\" />\n </div>\n </div>\n </div>\n <div class=\"wac-multiple-search__wrapper__right\" wzAutoHide (clickOutside)=\"closeSearchResults()\">\n <button><i class=\"fal fa-search\"></i></button>\n <input\n #inputSearch\n type=\"text\"\n [placeholder]=\"placeholder\"\n debounceKeyUp\n [debounceTime]=\"500\"\n (onEventChange)=\"setSearchValue($event)\"\n />\n <div class=\"wac-multiple-search__wrapper__left__select\" *ngIf=\"openSearchResults\">\n <div\n class=\"wac-multiple-search__wrapper__left__select__item\"\n *ngFor=\"let res of searchResults; let i = index\"\n (click)=\"addResult(i); inputSearch.value = ''\"\n >\n <wac-image *ngIf=\"res.image\" [src]=\"res.image\"></wac-image>\n <wac-text>#{{ res.id }} {{ res.name }}</wac-text>\n </div>\n <div class=\"wac-table__body__loader\" *ngIf=\"isLoading && !searchResults\">\n <wac-loader [small]=\"true\"></wac-loader>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Results checked -->\n <div *ngFor=\"let option of options; let i = index\">\n <div class=\"wac-multiple-search-plus__wrapper\" *ngIf=\"option.table.length\">\n <wac-h3>{{ option.title }}</wac-h3>\n <div class=\"wac-multiple-search-plus__wrapper__block hover default\" *ngFor=\"let item of option.table; let indexItem = index\">\n <wac-image *ngIf=\"item.image\" [src]=\"item.image\"></wac-image>\n <wac-text>{{ item.name }}</wac-text>\n <span (click)=\"deleteResult(indexItem, i)\"><i class=\"fas fa-times\"></i></span>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
3197
|
+
}], ctorParameters: function () { return []; }, propDecorators: { options: [{
|
|
3198
|
+
type: Input
|
|
3199
|
+
}], searchResults: [{
|
|
3200
|
+
type: Input
|
|
3201
|
+
}], searchValue: [{
|
|
3202
|
+
type: Output
|
|
3203
|
+
}], optionsChange: [{
|
|
3204
|
+
type: Output
|
|
3205
|
+
}] } });
|
|
3206
|
+
|
|
3207
|
+
class InputWithSelectComponent {
|
|
3208
|
+
constructor() {
|
|
3209
|
+
this.showSelect = false;
|
|
3210
|
+
this.inputValueChange = new EventEmitter();
|
|
3211
|
+
this.selectValueChange = new EventEmitter();
|
|
3212
|
+
}
|
|
3213
|
+
ngOnInit() {
|
|
3214
|
+
this.options.forEach((item) => {
|
|
3215
|
+
if (item.active) {
|
|
3216
|
+
this.currentLabel = item.label;
|
|
3217
|
+
}
|
|
3218
|
+
});
|
|
3219
|
+
}
|
|
3220
|
+
onClickItem(index) {
|
|
3221
|
+
this.unActiveAll();
|
|
3222
|
+
const optionSelected = this.options[index];
|
|
3223
|
+
optionSelected.active = true;
|
|
3224
|
+
this.currentLabel = optionSelected.label;
|
|
3225
|
+
this.showSelect = false;
|
|
3226
|
+
this.selectValueChange.emit(index);
|
|
3227
|
+
}
|
|
3228
|
+
onToggleSelect() {
|
|
3229
|
+
this.showSelect = !this.showSelect;
|
|
3230
|
+
}
|
|
3231
|
+
onCloseSelect() {
|
|
3232
|
+
this.showSelect = false;
|
|
3233
|
+
}
|
|
3234
|
+
onChangeInputValue(e) {
|
|
3235
|
+
this.inputValueChange.emit(e.target.value);
|
|
3236
|
+
}
|
|
3237
|
+
unActiveAll() {
|
|
3238
|
+
this.options.forEach((item) => {
|
|
3239
|
+
item.active = false;
|
|
3240
|
+
});
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
InputWithSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputWithSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3244
|
+
InputWithSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: InputWithSelectComponent, selector: "wac-input-with-select", inputs: { label: "label", text: "text", options: "options", placeholder: "placeholder", id: "id" }, outputs: { inputValueChange: "inputValueChange", selectValueChange: "selectValueChange" }, ngImport: i0, template: "<div class=\"wac-input-with-select\" [zIndexToggle]=\"showSelect\">\n <label class=\"wac-input-with-select__label\" [for]=\"id\" [innerHTML]=\"label\"></label>\n <div class=\"wac-input-with-select__wrapper\">\n <div class=\"wac-input-with-select__wrapper__left\" wzAutoHide (clickOutside)=\"onCloseSelect()\">\n <input [id]=\"id\" type=\"text\" [placeholder]=\"placeholder\" (change)=\"onChangeInputValue($event)\" />\n <div class=\"wac-input-with-select__wrapper__left__current\">\n <span (click)=\"onToggleSelect()\">{{ currentLabel }}</span>\n </div>\n <div class=\"wac-input-with-select__wrapper__left__select\" *ngIf=\"showSelect\">\n <div class=\"wac-input-with-select__wrapper__left__select__item\" *ngFor=\"let option of options; let index = index\">\n <div (click)=\"onClickItem(index)\">{{ option.label }}</div>\n </div>\n </div>\n </div>\n <div class=\"wac-input-with-select__wrapper__right\">\n <p [innerHTML]=\"text\"></p>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }] });
|
|
3245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputWithSelectComponent, decorators: [{
|
|
3246
|
+
type: Component,
|
|
3247
|
+
args: [{ selector: 'wac-input-with-select', template: "<div class=\"wac-input-with-select\" [zIndexToggle]=\"showSelect\">\n <label class=\"wac-input-with-select__label\" [for]=\"id\" [innerHTML]=\"label\"></label>\n <div class=\"wac-input-with-select__wrapper\">\n <div class=\"wac-input-with-select__wrapper__left\" wzAutoHide (clickOutside)=\"onCloseSelect()\">\n <input [id]=\"id\" type=\"text\" [placeholder]=\"placeholder\" (change)=\"onChangeInputValue($event)\" />\n <div class=\"wac-input-with-select__wrapper__left__current\">\n <span (click)=\"onToggleSelect()\">{{ currentLabel }}</span>\n </div>\n <div class=\"wac-input-with-select__wrapper__left__select\" *ngIf=\"showSelect\">\n <div class=\"wac-input-with-select__wrapper__left__select__item\" *ngFor=\"let option of options; let index = index\">\n <div (click)=\"onClickItem(index)\">{{ option.label }}</div>\n </div>\n </div>\n </div>\n <div class=\"wac-input-with-select__wrapper__right\">\n <p [innerHTML]=\"text\"></p>\n </div>\n </div>\n</div>\n" }]
|
|
3248
|
+
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
3249
|
+
type: Input
|
|
3250
|
+
}], text: [{
|
|
3251
|
+
type: Input
|
|
3252
|
+
}], options: [{
|
|
3253
|
+
type: Input
|
|
3254
|
+
}], placeholder: [{
|
|
3255
|
+
type: Input
|
|
3256
|
+
}], id: [{
|
|
3257
|
+
type: Input
|
|
3258
|
+
}], inputValueChange: [{
|
|
3259
|
+
type: Output
|
|
3260
|
+
}], selectValueChange: [{
|
|
3261
|
+
type: Output
|
|
3262
|
+
}] } });
|
|
3263
|
+
|
|
3264
|
+
class PopinComponent {
|
|
3265
|
+
constructor(domService) {
|
|
3266
|
+
this.domService = domService;
|
|
3267
|
+
this.visible = false;
|
|
3268
|
+
this.visibleChange = new EventEmitter();
|
|
3269
|
+
this.response = new EventEmitter();
|
|
3270
|
+
this.background = true;
|
|
3271
|
+
this.firstOpen = true;
|
|
3272
|
+
}
|
|
3273
|
+
ngOnInit() {
|
|
3274
|
+
this.domService.setDocumentEventListener();
|
|
3275
|
+
}
|
|
3276
|
+
validatePopin() {
|
|
3277
|
+
this.response.emit(true);
|
|
3278
|
+
this.closePopin();
|
|
3279
|
+
}
|
|
3280
|
+
refusePopin() {
|
|
3281
|
+
this.response.emit(false);
|
|
3282
|
+
this.closePopin();
|
|
3283
|
+
}
|
|
3284
|
+
closePopin() {
|
|
3285
|
+
if (!this.firstOpen) { //trick for auto-hide directive that close immediatly the pop-in
|
|
3286
|
+
this.visible = false;
|
|
3287
|
+
this.visibleChange.emit(this.visible);
|
|
3288
|
+
this.firstOpen = true;
|
|
3289
|
+
}
|
|
3290
|
+
else {
|
|
3291
|
+
this.firstOpen = false;
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
PopinComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PopinComponent, deps: [{ token: DomService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3296
|
+
PopinComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: PopinComponent, selector: "wac-popin", inputs: { title: "title", content: "content", imgSrc: "imgSrc", okButtonLabel: "okButtonLabel", koButtonLabel: "koButtonLabel", okButtonClass: "okButtonClass", koButtonClass: "koButtonClass", visible: "visible", background: "background" }, outputs: { visibleChange: "visibleChange", response: "response" }, ngImport: i0, template: "<div class=\"wac-free\" *ngIf=\"visible\">\n <div class=\"wac-free__wrapper\" wzAutoHide (clickOutside)=\"closePopin()\">\n <a class=\"wac-free__wrapper__button-close\" (click)=\"closePopin()\">\n <i class=\"fas fa-times\"></i>\n </a>\n <div class=\"wac-free__wrapper__content\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <img [src]=\"imgSrc\" alt=\"barre admin\" />\n\n <h2 class=\"wac-popin__wrapper__title\" [innerHTML]=\"title\"></h2>\n\n <p class=\"wac-popin__wrapper__text\" [innerHTML]=\"content\"></p>\n </perfect-scrollbar>\n </div>\n <div class=\"wac-free__wrapper__buttons\">\n <div class=\"wac-free__wrapper__buttons__button\" *ngIf=\"okButtonLabel\">\n <wac-button [extraClasses]=\"'is-success'\" [label]=\"okButtonLabel\" hasLoader=\"true\" (click)=\"validatePopin()\"></wac-button>\n </div>\n <div class=\"wac-free__wrapper__buttons__button\" *ngIf=\"koButtonLabel\">\n <wac-button [extraClasses]=\"'is-danger is-outlined'\" [label]=\"koButtonLabel\" hasLoader=\"true\" (click)=\"refusePopin()\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-free__background\" *ngIf=\"background\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "component", type: i4.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }, { kind: "component", type: ButtonComponent, selector: "wac-button", inputs: ["extraClasses", "label", "icon", "iconNext", "widthAuto", "contentHorizontalPosition", "iconFontSize", "hasLoader", "disabled", "whiteSpaceNowrap", "opacity", "animation", "animationRight", "animationText", "confirmDelete", "confirmDeleteText", "confirmDeletePosition", "isLoading"], outputs: ["click", "isLoadingChange"] }] });
|
|
3297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: PopinComponent, decorators: [{
|
|
3298
|
+
type: Component,
|
|
3299
|
+
args: [{ selector: 'wac-popin', template: "<div class=\"wac-free\" *ngIf=\"visible\">\n <div class=\"wac-free__wrapper\" wzAutoHide (clickOutside)=\"closePopin()\">\n <a class=\"wac-free__wrapper__button-close\" (click)=\"closePopin()\">\n <i class=\"fas fa-times\"></i>\n </a>\n <div class=\"wac-free__wrapper__content\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <img [src]=\"imgSrc\" alt=\"barre admin\" />\n\n <h2 class=\"wac-popin__wrapper__title\" [innerHTML]=\"title\"></h2>\n\n <p class=\"wac-popin__wrapper__text\" [innerHTML]=\"content\"></p>\n </perfect-scrollbar>\n </div>\n <div class=\"wac-free__wrapper__buttons\">\n <div class=\"wac-free__wrapper__buttons__button\" *ngIf=\"okButtonLabel\">\n <wac-button [extraClasses]=\"'is-success'\" [label]=\"okButtonLabel\" hasLoader=\"true\" (click)=\"validatePopin()\"></wac-button>\n </div>\n <div class=\"wac-free__wrapper__buttons__button\" *ngIf=\"koButtonLabel\">\n <wac-button [extraClasses]=\"'is-danger is-outlined'\" [label]=\"koButtonLabel\" hasLoader=\"true\" (click)=\"refusePopin()\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-free__background\" *ngIf=\"background\"></div>\n</div>\n" }]
|
|
3300
|
+
}], ctorParameters: function () { return [{ type: DomService }]; }, propDecorators: { title: [{
|
|
3301
|
+
type: Input
|
|
3302
|
+
}], content: [{
|
|
3303
|
+
type: Input
|
|
3304
|
+
}], imgSrc: [{
|
|
3305
|
+
type: Input
|
|
3306
|
+
}], okButtonLabel: [{
|
|
3307
|
+
type: Input
|
|
3308
|
+
}], koButtonLabel: [{
|
|
3309
|
+
type: Input
|
|
3310
|
+
}], okButtonClass: [{
|
|
3311
|
+
type: Input
|
|
3312
|
+
}], koButtonClass: [{
|
|
3313
|
+
type: Input
|
|
3314
|
+
}], visible: [{
|
|
3315
|
+
type: Input
|
|
3316
|
+
}], visibleChange: [{
|
|
3317
|
+
type: Output
|
|
3318
|
+
}], response: [{
|
|
3319
|
+
type: Output
|
|
3320
|
+
}], background: [{
|
|
3321
|
+
type: Input
|
|
3322
|
+
}] } });
|
|
3323
|
+
|
|
3324
|
+
class FreePopinComponent {
|
|
3325
|
+
constructor(domService) {
|
|
3326
|
+
this.domService = domService;
|
|
3327
|
+
this.visible = false;
|
|
3328
|
+
this.disableCloseOutside = false;
|
|
3329
|
+
this.visibleChange = new EventEmitter();
|
|
3330
|
+
this.response = new EventEmitter();
|
|
3331
|
+
this.background = true;
|
|
3332
|
+
this.zIndex = 9999;
|
|
3333
|
+
this.firstOpen = true;
|
|
3334
|
+
}
|
|
3335
|
+
ngOnInit() {
|
|
3336
|
+
this.domService.setDocumentEventListener();
|
|
3337
|
+
}
|
|
3338
|
+
validatePopin() {
|
|
3339
|
+
this.response.emit(true);
|
|
3340
|
+
this.closePopin();
|
|
3341
|
+
}
|
|
3342
|
+
refusePopin() {
|
|
3343
|
+
this.response.emit(false);
|
|
3344
|
+
this.closePopin();
|
|
3345
|
+
}
|
|
3346
|
+
closePopin() {
|
|
3347
|
+
if (!this.firstOpen || this.disableCloseOutside) {
|
|
3348
|
+
this.visible = false;
|
|
3349
|
+
this.visibleChange.emit(this.visible);
|
|
3350
|
+
this.firstOpen = true;
|
|
3351
|
+
}
|
|
3352
|
+
else {
|
|
3353
|
+
this.firstOpen = false;
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
FreePopinComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FreePopinComponent, deps: [{ token: DomService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3358
|
+
FreePopinComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: FreePopinComponent, selector: "wac-free-popin", inputs: { okButtonLabel: "okButtonLabel", koButtonLabel: "koButtonLabel", visible: "visible", disableCloseOutside: "disableCloseOutside", background: "background", zIndex: "zIndex" }, outputs: { visibleChange: "visibleChange", response: "response" }, ngImport: i0, template: "<div class=\"wac-free-popin\" *ngIf=\"visible\" [ngStyle]=\"{'z-index': zIndex}\">\n <div class=\"wac-free-popin__wrapper\" wzAutoHide (clickOutside)=\"!disableCloseOutside ? closePopin() : ''\">\n <a class=\"wac-free-popin__wrapper__button-close\" (click)=\"closePopin()\">\n <i class=\"fas fa-times\"></i>\n </a>\n <div class=\"wac-free-popin__wrapper__content\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <ng-content></ng-content>\n </perfect-scrollbar>\n </div>\n <div class=\"wac-free-popin__wrapper__buttons\">\n <div class=\"wac-free-popin__wrapper__buttons__button\" *ngIf=\"okButtonLabel\">\n <wac-button [extraClasses]=\"'is-success'\" [label]=\"okButtonLabel\" hasLoader=\"true\" (click)=\"validatePopin()\"></wac-button>\n </div>\n <div class=\"wac-free-popin__wrapper__buttons__button\" *ngIf=\"koButtonLabel\">\n <wac-button [extraClasses]=\"'is-danger is-outlined'\" [label]=\"koButtonLabel\" hasLoader=\"true\" (click)=\"refusePopin()\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-free-popin__background\" *ngIf=\"background\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "component", type: i4.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }, { kind: "component", type: ButtonComponent, selector: "wac-button", inputs: ["extraClasses", "label", "icon", "iconNext", "widthAuto", "contentHorizontalPosition", "iconFontSize", "hasLoader", "disabled", "whiteSpaceNowrap", "opacity", "animation", "animationRight", "animationText", "confirmDelete", "confirmDeleteText", "confirmDeletePosition", "isLoading"], outputs: ["click", "isLoadingChange"] }] });
|
|
3359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FreePopinComponent, decorators: [{
|
|
3360
|
+
type: Component,
|
|
3361
|
+
args: [{ selector: 'wac-free-popin', template: "<div class=\"wac-free-popin\" *ngIf=\"visible\" [ngStyle]=\"{'z-index': zIndex}\">\n <div class=\"wac-free-popin__wrapper\" wzAutoHide (clickOutside)=\"!disableCloseOutside ? closePopin() : ''\">\n <a class=\"wac-free-popin__wrapper__button-close\" (click)=\"closePopin()\">\n <i class=\"fas fa-times\"></i>\n </a>\n <div class=\"wac-free-popin__wrapper__content\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <ng-content></ng-content>\n </perfect-scrollbar>\n </div>\n <div class=\"wac-free-popin__wrapper__buttons\">\n <div class=\"wac-free-popin__wrapper__buttons__button\" *ngIf=\"okButtonLabel\">\n <wac-button [extraClasses]=\"'is-success'\" [label]=\"okButtonLabel\" hasLoader=\"true\" (click)=\"validatePopin()\"></wac-button>\n </div>\n <div class=\"wac-free-popin__wrapper__buttons__button\" *ngIf=\"koButtonLabel\">\n <wac-button [extraClasses]=\"'is-danger is-outlined'\" [label]=\"koButtonLabel\" hasLoader=\"true\" (click)=\"refusePopin()\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-free-popin__background\" *ngIf=\"background\"></div>\n</div>\n" }]
|
|
3362
|
+
}], ctorParameters: function () { return [{ type: DomService }]; }, propDecorators: { okButtonLabel: [{
|
|
3363
|
+
type: Input
|
|
3364
|
+
}], koButtonLabel: [{
|
|
3365
|
+
type: Input
|
|
3366
|
+
}], visible: [{
|
|
3367
|
+
type: Input
|
|
3368
|
+
}], disableCloseOutside: [{
|
|
3369
|
+
type: Input
|
|
3370
|
+
}], visibleChange: [{
|
|
3371
|
+
type: Output
|
|
3372
|
+
}], response: [{
|
|
3373
|
+
type: Output
|
|
3374
|
+
}], background: [{
|
|
3375
|
+
type: Input
|
|
3376
|
+
}], zIndex: [{
|
|
3377
|
+
type: Input
|
|
3378
|
+
}] } });
|
|
3379
|
+
|
|
3380
|
+
class BlockComponent {
|
|
3381
|
+
constructor() {
|
|
3382
|
+
this.titleBlock = ''; // Titre interne au block
|
|
3383
|
+
this.titleExternalBlock = false; // Titre externe au block
|
|
3384
|
+
this.sticky = false; // add sticky to block
|
|
3385
|
+
this.simple = false;
|
|
3386
|
+
this.noFullHeight = false; // not full height
|
|
3387
|
+
this.icon = '';
|
|
3388
|
+
this.titleUppercase = true;
|
|
3389
|
+
this.borderRadius = false;
|
|
3390
|
+
this.removePadding = false;
|
|
3391
|
+
this.stretchHeight = false;
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
BlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: BlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3395
|
+
BlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: BlockComponent, selector: "wac-block", inputs: { titleBlock: "titleBlock", titleExternalBlock: "titleExternalBlock", sticky: "sticky", simple: "simple", noFullHeight: "noFullHeight", icon: "icon", titleUppercase: "titleUppercase", borderRadius: "borderRadius", removePadding: "removePadding", stretchHeight: "stretchHeight" }, ngImport: i0, template: "<div\n class=\"wac-block\"\n [ngClass]=\"{ 'wac-block__external': titleExternalBlock, sticky: sticky, noFullHeight: noFullHeight, 'stretch': stretchHeight, 'border-radius': borderRadius, 'no-padding' : removePadding }\"\n>\n <h2 *ngIf=\"titleBlock.length\" class=\"wac-block__title\" [ngClass]=\"{ 'is-simple': simple, 'no-uppercase': !titleUppercase }\">\n {{ titleBlock }} <i *ngIf=\"icon\" [ngClass]=\"icon\"></i>\n </h2>\n <div class=\"wac-block__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: BlockComponent, decorators: [{
|
|
3397
|
+
type: Component,
|
|
3398
|
+
args: [{ selector: 'wac-block', template: "<div\n class=\"wac-block\"\n [ngClass]=\"{ 'wac-block__external': titleExternalBlock, sticky: sticky, noFullHeight: noFullHeight, 'stretch': stretchHeight, 'border-radius': borderRadius, 'no-padding' : removePadding }\"\n>\n <h2 *ngIf=\"titleBlock.length\" class=\"wac-block__title\" [ngClass]=\"{ 'is-simple': simple, 'no-uppercase': !titleUppercase }\">\n {{ titleBlock }} <i *ngIf=\"icon\" [ngClass]=\"icon\"></i>\n </h2>\n <div class=\"wac-block__content\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
|
|
3399
|
+
}], ctorParameters: function () { return []; }, propDecorators: { titleBlock: [{
|
|
3400
|
+
type: Input
|
|
3401
|
+
}], titleExternalBlock: [{
|
|
3402
|
+
type: Input
|
|
3403
|
+
}], sticky: [{
|
|
3404
|
+
type: Input
|
|
3405
|
+
}], simple: [{
|
|
3406
|
+
type: Input
|
|
3407
|
+
}], noFullHeight: [{
|
|
3408
|
+
type: Input
|
|
3409
|
+
}], icon: [{
|
|
3410
|
+
type: Input
|
|
3411
|
+
}], titleUppercase: [{
|
|
3412
|
+
type: Input
|
|
3413
|
+
}], borderRadius: [{
|
|
3414
|
+
type: Input
|
|
3415
|
+
}], removePadding: [{
|
|
3416
|
+
type: Input
|
|
3417
|
+
}], stretchHeight: [{
|
|
3418
|
+
type: Input
|
|
3419
|
+
}] } });
|
|
3420
|
+
|
|
3421
|
+
class WrapperComponent {
|
|
3422
|
+
constructor() {
|
|
3423
|
+
this.size = 'fullsize';
|
|
3424
|
+
}
|
|
3425
|
+
ngOnInit() { }
|
|
3426
|
+
}
|
|
3427
|
+
WrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3428
|
+
WrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: WrapperComponent, selector: "wac-wrapper", inputs: { size: "size" }, ngImport: i0, template: "<div class=\"wac-wrapper\" [ngClass]=\"{ fullsize: size === 'fullsize', 'max-width': size === 'max-width' }\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WrapperComponent, decorators: [{
|
|
3430
|
+
type: Component,
|
|
3431
|
+
args: [{ selector: 'wac-wrapper', template: "<div class=\"wac-wrapper\" [ngClass]=\"{ fullsize: size === 'fullsize', 'max-width': size === 'max-width' }\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
3432
|
+
}], ctorParameters: function () { return []; }, propDecorators: { size: [{
|
|
3433
|
+
type: Input
|
|
3434
|
+
}] } });
|
|
3435
|
+
|
|
3436
|
+
class FiltersComponent {
|
|
3437
|
+
constructor() {
|
|
3438
|
+
this.labelRestart = 'Afficher toutes les catégories';
|
|
3439
|
+
this.filterChange = new EventEmitter();
|
|
3440
|
+
}
|
|
3441
|
+
ngOnInit() {
|
|
3442
|
+
this.options.forEach((item, index) => {
|
|
3443
|
+
if (item.active) {
|
|
3444
|
+
this.filterActiveIndex = '' + index;
|
|
3445
|
+
}
|
|
3446
|
+
});
|
|
3447
|
+
}
|
|
3448
|
+
activeFilter(index) {
|
|
3449
|
+
this.options[index].active = true;
|
|
3450
|
+
this.filterActiveIndex = '' + index;
|
|
3451
|
+
this.filterChange.emit(index);
|
|
3452
|
+
}
|
|
3453
|
+
resetFilter() {
|
|
3454
|
+
this.options.forEach((item) => {
|
|
3455
|
+
item.active = false;
|
|
3456
|
+
});
|
|
3457
|
+
this.filterActiveIndex = null;
|
|
3458
|
+
this.filterChange.emit(-1);
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
FiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3462
|
+
FiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: FiltersComponent, selector: "wac-filters", inputs: { options: "options", labelRestart: "labelRestart" }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: "<div class=\"wac-filters\">\n <div class=\"wac-filters__wrapper\" *ngIf=\"!filterActiveIndex\">\n <button *ngFor=\"let option of options; let i = index\">\n <span class=\"event\" (click)=\"activeFilter(i)\"></span><span [innerHTML]=\"option.name\"></span>\n </button>\n </div>\n <div class=\"wac-filters__wrapper\" *ngIf=\"filterActiveIndex\">\n <button (click)=\"resetFilter()\" class=\"active\">\n <i class=\"fas fa-times\"></i><span [innerHTML]=\"options[filterActiveIndex].name\"></span>\n </button>\n <span (click)=\"resetFilter()\">{{ labelRestart }}</span>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FiltersComponent, decorators: [{
|
|
3464
|
+
type: Component,
|
|
3465
|
+
args: [{ selector: 'wac-filters', template: "<div class=\"wac-filters\">\n <div class=\"wac-filters__wrapper\" *ngIf=\"!filterActiveIndex\">\n <button *ngFor=\"let option of options; let i = index\">\n <span class=\"event\" (click)=\"activeFilter(i)\"></span><span [innerHTML]=\"option.name\"></span>\n </button>\n </div>\n <div class=\"wac-filters__wrapper\" *ngIf=\"filterActiveIndex\">\n <button (click)=\"resetFilter()\" class=\"active\">\n <i class=\"fas fa-times\"></i><span [innerHTML]=\"options[filterActiveIndex].name\"></span>\n </button>\n <span (click)=\"resetFilter()\">{{ labelRestart }}</span>\n </div>\n</div>\n" }]
|
|
3466
|
+
}], ctorParameters: function () { return []; }, propDecorators: { options: [{
|
|
3467
|
+
type: Input
|
|
3468
|
+
}], labelRestart: [{
|
|
3469
|
+
type: Input
|
|
3470
|
+
}], filterChange: [{
|
|
3471
|
+
type: Output
|
|
3472
|
+
}] } });
|
|
3473
|
+
|
|
3474
|
+
class WrapperBlocsComponent {
|
|
3475
|
+
constructor() {
|
|
3476
|
+
this.sidebar = false;
|
|
3477
|
+
}
|
|
3478
|
+
ngOnInit() {
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
3481
|
+
WrapperBlocsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WrapperBlocsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3482
|
+
WrapperBlocsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: WrapperBlocsComponent, selector: "wac-wrapper-blocs", inputs: { sidebar: "sidebar" }, ngImport: i0, template: "<div class=\"wac-wrapper-blocs\" [ngClass]=\"{'sidebar': sidebar}\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WrapperBlocsComponent, decorators: [{
|
|
3484
|
+
type: Component,
|
|
3485
|
+
args: [{ selector: 'wac-wrapper-blocs', template: "<div class=\"wac-wrapper-blocs\" [ngClass]=\"{'sidebar': sidebar}\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
3486
|
+
}], ctorParameters: function () { return []; }, propDecorators: { sidebar: [{
|
|
3487
|
+
type: Input
|
|
3488
|
+
}] } });
|
|
3489
|
+
|
|
3490
|
+
class SnackbarComponent {
|
|
3491
|
+
constructor() {
|
|
3492
|
+
this.visible = false;
|
|
3493
|
+
this.visibleChange = new EventEmitter();
|
|
3494
|
+
this.response = new EventEmitter();
|
|
3495
|
+
this.manualClose = false;
|
|
3496
|
+
}
|
|
3497
|
+
ngOnInit() {
|
|
3498
|
+
if (this.duration > 0) {
|
|
3499
|
+
this.timer = setTimeout(() => this.manualClose = true, this.duration);
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
validate() {
|
|
3503
|
+
this.response.emit(true);
|
|
3504
|
+
this.closeSnackbar();
|
|
3505
|
+
this.manualClose = true;
|
|
3506
|
+
}
|
|
3507
|
+
refuse() {
|
|
3508
|
+
this.response.emit(false);
|
|
3509
|
+
this.closeSnackbar();
|
|
3510
|
+
this.manualClose = true;
|
|
3511
|
+
}
|
|
3512
|
+
closeSnackbar() {
|
|
3513
|
+
this.visible = false;
|
|
3514
|
+
this.visibleChange.emit(this.visible);
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
SnackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SnackbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3518
|
+
SnackbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SnackbarComponent, selector: "wac-snackbar", inputs: { message: "message", textButtonOk: "textButtonOk", textButtonKo: "textButtonKo", duration: "duration", color: "color", buttonColor: "buttonColor", visible: "visible" }, outputs: { visibleChange: "visibleChange", response: "response" }, ngImport: i0, template: "<div class=\"wac-snackbar\">\n <div [class]=\"'notification is-active ' + ((color) ? color : 'is-transparent')\"\n [@state]=\"visible ? 'active': 'inactive'\"\n >\n <div class=\"columns\">\n <div class=\"column notification--message\" [ngClass]=\"{'is-half': textButtonOk}\"\n [innerHTML]=\"message\">\n </div>\n <div class=\"column is-half\">\n <button [class]=\"'button ' + ((buttonColor) ? buttonColor : 'is-success')\"\n (click)=\"validate()\">{{textButtonOk}}\n </button>\n <button [class]=\"'button ' + ((buttonColor) ? buttonColor : 'is-success')\"\n (click)=\"refuse()\">{{textButtonKo}}\n </button>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
|
|
3519
|
+
trigger('state', [
|
|
3520
|
+
state('void', style({
|
|
3521
|
+
bottom: '-100px'
|
|
3522
|
+
})),
|
|
3523
|
+
state('inactive', style({
|
|
3524
|
+
bottom: '-100px'
|
|
3525
|
+
})),
|
|
3526
|
+
state('active', style({
|
|
3527
|
+
bottom: '0px'
|
|
3528
|
+
})),
|
|
3529
|
+
transition('void => active', animate(300)),
|
|
3530
|
+
transition('active => inactive', animate(300))
|
|
3531
|
+
])
|
|
3532
|
+
], encapsulation: i0.ViewEncapsulation.None });
|
|
3533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SnackbarComponent, decorators: [{
|
|
3534
|
+
type: Component,
|
|
3535
|
+
args: [{ selector: 'wac-snackbar', encapsulation: ViewEncapsulation.None, animations: [
|
|
3536
|
+
trigger('state', [
|
|
3537
|
+
state('void', style({
|
|
3538
|
+
bottom: '-100px'
|
|
3539
|
+
})),
|
|
3540
|
+
state('inactive', style({
|
|
3541
|
+
bottom: '-100px'
|
|
3542
|
+
})),
|
|
3543
|
+
state('active', style({
|
|
3544
|
+
bottom: '0px'
|
|
3545
|
+
})),
|
|
3546
|
+
transition('void => active', animate(300)),
|
|
3547
|
+
transition('active => inactive', animate(300))
|
|
3548
|
+
])
|
|
3549
|
+
], template: "<div class=\"wac-snackbar\">\n <div [class]=\"'notification is-active ' + ((color) ? color : 'is-transparent')\"\n [@state]=\"visible ? 'active': 'inactive'\"\n >\n <div class=\"columns\">\n <div class=\"column notification--message\" [ngClass]=\"{'is-half': textButtonOk}\"\n [innerHTML]=\"message\">\n </div>\n <div class=\"column is-half\">\n <button [class]=\"'button ' + ((buttonColor) ? buttonColor : 'is-success')\"\n (click)=\"validate()\">{{textButtonOk}}\n </button>\n <button [class]=\"'button ' + ((buttonColor) ? buttonColor : 'is-success')\"\n (click)=\"refuse()\">{{textButtonKo}}\n </button>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
3550
|
+
}], propDecorators: { message: [{
|
|
3551
|
+
type: Input
|
|
3552
|
+
}], textButtonOk: [{
|
|
3553
|
+
type: Input
|
|
3554
|
+
}], textButtonKo: [{
|
|
3555
|
+
type: Input
|
|
3556
|
+
}], duration: [{
|
|
3557
|
+
type: Input
|
|
3558
|
+
}], color: [{
|
|
3559
|
+
type: Input
|
|
3560
|
+
}], buttonColor: [{
|
|
3561
|
+
type: Input
|
|
3562
|
+
}], visible: [{
|
|
3563
|
+
type: Input
|
|
3564
|
+
}], visibleChange: [{
|
|
3565
|
+
type: Output
|
|
3566
|
+
}], response: [{
|
|
3567
|
+
type: Output
|
|
3568
|
+
}] } });
|
|
3569
|
+
|
|
3570
|
+
class AlertPopupComponent {
|
|
3571
|
+
constructor() {
|
|
3572
|
+
/** Subject for notifying the user that the dialog has finished closing. */
|
|
3573
|
+
this.afterClosedPopup = new Subject();
|
|
3574
|
+
this.open = false;
|
|
3575
|
+
}
|
|
3576
|
+
ngOnInit() {
|
|
3577
|
+
setTimeout(() => {
|
|
3578
|
+
this.open = true;
|
|
3579
|
+
}, 50);
|
|
3580
|
+
if (this.config.duration > 0) {
|
|
3581
|
+
this.timer = setTimeout(() => this.dismiss(), this.config.duration);
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
dismiss() {
|
|
3585
|
+
this.open = false;
|
|
3586
|
+
setTimeout(() => {
|
|
3587
|
+
this.afterClosedPopup.next(true);
|
|
3588
|
+
this.afterClosedPopup.complete();
|
|
3589
|
+
}, 200);
|
|
3590
|
+
}
|
|
3591
|
+
/**
|
|
3592
|
+
* Gets an observable that is notified when the dialog is finished closing.
|
|
3593
|
+
*/
|
|
3594
|
+
afterClosed() {
|
|
3595
|
+
return this.afterClosedPopup.asObservable();
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
AlertPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3599
|
+
AlertPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: AlertPopupComponent, selector: "wac-alert-popup", host: { classAttribute: "wac-alert-popup" }, ngImport: i0, template: "<div\n [class]=\"'alert ' + ((config.color) ? config.color : ' is-primary') + ((config.extraClasses) ? ' ' + config.extraClasses : '') + ((config.position) ? ' ' + config.position : '') + ((config.fullsize) ? ' fullsize' : '') + ((config.opacity) ? ' opacity-active' : '') + ((config.small) ? ' small' : '') + ((config.icon) ? ' with-icon' : '')\"\n [ngClass]=\"{'is-active': open}\"\n>\n <div class=\"alert--message\">\n <span class=\"icon\" *ngIf=\"config.icon\">\n <i [class]=\"config.icon\"></i>\n </span>\n <span (click)=\"dismiss()\" class=\"wac-alert-popup__close\"><i class=\"fas fa-times\"></i></span>\n <p *ngIf=\"config.title\" class=\"wac-alert-popup__title\" [innerHTML]=\"config.title\"></p>\n <p *ngIf=\"config.message\" class=\"wac-alert-popup__text\" [innerHTML]=\"config.message\"></p>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3600
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupComponent, decorators: [{
|
|
3601
|
+
type: Component,
|
|
3602
|
+
args: [{ selector: 'wac-alert-popup', host: {
|
|
3603
|
+
class: 'wac-alert-popup'
|
|
3604
|
+
}, encapsulation: ViewEncapsulation.None, template: "<div\n [class]=\"'alert ' + ((config.color) ? config.color : ' is-primary') + ((config.extraClasses) ? ' ' + config.extraClasses : '') + ((config.position) ? ' ' + config.position : '') + ((config.fullsize) ? ' fullsize' : '') + ((config.opacity) ? ' opacity-active' : '') + ((config.small) ? ' small' : '') + ((config.icon) ? ' with-icon' : '')\"\n [ngClass]=\"{'is-active': open}\"\n>\n <div class=\"alert--message\">\n <span class=\"icon\" *ngIf=\"config.icon\">\n <i [class]=\"config.icon\"></i>\n </span>\n <span (click)=\"dismiss()\" class=\"wac-alert-popup__close\"><i class=\"fas fa-times\"></i></span>\n <p *ngIf=\"config.title\" class=\"wac-alert-popup__title\" [innerHTML]=\"config.title\"></p>\n <p *ngIf=\"config.message\" class=\"wac-alert-popup__text\" [innerHTML]=\"config.message\"></p>\n </div>\n</div>\n" }]
|
|
3605
|
+
}] });
|
|
3606
|
+
|
|
3607
|
+
class AlertPopupService {
|
|
3608
|
+
constructor(domService) {
|
|
3609
|
+
this.domService = domService;
|
|
3610
|
+
}
|
|
3611
|
+
open(config) {
|
|
3612
|
+
const componentRef = this.getComponentRef(config);
|
|
3613
|
+
return componentRef.instance;
|
|
3614
|
+
}
|
|
3615
|
+
getComponentRef(config) {
|
|
3616
|
+
const componentRef = this.domService.attachComponentPortal(AlertPopupComponent);
|
|
3617
|
+
config = Object.assign({
|
|
3618
|
+
position: 'is-top'
|
|
3619
|
+
}, config);
|
|
3620
|
+
componentRef.instance.config = config;
|
|
3621
|
+
componentRef.instance.afterClosed().subscribe(() => {
|
|
3622
|
+
componentRef.destroy();
|
|
3623
|
+
});
|
|
3624
|
+
return componentRef;
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
AlertPopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupService, deps: [{ token: DomService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3628
|
+
AlertPopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupService });
|
|
3629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupService, decorators: [{
|
|
3630
|
+
type: Injectable
|
|
3631
|
+
}], ctorParameters: function () { return [{ type: DomService }]; } });
|
|
3632
|
+
|
|
3633
|
+
class AlertPopupModule {
|
|
3634
|
+
}
|
|
3635
|
+
AlertPopupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3636
|
+
AlertPopupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupModule, declarations: [AlertPopupComponent], imports: [CommonModule], exports: [AlertPopupComponent] });
|
|
3637
|
+
AlertPopupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupModule, providers: [AlertPopupService], imports: [CommonModule] });
|
|
3638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AlertPopupModule, decorators: [{
|
|
3639
|
+
type: NgModule,
|
|
3640
|
+
args: [{
|
|
3641
|
+
imports: [CommonModule],
|
|
3642
|
+
providers: [AlertPopupService],
|
|
3643
|
+
entryComponents: [AlertPopupComponent],
|
|
3644
|
+
declarations: [AlertPopupComponent],
|
|
3645
|
+
exports: [AlertPopupComponent]
|
|
3646
|
+
}]
|
|
3647
|
+
}] });
|
|
3648
|
+
|
|
3649
|
+
class SearchComponent {
|
|
3650
|
+
constructor() {
|
|
3651
|
+
this.alwaysOpen = false;
|
|
3652
|
+
this.disableSearchIn = false;
|
|
3653
|
+
this.emptyResult = '';
|
|
3654
|
+
this.search = '';
|
|
3655
|
+
this.openSelect = false;
|
|
3656
|
+
this.selectValue = new EventEmitter();
|
|
3657
|
+
this.searchKeyUp = new EventEmitter();
|
|
3658
|
+
this.searchFocusOut = new EventEmitter();
|
|
3659
|
+
}
|
|
3660
|
+
ngOnInit() {
|
|
3661
|
+
this.triggerOptions = this.options;
|
|
3662
|
+
}
|
|
3663
|
+
onClose() {
|
|
3664
|
+
this.openSelect = false;
|
|
3665
|
+
}
|
|
3666
|
+
setSearchValueToQuery(value) {
|
|
3667
|
+
this.search = value.target.value;
|
|
3668
|
+
if (this.disableSearchIn) {
|
|
3669
|
+
this.triggerOptions = this.options;
|
|
3670
|
+
}
|
|
3671
|
+
else {
|
|
3672
|
+
if (this.search.length > 0) {
|
|
3673
|
+
this.openSelect = true;
|
|
3674
|
+
this.triggerOptions = this.options.filter(element => element.label.toLowerCase().indexOf(this.search.toLowerCase()) !== -1);
|
|
3675
|
+
}
|
|
3676
|
+
else {
|
|
3677
|
+
this.triggerOptions = this.options;
|
|
3678
|
+
}
|
|
3679
|
+
}
|
|
3680
|
+
this.searchKeyUp.emit(this.search);
|
|
3681
|
+
}
|
|
3682
|
+
sendEventFocusOut() {
|
|
3683
|
+
this.searchFocusOut.emit(this.search);
|
|
3684
|
+
}
|
|
3685
|
+
closeSelect() {
|
|
3686
|
+
this.openSelect = false;
|
|
3687
|
+
}
|
|
3688
|
+
onSelectItem(index, value, label) {
|
|
3689
|
+
this.search = '';
|
|
3690
|
+
this.openSelect = false;
|
|
3691
|
+
if (this.disableSearchIn) {
|
|
3692
|
+
this.selectValue.emit(index);
|
|
3693
|
+
}
|
|
3694
|
+
else {
|
|
3695
|
+
const findInOption = this.options.findIndex(element => element.label === label && element.id === value);
|
|
3696
|
+
this.selectValue.emit(findInOption);
|
|
3697
|
+
}
|
|
3698
|
+
}
|
|
3699
|
+
resetAllVue() {
|
|
3700
|
+
this.search = '';
|
|
3701
|
+
this.closeSelect();
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
SearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3705
|
+
SearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SearchComponent, selector: "wac-search", inputs: { placeholder: "placeholder", alwaysOpen: "alwaysOpen", label: "label", options: "options", disableSearchIn: "disableSearchIn", emptyResult: "emptyResult" }, outputs: { selectValue: "selectValue", searchKeyUp: "searchKeyUp", searchFocusOut: "searchFocusOut" }, ngImport: i0, template: "<div class=\"wac-search\" [ngClass]=\"{ open: openSelect || alwaysOpen }\" [zIndexToggle]=\"openSelect\" wzAutoHide (clickOutside)=\"closeSelect()\">\n <div class=\"wac-search__wrapper\">\n <button><i class=\"fal fa-search\"></i></button>\n <input [value]=\"search\" type=\"text\" required [placeholder]=\"placeholder\" (focus)=\"openSelect = true;\" (focusout)=\"sendEventFocusOut()\" (keyup)=\"setSearchValueToQuery($event)\" />\n </div>\n <div class=\"wac-search__absolute\" *ngIf=\"triggerOptions\" [ngClass]=\"{'hidden': !openSelect}\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"triggerOptions.length > 0\">\n <div (click)=\"onClose()\" class=\"wac-select__content__item\" *ngFor=\"let item of triggerOptions; let index = index;\">\n <div [ngClass]=\"{ selected: item.checked }\" (click)=\"onSelectItem(index, item.id, item.label)\">\n {{ item.label }}\n </div>\n </div>\n </perfect-scrollbar>\n <div class=\"wac-select__content__empty\" *ngIf=\"triggerOptions.length === 0\">\n <span *ngIf=\"emptyResult\">{{emptyResult}}</span>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "component", type: i4.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }] });
|
|
3706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SearchComponent, decorators: [{
|
|
3707
|
+
type: Component,
|
|
3708
|
+
args: [{ selector: 'wac-search', template: "<div class=\"wac-search\" [ngClass]=\"{ open: openSelect || alwaysOpen }\" [zIndexToggle]=\"openSelect\" wzAutoHide (clickOutside)=\"closeSelect()\">\n <div class=\"wac-search__wrapper\">\n <button><i class=\"fal fa-search\"></i></button>\n <input [value]=\"search\" type=\"text\" required [placeholder]=\"placeholder\" (focus)=\"openSelect = true;\" (focusout)=\"sendEventFocusOut()\" (keyup)=\"setSearchValueToQuery($event)\" />\n </div>\n <div class=\"wac-search__absolute\" *ngIf=\"triggerOptions\" [ngClass]=\"{'hidden': !openSelect}\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"triggerOptions.length > 0\">\n <div (click)=\"onClose()\" class=\"wac-select__content__item\" *ngFor=\"let item of triggerOptions; let index = index;\">\n <div [ngClass]=\"{ selected: item.checked }\" (click)=\"onSelectItem(index, item.id, item.label)\">\n {{ item.label }}\n </div>\n </div>\n </perfect-scrollbar>\n <div class=\"wac-select__content__empty\" *ngIf=\"triggerOptions.length === 0\">\n <span *ngIf=\"emptyResult\">{{emptyResult}}</span>\n </div>\n </div>\n</div>\n" }]
|
|
3709
|
+
}], ctorParameters: function () { return []; }, propDecorators: { placeholder: [{
|
|
3710
|
+
type: Input
|
|
3711
|
+
}], alwaysOpen: [{
|
|
3712
|
+
type: Input
|
|
3713
|
+
}], label: [{
|
|
3714
|
+
type: Input
|
|
3715
|
+
}], options: [{
|
|
3716
|
+
type: Input
|
|
3717
|
+
}], disableSearchIn: [{
|
|
3718
|
+
type: Input
|
|
3719
|
+
}], emptyResult: [{
|
|
3720
|
+
type: Input
|
|
3721
|
+
}], selectValue: [{
|
|
3722
|
+
type: Output
|
|
3723
|
+
}], searchKeyUp: [{
|
|
3724
|
+
type: Output
|
|
3725
|
+
}], searchFocusOut: [{
|
|
3726
|
+
type: Output
|
|
3727
|
+
}] } });
|
|
3728
|
+
|
|
3729
|
+
class AreAllOptionsSelectedPipe {
|
|
3730
|
+
transform(options) {
|
|
3731
|
+
return !options.some(option => !option.checked);
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
AreAllOptionsSelectedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AreAllOptionsSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3735
|
+
AreAllOptionsSelectedPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: AreAllOptionsSelectedPipe, name: "areAllOptionsSelected", pure: false });
|
|
3736
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: AreAllOptionsSelectedPipe, decorators: [{
|
|
3737
|
+
type: Pipe,
|
|
3738
|
+
args: [{
|
|
3739
|
+
name: 'areAllOptionsSelected',
|
|
3740
|
+
pure: false
|
|
3741
|
+
}]
|
|
3742
|
+
}] });
|
|
3743
|
+
|
|
3744
|
+
class SelectedListComponent {
|
|
3745
|
+
constructor() {
|
|
3746
|
+
this.options = [];
|
|
3747
|
+
this.enableSelectAll = true;
|
|
3748
|
+
this.selectedItemsIndex = new EventEmitter();
|
|
3749
|
+
this.selectedItemsAll = new EventEmitter();
|
|
3750
|
+
this.unSelectedItemsAll = new EventEmitter();
|
|
3751
|
+
this.selectedOptionIndex = [];
|
|
3752
|
+
}
|
|
3753
|
+
ngOnInit() {
|
|
3754
|
+
}
|
|
3755
|
+
onSelectAll() {
|
|
3756
|
+
this.selectedOptionIndex = this.options.map((option, index) => {
|
|
3757
|
+
option.checked = true;
|
|
3758
|
+
return index;
|
|
3759
|
+
});
|
|
3760
|
+
this.selectedItemsAll.emit(this.selectedOptionIndex);
|
|
3761
|
+
}
|
|
3762
|
+
onUnSelectAll() {
|
|
3763
|
+
this.selectedOptionIndex = this.options.map((option, index) => {
|
|
3764
|
+
option.checked = false;
|
|
3765
|
+
return index;
|
|
3766
|
+
});
|
|
3767
|
+
this.unSelectedItemsAll.emit(this.selectedOptionIndex);
|
|
3768
|
+
}
|
|
3769
|
+
onSelectItem(index) {
|
|
3770
|
+
this.options[index].checked = !this.options[index].checked;
|
|
3771
|
+
this.selectedItemsIndex.emit(index);
|
|
3772
|
+
}
|
|
3773
|
+
areAllOptionsChecked() {
|
|
3774
|
+
return !this.options.some(option => !option.checked);
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
SelectedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectedListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3778
|
+
SelectedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SelectedListComponent, selector: "wac-selected-list", inputs: { options: "options", label: "label", textSelectAll: "textSelectAll", textUnSelectAll: "textUnSelectAll", enableSelectAll: "enableSelectAll" }, outputs: { selectedItemsIndex: "selectedItemsIndex", selectedItemsAll: "selectedItemsAll", unSelectedItemsAll: "unSelectedItemsAll" }, ngImport: i0, template: "<div class=\"selected-list\">\n <div class=\"selected-list__wrapper\">\n <div class=\"selected-list__wrapper__head\">\n <p *ngIf=\"label\" [innerHTML]=\"label\"></p>\n <ng-container *ngVar=\"(options | areAllOptionsSelected) as areAllOptionsSelected\">\n <ng-container *ngIf=\"textSelectAll && !areAllOptionsSelected\">\n\n <div class=\"selected-list__wrapper__head__button\">\n\n <div class=\"selected-list__wrapper__head__button__notMobile\">\n <wac-button\n [label]=\"textSelectAll\"\n (click)=\"onSelectAll()\"\n >\n </wac-button>\n </div>\n\n <div class=\"selected-list__wrapper__head__button__mobile\">\n <wac-button\n [extraClasses]=\"'is-grey'\"\n [icon]=\"'fad fa-check-double'\"\n (click)=\"onSelectAll()\"\n >\n </wac-button>\n </div>\n\n </div>\n\n </ng-container>\n\n <ng-container *ngIf=\"textUnSelectAll && areAllOptionsSelected\">\n\n <div class=\"selected-list__wrapper__head__button\">\n\n <div class=\"selected-list__wrapper__head__button__notMobile\">\n <wac-button\n [extraClasses]=\"'is-info'\"\n [label]=\"textUnSelectAll\"\n (click)=\"onUnSelectAll()\"\n >\n </wac-button>\n </div>\n\n <div class=\"selected-list__wrapper__head__button__mobile\">\n <wac-button\n [extraClasses]=\"'is-grey'\"\n [icon]=\"'fad fa-check-double'\"\n (click)=\"onUnSelectAll()\"\n >\n </wac-button>\n </div>\n\n </div>\n\n </ng-container>\n\n </ng-container>\n\n </div>\n <div class=\"selected-list__wrapper__content\">\n <div class=\"selected-list__wrapper__content__item\" *ngFor=\"let item of options;let i = index;\" [ngClass]=\"{'active': item.checked}\" (click)=\"onSelectItem(i)\">\n <span [innerHTML]=\"item.label\"></span>\n <i class=\"fas fa-check\"></i>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: VarDirective, selector: "[ngVar]", inputs: ["ngVar"] }, { kind: "component", type: ButtonComponent, selector: "wac-button", inputs: ["extraClasses", "label", "icon", "iconNext", "widthAuto", "contentHorizontalPosition", "iconFontSize", "hasLoader", "disabled", "whiteSpaceNowrap", "opacity", "animation", "animationRight", "animationText", "confirmDelete", "confirmDeleteText", "confirmDeletePosition", "isLoading"], outputs: ["click", "isLoadingChange"] }, { kind: "pipe", type: AreAllOptionsSelectedPipe, name: "areAllOptionsSelected" }] });
|
|
3779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectedListComponent, decorators: [{
|
|
3780
|
+
type: Component,
|
|
3781
|
+
args: [{ selector: 'wac-selected-list', template: "<div class=\"selected-list\">\n <div class=\"selected-list__wrapper\">\n <div class=\"selected-list__wrapper__head\">\n <p *ngIf=\"label\" [innerHTML]=\"label\"></p>\n <ng-container *ngVar=\"(options | areAllOptionsSelected) as areAllOptionsSelected\">\n <ng-container *ngIf=\"textSelectAll && !areAllOptionsSelected\">\n\n <div class=\"selected-list__wrapper__head__button\">\n\n <div class=\"selected-list__wrapper__head__button__notMobile\">\n <wac-button\n [label]=\"textSelectAll\"\n (click)=\"onSelectAll()\"\n >\n </wac-button>\n </div>\n\n <div class=\"selected-list__wrapper__head__button__mobile\">\n <wac-button\n [extraClasses]=\"'is-grey'\"\n [icon]=\"'fad fa-check-double'\"\n (click)=\"onSelectAll()\"\n >\n </wac-button>\n </div>\n\n </div>\n\n </ng-container>\n\n <ng-container *ngIf=\"textUnSelectAll && areAllOptionsSelected\">\n\n <div class=\"selected-list__wrapper__head__button\">\n\n <div class=\"selected-list__wrapper__head__button__notMobile\">\n <wac-button\n [extraClasses]=\"'is-info'\"\n [label]=\"textUnSelectAll\"\n (click)=\"onUnSelectAll()\"\n >\n </wac-button>\n </div>\n\n <div class=\"selected-list__wrapper__head__button__mobile\">\n <wac-button\n [extraClasses]=\"'is-grey'\"\n [icon]=\"'fad fa-check-double'\"\n (click)=\"onUnSelectAll()\"\n >\n </wac-button>\n </div>\n\n </div>\n\n </ng-container>\n\n </ng-container>\n\n </div>\n <div class=\"selected-list__wrapper__content\">\n <div class=\"selected-list__wrapper__content__item\" *ngFor=\"let item of options;let i = index;\" [ngClass]=\"{'active': item.checked}\" (click)=\"onSelectItem(i)\">\n <span [innerHTML]=\"item.label\"></span>\n <i class=\"fas fa-check\"></i>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
3782
|
+
}], propDecorators: { options: [{
|
|
3783
|
+
type: Input
|
|
3784
|
+
}], label: [{
|
|
3785
|
+
type: Input
|
|
3786
|
+
}], textSelectAll: [{
|
|
3787
|
+
type: Input
|
|
3788
|
+
}], textUnSelectAll: [{
|
|
3789
|
+
type: Input
|
|
3790
|
+
}], enableSelectAll: [{
|
|
3791
|
+
type: Input
|
|
3792
|
+
}], selectedItemsIndex: [{
|
|
3793
|
+
type: Output
|
|
3794
|
+
}], selectedItemsAll: [{
|
|
3795
|
+
type: Output
|
|
3796
|
+
}], unSelectedItemsAll: [{
|
|
3797
|
+
type: Output
|
|
3798
|
+
}] } });
|
|
3799
|
+
|
|
3800
|
+
class TreeComponent {
|
|
3801
|
+
constructor() {
|
|
3802
|
+
this.treeDepth = 0;
|
|
3803
|
+
}
|
|
3804
|
+
ngOnInit() { }
|
|
3805
|
+
}
|
|
3806
|
+
TreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3807
|
+
TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TreeComponent, selector: "wac-tree", inputs: { items: "items", treeDepth: "treeDepth", optionTemplate: "optionTemplate" }, ngImport: i0, template: "<div *ngFor=\"let item of items; index as i\" [ngClass]=\"['treeDepth-' + treeDepth]\">\n <ul>\n <li>\n\n <ng-template #defaultItem>\n {{ item?.treeLabel }}\n </ng-template>\n\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate || defaultItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n >\n </ng-container>\n\n <wac-tree [optionTemplate]=\"optionTemplate\" [items]=\"item.treeChildren\" *ngIf=\"item.treeChildren?.length\" [treeDepth]=\"treeDepth + 1\">\n <!-- Todo maybe pass child template -->\n\n </wac-tree>\n </li>\n </ul>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TreeComponent, selector: "wac-tree", inputs: ["items", "treeDepth", "optionTemplate"] }] });
|
|
3808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TreeComponent, decorators: [{
|
|
3809
|
+
type: Component,
|
|
3810
|
+
args: [{ selector: 'wac-tree', template: "<div *ngFor=\"let item of items; index as i\" [ngClass]=\"['treeDepth-' + treeDepth]\">\n <ul>\n <li>\n\n <ng-template #defaultItem>\n {{ item?.treeLabel }}\n </ng-template>\n\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate || defaultItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n >\n </ng-container>\n\n <wac-tree [optionTemplate]=\"optionTemplate\" [items]=\"item.treeChildren\" *ngIf=\"item.treeChildren?.length\" [treeDepth]=\"treeDepth + 1\">\n <!-- Todo maybe pass child template -->\n\n </wac-tree>\n </li>\n </ul>\n</div>" }]
|
|
3811
|
+
}], ctorParameters: function () { return []; }, propDecorators: { items: [{
|
|
3812
|
+
type: Input
|
|
3813
|
+
}], treeDepth: [{
|
|
3814
|
+
type: Input
|
|
3815
|
+
}], optionTemplate: [{
|
|
3816
|
+
type: Input,
|
|
3817
|
+
args: ["optionTemplate"]
|
|
3818
|
+
}] } });
|
|
3819
|
+
|
|
3820
|
+
class FormatObjectToRecursifTreePipe {
|
|
3821
|
+
constructor() {
|
|
3822
|
+
this.childrenProperties = [];
|
|
3823
|
+
}
|
|
3824
|
+
transform(objectList, childrenProperties) {
|
|
3825
|
+
this.childrenProperties = childrenProperties;
|
|
3826
|
+
const treeDepth = 0;
|
|
3827
|
+
objectList.forEach(object => this.recursiveFormatObjectToRecursifTree(object, treeDepth));
|
|
3828
|
+
return objectList;
|
|
3829
|
+
}
|
|
3830
|
+
recursiveFormatObjectToRecursifTree(object, treeDepth) {
|
|
3831
|
+
for (const childrenProperty of this.childrenProperties) {
|
|
3832
|
+
object.hasTreeChildren = true;
|
|
3833
|
+
if (!object.hasOwnProperty(childrenProperty)) {
|
|
3834
|
+
// No more chrildren
|
|
3835
|
+
object.hasTreeChildren = false;
|
|
3836
|
+
continue;
|
|
3837
|
+
}
|
|
3838
|
+
if (!Array.isArray(object[childrenProperty])) {
|
|
3839
|
+
throw `Property : "${childrenProperty}", is not an array. it could not be transform to a recursive list.`;
|
|
3840
|
+
}
|
|
3841
|
+
// Add treeChildren property filled with name children property
|
|
3842
|
+
object.treeChildren = object[childrenProperty];
|
|
3843
|
+
// call this function recursively until no children can be generated
|
|
3844
|
+
this.recursiveFormatObjectToRecursifTree(object.treeChildren, treeDepth++);
|
|
3845
|
+
break;
|
|
3846
|
+
}
|
|
3847
|
+
object.treeDepth = treeDepth;
|
|
3848
|
+
}
|
|
3849
|
+
}
|
|
3850
|
+
FormatObjectToRecursifTreePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FormatObjectToRecursifTreePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3851
|
+
FormatObjectToRecursifTreePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: FormatObjectToRecursifTreePipe, name: "formatObjectToRecursifTree" });
|
|
3852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FormatObjectToRecursifTreePipe, decorators: [{
|
|
3853
|
+
type: Pipe,
|
|
3854
|
+
args: [{
|
|
3855
|
+
name: 'formatObjectToRecursifTree'
|
|
3856
|
+
}]
|
|
3857
|
+
}] });
|
|
3858
|
+
|
|
3859
|
+
class FormatObjectToSimpleTreePipe {
|
|
3860
|
+
constructor() {
|
|
3861
|
+
this.childrenProperties = [];
|
|
3862
|
+
this.labelProperties = [];
|
|
3863
|
+
}
|
|
3864
|
+
transform(objectList, childrenProperties, labelProperties) {
|
|
3865
|
+
this.childrenProperties = childrenProperties;
|
|
3866
|
+
this.labelProperties = labelProperties;
|
|
3867
|
+
const treeDepth = 0;
|
|
3868
|
+
objectList.forEach(object => this.recursiveFormatObjectToSimpleTree(object, treeDepth));
|
|
3869
|
+
return objectList;
|
|
3870
|
+
}
|
|
3871
|
+
recursiveFormatObjectToSimpleTree(object, treeDepth) {
|
|
3872
|
+
for (const property in object) {
|
|
3873
|
+
if (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
3874
|
+
continue;
|
|
3875
|
+
}
|
|
3876
|
+
if (this.labelProperties.includes(property)) {
|
|
3877
|
+
object.treeLabel = object[property];
|
|
3878
|
+
continue;
|
|
3879
|
+
}
|
|
3880
|
+
object.hasTreeChildren = true;
|
|
3881
|
+
if (!this.childrenProperties.includes(property)) {
|
|
3882
|
+
// No more chrildren
|
|
3883
|
+
object.hasTreeChildren = false;
|
|
3884
|
+
continue;
|
|
3885
|
+
}
|
|
3886
|
+
if (!Array.isArray(object[property])) {
|
|
3887
|
+
throw `Property : "${property}", is not an array. it could not be transform to a recursive list.`;
|
|
3888
|
+
}
|
|
3889
|
+
// Add treeChildren property filled with name children property
|
|
3890
|
+
object.treeChildren = object[property];
|
|
3891
|
+
// call this function recursively until no children can be generated
|
|
3892
|
+
this.recursiveFormatObjectToSimpleTree(object.treeChildren, treeDepth++);
|
|
3893
|
+
break;
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
FormatObjectToSimpleTreePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FormatObjectToSimpleTreePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3898
|
+
FormatObjectToSimpleTreePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: FormatObjectToSimpleTreePipe, name: "formatObjectToSimpleTree" });
|
|
3899
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FormatObjectToSimpleTreePipe, decorators: [{
|
|
3900
|
+
type: Pipe,
|
|
3901
|
+
args: [{
|
|
3902
|
+
name: 'formatObjectToSimpleTree'
|
|
3903
|
+
}]
|
|
3904
|
+
}] });
|
|
3905
|
+
|
|
3906
|
+
const exportedPipes = [FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe];
|
|
3907
|
+
const pipes = [
|
|
3908
|
+
SelectFiltersPipe,
|
|
3909
|
+
AreAllOptionsSelectedPipe
|
|
3910
|
+
];
|
|
3911
|
+
class SharedPipes {
|
|
3912
|
+
}
|
|
3913
|
+
SharedPipes.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedPipes, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3914
|
+
SharedPipes.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: SharedPipes, declarations: [FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, SelectFiltersPipe,
|
|
3915
|
+
AreAllOptionsSelectedPipe], imports: [CommonModule, FormsModule], exports: [FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, SelectFiltersPipe,
|
|
3916
|
+
AreAllOptionsSelectedPipe] });
|
|
3917
|
+
SharedPipes.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedPipes, imports: [CommonModule, FormsModule] });
|
|
3918
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedPipes, decorators: [{
|
|
3919
|
+
type: NgModule,
|
|
3920
|
+
args: [{
|
|
3921
|
+
imports: [CommonModule, FormsModule],
|
|
3922
|
+
declarations: [...exportedPipes, ...pipes],
|
|
3923
|
+
exports: [...exportedPipes, ...pipes]
|
|
3924
|
+
}]
|
|
3925
|
+
}] });
|
|
3926
|
+
|
|
3927
|
+
class TreeModule {
|
|
3928
|
+
}
|
|
3929
|
+
TreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3930
|
+
TreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: TreeModule, declarations: [TreeComponent], imports: [CommonModule,
|
|
3931
|
+
FormsModule,
|
|
3932
|
+
SharedPipes], exports: [TreeComponent] });
|
|
3933
|
+
TreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TreeModule, imports: [CommonModule,
|
|
3934
|
+
FormsModule,
|
|
3935
|
+
SharedPipes] });
|
|
3936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TreeModule, decorators: [{
|
|
3937
|
+
type: NgModule,
|
|
3938
|
+
args: [{
|
|
3939
|
+
imports: [
|
|
3940
|
+
CommonModule,
|
|
3941
|
+
FormsModule,
|
|
3942
|
+
SharedPipes
|
|
3943
|
+
],
|
|
3944
|
+
exports: [TreeComponent],
|
|
3945
|
+
declarations: [TreeComponent],
|
|
3946
|
+
providers: [],
|
|
3947
|
+
}]
|
|
3948
|
+
}] });
|
|
3949
|
+
|
|
3950
|
+
const components = [
|
|
3951
|
+
TagComponent,
|
|
3952
|
+
TabComponent,
|
|
3953
|
+
ButtonComponent,
|
|
3954
|
+
InfoComponent,
|
|
3955
|
+
SettingsComponent,
|
|
3956
|
+
DeleteComponent,
|
|
3957
|
+
DropdownComponent,
|
|
3958
|
+
ImageComponent,
|
|
3959
|
+
BackComponent,
|
|
3960
|
+
SeparatorComponent,
|
|
3961
|
+
LogoComponent,
|
|
3962
|
+
RadioComponent,
|
|
3963
|
+
StateComponent,
|
|
3964
|
+
LabelComponent,
|
|
3965
|
+
CalendarComponent,
|
|
3966
|
+
WzEditInPlaceComponent,
|
|
3967
|
+
AlertComponent,
|
|
3968
|
+
HeaderPageComponent,
|
|
3969
|
+
SwitchComponent,
|
|
3970
|
+
LinkComponent,
|
|
3971
|
+
H1Component,
|
|
3972
|
+
H2Component,
|
|
3973
|
+
H3Component,
|
|
3974
|
+
H4Component,
|
|
3975
|
+
TextComponent,
|
|
3976
|
+
TextAreaComponent,
|
|
3977
|
+
UploadComponent,
|
|
3978
|
+
SelectInTextComponent,
|
|
3979
|
+
SelectComponent,
|
|
3980
|
+
MultipleSearchComponent,
|
|
3981
|
+
MultipleSearchPlusComponent,
|
|
3982
|
+
InputWithSelectComponent,
|
|
3983
|
+
PopinComponent,
|
|
3984
|
+
FreePopinComponent,
|
|
3985
|
+
BlockComponent,
|
|
3986
|
+
WrapperComponent,
|
|
3987
|
+
FiltersComponent,
|
|
3988
|
+
WrapperBlocsComponent,
|
|
3989
|
+
SnackbarComponent,
|
|
3990
|
+
SearchComponent,
|
|
3991
|
+
SelectedListComponent
|
|
3992
|
+
];
|
|
3993
|
+
const exportsFromModule = [
|
|
3994
|
+
PaginationComponent,
|
|
3995
|
+
TableComponent,
|
|
3996
|
+
TableColumn,
|
|
3997
|
+
CheckBoxRow,
|
|
3998
|
+
TableColumnHeader,
|
|
3999
|
+
TableRow,
|
|
4000
|
+
InputSearchComponent,
|
|
4001
|
+
InputComponent,
|
|
4002
|
+
TooltipComponent,
|
|
4003
|
+
CheckboxComponent,
|
|
4004
|
+
LoaderComponent,
|
|
4005
|
+
ProgressBarComponent,
|
|
4006
|
+
TreeComponent
|
|
4007
|
+
];
|
|
4008
|
+
class SharedComponentsModule {
|
|
4009
|
+
}
|
|
4010
|
+
SharedComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4011
|
+
SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: SharedComponentsModule, declarations: [TagComponent,
|
|
4012
|
+
TabComponent,
|
|
4013
|
+
ButtonComponent,
|
|
4014
|
+
InfoComponent,
|
|
4015
|
+
SettingsComponent,
|
|
4016
|
+
DeleteComponent,
|
|
4017
|
+
DropdownComponent,
|
|
4018
|
+
ImageComponent,
|
|
4019
|
+
BackComponent,
|
|
4020
|
+
SeparatorComponent,
|
|
4021
|
+
LogoComponent,
|
|
4022
|
+
RadioComponent,
|
|
4023
|
+
StateComponent,
|
|
4024
|
+
LabelComponent,
|
|
4025
|
+
CalendarComponent,
|
|
4026
|
+
WzEditInPlaceComponent,
|
|
4027
|
+
AlertComponent,
|
|
4028
|
+
HeaderPageComponent,
|
|
4029
|
+
SwitchComponent,
|
|
4030
|
+
LinkComponent,
|
|
4031
|
+
H1Component,
|
|
4032
|
+
H2Component,
|
|
4033
|
+
H3Component,
|
|
4034
|
+
H4Component,
|
|
4035
|
+
TextComponent,
|
|
4036
|
+
TextAreaComponent,
|
|
4037
|
+
UploadComponent,
|
|
4038
|
+
SelectInTextComponent,
|
|
4039
|
+
SelectComponent,
|
|
4040
|
+
MultipleSearchComponent,
|
|
4041
|
+
MultipleSearchPlusComponent,
|
|
4042
|
+
InputWithSelectComponent,
|
|
4043
|
+
PopinComponent,
|
|
4044
|
+
FreePopinComponent,
|
|
4045
|
+
BlockComponent,
|
|
4046
|
+
WrapperComponent,
|
|
4047
|
+
FiltersComponent,
|
|
4048
|
+
WrapperBlocsComponent,
|
|
4049
|
+
SnackbarComponent,
|
|
4050
|
+
SearchComponent,
|
|
4051
|
+
SelectedListComponent], imports: [CommonModule,
|
|
4052
|
+
FormsModule,
|
|
4053
|
+
NwbAllModule, i1$3.TranslateModule, ReactiveFormsModule,
|
|
4054
|
+
SharedDirectives,
|
|
4055
|
+
SharedPipes,
|
|
4056
|
+
CdkTableModule,
|
|
4057
|
+
TagInputModule,
|
|
4058
|
+
PaginationModule,
|
|
4059
|
+
TableModule,
|
|
4060
|
+
InputSearchModule,
|
|
4061
|
+
TooltipModule,
|
|
4062
|
+
CheckboxModule,
|
|
4063
|
+
InputModule,
|
|
4064
|
+
LoaderModule,
|
|
4065
|
+
ProgressBarModule,
|
|
4066
|
+
PerfectScrollbarModule,
|
|
4067
|
+
AlertPopupModule,
|
|
4068
|
+
RouterModule,
|
|
4069
|
+
TreeModule], exports: [TagComponent,
|
|
4070
|
+
TabComponent,
|
|
4071
|
+
ButtonComponent,
|
|
4072
|
+
InfoComponent,
|
|
4073
|
+
SettingsComponent,
|
|
4074
|
+
DeleteComponent,
|
|
4075
|
+
DropdownComponent,
|
|
4076
|
+
ImageComponent,
|
|
4077
|
+
BackComponent,
|
|
4078
|
+
SeparatorComponent,
|
|
4079
|
+
LogoComponent,
|
|
4080
|
+
RadioComponent,
|
|
4081
|
+
StateComponent,
|
|
4082
|
+
LabelComponent,
|
|
4083
|
+
CalendarComponent,
|
|
4084
|
+
WzEditInPlaceComponent,
|
|
4085
|
+
AlertComponent,
|
|
4086
|
+
HeaderPageComponent,
|
|
4087
|
+
SwitchComponent,
|
|
4088
|
+
LinkComponent,
|
|
4089
|
+
H1Component,
|
|
4090
|
+
H2Component,
|
|
4091
|
+
H3Component,
|
|
4092
|
+
H4Component,
|
|
4093
|
+
TextComponent,
|
|
4094
|
+
TextAreaComponent,
|
|
4095
|
+
UploadComponent,
|
|
4096
|
+
SelectInTextComponent,
|
|
4097
|
+
SelectComponent,
|
|
4098
|
+
MultipleSearchComponent,
|
|
4099
|
+
MultipleSearchPlusComponent,
|
|
4100
|
+
InputWithSelectComponent,
|
|
4101
|
+
PopinComponent,
|
|
4102
|
+
FreePopinComponent,
|
|
4103
|
+
BlockComponent,
|
|
4104
|
+
WrapperComponent,
|
|
4105
|
+
FiltersComponent,
|
|
4106
|
+
WrapperBlocsComponent,
|
|
4107
|
+
SnackbarComponent,
|
|
4108
|
+
SearchComponent,
|
|
4109
|
+
SelectedListComponent, PaginationComponent,
|
|
4110
|
+
TableComponent,
|
|
4111
|
+
TableColumn,
|
|
4112
|
+
CheckBoxRow,
|
|
4113
|
+
TableColumnHeader,
|
|
4114
|
+
TableRow,
|
|
4115
|
+
InputSearchComponent,
|
|
4116
|
+
InputComponent,
|
|
4117
|
+
TooltipComponent,
|
|
4118
|
+
CheckboxComponent,
|
|
4119
|
+
LoaderComponent,
|
|
4120
|
+
ProgressBarComponent,
|
|
4121
|
+
TreeComponent] });
|
|
4122
|
+
SharedComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedComponentsModule, imports: [CommonModule,
|
|
4123
|
+
FormsModule,
|
|
4124
|
+
NwbAllModule,
|
|
4125
|
+
TranslateModule.forChild(),
|
|
4126
|
+
ReactiveFormsModule,
|
|
4127
|
+
SharedDirectives,
|
|
4128
|
+
SharedPipes,
|
|
4129
|
+
CdkTableModule,
|
|
4130
|
+
TagInputModule,
|
|
4131
|
+
PaginationModule,
|
|
4132
|
+
TableModule,
|
|
4133
|
+
InputSearchModule,
|
|
4134
|
+
TooltipModule,
|
|
4135
|
+
CheckboxModule,
|
|
4136
|
+
InputModule,
|
|
4137
|
+
LoaderModule,
|
|
4138
|
+
ProgressBarModule,
|
|
4139
|
+
PerfectScrollbarModule,
|
|
4140
|
+
AlertPopupModule,
|
|
4141
|
+
RouterModule,
|
|
4142
|
+
TreeModule] });
|
|
4143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedComponentsModule, decorators: [{
|
|
4144
|
+
type: NgModule,
|
|
4145
|
+
args: [{
|
|
4146
|
+
imports: [
|
|
4147
|
+
CommonModule,
|
|
4148
|
+
FormsModule,
|
|
4149
|
+
NwbAllModule,
|
|
4150
|
+
TranslateModule.forChild(),
|
|
4151
|
+
ReactiveFormsModule,
|
|
4152
|
+
SharedDirectives,
|
|
4153
|
+
SharedPipes,
|
|
4154
|
+
CdkTableModule,
|
|
4155
|
+
TagInputModule,
|
|
4156
|
+
PaginationModule,
|
|
4157
|
+
TableModule,
|
|
4158
|
+
InputSearchModule,
|
|
4159
|
+
TooltipModule,
|
|
4160
|
+
CheckboxModule,
|
|
4161
|
+
InputModule,
|
|
4162
|
+
LoaderModule,
|
|
4163
|
+
ProgressBarModule,
|
|
4164
|
+
PerfectScrollbarModule,
|
|
4165
|
+
AlertPopupModule,
|
|
4166
|
+
RouterModule,
|
|
4167
|
+
TreeModule
|
|
4168
|
+
],
|
|
4169
|
+
declarations: components,
|
|
4170
|
+
exports: [...components, ...exportsFromModule]
|
|
4171
|
+
}]
|
|
4172
|
+
}] });
|
|
4173
|
+
|
|
4174
|
+
class WiziComponentsModule {
|
|
4175
|
+
}
|
|
4176
|
+
WiziComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WiziComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4177
|
+
WiziComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: WiziComponentsModule, imports: [CommonModule,
|
|
4178
|
+
SharedComponentsModule,
|
|
4179
|
+
SharedDirectives,
|
|
4180
|
+
SharedPipes,
|
|
4181
|
+
NwbAllModule], exports: [SharedComponentsModule, SharedDirectives, SharedPipes] });
|
|
4182
|
+
WiziComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WiziComponentsModule, imports: [CommonModule,
|
|
4183
|
+
SharedComponentsModule,
|
|
4184
|
+
SharedDirectives,
|
|
4185
|
+
SharedPipes,
|
|
4186
|
+
NwbAllModule, SharedComponentsModule, SharedDirectives, SharedPipes] });
|
|
4187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WiziComponentsModule, decorators: [{
|
|
4188
|
+
type: NgModule,
|
|
4189
|
+
args: [{
|
|
4190
|
+
imports: [
|
|
4191
|
+
CommonModule,
|
|
4192
|
+
SharedComponentsModule,
|
|
4193
|
+
SharedDirectives,
|
|
4194
|
+
SharedPipes,
|
|
4195
|
+
NwbAllModule
|
|
4196
|
+
],
|
|
4197
|
+
exports: [SharedComponentsModule, SharedDirectives, SharedPipes]
|
|
4198
|
+
}]
|
|
4199
|
+
}] });
|
|
4200
|
+
|
|
4201
|
+
class TableFiltersGroup extends NwbFilterGroup {
|
|
4202
|
+
set(key, value) {
|
|
4203
|
+
super.set(key, value);
|
|
4204
|
+
}
|
|
4205
|
+
resetToFirstPage() {
|
|
4206
|
+
this.set("currentPage", 1);
|
|
4207
|
+
}
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4210
|
+
/*
|
|
4211
|
+
* Public API Surface of angular-components
|
|
4212
|
+
*/
|
|
4213
|
+
|
|
4214
|
+
/**
|
|
4215
|
+
* Generated bundle index. Do not edit.
|
|
4216
|
+
*/
|
|
4217
|
+
|
|
4218
|
+
export { AbstractDebounceDirective, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, ButtonComponent, CalendarComponent, CheckBoxRow, CheckboxComponent, DebounceKeyupDirective, DeleteComponent, DropdownComponent, FiltersComponent, FiltersTableService, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MultipleSearchComponent, MultipleSearchPlusComponent, PaginationComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectFiltersPipe, SelectInTextComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TagComponent, TextAreaComponent, TextComponent, TooltipComponent, TreeComponent, TreeModule, UploadComponent, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WzEditInPlaceComponent, ZindexToggleDirective };
|
|
4219
|
+
//# sourceMappingURL=wizishop-angular-components.mjs.map
|