@coolon/angular-ui-powerups 3.7.0-alpha.7 → 3.7.0-alpha.8

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 (112) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +322 -647
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  8. package/esm2015/lib/components/commands/command/command.component.js +11 -13
  9. package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
  10. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
  11. package/esm2015/lib/components/commands/flex.component.js +2 -9
  12. package/esm2015/lib/components/commands/flex.component.js.map +1 -1
  13. package/esm2015/lib/components/commands/flex.component.metadata.json +1 -1
  14. package/esm2015/lib/components/commands/group/command-container.js +21 -0
  15. package/esm2015/lib/components/commands/group/command-container.js.map +1 -0
  16. package/esm2015/lib/components/commands/group/command-container.metadata.json +1 -0
  17. package/esm2015/lib/components/commands/group/popup-aware.component.js +23 -0
  18. package/esm2015/lib/components/commands/group/popup-aware.component.js.map +1 -0
  19. package/esm2015/lib/components/commands/group/popup-aware.component.metadata.json +1 -0
  20. package/esm2015/lib/components/commands/group/popup-container.js +3 -0
  21. package/esm2015/lib/components/commands/group/popup-container.js.map +1 -0
  22. package/esm2015/lib/components/commands/group/popup-container.metadata.json +1 -0
  23. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js +67 -0
  24. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -0
  25. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -0
  26. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
  27. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js +47 -0
  28. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js.map +1 -0
  29. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.metadata.json +1 -0
  30. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.ngfactory.js.map +1 -0
  31. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js +90 -0
  32. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
  33. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -0
  34. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
  35. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js +42 -0
  36. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -0
  37. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.metadata.json +1 -0
  38. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
  39. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +12 -16
  40. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -1
  41. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -1
  42. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.ngstyle.js.map +1 -0
  43. package/esm2015/lib/components/commands/separator.component.js +24 -14
  44. package/esm2015/lib/components/commands/separator.component.js.map +1 -1
  45. package/esm2015/lib/components/commands/separator.component.metadata.json +1 -1
  46. package/esm2015/lib/components/components.module.js +6 -11
  47. package/esm2015/lib/components/components.module.js.map +1 -1
  48. package/esm2015/lib/components/components.module.metadata.json +1 -1
  49. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  50. package/esm2015/lib/components/exports.js +7 -9
  51. package/esm2015/lib/components/exports.js.map +1 -1
  52. package/esm2015/lib/components/exports.metadata.json +1 -1
  53. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  54. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  55. package/fesm2015/coolon-angular-ui-powerups.js +304 -578
  56. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  57. package/lib/components/commands/command/command.component.d.ts +5 -6
  58. package/lib/components/commands/flex.component.d.ts +1 -3
  59. package/lib/components/commands/group/command-container.d.ts +16 -0
  60. package/lib/components/commands/group/popup-aware.component.d.ts +11 -0
  61. package/lib/components/commands/group/popup-container.d.ts +6 -0
  62. package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +24 -0
  63. package/lib/components/commands/group/popup-menu/more-menu.component.d.ts +12 -0
  64. package/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.d.ts +33 -0
  65. package/lib/components/commands/group/{popup-menu.component.d.ts → popup-menu/popup-menu.component.d.ts} +4 -3
  66. package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +4 -5
  67. package/lib/components/commands/separator.component.d.ts +7 -7
  68. package/lib/components/exports.d.ts +7 -9
  69. package/package.json +1 -1
  70. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js +0 -51
  71. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js.map +0 -1
  72. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.metadata.json +0 -1
  73. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.ngfactory.js.map +0 -1
  74. package/esm2015/lib/components/commands/group/command-group/command-group.component.js +0 -44
  75. package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +0 -1
  76. package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +0 -1
  77. package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +0 -1
  78. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +0 -57
  79. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +0 -1
  80. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +0 -1
  81. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +0 -1
  82. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +0 -52
  83. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +0 -1
  84. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +0 -1
  85. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +0 -1
  86. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +0 -1
  87. package/esm2015/lib/components/commands/group/command-group.js +0 -114
  88. package/esm2015/lib/components/commands/group/command-group.js.map +0 -1
  89. package/esm2015/lib/components/commands/group/command-group.metadata.json +0 -1
  90. package/esm2015/lib/components/commands/group/more-menu.component.js +0 -46
  91. package/esm2015/lib/components/commands/group/more-menu.component.js.map +0 -1
  92. package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +0 -1
  93. package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +0 -1
  94. package/esm2015/lib/components/commands/group/popup-menu.component.js +0 -41
  95. package/esm2015/lib/components/commands/group/popup-menu.component.js.map +0 -1
  96. package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +0 -1
  97. package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +0 -1
  98. package/esm2015/lib/components/commands/group/registration.js +0 -58
  99. package/esm2015/lib/components/commands/group/registration.js.map +0 -1
  100. package/esm2015/lib/components/commands/group/registration.metadata.json +0 -1
  101. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +0 -1
  102. package/esm2015/lib/components/commands/group/view-data.js +0 -113
  103. package/esm2015/lib/components/commands/group/view-data.js.map +0 -1
  104. package/esm2015/lib/components/commands/group/view-data.metadata.json +0 -1
  105. package/lib/components/commands/group/abstract-popup-menu.component.d.ts +0 -16
  106. package/lib/components/commands/group/command-group/command-group.component.d.ts +0 -12
  107. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +0 -24
  108. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +0 -18
  109. package/lib/components/commands/group/command-group.d.ts +0 -42
  110. package/lib/components/commands/group/more-menu.component.d.ts +0 -10
  111. package/lib/components/commands/group/registration.d.ts +0 -32
  112. package/lib/components/commands/group/view-data.d.ts +0 -41
@@ -1,114 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Dsl, GarbageCollector, ListModel, MutableListModel, MutableValueModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
3
- import { Registration } from './registration';
4
- import { ViewData } from './view-data';
5
- export class CommandGroup extends GarbageCollector {
6
- constructor(parent) {
7
- super();
8
- this.parent = parent;
9
- this._rootTemplate = new MutableValueModel();
10
- this._registrations = new MutableListModel();
11
- const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
12
- this.childTemplates = chain(this._rootTemplate).pluckList('children');
13
- this.initialised = chain(this._rootTemplate).isNotNil();
14
- // This is a hack to trigger re-rendering when a command is removed from it's parent using ng-if ng-for etc.
15
- when(chain(this._registrations)
16
- .throttle(20)
17
- .count())
18
- .changes((is, was) => {
19
- if (this.initialised.value) {
20
- this.notifyChanged();
21
- }
22
- });
23
- }
24
- initialise() {
25
- this.rebuildTemplates();
26
- }
27
- get rootTemplate() {
28
- return this._rootTemplate.readonly;
29
- }
30
- get registrations() {
31
- return this._registrations.readonly;
32
- }
33
- notifyChanged() {
34
- if (this.parent) {
35
- this.parent.notifyChanged();
36
- }
37
- else {
38
- this.rebuildTemplates();
39
- }
40
- }
41
- notifyChildFaceChanged(is, was) {
42
- this.notifyChanged();
43
- }
44
- rebuildTemplates() {
45
- this._rootTemplate.value = new ViewData.GroupData(this.faceListModel.value, this.xPosition, this.yPosition, this.registrations.value.map(r => r.toTemplate()));
46
- }
47
- get depth() {
48
- return this.isRoot() ? 0 : this.parent.depth + 1;
49
- }
50
- isRoot() {
51
- return false;
52
- }
53
- registerCommand(command, faceListModel) {
54
- return this.register(new Registration.CommandRegistration(command, faceListModel));
55
- }
56
- registerGroup(group, faceModel) {
57
- return this.register(new Registration.GroupRegistration(faceModel, group));
58
- }
59
- registerFlex(component) {
60
- return this.register(new Registration.FlexRegistration());
61
- }
62
- registerSeparator(component) {
63
- return this.register(new Registration.SeparatorRegistration());
64
- }
65
- register(registration) {
66
- this._registrations.push(registration);
67
- if (registration instanceof Registration.FaceRegistration) {
68
- const { when } = Dsl.disposeWith(registration);
69
- when(registration.faceListModel).changes((is, was) => {
70
- this.notifyChildFaceChanged(is, was);
71
- }, { asLongAs: this.initialised });
72
- }
73
- registration.onDispose(() => this._registrations.remove(registration));
74
- return registration;
75
- }
76
- }
77
- (function (CommandGroup) {
78
- class Root extends CommandGroup {
79
- constructor() {
80
- super();
81
- const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
82
- when(this.faceListModel).changes(() => this.notifyChanged());
83
- }
84
- isRoot() {
85
- return true;
86
- }
87
- }
88
- __decorate([
89
- TrackExternal(),
90
- __metadata("design:type", ListModel)
91
- ], Root.prototype, "faceListModel", void 0);
92
- __decorate([
93
- TrackExternal({ defaultValue: 'after' }),
94
- __metadata("design:type", ValueModel)
95
- ], Root.prototype, "xPositionModel", void 0);
96
- __decorate([
97
- StoreInValueModel('xPositionModel'),
98
- __metadata("design:type", String)
99
- ], Root.prototype, "xPosition", void 0);
100
- __decorate([
101
- TrackExternal({ defaultValue: 'below' }),
102
- __metadata("design:type", ValueModel)
103
- ], Root.prototype, "yPositionModel", void 0);
104
- __decorate([
105
- StoreInValueModel('yPositionModel'),
106
- __metadata("design:type", String)
107
- ], Root.prototype, "yPosition", void 0);
108
- CommandGroup.Root = Root;
109
- function factory() {
110
- return new Root();
111
- }
112
- CommandGroup.factory = factory;
113
- })(CommandGroup || (CommandGroup = {}));
114
- //# sourceMappingURL=command-group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-group.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/command-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAIL,GAAG,EACH,gBAAgB,EAChB,SAAS,EAET,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,UAAU,EACX,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,OAAgB,YAAa,SAAQ,gBAAgB;IAezD,YAAqB,MAAqB;QACxC,KAAK,EAAE,CAAC;QADW,WAAM,GAAN,MAAM,CAAe;QARzB,kBAAa,GAAG,IAAI,iBAAiB,EAAsB,CAAC;QAE5D,mBAAc,GAAG,IAAI,gBAAgB,EAAgB,CAAC;QASrE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAEzF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEtE,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAC;QAExD,4GAA4G;QAC5G,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;aAC5B,QAAQ,CAAC,EAAE,CAAC;aACZ,KAAK,EAAE,CAAC;aACR,OAAO,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE;YACrB,IAAI,IAA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ACzF,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM;YACJ,OAAO,IAAI,CAAC;QACd,CAAC;KACF;IAvBC;QADC,aAAa,EAAE;kCACD,SAAS;+CAAc;IAGtC;QADC,aAAa,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;kCACzB,UAAU;gDAAqB;IAG/C;QADC,iBAAiB,CAAC,gBAAgB,CAAC;;2CACN;IAG9B;QADC,aAAa,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;kCACzB,UAAU;gDAAoB;IAG9C;QADC,iBAAiB,CAAC,gBAAgB,CAAC;;2CACP;IAflB,iBAAI,OA0BhB,CAAA;IAED,SAAgB,OAAO;QACrB,OAAO,IAAI,IAAI,EAAE,CAAC;IACpB,CAAC;IAFe,oBAAO,UAEtB,CAAA;AACH,CAAC,EAhCgB,YAAY,KAAZ,YAAY,QAgC5B","sourcesContent":["import {\n BooleanValueModelChain,\n Command,\n Disposable,\n Dsl,\n GarbageCollector,\n ListModel,\n ListModelChain,\n MutableListModel,\n MutableValueModel,\n StoreInValueModel, Trace,\n TrackExternal,\n ValueModel\n} from '@coolon/pectin';\nimport { CommandFace } from '../command-face';\nimport { FlexComponent } from '../flex.component';\nimport { SeparatorComponent } from '../separator.component';\nimport { Registration } from './registration';\nimport { ViewData } from './view-data';\n\nexport abstract class CommandGroup extends GarbageCollector {\n\n abstract faceListModel: ListModel<CommandFace>;\n\n abstract xPosition: 'before' | 'after';\n abstract yPosition: 'above' | 'below';\n\n private readonly _rootTemplate = new MutableValueModel<ViewData.GroupData>();\n\n private readonly _registrations = new MutableListModel<Registration>();\n\n readonly childTemplates: ListModelChain<ViewData>;\n\n private initialised: BooleanValueModelChain;\n\n constructor(readonly parent?: CommandGroup) {\n super();\n\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n\n this.childTemplates = chain(this._rootTemplate).pluckList('children');\n\n this.initialised = chain(this._rootTemplate).isNotNil();\n\n // This is a hack to trigger re-rendering when a command is removed from it's parent using ng-if ng-for etc.\n when(chain(this._registrations)\n .throttle(20)\n .count())\n .changes((is, was) => {\n if (this.initialised.value) {\n this.notifyChanged();\n }\n });\n }\n\n initialise() {\n this.rebuildTemplates();\n }\n\n get rootTemplate() {\n return this._rootTemplate.readonly;\n }\n\n get registrations(): ListModel<Registration> {\n return this._registrations.readonly;\n }\n\n notifyChanged() {\n if (this.parent) {\n this.parent.notifyChanged();\n } else {\n this.rebuildTemplates();\n }\n }\n\n private notifyChildFaceChanged(is: CommandFace[], was: CommandFace[]) {\n this.notifyChanged();\n }\n\n private rebuildTemplates() {\n this._rootTemplate.value = new ViewData.GroupData(\n this.faceListModel.value,\n this.xPosition,\n this.yPosition,\n this.registrations.value.map(r => r.toTemplate())\n );\n }\n\n get depth(): number {\n return this.isRoot() ? 0 : this.parent.depth + 1;\n }\n\n isRoot(): boolean {\n return false;\n }\n\n registerCommand(command: Command<unknown>, faceListModel: ListModel<CommandFace>): Disposable {\n return this.register(new Registration.CommandRegistration(command, faceListModel));\n }\n\n registerGroup(group: CommandGroup, faceModel: ListModel<CommandFace>): Disposable {\n return this.register(new Registration.GroupRegistration(faceModel, group));\n }\n\n registerFlex(component: FlexComponent): Disposable {\n return this.register(new Registration.FlexRegistration());\n }\n\n registerSeparator(component: SeparatorComponent): Disposable {\n return this.register(new Registration.SeparatorRegistration());\n }\n\n protected register(registration: Registration): Registration {\n this._registrations.push(registration);\n if (registration instanceof Registration.FaceRegistration) {\n const { when } = Dsl.disposeWith(registration);\n when(registration.faceListModel).changes((is, was) => {\n this.notifyChildFaceChanged(is, was);\n }, { asLongAs: this.initialised });\n }\n registration.onDispose(() => this._registrations.remove(registration));\n return registration;\n }\n\n}\n\nexport namespace CommandGroup {\n export class Root extends CommandGroup {\n\n @TrackExternal()\n faceListModel: ListModel<CommandFace>;\n\n @TrackExternal({ defaultValue: 'after' })\n xPositionModel: ValueModel<'before' | 'after'>;\n\n @StoreInValueModel('xPositionModel')\n xPosition: 'before' | 'after';\n\n @TrackExternal({ defaultValue: 'below' })\n yPositionModel: ValueModel<'above' | 'below'>;\n\n @StoreInValueModel('yPositionModel')\n yPosition: 'above' | 'below';\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n when(this.faceListModel).changes(() => this.notifyChanged());\n }\n\n isRoot(): boolean {\n return true;\n }\n }\n\n export function factory(): Root {\n return new Root();\n }\n}\n\n\n"]}
@@ -1 +0,0 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"CommandGroup":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":20,"character":43},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"CommandGroup"}]}],"initialise":[{"__symbolic":"method"}],"notifyChanged":[{"__symbolic":"method"}],"notifyChildFaceChanged":[{"__symbolic":"method"}],"rebuildTemplates":[{"__symbolic":"method"}],"isRoot":[{"__symbolic":"method"}],"registerCommand":[{"__symbolic":"method"}],"registerGroup":[{"__symbolic":"method"}],"registerFlex":[{"__symbolic":"method"}],"registerSeparator":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}]}}}}]
@@ -1,46 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Component, Input } from '@angular/core';
3
- import { Dsl, MutableValueModel, StoreInValueModel } from '@coolon/pectin';
4
- import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
5
- import { CommandGroup } from './command-group';
6
- const ɵ0 = CommandGroup.factory;
7
- /**
8
- *
9
- */
10
- export class MoreMenuComponent extends AbstractPopupMenuComponent {
11
- constructor(group) {
12
- super(group);
13
- this.tooltipModel = new MutableValueModel();
14
- const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
15
- group.xPosition = 'before'; // this should be the default unless overridden by the user.
16
- group.faceListModel = chain(this.tooltipModel).mapToList(tooltip => {
17
- return [
18
- {
19
- icon: () => 'mat:more_vert',
20
- tooltip() {
21
- return tooltip;
22
- }
23
- }
24
- ];
25
- }, { allowNil: true });
26
- }
27
- }
28
- MoreMenuComponent.decorators = [
29
- { type: Component, args: [{
30
- selector: 'aup-more-menu',
31
- template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
32
- providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
33
- },] }
34
- ];
35
- MoreMenuComponent.ctorParameters = () => [
36
- { type: CommandGroup }
37
- ];
38
- MoreMenuComponent.propDecorators = {
39
- tooltip: [{ type: Input }]
40
- };
41
- __decorate([
42
- StoreInValueModel('tooltipModel'),
43
- __metadata("design:type", String)
44
- ], MoreMenuComponent.prototype, "tooltip", void 0);
45
- export { ɵ0 };
46
- //# sourceMappingURL=more-menu.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"more-menu.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/more-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;WAQI,YAAY,CAAC,OAAO;AANvE;;GAEG;AAMH,MAAM,OAAO,iBAAkB,SAAQ,0BAA0B;IAO/D,YAAY,KAAmB;QAC7B,KAAK,CAAC,KAAK,CAAC,CAAC;QANP,iBAAY,GAAG,IAAI,iBAAiB,EAAU,CAAC;QAOrD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,4DAA4D;QACxF,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;YACjE,OAAO;gBACL;oBACE,IAAI,EAAE,GAAG,EAAE,CAAC,eAAe;oBAC3B,OAAO;wBACL,OAAO,OAAO,CAAC;oBACjB,CAAC;iBACF;aACF,CAAC;QACJ,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACzB,CAAC;;;YA1BF,SAAS,SAAC;gBACT,QAAQ,EAAE,eAAe;gBACzB,QAAQ,EAAE,0JAA0J;gBACpK,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,IAAsB,EAAE,CAAC;aACzE;;;YATQ,YAAY;;;sBAclB,KAAK;;AACN;IADU,iBAAiB,CAAC,cAAc,CAAC;;kDAC3B","sourcesContent":["import { Component, Input } from '@angular/core';\nimport { Dsl, MutableValueModel, StoreInValueModel } from '@coolon/pectin';\nimport { AbstractPopupMenuComponent } from './abstract-popup-menu.component';\nimport { CommandGroup } from './command-group';\n\n/**\n *\n */\n@Component({\n selector: 'aup-more-menu',\n template: '<aup-command-group-renderer [renderRootNode]=\"true\" [groupViewDataModel]=\"group.rootTemplate\" (commandFired)=\"closeMenu()\"></aup-command-group-renderer>',\n providers: [{ provide: CommandGroup, useFactory: CommandGroup.factory }]\n})\nexport class MoreMenuComponent extends AbstractPopupMenuComponent {\n\n private tooltipModel = new MutableValueModel<string>();\n\n @Input() @StoreInValueModel('tooltipModel')\n tooltip: string;\n\n constructor(group: CommandGroup) {\n super(group);\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n group.xPosition = 'before'; // this should be the default unless overridden by the user.\n group.faceListModel = chain(this.tooltipModel).mapToList(tooltip => {\n return [\n {\n icon: () => 'mat:more_vert',\n tooltip(): string {\n return tooltip;\n }\n }\n ];\n }, { allowNil: true });\n }\n\n}\n"]}
@@ -1 +0,0 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"./command-group","name":"CommandGroup","line":11,"character":51},"member":"factory"},"MoreMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-popup-menu.component","name":"AbstractPopupMenuComponent","line":13,"character":39},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":8,"character":1},"arguments":[{"selector":"aup-more-menu","template":"<aup-command-group-renderer [renderRootNode]=\"true\" [groupViewDataModel]=\"group.rootTemplate\" (commandFired)=\"closeMenu()\"></aup-command-group-renderer>","providers":[{"provide":{"__symbolic":"reference","module":"./command-group","name":"CommandGroup","line":11,"character":25},"useFactory":{"__symbolic":"reference","name":"ɵ0"}}]}]}],"members":{"tooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":17,"character":12},"arguments":["tooltipModel"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./command-group","name":"CommandGroup","line":20,"character":21}]}]}}}}]
@@ -1 +0,0 @@
1
- {"version":3,"file":"more-menu.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/more-menu.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -1,41 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Component, Input } from '@angular/core';
3
- import { Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
4
- import { CommandFace } from '../command-face';
5
- import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
6
- import { CommandGroup } from './command-group';
7
- const ɵ0 = CommandGroup.factory;
8
- /**
9
- *
10
- */
11
- export class PopupMenuComponent extends AbstractPopupMenuComponent {
12
- constructor(group) {
13
- super(group);
14
- const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
15
- group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
16
- }
17
- }
18
- PopupMenuComponent.decorators = [
19
- { type: Component, args: [{
20
- selector: 'aup-popup-menu',
21
- template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
22
- providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
23
- },] }
24
- ];
25
- PopupMenuComponent.ctorParameters = () => [
26
- { type: CommandGroup }
27
- ];
28
- PopupMenuComponent.propDecorators = {
29
- faceModel: [{ type: Input }],
30
- face: [{ type: Input }]
31
- };
32
- __decorate([
33
- TrackExternal(),
34
- __metadata("design:type", ValueModel)
35
- ], PopupMenuComponent.prototype, "faceModel", void 0);
36
- __decorate([
37
- StoreInValueModel('faceModel'),
38
- __metadata("design:type", Object)
39
- ], PopupMenuComponent.prototype, "face", void 0);
40
- export { ɵ0 };
41
- //# sourceMappingURL=popup-menu.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"popup-menu.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/popup-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;WASI,YAAY,CAAC,OAAO;AAPvE;;GAEG;AAOH,MAAM,OAAO,kBAAmB,SAAQ,0BAA0B;IAQhE,YAAY,KAAmB;QAC7B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,CAAC;;;YAlBF,SAAS,SAAC;gBACT,QAAQ,EAAE,gBAAgB;gBAC1B,QAAQ,EAAE,0JAA0J;gBAEpK,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,IAAsB,EAAE,CAAC;aACzE;;;YAVQ,YAAY;;;wBAalB,KAAK;mBAGL,KAAK;;AAFN;IADU,aAAa,EAAE;8BACd,UAAU;qDAAc;AAGnC;IADU,iBAAiB,CAAC,WAAW,CAAC;;gDACtB","sourcesContent":["import { Component, Input } from '@angular/core';\n\nimport { Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { CommandFace } from '../command-face';\nimport { AbstractPopupMenuComponent } from './abstract-popup-menu.component';\nimport { CommandGroup } from './command-group';\n\n/**\n *\n */\n@Component({\n selector: 'aup-popup-menu',\n template: '<aup-command-group-renderer [renderRootNode]=\"true\" [groupViewDataModel]=\"group.rootTemplate\" (commandFired)=\"closeMenu()\"></aup-command-group-renderer>',\n styleUrls: [],\n providers: [{ provide: CommandGroup, useFactory: CommandGroup.factory }]\n})\nexport class PopupMenuComponent extends AbstractPopupMenuComponent {\n\n @Input() @TrackExternal()\n faceModel: ValueModel<CommandFace>;\n\n @Input() @StoreInValueModel('faceModel')\n face: CommandFace;\n\n constructor(group: CommandGroup) {\n super(group);\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n group.faceListModel = chain(this.faceModel).mapToList(face => [face]);\n }\n\n\n}\n"]}
@@ -1 +0,0 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"./command-group","name":"CommandGroup","line":14,"character":51},"member":"factory"},"PopupMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-popup-menu.component","name":"AbstractPopupMenuComponent","line":16,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"aup-popup-menu","template":"<aup-command-group-renderer [renderRootNode]=\"true\" [groupViewDataModel]=\"group.rootTemplate\" (commandFired)=\"closeMenu()\"></aup-command-group-renderer>","styleUrls":[],"providers":[{"provide":{"__symbolic":"reference","module":"./command-group","name":"CommandGroup","line":14,"character":25},"useFactory":{"__symbolic":"reference","name":"ɵ0"}}]}]}],"members":{"faceModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12}}]}],"face":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":21,"character":12},"arguments":["faceModel"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./command-group","name":"CommandGroup","line":24,"character":21}]}]}}}}]
@@ -1 +0,0 @@
1
- {"version":3,"file":"popup-menu.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/popup-menu.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -1,58 +0,0 @@
1
- import { GarbageCollector } from '@coolon/pectin';
2
- import { ViewData } from './view-data';
3
- export class Registration extends GarbageCollector {
4
- }
5
- (function (Registration) {
6
- class FaceRegistration extends Registration {
7
- constructor(faceListModel) {
8
- super();
9
- this.faceListModel = faceListModel;
10
- }
11
- }
12
- Registration.FaceRegistration = FaceRegistration;
13
- class CommandRegistration extends FaceRegistration {
14
- constructor(command, faceListModel) {
15
- super(faceListModel);
16
- this.command = command;
17
- }
18
- toTemplate() {
19
- return new ViewData.CommandData(this.command, this.faceListModel.value);
20
- }
21
- }
22
- Registration.CommandRegistration = CommandRegistration;
23
- class GroupRegistration extends FaceRegistration {
24
- constructor(faceModel, group) {
25
- super(faceModel);
26
- this.group = group;
27
- }
28
- toTemplate() {
29
- return new ViewData.GroupData(this.faceListModel.value, this.group.xPosition, this.group.yPosition, this.group.registrations.value.map(r => r.toTemplate()));
30
- }
31
- }
32
- Registration.GroupRegistration = GroupRegistration;
33
- class SeparatorRegistration extends Registration {
34
- constructor() {
35
- super(...arguments);
36
- this.template = new ViewData.SeparatorData();
37
- }
38
- toTemplate() {
39
- return this.template;
40
- }
41
- }
42
- Registration.SeparatorRegistration = SeparatorRegistration;
43
- class FlexRegistration extends Registration {
44
- constructor() {
45
- super(...arguments);
46
- this.template = new ViewData.FlexData();
47
- }
48
- toTemplate() {
49
- return this.template;
50
- }
51
- }
52
- Registration.FlexRegistration = FlexRegistration;
53
- function hasFace(entry) {
54
- return entry instanceof CommandRegistration || entry instanceof GroupRegistration;
55
- }
56
- Registration.hasFace = hasFace;
57
- })(Registration || (Registration = {}));
58
- //# sourceMappingURL=registration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/registration.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,gBA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,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;KACF;IANY,kCAAqB,wBAMjC,CAAA;IAED,MAAa,gBAAiB,SAAQ,YAAY;QAAlD;;YACmB,aAAQ,GAAG,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAKtD,CAAC;QAHC,UAAU;YACR,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;KACF;IANY,6BAAgB,mBAM5B,CAAA;IAED,SAAgB,OAAO,CAAC,KAAmB;QACzC,OAAO,KAAK,YAAY,mBAAmB,IAAI,KAAK,YAAY,iBAAiB,CAAC;IACpF,CAAC;IAFe,oBAAO,UAEtB,CAAA;AAEH,CAAC,EArDgB,YAAY,KAAZ,YAAY,QAqD5B","sourcesContent":["\nimport { Command, GarbageCollector, ListModel, ValueModel } from '@coolon/pectin';\nimport { CommandGroup } from './command-group';\nimport { ViewData } from './view-data';\nimport { CommandFace } from '../command-face';\n\nexport abstract class Registration extends GarbageCollector {\n abstract toTemplate(): ViewData;\n}\n\nexport namespace Registration {\n\n export abstract class FaceRegistration extends Registration {\n protected constructor(readonly faceListModel: ListModel<CommandFace>) {\n super();\n }\n }\n\n export class CommandRegistration extends FaceRegistration {\n constructor(readonly command: Command<unknown>, faceListModel: ListModel<CommandFace>) {\n super(faceListModel);\n }\n\n toTemplate(): ViewData.CommandData {\n return new ViewData.CommandData(this.command, this.faceListModel.value);\n }\n }\n\n export class GroupRegistration extends FaceRegistration {\n constructor(faceModel: ListModel<CommandFace>, readonly group: CommandGroup) {\n super(faceModel);\n }\n\n toTemplate(): ViewData.GroupData {\n return new ViewData.GroupData(this.faceListModel.value,\n this.group.xPosition,\n this.group.yPosition,\n this.group.registrations.value.map(r => r.toTemplate())\n );\n }\n\n }\n\n export class SeparatorRegistration extends Registration {\n private readonly template = new ViewData.SeparatorData();\n\n toTemplate(): ViewData.SeparatorData {\n return this.template;\n }\n }\n\n export class FlexRegistration extends Registration {\n private readonly template = new ViewData.FlexData();\n\n toTemplate(): ViewData.FlexData {\n return this.template;\n }\n }\n\n export function hasFace(entry: Registration): entry is FaceRegistration {\n return entry instanceof CommandRegistration || entry instanceof GroupRegistration;\n }\n\n}\n\n\n"]}
@@ -1 +0,0 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"Registration":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":6,"character":43},"members":{"toTemplate":[{"__symbolic":"method"}]}}}}]
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-bar.component.scss.shim.ngstyle.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -1,113 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { lang, assert } from '@coolon/pectin';
3
- import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
4
- import { CommandFace } from '../command-face';
5
- export class ViewData {
6
- }
7
- (function (ViewData) {
8
- class FaceData extends ViewData {
9
- constructor(faces) {
10
- super();
11
- this.faces = faces;
12
- assert.notNil(faces);
13
- }
14
- get activeFaceAdapter() {
15
- return new CommandFace.Adapter(this.faces.length > 0 ? this.faces[0] : undefined);
16
- }
17
- }
18
- __decorate([
19
- Memoize(),
20
- __metadata("design:type", CommandFace.Adapter),
21
- __metadata("design:paramtypes", [])
22
- ], FaceData.prototype, "activeFaceAdapter", null);
23
- ViewData.FaceData = FaceData;
24
- class GroupData extends FaceData {
25
- constructor(faces, xPosition, yPosition, children) {
26
- super(faces);
27
- this.xPosition = xPosition;
28
- this.yPosition = yPosition;
29
- this.children = children;
30
- }
31
- get hasMixedIcons() {
32
- const hasFaces = this.children.filter(c => ViewData.hasFace(c));
33
- const iconCount = hasFaces.filter(c => !!c.activeFaceAdapter.icon).length;
34
- return iconCount > 0 && hasFaces.length !== iconCount;
35
- }
36
- }
37
- __decorate([
38
- Memoize(),
39
- __metadata("design:type", Boolean),
40
- __metadata("design:paramtypes", [])
41
- ], GroupData.prototype, "hasMixedIcons", null);
42
- ViewData.GroupData = GroupData;
43
- class CommandData extends FaceData {
44
- constructor(command, faces) {
45
- super(faces);
46
- this.command = command;
47
- }
48
- }
49
- ViewData.CommandData = CommandData;
50
- class SeparatorData extends ViewData {
51
- }
52
- ViewData.SeparatorData = SeparatorData;
53
- class FlexData extends ViewData {
54
- }
55
- ViewData.FlexData = FlexData;
56
- function as(type, viewData) {
57
- return viewData instanceof type ? viewData : lang.illegalState(`expected instance of ${type.name}, got ${viewData.constructor.name}`);
58
- }
59
- ViewData.as = as;
60
- function getCommand(data) {
61
- return as(CommandData, data).command;
62
- }
63
- ViewData.getCommand = getCommand;
64
- function getTooltip(data) {
65
- return as(FaceData, data).activeFaceAdapter.tooltip;
66
- }
67
- ViewData.getTooltip = getTooltip;
68
- function getStyle(data) {
69
- return as(FaceData, data).activeFaceAdapter.style;
70
- }
71
- ViewData.getStyle = getStyle;
72
- function getColor(data) {
73
- return as(FaceData, data).activeFaceAdapter.color;
74
- }
75
- ViewData.getColor = getColor;
76
- function hasText(data) {
77
- return !!as(FaceData, data).activeFaceAdapter.text;
78
- }
79
- ViewData.hasText = hasText;
80
- function getFaces(data) {
81
- return as(FaceData, data).faces;
82
- }
83
- ViewData.getFaces = getFaces;
84
- function asGroup(viewData) {
85
- return as(GroupData, viewData);
86
- }
87
- ViewData.asGroup = asGroup;
88
- function hasMixedIcons(data) {
89
- return as(GroupData, data).hasMixedIcons;
90
- }
91
- ViewData.hasMixedIcons = hasMixedIcons;
92
- function isGroup(data) {
93
- return data instanceof GroupData;
94
- }
95
- ViewData.isGroup = isGroup;
96
- function hasFace(data) {
97
- return data instanceof FaceData;
98
- }
99
- ViewData.hasFace = hasFace;
100
- function isCommand(data) {
101
- return data instanceof CommandData;
102
- }
103
- ViewData.isCommand = isCommand;
104
- function isSeparator(data) {
105
- return data instanceof SeparatorData;
106
- }
107
- ViewData.isSeparator = isSeparator;
108
- function isFlex(data) {
109
- return data instanceof FlexData;
110
- }
111
- ViewData.isFlex = isFlex;
112
- })(ViewData || (ViewData = {}));
113
- //# sourceMappingURL=view-data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view-data.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/view-data.ts"],"names":[],"mappings":";AACA,OAAO,EAA0B,IAAI,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,MAAM,OAAO,QAAQ;CACpB;AAED,WAAiB,QAAQ;IAEvB,MAAa,QAAS,SAAQ,QAAQ;QAEpC,YAAqB,KAAoB;YACvC,KAAK,EAAE,CAAC;YADW,UAAK,GAAL,KAAK,CAAe;YAEvC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAGD,IAAI,iBAAiB;YACnB,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;QACnF,CAAC;KACF;IAHC;QADC,OAAO,EAAE;kCACe,WAAW,CAAC,OAAO;;qDAE3C;IAVU,iBAAQ,WAWpB,CAAA;IAED,MAAa,SAAU,SAAQ,QAAQ;QACrC,YAAY,KAAoB,EACX,SAAS,EACT,SAAS,EACT,QAAoB;YACvC,KAAK,CAAC,KAAK,CAAC,CAAC;YAHM,cAAS,GAAT,SAAS,CAAA;YACT,cAAS,GAAT,SAAS,CAAA;YACT,aAAQ,GAAR,QAAQ,CAAY;QAEzC,CAAC;QAGD,IAAI,aAAa;YACf,MAAM,QAAQ,GAAG,IAAI,CAAC,Q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OAAO,IAAI,YAAY,aAAa,CAAC;IACvC,CAAC;IAFe,oBAAW,cAE1B,CAAA;IAED,SAAgB,MAAM,CAAC,IAAc;QACnC,OAAO,IAAI,YAAY,QAAQ,CAAC;IAClC,CAAC;IAFe,eAAM,SAErB,CAAA;AAGH,CAAC,EArGgB,QAAQ,KAAR,QAAQ,QAqGxB","sourcesContent":["import { ThemePalette } from '@angular/material/core';\nimport { Command, Constructable, lang, assert } from '@coolon/pectin';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport { CommandFace } from '../command-face';\n\n\nexport class ViewData {\n}\n\nexport namespace ViewData {\n\n export class FaceData extends ViewData {\n\n constructor(readonly faces: CommandFace[]) {\n super();\n assert.notNil(faces);\n }\n\n @Memoize()\n get activeFaceAdapter(): CommandFace.Adapter {\n return new CommandFace.Adapter(this.faces.length > 0 ? this.faces[0] : undefined)\n }\n }\n\n export class GroupData extends FaceData {\n constructor(faces: CommandFace[],\n readonly xPosition,\n readonly yPosition,\n readonly children: ViewData[]) {\n super(faces);\n }\n\n @Memoize()\n get hasMixedIcons(): boolean {\n const hasFaces = this.children.filter(c => ViewData.hasFace(c)) as ViewData.FaceData[]\n const iconCount = hasFaces.filter(c => !!c.activeFaceAdapter.icon).length;\n return iconCount > 0 && hasFaces.length !== iconCount;\n }\n }\n\n export class CommandData extends FaceData {\n constructor(readonly command: Command<unknown>, faces: CommandFace[]) {\n super(faces);\n }\n }\n\n export class SeparatorData extends ViewData {\n }\n\n export class FlexData extends ViewData {\n }\n\n\n export function as<T extends ViewData>(type: Constructable<T>, viewData: ViewData): T {\n return viewData instanceof type ? viewData : lang.illegalState(`expected instance of ${type.name}, got ${viewData.constructor.name}`);\n }\n\n export function getCommand(data: ViewData): Command<unknown> {\n return as(CommandData, data).command;\n }\n\n export function getTooltip(data: ViewData): string {\n return as(FaceData, data).activeFaceAdapter.tooltip;\n }\n\n export function getStyle(data: ViewData): string {\n return as(FaceData, data).activeFaceAdapter.style;\n }\n\n export function getColor(data: ViewData): ThemePalette {\n return as(FaceData, data).activeFaceAdapter.color as ThemePalette;\n }\n\n export function hasText(data: ViewData): boolean {\n return !!as(FaceData, data).activeFaceAdapter.text;\n }\n\n export function getFaces(data: ViewData): CommandFace[] {\n return as(FaceData, data).faces;\n }\n\n export function asGroup(viewData: ViewData): ViewData.GroupData {\n return as(GroupData, viewData);\n }\n\n export function hasMixedIcons(data: ViewData): boolean {\n return as(GroupData, data).hasMixedIcons;\n }\n\n export function isGroup(data: ViewData): data is GroupData {\n return data instanceof GroupData;\n }\n\n export function hasFace(data: ViewData): data is FaceData {\n return data instanceof FaceData;\n }\n\n export function isCommand(data: ViewData): data is CommandData {\n return data instanceof CommandData;\n }\n\n export function isSeparator(data: ViewData): data is SeparatorData {\n return data instanceof SeparatorData;\n }\n\n export function isFlex(data: ViewData): data is FlexData {\n return data instanceof FlexData;\n }\n\n\n}\n"]}
@@ -1 +0,0 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ViewData":{"__symbolic":"class"}}}]
@@ -1,16 +0,0 @@
1
- import { AfterContentInit, OnInit, QueryList } from '@angular/core';
2
- import { MatMenuTrigger } from '@angular/material/menu';
3
- import { DisposableComponent } from '../../disposable-component';
4
- import { CommandGroup } from './command-group';
5
- export declare class AbstractPopupMenuComponent extends DisposableComponent implements OnInit, AfterContentInit {
6
- readonly group: CommandGroup;
7
- get xPosition(): 'before' | 'after';
8
- set xPosition(position: 'before' | 'after');
9
- get yPosition(): 'above' | 'below';
10
- set yPosition(position: 'above' | 'below');
11
- triggers: QueryList<MatMenuTrigger>;
12
- constructor(group: CommandGroup);
13
- ngAfterContentInit(): void;
14
- ngOnInit(): void;
15
- closeMenu(): void;
16
- }
@@ -1,12 +0,0 @@
1
- import { ListModel, ValueModel } from '@coolon/pectin';
2
- import { CommandFace } from '../../command-face';
3
- import { CommandGroup } from '../command-group';
4
- export declare class CommandGroupComponent extends CommandGroup {
5
- readonly parent: CommandGroup;
6
- faceModel: ValueModel<CommandFace>;
7
- readonly faceListModel: ListModel<CommandFace>;
8
- face: CommandFace;
9
- xPosition: 'before' | 'after';
10
- yPosition: 'above' | 'below';
11
- constructor(parent: CommandGroup);
12
- }
@@ -1,24 +0,0 @@
1
- import { EventEmitter, QueryList } from '@angular/core';
2
- import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
3
- import { Command, ListModelChain, ValueModelChain } from '@coolon/pectin';
4
- import { DisposableComponent } from '../../../disposable-component';
5
- import { TrackBy } from '../../../track-by';
6
- import { Registration } from '../registration';
7
- import { ViewData } from '../view-data';
8
- export declare class CommandGroupMenuRendererComponent extends DisposableComponent {
9
- readonly parent?: CommandGroupMenuRendererComponent;
10
- menuComponent: MatMenu;
11
- private readonly groupViewDataModel;
12
- groupViewData: ViewData.GroupData;
13
- commandFired: EventEmitter<any>;
14
- triggers: QueryList<MatMenuTrigger>;
15
- readonly children: ListModelChain<Registration>;
16
- readonly hasMixedIcons: ValueModelChain<boolean>;
17
- readonly ViewData: typeof ViewData;
18
- readonly commandProxy: Command<unknown>;
19
- TrackBy: typeof TrackBy;
20
- constructor(parent?: CommandGroupMenuRendererComponent);
21
- executeCommand(data: Registration): void;
22
- isEnabled(data: Registration): boolean;
23
- onCommandFired(): void;
24
- }
@@ -1,18 +0,0 @@
1
- import { EventEmitter, QueryList } from '@angular/core';
2
- import { MatMenuTrigger } from '@angular/material/menu';
3
- import { ListModelChain, ValueModel } from '@coolon/pectin';
4
- import { DisposableComponent } from '../../../disposable-component';
5
- import { ViewData } from '../view-data';
6
- import { TrackBy } from '../../../track-by';
7
- export declare class CommandGroupRendererComponent extends DisposableComponent {
8
- groupViewDataModel: ValueModel<ViewData.GroupData>;
9
- groupViewData: ViewData.GroupData;
10
- renderRootNode: boolean;
11
- commandFired: EventEmitter<any>;
12
- readonly ViewData: typeof ViewData;
13
- readonly childViewDataModels: ListModelChain<ViewData>;
14
- TrackBy: typeof TrackBy;
15
- triggers: QueryList<MatMenuTrigger>;
16
- constructor();
17
- onCommandFired(): void;
18
- }
@@ -1,42 +0,0 @@
1
- import { Command, Disposable, GarbageCollector, ListModel, ListModelChain, ValueModel } from '@coolon/pectin';
2
- import { CommandFace } from '../command-face';
3
- import { FlexComponent } from '../flex.component';
4
- import { SeparatorComponent } from '../separator.component';
5
- import { Registration } from './registration';
6
- import { ViewData } from './view-data';
7
- export declare abstract class CommandGroup extends GarbageCollector {
8
- readonly parent?: CommandGroup;
9
- abstract faceListModel: ListModel<CommandFace>;
10
- abstract xPosition: 'before' | 'after';
11
- abstract yPosition: 'above' | 'below';
12
- private readonly _rootTemplate;
13
- private readonly _registrations;
14
- readonly childTemplates: ListModelChain<ViewData>;
15
- private initialised;
16
- constructor(parent?: CommandGroup);
17
- initialise(): void;
18
- get rootTemplate(): ValueModel<ViewData.GroupData>;
19
- get registrations(): ListModel<Registration>;
20
- notifyChanged(): void;
21
- private notifyChildFaceChanged;
22
- private rebuildTemplates;
23
- get depth(): number;
24
- isRoot(): boolean;
25
- registerCommand(command: Command<unknown>, faceListModel: ListModel<CommandFace>): Disposable;
26
- registerGroup(group: CommandGroup, faceModel: ListModel<CommandFace>): Disposable;
27
- registerFlex(component: FlexComponent): Disposable;
28
- registerSeparator(component: SeparatorComponent): Disposable;
29
- protected register(registration: Registration): Registration;
30
- }
31
- export declare namespace CommandGroup {
32
- class Root extends CommandGroup {
33
- faceListModel: ListModel<CommandFace>;
34
- xPositionModel: ValueModel<'before' | 'after'>;
35
- xPosition: 'before' | 'after';
36
- yPositionModel: ValueModel<'above' | 'below'>;
37
- yPosition: 'above' | 'below';
38
- constructor();
39
- isRoot(): boolean;
40
- }
41
- function factory(): Root;
42
- }
@@ -1,10 +0,0 @@
1
- import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
2
- import { CommandGroup } from './command-group';
3
- /**
4
- *
5
- */
6
- export declare class MoreMenuComponent extends AbstractPopupMenuComponent {
7
- private tooltipModel;
8
- tooltip: string;
9
- constructor(group: CommandGroup);
10
- }
@@ -1,32 +0,0 @@
1
- import { Command, GarbageCollector, ListModel } from '@coolon/pectin';
2
- import { CommandGroup } from './command-group';
3
- import { ViewData } from './view-data';
4
- import { CommandFace } from '../command-face';
5
- export declare abstract class Registration extends GarbageCollector {
6
- abstract toTemplate(): ViewData;
7
- }
8
- export declare namespace Registration {
9
- abstract class FaceRegistration extends Registration {
10
- readonly faceListModel: ListModel<CommandFace>;
11
- protected constructor(faceListModel: ListModel<CommandFace>);
12
- }
13
- class CommandRegistration extends FaceRegistration {
14
- readonly command: Command<unknown>;
15
- constructor(command: Command<unknown>, faceListModel: ListModel<CommandFace>);
16
- toTemplate(): ViewData.CommandData;
17
- }
18
- class GroupRegistration extends FaceRegistration {
19
- readonly group: CommandGroup;
20
- constructor(faceModel: ListModel<CommandFace>, group: CommandGroup);
21
- toTemplate(): ViewData.GroupData;
22
- }
23
- class SeparatorRegistration extends Registration {
24
- private readonly template;
25
- toTemplate(): ViewData.SeparatorData;
26
- }
27
- class FlexRegistration extends Registration {
28
- private readonly template;
29
- toTemplate(): ViewData.FlexData;
30
- }
31
- function hasFace(entry: Registration): entry is FaceRegistration;
32
- }