@ptsecurity/mosaic 12.2.1 → 13.1.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/_theming.scss +1000 -934
- package/_visual.scss +849 -694
- package/autocomplete/README.md +0 -0
- package/autocomplete/package.json +5 -5
- package/button/README.md +0 -0
- package/button/button.component.d.ts +17 -14
- package/button/button.module.d.ts +1 -1
- package/button/package.json +5 -5
- package/button-toggle/README.md +0 -0
- package/button-toggle/package.json +5 -5
- package/card/README.md +0 -0
- package/card/package.json +5 -5
- package/checkbox/README.md +1 -0
- package/checkbox/package.json +5 -5
- package/core/formatters/date/formatter.d.ts +41 -17
- package/core/formatters/date/templates/en-US.d.ts +8 -8
- package/core/formatters/date/templates/ru-RU.d.ts +8 -8
- package/core/package.json +5 -5
- package/core/public-api.d.ts +1 -0
- package/core/version.d.ts +2 -0
- package/datepicker/README.md +0 -0
- package/datepicker/package.json +5 -5
- package/design-tokens/{tokens → legacy-2017/tokens}/components/alert.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/autocomplete.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/badge.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/button-toggle.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/button.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/card.json5 +0 -0
- package/design-tokens/legacy-2017/tokens/components/checkbox.json5 +39 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/datepicker.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/divider.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/dropdown.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/form-field.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/forms.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/input.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/link.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/list.json5 +0 -0
- package/design-tokens/legacy-2017/tokens/components/modal.json5 +79 -0
- package/design-tokens/legacy-2017/tokens/components/navbar.json5 +69 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/optgroup.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/option.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/popover.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/popup.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/progress-bar.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/progress-spinner.json5 +0 -0
- package/design-tokens/legacy-2017/tokens/components/radio.json5 +44 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/select.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/sidepanel.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/table.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/tabs.json5 +0 -0
- package/design-tokens/legacy-2017/tokens/components/tags.json5 +132 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/textarea.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/timepicker.json5 +0 -0
- package/design-tokens/legacy-2017/tokens/components/toggle.json5 +79 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/tooltip.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/components/tree.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/properties/aliases.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/properties/colors.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/properties/font.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/properties/globals.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/properties/padding.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/properties/palette.json5 +0 -0
- package/design-tokens/{tokens → legacy-2017/tokens}/properties/typography.json5 +0 -0
- package/design-tokens/legacy-2017/tokens.d.ts +7659 -0
- package/design-tokens/package.json +5 -5
- package/design-tokens/pt-2022/tokens/components/alert.json5 +83 -0
- package/design-tokens/pt-2022/tokens/components/autocomplete.json5 +11 -0
- package/design-tokens/pt-2022/tokens/components/badge.json5 +184 -0
- package/design-tokens/pt-2022/tokens/components/button-toggle.json5 +10 -0
- package/design-tokens/pt-2022/tokens/components/button.json5 +143 -0
- package/design-tokens/pt-2022/tokens/components/card.json5 +51 -0
- package/design-tokens/pt-2022/tokens/components/checkbox.json5 +39 -0
- package/design-tokens/pt-2022/tokens/components/datepicker.json5 +64 -0
- package/design-tokens/pt-2022/tokens/components/divider.json5 +8 -0
- package/design-tokens/pt-2022/tokens/components/dropdown.json5 +47 -0
- package/design-tokens/pt-2022/tokens/components/form-field.json5 +52 -0
- package/design-tokens/pt-2022/tokens/components/forms.json5 +52 -0
- package/design-tokens/pt-2022/tokens/components/input.json5 +13 -0
- package/design-tokens/pt-2022/tokens/components/link.json5 +56 -0
- package/design-tokens/pt-2022/tokens/components/list.json5 +15 -0
- package/design-tokens/pt-2022/tokens/components/modal.json5 +79 -0
- package/design-tokens/pt-2022/tokens/components/navbar.json5 +69 -0
- package/design-tokens/pt-2022/tokens/components/optgroup.json5 +10 -0
- package/design-tokens/pt-2022/tokens/components/option.json5 +12 -0
- package/design-tokens/pt-2022/tokens/components/popover.json5 +68 -0
- package/design-tokens/pt-2022/tokens/components/popup.json5 +18 -0
- package/design-tokens/pt-2022/tokens/components/progress-bar.json5 +13 -0
- package/design-tokens/pt-2022/tokens/components/progress-spinner.json5 +7 -0
- package/design-tokens/pt-2022/tokens/components/radio.json5 +44 -0
- package/design-tokens/pt-2022/tokens/components/select.json5 +25 -0
- package/design-tokens/pt-2022/tokens/components/sidepanel.json5 +30 -0
- package/design-tokens/pt-2022/tokens/components/table.json5 +15 -0
- package/design-tokens/pt-2022/tokens/components/tabs.json5 +25 -0
- package/design-tokens/pt-2022/tokens/components/tags.json5 +132 -0
- package/design-tokens/pt-2022/tokens/components/textarea.json5 +12 -0
- package/design-tokens/pt-2022/tokens/components/timepicker.json5 +7 -0
- package/design-tokens/pt-2022/tokens/components/toggle.json5 +79 -0
- package/design-tokens/pt-2022/tokens/components/tooltip.json5 +83 -0
- package/design-tokens/pt-2022/tokens/components/tree.json5 +12 -0
- package/design-tokens/pt-2022/tokens/properties/aliases.json5 +3 -0
- package/design-tokens/pt-2022/tokens/properties/colors.json5 +112 -0
- package/design-tokens/pt-2022/tokens/properties/font.json5 +15 -0
- package/design-tokens/pt-2022/tokens/properties/globals.json5 +30 -0
- package/design-tokens/pt-2022/tokens/properties/padding.json5 +3 -0
- package/design-tokens/pt-2022/tokens/properties/palette.json5 +226 -0
- package/design-tokens/pt-2022/tokens/properties/typography.json5 +140 -0
- package/design-tokens/pt-2022/tokens.d.ts +8696 -0
- package/design-tokens/public-api.d.ts +3 -1
- package/design-tokens/style-dictionary/build.js +6 -0
- package/design-tokens/style-dictionary/configs/index.js +2 -1
- package/divider/README.md +0 -0
- package/divider/package.json +5 -5
- package/dropdown/dropdown-item.component.d.ts +1 -0
- package/dropdown/package.json +5 -5
- package/esm2020/autocomplete/autocomplete-origin.directive.mjs +21 -0
- package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +555 -0
- package/esm2020/autocomplete/autocomplete.component.mjs +154 -0
- package/esm2020/autocomplete/autocomplete.module.mjs +34 -0
- package/{esm2015/autocomplete/index.js → esm2020/autocomplete/index.mjs} +0 -0
- package/{esm2015/autocomplete/ptsecurity-mosaic-autocomplete.js → esm2020/autocomplete/ptsecurity-mosaic-autocomplete.mjs} +0 -0
- package/{esm2015/autocomplete/public-api.js → esm2020/autocomplete/public-api.mjs} +0 -0
- package/esm2020/button/button.component.mjs +129 -0
- package/esm2020/button/button.module.mjs +38 -0
- package/{esm2015/button/index.js → esm2020/button/index.mjs} +0 -0
- package/{esm2015/button/ptsecurity-mosaic-button.js → esm2020/button/ptsecurity-mosaic-button.mjs} +0 -0
- package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
- package/esm2020/button-toggle/button-toggle.component.mjs +362 -0
- package/esm2020/button-toggle/button-toggle.module.mjs +19 -0
- package/{esm2015/button-toggle/index.js → esm2020/button-toggle/index.mjs} +0 -0
- package/{esm2015/button-toggle/ptsecurity-mosaic-button-toggle.js → esm2020/button-toggle/ptsecurity-mosaic-button-toggle.mjs} +0 -0
- package/{esm2015/button-toggle/public-api.js → esm2020/button-toggle/public-api.mjs} +0 -0
- package/esm2020/card/card.component.mjs +80 -0
- package/esm2020/card/card.module.mjs +30 -0
- package/{esm2015/card/index.js → esm2020/card/index.mjs} +0 -0
- package/{esm2015/card/ptsecurity-mosaic-card.js → esm2020/card/ptsecurity-mosaic-card.mjs} +0 -0
- package/{esm2015/card/public-api.js → esm2020/card/public-api.mjs} +0 -0
- package/{esm2015/checkbox/checkbox-config.js → esm2020/checkbox/checkbox-config.mjs} +0 -0
- package/esm2020/checkbox/checkbox-module.mjs +19 -0
- package/esm2020/checkbox/checkbox-required-validator.mjs +27 -0
- package/esm2020/checkbox/checkbox.mjs +315 -0
- package/{esm2015/checkbox/index.js → esm2020/checkbox/index.mjs} +0 -0
- package/{esm2015/checkbox/ptsecurity-mosaic-checkbox.js → esm2020/checkbox/ptsecurity-mosaic-checkbox.mjs} +0 -0
- package/{esm2015/checkbox/public-api.js → esm2020/checkbox/public-api.mjs} +0 -0
- package/{esm2015/core/animation/animation.js → esm2020/core/animation/animation.mjs} +0 -0
- package/{esm2015/core/animation/fade-animations.js → esm2020/core/animation/fade-animations.mjs} +0 -0
- package/{esm2015/core/animation/index.js → esm2020/core/animation/index.mjs} +0 -0
- package/{esm2015/core/animation/select-animations.js → esm2020/core/animation/select-animations.mjs} +0 -0
- package/{esm2015/core/common-behaviors/color.js → esm2020/core/common-behaviors/color.mjs} +0 -0
- package/esm2020/core/common-behaviors/common-module.mjs +83 -0
- package/{esm2015/core/common-behaviors/constructor.js → esm2020/core/common-behaviors/constructor.mjs} +0 -0
- package/{esm2015/core/common-behaviors/disabled.js → esm2020/core/common-behaviors/disabled.mjs} +0 -0
- package/{esm2015/core/common-behaviors/error-state.js → esm2020/core/common-behaviors/error-state.mjs} +0 -0
- package/{esm2015/core/common-behaviors/index.js → esm2020/core/common-behaviors/index.mjs} +0 -0
- package/{esm2015/core/common-behaviors/tabindex.js → esm2020/core/common-behaviors/tabindex.mjs} +0 -0
- package/esm2020/core/error/error-options.mjs +26 -0
- package/esm2020/core/formatters/date/formatter.mjs +359 -0
- package/esm2020/core/formatters/date/templates/en-US.mjs +281 -0
- package/esm2020/core/formatters/date/templates/ru-RU.mjs +281 -0
- package/esm2020/core/formatters/index.mjs +20 -0
- package/esm2020/core/formatters/number/formatter.mjs +105 -0
- package/esm2020/core/forms/forms-module.mjs +24 -0
- package/esm2020/core/forms/forms.directive.mjs +66 -0
- package/{esm2015/core/forms/index.js → esm2020/core/forms/index.mjs} +0 -0
- package/esm2020/core/highlight/highlight.pipe.mjs +17 -0
- package/esm2020/core/highlight/index.mjs +19 -0
- package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
- package/{esm2015/core/label/label-options.js → esm2020/core/label/label-options.mjs} +0 -0
- package/esm2020/core/line/line.mjs +70 -0
- package/esm2020/core/option/action.mjs +121 -0
- package/{esm2015/core/option/index.js → esm2020/core/option/index.mjs} +0 -0
- package/esm2020/core/option/optgroup.mjs +31 -0
- package/esm2020/core/option/option-module.mjs +21 -0
- package/esm2020/core/option/option.mjs +254 -0
- package/{esm2015/core/overlay/overlay-position-map.js → esm2020/core/overlay/overlay-position-map.mjs} +0 -0
- package/{esm2015/core/pop-up/constants.js → esm2020/core/pop-up/constants.mjs} +0 -0
- package/{esm2015/core/pop-up/index.js → esm2020/core/pop-up/index.mjs} +0 -0
- package/esm2020/core/pop-up/pop-up-trigger.mjs +244 -0
- package/esm2020/core/pop-up/pop-up.mjs +91 -0
- package/{esm2015/core/ptsecurity-mosaic-core.js → esm2020/core/ptsecurity-mosaic-core.mjs} +0 -0
- package/esm2020/core/public-api.mjs +18 -0
- package/{esm2015/core/select/constants.js → esm2020/core/select/constants.mjs} +0 -0
- package/{esm2015/core/select/errors.js → esm2020/core/select/errors.mjs} +0 -0
- package/{esm2015/core/select/events.js → esm2020/core/select/events.mjs} +0 -0
- package/{esm2015/core/select/index.js → esm2020/core/select/index.mjs} +0 -0
- package/{esm2015/core/selection/constants.js → esm2020/core/selection/constants.mjs} +0 -0
- package/{esm2015/core/selection/index.js → esm2020/core/selection/index.mjs} +0 -0
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +37 -0
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +18 -0
- package/esm2020/core/services/measure-scrollbar.service.mjs +48 -0
- package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +0 -0
- package/{esm2015/core/utils/public-api.js → esm2020/core/utils/public-api.mjs} +0 -0
- package/{esm2015/core/utils/utils.js → esm2020/core/utils/utils.mjs} +0 -0
- package/{esm2015/core/validation/index.js → esm2020/core/validation/index.mjs} +0 -0
- package/{esm2015/core/validation/validation.js → esm2020/core/validation/validation.mjs} +0 -0
- package/esm2020/core/version.mjs +3 -0
- package/esm2020/datepicker/calendar-body.component.mjs +106 -0
- package/esm2020/datepicker/calendar.component.mjs +362 -0
- package/{esm2015/datepicker/datepicker-animations.js → esm2020/datepicker/datepicker-animations.mjs} +0 -0
- package/{esm2015/datepicker/datepicker-errors.js → esm2020/datepicker/datepicker-errors.mjs} +0 -0
- package/esm2020/datepicker/datepicker-input.directive.mjs +900 -0
- package/esm2020/datepicker/datepicker-intl.mjs +40 -0
- package/esm2020/datepicker/datepicker-module.mjs +107 -0
- package/esm2020/datepicker/datepicker-toggle.component.mjs +86 -0
- package/esm2020/datepicker/datepicker.component.mjs +408 -0
- package/{esm2015/datepicker/index.js → esm2020/datepicker/index.mjs} +0 -0
- package/esm2020/datepicker/month-view.component.mjs +257 -0
- package/esm2020/datepicker/multi-year-view.component.mjs +218 -0
- package/{esm2015/datepicker/ptsecurity-mosaic-datepicker.js → esm2020/datepicker/ptsecurity-mosaic-datepicker.mjs} +0 -0
- package/{esm2015/datepicker/public-api.js → esm2020/datepicker/public-api.mjs} +0 -0
- package/esm2020/datepicker/year-view.component.mjs +253 -0
- package/{esm2015/design-tokens/index.js → esm2020/design-tokens/index.mjs} +0 -0
- package/esm2020/design-tokens/legacy-2017/tokens.mjs +953 -0
- package/esm2020/design-tokens/pt-2022/tokens.mjs +1013 -0
- package/{esm2015/design-tokens/ptsecurity-mosaic-design-tokens.js → esm2020/design-tokens/ptsecurity-mosaic-design-tokens.mjs} +0 -0
- package/esm2020/design-tokens/public-api.mjs +4 -0
- package/esm2020/divider/divider.component.mjs +39 -0
- package/esm2020/divider/divider.module.mjs +18 -0
- package/{esm2015/divider/index.js → esm2020/divider/index.mjs} +0 -0
- package/{esm2015/divider/ptsecurity-mosaic-divider.js → esm2020/divider/ptsecurity-mosaic-divider.mjs} +0 -0
- package/{esm2015/divider/public-api.js → esm2020/divider/public-api.mjs} +0 -0
- package/{esm2015/dropdown/dropdown-animations.js → esm2020/dropdown/dropdown-animations.mjs} +0 -0
- package/esm2020/dropdown/dropdown-content.directive.mjs +64 -0
- package/{esm2015/dropdown/dropdown-errors.js → esm2020/dropdown/dropdown-errors.mjs} +0 -0
- package/esm2020/dropdown/dropdown-item.component.mjs +139 -0
- package/esm2020/dropdown/dropdown-trigger.directive.mjs +485 -0
- package/esm2020/dropdown/dropdown.component.mjs +292 -0
- package/esm2020/dropdown/dropdown.module.mjs +50 -0
- package/{esm2015/dropdown/dropdown.types.js → esm2020/dropdown/dropdown.types.mjs} +0 -0
- package/{esm2015/dropdown/index.js → esm2020/dropdown/index.mjs} +0 -0
- package/{esm2015/dropdown/ptsecurity-mosaic-dropdown.js → esm2020/dropdown/ptsecurity-mosaic-dropdown.mjs} +0 -0
- package/{esm2015/dropdown/public-api.js → esm2020/dropdown/public-api.mjs} +0 -0
- package/esm2020/form-field/cleaner.mjs +23 -0
- package/{esm2015/form-field/form-field-control.js → esm2020/form-field/form-field-control.mjs} +0 -0
- package/{esm2015/form-field/form-field-errors.js → esm2020/form-field/form-field-errors.mjs} +0 -0
- package/esm2020/form-field/form-field.mjs +205 -0
- package/esm2020/form-field/form-field.module.mjs +52 -0
- package/esm2020/form-field/hint.mjs +23 -0
- package/{esm2015/form-field/index.js → esm2020/form-field/index.mjs} +0 -0
- package/esm2020/form-field/prefix.mjs +13 -0
- package/{esm2015/form-field/ptsecurity-mosaic-form-field.js → esm2020/form-field/ptsecurity-mosaic-form-field.mjs} +0 -0
- package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
- package/esm2020/form-field/stepper.mjs +55 -0
- package/esm2020/form-field/suffix.mjs +13 -0
- package/esm2020/icon/icon.component.mjs +44 -0
- package/esm2020/icon/icon.module.mjs +38 -0
- package/{esm2015/icon/index.js → esm2020/icon/index.mjs} +0 -0
- package/{esm2015/icon/ptsecurity-mosaic-icon.js → esm2020/icon/ptsecurity-mosaic-icon.mjs} +0 -0
- package/{esm2015/icon/public-api.js → esm2020/icon/public-api.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/input/index.js → esm2020/input/index.mjs} +0 -0
- package/{esm2015/input/input-errors.js → esm2020/input/input-errors.mjs} +0 -0
- package/esm2020/input/input-number-validators.mjs +92 -0
- package/esm2020/input/input-number.mjs +163 -0
- package/{esm2015/input/input-value-accessor.js → esm2020/input/input-value-accessor.mjs} +0 -0
- package/esm2020/input/input.mjs +333 -0
- package/esm2020/input/input.module.mjs +23 -0
- package/{esm2015/input/ptsecurity-mosaic-input.js → esm2020/input/ptsecurity-mosaic-input.mjs} +0 -0
- package/{esm2015/input/public-api.js → esm2020/input/public-api.mjs} +0 -0
- package/{esm2015/link/index.js → esm2020/link/index.mjs} +0 -0
- package/esm2020/link/link.component.mjs +107 -0
- package/esm2020/link/link.module.mjs +26 -0
- package/{esm2015/link/ptsecurity-mosaic-link.js → esm2020/link/ptsecurity-mosaic-link.mjs} +0 -0
- package/{esm2015/link/public-api.js → esm2020/link/public-api.mjs} +0 -0
- package/{esm2015/list/index.js → esm2020/list/index.mjs} +0 -0
- package/esm2020/list/list-selection.component.mjs +687 -0
- package/esm2020/list/list.component.mjs +44 -0
- package/esm2020/list/list.module.mjs +55 -0
- package/{esm2015/list/ptsecurity-mosaic-list.js → esm2020/list/ptsecurity-mosaic-list.mjs} +0 -0
- package/{esm2015/list/public-api.js → esm2020/list/public-api.mjs} +0 -0
- package/esm2020/modal/css-unit.pipe.mjs +17 -0
- package/{esm2015/modal/index.js → esm2020/modal/index.mjs} +0 -0
- package/esm2020/modal/modal-control.service.mjs +85 -0
- package/{esm2015/modal/modal-ref.class.js → esm2020/modal/modal-ref.class.mjs} +0 -0
- package/{esm2015/modal/modal-util.js → esm2020/modal/modal-util.mjs} +0 -0
- package/esm2020/modal/modal.component.mjs +501 -0
- package/esm2020/modal/modal.directive.mjs +52 -0
- package/esm2020/modal/modal.module.mjs +72 -0
- package/esm2020/modal/modal.service.mjs +124 -0
- package/{esm2015/modal/modal.type.js → esm2020/modal/modal.type.mjs} +0 -0
- package/{esm2015/modal/ptsecurity-mosaic-modal.js → esm2020/modal/ptsecurity-mosaic-modal.mjs} +0 -0
- package/{esm2015/modal/public-api.js → esm2020/modal/public-api.mjs} +0 -0
- package/{esm2015/navbar/index.js → esm2020/navbar/index.mjs} +0 -0
- package/esm2020/navbar/navbar-item.component.mjs +577 -0
- package/esm2020/navbar/navbar.component.mjs +237 -0
- package/esm2020/navbar/navbar.module.mjs +92 -0
- package/{esm2015/navbar/ptsecurity-mosaic-navbar.js → esm2020/navbar/ptsecurity-mosaic-navbar.mjs} +0 -0
- package/{esm2015/navbar/public-api.js → esm2020/navbar/public-api.mjs} +0 -0
- package/esm2020/navbar/vertical-navbar.animation.mjs +10 -0
- package/esm2020/navbar/vertical-navbar.component.mjs +114 -0
- package/{esm2015/popover/index.js → esm2020/popover/index.mjs} +0 -0
- package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
- package/esm2020/popover/popover-confirm.component.mjs +108 -0
- package/esm2020/popover/popover.component.mjs +253 -0
- package/esm2020/popover/popover.module.mjs +24 -0
- package/{esm2015/popover/ptsecurity-mosaic-popover.js → esm2020/popover/ptsecurity-mosaic-popover.mjs} +0 -0
- package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +0 -0
- package/{esm2015/progress-bar/index.js → esm2020/progress-bar/index.mjs} +0 -0
- package/esm2020/progress-bar/progress-bar.component.mjs +42 -0
- package/esm2020/progress-bar/progress-bar.module.mjs +30 -0
- package/{esm2015/progress-bar/ptsecurity-mosaic-progress-bar.js → esm2020/progress-bar/ptsecurity-mosaic-progress-bar.mjs} +0 -0
- package/{esm2015/progress-bar/public-api.js → esm2020/progress-bar/public-api.mjs} +0 -0
- package/{esm2015/progress-spinner/index.js → esm2020/progress-spinner/index.mjs} +0 -0
- package/esm2020/progress-spinner/progress-spinner.component.mjs +46 -0
- package/esm2020/progress-spinner/progress-spinner.module.mjs +30 -0
- package/{esm2015/progress-spinner/ptsecurity-mosaic-progress-spinner.js → esm2020/progress-spinner/ptsecurity-mosaic-progress-spinner.mjs} +0 -0
- package/{esm2015/progress-spinner/public-api.js → esm2020/progress-spinner/public-api.mjs} +0 -0
- package/{esm2015/ptsecurity-mosaic.js → esm2020/ptsecurity-mosaic.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/{esm2015/radio/index.js → esm2020/radio/index.mjs} +0 -0
- package/{esm2015/radio/ptsecurity-mosaic-radio.js → esm2020/radio/ptsecurity-mosaic-radio.mjs} +0 -0
- package/{esm2015/radio/public-api.js → esm2020/radio/public-api.mjs} +0 -0
- package/esm2020/radio/radio.component.mjs +458 -0
- package/esm2020/radio/radio.module.mjs +20 -0
- package/{esm2015/select/index.js → esm2020/select/index.mjs} +0 -0
- package/{esm2015/select/ptsecurity-mosaic-select.js → esm2020/select/ptsecurity-mosaic-select.mjs} +0 -0
- package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
- package/esm2020/select/select.component.mjs +1110 -0
- package/esm2020/select/select.module.mjs +64 -0
- package/{esm2015/sidebar/index.js → esm2020/sidebar/index.mjs} +0 -0
- package/{esm2015/sidebar/ptsecurity-mosaic-sidebar.js → esm2020/sidebar/ptsecurity-mosaic-sidebar.mjs} +0 -0
- package/{esm2015/sidebar/public-api.js → esm2020/sidebar/public-api.mjs} +0 -0
- package/{esm2015/sidebar/sidebar-animations.js → esm2020/sidebar/sidebar-animations.mjs} +0 -0
- package/esm2020/sidebar/sidebar.component.mjs +146 -0
- package/esm2020/sidebar/sidebar.module.mjs +30 -0
- package/{esm2015/sidepanel/index.js → esm2020/sidepanel/index.mjs} +0 -0
- package/{esm2015/sidepanel/ptsecurity-mosaic-sidepanel.js → esm2020/sidepanel/ptsecurity-mosaic-sidepanel.mjs} +0 -0
- package/{esm2015/sidepanel/public-api.js → esm2020/sidepanel/public-api.mjs} +0 -0
- package/{esm2015/sidepanel/sidepanel-animations.js → esm2020/sidepanel/sidepanel-animations.mjs} +0 -0
- package/{esm2015/sidepanel/sidepanel-config.js → esm2020/sidepanel/sidepanel-config.mjs} +0 -0
- package/esm2020/sidepanel/sidepanel-container.component.mjs +106 -0
- package/esm2020/sidepanel/sidepanel-directives.mjs +159 -0
- package/{esm2015/sidepanel/sidepanel-ref.js → esm2020/sidepanel/sidepanel-ref.mjs} +0 -0
- package/esm2020/sidepanel/sidepanel.module.mjs +74 -0
- package/esm2020/sidepanel/sidepanel.service.mjs +167 -0
- package/{esm2015/splitter/index.js → esm2020/splitter/index.mjs} +0 -0
- package/{esm2015/splitter/ptsecurity-mosaic-splitter.js → esm2020/splitter/ptsecurity-mosaic-splitter.mjs} +0 -0
- package/{esm2015/splitter/public-api.js → esm2020/splitter/public-api.mjs} +0 -0
- package/esm2020/splitter/splitter.component.mjs +480 -0
- package/esm2020/splitter/splitter.module.mjs +40 -0
- package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
- package/{esm2015/table/ptsecurity-mosaic-table.js → esm2020/table/ptsecurity-mosaic-table.mjs} +0 -0
- package/{esm2015/table/public-api.js → esm2020/table/public-api.mjs} +0 -0
- package/esm2020/table/table.component.mjs +16 -0
- package/esm2020/table/table.module.mjs +30 -0
- package/{esm2015/tabs/index.js → esm2020/tabs/index.mjs} +0 -0
- package/esm2020/tabs/paginated-tab-header.mjs +479 -0
- package/{esm2015/tabs/ptsecurity-mosaic-tabs.js → esm2020/tabs/ptsecurity-mosaic-tabs.mjs} +0 -0
- package/{esm2015/tabs/public-api.js → esm2020/tabs/public-api.mjs} +0 -0
- package/esm2020/tabs/tab-body.component.mjs +178 -0
- package/esm2020/tabs/tab-content.directive.mjs +15 -0
- package/esm2020/tabs/tab-group.component.mjs +350 -0
- package/esm2020/tabs/tab-header.component.mjs +67 -0
- package/esm2020/tabs/tab-label-wrapper.directive.mjs +78 -0
- package/esm2020/tabs/tab-label.directive.mjs +17 -0
- package/{esm2015/tabs/tab-nav-bar/index.js → esm2020/tabs/tab-nav-bar/index.mjs} +0 -0
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +110 -0
- package/esm2020/tabs/tab.component.mjs +133 -0
- package/{esm2015/tabs/tabs-animations.js → esm2020/tabs/tabs-animations.mjs} +0 -0
- package/esm2020/tabs/tabs.module.mjs +104 -0
- package/{esm2015/tags/index.js → esm2020/tags/index.mjs} +0 -0
- package/{esm2015/tags/ptsecurity-mosaic-tags.js → esm2020/tags/ptsecurity-mosaic-tags.mjs} +0 -0
- package/{esm2015/tags/public-api.js → esm2020/tags/public-api.mjs} +0 -0
- package/{esm2015/tags/tag-default-options.js → esm2020/tags/tag-default-options.mjs} +0 -0
- package/esm2020/tags/tag-input.mjs +229 -0
- package/esm2020/tags/tag-list.component.mjs +722 -0
- package/{esm2015/tags/tag-text-control.js → esm2020/tags/tag-text-control.mjs} +0 -0
- package/esm2020/tags/tag.component.mjs +377 -0
- package/esm2020/tags/tag.module.mjs +56 -0
- package/{esm2015/textarea/index.js → esm2020/textarea/index.mjs} +0 -0
- package/{esm2015/textarea/ptsecurity-mosaic-textarea.js → esm2020/textarea/ptsecurity-mosaic-textarea.mjs} +0 -0
- package/{esm2015/textarea/public-api.js → esm2020/textarea/public-api.mjs} +0 -0
- package/esm2020/textarea/textarea.component.mjs +268 -0
- package/esm2020/textarea/textarea.module.mjs +21 -0
- package/{esm2015/timepicker/index.js → esm2020/timepicker/index.mjs} +0 -0
- package/{esm2015/timepicker/ptsecurity-mosaic-timepicker.js → esm2020/timepicker/ptsecurity-mosaic-timepicker.mjs} +0 -0
- package/{esm2015/timepicker/public-api.js → esm2020/timepicker/public-api.mjs} +0 -0
- package/{esm2015/timepicker/timepicker.constants.js → esm2020/timepicker/timepicker.constants.mjs} +0 -0
- package/esm2020/timepicker/timepicker.directive.mjs +653 -0
- package/esm2020/timepicker/timepicker.module.mjs +34 -0
- package/{esm2015/toggle/index.js → esm2020/toggle/index.mjs} +0 -0
- package/{esm2015/toggle/ptsecurity-mosaic-toggle.js → esm2020/toggle/ptsecurity-mosaic-toggle.mjs} +0 -0
- package/{esm2015/toggle/public-api.js → esm2020/toggle/public-api.mjs} +0 -0
- package/esm2020/toggle/toggle.component.mjs +158 -0
- package/esm2020/toggle/toggle.module.mjs +20 -0
- package/{esm2015/tooltip/index.js → esm2020/tooltip/index.mjs} +0 -0
- package/{esm2015/tooltip/ptsecurity-mosaic-tooltip.js → esm2020/tooltip/ptsecurity-mosaic-tooltip.mjs} +0 -0
- package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
- package/{esm2015/tooltip/tooltip.animations.js → esm2020/tooltip/tooltip.animations.mjs} +0 -0
- package/esm2020/tooltip/tooltip.component.mjs +291 -0
- package/esm2020/tooltip/tooltip.module.mjs +43 -0
- package/{esm2015/tree/control/base-tree-control.js → esm2020/tree/control/base-tree-control.mjs} +0 -0
- package/{esm2015/tree/control/flat-tree-control.js → esm2020/tree/control/flat-tree-control.mjs} +0 -0
- package/{esm2015/tree/control/nested-tree-control.js → esm2020/tree/control/nested-tree-control.mjs} +0 -0
- package/{esm2015/tree/control/tree-control.js → esm2020/tree/control/tree-control.mjs} +0 -0
- package/esm2020/tree/data-source/flat-data-source.mjs +162 -0
- package/{esm2015/tree/data-source/nested-data-source.js → esm2020/tree/data-source/nested-data-source.mjs} +0 -0
- package/{esm2015/tree/index.js → esm2020/tree/index.mjs} +0 -0
- package/esm2020/tree/node.mjs +31 -0
- package/esm2020/tree/outlet.mjs +15 -0
- package/esm2020/tree/padding.directive.mjs +110 -0
- package/{esm2015/tree/ptsecurity-mosaic-tree.js → esm2020/tree/ptsecurity-mosaic-tree.mjs} +0 -0
- package/{esm2015/tree/public-api.js → esm2020/tree/public-api.mjs} +0 -0
- package/esm2020/tree/toggle.mjs +80 -0
- package/esm2020/tree/tree-base.mjs +243 -0
- package/{esm2015/tree/tree-errors.js → esm2020/tree/tree-errors.mjs} +0 -0
- package/esm2020/tree/tree-option.component.mjs +234 -0
- package/esm2020/tree/tree-selection.component.mjs +533 -0
- package/esm2020/tree/tree.mjs +15 -0
- package/esm2020/tree/tree.module.mjs +53 -0
- package/{esm2015/tree-select/index.js → esm2020/tree-select/index.mjs} +0 -0
- package/{esm2015/tree-select/ptsecurity-mosaic-tree-select.js → esm2020/tree-select/ptsecurity-mosaic-tree-select.mjs} +0 -0
- package/{esm2015/tree-select/public-api.js → esm2020/tree-select/public-api.mjs} +0 -0
- package/esm2020/tree-select/tree-select.component.mjs +925 -0
- package/esm2020/tree-select/tree-select.module.mjs +47 -0
- package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +756 -0
- package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +385 -0
- package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-button.mjs +170 -0
- package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-card.mjs +113 -0
- package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-checkbox.mjs +366 -0
- package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-core.mjs +2706 -0
- package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs +2700 -0
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +2925 -0
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-divider.mjs +61 -0
- package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-dropdown.mjs +1106 -0
- package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-form-field.mjs +378 -0
- package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-icon.mjs +88 -0
- package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-input.mjs +609 -0
- package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-link.mjs +137 -0
- package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-list.mjs +791 -0
- package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-modal.mjs +864 -0
- package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-navbar.mjs +1025 -0
- package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-popover.mjs +393 -0
- package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +76 -0
- package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +80 -0
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-radio.mjs +481 -0
- package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-select.mjs +1175 -0
- package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-sidebar.mjs +202 -0
- package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +592 -0
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-splitter.mjs +524 -0
- package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-table.mjs +50 -0
- package/fesm2015/ptsecurity-mosaic-table.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tabs.mjs +1511 -0
- package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tags.mjs +1377 -0
- package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-textarea.mjs +293 -0
- package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-timepicker.mjs +715 -0
- package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-toggle.mjs +180 -0
- package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs +362 -0
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs +972 -0
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tree.mjs +1718 -0
- package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic.mjs +4 -0
- package/fesm2015/ptsecurity-mosaic.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +752 -0
- package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-button-toggle.mjs +383 -0
- package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-button.mjs +170 -0
- package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-card.mjs +113 -0
- package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-checkbox.mjs +364 -0
- package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-core.mjs +2735 -0
- package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-datepicker.mjs +2687 -0
- package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +2925 -0
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-divider.mjs +61 -0
- package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-dropdown.mjs +1093 -0
- package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-form-field.mjs +377 -0
- package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-icon.mjs +86 -0
- package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-input.mjs +605 -0
- package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-link.mjs +136 -0
- package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-list.mjs +784 -0
- package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-modal.mjs +860 -0
- package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-navbar.mjs +1009 -0
- package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-popover.mjs +389 -0
- package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +76 -0
- package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +80 -0
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-radio.mjs +479 -0
- package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-select.mjs +1173 -0
- package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-sidebar.mjs +202 -0
- package/fesm2020/ptsecurity-mosaic-sidebar.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs +589 -0
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-splitter.mjs +524 -0
- package/fesm2020/ptsecurity-mosaic-splitter.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-table.mjs +50 -0
- package/fesm2020/ptsecurity-mosaic-table.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-tabs.mjs +1496 -0
- package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-tags.mjs +1370 -0
- package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-textarea.mjs +291 -0
- package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-timepicker.mjs +713 -0
- package/fesm2020/ptsecurity-mosaic-timepicker.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-toggle.mjs +180 -0
- package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs +354 -0
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs +970 -0
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-tree.mjs +1705 -0
- package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic.mjs +4 -0
- package/fesm2020/ptsecurity-mosaic.mjs.map +1 -0
- package/form-field/README.md +0 -0
- package/form-field/package.json +5 -5
- package/icon/README.md +0 -0
- package/icon/package.json +5 -5
- package/input/package.json +5 -5
- package/link/README.md +0 -0
- package/link/package.json +5 -5
- package/list/README.md +0 -0
- package/list/package.json +5 -5
- package/modal/README.md +34 -0
- package/modal/modal-control.service.d.ts +1 -0
- package/modal/package.json +5 -5
- package/navbar/README.md +41 -0
- package/navbar/navbar-item.component.d.ts +122 -34
- package/navbar/navbar.component.d.ts +37 -9
- package/navbar/navbar.module.d.ts +2 -1
- package/navbar/package.json +5 -5
- package/navbar/vertical-navbar.component.d.ts +15 -26
- package/package.json +299 -14
- package/popover/README.md +32 -0
- package/popover/package.json +5 -5
- package/popover/popover.component.d.ts +2 -0
- package/popover/popover.module.d.ts +2 -1
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/prebuilt-visual/default-visual.css +1 -1
- package/progress-bar/README.md +0 -0
- package/progress-bar/package.json +5 -5
- package/progress-spinner/README.md +0 -0
- package/progress-spinner/package.json +5 -5
- package/radio/package.json +5 -5
- package/schematics/README.md +35 -0
- package/schematics/ng-update/data/index.d.ts +1 -0
- package/schematics/ng-update/data/index.js +10 -9
- package/schematics/ng-update/data/index.js.map +1 -1
- package/schematics/ng-update/data/symbol-removal.d.ts +2 -0
- package/schematics/ng-update/data/symbol-removal.js +5 -0
- package/schematics/ng-update/data/symbol-removal.js.map +1 -0
- package/schematics/ng-update/index.js +3 -3
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +1 -2
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +1 -1
- package/schematics/ng-update/upgrade-data.js +2 -1
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/tsconfig.lib.json +2 -2
- package/select/README.md +0 -0
- package/select/package.json +5 -5
- package/sidebar/package.json +5 -5
- package/sidepanel/package.json +5 -5
- package/splitter/package.json +5 -5
- package/splitter/splitter.component.d.ts +46 -5
- package/splitter/splitter.module.d.ts +1 -1
- package/table/README.md +0 -0
- package/table/package.json +5 -5
- package/tabs/README.md +0 -0
- package/tabs/package.json +5 -5
- package/tags/README.md +0 -0
- package/tags/package.json +5 -5
- package/tags/tag.component.d.ts +20 -20
- package/textarea/README.md +0 -0
- package/textarea/package.json +5 -5
- package/timepicker/README.md +0 -0
- package/timepicker/package.json +5 -5
- package/toggle/package.json +5 -5
- package/tooltip/package.json +5 -5
- package/tree/data-source/flat-data-source.d.ts +2 -2
- package/tree/package.json +5 -5
- package/tree/toggle.d.ts +1 -1
- package/tree/tree-option.component.d.ts +5 -3
- package/tree/tree-selection.component.d.ts +1 -0
- package/tree-select/README.md +0 -0
- package/tree-select/package.json +5 -5
- package/tree-select/tree-select.component.d.ts +9 -1
- package/tree-select/tree-select.module.d.ts +2 -1
- package/bundles/ptsecurity-mosaic-autocomplete.umd.js +0 -1160
- package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-button-toggle.umd.js +0 -755
- package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-button.umd.js +0 -533
- package/bundles/ptsecurity-mosaic-button.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-card.umd.js +0 -479
- package/bundles/ptsecurity-mosaic-card.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-checkbox.umd.js +0 -762
- package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-core.umd.js +0 -2843
- package/bundles/ptsecurity-mosaic-core.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-datepicker.umd.js +0 -3355
- package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-design-tokens.umd.js +0 -1872
- package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-divider.umd.js +0 -106
- package/bundles/ptsecurity-mosaic-divider.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-dropdown.umd.js +0 -1517
- package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-form-field.umd.js +0 -788
- package/bundles/ptsecurity-mosaic-form-field.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-icon.umd.js +0 -450
- package/bundles/ptsecurity-mosaic-icon.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-input.umd.js +0 -1008
- package/bundles/ptsecurity-mosaic-input.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-link.umd.js +0 -515
- package/bundles/ptsecurity-mosaic-link.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-list.umd.js +0 -1256
- package/bundles/ptsecurity-mosaic-list.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-modal.umd.js +0 -1305
- package/bundles/ptsecurity-mosaic-modal.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-navbar.umd.js +0 -930
- package/bundles/ptsecurity-mosaic-navbar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-popover.umd.js +0 -830
- package/bundles/ptsecurity-mosaic-popover.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-progress-bar.umd.js +0 -440
- package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +0 -448
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-radio.umd.js +0 -901
- package/bundles/ptsecurity-mosaic-radio.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-select.umd.js +0 -1606
- package/bundles/ptsecurity-mosaic-select.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-sidebar.umd.js +0 -254
- package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-sidepanel.umd.js +0 -954
- package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-splitter.umd.js +0 -436
- package/bundles/ptsecurity-mosaic-splitter.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-table.umd.js +0 -81
- package/bundles/ptsecurity-mosaic-table.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tabs.umd.js +0 -2013
- package/bundles/ptsecurity-mosaic-tabs.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tags.umd.js +0 -1911
- package/bundles/ptsecurity-mosaic-tags.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-textarea.umd.js +0 -664
- package/bundles/ptsecurity-mosaic-textarea.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-timepicker.umd.js +0 -820
- package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-toggle.umd.js +0 -557
- package/bundles/ptsecurity-mosaic-toggle.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tooltip.umd.js +0 -777
- package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tree-select.umd.js +0 -1368
- package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tree.umd.js +0 -2301
- package/bundles/ptsecurity-mosaic-tree.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic.umd.js +0 -11
- package/bundles/ptsecurity-mosaic.umd.js.map +0 -1
- package/design-tokens/tokens/components/checkbox.json5 +0 -39
- package/design-tokens/tokens/components/modal.json5 +0 -67
- package/design-tokens/tokens/components/navbar.json5 +0 -64
- package/design-tokens/tokens/components/radio.json5 +0 -45
- package/design-tokens/tokens/components/tags.json5 +0 -126
- package/design-tokens/tokens/components/toggle.json5 +0 -55
- package/design-tokens/tokens.d.ts +0 -7637
- package/esm2015/autocomplete/autocomplete-origin.directive.js +0 -21
- package/esm2015/autocomplete/autocomplete-trigger.directive.js +0 -555
- package/esm2015/autocomplete/autocomplete.component.js +0 -163
- package/esm2015/autocomplete/autocomplete.module.js +0 -34
- package/esm2015/button/button.component.js +0 -129
- package/esm2015/button/button.module.js +0 -42
- package/esm2015/button-toggle/button-toggle.component.js +0 -370
- package/esm2015/button-toggle/button-toggle.module.js +0 -19
- package/esm2015/card/card.component.js +0 -88
- package/esm2015/card/card.module.js +0 -30
- package/esm2015/checkbox/checkbox-module.js +0 -19
- package/esm2015/checkbox/checkbox-required-validator.js +0 -27
- package/esm2015/checkbox/checkbox.js +0 -325
- package/esm2015/core/common-behaviors/common-module.js +0 -83
- package/esm2015/core/error/error-options.js +0 -26
- package/esm2015/core/formatters/date/formatter.js +0 -288
- package/esm2015/core/formatters/date/templates/en-US.js +0 -280
- package/esm2015/core/formatters/date/templates/ru-RU.js +0 -280
- package/esm2015/core/formatters/index.js +0 -20
- package/esm2015/core/formatters/number/formatter.js +0 -99
- package/esm2015/core/forms/forms-module.js +0 -24
- package/esm2015/core/forms/forms.directive.js +0 -66
- package/esm2015/core/highlight/highlight.pipe.js +0 -17
- package/esm2015/core/highlight/index.js +0 -19
- package/esm2015/core/line/line.js +0 -70
- package/esm2015/core/option/action.js +0 -131
- package/esm2015/core/option/optgroup.js +0 -40
- package/esm2015/core/option/option-module.js +0 -21
- package/esm2015/core/option/option.js +0 -262
- package/esm2015/core/pop-up/pop-up-trigger.js +0 -241
- package/esm2015/core/pop-up/pop-up.js +0 -87
- package/esm2015/core/public-api.js +0 -17
- package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +0 -45
- package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js +0 -18
- package/esm2015/core/services/measure-scrollbar.service.js +0 -48
- package/esm2015/datepicker/calendar-body.component.js +0 -114
- package/esm2015/datepicker/calendar.component.js +0 -377
- package/esm2015/datepicker/datepicker-input.directive.js +0 -885
- package/esm2015/datepicker/datepicker-intl.js +0 -40
- package/esm2015/datepicker/datepicker-module.js +0 -107
- package/esm2015/datepicker/datepicker-toggle.component.js +0 -94
- package/esm2015/datepicker/datepicker.component.js +0 -418
- package/esm2015/datepicker/month-view.component.js +0 -263
- package/esm2015/datepicker/multi-year-view.component.js +0 -224
- package/esm2015/datepicker/year-view.component.js +0 -259
- package/esm2015/design-tokens/public-api.js +0 -2
- package/esm2015/design-tokens/tokens.js +0 -931
- package/esm2015/divider/divider.component.js +0 -46
- package/esm2015/divider/divider.module.js +0 -18
- package/esm2015/dropdown/dropdown-content.directive.js +0 -66
- package/esm2015/dropdown/dropdown-item.component.js +0 -142
- package/esm2015/dropdown/dropdown-trigger.directive.js +0 -478
- package/esm2015/dropdown/dropdown.component.js +0 -302
- package/esm2015/dropdown/dropdown.module.js +0 -50
- package/esm2015/form-field/cleaner.js +0 -23
- package/esm2015/form-field/form-field.js +0 -224
- package/esm2015/form-field/form-field.module.js +0 -52
- package/esm2015/form-field/hint.js +0 -23
- package/esm2015/form-field/prefix.js +0 -13
- package/esm2015/form-field/stepper.js +0 -55
- package/esm2015/form-field/suffix.js +0 -13
- package/esm2015/icon/icon.component.js +0 -51
- package/esm2015/icon/icon.module.js +0 -38
- package/esm2015/input/input-number-validators.js +0 -92
- package/esm2015/input/input-number.js +0 -163
- package/esm2015/input/input.js +0 -333
- package/esm2015/input/input.module.js +0 -23
- package/esm2015/link/link.component.js +0 -108
- package/esm2015/link/link.module.js +0 -26
- package/esm2015/list/list-selection.component.js +0 -716
- package/esm2015/list/list.component.js +0 -58
- package/esm2015/list/list.module.js +0 -55
- package/esm2015/modal/css-unit.pipe.js +0 -17
- package/esm2015/modal/modal-control.service.js +0 -63
- package/esm2015/modal/modal.component.js +0 -508
- package/esm2015/modal/modal.directive.js +0 -52
- package/esm2015/modal/modal.module.js +0 -72
- package/esm2015/modal/modal.service.js +0 -117
- package/esm2015/navbar/navbar-item.component.js +0 -209
- package/esm2015/navbar/navbar.component.js +0 -118
- package/esm2015/navbar/navbar.module.js +0 -76
- package/esm2015/navbar/vertical-navbar.animation.js +0 -10
- package/esm2015/navbar/vertical-navbar.component.js +0 -140
- package/esm2015/popover/popover-confirm.component.js +0 -115
- package/esm2015/popover/popover.component.js +0 -256
- package/esm2015/popover/popover.module.js +0 -23
- package/esm2015/progress-bar/progress-bar.component.js +0 -50
- package/esm2015/progress-bar/progress-bar.module.js +0 -30
- package/esm2015/progress-spinner/progress-spinner.component.js +0 -54
- package/esm2015/progress-spinner/progress-spinner.module.js +0 -30
- package/esm2015/radio/radio.component.js +0 -467
- package/esm2015/radio/radio.module.js +0 -20
- package/esm2015/select/select.component.js +0 -1122
- package/esm2015/select/select.module.js +0 -64
- package/esm2015/sidebar/sidebar.component.js +0 -155
- package/esm2015/sidebar/sidebar.module.js +0 -30
- package/esm2015/sidepanel/sidepanel-container.component.js +0 -114
- package/esm2015/sidepanel/sidepanel-directives.js +0 -159
- package/esm2015/sidepanel/sidepanel.module.js +0 -74
- package/esm2015/sidepanel/sidepanel.service.js +0 -164
- package/esm2015/splitter/splitter.component.js +0 -331
- package/esm2015/splitter/splitter.module.js +0 -38
- package/esm2015/table/table.component.js +0 -16
- package/esm2015/table/table.module.js +0 -30
- package/esm2015/tabs/paginated-tab-header.js +0 -482
- package/esm2015/tabs/tab-body.component.js +0 -186
- package/esm2015/tabs/tab-content.directive.js +0 -15
- package/esm2015/tabs/tab-group.component.js +0 -359
- package/esm2015/tabs/tab-header.component.js +0 -76
- package/esm2015/tabs/tab-label-wrapper.directive.js +0 -78
- package/esm2015/tabs/tab-label.directive.js +0 -17
- package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +0 -118
- package/esm2015/tabs/tab.component.js +0 -133
- package/esm2015/tabs/tabs.module.js +0 -104
- package/esm2015/tags/tag-input.js +0 -229
- package/esm2015/tags/tag-list.component.js +0 -732
- package/esm2015/tags/tag.component.js +0 -382
- package/esm2015/tags/tag.module.js +0 -56
- package/esm2015/textarea/textarea.component.js +0 -268
- package/esm2015/textarea/textarea.module.js +0 -21
- package/esm2015/timepicker/timepicker.directive.js +0 -652
- package/esm2015/timepicker/timepicker.module.js +0 -34
- package/esm2015/toggle/toggle.component.js +0 -169
- package/esm2015/toggle/toggle.module.js +0 -20
- package/esm2015/tooltip/tooltip.component.js +0 -299
- package/esm2015/tooltip/tooltip.module.js +0 -43
- package/esm2015/tree/data-source/flat-data-source.js +0 -162
- package/esm2015/tree/node.js +0 -31
- package/esm2015/tree/outlet.js +0 -15
- package/esm2015/tree/padding.directive.js +0 -111
- package/esm2015/tree/toggle.js +0 -89
- package/esm2015/tree/tree-base.js +0 -243
- package/esm2015/tree/tree-option.component.js +0 -238
- package/esm2015/tree/tree-selection.component.js +0 -541
- package/esm2015/tree/tree.js +0 -23
- package/esm2015/tree/tree.module.js +0 -53
- package/esm2015/tree-select/tree-select.component.js +0 -900
- package/esm2015/tree-select/tree-select.module.js +0 -43
- package/fesm2015/ptsecurity-mosaic-autocomplete.js +0 -761
- package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-button-toggle.js +0 -391
- package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-button.js +0 -174
- package/fesm2015/ptsecurity-mosaic-button.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-card.js +0 -121
- package/fesm2015/ptsecurity-mosaic-card.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-checkbox.js +0 -374
- package/fesm2015/ptsecurity-mosaic-checkbox.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-core.js +0 -2682
- package/fesm2015/ptsecurity-mosaic-core.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-datepicker.js +0 -2731
- package/fesm2015/ptsecurity-mosaic-datepicker.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-design-tokens.js +0 -937
- package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-divider.js +0 -68
- package/fesm2015/ptsecurity-mosaic-divider.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-dropdown.js +0 -1101
- package/fesm2015/ptsecurity-mosaic-dropdown.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-form-field.js +0 -396
- package/fesm2015/ptsecurity-mosaic-form-field.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-icon.js +0 -93
- package/fesm2015/ptsecurity-mosaic-icon.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-input.js +0 -605
- package/fesm2015/ptsecurity-mosaic-input.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-link.js +0 -137
- package/fesm2015/ptsecurity-mosaic-link.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-list.js +0 -827
- package/fesm2015/ptsecurity-mosaic-list.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-modal.js +0 -838
- package/fesm2015/ptsecurity-mosaic-modal.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-navbar.js +0 -539
- package/fesm2015/ptsecurity-mosaic-navbar.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-popover.js +0 -399
- package/fesm2015/ptsecurity-mosaic-popover.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-progress-bar.js +0 -84
- package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-progress-spinner.js +0 -88
- package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-radio.js +0 -488
- package/fesm2015/ptsecurity-mosaic-radio.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-select.js +0 -1185
- package/fesm2015/ptsecurity-mosaic-select.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-sidebar.js +0 -211
- package/fesm2015/ptsecurity-mosaic-sidebar.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-sidepanel.js +0 -594
- package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-splitter.js +0 -373
- package/fesm2015/ptsecurity-mosaic-splitter.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-table.js +0 -50
- package/fesm2015/ptsecurity-mosaic-table.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tabs.js +0 -1533
- package/fesm2015/ptsecurity-mosaic-tabs.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tags.js +0 -1385
- package/fesm2015/ptsecurity-mosaic-tags.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-textarea.js +0 -291
- package/fesm2015/ptsecurity-mosaic-textarea.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-timepicker.js +0 -712
- package/fesm2015/ptsecurity-mosaic-timepicker.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-toggle.js +0 -191
- package/fesm2015/ptsecurity-mosaic-toggle.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tooltip.js +0 -362
- package/fesm2015/ptsecurity-mosaic-tooltip.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tree-select.js +0 -942
- package/fesm2015/ptsecurity-mosaic-tree-select.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tree.js +0 -1735
- package/fesm2015/ptsecurity-mosaic-tree.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic.js +0 -4
- package/fesm2015/ptsecurity-mosaic.js.map +0 -1
|
@@ -1,2301 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@ptsecurity/mosaic/core'), require('@angular/cdk/coercion'), require('@ptsecurity/mosaic/design-tokens'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/bidi'), require('@ptsecurity/cdk/keycodes'), require('@ptsecurity/mosaic/dropdown'), require('@ptsecurity/mosaic/tooltip'), require('@angular/cdk/collections'), require('@angular/forms'), require('@ptsecurity/cdk/a11y'), require('@angular/cdk/clipboard')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@ptsecurity/mosaic/tree', ['exports', '@angular/common', '@angular/core', '@ptsecurity/mosaic/core', '@angular/cdk/coercion', '@ptsecurity/mosaic/design-tokens', 'rxjs', 'rxjs/operators', '@angular/cdk/bidi', '@ptsecurity/cdk/keycodes', '@ptsecurity/mosaic/dropdown', '@ptsecurity/mosaic/tooltip', '@angular/cdk/collections', '@angular/forms', '@ptsecurity/cdk/a11y', '@angular/cdk/clipboard'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ptsecurity = global.ptsecurity || {}, global.ptsecurity.mosaic = global.ptsecurity.mosaic || {}, global.ptsecurity.mosaic.tree = {}), global.ng.common, global.ng.core, global.ptsecurity.mosaic.core, global.ng.cdk.coercion, global.ptsecurity.mosaic["design-tokens"], global.rxjs, global.rxjs.operators, global.ng.cdk.bidi, global.mc.cdk.keycodes, global.ptsecurity.mosaic.dropdown, global.ptsecurity.mosaic.tooltip, global.ng.cdk.collections, global.ng.forms, global.mc.cdk.a11y, global.ng.cdk.clipboard));
|
|
5
|
-
})(this, (function (exports, i2$1, i0, i1, coercion, designTokens, rxjs, operators, i2, keycodes, dropdown, tooltip, collections, forms, a11y, i1$1) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
26
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
29
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
|
-
|
|
31
|
-
/** Context provided to the tree node component. */
|
|
32
|
-
var McTreeNodeOutletContext = /** @class */ (function () {
|
|
33
|
-
function McTreeNodeOutletContext(data) {
|
|
34
|
-
this.$implicit = data;
|
|
35
|
-
}
|
|
36
|
-
return McTreeNodeOutletContext;
|
|
37
|
-
}());
|
|
38
|
-
/**
|
|
39
|
-
* Data node definition for the McTree.
|
|
40
|
-
* Captures the node's template and a when predicate that describes when this node should be used.
|
|
41
|
-
*/
|
|
42
|
-
var McTreeNodeDef = /** @class */ (function () {
|
|
43
|
-
/** @docs-private */
|
|
44
|
-
function McTreeNodeDef(template) {
|
|
45
|
-
this.template = template;
|
|
46
|
-
}
|
|
47
|
-
return McTreeNodeDef;
|
|
48
|
-
}());
|
|
49
|
-
/** @nocollapse */ McTreeNodeDef.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeDef, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
50
|
-
/** @nocollapse */ McTreeNodeDef.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McTreeNodeDef, selector: "[mcTreeNodeDef]", inputs: { when: ["mcTreeNodeDefWhen", "when"], data: ["mcTreeNode", "data"] }, ngImport: i0__namespace });
|
|
51
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeDef, decorators: [{
|
|
52
|
-
type: i0.Directive,
|
|
53
|
-
args: [{
|
|
54
|
-
selector: '[mcTreeNodeDef]',
|
|
55
|
-
inputs: ['when: mcTreeNodeDefWhen']
|
|
56
|
-
}]
|
|
57
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; }, propDecorators: { data: [{
|
|
58
|
-
type: i0.Input,
|
|
59
|
-
args: ['mcTreeNode']
|
|
60
|
-
}] } });
|
|
61
|
-
|
|
62
|
-
var McTreeNodeOutlet = /** @class */ (function () {
|
|
63
|
-
function McTreeNodeOutlet(viewContainer, changeDetectorRef) {
|
|
64
|
-
this.viewContainer = viewContainer;
|
|
65
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
66
|
-
}
|
|
67
|
-
return McTreeNodeOutlet;
|
|
68
|
-
}());
|
|
69
|
-
/** @nocollapse */ McTreeNodeOutlet.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeOutlet, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
70
|
-
/** @nocollapse */ McTreeNodeOutlet.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McTreeNodeOutlet, selector: "[mcTreeNodeOutlet]", ngImport: i0__namespace });
|
|
71
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeOutlet, decorators: [{
|
|
72
|
-
type: i0.Directive,
|
|
73
|
-
args: [{ selector: '[mcTreeNodeOutlet]' }]
|
|
74
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ChangeDetectorRef }]; } });
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Returns an error to be thrown when there is no usable data.
|
|
78
|
-
* @docs-private
|
|
79
|
-
*/
|
|
80
|
-
function getTreeNoValidDataSourceError() {
|
|
81
|
-
return Error("A valid data source must be provided.");
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Returns an error to be thrown when there are multiple nodes that are missing a when function.
|
|
85
|
-
* @docs-private
|
|
86
|
-
*/
|
|
87
|
-
function getTreeMultipleDefaultNodeDefsError() {
|
|
88
|
-
return Error("There can only be one default row without a when predicate function.");
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Returns an error to be thrown when there are no matching node defs for a particular set of data.
|
|
92
|
-
* @docs-private
|
|
93
|
-
*/
|
|
94
|
-
function getTreeMissingMatchingNodeDefError() {
|
|
95
|
-
return Error("Could not find a matching node definition for the provided node data.");
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Returns an error to be thrown when there are tree control.
|
|
99
|
-
* @docs-private
|
|
100
|
-
*/
|
|
101
|
-
function getTreeControlMissingError() {
|
|
102
|
-
return Error("Could not find a tree control for the tree.");
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Returns an error to be thrown when tree control did not implement functions for flat/nested node.
|
|
106
|
-
* @docs-private
|
|
107
|
-
*/
|
|
108
|
-
function getTreeControlFunctionsMissingError() {
|
|
109
|
-
return Error("Could not find functions for nested/flat tree in tree control.");
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
var McTreeBase = /** @class */ (function () {
|
|
113
|
-
function McTreeBase(differs, changeDetectorRef) {
|
|
114
|
-
this.differs = differs;
|
|
115
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
116
|
-
// TODO(tinayuangao): Setup a listener for scrolling, emit the calculated view to viewChange.
|
|
117
|
-
// Remove the MAX_VALUE in viewChange
|
|
118
|
-
/**
|
|
119
|
-
* Stream containing the latest information on what rows are being displayed on screen.
|
|
120
|
-
* Can be used by the data source to as a heuristic of what data should be provided.
|
|
121
|
-
*/
|
|
122
|
-
this.viewChange = new rxjs.BehaviorSubject({ start: 0, end: Number.MAX_VALUE });
|
|
123
|
-
/** Subject that emits when the component has been destroyed. */
|
|
124
|
-
this.onDestroy = new rxjs.Subject();
|
|
125
|
-
/** Level of nodes */
|
|
126
|
-
this.levels = new Map();
|
|
127
|
-
}
|
|
128
|
-
Object.defineProperty(McTreeBase.prototype, "dataSource", {
|
|
129
|
-
/**
|
|
130
|
-
* Provides a stream containing the latest data array to render. Influenced by the tree's
|
|
131
|
-
* stream of view window (what dataNodes are currently on screen).
|
|
132
|
-
* Data source can be an observable of data array, or a dara array to render.
|
|
133
|
-
*/
|
|
134
|
-
get: function () {
|
|
135
|
-
return this._dataSource;
|
|
136
|
-
},
|
|
137
|
-
set: function (dataSource) {
|
|
138
|
-
if (this._dataSource !== dataSource) {
|
|
139
|
-
this.switchDataSource(dataSource);
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
enumerable: false,
|
|
143
|
-
configurable: true
|
|
144
|
-
});
|
|
145
|
-
McTreeBase.prototype.ngOnInit = function () {
|
|
146
|
-
this.dataDiffer = this.differs.find([]).create(this.trackBy);
|
|
147
|
-
if (!this.treeControl) {
|
|
148
|
-
throw getTreeControlMissingError();
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
McTreeBase.prototype.ngOnDestroy = function () {
|
|
152
|
-
this.nodeOutlet.viewContainer.clear();
|
|
153
|
-
this.onDestroy.next();
|
|
154
|
-
this.onDestroy.complete();
|
|
155
|
-
// tslint:disable-next-line:no-unbound-method
|
|
156
|
-
if (this._dataSource && typeof this.dataSource.disconnect === 'function') {
|
|
157
|
-
this.dataSource.disconnect(this);
|
|
158
|
-
}
|
|
159
|
-
if (this.dataSubscription) {
|
|
160
|
-
this.dataSubscription.unsubscribe();
|
|
161
|
-
this.dataSubscription = null;
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
McTreeBase.prototype.ngAfterContentChecked = function () {
|
|
165
|
-
var defaultNodeDefs = this.nodeDefs.filter(function (def) { return !def.when; });
|
|
166
|
-
if (defaultNodeDefs.length > 1) {
|
|
167
|
-
throw getTreeMultipleDefaultNodeDefsError();
|
|
168
|
-
}
|
|
169
|
-
this.defaultNodeDef = defaultNodeDefs[0];
|
|
170
|
-
if (this.dataSource && this.nodeDefs && !this.dataSubscription) {
|
|
171
|
-
this.observeRenderChanges();
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
/** Check for changes made in the data and render each change (node added/removed/moved). */
|
|
175
|
-
McTreeBase.prototype.renderNodeChanges = function (data, dataDiffer, viewContainer, parentData) {
|
|
176
|
-
var _this = this;
|
|
177
|
-
if (dataDiffer === void 0) { dataDiffer = this.dataDiffer; }
|
|
178
|
-
if (viewContainer === void 0) { viewContainer = this.nodeOutlet.viewContainer; }
|
|
179
|
-
var changes = dataDiffer.diff(data);
|
|
180
|
-
if (!changes) {
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
changes.forEachOperation(function (item, adjustedPreviousIndex, currentIndex) {
|
|
184
|
-
if (item.previousIndex == null) {
|
|
185
|
-
_this.insertNode(data[currentIndex], currentIndex, viewContainer, parentData);
|
|
186
|
-
}
|
|
187
|
-
else if (currentIndex == null) {
|
|
188
|
-
viewContainer.remove(adjustedPreviousIndex);
|
|
189
|
-
_this.levels.delete(item.item);
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
var view = viewContainer.get(adjustedPreviousIndex);
|
|
193
|
-
viewContainer.move(view, currentIndex);
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
this.changeDetectorRef.detectChanges();
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* Finds the matching node definition that should be used for this node data. If there is only
|
|
200
|
-
* one node definition, it is returned. Otherwise, find the node definition that has a when
|
|
201
|
-
* predicate that returns true with the data. If none return true, return the default node
|
|
202
|
-
* definition.
|
|
203
|
-
*/
|
|
204
|
-
McTreeBase.prototype.getNodeDef = function (data, i) {
|
|
205
|
-
if (this.nodeDefs.length === 1) {
|
|
206
|
-
return this.nodeDefs.first;
|
|
207
|
-
}
|
|
208
|
-
var nodeDef = this.nodeDefs.find(function (def) { return def.when && def.when(i, data); }) || this.defaultNodeDef;
|
|
209
|
-
if (!nodeDef) {
|
|
210
|
-
throw getTreeMissingMatchingNodeDefError();
|
|
211
|
-
}
|
|
212
|
-
return nodeDef;
|
|
213
|
-
};
|
|
214
|
-
/**
|
|
215
|
-
* Create the embedded view for the data node template and place it in the correct index location
|
|
216
|
-
* within the data node view container.
|
|
217
|
-
*/
|
|
218
|
-
McTreeBase.prototype.insertNode = function (nodeData, index, viewContainer, parentData) {
|
|
219
|
-
var node = this.getNodeDef(nodeData, index);
|
|
220
|
-
// Node context that will be provided to created embedded view
|
|
221
|
-
var context = new McTreeNodeOutletContext(nodeData);
|
|
222
|
-
// If the tree is flat tree, then use the `getLevel` function in flat tree control
|
|
223
|
-
// Otherwise, use the level of parent node.
|
|
224
|
-
if (this.treeControl.getLevel) {
|
|
225
|
-
context.level = this.treeControl.getLevel(nodeData);
|
|
226
|
-
/* tslint:disable-next-line:no-typeof-undefined */
|
|
227
|
-
}
|
|
228
|
-
else if (typeof parentData !== 'undefined' && this.levels.has(parentData)) {
|
|
229
|
-
context.level = this.levels.get(parentData) + 1;
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
context.level = 0;
|
|
233
|
-
}
|
|
234
|
-
this.levels.set(nodeData, context.level);
|
|
235
|
-
// Use default tree nodeOutlet, or nested node's nodeOutlet
|
|
236
|
-
var container = viewContainer ? viewContainer : this.nodeOutlet.viewContainer;
|
|
237
|
-
container.createEmbeddedView(node.template, context, index);
|
|
238
|
-
// Set the data to just created `McTreeNode`.
|
|
239
|
-
// The `McTreeNode` created from `createEmbeddedView` will be saved in static variable
|
|
240
|
-
// `mostRecentTreeNode`. We get it from static variable and pass the node data to it.
|
|
241
|
-
if (McTreeNode.mostRecentTreeNode) {
|
|
242
|
-
McTreeNode.mostRecentTreeNode.data = nodeData;
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
/** Set up a subscription for the data provided by the data source. */
|
|
246
|
-
McTreeBase.prototype.observeRenderChanges = function () {
|
|
247
|
-
var _this = this;
|
|
248
|
-
var dataStream;
|
|
249
|
-
// Cannot use `instanceof DataSource` since the data source could be a literal with
|
|
250
|
-
// `connect` function and may not extends DataSource.
|
|
251
|
-
// tslint:disable-next-line:no-unbound-method
|
|
252
|
-
if (typeof this._dataSource.connect === 'function') {
|
|
253
|
-
dataStream = this._dataSource.connect(this);
|
|
254
|
-
}
|
|
255
|
-
else if (this._dataSource instanceof rxjs.Observable) {
|
|
256
|
-
dataStream = this._dataSource;
|
|
257
|
-
}
|
|
258
|
-
else if (Array.isArray(this._dataSource)) {
|
|
259
|
-
dataStream = rxjs.of(this._dataSource);
|
|
260
|
-
}
|
|
261
|
-
if (dataStream) {
|
|
262
|
-
this.dataSubscription = dataStream
|
|
263
|
-
.pipe(operators.takeUntil(this.onDestroy))
|
|
264
|
-
.subscribe(function (data) { return _this.renderNodeChanges(data); });
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
throw getTreeNoValidDataSourceError();
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
/**
|
|
271
|
-
* Switch to the provided data source by resetting the data and unsubscribing from the current
|
|
272
|
-
* render change subscription if one exists. If the data source is null, interpret this by
|
|
273
|
-
* clearing the node outlet. Otherwise start listening for new data.
|
|
274
|
-
*/
|
|
275
|
-
McTreeBase.prototype.switchDataSource = function (dataSource) {
|
|
276
|
-
// tslint:disable-next-line:no-unbound-method
|
|
277
|
-
if (this._dataSource && typeof this._dataSource.disconnect === 'function') {
|
|
278
|
-
this.dataSource.disconnect(this);
|
|
279
|
-
}
|
|
280
|
-
if (this.dataSubscription) {
|
|
281
|
-
this.dataSubscription.unsubscribe();
|
|
282
|
-
this.dataSubscription = null;
|
|
283
|
-
}
|
|
284
|
-
// Remove the all dataNodes if there is now no data source
|
|
285
|
-
if (!dataSource) {
|
|
286
|
-
this.nodeOutlet.viewContainer.clear();
|
|
287
|
-
}
|
|
288
|
-
this._dataSource = dataSource;
|
|
289
|
-
if (this.nodeDefs) {
|
|
290
|
-
this.observeRenderChanges();
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
return McTreeBase;
|
|
294
|
-
}());
|
|
295
|
-
/** @nocollapse */ McTreeBase.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeBase, deps: [{ token: i0__namespace.IterableDiffers }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
296
|
-
/** @nocollapse */ McTreeBase.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McTreeBase, inputs: { treeControl: "treeControl", trackBy: "trackBy", dataSource: "dataSource" }, queries: [{ propertyName: "nodeDefs", predicate: McTreeNodeDef }], viewQueries: [{ propertyName: "nodeOutlet", first: true, predicate: McTreeNodeOutlet, descendants: true, static: true }], ngImport: i0__namespace });
|
|
297
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeBase, decorators: [{
|
|
298
|
-
type: i0.Directive
|
|
299
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.IterableDiffers }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { treeControl: [{
|
|
300
|
-
type: i0.Input
|
|
301
|
-
}], trackBy: [{
|
|
302
|
-
type: i0.Input
|
|
303
|
-
}], nodeOutlet: [{
|
|
304
|
-
type: i0.ViewChild,
|
|
305
|
-
args: [McTreeNodeOutlet, { static: true }]
|
|
306
|
-
}], nodeDefs: [{
|
|
307
|
-
type: i0.ContentChildren,
|
|
308
|
-
args: [McTreeNodeDef]
|
|
309
|
-
}], dataSource: [{
|
|
310
|
-
type: i0.Input
|
|
311
|
-
}] } });
|
|
312
|
-
var McTreeNode = /** @class */ (function () {
|
|
313
|
-
function McTreeNode(elementRef, tree) {
|
|
314
|
-
this.elementRef = elementRef;
|
|
315
|
-
this.tree = tree;
|
|
316
|
-
this.destroyed = new rxjs.Subject();
|
|
317
|
-
McTreeNode.mostRecentTreeNode = this;
|
|
318
|
-
}
|
|
319
|
-
Object.defineProperty(McTreeNode.prototype, "data", {
|
|
320
|
-
get: function () {
|
|
321
|
-
return this._data;
|
|
322
|
-
},
|
|
323
|
-
set: function (value) {
|
|
324
|
-
this._data = value;
|
|
325
|
-
},
|
|
326
|
-
enumerable: false,
|
|
327
|
-
configurable: true
|
|
328
|
-
});
|
|
329
|
-
Object.defineProperty(McTreeNode.prototype, "isExpanded", {
|
|
330
|
-
get: function () {
|
|
331
|
-
return this.tree.treeControl.isExpanded(this.data);
|
|
332
|
-
},
|
|
333
|
-
enumerable: false,
|
|
334
|
-
configurable: true
|
|
335
|
-
});
|
|
336
|
-
Object.defineProperty(McTreeNode.prototype, "level", {
|
|
337
|
-
get: function () {
|
|
338
|
-
return this.tree.treeControl.getLevel ? this.tree.treeControl.getLevel(this._data) : 0;
|
|
339
|
-
},
|
|
340
|
-
enumerable: false,
|
|
341
|
-
configurable: true
|
|
342
|
-
});
|
|
343
|
-
McTreeNode.prototype.ngOnDestroy = function () {
|
|
344
|
-
this.destroyed.next();
|
|
345
|
-
this.destroyed.complete();
|
|
346
|
-
};
|
|
347
|
-
McTreeNode.prototype.focus = function () {
|
|
348
|
-
this.elementRef.nativeElement.focus();
|
|
349
|
-
};
|
|
350
|
-
return McTreeNode;
|
|
351
|
-
}());
|
|
352
|
-
/**
|
|
353
|
-
* The most recently created `McTreeNode`. We save it in static variable so we can retrieve it
|
|
354
|
-
* in `McTree` and set the data to it.
|
|
355
|
-
*/
|
|
356
|
-
McTreeNode.mostRecentTreeNode = null;
|
|
357
|
-
/** @nocollapse */ McTreeNode.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNode, deps: [{ token: i0__namespace.ElementRef }, { token: i0.forwardRef(function () { return McTreeBase; }) }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
358
|
-
/** @nocollapse */ McTreeNode.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McTreeNode, selector: "mc-tree-node", exportAs: ["mcTreeNode"], ngImport: i0__namespace });
|
|
359
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNode, decorators: [{
|
|
360
|
-
type: i0.Directive,
|
|
361
|
-
args: [{
|
|
362
|
-
selector: 'mc-tree-node',
|
|
363
|
-
exportAs: 'mcTreeNode'
|
|
364
|
-
}]
|
|
365
|
-
}], ctorParameters: function () {
|
|
366
|
-
return [{ type: i0__namespace.ElementRef }, { type: McTreeBase, decorators: [{
|
|
367
|
-
type: i0.Inject,
|
|
368
|
-
args: [i0.forwardRef(function () { return McTreeBase; })]
|
|
369
|
-
}] }];
|
|
370
|
-
} });
|
|
371
|
-
|
|
372
|
-
/** Regex used to split a string on its CSS units. */
|
|
373
|
-
var cssUnitPattern = /([A-Za-z%]+)$/;
|
|
374
|
-
var McTreeNodePadding = /** @class */ (function () {
|
|
375
|
-
function McTreeNodePadding(treeNode, tree, renderer, element, dir) {
|
|
376
|
-
var _this = this;
|
|
377
|
-
var _a, _b;
|
|
378
|
-
this.treeNode = treeNode;
|
|
379
|
-
this.tree = tree;
|
|
380
|
-
this.renderer = renderer;
|
|
381
|
-
this.element = element;
|
|
382
|
-
this.dir = dir;
|
|
383
|
-
this._indent = 20;
|
|
384
|
-
/** CSS units used for the indentation value. */
|
|
385
|
-
this.indentUnits = 'px';
|
|
386
|
-
this.baseLeftPadding = parseInt(designTokens.TreeSizePaddingLeft);
|
|
387
|
-
this.iconWidth = 24;
|
|
388
|
-
this.destroyed = new rxjs.Subject();
|
|
389
|
-
(_b = (_a = this.dir) === null || _a === void 0 ? void 0 : _a.change) === null || _b === void 0 ? void 0 : _b.pipe(operators.takeUntil(this.destroyed)).subscribe(function () { return _this.setPadding(); });
|
|
390
|
-
}
|
|
391
|
-
Object.defineProperty(McTreeNodePadding.prototype, "level", {
|
|
392
|
-
get: function () {
|
|
393
|
-
return this._level;
|
|
394
|
-
},
|
|
395
|
-
set: function (value) {
|
|
396
|
-
this.setLevelInput(value);
|
|
397
|
-
},
|
|
398
|
-
enumerable: false,
|
|
399
|
-
configurable: true
|
|
400
|
-
});
|
|
401
|
-
Object.defineProperty(McTreeNodePadding.prototype, "indent", {
|
|
402
|
-
get: function () {
|
|
403
|
-
return this._indent;
|
|
404
|
-
},
|
|
405
|
-
set: function (indent) {
|
|
406
|
-
this.setIndentInput(indent);
|
|
407
|
-
},
|
|
408
|
-
enumerable: false,
|
|
409
|
-
configurable: true
|
|
410
|
-
});
|
|
411
|
-
Object.defineProperty(McTreeNodePadding.prototype, "leftPadding", {
|
|
412
|
-
get: function () {
|
|
413
|
-
return (this.withIcon ? 0 : this.iconWidth) + this.baseLeftPadding;
|
|
414
|
-
},
|
|
415
|
-
enumerable: false,
|
|
416
|
-
configurable: true
|
|
417
|
-
});
|
|
418
|
-
McTreeNodePadding.prototype.ngOnInit = function () {
|
|
419
|
-
this.withIcon = this.tree.treeControl.isExpandable(this.treeNode.data);
|
|
420
|
-
this.setPadding();
|
|
421
|
-
};
|
|
422
|
-
McTreeNodePadding.prototype.ngOnDestroy = function () {
|
|
423
|
-
this.destroyed.next();
|
|
424
|
-
this.destroyed.complete();
|
|
425
|
-
};
|
|
426
|
-
McTreeNodePadding.prototype.paddingIndent = function () {
|
|
427
|
-
var nodeLevel = (this.treeNode.data && this.tree.treeControl.getLevel)
|
|
428
|
-
? this.tree.treeControl.getLevel(this.treeNode.data)
|
|
429
|
-
: 0;
|
|
430
|
-
var level = this.level || nodeLevel;
|
|
431
|
-
return level > 0 ? (level * this._indent) + this.leftPadding + "px" : this.leftPadding + "px";
|
|
432
|
-
};
|
|
433
|
-
/**
|
|
434
|
-
* This has been extracted to a util because of TS 4 and VE.
|
|
435
|
-
* View Engine doesn't support property rename inheritance.
|
|
436
|
-
* TS 4.0 doesn't allow properties to override accessors or vice-versa.
|
|
437
|
-
* @docs-private
|
|
438
|
-
*/
|
|
439
|
-
McTreeNodePadding.prototype.setLevelInput = function (value) {
|
|
440
|
-
// Set to null as the fallback value so that _setPadding can fall back to the node level if the
|
|
441
|
-
// consumer set the directive as `mcTreeNodePadding=""`. We still want to take this value if
|
|
442
|
-
// they set 0 explicitly.
|
|
443
|
-
this._level = coercion.coerceNumberProperty(value, null);
|
|
444
|
-
this.setPadding();
|
|
445
|
-
};
|
|
446
|
-
/**
|
|
447
|
-
* This has been extracted to a util because of TS 4 and VE.
|
|
448
|
-
* View Engine doesn't support property rename inheritance.
|
|
449
|
-
* TS 4.0 doesn't allow properties to override accessors or vice-versa.
|
|
450
|
-
* @docs-private
|
|
451
|
-
*/
|
|
452
|
-
McTreeNodePadding.prototype.setIndentInput = function (indent) {
|
|
453
|
-
var value = indent;
|
|
454
|
-
var units = 'px';
|
|
455
|
-
if (typeof indent === 'string') {
|
|
456
|
-
var parts = indent.split(cssUnitPattern);
|
|
457
|
-
value = parts[0];
|
|
458
|
-
units = parts[1] || units;
|
|
459
|
-
}
|
|
460
|
-
this.indentUnits = units;
|
|
461
|
-
this._indent = coercion.coerceNumberProperty(value);
|
|
462
|
-
this.setPadding();
|
|
463
|
-
};
|
|
464
|
-
McTreeNodePadding.prototype.setPadding = function () {
|
|
465
|
-
var _a;
|
|
466
|
-
var padding = this.paddingIndent();
|
|
467
|
-
var paddingProp = ((_a = this.dir) === null || _a === void 0 ? void 0 : _a.value) === 'rtl' ? 'paddingRight' : 'paddingLeft';
|
|
468
|
-
this.renderer.setStyle(this.element.nativeElement, paddingProp, padding);
|
|
469
|
-
};
|
|
470
|
-
return McTreeNodePadding;
|
|
471
|
-
}());
|
|
472
|
-
/** @nocollapse */ McTreeNodePadding.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodePadding, deps: [{ token: McTreeNode }, { token: McTreeBase }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i2__namespace.Directionality, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
473
|
-
/** @nocollapse */ McTreeNodePadding.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McTreeNodePadding, selector: "[mcTreeNodePadding]", inputs: { indent: ["mcTreeNodePaddingIndent", "indent"] }, exportAs: ["mcTreeNodePadding"], ngImport: i0__namespace });
|
|
474
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodePadding, decorators: [{
|
|
475
|
-
type: i0.Directive,
|
|
476
|
-
args: [{
|
|
477
|
-
selector: '[mcTreeNodePadding]',
|
|
478
|
-
exportAs: 'mcTreeNodePadding'
|
|
479
|
-
}]
|
|
480
|
-
}], ctorParameters: function () {
|
|
481
|
-
return [{ type: McTreeNode }, { type: McTreeBase }, { type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }, { type: i2__namespace.Directionality, decorators: [{
|
|
482
|
-
type: i0.Optional
|
|
483
|
-
}] }];
|
|
484
|
-
}, propDecorators: { indent: [{
|
|
485
|
-
type: i0.Input,
|
|
486
|
-
args: ['mcTreeNodePaddingIndent']
|
|
487
|
-
}] } });
|
|
488
|
-
|
|
489
|
-
/*! *****************************************************************************
|
|
490
|
-
Copyright (c) Microsoft Corporation.
|
|
491
|
-
|
|
492
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
493
|
-
purpose with or without fee is hereby granted.
|
|
494
|
-
|
|
495
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
496
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
497
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
498
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
499
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
500
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
501
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
502
|
-
***************************************************************************** */
|
|
503
|
-
/* global Reflect, Promise */
|
|
504
|
-
var extendStatics = function (d, b) {
|
|
505
|
-
extendStatics = Object.setPrototypeOf ||
|
|
506
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
507
|
-
function (d, b) { for (var p in b)
|
|
508
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
509
|
-
d[p] = b[p]; };
|
|
510
|
-
return extendStatics(d, b);
|
|
511
|
-
};
|
|
512
|
-
function __extends(d, b) {
|
|
513
|
-
if (typeof b !== "function" && b !== null)
|
|
514
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
515
|
-
extendStatics(d, b);
|
|
516
|
-
function __() { this.constructor = d; }
|
|
517
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
518
|
-
}
|
|
519
|
-
var __assign = function () {
|
|
520
|
-
__assign = Object.assign || function __assign(t) {
|
|
521
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
522
|
-
s = arguments[i];
|
|
523
|
-
for (var p in s)
|
|
524
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
525
|
-
t[p] = s[p];
|
|
526
|
-
}
|
|
527
|
-
return t;
|
|
528
|
-
};
|
|
529
|
-
return __assign.apply(this, arguments);
|
|
530
|
-
};
|
|
531
|
-
function __rest(s, e) {
|
|
532
|
-
var t = {};
|
|
533
|
-
for (var p in s)
|
|
534
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
535
|
-
t[p] = s[p];
|
|
536
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
537
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
538
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
539
|
-
t[p[i]] = s[p[i]];
|
|
540
|
-
}
|
|
541
|
-
return t;
|
|
542
|
-
}
|
|
543
|
-
function __decorate(decorators, target, key, desc) {
|
|
544
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
545
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
546
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
547
|
-
else
|
|
548
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
549
|
-
if (d = decorators[i])
|
|
550
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
551
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
552
|
-
}
|
|
553
|
-
function __param(paramIndex, decorator) {
|
|
554
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
555
|
-
}
|
|
556
|
-
function __metadata(metadataKey, metadataValue) {
|
|
557
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
558
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
559
|
-
}
|
|
560
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
561
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
562
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
563
|
-
function fulfilled(value) { try {
|
|
564
|
-
step(generator.next(value));
|
|
565
|
-
}
|
|
566
|
-
catch (e) {
|
|
567
|
-
reject(e);
|
|
568
|
-
} }
|
|
569
|
-
function rejected(value) { try {
|
|
570
|
-
step(generator["throw"](value));
|
|
571
|
-
}
|
|
572
|
-
catch (e) {
|
|
573
|
-
reject(e);
|
|
574
|
-
} }
|
|
575
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
576
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
function __generator(thisArg, body) {
|
|
580
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
581
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
582
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
583
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
584
|
-
function step(op) {
|
|
585
|
-
if (f)
|
|
586
|
-
throw new TypeError("Generator is already executing.");
|
|
587
|
-
while (_)
|
|
588
|
-
try {
|
|
589
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
590
|
-
return t;
|
|
591
|
-
if (y = 0, t)
|
|
592
|
-
op = [op[0] & 2, t.value];
|
|
593
|
-
switch (op[0]) {
|
|
594
|
-
case 0:
|
|
595
|
-
case 1:
|
|
596
|
-
t = op;
|
|
597
|
-
break;
|
|
598
|
-
case 4:
|
|
599
|
-
_.label++;
|
|
600
|
-
return { value: op[1], done: false };
|
|
601
|
-
case 5:
|
|
602
|
-
_.label++;
|
|
603
|
-
y = op[1];
|
|
604
|
-
op = [0];
|
|
605
|
-
continue;
|
|
606
|
-
case 7:
|
|
607
|
-
op = _.ops.pop();
|
|
608
|
-
_.trys.pop();
|
|
609
|
-
continue;
|
|
610
|
-
default:
|
|
611
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
612
|
-
_ = 0;
|
|
613
|
-
continue;
|
|
614
|
-
}
|
|
615
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
616
|
-
_.label = op[1];
|
|
617
|
-
break;
|
|
618
|
-
}
|
|
619
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
620
|
-
_.label = t[1];
|
|
621
|
-
t = op;
|
|
622
|
-
break;
|
|
623
|
-
}
|
|
624
|
-
if (t && _.label < t[2]) {
|
|
625
|
-
_.label = t[2];
|
|
626
|
-
_.ops.push(op);
|
|
627
|
-
break;
|
|
628
|
-
}
|
|
629
|
-
if (t[2])
|
|
630
|
-
_.ops.pop();
|
|
631
|
-
_.trys.pop();
|
|
632
|
-
continue;
|
|
633
|
-
}
|
|
634
|
-
op = body.call(thisArg, _);
|
|
635
|
-
}
|
|
636
|
-
catch (e) {
|
|
637
|
-
op = [6, e];
|
|
638
|
-
y = 0;
|
|
639
|
-
}
|
|
640
|
-
finally {
|
|
641
|
-
f = t = 0;
|
|
642
|
-
}
|
|
643
|
-
if (op[0] & 5)
|
|
644
|
-
throw op[1];
|
|
645
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
649
|
-
if (k2 === undefined)
|
|
650
|
-
k2 = k;
|
|
651
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
652
|
-
}) : (function (o, m, k, k2) {
|
|
653
|
-
if (k2 === undefined)
|
|
654
|
-
k2 = k;
|
|
655
|
-
o[k2] = m[k];
|
|
656
|
-
});
|
|
657
|
-
function __exportStar(m, o) {
|
|
658
|
-
for (var p in m)
|
|
659
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
660
|
-
__createBinding(o, m, p);
|
|
661
|
-
}
|
|
662
|
-
function __values(o) {
|
|
663
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
664
|
-
if (m)
|
|
665
|
-
return m.call(o);
|
|
666
|
-
if (o && typeof o.length === "number")
|
|
667
|
-
return {
|
|
668
|
-
next: function () {
|
|
669
|
-
if (o && i >= o.length)
|
|
670
|
-
o = void 0;
|
|
671
|
-
return { value: o && o[i++], done: !o };
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
675
|
-
}
|
|
676
|
-
function __read(o, n) {
|
|
677
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
678
|
-
if (!m)
|
|
679
|
-
return o;
|
|
680
|
-
var i = m.call(o), r, ar = [], e;
|
|
681
|
-
try {
|
|
682
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
683
|
-
ar.push(r.value);
|
|
684
|
-
}
|
|
685
|
-
catch (error) {
|
|
686
|
-
e = { error: error };
|
|
687
|
-
}
|
|
688
|
-
finally {
|
|
689
|
-
try {
|
|
690
|
-
if (r && !r.done && (m = i["return"]))
|
|
691
|
-
m.call(i);
|
|
692
|
-
}
|
|
693
|
-
finally {
|
|
694
|
-
if (e)
|
|
695
|
-
throw e.error;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
return ar;
|
|
699
|
-
}
|
|
700
|
-
/** @deprecated */
|
|
701
|
-
function __spread() {
|
|
702
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
703
|
-
ar = ar.concat(__read(arguments[i]));
|
|
704
|
-
return ar;
|
|
705
|
-
}
|
|
706
|
-
/** @deprecated */
|
|
707
|
-
function __spreadArrays() {
|
|
708
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
709
|
-
s += arguments[i].length;
|
|
710
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
711
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
712
|
-
r[k] = a[j];
|
|
713
|
-
return r;
|
|
714
|
-
}
|
|
715
|
-
function __spreadArray(to, from, pack) {
|
|
716
|
-
if (pack || arguments.length === 2)
|
|
717
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
718
|
-
if (ar || !(i in from)) {
|
|
719
|
-
if (!ar)
|
|
720
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
721
|
-
ar[i] = from[i];
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
725
|
-
}
|
|
726
|
-
function __await(v) {
|
|
727
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
728
|
-
}
|
|
729
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
730
|
-
if (!Symbol.asyncIterator)
|
|
731
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
732
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
733
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
734
|
-
function verb(n) { if (g[n])
|
|
735
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
736
|
-
function resume(n, v) { try {
|
|
737
|
-
step(g[n](v));
|
|
738
|
-
}
|
|
739
|
-
catch (e) {
|
|
740
|
-
settle(q[0][3], e);
|
|
741
|
-
} }
|
|
742
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
743
|
-
function fulfill(value) { resume("next", value); }
|
|
744
|
-
function reject(value) { resume("throw", value); }
|
|
745
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
746
|
-
resume(q[0][0], q[0][1]); }
|
|
747
|
-
}
|
|
748
|
-
function __asyncDelegator(o) {
|
|
749
|
-
var i, p;
|
|
750
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
751
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
752
|
-
}
|
|
753
|
-
function __asyncValues(o) {
|
|
754
|
-
if (!Symbol.asyncIterator)
|
|
755
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
756
|
-
var m = o[Symbol.asyncIterator], i;
|
|
757
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
758
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
759
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
760
|
-
}
|
|
761
|
-
function __makeTemplateObject(cooked, raw) {
|
|
762
|
-
if (Object.defineProperty) {
|
|
763
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
764
|
-
}
|
|
765
|
-
else {
|
|
766
|
-
cooked.raw = raw;
|
|
767
|
-
}
|
|
768
|
-
return cooked;
|
|
769
|
-
}
|
|
770
|
-
;
|
|
771
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
772
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
773
|
-
}) : function (o, v) {
|
|
774
|
-
o["default"] = v;
|
|
775
|
-
};
|
|
776
|
-
function __importStar(mod) {
|
|
777
|
-
if (mod && mod.__esModule)
|
|
778
|
-
return mod;
|
|
779
|
-
var result = {};
|
|
780
|
-
if (mod != null)
|
|
781
|
-
for (var k in mod)
|
|
782
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
783
|
-
__createBinding(result, mod, k);
|
|
784
|
-
__setModuleDefault(result, mod);
|
|
785
|
-
return result;
|
|
786
|
-
}
|
|
787
|
-
function __importDefault(mod) {
|
|
788
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
789
|
-
}
|
|
790
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
791
|
-
if (kind === "a" && !f)
|
|
792
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
793
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
794
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
795
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
796
|
-
}
|
|
797
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
798
|
-
if (kind === "m")
|
|
799
|
-
throw new TypeError("Private method is not writable");
|
|
800
|
-
if (kind === "a" && !f)
|
|
801
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
802
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
803
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
804
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
var McTreeNodeToggleBase = /** @class */ (function () {
|
|
808
|
-
function McTreeNodeToggleBase() {
|
|
809
|
-
}
|
|
810
|
-
return McTreeNodeToggleBase;
|
|
811
|
-
}());
|
|
812
|
-
// tslint:disable-next-line:naming-convention
|
|
813
|
-
var McTreeNodeToggleMixinBase = i1.mixinDisabled(McTreeNodeToggleBase);
|
|
814
|
-
/** @docs-private */
|
|
815
|
-
var McTreeNodeToggleBaseDirective = /** @class */ (function (_super) {
|
|
816
|
-
__extends(McTreeNodeToggleBaseDirective, _super);
|
|
817
|
-
function McTreeNodeToggleBaseDirective(tree, treeNode) {
|
|
818
|
-
var _this = _super.call(this) || this;
|
|
819
|
-
_this.tree = tree;
|
|
820
|
-
_this.treeNode = treeNode;
|
|
821
|
-
_this._recursive = false;
|
|
822
|
-
_this.tree.treeControl.filterValue
|
|
823
|
-
.pipe(operators.map(function (value) { return (value === null || value === void 0 ? void 0 : value.length) > 0; }))
|
|
824
|
-
.subscribe(function (state) { return _this.disabled = state; });
|
|
825
|
-
return _this;
|
|
826
|
-
}
|
|
827
|
-
Object.defineProperty(McTreeNodeToggleBaseDirective.prototype, "recursive", {
|
|
828
|
-
get: function () {
|
|
829
|
-
return this._recursive;
|
|
830
|
-
},
|
|
831
|
-
set: function (value) {
|
|
832
|
-
this._recursive = coercion.coerceBooleanProperty(value);
|
|
833
|
-
},
|
|
834
|
-
enumerable: false,
|
|
835
|
-
configurable: true
|
|
836
|
-
});
|
|
837
|
-
Object.defineProperty(McTreeNodeToggleBaseDirective.prototype, "iconState", {
|
|
838
|
-
get: function () {
|
|
839
|
-
return this.tree.treeControl.isExpanded(this.node);
|
|
840
|
-
},
|
|
841
|
-
enumerable: false,
|
|
842
|
-
configurable: true
|
|
843
|
-
});
|
|
844
|
-
McTreeNodeToggleBaseDirective.prototype.toggle = function (event) {
|
|
845
|
-
if (this.disabled) {
|
|
846
|
-
return;
|
|
847
|
-
}
|
|
848
|
-
this.recursive
|
|
849
|
-
? this.tree.treeControl.toggleDescendants(this.treeNode.data)
|
|
850
|
-
: this.tree.treeControl.toggle(this.treeNode.data);
|
|
851
|
-
event.stopPropagation();
|
|
852
|
-
};
|
|
853
|
-
return McTreeNodeToggleBaseDirective;
|
|
854
|
-
}(McTreeNodeToggleMixinBase));
|
|
855
|
-
/** @nocollapse */ McTreeNodeToggleBaseDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeToggleBaseDirective, deps: [{ token: McTreeBase }, { token: McTreeNode }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
856
|
-
/** @nocollapse */ McTreeNodeToggleBaseDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McTreeNodeToggleBaseDirective, inputs: { node: "node", recursive: ["mcTreeNodeToggleRecursive", "recursive"] }, usesInheritance: true, ngImport: i0__namespace });
|
|
857
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeToggleBaseDirective, decorators: [{
|
|
858
|
-
type: i0.Directive
|
|
859
|
-
}], ctorParameters: function () { return [{ type: McTreeBase }, { type: McTreeNode }]; }, propDecorators: { node: [{
|
|
860
|
-
type: i0.Input
|
|
861
|
-
}], recursive: [{
|
|
862
|
-
type: i0.Input,
|
|
863
|
-
args: ['mcTreeNodeToggleRecursive']
|
|
864
|
-
}] } });
|
|
865
|
-
var McTreeNodeToggleComponent = /** @class */ (function (_super) {
|
|
866
|
-
__extends(McTreeNodeToggleComponent, _super);
|
|
867
|
-
function McTreeNodeToggleComponent() {
|
|
868
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
869
|
-
}
|
|
870
|
-
return McTreeNodeToggleComponent;
|
|
871
|
-
}(McTreeNodeToggleBaseDirective));
|
|
872
|
-
/** @nocollapse */ McTreeNodeToggleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeToggleComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
873
|
-
/** @nocollapse */ McTreeNodeToggleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McTreeNodeToggleComponent, selector: "mc-tree-node-toggle", inputs: { disabled: "disabled" }, host: { listeners: { "click": "toggle($event)" }, properties: { "class.mc-opened": "iconState", "attr.disabled": "disabled || null" }, classAttribute: "mc-tree-node-toggle" }, exportAs: ["mcTreeNodeToggle"], usesInheritance: true, ngImport: i0__namespace, template: "<i class=\"mc mc-icon mc-angle-down-S_16\"></i>", isInline: true, styles: [".mc-tree-node-toggle{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:100%;cursor:pointer}.mc-tree-node-toggle .mc-icon{transform:rotate(-90deg)}.mc-tree-node-toggle.mc-opened .mc-icon{transform:rotate(0)}.mc-tree-node-toggle[disabled]{cursor:default}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
874
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeToggleComponent, decorators: [{
|
|
875
|
-
type: i0.Component,
|
|
876
|
-
args: [{
|
|
877
|
-
selector: 'mc-tree-node-toggle',
|
|
878
|
-
exportAs: 'mcTreeNodeToggle',
|
|
879
|
-
template: "<i class=\"mc mc-icon mc-angle-down-S_16\"></i>",
|
|
880
|
-
styleUrls: ['./toggle.scss'],
|
|
881
|
-
host: {
|
|
882
|
-
class: 'mc-tree-node-toggle',
|
|
883
|
-
'[class.mc-opened]': 'iconState',
|
|
884
|
-
'[attr.disabled]': 'disabled || null',
|
|
885
|
-
'(click)': 'toggle($event)'
|
|
886
|
-
},
|
|
887
|
-
inputs: ['disabled'],
|
|
888
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
889
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
890
|
-
}]
|
|
891
|
-
}] });
|
|
892
|
-
var McTreeNodeToggleDirective = /** @class */ (function (_super) {
|
|
893
|
-
__extends(McTreeNodeToggleDirective, _super);
|
|
894
|
-
function McTreeNodeToggleDirective() {
|
|
895
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
896
|
-
}
|
|
897
|
-
return McTreeNodeToggleDirective;
|
|
898
|
-
}(McTreeNodeToggleBaseDirective));
|
|
899
|
-
/** @nocollapse */ McTreeNodeToggleDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeToggleDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
900
|
-
/** @nocollapse */ McTreeNodeToggleDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McTreeNodeToggleDirective, selector: "[mcTreeNodeToggle]", host: { listeners: { "click": "toggle($event)" }, properties: { "attr.disabled": "disabled || null" } }, exportAs: ["mcTreeNodeToggle"], usesInheritance: true, ngImport: i0__namespace });
|
|
901
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeNodeToggleDirective, decorators: [{
|
|
902
|
-
type: i0.Directive,
|
|
903
|
-
args: [{
|
|
904
|
-
selector: '[mcTreeNodeToggle]',
|
|
905
|
-
exportAs: 'mcTreeNodeToggle',
|
|
906
|
-
host: {
|
|
907
|
-
'[attr.disabled]': 'disabled || null',
|
|
908
|
-
'(click)': 'toggle($event)'
|
|
909
|
-
}
|
|
910
|
-
}]
|
|
911
|
-
}] });
|
|
912
|
-
|
|
913
|
-
var McTree = /** @class */ (function (_super) {
|
|
914
|
-
__extends(McTree, _super);
|
|
915
|
-
function McTree() {
|
|
916
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
917
|
-
}
|
|
918
|
-
return McTree;
|
|
919
|
-
}(McTreeBase));
|
|
920
|
-
/** @nocollapse */ McTree.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTree, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
921
|
-
/** @nocollapse */ McTree.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McTree, selector: "mc-tree", host: { classAttribute: "mc-tree" }, exportAs: ["mcTree"], usesInheritance: true, ngImport: i0__namespace, template: "<ng-container mcTreeNodeOutlet></ng-container>", isInline: true, styles: [".mc-tree{display:block}\n"], directives: [{ type: McTreeNodeOutlet, selector: "[mcTreeNodeOutlet]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
922
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTree, decorators: [{
|
|
923
|
-
type: i0.Component,
|
|
924
|
-
args: [{
|
|
925
|
-
selector: 'mc-tree',
|
|
926
|
-
exportAs: 'mcTree',
|
|
927
|
-
template: "<ng-container mcTreeNodeOutlet></ng-container>",
|
|
928
|
-
styleUrls: ['./tree.scss'],
|
|
929
|
-
host: {
|
|
930
|
-
class: 'mc-tree'
|
|
931
|
-
},
|
|
932
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
933
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
934
|
-
}]
|
|
935
|
-
}] });
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* Injection token used to provide the parent component to options.
|
|
939
|
-
*/
|
|
940
|
-
var MC_TREE_OPTION_PARENT_COMPONENT = new i0.InjectionToken('MC_TREE_OPTION_PARENT_COMPONENT');
|
|
941
|
-
var McTreeOptionChange = /** @class */ (function () {
|
|
942
|
-
function McTreeOptionChange(source, isUserInput) {
|
|
943
|
-
if (isUserInput === void 0) { isUserInput = false; }
|
|
944
|
-
this.source = source;
|
|
945
|
-
this.isUserInput = isUserInput;
|
|
946
|
-
}
|
|
947
|
-
return McTreeOptionChange;
|
|
948
|
-
}());
|
|
949
|
-
var uniqueIdCounter = 0;
|
|
950
|
-
var McTreeOption = /** @class */ (function (_super) {
|
|
951
|
-
__extends(McTreeOption, _super);
|
|
952
|
-
function McTreeOption(elementRef, changeDetectorRef, ngZone, tree) {
|
|
953
|
-
var _this = _super.call(this, elementRef, tree) || this;
|
|
954
|
-
_this.changeDetectorRef = changeDetectorRef;
|
|
955
|
-
_this.ngZone = ngZone;
|
|
956
|
-
_this.tree = tree;
|
|
957
|
-
_this.onFocus = new rxjs.Subject();
|
|
958
|
-
_this.onBlur = new rxjs.Subject();
|
|
959
|
-
_this._disabled = false;
|
|
960
|
-
_this.onSelectionChange = new i0.EventEmitter();
|
|
961
|
-
_this._selected = false;
|
|
962
|
-
_this._id = "mc-tree-option-" + uniqueIdCounter++;
|
|
963
|
-
_this.hasFocus = false;
|
|
964
|
-
return _this;
|
|
965
|
-
}
|
|
966
|
-
Object.defineProperty(McTreeOption.prototype, "value", {
|
|
967
|
-
get: function () {
|
|
968
|
-
return this._value;
|
|
969
|
-
},
|
|
970
|
-
set: function (value) {
|
|
971
|
-
this._value = value;
|
|
972
|
-
},
|
|
973
|
-
enumerable: false,
|
|
974
|
-
configurable: true
|
|
975
|
-
});
|
|
976
|
-
Object.defineProperty(McTreeOption.prototype, "disabled", {
|
|
977
|
-
get: function () {
|
|
978
|
-
return this._disabled || this.tree.disabled;
|
|
979
|
-
},
|
|
980
|
-
set: function (value) {
|
|
981
|
-
var newValue = coercion.coerceBooleanProperty(value);
|
|
982
|
-
if (newValue !== this._disabled) {
|
|
983
|
-
this._disabled = newValue;
|
|
984
|
-
}
|
|
985
|
-
},
|
|
986
|
-
enumerable: false,
|
|
987
|
-
configurable: true
|
|
988
|
-
});
|
|
989
|
-
Object.defineProperty(McTreeOption.prototype, "showCheckbox", {
|
|
990
|
-
get: function () {
|
|
991
|
-
return this._showCheckbox !== undefined ? this._showCheckbox : this.tree.showCheckbox;
|
|
992
|
-
},
|
|
993
|
-
set: function (value) {
|
|
994
|
-
this._showCheckbox = coercion.coerceBooleanProperty(value);
|
|
995
|
-
},
|
|
996
|
-
enumerable: false,
|
|
997
|
-
configurable: true
|
|
998
|
-
});
|
|
999
|
-
Object.defineProperty(McTreeOption.prototype, "selected", {
|
|
1000
|
-
get: function () {
|
|
1001
|
-
return this._selected;
|
|
1002
|
-
},
|
|
1003
|
-
set: function (value) {
|
|
1004
|
-
var isSelected = coercion.coerceBooleanProperty(value);
|
|
1005
|
-
if (isSelected !== this._selected) {
|
|
1006
|
-
this.setSelected(isSelected);
|
|
1007
|
-
}
|
|
1008
|
-
},
|
|
1009
|
-
enumerable: false,
|
|
1010
|
-
configurable: true
|
|
1011
|
-
});
|
|
1012
|
-
Object.defineProperty(McTreeOption.prototype, "id", {
|
|
1013
|
-
get: function () {
|
|
1014
|
-
return this._id;
|
|
1015
|
-
},
|
|
1016
|
-
enumerable: false,
|
|
1017
|
-
configurable: true
|
|
1018
|
-
});
|
|
1019
|
-
Object.defineProperty(McTreeOption.prototype, "viewValue", {
|
|
1020
|
-
get: function () {
|
|
1021
|
-
// TODO: Add input property alternative for node envs.
|
|
1022
|
-
return (this.getHostElement().textContent || '').trim();
|
|
1023
|
-
},
|
|
1024
|
-
enumerable: false,
|
|
1025
|
-
configurable: true
|
|
1026
|
-
});
|
|
1027
|
-
Object.defineProperty(McTreeOption.prototype, "isExpandable", {
|
|
1028
|
-
get: function () {
|
|
1029
|
-
var _a;
|
|
1030
|
-
return !((_a = this.toggleElement) === null || _a === void 0 ? void 0 : _a.disabled) && this.tree.treeControl.isExpandable(this.data);
|
|
1031
|
-
},
|
|
1032
|
-
enumerable: false,
|
|
1033
|
-
configurable: true
|
|
1034
|
-
});
|
|
1035
|
-
McTreeOption.prototype.ngAfterContentInit = function () {
|
|
1036
|
-
this.value = this.tree.treeControl.getValue(this.data);
|
|
1037
|
-
};
|
|
1038
|
-
McTreeOption.prototype.toggle = function () {
|
|
1039
|
-
this.selected = !this.selected;
|
|
1040
|
-
};
|
|
1041
|
-
McTreeOption.prototype.setSelected = function (selected) {
|
|
1042
|
-
if (this._selected === selected || !this.tree.selectionModel) {
|
|
1043
|
-
return;
|
|
1044
|
-
}
|
|
1045
|
-
this._selected = selected;
|
|
1046
|
-
if (selected) {
|
|
1047
|
-
this.tree.selectionModel.select(this.data);
|
|
1048
|
-
}
|
|
1049
|
-
else {
|
|
1050
|
-
this.tree.selectionModel.deselect(this.data);
|
|
1051
|
-
}
|
|
1052
|
-
this.changeDetectorRef.markForCheck();
|
|
1053
|
-
};
|
|
1054
|
-
McTreeOption.prototype.focus = function (focusOrigin) {
|
|
1055
|
-
var _this = this;
|
|
1056
|
-
var _a;
|
|
1057
|
-
if (focusOrigin === 'program') {
|
|
1058
|
-
return;
|
|
1059
|
-
}
|
|
1060
|
-
if (this.disabled || this.hasFocus || ((_a = this.actionButton) === null || _a === void 0 ? void 0 : _a.hasFocus)) {
|
|
1061
|
-
return;
|
|
1062
|
-
}
|
|
1063
|
-
this.elementRef.nativeElement.focus();
|
|
1064
|
-
this.onFocus.next({ option: this });
|
|
1065
|
-
Promise.resolve().then(function () {
|
|
1066
|
-
_this.hasFocus = true;
|
|
1067
|
-
_this.changeDetectorRef.markForCheck();
|
|
1068
|
-
});
|
|
1069
|
-
};
|
|
1070
|
-
McTreeOption.prototype.blur = function () {
|
|
1071
|
-
var _this = this;
|
|
1072
|
-
// When animations are enabled, Angular may end up removing the option from the DOM a little
|
|
1073
|
-
// earlier than usual, causing it to be blurred and throwing off the logic in the tree
|
|
1074
|
-
// that moves focus not the next item. To work around the issue, we defer marking the option
|
|
1075
|
-
// as not focused until the next time the zone stabilizes.
|
|
1076
|
-
this.ngZone.onStable
|
|
1077
|
-
.asObservable()
|
|
1078
|
-
.pipe(operators.take(1))
|
|
1079
|
-
.subscribe(function () {
|
|
1080
|
-
_this.ngZone.run(function () {
|
|
1081
|
-
var _a;
|
|
1082
|
-
_this.hasFocus = false;
|
|
1083
|
-
if ((_a = _this.actionButton) === null || _a === void 0 ? void 0 : _a.hasFocus) {
|
|
1084
|
-
return;
|
|
1085
|
-
}
|
|
1086
|
-
_this.onBlur.next({ option: _this });
|
|
1087
|
-
});
|
|
1088
|
-
});
|
|
1089
|
-
};
|
|
1090
|
-
McTreeOption.prototype.getHeight = function () {
|
|
1091
|
-
var clientRects = this.elementRef.nativeElement.getClientRects();
|
|
1092
|
-
if (clientRects.length) {
|
|
1093
|
-
return clientRects[0].height;
|
|
1094
|
-
}
|
|
1095
|
-
return 0;
|
|
1096
|
-
};
|
|
1097
|
-
McTreeOption.prototype.select = function () {
|
|
1098
|
-
if (this._selected) {
|
|
1099
|
-
return;
|
|
1100
|
-
}
|
|
1101
|
-
this._selected = true;
|
|
1102
|
-
this.changeDetectorRef.markForCheck();
|
|
1103
|
-
this.emitSelectionChangeEvent();
|
|
1104
|
-
};
|
|
1105
|
-
McTreeOption.prototype.deselect = function () {
|
|
1106
|
-
if (!this._selected) {
|
|
1107
|
-
return;
|
|
1108
|
-
}
|
|
1109
|
-
this._selected = false;
|
|
1110
|
-
this.changeDetectorRef.markForCheck();
|
|
1111
|
-
};
|
|
1112
|
-
McTreeOption.prototype.onKeydown = function ($event) {
|
|
1113
|
-
if (!this.actionButton) {
|
|
1114
|
-
return;
|
|
1115
|
-
}
|
|
1116
|
-
if ($event.keyCode === keycodes.TAB && !$event.shiftKey && !this.actionButton.hasFocus) {
|
|
1117
|
-
this.actionButton.focus();
|
|
1118
|
-
$event.preventDefault();
|
|
1119
|
-
}
|
|
1120
|
-
};
|
|
1121
|
-
McTreeOption.prototype.selectViaInteraction = function ($event) {
|
|
1122
|
-
if (this.disabled) {
|
|
1123
|
-
return;
|
|
1124
|
-
}
|
|
1125
|
-
this.changeDetectorRef.markForCheck();
|
|
1126
|
-
this.emitSelectionChangeEvent(true);
|
|
1127
|
-
var shiftKey = $event ? keycodes.hasModifierKey($event, 'shiftKey') : false;
|
|
1128
|
-
var ctrlKey = $event ? keycodes.hasModifierKey($event, 'ctrlKey') : false;
|
|
1129
|
-
this.tree.setSelectedOptionsByClick(this, shiftKey, ctrlKey);
|
|
1130
|
-
};
|
|
1131
|
-
McTreeOption.prototype.emitSelectionChangeEvent = function (isUserInput) {
|
|
1132
|
-
if (isUserInput === void 0) { isUserInput = false; }
|
|
1133
|
-
this.onSelectionChange.emit(new McTreeOptionChange(this, isUserInput));
|
|
1134
|
-
};
|
|
1135
|
-
McTreeOption.prototype.getHostElement = function () {
|
|
1136
|
-
return this.elementRef.nativeElement;
|
|
1137
|
-
};
|
|
1138
|
-
McTreeOption.prototype.markForCheck = function () {
|
|
1139
|
-
this.changeDetectorRef.markForCheck();
|
|
1140
|
-
};
|
|
1141
|
-
return McTreeOption;
|
|
1142
|
-
}(McTreeNode));
|
|
1143
|
-
/** @nocollapse */ McTreeOption.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeOption, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: MC_TREE_OPTION_PARENT_COMPONENT }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1144
|
-
/** @nocollapse */ McTreeOption.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McTreeOption, selector: "mc-tree-option", inputs: { disabled: "disabled", showCheckbox: "showCheckbox" }, outputs: { onSelectionChange: "onSelectionChange" }, host: { listeners: { "focusin": "focus()", "blur": "blur()", "click": "selectViaInteraction($event)", "keydown": "onKeydown($event)" }, properties: { "class.mc-selected": "selected", "class.mc-focused": "hasFocus", "class.mc-action-button-focused": "actionButton?.active", "attr.id": "id", "attr.tabindex": "-1", "attr.disabled": "disabled || null" }, classAttribute: "mc-tree-option" }, providers: [
|
|
1145
|
-
{ provide: McTreeNode, useExisting: McTreeOption },
|
|
1146
|
-
{ provide: i1.MC_OPTION_ACTION_PARENT, useExisting: McTreeOption }
|
|
1147
|
-
], queries: [{ propertyName: "toggleElement", first: true, predicate: ["mcTreeNodeToggle"], descendants: true }, { propertyName: "actionButton", first: true, predicate: i1.McOptionActionComponent, descendants: true }, { propertyName: "tooltipTrigger", first: true, predicate: tooltip.McTooltipTrigger, descendants: true }, { propertyName: "dropdownTrigger", first: true, predicate: dropdown.McDropdownTrigger, descendants: true }], exportAs: ["mcTreeOption"], usesInheritance: true, ngImport: i0__namespace, template: "<ng-content select=\"mc-tree-node-toggle\"></ng-content>\n\n<mc-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</mc-pseudo-checkbox>\n\n<ng-content select=\"mc-checkbox\"></ng-content>\n\n<ng-content select=\"[mc-icon]\"></ng-content>\n\n<span class=\"mc-option-text mc-no-select\"><ng-content></ng-content></span>\n\n<ng-content select=\"mc-option-action\"></ng-content>\n\n<div class=\"mc-option-overlay\"></div>\n", styles: [".mc-tree-option{box-sizing:border-box;display:flex;align-items:center;height:32px;height:var(--mc-tree-size-node-height, 32px);word-wrap:break-word;border:2px solid transparent}.mc-tree-option .mc-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:16px;margin-right:var(--mc-tree-size-padding-right, 16px)}.mc-tree-option>.mc-icon{margin-right:8px;cursor:pointer}.mc-tree-option:focus{outline:none}.mc-tree-option:not([disabled]){cursor:pointer}.mc-tree-option>.mc-pseudo-checkbox,.mc-tree-option>.mc-checkbox{margin-right:8px}.mc-tree-option .mc-option-action{display:none}.mc-tree-option:not([disabled]):hover .mc-option-action,.mc-tree-option:not([disabled]).mc-focused .mc-option-action,.mc-tree-option:not([disabled]).mc-action-button-focused .mc-option-action{display:flex}\n"], components: [{ type: i1__namespace.McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: ["state", "disabled"] }], directives: [{ type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1148
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeOption, decorators: [{
|
|
1149
|
-
type: i0.Component,
|
|
1150
|
-
args: [{
|
|
1151
|
-
selector: 'mc-tree-option',
|
|
1152
|
-
exportAs: 'mcTreeOption',
|
|
1153
|
-
templateUrl: './tree-option.html',
|
|
1154
|
-
styleUrls: ['./tree-option.scss'],
|
|
1155
|
-
host: {
|
|
1156
|
-
class: 'mc-tree-option',
|
|
1157
|
-
'[class.mc-selected]': 'selected',
|
|
1158
|
-
'[class.mc-focused]': 'hasFocus',
|
|
1159
|
-
'[class.mc-action-button-focused]': 'actionButton?.active',
|
|
1160
|
-
'[attr.id]': 'id',
|
|
1161
|
-
'[attr.tabindex]': '-1',
|
|
1162
|
-
'[attr.disabled]': 'disabled || null',
|
|
1163
|
-
'(focusin)': 'focus()',
|
|
1164
|
-
'(blur)': 'blur()',
|
|
1165
|
-
'(click)': 'selectViaInteraction($event)',
|
|
1166
|
-
'(keydown)': 'onKeydown($event)'
|
|
1167
|
-
},
|
|
1168
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1169
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1170
|
-
providers: [
|
|
1171
|
-
{ provide: McTreeNode, useExisting: McTreeOption },
|
|
1172
|
-
{ provide: i1.MC_OPTION_ACTION_PARENT, useExisting: McTreeOption }
|
|
1173
|
-
]
|
|
1174
|
-
}]
|
|
1175
|
-
}], ctorParameters: function () {
|
|
1176
|
-
return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: undefined, decorators: [{
|
|
1177
|
-
type: i0.Inject,
|
|
1178
|
-
args: [MC_TREE_OPTION_PARENT_COMPONENT]
|
|
1179
|
-
}] }];
|
|
1180
|
-
}, propDecorators: { toggleElement: [{
|
|
1181
|
-
type: i0.ContentChild,
|
|
1182
|
-
args: ['mcTreeNodeToggle']
|
|
1183
|
-
}], actionButton: [{
|
|
1184
|
-
type: i0.ContentChild,
|
|
1185
|
-
args: [i1.McOptionActionComponent]
|
|
1186
|
-
}], tooltipTrigger: [{
|
|
1187
|
-
type: i0.ContentChild,
|
|
1188
|
-
args: [tooltip.McTooltipTrigger]
|
|
1189
|
-
}], dropdownTrigger: [{
|
|
1190
|
-
type: i0.ContentChild,
|
|
1191
|
-
args: [dropdown.McDropdownTrigger]
|
|
1192
|
-
}], disabled: [{
|
|
1193
|
-
type: i0.Input
|
|
1194
|
-
}], showCheckbox: [{
|
|
1195
|
-
type: i0.Input
|
|
1196
|
-
}], onSelectionChange: [{
|
|
1197
|
-
type: i0.Output
|
|
1198
|
-
}] } });
|
|
1199
|
-
|
|
1200
|
-
var MC_SELECTION_TREE_VALUE_ACCESSOR = {
|
|
1201
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
1202
|
-
useExisting: i0.forwardRef(function () { return McTreeSelection; }),
|
|
1203
|
-
multi: true
|
|
1204
|
-
};
|
|
1205
|
-
var McTreeSelectAllEvent = /** @class */ (function () {
|
|
1206
|
-
function McTreeSelectAllEvent(source, options) {
|
|
1207
|
-
this.source = source;
|
|
1208
|
-
this.options = options;
|
|
1209
|
-
}
|
|
1210
|
-
return McTreeSelectAllEvent;
|
|
1211
|
-
}());
|
|
1212
|
-
var McTreeCopyEvent = /** @class */ (function () {
|
|
1213
|
-
function McTreeCopyEvent(source, option) {
|
|
1214
|
-
this.source = source;
|
|
1215
|
-
this.option = option;
|
|
1216
|
-
}
|
|
1217
|
-
return McTreeCopyEvent;
|
|
1218
|
-
}());
|
|
1219
|
-
var McTreeNavigationChange = /** @class */ (function () {
|
|
1220
|
-
function McTreeNavigationChange(source, option) {
|
|
1221
|
-
this.source = source;
|
|
1222
|
-
this.option = option;
|
|
1223
|
-
}
|
|
1224
|
-
return McTreeNavigationChange;
|
|
1225
|
-
}());
|
|
1226
|
-
var McTreeSelectionChange = /** @class */ (function () {
|
|
1227
|
-
function McTreeSelectionChange(source, option) {
|
|
1228
|
-
this.source = source;
|
|
1229
|
-
this.option = option;
|
|
1230
|
-
}
|
|
1231
|
-
return McTreeSelectionChange;
|
|
1232
|
-
}());
|
|
1233
|
-
var McTreeSelection = /** @class */ (function (_super) {
|
|
1234
|
-
__extends(McTreeSelection, _super);
|
|
1235
|
-
function McTreeSelection(elementRef, differs, changeDetectorRef, multiple, clipboard) {
|
|
1236
|
-
var _this = _super.call(this, differs, changeDetectorRef) || this;
|
|
1237
|
-
_this.elementRef = elementRef;
|
|
1238
|
-
_this.clipboard = clipboard;
|
|
1239
|
-
_this.renderedOptions = new i0.QueryList();
|
|
1240
|
-
_this.resetFocusedItemOnBlur = true;
|
|
1241
|
-
_this.multipleMode = null;
|
|
1242
|
-
_this.userTabIndex = null;
|
|
1243
|
-
_this.navigationChange = new i0.EventEmitter();
|
|
1244
|
-
_this.selectionChange = new i0.EventEmitter();
|
|
1245
|
-
_this.onSelectAll = new i0.EventEmitter();
|
|
1246
|
-
_this.onCopy = new i0.EventEmitter();
|
|
1247
|
-
_this.sortedNodes = [];
|
|
1248
|
-
_this._autoSelect = true;
|
|
1249
|
-
_this._noUnselectLast = true;
|
|
1250
|
-
_this._disabled = false;
|
|
1251
|
-
_this._tabIndex = 0;
|
|
1252
|
-
_this.destroy = new rxjs.Subject();
|
|
1253
|
-
/** `View -> model callback called when value changes` */
|
|
1254
|
-
_this.onChange = function () { };
|
|
1255
|
-
/** `View -> model callback called when select has been touched` */
|
|
1256
|
-
_this.onTouched = function () { };
|
|
1257
|
-
_this.updateRenderedOptions = function () {
|
|
1258
|
-
var orderedOptions = [];
|
|
1259
|
-
_this.sortedNodes.forEach(function (node) {
|
|
1260
|
-
var found = _this.unorderedOptions.find(function (option) { return option.value === _this.treeControl.getValue(node); });
|
|
1261
|
-
if (found) {
|
|
1262
|
-
orderedOptions.push(found);
|
|
1263
|
-
}
|
|
1264
|
-
});
|
|
1265
|
-
_this.renderedOptions.reset(orderedOptions);
|
|
1266
|
-
_this.renderedOptions.notifyOnChanges();
|
|
1267
|
-
_this.updateScrollSize();
|
|
1268
|
-
};
|
|
1269
|
-
if (multiple === i1.MultipleMode.CHECKBOX || multiple === i1.MultipleMode.KEYBOARD) {
|
|
1270
|
-
_this.multipleMode = multiple;
|
|
1271
|
-
}
|
|
1272
|
-
else if (multiple !== null) {
|
|
1273
|
-
_this.multipleMode = i1.MultipleMode.CHECKBOX;
|
|
1274
|
-
}
|
|
1275
|
-
if (_this.multipleMode === i1.MultipleMode.CHECKBOX) {
|
|
1276
|
-
_this.autoSelect = false;
|
|
1277
|
-
_this.noUnselectLast = false;
|
|
1278
|
-
}
|
|
1279
|
-
_this.selectionModel = new collections.SelectionModel(_this.multiple);
|
|
1280
|
-
return _this;
|
|
1281
|
-
}
|
|
1282
|
-
Object.defineProperty(McTreeSelection.prototype, "autoSelect", {
|
|
1283
|
-
get: function () {
|
|
1284
|
-
return this._autoSelect;
|
|
1285
|
-
},
|
|
1286
|
-
set: function (value) {
|
|
1287
|
-
this._autoSelect = coercion.coerceBooleanProperty(value);
|
|
1288
|
-
},
|
|
1289
|
-
enumerable: false,
|
|
1290
|
-
configurable: true
|
|
1291
|
-
});
|
|
1292
|
-
Object.defineProperty(McTreeSelection.prototype, "optionFocusChanges", {
|
|
1293
|
-
get: function () {
|
|
1294
|
-
return rxjs.merge.apply(void 0, __spreadArray([], __read(this.renderedOptions.map(function (option) { return option.onFocus; }))));
|
|
1295
|
-
},
|
|
1296
|
-
enumerable: false,
|
|
1297
|
-
configurable: true
|
|
1298
|
-
});
|
|
1299
|
-
Object.defineProperty(McTreeSelection.prototype, "optionBlurChanges", {
|
|
1300
|
-
get: function () {
|
|
1301
|
-
return rxjs.merge.apply(void 0, __spreadArray([], __read(this.renderedOptions.map(function (option) { return option.onBlur; }))));
|
|
1302
|
-
},
|
|
1303
|
-
enumerable: false,
|
|
1304
|
-
configurable: true
|
|
1305
|
-
});
|
|
1306
|
-
Object.defineProperty(McTreeSelection.prototype, "multiple", {
|
|
1307
|
-
get: function () {
|
|
1308
|
-
return !!this.multipleMode;
|
|
1309
|
-
},
|
|
1310
|
-
enumerable: false,
|
|
1311
|
-
configurable: true
|
|
1312
|
-
});
|
|
1313
|
-
Object.defineProperty(McTreeSelection.prototype, "noUnselectLast", {
|
|
1314
|
-
get: function () {
|
|
1315
|
-
return this._noUnselectLast;
|
|
1316
|
-
},
|
|
1317
|
-
set: function (value) {
|
|
1318
|
-
this._noUnselectLast = coercion.coerceBooleanProperty(value);
|
|
1319
|
-
},
|
|
1320
|
-
enumerable: false,
|
|
1321
|
-
configurable: true
|
|
1322
|
-
});
|
|
1323
|
-
Object.defineProperty(McTreeSelection.prototype, "disabled", {
|
|
1324
|
-
get: function () {
|
|
1325
|
-
return this._disabled;
|
|
1326
|
-
},
|
|
1327
|
-
set: function (rawValue) {
|
|
1328
|
-
var value = coercion.coerceBooleanProperty(rawValue);
|
|
1329
|
-
if (this._disabled !== value) {
|
|
1330
|
-
this._disabled = value;
|
|
1331
|
-
this.markOptionsForCheck();
|
|
1332
|
-
}
|
|
1333
|
-
},
|
|
1334
|
-
enumerable: false,
|
|
1335
|
-
configurable: true
|
|
1336
|
-
});
|
|
1337
|
-
Object.defineProperty(McTreeSelection.prototype, "tabIndex", {
|
|
1338
|
-
get: function () {
|
|
1339
|
-
return this.disabled ? -1 : this._tabIndex;
|
|
1340
|
-
},
|
|
1341
|
-
set: function (value) {
|
|
1342
|
-
this._tabIndex = value;
|
|
1343
|
-
this.userTabIndex = value;
|
|
1344
|
-
},
|
|
1345
|
-
enumerable: false,
|
|
1346
|
-
configurable: true
|
|
1347
|
-
});
|
|
1348
|
-
Object.defineProperty(McTreeSelection.prototype, "showCheckbox", {
|
|
1349
|
-
get: function () {
|
|
1350
|
-
return this.multipleMode === i1.MultipleMode.CHECKBOX;
|
|
1351
|
-
},
|
|
1352
|
-
enumerable: false,
|
|
1353
|
-
configurable: true
|
|
1354
|
-
});
|
|
1355
|
-
McTreeSelection.prototype.ngAfterContentInit = function () {
|
|
1356
|
-
var _this = this;
|
|
1357
|
-
this.unorderedOptions.changes
|
|
1358
|
-
.subscribe(this.updateRenderedOptions);
|
|
1359
|
-
this.keyManager = new a11y.FocusKeyManager(this.renderedOptions)
|
|
1360
|
-
.withVerticalOrientation(true)
|
|
1361
|
-
.withHorizontalOrientation(null);
|
|
1362
|
-
this.keyManager.change
|
|
1363
|
-
.pipe(operators.takeUntil(this.destroy))
|
|
1364
|
-
.subscribe(function () {
|
|
1365
|
-
if (_this.keyManager.activeItem) {
|
|
1366
|
-
_this.emitNavigationEvent(_this.keyManager.activeItem);
|
|
1367
|
-
// todo need check this logic
|
|
1368
|
-
if (_this.autoSelect && !_this.keyManager.activeItem.disabled) {
|
|
1369
|
-
_this.updateOptionsFocus();
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
});
|
|
1373
|
-
this.keyManager.tabOut
|
|
1374
|
-
.pipe(operators.takeUntil(this.destroy))
|
|
1375
|
-
.subscribe(function () { return _this.allowFocusEscape(); });
|
|
1376
|
-
this.selectionModel.changed
|
|
1377
|
-
.pipe(operators.takeUntil(this.destroy))
|
|
1378
|
-
.subscribe(function () {
|
|
1379
|
-
_this.onChange(_this.getSelectedValues());
|
|
1380
|
-
_this.renderedOptions.notifyOnChanges();
|
|
1381
|
-
});
|
|
1382
|
-
this.renderedOptions.changes
|
|
1383
|
-
.pipe(operators.takeUntil(this.destroy), operators.delay(0))
|
|
1384
|
-
.subscribe(function (options) {
|
|
1385
|
-
_this.resetOptions();
|
|
1386
|
-
// Check to see if we need to update our tab index
|
|
1387
|
-
_this.updateTabIndex();
|
|
1388
|
-
options.forEach(function (option) {
|
|
1389
|
-
if (_this.getSelectedValues().includes(option.value)) {
|
|
1390
|
-
option.select();
|
|
1391
|
-
}
|
|
1392
|
-
else {
|
|
1393
|
-
option.deselect();
|
|
1394
|
-
}
|
|
1395
|
-
option.markForCheck();
|
|
1396
|
-
});
|
|
1397
|
-
});
|
|
1398
|
-
};
|
|
1399
|
-
McTreeSelection.prototype.ngOnDestroy = function () {
|
|
1400
|
-
this.destroy.next();
|
|
1401
|
-
this.destroy.complete();
|
|
1402
|
-
};
|
|
1403
|
-
McTreeSelection.prototype.focus = function ($event) {
|
|
1404
|
-
if (this.renderedOptions.length === 0 || this.isFocusReceivedFromNestedOption($event)) {
|
|
1405
|
-
return;
|
|
1406
|
-
}
|
|
1407
|
-
this.keyManager.setFocusOrigin('keyboard');
|
|
1408
|
-
this.keyManager.setFirstItemActive();
|
|
1409
|
-
this.keyManager.setFocusOrigin('program');
|
|
1410
|
-
};
|
|
1411
|
-
McTreeSelection.prototype.blur = function () {
|
|
1412
|
-
if (!this.hasFocusedOption() && this.resetFocusedItemOnBlur) {
|
|
1413
|
-
this.keyManager.setActiveItem(-1);
|
|
1414
|
-
}
|
|
1415
|
-
this.onTouched();
|
|
1416
|
-
this.changeDetectorRef.markForCheck();
|
|
1417
|
-
};
|
|
1418
|
-
McTreeSelection.prototype.onKeyDown = function (event) {
|
|
1419
|
-
var _a, _b;
|
|
1420
|
-
this.keyManager.setFocusOrigin('keyboard');
|
|
1421
|
-
// tslint:disable-next-line: deprecation
|
|
1422
|
-
var keyCode = event.keyCode;
|
|
1423
|
-
if ([keycodes.SPACE, keycodes.LEFT_ARROW, keycodes.RIGHT_ARROW].includes(keyCode) || keycodes.isVerticalMovement(event)) {
|
|
1424
|
-
event.preventDefault();
|
|
1425
|
-
}
|
|
1426
|
-
if (this.multiple && keycodes.isSelectAll(event)) {
|
|
1427
|
-
this.selectAllOptions();
|
|
1428
|
-
return;
|
|
1429
|
-
}
|
|
1430
|
-
else if (keycodes.isCopy(event)) {
|
|
1431
|
-
this.copyActiveOption();
|
|
1432
|
-
return;
|
|
1433
|
-
}
|
|
1434
|
-
else if (keyCode === keycodes.TAB) {
|
|
1435
|
-
this.keyManager.tabOut.next();
|
|
1436
|
-
return;
|
|
1437
|
-
}
|
|
1438
|
-
else if (keyCode === keycodes.LEFT_ARROW && ((_a = this.keyManager.activeItem) === null || _a === void 0 ? void 0 : _a.isExpandable)) {
|
|
1439
|
-
this.treeControl.collapse(this.keyManager.activeItem.data);
|
|
1440
|
-
return;
|
|
1441
|
-
}
|
|
1442
|
-
else if (keyCode === keycodes.RIGHT_ARROW && ((_b = this.keyManager.activeItem) === null || _b === void 0 ? void 0 : _b.isExpandable)) {
|
|
1443
|
-
this.treeControl.expand(this.keyManager.activeItem.data);
|
|
1444
|
-
return;
|
|
1445
|
-
}
|
|
1446
|
-
else if (keyCode === keycodes.DOWN_ARROW) {
|
|
1447
|
-
this.keyManager.setNextItemActive();
|
|
1448
|
-
}
|
|
1449
|
-
else if (keyCode === keycodes.UP_ARROW) {
|
|
1450
|
-
this.keyManager.setPreviousItemActive();
|
|
1451
|
-
}
|
|
1452
|
-
else if ([keycodes.SPACE, keycodes.ENTER].includes(keyCode)) {
|
|
1453
|
-
this.toggleFocusedOption();
|
|
1454
|
-
return;
|
|
1455
|
-
}
|
|
1456
|
-
else if (keyCode === keycodes.HOME) {
|
|
1457
|
-
this.keyManager.setFirstItemActive();
|
|
1458
|
-
}
|
|
1459
|
-
else if (keyCode === keycodes.END) {
|
|
1460
|
-
this.keyManager.setLastItemActive();
|
|
1461
|
-
}
|
|
1462
|
-
else if (keyCode === keycodes.PAGE_UP) {
|
|
1463
|
-
this.keyManager.setPreviousPageItemActive();
|
|
1464
|
-
}
|
|
1465
|
-
else if (keyCode === keycodes.PAGE_DOWN) {
|
|
1466
|
-
this.keyManager.setNextPageItemActive();
|
|
1467
|
-
}
|
|
1468
|
-
if (this.keyManager.activeItem) {
|
|
1469
|
-
this.setSelectedOptionsByKey(this.keyManager.activeItem, keycodes.hasModifierKey(event, 'shiftKey'), keycodes.hasModifierKey(event, 'ctrlKey'));
|
|
1470
|
-
}
|
|
1471
|
-
};
|
|
1472
|
-
McTreeSelection.prototype.updateScrollSize = function () {
|
|
1473
|
-
if (!this.renderedOptions.first) {
|
|
1474
|
-
return;
|
|
1475
|
-
}
|
|
1476
|
-
this.keyManager.withScrollSize(Math.floor(this.getHeight() / this.renderedOptions.first.getHeight()));
|
|
1477
|
-
};
|
|
1478
|
-
McTreeSelection.prototype.setSelectedOptionsByKey = function (option, shiftKey, ctrlKey) {
|
|
1479
|
-
if (shiftKey && this.multiple) {
|
|
1480
|
-
this.setSelectedOptions(option);
|
|
1481
|
-
this.emitChangeEvent(option);
|
|
1482
|
-
}
|
|
1483
|
-
else if (ctrlKey) {
|
|
1484
|
-
if (!this.canDeselectLast(option)) {
|
|
1485
|
-
return;
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
else if (this.autoSelect) {
|
|
1489
|
-
this.selectionModel.clear();
|
|
1490
|
-
this.selectionModel.toggle(option.data);
|
|
1491
|
-
this.emitChangeEvent(option);
|
|
1492
|
-
}
|
|
1493
|
-
};
|
|
1494
|
-
McTreeSelection.prototype.setSelectedOptionsByClick = function (option, shiftKey, ctrlKey) {
|
|
1495
|
-
if (!shiftKey && !ctrlKey) {
|
|
1496
|
-
this.keyManager.setActiveItem(option);
|
|
1497
|
-
}
|
|
1498
|
-
if (shiftKey && this.multiple) {
|
|
1499
|
-
this.setSelectedOptions(option);
|
|
1500
|
-
}
|
|
1501
|
-
else if (ctrlKey) {
|
|
1502
|
-
if (!this.canDeselectLast(option)) {
|
|
1503
|
-
return;
|
|
1504
|
-
}
|
|
1505
|
-
this.selectionModel.toggle(option.data);
|
|
1506
|
-
}
|
|
1507
|
-
else if (this.autoSelect) {
|
|
1508
|
-
this.selectionModel.clear();
|
|
1509
|
-
this.selectionModel.toggle(option.data);
|
|
1510
|
-
}
|
|
1511
|
-
else {
|
|
1512
|
-
this.selectionModel.toggle(option.data);
|
|
1513
|
-
}
|
|
1514
|
-
this.emitChangeEvent(option);
|
|
1515
|
-
};
|
|
1516
|
-
McTreeSelection.prototype.setSelectedOptions = function (option) {
|
|
1517
|
-
var _c;
|
|
1518
|
-
var _this = this;
|
|
1519
|
-
var selectedOptionState = option.selected;
|
|
1520
|
-
var fromIndex = this.keyManager.previousActiveItemIndex;
|
|
1521
|
-
var toIndex = this.keyManager.previousActiveItemIndex = this.keyManager.activeItemIndex;
|
|
1522
|
-
if (toIndex === fromIndex) {
|
|
1523
|
-
return;
|
|
1524
|
-
}
|
|
1525
|
-
if (fromIndex > toIndex) {
|
|
1526
|
-
_c = __read([toIndex, fromIndex], 2), fromIndex = _c[0], toIndex = _c[1];
|
|
1527
|
-
}
|
|
1528
|
-
this.renderedOptions
|
|
1529
|
-
.toArray()
|
|
1530
|
-
.slice(fromIndex, toIndex + 1)
|
|
1531
|
-
.filter(function (item) { return !item.disabled; })
|
|
1532
|
-
.forEach(function (renderedOption) {
|
|
1533
|
-
var isLastRenderedOption = renderedOption === _this.keyManager.activeItem;
|
|
1534
|
-
if (isLastRenderedOption && renderedOption.selected && _this.noUnselectLast) {
|
|
1535
|
-
return;
|
|
1536
|
-
}
|
|
1537
|
-
renderedOption.setSelected(!selectedOptionState);
|
|
1538
|
-
});
|
|
1539
|
-
};
|
|
1540
|
-
McTreeSelection.prototype.setFocusedOption = function (option) {
|
|
1541
|
-
this.keyManager.setActiveItem(option);
|
|
1542
|
-
};
|
|
1543
|
-
McTreeSelection.prototype.toggleFocusedOption = function () {
|
|
1544
|
-
var focusedOption = this.keyManager.activeItem;
|
|
1545
|
-
if (focusedOption && (!focusedOption.selected || this.canDeselectLast(focusedOption))) {
|
|
1546
|
-
focusedOption.toggle();
|
|
1547
|
-
this.emitChangeEvent(focusedOption);
|
|
1548
|
-
}
|
|
1549
|
-
};
|
|
1550
|
-
McTreeSelection.prototype.renderNodeChanges = function (data, dataDiffer, viewContainer, parentData) {
|
|
1551
|
-
if (dataDiffer === void 0) { dataDiffer = this.dataDiffer; }
|
|
1552
|
-
if (viewContainer === void 0) { viewContainer = this.nodeOutlet.viewContainer; }
|
|
1553
|
-
_super.prototype.renderNodeChanges.call(this, data, dataDiffer, viewContainer, parentData);
|
|
1554
|
-
this.sortedNodes = this.getSortedNodes(viewContainer);
|
|
1555
|
-
this.nodeOutlet.changeDetectorRef.detectChanges();
|
|
1556
|
-
};
|
|
1557
|
-
McTreeSelection.prototype.emitNavigationEvent = function (option) {
|
|
1558
|
-
this.navigationChange.emit(new McTreeNavigationChange(this, option));
|
|
1559
|
-
};
|
|
1560
|
-
McTreeSelection.prototype.emitChangeEvent = function (option) {
|
|
1561
|
-
this.selectionChange.emit(new McTreeNavigationChange(this, option));
|
|
1562
|
-
};
|
|
1563
|
-
McTreeSelection.prototype.selectAllOptions = function () {
|
|
1564
|
-
var optionsToSelect = this.renderedOptions
|
|
1565
|
-
.filter(function (option) { return !option.disabled; });
|
|
1566
|
-
optionsToSelect
|
|
1567
|
-
.forEach(function (option) { return option.setSelected(true); });
|
|
1568
|
-
this.onSelectAll.emit(new McTreeSelectAllEvent(this, optionsToSelect));
|
|
1569
|
-
};
|
|
1570
|
-
McTreeSelection.prototype.copyActiveOption = function () {
|
|
1571
|
-
if (this.onCopy.observers.length) {
|
|
1572
|
-
this.onCopy.emit(new McTreeCopyEvent(this, this.keyManager.activeItem));
|
|
1573
|
-
}
|
|
1574
|
-
else {
|
|
1575
|
-
this.onCopyDefaultHandler();
|
|
1576
|
-
}
|
|
1577
|
-
};
|
|
1578
|
-
McTreeSelection.prototype.writeValue = function (value) {
|
|
1579
|
-
if (this.multiple && value && !Array.isArray(value)) {
|
|
1580
|
-
throw i1.getMcSelectNonArrayValueError();
|
|
1581
|
-
}
|
|
1582
|
-
if (value) {
|
|
1583
|
-
this.setOptionsFromValues(this.multiple ? value : [value]);
|
|
1584
|
-
}
|
|
1585
|
-
else {
|
|
1586
|
-
this.selectionModel.clear();
|
|
1587
|
-
}
|
|
1588
|
-
};
|
|
1589
|
-
McTreeSelection.prototype.registerOnChange = function (fn) {
|
|
1590
|
-
this.onChange = fn;
|
|
1591
|
-
};
|
|
1592
|
-
McTreeSelection.prototype.registerOnTouched = function (fn) {
|
|
1593
|
-
this.onTouched = fn;
|
|
1594
|
-
};
|
|
1595
|
-
/**
|
|
1596
|
-
* Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
|
|
1597
|
-
*/
|
|
1598
|
-
McTreeSelection.prototype.setDisabledState = function (isDisabled) {
|
|
1599
|
-
this._disabled = isDisabled;
|
|
1600
|
-
this.changeDetectorRef.markForCheck();
|
|
1601
|
-
};
|
|
1602
|
-
McTreeSelection.prototype.setOptionsFromValues = function (values) {
|
|
1603
|
-
var _c;
|
|
1604
|
-
var _this = this;
|
|
1605
|
-
this.selectionModel.clear();
|
|
1606
|
-
var valuesToSelect = values.reduce(function (result, value) {
|
|
1607
|
-
return _this.treeControl.hasValue(value) ? __spreadArray(__spreadArray([], __read(result)), [_this.treeControl.hasValue(value)]) : __spreadArray([], __read(result));
|
|
1608
|
-
}, []);
|
|
1609
|
-
(_c = this.selectionModel).select.apply(_c, __spreadArray([], __read(valuesToSelect)));
|
|
1610
|
-
};
|
|
1611
|
-
McTreeSelection.prototype.getSelectedValues = function () {
|
|
1612
|
-
var _this = this;
|
|
1613
|
-
return this.selectionModel.selected.map(function (selected) { return _this.treeControl.getValue(selected); });
|
|
1614
|
-
};
|
|
1615
|
-
McTreeSelection.prototype.getItemHeight = function () {
|
|
1616
|
-
return this.renderedOptions.first ? this.renderedOptions.first.getHeight() : 0;
|
|
1617
|
-
};
|
|
1618
|
-
McTreeSelection.prototype.onCopyDefaultHandler = function () {
|
|
1619
|
-
var _a;
|
|
1620
|
-
(_a = this.clipboard) === null || _a === void 0 ? void 0 : _a.copy(this.keyManager.activeItem.value);
|
|
1621
|
-
};
|
|
1622
|
-
McTreeSelection.prototype.getHeight = function () {
|
|
1623
|
-
var clientRects = this.elementRef.nativeElement.getClientRects();
|
|
1624
|
-
if (clientRects.length) {
|
|
1625
|
-
return clientRects[0].height;
|
|
1626
|
-
}
|
|
1627
|
-
return 0;
|
|
1628
|
-
};
|
|
1629
|
-
McTreeSelection.prototype.updateTabIndex = function () {
|
|
1630
|
-
this._tabIndex = this.renderedOptions.length === 0 ? -1 : 0;
|
|
1631
|
-
};
|
|
1632
|
-
McTreeSelection.prototype.getSortedNodes = function (viewContainer) {
|
|
1633
|
-
var array = [];
|
|
1634
|
-
for (var i = 0; i < viewContainer.length; i++) {
|
|
1635
|
-
var viewRef = viewContainer.get(i);
|
|
1636
|
-
array.push(viewRef.context.$implicit);
|
|
1637
|
-
}
|
|
1638
|
-
return array;
|
|
1639
|
-
};
|
|
1640
|
-
McTreeSelection.prototype.allowFocusEscape = function () {
|
|
1641
|
-
var _this = this;
|
|
1642
|
-
if (this._tabIndex !== -1) {
|
|
1643
|
-
this._tabIndex = -1;
|
|
1644
|
-
setTimeout(function () {
|
|
1645
|
-
_this._tabIndex = _this.userTabIndex || 0;
|
|
1646
|
-
_this.changeDetectorRef.markForCheck();
|
|
1647
|
-
});
|
|
1648
|
-
}
|
|
1649
|
-
};
|
|
1650
|
-
McTreeSelection.prototype.resetOptions = function () {
|
|
1651
|
-
this.dropSubscriptions();
|
|
1652
|
-
this.listenToOptionsFocus();
|
|
1653
|
-
};
|
|
1654
|
-
McTreeSelection.prototype.dropSubscriptions = function () {
|
|
1655
|
-
if (this.optionFocusSubscription) {
|
|
1656
|
-
this.optionFocusSubscription.unsubscribe();
|
|
1657
|
-
this.optionFocusSubscription = null;
|
|
1658
|
-
}
|
|
1659
|
-
if (this.optionBlurSubscription) {
|
|
1660
|
-
this.optionBlurSubscription.unsubscribe();
|
|
1661
|
-
this.optionBlurSubscription = null;
|
|
1662
|
-
}
|
|
1663
|
-
};
|
|
1664
|
-
McTreeSelection.prototype.listenToOptionsFocus = function () {
|
|
1665
|
-
var _this = this;
|
|
1666
|
-
this.optionFocusSubscription = this.optionFocusChanges
|
|
1667
|
-
.subscribe(function (event) {
|
|
1668
|
-
var index = _this.renderedOptions.toArray().indexOf(event.option);
|
|
1669
|
-
_this.renderedOptions
|
|
1670
|
-
.filter(function (option) { return option.hasFocus; })
|
|
1671
|
-
.forEach(function (option) { return option.hasFocus = false; });
|
|
1672
|
-
if (_this.isValidIndex(index)) {
|
|
1673
|
-
_this.keyManager.updateActiveItem(index);
|
|
1674
|
-
}
|
|
1675
|
-
});
|
|
1676
|
-
this.optionBlurSubscription = this.optionBlurChanges
|
|
1677
|
-
.subscribe(function () { return _this.blur(); });
|
|
1678
|
-
};
|
|
1679
|
-
/**
|
|
1680
|
-
* Utility to ensure all indexes are valid.
|
|
1681
|
-
* @param index The index to be checked.
|
|
1682
|
-
* @returns True if the index is valid for our list of options.
|
|
1683
|
-
*/
|
|
1684
|
-
McTreeSelection.prototype.isValidIndex = function (index) {
|
|
1685
|
-
return index >= 0 && index < this.renderedOptions.length;
|
|
1686
|
-
};
|
|
1687
|
-
/** Checks whether any of the options is focused. */
|
|
1688
|
-
McTreeSelection.prototype.hasFocusedOption = function () {
|
|
1689
|
-
return this.renderedOptions.some(function (option) { return option.hasFocus; });
|
|
1690
|
-
};
|
|
1691
|
-
McTreeSelection.prototype.markOptionsForCheck = function () {
|
|
1692
|
-
this.renderedOptions.forEach(function (option) { return option.markForCheck(); });
|
|
1693
|
-
};
|
|
1694
|
-
McTreeSelection.prototype.updateOptionsFocus = function () {
|
|
1695
|
-
this.renderedOptions
|
|
1696
|
-
.filter(function (option) { return option.hasFocus; })
|
|
1697
|
-
.forEach(function (option) { return option.hasFocus = false; });
|
|
1698
|
-
};
|
|
1699
|
-
McTreeSelection.prototype.canDeselectLast = function (option) {
|
|
1700
|
-
return !(this.noUnselectLast && this.selectionModel.selected.length === 1 && option.selected);
|
|
1701
|
-
};
|
|
1702
|
-
McTreeSelection.prototype.isFocusReceivedFromNestedOption = function ($event) {
|
|
1703
|
-
if (!$event || !$event.relatedTarget) {
|
|
1704
|
-
return false;
|
|
1705
|
-
}
|
|
1706
|
-
return $event.relatedTarget.classList.contains('mc-tree-option');
|
|
1707
|
-
};
|
|
1708
|
-
return McTreeSelection;
|
|
1709
|
-
}(McTreeBase));
|
|
1710
|
-
/** @nocollapse */ McTreeSelection.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeSelection, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.IterableDiffers }, { token: i0__namespace.ChangeDetectorRef }, { token: 'multiple', attribute: true }, { token: i1__namespace$1.Clipboard, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1711
|
-
/** @nocollapse */ McTreeSelection.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McTreeSelection, selector: "mc-tree-selection", inputs: { treeControl: "treeControl", autoSelect: "autoSelect", noUnselectLast: "noUnselectLast", disabled: "disabled", tabIndex: "tabIndex" }, outputs: { navigationChange: "navigationChange", selectionChange: "selectionChange", onSelectAll: "onSelectAll", onCopy: "onCopy" }, host: { listeners: { "blur": "blur()", "focus": "focus($event)", "keydown": "onKeyDown($event)", "window:resize": "updateScrollSize()" }, properties: { "attr.tabindex": "tabIndex", "attr.disabled": "disabled || null" }, classAttribute: "mc-tree-selection" }, providers: [
|
|
1712
|
-
MC_SELECTION_TREE_VALUE_ACCESSOR,
|
|
1713
|
-
{ provide: MC_TREE_OPTION_PARENT_COMPONENT, useExisting: McTreeSelection },
|
|
1714
|
-
{ provide: McTreeBase, useExisting: McTreeSelection }
|
|
1715
|
-
], queries: [{ propertyName: "unorderedOptions", predicate: McTreeOption }], viewQueries: [{ propertyName: "nodeOutlet", first: true, predicate: McTreeNodeOutlet, descendants: true, static: true }], exportAs: ["mcTreeSelection"], usesInheritance: true, ngImport: i0__namespace, template: '<ng-container mcTreeNodeOutlet></ng-container>', isInline: true, styles: [".mc-tree-selection{display:block}\n"], directives: [{ type: McTreeNodeOutlet, selector: "[mcTreeNodeOutlet]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1716
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeSelection, decorators: [{
|
|
1717
|
-
type: i0.Component,
|
|
1718
|
-
args: [{
|
|
1719
|
-
selector: 'mc-tree-selection',
|
|
1720
|
-
exportAs: 'mcTreeSelection',
|
|
1721
|
-
template: '<ng-container mcTreeNodeOutlet></ng-container>',
|
|
1722
|
-
styleUrls: ['./tree-selection.scss'],
|
|
1723
|
-
host: {
|
|
1724
|
-
class: 'mc-tree-selection',
|
|
1725
|
-
'[attr.tabindex]': 'tabIndex',
|
|
1726
|
-
'[attr.disabled]': 'disabled || null',
|
|
1727
|
-
'(blur)': 'blur()',
|
|
1728
|
-
'(focus)': 'focus($event)',
|
|
1729
|
-
'(keydown)': 'onKeyDown($event)',
|
|
1730
|
-
'(window:resize)': 'updateScrollSize()'
|
|
1731
|
-
},
|
|
1732
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1733
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1734
|
-
providers: [
|
|
1735
|
-
MC_SELECTION_TREE_VALUE_ACCESSOR,
|
|
1736
|
-
{ provide: MC_TREE_OPTION_PARENT_COMPONENT, useExisting: McTreeSelection },
|
|
1737
|
-
{ provide: McTreeBase, useExisting: McTreeSelection }
|
|
1738
|
-
]
|
|
1739
|
-
}]
|
|
1740
|
-
}], ctorParameters: function () {
|
|
1741
|
-
return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.IterableDiffers }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.MultipleMode, decorators: [{
|
|
1742
|
-
type: i0.Attribute,
|
|
1743
|
-
args: ['multiple']
|
|
1744
|
-
}] }, { type: i1__namespace$1.Clipboard, decorators: [{
|
|
1745
|
-
type: i0.Optional
|
|
1746
|
-
}] }];
|
|
1747
|
-
}, propDecorators: { nodeOutlet: [{
|
|
1748
|
-
type: i0.ViewChild,
|
|
1749
|
-
args: [McTreeNodeOutlet, { static: true }]
|
|
1750
|
-
}], unorderedOptions: [{
|
|
1751
|
-
type: i0.ContentChildren,
|
|
1752
|
-
args: [McTreeOption]
|
|
1753
|
-
}], treeControl: [{
|
|
1754
|
-
type: i0.Input
|
|
1755
|
-
}], navigationChange: [{
|
|
1756
|
-
type: i0.Output
|
|
1757
|
-
}], selectionChange: [{
|
|
1758
|
-
type: i0.Output
|
|
1759
|
-
}], onSelectAll: [{
|
|
1760
|
-
type: i0.Output
|
|
1761
|
-
}], onCopy: [{
|
|
1762
|
-
type: i0.Output
|
|
1763
|
-
}], autoSelect: [{
|
|
1764
|
-
type: i0.Input
|
|
1765
|
-
}], noUnselectLast: [{
|
|
1766
|
-
type: i0.Input
|
|
1767
|
-
}], disabled: [{
|
|
1768
|
-
type: i0.Input
|
|
1769
|
-
}], tabIndex: [{
|
|
1770
|
-
type: i0.Input
|
|
1771
|
-
}] } });
|
|
1772
|
-
|
|
1773
|
-
var MC_TREE_DIRECTIVES = [
|
|
1774
|
-
McTreeNodeOutlet,
|
|
1775
|
-
McTreeNodeDef,
|
|
1776
|
-
McTreeNode,
|
|
1777
|
-
McTreeNodePadding,
|
|
1778
|
-
McTree,
|
|
1779
|
-
McTreeSelection,
|
|
1780
|
-
McTreeOption,
|
|
1781
|
-
McTreeNodeToggleComponent,
|
|
1782
|
-
McTreeNodeToggleDirective
|
|
1783
|
-
];
|
|
1784
|
-
var McTreeModule = /** @class */ (function () {
|
|
1785
|
-
function McTreeModule() {
|
|
1786
|
-
}
|
|
1787
|
-
return McTreeModule;
|
|
1788
|
-
}());
|
|
1789
|
-
/** @nocollapse */ McTreeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1790
|
-
/** @nocollapse */ McTreeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeModule, declarations: [McTreeNodeOutlet,
|
|
1791
|
-
McTreeNodeDef,
|
|
1792
|
-
McTreeNode,
|
|
1793
|
-
McTreeNodePadding,
|
|
1794
|
-
McTree,
|
|
1795
|
-
McTreeSelection,
|
|
1796
|
-
McTreeOption,
|
|
1797
|
-
McTreeNodeToggleComponent,
|
|
1798
|
-
McTreeNodeToggleDirective], imports: [i2$1.CommonModule, i1.McPseudoCheckboxModule], exports: [McTreeNodeOutlet,
|
|
1799
|
-
McTreeNodeDef,
|
|
1800
|
-
McTreeNode,
|
|
1801
|
-
McTreeNodePadding,
|
|
1802
|
-
McTree,
|
|
1803
|
-
McTreeSelection,
|
|
1804
|
-
McTreeOption,
|
|
1805
|
-
McTreeNodeToggleComponent,
|
|
1806
|
-
McTreeNodeToggleDirective] });
|
|
1807
|
-
/** @nocollapse */ McTreeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeModule, imports: [[i2$1.CommonModule, i1.McPseudoCheckboxModule]] });
|
|
1808
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: McTreeModule, decorators: [{
|
|
1809
|
-
type: i0.NgModule,
|
|
1810
|
-
args: [{
|
|
1811
|
-
imports: [i2$1.CommonModule, i1.McPseudoCheckboxModule],
|
|
1812
|
-
exports: MC_TREE_DIRECTIVES,
|
|
1813
|
-
declarations: MC_TREE_DIRECTIVES
|
|
1814
|
-
}]
|
|
1815
|
-
}] });
|
|
1816
|
-
|
|
1817
|
-
/** Base tree control. It has basic toggle/expand/collapse operations on a single data node. */
|
|
1818
|
-
/* tslint:disable-next-line:naming-convention */
|
|
1819
|
-
var BaseTreeControl = /** @class */ (function () {
|
|
1820
|
-
function BaseTreeControl() {
|
|
1821
|
-
/** A selection model with multi-selection to track expansion status. */
|
|
1822
|
-
this.expansionModel = new collections.SelectionModel(true);
|
|
1823
|
-
this.filterModel = new collections.SelectionModel(true);
|
|
1824
|
-
this.filterValue = new rxjs.BehaviorSubject('');
|
|
1825
|
-
}
|
|
1826
|
-
/** Toggles one single data node's expanded/collapsed state. */
|
|
1827
|
-
BaseTreeControl.prototype.toggle = function (dataNode) {
|
|
1828
|
-
if (this.filterValue.value) {
|
|
1829
|
-
return;
|
|
1830
|
-
}
|
|
1831
|
-
this.expansionModel.toggle(dataNode);
|
|
1832
|
-
};
|
|
1833
|
-
/** Expands one single data node. */
|
|
1834
|
-
BaseTreeControl.prototype.expand = function (dataNode) {
|
|
1835
|
-
if (this.filterValue.value) {
|
|
1836
|
-
return;
|
|
1837
|
-
}
|
|
1838
|
-
this.expansionModel.select(dataNode);
|
|
1839
|
-
};
|
|
1840
|
-
/** Collapses one single data node. */
|
|
1841
|
-
BaseTreeControl.prototype.collapse = function (dataNode) {
|
|
1842
|
-
if (this.filterValue.value) {
|
|
1843
|
-
return;
|
|
1844
|
-
}
|
|
1845
|
-
this.expansionModel.deselect(dataNode);
|
|
1846
|
-
};
|
|
1847
|
-
/** Whether a given data node is expanded or not. Returns true if the data node is expanded. */
|
|
1848
|
-
BaseTreeControl.prototype.isExpanded = function (dataNode) {
|
|
1849
|
-
return this.expansionModel.isSelected(dataNode);
|
|
1850
|
-
};
|
|
1851
|
-
/** Toggles a subtree rooted at `node` recursively. */
|
|
1852
|
-
BaseTreeControl.prototype.toggleDescendants = function (dataNode) {
|
|
1853
|
-
this.expansionModel.isSelected(dataNode)
|
|
1854
|
-
? this.collapseDescendants(dataNode)
|
|
1855
|
-
: this.expandDescendants(dataNode);
|
|
1856
|
-
};
|
|
1857
|
-
/** Collapse all dataNodes in the tree. */
|
|
1858
|
-
BaseTreeControl.prototype.collapseAll = function () {
|
|
1859
|
-
this.expansionModel.clear();
|
|
1860
|
-
};
|
|
1861
|
-
/** Expands a subtree rooted at given data node recursively. */
|
|
1862
|
-
BaseTreeControl.prototype.expandDescendants = function (dataNode) {
|
|
1863
|
-
var _a;
|
|
1864
|
-
var toBeProcessed = [dataNode];
|
|
1865
|
-
toBeProcessed.push.apply(toBeProcessed, __spreadArray([], __read(this.getDescendants(dataNode))));
|
|
1866
|
-
(_a = this.expansionModel).select.apply(_a, __spreadArray([], __read(toBeProcessed)));
|
|
1867
|
-
};
|
|
1868
|
-
/** Collapses a subtree rooted at given data node recursively. */
|
|
1869
|
-
BaseTreeControl.prototype.collapseDescendants = function (dataNode) {
|
|
1870
|
-
var _a;
|
|
1871
|
-
var toBeProcessed = [dataNode];
|
|
1872
|
-
toBeProcessed.push.apply(toBeProcessed, __spreadArray([], __read(this.getDescendants(dataNode))));
|
|
1873
|
-
(_a = this.expansionModel).deselect.apply(_a, __spreadArray([], __read(toBeProcessed)));
|
|
1874
|
-
};
|
|
1875
|
-
return BaseTreeControl;
|
|
1876
|
-
}());
|
|
1877
|
-
|
|
1878
|
-
function defaultCompareValues(firstValue, secondValue) {
|
|
1879
|
-
return firstValue === secondValue;
|
|
1880
|
-
}
|
|
1881
|
-
function defaultCompareViewValues(firstViewValue, secondViewValue) {
|
|
1882
|
-
return RegExp(secondViewValue, 'gi').test(firstViewValue);
|
|
1883
|
-
}
|
|
1884
|
-
/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */
|
|
1885
|
-
var FlatTreeControl = /** @class */ (function (_super) {
|
|
1886
|
-
__extends(FlatTreeControl, _super);
|
|
1887
|
-
/** Construct with flat tree data node functions getLevel, isExpandable, getValue and getViewValue. */
|
|
1888
|
-
function FlatTreeControl(getLevel, isExpandable,
|
|
1889
|
-
/** getValue will be used to determine if the tree contains value or not. Used in method hasValue */
|
|
1890
|
-
getValue,
|
|
1891
|
-
/** getViewValue will be used for filter nodes. Returned value will be first argument in filterNodesFunction */
|
|
1892
|
-
getViewValue,
|
|
1893
|
-
/** compareValues will be used to comparing values. */
|
|
1894
|
-
compareValues,
|
|
1895
|
-
/** compareValues will be used to comparing values. */
|
|
1896
|
-
compareViewValues) {
|
|
1897
|
-
if (compareValues === void 0) { compareValues = defaultCompareValues; }
|
|
1898
|
-
if (compareViewValues === void 0) { compareViewValues = defaultCompareViewValues; }
|
|
1899
|
-
var _this = _super.call(this) || this;
|
|
1900
|
-
_this.getLevel = getLevel;
|
|
1901
|
-
_this.isExpandable = isExpandable;
|
|
1902
|
-
_this.getValue = getValue;
|
|
1903
|
-
_this.getViewValue = getViewValue;
|
|
1904
|
-
_this.compareValues = compareValues;
|
|
1905
|
-
_this.compareViewValues = compareViewValues;
|
|
1906
|
-
return _this;
|
|
1907
|
-
}
|
|
1908
|
-
/**
|
|
1909
|
-
* Gets a list of the data node's subtree of descendent data nodes.
|
|
1910
|
-
*
|
|
1911
|
-
* To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes
|
|
1912
|
-
* with correct levels.
|
|
1913
|
-
*/
|
|
1914
|
-
FlatTreeControl.prototype.getDescendants = function (dataNode) {
|
|
1915
|
-
var startIndex = this.dataNodes.indexOf(dataNode);
|
|
1916
|
-
var results = [];
|
|
1917
|
-
// Goes through flattened tree nodes in the `dataNodes` array, and get all descendants.
|
|
1918
|
-
// The level of descendants of a tree node must be greater than the level of the given
|
|
1919
|
-
// tree node.
|
|
1920
|
-
// If we reach a node whose level is equal to the level of the tree node, we hit a sibling.
|
|
1921
|
-
// If we reach a node whose level is greater than the level of the tree node, we hit a
|
|
1922
|
-
// sibling of an ancestor.
|
|
1923
|
-
for (var i = startIndex + 1; i < this.dataNodes.length && this.getLevel(dataNode) < this.getLevel(this.dataNodes[i]); i++) {
|
|
1924
|
-
results.push(this.dataNodes[i]);
|
|
1925
|
-
}
|
|
1926
|
-
return results;
|
|
1927
|
-
};
|
|
1928
|
-
/**
|
|
1929
|
-
* Expands all data nodes in the tree.
|
|
1930
|
-
*
|
|
1931
|
-
* To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened
|
|
1932
|
-
* data nodes of the tree.
|
|
1933
|
-
*/
|
|
1934
|
-
FlatTreeControl.prototype.expandAll = function () {
|
|
1935
|
-
var _a;
|
|
1936
|
-
(_a = this.expansionModel).select.apply(_a, __spreadArray([], __read(this.dataNodes)));
|
|
1937
|
-
};
|
|
1938
|
-
FlatTreeControl.prototype.getParents = function (node, result) {
|
|
1939
|
-
if (node.parent) {
|
|
1940
|
-
result.unshift(node.parent);
|
|
1941
|
-
return this.getParents(node.parent, result);
|
|
1942
|
-
}
|
|
1943
|
-
else {
|
|
1944
|
-
return result;
|
|
1945
|
-
}
|
|
1946
|
-
};
|
|
1947
|
-
FlatTreeControl.prototype.hasValue = function (value) {
|
|
1948
|
-
var _this = this;
|
|
1949
|
-
return this.dataNodes.find(function (node) { return _this.compareValues(_this.getValue(node), value); });
|
|
1950
|
-
};
|
|
1951
|
-
FlatTreeControl.prototype.filterNodes = function (value) {
|
|
1952
|
-
var _a;
|
|
1953
|
-
var _this = this;
|
|
1954
|
-
this.saveExpansionState();
|
|
1955
|
-
this.filterModel.clear();
|
|
1956
|
-
this.expansionModel.clear();
|
|
1957
|
-
var filteredNodes = this.dataNodes
|
|
1958
|
-
.filter(function (node) { return _this.compareViewValues(_this.getViewValue(node), value); });
|
|
1959
|
-
var filteredNodesWithTheirParents = new Set();
|
|
1960
|
-
filteredNodes.forEach(function (filteredNode) {
|
|
1961
|
-
_this.getParents(filteredNode, [])
|
|
1962
|
-
.forEach(function (node) {
|
|
1963
|
-
filteredNodesWithTheirParents.add(node);
|
|
1964
|
-
_this.expandDataNode(node);
|
|
1965
|
-
});
|
|
1966
|
-
filteredNodesWithTheirParents.add(filteredNode);
|
|
1967
|
-
_this.expandDataNode(filteredNode);
|
|
1968
|
-
if (_this.isExpandable(filteredNode)) {
|
|
1969
|
-
var childNodeLevel_1 = _this.getLevel(filteredNode) + 1;
|
|
1970
|
-
_this.getDescendants(filteredNode)
|
|
1971
|
-
.filter(function (childNode) { return _this.getLevel(childNode) === childNodeLevel_1; })
|
|
1972
|
-
.filter(function (childNode) { return !_this.isExpandable(childNode) || !_this.hasFilteredDescendant(childNode, filteredNodes); })
|
|
1973
|
-
.forEach(function (childNode) {
|
|
1974
|
-
filteredNodesWithTheirParents.add(childNode);
|
|
1975
|
-
_this.expandDataNode(childNode);
|
|
1976
|
-
});
|
|
1977
|
-
}
|
|
1978
|
-
});
|
|
1979
|
-
(_a = this.filterModel).select.apply(_a, __spreadArray([], __read(Array.from(filteredNodesWithTheirParents))));
|
|
1980
|
-
this.filterValue.next(value);
|
|
1981
|
-
this.restoreExpansionState();
|
|
1982
|
-
};
|
|
1983
|
-
FlatTreeControl.prototype.expandDataNode = function (dataNode) {
|
|
1984
|
-
if (this.isExpandable(dataNode)) {
|
|
1985
|
-
this.expansionModel.select(dataNode);
|
|
1986
|
-
}
|
|
1987
|
-
};
|
|
1988
|
-
FlatTreeControl.prototype.saveExpansionState = function () {
|
|
1989
|
-
if (this.filterValue.value === '') {
|
|
1990
|
-
this.expandedItemsBeforeFiltration = this.expansionModel.selected;
|
|
1991
|
-
}
|
|
1992
|
-
};
|
|
1993
|
-
FlatTreeControl.prototype.restoreExpansionState = function () {
|
|
1994
|
-
var _a;
|
|
1995
|
-
if (this.filterValue.value === '') {
|
|
1996
|
-
this.expansionModel.clear();
|
|
1997
|
-
(_a = this.expansionModel).select.apply(_a, __spreadArray([], __read(this.expandedItemsBeforeFiltration)));
|
|
1998
|
-
}
|
|
1999
|
-
};
|
|
2000
|
-
FlatTreeControl.prototype.hasFilteredDescendant = function (dataNode, filteredNodes) {
|
|
2001
|
-
var _this = this;
|
|
2002
|
-
var filteredViewValues = filteredNodes
|
|
2003
|
-
.map(function (node) { return _this.getViewValue(node); });
|
|
2004
|
-
return this.getDescendants(dataNode)
|
|
2005
|
-
.filter(function (node) { return filteredViewValues.includes(_this.getViewValue(node)); })
|
|
2006
|
-
.length > 0;
|
|
2007
|
-
};
|
|
2008
|
-
return FlatTreeControl;
|
|
2009
|
-
}(BaseTreeControl));
|
|
2010
|
-
|
|
2011
|
-
/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */
|
|
2012
|
-
var NestedTreeControl = /** @class */ (function (_super) {
|
|
2013
|
-
__extends(NestedTreeControl, _super);
|
|
2014
|
-
/** Construct with nested tree function getChildren. */
|
|
2015
|
-
function NestedTreeControl(getChildren) {
|
|
2016
|
-
var _this = _super.call(this) || this;
|
|
2017
|
-
_this.getChildren = getChildren;
|
|
2018
|
-
return _this;
|
|
2019
|
-
}
|
|
2020
|
-
/**
|
|
2021
|
-
* Expands all dataNodes in the tree.
|
|
2022
|
-
*
|
|
2023
|
-
* To make this working, the `dataNodes` variable of the TreeControl must be set to all root level
|
|
2024
|
-
* data nodes of the tree.
|
|
2025
|
-
*/
|
|
2026
|
-
NestedTreeControl.prototype.expandAll = function () {
|
|
2027
|
-
var _a;
|
|
2028
|
-
var _this = this;
|
|
2029
|
-
this.expansionModel.clear();
|
|
2030
|
-
var allNodes = this.dataNodes.reduce(function (accumulator, dataNode) { return __spreadArray(__spreadArray(__spreadArray([], __read(accumulator)), __read(_this.getDescendants(dataNode))), [dataNode]); }, []);
|
|
2031
|
-
(_a = this.expansionModel).select.apply(_a, __spreadArray([], __read(allNodes)));
|
|
2032
|
-
};
|
|
2033
|
-
/** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */
|
|
2034
|
-
NestedTreeControl.prototype.getDescendants = function (dataNode) {
|
|
2035
|
-
var descendants = [];
|
|
2036
|
-
this._getDescendants(descendants, dataNode);
|
|
2037
|
-
return descendants.splice(1);
|
|
2038
|
-
};
|
|
2039
|
-
/** A helper function to get descendants recursively. */
|
|
2040
|
-
// todo нужно придумать другое название и понять в чем отличие между getDescendants и _getDescendants
|
|
2041
|
-
/* tslint:disable-next-line:naming-convention */
|
|
2042
|
-
NestedTreeControl.prototype._getDescendants = function (descendants, dataNode) {
|
|
2043
|
-
var _this = this;
|
|
2044
|
-
descendants.push(dataNode);
|
|
2045
|
-
this.getChildren(dataNode)
|
|
2046
|
-
.pipe(operators.take(1))
|
|
2047
|
-
.subscribe(function (children) {
|
|
2048
|
-
if (children && children.length > 0) {
|
|
2049
|
-
children.forEach(function (child) { return _this._getDescendants(descendants, child); });
|
|
2050
|
-
}
|
|
2051
|
-
});
|
|
2052
|
-
};
|
|
2053
|
-
return NestedTreeControl;
|
|
2054
|
-
}(BaseTreeControl));
|
|
2055
|
-
|
|
2056
|
-
/**
|
|
2057
|
-
* Tree flattener to convert a normal type of node to node with children & level information.
|
|
2058
|
-
* Transform nested nodes of type `T` to flattened nodes of type `F`.
|
|
2059
|
-
*
|
|
2060
|
-
* For example, the input data of type `T` is nested, and contains its children data:
|
|
2061
|
-
* SomeNode: {
|
|
2062
|
-
* key: 'Fruits',
|
|
2063
|
-
* children: [
|
|
2064
|
-
* NodeOne: {
|
|
2065
|
-
* key: 'Apple',
|
|
2066
|
-
* },
|
|
2067
|
-
* NodeTwo: {
|
|
2068
|
-
* key: 'Pear',
|
|
2069
|
-
* }
|
|
2070
|
-
* ]
|
|
2071
|
-
* }
|
|
2072
|
-
* After flattener flatten the tree, the structure will become
|
|
2073
|
-
* SomeNode: {
|
|
2074
|
-
* key: 'Fruits',
|
|
2075
|
-
* expandable: true,
|
|
2076
|
-
* level: 1
|
|
2077
|
-
* },
|
|
2078
|
-
* NodeOne: {
|
|
2079
|
-
* key: 'Apple',
|
|
2080
|
-
* expandable: false,
|
|
2081
|
-
* level: 2
|
|
2082
|
-
* },
|
|
2083
|
-
* NodeTwo: {
|
|
2084
|
-
* key: 'Pear',
|
|
2085
|
-
* expandable: false,
|
|
2086
|
-
* level: 2
|
|
2087
|
-
* }
|
|
2088
|
-
* and the output flattened type is `F` with additional information.
|
|
2089
|
-
*/
|
|
2090
|
-
var McTreeFlattener = /** @class */ (function () {
|
|
2091
|
-
function McTreeFlattener(transformFunction, getLevel, isExpandable, getChildren) {
|
|
2092
|
-
this.transformFunction = transformFunction;
|
|
2093
|
-
this.getLevel = getLevel;
|
|
2094
|
-
this.isExpandable = isExpandable;
|
|
2095
|
-
this.getChildren = getChildren;
|
|
2096
|
-
}
|
|
2097
|
-
McTreeFlattener.prototype.flattenNode = function (node, level, resultNodes, parent) {
|
|
2098
|
-
var _this = this;
|
|
2099
|
-
var flatNode = this.transformFunction(node, level, parent);
|
|
2100
|
-
resultNodes.push(flatNode);
|
|
2101
|
-
if (this.isExpandable(flatNode)) {
|
|
2102
|
-
var childrenNodes = this.getChildren(node);
|
|
2103
|
-
if (childrenNodes) {
|
|
2104
|
-
if (Array.isArray(childrenNodes)) {
|
|
2105
|
-
this.flattenChildren(childrenNodes, level, resultNodes, flatNode);
|
|
2106
|
-
}
|
|
2107
|
-
else {
|
|
2108
|
-
childrenNodes
|
|
2109
|
-
.pipe(operators.take(1))
|
|
2110
|
-
.subscribe(function (children) {
|
|
2111
|
-
_this.flattenChildren(children, level, resultNodes, flatNode);
|
|
2112
|
-
});
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
return resultNodes;
|
|
2117
|
-
};
|
|
2118
|
-
McTreeFlattener.prototype.flattenChildren = function (children, level, resultNodes, parent) {
|
|
2119
|
-
var _this = this;
|
|
2120
|
-
children.forEach(function (child) {
|
|
2121
|
-
_this.flattenNode(child, level + 1, resultNodes, parent);
|
|
2122
|
-
});
|
|
2123
|
-
};
|
|
2124
|
-
/**
|
|
2125
|
-
* Flatten a list of node type T to flattened version of node F.
|
|
2126
|
-
* Please note that type T may be nested, and the length of `structuredData` may be different
|
|
2127
|
-
* from that of returned list `F[]`.
|
|
2128
|
-
*/
|
|
2129
|
-
McTreeFlattener.prototype.flattenNodes = function (structuredData) {
|
|
2130
|
-
var _this = this;
|
|
2131
|
-
var resultNodes = [];
|
|
2132
|
-
structuredData.forEach(function (node) { return _this.flattenNode(node, 0, resultNodes, null); });
|
|
2133
|
-
return resultNodes;
|
|
2134
|
-
};
|
|
2135
|
-
/**
|
|
2136
|
-
* Expand flattened node with current expansion status.
|
|
2137
|
-
* The returned list may have different length.
|
|
2138
|
-
*/
|
|
2139
|
-
McTreeFlattener.prototype.expandFlattenedNodes = function (nodes, treeControl) {
|
|
2140
|
-
var _this = this;
|
|
2141
|
-
var results = [];
|
|
2142
|
-
var currentExpand = [];
|
|
2143
|
-
currentExpand[0] = true;
|
|
2144
|
-
nodes.forEach(function (node) {
|
|
2145
|
-
var expand = true;
|
|
2146
|
-
for (var i = 0; i <= _this.getLevel(node); i++) {
|
|
2147
|
-
expand = expand && currentExpand[i];
|
|
2148
|
-
}
|
|
2149
|
-
if (expand) {
|
|
2150
|
-
results.push(node);
|
|
2151
|
-
}
|
|
2152
|
-
if (_this.isExpandable(node)) {
|
|
2153
|
-
currentExpand[_this.getLevel(node) + 1] = treeControl.isExpanded(node);
|
|
2154
|
-
}
|
|
2155
|
-
});
|
|
2156
|
-
return results;
|
|
2157
|
-
};
|
|
2158
|
-
return McTreeFlattener;
|
|
2159
|
-
}());
|
|
2160
|
-
var McTreeDataSourceChangeTypes;
|
|
2161
|
-
(function (McTreeDataSourceChangeTypes) {
|
|
2162
|
-
McTreeDataSourceChangeTypes["Expansion"] = "expansion";
|
|
2163
|
-
McTreeDataSourceChangeTypes["Filter"] = "filter";
|
|
2164
|
-
})(McTreeDataSourceChangeTypes || (McTreeDataSourceChangeTypes = {}));
|
|
2165
|
-
/**
|
|
2166
|
-
* Data source for flat tree.
|
|
2167
|
-
* The data source need to handle expansion/collapsion of the tree node and change the data feed
|
|
2168
|
-
* to `McTree`.
|
|
2169
|
-
* The nested tree nodes of type `T` are flattened through `MсTreeFlattener`, and converted
|
|
2170
|
-
* to type `F` for `McTree` to consume.
|
|
2171
|
-
*/
|
|
2172
|
-
var McTreeFlatDataSource = /** @class */ (function (_super) {
|
|
2173
|
-
__extends(McTreeFlatDataSource, _super);
|
|
2174
|
-
function McTreeFlatDataSource(treeControl, treeFlattener, initialData) {
|
|
2175
|
-
if (initialData === void 0) { initialData = []; }
|
|
2176
|
-
var _this = _super.call(this) || this;
|
|
2177
|
-
_this.treeControl = treeControl;
|
|
2178
|
-
_this.treeFlattener = treeFlattener;
|
|
2179
|
-
_this.flattenedData = new rxjs.BehaviorSubject([]);
|
|
2180
|
-
_this.expandedData = new rxjs.BehaviorSubject([]);
|
|
2181
|
-
_this.filteredData = new rxjs.BehaviorSubject([]);
|
|
2182
|
-
_this._data = new rxjs.BehaviorSubject(initialData);
|
|
2183
|
-
return _this;
|
|
2184
|
-
}
|
|
2185
|
-
Object.defineProperty(McTreeFlatDataSource.prototype, "data", {
|
|
2186
|
-
get: function () {
|
|
2187
|
-
return this._data.value;
|
|
2188
|
-
},
|
|
2189
|
-
set: function (value) {
|
|
2190
|
-
this._data.next(value);
|
|
2191
|
-
this.flattenedData.next(this.treeFlattener.flattenNodes(this.data));
|
|
2192
|
-
this.treeControl.dataNodes = this.flattenedData.value;
|
|
2193
|
-
},
|
|
2194
|
-
enumerable: false,
|
|
2195
|
-
configurable: true
|
|
2196
|
-
});
|
|
2197
|
-
McTreeFlatDataSource.prototype.connect = function (collectionViewer) {
|
|
2198
|
-
var _this = this;
|
|
2199
|
-
return rxjs.merge(collectionViewer.viewChange, this.treeControl.expansionModel.changed
|
|
2200
|
-
.pipe(operators.map(function (value) { return ({ type: McTreeDataSourceChangeTypes.Expansion, value: value }); })), this.treeControl.filterValue
|
|
2201
|
-
.pipe(operators.map(function (value) { return ({ type: McTreeDataSourceChangeTypes.Filter, value: value }); })), this.flattenedData)
|
|
2202
|
-
.pipe(operators.map(function (changeObj) {
|
|
2203
|
-
if (changeObj.type === McTreeDataSourceChangeTypes.Filter) {
|
|
2204
|
-
if (changeObj.value && changeObj.value.length > 0) {
|
|
2205
|
-
return _this.filterHandler();
|
|
2206
|
-
}
|
|
2207
|
-
else {
|
|
2208
|
-
return _this.expansionHandler();
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
return _this.expansionHandler();
|
|
2212
|
-
}));
|
|
2213
|
-
};
|
|
2214
|
-
McTreeFlatDataSource.prototype.filterHandler = function () {
|
|
2215
|
-
this.filteredData.next(this.treeControl.filterModel.selected);
|
|
2216
|
-
return this.filteredData.value;
|
|
2217
|
-
};
|
|
2218
|
-
McTreeFlatDataSource.prototype.expansionHandler = function () {
|
|
2219
|
-
var expandedNodes = this.treeFlattener.expandFlattenedNodes(this.flattenedData.value, this.treeControl);
|
|
2220
|
-
this.expandedData.next(expandedNodes);
|
|
2221
|
-
return this.expandedData.value;
|
|
2222
|
-
};
|
|
2223
|
-
McTreeFlatDataSource.prototype.disconnect = function () {
|
|
2224
|
-
// no op
|
|
2225
|
-
};
|
|
2226
|
-
return McTreeFlatDataSource;
|
|
2227
|
-
}(collections.DataSource));
|
|
2228
|
-
|
|
2229
|
-
/**
|
|
2230
|
-
* Data source for nested tree.
|
|
2231
|
-
*
|
|
2232
|
-
* The data source for nested tree doesn't have to consider node flattener, or the way to expand
|
|
2233
|
-
* or collapse. The expansion/collapsion will be handled by TreeControl and each non-leaf node.
|
|
2234
|
-
*/
|
|
2235
|
-
var McTreeNestedDataSource = /** @class */ (function (_super) {
|
|
2236
|
-
__extends(McTreeNestedDataSource, _super);
|
|
2237
|
-
function McTreeNestedDataSource() {
|
|
2238
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
2239
|
-
/* tslint:disable-next-line:naming-convention */
|
|
2240
|
-
_this._data = new rxjs.BehaviorSubject([]);
|
|
2241
|
-
return _this;
|
|
2242
|
-
}
|
|
2243
|
-
Object.defineProperty(McTreeNestedDataSource.prototype, "data", {
|
|
2244
|
-
get: function () {
|
|
2245
|
-
return this._data.value;
|
|
2246
|
-
},
|
|
2247
|
-
set: function (value) {
|
|
2248
|
-
this._data.next(value);
|
|
2249
|
-
},
|
|
2250
|
-
enumerable: false,
|
|
2251
|
-
configurable: true
|
|
2252
|
-
});
|
|
2253
|
-
McTreeNestedDataSource.prototype.connect = function (collectionViewer) {
|
|
2254
|
-
var _this = this;
|
|
2255
|
-
return rxjs.merge.apply(void 0, [collectionViewer.viewChange, this._data]).pipe(operators.map(function () { return _this.data; }));
|
|
2256
|
-
};
|
|
2257
|
-
McTreeNestedDataSource.prototype.disconnect = function () {
|
|
2258
|
-
// no op
|
|
2259
|
-
};
|
|
2260
|
-
return McTreeNestedDataSource;
|
|
2261
|
-
}(collections.DataSource));
|
|
2262
|
-
|
|
2263
|
-
/**
|
|
2264
|
-
* Generated bundle index. Do not edit.
|
|
2265
|
-
*/
|
|
2266
|
-
|
|
2267
|
-
exports.BaseTreeControl = BaseTreeControl;
|
|
2268
|
-
exports.FlatTreeControl = FlatTreeControl;
|
|
2269
|
-
exports.MC_SELECTION_TREE_VALUE_ACCESSOR = MC_SELECTION_TREE_VALUE_ACCESSOR;
|
|
2270
|
-
exports.MC_TREE_OPTION_PARENT_COMPONENT = MC_TREE_OPTION_PARENT_COMPONENT;
|
|
2271
|
-
exports.McTree = McTree;
|
|
2272
|
-
exports.McTreeBase = McTreeBase;
|
|
2273
|
-
exports.McTreeCopyEvent = McTreeCopyEvent;
|
|
2274
|
-
exports.McTreeFlatDataSource = McTreeFlatDataSource;
|
|
2275
|
-
exports.McTreeFlattener = McTreeFlattener;
|
|
2276
|
-
exports.McTreeModule = McTreeModule;
|
|
2277
|
-
exports.McTreeNavigationChange = McTreeNavigationChange;
|
|
2278
|
-
exports.McTreeNestedDataSource = McTreeNestedDataSource;
|
|
2279
|
-
exports.McTreeNode = McTreeNode;
|
|
2280
|
-
exports.McTreeNodeDef = McTreeNodeDef;
|
|
2281
|
-
exports.McTreeNodeOutlet = McTreeNodeOutlet;
|
|
2282
|
-
exports.McTreeNodeOutletContext = McTreeNodeOutletContext;
|
|
2283
|
-
exports.McTreeNodePadding = McTreeNodePadding;
|
|
2284
|
-
exports.McTreeNodeToggleBase = McTreeNodeToggleBase;
|
|
2285
|
-
exports.McTreeNodeToggleBaseDirective = McTreeNodeToggleBaseDirective;
|
|
2286
|
-
exports.McTreeNodeToggleComponent = McTreeNodeToggleComponent;
|
|
2287
|
-
exports.McTreeNodeToggleDirective = McTreeNodeToggleDirective;
|
|
2288
|
-
exports.McTreeNodeToggleMixinBase = McTreeNodeToggleMixinBase;
|
|
2289
|
-
exports.McTreeOption = McTreeOption;
|
|
2290
|
-
exports.McTreeOptionChange = McTreeOptionChange;
|
|
2291
|
-
exports.McTreeSelectAllEvent = McTreeSelectAllEvent;
|
|
2292
|
-
exports.McTreeSelection = McTreeSelection;
|
|
2293
|
-
exports.McTreeSelectionChange = McTreeSelectionChange;
|
|
2294
|
-
exports.NestedTreeControl = NestedTreeControl;
|
|
2295
|
-
exports.defaultCompareValues = defaultCompareValues;
|
|
2296
|
-
exports.defaultCompareViewValues = defaultCompareViewValues;
|
|
2297
|
-
|
|
2298
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2299
|
-
|
|
2300
|
-
}));
|
|
2301
|
-
//# sourceMappingURL=ptsecurity-mosaic-tree.umd.js.map
|