@coolon/angular-ui-powerups 1.11.3 → 1.11.4
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/CHANGELOG.md +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +821 -822
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +15 -16
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +15 -16
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/index.js +1 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/column-model.js +1 -1
- 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-header-cell-renderer/default-header-cell-renderer.component.js +3 -4
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js +2 -2
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -1
- package/esm2015/lib/components/table/edit-session.js +20 -0
- package/esm2015/lib/components/table/edit-session.js.map +1 -0
- package/esm2015/lib/components/table/edit-session.metadata.json +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +2 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +3 -23
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -2
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
- package/esm5/coolon-angular-ui-powerups.js +15 -16
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/index.js +1 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/column-model.js +1 -1
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +3 -4
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js +2 -2
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
- package/esm5/lib/components/table/edit-session.js +25 -0
- package/esm5/lib/components/table/edit-session.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +2 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +4 -27
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -2
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +541 -543
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +795 -797
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/table/column-model.d.ts +10 -8
- package/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +1 -2
- package/lib/components/table/edit-row-controls/edit-row-controls.component.d.ts +2 -2
- package/lib/components/table/edit-session.d.ts +9 -0
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +2 -1
- package/lib/components/table/table-model.d.ts +4 -13
- package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +1 -1
- package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-model.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/column-model.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAU,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAiB,sBAAsB,EAAkD,MAAM,gBAAgB,CAAC;AACvH,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAI3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,yDAAyD,CAAC;AACvG,OAAO,EAAE,kCAAkC,EAAE,MAAM,uEAAuE,CAAC;AAC3H,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AACpG,OAAO,EAAE,iCAAiC,EAAE,MAAM,qEAAqE,CAAC;AAoBxH,MAAM,OAAO,WAAW;IAQtB,YAAqB,QAAgB,EAAU,QAA8B;QAAxD,aAAQ,GAAR,QA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AAE,WAAW,EAAE,EAAE;YAClF,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;YACpB,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;YACpC,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;IAES,oBAAoB;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAED,MAAM,OAAO,yBAA+B,SAAQ,WAAgB;IAClE,YAAY,QAAgB,EAAE,QAA8B,EAAE,SAAkH;QAC9K,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,oBAA0B,SAAQ,WAAgB;IAC7D,YAAY,QAAgB,EAAE,QAA8B,EAAE,cAAmC;QAC/F,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC1B,IAAI,cAAc,YAAY,sBAAsB,EAAE;YACpD,IAAI,CAAC,kBAAkB,CAAC,iCAAiC,EAAE,CAAC,SAAS,EAAE,EAAE;gBACvE,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC;YAC5C,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,CAAC,eAAe,CAAC,2BAA2B,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE;YAChG,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;YACpB,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;IAES,oBAAoB;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { ComponentPortal, Portal } from '@angular/cdk/portal';\nimport { Command, Form, MultipleSelectionModel, SelectionModel, Types, UnaryCommand, Validator } from '@coolon/pectin';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport { AbstractInputComponent } from '../forms/abstract-input.component';\nimport { CellEditorComponent } from './cell-editor.component';\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 { SelectCellRendererComponent } from './select-cell-renderer/select-cell-renderer.component';\nimport { SelectHeaderCellRendererComponent } from './select-header-cell-renderer/select-header-cell-renderer.component';\nimport { TableModel } from './table-model';\n\n\nexport interface ColumnHeaderConfig<Row, C extends any> {\n portal: Portal<C>;\n initialiseComponent?: (component: C, column: ColumnModel<Row>) => void;\n}\n\nexport interface CellRendererConfig<Row, C extends any> {\n portal: Portal<C>;\n pushState?: (component: C, row: Row, editRowCommand: Command<void>, editSession: TableModel.EditSession<Row>) => void;\n}\n\nexport interface CellEditorConfig<Row, V, C extends AbstractInputComponent<V>> {\n portal: Portal<C>;\n initialiseComponent?: (component: C, editSession: TableModel.EditSession<Row>) => void;\n}\n\n\nexport class ColumnModel<Row> {\n\n private _columnTextProperties: ColumnTextProperties;\n\n private _columnHeaderConfig: ColumnHeaderConfig<Row, any>;\n private _cellRendererConfig: CellRendererConfig<any, any>;\n private _cellEditorConfig: CellEditorConfig<any, any, any>;\n\n constructor(readonly columnId: string, private defaults: ColumnModel.Defaults) {\n this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {\n component.columnModel = column;\n });\n }\n\n @Memoize()\n getHeaderText(): string {\n return this.getColumnTextProperties()?.headerText() || this.getDefaultHeaderText();\n }\n\n protected getDefaultHeaderText() {\n return this.columnId;\n }\n\n @Memoize()\n getColumnTextProperties(): ColumnTextProperties {\n return this._columnTextProperties || this.defaults.getColumnTextProperties(this);\n }\n\n textProperties(columnTextProperties: ColumnTextProperties): this {\n this._columnTextProperties = columnTextProperties;\n return this;\n }\n\n protected setCellRenderer<C>(cellRenderer: ComponentType<C>, initialiser: (component: C, row: Row, editRowCommand: Command<void>, editSession: TableModel.EditSession<Row>) => void): void {\n this._cellRendererConfig = {\n portal: new ComponentPortal<C>(cellRenderer),\n pushState: initialiser\n };\n }\n\n cellHeaderRenderer<C>(cellRenderer: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): void {\n this._columnHeaderConfig = {\n portal: new ComponentPortal<C>(cellRenderer),\n initialiseComponent: initialiser\n };\n }\n\n protected setCellEditor<E extends AbstractInputComponent<any>>(cellEditor: CellEditorConfig<any, any, any>): void {\n this._cellEditorConfig = cellEditor;\n }\n\n get cellRendererPortal() {\n return this._cellRendererConfig.portal;\n }\n\n get columnHeaderCellRendererPortal() {\n return this._columnHeaderConfig.portal;\n }\n\n get cellEditorPortal() {\n return this._cellEditorConfig?.portal;\n }\n\n hasEditor() {\n return !!this._cellEditorConfig;\n }\n\n updateCellRenderer(component: any, row: Row, editRowCommand: Command<void>, editSession: TableModel.EditSession<Row>) {\n this._cellRendererConfig.pushState(component, row, editRowCommand, editSession);\n }\n\n initialiseHeader(component: any) {\n this._columnHeaderConfig.initialiseComponent(component, this);\n }\n\n initialiseEditor(component: any, editSession: TableModel.EditSession<Row>) {\n this._cellEditorConfig.initialiseComponent(component, editSession);\n }\n}\n\nexport namespace ColumnModel {\n export type Defaults = Pick<TableModel<any>, 'getColumnTextProperties'>\n}\n\nexport interface CellEditorOptions<V, E extends CellEditorComponent<V>> { //extends CellRendererOptions<E> {\n validators?: Validator<V>[];\n\n initialiseComponent?(component: E);\n}\n\nexport class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {\n\n constructor(readonly property: P, defaults: ColumnModel.Defaults) {\n super(property.toString(), defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Row[P] }>) {\n this.setCellRenderer(componentType, (component, row) => {\n component.value = row[this.property];\n });\n }\n\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, options?: CellEditorOptions<Row[P], E>): this {\n this.setCellEditor({\n portal: new ComponentPortal<E>(editor),\n initialiseComponent: (component: E, editSession: TableModel.EditSession<Row>) => {\n const formValueModel = editSession.form.pluck(this.property);\n if (options?.validators) {\n formValueModel.validateUsing(options.validators);\n }\n component.valueModel = formValueModel;\n if (options?.initialiseComponent) {\n options.initialiseComponent(component);\n }\n }\n });\n return this;\n }\n}\n\nexport class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, private getValue: (row: Row) => V) {\n super(columnId, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: V }>) {\n this.setCellRenderer(componentType, (component, row) => {\n component.value = this.getValue(row);\n });\n }\n}\n\nexport class EditorControlColumnModel<Row> extends ColumnModel<Row> {\n\n constructor(columnId: string, saveCommand: UnaryCommand<Form<Row>, boolean>, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.cellRenderer(EditRowControls);\n }\n\n cellRenderer(componentType: ComponentType<{ row: Row, editSession: TableModel.EditSession<Row>, editRowCommand: Command<void> }>) {\n this.setCellRenderer(componentType, (component, row, editRowCommand, editSession) => {\n component.row = row;\n component.editSession = editSession;\n component.editRowCommand = editRowCommand;\n });\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\nexport class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, component: ComponentType<{ editCommand: Command<void>, saveCommand: Command<void>, cancelCommand: Command<void> }>) {\n super(columnId, defaults);\n }\n}\n\nexport class SelectionColumnModel<Row> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, selectionModel: SelectionModel<Row>) {\n super(columnId, defaults);\n if (selectionModel instanceof MultipleSelectionModel) {\n this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {\n component.selectionModel = selectionModel;\n });\n }\n this.setCellRenderer(SelectCellRendererComponent, (component, row, editRowCommand, editSession) => {\n component.row = row;\n component.selectionModel = selectionModel;\n });\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\n\n"]}
|
|
1
|
+
{"version":3,"file":"column-model.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/column-model.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAU,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAiB,sBAAsB,EAAkD,MAAM,gBAAgB,CAAC;AACvH,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAI3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,yDAAyD,CAAC;AACvG,OAAO,EAAE,kCAAkC,EAAE,MAAM,uEAAuE,CAAC;AAC3H,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAElF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AACpG,OAAO,EAAE,iCAAiC,EAAE,MAAM,qEAAqE,CAAC;AAmBxH,MAAM,OAAO,WAAW;IAQtB,YAAqB,QAAgB,EAAU,QAA8B;QAAxD,aAAQ,GAAR,QAAQ,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAsB;QAC3E,IAAI,CAAC,kBAAkB,CAAC,kCAAkC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;YAChF,SAAS,CAAC,UAAU,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;IAGD,aAAa;;QACX,OAAO,OAAA,IAAI,CAAC,uBAAuB,EAAE,0CAAE,UAAU,OAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;IACrF,CAAC;IAES,oBAAoB;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAGD,uBAAuB;QACrB,OAAO,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;IAED,cAAc,CAAC,oBA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AC1B,IAAI,cAAc,YAAY,sBAAsB,EAAE;YACpD,IAAI,CAAC,kBAAkB,CAAC,iCAAiC,EAAE,CAAC,SAAS,EAAE,EAAE;gBACvE,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC;YAC5C,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,CAAC,eAAe,CAAC,2BAA2B,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE;YAChG,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;YACpB,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;IAES,oBAAoB;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { ComponentPortal, Portal } from '@angular/cdk/portal';\nimport { Command, Form, MultipleSelectionModel, SelectionModel, Types, UnaryCommand, Validator } from '@coolon/pectin';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport { AbstractInputComponent } from '../forms/abstract-input.component';\nimport { CellEditorComponent } from './cell-editor.component';\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 { SelectCellRendererComponent } from './select-cell-renderer/select-cell-renderer.component';\nimport { SelectHeaderCellRendererComponent } from './select-header-cell-renderer/select-header-cell-renderer.component';\n\n\nexport interface ColumnHeaderConfig<Row, C extends any> {\n portal: Portal<C>;\n initialiseComponent?: (component: C, column: ColumnModel<Row>) => void;\n}\n\nexport interface CellRendererConfig<Row, C extends any> {\n portal: Portal<C>;\n pushState?: (component: C, row: Row, editRowCommand: Command<void>, editSession: EditSession<Row>) => void;\n}\n\nexport interface CellEditorConfig<Row, V, C extends AbstractInputComponent<V>> {\n portal: Portal<C>;\n initialiseComponent?: (component: C, editSession: EditSession<Row>) => void;\n}\n\n\nexport class ColumnModel<Row> {\n\n private _columnTextProperties: ColumnTextProperties;\n\n private _columnHeaderConfig: ColumnHeaderConfig<Row, any>;\n private _cellRendererConfig: CellRendererConfig<any, any>;\n private _cellEditorConfig: CellEditorConfig<any, any, any>;\n\n constructor(readonly columnId: string, private defaults: ColumnModel.Defaults) {\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 protected getDefaultHeaderText() {\n return this.columnId;\n }\n\n @Memoize()\n getColumnTextProperties(): ColumnTextProperties {\n return this._columnTextProperties || this.defaults.getColumnTextProperties(this);\n }\n\n textProperties(columnTextProperties: ColumnTextProperties): this {\n this._columnTextProperties = columnTextProperties;\n return this;\n }\n\n protected setCellRenderer<C>(cellRenderer: ComponentType<C>, initialiser: (component: C, row: Row, editRowCommand: Command<void>, editSession: EditSession<Row>) => void): void {\n this._cellRendererConfig = {\n portal: new ComponentPortal<C>(cellRenderer),\n pushState: initialiser\n };\n }\n\n cellHeaderRenderer<C>(cellRenderer: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): void {\n this._columnHeaderConfig = {\n portal: new ComponentPortal<C>(cellRenderer),\n initialiseComponent: initialiser\n };\n }\n\n protected setCellEditor<E extends AbstractInputComponent<any>>(cellEditor: CellEditorConfig<any, any, any>): void {\n this._cellEditorConfig = cellEditor;\n }\n\n get cellRendererPortal() {\n return this._cellRendererConfig.portal;\n }\n\n get columnHeaderCellRendererPortal() {\n return this._columnHeaderConfig.portal;\n }\n\n get cellEditorPortal() {\n return this._cellEditorConfig?.portal;\n }\n\n hasEditor() {\n return !!this._cellEditorConfig;\n }\n\n updateCellRenderer(component: any, row: Row, editRowCommand: Command<void>, editSession: EditSession<Row>) {\n this._cellRendererConfig.pushState(component, row, editRowCommand, editSession);\n }\n\n initialiseHeader(component: any) {\n this._columnHeaderConfig.initialiseComponent(component, this);\n }\n\n initialiseEditor(component: any, editSession: EditSession<Row>) {\n this._cellEditorConfig.initialiseComponent(component, editSession);\n }\n}\n\nexport namespace ColumnModel {\n export interface Defaults {\n getColumnTextProperties(columnModel: ColumnModel<any>): ColumnTextProperties;\n }\n}\n\nexport interface CellEditorOptions<V, E extends CellEditorComponent<V>> { //extends CellRendererOptions<E> {\n validators?: Validator<V>[];\n\n initialiseComponent?(component: E);\n}\n\nexport class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {\n\n constructor(readonly property: P, defaults: ColumnModel.Defaults) {\n super(property.toString(), defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Row[P] }>) {\n this.setCellRenderer(componentType, (component, row) => {\n component.value = row[this.property];\n });\n }\n\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, options?: CellEditorOptions<Row[P], E>): this {\n this.setCellEditor({\n portal: new ComponentPortal<E>(editor),\n initialiseComponent: (component: E, editSession: EditSession<Row>) => {\n const formValueModel = editSession.form.pluck(this.property);\n if (options?.validators) {\n formValueModel.validateUsing(options.validators);\n }\n component.valueModel = formValueModel;\n if (options?.initialiseComponent) {\n options.initialiseComponent(component);\n }\n }\n });\n return this;\n }\n}\n\nexport class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, private getValue: (row: Row) => V) {\n super(columnId, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: V }>) {\n this.setCellRenderer(componentType, (component, row) => {\n component.value = this.getValue(row);\n });\n }\n}\n\nexport class EditorControlColumnModel<Row> extends ColumnModel<Row> {\n\n constructor(columnId: string, saveCommand: UnaryCommand<Form<Row>, boolean>, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.cellRenderer(EditRowControls);\n }\n\n cellRenderer(componentType: ComponentType<{ row: Row, editSession: EditSession<Row>, editRowCommand: Command<void> }>) {\n this.setCellRenderer(componentType, (component, row, editRowCommand, editSession) => {\n component.row = row;\n component.editSession = editSession;\n component.editRowCommand = editRowCommand;\n });\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\nexport class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, component: ComponentType<{ editCommand: Command<void>, saveCommand: Command<void>, cancelCommand: Command<void> }>) {\n super(columnId, defaults);\n }\n}\n\nexport class SelectionColumnModel<Row> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, selectionModel: SelectionModel<Row>) {\n super(columnId, defaults);\n if (selectionModel instanceof MultipleSelectionModel) {\n this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {\n component.selectionModel = selectionModel;\n });\n }\n this.setCellRenderer(SelectCellRendererComponent, (component, row, editRowCommand, editSession) => {\n component.row = row;\n component.selectionModel = selectionModel;\n });\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ColumnHeaderConfig":{"__symbolic":"interface"},"CellRendererConfig":{"__symbolic":"interface"},"CellEditorConfig":{"__symbolic":"interface"},"ColumnModel":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"getHeaderText":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":45,"character":3}}]}],"getDefaultHeaderText":[{"__symbolic":"method"}],"getColumnTextProperties":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":54,"character":3}}]}],"textProperties":[{"__symbolic":"method"}],"setCellRenderer":[{"__symbolic":"method"}],"cellHeaderRenderer":[{"__symbolic":"method"}],"setCellEditor":[{"__symbolic":"method"}],"hasEditor":[{"__symbolic":"method"}],"updateCellRenderer":[{"__symbolic":"method"}],"initialiseHeader":[{"__symbolic":"method"}],"initialiseEditor":[{"__symbolic":"method"}]}},"CellEditorOptions":{"__symbolic":"interface"},"PropertyColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ColumnHeaderConfig":{"__symbolic":"interface"},"CellRendererConfig":{"__symbolic":"interface"},"CellEditorConfig":{"__symbolic":"interface"},"ColumnModel":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"getHeaderText":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":45,"character":3}}]}],"getDefaultHeaderText":[{"__symbolic":"method"}],"getColumnTextProperties":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":54,"character":3}}]}],"textProperties":[{"__symbolic":"method"}],"setCellRenderer":[{"__symbolic":"method"}],"cellHeaderRenderer":[{"__symbolic":"method"}],"setCellEditor":[{"__symbolic":"method"}],"hasEditor":[{"__symbolic":"method"}],"updateCellRenderer":[{"__symbolic":"method"}],"initialiseHeader":[{"__symbolic":"method"}],"initialiseEditor":[{"__symbolic":"method"}]}},"CellEditorOptions":{"__symbolic":"interface"},"PropertyColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":125,"character":33,"context":{"typeName":"P"}},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"cellRenderer":[{"__symbolic":"method"}],"cellEditor":[{"__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":"Defaults"},{"__symbolic":"error","message":"Expression form not supported","line":155,"character":82}]}],"cellRenderer":[{"__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":169,"character":45,"arguments":[{"__symbolic":"reference","module":"@coolon/pectin","name":"Form","line":169,"character":58,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":169,"character":63,"context":{"typeName":"Row"}}]},{"__symbolic":"reference","name":"boolean"}]},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"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":"Defaults"},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"ComponentType","line":188,"character":75,"arguments":[{"__symbolic":"error","message":"Expression form not supported","line":188,"character":89}]}]}]}},"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":"Defaults"},{"__symbolic":"reference","module":"@coolon/pectin","name":"SelectionModel","line":194,"character":80,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":194,"character":95,"context":{"typeName":"Row"}}]}]}],"getDefaultHeaderText":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { Component, Input } from '@angular/core';
|
|
3
|
-
import { ColumnModel } from '../column-model';
|
|
4
3
|
let DefaultHeaderCellRendererComponent = class DefaultHeaderCellRendererComponent {
|
|
5
4
|
constructor() {
|
|
6
5
|
}
|
|
7
6
|
};
|
|
8
7
|
__decorate([
|
|
9
8
|
Input(),
|
|
10
|
-
__metadata("design:type",
|
|
11
|
-
], DefaultHeaderCellRendererComponent.prototype, "
|
|
9
|
+
__metadata("design:type", String)
|
|
10
|
+
], DefaultHeaderCellRendererComponent.prototype, "headerText", void 0);
|
|
12
11
|
DefaultHeaderCellRendererComponent = __decorate([
|
|
13
12
|
Component({
|
|
14
13
|
selector: 'aup-default-header-renderer',
|
|
15
|
-
template: "{{
|
|
14
|
+
template: "{{headerText}}\n",
|
|
16
15
|
styles: [""]
|
|
17
16
|
}),
|
|
18
17
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-header-cell-renderer.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"default-header-cell-renderer.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOjD,IAAa,kCAAkC,GAA/C,MAAa,kCAAkC;IAK7C;IACA,CAAC;CACF,CAAA;AAJC;IADC,KAAK,EAAE;;sEACW;AAHR,kCAAkC;IAL9C,SAAS,CAAC;QACT,QAAQ,EAAE,6BAA6B;QACvC,4BAA4D;;KAE7D,CAAC;;GACW,kCAAkC,CAO9C;SAPY,kCAAkC","sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'aup-default-header-renderer',\n templateUrl: './default-header-cell-renderer.component.html',\n styleUrls: ['./default-header-cell-renderer.component.scss']\n})\nexport class DefaultHeaderCellRendererComponent {\n\n @Input()\n headerText: string;\n\n constructor() {\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"DefaultHeaderCellRendererComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"DefaultHeaderCellRendererComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"aup-default-header-renderer","template":"{{headerText}}\n","styles":[""]}]}],"members":{"headerText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}]}}}}]
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { Component, Input } from '@angular/core';
|
|
3
3
|
import { Command, TrackExternal } from '@coolon/pectin';
|
|
4
4
|
import { DisposableComponent } from '../../disposable-component';
|
|
5
|
-
import {
|
|
5
|
+
import { EditSession } from '../edit-session';
|
|
6
6
|
let EditRowControls = class EditRowControls extends DisposableComponent {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -36,7 +36,7 @@ __decorate([
|
|
|
36
36
|
], EditRowControls.prototype, "editRowCommand", void 0);
|
|
37
37
|
__decorate([
|
|
38
38
|
Input(),
|
|
39
|
-
__metadata("design:type",
|
|
39
|
+
__metadata("design:type", EditSession)
|
|
40
40
|
], EditRowControls.prototype, "editSession", void 0);
|
|
41
41
|
EditRowControls = __decorate([
|
|
42
42
|
Component({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-row-controls.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/edit-row-controls/edit-row-controls.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAoC,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,OAAO,EAAe,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"edit-row-controls.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/edit-row-controls/edit-row-controls.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAoC,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,OAAO,EAAe,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAQ9C,IAAa,eAAe,GAA5B,MAAa,eAAqB,SAAQ,mBAAmB;IAe3D;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YACrC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;iBACxD,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACjB,IAAI,QAAQ,EAAE;oBACZ,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;iBAC5B;YACH,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YACvC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;IACR,CAAC;IAED,IAAI,IAAI;;QACN,aAAO,IAAI,CAAC,WAAW,0CAAE,IAAI,CAAC;IAChC,CAAC;CAEF,CAAA;AAlCC;IADC,KAAK,EAAE;;4CACA;AAIR;IAFC,KAAK,EAAE;IACP,aAAa,EAAE;8BACA,OAAO;uDAAM;AAG7B;IADC,KAAK,EAAE;8BACK,WAAW;oDAAM;AAVnB,eAAe;IAL3B,SAAS,CAAC;QACT,QAAQ,EAAE,yBAAyB;QACnC,+XAAiD;;KAElD,CAAC;;GACW,eAAe,CAqC3B;SArCY,eAAe","sourcesContent":["import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { Command, Form, Trace, TrackExternal } from '@coolon/pectin';\nimport { DisposableComponent } from '../../disposable-component';\nimport { EditSession } from '../edit-session';\nimport { TableModel } from '../table-model';\n\n@Component({\n selector: 'aup-row-editor-controls',\n templateUrl: './edit-row-controls.component.html',\n styleUrls: ['./edit-row-controls.component.scss']\n})\nexport class EditRowControls<Row> extends DisposableComponent implements OnInit {\n\n @Input()\n row: Row\n\n @Input()\n @TrackExternal()\n editRowCommand: Command<void>\n\n @Input()\n editSession: EditSession<Row>;\n\n readonly saveCommand: Command<void>;\n readonly cancelCommand: Command<void>;\n\n constructor() {\n super();\n this.saveCommand = Command.create(() => {\n this.editSession.saveCommand.execute(this.editSession.form)\n .then((finished) => {\n if (finished) {\n this.editSession.dispose();\n }\n });\n });\n this.cancelCommand = Command.create(() => {\n this.editSession.dispose();\n });\n }\n\n ngOnInit(): void {\n }\n\n get form(): Form<Row> {\n return this.editSession?.form;\n }\n\n}\n"]}
|
package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"EditRowControls":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../disposable-component","name":"DisposableComponent","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"EditRowControls":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../disposable-component","name":"DisposableComponent","line":11,"character":42},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"aup-row-editor-controls","template":"<button *ngIf=\"!editSession\" mat-icon-button [pectinCommand]=\"editRowCommand\" class=\"edit-button\"><mat-icon>edit</mat-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"saveCommand\"><mat-icon>done</mat-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"cancelCommand\"><mat-icon>clear</mat-icon></button>\n","styles":[":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}"]}]}],"members":{"row":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"editRowCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":17,"character":3}}]}],"editSession":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Form, GarbageCollector, MutableValueModel } from '@coolon/pectin';
|
|
2
|
+
import produce from 'immer';
|
|
3
|
+
export class EditSession extends GarbageCollector {
|
|
4
|
+
constructor(rowId, row, saveCommand) {
|
|
5
|
+
super();
|
|
6
|
+
this.rowId = rowId;
|
|
7
|
+
this.saveCommand = saveCommand;
|
|
8
|
+
this._editorValue = new MutableValueModel();
|
|
9
|
+
this.rowValueModel = this._editorValue.readonly;
|
|
10
|
+
this.form = new Form();
|
|
11
|
+
this.form.load(row);
|
|
12
|
+
this._editorValue.value = row;
|
|
13
|
+
this.form.onEdit(() => {
|
|
14
|
+
this._editorValue.value = produce(this._editorValue.value, draft => {
|
|
15
|
+
this.form.writeDirtyStateTo(draft);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=edit-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-session.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/edit-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAgB,MAAM,gBAAgB,CAAC;AAEzF,OAAO,OAAO,MAAM,OAAO,CAAC;AAE5B,MAAM,OAAO,WAAiB,SAAQ,gBAAgB;IAKpD,YAAqB,KAAU,EAAE,GAAQ,EAAW,WAA6C;QAC/F,KAAK,EAAE,CAAC;QADW,UAAK,GAAL,KAAK,CAAK;QAAqB,gBAAW,GAAX,WAAW,CAAkC;QAHzF,iBAAY,GAAG,IAAI,iBAAiB,EAAO,CAAC;QAC3C,kBAAa,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;QAIlD,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAO,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,GAAG,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpB,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;gBACjE,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAyB,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { Form, GarbageCollector, MutableValueModel, UnaryCommand } from '@coolon/pectin';\nimport { PickMutable } from '@coolon/typescript-utilities';\nimport produce from 'immer';\n\nexport class EditSession<Row> extends GarbageCollector {\n readonly form: Form<Row>;\n private _editorValue = new MutableValueModel<Row>();\n readonly rowValueModel = this._editorValue.readonly;\n\n constructor(readonly rowId: any, row: Row, readonly saveCommand: UnaryCommand<Form<Row>, boolean>) {\n super();\n this.form = new Form<Row>();\n this.form.load(row);\n this._editorValue.value = row;\n this.form.onEdit(() => {\n this._editorValue.value = produce(this._editorValue.value, draft => {\n this.form.writeDirtyStateTo(draft as PickMutable<Row>);\n });\n });\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"EditSession":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":4,"character":38},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"error","message":"Could not resolve type","line":9,"character":40,"context":{"typeName":"Row"}},{"__symbolic":"reference","module":"@coolon/pectin","name":"UnaryCommand","line":9,"character":67,"arguments":[{"__symbolic":"reference","module":"@coolon/pectin","name":"Form","line":9,"character":80,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":9,"character":85,"context":{"typeName":"Row"}}]},{"__symbolic":"reference","name":"boolean"}]}]}]}}}}]
|
|
@@ -2,6 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { Component, HostBinding, Input } from '@angular/core';
|
|
3
3
|
import { Command } from '@coolon/pectin';
|
|
4
4
|
import { ColumnModel } from '../column-model';
|
|
5
|
+
import { EditSession } from '../edit-session';
|
|
5
6
|
import { TableModel } from '../table-model';
|
|
6
7
|
let TableCellRendererComponent = class TableCellRendererComponent {
|
|
7
8
|
constructor() {
|
|
@@ -42,7 +43,7 @@ __decorate([
|
|
|
42
43
|
], TableCellRendererComponent.prototype, "column", void 0);
|
|
43
44
|
__decorate([
|
|
44
45
|
Input(),
|
|
45
|
-
__metadata("design:type",
|
|
46
|
+
__metadata("design:type", EditSession)
|
|
46
47
|
], TableCellRendererComponent.prototype, "editSession", void 0);
|
|
47
48
|
__decorate([
|
|
48
49
|
Input(),
|
package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-cell-renderer.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/table-cell-renderer/table-cell-renderer.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAA+C,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO5C,IAAa,0BAA0B,GAAvC,MAAa,0BAA0B;IAsBrC;QAFA,sBAAiB,GAAG,0BAA0B,CAAA;QAG5C,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YACxC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB,CAAC,QAAa;QAC9B,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,EAAE;YAC9B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACzB,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SAChG;IACH,CAAC;IAED,gBAAgB,CAAC,QAAa;QAC5B,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE;YAC5B,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;YACvB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SAC7D;IACH,CAAC;IAED,WAAW,CAAC,OAAsB;QAChC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAC/F,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;SAC9C;IACH,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;IACrD,CAAC;CACF,CAAA;AAjDC;IADC,KAAK,EAAE;;uDACC;AAGT;IADC,KAAK,EAAE;8BACA,WAAW;0DAAM;AAGzB;IADC,KAAK,EAAE;8BACK,
|
|
1
|
+
{"version":3,"file":"table-cell-renderer.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/table-cell-renderer/table-cell-renderer.component.ts"],"names":[],"m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I,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAC/F,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;SAC9C;IACH,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;IACrD,CAAC;CACF,CAAA;AAjDC;IADC,KAAK,EAAE;;uDACC;AAGT;IADC,KAAK,EAAE;8BACA,WAAW;0DAAM;AAGzB;IADC,KAAK,EAAE;8BACK,WAAW;+DAAM;AAG9B;IADC,KAAK,EAAE;8BACI,UAAU;8DAAM;AAQ5B;IADC,WAAW,CAAC,OAAO,CAAC;;qEACyB;AApBnC,0BAA0B;IALtC,SAAS,CAAC;QACT,QAAQ,EAAE,yBAAyB;QACnC,qUAAmD;;KAEpD,CAAC;;GACW,0BAA0B,CAoDtC;SApDY,0BAA0B","sourcesContent":["import { Component, HostBinding, Input, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core';\nimport { Command } from '@coolon/pectin';\nimport { ColumnModel } from '../column-model';\nimport { EditSession } from '../edit-session';\nimport { TableModel } from '../table-model';\n\n@Component({\n selector: 'aup-table-cell-renderer',\n templateUrl: './table-cell-renderer.component.html',\n styleUrls: ['./table-cell-renderer.component.scss']\n})\nexport class TableCellRendererComponent<Row> implements OnChanges {\n\n @Input()\n row: Row;\n\n @Input()\n column: ColumnModel<Row>;\n\n @Input()\n editSession: EditSession<Row>;\n\n @Input()\n tableModel: TableModel<Row>;\n\n private renderer: any;\n private editor: any;\n\n private editRowCommand: Command<void>;\n\n @HostBinding('class')\n defaultClassNames = \"aup-header-cell-renderer\"\n\n constructor() {\n this.editRowCommand = Command.create(() => {\n this.tableModel.startEditSession(this.row);\n });\n }\n\n initialiseRenderer(instance: any) {\n if (this.renderer !== instance) {\n this.renderer = instance;\n this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);\n }\n }\n\n initialiseEditor(instance: any) {\n if (this.editor !== instance) {\n this.editor = instance;\n this.column.initialiseEditor(this.editor, this.editSession);\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.renderer) {\n this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);\n this.renderer.editSession = this.editSession;\n }\n }\n\n hasActiveEditor() {\n return this.editSession && this.column.hasEditor();\n }\n}\n"]}
|
package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TableCellRendererComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TableCellRendererComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"aup-table-cell-renderer","template":"<ng-container *ngIf=\"!hasActiveEditor()\" [cdkPortalOutlet]=\"column.cellRendererPortal\" (attached)=\"initialiseRenderer($event.instance)\"></ng-container>\n<ng-container *ngIf=\"hasActiveEditor()\" [cdkPortalOutlet]=\"column.cellEditorPortal\" (attached)=\"initialiseEditor($event.instance)\"></ng-container>\n","styles":[":host{display:flex;flex-direction:column;align-items:stretch}"]}]}],"members":{"row":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"column":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"editSession":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"tableModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"defaultClassNames":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":30,"character":3},"arguments":["class"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"initialiseRenderer":[{"__symbolic":"method"}],"initialiseEditor":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"hasActiveEditor":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var TableModel_1;
|
|
2
2
|
import { __decorate, __metadata } from "tslib";
|
|
3
|
-
import { BooleanValueModelChain, CanIdentify, Dsl, Form, GarbageCollector, lang, ListModel, ListModelChain, MapModelChain, MutableListModel,
|
|
4
|
-
import produce from 'immer';
|
|
3
|
+
import { BooleanValueModelChain, CanIdentify, Dsl, Form, GarbageCollector, lang, ListModel, ListModelChain, MapModelChain, MutableListModel, SelectionModel, TrackExternal, Types, UnaryCommand } from '@coolon/pectin';
|
|
5
4
|
import { CustomValueColumnModel, EditorControlColumnModel, PropertyColumnModel, SelectionColumnModel } from './column-model';
|
|
5
|
+
import { EditSession } from './edit-session';
|
|
6
6
|
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
7
7
|
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
8
8
|
/**
|
|
@@ -142,7 +142,7 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
142
142
|
return lang.illegalState(`Row with id=${rowId} already being edited`);
|
|
143
143
|
}
|
|
144
144
|
else {
|
|
145
|
-
const editSession = new
|
|
145
|
+
const editSession = new EditSession(rowId, row, this.saveCommand);
|
|
146
146
|
const { when } = Dsl.disposeWith(editSession);
|
|
147
147
|
when.valueOf(editSession.rowValueModel).changes((editedValue) => {
|
|
148
148
|
this._rowsBeingEdited.replaceOrPush(editedValue);
|
|
@@ -174,24 +174,4 @@ TableModel = TableModel_1 = __decorate([
|
|
|
174
174
|
__metadata("design:paramtypes", [ListModel])
|
|
175
175
|
], TableModel);
|
|
176
176
|
export { TableModel };
|
|
177
|
-
(function (TableModel) {
|
|
178
|
-
class EditSession extends GarbageCollector {
|
|
179
|
-
constructor(rowId, row, saveCommand) {
|
|
180
|
-
super();
|
|
181
|
-
this.rowId = rowId;
|
|
182
|
-
this.saveCommand = saveCommand;
|
|
183
|
-
this._editorValue = new MutableValueModel();
|
|
184
|
-
this.rowValueModel = this._editorValue.readonly;
|
|
185
|
-
this.form = new Form();
|
|
186
|
-
this.form.load(row);
|
|
187
|
-
this._editorValue.value = row;
|
|
188
|
-
this.form.onEdit(() => {
|
|
189
|
-
this._editorValue.value = produce(this._editorValue.value, draft => {
|
|
190
|
-
this.form.writeDirtyStateTo(draft);
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
TableModel.EditSession = EditSession;
|
|
196
|
-
})(TableModel || (TableModel = {}));
|
|
197
177
|
//# sourceMappingURL=table-model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-model.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/table-model.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,GAAG,EACH,IAAI,EACJ,gBAAgB,EAChB,IAAI,EACJ,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,YAAY,EACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,OAAO,MAAM,OAAO,CAAC;AAC5B,OAAO,EAEL,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAGxB,oGAAoG;AACpG,oGAAoG;AAGpG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqE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pB,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;oBACjE,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAyB,CAAC,CAAC;gBACzD,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KACF;IAhBY,sBAAW,cAgBvB,CAAA;AACH,CAAC,EApBgB,UAAU,KAAV,UAAU,QAoB1B","sourcesContent":["import {\n BooleanValueModelChain,\n CanIdentify,\n Dsl,\n Form,\n GarbageCollector,\n lang,\n ListModel,\n ListModelChain,\n MapModelChain,\n MutableListModel,\n MutableValueModel,\n SelectionModel,\n TrackExternal,\n Types,\n UnaryCommand\n} from '@coolon/pectin';\nimport { PickMutable } from '@coolon/typescript-utilities';\nimport produce from 'immer';\nimport {\n ColumnModel,\n CustomValueColumnModel,\n EditorControlColumnModel,\n PropertyColumnModel,\n SelectionColumnModel\n} from './column-model';\nimport { ColumnTextProperties } from './column-text-properties';\n\n// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];\n// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];\n\n\n/**\n * Example:\n * @example\n * const model = TableModel.fromList(heroList, table => {\n * table.pluck(\"firstName\");\n * table.pluck(\"lastName\");\n * table.addCustomColumn(\"fullName\", hero => `${hero.firstName} ${hero.lastName}`);\n * });\n *\n * Editable tables\n * @example\n * const saveCommand = UnaryCommand.create((form: Form<Hero>) => {\n * if (form.validate()) {\n * // normal form save stuff\n * return true; // finish editing\n * }\n * return false; // continue editiing\n * }\n * const colorsNames: ListModel<string> = ...;\n * const model = TableModel.fromList(heroList, table => {\n * table.pluck(\"firstName\").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }\n * table.pluck(\"lastName\").cellEditor(StringInputComponent, {\n * validators: [Validator.present(\"We need a last name\")]\n * });\n * table.pluck(\"age\").cellEditor(NumberInputComponent);\n * table.pluck(\"favoriteColor\").cellEditor(SelectInputComponent, {\n * initialiseComponent(component: SelectInputComponent) {\n * selectInput.optionsModel = colorsNames; // <- initialise our component\n * }\n * });\n * table.addEditControls(saveCommand); // <- required to enable editing\n * });\n *\n * Selection models\n * @example\n * const model = TableModel.fromList(heroList, table => {\n * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model\n * table.pluck(\"firstName\");\n * table.pluck(\"lastName\");\n * });\n *\n * Custom cell renderers and editors\n * @example\n * const model = TableModel.fromList(heroList, table => {\n * table.pluck(\"favoriteColor\")\n * .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {\n * // configure your component with what ever you need.\n * });\n * .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }\n * .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }\n * table.addCustomColumn(\"fullName\", hero => `${hero.firstName} ${hero.lastName}`);\n * });\n *\n * I18n\n * @example\n * [table.yml]\n * table:\n * columns(ColumnTextProperties[]):\n * firstName:\n * headerText: \"First Name\"\n * fullName:\n * headerText: \"Full Name\"\n *\n * const model = TableModel.fromList(heroList, table => {\n * table.pluck(\"favoriteColor\").cellRenderer(...).cellEditor(...);\n * table.addCustomColumn(\"fullName\", hero => `${hero.firstName} ${hero.lastName}`);\n *\n * table.columnTextProperties(I18n.table.columns); // <- configures all columns\n * });\n */\n@TrackExternal.Strategy(new TrackExternal.OneTimeBinding())\nexport class TableModel<Row> {\n\n private readonly _garbage = new GarbageCollector();\n\n private readonly _columns = new MutableListModel<ColumnModel<Row>>();\n private _columnsById: MapModelChain<string, ColumnModel<Row>>;\n private _editorSessions = new MutableListModel<TableModel.EditSession<Row>>();\n private readonly _rowsBeingEdited: MutableListModel<Row>;\n\n private _columnTextPropertiesLookup: { [columnName: string]: () => ColumnTextProperties };\n\n readonly identityOf: CanIdentify<Row>['identityOf'];\n private saveCommand: UnaryCommand<Form<Row>, boolean>;\n private _editorSessionByRowId: MapModelChain<any, TableModel.EditSession<Row>>;\n\n readonly editing: BooleanValueModelChain;\n readonly dataSource: ListModelChain<Row>;\n\n static fromList<Row>(sourceOfTruth: ListModel<Row>, builder?: (tableModel: TableModel<Row>) => void): TableModel<Row> {\n const model = new TableModel<Row>(sourceOfTruth);\n builder(model);\n return model;\n }\n\n protected constructor(private sourceOfTruth: ListModel<Row>) {\n this.identityOf = sourceOfTruth.identityOf;\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this._garbage);\n this._columnsById = chain(this._columns).indexBy('columnId');\n this._rowsBeingEdited = new MutableListModel<Row>([], {\n identifiedWith: this.identityOf\n });\n this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');\n this.editing = chain(this._editorSessions).count().isGreaterThan(0);\n this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);\n }\n\n get rowsBeingEdited(): ListModel<Row> {\n return this._rowsBeingEdited.readonly;\n }\n\n getTrackByFunction() {\n return (index: number, item: Row) => {\n return this.identityOf ? this.identityOf(item) : index;\n };\n }\n\n get columns(): ListModel<ColumnModel<Row>> {\n return this._columns.readonly;\n }\n\n pluck<P extends Types.ValuePropertiesOf<Row>>(property: P): PropertyColumnModel<Row, P> {\n return this.addColumn(new PropertyColumnModel<Row, P>(property, this));\n }\n\n addSelectionColumn(selectionModel: SelectionModel<Row>): SelectionColumnModel<Row> {\n return this.addColumn(new SelectionColumnModel<Row>('selection', this, selectionModel));\n }\n\n addEditControls(saveCommand: UnaryCommand<Form<Row>, boolean>):EditorControlColumnModel<Row> {\n this.saveCommand = saveCommand;\n return this.addColumn(new EditorControlColumnModel<Row>('editControls', saveCommand, this));\n }\n\n addCustomColumn<V>(columnId: string, dataAccessor: (row: Row) => V): CustomValueColumnModel<Row, V> {\n return this.addColumn(new CustomValueColumnModel<Row, V>(columnId, this, dataAccessor));\n }\n\n protected addColumn<C extends ColumnModel<Row>>(column: C): C {\n if (this._columnsById.get(column.columnId)) {\n lang.illegalState(`Column with id=${column.columnId} already exists`);\n } else {\n this._columns.push(column);\n }\n return column;\n }\n\n columnTextProperties(columnTextProperties: { [columnName: string]: () => ColumnTextProperties }) {\n this._columnTextPropertiesLookup = columnTextProperties;\n }\n\n getColumnTextProperties(column: ColumnModel<Row>): ColumnTextProperties {\n const factory = this._columnTextPropertiesLookup[column.columnId];\n return factory ? factory() : undefined;\n }\n\n startEditSession(row: Row): TableModel.EditSession<Row> {\n const rowId = this.identityOf(row);\n if (this._rowsBeingEdited.query().indexOf(row) > -1) {\n return lang.illegalState(`Row with id=${rowId} already being edited`);\n } else {\n const editSession = new TableModel.EditSession<Row>(rowId, row, this.saveCommand);\n const { when } = Dsl.disposeWith(editSession);\n when.valueOf(editSession.rowValueModel).changes((editedValue) => {\n this._rowsBeingEdited.replaceOrPush(editedValue);\n }, { initialValue: 'triggerChangeUnlessNil' });\n\n this._editorSessions.push(editSession);\n editSession.onDispose(() => {\n this._rowsBeingEdited.remove(editSession.rowValueModel.value);\n this._editorSessions.remove(editSession);\n });\n return editSession;\n }\n }\n\n getEditSessionFor(row: Row): TableModel.EditSession<Row> {\n return this._editorSessionByRowId.get(this.identityOf(row));\n }\n\n cancelAllEditorSessions() {\n this._editorSessions.runInTransaction((draft) => {\n this._rowsBeingEdited.runInTransaction(() => {\n draft.value.forEach(session => session.dispose());\n });\n });\n }\n}\n\nexport namespace TableModel {\n\n\n export class EditSession<Row> extends GarbageCollector {\n readonly form: Form<Row>;\n private _editorValue = new MutableValueModel<Row>();\n readonly rowValueModel = this._editorValue.readonly;\n\n constructor(readonly rowId: any, row: Row, readonly saveCommand: UnaryCommand<Form<Row>, boolean>) {\n super();\n this.form = new Form<Row>();\n this.form.load(row);\n this._editorValue.value = row;\n this.form.onEdit(() => {\n this._editorValue.value = produce(this._editorValue.value, draft => {\n this.form.writeDirtyStateTo(draft as PickMutable<Row>);\n });\n });\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"table-model.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/table-model.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,GAAG,EACH,IAAI,EACJ,gBAAgB,EAChB,IAAI,EACJ,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,KAAK,EACL,YAAY,EACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,oGAAoG;AACpG,oGAAoG;AAGpG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH,IAAa,UAAU,kBAAvB,MAAa,UAAU;IAwBrB,YAA8B,aAA6B;QAA7B,kBAAa,GAAb,aAAa,CAAgB;QAtB1C,aAAQ,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAElC,aAAQ,GAAG,IAAI,gBAAgB,EAAoB,CAAC;QAE7D,oBAAe,GAAG,IAAI,gBAAgB,EAAoB,CAAC;QAmBjE,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC;QAC3C,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClG,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAM,EAAE,EAAE;YACpD,cAAc,EAAE,IAAI,CAAC,UAAU;SA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,CAoHtB;SApHY,UAAU","sourcesContent":["import {\n BooleanValueModelChain,\n CanIdentify,\n Dsl,\n Form,\n GarbageCollector,\n lang,\n ListModel,\n ListModelChain,\n MapModelChain,\n MutableListModel,\n SelectionModel,\n TrackExternal,\n Types,\n UnaryCommand\n} from '@coolon/pectin';\nimport {\n ColumnModel,\n CustomValueColumnModel,\n EditorControlColumnModel,\n PropertyColumnModel,\n SelectionColumnModel\n} from './column-model';\nimport { ColumnTextProperties } from './column-text-properties';\nimport { EditSession } from './edit-session';\n\n// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];\n// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];\n\n\n/**\n * Example:\n * @example\n * const model = TableModel.fromList(heroList, table => {\n * table.pluck(\"firstName\");\n * table.pluck(\"lastName\");\n * table.addCustomColumn(\"fullName\", hero => `${hero.firstName} ${hero.lastName}`);\n * });\n *\n * Editable tables\n * @example\n * const saveCommand = UnaryCommand.create((form: Form<Hero>) => {\n * if (form.validate()) {\n * // normal form save stuff\n * return true; // finish editing\n * }\n * return false; // continue editiing\n * }\n * const colorsNames: ListModel<string> = ...;\n * const model = TableModel.fromList(heroList, table => {\n * table.pluck(\"firstName\").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }\n * table.pluck(\"lastName\").cellEditor(StringInputComponent, {\n * validators: [Validator.present(\"We need a last name\")]\n * });\n * table.pluck(\"age\").cellEditor(NumberInputComponent);\n * table.pluck(\"favoriteColor\").cellEditor(SelectInputComponent, {\n * initialiseComponent(component: SelectInputComponent) {\n * selectInput.optionsModel = colorsNames; // <- initialise our component\n * }\n * });\n * table.addEditControls(saveCommand); // <- required to enable editing\n * });\n *\n * Selection models\n * @example\n * const model = TableModel.fromList(heroList, table => {\n * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model\n * table.pluck(\"firstName\");\n * table.pluck(\"lastName\");\n * });\n *\n * Custom cell renderers and editors\n * @example\n * const model = TableModel.fromList(heroList, table => {\n * table.pluck(\"favoriteColor\")\n * .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {\n * // configure your component with what ever you need.\n * });\n * .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }\n * .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }\n * table.addCustomColumn(\"fullName\", hero => `${hero.firstName} ${hero.lastName}`);\n * });\n *\n * I18n\n * @example\n * [table.yml]\n * table:\n * columns(ColumnTextProperties[]):\n * firstName:\n * headerText: \"First Name\"\n * fullName:\n * headerText: \"Full Name\"\n *\n * const model = TableModel.fromList(heroList, table => {\n * table.pluck(\"favoriteColor\").cellRenderer(...).cellEditor(...);\n * table.addCustomColumn(\"fullName\", hero => `${hero.firstName} ${hero.lastName}`);\n *\n * table.columnTextProperties(I18n.table.columns); // <- configures all columns\n * });\n */\n@TrackExternal.Strategy(new TrackExternal.OneTimeBinding())\nexport class TableModel<Row> {\n\n private readonly _garbage = new GarbageCollector();\n\n private readonly _columns = new MutableListModel<ColumnModel<Row>>();\n private _columnsById: MapModelChain<string, ColumnModel<Row>>;\n private _editorSessions = new MutableListModel<EditSession<Row>>();\n private readonly _rowsBeingEdited: MutableListModel<Row>;\n\n private _columnTextPropertiesLookup: { [columnName: string]: () => ColumnTextProperties };\n\n readonly identityOf: CanIdentify<Row>['identityOf'];\n private saveCommand: UnaryCommand<Form<Row>, boolean>;\n private _editorSessionByRowId: MapModelChain<any, EditSession<Row>>;\n\n readonly editing: BooleanValueModelChain;\n readonly dataSource: ListModelChain<Row>;\n\n static fromList<Row>(sourceOfTruth: ListModel<Row>, builder?: (tableModel: TableModel<Row>) => void): TableModel<Row> {\n const model = new TableModel<Row>(sourceOfTruth);\n builder(model);\n return model;\n }\n\n protected constructor(private sourceOfTruth: ListModel<Row>) {\n this.identityOf = sourceOfTruth.identityOf;\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this._garbage);\n this._columnsById = chain(this._columns).indexBy('columnId');\n this._rowsBeingEdited = new MutableListModel<Row>([], {\n identifiedWith: this.identityOf\n });\n this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');\n this.editing = chain(this._editorSessions).count().isGreaterThan(0);\n this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);\n }\n\n get rowsBeingEdited(): ListModel<Row> {\n return this._rowsBeingEdited.readonly;\n }\n\n getTrackByFunction() {\n return (index: number, item: Row) => {\n return this.identityOf ? this.identityOf(item) : index;\n };\n }\n\n get columns(): ListModel<ColumnModel<Row>> {\n return this._columns.readonly;\n }\n\n pluck<P extends Types.ValuePropertiesOf<Row>>(property: P): PropertyColumnModel<Row, P> {\n return this.addColumn(new PropertyColumnModel<Row, P>(property, this));\n }\n\n addSelectionColumn(selectionModel: SelectionModel<Row>): SelectionColumnModel<Row> {\n return this.addColumn(new SelectionColumnModel<Row>('selection', this, selectionModel));\n }\n\n addEditControls(saveCommand: UnaryCommand<Form<Row>, boolean>): EditorControlColumnModel<Row> {\n this.saveCommand = saveCommand;\n return this.addColumn(new EditorControlColumnModel<Row>('editControls', saveCommand, this));\n }\n\n addCustomColumn<V>(columnId: string, dataAccessor: (row: Row) => V): CustomValueColumnModel<Row, V> {\n return this.addColumn(new CustomValueColumnModel<Row, V>(columnId, this, dataAccessor));\n }\n\n protected addColumn<C extends ColumnModel<Row>>(column: C): C {\n if (this._columnsById.get(column.columnId)) {\n lang.illegalState(`Column with id=${column.columnId} already exists`);\n } else {\n this._columns.push(column);\n }\n return column;\n }\n\n columnTextProperties(columnTextProperties: { [columnName: string]: () => ColumnTextProperties }) {\n this._columnTextPropertiesLookup = columnTextProperties;\n }\n\n getColumnTextProperties(column: ColumnModel<Row>): ColumnTextProperties {\n const factory = this._columnTextPropertiesLookup[column.columnId];\n return factory ? factory() : undefined;\n }\n\n startEditSession(row: Row): EditSession<Row> {\n const rowId = this.identityOf(row);\n if (this._rowsBeingEdited.query().indexOf(row) > -1) {\n return lang.illegalState(`Row with id=${rowId} already being edited`);\n } else {\n const editSession = new EditSession<Row>(rowId, row, this.saveCommand);\n const { when } = Dsl.disposeWith(editSession);\n when.valueOf(editSession.rowValueModel).changes((editedValue) => {\n this._rowsBeingEdited.replaceOrPush(editedValue);\n }, { initialValue: 'triggerChangeUnlessNil' });\n\n this._editorSessions.push(editSession);\n editSession.onDispose(() => {\n this._rowsBeingEdited.remove(editSession.rowValueModel.value);\n this._editorSessions.remove(editSession);\n });\n return editSession;\n }\n }\n\n getEditSessionFor(row: Row): EditSession<Row> {\n return this._editorSessionByRowId.get(this.identityOf(row));\n }\n\n cancelAllEditorSessions() {\n this._editorSessions.runInTransaction((draft) => {\n this._rowsBeingEdited.runInTransaction(() => {\n draft.value.forEach(session => session.dispose());\n });\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TableModel":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TableModel":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":100,"character":1},"member":"Strategy"},"arguments":[{"__symbolic":"new","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":100,"character":28},"member":"OneTimeBinding"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@coolon/pectin","name":"ListModel","line":125,"character":47,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":125,"character":57,"context":{"typeName":"Row"}}]}]}],"getTrackByFunction":[{"__symbolic":"method"}],"pluck":[{"__symbolic":"method"}],"addSelectionColumn":[{"__symbolic":"method"}],"addEditControls":[{"__symbolic":"method"}],"addCustomColumn":[{"__symbolic":"method"}],"addColumn":[{"__symbolic":"method"}],"columnTextProperties":[{"__symbolic":"method"}],"getColumnTextProperties":[{"__symbolic":"method"}],"startEditSession":[{"__symbolic":"method"}],"getEditSessionFor":[{"__symbolic":"method"}],"cancelAllEditorSessions":[{"__symbolic":"method"}]}}}}]
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { Component, HostBinding, Input } from '@angular/core';
|
|
3
3
|
import { Command, TrackExternal } from '@coolon/pectin';
|
|
4
4
|
import _ from 'lodash';
|
|
5
|
-
import { DisposableComponent } from '../../../components';
|
|
5
|
+
import { DisposableComponent } from '../../../components/disposable-component';
|
|
6
6
|
let ActivityActionsComponent = class ActivityActionsComponent extends DisposableComponent {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-actions.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-actions/activity-actions.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"activity-actions.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-actions/activity-actions.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAO/E,IAAa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,mBAAmB;IAAjE;;QAcE,UAAK,GAAoB,OAAO,CAAC;IAcnC,CAAC;IAXC,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IAC9B,CAAC;IAED,QAAQ;IACR,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;CAEF,CAAA;AAxBC;IAFC,KAAK,EAAE;IACP,aAAa,EAAE;8BACA,OAAO;gEAAM;AAG7B;IADC,KAAK,EAAE;;6DACY;AAIpB;IAFC,KAAK,EAAE;IACP,aAAa,EAAE;8BACD,OAAO;+DAAM;AAG5B;IADC,KAAK,EAAE;;uDACyB;AAGjC;IADC,WAAW,CAAC,iBAAiB,CAAC;;;wDAG9B;AAnBU,wBAAwB;IALpC,SAAS,CAAC;QACT,QAAQ,EAAE,sBAAsB;QAChC,gdAAgD;;KAEjD,CAAC;GACW,wBAAwB,CA4BpC;SA5BY,wBAAwB","sourcesContent":["import { Component, HostBinding, Input, OnInit } from '@angular/core';\nimport { Command, TrackExternal } from '@coolon/pectin';\nimport _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\n\n@Component({\n selector: 'aup-activity-actions',\n templateUrl: './activity-actions.component.html',\n styleUrls: ['./activity-actions.component.scss']\n})\nexport class ActivityActionsComponent extends DisposableComponent implements OnInit {\n\n @Input()\n @TrackExternal()\n confirmCommand: Command<any>;\n\n @Input()\n confirmText: string;\n\n @Input()\n @TrackExternal()\n cancelCommand: Command<any>;\n\n @Input()\n align: 'start' | 'end' = 'start';\n\n @HostBinding('class.align-end')\n get alignEnd(): boolean {\n return this.align === 'end';\n }\n\n ngOnInit() {\n }\n\n hasConfirmText() {\n return !_.isEmpty(this.confirmText);\n }\n\n}\n"]}
|
package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ActivityActionsComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components","name":"DisposableComponent","line":10,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"aup-activity-actions","template":"<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n","styles":[":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]}]}],"members":{"confirmCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":13,"character":3}}]}],"confirmText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"cancelCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":20,"character":3}}]}],"align":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"alignEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":26,"character":3},"arguments":["class.align-end"]}]}],"ngOnInit":[{"__symbolic":"method"}],"hasConfirmText":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ActivityActionsComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":10,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"aup-activity-actions","template":"<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n","styles":[":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]}]}],"members":{"confirmCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":13,"character":3}}]}],"confirmText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"cancelCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":20,"character":3}}]}],"align":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"alignEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":26,"character":3},"arguments":["class.align-end"]}]}],"ngOnInit":[{"__symbolic":"method"}],"hasConfirmText":[{"__symbolic":"method"}]}}}}]
|
|
@@ -2,8 +2,8 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { ConnectedPosition, Overlay } from '@angular/cdk/overlay';
|
|
3
3
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
4
4
|
import { Component, ElementRef, HostBinding, Input, OnInit } from '@angular/core';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { DisposableComponent } from '../../../components/disposable-component';
|
|
6
|
+
import { InPlaceInteractionContextComponent } from '../inplace-interaction-context/in-place-interaction-context.component';
|
|
7
7
|
let PopupInteractionContextComponent = class PopupInteractionContextComponent extends DisposableComponent {
|
|
8
8
|
constructor(_element, _overlay) {
|
|
9
9
|
super();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup-interaction-context.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,
|
|
1
|
+
{"version":3,"file":"popup-interaction-context.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,uEAAuE,CAAC;AAO3H,IAAa,gCAAgC,GAA7C,MAAa,gCAAiC,SAAQ,mBAAmB;IAiBvE,YAAoB,QAAoB,EAAU,QAAiB;QACjE,KAAK,EAAE,CAAC;QADU,aAAQ,GAAR,QAAQ,CAAY;QAAU,aAAQ,GAAR,QAAQ,CAAS;QAR1D,iBAAY,GAAG,IAAI,eAAe,CAAoD,kCAAkC,CAAC,CAAC;QAGnI,YAAO,GAAoB,OAAO,CAAC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OAAO;YACL,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE;YACxF,8CAA8C;YAC9C,+EAA+E;YAC/E,2EAA2E;YAC3E,+EAA+E;YAC/E,0EAA0E;SAC3E,CAAC;IACJ,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;IACxD,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;IACvE,CAAC;IAED,QAAQ;IACR,CAAC;CAGF,CAAA;;YAtD+B,UAAU;YAAoB,OAAO;;AAZnE;IADC,WAAW,CAAC,0BAA0B,CAAC;;;8DAGvC;AAKD;IADC,KAAK,EAAE;;iEAC2B;AAGnC;IADC,KAAK,EAAE;;iEAC6B;AAf1B,gCAAgC;IAL5C,SAAS,CAAC;QACT,QAAQ,EAAE,+BAA+B;QACzC,uCAAyD;;KAE1D,CAAC;qCAkB8B,UAAU,EAAoB,OAAO;GAjBxD,gCAAgC,CAuE5C;SAvEY,gCAAgC","sourcesContent":["import { ConnectedPosition, Overlay } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Component, ElementRef, HostBinding, Input, OnInit } from '@angular/core';\nimport { Constructable } from '@coolon/pectin';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { Activity } from '../../activity';\nimport { InPlaceInteractionContextComponent } from '../inplace-interaction-context/in-place-interaction-context.component';\n\n@Component({\n selector: 'aup-popup-interaction-context',\n templateUrl: './popup-interaction-context.component.html',\n styleUrls: ['./popup-interaction-context.component.scss']\n})\nexport class PopupInteractionContextComponent extends DisposableComponent implements OnInit {\n\n private interactionContext: InPlaceInteractionContextComponent<any, any, any>;\n\n @HostBinding('class.interaction-active')\n public get active(): boolean {\n return this.isActive();\n }\n\n readonly outputPortal = new ComponentPortal<InPlaceInteractionContextComponent<any, any, any>>(InPlaceInteractionContextComponent);\n\n @Input()\n anchorX: 'start' | 'end' = 'start';\n\n @Input()\n anchorY: 'top' | 'bottom' = 'bottom';\n\n constructor(private _element: ElementRef, private _overlay: Overlay) {\n super();\n }\n\n startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R> {\n\n const overlayRef = this._overlay.create({\n hasBackdrop: false,\n panelClass: 'aup-popup-interaction-panel',\n positionStrategy: this._overlay.position()\n .flexibleConnectedTo(this._element)\n .withPositions(this.computePositions())\n .withGrowAfterOpen(true)\n });\n\n const componentRef = overlayRef.attach(this.outputPortal);\n this.interactionContext = componentRef.instance;\n\n return new Promise((resolve, reject) => {\n // HACK: afterViewInit won't have been called yet. Need to add when.valueOf(interactionContext.ready).becomesTruthy(...)\n setTimeout(() => {\n this.interactionContext.startActivity(activityType, data)\n .then(resolve)\n .catch(reject)\n .finally(() => overlayRef.dispose());\n });\n });\n }\n\n computePositions(): ConnectedPosition[] {\n const overlayX = this.anchorX === 'start' ? 'start' : 'end';\n const overlayY = this.anchorY === 'top' ? 'bottom' : 'top';\n return [\n { originX: this.anchorX, originY: this.anchorY, overlayX: overlayX, overlayY: overlayY }\n // TODO: compute some meaningful alternatives.\n // { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n // { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n // { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n // { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ];\n }\n\n cancelActiveActivity(): Promise<boolean> {\n return this.interactionContext.cancelActiveActivity();\n }\n\n isActive(): boolean {\n return this.interactionContext && this.interactionContext.isActive();\n }\n\n ngOnInit() {\n }\n\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"PopupInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components","name":"DisposableComponent","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PopupInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":13,"character":54},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":8,"character":1},"arguments":[{"selector":"aup-popup-interaction-context","template":"<ng-content></ng-content>\n","styles":[":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]}]}],"members":{"active":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":17,"character":3},"arguments":["class.interaction-active"]}]}],"anchorX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"anchorY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":30,"character":32},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":30,"character":62}]}],"startActivity":[{"__symbolic":"method"}],"computePositions":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
4
|
export * from './index';
|
|
5
|
-
export { DisposableComponent as ɵca } from './lib/components';
|
|
6
5
|
export { CardContainerComponent as ɵba } from './lib/components/card-container/card-container.component';
|
|
7
6
|
export { ComponentsModule as ɵf } from './lib/components/components.module';
|
|
8
7
|
export { DisposableComponent as ɵd } from './lib/components/disposable-component';
|
|
@@ -45,22 +44,22 @@ export { AlertDialogComponent as ɵbt } from './lib/interaction/components/alert
|
|
|
45
44
|
export { ConfirmThenDialogComponent as ɵbs } from './lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component';
|
|
46
45
|
export { ConfirmationDialogComponent as ɵbo } from './lib/interaction/components/confirmation-dialog/confirmation-dialog.component';
|
|
47
46
|
export { InPlaceInteractionContextComponent as ɵbv } from './lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component';
|
|
48
|
-
export { PopupInteractionContextComponent as
|
|
49
|
-
export { InteractionContextTriggerFor as
|
|
47
|
+
export { PopupInteractionContextComponent as ɵca } from './lib/interaction/components/popup-interaction-context/popup-interaction-context.component';
|
|
48
|
+
export { InteractionContextTriggerFor as ɵcb } from './lib/interaction/directives/interaction-context-trigger-for.directive';
|
|
50
49
|
export { InteractionModule as ɵbk } from './lib/interaction/interaction.module';
|
|
51
50
|
export { InteractionService as ɵbw } from './lib/interaction/services/interaction.service';
|
|
52
51
|
export { ModalInteractionContextFactory as ɵbx } from './lib/interaction/services/modal-interaction-context.factory';
|
|
53
|
-
export { AbstractPlaceNavigationComponent as
|
|
54
|
-
export { BusyOverlayComponent as
|
|
55
|
-
export { EmptyStateComponent as
|
|
56
|
-
export { ListPlaceNavComponent as
|
|
57
|
-
export { PlaceOutletComponent as
|
|
58
|
-
export { LEFT_RIGHT_PLACE_ANIMATION as
|
|
59
|
-
export { SidePlaceNavigationComponent as
|
|
60
|
-
export { TabbedPlaceNavigationComponent as
|
|
61
|
-
export { AUP_PLACE_CONFIG as
|
|
62
|
-
export { PlaceHistory as
|
|
63
|
-
export { PlaceRouter as
|
|
64
|
-
export { PlaceModule as
|
|
65
|
-
export { UrlService as
|
|
52
|
+
export { AbstractPlaceNavigationComponent as ɵco } from './lib/place/components/abstract-place-navigation.component';
|
|
53
|
+
export { BusyOverlayComponent as ɵce } from './lib/place/components/busy-overlay/busy-overlay.component';
|
|
54
|
+
export { EmptyStateComponent as ɵcd } from './lib/place/components/empty-state/empty-state.component';
|
|
55
|
+
export { ListPlaceNavComponent as ɵcp } from './lib/place/components/list-place-nav/list-place-nav.component';
|
|
56
|
+
export { PlaceOutletComponent as ɵcf } from './lib/place/components/place-outlet/place-outlet.component';
|
|
57
|
+
export { LEFT_RIGHT_PLACE_ANIMATION as ɵch, leftRightPlaceAnimation as ɵcg } from './lib/place/components/place-outlet/route-animations';
|
|
58
|
+
export { SidePlaceNavigationComponent as ɵcq } from './lib/place/components/side-place-navigation/side-place-navigation.component';
|
|
59
|
+
export { TabbedPlaceNavigationComponent as ɵcn } from './lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component';
|
|
60
|
+
export { AUP_PLACE_CONFIG as ɵci } from './lib/place/place-config';
|
|
61
|
+
export { PlaceHistory as ɵcm } from './lib/place/place-history';
|
|
62
|
+
export { PlaceRouter as ɵck } from './lib/place/place-router';
|
|
63
|
+
export { PlaceModule as ɵcc } from './lib/place/place.module';
|
|
64
|
+
export { UrlService as ɵcl } from './lib/place/url-service';
|
|
66
65
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|