@pepperi-addons/ngx-lib 0.4.2-beta.137 → 0.4.2-beta.139
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/address/address.component.d.ts +30 -0
- package/address/address.module.d.ts +15 -0
- package/address/index.d.ts +5 -0
- package/address/public-api.d.ts +2 -0
- package/attachment/attachment.component.d.ts +94 -0
- package/attachment/attachment.module.d.ts +14 -0
- package/attachment/index.d.ts +5 -0
- package/attachment/public-api.d.ts +2 -0
- package/bread-crumbs/bread-crumbs.component.d.ts +27 -0
- package/bread-crumbs/bread-crumbs.model.d.ts +11 -0
- package/bread-crumbs/bread-crumbs.module.d.ts +15 -0
- package/bread-crumbs/index.d.ts +5 -0
- package/bread-crumbs/public-api.d.ts +3 -0
- package/carousel/carousel-item.directive.d.ts +12 -0
- package/carousel/carousel.component.d.ts +148 -0
- package/carousel/carousel.module.d.ts +8 -0
- package/carousel/index.d.ts +5 -0
- package/carousel/public-api.d.ts +3 -0
- package/checkbox/checkbox.component.d.ts +50 -0
- package/checkbox/checkbox.module.d.ts +19 -0
- package/checkbox/index.d.ts +5 -0
- package/checkbox/public-api.d.ts +2 -0
- package/color/color-picker.component.d.ts +57 -0
- package/color/color.component.d.ts +30 -0
- package/color/color.model.d.ts +1 -0
- package/color/color.module.d.ts +26 -0
- package/color/index.d.ts +5 -0
- package/color/public-api.d.ts +3 -0
- package/date/date.component.d.ts +70 -0
- package/date/date.model.d.ts +31 -0
- package/date/date.module.d.ts +23 -0
- package/date/index.d.ts +5 -0
- package/date/public-api.d.ts +2 -0
- package/draggable-items/draggable-item/draggable-item.component.d.ts +11 -0
- package/draggable-items/draggable-items.component.d.ts +36 -0
- package/draggable-items/draggable-items.model.d.ts +11 -0
- package/draggable-items/draggable-items.module.d.ts +18 -0
- package/draggable-items/index.d.ts +5 -0
- package/draggable-items/public-api.d.ts +4 -0
- package/esm2020/address/address.component.mjs +109 -0
- package/esm2020/address/address.module.mjs +54 -0
- package/esm2020/address/pepperi-addons-ngx-lib-address.mjs +5 -0
- package/esm2020/address/public-api.mjs +6 -0
- package/esm2020/attachment/attachment.component.mjs +240 -0
- package/esm2020/attachment/attachment.module.mjs +50 -0
- package/esm2020/attachment/pepperi-addons-ngx-lib-attachment.mjs +5 -0
- package/esm2020/attachment/public-api.mjs +6 -0
- package/esm2020/bread-crumbs/bread-crumbs.component.mjs +85 -0
- package/esm2020/bread-crumbs/bread-crumbs.model.mjs +7 -0
- package/esm2020/bread-crumbs/bread-crumbs.module.mjs +50 -0
- package/esm2020/bread-crumbs/pepperi-addons-ngx-lib-bread-crumbs.mjs +5 -0
- package/esm2020/bread-crumbs/public-api.mjs +7 -0
- package/esm2020/carousel/carousel-item.directive.mjs +33 -0
- package/esm2020/carousel/carousel.component.mjs +745 -0
- package/esm2020/carousel/carousel.module.mjs +17 -0
- package/esm2020/carousel/pepperi-addons-ngx-lib-carousel.mjs +5 -0
- package/esm2020/carousel/public-api.mjs +8 -0
- package/esm2020/checkbox/checkbox.component.mjs +168 -0
- package/esm2020/checkbox/checkbox.module.mjs +63 -0
- package/esm2020/checkbox/pepperi-addons-ngx-lib-checkbox.mjs +5 -0
- package/esm2020/checkbox/public-api.mjs +6 -0
- package/esm2020/color/color-picker.component.mjs +224 -0
- package/esm2020/color/color.component.mjs +90 -0
- package/esm2020/color/color.model.mjs +2 -0
- package/esm2020/color/color.module.mjs +93 -0
- package/esm2020/color/pepperi-addons-ngx-lib-color.mjs +5 -0
- package/esm2020/color/public-api.mjs +7 -0
- package/esm2020/date/date.component.mjs +312 -0
- package/esm2020/date/date.model.mjs +54 -0
- package/esm2020/date/date.module.mjs +88 -0
- package/esm2020/date/pepperi-addons-ngx-lib-date.mjs +5 -0
- package/esm2020/date/public-api.mjs +6 -0
- package/esm2020/draggable-items/draggable-item/draggable-item.component.mjs +27 -0
- package/esm2020/draggable-items/draggable-items.component.mjs +102 -0
- package/esm2020/draggable-items/draggable-items.model.mjs +2 -0
- package/esm2020/draggable-items/draggable-items.module.mjs +60 -0
- package/esm2020/draggable-items/pepperi-addons-ngx-lib-draggable-items.mjs +5 -0
- package/esm2020/draggable-items/public-api.mjs +8 -0
- package/esm2020/files-uploader/files-uploader.component.mjs +246 -0
- package/esm2020/files-uploader/files-uploader.module.mjs +79 -0
- package/esm2020/files-uploader/pepperi-addons-ngx-lib-files-uploader.mjs +5 -0
- package/esm2020/files-uploader/public-api.mjs +6 -0
- package/esm2020/form/field-generator.component.mjs +152 -0
- package/esm2020/form/form.component.mjs +1238 -0
- package/esm2020/form/form.model.mjs +2 -0
- package/esm2020/form/form.module.mjs +179 -0
- package/esm2020/form/indicators.component.mjs +23 -0
- package/esm2020/form/internal-button.component.mjs +184 -0
- package/esm2020/form/internal-carusel.component.mjs +117 -0
- package/esm2020/form/internal-carusel.service.mjs +32 -0
- package/esm2020/form/internal-field-generator.component.mjs +146 -0
- package/esm2020/form/internal-form.component.mjs +1216 -0
- package/esm2020/form/internal-list.component.mjs +513 -0
- package/esm2020/form/internal-menu.component.mjs +66 -0
- package/esm2020/form/internal-page.component.mjs +361 -0
- package/esm2020/form/internal-page.service.mjs +120 -0
- package/esm2020/form/pepperi-addons-ngx-lib-form.mjs +5 -0
- package/esm2020/form/public-api.mjs +7 -0
- package/esm2020/group-buttons/group-buttons.component.mjs +71 -0
- package/esm2020/group-buttons/group-buttons.module.mjs +59 -0
- package/esm2020/group-buttons/pepperi-addons-ngx-lib-group-buttons.mjs +5 -0
- package/esm2020/group-buttons/public-api.mjs +6 -0
- package/esm2020/image/image.component.mjs +263 -0
- package/esm2020/image/image.module.mjs +74 -0
- package/esm2020/image/image.service.mjs +50 -0
- package/esm2020/image/pepperi-addons-ngx-lib-image.mjs +5 -0
- package/esm2020/image/public-api.mjs +7 -0
- package/esm2020/images-filmstrip/images-filmstrip.component.mjs +337 -0
- package/esm2020/images-filmstrip/images-filmstrip.module.mjs +83 -0
- package/esm2020/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.mjs +5 -0
- package/esm2020/images-filmstrip/public-api.mjs +6 -0
- package/esm2020/link/link.component.mjs +300 -0
- package/esm2020/link/link.module.mjs +80 -0
- package/esm2020/link/link.pipes.mjs +18 -0
- package/esm2020/link/pepperi-addons-ngx-lib-link.mjs +5 -0
- package/esm2020/link/public-api.mjs +7 -0
- package/esm2020/list/list-actions.component.mjs +44 -0
- package/esm2020/list/list-carousel.component.mjs +107 -0
- package/esm2020/list/list-chooser.component.mjs +64 -0
- package/esm2020/list/list-pager.component.mjs +120 -0
- package/esm2020/list/list-sorting.component.mjs +61 -0
- package/esm2020/list/list-total.component.mjs +30 -0
- package/esm2020/list/list-views.component.mjs +85 -0
- package/esm2020/list/list.component.mjs +1303 -0
- package/esm2020/list/list.model.mjs +4 -0
- package/esm2020/list/list.module.mjs +144 -0
- package/esm2020/list/list.pipes.mjs +47 -0
- package/esm2020/list/pepperi-addons-ngx-lib-list.mjs +5 -0
- package/esm2020/list/public-api.mjs +15 -0
- package/esm2020/list/virtual-scroller.mjs +1080 -0
- package/esm2020/menu/menu-item.component.mjs +115 -0
- package/esm2020/menu/menu.component.mjs +213 -0
- package/esm2020/menu/menu.model.mjs +19 -0
- package/esm2020/menu/menu.module.mjs +59 -0
- package/esm2020/menu/pepperi-addons-ngx-lib-menu.mjs +5 -0
- package/esm2020/menu/public-api.mjs +7 -0
- package/esm2020/page-layout/page-layout.component.mjs +35 -0
- package/esm2020/page-layout/page-layout.module.mjs +34 -0
- package/esm2020/page-layout/pepperi-addons-ngx-lib-page-layout.mjs +5 -0
- package/esm2020/page-layout/public-api.mjs +6 -0
- package/esm2020/profile-data-views-list/pepperi-addons-ngx-lib-profile-data-views-list.mjs +5 -0
- package/esm2020/profile-data-views-list/profile-data-view/profile-data-view.component.mjs +45 -0
- package/esm2020/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.mjs +81 -0
- package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +127 -0
- package/esm2020/profile-data-views-list/profile-data-views-list.model.mjs +2 -0
- package/esm2020/profile-data-views-list/profile-data-views-list.module.mjs +88 -0
- package/esm2020/profile-data-views-list/public-api.mjs +9 -0
- package/esm2020/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.mjs +5 -0
- package/esm2020/quantity-selector/public-api.mjs +6 -0
- package/esm2020/quantity-selector/quantity-selector-validation.directive.mjs +49 -0
- package/esm2020/quantity-selector/quantity-selector.component.mjs +574 -0
- package/esm2020/quantity-selector/quantity-selector.module.mjs +82 -0
- package/esm2020/quantity-selector/quantity-selector.pipes.mjs +23 -0
- package/esm2020/query-builder/common/model/field.mjs +2 -0
- package/esm2020/query-builder/common/model/filter.mjs +2 -0
- package/esm2020/query-builder/common/model/legacy.mjs +2 -0
- package/esm2020/query-builder/common/model/operator-unit.mjs +42 -0
- package/esm2020/query-builder/common/model/operator.mjs +276 -0
- package/esm2020/query-builder/common/model/structure.mjs +2 -0
- package/esm2020/query-builder/common/model/type-map.mjs +27 -0
- package/esm2020/query-builder/common/model/type.mjs +6 -0
- package/esm2020/query-builder/common/services/output-query.service.mjs +116 -0
- package/esm2020/query-builder/common/services/query-structure.service.mjs +249 -0
- package/esm2020/query-builder/common/services/type-convertor.service.mjs +42 -0
- package/esm2020/query-builder/pepperi-addons-ngx-lib-query-builder.mjs +5 -0
- package/esm2020/query-builder/public-api.mjs +9 -0
- package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +125 -0
- package/esm2020/query-builder/query-builder-section/query-builder-section.component.mjs +71 -0
- package/esm2020/query-builder/query-builder.component.mjs +110 -0
- package/esm2020/query-builder/query-builder.module.mjs +70 -0
- package/esm2020/query-builder/query-builder.service.mjs +102 -0
- package/esm2020/remote-loader/addon-block-loader.component.mjs +102 -0
- package/esm2020/remote-loader/addon-block-loader.service.mjs +62 -0
- package/esm2020/remote-loader/pepperi-addons-ngx-lib-remote-loader.mjs +5 -0
- package/esm2020/remote-loader/public-api.mjs +11 -0
- package/esm2020/remote-loader/remote-loader-element.component.mjs +116 -0
- package/esm2020/remote-loader/remote-loader.component.mjs +115 -0
- package/esm2020/remote-loader/remote-loader.model.mjs +2 -0
- package/esm2020/remote-loader/remote-loader.module.mjs +69 -0
- package/esm2020/remote-loader/remote-loader.service.mjs +81 -0
- package/esm2020/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.mjs +5 -0
- package/esm2020/rich-html-textarea/public-api.mjs +6 -0
- package/esm2020/rich-html-textarea/rich-html-textarea.component.mjs +250 -0
- package/esm2020/rich-html-textarea/rich-html-textarea.module.mjs +95 -0
- package/esm2020/search/pepperi-addons-ngx-lib-search.mjs +5 -0
- package/esm2020/search/public-api.mjs +7 -0
- package/esm2020/search/search.component.mjs +317 -0
- package/esm2020/search/search.model.mjs +2 -0
- package/esm2020/search/search.module.mjs +70 -0
- package/esm2020/select/pepperi-addons-ngx-lib-select.mjs +5 -0
- package/esm2020/select/public-api.mjs +6 -0
- package/esm2020/select/select.component.mjs +290 -0
- package/esm2020/select/select.module.mjs +70 -0
- package/esm2020/select-panel/pepperi-addons-ngx-lib-select-panel.mjs +5 -0
- package/esm2020/select-panel/public-api.mjs +7 -0
- package/esm2020/select-panel/select-panel.component.mjs +159 -0
- package/esm2020/select-panel/select-panel.model.mjs +2 -0
- package/esm2020/select-panel/select-panel.module.mjs +70 -0
- package/esm2020/separator/pepperi-addons-ngx-lib-separator.mjs +5 -0
- package/esm2020/separator/public-api.mjs +6 -0
- package/esm2020/separator/separator.component.mjs +63 -0
- package/esm2020/separator/separator.module.mjs +18 -0
- package/esm2020/side-bar/pepperi-addons-ngx-lib-side-bar.mjs +5 -0
- package/esm2020/side-bar/public-api.mjs +7 -0
- package/esm2020/side-bar/side-bar.component.mjs +122 -0
- package/esm2020/side-bar/side-bar.model.mjs +2 -0
- package/esm2020/side-bar/side-bar.module.mjs +55 -0
- package/esm2020/signature/pepperi-addons-ngx-lib-signature.mjs +5 -0
- package/esm2020/signature/public-api.mjs +7 -0
- package/esm2020/signature/signature-dialog.component.mjs +79 -0
- package/esm2020/signature/signature.component.mjs +282 -0
- package/esm2020/signature/signature.module.mjs +91 -0
- package/esm2020/size-detector/pepperi-addons-ngx-lib-size-detector.mjs +5 -0
- package/esm2020/size-detector/public-api.mjs +6 -0
- package/esm2020/size-detector/size-detector.component.mjs +92 -0
- package/esm2020/size-detector/size-detector.module.mjs +35 -0
- package/esm2020/skeleton-loader/pepperi-addons-ngx-lib-skeleton-loader.mjs +5 -0
- package/esm2020/skeleton-loader/public-api.mjs +6 -0
- package/esm2020/skeleton-loader/skeleton-loader.component.mjs +44 -0
- package/esm2020/skeleton-loader/skeleton-loader.module.mjs +24 -0
- package/esm2020/smart-filters/boolean-filter/boolean-filter.component.mjs +75 -0
- package/esm2020/smart-filters/common/filter-actions.component.mjs +29 -0
- package/esm2020/smart-filters/common/model/base-filter-component.mjs +296 -0
- package/esm2020/smart-filters/common/model/creator.mjs +76 -0
- package/esm2020/smart-filters/common/model/field.mjs +117 -0
- package/esm2020/smart-filters/common/model/filter.mjs +2 -0
- package/esm2020/smart-filters/common/model/operator.mjs +278 -0
- package/esm2020/smart-filters/common/model/type.mjs +2 -0
- package/esm2020/smart-filters/date-filter/date-filter.component.mjs +182 -0
- package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +200 -0
- package/esm2020/smart-filters/number-filter/number-filter.component.mjs +136 -0
- package/esm2020/smart-filters/pepperi-addons-ngx-lib-smart-filters.mjs +5 -0
- package/esm2020/smart-filters/public-api.mjs +19 -0
- package/esm2020/smart-filters/smart-filters.component.mjs +141 -0
- package/esm2020/smart-filters/smart-filters.module.mjs +158 -0
- package/esm2020/smart-filters/text-filter/text-filter.component.mjs +93 -0
- package/esm2020/snack-bar/default-snack-bar.component.mjs +29 -0
- package/esm2020/snack-bar/pepperi-addons-ngx-lib-snack-bar.mjs +5 -0
- package/esm2020/snack-bar/public-api.mjs +8 -0
- package/esm2020/snack-bar/snack-bar.component.mjs +26 -0
- package/esm2020/snack-bar/snack-bar.model.mjs +7 -0
- package/esm2020/snack-bar/snack-bar.module.mjs +63 -0
- package/esm2020/snack-bar/snack-bar.service.mjs +60 -0
- package/esm2020/textarea/pepperi-addons-ngx-lib-textarea.mjs +5 -0
- package/esm2020/textarea/public-api.mjs +6 -0
- package/esm2020/textarea/textarea.component.mjs +188 -0
- package/esm2020/textarea/textarea.module.mjs +82 -0
- package/esm2020/textbox/pepperi-addons-ngx-lib-textbox.mjs +5 -0
- package/esm2020/textbox/public-api.mjs +6 -0
- package/esm2020/textbox/textbox-validation.directive.mjs +93 -0
- package/esm2020/textbox/textbox.component.mjs +582 -0
- package/esm2020/textbox/textbox.module.mjs +72 -0
- package/esm2020/top-bar/pepperi-addons-ngx-lib-top-bar.mjs +5 -0
- package/esm2020/top-bar/public-api.mjs +7 -0
- package/esm2020/top-bar/top-bar.component.mjs +112 -0
- package/esm2020/top-bar/top-bar.model.mjs +2 -0
- package/esm2020/top-bar/top-bar.module.mjs +62 -0
- package/fesm2015/pepperi-addons-ngx-lib-address.mjs +170 -0
- package/fesm2015/pepperi-addons-ngx-lib-address.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs +297 -0
- package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.mjs +147 -0
- package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-carousel.mjs +804 -0
- package/fesm2015/pepperi-addons-ngx-lib-carousel.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs +237 -0
- package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-color.mjs +404 -0
- package/fesm2015/pepperi-addons-ngx-lib-color.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-date.mjs +458 -0
- package/fesm2015/pepperi-addons-ngx-lib-date.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs +192 -0
- package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-files-uploader.mjs +331 -0
- package/fesm2015/pepperi-addons-ngx-lib-files-uploader.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs +4226 -0
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs +136 -0
- package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-image.mjs +388 -0
- package/fesm2015/pepperi-addons-ngx-lib-image.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs +425 -0
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs +399 -0
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-list.mjs +3047 -0
- package/fesm2015/pepperi-addons-ngx-lib-list.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-menu.mjs +399 -0
- package/fesm2015/pepperi-addons-ngx-lib-menu.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs +77 -0
- package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +337 -0
- package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +728 -0
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +1216 -0
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +555 -0
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +349 -0
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-search.mjs +393 -0
- package/fesm2015/pepperi-addons-ngx-lib-search.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs +237 -0
- package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-select.mjs +366 -0
- package/fesm2015/pepperi-addons-ngx-lib-select.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-separator.mjs +89 -0
- package/fesm2015/pepperi-addons-ngx-lib-separator.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs +182 -0
- package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-signature.mjs +455 -0
- package/fesm2015/pepperi-addons-ngx-lib-signature.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs +134 -0
- package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs +78 -0
- package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +1715 -0
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-snack-bar.mjs +183 -0
- package/fesm2015/pepperi-addons-ngx-lib-snack-bar.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs +277 -0
- package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +748 -0
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-top-bar.mjs +180 -0
- package/fesm2015/pepperi-addons-ngx-lib-top-bar.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-address.mjs +170 -0
- package/fesm2020/pepperi-addons-ngx-lib-address.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-attachment.mjs +297 -0
- package/fesm2020/pepperi-addons-ngx-lib-attachment.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-bread-crumbs.mjs +147 -0
- package/fesm2020/pepperi-addons-ngx-lib-bread-crumbs.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-carousel.mjs +800 -0
- package/fesm2020/pepperi-addons-ngx-lib-carousel.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs +237 -0
- package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-color.mjs +401 -0
- package/fesm2020/pepperi-addons-ngx-lib-color.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-date.mjs +454 -0
- package/fesm2020/pepperi-addons-ngx-lib-date.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs +191 -0
- package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-files-uploader.mjs +328 -0
- package/fesm2020/pepperi-addons-ngx-lib-files-uploader.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs +4225 -0
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs +136 -0
- package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-image.mjs +386 -0
- package/fesm2020/pepperi-addons-ngx-lib-image.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs +422 -0
- package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs +399 -0
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-list.mjs +3035 -0
- package/fesm2020/pepperi-addons-ngx-lib-list.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-menu.mjs +399 -0
- package/fesm2020/pepperi-addons-ngx-lib-menu.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs +77 -0
- package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs +336 -0
- package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +726 -0
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +1202 -0
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +532 -0
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs +349 -0
- package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-search.mjs +392 -0
- package/fesm2020/pepperi-addons-ngx-lib-search.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs +236 -0
- package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-select.mjs +366 -0
- package/fesm2020/pepperi-addons-ngx-lib-select.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-separator.mjs +89 -0
- package/fesm2020/pepperi-addons-ngx-lib-separator.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs +182 -0
- package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-signature.mjs +450 -0
- package/fesm2020/pepperi-addons-ngx-lib-signature.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs +134 -0
- package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs +76 -0
- package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +1708 -0
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-snack-bar.mjs +180 -0
- package/fesm2020/pepperi-addons-ngx-lib-snack-bar.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs +276 -0
- package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +748 -0
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-top-bar.mjs +179 -0
- package/fesm2020/pepperi-addons-ngx-lib-top-bar.mjs.map +1 -0
- package/files-uploader/files-uploader.component.d.ts +60 -0
- package/files-uploader/files-uploader.module.d.ts +21 -0
- package/files-uploader/index.d.ts +5 -0
- package/files-uploader/public-api.d.ts +2 -0
- package/form/field-generator.component.d.ts +37 -0
- package/form/form.component.d.ts +93 -0
- package/form/form.model.d.ts +20 -0
- package/form/form.module.d.ts +50 -0
- package/form/index.d.ts +5 -0
- package/form/indicators.component.d.ts +10 -0
- package/form/internal-button.component.d.ts +42 -0
- package/form/internal-carusel.component.d.ts +39 -0
- package/form/internal-carusel.service.d.ts +10 -0
- package/form/internal-field-generator.component.d.ts +33 -0
- package/form/internal-form.component.d.ts +89 -0
- package/form/internal-list.component.d.ts +95 -0
- package/form/internal-menu.component.d.ts +19 -0
- package/form/internal-page.component.d.ts +73 -0
- package/form/internal-page.service.d.ts +22 -0
- package/form/public-api.d.ts +3 -0
- package/group-buttons/group-buttons.component.d.ts +24 -0
- package/group-buttons/group-buttons.module.d.ts +18 -0
- package/group-buttons/index.d.ts +5 -0
- package/group-buttons/public-api.d.ts +2 -0
- package/image/image.component.d.ts +74 -0
- package/image/image.module.d.ts +20 -0
- package/image/image.service.d.ts +14 -0
- package/image/index.d.ts +5 -0
- package/image/public-api.d.ts +3 -0
- package/images-filmstrip/images-filmstrip.component.d.ts +87 -0
- package/images-filmstrip/images-filmstrip.module.d.ts +22 -0
- package/images-filmstrip/index.d.ts +5 -0
- package/images-filmstrip/public-api.d.ts +2 -0
- package/link/index.d.ts +5 -0
- package/link/link.component.d.ts +121 -0
- package/link/link.module.d.ts +22 -0
- package/link/link.pipes.d.ts +7 -0
- package/link/public-api.d.ts +3 -0
- package/list/index.d.ts +5 -0
- package/list/list-actions.component.d.ts +18 -0
- package/list/list-carousel.component.d.ts +40 -0
- package/list/list-chooser.component.d.ts +29 -0
- package/list/list-pager.component.d.ts +39 -0
- package/list/list-sorting.component.d.ts +30 -0
- package/list/list-total.component.d.ts +11 -0
- package/list/list-views.component.d.ts +35 -0
- package/list/list.component.d.ts +177 -0
- package/list/list.model.d.ts +32 -0
- package/list/list.module.d.ts +34 -0
- package/list/list.pipes.d.ts +16 -0
- package/list/public-api.d.ts +10 -0
- package/list/virtual-scroller.d.ts +183 -0
- package/menu/index.d.ts +5 -0
- package/menu/menu-item.component.d.ts +28 -0
- package/menu/menu.component.d.ts +48 -0
- package/menu/menu.model.d.ts +25 -0
- package/menu/menu.module.d.ts +18 -0
- package/menu/public-api.d.ts +3 -0
- package/package.json +1 -1
- package/page-layout/index.d.ts +5 -0
- package/page-layout/page-layout.component.d.ts +19 -0
- package/page-layout/page-layout.module.d.ts +10 -0
- package/page-layout/public-api.d.ts +2 -0
- package/profile-data-views-list/index.d.ts +5 -0
- package/profile-data-views-list/profile-data-view/profile-data-view.component.d.ts +18 -0
- package/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.d.ts +25 -0
- package/profile-data-views-list/profile-data-views-list.component.d.ts +38 -0
- package/profile-data-views-list/profile-data-views-list.model.d.ts +26 -0
- package/profile-data-views-list/profile-data-views-list.module.d.ts +23 -0
- package/profile-data-views-list/public-api.d.ts +5 -0
- package/quantity-selector/index.d.ts +5 -0
- package/quantity-selector/public-api.d.ts +2 -0
- package/quantity-selector/quantity-selector-validation.directive.d.ts +17 -0
- package/quantity-selector/quantity-selector.component.d.ts +110 -0
- package/quantity-selector/quantity-selector.module.d.ts +23 -0
- package/quantity-selector/quantity-selector.pipes.d.ts +7 -0
- package/query-builder/common/model/field.d.ts +8 -0
- package/query-builder/common/model/filter.d.ts +6 -0
- package/query-builder/common/model/legacy.d.ts +31 -0
- package/query-builder/common/model/operator-unit.d.ts +13 -0
- package/query-builder/common/model/operator.d.ts +31 -0
- package/query-builder/common/model/structure.d.ts +4 -0
- package/query-builder/common/model/type-map.d.ts +12 -0
- package/query-builder/common/model/type.d.ts +4 -0
- package/query-builder/common/services/output-query.service.d.ts +47 -0
- package/query-builder/common/services/query-structure.service.d.ts +83 -0
- package/query-builder/common/services/type-convertor.service.d.ts +13 -0
- package/query-builder/index.d.ts +5 -0
- package/query-builder/public-api.d.ts +5 -0
- package/query-builder/query-builder-item/query-builder-item.component.d.ts +41 -0
- package/query-builder/query-builder-section/query-builder-section.component.d.ts +30 -0
- package/query-builder/query-builder.component.d.ts +39 -0
- package/query-builder/query-builder.module.d.ts +20 -0
- package/query-builder/query-builder.service.d.ts +30 -0
- package/remote-loader/addon-block-loader.component.d.ts +36 -0
- package/remote-loader/addon-block-loader.service.d.ts +15 -0
- package/remote-loader/index.d.ts +5 -0
- package/remote-loader/public-api.d.ts +7 -0
- package/remote-loader/remote-loader-element.component.d.ts +32 -0
- package/remote-loader/remote-loader.component.d.ts +25 -0
- package/remote-loader/remote-loader.model.d.ts +41 -0
- package/remote-loader/remote-loader.module.d.ts +15 -0
- package/remote-loader/remote-loader.service.d.ts +15 -0
- package/rich-html-textarea/index.d.ts +5 -0
- package/rich-html-textarea/public-api.d.ts +2 -0
- package/rich-html-textarea/rich-html-textarea.component.d.ts +80 -0
- package/rich-html-textarea/rich-html-textarea.module.d.ts +25 -0
- package/search/index.d.ts +5 -0
- package/search/public-api.d.ts +3 -0
- package/search/search.component.d.ts +65 -0
- package/search/search.model.d.ts +14 -0
- package/search/search.module.d.ts +20 -0
- package/select/index.d.ts +5 -0
- package/select/public-api.d.ts +2 -0
- package/select/select.component.d.ts +67 -0
- package/select/select.module.d.ts +20 -0
- package/select-panel/index.d.ts +5 -0
- package/select-panel/public-api.d.ts +3 -0
- package/select-panel/select-panel.component.d.ts +51 -0
- package/select-panel/select-panel.model.d.ts +5 -0
- package/select-panel/select-panel.module.d.ts +19 -0
- package/separator/index.d.ts +5 -0
- package/separator/public-api.d.ts +2 -0
- package/separator/separator.component.d.ts +22 -0
- package/separator/separator.module.d.ts +8 -0
- package/side-bar/index.d.ts +5 -0
- package/side-bar/public-api.d.ts +3 -0
- package/side-bar/side-bar.component.d.ts +42 -0
- package/side-bar/side-bar.model.d.ts +4 -0
- package/side-bar/side-bar.module.d.ts +16 -0
- package/signature/index.d.ts +5 -0
- package/signature/public-api.d.ts +3 -0
- package/signature/signature-dialog.component.d.ts +29 -0
- package/signature/signature.component.d.ts +59 -0
- package/signature/signature.module.d.ts +25 -0
- package/size-detector/index.d.ts +5 -0
- package/size-detector/public-api.d.ts +2 -0
- package/size-detector/size-detector.component.d.ts +29 -0
- package/size-detector/size-detector.module.d.ts +11 -0
- package/skeleton-loader/index.d.ts +5 -0
- package/skeleton-loader/public-api.d.ts +2 -0
- package/skeleton-loader/skeleton-loader.component.d.ts +20 -0
- package/skeleton-loader/skeleton-loader.module.d.ts +9 -0
- package/smart-filters/boolean-filter/boolean-filter.component.d.ts +29 -0
- package/smart-filters/common/filter-actions.component.d.ts +12 -0
- package/smart-filters/common/model/base-filter-component.d.ts +74 -0
- package/smart-filters/common/model/creator.d.ts +6 -0
- package/smart-filters/common/model/field.d.ts +69 -0
- package/smart-filters/common/model/filter.d.ts +11 -0
- package/smart-filters/common/model/operator.d.ts +52 -0
- package/smart-filters/common/model/type.d.ts +4 -0
- package/smart-filters/date-filter/date-filter.component.d.ts +61 -0
- package/smart-filters/index.d.ts +5 -0
- package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +57 -0
- package/smart-filters/number-filter/number-filter.component.d.ts +53 -0
- package/smart-filters/public-api.d.ts +14 -0
- package/smart-filters/smart-filters.component.d.ts +35 -0
- package/smart-filters/smart-filters.module.d.ts +37 -0
- package/smart-filters/text-filter/text-filter.component.d.ts +29 -0
- package/snack-bar/default-snack-bar.component.d.ts +13 -0
- package/snack-bar/index.d.ts +5 -0
- package/snack-bar/public-api.d.ts +4 -0
- package/snack-bar/snack-bar.component.d.ts +12 -0
- package/snack-bar/snack-bar.model.d.ts +8 -0
- package/snack-bar/snack-bar.module.d.ts +19 -0
- package/snack-bar/snack-bar.service.d.ts +24 -0
- package/textarea/index.d.ts +5 -0
- package/textarea/public-api.d.ts +2 -0
- package/textarea/textarea.component.d.ts +56 -0
- package/textarea/textarea.module.d.ts +23 -0
- package/textbox/index.d.ts +5 -0
- package/textbox/public-api.d.ts +2 -0
- package/textbox/textbox-validation.directive.d.ts +22 -0
- package/textbox/textbox.component.d.ts +157 -0
- package/textbox/textbox.module.d.ts +22 -0
- package/top-bar/index.d.ts +5 -0
- package/top-bar/public-api.d.ts +3 -0
- package/top-bar/top-bar.component.d.ts +39 -0
- package/top-bar/top-bar.model.d.ts +4 -0
- package/top-bar/top-bar.module.d.ts +18 -0
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ElementRef, Directive, Inject, HostBinding, Input, EventEmitter, Renderer2, Component, ViewChild, ContentChildren, Output, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import { DOCUMENT } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
class PepCarouselItemDirective {
|
|
6
|
+
constructor(elementRef) {
|
|
7
|
+
this.display = 'inline-block';
|
|
8
|
+
this._dragDisabled = false;
|
|
9
|
+
this._elementRef = elementRef;
|
|
10
|
+
}
|
|
11
|
+
get dragDisabled() {
|
|
12
|
+
return this._dragDisabled;
|
|
13
|
+
}
|
|
14
|
+
set dragDisabled(value) {
|
|
15
|
+
this._dragDisabled = value;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
PepCarouselItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCarouselItemDirective, deps: [{ token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
|
+
PepCarouselItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: PepCarouselItemDirective, selector: "[pepCarouselItem]", inputs: { dragDisabled: "dragDisabled" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0 });
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCarouselItemDirective, decorators: [{
|
|
21
|
+
type: Directive,
|
|
22
|
+
args: [{
|
|
23
|
+
selector: '[pepCarouselItem]',
|
|
24
|
+
}]
|
|
25
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
|
|
26
|
+
type: Inject,
|
|
27
|
+
args: [ElementRef]
|
|
28
|
+
}] }]; }, propDecorators: { display: [{
|
|
29
|
+
type: HostBinding,
|
|
30
|
+
args: ['style.display']
|
|
31
|
+
}], dragDisabled: [{
|
|
32
|
+
type: Input,
|
|
33
|
+
args: ['dragDisabled']
|
|
34
|
+
}] } });
|
|
35
|
+
|
|
36
|
+
class PepCarouselComponent {
|
|
37
|
+
constructor(_elementRef, _renderer, _document) {
|
|
38
|
+
this._elementRef = _elementRef;
|
|
39
|
+
this._renderer = _renderer;
|
|
40
|
+
this._document = _document;
|
|
41
|
+
this._index = 0;
|
|
42
|
+
this._scrollbarHidden = false;
|
|
43
|
+
this._disabled = false;
|
|
44
|
+
this._xDisabled = false;
|
|
45
|
+
this._xWheelEnabled = false;
|
|
46
|
+
this._yDisabled = false;
|
|
47
|
+
this._dragDisabled = false;
|
|
48
|
+
this._snapDisabled = false;
|
|
49
|
+
this._snapOffset = 0;
|
|
50
|
+
this._snapDuration = 500;
|
|
51
|
+
this._isDragging = false;
|
|
52
|
+
/**
|
|
53
|
+
* Is the user currently pressing the element
|
|
54
|
+
*/
|
|
55
|
+
this.isPressed = false;
|
|
56
|
+
/**
|
|
57
|
+
* Is the user currently scrolling the element
|
|
58
|
+
*/
|
|
59
|
+
this.isScrolling = false;
|
|
60
|
+
/**
|
|
61
|
+
* The x coordinates on the element
|
|
62
|
+
*/
|
|
63
|
+
this.downX = 0;
|
|
64
|
+
/**
|
|
65
|
+
* The y coordinates on the element
|
|
66
|
+
*/
|
|
67
|
+
this.downY = 0;
|
|
68
|
+
this.displayType = 'block';
|
|
69
|
+
this.elWidth = null;
|
|
70
|
+
this.elHeight = null;
|
|
71
|
+
this._pointerEvents = 'auto';
|
|
72
|
+
this.scrollbarWidth = null;
|
|
73
|
+
this.isAnimating = false;
|
|
74
|
+
this.prevChildrenLength = 0;
|
|
75
|
+
this.indexBound = 0;
|
|
76
|
+
this.dsInitialized = new EventEmitter();
|
|
77
|
+
this.indexChanged = new EventEmitter();
|
|
78
|
+
this.reachesLeftBound = new EventEmitter();
|
|
79
|
+
this.reachesRightBound = new EventEmitter();
|
|
80
|
+
this.snapAnimationFinished = new EventEmitter();
|
|
81
|
+
this.dragStart = new EventEmitter();
|
|
82
|
+
this.dragEnd = new EventEmitter();
|
|
83
|
+
this.scrollbarWidth = `${this.getScrollbarWidth()}px`;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Is the user currently dragging the element
|
|
87
|
+
*/
|
|
88
|
+
get isDragging() {
|
|
89
|
+
return this._isDragging;
|
|
90
|
+
}
|
|
91
|
+
get currIndex() {
|
|
92
|
+
return this._index;
|
|
93
|
+
}
|
|
94
|
+
set currIndex(value) {
|
|
95
|
+
if (value !== this._index) {
|
|
96
|
+
this._index = value;
|
|
97
|
+
this.indexChanged.emit(value);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Whether the scrollbar is hidden
|
|
102
|
+
*/
|
|
103
|
+
get scrollbarHidden() {
|
|
104
|
+
return this._scrollbarHidden;
|
|
105
|
+
}
|
|
106
|
+
set scrollbarHidden(value) {
|
|
107
|
+
this._scrollbarHidden = value;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Whether horizontally and vertically draging and scrolling is be disabled
|
|
111
|
+
*/
|
|
112
|
+
get disabled() {
|
|
113
|
+
return this._disabled;
|
|
114
|
+
}
|
|
115
|
+
set disabled(value) {
|
|
116
|
+
this._disabled = value;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Whether horizontally dragging and scrolling is be disabled
|
|
120
|
+
*/
|
|
121
|
+
get xDisabled() {
|
|
122
|
+
return this._xDisabled;
|
|
123
|
+
}
|
|
124
|
+
set xDisabled(value) {
|
|
125
|
+
this._xDisabled = value;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Whether vertically dragging and scrolling events is disabled
|
|
129
|
+
*/
|
|
130
|
+
get yDisabled() {
|
|
131
|
+
return this._yDisabled;
|
|
132
|
+
}
|
|
133
|
+
set yDisabled(value) {
|
|
134
|
+
this._yDisabled = value;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Whether scrolling horizontally with mouse wheel is enabled
|
|
138
|
+
*/
|
|
139
|
+
get xWheelEnabled() {
|
|
140
|
+
return this._xWheelEnabled;
|
|
141
|
+
}
|
|
142
|
+
set xWheelEnabled(value) {
|
|
143
|
+
this._xWheelEnabled = value;
|
|
144
|
+
}
|
|
145
|
+
get dragDisabled() {
|
|
146
|
+
return this._dragDisabled;
|
|
147
|
+
}
|
|
148
|
+
set dragDisabled(value) {
|
|
149
|
+
this._dragDisabled = value;
|
|
150
|
+
}
|
|
151
|
+
get snapDisabled() {
|
|
152
|
+
return this._snapDisabled;
|
|
153
|
+
}
|
|
154
|
+
set snapDisabled(value) {
|
|
155
|
+
this._snapDisabled = value;
|
|
156
|
+
}
|
|
157
|
+
get snapOffset() {
|
|
158
|
+
return this._snapOffset;
|
|
159
|
+
}
|
|
160
|
+
set snapOffset(value) {
|
|
161
|
+
this._snapOffset = value;
|
|
162
|
+
}
|
|
163
|
+
get snapDuration() {
|
|
164
|
+
return this._snapDuration;
|
|
165
|
+
}
|
|
166
|
+
set snapDuration(value) {
|
|
167
|
+
this._snapDuration = value;
|
|
168
|
+
}
|
|
169
|
+
ngOnChanges() {
|
|
170
|
+
this.setScrollBar();
|
|
171
|
+
if (this.xDisabled || this.disabled || this._scrollbarHidden) {
|
|
172
|
+
this.disableScroll('x');
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
this.enableScroll('x');
|
|
176
|
+
}
|
|
177
|
+
if (this.yDisabled || this.disabled) {
|
|
178
|
+
this.disableScroll('y');
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.enableScroll('y');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
ngAfterViewInit() {
|
|
185
|
+
// auto assign computed css
|
|
186
|
+
this._renderer.setAttribute(this._contentRef.nativeElement, 'drag-scroll', 'true');
|
|
187
|
+
this.displayType =
|
|
188
|
+
typeof window !== 'undefined'
|
|
189
|
+
? window.getComputedStyle(this._elementRef.nativeElement)
|
|
190
|
+
.display
|
|
191
|
+
: 'block';
|
|
192
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'display', this.displayType);
|
|
193
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'whiteSpace', 'noWrap');
|
|
194
|
+
// store ele width height for later user
|
|
195
|
+
this.markElDimension();
|
|
196
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'width', this.elWidth);
|
|
197
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'height', this.elHeight);
|
|
198
|
+
if (this.wrapper) {
|
|
199
|
+
this.checkScrollbar();
|
|
200
|
+
}
|
|
201
|
+
this._onMouseDownListener = this._renderer.listen(this._contentRef.nativeElement, 'mousedown', this.onMouseDownHandler.bind(this));
|
|
202
|
+
this._onScrollListener = this._renderer.listen(this._contentRef.nativeElement, 'scroll', this.onScrollHandler.bind(this));
|
|
203
|
+
// prevent Firefox from dragging images
|
|
204
|
+
this._onDragStartListener = this._renderer.listen('document', 'dragstart', (e) => {
|
|
205
|
+
e.preventDefault();
|
|
206
|
+
});
|
|
207
|
+
this.checkNavStatus();
|
|
208
|
+
this.dsInitialized.emit();
|
|
209
|
+
this.adjustMarginToLastChild();
|
|
210
|
+
}
|
|
211
|
+
ngAfterViewChecked() {
|
|
212
|
+
// avoid extra checks
|
|
213
|
+
if (this._children.length !== this.prevChildrenLength) {
|
|
214
|
+
this.markElDimension();
|
|
215
|
+
this.checkScrollbar();
|
|
216
|
+
this.prevChildrenLength = this._children.length;
|
|
217
|
+
this.checkNavStatus();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
ngOnDestroy() {
|
|
221
|
+
this._renderer.setAttribute(this._contentRef.nativeElement, 'drag-scroll', 'false');
|
|
222
|
+
if (this._onMouseDownListener) {
|
|
223
|
+
this._onMouseDownListener = this._onMouseDownListener();
|
|
224
|
+
}
|
|
225
|
+
if (this._onScrollListener) {
|
|
226
|
+
this._onScrollListener = this._onScrollListener();
|
|
227
|
+
}
|
|
228
|
+
if (this._onDragStartListener) {
|
|
229
|
+
this._onDragStartListener = this._onDragStartListener();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
onMouseMoveHandler(event) {
|
|
233
|
+
this.onMouseMove(event);
|
|
234
|
+
}
|
|
235
|
+
onMouseMove(event) {
|
|
236
|
+
if (this.isPressed && !this.disabled) {
|
|
237
|
+
// Workaround for prevent scroll stuck if browser lost focus
|
|
238
|
+
// MouseEvent.buttons not support by Safari
|
|
239
|
+
if (!event.buttons && !event.which) {
|
|
240
|
+
return this.onMouseUpHandler(event);
|
|
241
|
+
}
|
|
242
|
+
this._pointerEvents = 'none';
|
|
243
|
+
this._setIsDragging(true);
|
|
244
|
+
// Drag X
|
|
245
|
+
if (!this.xDisabled && !this.dragDisabled) {
|
|
246
|
+
const clientX = event.clientX;
|
|
247
|
+
this._contentRef.nativeElement.scrollLeft =
|
|
248
|
+
this._contentRef.nativeElement.scrollLeft -
|
|
249
|
+
clientX +
|
|
250
|
+
this.downX;
|
|
251
|
+
this.downX = clientX;
|
|
252
|
+
}
|
|
253
|
+
// Drag Y
|
|
254
|
+
if (!this.yDisabled && !this.dragDisabled) {
|
|
255
|
+
const clientY = event.clientY;
|
|
256
|
+
this._contentRef.nativeElement.scrollTop =
|
|
257
|
+
this._contentRef.nativeElement.scrollTop -
|
|
258
|
+
clientY +
|
|
259
|
+
this.downY;
|
|
260
|
+
this.downY = clientY;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
onMouseDownHandler(event) {
|
|
265
|
+
const carouselItem = this.locateCarouselItem(event.target);
|
|
266
|
+
if (carouselItem && carouselItem.dragDisabled) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const isTouchEvent = event.type === 'touchstart';
|
|
270
|
+
this._startGlobalListening(isTouchEvent);
|
|
271
|
+
this.isPressed = true;
|
|
272
|
+
const mouseEvent = event;
|
|
273
|
+
this.downX = mouseEvent.clientX;
|
|
274
|
+
this.downY = mouseEvent.clientY;
|
|
275
|
+
clearTimeout(this.scrollToTimer);
|
|
276
|
+
}
|
|
277
|
+
onScrollHandler() {
|
|
278
|
+
this.checkNavStatus();
|
|
279
|
+
if (!this.isPressed && !this.isAnimating && !this.snapDisabled) {
|
|
280
|
+
this.isScrolling = true;
|
|
281
|
+
clearTimeout(this.scrollTimer);
|
|
282
|
+
this.scrollTimer = setTimeout(() => {
|
|
283
|
+
this.isScrolling = false;
|
|
284
|
+
this.locateCurrentIndex(true);
|
|
285
|
+
}, 500);
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
this.locateCurrentIndex();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
onMouseUpHandler(event) {
|
|
292
|
+
if (this.isPressed) {
|
|
293
|
+
this.isPressed = false;
|
|
294
|
+
this._pointerEvents = 'auto';
|
|
295
|
+
this._setIsDragging(false);
|
|
296
|
+
if (!this.snapDisabled) {
|
|
297
|
+
this.locateCurrentIndex(true);
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
this.locateCurrentIndex();
|
|
301
|
+
}
|
|
302
|
+
this._stopGlobalListening();
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/*
|
|
306
|
+
* Nav button
|
|
307
|
+
*/
|
|
308
|
+
moveLeft() {
|
|
309
|
+
if (this.currIndex !== 0 || this.snapDisabled) {
|
|
310
|
+
this.currIndex--;
|
|
311
|
+
clearTimeout(this.scrollToTimer);
|
|
312
|
+
this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
moveRight() {
|
|
316
|
+
const container = this.wrapper || this.parentNode;
|
|
317
|
+
const containerWidth = container ? container.clientWidth : 0;
|
|
318
|
+
if (!this.isScrollReachesRightEnd() &&
|
|
319
|
+
this.currIndex <
|
|
320
|
+
this.maximumIndex(containerWidth, this._children.toArray())) {
|
|
321
|
+
this.currIndex++;
|
|
322
|
+
clearTimeout(this.scrollToTimer);
|
|
323
|
+
this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
moveTo(index) {
|
|
327
|
+
const container = this.wrapper || this.parentNode;
|
|
328
|
+
const containerWidth = container ? container.clientWidth : 0;
|
|
329
|
+
if (index >= 0 &&
|
|
330
|
+
index !== this.currIndex &&
|
|
331
|
+
this.currIndex <=
|
|
332
|
+
this.maximumIndex(containerWidth, this._children.toArray())) {
|
|
333
|
+
this.currIndex = Math.min(index, this.maximumIndex(containerWidth, this._children.toArray()));
|
|
334
|
+
clearTimeout(this.scrollToTimer);
|
|
335
|
+
this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
checkNavStatus() {
|
|
339
|
+
setTimeout(() => {
|
|
340
|
+
const onlyOneItem = Boolean(this._children.length <= 1);
|
|
341
|
+
const containerIsLargerThanContent = Boolean(this._contentRef.nativeElement.scrollWidth <=
|
|
342
|
+
this._contentRef.nativeElement.clientWidth);
|
|
343
|
+
if (onlyOneItem || containerIsLargerThanContent) {
|
|
344
|
+
// only one element
|
|
345
|
+
this.reachesLeftBound.emit(true);
|
|
346
|
+
this.reachesRightBound.emit(true);
|
|
347
|
+
}
|
|
348
|
+
else if (this.isScrollReachesRightEnd()) {
|
|
349
|
+
// reached right end
|
|
350
|
+
this.reachesLeftBound.emit(false);
|
|
351
|
+
this.reachesRightBound.emit(true);
|
|
352
|
+
}
|
|
353
|
+
else if (this._contentRef.nativeElement.scrollLeft === 0 &&
|
|
354
|
+
this._contentRef.nativeElement.scrollWidth >
|
|
355
|
+
this._contentRef.nativeElement.clientWidth) {
|
|
356
|
+
// reached left end
|
|
357
|
+
this.reachesLeftBound.emit(true);
|
|
358
|
+
this.reachesRightBound.emit(false);
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
// in the middle
|
|
362
|
+
this.reachesLeftBound.emit(false);
|
|
363
|
+
this.reachesRightBound.emit(false);
|
|
364
|
+
}
|
|
365
|
+
}, 0);
|
|
366
|
+
}
|
|
367
|
+
onWheel(event) {
|
|
368
|
+
if (this._xWheelEnabled) {
|
|
369
|
+
event.preventDefault();
|
|
370
|
+
if (this._snapDisabled) {
|
|
371
|
+
this._contentRef.nativeElement.scrollBy(event.deltaY, 0);
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
if (event.deltaY < 0) {
|
|
375
|
+
this.moveLeft();
|
|
376
|
+
}
|
|
377
|
+
else if (event.deltaY > 0) {
|
|
378
|
+
this.moveRight();
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
onWindowResize() {
|
|
384
|
+
this.refreshWrapperDimensions();
|
|
385
|
+
this.checkNavStatus();
|
|
386
|
+
}
|
|
387
|
+
_setIsDragging(value) {
|
|
388
|
+
if (this._isDragging === value) {
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
this._isDragging = value;
|
|
392
|
+
value ? this.dragStart.emit() : this.dragEnd.emit();
|
|
393
|
+
}
|
|
394
|
+
_startGlobalListening(isTouchEvent) {
|
|
395
|
+
if (!this._onMouseMoveListener) {
|
|
396
|
+
const eventName = isTouchEvent ? 'touchmove' : 'mousemove';
|
|
397
|
+
this._onMouseMoveListener = this._renderer.listen('document', eventName, this.onMouseMoveHandler.bind(this));
|
|
398
|
+
}
|
|
399
|
+
if (!this._onMouseUpListener) {
|
|
400
|
+
const eventName = isTouchEvent ? 'touchend' : 'mouseup';
|
|
401
|
+
this._onMouseUpListener = this._renderer.listen('document', eventName, this.onMouseUpHandler.bind(this));
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
_stopGlobalListening() {
|
|
405
|
+
if (this._onMouseMoveListener) {
|
|
406
|
+
this._onMouseMoveListener = this._onMouseMoveListener();
|
|
407
|
+
}
|
|
408
|
+
if (this._onMouseUpListener) {
|
|
409
|
+
this._onMouseUpListener = this._onMouseUpListener();
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
disableScroll(axis) {
|
|
413
|
+
this._renderer.setStyle(this._contentRef.nativeElement, `overflow-${axis}`, 'hidden');
|
|
414
|
+
}
|
|
415
|
+
enableScroll(axis) {
|
|
416
|
+
this._renderer.setStyle(this._contentRef.nativeElement, `overflow-${axis}`, 'auto');
|
|
417
|
+
}
|
|
418
|
+
hideScrollbar() {
|
|
419
|
+
if (this._contentRef.nativeElement.style.display !== 'none' &&
|
|
420
|
+
!this.wrapper) {
|
|
421
|
+
this.parentNode = this._contentRef.nativeElement.parentNode;
|
|
422
|
+
// create container element
|
|
423
|
+
this.wrapper = this._renderer.createElement('div');
|
|
424
|
+
this._renderer.addClass(this.wrapper, 'carousel-wrapper');
|
|
425
|
+
// this._renderer.setAttribute(this.wrapper, 'class', 'carousel-wrapper');
|
|
426
|
+
// this._renderer.addClass(this.wrapper, 'carousel-container');
|
|
427
|
+
this.refreshWrapperDimensions();
|
|
428
|
+
this._renderer.setStyle(this.wrapper, 'overflow', 'hidden');
|
|
429
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'width', `calc(100% + ${this.scrollbarWidth})`);
|
|
430
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'height', `calc(100% + ${this.scrollbarWidth})`);
|
|
431
|
+
// Append container element to component element.
|
|
432
|
+
this._renderer.appendChild(this._elementRef.nativeElement, this.wrapper);
|
|
433
|
+
// Append content element to container element.
|
|
434
|
+
this._renderer.appendChild(this.wrapper, this._contentRef.nativeElement);
|
|
435
|
+
this.adjustMarginToLastChild();
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
showScrollbar() {
|
|
439
|
+
if (this.wrapper) {
|
|
440
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'width', '100%');
|
|
441
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'height', this.wrapper.style.height);
|
|
442
|
+
if (this.parentNode !== null) {
|
|
443
|
+
this.parentNode.removeChild(this.wrapper);
|
|
444
|
+
this.parentNode.appendChild(this._contentRef.nativeElement);
|
|
445
|
+
}
|
|
446
|
+
this.wrapper = null;
|
|
447
|
+
this.adjustMarginToLastChild();
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
checkScrollbar() {
|
|
451
|
+
if (this._contentRef.nativeElement.scrollWidth <=
|
|
452
|
+
this._contentRef.nativeElement.clientWidth) {
|
|
453
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'height', '100%');
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'height', `calc(100% + ${this.scrollbarWidth})`);
|
|
457
|
+
}
|
|
458
|
+
if (this._contentRef.nativeElement.scrollHeight <=
|
|
459
|
+
this._contentRef.nativeElement.clientHeight) {
|
|
460
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'width', '100%');
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
this._renderer.setStyle(this._contentRef.nativeElement, 'width', `calc(100% + ${this.scrollbarWidth})`);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
setScrollBar() {
|
|
467
|
+
if (this.scrollbarHidden) {
|
|
468
|
+
this.hideScrollbar();
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
this.showScrollbar();
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
getScrollbarWidth() {
|
|
475
|
+
/**
|
|
476
|
+
* Browser Scrollbar Widths (2016)
|
|
477
|
+
* OSX (Chrome, Safari, Firefox) - 15px
|
|
478
|
+
* Windows XP (IE7, Chrome, Firefox) - 17px
|
|
479
|
+
* Windows 7 (IE10, IE11, Chrome, Firefox) - 17px
|
|
480
|
+
* Windows 8.1 (IE11, Chrome, Firefox) - 17px
|
|
481
|
+
* Windows 10 (IE11, Chrome, Firefox) - 17px
|
|
482
|
+
* Windows 10 (Edge 12/13) - 12px
|
|
483
|
+
*/
|
|
484
|
+
const outer = this._renderer.createElement('div');
|
|
485
|
+
this._renderer.setStyle(outer, 'visibility', 'hidden');
|
|
486
|
+
this._renderer.setStyle(outer, 'width', '100px');
|
|
487
|
+
this._renderer.setStyle(outer, 'msOverflowStyle', 'scrollbar'); // needed for WinJS apps
|
|
488
|
+
// document.body.appendChild(outer);
|
|
489
|
+
this._renderer.appendChild(this._document.body, outer);
|
|
490
|
+
// this._renderer.appendChild(this._renderer.selectRootElement('body'), outer);
|
|
491
|
+
const widthNoScroll = outer.offsetWidth;
|
|
492
|
+
// force scrollbars
|
|
493
|
+
this._renderer.setStyle(outer, 'overflow', 'scroll');
|
|
494
|
+
// add innerdiv
|
|
495
|
+
const inner = this._renderer.createElement('div');
|
|
496
|
+
this._renderer.setStyle(inner, 'width', '100%');
|
|
497
|
+
this._renderer.appendChild(outer, inner);
|
|
498
|
+
const widthWithScroll = inner.offsetWidth;
|
|
499
|
+
// remove divs
|
|
500
|
+
this._renderer.removeChild(this._document.body, outer);
|
|
501
|
+
/**
|
|
502
|
+
* Scrollbar width will be 0 on Mac OS with the
|
|
503
|
+
* default "Only show scrollbars when scrolling" setting (Yosemite and up).
|
|
504
|
+
* setting default width to 20;
|
|
505
|
+
*/
|
|
506
|
+
return widthNoScroll - widthWithScroll || 20;
|
|
507
|
+
}
|
|
508
|
+
refreshWrapperDimensions() {
|
|
509
|
+
if (this.wrapper) {
|
|
510
|
+
const height = this._elementRef.nativeElement.style.height ||
|
|
511
|
+
this._elementRef.nativeElement.offsetHeight;
|
|
512
|
+
this._renderer.setStyle(this.wrapper, 'width', '100%');
|
|
513
|
+
this._renderer.setStyle(this.wrapper, 'height', height === 0 ? 'auto' : height + 'px');
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
/*
|
|
517
|
+
* The below solution is heavily inspired from
|
|
518
|
+
* https://gist.github.com/andjosh/6764939
|
|
519
|
+
*/
|
|
520
|
+
scrollTo(element, to, duration) {
|
|
521
|
+
this.isAnimating = true;
|
|
522
|
+
const start = element.scrollLeft, change = to - start - this.snapOffset, increment = 20;
|
|
523
|
+
let currentTime = 0;
|
|
524
|
+
// t = current time
|
|
525
|
+
// b = start value
|
|
526
|
+
// c = change in value
|
|
527
|
+
// d = duration
|
|
528
|
+
const easeInOutQuad = (t, b, c, d) => {
|
|
529
|
+
t /= d / 2;
|
|
530
|
+
if (t < 1) {
|
|
531
|
+
return (c / 2) * t * t + b;
|
|
532
|
+
}
|
|
533
|
+
t--;
|
|
534
|
+
return (-c / 2) * (t * (t - 2) - 1) + b;
|
|
535
|
+
};
|
|
536
|
+
const animateScroll = () => {
|
|
537
|
+
currentTime += increment;
|
|
538
|
+
element.scrollLeft = easeInOutQuad(currentTime, start, change, duration);
|
|
539
|
+
if (currentTime < duration) {
|
|
540
|
+
this.scrollToTimer = setTimeout(animateScroll, increment);
|
|
541
|
+
}
|
|
542
|
+
else {
|
|
543
|
+
// run one more frame to make sure the animation is fully finished
|
|
544
|
+
setTimeout(() => {
|
|
545
|
+
this.isAnimating = false;
|
|
546
|
+
this.snapAnimationFinished.emit(this.currIndex);
|
|
547
|
+
}, increment);
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
animateScroll();
|
|
551
|
+
}
|
|
552
|
+
locateCurrentIndex(snap) {
|
|
553
|
+
this.currentChildWidth((currentChildWidth, nextChildrenWidth, childrenWidth, idx, stop) => {
|
|
554
|
+
if (this._contentRef.nativeElement.scrollLeft >=
|
|
555
|
+
childrenWidth &&
|
|
556
|
+
this._contentRef.nativeElement.scrollLeft <=
|
|
557
|
+
nextChildrenWidth) {
|
|
558
|
+
if (nextChildrenWidth -
|
|
559
|
+
this._contentRef.nativeElement.scrollLeft >
|
|
560
|
+
currentChildWidth / 2 &&
|
|
561
|
+
!this.isScrollReachesRightEnd()) {
|
|
562
|
+
// roll back scrolling
|
|
563
|
+
if (!this.isAnimating) {
|
|
564
|
+
this.currIndex = idx;
|
|
565
|
+
}
|
|
566
|
+
if (snap) {
|
|
567
|
+
this.scrollTo(this._contentRef.nativeElement, childrenWidth, this.snapDuration);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
else if (this._contentRef.nativeElement.scrollLeft !== 0) {
|
|
571
|
+
// forward scrolling
|
|
572
|
+
if (!this.isAnimating) {
|
|
573
|
+
this.currIndex = idx + 1;
|
|
574
|
+
}
|
|
575
|
+
if (snap) {
|
|
576
|
+
this.scrollTo(this._contentRef.nativeElement, childrenWidth + currentChildWidth, this.snapDuration);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
stop();
|
|
580
|
+
}
|
|
581
|
+
else if (idx + 1 === this._children.length - 1) {
|
|
582
|
+
// reaches last index
|
|
583
|
+
if (!this.isAnimating) {
|
|
584
|
+
this.currIndex = idx + 1;
|
|
585
|
+
}
|
|
586
|
+
stop();
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
currentChildWidth(cb) {
|
|
591
|
+
let childrenWidth = 0;
|
|
592
|
+
let shouldBreak = false;
|
|
593
|
+
const breakFunc = function () {
|
|
594
|
+
shouldBreak = true;
|
|
595
|
+
};
|
|
596
|
+
const childrenArr = this._children.toArray();
|
|
597
|
+
for (let i = 0; i < childrenArr.length; i++) {
|
|
598
|
+
if (i === childrenArr.length - 1) {
|
|
599
|
+
break;
|
|
600
|
+
}
|
|
601
|
+
if (shouldBreak) {
|
|
602
|
+
break;
|
|
603
|
+
}
|
|
604
|
+
const nextChildrenWidth = childrenWidth +
|
|
605
|
+
childrenArr[i + 1]._elementRef.nativeElement.clientWidth;
|
|
606
|
+
const currentClildWidth = childrenArr[i]._elementRef.nativeElement.clientWidth;
|
|
607
|
+
cb(currentClildWidth, nextChildrenWidth, childrenWidth, i, breakFunc);
|
|
608
|
+
childrenWidth += currentClildWidth;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
toChildrenLocation() {
|
|
612
|
+
let to = 0;
|
|
613
|
+
const childrenArr = this._children.toArray();
|
|
614
|
+
for (let i = 0; i < this.currIndex; i++) {
|
|
615
|
+
to += childrenArr[i]._elementRef.nativeElement.clientWidth;
|
|
616
|
+
}
|
|
617
|
+
return to;
|
|
618
|
+
}
|
|
619
|
+
locateCarouselItem(element) {
|
|
620
|
+
let item = null;
|
|
621
|
+
const childrenArr = this._children.toArray();
|
|
622
|
+
for (let i = 0; i < childrenArr.length; i++) {
|
|
623
|
+
if (element === childrenArr[i]._elementRef.nativeElement) {
|
|
624
|
+
item = childrenArr[i];
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return item;
|
|
628
|
+
}
|
|
629
|
+
markElDimension() {
|
|
630
|
+
if (this.wrapper) {
|
|
631
|
+
this.elWidth = this.wrapper.style.width;
|
|
632
|
+
this.elHeight = this.wrapper.style.height;
|
|
633
|
+
}
|
|
634
|
+
else {
|
|
635
|
+
this.elWidth =
|
|
636
|
+
this._elementRef.nativeElement.style.width ||
|
|
637
|
+
this._elementRef.nativeElement.offsetWidth + 'px';
|
|
638
|
+
this.elHeight =
|
|
639
|
+
this._elementRef.nativeElement.style.height ||
|
|
640
|
+
this._elementRef.nativeElement.offsetHeight + 'px';
|
|
641
|
+
}
|
|
642
|
+
const container = this.wrapper || this.parentNode;
|
|
643
|
+
const containerWidth = container ? container.clientWidth : 0;
|
|
644
|
+
if (this._children.length > 1) {
|
|
645
|
+
this.indexBound = this.maximumIndex(containerWidth, this._children.toArray());
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
maximumIndex(containerWidth, childrenElements) {
|
|
649
|
+
let count = 0;
|
|
650
|
+
let childrenWidth = 0;
|
|
651
|
+
for (let i = 0; i <= childrenElements.length; i++) {
|
|
652
|
+
// last N element
|
|
653
|
+
const carouselItemDirective = childrenElements[childrenElements.length - 1 - i];
|
|
654
|
+
if (!carouselItemDirective) {
|
|
655
|
+
break;
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
const nativeElement = carouselItemDirective._elementRef.nativeElement;
|
|
659
|
+
let itemWidth = nativeElement.clientWidth;
|
|
660
|
+
if (itemWidth === 0 && nativeElement.firstElementChild) {
|
|
661
|
+
itemWidth =
|
|
662
|
+
carouselItemDirective._elementRef.nativeElement
|
|
663
|
+
.firstElementChild.clientWidth;
|
|
664
|
+
}
|
|
665
|
+
childrenWidth += itemWidth;
|
|
666
|
+
if (childrenWidth < containerWidth) {
|
|
667
|
+
count++;
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
break;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
return childrenElements.length - count;
|
|
675
|
+
}
|
|
676
|
+
isScrollReachesRightEnd() {
|
|
677
|
+
const scrollLeftPos = this._contentRef.nativeElement.scrollLeft +
|
|
678
|
+
this._contentRef.nativeElement.offsetWidth;
|
|
679
|
+
return scrollLeftPos >= this._contentRef.nativeElement.scrollWidth;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* adds a margin right style to the last child element which will resolve the issue
|
|
683
|
+
* of last item gets cutoff.
|
|
684
|
+
*/
|
|
685
|
+
adjustMarginToLastChild() {
|
|
686
|
+
// if (this._children && this._children.length > 0 && this.hideScrollbar) {
|
|
687
|
+
// const childrenArr = this._children.toArray();
|
|
688
|
+
// const lastItem = childrenArr[childrenArr.length - 1]._elementRef.nativeElement;
|
|
689
|
+
// if (this.wrapper && childrenArr.length > 1) {
|
|
690
|
+
// this._renderer.setStyle(lastItem, 'margin-right', this.scrollbarWidth);
|
|
691
|
+
// } else {
|
|
692
|
+
// this._renderer.setStyle(lastItem, 'margin-right', 0);
|
|
693
|
+
// }
|
|
694
|
+
// }
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
PepCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCarouselComponent, deps: [{ token: ElementRef }, { token: Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
698
|
+
PepCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepCarouselComponent, selector: "pep-carousel", inputs: { scrollbarHidden: "scrollbarHidden", disabled: "disabled", xDisabled: "xDisabled", yDisabled: "yDisabled", xWheelEnabled: "xWheelEnabled", dragDisabled: "dragDisabled", snapDisabled: "snapDisabled", snapOffset: "snapOffset", snapDuration: "snapDuration" }, outputs: { dsInitialized: "dsInitialized", indexChanged: "indexChanged", reachesLeftBound: "reachesLeftBound", reachesRightBound: "reachesRightBound", snapAnimationFinished: "snapAnimationFinished", dragStart: "dragStart", dragEnd: "dragEnd" }, host: { listeners: { "wheel": "onWheel($event)", "window:resize": "onWindowResize()" }, properties: { "style.pointer-events": "this._pointerEvents" } }, queries: [{ propertyName: "_children", predicate: PepCarouselItemDirective, descendants: true }], viewQueries: [{ propertyName: "_contentRef", first: true, predicate: ["contentRef"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
699
|
+
<div class="carousel-content" #contentRef>
|
|
700
|
+
<ng-content></ng-content>
|
|
701
|
+
</div>
|
|
702
|
+
`, isInline: true, styles: [":host{overflow:hidden;display:block}.carousel-content{height:100%;overflow:auto;white-space:nowrap}\n"] });
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCarouselComponent, decorators: [{
|
|
704
|
+
type: Component,
|
|
705
|
+
args: [{ selector: 'pep-carousel', template: `
|
|
706
|
+
<div class="carousel-content" #contentRef>
|
|
707
|
+
<ng-content></ng-content>
|
|
708
|
+
</div>
|
|
709
|
+
`, styles: [":host{overflow:hidden;display:block}.carousel-content{height:100%;overflow:auto;white-space:nowrap}\n"] }]
|
|
710
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
|
|
711
|
+
type: Inject,
|
|
712
|
+
args: [ElementRef]
|
|
713
|
+
}] }, { type: i0.Renderer2, decorators: [{
|
|
714
|
+
type: Inject,
|
|
715
|
+
args: [Renderer2]
|
|
716
|
+
}] }, { type: undefined, decorators: [{
|
|
717
|
+
type: Inject,
|
|
718
|
+
args: [DOCUMENT]
|
|
719
|
+
}] }]; }, propDecorators: { _contentRef: [{
|
|
720
|
+
type: ViewChild,
|
|
721
|
+
args: ['contentRef', { static: true }]
|
|
722
|
+
}], _children: [{
|
|
723
|
+
type: ContentChildren,
|
|
724
|
+
args: [PepCarouselItemDirective, { descendants: true }]
|
|
725
|
+
}], _pointerEvents: [{
|
|
726
|
+
type: HostBinding,
|
|
727
|
+
args: ['style.pointer-events']
|
|
728
|
+
}], dsInitialized: [{
|
|
729
|
+
type: Output
|
|
730
|
+
}], indexChanged: [{
|
|
731
|
+
type: Output
|
|
732
|
+
}], reachesLeftBound: [{
|
|
733
|
+
type: Output
|
|
734
|
+
}], reachesRightBound: [{
|
|
735
|
+
type: Output
|
|
736
|
+
}], snapAnimationFinished: [{
|
|
737
|
+
type: Output
|
|
738
|
+
}], dragStart: [{
|
|
739
|
+
type: Output
|
|
740
|
+
}], dragEnd: [{
|
|
741
|
+
type: Output
|
|
742
|
+
}], scrollbarHidden: [{
|
|
743
|
+
type: Input,
|
|
744
|
+
args: ['scrollbarHidden']
|
|
745
|
+
}], disabled: [{
|
|
746
|
+
type: Input,
|
|
747
|
+
args: ['disabled']
|
|
748
|
+
}], xDisabled: [{
|
|
749
|
+
type: Input,
|
|
750
|
+
args: ['xDisabled']
|
|
751
|
+
}], yDisabled: [{
|
|
752
|
+
type: Input,
|
|
753
|
+
args: ['yDisabled']
|
|
754
|
+
}], xWheelEnabled: [{
|
|
755
|
+
type: Input,
|
|
756
|
+
args: ['xWheelEnabled']
|
|
757
|
+
}], dragDisabled: [{
|
|
758
|
+
type: Input,
|
|
759
|
+
args: ['dragDisabled']
|
|
760
|
+
}], snapDisabled: [{
|
|
761
|
+
type: Input,
|
|
762
|
+
args: ['snapDisabled']
|
|
763
|
+
}], snapOffset: [{
|
|
764
|
+
type: Input,
|
|
765
|
+
args: ['snapOffset']
|
|
766
|
+
}], snapDuration: [{
|
|
767
|
+
type: Input,
|
|
768
|
+
args: ['snapDuration']
|
|
769
|
+
}], onWheel: [{
|
|
770
|
+
type: HostListener,
|
|
771
|
+
args: ['wheel', ['$event']]
|
|
772
|
+
}], onWindowResize: [{
|
|
773
|
+
type: HostListener,
|
|
774
|
+
args: ['window:resize']
|
|
775
|
+
}] } });
|
|
776
|
+
|
|
777
|
+
class PepCarouselModule {
|
|
778
|
+
}
|
|
779
|
+
PepCarouselModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
780
|
+
PepCarouselModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepCarouselModule, declarations: [PepCarouselComponent, PepCarouselItemDirective], exports: [PepCarouselComponent, PepCarouselItemDirective] });
|
|
781
|
+
PepCarouselModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCarouselModule });
|
|
782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepCarouselModule, decorators: [{
|
|
783
|
+
type: NgModule,
|
|
784
|
+
args: [{
|
|
785
|
+
exports: [PepCarouselComponent, PepCarouselItemDirective],
|
|
786
|
+
declarations: [PepCarouselComponent, PepCarouselItemDirective],
|
|
787
|
+
}]
|
|
788
|
+
}] });
|
|
789
|
+
|
|
790
|
+
/*
|
|
791
|
+
* Public API Surface of carousel
|
|
792
|
+
*/
|
|
793
|
+
// export * from './carousel.model';
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Generated bundle index. Do not edit.
|
|
797
|
+
*/
|
|
798
|
+
|
|
799
|
+
export { PepCarouselComponent, PepCarouselItemDirective, PepCarouselModule };
|
|
800
|
+
//# sourceMappingURL=pepperi-addons-ngx-lib-carousel.mjs.map
|