@coolon/angular-ui-powerups 11.0.0-alpha.9 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/coolon-angular-ui-powerups.umd.js +220 -30
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js +13 -2
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js +6 -3
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/table/column-model.js +7 -0
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/components/track-by.js +5 -1
- package/esm2015/lib/components/track-by.js.map +1 -1
- package/esm2015/lib/directives/directives.module.js +8 -2
- package/esm2015/lib/directives/directives.module.js.map +1 -1
- package/esm2015/lib/directives/directives.module.metadata.json +1 -1
- package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
- package/esm2015/lib/directives/exports.js +2 -0
- package/esm2015/lib/directives/exports.js.map +1 -1
- package/esm2015/lib/directives/exports.metadata.json +1 -1
- package/esm2015/lib/directives/highlight-text-model.directive.js +25 -0
- package/esm2015/lib/directives/highlight-text-model.directive.js.map +1 -0
- package/esm2015/lib/directives/highlight-text-model.directive.metadata.json +1 -0
- package/esm2015/lib/directives/highlight-text-model.directive.ngfactory.js.map +1 -0
- package/esm2015/lib/directives/highlight.pipe.js +43 -0
- package/esm2015/lib/directives/highlight.pipe.js.map +1 -0
- package/esm2015/lib/directives/highlight.pipe.metadata.json +1 -0
- package/esm2015/lib/directives/highlight.pipe.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +10 -15
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/services/exports.js +5 -0
- package/esm2015/lib/services/exports.js.map +1 -0
- package/esm2015/lib/services/exports.metadata.json +1 -0
- package/esm2015/lib/services/visibility-service.js +74 -0
- package/esm2015/lib/services/visibility-service.js.map +1 -0
- package/esm2015/lib/services/visibility-service.metadata.json +1 -0
- package/esm2015/lib/services/visibility-service.ngfactory.js.map +1 -0
- package/esm2015/public-api.js +1 -0
- package/esm2015/public-api.js.map +1 -1
- package/esm2015/public-api.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +187 -30
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +3 -1
- package/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.d.ts +2 -1
- package/lib/components/table/column-model.d.ts +5 -0
- package/lib/components/track-by.d.ts +3 -1
- package/lib/directives/exports.d.ts +2 -0
- package/lib/directives/highlight-text-model.directive.d.ts +7 -0
- package/lib/directives/highlight.pipe.d.ts +11 -0
- package/lib/place/components/abstract-place-navigation.component.d.ts +1 -1
- package/lib/services/exports.d.ts +4 -0
- package/lib/services/visibility-service.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/schematics/aup-i18n/index.js +8 -28
- package/schematics/aup-i18n/index.js.map +1 -1
- package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +80 -0
- package/schematics/bootstrap-app/index.js +5 -4
- package/schematics/bootstrap-app/index.js.map +1 -1
- package/schematics/bootstrap-app/templates/{i18n/config.json.template → i18n.config.json.template} +2 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/place-add/index.js +4 -5
- package/schematics/place-add/index.js.map +1 -1
- package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +3 -1
- package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +5 -0
- package/schematics/aup-i18n/templates/i18n/aup/components.yml.template +0 -69
- package/schematics/bootstrap-app/templates/i18n/notifications.yml.template +0 -19
- package/schematics/place-add/templates/files/i18n/places/__name@dasherize__.yml.template +0 -7
- /package/schematics/bootstrap-app/templates/{app → src/app}/app-routing.module.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/app.component.html.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/app.component.scss.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/app.component.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/app.module.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/i18n.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.ijmap +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.svg +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/README.md +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/codepoints +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/material-icons.css +0 -0
- /package/schematics/bootstrap-app/templates/{index.html.template → src/index.html.template} +0 -0
- /package/schematics/bootstrap-app/templates/{styles → src/styles}/global-variables.scss.template +0 -0
- /package/schematics/bootstrap-app/templates/{styles.scss.template → src/styles.scss.template} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/table/column-model.ts"],"names":[],"mappings":";AAEA,OAAO,EAEL,wBAAwB,EACxB,oBAAoB,EAEpB,iBAAiB,EAMlB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MA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AAI,CAAC,iBAAiB,CAAC,KAAK,GAAG,CAAC,CAAC,cAAc,CAAC;IAClD,CAAC;IAES,oBAAoB;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,8BAA8B;QAC5B,OAAO,IAAI,CAAC,+BAA+B,EAAE,CAAC;IAChD,CAAC;IAED,gBAAgB,CAAC,gBAAyB;QACxC,6EAA6E;QAC7E,wCAAwC;QACxC,OAAO,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IAED,oBAAoB,CAAC,MAAe;QAClC,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,GAAQ;QAChB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,UAAU,CAAC,GAAQ;QACjB,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport {\n Command,\n DelegatingSelectionModel,\n DelegatingValueModel,\n DirtyTrackingForm,\n MutableValueModel,\n SelectionModel,\n Types,\n UnaryCommand,\n Validator,\n ValueModel\n} from '@coolon/pectin';\nimport { assert, Stringy } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport _ from 'lodash';\nimport { CellEditorComponent, CellListEditorComponent } from './cell-editors';\nimport {\n CellEditorPortalRef,\n CellHeaderPortalRef,\n CellRendererPortalRef,\n ComponentCellRendererPortalRef,\n TemplateCellRendererPortalRef\n} from './cell-portal-ref';\nimport { CellRenderer } from './cell-renderer';\nimport { ColumnTextProperties } from './column-text-properties';\nimport { DefaultCellRendererComponent } from './default-cell-renderer/default-cell-renderer.component';\nimport { DefaultHeaderCellRendererComponent } from './default-header-cell-renderer/default-header-cell-renderer.component';\nimport { EditRowControls } from './edit-row-controls/edit-row-controls.component';\nimport { EditSession } from './edit-session';\nimport { MutableCellRenderer } from './mutable-cell-renderer';\nimport { SelectCellRendererComponent } from './select-cell-renderer/select-cell-renderer.component';\nimport { SelectHeaderCellRendererComponent } from './select-header-cell-renderer/select-header-cell-renderer.component';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\n\n\nconst noop = () => {\n};\n\nexport interface RowData<Row> {\n row: Row;\n editSession?: EditSession<Row>;\n editRowCommand: Command<void>;\n}\n\nconst CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol('aup-cell-renderer:row-data-cache');\n\nexport type OnComponentInit<C> = (component: C) => void;\n\nexport interface CellRendererOptions<Row, E> {\n onComponentInit?: (component: E) => void;\n onRowUpdate?: (component: E, row: Row) => void;\n}\n\n\nexport interface MutableCellRendererOptions<Row, E, P extends keyof Row> extends CellRendererOptions<Row, E> {\n onValueEdit: (row: Row, is: Row[P], was: Row[P]) => void;\n}\n\nexport class ColumnModel<Row> {\n\n private _columnTextProperties: ColumnTextProperties;\n\n private _columnHeaderPortalRef: CellHeaderPortalRef<Row, any>;\n private _cellRendererPortalRef: CellRendererPortalRef<Row, any>;\n private _cellEditorPortalRef: CellEditorPortalRef<Row, any>;\n\n private _selectRowOnClick = undefined;\n private _flex = false;\n\n private _visibleModel = new DelegatingValueModel<boolean>().withDefault(true);\n readonly dasherisedColumnId: string;\n\n constructor(readonly columnId: string, private textPropertiesProvider: ColumnModel.TextPropertiesProvider) {\n this.installHeaderRenderer();\n this.dasherisedColumnId = Stringy.from(columnId).dasherize().toString();\n }\n\n protected installHeaderRenderer() {\n this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {\n component.headerText = column.getHeaderText();\n });\n }\n\n @Memoize()\n getHeaderText(): string {\n return this.getColumnTextProperties()?.headerText() || this.getDefaultHeaderText();\n }\n\n isVisible() {\n return this.visible.value;\n }\n\n get visible() {\n return this._visibleModel.readonly;\n }\n\n visibleWhile(visible: ValueModel<boolean>): this {\n this._visibleModel.setDelegate(visible);\n return this;\n }\n\n protected getDefaultHeaderText() {\n return this.columnId;\n }\n\n @Memoize()\n getColumnTextProperties(): ColumnTextProperties {\n return this._columnTextProperties || this.textPropertiesProvider();\n }\n\n textProperties(columnTextProperties: ColumnTextProperties): this {\n this._columnTextProperties = columnTextProperties;\n return this;\n }\n\n protected configureHeaderRenderer<C>(config: CellHeaderPortalRef<Row, any>): void {\n this._columnHeaderPortalRef = config;\n }\n\n protected configureCellRenderer<C>(config: CellRendererPortalRef<Row, any>): void {\n this._cellRendererPortalRef = config;\n }\n\n protected configureCellEditor<E>(cellEditor: CellEditorPortalRef<Row, E>): void {\n this._cellEditorPortalRef = cellEditor;\n }\n\n cellHeaderRenderer<C>(componentType: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): this {\n this.configureHeaderRenderer(new CellHeaderPortalRef<Row, C>(componentType, initialiser));\n return this;\n }\n\n flex(flex = true) {\n this._flex = flex;\n }\n\n isFlex() {\n return this._flex;\n }\n\n hasEditorPortal() {\n return !!this._cellEditorPortalRef;\n }\n\n attachHeaderCell(host: any) {\n this._columnHeaderPortalRef.initialiseHost(host, this);\n }\n\n attachCell(host: any) {\n this._cellRendererPortalRef.initialiseHost(host, this);\n if (this.hasEditorPortal()) {\n this._cellEditorPortalRef.initialiseHost(host, this);\n }\n }\n\n onHeaderAttached(host: TableHeaderCellRendererComponent, component: any) {\n this._columnHeaderPortalRef.onPortalAttached(host, component);\n }\n\n onRendererAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellRendererPortalRef.onPortalAttached(host, component);\n }\n\n // @Trace()\n onEditorAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellEditorPortalRef.onPortalAttached(host, component);\n }\n\n updatePortalContent(host: TableCellRendererComponent<Row>) {\n this._cellRendererPortalRef.pushState(host);\n }\n\n protected selectRowOnClick(selectOnRowClick: boolean): this {\n this._selectRowOnClick = selectOnRowClick;\n return this;\n }\n\n isRowSelectionEnabled(): boolean | undefined {\n return this._selectRowOnClick;\n }\n\n isRowSelectionExplicitlyEnabled(): boolean {\n return this._selectRowOnClick === true;\n }\n\n isRowSelectionExplicitlyDisabled(): boolean {\n return this._selectRowOnClick === false;\n }\n}\n\nexport namespace ColumnModel {\n export type TextPropertiesProvider = () => ColumnTextProperties\n}\n\n\nexport class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {\n\n\n private _format: (value: Row[P]) => any = (value) => value;\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.TextPropertiesProvider) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, options?: CellRendererOptions<Row, E>): this\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInit?: OnComponentInit<E>): this\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInitOrOptions?: CellRendererOptions<Row, E> | OnComponentInit<E>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this._format(rowData.row[this.property]);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n }));\n return this;\n }\n\n liveEditCellRenderer<E extends MutableCellRenderer<Row[P]>>(componentType: ComponentType<E>, options: MutableCellRendererOptions<Row, E, P>): this {\n return this.mutableCellRenderer(componentType, options);\n }\n\n /**\n * Deprecated. Use #liveEditCellRenderer instead.\n * @param componentType\n * @param options\n */\n mutableCellRenderer<E extends MutableCellRenderer<Row[P]>>(componentType: ComponentType<E>, options: MutableCellRendererOptions<Row, E, P>): this {\n\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n\n // keep a local copy most recent row value so it's available to teh\n // edit callback without having to add/remove subscribers all the time.\n component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;\n let disableEditCallback = false;\n\n if (firstTime) {\n if (_.isFunction(options?.onComponentInit)) {\n options.onComponentInit(component);\n }\n // install our edit callback\n component.onValueEdited((is, was) => {\n if (!disableEditCallback) {\n options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);\n }\n });\n\n }\n\n // now push the value the component and disable the callback just incase the component misbehaves\n // and fires a value change during the operation.\n disableEditCallback = true;\n component.value = rowData.row[this.property];\n disableEditCallback = false;\n\n if (!_.isFunction(options) && _.isFunction(options?.onRowUpdate)) {\n options.onRowUpdate(component, rowData.row);\n }\n\n }));\n return this;\n }\n\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validators?: Validator<Row[P]>[], initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validatorsOrInitialiser?: Validator<Row[P]>[] | ((component: E) => void), onComponentInit?: (component: E) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: E, editSession: EditSession<Row>) => {\n const formValueModel = editSession.form.pluck(this.property);\n if (validators) {\n formValueModel.validateUsing(validators);\n }\n component.valueModel = formValueModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Row[P]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {\n\n private _format: (value: Types.ArrayElementType<Row, P>[]) => any = (value) => value.map(v => v?.toString()).join(', ');\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.TextPropertiesProvider) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Types.ArrayElementType<Row, P>[] }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this._format(rowData.row[this.property]);\n }));\n return this;\n }\n\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validators?: Validator<Types.ArrayElementType<Row, P>[]>[], initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validatorsOrInitialiser?: Validator<Types.ArrayElementType<Row, P>[]>[] | ((component: C) => void), initialiseComponent?: (component: C) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;\n\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: C, editSession: EditSession<Row>) => {\n const formListModel = editSession.form.pluckList(this.property);\n if (validators) {\n formListModel.validateUsing(validators);\n }\n component.listModel = formListModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Types.ArrayElementType<Row, P>[]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider, private getValue: (row: Row) => V) {\n super(columnId, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<C extends { value: V }>(componentType: ComponentType<C>, onComponentInitOrOptions?: CellRendererOptions<Row, C> | OnComponentInit<C>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this.getValue(rowData.row);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n }));\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class EditorControlColumnModel<Row> extends ColumnModel<Row> {\n\n constructor(columnId: string, saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>, defaults: ColumnModel.TextPropertiesProvider) {\n super(columnId, defaults);\n this.cellRenderer(EditRowControls);\n }\n\n cellRenderer(componentType: ComponentType<{ row: Row, editSession: EditSession<Row>, editRowCommand: Command<void> }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.editSession = rowData.editSession;\n component.editRowCommand = rowData.editRowCommand;\n }));\n return this;\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\nexport class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {\n private readonly config = new TemplateCellRendererPortalRef<Row>();\n\n constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider) {\n super(columnId, defaults);\n this.configureCellRenderer(this.config);\n }\n\n setTemplate(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class SelectionColumnModel<Row> extends ColumnModel<Row> {\n\n private _enableHeaderControls = true;\n readonly selectionModel = DelegatingSelectionModel.createDelegate<Row, unknown>();\n private hasSelectionModel = new MutableValueModel<boolean>(false);\n\n constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider, selectionModel: SelectionModel<Row>) {\n super(columnId, defaults);\n this.selectOnRowClick(false);\n this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {\n component.selectionModel = this.selectionModel;\n component.enableHeaderControls = this._enableHeaderControls;\n });\n this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.selectionModel = this.selectionModel;\n }));\n this.setSelectionModel(selectionModel);\n this.visibleWhile(this.hasSelectionModel);\n }\n\n setSelectionModel(selectionModel: SelectionModel<Row>) {\n this.selectionModel.setDelegate(selectionModel);\n this.hasSelectionModel.value = !!selectionModel;\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n\n isRowSelectionEnabledByDefault(): boolean | undefined {\n return this.isRowSelectionExplicitlyEnabled();\n }\n\n selectOnRowClick(selectOnRowClick: boolean): this {\n // note we're using different method name as the selection column treats this\n // state as the default for all columns.\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n enableHeaderControls(enable: boolean): this {\n this._enableHeaderControls = enable;\n return this;\n }\n\n selectRow(row: Row) {\n this.selectionModel.selectCommand.execute(row);\n }\n\n isSelected(row: Row) {\n return this.selectionModel.isSelected(row);\n }\n}\n\n\n"]}
|
|
1
|
+
{"version":3,"file":"column-model.js","sourceRoot":"","sources":["../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IAAI,CAAC,cAAc,CAAC;QACjD,CAAC,CAAC,CAAC,CAAC;QACJ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;QACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC5C,CAAC;IAED,iBAAiB,CAAC,cAAmC;QACnD,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QAChD,IAAI,CAAC,iBAAiB,CAAC,KAAK,GAAG,CAAC,CAAC,cAAc,CAAC;IAClD,CAAC;IAES,oBAAoB;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,8BAA8B;QAC5B,OAAO,IAAI,CAAC,+BAA+B,EAAE,CAAC;IAChD,CAAC;IAED,gBAAgB,CAAC,gBAAyB;QACxC,6EAA6E;QAC7E,wCAAwC;QACxC,OAAO,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IAED,oBAAoB,CAAC,MAAe;QAClC,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,GAAQ;QAChB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,UAAU,CAAC,GAAQ;QACjB,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport {\n Command,\n DelegatingSelectionModel,\n DelegatingValueModel,\n DirtyTrackingForm,\n MutableValueModel,\n SelectionModel,\n Types,\n UnaryCommand,\n Validator,\n ValueModel\n} from '@coolon/pectin';\nimport { assert, Stringy } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport _ from 'lodash';\nimport { deprecate } from 'util';\nimport { CellEditorComponent, CellListEditorComponent } from './cell-editors';\nimport {\n CellEditorPortalRef,\n CellHeaderPortalRef,\n CellRendererPortalRef,\n ComponentCellRendererPortalRef,\n TemplateCellRendererPortalRef\n} from './cell-portal-ref';\nimport { CellRenderer } from './cell-renderer';\nimport { ColumnTextProperties } from './column-text-properties';\nimport { DefaultCellRendererComponent } from './default-cell-renderer/default-cell-renderer.component';\nimport { DefaultHeaderCellRendererComponent } from './default-header-cell-renderer/default-header-cell-renderer.component';\nimport { EditRowControls } from './edit-row-controls/edit-row-controls.component';\nimport { EditSession } from './edit-session';\nimport { MutableCellRenderer } from './mutable-cell-renderer';\nimport { SelectCellRendererComponent } from './select-cell-renderer/select-cell-renderer.component';\nimport { SelectHeaderCellRendererComponent } from './select-header-cell-renderer/select-header-cell-renderer.component';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\n\n\nconst noop = () => {\n};\n\nexport interface RowData<Row> {\n row: Row;\n editSession?: EditSession<Row>;\n editRowCommand: Command<void>;\n}\n\nconst CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol('aup-cell-renderer:row-data-cache');\n\nexport type OnComponentInit<C> = (component: C) => void;\n\nexport interface CellRendererOptions<Row, E> {\n onComponentInit?: (component: E) => void;\n onRowUpdate?: (component: E, row: Row) => void;\n}\n\n\nexport interface MutableCellRendererOptions<Row, E, P extends keyof Row> extends CellRendererOptions<Row, E> {\n onValueEdit: (row: Row, is: Row[P], was: Row[P]) => void;\n}\n\nexport class ColumnModel<Row> {\n\n private _columnTextProperties: ColumnTextProperties;\n\n private _columnHeaderPortalRef: CellHeaderPortalRef<Row, any>;\n private _cellRendererPortalRef: CellRendererPortalRef<Row, any>;\n private _cellEditorPortalRef: CellEditorPortalRef<Row, any>;\n\n private _selectRowOnClick = undefined;\n private _flex = false;\n\n private _visibleModel = new DelegatingValueModel<boolean>().withDefault(true);\n readonly dasherisedColumnId: string;\n\n constructor(readonly columnId: string, private textPropertiesProvider: ColumnModel.TextPropertiesProvider) {\n this.installHeaderRenderer();\n this.dasherisedColumnId = Stringy.from(columnId).dasherize().toString();\n }\n\n protected installHeaderRenderer() {\n this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {\n component.headerText = column.getHeaderText();\n });\n }\n\n @Memoize()\n getHeaderText(): string {\n return this.getColumnTextProperties()?.headerText() || this.getDefaultHeaderText();\n }\n\n isVisible() {\n return this.visible.value;\n }\n\n get visible() {\n return this._visibleModel.readonly;\n }\n\n visibleWhile(visible: ValueModel<boolean>): this {\n this._visibleModel.setDelegate(visible);\n return this;\n }\n\n protected getDefaultHeaderText() {\n return this.columnId;\n }\n\n @Memoize()\n getColumnTextProperties(): ColumnTextProperties {\n return this._columnTextProperties || this.textPropertiesProvider();\n }\n\n /**\n * @deprecated use #columnTextProperties instead\n * @param columnTextProperties\n */\n textProperties(columnTextProperties: ColumnTextProperties): this {\n return this.columnTextProperties(columnTextProperties)\n }\n\n columnTextProperties(columnTextProperties: ColumnTextProperties): this {\n this._columnTextProperties = columnTextProperties;\n return this;\n }\n\n protected configureHeaderRenderer<C>(config: CellHeaderPortalRef<Row, any>): void {\n this._columnHeaderPortalRef = config;\n }\n\n protected configureCellRenderer<C>(config: CellRendererPortalRef<Row, any>): void {\n this._cellRendererPortalRef = config;\n }\n\n protected configureCellEditor<E>(cellEditor: CellEditorPortalRef<Row, E>): void {\n this._cellEditorPortalRef = cellEditor;\n }\n\n cellHeaderRenderer<C>(componentType: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): this {\n this.configureHeaderRenderer(new CellHeaderPortalRef<Row, C>(componentType, initialiser));\n return this;\n }\n\n flex(flex = true) {\n this._flex = flex;\n }\n\n isFlex() {\n return this._flex;\n }\n\n hasEditorPortal() {\n return !!this._cellEditorPortalRef;\n }\n\n attachHeaderCell(host: any) {\n this._columnHeaderPortalRef.initialiseHost(host, this);\n }\n\n attachCell(host: any) {\n this._cellRendererPortalRef.initialiseHost(host, this);\n if (this.hasEditorPortal()) {\n this._cellEditorPortalRef.initialiseHost(host, this);\n }\n }\n\n onHeaderAttached(host: TableHeaderCellRendererComponent, component: any) {\n this._columnHeaderPortalRef.onPortalAttached(host, component);\n }\n\n onRendererAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellRendererPortalRef.onPortalAttached(host, component);\n }\n\n // @Trace()\n onEditorAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellEditorPortalRef.onPortalAttached(host, component);\n }\n\n updatePortalContent(host: TableCellRendererComponent<Row>) {\n this._cellRendererPortalRef.pushState(host);\n }\n\n protected selectRowOnClick(selectOnRowClick: boolean): this {\n this._selectRowOnClick = selectOnRowClick;\n return this;\n }\n\n isRowSelectionEnabled(): boolean | undefined {\n return this._selectRowOnClick;\n }\n\n isRowSelectionExplicitlyEnabled(): boolean {\n return this._selectRowOnClick === true;\n }\n\n isRowSelectionExplicitlyDisabled(): boolean {\n return this._selectRowOnClick === false;\n }\n}\n\nexport namespace ColumnModel {\n export type TextPropertiesProvider = () => ColumnTextProperties\n}\n\n\nexport class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {\n\n\n private _format: (value: Row[P]) => any = (value) => value;\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.TextPropertiesProvider) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, options?: CellRendererOptions<Row, E>): this\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInit?: OnComponentInit<E>): this\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInitOrOptions?: CellRendererOptions<Row, E> | OnComponentInit<E>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this._format(rowData.row[this.property]);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n }));\n return this;\n }\n\n liveEditCellRenderer<E extends MutableCellRenderer<Row[P]>>(componentType: ComponentType<E>, options: MutableCellRendererOptions<Row, E, P>): this {\n return this.mutableCellRenderer(componentType, options);\n }\n\n /**\n * Deprecated. Use #liveEditCellRenderer instead.\n * @param componentType\n * @param options\n */\n mutableCellRenderer<E extends MutableCellRenderer<Row[P]>>(componentType: ComponentType<E>, options: MutableCellRendererOptions<Row, E, P>): this {\n\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n\n // keep a local copy most recent row value so it's available to teh\n // edit callback without having to add/remove subscribers all the time.\n component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;\n let disableEditCallback = false;\n\n if (firstTime) {\n if (_.isFunction(options?.onComponentInit)) {\n options.onComponentInit(component);\n }\n // install our edit callback\n component.onValueEdited((is, was) => {\n if (!disableEditCallback) {\n options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);\n }\n });\n\n }\n\n // now push the value the component and disable the callback just incase the component misbehaves\n // and fires a value change during the operation.\n disableEditCallback = true;\n component.value = rowData.row[this.property];\n disableEditCallback = false;\n\n if (!_.isFunction(options) && _.isFunction(options?.onRowUpdate)) {\n options.onRowUpdate(component, rowData.row);\n }\n\n }));\n return this;\n }\n\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validators?: Validator<Row[P]>[], initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validatorsOrInitialiser?: Validator<Row[P]>[] | ((component: E) => void), onComponentInit?: (component: E) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: E, editSession: EditSession<Row>) => {\n const formValueModel = editSession.form.pluck(this.property);\n if (validators) {\n formValueModel.validateUsing(validators);\n }\n component.valueModel = formValueModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Row[P]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {\n\n private _format: (value: Types.ArrayElementType<Row, P>[]) => any = (value) => value.map(v => v?.toString()).join(', ');\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.TextPropertiesProvider) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Types.ArrayElementType<Row, P>[] }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this._format(rowData.row[this.property]);\n }));\n return this;\n }\n\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validators?: Validator<Types.ArrayElementType<Row, P>[]>[], initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validatorsOrInitialiser?: Validator<Types.ArrayElementType<Row, P>[]>[] | ((component: C) => void), initialiseComponent?: (component: C) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;\n\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: C, editSession: EditSession<Row>) => {\n const formListModel = editSession.form.pluckList(this.property);\n if (validators) {\n formListModel.validateUsing(validators);\n }\n component.listModel = formListModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Types.ArrayElementType<Row, P>[]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider, private getValue: (row: Row) => V) {\n super(columnId, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<C extends { value: V }>(componentType: ComponentType<C>, onComponentInitOrOptions?: CellRendererOptions<Row, C> | OnComponentInit<C>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this.getValue(rowData.row);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n }));\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class EditorControlColumnModel<Row> extends ColumnModel<Row> {\n\n constructor(columnId: string, saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>, defaults: ColumnModel.TextPropertiesProvider) {\n super(columnId, defaults);\n this.cellRenderer(EditRowControls);\n }\n\n cellRenderer(componentType: ComponentType<{ row: Row, editSession: EditSession<Row>, editRowCommand: Command<void> }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.editSession = rowData.editSession;\n component.editRowCommand = rowData.editRowCommand;\n }));\n return this;\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\nexport class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {\n private readonly config = new TemplateCellRendererPortalRef<Row>();\n\n constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider) {\n super(columnId, defaults);\n this.configureCellRenderer(this.config);\n }\n\n setTemplate(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class SelectionColumnModel<Row> extends ColumnModel<Row> {\n\n private _enableHeaderControls = true;\n readonly selectionModel = DelegatingSelectionModel.createDelegate<Row, unknown>();\n private hasSelectionModel = new MutableValueModel<boolean>(false);\n\n constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider, selectionModel: SelectionModel<Row>) {\n super(columnId, defaults);\n this.selectOnRowClick(false);\n this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {\n component.selectionModel = this.selectionModel;\n component.enableHeaderControls = this._enableHeaderControls;\n });\n this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.selectionModel = this.selectionModel;\n }));\n this.setSelectionModel(selectionModel);\n this.visibleWhile(this.hasSelectionModel);\n }\n\n setSelectionModel(selectionModel: SelectionModel<Row>) {\n this.selectionModel.setDelegate(selectionModel);\n this.hasSelectionModel.value = !!selectionModel;\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n\n isRowSelectionEnabledByDefault(): boolean | undefined {\n return this.isRowSelectionExplicitlyEnabled();\n }\n\n selectOnRowClick(selectOnRowClick: boolean): this {\n // note we're using different method name as the selection column treats this\n // state as the default for all columns.\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n enableHeaderControls(enable: boolean): this {\n this._enableHeaderControls = enable;\n return this;\n }\n\n selectRow(row: Row) {\n this.selectionModel.selectCommand.execute(row);\n }\n\n isSelected(row: Row) {\n return this.selectionModel.isSelected(row);\n }\n}\n\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"error","message":"Lambda not supported","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"error","message":"Lambda not supported","line":39,"character":13},"RowData":{"__symbolic":"interface"},"OnComponentInit":{"__symbolic":"interface"},"CellRendererOptions":{"__symbolic":"interface"},"MutableCellRendererOptions":{"__symbolic":"interface"},"ColumnModel":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"TextPropertiesProvider"}]}],"installHeaderRenderer":[{"__symbolic":"method"}],"getHeaderText":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":87,"character":3}}]}],"isVisible":[{"__symbolic":"method"}],"visibleWhile":[{"__symbolic":"method"}],"getDefaultHeaderText":[{"__symbolic":"method"}],"getColumnTextProperties":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":109,"character":3}}]}],"textProperties":[{"__symbolic":"method"}],"columnTextProperties":[{"__symbolic":"method"}],"configureHeaderRenderer":[{"__symbolic":"method"}],"configureCellRenderer":[{"__symbolic":"method"}],"configureCellEditor":[{"__symbolic":"method"}],"cellHeaderRenderer":[{"__symbolic":"method"}],"flex":[{"__symbolic":"method"}],"isFlex":[{"__symbolic":"method"}],"hasEditorPortal":[{"__symbolic":"method"}],"attachHeaderCell":[{"__symbolic":"method"}],"attachCell":[{"__symbolic":"method"}],"onHeaderAttached":[{"__symbolic":"method"}],"onRendererAttached":[{"__symbolic":"method"}],"onEditorAttached":[{"__symbolic":"method"}],"updatePortalContent":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}],"isRowSelectionEnabled":[{"__symbolic":"method"}],"isRowSelectionExplicitlyEnabled":[{"__symbolic":"method"}],"isRowSelectionExplicitlyDisabled":[{"__symbolic":"method"}]}},"PropertyColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Could not resolve type","line":212,"character":45,"context":{"typeName":"P"}},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"TextPropertiesProvider"}]}],"cellRenderer":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"liveEditCellRenderer":[{"__symbolic":"method"}],"mutableCellRenderer":[{"__symbolic":"method"}],"cellEditor":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"format":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"ListPropertyColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Could not resolve type","line":318,"character":45,"context":{"typeName":"P"}},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"TextPropertiesProvider"}]}],"cellRenderer":[{"__symbolic":"method"}],"cellEditor":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"format":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"CustomValueColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"TextPropertiesProvider"},{"__symbolic":"error","message":"Expression form not supported","line":362,"character":96}]}],"cellRenderer":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"EditorControlColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@coolon/pectin","name":"UnaryCommand","line":395,"character":45,"arguments":[{"__symbolic":"reference","module":"@coolon/pectin","name":"DirtyTrackingForm","line":395,"character":58,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":395,"character":76,"context":{"typeName":"Row"}}]},{"__symbolic":"reference","name":"boolean"}]},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"TextPropertiesProvider"}]}],"cellRenderer":[{"__symbolic":"method"}],"getDefaultHeaderText":[{"__symbolic":"method"}]}},"CustomTemplateColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"TextPropertiesProvider"}]}],"setTemplate":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"SelectionColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"TextPropertiesProvider"},{"__symbolic":"reference","module":"@coolon/pectin","name":"SelectionModel","line":438,"character":94,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":438,"character":109,"context":{"typeName":"Row"}}]}]}],"setSelectionModel":[{"__symbolic":"method"}],"getDefaultHeaderText":[{"__symbolic":"method"}],"isRowSelectionEnabledByDefault":[{"__symbolic":"method"}],"selectOnRowClick":[{"__symbolic":"method"}],"enableHeaderControls":[{"__symbolic":"method"}],"selectRow":[{"__symbolic":"method"}],"isSelected":[{"__symbolic":"method"}]}}}}]
|
package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js
CHANGED
|
@@ -12,7 +12,7 @@ export class DefaultCellRendererComponent {
|
|
|
12
12
|
DefaultCellRendererComponent.decorators = [
|
|
13
13
|
{ type: Component, args: [{
|
|
14
14
|
selector: 'aup-default-cell-renderer',
|
|
15
|
-
template: "
|
|
15
|
+
template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n",
|
|
16
16
|
styles: [""]
|
|
17
17
|
},] }
|
|
18
18
|
];
|
package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-cell-renderer.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/table/default-cell-renderer/default-cell-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOjD,MAAM,OAAO,4BAA4B;IAYvC;IACA,CAAC;IAVD,IACI,KAAK,CAAC,KAAQ;QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;;;YAfF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC
|
|
1
|
+
{"version":3,"file":"default-cell-renderer.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/table/default-cell-renderer/default-cell-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOjD,MAAM,OAAO,4BAA4B;IAYvC;IACA,CAAC;IAVD,IACI,KAAK,CAAC,KAAQ;QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;;;YAfF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,+DAAqD;;aAEtD;;;;oBAIE,KAAK","sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'aup-default-cell-renderer',\n templateUrl: './default-cell-renderer.component.html',\n styleUrls: ['./default-cell-renderer.component.scss']\n})\nexport class DefaultCellRendererComponent<T> {\n private _value: T;\n\n @Input()\n set value(value: T) {\n this._value = value;\n }\n\n get value(): T {\n return this._value;\n }\n\n constructor() {\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"DefaultCellRendererComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"aup-default-cell-renderer","template":"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"DefaultCellRendererComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"aup-default-cell-renderer","template":"<span [innerHTML]=\"value| aupHighlight\"></span>\n","styles":[""]}]}],"members":{"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}]}}}}]
|
|
@@ -136,7 +136,7 @@ TableComponent.decorators = [
|
|
|
136
136
|
{ type: Component, args: [{
|
|
137
137
|
selector: 'aup-table',
|
|
138
138
|
template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\" [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n",
|
|
139
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:
|
|
139
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}"]
|
|
140
140
|
},] }
|
|
141
141
|
];
|
|
142
142
|
TableComponent.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TableComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../resize-aware.component","name":"ResizeAwareComponent","line":87,"character":41},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":82,"character":1},"arguments":[{"selector":"aup-table","template":"<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\" [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n","styles":[":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TableComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../resize-aware.component","name":"ResizeAwareComponent","line":87,"character":41},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":82,"character":1},"arguments":[{"selector":"aup-table","template":"<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\" [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n","styles":[":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}"]}]}],"members":{"tableModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":89,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":90,"character":3}}]}],"showHeaderModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":94,"character":3},"arguments":[{"defaultValue":true}]}]}],"showHeader":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":97,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":98,"character":3},"arguments":["showHeaderModel"]}]}],"enableScrolling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":106,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":107,"character":3},"arguments":["class.enable-scrolling"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":121,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":121,"character":46}]}],"hideHeader":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":142,"character":3},"arguments":["class.hide-header"]}]}],"ngOnInit":[{"__symbolic":"method"}],"isEditing":[{"__symbolic":"method"}],"registerColumnTemplate":[{"__symbolic":"method"}],"notifyCellClicked":[{"__symbolic":"method"}],"isFirstVisibleColumn":[{"__symbolic":"method"}],"isLastVisibleColumn":[{"__symbolic":"method"}],"getColumnClasses":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export var TrackBy;
|
|
2
2
|
(function (TrackBy) {
|
|
3
|
-
TrackBy.byIndex = (
|
|
3
|
+
TrackBy.byIndex = (index, item) => index;
|
|
4
|
+
function trackByProperty(property) {
|
|
5
|
+
return (index, item) => item[property];
|
|
6
|
+
}
|
|
7
|
+
TrackBy.trackByProperty = trackByProperty;
|
|
4
8
|
})(TrackBy || (TrackBy = {}));
|
|
5
9
|
//# sourceMappingURL=track-by.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track-by.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/components/track-by.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"track-by.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/components/track-by.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,OAAO,CAMvB;AAND,WAAiB,OAAO;IACT,eAAO,GAAwB,CAAC,KAAY,EAAE,IAAS,EAAE,EAAE,CAAC,KAAK,CAAC;IAE/E,SAAgB,eAAe,CAAuB,QAAW;QAC/D,OAAO,CAAC,KAAY,EAAE,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;IAFe,uBAAe,kBAE9B,CAAA;AACH,CAAC,EANgB,OAAO,KAAP,OAAO,QAMvB","sourcesContent":["import { TrackByFunction } from '@angular/core';\n\nexport namespace TrackBy {\n export const byIndex:TrackByFunction<any> = (index:number, item: any) => index;\n\n export function trackByProperty<T, P extends keyof T>(property: P):TrackByFunction<T> {\n return (index:number, item: T) => item[property];\n }\n}\n"]}
|
|
@@ -8,13 +8,17 @@ import { MatTabsModule } from '@angular/material/tabs';
|
|
|
8
8
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
9
9
|
import { CommandDirective } from './command.directive';
|
|
10
10
|
import { FocusBindingDirective } from './focus-binding.directive';
|
|
11
|
+
import { HighlightTextModelDirective } from './highlight-text-model.directive';
|
|
12
|
+
import { HighlightPipe } from './highlight.pipe';
|
|
11
13
|
export class DirectivesModule {
|
|
12
14
|
}
|
|
13
15
|
DirectivesModule.decorators = [
|
|
14
16
|
{ type: NgModule, args: [{
|
|
15
17
|
declarations: [
|
|
16
18
|
CommandDirective,
|
|
17
|
-
FocusBindingDirective
|
|
19
|
+
FocusBindingDirective,
|
|
20
|
+
HighlightPipe,
|
|
21
|
+
HighlightTextModelDirective
|
|
18
22
|
],
|
|
19
23
|
imports: [
|
|
20
24
|
CommonModule,
|
|
@@ -27,7 +31,9 @@ DirectivesModule.decorators = [
|
|
|
27
31
|
],
|
|
28
32
|
exports: [
|
|
29
33
|
CommandDirective,
|
|
30
|
-
FocusBindingDirective
|
|
34
|
+
FocusBindingDirective,
|
|
35
|
+
HighlightPipe,
|
|
36
|
+
HighlightTextModelDirective
|
|
31
37
|
]
|
|
32
38
|
},] }
|
|
33
39
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.module.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/directives.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"directives.module.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/directives.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA0BjD,MAAM,OAAO,gBAAgB;;;YAxB5B,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,gBAAgB;oBAChB,qBAAqB;oBACrB,aAAa;oBACb,2BAA2B;iBAC5B;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,uBAAuB;oBACvB,WAAW;oBACX,cAAc;oBACd,kBAAkB;oBAClB,eAAe;oBACf,aAAa;iBACd;gBACD,OAAO,EAAE;oBACP,gBAAgB;oBAChB,qBAAqB;oBACrB,aAAa;oBACb,2BAA2B;iBAC5B;aAEF","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { CommandDirective } from './command.directive';\nimport { FocusBindingDirective } from './focus-binding.directive';\nimport { HighlightTextModelDirective } from './highlight-text-model.directive';\nimport { HighlightPipe } from './highlight.pipe';\n\n@NgModule({\n declarations: [\n CommandDirective,\n FocusBindingDirective,\n HighlightPipe,\n HighlightTextModelDirective\n ],\n imports: [\n CommonModule,\n BrowserAnimationsModule,\n FormsModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatTabsModule\n ],\n exports: [\n CommandDirective,\n FocusBindingDirective,\n HighlightPipe,\n HighlightTextModelDirective\n ]\n\n})\nexport class DirectivesModule {\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"DirectivesModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"DirectivesModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./command.directive","name":"CommandDirective","line":15,"character":4},{"__symbolic":"reference","module":"./focus-binding.directive","name":"FocusBindingDirective","line":16,"character":4},{"__symbolic":"reference","module":"./highlight.pipe","name":"HighlightPipe","line":17,"character":4},{"__symbolic":"reference","module":"./highlight-text-model.directive","name":"HighlightTextModelDirective","line":18,"character":4}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/platform-browser/animations","name":"BrowserAnimationsModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":23,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":24,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/material/select","name":"MatSelectModule","line":26,"character":4},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsModule","line":27,"character":4}],"exports":[{"__symbolic":"reference","module":"./command.directive","name":"CommandDirective","line":30,"character":4},{"__symbolic":"reference","module":"./focus-binding.directive","name":"FocusBindingDirective","line":31,"character":4},{"__symbolic":"reference","module":"./highlight.pipe","name":"HighlightPipe","line":32,"character":4},{"__symbolic":"reference","module":"./highlight-text-model.directive","name":"HighlightTextModelDirective","line":33,"character":4}]}]}]}}}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.module.ngfactory.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/directives.module.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\nimport * as i1 from './directives.module';\nimport * as i2 from '@angular/common';\nimport * as i3 from '@angular/forms';\nimport * as i4 from '@angular/cdk/text-field';\nimport * as i5 from '@angular/cdk/bidi';\nimport * as i6 from '@angular/material/form-field';\nimport * as i7 from '@angular/material/input';\nimport * as i8 from '@angular/cdk/scrolling';\nimport * as i9 from '@angular/material/core';\nimport * as i10 from '@angular/material/select';\nimport * as i11 from '@angular/material/tabs';\nimport * as i12 from './command.directive';\nimport * as i13 from './focus-binding.directive';\nimport * as i14 from '@angular/platform-browser/animations';\nexport const DirectivesModuleNgFactory:i0.NgModuleFactory<i1.DirectivesModule> = (null as any);\nvar _decl0_0:i2.NgClass = (<any>(null as any));\nvar _decl0_1:i2.NgComponentOutlet = (<any>(null as any));\nvar _decl0_2:i2.NgForOf<any,any> = (<any>(null as any));\nvar _decl0_3:i2.NgIf<any> = (<any>(null as any));\nvar _decl0_4:i2.NgTemplateOutlet = (<any>(null as any));\nvar _decl0_5:i2.NgStyle = (<any>(null as any));\nvar _decl0_6:i2.NgSwitch = (<any>(null as any));\nvar _decl0_7:i2.NgSwitchCase = (<any>(null as any));\nvar _decl0_8:i2.NgSwitchDefault = (<any>(null as any));\nvar _decl0_9:i2.NgPlural = (<any>(null as any));\nvar _decl0_10:i2.NgPluralCase = (<any>(null as any));\nvar _decl0_11:i3.ɵangular_packages_forms_forms_y = (<any>(null as any));\nvar _decl0_12:i3.NgSelectOption = (<any>(null as any));\nvar _decl0_13:i3.ɵangular_packages_forms_forms_x = (<any>(null as any));\nvar _decl0_14:i3.DefaultValueAccessor = (<any>(null as any));\nvar _decl0_15:i3.NumberValueAccessor = (<any>(null as any));\nvar _decl0_16:i3.RangeValueAccessor = (<any>(null as any));\nvar _decl0_17:i3.CheckboxControlValueAccessor = (<any>(null as any));\nvar _decl0_18:i3.SelectControlValueAccessor = (<any>(null as any));\nvar _decl0_19:i3.SelectMultipleControlValueAccessor = (<any>(null as any));\nvar _decl0_20:i3.RadioControlValueAccessor = (<any>(null as any));\nvar _decl0_21:i3.NgControlStatus = (<any>(null as any));\nvar _decl0_22:i3.NgControlStatusGroup = (<any>(null as any));\nvar _decl0_23:i3.RequiredValidator = (<any>(null as any));\nvar _decl0_24:i3.MinLengthValidator = (<any>(null as any));\nvar _decl0_25:i3.MaxLengthValidator = (<any>(null as any));\nvar _decl0_26:i3.PatternValidator = (<any>(null as any));\nvar _decl0_27:i3.CheckboxRequiredValidator = (<any>(null as any));\nvar _decl0_28:i3.EmailValidator = (<any>(null as any));\nvar _decl0_29:i3.NgModel = (<any>(null as any));\nvar _decl0_30:i3.NgModelGroup = (<any>(null as any));\nvar _decl0_31:i3.NgForm = (<any>(null as any));\nvar _decl0_32:i4.CdkAutofill = (<any>(null as any));\nvar _decl0_33:i4.CdkTextareaAutosize = (<any>(null as any));\nvar _decl0_34:i5.Dir = (<any>(null as any));\nvar _decl0_35:i6.MatError = (<any>(null as any));\nvar _decl0_36:i6.MatFormField = (<any>(null as any));\nvar _decl0_37:i6.MatHint = (<any>(null as any));\nvar _decl0_38:i6.MatLabel = (<any>(null as any));\nvar _decl0_39:i6.MatPlaceholder = (<any>(null as any));\nvar _decl0_40:i6.MatPrefix = (<any>(null as any));\nvar _decl0_41:i6.MatSuffix = (<any>(null as any));\nvar _decl0_42:i7.MatInput = (<any>(null as any));\nvar _decl0_43:i7.MatTextareaAutosize = (<any>(null as any));\nvar _decl0_44:i8.CdkScrollable = (<any>(null as any));\nvar _decl0_45:i9.MatOption = (<any>(null as any));\nvar _decl0_46:i9.MatOptgroup = (<any>(null as any));\nvar _decl0_47:i10.MatSelect = (<any>(null as any));\nvar _decl0_48:i10.MatSelectTrigger = (<any>(null as any));\nvar _decl0_49:i11.MatTabGroup = (<any>(null as any));\nvar _decl0_50:i11.MatTabLabel = (<any>(null as any));\nvar _decl0_51:i11.MatTab = (<any>(null as any));\nvar _decl0_52:i11.MatTabNav = (<any>(null as any));\nvar _decl0_53:i11.MatTabLink = (<any>(null as any));\nvar _decl0_54:i11.MatTabContent = (<any>(null as any));\nvar _decl0_55:i12.CommandDirective<any> = (<any>(null as any));\nvar _decl0_56:i13.FocusBindingDirective = (<any>(null as any));\nvar _decl0_57:i2.AsyncPipe = (<any>(null as any));\nvar
|
|
1
|
+
{"version":3,"file":"directives.module.ngfactory.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/directives.module.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\nimport * as i1 from './directives.module';\nimport * as i2 from '@angular/common';\nimport * as i3 from '@angular/forms';\nimport * as i4 from '@angular/cdk/text-field';\nimport * as i5 from '@angular/cdk/bidi';\nimport * as i6 from '@angular/material/form-field';\nimport * as i7 from '@angular/material/input';\nimport * as i8 from '@angular/cdk/scrolling';\nimport * as i9 from '@angular/material/core';\nimport * as i10 from '@angular/material/select';\nimport * as i11 from '@angular/material/tabs';\nimport * as i12 from './command.directive';\nimport * as i13 from './focus-binding.directive';\nimport * as i14 from './highlight-text-model.directive';\nimport * as i15 from './highlight.pipe';\nimport * as i16 from '@angular/platform-browser/animations';\nexport const DirectivesModuleNgFactory:i0.NgModuleFactory<i1.DirectivesModule> = (null as any);\nvar _decl0_0:i2.NgClass = (<any>(null as any));\nvar _decl0_1:i2.NgComponentOutlet = (<any>(null as any));\nvar _decl0_2:i2.NgForOf<any,any> = (<any>(null as any));\nvar _decl0_3:i2.NgIf<any> = (<any>(null as any));\nvar _decl0_4:i2.NgTemplateOutlet = (<any>(null as any));\nvar _decl0_5:i2.NgStyle = (<any>(null as any));\nvar _decl0_6:i2.NgSwitch = (<any>(null as any));\nvar _decl0_7:i2.NgSwitchCase = (<any>(null as any));\nvar _decl0_8:i2.NgSwitchDefault = (<any>(null as any));\nvar _decl0_9:i2.NgPlural = (<any>(null as any));\nvar _decl0_10:i2.NgPluralCase = (<any>(null as any));\nvar _decl0_11:i3.ɵangular_packages_forms_forms_y = (<any>(null as any));\nvar _decl0_12:i3.NgSelectOption = (<any>(null as any));\nvar _decl0_13:i3.ɵangular_packages_forms_forms_x = (<any>(null as any));\nvar _decl0_14:i3.DefaultValueAccessor = (<any>(null as any));\nvar _decl0_15:i3.NumberValueAccessor = (<any>(null as any));\nvar _decl0_16:i3.RangeValueAccessor = (<any>(null as any));\nvar _decl0_17:i3.CheckboxControlValueAccessor = (<any>(null as any));\nvar _decl0_18:i3.SelectControlValueAccessor = (<any>(null as any));\nvar _decl0_19:i3.SelectMultipleControlValueAccessor = (<any>(null as any));\nvar _decl0_20:i3.RadioControlValueAccessor = (<any>(null as any));\nvar _decl0_21:i3.NgControlStatus = (<any>(null as any));\nvar _decl0_22:i3.NgControlStatusGroup = (<any>(null as any));\nvar _decl0_23:i3.RequiredValidator = (<any>(null as any));\nvar _decl0_24:i3.MinLengthValidator = (<any>(null as any));\nvar _decl0_25:i3.MaxLengthValidator = (<any>(null as any));\nvar _decl0_26:i3.PatternValidator = (<any>(null as any));\nvar _decl0_27:i3.CheckboxRequiredValidator = (<any>(null as any));\nvar _decl0_28:i3.EmailValidator = (<any>(null as any));\nvar _decl0_29:i3.NgModel = (<any>(null as any));\nvar _decl0_30:i3.NgModelGroup = (<any>(null as any));\nvar _decl0_31:i3.NgForm = (<any>(null as any));\nvar _decl0_32:i4.CdkAutofill = (<any>(null as any));\nvar _decl0_33:i4.CdkTextareaAutosize = (<any>(null as any));\nvar _decl0_34:i5.Dir = (<any>(null as any));\nvar _decl0_35:i6.MatError = (<any>(null as any));\nvar _decl0_36:i6.MatFormField = (<any>(null as any));\nvar _decl0_37:i6.MatHint = (<any>(null as any));\nvar _decl0_38:i6.MatLabel = (<any>(null as any));\nvar _decl0_39:i6.MatPlaceholder = (<any>(null as any));\nvar _decl0_40:i6.MatPrefix = (<any>(null as any));\nvar _decl0_41:i6.MatSuffix = (<any>(null as any));\nvar _decl0_42:i7.MatInput = (<any>(null as any));\nvar _decl0_43:i7.MatTextareaAutosize = (<any>(null as any));\nvar _decl0_44:i8.CdkScrollable = (<any>(null as any));\nvar _decl0_45:i9.MatOption = (<any>(null as any));\nvar _decl0_46:i9.MatOptgroup = (<any>(null as any));\nvar _decl0_47:i10.MatSelect = (<any>(null as any));\nvar _decl0_48:i10.MatSelectTrigger = (<any>(null as any));\nvar _decl0_49:i11.MatTabGroup = (<any>(null as any));\nvar _decl0_50:i11.MatTabLabel = (<any>(null as any));\nvar _decl0_51:i11.MatTab = (<any>(null as any));\nvar _decl0_52:i11.MatTabNav = (<any>(null as any));\nvar _decl0_53:i11.MatTabLink = (<any>(null as any));\nvar _decl0_54:i11.MatTabContent = (<any>(null as any));\nvar _decl0_55:i12.CommandDirective<any> = (<any>(null as any));\nvar _decl0_56:i13.FocusBindingDirective = (<any>(null as any));\nvar _decl0_57:i14.HighlightTextModelDirective = (<any>(null as any));\nvar _decl0_58:i2.AsyncPipe = (<any>(null as any));\nvar _decl0_59:i2.UpperCasePipe = (<any>(null as any));\nvar _decl0_60:i2.LowerCasePipe = (<any>(null as any));\nvar _decl0_61:i2.JsonPipe = (<any>(null as any));\nvar _decl0_62:i2.SlicePipe = (<any>(null as any));\nvar _decl0_63:i2.DecimalPipe = (<any>(null as any));\nvar _decl0_64:i2.PercentPipe = (<any>(null as any));\nvar _decl0_65:i2.TitleCasePipe = (<any>(null as any));\nvar _decl0_66:i2.CurrencyPipe = (<any>(null as any));\nvar _decl0_67:i2.DatePipe = (<any>(null as any));\nvar _decl0_68:i2.I18nPluralPipe = (<any>(null as any));\nvar _decl0_69:i2.I18nSelectPipe = (<any>(null as any));\nvar _decl0_70:i2.KeyValuePipe = (<any>(null as any));\nvar _decl0_72:i15.HighlightPipe = (<any>(null as any));\nvar _decl0_73:i2.CommonModule = (<any>(null as any));\nvar _decl0_74:i16.BrowserAnimationsModule = (<any>(null as any));\nvar _decl0_75:i3.FormsModule = (<any>(null as any));\nvar _decl0_76:i7.MatInputModule = (<any>(null as any));\nvar _decl0_77:i6.MatFormFieldModule = (<any>(null as any));\nvar _decl0_78:i10.MatSelectModule = (<any>(null as any));\nvar _decl0_79:i11.MatTabsModule = (<any>(null as any));\nvar _decl0_80:i0.TemplateRef<any> = (<any>(null as any));\nvar _decl0_81:i0.ElementRef<any> = (<any>(null as any));\n"]}
|
|
@@ -6,4 +6,6 @@ export * from "./directives.module";
|
|
|
6
6
|
export * from "./focus-binding-factory";
|
|
7
7
|
export * from "./focus-binding.directive";
|
|
8
8
|
export * from "./focus-binding";
|
|
9
|
+
export * from "./highlight-text-model.directive";
|
|
10
|
+
export * from "./highlight.pipe";
|
|
9
11
|
//# sourceMappingURL=exports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/exports.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./command.directive\";\nexport * from \"./directives.module\";\nexport * from \"./focus-binding-factory\";\nexport * from \"./focus-binding.directive\";\nexport * from \"./focus-binding\";\n"]}
|
|
1
|
+
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/exports.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./command.directive\";\nexport * from \"./directives.module\";\nexport * from \"./focus-binding-factory\";\nexport * from \"./focus-binding.directive\";\nexport * from \"./focus-binding\";\nexport * from \"./highlight-text-model.directive\";\nexport * from \"./highlight.pipe\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./command.directive"},{"from":"./directives.module"},{"from":"./focus-binding-factory"},{"from":"./focus-binding.directive"},{"from":"./focus-binding"}]}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./command.directive"},{"from":"./directives.module"},{"from":"./focus-binding-factory"},{"from":"./focus-binding.directive"},{"from":"./focus-binding"},{"from":"./highlight-text-model.directive"},{"from":"./highlight.pipe"}]}]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Directive, Input } from '@angular/core';
|
|
3
|
+
import { GarbageCollector, TrackExternal, ValueModel } from '@coolon/pectin';
|
|
4
|
+
export class HighlightTextModelDirective extends GarbageCollector {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
ngOnDestroy() {
|
|
9
|
+
this.dispose();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
HighlightTextModelDirective.decorators = [
|
|
13
|
+
{ type: Directive, args: [{
|
|
14
|
+
selector: '[aupHighlightTextModel]'
|
|
15
|
+
},] }
|
|
16
|
+
];
|
|
17
|
+
HighlightTextModelDirective.ctorParameters = () => [];
|
|
18
|
+
HighlightTextModelDirective.propDecorators = {
|
|
19
|
+
aupHighlightTextModel: [{ type: Input }]
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
TrackExternal(),
|
|
23
|
+
__metadata("design:type", ValueModel)
|
|
24
|
+
], HighlightTextModelDirective.prototype, "aupHighlightTextModel", void 0);
|
|
25
|
+
//# sourceMappingURL=highlight-text-model.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight-text-model.directive.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/highlight-text-model.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAa,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAK7E,MAAM,OAAO,2BAA4B,SAAQ,gBAAgB;IAM/D;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,WAAW;QACT,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;;;YAfF,SAAS,SAAC;gBACT,QAAQ,EAAE,yBAAyB;aACpC;;;;oCAGE,KAAK;;AAEN;IADC,aAAa,EAAE;8BACO,UAAU;0EAAS","sourcesContent":["import { Directive, Input, OnDestroy } from '@angular/core';\nimport { GarbageCollector, TrackExternal, ValueModel } from '@coolon/pectin';\n\n@Directive({\n selector: '[aupHighlightTextModel]'\n})\nexport class HighlightTextModelDirective extends GarbageCollector implements OnDestroy {\n\n @Input()\n @TrackExternal()\n aupHighlightTextModel: ValueModel<string>;\n\n constructor() {\n super();\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HighlightTextModelDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":6,"character":49},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":3,"character":1},"arguments":[{"selector":"[aupHighlightTextModel]"}]}],"members":{"aupHighlightTextModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":8,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight-text-model.directive.ngfactory.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/highlight-text-model.directive.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Optional, Pipe } from '@angular/core';
|
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
+
import { GarbageCollector } from '@coolon/pectin';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
import { HighlightTextModelDirective } from './highlight-text-model.directive';
|
|
6
|
+
export class HighlightPipe extends GarbageCollector {
|
|
7
|
+
constructor(sanitizer, highlightContext) {
|
|
8
|
+
super();
|
|
9
|
+
this.sanitizer = sanitizer;
|
|
10
|
+
this.highlightContext = highlightContext;
|
|
11
|
+
}
|
|
12
|
+
ngOnDestroy() {
|
|
13
|
+
this.dispose();
|
|
14
|
+
}
|
|
15
|
+
transform(value, searchModel) {
|
|
16
|
+
var _a;
|
|
17
|
+
const model = searchModel !== null && searchModel !== void 0 ? searchModel : (_a = this.highlightContext) === null || _a === void 0 ? void 0 : _a.aupHighlightTextModel;
|
|
18
|
+
const searchText = model === null || model === void 0 ? void 0 : model.value;
|
|
19
|
+
if (_.isEmpty(searchText) || !_.isString(value)) {
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
// Match in a case insensitive manner
|
|
23
|
+
const re = new RegExp(searchText, 'gi');
|
|
24
|
+
const match = value.match(re);
|
|
25
|
+
// If there's no match, just return the original value.
|
|
26
|
+
if (!match) {
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
const result = value.replace(re, '<mark>' + match[0] + '</mark>');
|
|
30
|
+
return this.sanitizer.bypassSecurityTrustHtml(result);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
HighlightPipe.decorators = [
|
|
34
|
+
{ type: Pipe, args: [{
|
|
35
|
+
name: 'aupHighlight',
|
|
36
|
+
pure: false
|
|
37
|
+
},] }
|
|
38
|
+
];
|
|
39
|
+
HighlightPipe.ctorParameters = () => [
|
|
40
|
+
{ type: DomSanitizer },
|
|
41
|
+
{ type: HighlightTextModelDirective, decorators: [{ type: Optional }] }
|
|
42
|
+
];
|
|
43
|
+
//# sourceMappingURL=highlight.pipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.pipe.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/highlight.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,QAAQ,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;AAC9D,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,2BAA2B,EAAE,MAAM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angular/platform-browser';\nimport { GarbageCollector, ValueModel } from '@coolon/pectin';\nimport _ from 'lodash';\nimport { HighlightTextModelDirective } from './highlight-text-model.directive';\n\n\n@Pipe({\n name: 'aupHighlight',\n pure: false\n})\nexport class HighlightPipe extends GarbageCollector implements PipeTransform, OnDestroy {\n\n constructor(private sanitizer: DomSanitizer,\n @Optional() private readonly highlightContext?: HighlightTextModelDirective) {\n super();\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n transform(value: any, searchModel?: ValueModel<string>): any {\n\n const model = searchModel ?? this.highlightContext?.aupHighlightTextModel;\n\n const searchText: string = model?.value;\n\n if (_.isEmpty(searchText) || !_.isString(value)) {\n return value;\n }\n\n // Match in a case insensitive manner\n const re = new RegExp(searchText, 'gi');\n const match = value.match(re);\n\n // If there's no match, just return the original value.\n if (!match) {\n return value;\n }\n\n const result = value.replace(re, '<mark>' + match[0] + '</mark>');\n return this.sanitizer.bypassSecurityTrustHtml(result);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HighlightPipe":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":11,"character":35},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"aupHighlight","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":14,"character":15}}]],"parameters":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DomSanitizer","line":13,"character":33},{"__symbolic":"reference","module":"./highlight-text-model.directive","name":"HighlightTextModelDirective","line":14,"character":62}]}],"ngOnDestroy":[{"__symbolic":"method"}],"transform":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.pipe.ngfactory.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/directives/highlight.pipe.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|