mapa-library-ui 0.44.2 → 0.46.0
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/esm2020/lib/core/elements/element-base.mjs +2 -1
- package/esm2020/src/lib/components/capability/lib/core/elements/element-base.mjs +2 -1
- package/esm2020/src/lib/components/chart/lib/core/elements/element-base.mjs +2 -1
- package/esm2020/src/lib/components/dropdown/dropdown.mjs +2 -1
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/public-api.mjs +6 -0
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/checklist-database.mjs +57 -0
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.component.mjs +178 -0
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.module.mjs +83 -0
- package/esm2020/src/lib/components/dropdown/lib/core/elements/dropdown-tree.mjs +8 -0
- package/esm2020/src/lib/components/dropdown/lib/core/elements/element-base.mjs +2 -1
- package/esm2020/src/lib/components/dropdown-tree/dropdown.mjs +9 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/button/public-api.mjs +6 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/button/src/button.component.mjs +23 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/button/src/button.module.mjs +19 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown/public-api.mjs +6 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.component.mjs +168 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.module.mjs +71 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/public-api.mjs +6 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/checklist-database.mjs +57 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.component.mjs +178 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.module.mjs +83 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/action-button.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/dropdown-tree.mjs +8 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/dropdown.mjs +8 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/element-base.mjs +33 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/element-search.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/errors.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/element-group.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/element-option.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/mapa-library-ui-src-lib-components-dropdown-tree.mjs +5 -0
- package/esm2020/src/lib/components/form/lib/components/form/src/form.component.mjs +3 -3
- package/esm2020/src/lib/components/form/lib/components/form/src/form.module.mjs +4 -2
- package/esm2020/src/lib/components/form/lib/core/elements/element-base.mjs +2 -1
- package/esm2020/src/lib/components/group-report/lib/core/elements/element-base.mjs +2 -1
- package/esm2020/src/lib/components/group-report/lib/core/interfaces/classification.interface.mjs +1 -1
- package/esm2020/src/lib/components/radio-button/lib/core/elements/element-base.mjs +2 -1
- package/esm2020/src/lib/components/scale/filters.mjs +7 -0
- package/esm2020/src/lib/components/scale/lib/components/button/public-api.mjs +6 -0
- package/esm2020/src/lib/components/scale/lib/components/button/src/button.component.mjs +23 -0
- package/esm2020/src/lib/components/scale/lib/components/button/src/button.module.mjs +19 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/public-api.mjs +26 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-comparative/capability-comparative.component.mjs +17 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-comparative/capability-comparative.module.mjs +32 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-comparative-chart/capability-comparative-chart.component.mjs +24 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-comparative-chart/capability-comparative-chart.module.mjs +19 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-comparative-header/capability-comparative-header.component.mjs +20 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-comparative-header/capability-comparative-header.module.mjs +19 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-comparative-indicator/capability-comparative-indicator.component.mjs +19 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-comparative-indicator/capability-comparative-indicator.module.mjs +19 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-detail/capability-detail.component.mjs +73 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-detail/capability-detail.module.mjs +64 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-dot/capability-dot.component.mjs +31 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-dot/capability-dot.module.mjs +22 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-expand/capability-expand.component.mjs +27 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-expand/capability-expand.module.mjs +22 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-indicator/capability-indicator.component.mjs +14 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-indicator/capability-indicator.module.mjs +18 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-indicator-chart/capability-indicator-chart.component.mjs +33 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-indicator-chart/capability-indicator-chart.module.mjs +21 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-indicator-list/capability-indicator-list.component.mjs +27 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-indicator-list/capability-indicator-list.module.mjs +21 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-interval/capability-interval.component.mjs +81 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-interval/capability-interval.module.mjs +18 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-interval-bar/capability-interval-bar.component.mjs +31 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/capability-interval-bar/capability-interval-bar.module.mjs +20 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/essentials/consts/capability-classification.const.mjs +57 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/capability-classification.interface.mjs +2 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/capability-comparative.interface.mjs +2 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/capability-item.interface.mjs +2 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/capability.interface.mjs +2 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/index.mjs +4 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/essentials/services/capability-classification.service.mjs +14 -0
- package/esm2020/src/lib/components/scale/lib/components/capability/src/essentials/services/reusable-interval-bar.service.mjs +32 -0
- package/esm2020/src/lib/components/scale/lib/components/dropdown/public-api.mjs +6 -0
- package/esm2020/src/lib/components/scale/lib/components/dropdown/src/dropdown.component.mjs +168 -0
- package/esm2020/src/lib/components/scale/lib/components/dropdown/src/dropdown.module.mjs +71 -0
- package/esm2020/src/lib/components/scale/lib/components/filters/public-api.mjs +6 -0
- package/esm2020/src/lib/components/scale/lib/components/filters/src/filters.component.mjs +34 -0
- package/esm2020/src/lib/components/scale/lib/components/filters/src/filters.module.mjs +38 -0
- package/esm2020/src/lib/components/scale/lib/components/icon/public-api.mjs +6 -0
- package/esm2020/src/lib/components/scale/lib/components/icon/src/icon.component.mjs +26 -0
- package/esm2020/src/lib/components/scale/lib/components/icon/src/icon.module.mjs +19 -0
- package/esm2020/src/lib/components/scale/lib/components/scale/src/scale.component.mjs +12 -4
- package/esm2020/src/lib/components/scale/lib/components/scale/src/scale.module.mjs +6 -11
- package/esm2020/src/lib/components/scale/lib/components/tag/public-api.mjs +6 -0
- package/esm2020/src/lib/components/scale/lib/components/tag/src/tag.component.mjs +14 -0
- package/esm2020/src/lib/components/scale/lib/components/tag/src/tag.module.mjs +24 -0
- package/esm2020/src/lib/components/scale/lib/components/tooltip/src/tooltip.component.mjs +21 -0
- package/esm2020/src/lib/components/scale/lib/components/tooltip/src/tooltip.directive.mjs +140 -0
- package/esm2020/src/lib/components/scale/lib/components/tooltip/src/tooltip.enums.mjs +16 -0
- package/esm2020/src/lib/components/scale/lib/components/tooltip/src/tooltip.module.mjs +19 -0
- package/esm2020/src/lib/components/scale/lib/core/elements/action-button.mjs +2 -0
- package/esm2020/src/lib/components/scale/lib/core/elements/dropdown.mjs +8 -0
- package/esm2020/src/lib/components/scale/lib/core/elements/element-base.mjs +33 -0
- package/esm2020/src/lib/components/scale/lib/core/elements/element-search.mjs +2 -0
- package/esm2020/src/lib/components/scale/lib/core/elements/errors.mjs +2 -0
- package/esm2020/src/lib/components/scale/lib/core/interfaces/classification.interface.mjs +1 -1
- package/esm2020/src/lib/components/scale/lib/core/interfaces/element-group.interface.mjs +2 -0
- package/esm2020/src/lib/components/scale/lib/core/interfaces/element-option.interface.mjs +2 -0
- package/esm2020/src/lib/components/slide-toggle/lib/core/elements/element-base.mjs +2 -1
- package/esm2020/src/lib/components/table/lib/core/interfaces/classification.interface.mjs +1 -1
- package/esm2020/src/lib/components/textarea/lib/core/elements/element-base.mjs +2 -1
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown-tree.mjs +632 -0
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -0
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs +305 -5
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-form.mjs +5 -3
- package/fesm2015/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-scale.mjs +304 -13
- package/fesm2015/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2015/mapa-library-ui.mjs +1 -0
- package/fesm2015/mapa-library-ui.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown-tree.mjs +627 -0
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -0
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs +305 -5
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-form.mjs +5 -3
- package/fesm2020/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-scale.mjs +303 -13
- package/fesm2020/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2020/mapa-library-ui.mjs +1 -0
- package/fesm2020/mapa-library-ui.mjs.map +1 -1
- package/lib/core/elements/element-base.d.ts +2 -0
- package/mapa-library-ui-0.46.0.tgz +0 -0
- package/package.json +9 -1
- package/src/lib/components/capability/lib/core/elements/element-base.d.ts +2 -0
- package/src/lib/components/chart/lib/core/elements/element-base.d.ts +2 -0
- package/src/lib/components/dropdown/dropdown.d.ts +1 -0
- package/src/lib/components/dropdown/lib/components/dropdown-tree/public-api.d.ts +2 -0
- package/src/lib/components/dropdown/lib/components/dropdown-tree/src/checklist-database.d.ts +13 -0
- package/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.component.d.ts +71 -0
- package/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.module.d.ts +18 -0
- package/src/lib/components/dropdown/lib/core/elements/dropdown-tree.d.ts +4 -0
- package/src/lib/components/dropdown/lib/core/elements/element-base.d.ts +2 -0
- package/src/lib/components/dropdown-tree/dropdown.d.ts +5 -0
- package/src/lib/components/dropdown-tree/index.d.ts +5 -0
- package/src/lib/components/dropdown-tree/lib/components/button/public-api.d.ts +2 -0
- package/src/lib/components/dropdown-tree/lib/components/button/src/button.component.d.ts +10 -0
- package/src/lib/components/dropdown-tree/lib/components/button/src/button.module.d.ts +9 -0
- package/src/lib/components/dropdown-tree/lib/components/dropdown/public-api.d.ts +2 -0
- package/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.component.d.ts +40 -0
- package/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.module.d.ts +15 -0
- package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/public-api.d.ts +2 -0
- package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/checklist-database.d.ts +13 -0
- package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.component.d.ts +71 -0
- package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.module.d.ts +18 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/action-button.d.ts +5 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/dropdown-tree.d.ts +4 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/dropdown.d.ts +4 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/element-base.d.ts +66 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/element-search.d.ts +6 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/errors.d.ts +12 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/element-group.interface.d.ts +5 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/element-option.interface.d.ts +4 -0
- package/src/lib/components/form/lib/components/form/src/form.module.d.ts +1 -1
- package/src/lib/components/form/lib/core/elements/element-base.d.ts +2 -0
- package/src/lib/components/group-report/lib/core/elements/element-base.d.ts +2 -0
- package/src/lib/components/group-report/lib/core/interfaces/classification.interface.d.ts +1 -0
- package/src/lib/components/radio-button/lib/core/elements/element-base.d.ts +2 -0
- package/src/lib/components/scale/filters.d.ts +3 -0
- package/src/lib/components/scale/lib/components/button/public-api.d.ts +2 -0
- package/src/lib/components/scale/lib/components/button/src/button.component.d.ts +10 -0
- package/src/lib/components/scale/lib/components/button/src/button.module.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/public-api.d.ts +22 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-comparative/capability-comparative.component.d.ts +10 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-comparative/capability-comparative.module.d.ts +11 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-comparative-chart/capability-comparative-chart.component.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-comparative-chart/capability-comparative-chart.module.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-comparative-header/capability-comparative-header.component.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-comparative-header/capability-comparative-header.module.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-comparative-indicator/capability-comparative-indicator.component.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-comparative-indicator/capability-comparative-indicator.module.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-detail/capability-detail.component.d.ts +29 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-detail/capability-detail.module.d.ts +17 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-dot/capability-dot.component.d.ts +17 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-dot/capability-dot.module.d.ts +10 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-expand/capability-expand.component.d.ts +16 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-expand/capability-expand.module.d.ts +10 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-indicator/capability-indicator.component.d.ts +7 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-indicator/capability-indicator.module.d.ts +8 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-indicator-chart/capability-indicator-chart.component.d.ts +12 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-indicator-chart/capability-indicator-chart.module.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-indicator-list/capability-indicator-list.component.d.ts +14 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-indicator-list/capability-indicator-list.module.d.ts +9 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-interval/capability-interval.component.d.ts +29 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-interval/capability-interval.module.d.ts +8 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-interval-bar/capability-interval-bar.component.d.ts +16 -0
- package/src/lib/components/scale/lib/components/capability/src/capability-interval-bar/capability-interval-bar.module.d.ts +10 -0
- package/src/lib/components/scale/lib/components/capability/src/essentials/consts/capability-classification.const.d.ts +2 -0
- package/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/capability-classification.interface.d.ts +6 -0
- package/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/capability-comparative.interface.d.ts +10 -0
- package/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/capability-item.interface.d.ts +20 -0
- package/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/capability.interface.d.ts +8 -0
- package/src/lib/components/scale/lib/components/capability/src/essentials/interfaces/index.d.ts +3 -0
- package/src/lib/components/scale/lib/components/capability/src/essentials/services/capability-classification.service.d.ts +8 -0
- package/src/lib/components/scale/lib/components/capability/src/essentials/services/reusable-interval-bar.service.d.ts +15 -0
- package/src/lib/components/scale/lib/components/dropdown/public-api.d.ts +2 -0
- package/src/lib/components/scale/lib/components/dropdown/src/dropdown.component.d.ts +40 -0
- package/src/lib/components/scale/lib/components/dropdown/src/dropdown.module.d.ts +15 -0
- package/src/lib/components/scale/lib/components/filters/public-api.d.ts +2 -0
- package/src/lib/components/scale/lib/components/filters/src/filters.component.d.ts +14 -0
- package/src/lib/components/scale/lib/components/filters/src/filters.module.d.ts +12 -0
- package/src/lib/components/scale/lib/components/icon/public-api.d.ts +2 -0
- package/src/lib/components/scale/lib/components/icon/src/icon.component.d.ts +13 -0
- package/src/lib/components/scale/lib/components/icon/src/icon.module.d.ts +9 -0
- package/src/lib/components/scale/lib/components/scale/src/scale.component.d.ts +2 -0
- package/src/lib/components/scale/lib/components/scale/src/scale.module.d.ts +2 -1
- package/src/lib/components/scale/lib/components/tag/public-api.d.ts +2 -0
- package/src/lib/components/scale/lib/components/tag/src/tag.component.d.ts +12 -0
- package/src/lib/components/scale/lib/components/tag/src/tag.module.d.ts +8 -0
- package/src/lib/components/scale/lib/components/tooltip/src/tooltip.component.d.ts +15 -0
- package/src/lib/components/scale/lib/components/tooltip/src/tooltip.directive.d.ts +32 -0
- package/src/lib/components/scale/lib/components/tooltip/src/tooltip.enums.d.ts +13 -0
- package/src/lib/components/scale/lib/components/tooltip/src/tooltip.module.d.ts +9 -0
- package/src/lib/components/scale/lib/core/elements/action-button.d.ts +5 -0
- package/src/lib/components/scale/lib/core/elements/dropdown.d.ts +4 -0
- package/src/lib/components/scale/lib/core/elements/element-base.d.ts +66 -0
- package/src/lib/components/scale/lib/core/elements/element-search.d.ts +6 -0
- package/src/lib/components/scale/lib/core/elements/errors.d.ts +12 -0
- package/src/lib/components/scale/lib/core/interfaces/classification.interface.d.ts +1 -0
- package/src/lib/components/scale/lib/core/interfaces/element-group.interface.d.ts +5 -0
- package/src/lib/components/scale/lib/core/interfaces/element-option.interface.d.ts +4 -0
- package/src/lib/components/slide-toggle/lib/core/elements/element-base.d.ts +2 -0
- package/src/lib/components/table/lib/core/interfaces/classification.interface.d.ts +1 -0
- package/src/lib/components/textarea/lib/core/elements/element-base.d.ts +2 -0
- package/mapa-library-ui-0.44.2.tgz +0 -0
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, ViewEncapsulation, ViewChild, NgModule, Injectable } from '@angular/core';
|
|
3
|
+
import { ReplaySubject } from 'rxjs/internal/ReplaySubject';
|
|
4
|
+
import { Subject } from 'rxjs/internal/Subject';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import * as i3 from '@angular/forms';
|
|
8
|
+
import { FormsModule, ReactiveFormsModule, FormControl } from '@angular/forms';
|
|
9
|
+
import * as i4 from '@angular/material/icon';
|
|
10
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
11
|
+
import * as i5 from '@angular/material/form-field';
|
|
12
|
+
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
13
|
+
import * as i6 from '@angular/material/select';
|
|
14
|
+
import { MatSelectModule, MAT_SELECT_CONFIG } from '@angular/material/select';
|
|
15
|
+
import * as i7 from '@angular/material/core';
|
|
16
|
+
import * as i8 from 'ngx-mat-select-search';
|
|
17
|
+
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
18
|
+
import { MatListModule } from '@angular/material/list';
|
|
19
|
+
import * as i4$1 from '@angular/material/button';
|
|
20
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
21
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
22
|
+
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
23
|
+
import * as i9 from '@angular/material/tree';
|
|
24
|
+
import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
|
|
25
|
+
import { BehaviorSubject } from 'rxjs';
|
|
26
|
+
import * as i7$1 from '@angular/material/input';
|
|
27
|
+
import { MatInputModule } from '@angular/material/input';
|
|
28
|
+
import * as i10 from '@angular/material/checkbox';
|
|
29
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
30
|
+
import * as i11 from '@angular/material/autocomplete';
|
|
31
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
32
|
+
|
|
33
|
+
class ElementBase {
|
|
34
|
+
constructor(options = {}) {
|
|
35
|
+
this.value = options.value || "";
|
|
36
|
+
this.key = options.key || "";
|
|
37
|
+
this.label = options.label || "";
|
|
38
|
+
this.required = !!options.required;
|
|
39
|
+
this.order = options.order === undefined ? 1 : options.order;
|
|
40
|
+
this.controlType = options.controlType || "";
|
|
41
|
+
this.type = options.type || "";
|
|
42
|
+
this.placeholder = options.placeholder || "";
|
|
43
|
+
this.hint = options.hint || "";
|
|
44
|
+
this.prefix = options.prefix || "";
|
|
45
|
+
this.suffix = options.suffix || "";
|
|
46
|
+
this.autosize = options.autosize || false;
|
|
47
|
+
this.autosizeMinWidth = options.autosizeMinWidth || "212px";
|
|
48
|
+
this.autosizeMaxWidth = options.autosizeMaxWidth || "400px";
|
|
49
|
+
this.autosizeMinRow = options.autosizeMinRow || 2;
|
|
50
|
+
this.autosizeMaxRow = options.autosizeMaxRow || 5;
|
|
51
|
+
this.options = options.options || [];
|
|
52
|
+
this.tree = options.tree || [];
|
|
53
|
+
this.multiple = options.multiple || false;
|
|
54
|
+
this.search = options.search || undefined;
|
|
55
|
+
this.maxLength = options.maxLength || null;
|
|
56
|
+
this.errors = options.errors || undefined;
|
|
57
|
+
this.actionButton = options.actionButton || undefined;
|
|
58
|
+
this.mask = options.mask || undefined;
|
|
59
|
+
this.autocomplete = options.autocomplete || "";
|
|
60
|
+
this.clearValue =
|
|
61
|
+
options.clearValue !== undefined ? options.clearValue : true;
|
|
62
|
+
this.status = options.status || undefined;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
class Dropdown extends ElementBase {
|
|
67
|
+
constructor() {
|
|
68
|
+
super(...arguments);
|
|
69
|
+
this.controlType = 'dropdown';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
class ButtonComponent {
|
|
74
|
+
constructor() {
|
|
75
|
+
this.clicked = new EventEmitter();
|
|
76
|
+
}
|
|
77
|
+
onClick() {
|
|
78
|
+
this.clicked.emit();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ButtonComponent, selector: "mapa-button", inputs: { color: "color", disabled: "disabled" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n class=\"mapa-button\"\n (click)=\"onClick()\"\n [class.primary]=\"color === 'primary'\"\n [class.accent]=\"color === 'accent'\"\n [class.basic]=\"color === 'basic'\"\n [disabled]=\"disabled\"\n>\n <ng-content></ng-content>\n</button> ", styles: [".mapa-button{display:flex;padding:14px 42px;justify-content:center;align-items:center;gap:10px;border-radius:28px;border:none;font-family:SF-Pro;font-weight:500;cursor:pointer;transform-origin:center;transition:transform .2s ease-in-out}.mapa-button:active{transform:scale(1.1)}.mapa-button:disabled{color:#dcdcde!important;background-color:transparent!important}.mapa-button.basic{color:#ea561d;background-color:transparent}.mapa-button.accent{border:2px solid #ea561d!important;color:#ea561d;background-color:#fff}.mapa-button.primary{background-color:#ea561d;color:#fff}\n"] });
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
84
|
+
type: Component,
|
|
85
|
+
args: [{ selector: 'mapa-button', template: "<button\n class=\"mapa-button\"\n (click)=\"onClick()\"\n [class.primary]=\"color === 'primary'\"\n [class.accent]=\"color === 'accent'\"\n [class.basic]=\"color === 'basic'\"\n [disabled]=\"disabled\"\n>\n <ng-content></ng-content>\n</button> ", styles: [".mapa-button{display:flex;padding:14px 42px;justify-content:center;align-items:center;gap:10px;border-radius:28px;border:none;font-family:SF-Pro;font-weight:500;cursor:pointer;transform-origin:center;transition:transform .2s ease-in-out}.mapa-button:active{transform:scale(1.1)}.mapa-button:disabled{color:#dcdcde!important;background-color:transparent!important}.mapa-button.basic{color:#ea561d;background-color:transparent}.mapa-button.accent{border:2px solid #ea561d!important;color:#ea561d;background-color:#fff}.mapa-button.primary{background-color:#ea561d;color:#fff}\n"] }]
|
|
86
|
+
}], propDecorators: { color: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], disabled: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], clicked: [{
|
|
91
|
+
type: Output
|
|
92
|
+
}] } });
|
|
93
|
+
|
|
94
|
+
class MapaDropdownComponent {
|
|
95
|
+
get selectedOptions() {
|
|
96
|
+
const value = this.formControl?.value || [];
|
|
97
|
+
return Array.isArray(value) ? value : [value];
|
|
98
|
+
}
|
|
99
|
+
constructor() {
|
|
100
|
+
this.filteredOptions = new ReplaySubject(1);
|
|
101
|
+
this.filteredGroups = new ReplaySubject(1);
|
|
102
|
+
this.filteredOptionsCache = [];
|
|
103
|
+
this.filteredGroupCache = [];
|
|
104
|
+
this._onDestroy = new Subject();
|
|
105
|
+
this.isIndeterminate = false;
|
|
106
|
+
this.isChecked = false;
|
|
107
|
+
this.isOptionsGroup = false;
|
|
108
|
+
}
|
|
109
|
+
ngOnInit() {
|
|
110
|
+
this.setOptions();
|
|
111
|
+
if (this.element.search) {
|
|
112
|
+
this.element.search.formControl?.valueChanges
|
|
113
|
+
//.pipe(takeUntil(this._onDestroy))
|
|
114
|
+
.subscribe(() => {
|
|
115
|
+
this.filterOptions();
|
|
116
|
+
this.setToggleAllCheckboxState();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
ngOnChanges(changes) {
|
|
121
|
+
if (changes["element"].previousValue?.controlType === "dropdown" &&
|
|
122
|
+
changes["element"].previousValue?.options !== changes["element"].currentValue?.options) {
|
|
123
|
+
this.element.options = changes["element"].currentValue.options;
|
|
124
|
+
this.setOptions();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
ngOnDestroy() {
|
|
128
|
+
this._onDestroy.next();
|
|
129
|
+
this._onDestroy.complete();
|
|
130
|
+
}
|
|
131
|
+
setOptions() {
|
|
132
|
+
this.isOptionsGroup = this.isElementGroup(this.element.options[0]);
|
|
133
|
+
if (this.isOptionsGroup) {
|
|
134
|
+
this.filteredGroupCache = this.element
|
|
135
|
+
.options.slice();
|
|
136
|
+
this.filteredGroups.next(this.filteredGroupCache);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
this.filteredOptionsCache = this.element
|
|
140
|
+
.options.slice();
|
|
141
|
+
this.filteredOptions.next(this.filteredOptionsCache);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
filterOptionsFromGroup(group, value) {
|
|
145
|
+
const filterValue = value.toLocaleLowerCase();
|
|
146
|
+
return group.label.toLocaleLowerCase().includes(filterValue)
|
|
147
|
+
? group.options
|
|
148
|
+
: group.options.filter((item) => item.value.toLocaleLowerCase().includes(filterValue));
|
|
149
|
+
}
|
|
150
|
+
filterOptions() {
|
|
151
|
+
if (!this.element.options) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
// get the search keyword
|
|
155
|
+
let search = this.element.search?.formControl?.value.toLowerCase();
|
|
156
|
+
if (this.isOptionsGroup) {
|
|
157
|
+
const groups = this.element.options;
|
|
158
|
+
this.filteredGroupCache = groups
|
|
159
|
+
.map((group) => ({
|
|
160
|
+
label: group.label,
|
|
161
|
+
options: this.filterOptionsFromGroup(group, search),
|
|
162
|
+
}))
|
|
163
|
+
.filter((group) => group.options.length > 0);
|
|
164
|
+
this.filteredGroups.next(this.filteredGroupCache);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
const options = this.element.options;
|
|
168
|
+
if (!search) {
|
|
169
|
+
this.filteredOptionsCache = options.slice();
|
|
170
|
+
this.filteredOptions.next(this.filteredOptionsCache);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
// filter the options
|
|
174
|
+
this.filteredOptionsCache = options.filter((option) => option.value.toLowerCase().indexOf(search) > -1);
|
|
175
|
+
this.filteredOptions.next(this.filteredOptionsCache);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
setToggleAllCheckboxState() {
|
|
179
|
+
let filteredLength = 0;
|
|
180
|
+
let search = this.element.search?.formControl?.value;
|
|
181
|
+
if (search && search.value) {
|
|
182
|
+
this.filteredOptionsCache.forEach((el) => {
|
|
183
|
+
if (search.value.toLowerCase().indexOf(el) > -1) {
|
|
184
|
+
filteredLength++;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
this.isIndeterminate =
|
|
188
|
+
filteredLength > 0 && filteredLength < this.filteredOptionsCache.length;
|
|
189
|
+
this.isChecked =
|
|
190
|
+
filteredLength > 0 &&
|
|
191
|
+
filteredLength === this.filteredOptionsCache.length;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
toggleSelectAll(selectAllValue) {
|
|
195
|
+
this.filteredOptions.subscribe((options) => {
|
|
196
|
+
if (selectAllValue) {
|
|
197
|
+
this.formControl?.patchValue(options);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
this.formControl?.patchValue([]);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
this.filteredGroups.subscribe((groups) => {
|
|
204
|
+
if (selectAllValue) {
|
|
205
|
+
this.formControl?.patchValue(groups.map((group) => group.options));
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
this.formControl?.patchValue([]);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
isElementGroup(object) {
|
|
213
|
+
try {
|
|
214
|
+
return (object.label !== undefined &&
|
|
215
|
+
object.options !== undefined);
|
|
216
|
+
}
|
|
217
|
+
catch (e) {
|
|
218
|
+
return false;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
compareFn(c1, c2) {
|
|
222
|
+
return c1 && c2 ? c1.key === c2.key : c1 === c2;
|
|
223
|
+
}
|
|
224
|
+
hasValue() {
|
|
225
|
+
return !!this.formControl.value;
|
|
226
|
+
}
|
|
227
|
+
clearValue(event) {
|
|
228
|
+
event.stopPropagation();
|
|
229
|
+
this.formControl.setValue(null);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
MapaDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
233
|
+
MapaDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: { formControl: "formControl", formControlSearch: "formControlSearch", element: "element", border: "border" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"element\">\n <label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n </label>\n <div class=\"mapa-form--inline\">\n <mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\"\n >\n <mat-select\n #dropdown\n ngDefaultControl\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n [compareWith]=\"compareFn\"\n >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"true\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup\n *ngFor=\"let group of filteredGroups | async\"\n [label]=\"group.label\"\n >\n <mat-option *ngFor=\"let option of group.options\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option\n *ngFor=\"let option of filteredOptions | async\"\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-option>\n </ng-template>\n \n <mat-option\n *ngFor=\"let option of selectedOptions\"\n hidden\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n <mat-icon\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n (click)=\"clearValue($event)\"\n class=\"mapa-input--close\"\n >close</mat-icon\n >\n </mat-form-field>\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (click)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n </div>\n</div>\n", styles: [".mapa-dropdown{max-width:min-content;min-width:235px}.mapa-dropdown .mat-select{font-family:SF-Pro!important}.mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:32px;top:4px}.mapa-dropdown__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown .mat-select-value-text{display:block;width:90%}.mapa-dropdown .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown .mat-select-arrow{border:unset}.mapa-dropdown .mat-select-arrow:before,.mapa-dropdown .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown{transform:translate(-16px) translateY(36px)!important}.mapa-overlay-dropdown .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown .mat-select-panel .mat-option,.mapa-overlay-dropdown .mat-select-panel .mat-option-text{font-family:SF-Pro!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown .mat-checkbox-frame{border-color:#c3c4c7!important}\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: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i8.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownComponent, decorators: [{
|
|
235
|
+
type: Component,
|
|
236
|
+
args: [{ selector: "mapa-dropdown", encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"element\">\n <label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n </label>\n <div class=\"mapa-form--inline\">\n <mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\"\n >\n <mat-select\n #dropdown\n ngDefaultControl\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n [compareWith]=\"compareFn\"\n >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"true\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup\n *ngFor=\"let group of filteredGroups | async\"\n [label]=\"group.label\"\n >\n <mat-option *ngFor=\"let option of group.options\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option\n *ngFor=\"let option of filteredOptions | async\"\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-option>\n </ng-template>\n \n <mat-option\n *ngFor=\"let option of selectedOptions\"\n hidden\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n <mat-icon\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n (click)=\"clearValue($event)\"\n class=\"mapa-input--close\"\n >close</mat-icon\n >\n </mat-form-field>\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (click)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n </div>\n</div>\n", styles: [".mapa-dropdown{max-width:min-content;min-width:235px}.mapa-dropdown .mat-select{font-family:SF-Pro!important}.mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:32px;top:4px}.mapa-dropdown__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown .mat-select-value-text{display:block;width:90%}.mapa-dropdown .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown .mat-select-arrow{border:unset}.mapa-dropdown .mat-select-arrow:before,.mapa-dropdown .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown{transform:translate(-16px) translateY(36px)!important}.mapa-overlay-dropdown .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown .mat-select-panel .mat-option,.mapa-overlay-dropdown .mat-select-panel .mat-option-text{font-family:SF-Pro!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown .mat-checkbox-frame{border-color:#c3c4c7!important}\n"] }]
|
|
237
|
+
}], ctorParameters: function () { return []; }, propDecorators: { formControl: [{
|
|
238
|
+
type: Input
|
|
239
|
+
}], formControlSearch: [{
|
|
240
|
+
type: Input
|
|
241
|
+
}], element: [{
|
|
242
|
+
type: Input
|
|
243
|
+
}], border: [{
|
|
244
|
+
type: Input
|
|
245
|
+
}], dropdown: [{
|
|
246
|
+
type: ViewChild,
|
|
247
|
+
args: ["dropdown", { static: true }]
|
|
248
|
+
}] } });
|
|
249
|
+
|
|
250
|
+
class MapaButtonModule {
|
|
251
|
+
}
|
|
252
|
+
MapaButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
253
|
+
MapaButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MapaButtonModule, declarations: [ButtonComponent], imports: [CommonModule, MatButtonModule], exports: [ButtonComponent] });
|
|
254
|
+
MapaButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaButtonModule, imports: [CommonModule, MatButtonModule] });
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaButtonModule, decorators: [{
|
|
256
|
+
type: NgModule,
|
|
257
|
+
args: [{
|
|
258
|
+
declarations: [ButtonComponent],
|
|
259
|
+
exports: [ButtonComponent],
|
|
260
|
+
imports: [CommonModule, MatButtonModule],
|
|
261
|
+
}]
|
|
262
|
+
}] });
|
|
263
|
+
|
|
264
|
+
/*
|
|
265
|
+
* Public API Surface of mapa-library-ui button
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
class MapaDropdownModule {
|
|
269
|
+
}
|
|
270
|
+
MapaDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
271
|
+
MapaDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownModule, declarations: [MapaDropdownComponent], imports: [CommonModule,
|
|
272
|
+
FormsModule,
|
|
273
|
+
ReactiveFormsModule,
|
|
274
|
+
MatButtonModule,
|
|
275
|
+
MapaButtonModule,
|
|
276
|
+
MatListModule,
|
|
277
|
+
MatIconModule,
|
|
278
|
+
MatSelectModule,
|
|
279
|
+
NgxMatSelectSearchModule], exports: [MapaDropdownComponent] });
|
|
280
|
+
MapaDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownModule, providers: [
|
|
281
|
+
{
|
|
282
|
+
provide: MAT_SELECT_CONFIG,
|
|
283
|
+
useValue: { overlayPanelClass: "mapa-overlay-dropdown" },
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
287
|
+
useValue: { appearance: "outline" },
|
|
288
|
+
},
|
|
289
|
+
], imports: [CommonModule,
|
|
290
|
+
FormsModule,
|
|
291
|
+
ReactiveFormsModule,
|
|
292
|
+
MatButtonModule,
|
|
293
|
+
MapaButtonModule,
|
|
294
|
+
MatListModule,
|
|
295
|
+
MatIconModule,
|
|
296
|
+
MatSelectModule,
|
|
297
|
+
NgxMatSelectSearchModule] });
|
|
298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownModule, decorators: [{
|
|
299
|
+
type: NgModule,
|
|
300
|
+
args: [{
|
|
301
|
+
declarations: [MapaDropdownComponent],
|
|
302
|
+
exports: [MapaDropdownComponent],
|
|
303
|
+
imports: [
|
|
304
|
+
CommonModule,
|
|
305
|
+
FormsModule,
|
|
306
|
+
ReactiveFormsModule,
|
|
307
|
+
MatButtonModule,
|
|
308
|
+
MapaButtonModule,
|
|
309
|
+
MatListModule,
|
|
310
|
+
MatIconModule,
|
|
311
|
+
MatSelectModule,
|
|
312
|
+
NgxMatSelectSearchModule,
|
|
313
|
+
],
|
|
314
|
+
providers: [
|
|
315
|
+
{
|
|
316
|
+
provide: MAT_SELECT_CONFIG,
|
|
317
|
+
useValue: { overlayPanelClass: "mapa-overlay-dropdown" },
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
321
|
+
useValue: { appearance: "outline" },
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
}]
|
|
325
|
+
}] });
|
|
326
|
+
|
|
327
|
+
/*
|
|
328
|
+
* Public API Surface of mapa-library-ui dropdown
|
|
329
|
+
*/
|
|
330
|
+
|
|
331
|
+
class ChecklistDatabase {
|
|
332
|
+
get data() {
|
|
333
|
+
return this.dataChange.value;
|
|
334
|
+
}
|
|
335
|
+
constructor() {
|
|
336
|
+
this.dataChange = new BehaviorSubject([]);
|
|
337
|
+
}
|
|
338
|
+
initialize(treeData) {
|
|
339
|
+
this.treeData = treeData;
|
|
340
|
+
// Build the tree nodes from Json object. The result is a list of `TodoItemNode` with nested
|
|
341
|
+
// file node as children.
|
|
342
|
+
const data = treeData;
|
|
343
|
+
// Notify the change.
|
|
344
|
+
this.dataChange.next(data);
|
|
345
|
+
}
|
|
346
|
+
filter(filterText) {
|
|
347
|
+
let filteredTreeData;
|
|
348
|
+
if (filterText) {
|
|
349
|
+
// Filter the tree
|
|
350
|
+
function filter(array, text) {
|
|
351
|
+
const getChildren = (result, object) => {
|
|
352
|
+
if (object.item.toLowerCase() === text.toLowerCase()) {
|
|
353
|
+
result.push(object);
|
|
354
|
+
return result;
|
|
355
|
+
}
|
|
356
|
+
if (Array.isArray(object.children)) {
|
|
357
|
+
const children = object.children.reduce(getChildren, []);
|
|
358
|
+
if (children.length)
|
|
359
|
+
result.push({ ...object, children });
|
|
360
|
+
}
|
|
361
|
+
return result;
|
|
362
|
+
};
|
|
363
|
+
return array.reduce(getChildren, []);
|
|
364
|
+
}
|
|
365
|
+
filteredTreeData = filter(this.treeData, filterText);
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
// Return the initial tree
|
|
369
|
+
filteredTreeData = this.treeData;
|
|
370
|
+
}
|
|
371
|
+
// Build the tree nodes from Json object. The result is a list of `TodoItemNode` with nested
|
|
372
|
+
// file node as children.
|
|
373
|
+
const data = filteredTreeData;
|
|
374
|
+
// Notify the change.
|
|
375
|
+
this.dataChange.next(data);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
ChecklistDatabase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
379
|
+
ChecklistDatabase.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, providedIn: "root" });
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, decorators: [{
|
|
381
|
+
type: Injectable,
|
|
382
|
+
args: [{ providedIn: "root" }]
|
|
383
|
+
}], ctorParameters: function () { return []; } });
|
|
384
|
+
|
|
385
|
+
class FoodNode {
|
|
386
|
+
constructor() { }
|
|
387
|
+
}
|
|
388
|
+
/** Flat to-do item node with expandable and level information */
|
|
389
|
+
class FoodFlatNode {
|
|
390
|
+
constructor() { }
|
|
391
|
+
}
|
|
392
|
+
class MapaDropdownTreeComponent {
|
|
393
|
+
constructor(_database) {
|
|
394
|
+
this._database = _database;
|
|
395
|
+
this.isMenuExpanded = false;
|
|
396
|
+
/** Map from flat node to nested node. This helps us finding the nested node to be modified */
|
|
397
|
+
this.flatNodeMap = new Map();
|
|
398
|
+
/** Map from nested node to flattened node. This helps us to keep the same object for selection */
|
|
399
|
+
this.nestedNodeMap = new Map();
|
|
400
|
+
/** A selected parent node to be inserted */
|
|
401
|
+
this.selectedParent = null;
|
|
402
|
+
/** The new item's name */
|
|
403
|
+
this.newItemName = "";
|
|
404
|
+
/** The selection for checklist */
|
|
405
|
+
this.checklistSelection = new SelectionModel(true /* multiple */);
|
|
406
|
+
/// Filtering
|
|
407
|
+
this.myControl = new FormControl();
|
|
408
|
+
this.options = ["One", "Two", "Three"];
|
|
409
|
+
this.getLevel = (node) => node.level;
|
|
410
|
+
this.isExpandable = (node) => node.expandable;
|
|
411
|
+
this.getChildren = (node) => node.children;
|
|
412
|
+
this.hasChild = (_, _nodeData) => _nodeData.expandable;
|
|
413
|
+
this.hasNoContent = (_, _nodeData) => _nodeData.item === "";
|
|
414
|
+
/**
|
|
415
|
+
* Transformer to convert nested node to flat node. Record the nodes in maps for later use.
|
|
416
|
+
*/
|
|
417
|
+
this.transformer = (node, level) => {
|
|
418
|
+
const existingNode = this.nestedNodeMap.get(node);
|
|
419
|
+
const flatNode = existingNode && existingNode.item === node.title
|
|
420
|
+
? existingNode
|
|
421
|
+
: new FoodFlatNode();
|
|
422
|
+
flatNode.item = node.title;
|
|
423
|
+
flatNode.level = level;
|
|
424
|
+
flatNode.expandable = !!node.children;
|
|
425
|
+
this.flatNodeMap.set(flatNode, node);
|
|
426
|
+
this.nestedNodeMap.set(node, flatNode);
|
|
427
|
+
return flatNode;
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
ngOnInit() {
|
|
431
|
+
this._database.initialize(this.element.tree);
|
|
432
|
+
this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
|
|
433
|
+
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
|
|
434
|
+
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
|
|
435
|
+
this._database.dataChange.subscribe((data) => {
|
|
436
|
+
this.dataSource.data = data;
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
filter(array, text) {
|
|
440
|
+
const getNodes = (result, object) => {
|
|
441
|
+
if (object.name.toLowerCase().startsWith(text)) {
|
|
442
|
+
result.push(object);
|
|
443
|
+
return result;
|
|
444
|
+
}
|
|
445
|
+
if (Array.isArray(object.children)) {
|
|
446
|
+
const children = object.children.reduce(getNodes, []);
|
|
447
|
+
if (children.length)
|
|
448
|
+
result.push({ ...object, children });
|
|
449
|
+
}
|
|
450
|
+
return result;
|
|
451
|
+
};
|
|
452
|
+
this.element.tree = array.reduce(getNodes, []);
|
|
453
|
+
}
|
|
454
|
+
/** Whether all the descendants of the node are selected. */
|
|
455
|
+
descendantsAllSelected(node) {
|
|
456
|
+
const descendants = this.treeControl.getDescendants(node);
|
|
457
|
+
const descAllSelected = descendants.every((child) => this.checklistSelection.isSelected(child));
|
|
458
|
+
return descAllSelected;
|
|
459
|
+
}
|
|
460
|
+
/** Whether part of the descendants are selected */
|
|
461
|
+
descendantsPartiallySelected(node) {
|
|
462
|
+
const descendants = this.treeControl.getDescendants(node);
|
|
463
|
+
const result = descendants.some((child) => this.checklistSelection.isSelected(child));
|
|
464
|
+
return result && !this.descendantsAllSelected(node);
|
|
465
|
+
}
|
|
466
|
+
/** Toggle the to-do item selection. Select/deselect all the descendants node */
|
|
467
|
+
todoItemSelectionToggle(node) {
|
|
468
|
+
this.checklistSelection.toggle(node);
|
|
469
|
+
const descendants = this.treeControl.getDescendants(node);
|
|
470
|
+
this.checklistSelection.isSelected(node)
|
|
471
|
+
? this.checklistSelection.select(...descendants)
|
|
472
|
+
: this.checklistSelection.deselect(...descendants);
|
|
473
|
+
// Force update for the parent
|
|
474
|
+
descendants.every((child) => this.checklistSelection.isSelected(child));
|
|
475
|
+
this.checkAllParentsSelection(node);
|
|
476
|
+
}
|
|
477
|
+
/** Toggle a leaf to-do item selection. Check all the parents to see if they changed */
|
|
478
|
+
todoLeafItemSelectionToggle(node) {
|
|
479
|
+
this.checklistSelection.toggle(node);
|
|
480
|
+
this.checkAllParentsSelection(node);
|
|
481
|
+
}
|
|
482
|
+
/* Checks all the parents when a leaf node is selected/unselected */
|
|
483
|
+
checkAllParentsSelection(node) {
|
|
484
|
+
let parent = this.getParentNode(node);
|
|
485
|
+
while (parent) {
|
|
486
|
+
this.checkRootNodeSelection(parent);
|
|
487
|
+
parent = this.getParentNode(parent);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
/** Check root node checked state and change it accordingly */
|
|
491
|
+
checkRootNodeSelection(node) {
|
|
492
|
+
const nodeSelected = this.checklistSelection.isSelected(node);
|
|
493
|
+
const descendants = this.treeControl.getDescendants(node);
|
|
494
|
+
const descAllSelected = descendants.every((child) => this.checklistSelection.isSelected(child));
|
|
495
|
+
if (nodeSelected && !descAllSelected) {
|
|
496
|
+
this.checklistSelection.deselect(node);
|
|
497
|
+
}
|
|
498
|
+
else if (!nodeSelected && descAllSelected) {
|
|
499
|
+
this.checklistSelection.select(node);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
/* Get the parent node of a node */
|
|
503
|
+
getParentNode(node) {
|
|
504
|
+
console.log(this.checklistSelection.selected);
|
|
505
|
+
const currentLevel = this.getLevel(node);
|
|
506
|
+
if (currentLevel < 1) {
|
|
507
|
+
return null;
|
|
508
|
+
}
|
|
509
|
+
const startIndex = this.treeControl.dataNodes.indexOf(node) - 1;
|
|
510
|
+
for (let i = startIndex; i >= 0; i--) {
|
|
511
|
+
const currentNode = this.treeControl.dataNodes[i];
|
|
512
|
+
if (this.getLevel(currentNode) < currentLevel) {
|
|
513
|
+
return currentNode;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return null;
|
|
517
|
+
}
|
|
518
|
+
getSelectedItems() {
|
|
519
|
+
if (!this.checklistSelection.selected.length)
|
|
520
|
+
return "Favorite Food";
|
|
521
|
+
return this.checklistSelection.selected.map((s) => s.item).join(",");
|
|
522
|
+
}
|
|
523
|
+
filterChanged(filterText) {
|
|
524
|
+
console.log("filterChanged", filterText);
|
|
525
|
+
// ChecklistDatabase.filter method which actually filters the tree and gives back a tree structure
|
|
526
|
+
this._database.filter(filterText);
|
|
527
|
+
if (filterText) {
|
|
528
|
+
this.treeControl.expandAll();
|
|
529
|
+
}
|
|
530
|
+
else {
|
|
531
|
+
this.treeControl.collapseAll();
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
MapaDropdownTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeComponent, deps: [{ token: ChecklistDatabase }], target: i0.ɵɵFactoryTarget.Component });
|
|
536
|
+
MapaDropdownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaDropdownTreeComponent, selector: "mapa-dropdown-tree", inputs: { formGroup: "formGroup", element: "element" }, ngImport: i0, template: "<form\n [formGroup]=\"formGroup\"\n *ngIf=\"formGroup && element\"\n class=\"mapa-dropdown-tree\"\n>\n <label *ngIf=\"element.label\" class=\"mapa-dropdown-tree__label\">\n {{ element.label }}\n </label>\n <mat-form-field>\n <input\n type=\"text\"\n placeholder=\"{{getSelectedItems()}}\"\n matInput\n (input)=\"filterChanged($event)\"\n [matAutocomplete]=\"auto\"\n (opened)=\"isMenuExpanded = !isMenuExpanded\"\n />\n <mat-icon matSuffix\n >{{ isMenuExpanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down'\n }}</mat-icon\n >\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option disabled>\n <div class=\"mapa-dropdown-tree__search\" *ngIf=\"element.search\">\n <mat-form-field appearance=\"outline\">\n <input\n matInput\n #searchInput\n [formControl]=\"element.search?.formControl!\"\n [placeholder]=\"element.search?.placeholder || ''\"\n (keydown)=\"$event.stopPropagation()\"\n (keyup)=\"filter(element.tree, searchInput.value)\"\n />\n </mat-form-field>\n </div>\n </mat-option>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node\n *matTreeNodeDef=\"let node\"\n matTreeNodeToggle\n matTreeNodePadding\n >\n <button mat-icon-button disabled></button>\n <mat-checkbox\n class=\"checklist-leaf-node\"\n [checked]=\"checklistSelection.isSelected(node)\"\n (change)=\"todoLeafItemSelectionToggle(node)\"\n >{{node.item}}</mat-checkbox\n >\n </mat-tree-node>\n\n <mat-tree-node\n *matTreeNodeDef=\"let node; when: hasChild\"\n matTreeNodePadding\n >\n <button\n mat-icon-button\n matTreeNodeToggle\n [attr.aria-label]=\"'toggle ' + node.filename\"\n >\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n <mat-checkbox\n [checked]=\"descendantsAllSelected(node)\"\n [indeterminate]=\"descendantsPartiallySelected(node)\"\n (change)=\"todoItemSelectionToggle(node)\"\n >\n {{node.item}}</mat-checkbox\n >\n </mat-tree-node>\n </mat-tree>\n <button mat-button class=\"mapa-dropdown-tree__button\" color=\"primary\">\n Limpar todos\n </button>\n </mat-autocomplete>\n </mat-form-field>\n</form>\n", styles: [".mapa-dropdown-tree{max-width:min-content;min-width:235px}.mapa-dropdown-tree .mat-select{font-family:SF-Pro!important}.mapa-dropdown-tree .mat-option{padding:unset!important}.mapa-dropdown-tree__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown-tree__button{padding:9px;width:100%}.mapa-dropdown-tree__search{display:flex;align-items:center;justify-content:center;background:#f6f7f7;width:100%;height:48px}.mapa-dropdown-tree__search .mat-form-field{width:96%}.mapa-dropdown-tree__clean{background:white;border-top:1px solid #dcdcde;bottom:0%;height:36px;position:absolute;width:100%;z-index:9999}.mapa-dropdown-tree__clean button{text-align:left;height:36px;width:100%}.mapa-dropdown-tree--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown-tree--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown-tree .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown-tree .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown-tree .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown-tree .mat-select-value-text{display:block;width:90%}.mapa-dropdown-tree .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown-tree .mat-select-arrow{border:unset}.mapa-dropdown-tree .mat-select-arrow:before,.mapa-dropdown-tree .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown-tree{transform:translate(0) translateY(2px)!important}.mapa-overlay-dropdown-tree ul{padding-inline-start:20px!important;margin-block-start:0px!important;margin-block-end:0px!important;gap:8px}.mapa-overlay-dropdown-tree .tree-toggle{display:none}.mapa-overlay-dropdown-tree .mat-select-tree-hide{display:block!important}.mapa-overlay-dropdown-tree .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown-tree .mat-select-panel .mat-option,.mapa-overlay-dropdown-tree .mat-select-panel .mat-option-text{font-family:SF-Pro!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown-tree .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mat-checkbox-frame{border-color:#c3c4c7!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i7$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i9.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i9.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i9.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i9.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i9.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i11.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i11.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeComponent, decorators: [{
|
|
538
|
+
type: Component,
|
|
539
|
+
args: [{ selector: "mapa-dropdown-tree", encapsulation: ViewEncapsulation.None, template: "<form\n [formGroup]=\"formGroup\"\n *ngIf=\"formGroup && element\"\n class=\"mapa-dropdown-tree\"\n>\n <label *ngIf=\"element.label\" class=\"mapa-dropdown-tree__label\">\n {{ element.label }}\n </label>\n <mat-form-field>\n <input\n type=\"text\"\n placeholder=\"{{getSelectedItems()}}\"\n matInput\n (input)=\"filterChanged($event)\"\n [matAutocomplete]=\"auto\"\n (opened)=\"isMenuExpanded = !isMenuExpanded\"\n />\n <mat-icon matSuffix\n >{{ isMenuExpanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down'\n }}</mat-icon\n >\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option disabled>\n <div class=\"mapa-dropdown-tree__search\" *ngIf=\"element.search\">\n <mat-form-field appearance=\"outline\">\n <input\n matInput\n #searchInput\n [formControl]=\"element.search?.formControl!\"\n [placeholder]=\"element.search?.placeholder || ''\"\n (keydown)=\"$event.stopPropagation()\"\n (keyup)=\"filter(element.tree, searchInput.value)\"\n />\n </mat-form-field>\n </div>\n </mat-option>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node\n *matTreeNodeDef=\"let node\"\n matTreeNodeToggle\n matTreeNodePadding\n >\n <button mat-icon-button disabled></button>\n <mat-checkbox\n class=\"checklist-leaf-node\"\n [checked]=\"checklistSelection.isSelected(node)\"\n (change)=\"todoLeafItemSelectionToggle(node)\"\n >{{node.item}}</mat-checkbox\n >\n </mat-tree-node>\n\n <mat-tree-node\n *matTreeNodeDef=\"let node; when: hasChild\"\n matTreeNodePadding\n >\n <button\n mat-icon-button\n matTreeNodeToggle\n [attr.aria-label]=\"'toggle ' + node.filename\"\n >\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n <mat-checkbox\n [checked]=\"descendantsAllSelected(node)\"\n [indeterminate]=\"descendantsPartiallySelected(node)\"\n (change)=\"todoItemSelectionToggle(node)\"\n >\n {{node.item}}</mat-checkbox\n >\n </mat-tree-node>\n </mat-tree>\n <button mat-button class=\"mapa-dropdown-tree__button\" color=\"primary\">\n Limpar todos\n </button>\n </mat-autocomplete>\n </mat-form-field>\n</form>\n", styles: [".mapa-dropdown-tree{max-width:min-content;min-width:235px}.mapa-dropdown-tree .mat-select{font-family:SF-Pro!important}.mapa-dropdown-tree .mat-option{padding:unset!important}.mapa-dropdown-tree__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown-tree__button{padding:9px;width:100%}.mapa-dropdown-tree__search{display:flex;align-items:center;justify-content:center;background:#f6f7f7;width:100%;height:48px}.mapa-dropdown-tree__search .mat-form-field{width:96%}.mapa-dropdown-tree__clean{background:white;border-top:1px solid #dcdcde;bottom:0%;height:36px;position:absolute;width:100%;z-index:9999}.mapa-dropdown-tree__clean button{text-align:left;height:36px;width:100%}.mapa-dropdown-tree--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown-tree--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown-tree .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown-tree .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown-tree .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown-tree .mat-select-value-text{display:block;width:90%}.mapa-dropdown-tree .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown-tree .mat-select-arrow{border:unset}.mapa-dropdown-tree .mat-select-arrow:before,.mapa-dropdown-tree .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown-tree{transform:translate(0) translateY(2px)!important}.mapa-overlay-dropdown-tree ul{padding-inline-start:20px!important;margin-block-start:0px!important;margin-block-end:0px!important;gap:8px}.mapa-overlay-dropdown-tree .tree-toggle{display:none}.mapa-overlay-dropdown-tree .mat-select-tree-hide{display:block!important}.mapa-overlay-dropdown-tree .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown-tree .mat-select-panel .mat-option,.mapa-overlay-dropdown-tree .mat-select-panel .mat-option-text{font-family:SF-Pro!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown-tree .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mat-checkbox-frame{border-color:#c3c4c7!important}\n"] }]
|
|
540
|
+
}], ctorParameters: function () { return [{ type: ChecklistDatabase }]; }, propDecorators: { formGroup: [{
|
|
541
|
+
type: Input
|
|
542
|
+
}], element: [{
|
|
543
|
+
type: Input
|
|
544
|
+
}] } });
|
|
545
|
+
|
|
546
|
+
class MapaDropdownTreeModule {
|
|
547
|
+
}
|
|
548
|
+
MapaDropdownTreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
549
|
+
MapaDropdownTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeModule, declarations: [MapaDropdownTreeComponent], imports: [CommonModule,
|
|
550
|
+
FormsModule,
|
|
551
|
+
ReactiveFormsModule,
|
|
552
|
+
MatButtonModule,
|
|
553
|
+
MapaButtonModule,
|
|
554
|
+
MatListModule,
|
|
555
|
+
MatIconModule,
|
|
556
|
+
MatInputModule,
|
|
557
|
+
MatSelectModule,
|
|
558
|
+
MatTreeModule,
|
|
559
|
+
MatCheckboxModule,
|
|
560
|
+
MatAutocompleteModule], exports: [MapaDropdownTreeComponent] });
|
|
561
|
+
MapaDropdownTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeModule, providers: [
|
|
562
|
+
{
|
|
563
|
+
provide: MAT_SELECT_CONFIG,
|
|
564
|
+
useValue: { overlayPanelClass: "mapa-overlay-dropdown-tree" },
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
568
|
+
useValue: { appearance: "outline" },
|
|
569
|
+
},
|
|
570
|
+
], imports: [CommonModule,
|
|
571
|
+
FormsModule,
|
|
572
|
+
ReactiveFormsModule,
|
|
573
|
+
MatButtonModule,
|
|
574
|
+
MapaButtonModule,
|
|
575
|
+
MatListModule,
|
|
576
|
+
MatIconModule,
|
|
577
|
+
MatInputModule,
|
|
578
|
+
MatSelectModule,
|
|
579
|
+
MatTreeModule,
|
|
580
|
+
MatCheckboxModule,
|
|
581
|
+
MatAutocompleteModule] });
|
|
582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeModule, decorators: [{
|
|
583
|
+
type: NgModule,
|
|
584
|
+
args: [{
|
|
585
|
+
declarations: [MapaDropdownTreeComponent],
|
|
586
|
+
exports: [MapaDropdownTreeComponent],
|
|
587
|
+
imports: [
|
|
588
|
+
CommonModule,
|
|
589
|
+
FormsModule,
|
|
590
|
+
ReactiveFormsModule,
|
|
591
|
+
MatButtonModule,
|
|
592
|
+
MapaButtonModule,
|
|
593
|
+
MatListModule,
|
|
594
|
+
MatIconModule,
|
|
595
|
+
MatInputModule,
|
|
596
|
+
MatSelectModule,
|
|
597
|
+
MatTreeModule,
|
|
598
|
+
MatCheckboxModule,
|
|
599
|
+
MatAutocompleteModule,
|
|
600
|
+
],
|
|
601
|
+
providers: [
|
|
602
|
+
{
|
|
603
|
+
provide: MAT_SELECT_CONFIG,
|
|
604
|
+
useValue: { overlayPanelClass: "mapa-overlay-dropdown-tree" },
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
608
|
+
useValue: { appearance: "outline" },
|
|
609
|
+
},
|
|
610
|
+
],
|
|
611
|
+
}]
|
|
612
|
+
}] });
|
|
613
|
+
|
|
614
|
+
/*
|
|
615
|
+
* Public API Surface of mapa-library-ui dropdown-tree
|
|
616
|
+
*/
|
|
617
|
+
|
|
618
|
+
/*
|
|
619
|
+
* Public API Surface of mapa-library-ui dropdown
|
|
620
|
+
*/
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Generated bundle index. Do not edit.
|
|
624
|
+
*/
|
|
625
|
+
|
|
626
|
+
export { Dropdown, ElementBase, FoodFlatNode, FoodNode, MapaDropdownComponent, MapaDropdownModule, MapaDropdownTreeComponent, MapaDropdownTreeModule };
|
|
627
|
+
//# sourceMappingURL=mapa-library-ui-src-lib-components-dropdown-tree.mjs.map
|