@theseam/ui-common 0.2.10 → 0.2.14
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/assets/vendor/intl-tel-input/js/utils.js +255 -254
- package/bundles/theseam-ui-common-asset-reader.umd.js +7 -9
- package/bundles/theseam-ui-common-asset-reader.umd.js.map +1 -1
- package/bundles/theseam-ui-common-breadcrumbs.umd.js +6 -8
- package/bundles/theseam-ui-common-breadcrumbs.umd.js.map +1 -1
- package/bundles/theseam-ui-common-buttons.umd.js +5 -5
- package/bundles/theseam-ui-common-buttons.umd.js.map +1 -1
- package/bundles/theseam-ui-common-card.umd.js +6 -6
- package/bundles/theseam-ui-common-card.umd.js.map +1 -1
- package/bundles/theseam-ui-common-checkbox.umd.js +4 -4
- package/bundles/theseam-ui-common-checkbox.umd.js.map +1 -1
- package/bundles/theseam-ui-common-confirm-dialog.umd.js +4 -4
- package/bundles/theseam-ui-common-confirm-dialog.umd.js.map +1 -1
- package/bundles/theseam-ui-common-core.umd.js +4 -4
- package/bundles/theseam-ui-common-core.umd.js.map +1 -1
- package/bundles/theseam-ui-common-data-exporter.umd.js +5 -5
- package/bundles/theseam-ui-common-data-filters.umd.js +9 -6
- package/bundles/theseam-ui-common-data-filters.umd.js.map +1 -1
- package/bundles/theseam-ui-common-datatable-dynamic.umd.js +7 -7
- package/bundles/theseam-ui-common-datatable-dynamic.umd.js.map +1 -1
- package/bundles/theseam-ui-common-datatable.umd.js +1313 -378
- package/bundles/theseam-ui-common-datatable.umd.js.map +1 -1
- package/bundles/theseam-ui-common-dynamic-component-loader.umd.js +5 -7
- package/bundles/theseam-ui-common-dynamic-component-loader.umd.js.map +1 -1
- package/bundles/theseam-ui-common-dynamic.umd.js +7 -9
- package/bundles/theseam-ui-common-dynamic.umd.js.map +1 -1
- package/bundles/theseam-ui-common-footer-bar.umd.js +3 -3
- package/bundles/theseam-ui-common-form-field-error.umd.js +5 -5
- package/bundles/theseam-ui-common-form-field-error.umd.js.map +1 -1
- package/bundles/theseam-ui-common-form-field.umd.js +5 -5
- package/bundles/theseam-ui-common-form-field.umd.js.map +1 -1
- package/bundles/theseam-ui-common-framework.umd.js +27 -29
- package/bundles/theseam-ui-common-framework.umd.js.map +1 -1
- package/bundles/theseam-ui-common-graphql.umd.js +958 -8
- package/bundles/theseam-ui-common-graphql.umd.js.map +1 -1
- package/bundles/theseam-ui-common-icon.umd.js +5 -5
- package/bundles/theseam-ui-common-icon.umd.js.map +1 -1
- package/bundles/theseam-ui-common-layout.umd.js +5 -7
- package/bundles/theseam-ui-common-layout.umd.js.map +1 -1
- package/bundles/theseam-ui-common-loading.umd.js +4 -4
- package/bundles/theseam-ui-common-menu.umd.js +5 -5
- package/bundles/theseam-ui-common-menu.umd.js.map +1 -1
- package/bundles/theseam-ui-common-modal.umd.js +6 -6
- package/bundles/theseam-ui-common-modal.umd.js.map +1 -1
- package/bundles/theseam-ui-common-models.umd.js +3 -3
- package/bundles/theseam-ui-common-popover.umd.js +4 -4
- package/bundles/theseam-ui-common-progress.umd.js +5 -5
- package/bundles/theseam-ui-common-progress.umd.js.map +1 -1
- package/bundles/theseam-ui-common-scrollbar.umd.js +7 -9
- package/bundles/theseam-ui-common-scrollbar.umd.js.map +1 -1
- package/bundles/theseam-ui-common-services.umd.js +6 -8
- package/bundles/theseam-ui-common-services.umd.js.map +1 -1
- package/bundles/theseam-ui-common-shared.umd.js +4 -4
- package/bundles/theseam-ui-common-shared.umd.js.map +1 -1
- package/bundles/theseam-ui-common-storage.umd.js +5 -7
- package/bundles/theseam-ui-common-storage.umd.js.map +1 -1
- package/bundles/theseam-ui-common-story-helpers.umd.js +4 -4
- package/bundles/theseam-ui-common-story-helpers.umd.js.map +1 -1
- package/bundles/theseam-ui-common-tabbed.umd.js +5 -5
- package/bundles/theseam-ui-common-tabbed.umd.js.map +1 -1
- package/bundles/theseam-ui-common-table-cell-type.umd.js +5 -7
- package/bundles/theseam-ui-common-table-cell-type.umd.js.map +1 -1
- package/bundles/theseam-ui-common-table-cell-types.umd.js +258 -32
- package/bundles/theseam-ui-common-table-cell-types.umd.js.map +1 -1
- package/bundles/theseam-ui-common-table.umd.js +5 -5
- package/bundles/theseam-ui-common-table.umd.js.map +1 -1
- package/bundles/theseam-ui-common-tel-input.umd.js +6 -6
- package/bundles/theseam-ui-common-tel-input.umd.js.map +1 -1
- package/bundles/theseam-ui-common-testing.umd.js +568 -0
- package/bundles/theseam-ui-common-testing.umd.js.map +1 -0
- package/bundles/theseam-ui-common-tiled-select.umd.js +56 -39
- package/bundles/theseam-ui-common-tiled-select.umd.js.map +1 -1
- package/bundles/theseam-ui-common-toggle-edit.umd.js +8 -10
- package/bundles/theseam-ui-common-toggle-edit.umd.js.map +1 -1
- package/bundles/theseam-ui-common-toggle-group.umd.js +4 -4
- package/bundles/theseam-ui-common-toggle-group.umd.js.map +1 -1
- package/bundles/theseam-ui-common-unsaved-changes-dialog.umd.js +5 -7
- package/bundles/theseam-ui-common-unsaved-changes-dialog.umd.js.map +1 -1
- package/bundles/theseam-ui-common-utils.umd.js +174 -81
- package/bundles/theseam-ui-common-utils.umd.js.map +1 -1
- package/bundles/theseam-ui-common-validators.umd.js +3 -3
- package/bundles/theseam-ui-common-viewers.umd.js +6 -8
- package/bundles/theseam-ui-common-viewers.umd.js.map +1 -1
- package/bundles/theseam-ui-common-widget.umd.js +18 -20
- package/bundles/theseam-ui-common-widget.umd.js.map +1 -1
- package/bundles/theseam-ui-common.umd.js +2 -2
- package/buttons/theseam-ui-common-buttons.metadata.json +1 -1
- package/card/theseam-ui-common-card.metadata.json +1 -1
- package/data-filters/data-filter.d.ts +10 -6
- package/data-filters/theseam-ui-common-data-filters.metadata.json +1 -1
- package/datatable/datatable/datatable.component.d.ts +46 -32
- package/datatable/datatable-column/datatable-column.component.d.ts +26 -25
- package/datatable/datatable-column-preferences/datatable-column-preferences.component.d.ts +7 -5
- package/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.d.ts +7 -1
- package/datatable/datatable-menu-bar/datatable-menu-bar.component.d.ts +1 -1
- package/datatable/directives/datatable-filter.directive.d.ts +1 -1
- package/datatable/models/columns-alteration.d.ts +61 -0
- package/datatable/models/columns-alterations/hide-column.columns-alteration.d.ts +15 -0
- package/datatable/models/columns-alterations/order.columns-alteration.d.ts +20 -0
- package/datatable/models/columns-alterations/sort.columns-alteration.d.ts +14 -0
- package/datatable/models/columns-alterations/width.columns-alteration.d.ts +16 -0
- package/datatable/models/datatable-accessor.d.ts +5 -3
- package/datatable/models/internal-column-props.d.ts +7 -0
- package/datatable/models/page-info.d.ts +12 -0
- package/datatable/models/preferences-accessor.d.ts +1 -1
- package/datatable/models/preferences.d.ts +11 -3
- package/datatable/models/sort-item.d.ts +2 -1
- package/datatable/services/columns-alterations-manager.service.d.ts +39 -0
- package/datatable/services/columns-manager.service.d.ts +55 -0
- package/datatable/services/datatable-preferences.service.d.ts +10 -7
- package/datatable/theseam-ui-common-datatable.d.ts +2 -0
- package/datatable/theseam-ui-common-datatable.metadata.json +1 -1
- package/datatable/tokens/datatable-preferences-accessor.d.ts +2 -2
- package/datatable/utils/create-action-menu-column.d.ts +3 -0
- package/datatable/utils/create-checkbox-column.d.ts +3 -0
- package/datatable/utils/get-column-prop.d.ts +5 -0
- package/datatable/utils/map-columns-alterations-states.d.ts +2 -0
- package/datatable/utils/remove-unused-diffs.d.ts +7 -0
- package/datatable/utils/set-column-defaults.d.ts +2 -0
- package/datatable/utils/translate-templates.d.ts +2 -0
- package/datatable/utils/with-stored-column-info.d.ts +2 -2
- package/datatable-dynamic/theseam-ui-common-datatable-dynamic.metadata.json +1 -1
- package/esm2015/buttons/progress-circle-button/progress-circle-button.component.js +1 -1
- package/esm2015/card/card-action/card-action.component.js +1 -1
- package/esm2015/card/card-body/card-body.component.js +1 -1
- package/esm2015/data-filters/data-filter.js +5 -2
- package/esm2015/data-filters/filters/data-filter-search/data-filter-search.component.js +1 -1
- package/esm2015/data-filters/filters/data-filter-text/data-filter-text.component.js +1 -1
- package/esm2015/datatable/datatable/datatable.component.js +195 -211
- package/esm2015/datatable/datatable-action-menu/datatable-action-menu.component.js +1 -1
- package/esm2015/datatable/datatable-column/datatable-column.component.js +1 -1
- package/esm2015/datatable/datatable-column-preferences/datatable-column-preferences.component.js +42 -19
- package/esm2015/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.js +38 -4
- package/esm2015/datatable/datatable-export-button/datatable-export-button.component.js +7 -6
- package/esm2015/datatable/datatable-menu-bar/datatable-menu-bar.component.js +1 -1
- package/esm2015/datatable/datatable-menu-bar-column-center/datatable-menu-bar-column-center.component.js +1 -1
- package/esm2015/datatable/datatable-menu-bar-column-left/datatable-menu-bar-column-left.component.js +1 -1
- package/esm2015/datatable/datatable-menu-bar-column-right/datatable-menu-bar-column-right.component.js +1 -1
- package/esm2015/datatable/datatable-menu-bar-row/datatable-menu-bar-row.component.js +1 -1
- package/esm2015/datatable/models/columns-alteration.js +38 -0
- package/esm2015/datatable/models/columns-alterations/hide-column.columns-alteration.js +38 -0
- package/esm2015/datatable/models/columns-alterations/order.columns-alteration.js +81 -0
- package/esm2015/datatable/models/columns-alterations/sort.columns-alteration.js +33 -0
- package/esm2015/datatable/models/columns-alterations/width.columns-alteration.js +41 -0
- package/esm2015/datatable/models/datatable-accessor.js +1 -1
- package/esm2015/datatable/models/internal-column-props.js +15 -0
- package/esm2015/datatable/models/page-info.js +1 -1
- package/esm2015/datatable/models/preferences-accessor.js +1 -1
- package/esm2015/datatable/models/preferences.js +6 -2
- package/esm2015/datatable/models/sort-item.js +1 -1
- package/esm2015/datatable/services/columns-alterations-manager.service.js +134 -0
- package/esm2015/datatable/services/columns-manager.service.js +257 -0
- package/esm2015/datatable/services/datatable-preferences.service.js +78 -32
- package/esm2015/datatable/theseam-ui-common-datatable.js +3 -1
- package/esm2015/datatable/tokens/datatable-preferences-accessor.js +2 -2
- package/esm2015/datatable/utils/create-action-menu-column.js +18 -0
- package/esm2015/datatable/utils/create-checkbox-column.js +15 -0
- package/esm2015/datatable/utils/get-column-prop.js +9 -0
- package/esm2015/datatable/utils/map-columns-alterations-states.js +39 -0
- package/esm2015/datatable/utils/remove-unused-diffs.js +9 -0
- package/esm2015/datatable/utils/set-column-defaults.js +10 -0
- package/esm2015/datatable/utils/translate-templates.js +12 -0
- package/esm2015/datatable/utils/with-stored-column-info.js +1 -1
- package/esm2015/datatable-dynamic/datatable-dynamic-action-menu/datatable-dynamic-action-menu.component.js +1 -1
- package/esm2015/datatable-dynamic/datatable-dynamic-filter-container/datatable-dynamic-filter-container.component.js +1 -1
- package/esm2015/datatable-dynamic/datatable-dynamic.component.js +1 -1
- package/esm2015/form-field/form-field.component.js +1 -1
- package/esm2015/form-field-error/form-field-error/form-field-error.component.js +1 -1
- package/esm2015/framework/base-layout/base-layout.component.js +1 -1
- package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widgets.component.js +1 -1
- package/esm2015/framework/dynamic-router/hierarchy-router-outlet/hierarchy-router-outlet.component.js +1 -1
- package/esm2015/framework/schema-form-controls/schema-form-input/schema-form-input.component.js +1 -1
- package/esm2015/framework/schema-form-controls/schema-form-number/schema-form-number.component.js +1 -1
- package/esm2015/framework/schema-form-controls/schema-form-select/schema-form-select.component.js +1 -1
- package/esm2015/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.js +1 -1
- package/esm2015/framework/side-nav/side-nav-item/side-nav-item.component.js +1 -1
- package/esm2015/framework/side-nav/side-nav-toggle/side-nav-toggle.component.js +1 -1
- package/esm2015/framework/side-nav/side-nav.component.js +1 -1
- package/esm2015/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.js +1 -1
- package/esm2015/framework/top-bar/top-bar-title/top-bar-title.component.js +1 -1
- package/esm2015/framework/top-bar/top-bar.component.js +1 -1
- package/esm2015/graphql/datatable/create-page-info-observable.js +38 -0
- package/esm2015/graphql/datatable/datatable-graphql-query-ref.js +236 -0
- package/esm2015/graphql/datatable/datatable-graphql.service.js +35 -0
- package/esm2015/graphql/datatable/datatable-helpers.js +170 -0
- package/esm2015/graphql/datatable/get-page-info.js +11 -0
- package/esm2015/graphql/datatable/index.js +7 -0
- package/esm2015/graphql/datatable/map-filter-states.js +64 -0
- package/esm2015/graphql/datatable/map-page-info.js +14 -0
- package/esm2015/graphql/datatable/mapper-context.js +2 -0
- package/esm2015/graphql/models/gql-datatable-accessor.js +2 -0
- package/esm2015/graphql/models/index.js +2 -1
- package/esm2015/graphql/models/query-processing-config.js +1 -1
- package/esm2015/graphql/public-api.js +2 -1
- package/esm2015/graphql/utils/parse-hints.js +3 -3
- package/esm2015/icon/icon/icon.component.js +1 -1
- package/esm2015/loading/loading/loading.component.js +1 -1
- package/esm2015/menu/menu.component.js +1 -1
- package/esm2015/modal/modal-body/modal-body.component.js +1 -1
- package/esm2015/modal/modal-container/modal-container.component.js +1 -1
- package/esm2015/popover/popover/popover.component.js +1 -1
- package/esm2015/progress/progress-circle/progress-circle.component.js +1 -1
- package/esm2015/tabbed/tabbed.component.js +1 -1
- package/esm2015/table/table/table.component.js +1 -1
- package/esm2015/table-cell-types/public-api.js +8 -1
- package/esm2015/table-cell-types/table-cell-type-currency/table-cell-type-currency-config.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-currency/table-cell-type-currency.component.js +74 -0
- package/esm2015/table-cell-types/table-cell-type-currency/table-cell-type-currency.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-decimal/table-cell-type-decimal-config.js +1 -1
- package/esm2015/table-cell-types/table-cell-type-decimal/table-cell-type-decimal.component.js +73 -0
- package/esm2015/table-cell-types/table-cell-type-decimal/table-cell-type-decimal.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-icon/table-cell-type-icon.component.js +1 -1
- package/esm2015/table-cell-types/table-cell-type-integer/table-cell-type-integer-config.js +1 -1
- package/esm2015/table-cell-types/table-cell-type-integer/table-cell-type-integer.component.js +71 -0
- package/esm2015/table-cell-types/table-cell-type-integer/table-cell-type-integer.js +2 -0
- package/esm2015/table-cell-types/table-cell-type-manifests.js +29 -17
- package/esm2015/table-cell-types/table-cell-type-progress-circle/table-cell-type-progress-circle.component.js +1 -1
- package/esm2015/table-cell-types/table-cell-types.module.js +9 -2
- package/esm2015/tel-input/tel-input/tel-input.component.js +1 -1
- package/esm2015/testing/current-tick-time.js +16 -0
- package/esm2015/testing/fake-toastr.js +29 -0
- package/esm2015/testing/get-harness.js +16 -0
- package/esm2015/testing/public-api.js +7 -0
- package/esm2015/testing/render-story.js +12 -0
- package/esm2015/testing/story-expect.js +39 -0
- package/esm2015/testing/theseam-ui-common-testing.js +5 -0
- package/esm2015/testing/tick-helper.js +74 -0
- package/esm2015/tiled-select/components/tiled-select/tiled-select.component.js +25 -17
- package/esm2015/tiled-select/components/tiled-select-tile/tiled-select-tile.component.js +5 -2
- package/esm2015/tiled-select/components/tiled-select-tile-icon/tiled-select-tile-icon.component.js +1 -1
- package/esm2015/tiled-select/public-api.js +2 -1
- package/esm2015/tiled-select/tiled-select.models.js +1 -1
- package/esm2015/tiled-select/tiled-select.module.js +4 -4
- package/esm2015/toggle-edit/toggle-edit-actions-container/toggle-edit-actions-container.component.js +1 -1
- package/esm2015/toggle-edit/toggle-edit.component.js +1 -1
- package/esm2015/utils/array-move.js +62 -0
- package/esm2015/utils/public-api.js +2 -1
- package/esm2015/utils/router/is-empty-url-route.js +1 -1
- package/esm2015/utils/subscriber-count.js +31 -4
- package/esm2015/widget/widget/widget.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-button-group/widget-button-group.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-content-header/widget-content-header.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-empty-label/widget-empty-label.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-footer-link/widget-footer-link.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-footer-text/widget-footer-text.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-header-badge/widget-header-badge.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile-footer-item/widget-tile-footer-item.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile-group/widget-tile-group.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-tile/widget-tile.component.js +1 -1
- package/esm2015/widget/widget-content-components/widget-tile-list/widget-tile-list.component.js +1 -1
- package/esm2015/widget/widget-footer/widget-footer.component.js +1 -1
- package/fesm2015/theseam-ui-common-buttons.js +1 -1
- package/fesm2015/theseam-ui-common-card.js +2 -2
- package/fesm2015/theseam-ui-common-data-filters.js +6 -3
- package/fesm2015/theseam-ui-common-data-filters.js.map +1 -1
- package/fesm2015/theseam-ui-common-datatable-dynamic.js +3 -3
- package/fesm2015/theseam-ui-common-datatable.js +1105 -319
- package/fesm2015/theseam-ui-common-datatable.js.map +1 -1
- package/fesm2015/theseam-ui-common-form-field-error.js +1 -1
- package/fesm2015/theseam-ui-common-form-field.js +1 -1
- package/fesm2015/theseam-ui-common-framework.js +13 -13
- package/fesm2015/theseam-ui-common-graphql.js +555 -5
- package/fesm2015/theseam-ui-common-graphql.js.map +1 -1
- package/fesm2015/theseam-ui-common-icon.js +1 -1
- package/fesm2015/theseam-ui-common-loading.js +1 -1
- package/fesm2015/theseam-ui-common-menu.js +1 -1
- package/fesm2015/theseam-ui-common-modal.js +2 -2
- package/fesm2015/theseam-ui-common-popover.js +1 -1
- package/fesm2015/theseam-ui-common-progress.js +1 -1
- package/fesm2015/theseam-ui-common-tabbed.js +1 -1
- package/fesm2015/theseam-ui-common-table-cell-types.js +234 -22
- package/fesm2015/theseam-ui-common-table-cell-types.js.map +1 -1
- package/fesm2015/theseam-ui-common-table.js +1 -1
- package/fesm2015/theseam-ui-common-tel-input.js +1 -1
- package/fesm2015/theseam-ui-common-testing.js +191 -0
- package/fesm2015/theseam-ui-common-testing.js.map +1 -0
- package/fesm2015/theseam-ui-common-tiled-select.js +34 -21
- package/fesm2015/theseam-ui-common-tiled-select.js.map +1 -1
- package/fesm2015/theseam-ui-common-toggle-edit.js +2 -2
- package/fesm2015/theseam-ui-common-utils.js +92 -4
- package/fesm2015/theseam-ui-common-utils.js.map +1 -1
- package/fesm2015/theseam-ui-common-widget.js +12 -12
- package/form-field/theseam-ui-common-form-field.metadata.json +1 -1
- package/form-field-error/theseam-ui-common-form-field-error.metadata.json +1 -1
- package/framework/theseam-ui-common-framework.metadata.json +1 -1
- package/graphql/datatable/create-page-info-observable.d.ts +4 -0
- package/graphql/datatable/datatable-graphql-query-ref.d.ts +65 -0
- package/graphql/datatable/datatable-graphql.service.d.ts +26 -0
- package/graphql/datatable/datatable-helpers.d.ts +12 -0
- package/graphql/datatable/get-page-info.d.ts +4 -0
- package/graphql/datatable/index.d.ts +6 -0
- package/graphql/datatable/map-filter-states.d.ts +18 -0
- package/graphql/datatable/map-page-info.d.ts +11 -0
- package/graphql/datatable/mapper-context.d.ts +6 -0
- package/graphql/models/gql-datatable-accessor.d.ts +9 -0
- package/graphql/models/index.d.ts +1 -0
- package/graphql/models/query-processing-config.d.ts +4 -0
- package/graphql/public-api.d.ts +1 -0
- package/graphql/theseam-ui-common-graphql.metadata.json +1 -1
- package/icon/theseam-ui-common-icon.metadata.json +1 -1
- package/loading/theseam-ui-common-loading.metadata.json +1 -1
- package/menu/theseam-ui-common-menu.metadata.json +1 -1
- package/modal/theseam-ui-common-modal.metadata.json +1 -1
- package/package.json +1 -1
- package/popover/theseam-ui-common-popover.metadata.json +1 -1
- package/progress/theseam-ui-common-progress.metadata.json +1 -1
- package/styles/vendor/ngx-datatable/_ngx-datatable.scss +87 -82
- package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +3 -2
- package/tabbed/theseam-ui-common-tabbed.metadata.json +1 -1
- package/table/theseam-ui-common-table.metadata.json +1 -1
- package/table-cell-types/public-api.d.ts +7 -0
- package/table-cell-types/table-cell-type-currency/table-cell-type-currency-config.d.ts +39 -0
- package/table-cell-types/table-cell-type-currency/table-cell-type-currency.component.d.ts +19 -0
- package/table-cell-types/table-cell-type-currency/table-cell-type-currency.d.ts +3 -0
- package/table-cell-types/table-cell-type-decimal/table-cell-type-decimal-config.d.ts +31 -1
- package/table-cell-types/table-cell-type-decimal/table-cell-type-decimal.component.d.ts +19 -0
- package/table-cell-types/table-cell-type-decimal/table-cell-type-decimal.d.ts +3 -0
- package/table-cell-types/table-cell-type-integer/table-cell-type-integer-config.d.ts +23 -1
- package/table-cell-types/table-cell-type-integer/table-cell-type-integer.component.d.ts +19 -0
- package/table-cell-types/table-cell-type-integer/table-cell-type-integer.d.ts +3 -0
- package/table-cell-types/table-cell-type-manifests.d.ts +2 -1
- package/table-cell-types/theseam-ui-common-table-cell-types.metadata.json +1 -1
- package/tel-input/theseam-ui-common-tel-input.metadata.json +1 -1
- package/testing/current-tick-time.d.ts +13 -0
- package/testing/fake-toastr.d.ts +30 -0
- package/testing/get-harness.d.ts +7 -0
- package/testing/package.json +11 -0
- package/testing/public-api.d.ts +6 -0
- package/testing/render-story.d.ts +2 -0
- package/testing/story-expect.d.ts +5 -0
- package/{test-helpers/theseam-ui-common-test-helpers.d.ts → testing/theseam-ui-common-testing.d.ts} +0 -0
- package/testing/theseam-ui-common-testing.metadata.json +1 -0
- package/{test-helpers → testing}/tick-helper.d.ts +0 -0
- package/tiled-select/components/tiled-select/tiled-select.component.d.ts +7 -3
- package/tiled-select/components/tiled-select-tile/tiled-select-tile.component.d.ts +1 -0
- package/tiled-select/theseam-ui-common-tiled-select.metadata.json +1 -1
- package/tiled-select/tiled-select.models.d.ts +3 -1
- package/toggle-edit/theseam-ui-common-toggle-edit.metadata.json +1 -1
- package/utils/array-move.d.ts +49 -0
- package/utils/public-api.d.ts +1 -0
- package/utils/subscriber-count.d.ts +13 -1
- package/utils/theseam-ui-common-utils.metadata.json +1 -1
- package/widget/theseam-ui-common-widget.metadata.json +1 -1
- package/bundles/theseam-ui-common-test-helpers.umd.js +0 -94
- package/bundles/theseam-ui-common-test-helpers.umd.js.map +0 -1
- package/esm2015/test-helpers/public-api.js +0 -2
- package/esm2015/test-helpers/theseam-ui-common-test-helpers.js +0 -5
- package/esm2015/test-helpers/tick-helper.js +0 -74
- package/fesm2015/theseam-ui-common-test-helpers.js +0 -81
- package/fesm2015/theseam-ui-common-test-helpers.js.map +0 -1
- package/test-helpers/package.json +0 -11
- package/test-helpers/public-api.d.ts +0 -1
- package/test-helpers/theseam-ui-common-test-helpers.metadata.json +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Based on source: https://github.com/sindresorhus/array-move/blob/main/index.js
|
|
2
|
+
/**
|
|
3
|
+
Moves the item to the new position in the input array. Useful for huge arrays
|
|
4
|
+
where absolute performance is needed.
|
|
5
|
+
|
|
6
|
+
@param array - The array to modify.
|
|
7
|
+
@param fromIndex - The index of item to move. If negative, it will begin that
|
|
8
|
+
many elements from the end.
|
|
9
|
+
@param toIndex - The index of where to move the item. If negative, it will
|
|
10
|
+
begin that many elements from the end.
|
|
11
|
+
@example
|
|
12
|
+
```
|
|
13
|
+
import { arrayMoveMutable } from '@theseam/ui-common/utils';
|
|
14
|
+
|
|
15
|
+
const input = ['a', 'b', 'c'];
|
|
16
|
+
arrayMoveMutable(input, 1, 2);
|
|
17
|
+
console.log(input);
|
|
18
|
+
//=> ['a', 'c', 'b']
|
|
19
|
+
```
|
|
20
|
+
*/
|
|
21
|
+
export function arrayMoveMutable(array, fromIndex, toIndex) {
|
|
22
|
+
const startIndex = fromIndex < 0 ? array.length + fromIndex : fromIndex;
|
|
23
|
+
if (startIndex >= 0 && startIndex < array.length) {
|
|
24
|
+
const endIndex = toIndex < 0 ? array.length + toIndex : toIndex;
|
|
25
|
+
const [item] = array.splice(fromIndex, 1);
|
|
26
|
+
array.splice(endIndex, 0, item);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
Clones the given `array`, moves the item to a new position in the new array,
|
|
31
|
+
and then returns the new array. The given `array` is not mutated.
|
|
32
|
+
|
|
33
|
+
@param array - The array with the item to move.
|
|
34
|
+
@param fromIndex - The index of item to move. If negative, it will begin that
|
|
35
|
+
many elements from the end.
|
|
36
|
+
@param toIndex - The index of where to move the item. If negative, it will
|
|
37
|
+
begin that many elements from the end.
|
|
38
|
+
@returns A new array with the item moved to the new position.
|
|
39
|
+
@example
|
|
40
|
+
```
|
|
41
|
+
import { arrayMoveImmutable } from '@theseam/ui-common/utils';
|
|
42
|
+
|
|
43
|
+
const input = ['a', 'b', 'c'];
|
|
44
|
+
const array1 = arrayMoveImmutable(input, 1, 2);
|
|
45
|
+
console.log(array1);
|
|
46
|
+
//=> ['a', 'c', 'b']
|
|
47
|
+
|
|
48
|
+
const array2 = arrayMoveImmutable(input, -1, 0);
|
|
49
|
+
console.log(array2);
|
|
50
|
+
//=> ['c', 'a', 'b']
|
|
51
|
+
|
|
52
|
+
const array3 = arrayMoveImmutable(input, -2, -3);
|
|
53
|
+
console.log(array3);
|
|
54
|
+
//=> ['b', 'a', 'c']
|
|
55
|
+
```
|
|
56
|
+
*/
|
|
57
|
+
export function arrayMoveImmutable(array, fromIndex, toIndex) {
|
|
58
|
+
const newArray = [...array];
|
|
59
|
+
arrayMoveMutable(newArray, fromIndex, toIndex);
|
|
60
|
+
return newArray;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJyYXktbW92ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3VpLWNvbW1vbi91dGlscy9hcnJheS1tb3ZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGlGQUFpRjtBQUVqRjs7Ozs7Ozs7Ozs7Ozs7Ozs7O0VBa0JFO0FBQ0YsTUFBTSxVQUFVLGdCQUFnQixDQUM5QixLQUFnQixFQUNoQixTQUFpQixFQUNqQixPQUFlO0lBRWhCLE1BQU0sVUFBVSxHQUFHLFNBQVMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEt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Y29tbW9uL3V0aWxzJztcclxuXHJcbiAgY29uc3QgaW5wdXQgPSBbJ2EnLCAnYicsICdjJ107XHJcbiAgY29uc3QgYXJyYXkxID0gYXJyYXlNb3ZlSW1tdXRhYmxlKGlucHV0LCAxLCAyKTtcclxuICBjb25zb2xlLmxvZyhhcnJheTEpO1xyXG4gIC8vPT4gWydhJywgJ2MnLCAnYiddXHJcblxyXG4gIGNvbnN0IGFycmF5MiA9IGFycmF5TW92ZUltbXV0YWJsZShpbnB1dCwgLTEsIDApO1xyXG4gIGNvbnNvbGUubG9nKGFycmF5Mik7XHJcbiAgLy89PiBbJ2MnLCAnYScsICdiJ11cclxuXHJcbiAgY29uc3QgYXJyYXkzID0gYXJyYXlNb3ZlSW1tdXRhYmxlKGlucHV0LCAtMiwgLTMpO1xyXG4gIGNvbnNvbGUubG9nKGFycmF5Myk7XHJcbiAgLy89PiBbJ2InLCAnYScsICdjJ11cclxuICBgYGBcclxuKi9cclxuZXhwb3J0IGZ1bmN0aW9uIGFycmF5TW92ZUltbXV0YWJsZTxWYWx1ZVR5cGU+KFxyXG4gIGFycmF5OiByZWFkb25seSBWYWx1ZVR5cGVbXSxcclxuICBmcm9tSW5kZXg6IG51bWJlcixcclxuICB0b0luZGV4OiBudW1iZXJcclxuKTogVmFsdWVUeXBlW10ge1xyXG5cdGNvbnN0IG5ld0FycmF5ID0gWyAuLi5hcnJheSBdXHJcblx0YXJyYXlNb3ZlTXV0YWJsZShuZXdBcnJheSwgZnJvbUluZGV4LCB0b0luZGV4KVxyXG5cdHJldHVybiBuZXdBcnJheVxyXG59XHJcbiJdfQ==
|
|
@@ -11,6 +11,7 @@ export * from './form/has-required-control';
|
|
|
11
11
|
export * from './form/is-empty-input-value';
|
|
12
12
|
export * from './operators/index';
|
|
13
13
|
export * from './router/index';
|
|
14
|
+
export * from './array-move';
|
|
14
15
|
export * from './calc-percentage';
|
|
15
16
|
export * from './toggle-attribute';
|
|
16
17
|
export * from './get-attribute';
|
|
@@ -35,4 +36,4 @@ export * from './pad-start';
|
|
|
35
36
|
export * from './create-padding';
|
|
36
37
|
export * from './is-numeric';
|
|
37
38
|
export * from './fractional-digits-count';
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3VpLWNvbW1vbi91dGlscy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsbUNBQW1DLENBQUE7QUFFakQsY0FBYyx5QkFBeUIsQ0FBQTtBQUN2QyxjQUFjLHlCQUF5QixDQUFBO0FBQ3ZDLGNBQWMscUNBQXFDLENBQUE7QUFDbkQsY0FBYywrQkFBK0IsQ0FBQTtBQUM3QyxjQUFjLDhCQUE4QixDQUFBO0FBQzVDLGNBQWMscUNBQXFDLENBQUE7QUFDbkQsY0FBYyw4QkFBOEIsQ0FBQTtBQUM1QyxjQUFjLG1DQUFtQyxDQUFBO0FBQ2pELGNBQWMsNkJBQTZCLENBQUE7QUFDM0MsY0FBYyw2QkFBNkIsQ0FBQTtBQUUzQyxjQUFjLG1CQUFtQixDQUFBO0FBRWpDLGNBQWMsZ0JBQWdCLENBQUE7QUFFOUIsY0FBYyxjQUFjLENBQUE7QUFDNUIsY0FBYyxtQkFBbUIsQ0FBQTtBQUNqQyxjQUFjLG9CQUFvQixDQUFBO0FBQ2xDLGNBQWMsaUJBQWlCLENBQUE7QUFDL0IsY0FBYyxlQUFlLENBQUE7QUFDN0IsY0FBYyx3QkFBd0IsQ0FBQTtBQUN0QyxjQUFjLGNBQWMsQ0FBQTtBQUM1QixjQUFjLG9CQUFvQixDQUFBO0FBQ2xDLGNBQWMsYUFBYSxDQUFBO0FBQzNCLGNBQWMsY0FBYyxDQUFBO0FBQzVCLGNBQ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vcnQgKiBmcm9tICcuL29ic2VydmUtcXVlcnktbGlzdCdcbmV4cG9ydCAqIGZyb20gJy4vcGFkLWVuZCdcbmV4cG9ydCAqIGZyb20gJy4vcGFkLXN0YXJ0J1xuZXhwb3J0ICogZnJvbSAnLi9jcmVhdGUtcGFkZGluZydcbmV4cG9ydCAqIGZyb20gJy4vaXMtbnVtZXJpYydcbmV4cG9ydCAqIGZyb20gJy4vZnJhY3Rpb25hbC1kaWdpdHMtY291bnQnXG4iXX0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export function isEmptyUrlRoute(activatedRoute) {
|
|
2
2
|
return activatedRoute.snapshot.url.length === 0;
|
|
3
3
|
}
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtZW1wdHktdXJsLXJvdXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdWktY29tbW9uL3V0aWxzL3JvdXRlci9pcy1lbXB0eS11cmwtcm91dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsTUFBTSxVQUFVLGVBQWUsQ0FBQyxjQUE4QjtJQUM1RCxPQUFPLGNBQWMsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLE1BQU0sS0FBSyxDQUFDLENBQUE7QUFDakQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFjdGl2YXRlZFJvdXRlIH0gZnJvbSAnQGFuZ3VsYXIvcm91dGVyJ1xyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIGlzRW1wdHlVcmxSb3V0ZShhY3RpdmF0ZWRSb3V0ZTogQWN0aXZhdGVkUm91dGUpOiBib29sZWFuIHtcclxuICByZXR1cm4gYWN0aXZhdGVkUm91dGUuc25hcHNob3QudXJsLmxlbmd0aCA9PT0gMFxyXG59XHJcbiJdfQ==
|
|
@@ -2,18 +2,45 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
/**
|
|
3
3
|
* This is just for helping debug observables that aren't being unsubscribed
|
|
4
4
|
* from correctly.
|
|
5
|
+
*
|
|
6
|
+
* If description is 'foo' then you can check the how many observers are
|
|
7
|
+
* subscribed with the expression `__subscriberCounts['foo']`. In a debugger you
|
|
8
|
+
* can add the expression to the "Watch" expressions or in Chrome Devtools
|
|
9
|
+
* Console you can add it to the live expressions(Add live expressions by
|
|
10
|
+
* clicking the eye the the left of the Console filter input).
|
|
5
11
|
*/
|
|
6
|
-
function subscriberCount(sourceObservable, description) {
|
|
12
|
+
export function subscriberCount(sourceObservable, description, countChangedFn = logOnChange) {
|
|
7
13
|
let counter = 0;
|
|
8
14
|
return new Observable((subscriber) => {
|
|
9
15
|
const subscription = sourceObservable.subscribe(subscriber);
|
|
10
16
|
counter++;
|
|
11
|
-
|
|
17
|
+
if (countChangedFn !== undefined && countChangedFn !== null) {
|
|
18
|
+
countChangedFn(description, counter, 'subscribed');
|
|
19
|
+
}
|
|
20
|
+
setGlobalSubscriberCount(description, counter);
|
|
12
21
|
return () => {
|
|
13
22
|
subscription.unsubscribe();
|
|
14
23
|
counter--;
|
|
15
|
-
|
|
24
|
+
if (countChangedFn !== undefined && countChangedFn !== null) {
|
|
25
|
+
countChangedFn(description, counter, 'unsubscribed');
|
|
26
|
+
}
|
|
27
|
+
setGlobalSubscriberCount(description, counter);
|
|
16
28
|
};
|
|
17
29
|
});
|
|
18
30
|
}
|
|
19
|
-
|
|
31
|
+
const logOnChange = (description, count, reason) => {
|
|
32
|
+
console.log(`${description} subscriptions: ${count} [${reason}]`);
|
|
33
|
+
};
|
|
34
|
+
const ɵ0 = logOnChange;
|
|
35
|
+
function getGlobalSubscriberCounts() {
|
|
36
|
+
const w = window;
|
|
37
|
+
if (w.__subscriberCounts === undefined || w.__subscriberCounts === null) {
|
|
38
|
+
w.__subscriberCounts = {};
|
|
39
|
+
}
|
|
40
|
+
return w.__subscriberCounts;
|
|
41
|
+
}
|
|
42
|
+
function setGlobalSubscriberCount(description, count) {
|
|
43
|
+
getGlobalSubscriberCounts()[description] = count;
|
|
44
|
+
}
|
|
45
|
+
export { ɵ0 };
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vic2NyaWJlci1jb3VudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3VpLWNvbW1vbi91dGlscy9zdWJzY3JpYmVyLWNvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQWMsTUFBTSxNQUFNLENBQUE7QUFJN0M7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLGVBQWUsQ0FDN0IsZ0JBQStCLEVBQy9CLFdBQW1CLEVBQ25CLGlCQUE4RCxXQUFXO0lBRXpFLElBQUksT0FBTyxHQUFHLENBQUMsQ0FBQTtJQUNmLE9BQU8sSUFBSSxVQUFVLENBQUMsQ0FBQyxVQUF5QixFQUFFLEVBQUU7UUFDbEQsTUFBTSxZQUFZLEdBQUcsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLFVBQVUsQ0FBQyxDQUFBO1FBQzNELE9BQU8sRUFBRSxDQUFBO1FBQ1QsSUFBSSxjQUFjLEtBQUssU0FBUyxJQUFJLGNBQWMsS0FBSyxJQUFJLEVBQUU7WUFDM0QsY0FBYyxDQUFDLFdBQVcsRUFBRSxPQUFPLEVBQUUsWUFBWSxDQUFDLENBQUE7U0FDbkQ7UUFDRCx3QkFBd0IsQ0FBQyxXQUFXLEVBQUUsT0FBTyxDQUFDLENBQUE7UUFFOUMsT0FBTyxHQUFHLEVBQUU7WUFDVixZQUFZLENBQUMsV0FBVyxFQUFFLENBQUE7WUFDMUIsT0FBTyxFQUFFLENBQUE7WUFDVCxJ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ge1xuICBjb25zdCB3ID0gd2luZG93IGFzIGFueVxuICBpZiAody5fX3N1YnNjcmliZXJDb3VudHMgPT09IHVuZGVmaW5lZCB8fCB3Ll9fc3Vic2NyaWJlckNvdW50cyA9PT0gbnVsbCkge1xuICAgIHcuX19zdWJzY3JpYmVyQ291bnRzID0ge31cbiAgfVxuICByZXR1cm4gdy5fX3N1YnNjcmliZXJDb3VudHNcbn1cblxuZnVuY3Rpb24gc2V0R2xvYmFsU3Vic2NyaWJlckNvdW50KGRlc2NyaXB0aW9uOiBzdHJpbmcsIGNvdW50OiBudW1iZXIpOiB2b2lkIHtcbiAgZ2V0R2xvYmFsU3Vic2NyaWJlckNvdW50cygpW2Rlc2NyaXB0aW9uXSA9IGNvdW50XG59XG4iXX0=
|
|
@@ -87,7 +87,7 @@ WidgetComponent.decorators = [
|
|
|
87
87
|
])
|
|
88
88
|
])
|
|
89
89
|
],
|
|
90
|
-
styles: ["seam-widget{display:block;font-size:15px}seam-widget .seam-widget{background:#
|
|
90
|
+
styles: ["seam-widget{display:block;font-size:15px}seam-widget .seam-widget{background:#FFFFFF}seam-widget .widget-header{display:flex;flex-direction:row;border-bottom:1px solid #dee2e6;background:#F4F4F4;font-size:17px}seam-widget .widget-header .widget-header-content{flex:1 1 100%}seam-widget .widget-header .widget-header-btns-container{display:flex;flex-direction:row}seam-widget .widget-header .widget-header-btns-container>div{display:flex;flex-direction:column;justify-content:center;padding:4px}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-config .seam-icon--fa{display:flex;flex-direction:row;justify-content:center;text-align:center;height:25px;width:30px}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-config .seam-icon--fa .svg-inline--fa{max-width:100%;height:100%;width:100%}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-collapse .seam-icon--fa{display:flex;flex-direction:row;justify-content:center;text-align:center;height:15px;width:30px}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-collapse .seam-icon--fa .svg-inline--fa{max-width:100%;height:100%;width:100%}seam-widget .widget-header .widget-header-title{font-size:17px}seam-widget .widget-header-icon{display:inline-block;vertical-align:top;max-height:20px;max-width:20px;height:20px;width:20px}seam-widget .widget-header-icon .widget-header-icon--fa{display:flex;flex-direction:row;justify-content:center;text-align:center;max-height:20px;max-width:20px;height:20px;width:20px}seam-widget .widget-header-icon .widget-header-icon--fa .svg-inline--fa{max-width:100%;height:100%;width:100%}seam-widget .widget-header-icon .widget-header-icon--img{height:100%;max-height:20px;max-width:20px}\n"]
|
|
91
91
|
},] }
|
|
92
92
|
];
|
|
93
93
|
WidgetComponent.ctorParameters = () => [];
|
|
@@ -9,7 +9,7 @@ WidgetButtonGroupComponent.decorators = [
|
|
|
9
9
|
selector: 'seam-widget-button-group',
|
|
10
10
|
template: "<ng-content select=\"[seamButton]\"></ng-content>\n",
|
|
11
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
styles: [":host{display:block}"]
|
|
12
|
+
styles: [":host{display:block}\n"]
|
|
13
13
|
},] }
|
|
14
14
|
];
|
|
15
15
|
WidgetButtonGroupComponent.ctorParameters = () => [];
|
|
@@ -9,7 +9,7 @@ WidgetContentHeaderComponent.decorators = [
|
|
|
9
9
|
selector: 'seam-widget-content-header',
|
|
10
10
|
template: "<ng-content></ng-content>\n",
|
|
11
11
|
encapsulation: ViewEncapsulation.None,
|
|
12
|
-
styles: ["seam-widget-content-header{display:block;padding:.5rem .5rem 1rem}"]
|
|
12
|
+
styles: ["seam-widget-content-header{display:block;padding:.5rem .5rem 1rem}\n"]
|
|
13
13
|
},] }
|
|
14
14
|
];
|
|
15
15
|
WidgetContentHeaderComponent.ctorParameters = () => [];
|
package/esm2015/widget/widget-content-components/widget-empty-label/widget-empty-label.component.js
CHANGED
|
@@ -24,7 +24,7 @@ WidgetEmptyLabelComponent.decorators = [
|
|
|
24
24
|
selector: 'seam-widget-empty-label,a[seam-widget-empty-label],button[seam-widget-empty-label]',
|
|
25
25
|
template: "<ng-content></ng-content>\n",
|
|
26
26
|
encapsulation: ViewEncapsulation.None,
|
|
27
|
-
styles: ["seam-widget-empty-label{display:block;width:100%;text-align:left;font-size:15px;padding:.5rem}"]
|
|
27
|
+
styles: ["seam-widget-empty-label{display:block;width:100%;text-align:left;font-size:15px;padding:.5rem}\n"]
|
|
28
28
|
},] }
|
|
29
29
|
];
|
|
30
30
|
WidgetEmptyLabelComponent.ctorParameters = () => [
|
package/esm2015/widget/widget-content-components/widget-footer-link/widget-footer-link.component.js
CHANGED
|
@@ -9,7 +9,7 @@ WidgetFooterLinkComponent.decorators = [
|
|
|
9
9
|
selector: 'a[seam-widget-footer-link]',
|
|
10
10
|
template: "<ng-content></ng-content>\n",
|
|
11
11
|
encapsulation: ViewEncapsulation.None,
|
|
12
|
-
styles: ["a[seam-widget-footer-link]{display:block;text-align:center;margin-top:.5rem}"]
|
|
12
|
+
styles: ["a[seam-widget-footer-link]{display:block;text-align:center;margin-top:.5rem}\n"]
|
|
13
13
|
},] }
|
|
14
14
|
];
|
|
15
15
|
WidgetFooterLinkComponent.ctorParameters = () => [];
|
package/esm2015/widget/widget-content-components/widget-footer-text/widget-footer-text.component.js
CHANGED
|
@@ -9,7 +9,7 @@ WidgetFooterTextComponent.decorators = [
|
|
|
9
9
|
selector: 'seam-widget-footer-text',
|
|
10
10
|
template: "<em>\n <ng-content></ng-content>\n</em>\n",
|
|
11
11
|
encapsulation: ViewEncapsulation.None,
|
|
12
|
-
styles: ["seam-widget-footer-text{display:block;font-size:13px;margin-top:.5rem}"]
|
|
12
|
+
styles: ["seam-widget-footer-text{display:block;font-size:13px;margin-top:.5rem}\n"]
|
|
13
13
|
},] }
|
|
14
14
|
];
|
|
15
15
|
WidgetFooterTextComponent.ctorParameters = () => [];
|
|
@@ -22,7 +22,7 @@ WidgetHeaderBadgeComponent.decorators = [
|
|
|
22
22
|
},
|
|
23
23
|
encapsulation: ViewEncapsulation.None,
|
|
24
24
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25
|
-
styles: ["seam-widget-header-badge.badge{font-size:17px}"]
|
|
25
|
+
styles: ["seam-widget-header-badge.badge{font-size:17px}\n"]
|
|
26
26
|
},] }
|
|
27
27
|
];
|
|
28
28
|
WidgetHeaderBadgeComponent.ctorParameters = () => [
|
|
@@ -25,7 +25,7 @@ WidgetTileFooterItemComponent.decorators = [
|
|
|
25
25
|
class: 'btn btn-link py-0 px-1'
|
|
26
26
|
},
|
|
27
27
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
28
|
-
styles: [":host{font-size:12px}"]
|
|
28
|
+
styles: [":host{font-size:12px}\n"]
|
|
29
29
|
},] }
|
|
30
30
|
];
|
|
31
31
|
WidgetTileFooterItemComponent.ctorParameters = () => [
|
|
@@ -9,7 +9,7 @@ WidgetTileGroupComponent.decorators = [
|
|
|
9
9
|
selector: 'seam-widget-tile-group',
|
|
10
10
|
template: "<ng-content select=\"[seam-widget-tile],seam-widget-tile\"></ng-content>\n<ng-content select=\"seam-widget-tile-footer\"></ng-content>\n",
|
|
11
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
styles: [":host{display:block;margin-bottom:.5rem}:host:last-child{margin-bottom:0}:host ::ng-deep [seam-widget-tile]{margin-bottom:0}"]
|
|
12
|
+
styles: [":host{display:block;margin-bottom:.5rem}:host:last-child{margin-bottom:0}:host ::ng-deep [seam-widget-tile]{margin-bottom:0}\n"]
|
|
13
13
|
},] }
|
|
14
14
|
];
|
|
15
15
|
WidgetTileGroupComponent.ctorParameters = () => [];
|
|
@@ -79,7 +79,7 @@ WidgetTileComponent.decorators = [
|
|
|
79
79
|
inputs: ['disabled'],
|
|
80
80
|
exportAs: 'seamWidgetTile',
|
|
81
81
|
encapsulation: ViewEncapsulation.None,
|
|
82
|
-
styles: ["
|
|
82
|
+
styles: ["seam-widget-tile,a[seam-widget-tile],button[seam-widget-tile]{display:block;width:100%;padding:4px;text-decoration:none;color:#212529;font-size:14px;font-weight:400;line-height:18px;border:1px solid #dee2e6;border-radius:10px;margin-bottom:.5rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}seam-widget-tile:hover,a[seam-widget-tile]:hover,button[seam-widget-tile]:hover{color:#212529;background-color:#f4f4f4;text-decoration:none}seam-widget-tile:focus,seam-widget-tile.focus,a[seam-widget-tile]:focus,a[seam-widget-tile].focus,button[seam-widget-tile]:focus,button[seam-widget-tile].focus{box-shadow:0 0 0 .2rem #357ebd40;outline:0}seam-widget-tile.disabled,seam-widget-tile:disabled,a[seam-widget-tile].disabled,a[seam-widget-tile]:disabled,button[seam-widget-tile].disabled,button[seam-widget-tile]:disabled{opacity:.65;pointer-events:none;cursor:default;filter:grayscale(1)}seam-widget-tile:last-child,a[seam-widget-tile]:last-child,button[seam-widget-tile]:last-child{margin-bottom:0}seam-widget-tile .widget-tile--notification-icon,a[seam-widget-tile] .widget-tile--notification-icon,button[seam-widget-tile] .widget-tile--notification-icon{position:absolute;bottom:-3px;right:-3px;width:15px!important;height:15px!important}seam-widget-tile seam-icon img[src$=\".svg\"],a[seam-widget-tile] seam-icon img[src$=\".svg\"],button[seam-widget-tile] seam-icon img[src$=\".svg\"]{height:100%}\n"]
|
|
83
83
|
},] }
|
|
84
84
|
];
|
|
85
85
|
WidgetTileComponent.ctorParameters = () => [
|
package/esm2015/widget/widget-content-components/widget-tile-list/widget-tile-list.component.js
CHANGED
|
@@ -8,7 +8,7 @@ WidgetTileListComponent.decorators = [
|
|
|
8
8
|
{ type: Component, args: [{
|
|
9
9
|
selector: 'seam-widget-tile-list',
|
|
10
10
|
template: "<ng-content select=\"[seam-widget-tile],seam-widget-tile,seam-widget-tile-group\"></ng-content>\n",
|
|
11
|
-
styles: [":host{display:flex;flex-direction:column}"]
|
|
11
|
+
styles: [":host{display:flex;flex-direction:column}\n"]
|
|
12
12
|
},] }
|
|
13
13
|
];
|
|
14
14
|
WidgetTileListComponent.ctorParameters = () => [];
|
|
@@ -9,7 +9,7 @@ WidgetFooterComponent.decorators = [
|
|
|
9
9
|
template: "<div class=\"widget-footer--left\">\n <ng-content select=\"seam-widget-footer-text\"></ng-content>\n</div>\n<div class=\"widget-footer--right\">\n <ng-content select=\"seam-widget-button-group\"></ng-content>\n</div>\n",
|
|
10
10
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
11
|
encapsulation: ViewEncapsulation.None,
|
|
12
|
-
styles: ["seam-widget-footer{display:flex;flex-direction:row;margin:.25rem}seam-widget-footer .widget-footer--left{flex:1 1 100%}seam-widget-footer .widget-footer--right{flex:0 0 auto}"]
|
|
12
|
+
styles: ["seam-widget-footer{display:flex;flex-direction:row;margin:.25rem}seam-widget-footer .widget-footer--left{flex:1 1 100%}seam-widget-footer .widget-footer--right{flex:0 0 auto}\n"]
|
|
13
13
|
},] }
|
|
14
14
|
];
|
|
15
15
|
WidgetFooterComponent.ctorParameters = () => [];
|
|
@@ -219,7 +219,7 @@ ProgressCircleButtonComponent.decorators = [
|
|
|
219
219
|
'[attr.aria-disabled]': 'disabled.toString()',
|
|
220
220
|
'[attr.disabled]': 'disabled || null'
|
|
221
221
|
},
|
|
222
|
-
styles: [":host{padding-right:45px;position:relative}:host.btn-sm{padding-right:40px}:host.btn-sm ::ng-deep .seam-progress-circle{padding:8px}:host.btn-lg{padding-right:50px}:host.btn-lg ::ng-deep .seam-progress-circle{padding:0}:host seam-progress-circle.progress-circle-btn--icon{top:0;right:0;height:100%;width:45px;position:absolute}"]
|
|
222
|
+
styles: [":host{padding-right:45px;position:relative}:host.btn-sm{padding-right:40px}:host.btn-sm ::ng-deep .seam-progress-circle{padding:8px}:host.btn-lg{padding-right:50px}:host.btn-lg ::ng-deep .seam-progress-circle{padding:0}:host seam-progress-circle.progress-circle-btn--icon{top:0;right:0;height:100%;width:45px;position:absolute}\n"]
|
|
223
223
|
},] }
|
|
224
224
|
];
|
|
225
225
|
ProgressCircleButtonComponent.ctorParameters = () => [
|
|
@@ -16,7 +16,7 @@ CardActionComponent.decorators = [
|
|
|
16
16
|
{ type: Component, args: [{
|
|
17
17
|
selector: 'seam-card-action',
|
|
18
18
|
template: "<button type=\"button\"\n class=\"btn border-0 h-100\"\n [seamHoverClassToggle]=\"{ default: 'btn-outline-lightgray', hover: 'btn-outline-' + theme }\"\n [attr.title]=\"title\"\n [attr.data-last-action]=\"isLastAction ? 'true' : 'false'\">\n <ng-content></ng-content>\n</button>\n",
|
|
19
|
-
styles: [":host{display:block}.btn{transition:.5s ease-in-out}.btn:not([data-last-action=true]){border-radius:0}.btn[data-last-action=true]{border-radius
|
|
19
|
+
styles: [":host{display:block}.btn{transition:.5s ease-in-out}.btn:not([data-last-action=true]){border-radius:0}.btn[data-last-action=true]{border-radius:0 0 .25rem}\n"]
|
|
20
20
|
},] }
|
|
21
21
|
];
|
|
22
22
|
CardActionComponent.propDecorators = {
|
|
@@ -48,7 +48,7 @@ CardBodyComponent.decorators = [
|
|
|
48
48
|
{ type: Component, args: [{
|
|
49
49
|
selector: 'seam-card-body',
|
|
50
50
|
template: "<div class=\"card-content p-2\">\n <ng-content></ng-content>\n</div>\n<div class=\"card--actions\">\n <ng-content select=\"seam-card-action\"></ng-content>\n</div>\n",
|
|
51
|
-
styles: [":host{display:flex;flex-direction:row}.card-content{flex:1 1 auto}.card--actions
|
|
51
|
+
styles: [":host{display:flex;flex-direction:row}.card-content{flex:1 1 auto;display:flex;flex-direction:row}.card--actions{display:flex;flex-direction:row}\n"]
|
|
52
52
|
},] }
|
|
53
53
|
];
|
|
54
54
|
CardBodyComponent.ctorParameters = () => [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionToken, forwardRef, Component, Inject, Optional, Input, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { of, combineLatest } from 'rxjs';
|
|
3
3
|
import { switchMap, startWith, map, shareReplay, tap } from 'rxjs/operators';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -29,6 +29,9 @@ function composeDataFilters(filters) {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
function composeDataFilterStates(filters) {
|
|
32
|
+
if (filters.length === 0) {
|
|
33
|
+
return of([]);
|
|
34
|
+
}
|
|
32
35
|
return combineLatest(filters.map(f => f.filterStateChanges.pipe(startWith(undefined), map(() => f.filterState()))));
|
|
33
36
|
}
|
|
34
37
|
|
|
@@ -142,7 +145,7 @@ DataFilterTextComponent.decorators = [
|
|
|
142
145
|
selector: 'seam-data-filter-text',
|
|
143
146
|
template: "<div class=\"position-relative\"\n [class.data-filter-text-has-icon]=\"iconTpl\"\n (click)=\"inp.focus()\">\n <label [attr.for]=\"inp.id\" class=\"sr-only\">Text filter</label>\n <input seamInput #inp=\"seamInput\" seamInputSize=\"sm\" [formControl]=\"_control\" [placeholder]=\"placeholder\">\n <ng-container *ngIf=\"iconTpl\">\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\n </ng-container>\n</div>\n",
|
|
144
147
|
providers: [DATA_FILTER_TEXT],
|
|
145
|
-
styles: [":host{display:block}.data-filter-text-has-icon>input{padding-left:30px}.data-filter-text-has-icon ::ng-deep fa-icon{position:absolute;top:3px;left:10px;bottom:
|
|
148
|
+
styles: [":host{display:block}.data-filter-text-has-icon>input{padding-left:30px}.data-filter-text-has-icon ::ng-deep fa-icon{position:absolute;top:3px;left:10px;bottom:0px}.data-filter-text-has-icon ::ng-deep fa-icon .svg-inline--fa{vertical-align:middle}\n"]
|
|
146
149
|
},] }
|
|
147
150
|
];
|
|
148
151
|
DataFilterTextComponent.ctorParameters = () => [
|
|
@@ -240,7 +243,7 @@ DataFilterSearchComponent.decorators = [
|
|
|
240
243
|
template: "<div class=\"position-relative\"\n [class.data-filter-search-has-icon]=\"iconTpl || icon\"\n (click)=\"inp.focus()\">\n <label [attr.for]=\"inp.id\" class=\"sr-only\">Search filter</label>\n <input seamInput #inp=\"seamInput\" seamInputSize=\"sm\" [formControl]=\"_control\" [placeholder]=\"placeholder\">\n <ng-container *ngIf=\"iconTpl; else searchIconTpl\">\n <div class=\"data-filter-search--icon-wrapper\">\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\n </div>\n </ng-container>\n <ng-template #searchIconTpl>\n <ng-container *ngIf=\"icon\">\n <div class=\"data-filter-search--icon-wrapper\">\n <seam-icon [icon]=\"icon\" class=\"text-muted\"></seam-icon>\n </div>\n </ng-container>\n </ng-template>\n</div>\n",
|
|
241
244
|
providers: [DATA_FILTER_SEARCH],
|
|
242
245
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
243
|
-
styles: [":host{display:flex;flex:0 1 300px}.data-filter-search-has-icon{width:100%}.data-filter-search-has-icon>input{padding-left:30px}.data-filter-search-has-icon .data-filter-search--icon-wrapper{position:absolute;top:3px;left:10px;bottom:
|
|
246
|
+
styles: [":host{display:flex;flex:0 1 300px}.data-filter-search-has-icon{width:100%}.data-filter-search-has-icon>input{padding-left:30px}.data-filter-search-has-icon .data-filter-search--icon-wrapper{position:absolute;top:3px;left:10px;bottom:0px}.data-filter-search-has-icon .data-filter-search--icon-wrapper ::ng-deep .svg-inline--fa{vertical-align:middle}\n"]
|
|
244
247
|
},] }
|
|
245
248
|
];
|
|
246
249
|
DataFilterSearchComponent.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theseam-ui-common-data-filters.js","sources":["../../../projects/ui-common/data-filters/data-filter.ts","../../../projects/ui-common/data-filters/data-filter-def.ts","../../../projects/ui-common/data-filters/data-filter-container.ts","../../../projects/ui-common/data-filters/filters/data-filter-text/data-filter-text.component.ts","../../../projects/ui-common/data-filters/filters/data-filter-search/data-filter-search.component.ts","../../../projects/ui-common/data-filters/filters/data-filter-toggle-buttons/data-filter-toggle-buttons.component.ts","../../../projects/ui-common/data-filters/data-filters.module.ts","../../../projects/ui-common/data-filters/theseam-ui-common-data-filters.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core'\nimport { combineLatest, Observable } from 'rxjs'\nimport { map, startWith, switchMap } from 'rxjs/operators'\n\nexport type IDataFilterFunction = <T>(data: T[]) => Observable<T[]>\n\n/**\n * State of the filter that would allow an external operation to apply the\n * filtering.\n *\n * This is primarily for server-side filtering.\n */\nexport interface DataFilterState {\n /**\n * DataFilter's name.\n */\n name: string\n\n /**\n * Anything necessary for an external implementation to apply this filter.\n */\n state: { [key: string]: any }\n}\n\n// TODO: Consider adding something, such as a priority or order, to allow the\n// order the filter functions are called in to be declared/influenced\n// externally. This would allow the filters that will most likely filter out\n// many records quickly to be run before the heavy processing filters.\nexport interface IDataFilter {\n /**\n * Name used when referencing filter by string.\n */\n name: string\n\n /**\n * Unique value to prevent a filter being used more than once if it ends up\n * being registered more than once.\n */\n uid: string\n\n /**\n *\n */\n filterStateChanges: Observable<DataFilterState>\n\n /**\n * Filters the data based on the conditions of the filter.\n */\n filter<T>(data: T[]): Observable<T[]>\n\n /**\n *\n */\n filterState(): DataFilterState\n}\n\nexport const THESEAM_DATA_FILTER = new InjectionToken<IDataFilter>('TheSeamDataFilter')\nexport const THESEAM_DATA_FILTER_OPTIONS = new InjectionToken<{}>('TheSeamDataFilterOptions')\n\nexport function filterOperator<T>(filterFn: IDataFilterFunction) {\n return (source$: Observable<T[]>) =>\n source$.pipe(switchMap(filterFn))\n}\n\nexport function composeDataFilters(filters: IDataFilter[]) {\n const filterFunctions = filters.map(f => filterOperator(f.filter.bind(f)))\n return (source$: Observable<any>) => {\n let src$ = source$\n for (const f of filterFunctions) {\n src$ = src$.pipe(f)\n }\n return src$\n }\n}\n\nexport function composeDataFilterStates(filters: IDataFilter[]): Observable<DataFilterState[]> {\n return combineLatest(filters.map(f => f.filterStateChanges.pipe(\n startWith(undefined),\n map(() => f.filterState())\n )))\n}\n","import { InjectionToken } from '@angular/core'\n\nimport { IDataFilter } from './data-filter'\n\nexport interface IDataFilterDef<T = any> {\n name: string\n\n /**\n * Component that controls the filter.\n */\n component: IDataFilter\n\n}\n\nexport const THESEAM_DATA_FILTER_DEF = new InjectionToken<IDataFilterDef[]>('TheSeamDataFilter')\n","import { InjectionToken } from '@angular/core'\nimport { IDataFilter } from './data-filter'\n\nexport interface DataFilterContainer {\n filters(): IDataFilter[]\n\n addFilter(dataFilter: IDataFilter): void\n\n removeFilter(dataFilter: IDataFilter): void\n}\n\nexport const THESEAM_DATA_FILTER_CONTAINER = new InjectionToken<DataFilterContainer>(\n 'DataFilterContainer'\n)\n","import { BooleanInput } from '@angular/cdk/coercion'\nimport { Component, forwardRef, Inject, Input, OnDestroy, OnInit, Optional, TemplateRef } from '@angular/core'\nimport { FormControl } from '@angular/forms'\nimport { Observable, of } from 'rxjs'\nimport { map, shareReplay, startWith, switchMap } from 'rxjs/operators'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { isNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { DataFilterState, IDataFilter, THESEAM_DATA_FILTER, THESEAM_DATA_FILTER_OPTIONS } from '../../data-filter'\nimport { THESEAM_DATA_FILTER_CONTAINER } from '../../data-filter-container'\nimport type { DataFilterContainer } from '../../data-filter-container'\nimport { ITextFilterOptions } from './text-filter-options'\n\nexport const DATA_FILTER_TEXT: any = {\n provide: THESEAM_DATA_FILTER,\n // tslint:disable-next-line:no-use-before-declare\n useExisting: forwardRef(() => DataFilterTextComponent),\n multi: true,\n}\n\nexport const DefaultTextFilterOptions: ITextFilterOptions = {\n properties: undefined,\n omitProperties: undefined,\n exact: false,\n caseSensitive: false,\n}\n\nexport function textDataFilter(data: any[], text: string, options = DefaultTextFilterOptions) {\n if (!data || !text) {\n return data\n }\n\n if (data.length <= 0) {\n return data\n }\n\n let props = options ? options.properties : undefined\n if (!props) {\n props = []\n let keys = Object.keys(data[0])\n if (options && options.omitProperties) {\n keys = keys.filter(key => !(options.omitProperties || []).find(p => p === key))\n }\n for (const key of keys) {\n if (data[0].hasOwnProperty(key)) {\n props.push(key)\n }\n }\n }\n\n const filtered: any[] = []\n\n for (const item of data) {\n for (const p of props) {\n let value1 = `${item[p]}`\n let value2 = text\n\n if (!options.caseSensitive) {\n value1 = value1.toLowerCase()\n value2 = value2.toLowerCase()\n }\n\n if (item[p] && value1.indexOf(value2) !== (options.exact ? 0 : -1)) {\n filtered.push(item)\n break\n }\n }\n }\n\n return filtered\n}\n\nlet _uid = 0\n\n@Component({\n selector: 'seam-data-filter-text',\n templateUrl: './data-filter-text.component.html',\n styleUrls: ['./data-filter-text.component.scss'],\n providers: [ DATA_FILTER_TEXT ]\n})\nexport class DataFilterTextComponent implements OnInit, OnDestroy, IDataFilter {\n static ngAcceptInputType_exact: BooleanInput\n static ngAcceptInputType_caseSensitive: BooleanInput\n\n public readonly name = 'text'\n public readonly uid = `text__${_uid++}`\n\n _control = new FormControl()\n\n @Input() properties: string[] | undefined | null = this._optDefault('properties')\n @Input() omitProperties: string[] | undefined | null = this._optDefault('omitProperties')\n @Input() @InputBoolean() exact: boolean = this._optDefault('exact')\n @Input() @InputBoolean() caseSensitive: boolean = this._optDefault('caseSensitive')\n\n @Input() placeholder: string | undefined | null\n @Input() iconTpl: TemplateRef<HTMLElement> | undefined | null\n\n @Input()\n set value(value: string | string[]) {\n const _value = !isNullOrUndefined(value) ? `${value}` : ''\n if (this._control.value !== _value) {\n this._control.setValue(_value)\n }\n }\n\n public readonly filterStateChanges: Observable<DataFilterState>\n\n constructor(\n @Inject(THESEAM_DATA_FILTER_CONTAINER) private _filterContainer: DataFilterContainer,\n @Optional() @Inject(THESEAM_DATA_FILTER_OPTIONS) private _filterOptions: ITextFilterOptions | null\n ) {\n this.filterStateChanges = this._control.valueChanges.pipe(\n switchMap(() => of(this.filterState())),\n shareReplay({ bufferSize: 1, refCount: true })\n )\n }\n\n ngOnInit() { this._filterContainer.addFilter(this) }\n\n ngOnDestroy() { this._filterContainer.removeFilter(this) }\n\n private _optDefault<K extends keyof ITextFilterOptions>(prop: K) {\n if (this._filterOptions && this._filterOptions.hasOwnProperty(prop)) {\n return this._filterOptions[prop]\n }\n return DefaultTextFilterOptions[prop]\n }\n\n get options(): ITextFilterOptions {\n return {\n properties: this.properties ?? undefined,\n omitProperties: this.omitProperties ?? undefined,\n exact: this.exact,\n caseSensitive: this.caseSensitive\n }\n }\n\n public filter<T>(data: T[]): Observable<T[]> {\n return this._control.valueChanges\n .pipe(\n map(v => textDataFilter(data, v, this.options)),\n startWith(textDataFilter(data, this._control.value, this.options)),\n )\n }\n\n public filterState(): DataFilterState {\n return {\n // id:\n name: this.name,\n state: {\n value: this._control.value,\n options: this.options\n }\n }\n }\n\n}\n","import { BooleanInput } from '@angular/cdk/coercion'\nimport { ChangeDetectionStrategy, Component, forwardRef, Inject, Input, OnDestroy, OnInit, Optional, TemplateRef } from '@angular/core'\nimport { FormControl } from '@angular/forms'\nimport { Observable, of } from 'rxjs'\nimport { map, shareReplay, startWith, switchMap } from 'rxjs/operators'\n\nimport { faSearch } from '@fortawesome/free-solid-svg-icons'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport type { SeamIcon } from '@theseam/ui-common/icon'\nimport { isNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { DataFilterState, IDataFilter, THESEAM_DATA_FILTER, THESEAM_DATA_FILTER_OPTIONS } from '../../data-filter'\nimport { THESEAM_DATA_FILTER_CONTAINER } from '../../data-filter-container'\nimport type { DataFilterContainer } from '../../data-filter-container'\nimport { textDataFilter } from '../data-filter-text/data-filter-text.component'\n\nimport { ISearchFilterOptions } from './search-filter-options'\n\n\nexport const DATA_FILTER_SEARCH: any = {\n provide: THESEAM_DATA_FILTER,\n // tslint:disable-next-line:no-use-before-declare\n useExisting: forwardRef(() => DataFilterSearchComponent),\n multi: true,\n}\n\nexport const DefaultSearchFilterOptions: ISearchFilterOptions = {\n properties: undefined,\n omitProperties: undefined,\n exact: false,\n caseSensitive: false\n}\n\nexport function searchDataFilter(data: any[], values: string, options = DefaultSearchFilterOptions) {\n return textDataFilter(data, values, options)\n}\n\nlet _uid = 0\n\n@Component({\n selector: 'seam-data-filter-search',\n templateUrl: './data-filter-search.component.html',\n styleUrls: ['./data-filter-search.component.scss'],\n providers: [ DATA_FILTER_SEARCH ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DataFilterSearchComponent implements OnInit, OnDestroy, IDataFilter {\n static ngAcceptInputType_exact: BooleanInput\n static ngAcceptInputType_caseSensitive: BooleanInput\n\n public readonly name = 'search'\n public readonly uid = `search__${_uid++}`\n\n _control = new FormControl()\n\n @Input() properties: string[] | undefined | null = this._optDefault('properties')\n @Input() omitProperties: string[] | undefined | null = this._optDefault('omitProperties')\n @Input() @InputBoolean() exact: boolean = this._optDefault('exact')\n @Input() @InputBoolean() caseSensitive: boolean = this._optDefault('caseSensitive')\n\n @Input() placeholder: string | undefined | null = 'Search...'\n @Input() icon: SeamIcon | undefined | null = faSearch\n @Input() iconTpl?: TemplateRef<HTMLElement>\n\n @Input()\n set value(value: string | string[]) {\n const _value = !isNullOrUndefined(value) ? `${value}` : ''\n if (this._control.value !== _value) {\n this._control.setValue(_value)\n }\n }\n\n public readonly filterStateChanges: Observable<DataFilterState>\n\n constructor(\n @Inject(THESEAM_DATA_FILTER_CONTAINER) private _filterContainer: DataFilterContainer,\n @Optional() @Inject(THESEAM_DATA_FILTER_OPTIONS) private _filterOptions: ISearchFilterOptions | null\n ) {\n this.filterStateChanges = this._control.valueChanges.pipe(\n switchMap(() => of(this.filterState())),\n shareReplay({ bufferSize: 1, refCount: true })\n )\n }\n\n ngOnInit() { this._filterContainer.addFilter(this) }\n\n ngOnDestroy() { this._filterContainer.removeFilter(this) }\n\n private _optDefault<K extends keyof ISearchFilterOptions>(prop: K) {\n if (this._filterOptions && this._filterOptions.hasOwnProperty(prop)) {\n return this._filterOptions[prop]\n }\n return DefaultSearchFilterOptions[prop]\n }\n\n get options(): ISearchFilterOptions {\n return {\n properties: this.properties ?? undefined,\n omitProperties: this.omitProperties ?? undefined,\n exact: this.exact,\n caseSensitive: this.caseSensitive\n }\n }\n\n public filter<T>(data: T[]): Observable<T[]> {\n return this._control.valueChanges\n .pipe(\n map(v => searchDataFilter(data, v, this.options)),\n startWith(searchDataFilter(data, this._control.value, this.options)),\n )\n }\n\n public filterState(): DataFilterState {\n return {\n // id:\n name: this.name,\n state: {\n value: this._control.value,\n options: this.options\n }\n }\n }\n\n}\n","import { coerceArray } from '@angular/cdk/coercion'\nimport { Component, forwardRef, Inject, Input, OnDestroy, OnInit, Optional } from '@angular/core'\nimport { FormControl } from '@angular/forms'\nimport { Observable, of } from 'rxjs'\nimport { map, shareReplay, startWith, switchMap, tap } from 'rxjs/operators'\n\nimport { hasProperty, isNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { DataFilterState, IDataFilter, THESEAM_DATA_FILTER, THESEAM_DATA_FILTER_OPTIONS } from '../../data-filter'\nimport { THESEAM_DATA_FILTER_CONTAINER } from '../../data-filter-container'\nimport type { DataFilterContainer } from '../../data-filter-container'\nimport { textDataFilter } from '../data-filter-text/data-filter-text.component'\nimport { ITextFilterOptions } from '../data-filter-text/text-filter-options'\n\n\nexport const DATA_FILTER_TOGGLE_BUTTON: any = {\n provide: THESEAM_DATA_FILTER,\n // tslint:disable-next-line:no-use-before-declare\n useExisting: forwardRef(() => DataFilterToggleButtonsComponent),\n multi: true,\n}\n\nexport interface IToggleButton {\n name: string\n value: string\n comparator?: (value: any, row: any, index: number) => -1 | 0 | 1\n}\n\nexport interface IToggleButtonsFilterOptions extends ITextFilterOptions {\n selectionToggleable: boolean\n multiple: boolean\n buttons: IToggleButton[]\n initialValue?: any\n}\n\nexport const DefaultToggleButtonsFilterOptions: IToggleButtonsFilterOptions = {\n properties: undefined,\n omitProperties: undefined,\n multiple: false,\n selectionToggleable: false,\n buttons: [],\n exact: false,\n caseSensitive: false\n}\n\nexport function toggleButtonsFilter(data: any[], values: string[], options = DefaultToggleButtonsFilterOptions) {\n if (!data || !values) {\n return data\n }\n\n const customComparatorBtns: IToggleButton[] = []\n for (const btn of options.buttons) {\n if (btn.comparator) {\n customComparatorBtns.push(btn)\n }\n }\n\n let _data = data\n for (const val of values) {\n if (val === '') { continue }\n\n let cmp\n for (const btn of customComparatorBtns) {\n if (btn.value === val) {\n cmp = btn.comparator\n }\n }\n if (cmp) {\n const filtered: any[] = []\n for (let i = 0; i < _data.length; i++) {\n if (cmp(val, _data[i], i) !== -1) {\n filtered.push(_data[i])\n }\n }\n _data = filtered\n } else {\n _data = textDataFilter(_data, val, {\n properties: options.properties,\n omitProperties: options.omitProperties,\n exact: options.exact,\n caseSensitive: options.caseSensitive\n })\n }\n }\n return _data\n}\n\nlet _uid = 0\n\n@Component({\n selector: 'seam-data-filter-toggle-buttons',\n templateUrl: './data-filter-toggle-buttons.component.html',\n styleUrls: ['./data-filter-toggle-buttons.component.scss'],\n providers: [ DATA_FILTER_TOGGLE_BUTTON ]\n})\nexport class DataFilterToggleButtonsComponent implements OnInit, OnDestroy, IDataFilter {\n\n public readonly name = 'toggle-buttons'\n public readonly uid = `toggle-buttons__${_uid++}`\n\n _control = new FormControl()\n\n @Input() properties = this._optDefault('properties')\n @Input() omitProperties = this._optDefault('omitProperties')\n @Input() multiple = this._optDefault('multiple')\n @Input() selectionToggleable = this._optDefault('selectionToggleable')\n @Input() buttons = this._optDefault('buttons')\n @Input() exact = this._optDefault('exact')\n @Input() caseSensitive = this._optDefault('caseSensitive')\n\n @Input()\n set value(value: string | string[]) {\n const _value = !isNullOrUndefined(value) ? coerceArray(value) : undefined\n // console.log('_value', _value, this._control.value)\n if (this._control.value !== _value) {\n this._control.setValue(_value)\n }\n }\n\n public readonly filterStateChanges: Observable<DataFilterState>\n\n constructor(\n @Inject(THESEAM_DATA_FILTER_CONTAINER) private _filterContainer: DataFilterContainer,\n @Optional() @Inject(THESEAM_DATA_FILTER_OPTIONS) private _filterOptions: IToggleButtonsFilterOptions | null\n ) {\n this.filterStateChanges = this._control.valueChanges.pipe(\n tap(v => console.log('v', v)),\n switchMap(() => of(this.filterState())),\n tap(v => console.log('v2', v)),\n shareReplay({ bufferSize: 1, refCount: true })\n )\n }\n\n ngOnInit() {\n this._filterContainer.addFilter(this)\n if (this._filterOptions && hasProperty(this._filterOptions, 'initialValue')) {\n this.value = this._optDefault('initialValue')\n }\n }\n\n ngOnDestroy() { this._filterContainer.removeFilter(this) }\n\n private _optDefault<K extends keyof IToggleButtonsFilterOptions>(prop: K) {\n if (this._filterOptions && this._filterOptions.hasOwnProperty(prop)) {\n return this._filterOptions[prop]\n }\n return DefaultToggleButtonsFilterOptions[prop]\n }\n\n get options(): IToggleButtonsFilterOptions {\n return {\n properties: this.properties,\n omitProperties: this.omitProperties,\n multiple: this.multiple,\n selectionToggleable: this.selectionToggleable,\n buttons: this.buttons,\n exact: this.exact,\n caseSensitive: this.caseSensitive\n }\n }\n\n public filter<T>(data: T[]): Observable<T[]> {\n return this._control.valueChanges\n .pipe(\n map(v => toggleButtonsFilter(data, coerceArray(v), this.options)),\n startWith(toggleButtonsFilter(data, coerceArray(this._control.value), this.options)),\n )\n }\n\n public filterState(): DataFilterState {\n return {\n // id:\n name: this.name,\n state: {\n value: this._control.value,\n options: this.options\n }\n }\n }\n\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\n\nimport { TheSeamFormFieldModule } from '@theseam/ui-common/form-field'\nimport { TheSeamIconModule } from '@theseam/ui-common/icon'\nimport { TheSeamToggleGroupModule } from '@theseam/ui-common/toggle-group'\n\nimport { THESEAM_DATA_FILTER_DEF } from './data-filter-def'\nimport { DataFilterSearchComponent } from './filters/data-filter-search/data-filter-search.component'\nimport { DataFilterTextComponent } from './filters/data-filter-text/data-filter-text.component'\nimport { DataFilterToggleButtonsComponent } from './filters/data-filter-toggle-buttons/data-filter-toggle-buttons.component'\n\nconst filterComponents = [\n DataFilterSearchComponent,\n DataFilterTextComponent,\n DataFilterToggleButtonsComponent\n]\n\nconst filterDefProviders = [\n { provide: THESEAM_DATA_FILTER_DEF, useValue: { name: 'search', component: DataFilterSearchComponent }, multi: true },\n { provide: THESEAM_DATA_FILTER_DEF, useValue: { name: 'text', component: DataFilterTextComponent }, multi: true },\n { provide: THESEAM_DATA_FILTER_DEF, useValue: { name: 'toggle-buttons', component: DataFilterToggleButtonsComponent }, multi: true },\n]\n\n@NgModule({\n declarations: [\n ...filterComponents\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n TheSeamFormFieldModule,\n FontAwesomeModule,\n TheSeamToggleGroupModule,\n TheSeamIconModule\n ],\n providers: [\n ...filterDefProviders\n ],\n exports: [\n ...filterComponents\n ],\n entryComponents: [\n ...filterComponents\n ]\n})\nexport class TheSeamDataFiltersModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["_uid"],"mappings":";;;;;;;;;;;;;;;MAwDa,mBAAmB,GAAG,IAAI,cAAc,CAAc,mBAAmB,EAAC;MAC1E,2BAA2B,GAAG,IAAI,cAAc,CAAK,0BAA0B,EAAC;SAE7E,cAAc,CAAI,QAA6B;IAC7D,OAAO,CAAC,OAAwB,KAC9B,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAA;AACrC,CAAC;SAEe,kBAAkB,CAAC,OAAsB;IACvD,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1E,OAAO,CAAC,OAAwB;QAC9B,IAAI,IAAI,GAAG,OAAO,CAAA;QAClB,KAAK,MAAM,CAAC,IAAI,eAAe,EAAE;YAC/B,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACpB;QACD,OAAO,IAAI,CAAA;KACZ,CAAA;AACH,CAAC;SAEe,uBAAuB,CAAC,OAAsB;IAC5D,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,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AG+C,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,yBAAyB,EAAE,OACxD,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,OACpD,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,gCAAgC,EAAE;AAHvH,MAAM,kBAAkB,GAAG;IACzB,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,IAA0D,EAAE,KAAK,EAAE,IAAI,EAAE;IACrH,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,IAAsD,EAAE,KAAK,EAAE,IAAI,EAAE;IACjH,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,IAAyE,EAAE,KAAK,EAAE,IAAI,EAAE;CACrI,CAAA;MAwBY,wBAAwB;;;YAtBpC,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,GAAG,gBAAgB;iBACpB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,sBAAsB;oBACtB,iBAAiB;oBACjB,wBAAwB;oBACxB,iBAAiB;iBAClB;gBACD,SAAS,EAAE;oBACT,GAAG,kBAAkB;iBACtB;gBACD,OAAO,EAAE;oBACP,GAAG,gBAAgB;iBACpB;gBACD,eAAe,EAAE;oBACf,GAAG,gBAAgB;iBACpB;aACF;;;AChDD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"theseam-ui-common-data-filters.js","sources":["../../../projects/ui-common/data-filters/data-filter.ts","../../../projects/ui-common/data-filters/data-filter-def.ts","../../../projects/ui-common/data-filters/data-filter-container.ts","../../../projects/ui-common/data-filters/filters/data-filter-text/data-filter-text.component.ts","../../../projects/ui-common/data-filters/filters/data-filter-search/data-filter-search.component.ts","../../../projects/ui-common/data-filters/filters/data-filter-toggle-buttons/data-filter-toggle-buttons.component.ts","../../../projects/ui-common/data-filters/data-filters.module.ts","../../../projects/ui-common/data-filters/theseam-ui-common-data-filters.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core'\nimport { combineLatest, Observable, of } from 'rxjs'\nimport { map, startWith, switchMap } from 'rxjs/operators'\n\nexport type DataFilterFunction = <T>(data: T[]) => Observable<T[]>\n\n/**\n * State of the filter that would allow an external operation to apply the\n * filtering.\n *\n * This is primarily for server-side filtering.\n */\nexport interface DataFilterState {\n /**\n * DataFilter's name.\n */\n name: string\n\n /**\n * Anything necessary for an external implementation to apply this filter.\n */\n state: { [key: string]: any }\n}\n\n// TODO: Consider adding something, such as a priority or order, to allow the\n// order the filter functions are called in to be declared/influenced\n// externally. This would allow the filters that will most likely filter out\n// many records quickly to be run before the heavy processing filters.\nexport interface DataFilter {\n /**\n * Name used when referencing filter by string.\n */\n name: string\n\n /**\n * Unique value to prevent a filter being used more than once if it ends up\n * being registered more than once.\n */\n uid: string\n\n /**\n *\n */\n filterStateChanges: Observable<DataFilterState>\n\n /**\n * Filters the data based on the conditions of the filter.\n */\n filter<T>(data: T[]): Observable<T[]>\n\n /**\n *\n */\n filterState(): DataFilterState\n}\n\nexport const THESEAM_DATA_FILTER = new InjectionToken<DataFilter>('TheSeamDataFilter')\nexport const THESEAM_DATA_FILTER_OPTIONS = new InjectionToken<{}>('TheSeamDataFilterOptions')\n\nexport function filterOperator<T>(filterFn: DataFilterFunction) {\n return (source$: Observable<T[]>) =>\n source$.pipe(switchMap(filterFn))\n}\n\nexport function composeDataFilters(filters: DataFilter[]) {\n const filterFunctions = filters.map(f => filterOperator(f.filter.bind(f)))\n return (source$: Observable<any>) => {\n let src$ = source$\n for (const f of filterFunctions) {\n src$ = src$.pipe(f)\n }\n return src$\n }\n}\n\nexport function composeDataFilterStates(filters: DataFilter[]): Observable<DataFilterState[]> {\n if (filters.length === 0) {\n return of([])\n }\n\n return combineLatest(filters.map(f => f.filterStateChanges.pipe(\n startWith(undefined),\n map(() => f.filterState())\n )))\n}\n\n\n/** @deprecated Use `DataFilter` instead. */\nexport type IDataFilter = DataFilter\n\n/** @deprecated Use `IDataFilterFunction` instead. */\nexport type IDataFilterFunction = DataFilterFunction\n","import { InjectionToken } from '@angular/core'\n\nimport { IDataFilter } from './data-filter'\n\nexport interface IDataFilterDef<T = any> {\n name: string\n\n /**\n * Component that controls the filter.\n */\n component: IDataFilter\n\n}\n\nexport const THESEAM_DATA_FILTER_DEF = new InjectionToken<IDataFilterDef[]>('TheSeamDataFilter')\n","import { InjectionToken } from '@angular/core'\nimport { IDataFilter } from './data-filter'\n\nexport interface DataFilterContainer {\n filters(): IDataFilter[]\n\n addFilter(dataFilter: IDataFilter): void\n\n removeFilter(dataFilter: IDataFilter): void\n}\n\nexport const THESEAM_DATA_FILTER_CONTAINER = new InjectionToken<DataFilterContainer>(\n 'DataFilterContainer'\n)\n","import { BooleanInput } from '@angular/cdk/coercion'\nimport { Component, forwardRef, Inject, Input, OnDestroy, OnInit, Optional, TemplateRef } from '@angular/core'\nimport { FormControl } from '@angular/forms'\nimport { Observable, of } from 'rxjs'\nimport { map, shareReplay, startWith, switchMap } from 'rxjs/operators'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { isNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { DataFilterState, IDataFilter, THESEAM_DATA_FILTER, THESEAM_DATA_FILTER_OPTIONS } from '../../data-filter'\nimport { THESEAM_DATA_FILTER_CONTAINER } from '../../data-filter-container'\nimport type { DataFilterContainer } from '../../data-filter-container'\nimport { ITextFilterOptions } from './text-filter-options'\n\nexport const DATA_FILTER_TEXT: any = {\n provide: THESEAM_DATA_FILTER,\n // tslint:disable-next-line:no-use-before-declare\n useExisting: forwardRef(() => DataFilterTextComponent),\n multi: true,\n}\n\nexport const DefaultTextFilterOptions: ITextFilterOptions = {\n properties: undefined,\n omitProperties: undefined,\n exact: false,\n caseSensitive: false,\n}\n\nexport function textDataFilter(data: any[], text: string, options = DefaultTextFilterOptions) {\n if (!data || !text) {\n return data\n }\n\n if (data.length <= 0) {\n return data\n }\n\n let props = options ? options.properties : undefined\n if (!props) {\n props = []\n let keys = Object.keys(data[0])\n if (options && options.omitProperties) {\n keys = keys.filter(key => !(options.omitProperties || []).find(p => p === key))\n }\n for (const key of keys) {\n if (data[0].hasOwnProperty(key)) {\n props.push(key)\n }\n }\n }\n\n const filtered: any[] = []\n\n for (const item of data) {\n for (const p of props) {\n let value1 = `${item[p]}`\n let value2 = text\n\n if (!options.caseSensitive) {\n value1 = value1.toLowerCase()\n value2 = value2.toLowerCase()\n }\n\n if (item[p] && value1.indexOf(value2) !== (options.exact ? 0 : -1)) {\n filtered.push(item)\n break\n }\n }\n }\n\n return filtered\n}\n\nlet _uid = 0\n\n@Component({\n selector: 'seam-data-filter-text',\n templateUrl: './data-filter-text.component.html',\n styleUrls: ['./data-filter-text.component.scss'],\n providers: [ DATA_FILTER_TEXT ]\n})\nexport class DataFilterTextComponent implements OnInit, OnDestroy, IDataFilter {\n static ngAcceptInputType_exact: BooleanInput\n static ngAcceptInputType_caseSensitive: BooleanInput\n\n public readonly name = 'text'\n public readonly uid = `text__${_uid++}`\n\n _control = new FormControl()\n\n @Input() properties: string[] | undefined | null = this._optDefault('properties')\n @Input() omitProperties: string[] | undefined | null = this._optDefault('omitProperties')\n @Input() @InputBoolean() exact: boolean = this._optDefault('exact')\n @Input() @InputBoolean() caseSensitive: boolean = this._optDefault('caseSensitive')\n\n @Input() placeholder: string | undefined | null\n @Input() iconTpl: TemplateRef<HTMLElement> | undefined | null\n\n @Input()\n set value(value: string | string[]) {\n const _value = !isNullOrUndefined(value) ? `${value}` : ''\n if (this._control.value !== _value) {\n this._control.setValue(_value)\n }\n }\n\n public readonly filterStateChanges: Observable<DataFilterState>\n\n constructor(\n @Inject(THESEAM_DATA_FILTER_CONTAINER) private _filterContainer: DataFilterContainer,\n @Optional() @Inject(THESEAM_DATA_FILTER_OPTIONS) private _filterOptions: ITextFilterOptions | null\n ) {\n this.filterStateChanges = this._control.valueChanges.pipe(\n switchMap(() => of(this.filterState())),\n shareReplay({ bufferSize: 1, refCount: true })\n )\n }\n\n ngOnInit() { this._filterContainer.addFilter(this) }\n\n ngOnDestroy() { this._filterContainer.removeFilter(this) }\n\n private _optDefault<K extends keyof ITextFilterOptions>(prop: K) {\n if (this._filterOptions && this._filterOptions.hasOwnProperty(prop)) {\n return this._filterOptions[prop]\n }\n return DefaultTextFilterOptions[prop]\n }\n\n get options(): ITextFilterOptions {\n return {\n properties: this.properties ?? undefined,\n omitProperties: this.omitProperties ?? undefined,\n exact: this.exact,\n caseSensitive: this.caseSensitive\n }\n }\n\n public filter<T>(data: T[]): Observable<T[]> {\n return this._control.valueChanges\n .pipe(\n map(v => textDataFilter(data, v, this.options)),\n startWith(textDataFilter(data, this._control.value, this.options)),\n )\n }\n\n public filterState(): DataFilterState {\n return {\n // id:\n name: this.name,\n state: {\n value: this._control.value,\n options: this.options\n }\n }\n }\n\n}\n","import { BooleanInput } from '@angular/cdk/coercion'\nimport { ChangeDetectionStrategy, Component, forwardRef, Inject, Input, OnDestroy, OnInit, Optional, TemplateRef } from '@angular/core'\nimport { FormControl } from '@angular/forms'\nimport { Observable, of } from 'rxjs'\nimport { map, shareReplay, startWith, switchMap } from 'rxjs/operators'\n\nimport { faSearch } from '@fortawesome/free-solid-svg-icons'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport type { SeamIcon } from '@theseam/ui-common/icon'\nimport { isNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { DataFilterState, IDataFilter, THESEAM_DATA_FILTER, THESEAM_DATA_FILTER_OPTIONS } from '../../data-filter'\nimport { THESEAM_DATA_FILTER_CONTAINER } from '../../data-filter-container'\nimport type { DataFilterContainer } from '../../data-filter-container'\nimport { textDataFilter } from '../data-filter-text/data-filter-text.component'\n\nimport { ISearchFilterOptions } from './search-filter-options'\n\n\nexport const DATA_FILTER_SEARCH: any = {\n provide: THESEAM_DATA_FILTER,\n // tslint:disable-next-line:no-use-before-declare\n useExisting: forwardRef(() => DataFilterSearchComponent),\n multi: true,\n}\n\nexport const DefaultSearchFilterOptions: ISearchFilterOptions = {\n properties: undefined,\n omitProperties: undefined,\n exact: false,\n caseSensitive: false\n}\n\nexport function searchDataFilter(data: any[], values: string, options = DefaultSearchFilterOptions) {\n return textDataFilter(data, values, options)\n}\n\nlet _uid = 0\n\n@Component({\n selector: 'seam-data-filter-search',\n templateUrl: './data-filter-search.component.html',\n styleUrls: ['./data-filter-search.component.scss'],\n providers: [ DATA_FILTER_SEARCH ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DataFilterSearchComponent implements OnInit, OnDestroy, IDataFilter {\n static ngAcceptInputType_exact: BooleanInput\n static ngAcceptInputType_caseSensitive: BooleanInput\n\n public readonly name = 'search'\n public readonly uid = `search__${_uid++}`\n\n _control = new FormControl()\n\n @Input() properties: string[] | undefined | null = this._optDefault('properties')\n @Input() omitProperties: string[] | undefined | null = this._optDefault('omitProperties')\n @Input() @InputBoolean() exact: boolean = this._optDefault('exact')\n @Input() @InputBoolean() caseSensitive: boolean = this._optDefault('caseSensitive')\n\n @Input() placeholder: string | undefined | null = 'Search...'\n @Input() icon: SeamIcon | undefined | null = faSearch\n @Input() iconTpl?: TemplateRef<HTMLElement>\n\n @Input()\n set value(value: string | string[]) {\n const _value = !isNullOrUndefined(value) ? `${value}` : ''\n if (this._control.value !== _value) {\n this._control.setValue(_value)\n }\n }\n\n public readonly filterStateChanges: Observable<DataFilterState>\n\n constructor(\n @Inject(THESEAM_DATA_FILTER_CONTAINER) private _filterContainer: DataFilterContainer,\n @Optional() @Inject(THESEAM_DATA_FILTER_OPTIONS) private _filterOptions: ISearchFilterOptions | null\n ) {\n this.filterStateChanges = this._control.valueChanges.pipe(\n switchMap(() => of(this.filterState())),\n shareReplay({ bufferSize: 1, refCount: true })\n )\n }\n\n ngOnInit() { this._filterContainer.addFilter(this) }\n\n ngOnDestroy() { this._filterContainer.removeFilter(this) }\n\n private _optDefault<K extends keyof ISearchFilterOptions>(prop: K) {\n if (this._filterOptions && this._filterOptions.hasOwnProperty(prop)) {\n return this._filterOptions[prop]\n }\n return DefaultSearchFilterOptions[prop]\n }\n\n get options(): ISearchFilterOptions {\n return {\n properties: this.properties ?? undefined,\n omitProperties: this.omitProperties ?? undefined,\n exact: this.exact,\n caseSensitive: this.caseSensitive\n }\n }\n\n public filter<T>(data: T[]): Observable<T[]> {\n return this._control.valueChanges\n .pipe(\n map(v => searchDataFilter(data, v, this.options)),\n startWith(searchDataFilter(data, this._control.value, this.options)),\n )\n }\n\n public filterState(): DataFilterState {\n return {\n // id:\n name: this.name,\n state: {\n value: this._control.value,\n options: this.options\n }\n }\n }\n\n}\n","import { coerceArray } from '@angular/cdk/coercion'\nimport { Component, forwardRef, Inject, Input, OnDestroy, OnInit, Optional } from '@angular/core'\nimport { FormControl } from '@angular/forms'\nimport { Observable, of } from 'rxjs'\nimport { map, shareReplay, startWith, switchMap, tap } from 'rxjs/operators'\n\nimport { hasProperty, isNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { DataFilterState, IDataFilter, THESEAM_DATA_FILTER, THESEAM_DATA_FILTER_OPTIONS } from '../../data-filter'\nimport { THESEAM_DATA_FILTER_CONTAINER } from '../../data-filter-container'\nimport type { DataFilterContainer } from '../../data-filter-container'\nimport { textDataFilter } from '../data-filter-text/data-filter-text.component'\nimport { ITextFilterOptions } from '../data-filter-text/text-filter-options'\n\n\nexport const DATA_FILTER_TOGGLE_BUTTON: any = {\n provide: THESEAM_DATA_FILTER,\n // tslint:disable-next-line:no-use-before-declare\n useExisting: forwardRef(() => DataFilterToggleButtonsComponent),\n multi: true,\n}\n\nexport interface IToggleButton {\n name: string\n value: string\n comparator?: (value: any, row: any, index: number) => -1 | 0 | 1\n}\n\nexport interface IToggleButtonsFilterOptions extends ITextFilterOptions {\n selectionToggleable: boolean\n multiple: boolean\n buttons: IToggleButton[]\n initialValue?: any\n}\n\nexport const DefaultToggleButtonsFilterOptions: IToggleButtonsFilterOptions = {\n properties: undefined,\n omitProperties: undefined,\n multiple: false,\n selectionToggleable: false,\n buttons: [],\n exact: false,\n caseSensitive: false\n}\n\nexport function toggleButtonsFilter(data: any[], values: string[], options = DefaultToggleButtonsFilterOptions) {\n if (!data || !values) {\n return data\n }\n\n const customComparatorBtns: IToggleButton[] = []\n for (const btn of options.buttons) {\n if (btn.comparator) {\n customComparatorBtns.push(btn)\n }\n }\n\n let _data = data\n for (const val of values) {\n if (val === '') { continue }\n\n let cmp\n for (const btn of customComparatorBtns) {\n if (btn.value === val) {\n cmp = btn.comparator\n }\n }\n if (cmp) {\n const filtered: any[] = []\n for (let i = 0; i < _data.length; i++) {\n if (cmp(val, _data[i], i) !== -1) {\n filtered.push(_data[i])\n }\n }\n _data = filtered\n } else {\n _data = textDataFilter(_data, val, {\n properties: options.properties,\n omitProperties: options.omitProperties,\n exact: options.exact,\n caseSensitive: options.caseSensitive\n })\n }\n }\n return _data\n}\n\nlet _uid = 0\n\n@Component({\n selector: 'seam-data-filter-toggle-buttons',\n templateUrl: './data-filter-toggle-buttons.component.html',\n styleUrls: ['./data-filter-toggle-buttons.component.scss'],\n providers: [ DATA_FILTER_TOGGLE_BUTTON ]\n})\nexport class DataFilterToggleButtonsComponent implements OnInit, OnDestroy, IDataFilter {\n\n public readonly name = 'toggle-buttons'\n public readonly uid = `toggle-buttons__${_uid++}`\n\n _control = new FormControl()\n\n @Input() properties = this._optDefault('properties')\n @Input() omitProperties = this._optDefault('omitProperties')\n @Input() multiple = this._optDefault('multiple')\n @Input() selectionToggleable = this._optDefault('selectionToggleable')\n @Input() buttons = this._optDefault('buttons')\n @Input() exact = this._optDefault('exact')\n @Input() caseSensitive = this._optDefault('caseSensitive')\n\n @Input()\n set value(value: string | string[]) {\n const _value = !isNullOrUndefined(value) ? coerceArray(value) : undefined\n // console.log('_value', _value, this._control.value)\n if (this._control.value !== _value) {\n this._control.setValue(_value)\n }\n }\n\n public readonly filterStateChanges: Observable<DataFilterState>\n\n constructor(\n @Inject(THESEAM_DATA_FILTER_CONTAINER) private _filterContainer: DataFilterContainer,\n @Optional() @Inject(THESEAM_DATA_FILTER_OPTIONS) private _filterOptions: IToggleButtonsFilterOptions | null\n ) {\n this.filterStateChanges = this._control.valueChanges.pipe(\n tap(v => console.log('v', v)),\n switchMap(() => of(this.filterState())),\n tap(v => console.log('v2', v)),\n shareReplay({ bufferSize: 1, refCount: true })\n )\n }\n\n ngOnInit() {\n this._filterContainer.addFilter(this)\n if (this._filterOptions && hasProperty(this._filterOptions, 'initialValue')) {\n this.value = this._optDefault('initialValue')\n }\n }\n\n ngOnDestroy() { this._filterContainer.removeFilter(this) }\n\n private _optDefault<K extends keyof IToggleButtonsFilterOptions>(prop: K) {\n if (this._filterOptions && this._filterOptions.hasOwnProperty(prop)) {\n return this._filterOptions[prop]\n }\n return DefaultToggleButtonsFilterOptions[prop]\n }\n\n get options(): IToggleButtonsFilterOptions {\n return {\n properties: this.properties,\n omitProperties: this.omitProperties,\n multiple: this.multiple,\n selectionToggleable: this.selectionToggleable,\n buttons: this.buttons,\n exact: this.exact,\n caseSensitive: this.caseSensitive\n }\n }\n\n public filter<T>(data: T[]): Observable<T[]> {\n return this._control.valueChanges\n .pipe(\n map(v => toggleButtonsFilter(data, coerceArray(v), this.options)),\n startWith(toggleButtonsFilter(data, coerceArray(this._control.value), this.options)),\n )\n }\n\n public filterState(): DataFilterState {\n return {\n // id:\n name: this.name,\n state: {\n value: this._control.value,\n options: this.options\n }\n }\n }\n\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\n\nimport { TheSeamFormFieldModule } from '@theseam/ui-common/form-field'\nimport { TheSeamIconModule } from '@theseam/ui-common/icon'\nimport { TheSeamToggleGroupModule } from '@theseam/ui-common/toggle-group'\n\nimport { THESEAM_DATA_FILTER_DEF } from './data-filter-def'\nimport { DataFilterSearchComponent } from './filters/data-filter-search/data-filter-search.component'\nimport { DataFilterTextComponent } from './filters/data-filter-text/data-filter-text.component'\nimport { DataFilterToggleButtonsComponent } from './filters/data-filter-toggle-buttons/data-filter-toggle-buttons.component'\n\nconst filterComponents = [\n DataFilterSearchComponent,\n DataFilterTextComponent,\n DataFilterToggleButtonsComponent\n]\n\nconst filterDefProviders = [\n { provide: THESEAM_DATA_FILTER_DEF, useValue: { name: 'search', component: DataFilterSearchComponent }, multi: true },\n { provide: THESEAM_DATA_FILTER_DEF, useValue: { name: 'text', component: DataFilterTextComponent }, multi: true },\n { provide: THESEAM_DATA_FILTER_DEF, useValue: { name: 'toggle-buttons', component: DataFilterToggleButtonsComponent }, multi: true },\n]\n\n@NgModule({\n declarations: [\n ...filterComponents\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n TheSeamFormFieldModule,\n FontAwesomeModule,\n TheSeamToggleGroupModule,\n TheSeamIconModule\n ],\n providers: [\n ...filterDefProviders\n ],\n exports: [\n ...filterComponents\n ],\n entryComponents: [\n ...filterComponents\n ]\n})\nexport class TheSeamDataFiltersModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["_uid"],"mappings":";;;;;;;;;;;;;;;MAwDa,mBAAmB,GAAG,IAAI,cAAc,CAAa,mBAAmB,EAAC;MACzE,2BAA2B,GAAG,IAAI,cAAc,CAAK,0BAA0B,EAAC;SAE7E,cAAc,CAAI,QAA4B;IAC5D,OAAO,CAAC,OAAwB,KAC9B,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAA;AACrC,CAAC;SAEe,kBAAkB,CAAC,OAAqB;IACtD,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1E,OAAO,CAAC,OAAwB;QAC9B,IAAI,IAAI,GAAG,OAAO,CAAA;QAClB,KAAK,MAAM,CAAC,IAAI,eAAe,EAAE;YAC/B,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,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AC,6BAA6B;4CACpC,QAAQ,YAAI,MAAM,SAAC,2BAA2B;;;yBArBhD,KAAK;6BACL,KAAK;uBACL,KAAK;kCACL,KAAK;sBACL,KAAK;oBACL,KAAK;4BACL,KAAK;oBAEL,KAAK;;;AC/FR,MAAM,gBAAgB,GAAG;IACvB,yBAAyB;IACzB,uBAAuB;IACvB,gCAAgC;CACjC,CAAA;WAG+C,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,yBAAyB,EAAE,OACxD,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,OACpD,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,gCAAgC,EAAE;AAHvH,MAAM,kBAAkB,GAAG;IACzB,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,IAA0D,EAAE,KAAK,EAAE,IAAI,EAAE;IACrH,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,IAAsD,EAAE,KAAK,EAAE,IAAI,EAAE;IACjH,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,IAAyE,EAAE,KAAK,EAAE,IAAI,EAAE;CACrI,CAAA;MAwBY,wBAAwB;;;YAtBpC,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,GAAG,gBAAgB;iBACpB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,sBAAsB;oBACtB,iBAAiB;oBACjB,wBAAwB;oBACxB,iBAAiB;iBAClB;gBACD,SAAS,EAAE;oBACT,GAAG,kBAAkB;iBACtB;gBACD,OAAO,EAAE;oBACP,GAAG,gBAAgB;iBACpB;gBACD,eAAe,EAAE;oBACf,GAAG,gBAAgB;iBACpB;aACF;;;AChDD;;;;;;"}
|
|
@@ -265,7 +265,7 @@ DatatableDynamicActionMenuComponent.decorators = [
|
|
|
265
265
|
selector: 'seam-datatable-dynamic-action-menu',
|
|
266
266
|
template: "<seam-menu #menu\n menuClass=\"list-group py-0 border-0 seam-datatable-action-menu\"\n animationType=\"fade\">\n\n <ng-container *ngFor=\"let record of _menuRecords$ | async\">\n\n <a *ngIf=\"record.elementType === 'a'\"\n seamMenuItem\n [seamDatatableDynamicActionMenuItem]=\"record\"\n class=\"list-group-item list-group-item-action py-1\">{{ record.rowAction.label }}</a>\n\n <button *ngIf=\"record.elementType === 'button'\"\n seamMenuItem\n [seamDatatableDynamicActionMenuItem]=\"record\"\n type=\"button\"\n class=\"list-group-item list-group-item-action py-1\">{{ record.rowAction.label }}</button>\n\n </ng-container>\n\n <!-- <ng-container *ngIf=\"(item.routerLink || item.href) && !item.confirmDialog; else noRouterLink\">\n <a *ngIf=\"item.href; else noHref\"\n seamMenuItem\n class=\"list-group-item list-group-item-action py-1\"\n [attr.href]=\"item.href\"\n [target]=\"item.target\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </a>\n <ng-template #noHref>\n <a seamMenuItem\n class=\"list-group-item list-group-item-action py-1\"\n [queryParams]=\"item.queryParams\"\n [fragment]=\"item.fragment\"\n [queryParamsHandling]=\"item.queryParamsHandling\"\n [preserveFragment]=\"item.preserveFragment\"\n [skipLocationChange]=\"item.skipLocationChange\"\n [replaceUrl]=\"item.replaceUrl\"\n [state]=\"item.state\"\n [routerLink]=\"item.routerLink\"\n [target]=\"item.target\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </a>\n </ng-template>\n </ng-container>\n <ng-template #noRouterLink>\n <button seamMenuItem\n type=\"button\"\n class=\"list-group-item list-group-item-action py-1\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </button>\n </ng-template>\n </ng-container> -->\n</seam-menu>\n\n<button type=\"button\" class=\"datatable-action-button btn\"\n [seamMenuToggle]=\"menu\"\n [positions]=\"$any(_actionMenuPositions)\"\n title=\"Row Actions\">\n <seam-icon [icon]=\"faEllipsisH\"></seam-icon>\n</button>\n",
|
|
267
267
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
268
|
-
styles: [":host{display:block;position:relative}.datatable-action-button{font-size:20px;line-height:20px;width:30px;height:30px;padding:0;border-radius:15px;text-align:center}.datatable-action-button::ng-deep .svg-inline--fa{vertical-align:middle}"]
|
|
268
|
+
styles: [":host{display:block;position:relative}.datatable-action-button{font-size:20px;line-height:20px;width:30px;height:30px;padding:0;border-radius:15px;text-align:center}.datatable-action-button::ng-deep .svg-inline--fa{vertical-align:middle}\n"]
|
|
269
269
|
},] }
|
|
270
270
|
];
|
|
271
271
|
DatatableDynamicActionMenuComponent.ctorParameters = () => [
|
|
@@ -316,7 +316,7 @@ DatatableDynamicFilterContainerComponent.decorators = [
|
|
|
316
316
|
selector: 'seam-datatable-dynamic-filter-container',
|
|
317
317
|
template: "<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>\n",
|
|
318
318
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
319
|
-
styles: [":host{display:block}"]
|
|
319
|
+
styles: [":host{display:block}\n"]
|
|
320
320
|
},] }
|
|
321
321
|
];
|
|
322
322
|
DatatableDynamicFilterContainerComponent.ctorParameters = () => [
|
|
@@ -941,7 +941,7 @@ DatatableDynamicComponent.decorators = [
|
|
|
941
941
|
DynamicDatatableRowActionsService
|
|
942
942
|
],
|
|
943
943
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
944
|
-
styles: [":host{display:flex;flex-direction:column}"]
|
|
944
|
+
styles: [":host{display:flex;flex-direction:column}\n"]
|
|
945
945
|
},] }
|
|
946
946
|
];
|
|
947
947
|
DatatableDynamicComponent.ctorParameters = () => [
|