@coolon/angular-ui-powerups 12.4.0-alpha.28 → 12.4.0-alpha.29

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.
Files changed (79) hide show
  1. package/assets/form.scss +5 -2
  2. package/assets/interaction.scss +6 -7
  3. package/bundles/coolon-angular-ui-powerups.umd.js +323 -57
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  7. package/esm2015/lib/components/components.module.js +4 -1
  8. package/esm2015/lib/components/components.module.js.map +1 -1
  9. package/esm2015/lib/components/components.module.metadata.json +1 -1
  10. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  11. package/esm2015/lib/components/exports.js +1 -0
  12. package/esm2015/lib/components/exports.js.map +1 -1
  13. package/esm2015/lib/components/exports.metadata.json +1 -1
  14. package/esm2015/lib/components/forms/abstract-input.component.js +1 -0
  15. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  16. package/esm2015/lib/components/labelled-value/labelled-value.component.js +22 -0
  17. package/esm2015/lib/components/labelled-value/labelled-value.component.js.map +1 -0
  18. package/esm2015/lib/components/labelled-value/labelled-value.component.metadata.json +1 -0
  19. package/esm2015/lib/components/labelled-value/labelled-value.component.ngfactory.js.map +1 -0
  20. package/esm2015/lib/components/labelled-value/labelled-value.component.scss.shim.ngstyle.js.map +1 -0
  21. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +17 -11
  22. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  23. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  24. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js +1 -1
  25. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.metadata.json +1 -1
  26. package/esm2015/lib/interaction/components/editors/edit-context.js +2 -0
  27. package/esm2015/lib/interaction/components/editors/edit-context.js.map +1 -0
  28. package/esm2015/lib/interaction/components/editors/edit-context.metadata.json +1 -0
  29. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js +28 -0
  30. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js.map +1 -0
  31. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.metadata.json +1 -0
  32. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js +160 -0
  33. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js.map +1 -0
  34. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.metadata.json +1 -0
  35. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ngfactory.js.map +1 -0
  36. package/esm2015/lib/interaction/components/input-activities/input-activity.js +71 -0
  37. package/esm2015/lib/interaction/components/input-activities/input-activity.js.map +1 -0
  38. package/esm2015/lib/interaction/components/input-activities/input-activity.metadata.json +1 -0
  39. package/esm2015/lib/interaction/components/input-activities/input-activity.ngfactory.js.map +1 -0
  40. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +3 -3
  41. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
  42. package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
  43. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +3 -4
  44. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
  45. package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
  46. package/esm2015/lib/interaction/exports.js +4 -3
  47. package/esm2015/lib/interaction/exports.js.map +1 -1
  48. package/esm2015/lib/interaction/exports.metadata.json +1 -1
  49. package/esm2015/lib/interaction/interaction.module.js +5 -2
  50. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  51. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  52. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  53. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  54. package/fesm2015/coolon-angular-ui-powerups.js +260 -29
  55. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  56. package/lib/components/exports.d.ts +1 -0
  57. package/lib/components/labelled-value/labelled-value.component.d.ts +7 -0
  58. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +14 -3
  59. package/lib/interaction/components/editors/edit-context.d.ts +3 -0
  60. package/lib/interaction/components/editors/inline-string-editor/inline-editor-model.d.ts +18 -0
  61. package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +56 -0
  62. package/lib/interaction/components/input-activities/input-activity.d.ts +33 -0
  63. package/lib/interaction/components/input-activities/select-input-activity.d.ts +11 -3
  64. package/lib/interaction/components/input-activities/string-input-activity.d.ts +2 -2
  65. package/lib/interaction/exports.d.ts +4 -3
  66. package/package.json +1 -1
  67. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js +0 -43
  68. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js.map +0 -1
  69. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.metadata.json +0 -1
  70. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.ngfactory.js.map +0 -1
  71. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js +0 -2
  72. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js.map +0 -1
  73. package/esm2015/lib/interaction/components/input-activities/input-activity-data.metadata.json +0 -1
  74. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js +0 -2
  75. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js.map +0 -1
  76. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.metadata.json +0 -1
  77. package/lib/interaction/components/input-activities/abstract-input-activity.d.ts +0 -12
  78. package/lib/interaction/components/input-activities/input-activity-data.d.ts +0 -11
  79. package/lib/interaction/components/input-activities/select-input-activity-data.d.ts +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":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AmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0DAA0D,CAAC;AACzE,cAAc,sEAAsE,CAAC;AACrF,cAAc,oFAAoF,CAAC;AACnG,cAAc,8DAA8D,CAAC;AAC7E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,oEAAoE,CAAC;AACnF,cAAc,kFAAkF,CAAC;AACjG,cAAc,kEAAkE,CAAC;AACjF,cAAc,gFAAgF,CAAC;AAC/F,cAAc,wDAAwD,CAAC;AACvE,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2EAA2E,CAAC;AAC1F,cAAc,iFAAiF,CAAC;AAChG,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+DAA+D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./alignment\";\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./track-by\";\nexport * from \"./busy-overlay/busy-overlay.component\";\nexport * from \"./cards/abstract-card-container.component\";\nexport * from \"./cards/card-container/card-container.component\";\nexport * from \"./cards/card-stack/card-stack.component\";\nexport * from \"./commands/command-face\";\nexport * from \"./commands/flex.component\";\nexport * from \"./commands/separator.component\";\nexport * from \"./commands/command/command.component\";\nexport * from \"./commands/command-face/command-face.component\";\nexport * from \"./commands/group/command-container\";\nexport * from \"./commands/group/popup-aware.component\";\nexport * from \"./commands/group/popup-container\";\nexport * from \"./commands/group/popup-menu/abstract-popup-menu.component\";\nexport * from \"./commands/group/popup-menu/more-menu.component\";\nexport * from \"./commands/group/popup-menu/popup-menu.component\";\nexport * from \"./commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component\";\nexport * from \"./commands/group/tool-bar/tool-bar.component\";\nexport * from \"./empty-state/empty-state.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/abstract-list-input.component\";\nexport * from \"./forms/abstract-value-input.component\";\nexport * from \"./forms/autocomplete-input/autocomplete-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/multiple-select-input/multiple-select-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./forms/text-input/text-input.component\";\nexport * from \"./icon/icon.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./section-header/section-header.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./tables/abstract-table-model\";\nexport * from \"./tables/abstract-table.component\";\nexport * from \"./tables/column-list-model\";\nexport * from \"./tables/table/cell-editors\";\nexport * from \"./tables/table/cell-portal-ref\";\nexport * from \"./tables/table/cell-renderer\";\nexport * from \"./tables/table/column-model\";\nexport * from \"./tables/table/column-text-properties\";\nexport * from \"./tables/table/edit-session\";\nexport * from \"./tables/table/mutable-cell-renderer\";\nexport * from \"./tables/table/table-def\";\nexport * from \"./tables/table/table-model\";\nexport * from \"./tables/table/table.component\";\nexport * from \"./tables/table/column-template/column-template.directive\";\nexport * from \"./tables/table/default-cell-renderer/default-cell-renderer.component\";\nexport * from \"./tables/table/default-header-cell-renderer/default-header-cell-renderer.component\";\nexport * from \"./tables/table/edit-row-controls/edit-row-controls.component\";\nexport * from \"./tables/table/paginator/paginator.component\";\nexport * from \"./tables/table/select-cell-renderer/select-cell-renderer.component\";\nexport * from \"./tables/table/select-header-cell-renderer/select-header-cell-renderer.component\";\nexport * from \"./tables/table/table-cell-renderer/table-cell-renderer.component\";\nexport * from \"./tables/table/table-header-cell-renderer/table-header-cell-renderer.component\";\nexport * from \"./tables/table/table-row-menu/table-row-menu.component\";\nexport * from \"./tables/tree-table/decorated-tree-node\";\nexport * from \"./tables/tree-table/flattened-tree-list-model\";\nexport * from \"./tables/tree-table/tree-expansion-model\";\nexport * from \"./tables/tree-table/tree-label-column-model\";\nexport * from \"./tables/tree-table/tree-node\";\nexport * from \"./tables/tree-table/tree-table-component\";\nexport * from \"./tables/tree-table/tree-table-model\";\nexport * from \"./tables/tree-table/visitable.class\";\nexport * from \"./tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component\";\nexport * from \"./tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/components/exports.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,yCAAyC,CAAC;AACxD,cAAc,yBAAyB,CAAC;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EAAsE,CAAC;AACrF,cAAc,oFAAoF,CAAC;AACnG,cAAc,8DAA8D,CAAC;AAC7E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,oEAAoE,CAAC;AACnF,cAAc,kFAAkF,CAAC;AACjG,cAAc,kEAAkE,CAAC;AACjF,cAAc,gFAAgF,CAAC;AAC/F,cAAc,wDAAwD,CAAC;AACvE,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2EAA2E,CAAC;AAC1F,cAAc,iFAAiF,CAAC;AAChG,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+DAA+D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./alignment\";\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./track-by\";\nexport * from \"./busy-overlay/busy-overlay.component\";\nexport * from \"./cards/abstract-card-container.component\";\nexport * from \"./cards/card-container/card-container.component\";\nexport * from \"./cards/card-stack/card-stack.component\";\nexport * from \"./commands/command-face\";\nexport * from \"./commands/flex.component\";\nexport * from \"./commands/separator.component\";\nexport * from \"./commands/command/command.component\";\nexport * from \"./commands/command-face/command-face.component\";\nexport * from \"./commands/group/command-container\";\nexport * from \"./commands/group/popup-aware.component\";\nexport * from \"./commands/group/popup-container\";\nexport * from \"./commands/group/popup-menu/abstract-popup-menu.component\";\nexport * from \"./commands/group/popup-menu/more-menu.component\";\nexport * from \"./commands/group/popup-menu/popup-menu.component\";\nexport * from \"./commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component\";\nexport * from \"./commands/group/tool-bar/tool-bar.component\";\nexport * from \"./empty-state/empty-state.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/abstract-list-input.component\";\nexport * from \"./forms/abstract-value-input.component\";\nexport * from \"./forms/autocomplete-input/autocomplete-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/multiple-select-input/multiple-select-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./forms/text-input/text-input.component\";\nexport * from \"./icon/icon.component\";\nexport * from \"./labelled-value/labelled-value.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./section-header/section-header.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./tables/abstract-table-model\";\nexport * from \"./tables/abstract-table.component\";\nexport * from \"./tables/column-list-model\";\nexport * from \"./tables/table/cell-editors\";\nexport * from \"./tables/table/cell-portal-ref\";\nexport * from \"./tables/table/cell-renderer\";\nexport * from \"./tables/table/column-model\";\nexport * from \"./tables/table/column-text-properties\";\nexport * from \"./tables/table/edit-session\";\nexport * from \"./tables/table/mutable-cell-renderer\";\nexport * from \"./tables/table/table-def\";\nexport * from \"./tables/table/table-model\";\nexport * from \"./tables/table/table.component\";\nexport * from \"./tables/table/column-template/column-template.directive\";\nexport * from \"./tables/table/default-cell-renderer/default-cell-renderer.component\";\nexport * from \"./tables/table/default-header-cell-renderer/default-header-cell-renderer.component\";\nexport * from \"./tables/table/edit-row-controls/edit-row-controls.component\";\nexport * from \"./tables/table/paginator/paginator.component\";\nexport * from \"./tables/table/select-cell-renderer/select-cell-renderer.component\";\nexport * from \"./tables/table/select-header-cell-renderer/select-header-cell-renderer.component\";\nexport * from \"./tables/table/table-cell-renderer/table-cell-renderer.component\";\nexport * from \"./tables/table/table-header-cell-renderer/table-header-cell-renderer.component\";\nexport * from \"./tables/table/table-row-menu/table-row-menu.component\";\nexport * from \"./tables/tree-table/decorated-tree-node\";\nexport * from \"./tables/tree-table/flattened-tree-list-model\";\nexport * from \"./tables/tree-table/tree-expansion-model\";\nexport * from \"./tables/tree-table/tree-label-column-model\";\nexport * from \"./tables/tree-table/tree-node\";\nexport * from \"./tables/tree-table/tree-table-component\";\nexport * from \"./tables/tree-table/tree-table-model\";\nexport * from \"./tables/tree-table/visitable.class\";\nexport * from \"./tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component\";\nexport * from \"./tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./alignment"},{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./focusable.component"},{"from":"./resize-aware.component"},{"from":"./track-by"},{"from":"./busy-overlay/busy-overlay.component"},{"from":"./cards/abstract-card-container.component"},{"from":"./cards/card-container/card-container.component"},{"from":"./cards/card-stack/card-stack.component"},{"from":"./commands/command-face"},{"from":"./commands/flex.component"},{"from":"./commands/separator.component"},{"from":"./commands/command/command.component"},{"from":"./commands/command-face/command-face.component"},{"from":"./commands/group/command-container"},{"from":"./commands/group/popup-aware.component"},{"from":"./commands/group/popup-container"},{"from":"./commands/group/popup-menu/abstract-popup-menu.component"},{"from":"./commands/group/popup-menu/more-menu.component"},{"from":"./commands/group/popup-menu/popup-menu.component"},{"from":"./commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component"},{"from":"./commands/group/tool-bar/tool-bar.component"},{"from":"./empty-state/empty-state.component"},{"from":"./focus-container/focus-container.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/abstract-list-input.component"},{"from":"./forms/abstract-value-input.component"},{"from":"./forms/autocomplete-input/autocomplete-input.component"},{"from":"./forms/checkbox-input/checkbox-input.component"},{"from":"./forms/multiple-select-input/multiple-select-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./forms/text-input/text-input.component"},{"from":"./icon/icon.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./section-header/section-header.component"},{"from":"./switch-case/switch-case.component"},{"from":"./tables/abstract-table-model"},{"from":"./tables/abstract-table.component"},{"from":"./tables/column-list-model"},{"from":"./tables/table/cell-editors"},{"from":"./tables/table/cell-portal-ref"},{"from":"./tables/table/cell-renderer"},{"from":"./tables/table/column-model"},{"from":"./tables/table/column-text-properties"},{"from":"./tables/table/edit-session"},{"from":"./tables/table/mutable-cell-renderer"},{"from":"./tables/table/table-def"},{"from":"./tables/table/table-model"},{"from":"./tables/table/table.component"},{"from":"./tables/table/column-template/column-template.directive"},{"from":"./tables/table/default-cell-renderer/default-cell-renderer.component"},{"from":"./tables/table/default-header-cell-renderer/default-header-cell-renderer.component"},{"from":"./tables/table/edit-row-controls/edit-row-controls.component"},{"from":"./tables/table/paginator/paginator.component"},{"from":"./tables/table/select-cell-renderer/select-cell-renderer.component"},{"from":"./tables/table/select-header-cell-renderer/select-header-cell-renderer.component"},{"from":"./tables/table/table-cell-renderer/table-cell-renderer.component"},{"from":"./tables/table/table-header-cell-renderer/table-header-cell-renderer.component"},{"from":"./tables/table/table-row-menu/table-row-menu.component"},{"from":"./tables/tree-table/decorated-tree-node"},{"from":"./tables/tree-table/flattened-tree-list-model"},{"from":"./tables/tree-table/tree-expansion-model"},{"from":"./tables/tree-table/tree-label-column-model"},{"from":"./tables/tree-table/tree-node"},{"from":"./tables/tree-table/tree-table-component"},{"from":"./tables/tree-table/tree-table-model"},{"from":"./tables/tree-table/visitable.class"},{"from":"./tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component"},{"from":"./tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"},{"from":"./vertical-focus-container/vertical-focus-container.component"}]}]
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./alignment"},{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./focusable.component"},{"from":"./resize-aware.component"},{"from":"./track-by"},{"from":"./busy-overlay/busy-overlay.component"},{"from":"./cards/abstract-card-container.component"},{"from":"./cards/card-container/card-container.component"},{"from":"./cards/card-stack/card-stack.component"},{"from":"./commands/command-face"},{"from":"./commands/flex.component"},{"from":"./commands/separator.component"},{"from":"./commands/command/command.component"},{"from":"./commands/command-face/command-face.component"},{"from":"./commands/group/command-container"},{"from":"./commands/group/popup-aware.component"},{"from":"./commands/group/popup-container"},{"from":"./commands/group/popup-menu/abstract-popup-menu.component"},{"from":"./commands/group/popup-menu/more-menu.component"},{"from":"./commands/group/popup-menu/popup-menu.component"},{"from":"./commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component"},{"from":"./commands/group/tool-bar/tool-bar.component"},{"from":"./empty-state/empty-state.component"},{"from":"./focus-container/focus-container.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/abstract-list-input.component"},{"from":"./forms/abstract-value-input.component"},{"from":"./forms/autocomplete-input/autocomplete-input.component"},{"from":"./forms/checkbox-input/checkbox-input.component"},{"from":"./forms/multiple-select-input/multiple-select-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./forms/text-input/text-input.component"},{"from":"./icon/icon.component"},{"from":"./labelled-value/labelled-value.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./section-header/section-header.component"},{"from":"./switch-case/switch-case.component"},{"from":"./tables/abstract-table-model"},{"from":"./tables/abstract-table.component"},{"from":"./tables/column-list-model"},{"from":"./tables/table/cell-editors"},{"from":"./tables/table/cell-portal-ref"},{"from":"./tables/table/cell-renderer"},{"from":"./tables/table/column-model"},{"from":"./tables/table/column-text-properties"},{"from":"./tables/table/edit-session"},{"from":"./tables/table/mutable-cell-renderer"},{"from":"./tables/table/table-def"},{"from":"./tables/table/table-model"},{"from":"./tables/table/table.component"},{"from":"./tables/table/column-template/column-template.directive"},{"from":"./tables/table/default-cell-renderer/default-cell-renderer.component"},{"from":"./tables/table/default-header-cell-renderer/default-header-cell-renderer.component"},{"from":"./tables/table/edit-row-controls/edit-row-controls.component"},{"from":"./tables/table/paginator/paginator.component"},{"from":"./tables/table/select-cell-renderer/select-cell-renderer.component"},{"from":"./tables/table/select-header-cell-renderer/select-header-cell-renderer.component"},{"from":"./tables/table/table-cell-renderer/table-cell-renderer.component"},{"from":"./tables/table/table-header-cell-renderer/table-header-cell-renderer.component"},{"from":"./tables/table/table-row-menu/table-row-menu.component"},{"from":"./tables/tree-table/decorated-tree-node"},{"from":"./tables/tree-table/flattened-tree-list-model"},{"from":"./tables/tree-table/tree-expansion-model"},{"from":"./tables/tree-table/tree-label-column-model"},{"from":"./tables/tree-table/tree-node"},{"from":"./tables/tree-table/tree-table-component"},{"from":"./tables/tree-table/tree-table-model"},{"from":"./tables/tree-table/visitable.class"},{"from":"./tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component"},{"from":"./tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"},{"from":"./vertical-focus-container/vertical-focus-container.component"}]}]
@@ -6,6 +6,7 @@ export class AbstractInputComponent extends DisposableComponent {
6
6
  constructor() {
7
7
  super();
8
8
  this.onValueEditedListeners = new EventListenerList();
9
+ this.userFloatLabel = 'always'; // TODO: make this an injectable default
9
10
  this.dense = false;
10
11
  // TODO: fix this.
11
12
  // tslint:disable-next-line:no-output-native
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-input.component.js","sourceRoot":"","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C,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,QAAiC;QAC7C,OAAO,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;;;YAzHF,SAAS,SAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;;;;oBAOxB,KAAK;6BACL,KAAK,SAAC,YAAY;mBAClB,KAAK;0BACL,KAAK;oBAEL,WAAW,SAAC,aAAa,cACzB,KAAK;2BAGL,KAAK,SAAC,eAAe;0BACrB,KAAK,SAAC,cAAc;2BACpB,KAAK,SAAC,eAAe;4BACrB,KAAK,SAAC,gBAAgB;2BACtB,KAAK,SAAC,eAAe;oBAIrB,MAAM;mBAEN,MAAM;uBAEN,MAAM;wBAEN,MAAM;4BAIN,WAAW,SAAC,OAAO;0BAGnB,YAAY,SAAC,OAAO;4BAKpB,YAAY,SAAC,SAAS;6BAMtB,YAAY,SAAC,UAAU","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, HostBinding, HostListener, Input, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroupDirective, NgForm } from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport {\n Command, Disposable,\n EventListenerList,\n FocusManager,\n ListModel,\n MutableValueModel,\n StoreInValueModel,\n ValueModel\n} from '@coolon/pectin';\nimport { DisposableComponent } from '../disposable-component';\n\ninterface InputModel<T> {\n value: T;\n enabled: ValueModel<boolean>;\n errorList: ListModel<string>;\n focusContext: FocusManager.Context;\n}\n\n@Component({ template: '' })\nexport class AbstractInputComponent<T> extends DisposableComponent implements OnInit {\n\n protected onValueEditedListeners = new EventListenerList<(is: T, was: T) => void>();\n\n protected formValueModel: InputModel<T>;\n\n @Input() label: string;\n @Input('floatLabel') userFloatLabel: 'auto' | 'always' | 'never';\n @Input() hint: string;\n @Input() placeholder: string;\n\n @HostBinding('class.dense')\n @Input() dense = false;\n\n // Note: I don't need to use delegates here as I never subscribe to the commands models\n @Input('command.focus') focusCommand: Command<any>;\n @Input('command.blur') blurCommand: Command<any>;\n @Input('command.enter') enterCommand: Command<any>;\n @Input('command.escape') escapeCommand: Command<any>;\n @Input('command.click') clickCommand: Command<any>;\n\n // TODO: fix this.\n // tslint:disable-next-line:no-output-native\n @Output() focus = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() blur = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() enterKey = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() escapeKey = new EventEmitter();\n\n readonly errorStateMatcher: ErrorStateMatcher;\n\n @HostBinding('class')\n baseClassName = 'aup-input-component';\n\n @HostListener('click')\n notifyClick() {\n this.safelyInvoke(this.clickCommand);\n }\n\n @HostListener('focusin')\n notifyFocusIn() {\n this.safelyInvoke(this.focusCommand);\n this.focus.emit();\n }\n\n @HostListener('focusout')\n notifyFocusOut() {\n this.safelyInvoke(this.blurCommand);\n this.blur.emit();\n }\n\n notifyEnterKey() {\n this.safelyInvoke(this.enterCommand);\n this.enterKey.emit();\n }\n\n notifyEscapeKey() {\n this.safelyInvoke(this.escapeCommand);\n this.escapeKey.emit();\n }\n\n protected safelyInvoke(command: Command<any>) {\n if (command && command.enabled.value) {\n command.execute();\n }\n }\n\n constructor() {\n super();\n const self = this;\n this.errorStateMatcher = {\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n return self.hasErrors();\n }\n };\n }\n\n ngOnInit(): void {\n }\n\n isEnabled(): boolean {\n return this.enabled.value;\n }\n\n get enabled(): ValueModel<boolean> {\n return this.formValueModel.enabled;\n }\n\n hasErrors(): boolean {\n return !this.errorList.query().isEmpty();\n }\n\n get errorList(): ListModel<string> {\n return this.formValueModel.errorList;\n }\n\n get firstError() {\n return this.hasErrors() ? this.errorList.value[0] : null;\n }\n\n get focusContext() {\n return this.formValueModel.focusContext;\n }\n\n get floatLabel(): 'auto' | 'always' | 'never' {\n return this.dense ? 'never' : this.userFloatLabel;\n }\n\n get showHint(): boolean {\n return this.dense ? false : !!this.hint;\n }\n\n /**\n * Invokes the callback when this components value is changed by a user edit.\n * @param callback\n */\n onValueEdited(callback: (is: T, was: T) => void): Disposable {\n return this.onValueEditedListeners.add(callback);\n }\n\n}\n"]}
1
+ {"version":3,"file":"abstract-input.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/forms/abstract-input.component.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAG1G,OAAO,EACL,OAAO,EACP,iBAAiB,EAMlB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D,MAAM,OAAO,sBAA0B,SAAQ,mBAAmB;IAqEhE;QACE,KAAK,EAAE,CAAC;QApEA,2BAAsB,GAAG,IAAI,iBAAiB,EAA2B,CAAC;QAK/D,mBAAc,GAAgC,QAAQ,CAAC,CAAC,wCAAwC;QAK5G,UAAK,GAAG,KAAK,CAAC;QASvB,kBAAkB;QAClB,4CAA4C;QAClC,UAAK,GAAG,IAAI,YAAY,EAAE,CAAC;QACrC,4CAA4C;QAClC,SAAI,GAAG,IAAI,YAAY,EAAE,CAAC;QACpC,4CAA4C;QAClC,aAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,4CAA4C;QAClC,cAAS,GAAG,IAAI,YAAY,EAAE,CAAC;QAKzC,kBAAa,GAAG,qBAAqB,CAAC;QAqCpC,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,iBAAiB,GAAG;YACvB,YAAY,CAAC,OAA2B,EAAE,IAAwC;gBAChF,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;YAC1B,CAAC;SACF,CAAC;IACJ,CAAC;IAxCD,WAAW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;IAC3D,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC;IAC1C,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC;IACpD,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,QAAiC;QAC7C,OAAO,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;;;YAzHF,SAAS,SAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;;;;oBAOxB,KAAK;6BACL,KAAK,SAAC,YAAY;mBAClB,KAAK;0BACL,KAAK;oBAEL,WAAW,SAAC,aAAa,cACzB,KAAK;2BAGL,KAAK,SAAC,eAAe;0BACrB,KAAK,SAAC,cAAc;2BACpB,KAAK,SAAC,eAAe;4BACrB,KAAK,SAAC,gBAAgB;2BACtB,KAAK,SAAC,eAAe;oBAIrB,MAAM;mBAEN,MAAM;uBAEN,MAAM;wBAEN,MAAM;4BAIN,WAAW,SAAC,OAAO;0BAGnB,YAAY,SAAC,OAAO;4BAKpB,YAAY,SAAC,SAAS;6BAMtB,YAAY,SAAC,UAAU","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, HostBinding, HostListener, Input, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroupDirective, NgForm } from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport {\n Command, Disposable,\n EventListenerList,\n FocusManager,\n ListModel,\n MutableValueModel,\n StoreInValueModel,\n ValueModel\n} from '@coolon/pectin';\nimport { DisposableComponent } from '../disposable-component';\n\ninterface InputModel<T> {\n value: T;\n enabled: ValueModel<boolean>;\n errorList: ListModel<string>;\n focusContext: FocusManager.Context;\n}\n\n@Component({ template: '' })\nexport class AbstractInputComponent<T> extends DisposableComponent implements OnInit {\n\n protected onValueEditedListeners = new EventListenerList<(is: T, was: T) => void>();\n\n protected formValueModel: InputModel<T>;\n\n @Input() label: string;\n @Input('floatLabel') userFloatLabel: 'auto' | 'always' | 'never' = 'always'; // TODO: make this an injectable default\n @Input() hint: string;\n @Input() placeholder: string;\n\n @HostBinding('class.dense')\n @Input() dense = false;\n\n // Note: I don't need to use delegates here as I never subscribe to the commands models\n @Input('command.focus') focusCommand: Command<any>;\n @Input('command.blur') blurCommand: Command<any>;\n @Input('command.enter') enterCommand: Command<any>;\n @Input('command.escape') escapeCommand: Command<any>;\n @Input('command.click') clickCommand: Command<any>;\n\n // TODO: fix this.\n // tslint:disable-next-line:no-output-native\n @Output() focus = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() blur = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() enterKey = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() escapeKey = new EventEmitter();\n\n readonly errorStateMatcher: ErrorStateMatcher;\n\n @HostBinding('class')\n baseClassName = 'aup-input-component';\n\n @HostListener('click')\n notifyClick() {\n this.safelyInvoke(this.clickCommand);\n }\n\n @HostListener('focusin')\n notifyFocusIn() {\n this.safelyInvoke(this.focusCommand);\n this.focus.emit();\n }\n\n @HostListener('focusout')\n notifyFocusOut() {\n this.safelyInvoke(this.blurCommand);\n this.blur.emit();\n }\n\n notifyEnterKey() {\n this.safelyInvoke(this.enterCommand);\n this.enterKey.emit();\n }\n\n notifyEscapeKey() {\n this.safelyInvoke(this.escapeCommand);\n this.escapeKey.emit();\n }\n\n protected safelyInvoke(command: Command<any>) {\n if (command && command.enabled.value) {\n command.execute();\n }\n }\n\n constructor() {\n super();\n const self = this;\n this.errorStateMatcher = {\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n return self.hasErrors();\n }\n };\n }\n\n ngOnInit(): void {\n }\n\n isEnabled(): boolean {\n return this.enabled.value;\n }\n\n get enabled(): ValueModel<boolean> {\n return this.formValueModel.enabled;\n }\n\n hasErrors(): boolean {\n return !this.errorList.query().isEmpty();\n }\n\n get errorList(): ListModel<string> {\n return this.formValueModel.errorList;\n }\n\n get firstError() {\n return this.hasErrors() ? this.errorList.value[0] : null;\n }\n\n get focusContext() {\n return this.formValueModel.focusContext;\n }\n\n get floatLabel(): 'auto' | 'always' | 'never' {\n return this.dense ? 'never' : this.userFloatLabel;\n }\n\n get showHint(): boolean {\n return this.dense ? false : !!this.hint;\n }\n\n /**\n * Invokes the callback when this components value is changed by a user edit.\n * @param callback\n */\n onValueEdited(callback: (is: T, was: T) => void): Disposable {\n return this.onValueEditedListeners.add(callback);\n }\n\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { Component, Input } from '@angular/core';
2
+ import { DisposableComponent } from '../disposable-component';
3
+ export class LabelledValueComponent extends DisposableComponent {
4
+ constructor() {
5
+ super();
6
+ // const {chain} = Dsl.disposeWith(this);
7
+ }
8
+ ngOnInit() {
9
+ }
10
+ }
11
+ LabelledValueComponent.decorators = [
12
+ { type: Component, args: [{
13
+ selector: 'aup-labelled-value',
14
+ template: "<label>{{label}}</label>\n<ng-content></ng-content>\n",
15
+ styles: [":host{display:inline-flex;flex-direction:column;align-items:flex-start}label{font-weight:400;font-size:12px;color:rgba(0,0,0,.57);margin-bottom:6px;white-space:nowrap}"]
16
+ },] }
17
+ ];
18
+ LabelledValueComponent.ctorParameters = () => [];
19
+ LabelledValueComponent.propDecorators = {
20
+ label: [{ type: Input }]
21
+ };
22
+ //# sourceMappingURL=labelled-value.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labelled-value.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/labelled-value/labelled-value.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAO9D,MAAM,OAAO,sBAAuB,SAAQ,mBAAmB;IAO7D;QACE,KAAK,EAAE,CAAC;QACR,yCAAyC;IAC3C,CAAC;IAED,QAAQ;IACR,CAAC;;;YAlBF,SAAS,SAAC;gBACT,QAAQ,EAAE,oBAAoB;gBAC9B,iEAA8C;;aAE/C;;;;oBAKE,KAAK","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { DisposableComponent } from '../disposable-component';\n\n@Component({\n selector: 'aup-labelled-value',\n templateUrl: './labelled-value.component.html',\n styleUrls: ['./labelled-value.component.scss']\n})\nexport class LabelledValueComponent extends DisposableComponent implements OnInit {\n\n // readonly i18n = I18nMarsUi.components.layout.valueDisplay;\n\n @Input()\n label: string;\n\n constructor() {\n super();\n // const {chain} = Dsl.disposeWith(this);\n }\n\n ngOnInit(): void {\n }\n\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"LabelledValueComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../disposable-component","name":"DisposableComponent","line":8,"character":44},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"aup-labelled-value","template":"<label>{{label}}</label>\n<ng-content></ng-content>\n","styles":[":host{display:inline-flex;flex-direction:column;align-items:flex-start}label{font-weight:400;font-size:12px;color:rgba(0,0,0,.57);margin-bottom:6px;white-space:nowrap}"]}]}],"members":{"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labelled-value.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/labelled-value/labelled-value.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labelled-value.component.scss.shim.ngstyle.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/labelled-value/labelled-value.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -1,6 +1,7 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { ChangeDetectorRef, Component, HostBinding, Input } from '@angular/core';
3
3
  import { Command, TrackExternal } from '@coolon/pectin';
4
+ import { Enum } from 'typescript-string-enums';
4
5
  import { CommandFace } from '../../../components/commands/command-face';
5
6
  import { DisposableComponent } from '../../../components/disposable-component';
6
7
  /**
@@ -28,7 +29,8 @@ export class ActivityActionsComponent extends DisposableComponent {
28
29
  constructor(cdr) {
29
30
  super();
30
31
  this.cdr = cdr;
31
- this.align = 'stretch';
32
+ this.layout = ActivityActionsComponent.Layout.BLOCK;
33
+ this.align = ActivityActionsComponent.Align.STRETCH;
32
34
  }
33
35
  set faces(faces) {
34
36
  this.confirmFace = faces.confirm;
@@ -40,12 +42,6 @@ export class ActivityActionsComponent extends DisposableComponent {
40
42
  set style(style) {
41
43
  this.faces = style;
42
44
  }
43
- get alignEnd() {
44
- return this.align === 'end';
45
- }
46
- get alignStretch() {
47
- return this.align === 'stretch';
48
- }
49
45
  ngOnInit() {
50
46
  }
51
47
  hasConfirmFace() {
@@ -64,7 +60,7 @@ ActivityActionsComponent.decorators = [
64
60
  { type: Component, args: [{
65
61
  selector: 'aup-activity-actions',
66
62
  template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n",
67
- styles: [":host{display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}"]
63
+ styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr;padding:0}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}"]
68
64
  },] }
69
65
  ];
70
66
  ActivityActionsComponent.ctorParameters = () => [
@@ -77,9 +73,8 @@ ActivityActionsComponent.propDecorators = {
77
73
  confirmFace: [{ type: Input }],
78
74
  cancelFace: [{ type: Input }],
79
75
  style: [{ type: Input }],
80
- align: [{ type: Input }],
81
- alignEnd: [{ type: HostBinding, args: ['class.align-end',] }],
82
- alignStretch: [{ type: HostBinding, args: ['class.align-stretch',] }]
76
+ layout: [{ type: Input }, { type: HostBinding, args: ['attr.layout',] }],
77
+ align: [{ type: Input }, { type: HostBinding, args: ['attr.align',] }]
83
78
  };
84
79
  __decorate([
85
80
  TrackExternal(),
@@ -89,4 +84,15 @@ __decorate([
89
84
  TrackExternal(),
90
85
  __metadata("design:type", Command)
91
86
  ], ActivityActionsComponent.prototype, "cancelCommand", void 0);
87
+ (function (ActivityActionsComponent) {
88
+ ActivityActionsComponent.Layout = Enum({
89
+ INLINE: 'inline',
90
+ BLOCK: 'block'
91
+ });
92
+ ActivityActionsComponent.Align = Enum({
93
+ START: 'start',
94
+ END: 'end',
95
+ STRETCH: 'stretch'
96
+ });
97
+ })(ActivityActionsComponent || (ActivityActionsComponent = {}));
92
98
  //# sourceMappingURL=activity-actions.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"activity-actions.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-actions/activity-actions.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,OAAO,EAAS,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,MAAM,OAAO,wBAAyB,SAAQ,mBAAmB;IAiD/D,YAA6B,GAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,QAAG,GAAH,GAAG,CAAmB;QAZnD,UAAK,GAAgC,SAAS,CAAC;IAc/C,CAAC;IAnCD,IACI,KAAK,CAAC,KAAqC;QAC7C,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC;IACjC,CAAC;IAQD;;OAEG;IACH,IACI,KAAK,CAAC,KAAqC;QAC7C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAKD,IACI,QAAQ;QACV,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IAC9B,CAAC;IAED,IACI,YAAY;QACd,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC;IAClC,CAAC;IAMD,QAAQ;IACR,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,aAAa;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,YAAY,CAAC,QAA+E;QAC1F,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;QAC9C,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC;QAC5C,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC3B,CAAC;;;YAzEF,SAAS,SAAC;gBACT,QAAQ,EAAE,sBAAsB;gBAChC,+bAAgD;;aAEjD;;;YA9BQ,iBAAiB;;;6BAoCvB,KAAK;4BAOL,KAAK;oBAIL,KAAK;0BAML,KAAK;yBAGL,KAAK;oBAML,KAAK;oBAKL,KAAK;uBAGL,WAAW,SAAC,iBAAiB;2BAK7B,WAAW,SAAC,qBAAqB;;AArClC;IADC,aAAa,EAAE;8BACA,OAAO;gEAAM;AAO7B;IADC,aAAa,EAAE;8BACD,OAAO;+DAAM","sourcesContent":["import { ChangeDetectorRef, Component, HostBinding, Input, OnInit } from '@angular/core';\nimport { Command, Trace, TrackExternal } from '@coolon/pectin';\nimport { CommandFace } from '../../../components/commands/command-face';\nimport { DisposableComponent } from '../../../components/disposable-component';\n\n/**\n * @example\n * <aup-activity-actions [confirmFace]=\"saveFace\" [cancelFace]=\"cancelFace\">\n * </aup-activity-actions>\n *\n * <aup-activity-actions [faces]=\"{confirm: saveFace, cancel: cancelFace}\">\n * </aup-activity-actions>\n *\n * // Running `ng g @coolon/angular-ui-powerups:aup-i18n` will install default\n * // style definitions\n * <aup-activity-actions [faces]=\"I18n.aup.components.activityActions.styles.okCancelIcons\">\n * </aup-activity-actions>\n *\n * // you can also add additional content that will be displayed along with the buttons.\n * // The location of the content depends on the alignment attribute.\n * <aup-activity-actions\n * align=\"stretch\"\n * [faces]=\"I18n.aup.components.activityActions.styles.okCancelIcons\">\n * <span>This content will be between the two commands</span>\n * </aup-activity-actions>\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 /**\n * @deprecated activity actions now use the confirm command of the activity automatically\n */\n @Input()\n @TrackExternal()\n confirmCommand: Command<any>;\n\n /**\n * @deprecated activity actions now use the cancel command of the activity automatically\n */\n @Input()\n @TrackExternal()\n cancelCommand: Command<any>;\n\n @Input()\n set faces(faces: ActivityActionsComponent.Style) {\n this.confirmFace = faces.confirm;\n this.cancelFace = faces.cancel;\n }\n\n @Input()\n confirmFace: CommandFace;\n\n @Input()\n cancelFace: CommandFace;\n\n /**\n * @deprecated use #faces instead.\n */\n @Input()\n set style(style: ActivityActionsComponent.Style) {\n this.faces = style;\n }\n\n @Input()\n align: 'start' | 'end' | 'stretch' = 'stretch';\n\n @HostBinding('class.align-end')\n get alignEnd(): boolean {\n return this.align === 'end';\n }\n\n @HostBinding('class.align-stretch')\n get alignStretch(): boolean {\n return this.align === 'stretch';\n }\n\n constructor(private readonly cdr: ChangeDetectorRef) {\n super();\n }\n\n ngOnInit() {\n }\n\n hasConfirmFace() {\n return !!this.confirmFace;\n }\n\n hasCancelFace() {\n return !!this.cancelFace;\n }\n\n initCommands(activity: { confirmCommand: Command<unknown>, cancelCommand: Command<unknown> }) {\n this.confirmCommand = activity.confirmCommand;\n this.cancelCommand = activity.cancelCommand;\n this.cdr.detectChanges();\n }\n\n}\n\nexport namespace ActivityActionsComponent {\n export interface Style {\n confirm: CommandFace;\n cancel: CommandFace;\n }\n}\n"]}
1
+ {"version":3,"file":"activity-actions.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-actions/activity-actions.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzF,OAAO,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K;oBAIL,KAAK;0BAML,KAAK;yBAGL,KAAK;oBAML,KAAK;qBAKL,KAAK,YACL,WAAW,SAAC,aAAa;oBAGzB,KAAK,YACL,WAAW,SAAC,YAAY;;AAlCzB;IADC,aAAa,EAAE;8BACA,OAAO;gEAAM;AAO7B;IADC,aAAa,EAAE;8BACD,OAAO;+DAAM;AAsD9B,WAAiB,wBAAwB;IAE1B,+BAAM,GAAG,IAAI,CAAC;QACzB,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,OAAO;KACf,CAAC,CAAC;IAGU,8BAAK,GAAG,IAAI,CAAC;QACxB,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,SAAS;KACnB,CAAC,CAAC;AAQL,CAAC,EApBgB,wBAAwB,KAAxB,wBAAwB,QAoBxC","sourcesContent":["import { ChangeDetectorRef, Component, HostBinding, Input, OnInit } from '@angular/core';\nimport { Command, TrackExternal } from '@coolon/pectin';\nimport { Enum } from 'typescript-string-enums';\nimport { CommandFace } from '../../../components/commands/command-face';\nimport { DisposableComponent } from '../../../components/disposable-component';\n\n/**\n * @example\n * <aup-activity-actions [confirmFace]=\"saveFace\" [cancelFace]=\"cancelFace\">\n * </aup-activity-actions>\n *\n * <aup-activity-actions [faces]=\"{confirm: saveFace, cancel: cancelFace}\">\n * </aup-activity-actions>\n *\n * // Running `ng g @coolon/angular-ui-powerups:aup-i18n` will install default\n * // style definitions\n * <aup-activity-actions [faces]=\"I18n.aup.components.activityActions.styles.okCancelIcons\">\n * </aup-activity-actions>\n *\n * // you can also add additional content that will be displayed along with the buttons.\n * // The location of the content depends on the alignment attribute.\n * <aup-activity-actions\n * align=\"stretch\"\n * [faces]=\"I18n.aup.components.activityActions.styles.okCancelIcons\">\n * <span>This content will be between the two commands</span>\n * </aup-activity-actions>\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 /**\n * @deprecated activity actions now use the confirm command of the activity automatically\n */\n @Input()\n @TrackExternal()\n confirmCommand: Command<any>;\n\n /**\n * @deprecated activity actions now use the cancel command of the activity automatically\n */\n @Input()\n @TrackExternal()\n cancelCommand: Command<any>;\n\n @Input()\n set faces(faces: ActivityActionsComponent.Style) {\n this.confirmFace = faces.confirm;\n this.cancelFace = faces.cancel;\n }\n\n @Input()\n confirmFace: CommandFace;\n\n @Input()\n cancelFace: CommandFace;\n\n /**\n * @deprecated use #faces instead.\n */\n @Input()\n set style(style: ActivityActionsComponent.Style) {\n this.faces = style;\n }\n\n @Input()\n @HostBinding('attr.layout')\n layout: ActivityActionsComponent.Layout = ActivityActionsComponent.Layout.BLOCK;\n\n @Input()\n @HostBinding('attr.align')\n align: ActivityActionsComponent.Align = ActivityActionsComponent.Align.STRETCH;\n\n\n constructor(private readonly cdr: ChangeDetectorRef) {\n super();\n }\n\n ngOnInit() {\n }\n\n hasConfirmFace() {\n return !!this.confirmFace;\n }\n\n hasCancelFace() {\n return !!this.cancelFace;\n }\n\n initCommands(activity: { confirmCommand: Command<unknown>, cancelCommand: Command<unknown> }) {\n this.confirmCommand = activity.confirmCommand;\n this.cancelCommand = activity.cancelCommand;\n this.cdr.detectChanges();\n }\n\n}\n\nexport namespace ActivityActionsComponent {\n\n export const Layout = Enum({\n INLINE: 'inline',\n BLOCK: 'block'\n });\n export type Layout = Enum<typeof Layout>;\n\n export const Align = Enum({\n START: 'start',\n END: 'end',\n STRETCH: 'stretch'\n });\n export type Align = Enum<typeof Align>;\n\n export interface Style {\n confirm: CommandFace;\n cancel: CommandFace;\n }\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ActivityActionsComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":31,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":26,"character":1},"arguments":[{"selector":"aup-activity-actions","template":"<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n","styles":[":host{display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}"]}]}],"members":{"confirmCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":37,"character":3}}]}],"cancelCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":44,"character":3}}]}],"faces":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"confirmFace":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":3}}]}],"cancelFace":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":56,"character":3}}]}],"style":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3}}]}],"align":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3}}]}],"alignEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":70,"character":3},"arguments":["class.align-end"]}]}],"alignStretch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":75,"character":3},"arguments":["class.align-stretch"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":80,"character":36}]}],"ngOnInit":[{"__symbolic":"method"}],"hasConfirmFace":[{"__symbolic":"method"}],"hasCancelFace":[{"__symbolic":"method"}],"initCommands":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"ActivityActionsComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":32,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":27,"character":1},"arguments":[{"selector":"aup-activity-actions","template":"<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n","styles":[":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr;padding:0}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}"]}]}],"members":{"confirmCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":38,"character":3}}]}],"cancelCommand":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":45,"character":3}}]}],"faces":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":48,"character":3}}]}],"confirmFace":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":54,"character":3}}]}],"cancelFace":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":57,"character":3}}]}],"style":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}}]}],"layout":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":69,"character":3},"arguments":["attr.layout"]}]}],"align":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":73,"character":3},"arguments":["attr.align"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":77,"character":36}]}],"ngOnInit":[{"__symbolic":"method"}],"hasConfirmFace":[{"__symbolic":"method"}],"hasCancelFace":[{"__symbolic":"method"}],"initCommands":[{"__symbolic":"method"}]}}}}]
@@ -49,7 +49,7 @@ AddCardActivityComponent.decorators = [
49
49
  { type: Component, args: [{
50
50
  selector: 'aup-add-card-activity',
51
51
  template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n",
52
- styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host[interactionStyle=inline][renderas=card]:not(.active){box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=inline][renderas=card]:not(.active):hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}:host[interactionStyle=modal][renderas=card]{box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=modal][renderas=card]:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=modal][renderas=card]:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]
52
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=inline][renderas=card]:not(.active):hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}:host[interactionStyle=modal][renderas=card]{box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=modal][renderas=card]:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=modal][renderas=card]:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]
53
53
  },] }
54
54
  ];
55
55
  AddCardActivityComponent.ctorParameters = () => [
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"AddCardActivityComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../activity-triggers/abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":17,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"aup-add-card-activity","template":"<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n","styles":[":host{display:flex;flex-direction:column;align-items:stretch}:host[interactionStyle=inline][renderas=card]:not(.active){box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=inline][renderas=card]:not(.active):hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}:host[interactionStyle=modal][renderas=card]{box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=modal][renderas=card]:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=modal][renderas=card]:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]}]}],"members":{"inlineInteractionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":[{"__symbolic":"reference","module":"../inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":21,"character":13},{"static":true}]}]}],"interactionStyle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"renderAs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":28,"character":3},"arguments":["class"]}]}],"renderAsClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":33,"character":3},"arguments":["class"]}]}],"activityTypeClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":38,"character":3},"arguments":["class"]}]}],"isRenderAsCard":[{"__symbolic":"method"}],"isRenderAsButton":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":51,"character":34}]}],"ngOnInit":[{"__symbolic":"method"}],"isModal":[{"__symbolic":"method"}],"isInline":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"AddCardActivityComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../activity-triggers/abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":17,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"aup-add-card-activity","template":"<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n","styles":[":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=inline][renderas=card]:not(.active):hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}:host[interactionStyle=modal][renderas=card]{box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=modal][renderas=card]:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=modal][renderas=card]:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]}]}],"members":{"inlineInteractionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":[{"__symbolic":"reference","module":"../inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":21,"character":13},{"static":true}]}]}],"interactionStyle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"renderAs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":28,"character":3},"arguments":["class"]}]}],"renderAsClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":33,"character":3},"arguments":["class"]}]}],"activityTypeClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":38,"character":3},"arguments":["class"]}]}],"isRenderAsCard":[{"__symbolic":"method"}],"isRenderAsButton":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":51,"character":34}]}],"ngOnInit":[{"__symbolic":"method"}],"isModal":[{"__symbolic":"method"}],"isInline":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=edit-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-context.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/edit-context.ts"],"names":[],"mappings":"","sourcesContent":["export interface EditContext<T> {\n injectError(error: string);\n // replaceValue(value:T) // TODO: implement..\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"EditContext":{"__symbolic":"interface"}}}]
@@ -0,0 +1,28 @@
1
+ import { MutableListModel, MutableValueModel, TrackExternal } from '@coolon/pectin';
2
+ export class InlineEditorModel {
3
+ constructor(valueModel, saveCallback) {
4
+ this.valueModel = valueModel;
5
+ this.saveCallback = saveCallback;
6
+ this.editing = new MutableValueModel(false);
7
+ this._validators = new MutableListModel();
8
+ }
9
+ get validators() {
10
+ return this._validators.readonly;
11
+ }
12
+ validateUsing(validator) {
13
+ this._validators.push(validator);
14
+ return this;
15
+ }
16
+ ;
17
+ isEditing() {
18
+ return this.editing.value;
19
+ }
20
+ }
21
+ (function (InlineEditorModel) {
22
+ function create(valueModel, options) {
23
+ return new InlineEditorModel(valueModel, options.save);
24
+ }
25
+ InlineEditorModel.create = create;
26
+ })(InlineEditorModel || (InlineEditorModel = {}));
27
+ TrackExternal.oneTimeBinding(InlineEditorModel);
28
+ //# sourceMappingURL=inline-editor-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-editor-model.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/inline-string-editor/inline-editor-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAyB,MAAM,gBAAgB,CAAC;AAItH,MAAM,OAAO,iBAAiB;IAK5B,YAAqB,UAAyB,EAAW,YAA+C;QAAnF,eAAU,GAAV,UAAU,CAAe;QAAW,iBAAY,GAAZ,YAAY,CAAmC;QAH/F,YAAO,GAAG,IAAI,iBAAiB,CAAU,KAAK,CAAC,CAAC;QACxC,gBAAW,GAAmC,IAAI,gBAAgB,EAAgB,CAAC;IAGpG,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED,aAAa,CAAC,SAAuB;QACnC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAAA,CAAC;IAEF,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5B,CAAC;CAEF;AAED,WAAiB,iBAAiB;IAIhC,SAAgB,MAAM,CAAI,UAAyB,EAAE,OAAkC;QACrF,OAAO,IAAI,iBAAiB,CAAI,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAFe,wBAAM,SAErB,CAAA;AAEH,CAAC,EARgB,iBAAiB,KAAjB,iBAAiB,QAQjC;AAED,aAAa,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import { ListModel, MutableListModel, MutableValueModel, TrackExternal, Validator, ValueModel } from '@coolon/pectin';\nimport { EditContext } from '../edit-context';\n\n\nexport class InlineEditorModel<T> {\n\n readonly editing = new MutableValueModel<boolean>(false);\n private readonly _validators: MutableListModel<Validator<T>> = new MutableListModel<Validator<T>>();\n\n constructor(readonly valueModel: ValueModel<T>, readonly saveCallback: InlineEditorModel.SaveCallback<T>) {\n }\n\n get validators(): ListModel<Validator<T>> {\n return this._validators.readonly;\n }\n\n validateUsing(validator: Validator<T>): this { //}, options?: HasValidators.Options): this {\n this._validators.push(validator);\n return this;\n };\n\n isEditing(): boolean {\n return this.editing.value;\n }\n\n}\n\nexport namespace InlineEditorModel {\n\n export type SaveCallback<T> = (value: T, context: EditContext<T>) => void | Promise<void>;\n\n export function create<T>(valueModel: ValueModel<T>, options: { save: SaveCallback<T> }): InlineEditorModel<T> {\n return new InlineEditorModel<T>(valueModel, options.save);\n }\n\n}\n\nTrackExternal.oneTimeBinding(InlineEditorModel);\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"InlineEditorModel":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@coolon/pectin","name":"ValueModel","line":9,"character":35,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":9,"character":46,"context":{"typeName":"T"}}]},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InlineEditorModel"},"member":"SaveCallback","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":9,"character":104,"context":{"typeName":"T"}}]}]}],"validateUsing":[{"__symbolic":"method"}],"isEditing":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,160 @@
1
+ import { __awaiter, __decorate, __metadata } from "tslib";
2
+ import { Component, Input, ViewChild } from '@angular/core';
3
+ import { Command, Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
4
+ import { lang } from '@coolon/typescript-utilities';
5
+ import * as _ from 'lodash';
6
+ import { DisposableComponent } from '../../../../components/disposable-component';
7
+ import { InteractionService } from '../../../services/interaction.service';
8
+ import { InPlaceInteractionContextComponent } from '../../inplace-interaction-context/in-place-interaction-context.component';
9
+ import { InputActivity } from '../../input-activities/input-activity';
10
+ import { StringInputActivity } from '../../input-activities/string-input-activity';
11
+ import { InlineEditorModel } from './inline-editor-model';
12
+ /**
13
+ * @example
14
+ * const source: ValueModel<string> = ...;
15
+ * const model = InlineEditorModel.create(source, {
16
+ * save(updated:string, context: InlineEditorModel.SaveContext) => {
17
+ * try {
18
+ * try and save the thing...
19
+ * } catch(error) {
20
+ * context.injectError(error)
21
+ * }
22
+ * }).validateUsing(Validator.present("We'll need a value");
23
+ *
24
+ * # in the view
25
+ * <aup-inline-string-editor
26
+ * label="My field"
27
+ * placeHolder="I'm ready for a string..."
28
+ * [editorModel]="model"></aup-inline-string-editor>
29
+ */
30
+ export class InlineStringEditorComponent extends DisposableComponent {
31
+ constructor(interactionService) {
32
+ super();
33
+ const { chain, when, valueOf } = Dsl.disposeWith(this);
34
+ const modalIC = interactionService.createModalInteractionContextDisposedWith(this);
35
+ const resolvedFacesModel = chain(this.facesModel).map(userFaces => {
36
+ return Object.assign(Object.assign({}, InlineStringEditorComponent.DEFAULT_FACES), userFaces);
37
+ }, { allowNil: true });
38
+ this.editFaceModel = resolvedFacesModel.pluck('edit');
39
+ this.saveFace = resolvedFacesModel.pluck('save');
40
+ this.cancelFace = resolvedFacesModel.pluck('cancel');
41
+ const self = this;
42
+ this.editCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
43
+ this.editorModel.editing.value = true;
44
+ try {
45
+ yield this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());
46
+ }
47
+ catch (e) {
48
+ // don't care, just hiding the console errors
49
+ }
50
+ finally {
51
+ this.editorModel.editing.value = false;
52
+ }
53
+ }));
54
+ this.onDispose(() => this.cancelEdit());
55
+ // const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));
56
+ // txo.observe('this.editFace', this.editFaceModel);
57
+ }
58
+ ngOnInit() {
59
+ // our editor model is a one time binding without delegates so we can only
60
+ // use it once we've been initialised
61
+ const { chain, when, valueOf } = Dsl.disposeWith(this);
62
+ if (!this.editorModel) {
63
+ lang.illegalState("editorModel is required");
64
+ }
65
+ when(this.editorModel.editing).becomesTruthy(() => {
66
+ this.editCommand.execute();
67
+ }, { asLongAs: this.editCommand.enabled });
68
+ when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());
69
+ this.empty = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
70
+ // deviceDescription.isNil()
71
+ ).areTruthy();
72
+ this.displayValue = chain(this.editorModel.valueModel).map(v => {
73
+ return _.isEmpty(v) ? this.placeHolderModel.value : v;
74
+ }, { dependsOn: this.placeHolderModel, allowNil: true });
75
+ }
76
+ createInputActivityData() {
77
+ const self = this;
78
+ return {
79
+ initialValue: self.editorModel.valueModel.value,
80
+ buttonStyle: { confirm: self.saveFace.value, cancel: self.cancelFace.value },
81
+ placeholder: self.placeHolderModel.value,
82
+ label: self.label,
83
+ layout: InputActivity.Layout.INLINE,
84
+ validators: self.editorModel.validators.value,
85
+ save(value, inputContext) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ yield self.editorModel.saveCallback(value, inputContext);
88
+ });
89
+ }
90
+ };
91
+ }
92
+ cancelEdit() {
93
+ if (this.isEditing()) {
94
+ this.interactionContext.cancelActiveActivity();
95
+ }
96
+ }
97
+ startEdit() {
98
+ if (!this.isEditing() && this.editCommand.enabled.value) {
99
+ this.editCommand.execute();
100
+ }
101
+ }
102
+ isEditing() {
103
+ return this.interactionContext.isActive();
104
+ }
105
+ isEmpty() {
106
+ return this.empty.value;
107
+ }
108
+ }
109
+ InlineStringEditorComponent.decorators = [
110
+ { type: Component, args: [{
111
+ selector: 'aup-inline-string-editor',
112
+ template: "<ng-container *ngIf=\"!editorModel.isEditing()\">\n <div class=\"content\" [class.editable]=\"editCommand.enabled.value\">\n <label>{{label}}</label>\n <p [class.place-holder]=\"empty.value\" (click)=\"editCommand.execute()\">{{displayValue.value}}</p>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n </div>\n</ng-container>\n<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n\n"
113
+ },] }
114
+ ];
115
+ InlineStringEditorComponent.ctorParameters = () => [
116
+ { type: InteractionService }
117
+ ];
118
+ InlineStringEditorComponent.propDecorators = {
119
+ editorModel: [{ type: Input }],
120
+ facesModel: [{ type: Input }],
121
+ faces: [{ type: Input }],
122
+ interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent,] }],
123
+ label: [{ type: Input }],
124
+ placeHolder: [{ type: Input }],
125
+ placeHolderModel: [{ type: Input }]
126
+ };
127
+ __decorate([
128
+ TrackExternal(),
129
+ __metadata("design:type", InlineEditorModel)
130
+ ], InlineStringEditorComponent.prototype, "editorModel", void 0);
131
+ __decorate([
132
+ TrackExternal(),
133
+ __metadata("design:type", ValueModel)
134
+ ], InlineStringEditorComponent.prototype, "facesModel", void 0);
135
+ __decorate([
136
+ StoreInValueModel('facesModel'),
137
+ __metadata("design:type", Object)
138
+ ], InlineStringEditorComponent.prototype, "faces", void 0);
139
+ __decorate([
140
+ StoreInValueModel('placeHolderModel'),
141
+ __metadata("design:type", String)
142
+ ], InlineStringEditorComponent.prototype, "placeHolder", void 0);
143
+ __decorate([
144
+ TrackExternal(),
145
+ __metadata("design:type", ValueModel)
146
+ ], InlineStringEditorComponent.prototype, "placeHolderModel", void 0);
147
+ (function (InlineStringEditorComponent) {
148
+ InlineStringEditorComponent.DEFAULT_FACES = {
149
+ edit: {
150
+ icon: () => 'mat:edit'
151
+ },
152
+ save: {
153
+ icon: () => 'mat:check'
154
+ },
155
+ cancel: {
156
+ icon: () => 'mat:clear'
157
+ }
158
+ };
159
+ })(InlineStringEditorComponent || (InlineStringEditorComponent = {}));
160
+ //# sourceMappingURL=inline-string-editor.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-string-editor.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAEL,OAAO,EACP,GAAG,EACH,iBAAiB,EACjB,aAAa,EACb,UAAU,EAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,E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AC;IAC5C,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC1B,CAAC;;;YA1IF,SAAS,SAAC;gBACT,QAAQ,EAAE,0BAA0B;gBACpC,uiBAAoD;aAErD;;;YA5BQ,kBAAkB;;;0BA+BxB,KAAK;yBAIL,KAAK;oBAIL,KAAK;iCAIL,SAAS,SAAC,kCAAkC;oBAG5C,KAAK;0BAGL,KAAK;+BAIL,KAAK;;AApBN;IADC,aAAa,EAAE;8BACH,iBAAiB;gEAAS;AAIvC;IADC,aAAa,EAAE;8BACJ,UAAU;+DAAoC;AAI1D;IADC,iBAAiB,CAAC,YAAY,CAAC;;0DACS;AAUzC;IADC,iBAAiB,CAAC,kBAAkB,CAAC;;gEAClB;AAIpB;IADC,aAAa,EAAE;8BACE,UAAU;qEAAS;AAgHvC,WAAiB,2BAA2B;IAQ7B,yCAAa,GAAU;QAClC,IAAI,EAAE;YACJ,IAAI,EAAE,GAAG,EAAE,CAAC,UAAU;SACvB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,GAAG,EAAE,CAAC,WAAW;SACxB;QACD,MAAM,EAAE;YACN,IAAI,EAAE,GAAG,EAAE,CAAC,WAAW;SACxB;KACF,CAAC;AAEJ,CAAC,EApBgB,2BAA2B,KAA3B,2BAA2B,QAoB3C","sourcesContent":["import { Component, Input, OnInit, ViewChild } from '@angular/core';\nimport {\n BooleanValueModelChain,\n Command,\n Dsl,\n StoreInValueModel,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport * as _ from 'lodash';\nimport { CommandFace } from '../../../../components/commands/command-face';\nimport { DisposableComponent } from '../../../../components/disposable-component';\nimport { InteractionService } from '../../../services/interaction.service';\nimport { InPlaceInteractionContextComponent } from '../../inplace-interaction-context/in-place-interaction-context.component';\nimport { InputActivity } from '../../input-activities/input-activity';\nimport { StringInputActivity } from '../../input-activities/string-input-activity';\nimport { InlineEditorModel } from './inline-editor-model';\n\n/**\n * @example\n * const source: ValueModel<string> = ...;\n * const model = InlineEditorModel.create(source, {\n * save(updated:string, context: InlineEditorModel.SaveContext) => {\n * try {\n * try and save the thing...\n * } catch(error) {\n * context.injectError(error)\n * }\n * }).validateUsing(Validator.present(\"We'll need a value\");\n *\n * # in the view\n * <aup-inline-string-editor\n * label=\"My field\"\n * placeHolder=\"I'm ready for a string...\"\n * [editorModel]=\"model\"></aup-inline-string-editor>\n */\n@Component({\n selector: 'aup-inline-string-editor',\n templateUrl: './inline-string-editor.component.html',\n styleUrls: [] // See assets/interaction/editor/inline-string-editor.scss\n})\nexport class InlineStringEditorComponent extends DisposableComponent implements OnInit {\n\n @Input()\n @TrackExternal()\n editorModel: InlineEditorModel<string>;\n\n @Input()\n @TrackExternal()\n facesModel: ValueModel<InlineStringEditorComponent.Faces>;\n\n @Input()\n @StoreInValueModel('facesModel')\n faces: InlineStringEditorComponent.Faces;\n\n @ViewChild(InPlaceInteractionContextComponent)\n interactionContext: InPlaceInteractionContextComponent<any, any, any>;\n\n @Input()\n label: string;\n\n @Input()\n @StoreInValueModel('placeHolderModel')\n placeHolder: string;\n\n @Input()\n @TrackExternal()\n placeHolderModel: ValueModel<string>;\n\n readonly description: ValueModelChain<string>;\n empty: BooleanValueModelChain;\n readonly editCommand: Command<void>;\n\n displayValue: ValueModelChain<string>;\n readonly editFaceModel: ValueModelChain<CommandFace>;\n readonly saveFace: ValueModelChain<CommandFace>;\n readonly cancelFace: ValueModelChain<CommandFace>;\n\n constructor(interactionService: InteractionService) {\n super();\n const { chain, when, valueOf } = Dsl.disposeWith(this);\n const modalIC = interactionService.createModalInteractionContextDisposedWith(this);\n\n const resolvedFacesModel = chain(this.facesModel).map(userFaces => {\n return {\n ...InlineStringEditorComponent.DEFAULT_FACES, // todo: should really inject app wide defaults as well\n ...userFaces\n };\n }, { allowNil: true });\n\n this.editFaceModel = resolvedFacesModel.pluck('edit');\n this.saveFace = resolvedFacesModel.pluck('save');\n this.cancelFace = resolvedFacesModel.pluck('cancel');\n\n const self = this;\n this.editCommand = Command.create(async () => {\n this.editorModel.editing.value = true;\n try {\n await this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());\n } catch(e) {\n // don't care, just hiding the console errors\n }\n finally {\n this.editorModel.editing.value = false;\n }\n });\n\n this.onDispose(() => this.cancelEdit());\n\n // const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));\n // txo.observe('this.editFace', this.editFaceModel);\n }\n\n\n ngOnInit(): void {\n // our editor model is a one time binding without delegates so we can only\n // use it once we've been initialised\n const { chain, when, valueOf } = Dsl.disposeWith(this);\n\n if (!this.editorModel) {\n lang.illegalState(\"editorModel is required\");\n }\n\n when(this.editorModel.editing).becomesTruthy(() => {\n this.editCommand.execute();\n }, { asLongAs: this.editCommand.enabled });\n\n when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());\n\n this.empty = valueOf.any(\n chain.stringValue(this.editorModel.valueModel).isBlank()\n // deviceDescription.isNil()\n ).areTruthy();\n\n this.displayValue = chain(this.editorModel.valueModel).map(v => {\n return _.isEmpty(v) ? this.placeHolderModel.value : v;\n }, { dependsOn: this.placeHolderModel, allowNil: true });\n\n\n }\n\n private createInputActivityData(): InputActivity.Data<string> {\n const self = this;\n return {\n initialValue: self.editorModel.valueModel.value,\n buttonStyle: { confirm: self.saveFace.value, cancel: self.cancelFace.value },\n placeholder: self.placeHolderModel.value,\n label: self.label,\n layout: InputActivity.Layout.INLINE,\n validators: self.editorModel.validators.value,\n async save(value: string, inputContext: InputActivity.Context): Promise<void> {\n await self.editorModel.saveCallback(value, inputContext);\n }\n };\n }\n\n cancelEdit() {\n if (this.isEditing()) {\n this.interactionContext.cancelActiveActivity();\n }\n }\n\n startEdit() {\n if (!this.isEditing() && this.editCommand.enabled.value) {\n this.editCommand.execute();\n }\n }\n\n private isEditing() {\n return this.interactionContext.isActive();\n }\n\n isEmpty(): boolean {\n return this.empty.value;\n }\n\n\n}\n\nexport namespace InlineStringEditorComponent {\n\n export interface Faces {\n edit?: CommandFace;\n save?: CommandFace;\n cancel?: CommandFace;\n }\n\n export const DEFAULT_FACES: Faces = {\n edit: {\n icon: () => 'mat:edit'\n },\n save: {\n icon: () => 'mat:check'\n },\n cancel: {\n icon: () => 'mat:clear'\n }\n };\n\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"InlineStringEditorComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../../components/disposable-component","name":"DisposableComponent","line":43,"character":49},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":38,"character":1},"arguments":[{"selector":"aup-inline-string-editor","styleUrls":[],"template":"<ng-container *ngIf=\"!editorModel.isEditing()\">\n <div class=\"content\" [class.editable]=\"editCommand.enabled.value\">\n <label>{{label}}</label>\n <p [class.place-holder]=\"empty.value\" (click)=\"editCommand.execute()\">{{displayValue.value}}</p>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n </div>\n</ng-container>\n<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n\n"}]}],"members":{"editorModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":46,"character":3}}]}],"facesModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":50,"character":3}}]}],"faces":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":54,"character":3},"arguments":["facesModel"]}]}],"interactionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":57,"character":3},"arguments":[{"__symbolic":"reference","module":"../../inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":57,"character":13}]}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"placeHolder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":64,"character":3},"arguments":["placeHolderModel"]}]}],"placeHolderModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":68,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../../services/interaction.service","name":"InteractionService","line":80,"character":34}]}],"ngOnInit":[{"__symbolic":"method"}],"createInputActivityData":[{"__symbolic":"method"}],"cancelEdit":[{"__symbolic":"method"}],"startEdit":[{"__symbolic":"method"}],"isEditing":[{"__symbolic":"method"}],"isEmpty":[{"__symbolic":"method"}]}}}}]